BUILD 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  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 = ["fav.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. importpath = "go-common/app/service/main/favorite/model",
  20. proto = ":model_proto",
  21. tags = ["automanaged"],
  22. deps = [
  23. "//library/time:go_default_library",
  24. "@com_github_gogo_protobuf//gogoproto:go_default_library",
  25. ],
  26. )
  27. go_library(
  28. name = "go_default_library",
  29. srcs = [
  30. "archive.go",
  31. "fav.go",
  32. "job.go",
  33. "rpc.go",
  34. "topic.go",
  35. "video.go",
  36. ],
  37. embed = [":model_go_proto"],
  38. importpath = "go-common/app/service/main/favorite/model",
  39. tags = ["automanaged"],
  40. visibility = ["//visibility:public"],
  41. deps = [
  42. "//app/service/main/archive/api:go_default_library",
  43. "//library/time:go_default_library",
  44. "@com_github_gogo_protobuf//gogoproto:go_default_library",
  45. "@com_github_gogo_protobuf//proto:go_default_library",
  46. ],
  47. )
  48. filegroup(
  49. name = "package-srcs",
  50. srcs = glob(["**"]),
  51. tags = ["automanaged"],
  52. visibility = ["//visibility:private"],
  53. )
  54. filegroup(
  55. name = "all-srcs",
  56. srcs = [":package-srcs"],
  57. tags = ["automanaged"],
  58. visibility = ["//visibility:public"],
  59. )