BUILD 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  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 = ["api.proto"],
  13. tags = ["automanaged"],
  14. )
  15. go_proto_library(
  16. name = "v1_go_proto",
  17. compilers = ["@io_bazel_rules_go//proto:go_grpc"],
  18. importpath = "go-common/app/service/main/spy/api",
  19. proto = ":v1_proto",
  20. tags = ["automanaged"],
  21. )
  22. go_library(
  23. name = "go_default_library",
  24. srcs = [
  25. "client.go",
  26. "copy.go",
  27. "doc.go",
  28. ],
  29. embed = [":v1_go_proto"],
  30. importpath = "go-common/app/service/main/spy/api",
  31. tags = ["automanaged"],
  32. visibility = ["//visibility:public"],
  33. deps = [
  34. "//app/service/main/spy/model:go_default_library",
  35. "//library/net/rpc/warden:go_default_library",
  36. "//library/time: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. )