BUILD 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  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 = "v1_proto",
  12. srcs = [
  13. "model.proto",
  14. "service.proto",
  15. ],
  16. tags = ["automanaged"],
  17. )
  18. go_proto_library(
  19. name = "v1_go_proto",
  20. compilers = ["@io_bazel_rules_go//proto:go_grpc"],
  21. importpath = "go-common/app/service/openplatform/pgc-season/api/grpc/season/v1",
  22. proto = ":v1_proto",
  23. tags = ["automanaged"],
  24. )
  25. go_library(
  26. name = "go_default_library",
  27. srcs = ["client.go"],
  28. embed = [":v1_go_proto"],
  29. importpath = "go-common/app/service/openplatform/pgc-season/api/grpc/season/v1",
  30. tags = ["automanaged"],
  31. visibility = ["//visibility:public"],
  32. deps = [
  33. "//library/net/rpc/warden:go_default_library",
  34. "@com_github_gogo_protobuf//proto:go_default_library",
  35. "@org_golang_google_grpc//:go_default_library",
  36. "@org_golang_x_net//context:go_default_library",
  37. ],
  38. )
  39. filegroup(
  40. name = "package-srcs",
  41. srcs = glob(["**"]),
  42. tags = ["automanaged"],
  43. visibility = ["//visibility:private"],
  44. )
  45. filegroup(
  46. name = "all-srcs",
  47. srcs = [":package-srcs"],
  48. tags = ["automanaged"],
  49. visibility = ["//visibility:public"],
  50. )