BUILD 4.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116
  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. "client_test.go",
  11. "server_test.go",
  12. "trace_test.go",
  13. ],
  14. embed = [":go_default_library"],
  15. rundir = ".",
  16. tags = ["automanaged"],
  17. deps = [
  18. "//library/ecode:go_default_library",
  19. "//library/log:go_default_library",
  20. "//library/net/http/blademaster/binding:go_default_library",
  21. "//library/net/http/blademaster/render:go_default_library",
  22. "//library/net/http/blademaster/tests:go_default_library",
  23. "//library/net/metadata:go_default_library",
  24. "//library/net/netutil/breaker:go_default_library",
  25. "//library/net/trace:go_default_library",
  26. "//library/time:go_default_library",
  27. "//vendor/github.com/pkg/errors:go_default_library",
  28. "//vendor/github.com/stretchr/testify/assert:go_default_library",
  29. "@com_github_gogo_protobuf//proto:go_default_library",
  30. ],
  31. )
  32. go_library(
  33. name = "go_default_library",
  34. srcs = [
  35. "client.go",
  36. "context.go",
  37. "cors.go",
  38. "csrf.go",
  39. "device.go",
  40. "logger.go",
  41. "metadata.go",
  42. "perf.go",
  43. "prometheus.go",
  44. "recovery.go",
  45. "routergroup.go",
  46. "server.go",
  47. "trace.go",
  48. "utils.go",
  49. ],
  50. importpath = "go-common/library/net/http/blademaster",
  51. tags = ["automanaged"],
  52. visibility = ["//visibility:public"],
  53. deps = [
  54. "//library/conf/dsn:go_default_library",
  55. "//library/conf/env:go_default_library",
  56. "//library/ecode:go_default_library",
  57. "//library/log:go_default_library",
  58. "//library/net/http/blademaster/binding:go_default_library",
  59. "//library/net/http/blademaster/render:go_default_library",
  60. "//library/net/ip:go_default_library",
  61. "//library/net/metadata:go_default_library",
  62. "//library/net/netutil/breaker:go_default_library",
  63. "//library/net/trace:go_default_library",
  64. "//library/stat:go_default_library",
  65. "//library/time:go_default_library",
  66. "//vendor/github.com/pkg/errors:go_default_library",
  67. "//vendor/github.com/prometheus/client_golang/prometheus/promhttp:go_default_library",
  68. "@com_github_gogo_protobuf//proto:go_default_library",
  69. "@com_github_gogo_protobuf//types:go_default_library",
  70. ],
  71. )
  72. go_test(
  73. name = "go_default_xtest",
  74. srcs = ["example_test.go"],
  75. tags = ["automanaged"],
  76. deps = [
  77. "//library/net/http/blademaster:go_default_library",
  78. "//library/net/http/blademaster/binding:go_default_library",
  79. "//library/net/http/blademaster/middleware/auth:go_default_library",
  80. "//library/net/http/blademaster/middleware/verify:go_default_library",
  81. "//library/net/http/blademaster/tests:go_default_library",
  82. ],
  83. )
  84. filegroup(
  85. name = "package-srcs",
  86. srcs = glob(["**"]),
  87. tags = ["automanaged"],
  88. visibility = ["//visibility:private"],
  89. )
  90. filegroup(
  91. name = "all-srcs",
  92. srcs = [
  93. ":package-srcs",
  94. "//library/net/http/blademaster/binding:all-srcs",
  95. "//library/net/http/blademaster/middleware/antispam:all-srcs",
  96. "//library/net/http/blademaster/middleware/auth:all-srcs",
  97. "//library/net/http/blademaster/middleware/cache:all-srcs",
  98. "//library/net/http/blademaster/middleware/limit/aqm:all-srcs",
  99. "//library/net/http/blademaster/middleware/permit:all-srcs",
  100. "//library/net/http/blademaster/middleware/proxy:all-srcs",
  101. "//library/net/http/blademaster/middleware/rate:all-srcs",
  102. "//library/net/http/blademaster/middleware/supervisor:all-srcs",
  103. "//library/net/http/blademaster/middleware/tag:all-srcs",
  104. "//library/net/http/blademaster/middleware/verify:all-srcs",
  105. "//library/net/http/blademaster/render:all-srcs",
  106. "//library/net/http/blademaster/tests:all-srcs",
  107. ],
  108. tags = ["automanaged"],
  109. visibility = ["//visibility:public"],
  110. )