planetscale 0.2.0 → 0.3.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (365) hide show
  1. checksums.yaml +4 -4
  2. data/.buildkite/pipeline.yml +21 -0
  3. data/.github/workflows/ci.yml +9 -1
  4. data/.github/workflows/gem-push.yml +9 -2
  5. data/.licenses/go/github.com/matoous/go-nanoid/v2.dep.yml +34 -0
  6. data/.licenses/go/github.com/planetscale/planetscale-go/planetscale.dep.yml +56 -3
  7. data/.licenses/go/github.com/planetscale/sql-proxy/proxy.dep.yml +205 -172
  8. data/.licenses/go/go.uber.org/zap/buffer.dep.yml +1 -1
  9. data/.licenses/go/go.uber.org/zap/internal/bufferpool.dep.yml +1 -1
  10. data/.licenses/go/go.uber.org/zap/internal/color.dep.yml +1 -1
  11. data/.licenses/go/go.uber.org/zap/internal/exit.dep.yml +1 -1
  12. data/.licenses/go/go.uber.org/zap/zapcore.dep.yml +1 -1
  13. data/.licenses/go/go.uber.org/zap.dep.yml +1 -1
  14. data/README.md +11 -8
  15. data/controller.go +24 -26
  16. data/go.mod +4 -3
  17. data/go.sum +42 -27
  18. data/lib/generators/planetscale/install_generator.rb +8 -6
  19. data/lib/planetscale/version.rb +1 -1
  20. data/lib/planetscale.rb +14 -15
  21. data/planetscale.gemspec +2 -2
  22. data/proxy/planetscale-darwin.h +1 -1
  23. data/proxy/planetscale-darwin.so +0 -0
  24. data/proxy/planetscale-linux.h +1 -1
  25. data/proxy/planetscale-linux.so +0 -0
  26. data/proxy.go +1 -5
  27. metadata +6 -342
  28. data/vendor/github.com/armon/circbuf/.gitignore +0 -22
  29. data/vendor/github.com/armon/circbuf/LICENSE +0 -20
  30. data/vendor/github.com/armon/circbuf/README.md +0 -28
  31. data/vendor/github.com/armon/circbuf/circbuf.go +0 -92
  32. data/vendor/github.com/armon/circbuf/go.mod +0 -1
  33. data/vendor/github.com/golang/protobuf/AUTHORS +0 -3
  34. data/vendor/github.com/golang/protobuf/CONTRIBUTORS +0 -3
  35. data/vendor/github.com/golang/protobuf/LICENSE +0 -28
  36. data/vendor/github.com/golang/protobuf/proto/buffer.go +0 -324
  37. data/vendor/github.com/golang/protobuf/proto/defaults.go +0 -63
  38. data/vendor/github.com/golang/protobuf/proto/deprecated.go +0 -113
  39. data/vendor/github.com/golang/protobuf/proto/discard.go +0 -58
  40. data/vendor/github.com/golang/protobuf/proto/extensions.go +0 -356
  41. data/vendor/github.com/golang/protobuf/proto/properties.go +0 -306
  42. data/vendor/github.com/golang/protobuf/proto/proto.go +0 -167
  43. data/vendor/github.com/golang/protobuf/proto/registry.go +0 -317
  44. data/vendor/github.com/golang/protobuf/proto/text_decode.go +0 -801
  45. data/vendor/github.com/golang/protobuf/proto/text_encode.go +0 -560
  46. data/vendor/github.com/golang/protobuf/proto/wire.go +0 -78
  47. data/vendor/github.com/golang/protobuf/proto/wrappers.go +0 -34
  48. data/vendor/github.com/gorilla/mux/AUTHORS +0 -8
  49. data/vendor/github.com/gorilla/mux/LICENSE +0 -27
  50. data/vendor/github.com/gorilla/mux/README.md +0 -805
  51. data/vendor/github.com/gorilla/mux/doc.go +0 -306
  52. data/vendor/github.com/gorilla/mux/go.mod +0 -3
  53. data/vendor/github.com/gorilla/mux/middleware.go +0 -74
  54. data/vendor/github.com/gorilla/mux/mux.go +0 -606
  55. data/vendor/github.com/gorilla/mux/regexp.go +0 -388
  56. data/vendor/github.com/gorilla/mux/route.go +0 -736
  57. data/vendor/github.com/gorilla/mux/test_helpers.go +0 -19
  58. data/vendor/github.com/hashicorp/go-cleanhttp/LICENSE +0 -363
  59. data/vendor/github.com/hashicorp/go-cleanhttp/README.md +0 -30
  60. data/vendor/github.com/hashicorp/go-cleanhttp/cleanhttp.go +0 -58
  61. data/vendor/github.com/hashicorp/go-cleanhttp/doc.go +0 -20
  62. data/vendor/github.com/hashicorp/go-cleanhttp/go.mod +0 -3
  63. data/vendor/github.com/hashicorp/go-cleanhttp/handlers.go +0 -48
  64. data/vendor/github.com/mitchellh/go-homedir/LICENSE +0 -21
  65. data/vendor/github.com/mitchellh/go-homedir/README.md +0 -14
  66. data/vendor/github.com/mitchellh/go-homedir/go.mod +0 -1
  67. data/vendor/github.com/mitchellh/go-homedir/homedir.go +0 -167
  68. data/vendor/github.com/pkg/errors/.gitignore +0 -24
  69. data/vendor/github.com/pkg/errors/.travis.yml +0 -10
  70. data/vendor/github.com/pkg/errors/LICENSE +0 -23
  71. data/vendor/github.com/pkg/errors/Makefile +0 -44
  72. data/vendor/github.com/pkg/errors/README.md +0 -59
  73. data/vendor/github.com/pkg/errors/appveyor.yml +0 -32
  74. data/vendor/github.com/pkg/errors/errors.go +0 -288
  75. data/vendor/github.com/pkg/errors/go113.go +0 -38
  76. data/vendor/github.com/pkg/errors/stack.go +0 -177
  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 -258
  79. data/vendor/github.com/planetscale/planetscale-go/planetscale/certs.go +0 -142
  80. data/vendor/github.com/planetscale/planetscale-go/planetscale/client.go +0 -305
  81. data/vendor/github.com/planetscale/planetscale-go/planetscale/databases.go +0 -131
  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 -78
  84. data/vendor/github.com/planetscale/planetscale-go/planetscale/service_tokens.go +0 -163
  85. data/vendor/github.com/planetscale/sql-proxy/proxy/client.go +0 -467
  86. data/vendor/github.com/planetscale/sql-proxy/proxy/tls_cache.go +0 -73
  87. data/vendor/go.uber.org/atomic/.codecov.yml +0 -19
  88. data/vendor/go.uber.org/atomic/.gitignore +0 -12
  89. data/vendor/go.uber.org/atomic/.travis.yml +0 -27
  90. data/vendor/go.uber.org/atomic/CHANGELOG.md +0 -76
  91. data/vendor/go.uber.org/atomic/LICENSE.txt +0 -19
  92. data/vendor/go.uber.org/atomic/Makefile +0 -78
  93. data/vendor/go.uber.org/atomic/README.md +0 -63
  94. data/vendor/go.uber.org/atomic/bool.go +0 -81
  95. data/vendor/go.uber.org/atomic/bool_ext.go +0 -53
  96. data/vendor/go.uber.org/atomic/doc.go +0 -23
  97. data/vendor/go.uber.org/atomic/duration.go +0 -82
  98. data/vendor/go.uber.org/atomic/duration_ext.go +0 -40
  99. data/vendor/go.uber.org/atomic/error.go +0 -51
  100. data/vendor/go.uber.org/atomic/error_ext.go +0 -39
  101. data/vendor/go.uber.org/atomic/float64.go +0 -76
  102. data/vendor/go.uber.org/atomic/float64_ext.go +0 -47
  103. data/vendor/go.uber.org/atomic/gen.go +0 -26
  104. data/vendor/go.uber.org/atomic/go.mod +0 -8
  105. data/vendor/go.uber.org/atomic/go.sum +0 -9
  106. data/vendor/go.uber.org/atomic/int32.go +0 -102
  107. data/vendor/go.uber.org/atomic/int64.go +0 -102
  108. data/vendor/go.uber.org/atomic/nocmp.go +0 -35
  109. data/vendor/go.uber.org/atomic/string.go +0 -54
  110. data/vendor/go.uber.org/atomic/string_ext.go +0 -43
  111. data/vendor/go.uber.org/atomic/uint32.go +0 -102
  112. data/vendor/go.uber.org/atomic/uint64.go +0 -102
  113. data/vendor/go.uber.org/atomic/value.go +0 -31
  114. data/vendor/go.uber.org/multierr/.codecov.yml +0 -15
  115. data/vendor/go.uber.org/multierr/.gitignore +0 -4
  116. data/vendor/go.uber.org/multierr/.travis.yml +0 -23
  117. data/vendor/go.uber.org/multierr/CHANGELOG.md +0 -60
  118. data/vendor/go.uber.org/multierr/LICENSE.txt +0 -19
  119. data/vendor/go.uber.org/multierr/Makefile +0 -42
  120. data/vendor/go.uber.org/multierr/README.md +0 -23
  121. data/vendor/go.uber.org/multierr/error.go +0 -449
  122. data/vendor/go.uber.org/multierr/glide.yaml +0 -8
  123. data/vendor/go.uber.org/multierr/go.mod +0 -8
  124. data/vendor/go.uber.org/multierr/go.sum +0 -11
  125. data/vendor/go.uber.org/multierr/go113.go +0 -52
  126. data/vendor/go.uber.org/zap/.codecov.yml +0 -17
  127. data/vendor/go.uber.org/zap/.gitignore +0 -32
  128. data/vendor/go.uber.org/zap/.readme.tmpl +0 -109
  129. data/vendor/go.uber.org/zap/.travis.yml +0 -23
  130. data/vendor/go.uber.org/zap/CHANGELOG.md +0 -432
  131. data/vendor/go.uber.org/zap/CODE_OF_CONDUCT.md +0 -75
  132. data/vendor/go.uber.org/zap/CONTRIBUTING.md +0 -81
  133. data/vendor/go.uber.org/zap/FAQ.md +0 -156
  134. data/vendor/go.uber.org/zap/LICENSE.txt +0 -19
  135. data/vendor/go.uber.org/zap/Makefile +0 -63
  136. data/vendor/go.uber.org/zap/README.md +0 -134
  137. data/vendor/go.uber.org/zap/array.go +0 -320
  138. data/vendor/go.uber.org/zap/buffer/buffer.go +0 -123
  139. data/vendor/go.uber.org/zap/buffer/pool.go +0 -49
  140. data/vendor/go.uber.org/zap/checklicense.sh +0 -17
  141. data/vendor/go.uber.org/zap/config.go +0 -264
  142. data/vendor/go.uber.org/zap/doc.go +0 -113
  143. data/vendor/go.uber.org/zap/encoder.go +0 -79
  144. data/vendor/go.uber.org/zap/error.go +0 -80
  145. data/vendor/go.uber.org/zap/field.go +0 -539
  146. data/vendor/go.uber.org/zap/flag.go +0 -39
  147. data/vendor/go.uber.org/zap/glide.yaml +0 -34
  148. data/vendor/go.uber.org/zap/global.go +0 -168
  149. data/vendor/go.uber.org/zap/global_go112.go +0 -26
  150. data/vendor/go.uber.org/zap/global_prego112.go +0 -26
  151. data/vendor/go.uber.org/zap/go.mod +0 -13
  152. data/vendor/go.uber.org/zap/go.sum +0 -56
  153. data/vendor/go.uber.org/zap/http_handler.go +0 -81
  154. data/vendor/go.uber.org/zap/internal/bufferpool/bufferpool.go +0 -31
  155. data/vendor/go.uber.org/zap/internal/color/color.go +0 -44
  156. data/vendor/go.uber.org/zap/internal/exit/exit.go +0 -64
  157. data/vendor/go.uber.org/zap/level.go +0 -132
  158. data/vendor/go.uber.org/zap/logger.go +0 -344
  159. data/vendor/go.uber.org/zap/options.go +0 -140
  160. data/vendor/go.uber.org/zap/sink.go +0 -161
  161. data/vendor/go.uber.org/zap/stacktrace.go +0 -85
  162. data/vendor/go.uber.org/zap/sugar.go +0 -304
  163. data/vendor/go.uber.org/zap/time.go +0 -27
  164. data/vendor/go.uber.org/zap/writer.go +0 -99
  165. data/vendor/go.uber.org/zap/zapcore/console_encoder.go +0 -161
  166. data/vendor/go.uber.org/zap/zapcore/core.go +0 -113
  167. data/vendor/go.uber.org/zap/zapcore/doc.go +0 -24
  168. data/vendor/go.uber.org/zap/zapcore/encoder.go +0 -443
  169. data/vendor/go.uber.org/zap/zapcore/entry.go +0 -264
  170. data/vendor/go.uber.org/zap/zapcore/error.go +0 -115
  171. data/vendor/go.uber.org/zap/zapcore/field.go +0 -227
  172. data/vendor/go.uber.org/zap/zapcore/hook.go +0 -68
  173. data/vendor/go.uber.org/zap/zapcore/increase_level.go +0 -66
  174. data/vendor/go.uber.org/zap/zapcore/json_encoder.go +0 -534
  175. data/vendor/go.uber.org/zap/zapcore/level.go +0 -175
  176. data/vendor/go.uber.org/zap/zapcore/level_strings.go +0 -46
  177. data/vendor/go.uber.org/zap/zapcore/marshaler.go +0 -61
  178. data/vendor/go.uber.org/zap/zapcore/memory_encoder.go +0 -179
  179. data/vendor/go.uber.org/zap/zapcore/sampler.go +0 -208
  180. data/vendor/go.uber.org/zap/zapcore/tee.go +0 -81
  181. data/vendor/go.uber.org/zap/zapcore/write_syncer.go +0 -123
  182. data/vendor/golang.org/x/net/AUTHORS +0 -3
  183. data/vendor/golang.org/x/net/CONTRIBUTORS +0 -3
  184. data/vendor/golang.org/x/net/LICENSE +0 -27
  185. data/vendor/golang.org/x/net/PATENTS +0 -22
  186. data/vendor/golang.org/x/net/context/context.go +0 -56
  187. data/vendor/golang.org/x/net/context/ctxhttp/ctxhttp.go +0 -71
  188. data/vendor/golang.org/x/net/context/go17.go +0 -73
  189. data/vendor/golang.org/x/net/context/go19.go +0 -21
  190. data/vendor/golang.org/x/net/context/pre_go17.go +0 -301
  191. data/vendor/golang.org/x/net/context/pre_go19.go +0 -110
  192. data/vendor/golang.org/x/oauth2/.travis.yml +0 -13
  193. data/vendor/golang.org/x/oauth2/AUTHORS +0 -3
  194. data/vendor/golang.org/x/oauth2/CONTRIBUTING.md +0 -26
  195. data/vendor/golang.org/x/oauth2/CONTRIBUTORS +0 -3
  196. data/vendor/golang.org/x/oauth2/LICENSE +0 -27
  197. data/vendor/golang.org/x/oauth2/README.md +0 -36
  198. data/vendor/golang.org/x/oauth2/go.mod +0 -9
  199. data/vendor/golang.org/x/oauth2/go.sum +0 -361
  200. data/vendor/golang.org/x/oauth2/internal/client_appengine.go +0 -14
  201. data/vendor/golang.org/x/oauth2/internal/doc.go +0 -6
  202. data/vendor/golang.org/x/oauth2/internal/oauth2.go +0 -37
  203. data/vendor/golang.org/x/oauth2/internal/token.go +0 -294
  204. data/vendor/golang.org/x/oauth2/internal/transport.go +0 -33
  205. data/vendor/golang.org/x/oauth2/oauth2.go +0 -381
  206. data/vendor/golang.org/x/oauth2/token.go +0 -178
  207. data/vendor/golang.org/x/oauth2/transport.go +0 -89
  208. data/vendor/google.golang.org/appengine/LICENSE +0 -202
  209. data/vendor/google.golang.org/appengine/internal/api.go +0 -678
  210. data/vendor/google.golang.org/appengine/internal/api_classic.go +0 -169
  211. data/vendor/google.golang.org/appengine/internal/api_common.go +0 -123
  212. data/vendor/google.golang.org/appengine/internal/app_id.go +0 -28
  213. data/vendor/google.golang.org/appengine/internal/base/api_base.pb.go +0 -308
  214. data/vendor/google.golang.org/appengine/internal/base/api_base.proto +0 -33
  215. data/vendor/google.golang.org/appengine/internal/datastore/datastore_v3.pb.go +0 -4367
  216. data/vendor/google.golang.org/appengine/internal/datastore/datastore_v3.proto +0 -551
  217. data/vendor/google.golang.org/appengine/internal/identity.go +0 -55
  218. data/vendor/google.golang.org/appengine/internal/identity_classic.go +0 -61
  219. data/vendor/google.golang.org/appengine/internal/identity_flex.go +0 -11
  220. data/vendor/google.golang.org/appengine/internal/identity_vm.go +0 -134
  221. data/vendor/google.golang.org/appengine/internal/internal.go +0 -110
  222. data/vendor/google.golang.org/appengine/internal/log/log_service.pb.go +0 -1313
  223. data/vendor/google.golang.org/appengine/internal/log/log_service.proto +0 -150
  224. data/vendor/google.golang.org/appengine/internal/main.go +0 -16
  225. data/vendor/google.golang.org/appengine/internal/main_common.go +0 -7
  226. data/vendor/google.golang.org/appengine/internal/main_vm.go +0 -69
  227. data/vendor/google.golang.org/appengine/internal/metadata.go +0 -60
  228. data/vendor/google.golang.org/appengine/internal/net.go +0 -56
  229. data/vendor/google.golang.org/appengine/internal/regen.sh +0 -40
  230. data/vendor/google.golang.org/appengine/internal/remote_api/remote_api.pb.go +0 -361
  231. data/vendor/google.golang.org/appengine/internal/remote_api/remote_api.proto +0 -44
  232. data/vendor/google.golang.org/appengine/internal/transaction.go +0 -115
  233. data/vendor/google.golang.org/appengine/internal/urlfetch/urlfetch_service.pb.go +0 -527
  234. data/vendor/google.golang.org/appengine/internal/urlfetch/urlfetch_service.proto +0 -64
  235. data/vendor/google.golang.org/appengine/urlfetch/urlfetch.go +0 -210
  236. data/vendor/google.golang.org/protobuf/AUTHORS +0 -3
  237. data/vendor/google.golang.org/protobuf/CONTRIBUTORS +0 -3
  238. data/vendor/google.golang.org/protobuf/LICENSE +0 -27
  239. data/vendor/google.golang.org/protobuf/PATENTS +0 -22
  240. data/vendor/google.golang.org/protobuf/encoding/prototext/decode.go +0 -773
  241. data/vendor/google.golang.org/protobuf/encoding/prototext/doc.go +0 -7
  242. data/vendor/google.golang.org/protobuf/encoding/prototext/encode.go +0 -371
  243. data/vendor/google.golang.org/protobuf/encoding/protowire/wire.go +0 -538
  244. data/vendor/google.golang.org/protobuf/internal/descfmt/stringer.go +0 -318
  245. data/vendor/google.golang.org/protobuf/internal/descopts/options.go +0 -29
  246. data/vendor/google.golang.org/protobuf/internal/detrand/rand.go +0 -69
  247. data/vendor/google.golang.org/protobuf/internal/encoding/defval/default.go +0 -213
  248. data/vendor/google.golang.org/protobuf/internal/encoding/messageset/messageset.go +0 -241
  249. data/vendor/google.golang.org/protobuf/internal/encoding/tag/tag.go +0 -207
  250. data/vendor/google.golang.org/protobuf/internal/encoding/text/decode.go +0 -665
  251. data/vendor/google.golang.org/protobuf/internal/encoding/text/decode_number.go +0 -190
  252. data/vendor/google.golang.org/protobuf/internal/encoding/text/decode_string.go +0 -161
  253. data/vendor/google.golang.org/protobuf/internal/encoding/text/decode_token.go +0 -373
  254. data/vendor/google.golang.org/protobuf/internal/encoding/text/doc.go +0 -29
  255. data/vendor/google.golang.org/protobuf/internal/encoding/text/encode.go +0 -265
  256. data/vendor/google.golang.org/protobuf/internal/errors/errors.go +0 -89
  257. data/vendor/google.golang.org/protobuf/internal/errors/is_go112.go +0 -39
  258. data/vendor/google.golang.org/protobuf/internal/errors/is_go113.go +0 -12
  259. data/vendor/google.golang.org/protobuf/internal/filedesc/build.go +0 -158
  260. data/vendor/google.golang.org/protobuf/internal/filedesc/desc.go +0 -631
  261. data/vendor/google.golang.org/protobuf/internal/filedesc/desc_init.go +0 -471
  262. data/vendor/google.golang.org/protobuf/internal/filedesc/desc_lazy.go +0 -704
  263. data/vendor/google.golang.org/protobuf/internal/filedesc/desc_list.go +0 -450
  264. data/vendor/google.golang.org/protobuf/internal/filedesc/desc_list_gen.go +0 -356
  265. data/vendor/google.golang.org/protobuf/internal/filedesc/placeholder.go +0 -107
  266. data/vendor/google.golang.org/protobuf/internal/filetype/build.go +0 -297
  267. data/vendor/google.golang.org/protobuf/internal/flags/flags.go +0 -24
  268. data/vendor/google.golang.org/protobuf/internal/flags/proto_legacy_disable.go +0 -9
  269. data/vendor/google.golang.org/protobuf/internal/flags/proto_legacy_enable.go +0 -9
  270. data/vendor/google.golang.org/protobuf/internal/genid/any_gen.go +0 -34
  271. data/vendor/google.golang.org/protobuf/internal/genid/api_gen.go +0 -106
  272. data/vendor/google.golang.org/protobuf/internal/genid/descriptor_gen.go +0 -829
  273. data/vendor/google.golang.org/protobuf/internal/genid/doc.go +0 -11
  274. data/vendor/google.golang.org/protobuf/internal/genid/duration_gen.go +0 -34
  275. data/vendor/google.golang.org/protobuf/internal/genid/empty_gen.go +0 -19
  276. data/vendor/google.golang.org/protobuf/internal/genid/field_mask_gen.go +0 -31
  277. data/vendor/google.golang.org/protobuf/internal/genid/goname.go +0 -25
  278. data/vendor/google.golang.org/protobuf/internal/genid/map_entry.go +0 -16
  279. data/vendor/google.golang.org/protobuf/internal/genid/source_context_gen.go +0 -31
  280. data/vendor/google.golang.org/protobuf/internal/genid/struct_gen.go +0 -116
  281. data/vendor/google.golang.org/protobuf/internal/genid/timestamp_gen.go +0 -34
  282. data/vendor/google.golang.org/protobuf/internal/genid/type_gen.go +0 -184
  283. data/vendor/google.golang.org/protobuf/internal/genid/wrappers.go +0 -13
  284. data/vendor/google.golang.org/protobuf/internal/genid/wrappers_gen.go +0 -175
  285. data/vendor/google.golang.org/protobuf/internal/impl/api_export.go +0 -177
  286. data/vendor/google.golang.org/protobuf/internal/impl/checkinit.go +0 -141
  287. data/vendor/google.golang.org/protobuf/internal/impl/codec_extension.go +0 -223
  288. data/vendor/google.golang.org/protobuf/internal/impl/codec_field.go +0 -830
  289. data/vendor/google.golang.org/protobuf/internal/impl/codec_gen.go +0 -5637
  290. data/vendor/google.golang.org/protobuf/internal/impl/codec_map.go +0 -388
  291. data/vendor/google.golang.org/protobuf/internal/impl/codec_map_go111.go +0 -37
  292. data/vendor/google.golang.org/protobuf/internal/impl/codec_map_go112.go +0 -11
  293. data/vendor/google.golang.org/protobuf/internal/impl/codec_message.go +0 -217
  294. data/vendor/google.golang.org/protobuf/internal/impl/codec_messageset.go +0 -123
  295. data/vendor/google.golang.org/protobuf/internal/impl/codec_reflect.go +0 -209
  296. data/vendor/google.golang.org/protobuf/internal/impl/codec_tables.go +0 -557
  297. data/vendor/google.golang.org/protobuf/internal/impl/codec_unsafe.go +0 -17
  298. data/vendor/google.golang.org/protobuf/internal/impl/convert.go +0 -496
  299. data/vendor/google.golang.org/protobuf/internal/impl/convert_list.go +0 -141
  300. data/vendor/google.golang.org/protobuf/internal/impl/convert_map.go +0 -121
  301. data/vendor/google.golang.org/protobuf/internal/impl/decode.go +0 -276
  302. data/vendor/google.golang.org/protobuf/internal/impl/encode.go +0 -201
  303. data/vendor/google.golang.org/protobuf/internal/impl/enum.go +0 -21
  304. data/vendor/google.golang.org/protobuf/internal/impl/extension.go +0 -156
  305. data/vendor/google.golang.org/protobuf/internal/impl/legacy_enum.go +0 -219
  306. data/vendor/google.golang.org/protobuf/internal/impl/legacy_export.go +0 -92
  307. data/vendor/google.golang.org/protobuf/internal/impl/legacy_extension.go +0 -176
  308. data/vendor/google.golang.org/protobuf/internal/impl/legacy_file.go +0 -81
  309. data/vendor/google.golang.org/protobuf/internal/impl/legacy_message.go +0 -558
  310. data/vendor/google.golang.org/protobuf/internal/impl/merge.go +0 -176
  311. data/vendor/google.golang.org/protobuf/internal/impl/merge_gen.go +0 -209
  312. data/vendor/google.golang.org/protobuf/internal/impl/message.go +0 -276
  313. data/vendor/google.golang.org/protobuf/internal/impl/message_reflect.go +0 -465
  314. data/vendor/google.golang.org/protobuf/internal/impl/message_reflect_field.go +0 -543
  315. data/vendor/google.golang.org/protobuf/internal/impl/message_reflect_gen.go +0 -249
  316. data/vendor/google.golang.org/protobuf/internal/impl/pointer_reflect.go +0 -178
  317. data/vendor/google.golang.org/protobuf/internal/impl/pointer_unsafe.go +0 -174
  318. data/vendor/google.golang.org/protobuf/internal/impl/validate.go +0 -576
  319. data/vendor/google.golang.org/protobuf/internal/impl/weak.go +0 -74
  320. data/vendor/google.golang.org/protobuf/internal/order/order.go +0 -89
  321. data/vendor/google.golang.org/protobuf/internal/order/range.go +0 -115
  322. data/vendor/google.golang.org/protobuf/internal/pragma/pragma.go +0 -29
  323. data/vendor/google.golang.org/protobuf/internal/set/ints.go +0 -58
  324. data/vendor/google.golang.org/protobuf/internal/strs/strings.go +0 -196
  325. data/vendor/google.golang.org/protobuf/internal/strs/strings_pure.go +0 -27
  326. data/vendor/google.golang.org/protobuf/internal/strs/strings_unsafe.go +0 -94
  327. data/vendor/google.golang.org/protobuf/internal/version/version.go +0 -79
  328. data/vendor/google.golang.org/protobuf/proto/checkinit.go +0 -71
  329. data/vendor/google.golang.org/protobuf/proto/decode.go +0 -278
  330. data/vendor/google.golang.org/protobuf/proto/decode_gen.go +0 -603
  331. data/vendor/google.golang.org/protobuf/proto/doc.go +0 -94
  332. data/vendor/google.golang.org/protobuf/proto/encode.go +0 -319
  333. data/vendor/google.golang.org/protobuf/proto/encode_gen.go +0 -97
  334. data/vendor/google.golang.org/protobuf/proto/equal.go +0 -167
  335. data/vendor/google.golang.org/protobuf/proto/extension.go +0 -92
  336. data/vendor/google.golang.org/protobuf/proto/merge.go +0 -139
  337. data/vendor/google.golang.org/protobuf/proto/messageset.go +0 -93
  338. data/vendor/google.golang.org/protobuf/proto/proto.go +0 -43
  339. data/vendor/google.golang.org/protobuf/proto/proto_methods.go +0 -19
  340. data/vendor/google.golang.org/protobuf/proto/proto_reflect.go +0 -19
  341. data/vendor/google.golang.org/protobuf/proto/reset.go +0 -43
  342. data/vendor/google.golang.org/protobuf/proto/size.go +0 -97
  343. data/vendor/google.golang.org/protobuf/proto/size_gen.go +0 -55
  344. data/vendor/google.golang.org/protobuf/proto/wrappers.go +0 -29
  345. data/vendor/google.golang.org/protobuf/reflect/protodesc/desc.go +0 -276
  346. data/vendor/google.golang.org/protobuf/reflect/protodesc/desc_init.go +0 -248
  347. data/vendor/google.golang.org/protobuf/reflect/protodesc/desc_resolve.go +0 -286
  348. data/vendor/google.golang.org/protobuf/reflect/protodesc/desc_validate.go +0 -374
  349. data/vendor/google.golang.org/protobuf/reflect/protodesc/proto.go +0 -252
  350. data/vendor/google.golang.org/protobuf/reflect/protoreflect/methods.go +0 -77
  351. data/vendor/google.golang.org/protobuf/reflect/protoreflect/proto.go +0 -504
  352. data/vendor/google.golang.org/protobuf/reflect/protoreflect/source.go +0 -128
  353. data/vendor/google.golang.org/protobuf/reflect/protoreflect/source_gen.go +0 -461
  354. data/vendor/google.golang.org/protobuf/reflect/protoreflect/type.go +0 -665
  355. data/vendor/google.golang.org/protobuf/reflect/protoreflect/value.go +0 -285
  356. data/vendor/google.golang.org/protobuf/reflect/protoreflect/value_pure.go +0 -59
  357. data/vendor/google.golang.org/protobuf/reflect/protoreflect/value_union.go +0 -411
  358. data/vendor/google.golang.org/protobuf/reflect/protoreflect/value_unsafe.go +0 -98
  359. data/vendor/google.golang.org/protobuf/reflect/protoregistry/registry.go +0 -869
  360. data/vendor/google.golang.org/protobuf/runtime/protoiface/legacy.go +0 -15
  361. data/vendor/google.golang.org/protobuf/runtime/protoiface/methods.go +0 -167
  362. data/vendor/google.golang.org/protobuf/runtime/protoimpl/impl.go +0 -44
  363. data/vendor/google.golang.org/protobuf/runtime/protoimpl/version.go +0 -56
  364. data/vendor/google.golang.org/protobuf/types/descriptorpb/descriptor.pb.go +0 -4039
  365. data/vendor/modules.txt +0 -79
