BUILD 1.7 KB

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