BUILD 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475
  1. load(
  2. "@io_bazel_rules_go//go:def.bzl",
  3. "go_library",
  4. "go_test",
  5. )
  6. load(
  7. "@io_bazel_rules_go//proto:def.bzl",
  8. "go_proto_library",
  9. )
  10. filegroup(
  11. name = "package-srcs",
  12. srcs = glob(["**"]),
  13. tags = ["automanaged"],
  14. visibility = ["//visibility:private"],
  15. )
  16. filegroup(
  17. name = "all-srcs",
  18. srcs = [
  19. ":package-srcs",
  20. "//app/service/main/member/api/gorpc:all-srcs",
  21. ],
  22. tags = ["automanaged"],
  23. visibility = ["//visibility:public"],
  24. )
  25. proto_library(
  26. name = "api_proto",
  27. srcs = ["api.proto"],
  28. tags = ["automanaged"],
  29. deps = ["@gogo_special_proto//github.com/gogo/protobuf/gogoproto"],
  30. )
  31. go_proto_library(
  32. name = "api_go_proto",
  33. compilers = ["@io_bazel_rules_go//proto:gogofast_grpc"],
  34. importpath = "go-common/app/service/main/member/api",
  35. proto = ":api_proto",
  36. tags = ["automanaged"],
  37. deps = [
  38. "//library/time:go_default_library",
  39. "@com_github_gogo_protobuf//gogoproto:go_default_library",
  40. ],
  41. )
  42. go_library(
  43. name = "go_default_library",
  44. srcs = [
  45. "client.go",
  46. "copy.go",
  47. ],
  48. embed = [":api_go_proto"],
  49. importpath = "go-common/app/service/main/member/api",
  50. tags = ["automanaged"],
  51. visibility = ["//visibility:public"],
  52. deps = [
  53. "//app/service/main/member/model:go_default_library",
  54. "//app/service/main/member/model/block:go_default_library",
  55. "//library/net/rpc/warden:go_default_library",
  56. "//library/time:go_default_library",
  57. "@com_github_gogo_protobuf//gogoproto:go_default_library",
  58. "@com_github_gogo_protobuf//proto:go_default_library",
  59. "@org_golang_google_grpc//:go_default_library",
  60. "@org_golang_x_net//context:go_default_library",
  61. ],
  62. )
  63. go_test(
  64. name = "go_default_test",
  65. srcs = ["client_test.go"],
  66. embed = [":go_default_library"],
  67. tags = ["automanaged"],
  68. deps = ["//vendor/github.com/smartystreets/goconvey/convey:go_default_library"],
  69. )