@@ -1,388 +0,0 @@
1
- // Copyright 2012 The Gorilla Authors. All rights reserved.
2
- // Use of this source code is governed by a BSD-style
3
- // license that can be found in the LICENSE file.
4
-
5
- package mux
6
-
7
- import (
8
- "bytes"
9
- "fmt"
10
- "net/http"
11
- "net/url"
12
- "regexp"
13
- "strconv"
14
- "strings"
15
- )
16
-
17
- type routeRegexpOptions struct {
18
- strictSlash bool
19
- useEncodedPath bool
20
- }
21
-
22
- type regexpType int
23
-
24
- const (
25
- regexpTypePath regexpType = 0
26
- regexpTypeHost regexpType = 1
27
- regexpTypePrefix regexpType = 2
28
- regexpTypeQuery regexpType = 3
29
- )
30
-
31
- // newRouteRegexp parses a route template and returns a routeRegexp,
32
- // used to match a host, a path or a query string.
33
- //
34
- // It will extract named variables, assemble a regexp to be matched, create
35
- // a "reverse" template to build URLs and compile regexps to validate variable
36
- // values used in URL building.
37
- //
38
- // Previously we accepted only Python-like identifiers for variable
39
- // names ([a-zA-Z_][a-zA-Z0-9_]*), but currently the only restriction is that
40
- // name and pattern can't be empty, and names can't contain a colon.
41
- func newRouteRegexp(tpl string, typ regexpType, options routeRegexpOptions) (*routeRegexp, error) {
42
- // Check if it is well-formed.
43
- idxs, errBraces := braceIndices(tpl)
44
- if errBraces != nil {
45
- return nil, errBraces
46
- }
47
- // Backup the original.
48
- template := tpl
49
- // Now let's parse it.
50
- defaultPattern := "[^/]+"
51
- if typ == regexpTypeQuery {
52
- defaultPattern = ".*"
53
- } else if typ == regexpTypeHost {
54
- defaultPattern = "[^.]+"
55
- }
56
- // Only match strict slash if not matching
57
- if typ != regexpTypePath {
58
- options.strictSlash = false
59
- }
60
- // Set a flag for strictSlash.
61
- endSlash := false
62
- if options.strictSlash && strings.HasSuffix(tpl, "/") {
63
- tpl = tpl[:len(tpl)-1]
64
- endSlash = true
65
- }
66
- varsN := make([]string, len(idxs)/2)
67
- varsR := make([]*regexp.Regexp, len(idxs)/2)
68
- pattern := bytes.NewBufferString("")
69
- pattern.WriteByte('^')
70
- reverse := bytes.NewBufferString("")
71
- var end int
72
- var err error
73
- for i := 0; i < len(idxs); i += 2 {
74
- // Set all values we are interested in.
75
- raw := tpl[end:idxs[i]]
76
- end = idxs[i+1]
77
- parts := strings.SplitN(tpl[idxs[i]+1:end-1], ":", 2)
78
- name := parts[0]
79
- patt := defaultPattern
80
- if len(parts) == 2 {
81
- patt = parts[1]
82
- }
83
- // Name or pattern can't be empty.
84
- if name == "" || patt == "" {
85
- return nil, fmt.Errorf("mux: missing name or pattern in %q",
86
- tpl[idxs[i]:end])
87
- }
88
- // Build the regexp pattern.
89
- fmt.Fprintf(pattern, "%s(?P<%s>%s)", regexp.QuoteMeta(raw), varGroupName(i/2), patt)
90
-
91
- // Build the reverse template.
92
- fmt.Fprintf(reverse, "%s%%s", raw)
93
-
94
- // Append variable name and compiled pattern.
95
- varsN[i/2] = name
96
- varsR[i/2], err = regexp.Compile(fmt.Sprintf("^%s$", patt))
97
- if err != nil {
98
- return nil, err
99
- }
100
- }
101
- // Add the remaining.
102
- raw := tpl[end:]
103
- pattern.WriteString(regexp.QuoteMeta(raw))
104
- if options.strictSlash {
105
- pattern.WriteString("[/]?")
106
- }
107
- if typ == regexpTypeQuery {
108
- // Add the default pattern if the query value is empty
109
- if queryVal := strings.SplitN(template, "=", 2)[1]; queryVal == "" {
110
- pattern.WriteString(defaultPattern)
111
- }
112
- }
113
- if typ != regexpTypePrefix {
114
- pattern.WriteByte('$')
115
- }
116
-
117
- var wildcardHostPort bool
118
- if typ == regexpTypeHost {
119
- if !strings.Contains(pattern.String(), ":") {
120
- wildcardHostPort = true
121
- }
122
- }
123
- reverse.WriteString(raw)
124
- if endSlash {
125
- reverse.WriteByte('/')
126
- }
127
- // Compile full regexp.
128
- reg, errCompile := regexp.Compile(pattern.String())
129
- if errCompile != nil {
130
- return nil, errCompile
131
- }
132
-
133
- // Check for capturing groups which used to work in older versions
134
- if reg.NumSubexp() != len(idxs)/2 {
135
- panic(fmt.Sprintf("route %s contains capture groups in its regexp. ", template) +
136
- "Only non-capturing groups are accepted: e.g. (?:pattern) instead of (pattern)")
137
- }
138
-
139
- // Done!
140
- return &routeRegexp{
141
- template: template,
142
- regexpType: typ,
143
- options: options,
144
- regexp: reg,
145
- reverse: reverse.String(),
146
- varsN: varsN,
147
- varsR: varsR,
148
- wildcardHostPort: wildcardHostPort,
149
- }, nil
150
- }
151
-
152
- // routeRegexp stores a regexp to match a host or path and information to
153
- // collect and validate route variables.
154
- type routeRegexp struct {
155
- // The unmodified template.
156
- template string
157
- // The type of match
158
- regexpType regexpType
159
- // Options for matching
160
- options routeRegexpOptions
161
- // Expanded regexp.
162
- regexp *regexp.Regexp
163
- // Reverse template.
164
- reverse string
165
- // Variable names.
166
- varsN []string
167
- // Variable regexps (validators).
168
- varsR []*regexp.Regexp
169
- // Wildcard host-port (no strict port match in hostname)
170
- wildcardHostPort bool
171
- }
172
-
173
- // Match matches the regexp against the URL host or path.
174
- func (r *routeRegexp) Match(req *http.Request, match *RouteMatch) bool {
175
- if r.regexpType == regexpTypeHost {
176
- host := getHost(req)
177
- if r.wildcardHostPort {
178
- // Don't be strict on the port match
179
- if i := strings.Index(host, ":"); i != -1 {
180
- host = host[:i]
181
- }
182
- }
183
- return r.regexp.MatchString(host)
184
- }
185
-
186
- if r.regexpType == regexpTypeQuery {
187
- return r.matchQueryString(req)
188
- }
189
- path := req.URL.Path
190
- if r.options.useEncodedPath {
191
- path = req.URL.EscapedPath()
192
- }
193
- return r.regexp.MatchString(path)
194
- }
195
-
196
- // url builds a URL part using the given values.
197
- func (r *routeRegexp) url(values map[string]string) (string, error) {
198
- urlValues := make([]interface{}, len(r.varsN), len(r.varsN))
199
- for k, v := range r.varsN {
200
- value, ok := values[v]
201
- if !ok {
202
- return "", fmt.Errorf("mux: missing route variable %q", v)
203
- }
204
- if r.regexpType == regexpTypeQuery {
205
- value = url.QueryEscape(value)
206
- }
207
- urlValues[k] = value
208
- }
209
- rv := fmt.Sprintf(r.reverse, urlValues...)
210
- if !r.regexp.MatchString(rv) {
211
- // The URL is checked against the full regexp, instead of checking
212
- // individual variables. This is faster but to provide a good error
213
- // message, we check individual regexps if the URL doesn't match.
214
- for k, v := range r.varsN {
215
- if !r.varsR[k].MatchString(values[v]) {
216
- return "", fmt.Errorf(
217
- "mux: variable %q doesn't match, expected %q", values[v],
218
- r.varsR[k].String())
219
- }
220
- }
221
- }
222
- return rv, nil
223
- }
224
-
225
- // getURLQuery returns a single query parameter from a request URL.
226
- // For a URL with foo=bar&baz=ding, we return only the relevant key
227
- // value pair for the routeRegexp.
228
- func (r *routeRegexp) getURLQuery(req *http.Request) string {
229
- if r.regexpType != regexpTypeQuery {
230
- return ""
231
- }
232
- templateKey := strings.SplitN(r.template, "=", 2)[0]
233
- val, ok := findFirstQueryKey(req.URL.RawQuery, templateKey)
234
- if ok {
235
- return templateKey + "=" + val
236
- }
237
- return ""
238
- }
239
-
240
- // findFirstQueryKey returns the same result as (*url.URL).Query()[key][0].
241
- // If key was not found, empty string and false is returned.
242
- func findFirstQueryKey(rawQuery, key string) (value string, ok bool) {
243
- query := []byte(rawQuery)
244
- for len(query) > 0 {
245
- foundKey := query
246
- if i := bytes.IndexAny(foundKey, "&;"); i >= 0 {
247
- foundKey, query = foundKey[:i], foundKey[i+1:]
248
- } else {
249
- query = query[:0]
250
- }
251
- if len(foundKey) == 0 {
252
- continue
253
- }
254
- var value []byte
255
- if i := bytes.IndexByte(foundKey, '='); i >= 0 {
256
- foundKey, value = foundKey[:i], foundKey[i+1:]
257
- }
258
- if len(foundKey) < len(key) {
259
- // Cannot possibly be key.
260
- continue
261
- }
262
- keyString, err := url.QueryUnescape(string(foundKey))
263
- if err != nil {
264
- continue
265
- }
266
- if keyString != key {
267
- continue
268
- }
269
- valueString, err := url.QueryUnescape(string(value))
270
- if err != nil {
271
- continue
272
- }
273
- return valueString, true
274
- }
275
- return "", false
276
- }
277
-
278
- func (r *routeRegexp) matchQueryString(req *http.Request) bool {
279
- return r.regexp.MatchString(r.getURLQuery(req))
280
- }
281
-
282
- // braceIndices returns the first level curly brace indices from a string.
283
- // It returns an error in case of unbalanced braces.
284
- func braceIndices(s string) ([]int, error) {
285
- var level, idx int
286
- var idxs []int
287
- for i := 0; i < len(s); i++ {
288
- switch s[i] {
289
- case '{':
290
- if level++; level == 1 {
291
- idx = i
292
- }
293
- case '}':
294
- if level--; level == 0 {
295
- idxs = append(idxs, idx, i+1)
296
- } else if level < 0 {
297
- return nil, fmt.Errorf("mux: unbalanced braces in %q", s)
298
- }
299
- }
300
- }
301
- if level != 0 {
302
- return nil, fmt.Errorf("mux: unbalanced braces in %q", s)
303
- }
304
- return idxs, nil
305
- }
306
-
307
- // varGroupName builds a capturing group name for the indexed variable.
308
- func varGroupName(idx int) string {
309
- return "v" + strconv.Itoa(idx)
310
- }
311
-
312
- // ----------------------------------------------------------------------------
313
- // routeRegexpGroup
314
- // ----------------------------------------------------------------------------
315
-
316
- // routeRegexpGroup groups the route matchers that carry variables.
317
- type routeRegexpGroup struct {
318
- host *routeRegexp
319
- path *routeRegexp
320
- queries []*routeRegexp
321
- }
322
-
323
- // setMatch extracts the variables from the URL once a route matches.
324
- func (v routeRegexpGroup) setMatch(req *http.Request, m *RouteMatch, r *Route) {
325
- // Store host variables.
326
- if v.host != nil {
327
- host := getHost(req)
328
- if v.host.wildcardHostPort {
329
- // Don't be strict on the port match
330
- if i := strings.Index(host, ":"); i != -1 {
331
- host = host[:i]
332
- }
333
- }
334
- matches := v.host.regexp.FindStringSubmatchIndex(host)
335
- if len(matches) > 0 {
336
- extractVars(host, matches, v.host.varsN, m.Vars)
337
- }
338
- }
339
- path := req.URL.Path
340
- if r.useEncodedPath {
341
- path = req.URL.EscapedPath()
342
- }
343
- // Store path variables.
344
- if v.path != nil {
345
- matches := v.path.regexp.FindStringSubmatchIndex(path)
346
- if len(matches) > 0 {
347
- extractVars(path, matches, v.path.varsN, m.Vars)
348
- // Check if we should redirect.
349
- if v.path.options.strictSlash {
350
- p1 := strings.HasSuffix(path, "/")
351
- p2 := strings.HasSuffix(v.path.template, "/")
352
- if p1 != p2 {
353
- u, _ := url.Parse(req.URL.String())
354
- if p1 {
355
- u.Path = u.Path[:len(u.Path)-1]
356
- } else {
357
- u.Path += "/"
358
- }
359
- m.Handler = http.RedirectHandler(u.String(), http.StatusMovedPermanently)
360
- }
361
- }
362
- }
363
- }
364
- // Store query string variables.
365
- for _, q := range v.queries {
366
- queryURL := q.getURLQuery(req)
367
- matches := q.regexp.FindStringSubmatchIndex(queryURL)
368
- if len(matches) > 0 {
369
- extractVars(queryURL, matches, q.varsN, m.Vars)
370
- }
371
- }
372
- }
373
-
374
- // getHost tries its best to return the request host.
375
- // According to section 14.23 of RFC 2616 the Host header
376
- // can include the port number if the default value of 80 is not used.
377
- func getHost(r *http.Request) string {
378
- if r.URL.IsAbs() {
379
- return r.URL.Host
380
- }
381
- return r.Host
382
- }
383
-
384
- func extractVars(input string, matches []int, names []string, output map[string]string) {
385
- for i, name := range names {
386
- output[name] = input[matches[2*i+2]:matches[2*i+3]]
387
- }
388
- }