BUILD 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  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. "go_test",
  10. )
  11. go_library(
  12. name = "go_default_library",
  13. srcs = [
  14. "db.go",
  15. "model.go",
  16. ],
  17. embed = [":model_go_proto"],
  18. importpath = "go-common/app/service/main/ugcpay-rank/internal/model",
  19. tags = ["automanaged"],
  20. visibility = ["//visibility:public"],
  21. deps = [
  22. "//library/log:go_default_library",
  23. "//vendor/github.com/pkg/errors:go_default_library",
  24. "@com_github_gogo_protobuf//gogoproto:go_default_library",
  25. "@com_github_gogo_protobuf//proto:go_default_library",
  26. ],
  27. )
  28. filegroup(
  29. name = "package-srcs",
  30. srcs = glob(["**"]),
  31. tags = ["automanaged"],
  32. visibility = ["//visibility:private"],
  33. )
  34. filegroup(
  35. name = "all-srcs",
  36. srcs = [":package-srcs"],
  37. tags = ["automanaged"],
  38. visibility = ["//visibility:public"],
  39. )
  40. go_test(
  41. name = "go_default_test",
  42. srcs = ["model_test.go"],
  43. embed = [":go_default_library"],
  44. tags = ["automanaged"],
  45. deps = [
  46. "//library/log:go_default_library",
  47. "//vendor/github.com/smartystreets/goconvey/convey:go_default_library",
  48. ],
  49. )
  50. proto_library(
  51. name = "model_proto",
  52. srcs = ["model.proto"],
  53. tags = ["automanaged"],
  54. deps = ["@gogo_special_proto//github.com/gogo/protobuf/gogoproto"],
  55. )
  56. go_proto_library(
  57. name = "model_go_proto",
  58. compilers = ["@io_bazel_rules_go//proto:gogofast_proto"],
  59. importpath = "go-common/app/service/main/ugcpay-rank/internal/model",
  60. proto = ":model_proto",
  61. tags = ["automanaged"],
  62. deps = ["@com_github_gogo_protobuf//gogoproto:go_default_library"],
  63. )