BUILD 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778
  1. package(default_visibility = ["//visibility:public"])
  2. load(
  3. "@io_bazel_rules_go//go:def.bzl",
  4. "go_test",
  5. "go_library",
  6. )
  7. go_test(
  8. name = "go_default_test",
  9. srcs = [
  10. "cache_test.go",
  11. "dao.cache_test.go",
  12. "dao_test.go",
  13. "databus_test.go",
  14. "item_likes_redis_test.go",
  15. "memcached_test.go",
  16. "redis_test.go",
  17. "tidb_test.go",
  18. "user_likes_redis_test.go",
  19. ],
  20. embed = [":go_default_library"],
  21. rundir = ".",
  22. tags = ["automanaged"],
  23. deps = [
  24. "//app/service/main/thumbup/conf:go_default_library",
  25. "//app/service/main/thumbup/model:go_default_library",
  26. "//vendor/github.com/smartystreets/goconvey/convey:go_default_library",
  27. ],
  28. )
  29. go_library(
  30. name = "go_default_library",
  31. srcs = [
  32. "cache.go",
  33. "dao.cache.go",
  34. "dao.go",
  35. "databus.go",
  36. "item_likes_redis.go",
  37. "memcached.go",
  38. "redis.go",
  39. "tidb.go",
  40. "user_likes_redis.go",
  41. ],
  42. importpath = "go-common/app/service/main/thumbup/dao",
  43. tags = ["automanaged"],
  44. deps = [
  45. "//app/service/main/thumbup/api:go_default_library",
  46. "//app/service/main/thumbup/conf:go_default_library",
  47. "//app/service/main/thumbup/model:go_default_library",
  48. "//library/cache/memcache:go_default_library",
  49. "//library/cache/redis:go_default_library",
  50. "//library/database/tidb:go_default_library",
  51. "//library/log:go_default_library",
  52. "//library/queue/databus:go_default_library",
  53. "//library/stat/prom:go_default_library",
  54. "//library/sync/errgroup:go_default_library",
  55. "//library/sync/pipeline/fanout:go_default_library",
  56. "//library/time:go_default_library",
  57. "//library/xstr:go_default_library",
  58. "//vendor/github.com/pkg/errors:go_default_library",
  59. "//vendor/golang.org/x/sync/singleflight:go_default_library",
  60. ],
  61. )
  62. filegroup(
  63. name = "package-srcs",
  64. srcs = glob(["**"]),
  65. tags = ["automanaged"],
  66. visibility = ["//visibility:private"],
  67. )
  68. filegroup(
  69. name = "all-srcs",
  70. srcs = [":package-srcs"],
  71. tags = ["automanaged"],
  72. visibility = ["//visibility:public"],
  73. )