BUILD 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  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/tv/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.go",
  32. "doc.go",
  33. "generate.go",
  34. ],
  35. embed = [":api_go_proto"],
  36. importpath = "go-common/app/service/main/tv/api",
  37. tags = ["automanaged"],
  38. visibility = ["//visibility:public"],
  39. deps = [
  40. "//app/service/main/tv/internal/model:go_default_library",
  41. "//library/net/rpc/warden:go_default_library",
  42. "//library/time:go_default_library",
  43. "@com_github_gogo_protobuf//gogoproto:go_default_library",
  44. "@com_github_gogo_protobuf//proto:go_default_library",
  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 = [":package-srcs"],
  58. tags = ["automanaged"],
  59. visibility = ["//visibility:public"],
  60. )