BUILD.bazel 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  1. load(
  2. "@io_bazel_rules_go//go:def.bzl",
  3. "go_library",
  4. "go_test",
  5. )
  6. go_library(
  7. name = "go_default_library",
  8. srcs = [
  9. "dao.go",
  10. "db_wechat.go",
  11. "hbase.go",
  12. "http.go",
  13. "lock.go",
  14. "mc.go",
  15. "redis.go",
  16. ],
  17. importpath = "go-common/app/tool/saga/dao",
  18. tags = ["automanaged"],
  19. visibility = ["//visibility:public"],
  20. deps = [
  21. "//app/tool/saga/conf:go_default_library",
  22. "//app/tool/saga/model:go_default_library",
  23. "//library/cache/memcache:go_default_library",
  24. "//library/cache/redis:go_default_library",
  25. "//library/database/hbase.v2:go_default_library",
  26. "//library/database/orm:go_default_library",
  27. "//library/log:go_default_library",
  28. "//library/net/http/blademaster:go_default_library",
  29. "//vendor/github.com/jinzhu/gorm:go_default_library",
  30. "//vendor/github.com/pkg/errors:go_default_library",
  31. "//vendor/github.com/tsuna/gohbase/hrpc:go_default_library",
  32. ],
  33. )
  34. go_test(
  35. name = "go_default_test",
  36. srcs = [
  37. "dao_test.go",
  38. "hbase_test.go",
  39. "lock_test.go",
  40. "redis_test.go",
  41. ],
  42. embed = [":go_default_library"],
  43. rundir = ".",
  44. tags = ["automanaged"],
  45. deps = [
  46. "//app/tool/saga/conf:go_default_library",
  47. "//app/tool/saga/model:go_default_library",
  48. "//library/cache/redis:go_default_library",
  49. "//vendor/github.com/smartystreets/goconvey/convey:go_default_library",
  50. ],
  51. )
  52. filegroup(
  53. name = "package-srcs",
  54. srcs = glob(["**"]),
  55. tags = ["automanaged"],
  56. visibility = ["//visibility:private"],
  57. )
  58. filegroup(
  59. name = "all-srcs",
  60. srcs = [":package-srcs"],
  61. tags = ["automanaged"],
  62. visibility = ["//visibility:public"],
  63. )