BUILD 1.6 KB

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