buf.gen.yaml 1.0 KB

1234567891011121314151617181920212223242526272829303132333435
  1. version: v1
  2. managed:
  3. enabled: true
  4. go_package_prefix:
  5. default: github.com/usememos/memos/proto/gen
  6. except:
  7. - buf.build/googleapis/googleapis
  8. plugins:
  9. - plugin: buf.build/protocolbuffers/go:v1.31.0
  10. out: gen
  11. opt:
  12. - paths=source_relative
  13. - plugin: buf.build/grpc/go:v1.3.0
  14. out: gen
  15. opt:
  16. - paths=source_relative
  17. - plugin: buf.build/grpc-ecosystem/gateway:v2.16.1
  18. out: gen
  19. opt:
  20. - paths=source_relative
  21. # Build the TypeScript definitions for the web.
  22. - plugin: buf.build/community/stephenh-ts-proto:v1.152.1
  23. out: ../web/src/types/proto
  24. # reference: https://github.com/deeplay-io/nice-grpc/blob/master/packages/nice-grpc-web/README.md#using-ts-proto
  25. opt:
  26. - env=browser
  27. - useOptionals=messages
  28. - outputServices=generic-definitions
  29. - outputJsonMethods=false
  30. - useExactTypes=false
  31. - esModuleInterop=true
  32. - plugin: buf.build/community/pseudomuto-doc:v1.5.1
  33. out: gen
  34. opt:
  35. - markdown,README.md,source_relative