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/sms/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/sms/api",
  23. proto = ":v1_proto",
  24. tags = ["automanaged"],
  25. deps = [
  26. "//app/service/main/sms/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 = ["client.go"],
  33. embed = [":v1_go_proto"],
  34. importpath = "go-common/app/service/main/sms/api",
  35. tags = ["automanaged"],
  36. visibility = ["//visibility:public"],
  37. deps = [
  38. "//app/service/main/sms/model:go_default_library",
  39. "//library/net/rpc/warden:go_default_library",
  40. "@com_github_gogo_protobuf//gogoproto:go_default_library",
  41. "@com_github_gogo_protobuf//proto:go_default_library",
  42. "@org_golang_google_grpc//:go_default_library",
  43. "@org_golang_x_net//context:go_default_library",
  44. ],
  45. )
  46. filegroup(
  47. name = "package-srcs",
  48. srcs = glob(["**"]),
  49. tags = ["automanaged"],
  50. visibility = ["//visibility:private"],
  51. )
  52. filegroup(
  53. name = "all-srcs",
  54. srcs = [
  55. ":package-srcs",
  56. "//app/service/main/sms/api/gorpc:all-srcs",
  57. ],
  58. tags = ["automanaged"],
  59. visibility = ["//visibility:public"],
  60. )