BUILD 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  1. load(
  2. "@io_bazel_rules_go//proto:def.bzl",
  3. "go_proto_library",
  4. )
  5. package(default_visibility = ["//visibility:public"])
  6. load(
  7. "@io_bazel_rules_go//go:def.bzl",
  8. "go_library",
  9. )
  10. proto_library(
  11. name = "v1_proto",
  12. srcs = ["api.proto"],
  13. tags = ["automanaged"],
  14. deps = [
  15. "//app/service/main/ugcpay-rank/internal/model:model_proto",
  16. "@com_google_protobuf//:empty_proto",
  17. "@gogo_special_proto//github.com/gogo/protobuf/gogoproto",
  18. ],
  19. )
  20. go_proto_library(
  21. name = "v1_go_proto",
  22. compilers = ["@io_bazel_rules_go//proto:gogofast_grpc"],
  23. importpath = "go-common/app/service/main/ugcpay-rank/api/v1",
  24. proto = ":v1_proto",
  25. tags = ["automanaged"],
  26. deps = [
  27. "//app/service/main/ugcpay-rank/internal/model:model_go_proto",
  28. "@com_github_gogo_protobuf//gogoproto:go_default_library",
  29. "@io_bazel_rules_go//proto/wkt:empty_go_proto",
  30. ],
  31. )
  32. go_library(
  33. name = "go_default_library",
  34. srcs = [
  35. "client.go",
  36. "generate.go",
  37. ],
  38. embed = [":v1_go_proto"],
  39. importpath = "go-common/app/service/main/ugcpay-rank/api/v1",
  40. tags = ["automanaged"],
  41. visibility = ["//visibility:public"],
  42. deps = [
  43. "//app/service/main/ugcpay-rank/internal/model:go_default_library",
  44. "//library/net/rpc/warden:go_default_library",
  45. "@com_github_gogo_protobuf//gogoproto:go_default_library",
  46. "@com_github_gogo_protobuf//proto:go_default_library",
  47. "@io_bazel_rules_go//proto/wkt:empty_go_proto",
  48. "@org_golang_google_grpc//:go_default_library",
  49. "@org_golang_x_net//context:go_default_library",
  50. ],
  51. )
  52. filegroup(
  53. name = "package-srcs",
  54. srcs = glob(["**"]),
  55. tags = ["automanaged"],
  56. visibility = ["//visibility:private"],
  57. )
  58. filegroup(
  59. name = "all-srcs",
  60. srcs = [":package-srcs"],
  61. tags = ["automanaged"],
  62. visibility = ["//visibility:public"],
  63. )