BUILD 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  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 = "api_proto",
  12. srcs = ["api.proto"],
  13. tags = ["automanaged"],
  14. deps = [
  15. "@com_google_protobuf//:empty_proto",
  16. "@gogo_special_proto//github.com/gogo/protobuf/gogoproto",
  17. ],
  18. )
  19. go_proto_library(
  20. name = "api_go_proto",
  21. compilers = ["@io_bazel_rules_go//proto:gogofast_grpc"],
  22. importpath = "go-common/app/service/bbq/topic/api",
  23. proto = ":api_proto",
  24. tags = ["automanaged"],
  25. deps = [
  26. "@com_github_gogo_protobuf//gogoproto:go_default_library",
  27. "@io_bazel_rules_go//proto/wkt:empty_go_proto",
  28. ],
  29. )
  30. go_library(
  31. name = "go_default_library",
  32. srcs = [
  33. "client.go",
  34. "common.go",
  35. ],
  36. embed = [":api_go_proto"],
  37. importpath = "go-common/app/service/bbq/topic/api",
  38. tags = ["automanaged"],
  39. visibility = ["//visibility:public"],
  40. deps = [
  41. "//library/log: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. "@io_bazel_rules_go//proto/wkt:empty_go_proto",
  46. "@org_golang_google_grpc//:go_default_library",
  47. "@org_golang_x_net//context:go_default_library",
  48. ],
  49. )
  50. filegroup(
  51. name = "package-srcs",
  52. srcs = glob(["**"]),
  53. tags = ["automanaged"],
  54. visibility = ["//visibility:private"],
  55. )
  56. filegroup(
  57. name = "all-srcs",
  58. srcs = [":package-srcs"],
  59. tags = ["automanaged"],
  60. visibility = ["//visibility:public"],
  61. )