BUILD 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  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/service/main/identify-game/api/grpc/v1",
  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/net/rpc/warden:go_default_library",
  32. "//vendor/github.com/smartystreets/goconvey/convey:go_default_library",
  33. ],
  34. )
  35. go_library(
  36. name = "go_default_library",
  37. srcs = ["client.go"],
  38. embed = [":v1_go_proto"],
  39. importpath = "go-common/app/service/main/identify-game/api/grpc/v1",
  40. tags = ["automanaged"],
  41. visibility = ["//visibility:public"],
  42. deps = [
  43. "//library/net/rpc/warden: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 = [":package-srcs"],
  59. tags = ["automanaged"],
  60. visibility = ["//visibility:public"],
  61. )