BUILD 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  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 = "model_proto",
  12. srcs = ["auth.proto"],
  13. tags = ["automanaged"],
  14. deps = ["@gogo_special_proto//github.com/gogo/protobuf/gogoproto"],
  15. )
  16. go_proto_library(
  17. name = "model_go_proto",
  18. compilers = ["@io_bazel_rules_go//proto:gogofast_proto"],
  19. importmap = "go-common/app/service/main/passport-auth/model",
  20. importpath = "go-common/app/service/main/passport-auth/model",
  21. proto = ":model_proto",
  22. tags = ["automanaged"],
  23. deps = ["@com_github_gogo_protobuf//gogoproto:go_default_library"],
  24. )
  25. go_library(
  26. name = "go_default_library",
  27. srcs = [
  28. "model.go",
  29. "rpc.go",
  30. ],
  31. embed = [":model_go_proto"],
  32. importpath = "go-common/app/service/main/passport-auth/model",
  33. tags = ["automanaged"],
  34. visibility = ["//visibility:public"],
  35. deps = [
  36. "@com_github_gogo_protobuf//gogoproto:go_default_library",
  37. "@com_github_golang_protobuf//proto:go_default_library",
  38. ],
  39. )
  40. filegroup(
  41. name = "package-srcs",
  42. srcs = glob(["**"]),
  43. tags = ["automanaged"],
  44. visibility = ["//visibility:private"],
  45. )
  46. filegroup(
  47. name = "all-srcs",
  48. srcs = [":package-srcs"],
  49. tags = ["automanaged"],
  50. visibility = ["//visibility:public"],
  51. )