BUILD 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  1. load(
  2. "@io_bazel_rules_go//go:def.bzl",
  3. "go_library",
  4. "go_test",
  5. )
  6. load(
  7. "@io_bazel_rules_go//proto:def.bzl",
  8. "go_proto_library",
  9. )
  10. proto_library(
  11. name = "v1_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 = "v1_go_proto",
  18. compilers = ["@io_bazel_rules_go//proto:gogofast_grpc"],
  19. importpath = "go-common/app/service/main/identify/api/grpc",
  20. proto = ":v1_proto",
  21. tags = ["manual"],
  22. deps = ["@com_github_gogo_protobuf//gogoproto:go_default_library"],
  23. )
  24. go_library(
  25. name = "go_default_library",
  26. srcs = [
  27. "client.go",
  28. "string.go",
  29. ],
  30. embed = [":v1_go_proto"],
  31. importpath = "go-common/app/service/main/identify/api/grpc",
  32. tags = ["automanaged"],
  33. visibility = ["//visibility:public"],
  34. deps = [
  35. "//library/net/rpc/warden:go_default_library",
  36. "@com_github_gogo_protobuf//gogoproto:go_default_library",
  37. "@com_github_gogo_protobuf//proto:go_default_library",
  38. "@org_golang_google_grpc//:go_default_library",
  39. "@org_golang_x_net//context:go_default_library",
  40. ],
  41. )
  42. filegroup(
  43. name = "package-srcs",
  44. srcs = glob(["**"]),
  45. tags = ["automanaged"],
  46. visibility = ["//visibility:private"],
  47. )
  48. filegroup(
  49. name = "all-srcs",
  50. srcs = [":package-srcs"],
  51. tags = ["automanaged"],
  52. visibility = ["//visibility:public"],
  53. )
  54. go_test(
  55. name = "go_default_test",
  56. srcs = ["string_test.go"],
  57. embed = [":go_default_library"],
  58. rundir = ".",
  59. tags = ["automanaged"],
  60. )