planetscale 0.3.1 → 0.3.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (368) hide show
  1. checksums.yaml +4 -4
  2. data/.github/workflows/ci.yml +9 -1
  3. data/.github/workflows/gem-push.yml +9 -2
  4. data/.licenses/go/github.com/matoous/go-nanoid/v2.dep.yml +34 -0
  5. data/.licenses/go/github.com/planetscale/planetscale-go/planetscale.dep.yml +1 -1
  6. data/.licenses/go/github.com/planetscale/sql-proxy/proxy.dep.yml +1 -1
  7. data/.licenses/go/go.uber.org/zap/buffer.dep.yml +1 -1
  8. data/.licenses/go/go.uber.org/zap/internal/bufferpool.dep.yml +1 -1
  9. data/.licenses/go/go.uber.org/zap/internal/color.dep.yml +1 -1
  10. data/.licenses/go/go.uber.org/zap/internal/exit.dep.yml +1 -1
  11. data/.licenses/go/go.uber.org/zap/zapcore.dep.yml +1 -1
  12. data/.licenses/go/go.uber.org/zap.dep.yml +1 -1
  13. data/README.md +2 -0
  14. data/controller.go +21 -36
  15. data/go.mod +4 -3
  16. data/go.sum +32 -18
  17. data/lib/planetscale/version.rb +1 -1
  18. data/lib/planetscale.rb +2 -3
  19. data/planetscale.gemspec +1 -1
  20. data/proxy/planetscale-darwin.h +1 -1
  21. data/proxy/planetscale-darwin.so +0 -0
  22. data/proxy/planetscale-linux.h +1 -1
  23. data/proxy/planetscale-linux.so +0 -0
  24. data/proxy.go +1 -5
  25. metadata +3 -345
  26. data/vendor/github.com/armon/circbuf/.gitignore +0 -22
  27. data/vendor/github.com/armon/circbuf/LICENSE +0 -20
  28. data/vendor/github.com/armon/circbuf/README.md +0 -28
  29. data/vendor/github.com/armon/circbuf/circbuf.go +0 -92
  30. data/vendor/github.com/armon/circbuf/go.mod +0 -1
  31. data/vendor/github.com/golang/protobuf/AUTHORS +0 -3
  32. data/vendor/github.com/golang/protobuf/CONTRIBUTORS +0 -3
  33. data/vendor/github.com/golang/protobuf/LICENSE +0 -28
  34. data/vendor/github.com/golang/protobuf/proto/buffer.go +0 -324
  35. data/vendor/github.com/golang/protobuf/proto/defaults.go +0 -63
  36. data/vendor/github.com/golang/protobuf/proto/deprecated.go +0 -113
  37. data/vendor/github.com/golang/protobuf/proto/discard.go +0 -58
  38. data/vendor/github.com/golang/protobuf/proto/extensions.go +0 -356
  39. data/vendor/github.com/golang/protobuf/proto/properties.go +0 -306
  40. data/vendor/github.com/golang/protobuf/proto/proto.go +0 -167
  41. data/vendor/github.com/golang/protobuf/proto/registry.go +0 -317
  42. data/vendor/github.com/golang/protobuf/proto/text_decode.go +0 -801
  43. data/vendor/github.com/golang/protobuf/proto/text_encode.go +0 -560
  44. data/vendor/github.com/golang/protobuf/proto/wire.go +0 -78
  45. data/vendor/github.com/golang/protobuf/proto/wrappers.go +0 -34
  46. data/vendor/github.com/gorilla/mux/AUTHORS +0 -8
  47. data/vendor/github.com/gorilla/mux/LICENSE +0 -27
  48. data/vendor/github.com/gorilla/mux/README.md +0 -805
  49. data/vendor/github.com/gorilla/mux/doc.go +0 -306
  50. data/vendor/github.com/gorilla/mux/go.mod +0 -3
  51. data/vendor/github.com/gorilla/mux/middleware.go +0 -74
  52. data/vendor/github.com/gorilla/mux/mux.go +0 -606
  53. data/vendor/github.com/gorilla/mux/regexp.go +0 -388
  54. data/vendor/github.com/gorilla/mux/route.go +0 -736
  55. data/vendor/github.com/gorilla/mux/test_helpers.go +0 -19
  56. data/vendor/github.com/hashicorp/go-cleanhttp/LICENSE +0 -363
  57. data/vendor/github.com/hashicorp/go-cleanhttp/README.md +0 -30
  58. data/vendor/github.com/hashicorp/go-cleanhttp/cleanhttp.go +0 -58
  59. data/vendor/github.com/hashicorp/go-cleanhttp/doc.go +0 -20
  60. data/vendor/github.com/hashicorp/go-cleanhttp/go.mod +0 -3
  61. data/vendor/github.com/hashicorp/go-cleanhttp/handlers.go +0 -48
  62. data/vendor/github.com/mitchellh/go-homedir/LICENSE +0 -21
  63. data/vendor/github.com/mitchellh/go-homedir/README.md +0 -14
  64. data/vendor/github.com/mitchellh/go-homedir/go.mod +0 -1
  65. data/vendor/github.com/mitchellh/go-homedir/homedir.go +0 -167
  66. data/vendor/github.com/pkg/errors/.gitignore +0 -24
  67. data/vendor/github.com/pkg/errors/.travis.yml +0 -10
  68. data/vendor/github.com/pkg/errors/LICENSE +0 -23
  69. data/vendor/github.com/pkg/errors/Makefile +0 -44
  70. data/vendor/github.com/pkg/errors/README.md +0 -59
  71. data/vendor/github.com/pkg/errors/appveyor.yml +0 -32
  72. data/vendor/github.com/pkg/errors/errors.go +0 -288
  73. data/vendor/github.com/pkg/errors/go113.go +0 -38
  74. data/vendor/github.com/pkg/errors/stack.go +0 -177
  75. data/vendor/github.com/planetscale/planetscale-go/LICENSE +0 -202
  76. data/vendor/github.com/planetscale/planetscale-go/planetscale/audit_logs.go +0 -136
  77. data/vendor/github.com/planetscale/planetscale-go/planetscale/backups.go +0 -139
  78. data/vendor/github.com/planetscale/planetscale-go/planetscale/branches.go +0 -252
  79. data/vendor/github.com/planetscale/planetscale-go/planetscale/certs.go +0 -166
  80. data/vendor/github.com/planetscale/planetscale-go/planetscale/client.go +0 -312
  81. data/vendor/github.com/planetscale/planetscale-go/planetscale/databases.go +0 -133
  82. data/vendor/github.com/planetscale/planetscale-go/planetscale/deploy_requests.go +0 -368
  83. data/vendor/github.com/planetscale/planetscale-go/planetscale/organizations.go +0 -103
  84. data/vendor/github.com/planetscale/planetscale-go/planetscale/regions.go +0 -52
  85. data/vendor/github.com/planetscale/planetscale-go/planetscale/service_tokens.go +0 -163
  86. data/vendor/github.com/planetscale/sql-proxy/LICENSE +0 -202
  87. data/vendor/github.com/planetscale/sql-proxy/proxy/client.go +0 -476
  88. data/vendor/github.com/planetscale/sql-proxy/proxy/tls_cache.go +0 -73
  89. data/vendor/go.uber.org/atomic/.codecov.yml +0 -19
  90. data/vendor/go.uber.org/atomic/.gitignore +0 -12
  91. data/vendor/go.uber.org/atomic/.travis.yml +0 -27
  92. data/vendor/go.uber.org/atomic/CHANGELOG.md +0 -76
  93. data/vendor/go.uber.org/atomic/LICENSE.txt +0 -19
  94. data/vendor/go.uber.org/atomic/Makefile +0 -78
  95. data/vendor/go.uber.org/atomic/README.md +0 -63
  96. data/vendor/go.uber.org/atomic/bool.go +0 -81
  97. data/vendor/go.uber.org/atomic/bool_ext.go +0 -53
  98. data/vendor/go.uber.org/atomic/doc.go +0 -23
  99. data/vendor/go.uber.org/atomic/duration.go +0 -82
  100. data/vendor/go.uber.org/atomic/duration_ext.go +0 -40
  101. data/vendor/go.uber.org/atomic/error.go +0 -51
  102. data/vendor/go.uber.org/atomic/error_ext.go +0 -39
  103. data/vendor/go.uber.org/atomic/float64.go +0 -76
  104. data/vendor/go.uber.org/atomic/float64_ext.go +0 -47
  105. data/vendor/go.uber.org/atomic/gen.go +0 -26
  106. data/vendor/go.uber.org/atomic/go.mod +0 -8
  107. data/vendor/go.uber.org/atomic/go.sum +0 -9
  108. data/vendor/go.uber.org/atomic/int32.go +0 -102
  109. data/vendor/go.uber.org/atomic/int64.go +0 -102
  110. data/vendor/go.uber.org/atomic/nocmp.go +0 -35
  111. data/vendor/go.uber.org/atomic/string.go +0 -54
  112. data/vendor/go.uber.org/atomic/string_ext.go +0 -43
  113. data/vendor/go.uber.org/atomic/uint32.go +0 -102
  114. data/vendor/go.uber.org/atomic/uint64.go +0 -102
  115. data/vendor/go.uber.org/atomic/value.go +0 -31
  116. data/vendor/go.uber.org/multierr/.codecov.yml +0 -15
  117. data/vendor/go.uber.org/multierr/.gitignore +0 -4
  118. data/vendor/go.uber.org/multierr/.travis.yml +0 -23
  119. data/vendor/go.uber.org/multierr/CHANGELOG.md +0 -60
  120. data/vendor/go.uber.org/multierr/LICENSE.txt +0 -19
  121. data/vendor/go.uber.org/multierr/Makefile +0 -42
  122. data/vendor/go.uber.org/multierr/README.md +0 -23
  123. data/vendor/go.uber.org/multierr/error.go +0 -449
  124. data/vendor/go.uber.org/multierr/glide.yaml +0 -8
  125. data/vendor/go.uber.org/multierr/go.mod +0 -8
  126. data/vendor/go.uber.org/multierr/go.sum +0 -11
  127. data/vendor/go.uber.org/multierr/go113.go +0 -52
  128. data/vendor/go.uber.org/zap/.codecov.yml +0 -17
  129. data/vendor/go.uber.org/zap/.gitignore +0 -32
  130. data/vendor/go.uber.org/zap/.readme.tmpl +0 -109
  131. data/vendor/go.uber.org/zap/CHANGELOG.md +0 -492
  132. data/vendor/go.uber.org/zap/CODE_OF_CONDUCT.md +0 -75
  133. data/vendor/go.uber.org/zap/CONTRIBUTING.md +0 -75
  134. data/vendor/go.uber.org/zap/FAQ.md +0 -164
  135. data/vendor/go.uber.org/zap/LICENSE.txt +0 -19
  136. data/vendor/go.uber.org/zap/Makefile +0 -73
  137. data/vendor/go.uber.org/zap/README.md +0 -134
  138. data/vendor/go.uber.org/zap/array.go +0 -320
  139. data/vendor/go.uber.org/zap/buffer/buffer.go +0 -141
  140. data/vendor/go.uber.org/zap/buffer/pool.go +0 -49
  141. data/vendor/go.uber.org/zap/checklicense.sh +0 -17
  142. data/vendor/go.uber.org/zap/config.go +0 -264
  143. data/vendor/go.uber.org/zap/doc.go +0 -113
  144. data/vendor/go.uber.org/zap/encoder.go +0 -79
  145. data/vendor/go.uber.org/zap/error.go +0 -80
  146. data/vendor/go.uber.org/zap/field.go +0 -549
  147. data/vendor/go.uber.org/zap/flag.go +0 -39
  148. data/vendor/go.uber.org/zap/glide.yaml +0 -34
  149. data/vendor/go.uber.org/zap/global.go +0 -168
  150. data/vendor/go.uber.org/zap/global_go112.go +0 -26
  151. data/vendor/go.uber.org/zap/global_prego112.go +0 -26
  152. data/vendor/go.uber.org/zap/go.mod +0 -14
  153. data/vendor/go.uber.org/zap/go.sum +0 -54
  154. data/vendor/go.uber.org/zap/http_handler.go +0 -132
  155. data/vendor/go.uber.org/zap/internal/bufferpool/bufferpool.go +0 -31
  156. data/vendor/go.uber.org/zap/internal/color/color.go +0 -44
  157. data/vendor/go.uber.org/zap/internal/exit/exit.go +0 -64
  158. data/vendor/go.uber.org/zap/level.go +0 -132
  159. data/vendor/go.uber.org/zap/logger.go +0 -348
  160. data/vendor/go.uber.org/zap/options.go +0 -148
  161. data/vendor/go.uber.org/zap/sink.go +0 -161
  162. data/vendor/go.uber.org/zap/stacktrace.go +0 -85
  163. data/vendor/go.uber.org/zap/sugar.go +0 -315
  164. data/vendor/go.uber.org/zap/time.go +0 -27
  165. data/vendor/go.uber.org/zap/writer.go +0 -99
  166. data/vendor/go.uber.org/zap/zapcore/buffered_write_syncer.go +0 -188
  167. data/vendor/go.uber.org/zap/zapcore/clock.go +0 -50
  168. data/vendor/go.uber.org/zap/zapcore/console_encoder.go +0 -161
  169. data/vendor/go.uber.org/zap/zapcore/core.go +0 -113
  170. data/vendor/go.uber.org/zap/zapcore/doc.go +0 -24
  171. data/vendor/go.uber.org/zap/zapcore/encoder.go +0 -443
  172. data/vendor/go.uber.org/zap/zapcore/entry.go +0 -264
  173. data/vendor/go.uber.org/zap/zapcore/error.go +0 -132
  174. data/vendor/go.uber.org/zap/zapcore/field.go +0 -233
  175. data/vendor/go.uber.org/zap/zapcore/hook.go +0 -68
  176. data/vendor/go.uber.org/zap/zapcore/increase_level.go +0 -66
  177. data/vendor/go.uber.org/zap/zapcore/json_encoder.go +0 -534
  178. data/vendor/go.uber.org/zap/zapcore/level.go +0 -175
  179. data/vendor/go.uber.org/zap/zapcore/level_strings.go +0 -46
  180. data/vendor/go.uber.org/zap/zapcore/marshaler.go +0 -61
  181. data/vendor/go.uber.org/zap/zapcore/memory_encoder.go +0 -179
  182. data/vendor/go.uber.org/zap/zapcore/sampler.go +0 -208
  183. data/vendor/go.uber.org/zap/zapcore/tee.go +0 -81
  184. data/vendor/go.uber.org/zap/zapcore/write_syncer.go +0 -122
  185. data/vendor/golang.org/x/net/AUTHORS +0 -3
  186. data/vendor/golang.org/x/net/CONTRIBUTORS +0 -3
  187. data/vendor/golang.org/x/net/LICENSE +0 -27
  188. data/vendor/golang.org/x/net/PATENTS +0 -22
  189. data/vendor/golang.org/x/net/context/context.go +0 -56
  190. data/vendor/golang.org/x/net/context/ctxhttp/ctxhttp.go +0 -71
  191. data/vendor/golang.org/x/net/context/go17.go +0 -73
  192. data/vendor/golang.org/x/net/context/go19.go +0 -21
  193. data/vendor/golang.org/x/net/context/pre_go17.go +0 -301
  194. data/vendor/golang.org/x/net/context/pre_go19.go +0 -110
  195. data/vendor/golang.org/x/oauth2/.travis.yml +0 -13
  196. data/vendor/golang.org/x/oauth2/AUTHORS +0 -3
  197. data/vendor/golang.org/x/oauth2/CONTRIBUTING.md +0 -26
  198. data/vendor/golang.org/x/oauth2/CONTRIBUTORS +0 -3
  199. data/vendor/golang.org/x/oauth2/LICENSE +0 -27
  200. data/vendor/golang.org/x/oauth2/README.md +0 -36
  201. data/vendor/golang.org/x/oauth2/go.mod +0 -9
  202. data/vendor/golang.org/x/oauth2/go.sum +0 -361
  203. data/vendor/golang.org/x/oauth2/internal/client_appengine.go +0 -14
  204. data/vendor/golang.org/x/oauth2/internal/doc.go +0 -6
  205. data/vendor/golang.org/x/oauth2/internal/oauth2.go +0 -37
  206. data/vendor/golang.org/x/oauth2/internal/token.go +0 -294
  207. data/vendor/golang.org/x/oauth2/internal/transport.go +0 -33
  208. data/vendor/golang.org/x/oauth2/oauth2.go +0 -381
  209. data/vendor/golang.org/x/oauth2/token.go +0 -178
  210. data/vendor/golang.org/x/oauth2/transport.go +0 -89
  211. data/vendor/google.golang.org/appengine/LICENSE +0 -202
  212. data/vendor/google.golang.org/appengine/internal/api.go +0 -678
  213. data/vendor/google.golang.org/appengine/internal/api_classic.go +0 -169
  214. data/vendor/google.golang.org/appengine/internal/api_common.go +0 -123
  215. data/vendor/google.golang.org/appengine/internal/app_id.go +0 -28
  216. data/vendor/google.golang.org/appengine/internal/base/api_base.pb.go +0 -308
  217. data/vendor/google.golang.org/appengine/internal/base/api_base.proto +0 -33
  218. data/vendor/google.golang.org/appengine/internal/datastore/datastore_v3.pb.go +0 -4367
  219. data/vendor/google.golang.org/appengine/internal/datastore/datastore_v3.proto +0 -551
  220. data/vendor/google.golang.org/appengine/internal/identity.go +0 -55
  221. data/vendor/google.golang.org/appengine/internal/identity_classic.go +0 -61
  222. data/vendor/google.golang.org/appengine/internal/identity_flex.go +0 -11
  223. data/vendor/google.golang.org/appengine/internal/identity_vm.go +0 -134
  224. data/vendor/google.golang.org/appengine/internal/internal.go +0 -110
  225. data/vendor/google.golang.org/appengine/internal/log/log_service.pb.go +0 -1313
  226. data/vendor/google.golang.org/appengine/internal/log/log_service.proto +0 -150
  227. data/vendor/google.golang.org/appengine/internal/main.go +0 -16
  228. data/vendor/google.golang.org/appengine/internal/main_common.go +0 -7
  229. data/vendor/google.golang.org/appengine/internal/main_vm.go +0 -69
  230. data/vendor/google.golang.org/appengine/internal/metadata.go +0 -60
  231. data/vendor/google.golang.org/appengine/internal/net.go +0 -56
  232. data/vendor/google.golang.org/appengine/internal/regen.sh +0 -40
  233. data/vendor/google.golang.org/appengine/internal/remote_api/remote_api.pb.go +0 -361
  234. data/vendor/google.golang.org/appengine/internal/remote_api/remote_api.proto +0 -44
  235. data/vendor/google.golang.org/appengine/internal/transaction.go +0 -115
  236. data/vendor/google.golang.org/appengine/internal/urlfetch/urlfetch_service.pb.go +0 -527
  237. data/vendor/google.golang.org/appengine/internal/urlfetch/urlfetch_service.proto +0 -64
  238. data/vendor/google.golang.org/appengine/urlfetch/urlfetch.go +0 -210
  239. data/vendor/google.golang.org/protobuf/AUTHORS +0 -3
  240. data/vendor/google.golang.org/protobuf/CONTRIBUTORS +0 -3
  241. data/vendor/google.golang.org/protobuf/LICENSE +0 -27
  242. data/vendor/google.golang.org/protobuf/PATENTS +0 -22
  243. data/vendor/google.golang.org/protobuf/encoding/prototext/decode.go +0 -773
  244. data/vendor/google.golang.org/protobuf/encoding/prototext/doc.go +0 -7
  245. data/vendor/google.golang.org/protobuf/encoding/prototext/encode.go +0 -371
  246. data/vendor/google.golang.org/protobuf/encoding/protowire/wire.go +0 -538
  247. data/vendor/google.golang.org/protobuf/internal/descfmt/stringer.go +0 -318
  248. data/vendor/google.golang.org/protobuf/internal/descopts/options.go +0 -29
  249. data/vendor/google.golang.org/protobuf/internal/detrand/rand.go +0 -69
  250. data/vendor/google.golang.org/protobuf/internal/encoding/defval/default.go +0 -213
  251. data/vendor/google.golang.org/protobuf/internal/encoding/messageset/messageset.go +0 -241
  252. data/vendor/google.golang.org/protobuf/internal/encoding/tag/tag.go +0 -207
  253. data/vendor/google.golang.org/protobuf/internal/encoding/text/decode.go +0 -665
  254. data/vendor/google.golang.org/protobuf/internal/encoding/text/decode_number.go +0 -190
  255. data/vendor/google.golang.org/protobuf/internal/encoding/text/decode_string.go +0 -161
  256. data/vendor/google.golang.org/protobuf/internal/encoding/text/decode_token.go +0 -373
  257. data/vendor/google.golang.org/protobuf/internal/encoding/text/doc.go +0 -29
  258. data/vendor/google.golang.org/protobuf/internal/encoding/text/encode.go +0 -265
  259. data/vendor/google.golang.org/protobuf/internal/errors/errors.go +0 -89
  260. data/vendor/google.golang.org/protobuf/internal/errors/is_go112.go +0 -39
  261. data/vendor/google.golang.org/protobuf/internal/errors/is_go113.go +0 -12
  262. data/vendor/google.golang.org/protobuf/internal/filedesc/build.go +0 -158
  263. data/vendor/google.golang.org/protobuf/internal/filedesc/desc.go +0 -631
  264. data/vendor/google.golang.org/protobuf/internal/filedesc/desc_init.go +0 -471
  265. data/vendor/google.golang.org/protobuf/internal/filedesc/desc_lazy.go +0 -704
  266. data/vendor/google.golang.org/protobuf/internal/filedesc/desc_list.go +0 -450
  267. data/vendor/google.golang.org/protobuf/internal/filedesc/desc_list_gen.go +0 -356
  268. data/vendor/google.golang.org/protobuf/internal/filedesc/placeholder.go +0 -107
  269. data/vendor/google.golang.org/protobuf/internal/filetype/build.go +0 -297
  270. data/vendor/google.golang.org/protobuf/internal/flags/flags.go +0 -24
  271. data/vendor/google.golang.org/protobuf/internal/flags/proto_legacy_disable.go +0 -9
  272. data/vendor/google.golang.org/protobuf/internal/flags/proto_legacy_enable.go +0 -9
  273. data/vendor/google.golang.org/protobuf/internal/genid/any_gen.go +0 -34
  274. data/vendor/google.golang.org/protobuf/internal/genid/api_gen.go +0 -106
  275. data/vendor/google.golang.org/protobuf/internal/genid/descriptor_gen.go +0 -829
  276. data/vendor/google.golang.org/protobuf/internal/genid/doc.go +0 -11
  277. data/vendor/google.golang.org/protobuf/internal/genid/duration_gen.go +0 -34
  278. data/vendor/google.golang.org/protobuf/internal/genid/empty_gen.go +0 -19
  279. data/vendor/google.golang.org/protobuf/internal/genid/field_mask_gen.go +0 -31
  280. data/vendor/google.golang.org/protobuf/internal/genid/goname.go +0 -25
  281. data/vendor/google.golang.org/protobuf/internal/genid/map_entry.go +0 -16
  282. data/vendor/google.golang.org/protobuf/internal/genid/source_context_gen.go +0 -31
  283. data/vendor/google.golang.org/protobuf/internal/genid/struct_gen.go +0 -116
  284. data/vendor/google.golang.org/protobuf/internal/genid/timestamp_gen.go +0 -34
  285. data/vendor/google.golang.org/protobuf/internal/genid/type_gen.go +0 -184
  286. data/vendor/google.golang.org/protobuf/internal/genid/wrappers.go +0 -13
  287. data/vendor/google.golang.org/protobuf/internal/genid/wrappers_gen.go +0 -175
  288. data/vendor/google.golang.org/protobuf/internal/impl/api_export.go +0 -177
  289. data/vendor/google.golang.org/protobuf/internal/impl/checkinit.go +0 -141
  290. data/vendor/google.golang.org/protobuf/internal/impl/codec_extension.go +0 -223
  291. data/vendor/google.golang.org/protobuf/internal/impl/codec_field.go +0 -830
  292. data/vendor/google.golang.org/protobuf/internal/impl/codec_gen.go +0 -5637
  293. data/vendor/google.golang.org/protobuf/internal/impl/codec_map.go +0 -388
  294. data/vendor/google.golang.org/protobuf/internal/impl/codec_map_go111.go +0 -37
  295. data/vendor/google.golang.org/protobuf/internal/impl/codec_map_go112.go +0 -11
  296. data/vendor/google.golang.org/protobuf/internal/impl/codec_message.go +0 -217
  297. data/vendor/google.golang.org/protobuf/internal/impl/codec_messageset.go +0 -123
  298. data/vendor/google.golang.org/protobuf/internal/impl/codec_reflect.go +0 -209
  299. data/vendor/google.golang.org/protobuf/internal/impl/codec_tables.go +0 -557
  300. data/vendor/google.golang.org/protobuf/internal/impl/codec_unsafe.go +0 -17
  301. data/vendor/google.golang.org/protobuf/internal/impl/convert.go +0 -496
  302. data/vendor/google.golang.org/protobuf/internal/impl/convert_list.go +0 -141
  303. data/vendor/google.golang.org/protobuf/internal/impl/convert_map.go +0 -121
  304. data/vendor/google.golang.org/protobuf/internal/impl/decode.go +0 -276
  305. data/vendor/google.golang.org/protobuf/internal/impl/encode.go +0 -201
  306. data/vendor/google.golang.org/protobuf/internal/impl/enum.go +0 -21
  307. data/vendor/google.golang.org/protobuf/internal/impl/extension.go +0 -156
  308. data/vendor/google.golang.org/protobuf/internal/impl/legacy_enum.go +0 -219
  309. data/vendor/google.golang.org/protobuf/internal/impl/legacy_export.go +0 -92
  310. data/vendor/google.golang.org/protobuf/internal/impl/legacy_extension.go +0 -176
  311. data/vendor/google.golang.org/protobuf/internal/impl/legacy_file.go +0 -81
  312. data/vendor/google.golang.org/protobuf/internal/impl/legacy_message.go +0 -558
  313. data/vendor/google.golang.org/protobuf/internal/impl/merge.go +0 -176
  314. data/vendor/google.golang.org/protobuf/internal/impl/merge_gen.go +0 -209
  315. data/vendor/google.golang.org/protobuf/internal/impl/message.go +0 -276
  316. data/vendor/google.golang.org/protobuf/internal/impl/message_reflect.go +0 -465
  317. data/vendor/google.golang.org/protobuf/internal/impl/message_reflect_field.go +0 -543
  318. data/vendor/google.golang.org/protobuf/internal/impl/message_reflect_gen.go +0 -249
  319. data/vendor/google.golang.org/protobuf/internal/impl/pointer_reflect.go +0 -178
  320. data/vendor/google.golang.org/protobuf/internal/impl/pointer_unsafe.go +0 -174
  321. data/vendor/google.golang.org/protobuf/internal/impl/validate.go +0 -576
  322. data/vendor/google.golang.org/protobuf/internal/impl/weak.go +0 -74
  323. data/vendor/google.golang.org/protobuf/internal/order/order.go +0 -89
  324. data/vendor/google.golang.org/protobuf/internal/order/range.go +0 -115
  325. data/vendor/google.golang.org/protobuf/internal/pragma/pragma.go +0 -29
  326. data/vendor/google.golang.org/protobuf/internal/set/ints.go +0 -58
  327. data/vendor/google.golang.org/protobuf/internal/strs/strings.go +0 -196
  328. data/vendor/google.golang.org/protobuf/internal/strs/strings_pure.go +0 -27
  329. data/vendor/google.golang.org/protobuf/internal/strs/strings_unsafe.go +0 -94
  330. data/vendor/google.golang.org/protobuf/internal/version/version.go +0 -79
  331. data/vendor/google.golang.org/protobuf/proto/checkinit.go +0 -71
  332. data/vendor/google.golang.org/protobuf/proto/decode.go +0 -278
  333. data/vendor/google.golang.org/protobuf/proto/decode_gen.go +0 -603
  334. data/vendor/google.golang.org/protobuf/proto/doc.go +0 -94
  335. data/vendor/google.golang.org/protobuf/proto/encode.go +0 -319
  336. data/vendor/google.golang.org/protobuf/proto/encode_gen.go +0 -97
  337. data/vendor/google.golang.org/protobuf/proto/equal.go +0 -167
  338. data/vendor/google.golang.org/protobuf/proto/extension.go +0 -92
  339. data/vendor/google.golang.org/protobuf/proto/merge.go +0 -139
  340. data/vendor/google.golang.org/protobuf/proto/messageset.go +0 -93
  341. data/vendor/google.golang.org/protobuf/proto/proto.go +0 -43
  342. data/vendor/google.golang.org/protobuf/proto/proto_methods.go +0 -19
  343. data/vendor/google.golang.org/protobuf/proto/proto_reflect.go +0 -19
  344. data/vendor/google.golang.org/protobuf/proto/reset.go +0 -43
  345. data/vendor/google.golang.org/protobuf/proto/size.go +0 -97
  346. data/vendor/google.golang.org/protobuf/proto/size_gen.go +0 -55
  347. data/vendor/google.golang.org/protobuf/proto/wrappers.go +0 -29
  348. data/vendor/google.golang.org/protobuf/reflect/protodesc/desc.go +0 -276
  349. data/vendor/google.golang.org/protobuf/reflect/protodesc/desc_init.go +0 -248
  350. data/vendor/google.golang.org/protobuf/reflect/protodesc/desc_resolve.go +0 -286
  351. data/vendor/google.golang.org/protobuf/reflect/protodesc/desc_validate.go +0 -374
  352. data/vendor/google.golang.org/protobuf/reflect/protodesc/proto.go +0 -252
  353. data/vendor/google.golang.org/protobuf/reflect/protoreflect/methods.go +0 -77
  354. data/vendor/google.golang.org/protobuf/reflect/protoreflect/proto.go +0 -504
  355. data/vendor/google.golang.org/protobuf/reflect/protoreflect/source.go +0 -128
  356. data/vendor/google.golang.org/protobuf/reflect/protoreflect/source_gen.go +0 -461
  357. data/vendor/google.golang.org/protobuf/reflect/protoreflect/type.go +0 -665
  358. data/vendor/google.golang.org/protobuf/reflect/protoreflect/value.go +0 -285
  359. data/vendor/google.golang.org/protobuf/reflect/protoreflect/value_pure.go +0 -59
  360. data/vendor/google.golang.org/protobuf/reflect/protoreflect/value_union.go +0 -411
  361. data/vendor/google.golang.org/protobuf/reflect/protoreflect/value_unsafe.go +0 -98
  362. data/vendor/google.golang.org/protobuf/reflect/protoregistry/registry.go +0 -869
  363. data/vendor/google.golang.org/protobuf/runtime/protoiface/legacy.go +0 -15
  364. data/vendor/google.golang.org/protobuf/runtime/protoiface/methods.go +0 -167
  365. data/vendor/google.golang.org/protobuf/runtime/protoimpl/impl.go +0 -44
  366. data/vendor/google.golang.org/protobuf/runtime/protoimpl/version.go +0 -56
  367. data/vendor/google.golang.org/protobuf/types/descriptorpb/descriptor.pb.go +0 -4039
  368. data/vendor/modules.txt +0 -79
