BUILD 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. load(
  2. "@io_bazel_rules_go//proto:def.bzl",
  3. "go_proto_library",
  4. )
  5. load(
  6. "@io_bazel_rules_go//go:def.bzl",
  7. "go_library",
  8. )
  9. go_library(
  10. name = "go_default_library",
  11. srcs = [
  12. "message.go",
  13. "passport.go",
  14. "user.go",
  15. ],
  16. embed = [":model_go_proto"],
  17. importpath = "go-common/app/job/main/passport-user/model",
  18. tags = ["automanaged"],
  19. visibility = ["//visibility:public"],
  20. deps = [
  21. "//library/time:go_default_library",
  22. "@com_github_gogo_protobuf//gogoproto:go_default_library",
  23. "@com_github_golang_protobuf//proto:go_default_library",
  24. ],
  25. )
  26. filegroup(
  27. name = "package-srcs",
  28. srcs = glob(["**"]),
  29. tags = ["automanaged"],
  30. visibility = ["//visibility:private"],
  31. )
  32. filegroup(
  33. name = "all-srcs",
  34. srcs = [":package-srcs"],
  35. tags = ["automanaged"],
  36. visibility = ["//visibility:public"],
  37. )
  38. proto_library(
  39. name = "model_proto",
  40. srcs = ["user.proto"],
  41. tags = ["automanaged"],
  42. deps = ["@gogo_special_proto//github.com/gogo/protobuf/gogoproto"],
  43. )
  44. go_proto_library(
  45. name = "model_go_proto",
  46. compilers = ["@io_bazel_rules_go//proto:gogofast_proto"],
  47. importpath = "go-common/app/job/main/passport-user/model",
  48. proto = ":model_proto",
  49. tags = ["automanaged"],
  50. deps = ["@com_github_gogo_protobuf//gogoproto:go_default_library"],
  51. )