BUILD 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  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. )
  15. go_proto_library(
  16. name = "api_go_proto",
  17. compilers = ["@io_bazel_rules_go//proto:go_grpc"],
  18. importpath = "go-common/app/service/main/location/api",
  19. proto = ":api_proto",
  20. tags = ["automanaged"],
  21. )
  22. go_library(
  23. name = "go_default_library",
  24. srcs = ["client.go"],
  25. embed = [":api_go_proto"],
  26. importpath = "go-common/app/service/main/location/api",
  27. tags = ["automanaged"],
  28. visibility = ["//visibility:public"],
  29. deps = [
  30. "//library/net/rpc/warden:go_default_library",
  31. "@com_github_golang_protobuf//proto:go_default_library",
  32. "@org_golang_google_grpc//:go_default_library",
  33. "@org_golang_x_net//context:go_default_library",
  34. ],
  35. )
  36. filegroup(
  37. name = "package-srcs",
  38. srcs = glob(["**"]),
  39. tags = ["automanaged"],
  40. visibility = ["//visibility:private"],
  41. )
  42. filegroup(
  43. name = "all-srcs",
  44. srcs = [":package-srcs"],
  45. tags = ["automanaged"],
  46. visibility = ["//visibility:public"],
  47. )