BUILD 1.9 KB

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