BUILD 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687
  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. go_test(
  12. name = "go_default_test",
  13. srcs = ["article_test.go"],
  14. embed = [":go_default_library"],
  15. rundir = ".",
  16. tags = ["automanaged"],
  17. deps = ["//vendor/github.com/smartystreets/goconvey/convey:go_default_library"],
  18. )
  19. go_library(
  20. name = "go_default_library",
  21. srcs = [
  22. "activity.go",
  23. "apply.go",
  24. "article.go",
  25. "author.go",
  26. "cards.go",
  27. "creation.go",
  28. "hotspots.go",
  29. "infoc.go",
  30. "list.go",
  31. "rank.go",
  32. "rpc.go",
  33. "setting.go",
  34. "sort.go",
  35. ],
  36. embed = [":model_go_proto"],
  37. importpath = "go-common/app/interface/openplatform/article/model",
  38. tags = ["automanaged"],
  39. deps = [
  40. "//app/interface/main/creative/model/data:go_default_library",
  41. "//app/service/main/account/model:go_default_library",
  42. "//library/time:go_default_library",
  43. "@com_github_gogo_protobuf//gogoproto:go_default_library",
  44. "@com_github_gogo_protobuf//proto:go_default_library",
  45. ],
  46. )
  47. proto_library(
  48. name = "model_proto",
  49. srcs = ["model.proto"],
  50. tags = ["automanaged"],
  51. visibility = ["//visibility:public"],
  52. deps = ["@gogo_special_proto//github.com/gogo/protobuf/gogoproto"],
  53. )
  54. go_proto_library(
  55. name = "model_go_proto",
  56. compilers = ["@io_bazel_rules_go//proto:gogofast_proto"],
  57. importpath = "go-common/app/interface/openplatform/article/model",
  58. proto = ":model_proto",
  59. tags = ["manual"],
  60. visibility = ["//visibility:public"],
  61. deps = [
  62. "//library/time:go_default_library",
  63. "@com_github_gogo_protobuf//gogoproto:go_default_library",
  64. ],
  65. )
  66. filegroup(
  67. name = "package-srcs",
  68. srcs = glob(["**"]),
  69. tags = ["automanaged"],
  70. visibility = ["//visibility:private"],
  71. )
  72. filegroup(
  73. name = "all-srcs",
  74. srcs = [
  75. ":package-srcs",
  76. "//app/interface/openplatform/article/model/search:all-srcs",
  77. ],
  78. tags = ["automanaged"],
  79. visibility = ["//visibility:public"],
  80. )