planetscale 0.3.1 → 0.3.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/workflows/ci.yml +9 -1
- data/.github/workflows/gem-push.yml +9 -2
- data/.licenses/go/github.com/matoous/go-nanoid/v2.dep.yml +34 -0
- data/.licenses/go/github.com/planetscale/planetscale-go/planetscale.dep.yml +1 -1
- data/.licenses/go/github.com/planetscale/sql-proxy/proxy.dep.yml +1 -1
- data/.licenses/go/go.uber.org/zap/buffer.dep.yml +1 -1
- data/.licenses/go/go.uber.org/zap/internal/bufferpool.dep.yml +1 -1
- data/.licenses/go/go.uber.org/zap/internal/color.dep.yml +1 -1
- data/.licenses/go/go.uber.org/zap/internal/exit.dep.yml +1 -1
- data/.licenses/go/go.uber.org/zap/zapcore.dep.yml +1 -1
- data/.licenses/go/go.uber.org/zap.dep.yml +1 -1
- data/README.md +2 -0
- data/controller.go +21 -36
- data/go.mod +4 -3
- data/go.sum +32 -18
- data/lib/planetscale/version.rb +1 -1
- data/lib/planetscale.rb +2 -3
- data/planetscale.gemspec +1 -1
- data/proxy/planetscale-darwin.h +1 -1
- data/proxy/planetscale-darwin.so +0 -0
- data/proxy/planetscale-linux.h +1 -1
- data/proxy/planetscale-linux.so +0 -0
- data/proxy.go +1 -5
- metadata +3 -345
- data/vendor/github.com/armon/circbuf/.gitignore +0 -22
- data/vendor/github.com/armon/circbuf/LICENSE +0 -20
- data/vendor/github.com/armon/circbuf/README.md +0 -28
- data/vendor/github.com/armon/circbuf/circbuf.go +0 -92
- data/vendor/github.com/armon/circbuf/go.mod +0 -1
- data/vendor/github.com/golang/protobuf/AUTHORS +0 -3
- data/vendor/github.com/golang/protobuf/CONTRIBUTORS +0 -3
- data/vendor/github.com/golang/protobuf/LICENSE +0 -28
- data/vendor/github.com/golang/protobuf/proto/buffer.go +0 -324
- data/vendor/github.com/golang/protobuf/proto/defaults.go +0 -63
- data/vendor/github.com/golang/protobuf/proto/deprecated.go +0 -113
- data/vendor/github.com/golang/protobuf/proto/discard.go +0 -58
- data/vendor/github.com/golang/protobuf/proto/extensions.go +0 -356
- data/vendor/github.com/golang/protobuf/proto/properties.go +0 -306
- data/vendor/github.com/golang/protobuf/proto/proto.go +0 -167
- data/vendor/github.com/golang/protobuf/proto/registry.go +0 -317
- data/vendor/github.com/golang/protobuf/proto/text_decode.go +0 -801
- data/vendor/github.com/golang/protobuf/proto/text_encode.go +0 -560
- data/vendor/github.com/golang/protobuf/proto/wire.go +0 -78
- data/vendor/github.com/golang/protobuf/proto/wrappers.go +0 -34
- data/vendor/github.com/gorilla/mux/AUTHORS +0 -8
- data/vendor/github.com/gorilla/mux/LICENSE +0 -27
- data/vendor/github.com/gorilla/mux/README.md +0 -805
- data/vendor/github.com/gorilla/mux/doc.go +0 -306
- data/vendor/github.com/gorilla/mux/go.mod +0 -3
- data/vendor/github.com/gorilla/mux/middleware.go +0 -74
- data/vendor/github.com/gorilla/mux/mux.go +0 -606
- data/vendor/github.com/gorilla/mux/regexp.go +0 -388
- data/vendor/github.com/gorilla/mux/route.go +0 -736
- data/vendor/github.com/gorilla/mux/test_helpers.go +0 -19
- data/vendor/github.com/hashicorp/go-cleanhttp/LICENSE +0 -363
- data/vendor/github.com/hashicorp/go-cleanhttp/README.md +0 -30
- data/vendor/github.com/hashicorp/go-cleanhttp/cleanhttp.go +0 -58
- data/vendor/github.com/hashicorp/go-cleanhttp/doc.go +0 -20
- data/vendor/github.com/hashicorp/go-cleanhttp/go.mod +0 -3
- data/vendor/github.com/hashicorp/go-cleanhttp/handlers.go +0 -48
- data/vendor/github.com/mitchellh/go-homedir/LICENSE +0 -21
- data/vendor/github.com/mitchellh/go-homedir/README.md +0 -14
- data/vendor/github.com/mitchellh/go-homedir/go.mod +0 -1
- data/vendor/github.com/mitchellh/go-homedir/homedir.go +0 -167
- data/vendor/github.com/pkg/errors/.gitignore +0 -24
- data/vendor/github.com/pkg/errors/.travis.yml +0 -10
- data/vendor/github.com/pkg/errors/LICENSE +0 -23
- data/vendor/github.com/pkg/errors/Makefile +0 -44
- data/vendor/github.com/pkg/errors/README.md +0 -59
- data/vendor/github.com/pkg/errors/appveyor.yml +0 -32
- data/vendor/github.com/pkg/errors/errors.go +0 -288
- data/vendor/github.com/pkg/errors/go113.go +0 -38
- data/vendor/github.com/pkg/errors/stack.go +0 -177
- data/vendor/github.com/planetscale/planetscale-go/LICENSE +0 -202
- data/vendor/github.com/planetscale/planetscale-go/planetscale/audit_logs.go +0 -136
- data/vendor/github.com/planetscale/planetscale-go/planetscale/backups.go +0 -139
- data/vendor/github.com/planetscale/planetscale-go/planetscale/branches.go +0 -252
- data/vendor/github.com/planetscale/planetscale-go/planetscale/certs.go +0 -166
- data/vendor/github.com/planetscale/planetscale-go/planetscale/client.go +0 -312
- data/vendor/github.com/planetscale/planetscale-go/planetscale/databases.go +0 -133
- data/vendor/github.com/planetscale/planetscale-go/planetscale/deploy_requests.go +0 -368
- data/vendor/github.com/planetscale/planetscale-go/planetscale/organizations.go +0 -103
- data/vendor/github.com/planetscale/planetscale-go/planetscale/regions.go +0 -52
- data/vendor/github.com/planetscale/planetscale-go/planetscale/service_tokens.go +0 -163
- data/vendor/github.com/planetscale/sql-proxy/LICENSE +0 -202
- data/vendor/github.com/planetscale/sql-proxy/proxy/client.go +0 -476
- data/vendor/github.com/planetscale/sql-proxy/proxy/tls_cache.go +0 -73
- data/vendor/go.uber.org/atomic/.codecov.yml +0 -19
- data/vendor/go.uber.org/atomic/.gitignore +0 -12
- data/vendor/go.uber.org/atomic/.travis.yml +0 -27
- data/vendor/go.uber.org/atomic/CHANGELOG.md +0 -76
- data/vendor/go.uber.org/atomic/LICENSE.txt +0 -19
- data/vendor/go.uber.org/atomic/Makefile +0 -78
- data/vendor/go.uber.org/atomic/README.md +0 -63
- data/vendor/go.uber.org/atomic/bool.go +0 -81
- data/vendor/go.uber.org/atomic/bool_ext.go +0 -53
- data/vendor/go.uber.org/atomic/doc.go +0 -23
- data/vendor/go.uber.org/atomic/duration.go +0 -82
- data/vendor/go.uber.org/atomic/duration_ext.go +0 -40
- data/vendor/go.uber.org/atomic/error.go +0 -51
- data/vendor/go.uber.org/atomic/error_ext.go +0 -39
- data/vendor/go.uber.org/atomic/float64.go +0 -76
- data/vendor/go.uber.org/atomic/float64_ext.go +0 -47
- data/vendor/go.uber.org/atomic/gen.go +0 -26
- data/vendor/go.uber.org/atomic/go.mod +0 -8
- data/vendor/go.uber.org/atomic/go.sum +0 -9
- data/vendor/go.uber.org/atomic/int32.go +0 -102
- data/vendor/go.uber.org/atomic/int64.go +0 -102
- data/vendor/go.uber.org/atomic/nocmp.go +0 -35
- data/vendor/go.uber.org/atomic/string.go +0 -54
- data/vendor/go.uber.org/atomic/string_ext.go +0 -43
- data/vendor/go.uber.org/atomic/uint32.go +0 -102
- data/vendor/go.uber.org/atomic/uint64.go +0 -102
- data/vendor/go.uber.org/atomic/value.go +0 -31
- data/vendor/go.uber.org/multierr/.codecov.yml +0 -15
- data/vendor/go.uber.org/multierr/.gitignore +0 -4
- data/vendor/go.uber.org/multierr/.travis.yml +0 -23
- data/vendor/go.uber.org/multierr/CHANGELOG.md +0 -60
- data/vendor/go.uber.org/multierr/LICENSE.txt +0 -19
- data/vendor/go.uber.org/multierr/Makefile +0 -42
- data/vendor/go.uber.org/multierr/README.md +0 -23
- data/vendor/go.uber.org/multierr/error.go +0 -449
- data/vendor/go.uber.org/multierr/glide.yaml +0 -8
- data/vendor/go.uber.org/multierr/go.mod +0 -8
- data/vendor/go.uber.org/multierr/go.sum +0 -11
- data/vendor/go.uber.org/multierr/go113.go +0 -52
- data/vendor/go.uber.org/zap/.codecov.yml +0 -17
- data/vendor/go.uber.org/zap/.gitignore +0 -32
- data/vendor/go.uber.org/zap/.readme.tmpl +0 -109
- data/vendor/go.uber.org/zap/CHANGELOG.md +0 -492
- data/vendor/go.uber.org/zap/CODE_OF_CONDUCT.md +0 -75
- data/vendor/go.uber.org/zap/CONTRIBUTING.md +0 -75
- data/vendor/go.uber.org/zap/FAQ.md +0 -164
- data/vendor/go.uber.org/zap/LICENSE.txt +0 -19
- data/vendor/go.uber.org/zap/Makefile +0 -73
- data/vendor/go.uber.org/zap/README.md +0 -134
- data/vendor/go.uber.org/zap/array.go +0 -320
- data/vendor/go.uber.org/zap/buffer/buffer.go +0 -141
- data/vendor/go.uber.org/zap/buffer/pool.go +0 -49
- data/vendor/go.uber.org/zap/checklicense.sh +0 -17
- data/vendor/go.uber.org/zap/config.go +0 -264
- data/vendor/go.uber.org/zap/doc.go +0 -113
- data/vendor/go.uber.org/zap/encoder.go +0 -79
- data/vendor/go.uber.org/zap/error.go +0 -80
- data/vendor/go.uber.org/zap/field.go +0 -549
- data/vendor/go.uber.org/zap/flag.go +0 -39
- data/vendor/go.uber.org/zap/glide.yaml +0 -34
- data/vendor/go.uber.org/zap/global.go +0 -168
- data/vendor/go.uber.org/zap/global_go112.go +0 -26
- data/vendor/go.uber.org/zap/global_prego112.go +0 -26
- data/vendor/go.uber.org/zap/go.mod +0 -14
- data/vendor/go.uber.org/zap/go.sum +0 -54
- data/vendor/go.uber.org/zap/http_handler.go +0 -132
- data/vendor/go.uber.org/zap/internal/bufferpool/bufferpool.go +0 -31
- data/vendor/go.uber.org/zap/internal/color/color.go +0 -44
- data/vendor/go.uber.org/zap/internal/exit/exit.go +0 -64
- data/vendor/go.uber.org/zap/level.go +0 -132
- data/vendor/go.uber.org/zap/logger.go +0 -348
- data/vendor/go.uber.org/zap/options.go +0 -148
- data/vendor/go.uber.org/zap/sink.go +0 -161
- data/vendor/go.uber.org/zap/stacktrace.go +0 -85
- data/vendor/go.uber.org/zap/sugar.go +0 -315
- data/vendor/go.uber.org/zap/time.go +0 -27
- data/vendor/go.uber.org/zap/writer.go +0 -99
- data/vendor/go.uber.org/zap/zapcore/buffered_write_syncer.go +0 -188
- data/vendor/go.uber.org/zap/zapcore/clock.go +0 -50
- data/vendor/go.uber.org/zap/zapcore/console_encoder.go +0 -161
- data/vendor/go.uber.org/zap/zapcore/core.go +0 -113
- data/vendor/go.uber.org/zap/zapcore/doc.go +0 -24
- data/vendor/go.uber.org/zap/zapcore/encoder.go +0 -443
- data/vendor/go.uber.org/zap/zapcore/entry.go +0 -264
- data/vendor/go.uber.org/zap/zapcore/error.go +0 -132
- data/vendor/go.uber.org/zap/zapcore/field.go +0 -233
- data/vendor/go.uber.org/zap/zapcore/hook.go +0 -68
- data/vendor/go.uber.org/zap/zapcore/increase_level.go +0 -66
- data/vendor/go.uber.org/zap/zapcore/json_encoder.go +0 -534
- data/vendor/go.uber.org/zap/zapcore/level.go +0 -175
- data/vendor/go.uber.org/zap/zapcore/level_strings.go +0 -46
- data/vendor/go.uber.org/zap/zapcore/marshaler.go +0 -61
- data/vendor/go.uber.org/zap/zapcore/memory_encoder.go +0 -179
- data/vendor/go.uber.org/zap/zapcore/sampler.go +0 -208
- data/vendor/go.uber.org/zap/zapcore/tee.go +0 -81
- data/vendor/go.uber.org/zap/zapcore/write_syncer.go +0 -122
- data/vendor/golang.org/x/net/AUTHORS +0 -3
- data/vendor/golang.org/x/net/CONTRIBUTORS +0 -3
- data/vendor/golang.org/x/net/LICENSE +0 -27
- data/vendor/golang.org/x/net/PATENTS +0 -22
- data/vendor/golang.org/x/net/context/context.go +0 -56
- data/vendor/golang.org/x/net/context/ctxhttp/ctxhttp.go +0 -71
- data/vendor/golang.org/x/net/context/go17.go +0 -73
- data/vendor/golang.org/x/net/context/go19.go +0 -21
- data/vendor/golang.org/x/net/context/pre_go17.go +0 -301
- data/vendor/golang.org/x/net/context/pre_go19.go +0 -110
- data/vendor/golang.org/x/oauth2/.travis.yml +0 -13
- data/vendor/golang.org/x/oauth2/AUTHORS +0 -3
- data/vendor/golang.org/x/oauth2/CONTRIBUTING.md +0 -26
- data/vendor/golang.org/x/oauth2/CONTRIBUTORS +0 -3
- data/vendor/golang.org/x/oauth2/LICENSE +0 -27
- data/vendor/golang.org/x/oauth2/README.md +0 -36
- data/vendor/golang.org/x/oauth2/go.mod +0 -9
- data/vendor/golang.org/x/oauth2/go.sum +0 -361
- data/vendor/golang.org/x/oauth2/internal/client_appengine.go +0 -14
- data/vendor/golang.org/x/oauth2/internal/doc.go +0 -6
- data/vendor/golang.org/x/oauth2/internal/oauth2.go +0 -37
- data/vendor/golang.org/x/oauth2/internal/token.go +0 -294
- data/vendor/golang.org/x/oauth2/internal/transport.go +0 -33
- data/vendor/golang.org/x/oauth2/oauth2.go +0 -381
- data/vendor/golang.org/x/oauth2/token.go +0 -178
- data/vendor/golang.org/x/oauth2/transport.go +0 -89
- data/vendor/google.golang.org/appengine/LICENSE +0 -202
- data/vendor/google.golang.org/appengine/internal/api.go +0 -678
- data/vendor/google.golang.org/appengine/internal/api_classic.go +0 -169
- data/vendor/google.golang.org/appengine/internal/api_common.go +0 -123
- data/vendor/google.golang.org/appengine/internal/app_id.go +0 -28
- data/vendor/google.golang.org/appengine/internal/base/api_base.pb.go +0 -308
- data/vendor/google.golang.org/appengine/internal/base/api_base.proto +0 -33
- data/vendor/google.golang.org/appengine/internal/datastore/datastore_v3.pb.go +0 -4367
- data/vendor/google.golang.org/appengine/internal/datastore/datastore_v3.proto +0 -551
- data/vendor/google.golang.org/appengine/internal/identity.go +0 -55
- data/vendor/google.golang.org/appengine/internal/identity_classic.go +0 -61
- data/vendor/google.golang.org/appengine/internal/identity_flex.go +0 -11
- data/vendor/google.golang.org/appengine/internal/identity_vm.go +0 -134
- data/vendor/google.golang.org/appengine/internal/internal.go +0 -110
- data/vendor/google.golang.org/appengine/internal/log/log_service.pb.go +0 -1313
- data/vendor/google.golang.org/appengine/internal/log/log_service.proto +0 -150
- data/vendor/google.golang.org/appengine/internal/main.go +0 -16
- data/vendor/google.golang.org/appengine/internal/main_common.go +0 -7
- data/vendor/google.golang.org/appengine/internal/main_vm.go +0 -69
- data/vendor/google.golang.org/appengine/internal/metadata.go +0 -60
- data/vendor/google.golang.org/appengine/internal/net.go +0 -56
- data/vendor/google.golang.org/appengine/internal/regen.sh +0 -40
- data/vendor/google.golang.org/appengine/internal/remote_api/remote_api.pb.go +0 -361
- data/vendor/google.golang.org/appengine/internal/remote_api/remote_api.proto +0 -44
- data/vendor/google.golang.org/appengine/internal/transaction.go +0 -115
- data/vendor/google.golang.org/appengine/internal/urlfetch/urlfetch_service.pb.go +0 -527
- data/vendor/google.golang.org/appengine/internal/urlfetch/urlfetch_service.proto +0 -64
- data/vendor/google.golang.org/appengine/urlfetch/urlfetch.go +0 -210
- data/vendor/google.golang.org/protobuf/AUTHORS +0 -3
- data/vendor/google.golang.org/protobuf/CONTRIBUTORS +0 -3
- data/vendor/google.golang.org/protobuf/LICENSE +0 -27
- data/vendor/google.golang.org/protobuf/PATENTS +0 -22
- data/vendor/google.golang.org/protobuf/encoding/prototext/decode.go +0 -773
- data/vendor/google.golang.org/protobuf/encoding/prototext/doc.go +0 -7
- data/vendor/google.golang.org/protobuf/encoding/prototext/encode.go +0 -371
- data/vendor/google.golang.org/protobuf/encoding/protowire/wire.go +0 -538
- data/vendor/google.golang.org/protobuf/internal/descfmt/stringer.go +0 -318
- data/vendor/google.golang.org/protobuf/internal/descopts/options.go +0 -29
- data/vendor/google.golang.org/protobuf/internal/detrand/rand.go +0 -69
- data/vendor/google.golang.org/protobuf/internal/encoding/defval/default.go +0 -213
- data/vendor/google.golang.org/protobuf/internal/encoding/messageset/messageset.go +0 -241
- data/vendor/google.golang.org/protobuf/internal/encoding/tag/tag.go +0 -207
- data/vendor/google.golang.org/protobuf/internal/encoding/text/decode.go +0 -665
- data/vendor/google.golang.org/protobuf/internal/encoding/text/decode_number.go +0 -190
- data/vendor/google.golang.org/protobuf/internal/encoding/text/decode_string.go +0 -161
- data/vendor/google.golang.org/protobuf/internal/encoding/text/decode_token.go +0 -373
- data/vendor/google.golang.org/protobuf/internal/encoding/text/doc.go +0 -29
- data/vendor/google.golang.org/protobuf/internal/encoding/text/encode.go +0 -265
- data/vendor/google.golang.org/protobuf/internal/errors/errors.go +0 -89
- data/vendor/google.golang.org/protobuf/internal/errors/is_go112.go +0 -39
- data/vendor/google.golang.org/protobuf/internal/errors/is_go113.go +0 -12
- data/vendor/google.golang.org/protobuf/internal/filedesc/build.go +0 -158
- data/vendor/google.golang.org/protobuf/internal/filedesc/desc.go +0 -631
- data/vendor/google.golang.org/protobuf/internal/filedesc/desc_init.go +0 -471
- data/vendor/google.golang.org/protobuf/internal/filedesc/desc_lazy.go +0 -704
- data/vendor/google.golang.org/protobuf/internal/filedesc/desc_list.go +0 -450
- data/vendor/google.golang.org/protobuf/internal/filedesc/desc_list_gen.go +0 -356
- data/vendor/google.golang.org/protobuf/internal/filedesc/placeholder.go +0 -107
- data/vendor/google.golang.org/protobuf/internal/filetype/build.go +0 -297
- data/vendor/google.golang.org/protobuf/internal/flags/flags.go +0 -24
- data/vendor/google.golang.org/protobuf/internal/flags/proto_legacy_disable.go +0 -9
- data/vendor/google.golang.org/protobuf/internal/flags/proto_legacy_enable.go +0 -9
- data/vendor/google.golang.org/protobuf/internal/genid/any_gen.go +0 -34
- data/vendor/google.golang.org/protobuf/internal/genid/api_gen.go +0 -106
- data/vendor/google.golang.org/protobuf/internal/genid/descriptor_gen.go +0 -829
- data/vendor/google.golang.org/protobuf/internal/genid/doc.go +0 -11
- data/vendor/google.golang.org/protobuf/internal/genid/duration_gen.go +0 -34
- data/vendor/google.golang.org/protobuf/internal/genid/empty_gen.go +0 -19
- data/vendor/google.golang.org/protobuf/internal/genid/field_mask_gen.go +0 -31
- data/vendor/google.golang.org/protobuf/internal/genid/goname.go +0 -25
- data/vendor/google.golang.org/protobuf/internal/genid/map_entry.go +0 -16
- data/vendor/google.golang.org/protobuf/internal/genid/source_context_gen.go +0 -31
- data/vendor/google.golang.org/protobuf/internal/genid/struct_gen.go +0 -116
- data/vendor/google.golang.org/protobuf/internal/genid/timestamp_gen.go +0 -34
- data/vendor/google.golang.org/protobuf/internal/genid/type_gen.go +0 -184
- data/vendor/google.golang.org/protobuf/internal/genid/wrappers.go +0 -13
- data/vendor/google.golang.org/protobuf/internal/genid/wrappers_gen.go +0 -175
- data/vendor/google.golang.org/protobuf/internal/impl/api_export.go +0 -177
- data/vendor/google.golang.org/protobuf/internal/impl/checkinit.go +0 -141
- data/vendor/google.golang.org/protobuf/internal/impl/codec_extension.go +0 -223
- data/vendor/google.golang.org/protobuf/internal/impl/codec_field.go +0 -830
- data/vendor/google.golang.org/protobuf/internal/impl/codec_gen.go +0 -5637
- data/vendor/google.golang.org/protobuf/internal/impl/codec_map.go +0 -388
- data/vendor/google.golang.org/protobuf/internal/impl/codec_map_go111.go +0 -37
- data/vendor/google.golang.org/protobuf/internal/impl/codec_map_go112.go +0 -11
- data/vendor/google.golang.org/protobuf/internal/impl/codec_message.go +0 -217
- data/vendor/google.golang.org/protobuf/internal/impl/codec_messageset.go +0 -123
- data/vendor/google.golang.org/protobuf/internal/impl/codec_reflect.go +0 -209
- data/vendor/google.golang.org/protobuf/internal/impl/codec_tables.go +0 -557
- data/vendor/google.golang.org/protobuf/internal/impl/codec_unsafe.go +0 -17
- data/vendor/google.golang.org/protobuf/internal/impl/convert.go +0 -496
- data/vendor/google.golang.org/protobuf/internal/impl/convert_list.go +0 -141
- data/vendor/google.golang.org/protobuf/internal/impl/convert_map.go +0 -121
- data/vendor/google.golang.org/protobuf/internal/impl/decode.go +0 -276
- data/vendor/google.golang.org/protobuf/internal/impl/encode.go +0 -201
- data/vendor/google.golang.org/protobuf/internal/impl/enum.go +0 -21
- data/vendor/google.golang.org/protobuf/internal/impl/extension.go +0 -156
- data/vendor/google.golang.org/protobuf/internal/impl/legacy_enum.go +0 -219
- data/vendor/google.golang.org/protobuf/internal/impl/legacy_export.go +0 -92
- data/vendor/google.golang.org/protobuf/internal/impl/legacy_extension.go +0 -176
- data/vendor/google.golang.org/protobuf/internal/impl/legacy_file.go +0 -81
- data/vendor/google.golang.org/protobuf/internal/impl/legacy_message.go +0 -558
- data/vendor/google.golang.org/protobuf/internal/impl/merge.go +0 -176
- data/vendor/google.golang.org/protobuf/internal/impl/merge_gen.go +0 -209
- data/vendor/google.golang.org/protobuf/internal/impl/message.go +0 -276
- data/vendor/google.golang.org/protobuf/internal/impl/message_reflect.go +0 -465
- data/vendor/google.golang.org/protobuf/internal/impl/message_reflect_field.go +0 -543
- data/vendor/google.golang.org/protobuf/internal/impl/message_reflect_gen.go +0 -249
- data/vendor/google.golang.org/protobuf/internal/impl/pointer_reflect.go +0 -178
- data/vendor/google.golang.org/protobuf/internal/impl/pointer_unsafe.go +0 -174
- data/vendor/google.golang.org/protobuf/internal/impl/validate.go +0 -576
- data/vendor/google.golang.org/protobuf/internal/impl/weak.go +0 -74
- data/vendor/google.golang.org/protobuf/internal/order/order.go +0 -89
- data/vendor/google.golang.org/protobuf/internal/order/range.go +0 -115
- data/vendor/google.golang.org/protobuf/internal/pragma/pragma.go +0 -29
- data/vendor/google.golang.org/protobuf/internal/set/ints.go +0 -58
- data/vendor/google.golang.org/protobuf/internal/strs/strings.go +0 -196
- data/vendor/google.golang.org/protobuf/internal/strs/strings_pure.go +0 -27
- data/vendor/google.golang.org/protobuf/internal/strs/strings_unsafe.go +0 -94
- data/vendor/google.golang.org/protobuf/internal/version/version.go +0 -79
- data/vendor/google.golang.org/protobuf/proto/checkinit.go +0 -71
- data/vendor/google.golang.org/protobuf/proto/decode.go +0 -278
- data/vendor/google.golang.org/protobuf/proto/decode_gen.go +0 -603
- data/vendor/google.golang.org/protobuf/proto/doc.go +0 -94
- data/vendor/google.golang.org/protobuf/proto/encode.go +0 -319
- data/vendor/google.golang.org/protobuf/proto/encode_gen.go +0 -97
- data/vendor/google.golang.org/protobuf/proto/equal.go +0 -167
- data/vendor/google.golang.org/protobuf/proto/extension.go +0 -92
- data/vendor/google.golang.org/protobuf/proto/merge.go +0 -139
- data/vendor/google.golang.org/protobuf/proto/messageset.go +0 -93
- data/vendor/google.golang.org/protobuf/proto/proto.go +0 -43
- data/vendor/google.golang.org/protobuf/proto/proto_methods.go +0 -19
- data/vendor/google.golang.org/protobuf/proto/proto_reflect.go +0 -19
- data/vendor/google.golang.org/protobuf/proto/reset.go +0 -43
- data/vendor/google.golang.org/protobuf/proto/size.go +0 -97
- data/vendor/google.golang.org/protobuf/proto/size_gen.go +0 -55
- data/vendor/google.golang.org/protobuf/proto/wrappers.go +0 -29
- data/vendor/google.golang.org/protobuf/reflect/protodesc/desc.go +0 -276
- data/vendor/google.golang.org/protobuf/reflect/protodesc/desc_init.go +0 -248
- data/vendor/google.golang.org/protobuf/reflect/protodesc/desc_resolve.go +0 -286
- data/vendor/google.golang.org/protobuf/reflect/protodesc/desc_validate.go +0 -374
- data/vendor/google.golang.org/protobuf/reflect/protodesc/proto.go +0 -252
- data/vendor/google.golang.org/protobuf/reflect/protoreflect/methods.go +0 -77
- data/vendor/google.golang.org/protobuf/reflect/protoreflect/proto.go +0 -504
- data/vendor/google.golang.org/protobuf/reflect/protoreflect/source.go +0 -128
- data/vendor/google.golang.org/protobuf/reflect/protoreflect/source_gen.go +0 -461
- data/vendor/google.golang.org/protobuf/reflect/protoreflect/type.go +0 -665
- data/vendor/google.golang.org/protobuf/reflect/protoreflect/value.go +0 -285
- data/vendor/google.golang.org/protobuf/reflect/protoreflect/value_pure.go +0 -59
- data/vendor/google.golang.org/protobuf/reflect/protoreflect/value_union.go +0 -411
- data/vendor/google.golang.org/protobuf/reflect/protoreflect/value_unsafe.go +0 -98
- data/vendor/google.golang.org/protobuf/reflect/protoregistry/registry.go +0 -869
- data/vendor/google.golang.org/protobuf/runtime/protoiface/legacy.go +0 -15
- data/vendor/google.golang.org/protobuf/runtime/protoiface/methods.go +0 -167
- data/vendor/google.golang.org/protobuf/runtime/protoimpl/impl.go +0 -44
- data/vendor/google.golang.org/protobuf/runtime/protoimpl/version.go +0 -56
- data/vendor/google.golang.org/protobuf/types/descriptorpb/descriptor.pb.go +0 -4039
- data/vendor/modules.txt +0 -79
@@ -1,665 +0,0 @@
|
|
1
|
-
// Copyright 2018 The Go 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 protoreflect
|
6
|
-
|
7
|
-
// Descriptor provides a set of accessors that are common to every descriptor.
|
8
|
-
// Each descriptor type wraps the equivalent google.protobuf.XXXDescriptorProto,
|
9
|
-
// but provides efficient lookup and immutability.
|
10
|
-
//
|
11
|
-
// Each descriptor is comparable. Equality implies that the two types are
|
12
|
-
// exactly identical. However, it is possible for the same semantically
|
13
|
-
// identical proto type to be represented by multiple type descriptors.
|
14
|
-
//
|
15
|
-
// For example, suppose we have t1 and t2 which are both MessageDescriptors.
|
16
|
-
// If t1 == t2, then the types are definitely equal and all accessors return
|
17
|
-
// the same information. However, if t1 != t2, then it is still possible that
|
18
|
-
// they still represent the same proto type (e.g., t1.FullName == t2.FullName).
|
19
|
-
// This can occur if a descriptor type is created dynamically, or multiple
|
20
|
-
// versions of the same proto type are accidentally linked into the Go binary.
|
21
|
-
type Descriptor interface {
|
22
|
-
// ParentFile returns the parent file descriptor that this descriptor
|
23
|
-
// is declared within. The parent file for the file descriptor is itself.
|
24
|
-
//
|
25
|
-
// Support for this functionality is optional and may return nil.
|
26
|
-
ParentFile() FileDescriptor
|
27
|
-
|
28
|
-
// Parent returns the parent containing this descriptor declaration.
|
29
|
-
// The following shows the mapping from child type to possible parent types:
|
30
|
-
//
|
31
|
-
// ╔═════════════════════╤═══════════════════════════════════╗
|
32
|
-
// ║ Child type │ Possible parent types ║
|
33
|
-
// ╠═════════════════════╪═══════════════════════════════════╣
|
34
|
-
// ║ FileDescriptor │ nil ║
|
35
|
-
// ║ MessageDescriptor │ FileDescriptor, MessageDescriptor ║
|
36
|
-
// ║ FieldDescriptor │ FileDescriptor, MessageDescriptor ║
|
37
|
-
// ║ OneofDescriptor │ MessageDescriptor ║
|
38
|
-
// ║ EnumDescriptor │ FileDescriptor, MessageDescriptor ║
|
39
|
-
// ║ EnumValueDescriptor │ EnumDescriptor ║
|
40
|
-
// ║ ServiceDescriptor │ FileDescriptor ║
|
41
|
-
// ║ MethodDescriptor │ ServiceDescriptor ║
|
42
|
-
// ╚═════════════════════╧═══════════════════════════════════╝
|
43
|
-
//
|
44
|
-
// Support for this functionality is optional and may return nil.
|
45
|
-
Parent() Descriptor
|
46
|
-
|
47
|
-
// Index returns the index of this descriptor within its parent.
|
48
|
-
// It returns 0 if the descriptor does not have a parent or if the parent
|
49
|
-
// is unknown.
|
50
|
-
Index() int
|
51
|
-
|
52
|
-
// Syntax is the protobuf syntax.
|
53
|
-
Syntax() Syntax // e.g., Proto2 or Proto3
|
54
|
-
|
55
|
-
// Name is the short name of the declaration (i.e., FullName.Name).
|
56
|
-
Name() Name // e.g., "Any"
|
57
|
-
|
58
|
-
// FullName is the fully-qualified name of the declaration.
|
59
|
-
//
|
60
|
-
// The FullName is a concatenation of the full name of the type that this
|
61
|
-
// type is declared within and the declaration name. For example,
|
62
|
-
// field "foo_field" in message "proto.package.MyMessage" is
|
63
|
-
// uniquely identified as "proto.package.MyMessage.foo_field".
|
64
|
-
// Enum values are an exception to the rule (see EnumValueDescriptor).
|
65
|
-
FullName() FullName // e.g., "google.protobuf.Any"
|
66
|
-
|
67
|
-
// IsPlaceholder reports whether type information is missing since a
|
68
|
-
// dependency is not resolved, in which case only name information is known.
|
69
|
-
//
|
70
|
-
// Placeholder types may only be returned by the following accessors
|
71
|
-
// as a result of unresolved dependencies or weak imports:
|
72
|
-
//
|
73
|
-
// ╔═══════════════════════════════════╤═════════════════════╗
|
74
|
-
// ║ Accessor │ Descriptor ║
|
75
|
-
// ╠═══════════════════════════════════╪═════════════════════╣
|
76
|
-
// ║ FileImports.FileDescriptor │ FileDescriptor ║
|
77
|
-
// ║ FieldDescriptor.Enum │ EnumDescriptor ║
|
78
|
-
// ║ FieldDescriptor.Message │ MessageDescriptor ║
|
79
|
-
// ║ FieldDescriptor.DefaultEnumValue │ EnumValueDescriptor ║
|
80
|
-
// ║ FieldDescriptor.ContainingMessage │ MessageDescriptor ║
|
81
|
-
// ║ MethodDescriptor.Input │ MessageDescriptor ║
|
82
|
-
// ║ MethodDescriptor.Output │ MessageDescriptor ║
|
83
|
-
// ╚═══════════════════════════════════╧═════════════════════╝
|
84
|
-
//
|
85
|
-
// If true, only Name and FullName are valid.
|
86
|
-
// For FileDescriptor, the Path is also valid.
|
87
|
-
IsPlaceholder() bool
|
88
|
-
|
89
|
-
// Options returns the descriptor options. The caller must not modify
|
90
|
-
// the returned value.
|
91
|
-
//
|
92
|
-
// To avoid a dependency cycle, this function returns a proto.Message value.
|
93
|
-
// The proto message type returned for each descriptor type is as follows:
|
94
|
-
// ╔═════════════════════╤══════════════════════════════════════════╗
|
95
|
-
// ║ Go type │ Protobuf message type ║
|
96
|
-
// ╠═════════════════════╪══════════════════════════════════════════╣
|
97
|
-
// ║ FileDescriptor │ google.protobuf.FileOptions ║
|
98
|
-
// ║ EnumDescriptor │ google.protobuf.EnumOptions ║
|
99
|
-
// ║ EnumValueDescriptor │ google.protobuf.EnumValueOptions ║
|
100
|
-
// ║ MessageDescriptor │ google.protobuf.MessageOptions ║
|
101
|
-
// ║ FieldDescriptor │ google.protobuf.FieldOptions ║
|
102
|
-
// ║ OneofDescriptor │ google.protobuf.OneofOptions ║
|
103
|
-
// ║ ServiceDescriptor │ google.protobuf.ServiceOptions ║
|
104
|
-
// ║ MethodDescriptor │ google.protobuf.MethodOptions ║
|
105
|
-
// ╚═════════════════════╧══════════════════════════════════════════╝
|
106
|
-
//
|
107
|
-
// This method returns a typed nil-pointer if no options are present.
|
108
|
-
// The caller must import the descriptorpb package to use this.
|
109
|
-
Options() ProtoMessage
|
110
|
-
|
111
|
-
doNotImplement
|
112
|
-
}
|
113
|
-
|
114
|
-
// FileDescriptor describes the types in a complete proto file and
|
115
|
-
// corresponds with the google.protobuf.FileDescriptorProto message.
|
116
|
-
//
|
117
|
-
// Top-level declarations:
|
118
|
-
// EnumDescriptor, MessageDescriptor, FieldDescriptor, and/or ServiceDescriptor.
|
119
|
-
type FileDescriptor interface {
|
120
|
-
Descriptor // Descriptor.FullName is identical to Package
|
121
|
-
|
122
|
-
// Path returns the file name, relative to the source tree root.
|
123
|
-
Path() string // e.g., "path/to/file.proto"
|
124
|
-
// Package returns the protobuf package namespace.
|
125
|
-
Package() FullName // e.g., "google.protobuf"
|
126
|
-
|
127
|
-
// Imports is a list of imported proto files.
|
128
|
-
Imports() FileImports
|
129
|
-
|
130
|
-
// Enums is a list of the top-level enum declarations.
|
131
|
-
Enums() EnumDescriptors
|
132
|
-
// Messages is a list of the top-level message declarations.
|
133
|
-
Messages() MessageDescriptors
|
134
|
-
// Extensions is a list of the top-level extension declarations.
|
135
|
-
Extensions() ExtensionDescriptors
|
136
|
-
// Services is a list of the top-level service declarations.
|
137
|
-
Services() ServiceDescriptors
|
138
|
-
|
139
|
-
// SourceLocations is a list of source locations.
|
140
|
-
SourceLocations() SourceLocations
|
141
|
-
|
142
|
-
isFileDescriptor
|
143
|
-
}
|
144
|
-
type isFileDescriptor interface{ ProtoType(FileDescriptor) }
|
145
|
-
|
146
|
-
// FileImports is a list of file imports.
|
147
|
-
type FileImports interface {
|
148
|
-
// Len reports the number of files imported by this proto file.
|
149
|
-
Len() int
|
150
|
-
// Get returns the ith FileImport. It panics if out of bounds.
|
151
|
-
Get(i int) FileImport
|
152
|
-
|
153
|
-
doNotImplement
|
154
|
-
}
|
155
|
-
|
156
|
-
// FileImport is the declaration for a proto file import.
|
157
|
-
type FileImport struct {
|
158
|
-
// FileDescriptor is the file type for the given import.
|
159
|
-
// It is a placeholder descriptor if IsWeak is set or if a dependency has
|
160
|
-
// not been regenerated to implement the new reflection APIs.
|
161
|
-
FileDescriptor
|
162
|
-
|
163
|
-
// IsPublic reports whether this is a public import, which causes this file
|
164
|
-
// to alias declarations within the imported file. The intended use cases
|
165
|
-
// for this feature is the ability to move proto files without breaking
|
166
|
-
// existing dependencies.
|
167
|
-
//
|
168
|
-
// The current file and the imported file must be within proto package.
|
169
|
-
IsPublic bool
|
170
|
-
|
171
|
-
// IsWeak reports whether this is a weak import, which does not impose
|
172
|
-
// a direct dependency on the target file.
|
173
|
-
//
|
174
|
-
// Weak imports are a legacy proto1 feature. Equivalent behavior is
|
175
|
-
// achieved using proto2 extension fields or proto3 Any messages.
|
176
|
-
IsWeak bool
|
177
|
-
}
|
178
|
-
|
179
|
-
// MessageDescriptor describes a message and
|
180
|
-
// corresponds with the google.protobuf.DescriptorProto message.
|
181
|
-
//
|
182
|
-
// Nested declarations:
|
183
|
-
// FieldDescriptor, OneofDescriptor, FieldDescriptor, EnumDescriptor,
|
184
|
-
// and/or MessageDescriptor.
|
185
|
-
type MessageDescriptor interface {
|
186
|
-
Descriptor
|
187
|
-
|
188
|
-
// IsMapEntry indicates that this is an auto-generated message type to
|
189
|
-
// represent the entry type for a map field.
|
190
|
-
//
|
191
|
-
// Map entry messages have only two fields:
|
192
|
-
// • a "key" field with a field number of 1
|
193
|
-
// • a "value" field with a field number of 2
|
194
|
-
// The key and value types are determined by these two fields.
|
195
|
-
//
|
196
|
-
// If IsMapEntry is true, it implies that FieldDescriptor.IsMap is true
|
197
|
-
// for some field with this message type.
|
198
|
-
IsMapEntry() bool
|
199
|
-
|
200
|
-
// Fields is a list of nested field declarations.
|
201
|
-
Fields() FieldDescriptors
|
202
|
-
// Oneofs is a list of nested oneof declarations.
|
203
|
-
Oneofs() OneofDescriptors
|
204
|
-
|
205
|
-
// ReservedNames is a list of reserved field names.
|
206
|
-
ReservedNames() Names
|
207
|
-
// ReservedRanges is a list of reserved ranges of field numbers.
|
208
|
-
ReservedRanges() FieldRanges
|
209
|
-
// RequiredNumbers is a list of required field numbers.
|
210
|
-
// In Proto3, it is always an empty list.
|
211
|
-
RequiredNumbers() FieldNumbers
|
212
|
-
// ExtensionRanges is the field ranges used for extension fields.
|
213
|
-
// In Proto3, it is always an empty ranges.
|
214
|
-
ExtensionRanges() FieldRanges
|
215
|
-
// ExtensionRangeOptions returns the ith extension range options.
|
216
|
-
//
|
217
|
-
// To avoid a dependency cycle, this method returns a proto.Message value,
|
218
|
-
// which always contains a google.protobuf.ExtensionRangeOptions message.
|
219
|
-
// This method returns a typed nil-pointer if no options are present.
|
220
|
-
// The caller must import the descriptorpb package to use this.
|
221
|
-
ExtensionRangeOptions(i int) ProtoMessage
|
222
|
-
|
223
|
-
// Enums is a list of nested enum declarations.
|
224
|
-
Enums() EnumDescriptors
|
225
|
-
// Messages is a list of nested message declarations.
|
226
|
-
Messages() MessageDescriptors
|
227
|
-
// Extensions is a list of nested extension declarations.
|
228
|
-
Extensions() ExtensionDescriptors
|
229
|
-
|
230
|
-
isMessageDescriptor
|
231
|
-
}
|
232
|
-
type isMessageDescriptor interface{ ProtoType(MessageDescriptor) }
|
233
|
-
|
234
|
-
// MessageType encapsulates a MessageDescriptor with a concrete Go implementation.
|
235
|
-
// It is recommended that implementations of this interface also implement the
|
236
|
-
// MessageFieldTypes interface.
|
237
|
-
type MessageType interface {
|
238
|
-
// New returns a newly allocated empty message.
|
239
|
-
// It may return nil for synthetic messages representing a map entry.
|
240
|
-
New() Message
|
241
|
-
|
242
|
-
// Zero returns an empty, read-only message.
|
243
|
-
// It may return nil for synthetic messages representing a map entry.
|
244
|
-
Zero() Message
|
245
|
-
|
246
|
-
// Descriptor returns the message descriptor.
|
247
|
-
//
|
248
|
-
// Invariant: t.Descriptor() == t.New().Descriptor()
|
249
|
-
Descriptor() MessageDescriptor
|
250
|
-
}
|
251
|
-
|
252
|
-
// MessageFieldTypes extends a MessageType by providing type information
|
253
|
-
// regarding enums and messages referenced by the message fields.
|
254
|
-
type MessageFieldTypes interface {
|
255
|
-
MessageType
|
256
|
-
|
257
|
-
// Enum returns the EnumType for the ith field in Descriptor.Fields.
|
258
|
-
// It returns nil if the ith field is not an enum kind.
|
259
|
-
// It panics if out of bounds.
|
260
|
-
//
|
261
|
-
// Invariant: mt.Enum(i).Descriptor() == mt.Descriptor().Fields(i).Enum()
|
262
|
-
Enum(i int) EnumType
|
263
|
-
|
264
|
-
// Message returns the MessageType for the ith field in Descriptor.Fields.
|
265
|
-
// It returns nil if the ith field is not a message or group kind.
|
266
|
-
// It panics if out of bounds.
|
267
|
-
//
|
268
|
-
// Invariant: mt.Message(i).Descriptor() == mt.Descriptor().Fields(i).Message()
|
269
|
-
Message(i int) MessageType
|
270
|
-
}
|
271
|
-
|
272
|
-
// MessageDescriptors is a list of message declarations.
|
273
|
-
type MessageDescriptors interface {
|
274
|
-
// Len reports the number of messages.
|
275
|
-
Len() int
|
276
|
-
// Get returns the ith MessageDescriptor. It panics if out of bounds.
|
277
|
-
Get(i int) MessageDescriptor
|
278
|
-
// ByName returns the MessageDescriptor for a message named s.
|
279
|
-
// It returns nil if not found.
|
280
|
-
ByName(s Name) MessageDescriptor
|
281
|
-
|
282
|
-
doNotImplement
|
283
|
-
}
|
284
|
-
|
285
|
-
// FieldDescriptor describes a field within a message and
|
286
|
-
// corresponds with the google.protobuf.FieldDescriptorProto message.
|
287
|
-
//
|
288
|
-
// It is used for both normal fields defined within the parent message
|
289
|
-
// (e.g., MessageDescriptor.Fields) and fields that extend some remote message
|
290
|
-
// (e.g., FileDescriptor.Extensions or MessageDescriptor.Extensions).
|
291
|
-
type FieldDescriptor interface {
|
292
|
-
Descriptor
|
293
|
-
|
294
|
-
// Number reports the unique number for this field.
|
295
|
-
Number() FieldNumber
|
296
|
-
// Cardinality reports the cardinality for this field.
|
297
|
-
Cardinality() Cardinality
|
298
|
-
// Kind reports the basic kind for this field.
|
299
|
-
Kind() Kind
|
300
|
-
|
301
|
-
// HasJSONName reports whether this field has an explicitly set JSON name.
|
302
|
-
HasJSONName() bool
|
303
|
-
|
304
|
-
// JSONName reports the name used for JSON serialization.
|
305
|
-
// It is usually the camel-cased form of the field name.
|
306
|
-
// Extension fields are represented by the full name surrounded by brackets.
|
307
|
-
JSONName() string
|
308
|
-
|
309
|
-
// TextName reports the name used for text serialization.
|
310
|
-
// It is usually the name of the field, except that groups use the name
|
311
|
-
// of the inlined message, and extension fields are represented by the
|
312
|
-
// full name surrounded by brackets.
|
313
|
-
TextName() string
|
314
|
-
|
315
|
-
// HasPresence reports whether the field distinguishes between unpopulated
|
316
|
-
// and default values.
|
317
|
-
HasPresence() bool
|
318
|
-
|
319
|
-
// IsExtension reports whether this is an extension field. If false,
|
320
|
-
// then Parent and ContainingMessage refer to the same message.
|
321
|
-
// Otherwise, ContainingMessage and Parent likely differ.
|
322
|
-
IsExtension() bool
|
323
|
-
|
324
|
-
// HasOptionalKeyword reports whether the "optional" keyword was explicitly
|
325
|
-
// specified in the source .proto file.
|
326
|
-
HasOptionalKeyword() bool
|
327
|
-
|
328
|
-
// IsWeak reports whether this is a weak field, which does not impose a
|
329
|
-
// direct dependency on the target type.
|
330
|
-
// If true, then Message returns a placeholder type.
|
331
|
-
IsWeak() bool
|
332
|
-
|
333
|
-
// IsPacked reports whether repeated primitive numeric kinds should be
|
334
|
-
// serialized using a packed encoding.
|
335
|
-
// If true, then it implies Cardinality is Repeated.
|
336
|
-
IsPacked() bool
|
337
|
-
|
338
|
-
// IsList reports whether this field represents a list,
|
339
|
-
// where the value type for the associated field is a List.
|
340
|
-
// It is equivalent to checking whether Cardinality is Repeated and
|
341
|
-
// that IsMap reports false.
|
342
|
-
IsList() bool
|
343
|
-
|
344
|
-
// IsMap reports whether this field represents a map,
|
345
|
-
// where the value type for the associated field is a Map.
|
346
|
-
// It is equivalent to checking whether Cardinality is Repeated,
|
347
|
-
// that the Kind is MessageKind, and that Message.IsMapEntry reports true.
|
348
|
-
IsMap() bool
|
349
|
-
|
350
|
-
// MapKey returns the field descriptor for the key in the map entry.
|
351
|
-
// It returns nil if IsMap reports false.
|
352
|
-
MapKey() FieldDescriptor
|
353
|
-
|
354
|
-
// MapValue returns the field descriptor for the value in the map entry.
|
355
|
-
// It returns nil if IsMap reports false.
|
356
|
-
MapValue() FieldDescriptor
|
357
|
-
|
358
|
-
// HasDefault reports whether this field has a default value.
|
359
|
-
HasDefault() bool
|
360
|
-
|
361
|
-
// Default returns the default value for scalar fields.
|
362
|
-
// For proto2, it is the default value as specified in the proto file,
|
363
|
-
// or the zero value if unspecified.
|
364
|
-
// For proto3, it is always the zero value of the scalar.
|
365
|
-
// The Value type is determined by the Kind.
|
366
|
-
Default() Value
|
367
|
-
|
368
|
-
// DefaultEnumValue returns the enum value descriptor for the default value
|
369
|
-
// of an enum field, and is nil for any other kind of field.
|
370
|
-
DefaultEnumValue() EnumValueDescriptor
|
371
|
-
|
372
|
-
// ContainingOneof is the containing oneof that this field belongs to,
|
373
|
-
// and is nil if this field is not part of a oneof.
|
374
|
-
ContainingOneof() OneofDescriptor
|
375
|
-
|
376
|
-
// ContainingMessage is the containing message that this field belongs to.
|
377
|
-
// For extension fields, this may not necessarily be the parent message
|
378
|
-
// that the field is declared within.
|
379
|
-
ContainingMessage() MessageDescriptor
|
380
|
-
|
381
|
-
// Enum is the enum descriptor if Kind is EnumKind.
|
382
|
-
// It returns nil for any other Kind.
|
383
|
-
Enum() EnumDescriptor
|
384
|
-
|
385
|
-
// Message is the message descriptor if Kind is
|
386
|
-
// MessageKind or GroupKind. It returns nil for any other Kind.
|
387
|
-
Message() MessageDescriptor
|
388
|
-
|
389
|
-
isFieldDescriptor
|
390
|
-
}
|
391
|
-
type isFieldDescriptor interface{ ProtoType(FieldDescriptor) }
|
392
|
-
|
393
|
-
// FieldDescriptors is a list of field declarations.
|
394
|
-
type FieldDescriptors interface {
|
395
|
-
// Len reports the number of fields.
|
396
|
-
Len() int
|
397
|
-
// Get returns the ith FieldDescriptor. It panics if out of bounds.
|
398
|
-
Get(i int) FieldDescriptor
|
399
|
-
// ByName returns the FieldDescriptor for a field named s.
|
400
|
-
// It returns nil if not found.
|
401
|
-
ByName(s Name) FieldDescriptor
|
402
|
-
// ByJSONName returns the FieldDescriptor for a field with s as the JSON name.
|
403
|
-
// It returns nil if not found.
|
404
|
-
ByJSONName(s string) FieldDescriptor
|
405
|
-
// ByTextName returns the FieldDescriptor for a field with s as the text name.
|
406
|
-
// It returns nil if not found.
|
407
|
-
ByTextName(s string) FieldDescriptor
|
408
|
-
// ByNumber returns the FieldDescriptor for a field numbered n.
|
409
|
-
// It returns nil if not found.
|
410
|
-
ByNumber(n FieldNumber) FieldDescriptor
|
411
|
-
|
412
|
-
doNotImplement
|
413
|
-
}
|
414
|
-
|
415
|
-
// OneofDescriptor describes a oneof field set within a given message and
|
416
|
-
// corresponds with the google.protobuf.OneofDescriptorProto message.
|
417
|
-
type OneofDescriptor interface {
|
418
|
-
Descriptor
|
419
|
-
|
420
|
-
// IsSynthetic reports whether this is a synthetic oneof created to support
|
421
|
-
// proto3 optional semantics. If true, Fields contains exactly one field
|
422
|
-
// with HasOptionalKeyword specified.
|
423
|
-
IsSynthetic() bool
|
424
|
-
|
425
|
-
// Fields is a list of fields belonging to this oneof.
|
426
|
-
Fields() FieldDescriptors
|
427
|
-
|
428
|
-
isOneofDescriptor
|
429
|
-
}
|
430
|
-
type isOneofDescriptor interface{ ProtoType(OneofDescriptor) }
|
431
|
-
|
432
|
-
// OneofDescriptors is a list of oneof declarations.
|
433
|
-
type OneofDescriptors interface {
|
434
|
-
// Len reports the number of oneof fields.
|
435
|
-
Len() int
|
436
|
-
// Get returns the ith OneofDescriptor. It panics if out of bounds.
|
437
|
-
Get(i int) OneofDescriptor
|
438
|
-
// ByName returns the OneofDescriptor for a oneof named s.
|
439
|
-
// It returns nil if not found.
|
440
|
-
ByName(s Name) OneofDescriptor
|
441
|
-
|
442
|
-
doNotImplement
|
443
|
-
}
|
444
|
-
|
445
|
-
// ExtensionDescriptor is an alias of FieldDescriptor for documentation.
|
446
|
-
type ExtensionDescriptor = FieldDescriptor
|
447
|
-
|
448
|
-
// ExtensionTypeDescriptor is an ExtensionDescriptor with an associated ExtensionType.
|
449
|
-
type ExtensionTypeDescriptor interface {
|
450
|
-
ExtensionDescriptor
|
451
|
-
|
452
|
-
// Type returns the associated ExtensionType.
|
453
|
-
Type() ExtensionType
|
454
|
-
|
455
|
-
// Descriptor returns the plain ExtensionDescriptor without the
|
456
|
-
// associated ExtensionType.
|
457
|
-
Descriptor() ExtensionDescriptor
|
458
|
-
}
|
459
|
-
|
460
|
-
// ExtensionDescriptors is a list of field declarations.
|
461
|
-
type ExtensionDescriptors interface {
|
462
|
-
// Len reports the number of fields.
|
463
|
-
Len() int
|
464
|
-
// Get returns the ith ExtensionDescriptor. It panics if out of bounds.
|
465
|
-
Get(i int) ExtensionDescriptor
|
466
|
-
// ByName returns the ExtensionDescriptor for a field named s.
|
467
|
-
// It returns nil if not found.
|
468
|
-
ByName(s Name) ExtensionDescriptor
|
469
|
-
|
470
|
-
doNotImplement
|
471
|
-
}
|
472
|
-
|
473
|
-
// ExtensionType encapsulates an ExtensionDescriptor with a concrete
|
474
|
-
// Go implementation. The nested field descriptor must be for a extension field.
|
475
|
-
//
|
476
|
-
// While a normal field is a member of the parent message that it is declared
|
477
|
-
// within (see Descriptor.Parent), an extension field is a member of some other
|
478
|
-
// target message (see ExtensionDescriptor.Extendee) and may have no
|
479
|
-
// relationship with the parent. However, the full name of an extension field is
|
480
|
-
// relative to the parent that it is declared within.
|
481
|
-
//
|
482
|
-
// For example:
|
483
|
-
// syntax = "proto2";
|
484
|
-
// package example;
|
485
|
-
// message FooMessage {
|
486
|
-
// extensions 100 to max;
|
487
|
-
// }
|
488
|
-
// message BarMessage {
|
489
|
-
// extends FooMessage { optional BarMessage bar_field = 100; }
|
490
|
-
// }
|
491
|
-
//
|
492
|
-
// Field "bar_field" is an extension of FooMessage, but its full name is
|
493
|
-
// "example.BarMessage.bar_field" instead of "example.FooMessage.bar_field".
|
494
|
-
type ExtensionType interface {
|
495
|
-
// New returns a new value for the field.
|
496
|
-
// For scalars, this returns the default value in native Go form.
|
497
|
-
New() Value
|
498
|
-
|
499
|
-
// Zero returns a new value for the field.
|
500
|
-
// For scalars, this returns the default value in native Go form.
|
501
|
-
// For composite types, this returns an empty, read-only message, list, or map.
|
502
|
-
Zero() Value
|
503
|
-
|
504
|
-
// TypeDescriptor returns the extension type descriptor.
|
505
|
-
TypeDescriptor() ExtensionTypeDescriptor
|
506
|
-
|
507
|
-
// ValueOf wraps the input and returns it as a Value.
|
508
|
-
// ValueOf panics if the input value is invalid or not the appropriate type.
|
509
|
-
//
|
510
|
-
// ValueOf is more extensive than protoreflect.ValueOf for a given field's
|
511
|
-
// value as it has more type information available.
|
512
|
-
ValueOf(interface{}) Value
|
513
|
-
|
514
|
-
// InterfaceOf completely unwraps the Value to the underlying Go type.
|
515
|
-
// InterfaceOf panics if the input is nil or does not represent the
|
516
|
-
// appropriate underlying Go type. For composite types, it panics if the
|
517
|
-
// value is not mutable.
|
518
|
-
//
|
519
|
-
// InterfaceOf is able to unwrap the Value further than Value.Interface
|
520
|
-
// as it has more type information available.
|
521
|
-
InterfaceOf(Value) interface{}
|
522
|
-
|
523
|
-
// IsValidValue reports whether the Value is valid to assign to the field.
|
524
|
-
IsValidValue(Value) bool
|
525
|
-
|
526
|
-
// IsValidInterface reports whether the input is valid to assign to the field.
|
527
|
-
IsValidInterface(interface{}) bool
|
528
|
-
}
|
529
|
-
|
530
|
-
// EnumDescriptor describes an enum and
|
531
|
-
// corresponds with the google.protobuf.EnumDescriptorProto message.
|
532
|
-
//
|
533
|
-
// Nested declarations:
|
534
|
-
// EnumValueDescriptor.
|
535
|
-
type EnumDescriptor interface {
|
536
|
-
Descriptor
|
537
|
-
|
538
|
-
// Values is a list of nested enum value declarations.
|
539
|
-
Values() EnumValueDescriptors
|
540
|
-
|
541
|
-
// ReservedNames is a list of reserved enum names.
|
542
|
-
ReservedNames() Names
|
543
|
-
// ReservedRanges is a list of reserved ranges of enum numbers.
|
544
|
-
ReservedRanges() EnumRanges
|
545
|
-
|
546
|
-
isEnumDescriptor
|
547
|
-
}
|
548
|
-
type isEnumDescriptor interface{ ProtoType(EnumDescriptor) }
|
549
|
-
|
550
|
-
// EnumType encapsulates an EnumDescriptor with a concrete Go implementation.
|
551
|
-
type EnumType interface {
|
552
|
-
// New returns an instance of this enum type with its value set to n.
|
553
|
-
New(n EnumNumber) Enum
|
554
|
-
|
555
|
-
// Descriptor returns the enum descriptor.
|
556
|
-
//
|
557
|
-
// Invariant: t.Descriptor() == t.New(0).Descriptor()
|
558
|
-
Descriptor() EnumDescriptor
|
559
|
-
}
|
560
|
-
|
561
|
-
// EnumDescriptors is a list of enum declarations.
|
562
|
-
type EnumDescriptors interface {
|
563
|
-
// Len reports the number of enum types.
|
564
|
-
Len() int
|
565
|
-
// Get returns the ith EnumDescriptor. It panics if out of bounds.
|
566
|
-
Get(i int) EnumDescriptor
|
567
|
-
// ByName returns the EnumDescriptor for an enum named s.
|
568
|
-
// It returns nil if not found.
|
569
|
-
ByName(s Name) EnumDescriptor
|
570
|
-
|
571
|
-
doNotImplement
|
572
|
-
}
|
573
|
-
|
574
|
-
// EnumValueDescriptor describes an enum value and
|
575
|
-
// corresponds with the google.protobuf.EnumValueDescriptorProto message.
|
576
|
-
//
|
577
|
-
// All other proto declarations are in the namespace of the parent.
|
578
|
-
// However, enum values do not follow this rule and are within the namespace
|
579
|
-
// of the parent's parent (i.e., they are a sibling of the containing enum).
|
580
|
-
// Thus, a value named "FOO_VALUE" declared within an enum uniquely identified
|
581
|
-
// as "proto.package.MyEnum" has a full name of "proto.package.FOO_VALUE".
|
582
|
-
type EnumValueDescriptor interface {
|
583
|
-
Descriptor
|
584
|
-
|
585
|
-
// Number returns the enum value as an integer.
|
586
|
-
Number() EnumNumber
|
587
|
-
|
588
|
-
isEnumValueDescriptor
|
589
|
-
}
|
590
|
-
type isEnumValueDescriptor interface{ ProtoType(EnumValueDescriptor) }
|
591
|
-
|
592
|
-
// EnumValueDescriptors is a list of enum value declarations.
|
593
|
-
type EnumValueDescriptors interface {
|
594
|
-
// Len reports the number of enum values.
|
595
|
-
Len() int
|
596
|
-
// Get returns the ith EnumValueDescriptor. It panics if out of bounds.
|
597
|
-
Get(i int) EnumValueDescriptor
|
598
|
-
// ByName returns the EnumValueDescriptor for the enum value named s.
|
599
|
-
// It returns nil if not found.
|
600
|
-
ByName(s Name) EnumValueDescriptor
|
601
|
-
// ByNumber returns the EnumValueDescriptor for the enum value numbered n.
|
602
|
-
// If multiple have the same number, the first one defined is returned
|
603
|
-
// It returns nil if not found.
|
604
|
-
ByNumber(n EnumNumber) EnumValueDescriptor
|
605
|
-
|
606
|
-
doNotImplement
|
607
|
-
}
|
608
|
-
|
609
|
-
// ServiceDescriptor describes a service and
|
610
|
-
// corresponds with the google.protobuf.ServiceDescriptorProto message.
|
611
|
-
//
|
612
|
-
// Nested declarations: MethodDescriptor.
|
613
|
-
type ServiceDescriptor interface {
|
614
|
-
Descriptor
|
615
|
-
|
616
|
-
// Methods is a list of nested message declarations.
|
617
|
-
Methods() MethodDescriptors
|
618
|
-
|
619
|
-
isServiceDescriptor
|
620
|
-
}
|
621
|
-
type isServiceDescriptor interface{ ProtoType(ServiceDescriptor) }
|
622
|
-
|
623
|
-
// ServiceDescriptors is a list of service declarations.
|
624
|
-
type ServiceDescriptors interface {
|
625
|
-
// Len reports the number of services.
|
626
|
-
Len() int
|
627
|
-
// Get returns the ith ServiceDescriptor. It panics if out of bounds.
|
628
|
-
Get(i int) ServiceDescriptor
|
629
|
-
// ByName returns the ServiceDescriptor for a service named s.
|
630
|
-
// It returns nil if not found.
|
631
|
-
ByName(s Name) ServiceDescriptor
|
632
|
-
|
633
|
-
doNotImplement
|
634
|
-
}
|
635
|
-
|
636
|
-
// MethodDescriptor describes a method and
|
637
|
-
// corresponds with the google.protobuf.MethodDescriptorProto message.
|
638
|
-
type MethodDescriptor interface {
|
639
|
-
Descriptor
|
640
|
-
|
641
|
-
// Input is the input message descriptor.
|
642
|
-
Input() MessageDescriptor
|
643
|
-
// Output is the output message descriptor.
|
644
|
-
Output() MessageDescriptor
|
645
|
-
// IsStreamingClient reports whether the client streams multiple messages.
|
646
|
-
IsStreamingClient() bool
|
647
|
-
// IsStreamingServer reports whether the server streams multiple messages.
|
648
|
-
IsStreamingServer() bool
|
649
|
-
|
650
|
-
isMethodDescriptor
|
651
|
-
}
|
652
|
-
type isMethodDescriptor interface{ ProtoType(MethodDescriptor) }
|
653
|
-
|
654
|
-
// MethodDescriptors is a list of method declarations.
|
655
|
-
type MethodDescriptors interface {
|
656
|
-
// Len reports the number of methods.
|
657
|
-
Len() int
|
658
|
-
// Get returns the ith MethodDescriptor. It panics if out of bounds.
|
659
|
-
Get(i int) MethodDescriptor
|
660
|
-
// ByName returns the MethodDescriptor for a service method named s.
|
661
|
-
// It returns nil if not found.
|
662
|
-
ByName(s Name) MethodDescriptor
|
663
|
-
|
664
|
-
doNotImplement
|
665
|
-
}
|