BUILD 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  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/broadcast/model:model_proto",
  16. "@gogo_special_proto//github.com/gogo/protobuf/gogoproto",
  17. ],
  18. )
  19. go_proto_library(
  20. name = "v1_go_proto",
  21. compilers = ["@io_bazel_rules_go//proto:gogofast_grpc"],
  22. importpath = "go-common/app/service/main/broadcast/api/grpc/v1",
  23. proto = ":v1_proto",
  24. tags = ["manual"],
  25. deps = [
  26. "//app/service/main/broadcast/model:model_go_proto",
  27. "@com_github_gogo_protobuf//gogoproto:go_default_library",
  28. ],
  29. )
  30. go_library(
  31. name = "go_default_library",
  32. srcs = [
  33. "api.go",
  34. "client.go",
  35. ],
  36. embed = [":v1_go_proto"],
  37. importpath = "go-common/app/service/main/broadcast/api/grpc/v1",
  38. tags = ["automanaged"],
  39. visibility = ["//visibility:public"],
  40. deps = [
  41. "//app/service/main/broadcast/model:go_default_library",
  42. "//library/net/rpc/warden:go_default_library",
  43. "@com_github_gogo_protobuf//gogoproto:go_default_library",
  44. "@com_github_gogo_protobuf//proto:go_default_library",
  45. "@org_golang_google_grpc//:go_default_library",
  46. "@org_golang_x_net//context:go_default_library",
  47. ],
  48. )
  49. filegroup(
  50. name = "package-srcs",
  51. srcs = glob(["**"]),
  52. tags = ["automanaged"],
  53. visibility = ["//visibility:private"],
  54. )
  55. filegroup(
  56. name = "all-srcs",
  57. srcs = [":package-srcs"],
  58. tags = ["automanaged"],
  59. visibility = ["//visibility:public"],
  60. )