BUILD 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  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/main/account/api",
  20. proto = ":api_proto",
  21. tags = ["automanaged"],
  22. deps = [
  23. "//library/time:go_default_library",
  24. "@com_github_gogo_protobuf//gogoproto:go_default_library",
  25. ],
  26. )
  27. go_library(
  28. name = "go_default_library",
  29. srcs = [
  30. "client.go",
  31. "copy_autogenerated.go",
  32. "mock.go",
  33. "vip.go",
  34. ],
  35. embed = [":api_go_proto"],
  36. importpath = "go-common/app/service/main/account/api",
  37. tags = ["automanaged"],
  38. visibility = ["//visibility:public"],
  39. deps = [
  40. "//app/service/main/member/model:go_default_library",
  41. "//library/net/rpc/warden:go_default_library",
  42. "//library/time:go_default_library",
  43. "//vendor/github.com/golang/mock/gomock:go_default_library",
  44. "@com_github_gogo_protobuf//gogoproto:go_default_library",
  45. "@com_github_gogo_protobuf//proto:go_default_library",
  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 = [
  59. ":package-srcs",
  60. "//app/service/main/account/api/gorpc:all-srcs",
  61. ],
  62. tags = ["automanaged"],
  63. visibility = ["//visibility:public"],
  64. )