BUILD 2.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889
  1. package(default_visibility = ["//visibility:public"])
  2. load(
  3. "@io_bazel_rules_go//go:def.bzl",
  4. "go_test",
  5. "go_library",
  6. )
  7. load(
  8. "@io_bazel_rules_go//proto:def.bzl",
  9. "go_proto_library",
  10. )
  11. proto_library(
  12. name = "model_proto",
  13. srcs = ["member.proto"],
  14. tags = ["automanaged"],
  15. visibility = ["//visibility:public"],
  16. deps = ["@gogo_special_proto//github.com/gogo/protobuf/gogoproto"],
  17. )
  18. go_proto_library(
  19. name = "model_go_proto",
  20. compilers = ["@io_bazel_rules_go//proto:gogofast_proto"],
  21. importpath = "go-common/app/job/main/member/model",
  22. proto = ":model_proto",
  23. tags = ["automanaged"],
  24. visibility = ["//visibility:public"],
  25. deps = [
  26. "//library/time:go_default_library",
  27. "@com_github_gogo_protobuf//gogoproto:go_default_library",
  28. ],
  29. )
  30. go_test(
  31. name = "go_default_test",
  32. srcs = ["model_test.go"],
  33. embed = [
  34. ":go_default_library",
  35. ],
  36. rundir = ".",
  37. tags = ["automanaged"],
  38. deps = [
  39. "//library/time:go_default_library",
  40. "//vendor/github.com/stretchr/testify/assert:go_default_library",
  41. ],
  42. )
  43. go_library(
  44. name = "go_default_library",
  45. srcs = [
  46. "base.go",
  47. "model.go",
  48. "moral.go",
  49. "notify.go",
  50. "official.go",
  51. "old_account.go",
  52. "realname.go",
  53. ],
  54. embed = [":model_go_proto"],
  55. importpath = "go-common/app/job/main/member/model",
  56. tags = ["automanaged"],
  57. deps = [
  58. "//app/job/main/member/conf:go_default_library",
  59. "//library/log:go_default_library",
  60. "//library/time:go_default_library",
  61. "//vendor/github.com/pkg/errors:go_default_library",
  62. "//vendor/github.com/satori/go.uuid:go_default_library",
  63. "@com_github_gogo_protobuf//gogoproto:go_default_library",
  64. "@com_github_gogo_protobuf//proto:go_default_library",
  65. ],
  66. )
  67. filegroup(
  68. name = "package-srcs",
  69. srcs = glob(["**"]),
  70. tags = ["automanaged"],
  71. visibility = ["//visibility:private"],
  72. )
  73. filegroup(
  74. name = "all-srcs",
  75. srcs = [
  76. ":package-srcs",
  77. "//app/job/main/member/model/block:all-srcs",
  78. "//app/job/main/member/model/queue:all-srcs",
  79. ],
  80. tags = ["automanaged"],
  81. visibility = ["//visibility:public"],
  82. )