BUILD 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  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 = "api_proto",
  12. srcs = ["api.proto"],
  13. tags = ["automanaged"],
  14. deps = [
  15. "//app/service/main/favorite/model:model_proto",
  16. "@com_google_protobuf//:empty_proto",
  17. "@gogo_special_proto//github.com/gogo/protobuf/gogoproto",
  18. ],
  19. )
  20. go_proto_library(
  21. name = "api_go_proto",
  22. compilers = ["@io_bazel_rules_go//proto:gogofast_grpc"],
  23. importpath = "go-common/app/service/main/favorite/api",
  24. proto = ":api_proto",
  25. tags = ["automanaged"],
  26. deps = [
  27. "//app/service/main/favorite/model:model_go_proto",
  28. "@com_github_gogo_protobuf//gogoproto:go_default_library",
  29. "@io_bazel_rules_go//proto/wkt:empty_go_proto",
  30. ],
  31. )
  32. go_library(
  33. name = "go_default_library",
  34. srcs = ["client.go"],
  35. embed = [":api_go_proto"],
  36. importpath = "go-common/app/service/main/favorite/api",
  37. tags = ["automanaged"],
  38. visibility = ["//visibility:public"],
  39. deps = [
  40. "//app/service/main/favorite/model:go_default_library",
  41. "//library/net/rpc/warden:go_default_library",
  42. "@com_github_gogo_protobuf//gogoproto:go_default_library",
  43. "@com_github_gogo_protobuf//proto:go_default_library",
  44. "@io_bazel_rules_go//proto/wkt:empty_go_proto",
  45. "@org_golang_google_grpc//:go_default_library",
  46. "@org_golang_x_net//context:go_default_library",
  47. ],
  48. )
  49. filegroup(
  50. name = "package-srcs",
  51. srcs = glob(["**"]),
  52. tags = ["automanaged"],
  53. visibility = ["//visibility:private"],
  54. )
  55. filegroup(
  56. name = "all-srcs",
  57. srcs = [
  58. ":package-srcs",
  59. "//app/service/main/favorite/api/gorpc:all-srcs",
  60. ],
  61. tags = ["automanaged"],
  62. visibility = ["//visibility:public"],
  63. )