BUILD 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  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. "dao_test.go",
  11. "databus_test.go",
  12. "mysql_test.go",
  13. "redis_test.go",
  14. "share_test.go",
  15. ],
  16. embed = [":go_default_library"],
  17. rundir = ".",
  18. tags = ["automanaged"],
  19. deps = [
  20. "//app/service/main/share/conf:go_default_library",
  21. "//app/service/main/share/model:go_default_library",
  22. "//library/ecode:go_default_library",
  23. "//vendor/github.com/smartystreets/goconvey/convey:go_default_library",
  24. ],
  25. )
  26. go_library(
  27. name = "go_default_library",
  28. srcs = [
  29. "dao.go",
  30. "databus.go",
  31. "mysql.go",
  32. "redis.go",
  33. "share.go",
  34. ],
  35. importpath = "go-common/app/service/main/share/dao",
  36. tags = ["automanaged"],
  37. visibility = ["//visibility:public"],
  38. deps = [
  39. "//app/service/main/share/conf:go_default_library",
  40. "//app/service/main/share/model:go_default_library",
  41. "//library/cache:go_default_library",
  42. "//library/cache/redis:go_default_library",
  43. "//library/database/sql:go_default_library",
  44. "//library/ecode:go_default_library",
  45. "//library/log:go_default_library",
  46. "//library/net/ip:go_default_library",
  47. "//library/queue/databus:go_default_library",
  48. "//vendor/github.com/dgryski/go-farm:go_default_library",
  49. "//vendor/github.com/pkg/errors: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. )