BUILD 2.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  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 = "v1_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 = "v1_go_proto",
  19. compilers = ["@io_bazel_rules_go//proto:gogofast_grpc"],
  20. importpath = "go-common/app/interface/main/creative/api",
  21. proto = ":v1_proto",
  22. tags = ["automanaged"],
  23. deps = ["@com_github_gogo_protobuf//gogoproto:go_default_library"],
  24. )
  25. go_test(
  26. name = "go_default_test",
  27. srcs = ["client_test.go"],
  28. embed = [":go_default_library"],
  29. tags = ["automanaged"],
  30. deps = [
  31. "//library/log:go_default_library",
  32. "//library/naming/discovery:go_default_library",
  33. "//library/net/netutil/breaker:go_default_library",
  34. "//library/net/rpc/warden:go_default_library",
  35. "//library/net/rpc/warden/resolver:go_default_library",
  36. "//library/time:go_default_library",
  37. "//vendor/github.com/smartystreets/goconvey/convey:go_default_library",
  38. ],
  39. )
  40. go_library(
  41. name = "go_default_library",
  42. srcs = ["client.go"],
  43. embed = [":v1_go_proto"],
  44. importpath = "go-common/app/interface/main/creative/api",
  45. tags = ["automanaged"],
  46. visibility = ["//visibility:public"],
  47. deps = [
  48. "//library/net/rpc/warden:go_default_library",
  49. "@com_github_gogo_protobuf//gogoproto:go_default_library",
  50. "@com_github_gogo_protobuf//proto:go_default_library",
  51. "@org_golang_google_grpc//:go_default_library",
  52. "@org_golang_x_net//context:go_default_library",
  53. ],
  54. )
  55. filegroup(
  56. name = "package-srcs",
  57. srcs = glob(["**"]),
  58. tags = ["automanaged"],
  59. visibility = ["//visibility:private"],
  60. )
  61. filegroup(
  62. name = "all-srcs",
  63. srcs = [":package-srcs"],
  64. tags = ["automanaged"],
  65. visibility = ["//visibility:public"],
  66. )