BUILD 2.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283
  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 = [
  13. "api.proto",
  14. "archive.proto",
  15. "reply.proto",
  16. "request.proto",
  17. "sign_up.proto",
  18. "up.proto",
  19. ],
  20. tags = ["automanaged"],
  21. deps = [
  22. "//app/service/main/archive/api:api_proto",
  23. "@go_googleapis//google/api:annotations_proto",
  24. "@gogo_special_proto//github.com/gogo/protobuf/gogoproto",
  25. ],
  26. )
  27. go_proto_library(
  28. name = "v1_go_proto",
  29. compilers = ["@io_bazel_rules_go//proto:gogofast_grpc"],
  30. importpath = "go-common/app/service/main/up/api/v1",
  31. proto = ":v1_proto",
  32. tags = ["automanaged"],
  33. deps = [
  34. "//app/service/main/archive/api:api_go_proto",
  35. "//library/time:go_default_library",
  36. "@com_github_gogo_protobuf//gogoproto:go_default_library",
  37. "@go_googleapis//google/api:annotations_go_proto",
  38. ],
  39. )
  40. go_library(
  41. name = "go_default_library",
  42. srcs = [
  43. "api.pb.bm.go",
  44. "client.go",
  45. "mock.go",
  46. ],
  47. embed = [":v1_go_proto"],
  48. importpath = "go-common/app/service/main/up/api/v1",
  49. tags = ["automanaged"],
  50. visibility = ["//visibility:public"],
  51. deps = [
  52. "//app/service/main/archive/api:go_default_library",
  53. "//app/tool/protoc-gen-bm/jsonpb:go_default_library",
  54. "//library/net/http/blademaster:go_default_library",
  55. "//library/net/rpc/warden:go_default_library",
  56. "//library/time:go_default_library",
  57. "//vendor/github.com/golang/mock/gomock:go_default_library",
  58. "//vendor/google.golang.org/genproto/googleapis/api/annotations:go_default_library",
  59. "@com_github_gogo_protobuf//gogoproto:go_default_library",
  60. "@com_github_gogo_protobuf//proto:go_default_library",
  61. "@org_golang_google_grpc//:go_default_library",
  62. "@org_golang_x_net//context:go_default_library",
  63. ],
  64. )
  65. filegroup(
  66. name = "package-srcs",
  67. srcs = glob(["**"]),
  68. tags = ["automanaged"],
  69. visibility = ["//visibility:private"],
  70. )
  71. filegroup(
  72. name = "all-srcs",
  73. srcs = [":package-srcs"],
  74. tags = ["automanaged"],
  75. visibility = ["//visibility:public"],
  76. )