@@ -1,549 +0,0 @@
1
- // Copyright (c) 2016 Uber Technologies, Inc.
2
- //
3
- // Permission is hereby granted, free of charge, to any person obtaining a copy
4
- // of this software and associated documentation files (the "Software"), to deal
5
- // in the Software without restriction, including without limitation the rights
6
- // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
7
- // copies of the Software, and to permit persons to whom the Software is
8
- // furnished to do so, subject to the following conditions:
9
- //
10
- // The above copyright notice and this permission notice shall be included in
11
- // all copies or substantial portions of the Software.
12
- //
13
- // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14
- // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15
- // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
16
- // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17
- // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
18
- // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
19
- // THE SOFTWARE.
20
-
21
- package zap
22
-
23
- import (
24
- "fmt"
25
- "math"
26
- "time"
27
-
28
- "go.uber.org/zap/zapcore"
29
- )
30
-
31
- // Field is an alias for Field. Aliasing this type dramatically
32
- // improves the navigability of this package's API documentation.
33
- type Field = zapcore.Field
34
-
35
- var (
36
- _minTimeInt64 = time.Unix(0, math.MinInt64)
37
- _maxTimeInt64 = time.Unix(0, math.MaxInt64)
38
- )
39
-
40
- // Skip constructs a no-op field, which is often useful when handling invalid
41
- // inputs in other Field constructors.
42
- func Skip() Field {
43
- return Field{Type: zapcore.SkipType}
44
- }
45
-
46
- // nilField returns a field which will marshal explicitly as nil. See motivation
47
- // in https://github.com/uber-go/zap/issues/753 . If we ever make breaking
48
- // changes and add zapcore.NilType and zapcore.ObjectEncoder.AddNil, the
49
- // implementation here should be changed to reflect that.
50
- func nilField(key string) Field { return Reflect(key, nil) }
51
-
52
- // Binary constructs a field that carries an opaque binary blob.
53
- //
54
- // Binary data is serialized in an encoding-appropriate format. For example,
55
- // zap's JSON encoder base64-encodes binary blobs. To log UTF-8 encoded text,
56
- // use ByteString.
57
- func Binary(key string, val []byte) Field {
58
- return Field{Key: key, Type: zapcore.BinaryType, Interface: val}
59
- }
60
-
61
- // Bool constructs a field that carries a bool.
62
- func Bool(key string, val bool) Field {
63
- var ival int64
64
- if val {
65
- ival = 1
66
- }
67
- return Field{Key: key, Type: zapcore.BoolType, Integer: ival}
68
- }
69
-
70
- // Boolp constructs a field that carries a *bool. The returned Field will safely
71
- // and explicitly represent `nil` when appropriate.
72
- func Boolp(key string, val *bool) Field {
73
- if val == nil {
74
- return nilField(key)
75
- }
76
- return Bool(key, *val)
77
- }
78
-
79
- // ByteString constructs a field that carries UTF-8 encoded text as a []byte.
80
- // To log opaque binary blobs (which aren't necessarily valid UTF-8), use
81
- // Binary.
82
- func ByteString(key string, val []byte) Field {
83
- return Field{Key: key, Type: zapcore.ByteStringType, Interface: val}
84
- }
85
-
86
- // Complex128 constructs a field that carries a complex number. Unlike most
87
- // numeric fields, this costs an allocation (to convert the complex128 to
88
- // interface{}).
89
- func Complex128(key string, val complex128) Field {
90
- return Field{Key: key, Type: zapcore.Complex128Type, Interface: val}
91
- }
92
-
93
- // Complex128p constructs a field that carries a *complex128. The returned Field will safely
94
- // and explicitly represent `nil` when appropriate.
95
- func Complex128p(key string, val *complex128) Field {
96
- if val == nil {
97
- return nilField(key)
98
- }
99
- return Complex128(key, *val)
100
- }
101
-
102
- // Complex64 constructs a field that carries a complex number. Unlike most
103
- // numeric fields, this costs an allocation (to convert the complex64 to
104
- // interface{}).
105
- func Complex64(key string, val complex64) Field {
106
- return Field{Key: key, Type: zapcore.Complex64Type, Interface: val}
107
- }
108
-
109
- // Complex64p constructs a field that carries a *complex64. The returned Field will safely
110
- // and explicitly represent `nil` when appropriate.
111
- func Complex64p(key string, val *complex64) Field {
112
- if val == nil {
113
- return nilField(key)
114
- }
115
- return Complex64(key, *val)
116
- }
117
-
118
- // Float64 constructs a field that carries a float64. The way the
119
- // floating-point value is represented is encoder-dependent, so marshaling is
120
- // necessarily lazy.
121
- func Float64(key string, val float64) Field {
122
- return Field{Key: key, Type: zapcore.Float64Type, Integer: int64(math.Float64bits(val))}
123
- }
124
-
125
- // Float64p constructs a field that carries a *float64. The returned Field will safely
126
- // and explicitly represent `nil` when appropriate.
127
- func Float64p(key string, val *float64) Field {
128
- if val == nil {
129
- return nilField(key)
130
- }
131
- return Float64(key, *val)
132
- }
133
-
134
- // Float32 constructs a field that carries a float32. The way the
135
- // floating-point value is represented is encoder-dependent, so marshaling is
136
- // necessarily lazy.
137
- func Float32(key string, val float32) Field {
138
- return Field{Key: key, Type: zapcore.Float32Type, Integer: int64(math.Float32bits(val))}
139
- }
140
-
141
- // Float32p constructs a field that carries a *float32. The returned Field will safely
142
- // and explicitly represent `nil` when appropriate.
143
- func Float32p(key string, val *float32) Field {
144
- if val == nil {
145
- return nilField(key)
146
- }
147
- return Float32(key, *val)
148
- }
149
-
150
- // Int constructs a field with the given key and value.
151
- func Int(key string, val int) Field {
152
- return Int64(key, int64(val))
153
- }
154
-
155
- // Intp constructs a field that carries a *int. The returned Field will safely
156
- // and explicitly represent `nil` when appropriate.
157
- func Intp(key string, val *int) Field {
158
- if val == nil {
159
- return nilField(key)
160
- }
161
- return Int(key, *val)
162
- }
163
-
164
- // Int64 constructs a field with the given key and value.
165
- func Int64(key string, val int64) Field {
166
- return Field{Key: key, Type: zapcore.Int64Type, Integer: val}
167
- }
168
-
169
- // Int64p constructs a field that carries a *int64. The returned Field will safely
170
- // and explicitly represent `nil` when appropriate.
171
- func Int64p(key string, val *int64) Field {
172
- if val == nil {
173
- return nilField(key)
174
- }
175
- return Int64(key, *val)
176
- }
177
-
178
- // Int32 constructs a field with the given key and value.
179
- func Int32(key string, val int32) Field {
180
- return Field{Key: key, Type: zapcore.Int32Type, Integer: int64(val)}
181
- }
182
-
183
- // Int32p constructs a field that carries a *int32. The returned Field will safely
184
- // and explicitly represent `nil` when appropriate.
185
- func Int32p(key string, val *int32) Field {
186
- if val == nil {
187
- return nilField(key)
188
- }
189
- return Int32(key, *val)
190
- }
191
-
192
- // Int16 constructs a field with the given key and value.
193
- func Int16(key string, val int16) Field {
194
- return Field{Key: key, Type: zapcore.Int16Type, Integer: int64(val)}
195
- }
196
-
197
- // Int16p constructs a field that carries a *int16. The returned Field will safely
198
- // and explicitly represent `nil` when appropriate.
199
- func Int16p(key string, val *int16) Field {
200
- if val == nil {
201
- return nilField(key)
202
- }
203
- return Int16(key, *val)
204
- }
205
-
206
- // Int8 constructs a field with the given key and value.
207
- func Int8(key string, val int8) Field {
208
- return Field{Key: key, Type: zapcore.Int8Type, Integer: int64(val)}
209
- }
210
-
211
- // Int8p constructs a field that carries a *int8. The returned Field will safely
212
- // and explicitly represent `nil` when appropriate.
213
- func Int8p(key string, val *int8) Field {
214
- if val == nil {
215
- return nilField(key)
216
- }
217
- return Int8(key, *val)
218
- }
219
-
220
- // String constructs a field with the given key and value.
221
- func String(key string, val string) Field {
222
- return Field{Key: key, Type: zapcore.StringType, String: val}
223
- }
224
-
225
- // Stringp constructs a field that carries a *string. The returned Field will safely
226
- // and explicitly represent `nil` when appropriate.
227
- func Stringp(key string, val *string) Field {
228
- if val == nil {
229
- return nilField(key)
230
- }
231
- return String(key, *val)
232
- }
233
-
234
- // Uint constructs a field with the given key and value.
235
- func Uint(key string, val uint) Field {
236
- return Uint64(key, uint64(val))
237
- }
238
-
239
- // Uintp constructs a field that carries a *uint. The returned Field will safely
240
- // and explicitly represent `nil` when appropriate.
241
- func Uintp(key string, val *uint) Field {
242
- if val == nil {
243
- return nilField(key)
244
- }
245
- return Uint(key, *val)
246
- }
247
-
248
- // Uint64 constructs a field with the given key and value.
249
- func Uint64(key string, val uint64) Field {
250
- return Field{Key: key, Type: zapcore.Uint64Type, Integer: int64(val)}
251
- }
252
-
253
- // Uint64p constructs a field that carries a *uint64. The returned Field will safely
254
- // and explicitly represent `nil` when appropriate.
255
- func Uint64p(key string, val *uint64) Field {
256
- if val == nil {
257
- return nilField(key)
258
- }
259
- return Uint64(key, *val)
260
- }
261
-
262
- // Uint32 constructs a field with the given key and value.
263
- func Uint32(key string, val uint32) Field {
264
- return Field{Key: key, Type: zapcore.Uint32Type, Integer: int64(val)}
265
- }
266
-
267
- // Uint32p constructs a field that carries a *uint32. The returned Field will safely
268
- // and explicitly represent `nil` when appropriate.
269
- func Uint32p(key string, val *uint32) Field {
270
- if val == nil {
271
- return nilField(key)
272
- }
273
- return Uint32(key, *val)
274
- }
275
-
276
- // Uint16 constructs a field with the given key and value.
277
- func Uint16(key string, val uint16) Field {
278
- return Field{Key: key, Type: zapcore.Uint16Type, Integer: int64(val)}
279
- }
280
-
281
- // Uint16p constructs a field that carries a *uint16. The returned Field will safely
282
- // and explicitly represent `nil` when appropriate.
283
- func Uint16p(key string, val *uint16) Field {
284
- if val == nil {
285
- return nilField(key)
286
- }
287
- return Uint16(key, *val)
288
- }
289
-
290
- // Uint8 constructs a field with the given key and value.
291
- func Uint8(key string, val uint8) Field {
292
- return Field{Key: key, Type: zapcore.Uint8Type, Integer: int64(val)}
293
- }
294
-
295
- // Uint8p constructs a field that carries a *uint8. The returned Field will safely
296
- // and explicitly represent `nil` when appropriate.
297
- func Uint8p(key string, val *uint8) Field {
298
- if val == nil {
299
- return nilField(key)
300
- }
301
- return Uint8(key, *val)
302
- }
303
-
304
- // Uintptr constructs a field with the given key and value.
305
- func Uintptr(key string, val uintptr) Field {
306
- return Field{Key: key, Type: zapcore.UintptrType, Integer: int64(val)}
307
- }
308
-
309
- // Uintptrp constructs a field that carries a *uintptr. The returned Field will safely
310
- // and explicitly represent `nil` when appropriate.
311
- func Uintptrp(key string, val *uintptr) Field {
312
- if val == nil {
313
- return nilField(key)
314
- }
315
- return Uintptr(key, *val)
316
- }
317
-
318
- // Reflect constructs a field with the given key and an arbitrary object. It uses
319
- // an encoding-appropriate, reflection-based function to lazily serialize nearly
320
- // any object into the logging context, but it's relatively slow and
321
- // allocation-heavy. Outside tests, Any is always a better choice.
322
- //
323
- // If encoding fails (e.g., trying to serialize a map[int]string to JSON), Reflect
324
- // includes the error message in the final log output.
325
- func Reflect(key string, val interface{}) Field {
326
- return Field{Key: key, Type: zapcore.ReflectType, Interface: val}
327
- }
328
-
329
- // Namespace creates a named, isolated scope within the logger's context. All
330
- // subsequent fields will be added to the new namespace.
331
- //
332
- // This helps prevent key collisions when injecting loggers into sub-components
333
- // or third-party libraries.
334
- func Namespace(key string) Field {
335
- return Field{Key: key, Type: zapcore.NamespaceType}
336
- }
337
-
338
- // Stringer constructs a field with the given key and the output of the value's
339
- // String method. The Stringer's String method is called lazily.
340
- func Stringer(key string, val fmt.Stringer) Field {
341
- return Field{Key: key, Type: zapcore.StringerType, Interface: val}
342
- }
343
-
344
- // Time constructs a Field with the given key and value. The encoder
345
- // controls how the time is serialized.
346
- func Time(key string, val time.Time) Field {
347
- if val.Before(_minTimeInt64) || val.After(_maxTimeInt64) {
348
- return Field{Key: key, Type: zapcore.TimeFullType, Interface: val}
349
- }
350
- return Field{Key: key, Type: zapcore.TimeType, Integer: val.UnixNano(), Interface: val.Location()}
351
- }
352
-
353
- // Timep constructs a field that carries a *time.Time. The returned Field will safely
354
- // and explicitly represent `nil` when appropriate.
355
- func Timep(key string, val *time.Time) Field {
356
- if val == nil {
357
- return nilField(key)
358
- }
359
- return Time(key, *val)
360
- }
361
-
362
- // Stack constructs a field that stores a stacktrace of the current goroutine
363
- // under provided key. Keep in mind that taking a stacktrace is eager and
364
- // expensive (relatively speaking); this function both makes an allocation and
365
- // takes about two microseconds.
366
- func Stack(key string) Field {
367
- return StackSkip(key, 1) // skip Stack
368
- }
369
-
370
- // StackSkip constructs a field similarly to Stack, but also skips the given
371
- // number of frames from the top of the stacktrace.
372
- func StackSkip(key string, skip int) Field {
373
- // Returning the stacktrace as a string costs an allocation, but saves us
374
- // from expanding the zapcore.Field union struct to include a byte slice. Since
375
- // taking a stacktrace is already so expensive (~10us), the extra allocation
376
- // is okay.
377
- return String(key, takeStacktrace(skip+1)) // skip StackSkip
378
- }
379
-
380
- // Duration constructs a field with the given key and value. The encoder
381
- // controls how the duration is serialized.
382
- func Duration(key string, val time.Duration) Field {
383
- return Field{Key: key, Type: zapcore.DurationType, Integer: int64(val)}
384
- }
385
-
386
- // Durationp constructs a field that carries a *time.Duration. The returned Field will safely
387
- // and explicitly represent `nil` when appropriate.
388
- func Durationp(key string, val *time.Duration) Field {
389
- if val == nil {
390
- return nilField(key)
391
- }
392
- return Duration(key, *val)
393
- }
394
-
395
- // Object constructs a field with the given key and ObjectMarshaler. It
396
- // provides a flexible, but still type-safe and efficient, way to add map- or
397
- // struct-like user-defined types to the logging context. The struct's
398
- // MarshalLogObject method is called lazily.
399
- func Object(key string, val zapcore.ObjectMarshaler) Field {
400
- return Field{Key: key, Type: zapcore.ObjectMarshalerType, Interface: val}
401
- }
402
-
403
- // Inline constructs a Field that is similar to Object, but it
404
- // will add the elements of the provided ObjectMarshaler to the
405
- // current namespace.
406
- func Inline(val zapcore.ObjectMarshaler) Field {
407
- return zapcore.Field{
408
- Type: zapcore.InlineMarshalerType,
409
- Interface: val,
410
- }
411
- }
412
-
413
- // Any takes a key and an arbitrary value and chooses the best way to represent
414
- // them as a field, falling back to a reflection-based approach only if
415
- // necessary.
416
- //
417
- // Since byte/uint8 and rune/int32 are aliases, Any can't differentiate between
418
- // them. To minimize surprises, []byte values are treated as binary blobs, byte
419
- // values are treated as uint8, and runes are always treated as integers.
420
- func Any(key string, value interface{}) Field {
421
- switch val := value.(type) {
422
- case zapcore.ObjectMarshaler:
423
- return Object(key, val)
424
- case zapcore.ArrayMarshaler:
425
- return Array(key, val)
426
- case bool:
427
- return Bool(key, val)
428
- case *bool:
429
- return Boolp(key, val)
430
- case []bool:
431
- return Bools(key, val)
432
- case complex128:
433
- return Complex128(key, val)
434
- case *complex128:
435
- return Complex128p(key, val)
436
- case []complex128:
437
- return Complex128s(key, val)
438
- case complex64:
439
- return Complex64(key, val)
440
- case *complex64:
441
- return Complex64p(key, val)
442
- case []complex64:
443
- return Complex64s(key, val)
444
- case float64:
445
- return Float64(key, val)
446
- case *float64:
447
- return Float64p(key, val)
448
- case []float64:
449
- return Float64s(key, val)
450
- case float32:
451
- return Float32(key, val)
452
- case *float32:
453
- return Float32p(key, val)
454
- case []float32:
455
- return Float32s(key, val)
456
- case int:
457
- return Int(key, val)
458
- case *int:
459
- return Intp(key, val)
460
- case []int:
461
- return Ints(key, val)
462
- case int64:
463
- return Int64(key, val)
464
- case *int64:
465
- return Int64p(key, val)
466
- case []int64:
467
- return Int64s(key, val)
468
- case int32:
469
- return Int32(key, val)
470
- case *int32:
471
- return Int32p(key, val)
472
- case []int32:
473
- return Int32s(key, val)
474
- case int16:
475
- return Int16(key, val)
476
- case *int16:
477
- return Int16p(key, val)
478
- case []int16:
479
- return Int16s(key, val)
480
- case int8:
481
- return Int8(key, val)
482
- case *int8:
483
- return Int8p(key, val)
484
- case []int8:
485
- return Int8s(key, val)
486
- case string:
487
- return String(key, val)
488
- case *string:
489
- return Stringp(key, val)
490
- case []string:
491
- return Strings(key, val)
492
- case uint:
493
- return Uint(key, val)
494
- case *uint:
495
- return Uintp(key, val)
496
- case []uint:
497
- return Uints(key, val)
498
- case uint64:
499
- return Uint64(key, val)
500
- case *uint64:
501
- return Uint64p(key, val)
502
- case []uint64:
503
- return Uint64s(key, val)
504
- case uint32:
505
- return Uint32(key, val)
506
- case *uint32:
507
- return Uint32p(key, val)
508
- case []uint32:
509
- return Uint32s(key, val)
510
- case uint16:
511
- return Uint16(key, val)
512
- case *uint16:
513
- return Uint16p(key, val)
514
- case []uint16:
515
- return Uint16s(key, val)
516
- case uint8:
517
- return Uint8(key, val)
518
- case *uint8:
519
- return Uint8p(key, val)
520
- case []byte:
521
- return Binary(key, val)
522
- case uintptr:
523
- return Uintptr(key, val)
524
- case *uintptr:
525
- return Uintptrp(key, val)
526
- case []uintptr:
527
- return Uintptrs(key, val)
528
- case time.Time:
529
- return Time(key, val)
530
- case *time.Time:
531
- return Timep(key, val)
532
- case []time.Time:
533
- return Times(key, val)
534
- case time.Duration:
535
- return Duration(key, val)
536
- case *time.Duration:
537
- return Durationp(key, val)
538
- case []time.Duration:
539
- return Durations(key, val)
540
- case error:
541
- return NamedError(key, val)
542
- case []error:
543
- return Errors(key, val)
544
- case fmt.Stringer:
545
- return Stringer(key, val)
546
- default:
547
- return Reflect(key, val)
548
- }
549
- }
@@ -1,39 +0,0 @@
1
- // Copyright (c) 2016 Uber Technologies, Inc.
2
- //
3
- // Permission is hereby granted, free of charge, to any person obtaining a copy
4
- // of this software and associated documentation files (the "Software"), to deal
5
- // in the Software without restriction, including without limitation the rights
6
- // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
7
- // copies of the Software, and to permit persons to whom the Software is
8
- // furnished to do so, subject to the following conditions:
9
- //
10
- // The above copyright notice and this permission notice shall be included in
11
- // all copies or substantial portions of the Software.
12
- //
13
- // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14
- // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15
- // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
16
- // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17
- // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
18
- // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
19
- // THE SOFTWARE.
20
-
21
- package zap
22
-
23
- import (
24
- "flag"
25
-
26
- "go.uber.org/zap/zapcore"
27
- )
28
-
29
- // LevelFlag uses the standard library's flag.Var to declare a global flag
30
- // with the specified name, default, and usage guidance. The returned value is
31
- // a pointer to the value of the flag.
32
- //
33
- // If you don't want to use the flag package's global state, you can use any
34
- // non-nil *Level as a flag.Value with your own *flag.FlagSet.
35
- func LevelFlag(name string, defaultLevel zapcore.Level, usage string) *zapcore.Level {
36
- lvl := defaultLevel
37
- flag.Var(&lvl, name, usage)
38
- return &lvl
39
- }
@@ -1,34 +0,0 @@
1
- package: go.uber.org/zap
2
- license: MIT
3
- import:
4
- - package: go.uber.org/atomic
5
- version: ^1
6
- - package: go.uber.org/multierr
7
- version: ^1
8
- testImport:
9
- - package: github.com/satori/go.uuid
10
- - package: github.com/sirupsen/logrus
11
- - package: github.com/apex/log
12
- subpackages:
13
- - handlers/json
14
- - package: github.com/go-kit/kit
15
- subpackages:
16
- - log
17
- - package: github.com/stretchr/testify
18
- subpackages:
19
- - assert
20
- - require
21
- - package: gopkg.in/inconshreveable/log15.v2
22
- - package: github.com/mattn/goveralls
23
- - package: github.com/pborman/uuid
24
- - package: github.com/pkg/errors
25
- - package: github.com/rs/zerolog
26
- - package: golang.org/x/tools
27
- subpackages:
28
- - cover
29
- - package: golang.org/x/lint
30
- subpackages:
31
- - golint
32
- - package: github.com/axw/gocov
33
- subpackages:
34
- - gocov