BUILD 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  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 = ["@gogo_special_proto//github.com/gogo/protobuf/gogoproto"],
  15. )
  16. go_proto_library(
  17. name = "api_go_proto",
  18. compilers = ["@io_bazel_rules_go//proto:gogofast_grpc"],
  19. importpath = "go-common/app/service/live/xroom/api",
  20. proto = ":api_proto",
  21. tags = ["automanaged"],
  22. deps = ["@com_github_gogo_protobuf//gogoproto:go_default_library"],
  23. )
  24. go_library(
  25. name = "go_default_library",
  26. srcs = [
  27. "api.bm.go",
  28. "generate.go",
  29. ],
  30. embed = [":api_go_proto"],
  31. importpath = "go-common/app/service/live/xroom/api",
  32. tags = ["automanaged"],
  33. visibility = ["//visibility:public"],
  34. deps = [
  35. "//library/net/http/blademaster:go_default_library",
  36. "//library/net/http/blademaster/binding:go_default_library",
  37. "@com_github_gogo_protobuf//gogoproto:go_default_library",
  38. "@com_github_gogo_protobuf//proto:go_default_library",
  39. "@org_golang_google_grpc//:go_default_library",
  40. "@org_golang_x_net//context:go_default_library",
  41. ],
  42. )
  43. filegroup(
  44. name = "package-srcs",
  45. srcs = glob(["**"]),
  46. tags = ["automanaged"],
  47. visibility = ["//visibility:private"],
  48. )
  49. filegroup(
  50. name = "all-srcs",
  51. srcs = [":package-srcs"],
  52. tags = ["automanaged"],
  53. visibility = ["//visibility:public"],
  54. )