From a2f1ef94459505c92a0924918699189cc159292a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=99=BE=E9=87=8C=28barry=29?= Date: Thu, 9 Jun 2022 23:42:37 +0800 Subject: [PATCH] fix --- cmd/cmds/vercmd/cmd.go | 3 +- core/runmode/util.go | 28 + debug/version.go | 2 +- example/Makefile | 60 - example/cmd/main.go | 17 - example/configs/config/config.yaml | 168 - example/docs/markdown/proto/gid/index.md | 363 -- example/docs/markdown/proto/hello/index.md | 799 ----- example/docs/markdown/proto/login/index.md | 986 ------ example/docs/markdown/proto/sqlx/index.md | 311 -- example/docs/markdown/proto/user/index.md | 548 --- example/docs/markdown/proto/yuque/index.md | 263 -- example/docs/markdown/proto/yuquepb/index.md | 263 -- example/docs/markdown/rsocket/index.md | 140 - .../gid/a_bit_of_everything.swagger.json | 184 -- .../proto/gid/echo_service.swagger.json | 732 ---- .../docs/swagger/proto/gid/id.swagger.json | 189 -- .../docs/swagger/proto/hello/api.swagger.json | 373 --- .../swagger/proto/hello/api1.swagger.json | 49 - .../swagger/proto/hello/example.swagger.json | 271 -- .../proto/hello/helloworld.swagger.json | 973 ------ .../swagger/proto/hello/proto3.swagger.json | 49 - .../proto/hello/transport.swagger.json | 101 - .../swagger/proto/login/bind.swagger.json | 551 ---- .../swagger/proto/login/code.swagger.json | 477 --- .../swagger/proto/login/login.swagger.json | 320 -- .../swagger/proto/login/merge.swagger.json | 286 -- .../docs/swagger/proto/sqlx/code.swagger.json | 476 --- .../docs/swagger/proto/user/user.swagger.json | 2938 ----------------- .../swagger/proto/yuque/yuque.swagger.json | 511 --- .../swagger/proto/yuque_pb/yuque.swagger.json | 455 --- .../swagger/proto/yuquepb/yuque.swagger.json | 511 --- .../swagger/rsocket/metadata.swagger.json | 46 - example/example/fx/main.go | 40 - example/example/header/main.go | 20 - example/grpc-proxy/proxy/DOC.md | 84 - example/grpc-proxy/proxy/codec/codec.go | 92 - example/grpc-proxy/proxy/director.go | 24 - example/grpc-proxy/proxy/doc.go | 15 - example/grpc-proxy/proxy/handler.go | 164 - example/proto/gid/a_bit_of_everything.proto | 86 - example/proto/gid/echo_service.proto | 103 - example/proto/gid/id.proto | 146 - example/proto/hello/api.proto | 74 - example/proto/hello/api1.proto | 33 - example/proto/hello/example.proto | 100 - example/proto/hello/helloworld.proto | 60 - example/proto/hello/proto3.proto | 67 - example/proto/hello/transport.proto | 24 - example/proto/sqlx/code.proto | 188 -- example/proto/user/user.proto | 625 ---- example/protobuf.yaml | 49 - .../protopb/gidpb/a_bit_of_everything.pb.go | 404 --- .../gidpb/a_bit_of_everything_grpc.pb.go | 191 -- example/protopb/gidpb/echo_service.pb.go | 566 ---- example/protopb/gidpb/echo_service_grpc.pb.go | 263 -- example/protopb/gidpb/id.pb.go | 509 --- example/protopb/gidpb/id_grpc.pb.go | 139 - example/protopb/hellopb/api.pb.go | 220 -- example/protopb/hellopb/api1.pb.go | 408 --- example/protopb/hellopb/api_grpc.pb.go | 334 -- example/protopb/hellopb/example.pb.go | 555 ---- example/protopb/hellopb/example_grpc.pb.go | 304 -- example/protopb/hellopb/helloworld.pb.go | 357 -- example/protopb/hellopb/helloworld_grpc.pb.go | 99 - example/protopb/hellopb/proto3.pb.go | 854 ----- example/protopb/hellopb/transport.pb.go | 187 -- example/protopb/hellopb/transport_grpc.pb.go | 301 -- example/protopb/sqlxpb/code.pb.go | 1265 ------- example/protopb/sqlxpb/code_grpc.pb.go | 253 -- example/protopb/userpb/user.pb.go | 2527 -------------- example/protopb/userpb/user_grpc.pb.go | 1224 ------- example/proxy/main.go | 31 - example/srv/gid/gid.go | 15 - example/srv/gid/handler/gid.id.go | 108 - example/srv/hello/handler/testapi.go | 137 - example/srv/hello/handler/testapi_test.go | 43 - example/srv/hello/hello.go | 17 - go.mod | 15 +- go.sum | 45 - internal/entry/gateway/_doc.go | 18 - internal/entry/restful/doc.go | 4 - .../entry/rsocket/internal/call_options.go | 104 - internal/entry/rsocket/internal/misc.go | 93 - .../rsocket/internal/transport_stream.go | 151 - internal/entry/rsocket/sockets/abc.go | 10 - internal/entry/rsocket/sockets/client.go | 282 -- internal/entry/rsocket/sockets/errs.go | 5 - internal/entry/rsocket/sockets/logger.go | 11 - internal/entry/rsocket/sockets/metadata.pb.go | 408 --- internal/entry/rsocket/sockets/metadata.proto | 33 - internal/entry/rsocket/sockets/options.go | 100 - internal/entry/rsocket/sockets/payload.go | 12 - internal/entry/rsocket/sockets/server.go | 386 --- internal/entry/rsocket/util/client.go | 59 - internal/entry/rsocket/util/server.go | 108 - internal/entry/stream/_doc.go | 3 - .../automaxprocs/builder.go} | 0 .../gcnotifier/builder.go} | 12 +- internal/{plugins => modules}/gops/agent.go | 0 internal/services/auth/auth.proto | 48 - internal/services/doc.go | 5 - internal/services/pubsub/doc.go | 11 - internal/services/pubsub/pubsub.proto | 15 - internal/services/tunnel/tunnel.proto | 111 - modules/automaxprocs/module.go | 5 - modules/gops/module.go | 5 - modules/grpc_log/module.go | 5 - plugin.go | 8 +- version/util.go | 27 - version/version.go | 5 - 111 files changed, 44 insertions(+), 28808 deletions(-) create mode 100644 core/runmode/util.go delete mode 100644 example/Makefile delete mode 100644 example/cmd/main.go delete mode 100644 example/configs/config/config.yaml delete mode 100644 example/docs/markdown/proto/gid/index.md delete mode 100644 example/docs/markdown/proto/hello/index.md delete mode 100644 example/docs/markdown/proto/login/index.md delete mode 100644 example/docs/markdown/proto/sqlx/index.md delete mode 100644 example/docs/markdown/proto/user/index.md delete mode 100644 example/docs/markdown/proto/yuque/index.md delete mode 100644 example/docs/markdown/proto/yuquepb/index.md delete mode 100644 example/docs/markdown/rsocket/index.md delete mode 100644 example/docs/swagger/proto/gid/a_bit_of_everything.swagger.json delete mode 100644 example/docs/swagger/proto/gid/echo_service.swagger.json delete mode 100644 example/docs/swagger/proto/gid/id.swagger.json delete mode 100644 example/docs/swagger/proto/hello/api.swagger.json delete mode 100644 example/docs/swagger/proto/hello/api1.swagger.json delete mode 100644 example/docs/swagger/proto/hello/example.swagger.json delete mode 100644 example/docs/swagger/proto/hello/helloworld.swagger.json delete mode 100644 example/docs/swagger/proto/hello/proto3.swagger.json delete mode 100644 example/docs/swagger/proto/hello/transport.swagger.json delete mode 100644 example/docs/swagger/proto/login/bind.swagger.json delete mode 100644 example/docs/swagger/proto/login/code.swagger.json delete mode 100644 example/docs/swagger/proto/login/login.swagger.json delete mode 100644 example/docs/swagger/proto/login/merge.swagger.json delete mode 100644 example/docs/swagger/proto/sqlx/code.swagger.json delete mode 100644 example/docs/swagger/proto/user/user.swagger.json delete mode 100644 example/docs/swagger/proto/yuque/yuque.swagger.json delete mode 100644 example/docs/swagger/proto/yuque_pb/yuque.swagger.json delete mode 100644 example/docs/swagger/proto/yuquepb/yuque.swagger.json delete mode 100644 example/docs/swagger/rsocket/metadata.swagger.json delete mode 100644 example/example/fx/main.go delete mode 100644 example/example/header/main.go delete mode 100644 example/grpc-proxy/proxy/DOC.md delete mode 100644 example/grpc-proxy/proxy/codec/codec.go delete mode 100644 example/grpc-proxy/proxy/director.go delete mode 100644 example/grpc-proxy/proxy/doc.go delete mode 100644 example/grpc-proxy/proxy/handler.go delete mode 100644 example/proto/gid/a_bit_of_everything.proto delete mode 100644 example/proto/gid/echo_service.proto delete mode 100644 example/proto/gid/id.proto delete mode 100644 example/proto/hello/api.proto delete mode 100644 example/proto/hello/api1.proto delete mode 100644 example/proto/hello/example.proto delete mode 100644 example/proto/hello/helloworld.proto delete mode 100644 example/proto/hello/proto3.proto delete mode 100644 example/proto/hello/transport.proto delete mode 100644 example/proto/sqlx/code.proto delete mode 100644 example/proto/user/user.proto delete mode 100644 example/protobuf.yaml delete mode 100644 example/protopb/gidpb/a_bit_of_everything.pb.go delete mode 100644 example/protopb/gidpb/a_bit_of_everything_grpc.pb.go delete mode 100644 example/protopb/gidpb/echo_service.pb.go delete mode 100644 example/protopb/gidpb/echo_service_grpc.pb.go delete mode 100644 example/protopb/gidpb/id.pb.go delete mode 100644 example/protopb/gidpb/id_grpc.pb.go delete mode 100644 example/protopb/hellopb/api.pb.go delete mode 100644 example/protopb/hellopb/api1.pb.go delete mode 100644 example/protopb/hellopb/api_grpc.pb.go delete mode 100644 example/protopb/hellopb/example.pb.go delete mode 100644 example/protopb/hellopb/example_grpc.pb.go delete mode 100644 example/protopb/hellopb/helloworld.pb.go delete mode 100644 example/protopb/hellopb/helloworld_grpc.pb.go delete mode 100644 example/protopb/hellopb/proto3.pb.go delete mode 100644 example/protopb/hellopb/transport.pb.go delete mode 100644 example/protopb/hellopb/transport_grpc.pb.go delete mode 100644 example/protopb/sqlxpb/code.pb.go delete mode 100644 example/protopb/sqlxpb/code_grpc.pb.go delete mode 100644 example/protopb/userpb/user.pb.go delete mode 100644 example/protopb/userpb/user_grpc.pb.go delete mode 100644 example/proxy/main.go delete mode 100644 example/srv/gid/gid.go delete mode 100644 example/srv/gid/handler/gid.id.go delete mode 100644 example/srv/hello/handler/testapi.go delete mode 100644 example/srv/hello/handler/testapi_test.go delete mode 100644 example/srv/hello/hello.go delete mode 100644 internal/entry/gateway/_doc.go delete mode 100644 internal/entry/restful/doc.go delete mode 100644 internal/entry/rsocket/internal/call_options.go delete mode 100644 internal/entry/rsocket/internal/misc.go delete mode 100644 internal/entry/rsocket/internal/transport_stream.go delete mode 100644 internal/entry/rsocket/sockets/abc.go delete mode 100644 internal/entry/rsocket/sockets/client.go delete mode 100644 internal/entry/rsocket/sockets/errs.go delete mode 100644 internal/entry/rsocket/sockets/logger.go delete mode 100644 internal/entry/rsocket/sockets/metadata.pb.go delete mode 100644 internal/entry/rsocket/sockets/metadata.proto delete mode 100644 internal/entry/rsocket/sockets/options.go delete mode 100644 internal/entry/rsocket/sockets/payload.go delete mode 100644 internal/entry/rsocket/sockets/server.go delete mode 100644 internal/entry/rsocket/util/client.go delete mode 100644 internal/entry/rsocket/util/server.go delete mode 100644 internal/entry/stream/_doc.go rename internal/{plugins/automaxprocs/plugin.go => modules/automaxprocs/builder.go} (100%) rename internal/{plugins/gcnotifier/plugin.go => modules/gcnotifier/builder.go} (83%) rename internal/{plugins => modules}/gops/agent.go (100%) delete mode 100644 internal/services/auth/auth.proto delete mode 100644 internal/services/doc.go delete mode 100644 internal/services/pubsub/doc.go delete mode 100644 internal/services/pubsub/pubsub.proto delete mode 100644 internal/services/tunnel/tunnel.proto delete mode 100644 modules/automaxprocs/module.go delete mode 100644 modules/gops/module.go delete mode 100644 modules/grpc_log/module.go delete mode 100644 version/util.go diff --git a/cmd/cmds/vercmd/cmd.go b/cmd/cmds/vercmd/cmd.go index 1e3bce43a..49d2c253d 100644 --- a/cmd/cmds/vercmd/cmd.go +++ b/cmd/cmds/vercmd/cmd.go @@ -3,6 +3,7 @@ package vercmd import ( "encoding/json" "fmt" + "github.com/pubgo/lava/core/runmode" "os" "runtime/debug" @@ -40,7 +41,7 @@ func Cmd() *cli.Command { switch typ { case "": - dt, err := json.MarshalIndent(version.GetVersion(), "", "\t") + dt, err := json.MarshalIndent(runmode.GetVersion(), "", "\t") xerror.Panic(err) fmt.Println(string(dt)) case "json": diff --git a/core/runmode/util.go b/core/runmode/util.go new file mode 100644 index 000000000..0e92f2802 --- /dev/null +++ b/core/runmode/util.go @@ -0,0 +1,28 @@ +package runmode + +import ( + rt "runtime" + + "github.com/pubgo/lava/version" +) + +func GetVersion() map[string]interface{} { + return map[string]interface{}{ + "namespace": Namespace, + "app_id": InstanceID, + "device_id": DeviceID, + "project": Project, + "data": version.Data, + "build_time": version.BuildTime, + "version": version.Version, + "tag": version.Tag, + "commit_id": version.CommitID, + "domain": version.Domain, + "go_root": rt.GOROOT(), + "go_arch": rt.GOARCH, + "go_os": rt.GOOS, + "go_version": rt.Version(), + "num_cpu": rt.NumCPU(), + "num_goroutine": rt.NumGoroutine(), + } +} diff --git a/debug/version.go b/debug/version.go index 96af943eb..7e69d5262 100644 --- a/debug/version.go +++ b/debug/version.go @@ -1,7 +1,7 @@ package debug import ( - app2 "github.com/pubgo/lava/version" + app2 "github.com/pubgo/lava/core/runmode" "net/http" "os" rd "runtime/debug" diff --git a/example/Makefile b/example/Makefile deleted file mode 100644 index f4e2e4690..000000000 --- a/example/Makefile +++ /dev/null @@ -1,60 +0,0 @@ -WORKDIR=`pwd` -Domain=lava -VersionBase=github.com/pubgo/lava -Tag=$(shell git describe --abbrev=0 --tags) -Version=$(shell git tag --sort=committerdate | tail -n 1) -BuildTime=$(shell date "+%F %T") -CommitID=$(shell git rev-parse --short=8 HEAD) -GOPATH=$(shell go env GOPATH ) - -LDFLAGS=-ldflags " \ --X '${VersionBase}/version.BuildTime=${BuildTime}' \ --X '${VersionBase}/version.CommitID=${CommitID}' \ --X '${VersionBase}/version.Version=${Version}' \ --X '${VersionBase}/version.Tag=${Tag}' \ --X '${VersionBase}/version.Domain=${Domain}' \ --X '${VersionBase}/version.Data=hello' \ -" - -.PHONY: build -build: - go build ${LDFLAGS} -v -o main cmd/*.go - -.PHONY: run -run: - go run ${LDFLAGS} -v cmd/*.go test-grpc - -.PHONY: test./ma -test: - @go test -short -race -v ./... -cover - -ci: - @golangci-lint run -v --timeout=5m - -proto-gen: - debug=1 lava protoc gen - -proto-rm: - @rm -rf proto/**/*.go - -proto-vendor: - lava protoc vendor - lava protoc ls - -cover: - gocov test -tags "kcp quic" ./... | gocov-html > cover.html - open cover.html - -vet: - @go vet ./... - -generate: - @go generate ./... - -.PHONY: install -install: - @go install -v github.com/tinylib/msgp - @go install -v github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-openapiv2 - -lint: - @golangci-lint run --skip-dirs-use-default --timeout 3m0s diff --git a/example/cmd/main.go b/example/cmd/main.go deleted file mode 100644 index 1c10d530c..000000000 --- a/example/cmd/main.go +++ /dev/null @@ -1,17 +0,0 @@ -package main - -import ( - "github.com/pubgo/lava" - "github.com/pubgo/lava/example/srv/gid" - "github.com/pubgo/lava/example/srv/hello" - - _ "github.com/pubgo/lava/clients/orm/driver/sqlite" - _ "github.com/pubgo/lava/core/registry/drivers/mdns" -) - -func main() { - lava.Run( - gid.NewSrv(), - hello.NewSrv(), - ) -} diff --git a/example/configs/config/config.yaml b/example/configs/config/config.yaml deleted file mode 100644 index 26a35aa62..000000000 --- a/example/configs/config/config.yaml +++ /dev/null @@ -1,168 +0,0 @@ -app: - project: "lava" - name: "lava" - version: "v0.0.1" - home: "" - debug: true -service: - print-route: false -web: - print-route: true -timeout: - - test -watcher: - driver: "noop" - name: "default" -recovery: - enabled: true -mux: - debug: true -task_entry: - enabled: true - broker: "nsq" - consumers: - - driver: nsq - name: default -rest_entry: - enabled: true - prefork: false - server_header: "" - strict_routing: false - case_sensitive: false - immutable: false - unescape_path: false - etag: false - body_limit: 4194304 - concurrency: 262144 - read_timeout: 0 - write_timeout: 0 - idle_timeout: 0 - read_buffer_size: 4096 - write_buffer_size: 4096 - compressed_file_suffix: .fiber.gz - proxy_header: '' - get_only: false - disable_keepalive: false - disable_default_date: false - disable_default_content_type: false - disable_header_normalizing: false - disable_startup_message: true - reduce_memory_usage: false - views: - dir: "" - ext: ".html" -orm: - - name: default - driver: "sqlite3" - driver_config: - dsn: "file::memory:?cache=shared" - - - name: test - driver: "sqlite3" - driver_config: - dsn: "file::memory:?cache=shared" -grpcc: - - name: test-grpc - registry: "mdns" -# addr: "localhost:8080" -ws: - enabled: true - configs: - default: - origins: [ "*" ] -redis: - enabled: true - codis: - addr: "127.0.0.1:6379" - password: "foobared" - db: 0 - redisSale: - addr: "127.0.0.1:6379" - password: "foobared" - db: 0 - redisApiBusinessTwo: - addr: "127.0.0.1:6379" - password: "foobared" - db: 0 - redlock_0: - addr: "127.0.0.1:6379" - password: "foobared" - db: 0 -mongodb: - enabled: true - default: - url: "mongodb://localhost:8080" -nsq: - default: - address: "localhost:4150" - lookup: [ "nsqlookup-001.service.local:4161","nsqlookup-002.service.local:4161","nsqlookup-003.service.local:4161" ] - test_shanghai: - address: "localhost:4150" - lookup: [ "nsqlookup-001.service.local:4161","nsqlookup-002.service.local:4161","nsqlookup-003.service.local:4161" ] -http: - test: "" - -db: - default: - driver: "sqlite3x" - source: "./db/sqlite.db" - -registry: - driver: "mdns" - ttl: "5s" -tracing: - driver: "jaeger" - serviceName: "test" - disabled: true - -metric: - driver: "prometheus" - path: "/etcd" - -logging: - level: debug - development: true - disableCaller: false - disableStacktrace: true - encoding: console - encoderConfig: - messageKey: M - levelKey: L - timeKey: T - nameKey: 'N' - callerKey: C - stacktraceKey: S - levelEncoder: capitalColor - timeEncoder: "2006-01-02 15:04:05" - durationEncoder: string - callerEncoder: full - outputPaths: - - stderr - errorOutputPaths: - - stderr - #initialFields: - # name: test -grpc_entry: - write_buffer_size: 1024 - read_buffer_size: 1024 - initial_window_size: 1 - initial_conn_window_size: 1 - keepalive_params: - max_connection_idle: 1s - max_connection_age: 2s - max_connection_age_grace: 2s - time: 1s - timeout: 1s - keepalive_policy: - permit_without_stream: true - min_time: 1s - codec: json - cp: gzip - dc: gzip - max_receive_message_size: 1 - max_send_message_size: 1 - max_concurrent_streams: 1 - creds: tls - connection_timeout: 2s - max_header_list_size: 2 - header_table_size: 1 \ No newline at end of file diff --git a/example/docs/markdown/proto/gid/index.md b/example/docs/markdown/proto/gid/index.md deleted file mode 100644 index a617fe362..000000000 --- a/example/docs/markdown/proto/gid/index.md +++ /dev/null @@ -1,363 +0,0 @@ -# Protocol Documentation - - -## Table of Contents - -- [proto/gid/a_bit_of_everything.proto](#proto_gid_a_bit_of_everything-proto) - - [LoginReply](#gid-LoginReply) - - [LoginRequest](#gid-LoginRequest) - - [LogoutReply](#gid-LogoutReply) - - [LogoutRequest](#gid-LogoutRequest) - - - [LoginService](#gid-LoginService) - -- [proto/gid/echo_service.proto](#proto_gid_echo_service-proto) - - [DynamicMessage](#gid-DynamicMessage) - - [DynamicMessageUpdate](#gid-DynamicMessageUpdate) - - [Embedded](#gid-Embedded) - - [SimpleMessage](#gid-SimpleMessage) - - - [EchoService](#gid-EchoService) - -- [proto/gid/id.proto](#proto_gid_id-proto) - - [GenerateRequest](#gid-GenerateRequest) - - [GenerateResponse](#gid-GenerateResponse) - - [Tag](#gid-Tag) - - [TypesRequest](#gid-TypesRequest) - - [TypesResponse](#gid-TypesResponse) - - - [Id](#gid-Id) - -- [Scalar Value Types](#scalar-value-types) - - - - -

Top

- -## proto/gid/a_bit_of_everything.proto - - - - - -### LoginReply - - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| message | [string](#string) | | | -| access | [bool](#bool) | | Whether you have access or not | - - - - - - - - -### LoginRequest - - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| username | [string](#string) | | The entered username | -| password | [string](#string) | | The entered password | - - - - - - - - -### LogoutReply - - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| message | [string](#string) | | Message that tells you whether your logout was succesful or not | - - - - - - - - -### LogoutRequest - - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| timeoflogout | [string](#string) | | The time the logout was registered | -| test | [int32](#int32) | | This is the title - -This is the "Description" of field test you can use as many newlines as you want - -it will still format the same in the table | -| stringarray | [string](#string) | repeated | This is an array - -It displays that using [] infront of the type | - - - - - - - - - - - - - - -### LoginService - - -| Method Name | Request Type | Response Type | Description | -| ----------- | ------------ | ------------- | ------------| -| Login | [LoginRequest](#gid-LoginRequest) | [LoginReply](#gid-LoginReply) | Login - -{{.MethodDescriptorProto.Name}} is a call with the method(s) {{$first := true}}{{range .Bindings}}{{if $first}}{{$first = false}}{{else}}, {{end}}{{.HTTPMethod}}{{end}} within the "{{.Service.Name}}" service. It takes in "{{.RequestType.Name}}" and returns a "{{.ResponseType.Name}}". - -## {{.RequestType.Name}} | Field ID | Name | Type | Description | | ----------- | --------- | --------------------------------------------------------- | ---------------------------- | {{range .RequestType.Fields}} | {{.Number}} | {{.Name}} | {{if eq .Label.String "LABEL_REPEATED"}}[]{{end}}{{.Type}} | {{fieldcomments .Message .}} | {{end}} - -## {{.ResponseType.Name}} | Field ID | Name | Type | Description | | ----------- | --------- | ---------------------------------------------------------- | ---------------------------- | {{range .ResponseType.Fields}} | {{.Number}} | {{.Name}} | {{if eq .Label.String "LABEL_REPEATED"}}[]{{end}}{{.Type}} | {{fieldcomments .Message .}} | {{end}} | -| Logout | [LogoutRequest](#gid-LogoutRequest) | [LogoutReply](#gid-LogoutReply) | Logout - -{{.MethodDescriptorProto.Name}} is a call with the method(s) {{$first := true}}{{range .Bindings}}{{if $first}}{{$first = false}}{{else}}, {{end}}{{.HTTPMethod}}{{end}} within the "{{.Service.Name}}" service. It takes in "{{.RequestType.Name}}" and returns a "{{.ResponseType.Name}}". - -## {{.RequestType.Name}} | Field ID | Name | Type | Description | | ----------- | --------- | --------------------------------------------------------- | ---------------------------- | {{range .RequestType.Fields}} | {{.Number}} | {{.Name}} | {{if eq .Label.String "LABEL_REPEATED"}}[]{{end}}{{.Type}} | {{fieldcomments .Message .}} | {{end}} - -## {{.ResponseType.Name}} | Field ID | Name | Type | Description | | ----------- | --------- | ---------------------------------------------------------- | ---------------------------- | {{range .ResponseType.Fields}} | {{.Number}} | {{.Name}} | {{if eq .Label.String "LABEL_REPEATED"}}[]{{end}}{{.Type}} | {{fieldcomments .Message .}} | {{end}} | - - - - - - -

Top

- -## proto/gid/echo_service.proto - - - - - -### DynamicMessage -DynamicMessage represents a message which can have its structure -built dynamically using Struct and Values. - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| struct_field | [google.protobuf.Struct](#google-protobuf-Struct) | | | -| value_field | [google.protobuf.Value](#google-protobuf-Value) | | | - - - - - - - - -### DynamicMessageUpdate - - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| body | [DynamicMessage](#gid-DynamicMessage) | | google.protobuf.FieldMask update_mask = 2; | - - - - - - - - -### Embedded -Embedded represents a message embedded in SimpleMessage. - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| progress | [int64](#int64) | | | -| note | [string](#string) | | | - - - - - - - - -### SimpleMessage -SimpleMessage represents a simple message sent to the Echo service. - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| id | [string](#string) | | Id represents the message identifier. | -| num | [int64](#int64) | | | -| line_num | [int64](#int64) | | | -| lang | [string](#string) | | | -| status | [Embedded](#gid-Embedded) | | | -| en | [int64](#int64) | | | -| no | [Embedded](#gid-Embedded) | | | - - - - - - - - - - - - - - -### EchoService -Echo service responds to incoming echo requests. - -| Method Name | Request Type | Response Type | Description | -| ----------- | ------------ | ------------- | ------------| -| Echo | [SimpleMessage](#gid-SimpleMessage) | [SimpleMessage](#gid-SimpleMessage) | Echo method receives a simple message and returns it. - -The message posted as the id parameter will also be returned. | -| EchoBody | [SimpleMessage](#gid-SimpleMessage) | [SimpleMessage](#gid-SimpleMessage) | EchoBody method receives a simple message and returns it. | -| EchoDelete | [SimpleMessage](#gid-SimpleMessage) | [SimpleMessage](#gid-SimpleMessage) | EchoDelete method receives a simple message and returns it. | -| EchoPatch | [DynamicMessageUpdate](#gid-DynamicMessageUpdate) | [DynamicMessageUpdate](#gid-DynamicMessageUpdate) | EchoPatch method receives a NonStandardUpdateRequest and returns it. | -| EchoUnauthorized | [SimpleMessage](#gid-SimpleMessage) | [SimpleMessage](#gid-SimpleMessage) | EchoUnauthorized method receives a simple message and returns it. It must always return a google.rpc.Code of `UNAUTHENTICATED` and a HTTP Status code of 401. | - - - - - - -

Top

- -## proto/gid/id.proto - - - - - -### GenerateRequest -Generate a unique ID. Defaults to uuid. - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| type | [string](#string) | | type of id e.g uuid, shortid, snowflake (64 bit), bigflake (128 bit) | - - - - - - - - -### GenerateResponse - - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| id | [string](#string) | | the unique id generated | -| type | [string](#string) | | the type of id generated | - - - - - - - - -### Tag - - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| key | [string](#string) | | | -| value | [string](#string) | | | - - - - - - - - -### TypesRequest -List the types of IDs available. No query params needed. - - - - - - - - -### TypesResponse -TypesResponse 返回值类型 - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| types | [string](#string) | repeated | | - - - - - - - - - - - - - - -### Id -Id 生成随机ID服务 - -| Method Name | Request Type | Response Type | Description | -| ----------- | ------------ | ------------- | ------------| -| Generate | [GenerateRequest](#gid-GenerateRequest) | [GenerateResponse](#gid-GenerateResponse) | Generate 生成ID | -| Types | [TypesRequest](#gid-TypesRequest) | [TypesResponse](#gid-TypesResponse) | Types id类型 | - - - - - -## Scalar Value Types - -| .proto Type | Notes | C++ | Java | Python | Go | C# | PHP | Ruby | -| ----------- | ----- | --- | ---- | ------ | -- | -- | --- | ---- | -| double | | double | double | float | float64 | double | float | Float | -| float | | float | float | float | float32 | float | float | Float | -| int32 | Uses variable-length encoding. Inefficient for encoding negative numbers – if your field is likely to have negative values, use sint32 instead. | int32 | int | int | int32 | int | integer | Bignum or Fixnum (as required) | -| int64 | Uses variable-length encoding. Inefficient for encoding negative numbers – if your field is likely to have negative values, use sint64 instead. | int64 | long | int/long | int64 | long | integer/string | Bignum | -| uint32 | Uses variable-length encoding. | uint32 | int | int/long | uint32 | uint | integer | Bignum or Fixnum (as required) | -| uint64 | Uses variable-length encoding. | uint64 | long | int/long | uint64 | ulong | integer/string | Bignum or Fixnum (as required) | -| sint32 | Uses variable-length encoding. Signed int value. These more efficiently encode negative numbers than regular int32s. | int32 | int | int | int32 | int | integer | Bignum or Fixnum (as required) | -| sint64 | Uses variable-length encoding. Signed int value. These more efficiently encode negative numbers than regular int64s. | int64 | long | int/long | int64 | long | integer/string | Bignum | -| fixed32 | Always four bytes. More efficient than uint32 if values are often greater than 2^28. | uint32 | int | int | uint32 | uint | integer | Bignum or Fixnum (as required) | -| fixed64 | Always eight bytes. More efficient than uint64 if values are often greater than 2^56. | uint64 | long | int/long | uint64 | ulong | integer/string | Bignum | -| sfixed32 | Always four bytes. | int32 | int | int | int32 | int | integer | Bignum or Fixnum (as required) | -| sfixed64 | Always eight bytes. | int64 | long | int/long | int64 | long | integer/string | Bignum | -| bool | | bool | boolean | boolean | bool | bool | boolean | TrueClass/FalseClass | -| string | A string must always contain UTF-8 encoded or 7-bit ASCII text. | string | String | str/unicode | string | string | string | String (UTF-8) | -| bytes | May contain any arbitrary sequence of bytes. | string | ByteString | str | []byte | ByteString | string | String (ASCII-8BIT) | - diff --git a/example/docs/markdown/proto/hello/index.md b/example/docs/markdown/proto/hello/index.md deleted file mode 100644 index 9699a962b..000000000 --- a/example/docs/markdown/proto/hello/index.md +++ /dev/null @@ -1,799 +0,0 @@ -# Protocol Documentation - - -## Table of Contents - -- [proto/hello/api.proto](#proto_hello_api-proto) - - [TestApiOutput1](#hello-TestApiOutput1) - - - [TestApi](#hello-TestApi) - - [TestApiV2](#hello-TestApiV2) - -- [proto/hello/api1.proto](#proto_hello_api1-proto) - - [TestApiData](#hello-TestApiData) - - [TestApiOutput](#hello-TestApiOutput) - - [TestReq](#hello-TestReq) - - [TestReq.HeadersEntry](#hello-TestReq-HeadersEntry) - - - [PhoneType](#hello-PhoneType) - -- [proto/hello/example.proto](#proto_hello_example-proto) - - [ListUsersRequest](#hello-ListUsersRequest) - - [UpdateUserRequest](#hello-UpdateUserRequest) - - [User](#hello-User) - - [UserRole](#hello-UserRole) - - [UserRole.HeadersEntry](#hello-UserRole-HeadersEntry) - - - [Role](#hello-Role) - - - [UserService](#hello-UserService) - -- [proto/hello/helloworld.proto](#proto_hello_helloworld-proto) - - [HelloReply](#hello-HelloReply) - - [HelloRequest](#hello-HelloRequest) - - - [Greeter](#hello-Greeter) - -- [proto/hello/proto3.proto](#proto_hello_proto3-proto) - - [Proto3Message](#hello-Proto3Message) - - [Proto3Message.MapValue10Entry](#hello-Proto3Message-MapValue10Entry) - - [Proto3Message.MapValue12Entry](#hello-Proto3Message-MapValue12Entry) - - [Proto3Message.MapValue14Entry](#hello-Proto3Message-MapValue14Entry) - - [Proto3Message.MapValue15Entry](#hello-Proto3Message-MapValue15Entry) - - [Proto3Message.MapValue16Entry](#hello-Proto3Message-MapValue16Entry) - - [Proto3Message.MapValue2Entry](#hello-Proto3Message-MapValue2Entry) - - [Proto3Message.MapValue3Entry](#hello-Proto3Message-MapValue3Entry) - - [Proto3Message.MapValue4Entry](#hello-Proto3Message-MapValue4Entry) - - [Proto3Message.MapValue5Entry](#hello-Proto3Message-MapValue5Entry) - - [Proto3Message.MapValue6Entry](#hello-Proto3Message-MapValue6Entry) - - [Proto3Message.MapValue7Entry](#hello-Proto3Message-MapValue7Entry) - - [Proto3Message.MapValue8Entry](#hello-Proto3Message-MapValue8Entry) - - [Proto3Message.MapValue9Entry](#hello-Proto3Message-MapValue9Entry) - - [Proto3Message.MapValueEntry](#hello-Proto3Message-MapValueEntry) - - - [EnumValue](#hello-EnumValue) - -- [proto/hello/transport.proto](#proto_hello_transport-proto) - - [Message](#hello-Message) - - [Message.HeaderEntry](#hello-Message-HeaderEntry) - - - [Transport](#hello-Transport) - -- [Scalar Value Types](#scalar-value-types) - - - - -

Top

- -## proto/hello/api.proto - - - - - -### TestApiOutput1 - - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| data | [google.protobuf.Value](#google-protobuf-Value) | | | -| abc | [string](#string) | | | - - - - - - - - - - - - - - -### TestApi -TestApi service - -| Method Name | Request Type | Response Type | Description | -| ----------- | ------------ | ------------- | ------------| -| Version | [TestReq](#hello-TestReq) | [TestApiOutput](#hello-TestApiOutput) | Version rpc | -| Version1 | [.google.protobuf.Value](#google-protobuf-Value) | [TestApiOutput1](#hello-TestApiOutput1) | | -| VersionTest | [TestReq](#hello-TestReq) | [TestApiOutput](#hello-TestApiOutput) | VersionTest rpc | -| VersionTestCustom | [TestReq](#hello-TestReq) | [TestApiOutput](#hello-TestApiOutput) | VersionTest rpc custom | - - - - -### TestApiV2 - - -| Method Name | Request Type | Response Type | Description | -| ----------- | ------------ | ------------- | ------------| -| Version1 | [TestReq](#hello-TestReq) | [TestApiOutput](#hello-TestApiOutput) | | -| VersionTest1 | [TestReq](#hello-TestReq) | [TestApiOutput](#hello-TestApiOutput) | | - - - - - - -

Top

- -## proto/hello/api1.proto - - - - - -### TestApiData - - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| version | [string](#string) | | | -| srvVersion | [string](#string) | | | - - - - - - - - -### TestApiOutput - - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| code | [int32](#int32) | | | -| msg | [string](#string) | | | -| nowTime | [int64](#int64) | | | -| data | [TestApiData](#hello-TestApiData) | | | - - - - - - - - -### TestReq - - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| input | [string](#string) | | | -| name | [string](#string) | | | -| lists | [google.protobuf.ListValue](#google-protobuf-ListValue) | | | -| headers | [TestReq.HeadersEntry](#hello-TestReq-HeadersEntry) | repeated | | - - - - - - - - -### TestReq.HeadersEntry - - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| key | [string](#string) | | | -| value | [google.protobuf.ListValue](#google-protobuf-ListValue) | | | - - - - - - - - - - -### PhoneType -枚举消息类型 - -| Name | Number | Description | -| ---- | ------ | ----------- | -| MOBILE | 0 | proto3版本中,首成员必须为0,成员不应有相同的值 | -| HOME | 1 | | -| WORK | 2 | | - - - - - - - - - - - -

Top

- -## proto/hello/example.proto - - - - - -### ListUsersRequest - - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| created_since | [google.protobuf.Timestamp](#google-protobuf-Timestamp) | | Only list users created after this timestamp | -| older_than | [google.protobuf.Duration](#google-protobuf-Duration) | | Only list users older than this Duration | - - - - - - - - -### UpdateUserRequest - - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| user | [User](#hello-User) | | The user resource which replaces the resource on the server. | -| update_mask | [google.protobuf.FieldMask](#google-protobuf-FieldMask) | | The update mask applies to the resource. For the `FieldMask` definition, see https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask | - - - - - - - - -### User - - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| id | [uint32](#uint32) | | | -| role | [Role](#hello-Role) | | | -| create_date | [google.protobuf.Timestamp](#google-protobuf-Timestamp) | | | - - - - - - - - -### UserRole - - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| role | [Role](#hello-Role) | | | -| lists | [google.protobuf.ListValue](#google-protobuf-ListValue) | | | -| headers | [UserRole.HeadersEntry](#hello-UserRole-HeadersEntry) | repeated | | - - - - - - - - -### UserRole.HeadersEntry - - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| key | [string](#string) | | | -| value | [google.protobuf.ListValue](#google-protobuf-ListValue) | | | - - - - - - - - - - -### Role - - -| Name | Number | Description | -| ---- | ------ | ----------- | -| GUEST | 0 | | -| MEMBER | 1 | | -| ADMIN | 2 | | - - - - - - - - - -### UserService - - -| Method Name | Request Type | Response Type | Description | -| ----------- | ------------ | ------------- | ------------| -| AddUser | [User](#hello-User) | [.google.protobuf.Empty](#google-protobuf-Empty) | | -| GetUser | [User](#hello-User) | [.google.protobuf.Empty](#google-protobuf-Empty) | | -| ListUsers | [ListUsersRequest](#hello-ListUsersRequest) | [User](#hello-User) stream | | -| ListUsersByRole | [UserRole](#hello-UserRole) stream | [User](#hello-User) stream | | -| UpdateUser | [UpdateUserRequest](#hello-UpdateUserRequest) | [User](#hello-User) | | - - - - - - -

Top

- -## proto/hello/helloworld.proto - - - - - -### HelloReply - - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| message | [string](#string) | | | - - - - - - - - -### HelloRequest - - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| name | [string](#string) | | | -| strVal | [google.protobuf.StringValue](#google-protobuf-StringValue) | | | -| floatVal | [google.protobuf.FloatValue](#google-protobuf-FloatValue) | | | -| doubleVal | [google.protobuf.DoubleValue](#google-protobuf-DoubleValue) | | | -| boolVal | [google.protobuf.BoolValue](#google-protobuf-BoolValue) | | | -| bytesVal | [google.protobuf.BytesValue](#google-protobuf-BytesValue) | | | -| int32Val | [google.protobuf.Int32Value](#google-protobuf-Int32Value) | | | -| uint32Val | [google.protobuf.UInt32Value](#google-protobuf-UInt32Value) | | | -| int64Val | [google.protobuf.Int64Value](#google-protobuf-Int64Value) | | | -| uint64Val | [google.protobuf.UInt64Value](#google-protobuf-UInt64Value) | | | - - - - - - - - - - - - - - -### Greeter - - -| Method Name | Request Type | Response Type | Description | -| ----------- | ------------ | ------------- | ------------| -| SayHello | [HelloRequest](#hello-HelloRequest) | [HelloReply](#hello-HelloReply) | | - - - - - - -

Top

- -## proto/hello/proto3.proto - - - - - -### Proto3Message - - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| nested | [Proto3Message](#hello-Proto3Message) | | Next number: 46 | -| float_value | [float](#float) | | | -| double_value | [double](#double) | | | -| int64_value | [int64](#int64) | | | -| int32_value | [int32](#int32) | | | -| uint64_value | [uint64](#uint64) | | | -| uint32_value | [uint32](#uint32) | | | -| bool_value | [bool](#bool) | | | -| string_value | [string](#string) | | | -| bytes_value | [bytes](#bytes) | | | -| repeated_value | [string](#string) | repeated | | -| repeated_message | [google.protobuf.UInt64Value](#google-protobuf-UInt64Value) | repeated | | -| enum_value | [EnumValue](#hello-EnumValue) | | | -| repeated_enum | [EnumValue](#hello-EnumValue) | repeated | | -| timestamp_value | [google.protobuf.Timestamp](#google-protobuf-Timestamp) | | | -| duration_value | [google.protobuf.Duration](#google-protobuf-Duration) | | | -| fieldmask_value | [google.protobuf.FieldMask](#google-protobuf-FieldMask) | | | -| oneof_bool_value | [bool](#bool) | | | -| oneof_string_value | [string](#string) | | | -| wrapper_double_value | [google.protobuf.DoubleValue](#google-protobuf-DoubleValue) | | | -| wrapper_float_value | [google.protobuf.FloatValue](#google-protobuf-FloatValue) | | | -| wrapper_int64_value | [google.protobuf.Int64Value](#google-protobuf-Int64Value) | | | -| wrapper_int32_value | [google.protobuf.Int32Value](#google-protobuf-Int32Value) | | | -| wrapper_u_int64_value | [google.protobuf.UInt64Value](#google-protobuf-UInt64Value) | | | -| wrapper_u_int32_value | [google.protobuf.UInt32Value](#google-protobuf-UInt32Value) | | | -| wrapper_bool_value | [google.protobuf.BoolValue](#google-protobuf-BoolValue) | | | -| wrapper_string_value | [google.protobuf.StringValue](#google-protobuf-StringValue) | | | -| wrapper_bytes_value | [google.protobuf.BytesValue](#google-protobuf-BytesValue) | | | -| map_value | [Proto3Message.MapValueEntry](#hello-Proto3Message-MapValueEntry) | repeated | | -| map_value2 | [Proto3Message.MapValue2Entry](#hello-Proto3Message-MapValue2Entry) | repeated | | -| map_value3 | [Proto3Message.MapValue3Entry](#hello-Proto3Message-MapValue3Entry) | repeated | | -| map_value4 | [Proto3Message.MapValue4Entry](#hello-Proto3Message-MapValue4Entry) | repeated | | -| map_value5 | [Proto3Message.MapValue5Entry](#hello-Proto3Message-MapValue5Entry) | repeated | | -| map_value6 | [Proto3Message.MapValue6Entry](#hello-Proto3Message-MapValue6Entry) | repeated | | -| map_value7 | [Proto3Message.MapValue7Entry](#hello-Proto3Message-MapValue7Entry) | repeated | | -| map_value8 | [Proto3Message.MapValue8Entry](#hello-Proto3Message-MapValue8Entry) | repeated | | -| map_value9 | [Proto3Message.MapValue9Entry](#hello-Proto3Message-MapValue9Entry) | repeated | | -| map_value10 | [Proto3Message.MapValue10Entry](#hello-Proto3Message-MapValue10Entry) | repeated | | -| map_value12 | [Proto3Message.MapValue12Entry](#hello-Proto3Message-MapValue12Entry) | repeated | | -| map_value14 | [Proto3Message.MapValue14Entry](#hello-Proto3Message-MapValue14Entry) | repeated | | -| map_value15 | [Proto3Message.MapValue15Entry](#hello-Proto3Message-MapValue15Entry) | repeated | | -| map_value16 | [Proto3Message.MapValue16Entry](#hello-Proto3Message-MapValue16Entry) | repeated | | -| details | [google.protobuf.Any](#google-protobuf-Any) | repeated | | - - - - - - - - -### Proto3Message.MapValue10Entry - - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| key | [string](#string) | | | -| value | [float](#float) | | | - - - - - - - - -### Proto3Message.MapValue12Entry - - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| key | [string](#string) | | | -| value | [double](#double) | | | - - - - - - - - -### Proto3Message.MapValue14Entry - - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| key | [string](#string) | | | -| value | [bool](#bool) | | | - - - - - - - - -### Proto3Message.MapValue15Entry - - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| key | [bool](#bool) | | | -| value | [string](#string) | | | - - - - - - - - -### Proto3Message.MapValue16Entry - - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| key | [string](#string) | | | -| value | [google.protobuf.UInt64Value](#google-protobuf-UInt64Value) | | | - - - - - - - - -### Proto3Message.MapValue2Entry - - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| key | [string](#string) | | | -| value | [int32](#int32) | | | - - - - - - - - -### Proto3Message.MapValue3Entry - - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| key | [int32](#int32) | | | -| value | [string](#string) | | | - - - - - - - - -### Proto3Message.MapValue4Entry - - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| key | [string](#string) | | | -| value | [int64](#int64) | | | - - - - - - - - -### Proto3Message.MapValue5Entry - - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| key | [int64](#int64) | | | -| value | [string](#string) | | | - - - - - - - - -### Proto3Message.MapValue6Entry - - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| key | [string](#string) | | | -| value | [uint32](#uint32) | | | - - - - - - - - -### Proto3Message.MapValue7Entry - - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| key | [uint32](#uint32) | | | -| value | [string](#string) | | | - - - - - - - - -### Proto3Message.MapValue8Entry - - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| key | [string](#string) | | | -| value | [uint64](#uint64) | | | - - - - - - - - -### Proto3Message.MapValue9Entry - - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| key | [uint64](#uint64) | | | -| value | [string](#string) | | | - - - - - - - - -### Proto3Message.MapValueEntry - - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| key | [string](#string) | | | -| value | [string](#string) | | | - - - - - - - - - - -### EnumValue - - -| Name | Number | Description | -| ---- | ------ | ----------- | -| X | 0 | | -| Y | 1 | | -| Z | 2 | | - - - - - - - - - - - -

Top

- -## proto/hello/transport.proto - - - - - -### Message - - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| header | [Message.HeaderEntry](#hello-Message-HeaderEntry) | repeated | | -| body | [bytes](#bytes) | | | - - - - - - - - -### Message.HeaderEntry - - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| key | [string](#string) | | | -| value | [string](#string) | | | - - - - - - - - - - - - - - -### Transport - - -| Method Name | Request Type | Response Type | Description | -| ----------- | ------------ | ------------- | ------------| -| TestStream | [Message](#hello-Message) stream | [Message](#hello-Message) stream | | -| TestStream1 | [Message](#hello-Message) stream | [Message](#hello-Message) | | -| TestStream2 | [Message](#hello-Message) | [Message](#hello-Message) stream | | -| TestStream3 | [Message](#hello-Message) | [Message](#hello-Message) | | - - - - - -## Scalar Value Types - -| .proto Type | Notes | C++ | Java | Python | Go | C# | PHP | Ruby | -| ----------- | ----- | --- | ---- | ------ | -- | -- | --- | ---- | -| double | | double | double | float | float64 | double | float | Float | -| float | | float | float | float | float32 | float | float | Float | -| int32 | Uses variable-length encoding. Inefficient for encoding negative numbers – if your field is likely to have negative values, use sint32 instead. | int32 | int | int | int32 | int | integer | Bignum or Fixnum (as required) | -| int64 | Uses variable-length encoding. Inefficient for encoding negative numbers – if your field is likely to have negative values, use sint64 instead. | int64 | long | int/long | int64 | long | integer/string | Bignum | -| uint32 | Uses variable-length encoding. | uint32 | int | int/long | uint32 | uint | integer | Bignum or Fixnum (as required) | -| uint64 | Uses variable-length encoding. | uint64 | long | int/long | uint64 | ulong | integer/string | Bignum or Fixnum (as required) | -| sint32 | Uses variable-length encoding. Signed int value. These more efficiently encode negative numbers than regular int32s. | int32 | int | int | int32 | int | integer | Bignum or Fixnum (as required) | -| sint64 | Uses variable-length encoding. Signed int value. These more efficiently encode negative numbers than regular int64s. | int64 | long | int/long | int64 | long | integer/string | Bignum | -| fixed32 | Always four bytes. More efficient than uint32 if values are often greater than 2^28. | uint32 | int | int | uint32 | uint | integer | Bignum or Fixnum (as required) | -| fixed64 | Always eight bytes. More efficient than uint64 if values are often greater than 2^56. | uint64 | long | int/long | uint64 | ulong | integer/string | Bignum | -| sfixed32 | Always four bytes. | int32 | int | int | int32 | int | integer | Bignum or Fixnum (as required) | -| sfixed64 | Always eight bytes. | int64 | long | int/long | int64 | long | integer/string | Bignum | -| bool | | bool | boolean | boolean | bool | bool | boolean | TrueClass/FalseClass | -| string | A string must always contain UTF-8 encoded or 7-bit ASCII text. | string | String | str/unicode | string | string | string | String (UTF-8) | -| bytes | May contain any arbitrary sequence of bytes. | string | ByteString | str | []byte | ByteString | string | String (ASCII-8BIT) | - diff --git a/example/docs/markdown/proto/login/index.md b/example/docs/markdown/proto/login/index.md deleted file mode 100644 index 297febe8c..000000000 --- a/example/docs/markdown/proto/login/index.md +++ /dev/null @@ -1,986 +0,0 @@ -# Protocol Documentation - - -## Table of Contents - -- [proto/login/bind.proto](#proto_login_bind-proto) - - [AutomaticBindRequest](#login-AutomaticBindRequest) - - [AutomaticBindResponse](#login-AutomaticBindResponse) - - [BindChangeRequest](#login-BindChangeRequest) - - [BindChangeResponse](#login-BindChangeResponse) - - [BindData](#login-BindData) - - [BindPhoneParseByOneClickRequest](#login-BindPhoneParseByOneClickRequest) - - [BindPhoneParseByOneClickResponse](#login-BindPhoneParseByOneClickResponse) - - [BindPhoneParseByOneClickResponse.DataEntry](#login-BindPhoneParseByOneClickResponse-DataEntry) - - [BindPhoneParseRequest](#login-BindPhoneParseRequest) - - [BindPhoneParseResponse](#login-BindPhoneParseResponse) - - [BindPhoneParseResponse.DataEntry](#login-BindPhoneParseResponse-DataEntry) - - [BindVerifyRequest](#login-BindVerifyRequest) - - [BindVerifyResponse](#login-BindVerifyResponse) - - [BindVerifyResponse.DataEntry](#login-BindVerifyResponse-DataEntry) - - [CheckRequest](#login-CheckRequest) - - [CheckResponse](#login-CheckResponse) - - [CheckResponse.DataEntry](#login-CheckResponse-DataEntry) - - - [BindTelephone](#login-BindTelephone) - -- [proto/login/code.proto](#proto_login_code-proto) - - [GetSendStatusRequest](#login-GetSendStatusRequest) - - [GetSendStatusResponse](#login-GetSendStatusResponse) - - [IsCheckImageCodeRequest](#login-IsCheckImageCodeRequest) - - [IsCheckImageCodeResponse](#login-IsCheckImageCodeResponse) - - [SendCodeRequest](#login-SendCodeRequest) - - [SendCodeResponse](#login-SendCodeResponse) - - [SendCodeResponse.DataEntry](#login-SendCodeResponse-DataEntry) - - [SendStatus](#login-SendStatus) - - [VerifyImageCodeRequest](#login-VerifyImageCodeRequest) - - [VerifyImageCodeResponse](#login-VerifyImageCodeResponse) - - [VerifyRequest](#login-VerifyRequest) - - [VerifyResponse](#login-VerifyResponse) - - [VerifyResponse.DataEntry](#login-VerifyResponse-DataEntry) - - - [Code](#login-Code) - -- [proto/login/login.proto](#proto_login_login-proto) - - [AuthenticateRequest](#login-AuthenticateRequest) - - [AuthenticateRequest.CredentialsEntry](#login-AuthenticateRequest-CredentialsEntry) - - [AuthenticateResponse](#login-AuthenticateResponse) - - [Credentials](#login-Credentials) - - [Data](#login-Data) - - [LoginRequest](#login-LoginRequest) - - [LoginRequest.DataEntry](#login-LoginRequest-DataEntry) - - [LoginResponse](#login-LoginResponse) - - [PlatformInfo](#login-PlatformInfo) - - - [Login](#login-Login) - -- [proto/login/merge.proto](#proto_login_merge-proto) - - [Reply](#login-Reply) - - [Reply.DataEntry](#login-Reply-DataEntry) - - [TelephoneRequest](#login-TelephoneRequest) - - [WeChatRequest](#login-WeChatRequest) - - [WeChatUnMergeRequest](#login-WeChatUnMergeRequest) - - - [Merge](#login-Merge) - -- [Scalar Value Types](#scalar-value-types) - - - - -

Top

- -## proto/login/bind.proto - - - - - -### AutomaticBindRequest - - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| nationCode | [string](#string) | | 区号 | -| telephone | [string](#string) | | 手机号 | -| uid | [int64](#int64) | | uid | -| origin | [string](#string) | | 前缀,通常为空,抖音必须为DY- | - - - - - - - - -### AutomaticBindResponse - - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| code | [int64](#int64) | | code | -| msg | [string](#string) | | 消息 | -| nowTime | [int64](#int64) | | 时间戳 | -| data | [BindData](#login-BindData) | | 数据 | - - - - - - - - -### BindChangeRequest - - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| nationCode | [string](#string) | | 区号 | -| telephone | [string](#string) | | 手机号 | -| uid | [int64](#int64) | | uid | -| code | [string](#string) | | 验证码 | -| origin | [string](#string) | | 前缀,通常为空,抖音必须为DY- | - - - - - - - - -### BindChangeResponse - - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| code | [int64](#int64) | | code | -| msg | [string](#string) | | msg | -| nowTime | [int64](#int64) | | 时间戳 | -| data | [BindData](#login-BindData) | | 数据 | - - - - - - - - -### BindData - - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| bindId | [int64](#int64) | | uid | - - - - - - - - -### BindPhoneParseByOneClickRequest - - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| code | [string](#string) | | 用于解析手机号加密数据 | -| platformId | [int64](#int64) | | platformId | -| telephone | [string](#string) | | telephone 有手机号即验证手机号 | - - - - - - - - -### BindPhoneParseByOneClickResponse - - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| code | [int64](#int64) | | code | -| msg | [string](#string) | | 消息 | -| nowTime | [int64](#int64) | | 时间戳 | -| data | [BindPhoneParseByOneClickResponse.DataEntry](#login-BindPhoneParseByOneClickResponse-DataEntry) | repeated | 数据 | - - - - - - - - -### BindPhoneParseByOneClickResponse.DataEntry - - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| key | [string](#string) | | | -| value | [string](#string) | | | - - - - - - - - -### BindPhoneParseRequest - - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| code | [string](#string) | | 用于解析手机号加密数据 | -| encryptedData | [string](#string) | | 用于解析手机号加密数据 | -| iv | [string](#string) | | 用于解析手机号加密数据 | -| platformId | [int64](#int64) | | platformId | -| uid | [int64](#int64) | | uid,有uid的情况下不使用code | - - - - - - - - -### BindPhoneParseResponse - - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| code | [int64](#int64) | | code | -| msg | [string](#string) | | 消息 | -| nowTime | [int64](#int64) | | 时间戳 | -| data | [BindPhoneParseResponse.DataEntry](#login-BindPhoneParseResponse-DataEntry) | repeated | 数据 | - - - - - - - - -### BindPhoneParseResponse.DataEntry - - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| key | [string](#string) | | | -| value | [string](#string) | | | - - - - - - - - -### BindVerifyRequest - - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| nationCode | [string](#string) | | 区号 | -| telephone | [string](#string) | | 手机号 | -| uid | [int64](#int64) | | uid | -| code | [string](#string) | | 验证码 | -| origin | [string](#string) | | 前缀,通常为空,抖音必须为DY- | - - - - - - - - -### BindVerifyResponse - - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| code | [int64](#int64) | | code | -| msg | [string](#string) | | 消息 | -| nowTime | [int64](#int64) | | 时间戳 | -| data | [BindVerifyResponse.DataEntry](#login-BindVerifyResponse-DataEntry) | repeated | 数据 | - - - - - - - - -### BindVerifyResponse.DataEntry - - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| key | [string](#string) | | | -| value | [string](#string) | | | - - - - - - - - -### CheckRequest - - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| nationCode | [string](#string) | | 区号 | -| telephone | [string](#string) | | 手机号 | -| uid | [int64](#int64) | | uid | -| origin | [string](#string) | | 前缀,通常为空,抖音必须为DY- | - - - - - - - - -### CheckResponse - - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| code | [int64](#int64) | | code,不为0为错误 | -| msg | [string](#string) | | 错误信息 | -| nowTime | [int64](#int64) | | 时间戳 | -| data | [CheckResponse.DataEntry](#login-CheckResponse-DataEntry) | repeated | 数据 | - - - - - - - - -### CheckResponse.DataEntry - - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| key | [string](#string) | | | -| value | [string](#string) | | | - - - - - - - - - - - - - - -### BindTelephone -绑定手机号 - -| Method Name | Request Type | Response Type | Description | -| ----------- | ------------ | ------------- | ------------| -| Check | [CheckRequest](#login-CheckRequest) | [CheckResponse](#login-CheckResponse) | 检查是否可以绑定 | -| BindVerify | [BindVerifyRequest](#login-BindVerifyRequest) | [BindVerifyResponse](#login-BindVerifyResponse) | 通过验证码,校验手机号是否可以接收验证码 | -| BindChange | [BindChangeRequest](#login-BindChangeRequest) | [BindChangeResponse](#login-BindChangeResponse) | 通过验证码,进行手机号绑定,换绑 | -| AutomaticBind | [AutomaticBindRequest](#login-AutomaticBindRequest) | [AutomaticBindResponse](#login-AutomaticBindResponse) | 手机号绑定,不通过验证码 | -| BindPhoneParse | [BindPhoneParseRequest](#login-BindPhoneParseRequest) | [BindPhoneParseResponse](#login-BindPhoneParseResponse) | 绑定手机号解析,通过第三方小程序code换取手机号 | -| BindPhoneParseByOneClick | [BindPhoneParseByOneClickRequest](#login-BindPhoneParseByOneClickRequest) | [BindPhoneParseByOneClickResponse](#login-BindPhoneParseByOneClickResponse) | 绑定手机号解析,通过阿里一键 | - - - - - - -

Top

- -## proto/login/code.proto - - - - - -### GetSendStatusRequest - - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| nationCode | [string](#string) | | 区号 | -| telephone | [string](#string) | | 手机号 | -| sendType | [string](#string) | | 发送类型 | -| template | [string](#string) | | 模板 | -| signR | [int64](#int64) | | 是否越狱标示 | -| ip | [string](#string) | | ip | - - - - - - - - -### GetSendStatusResponse - - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| code | [int64](#int64) | | code | -| msg | [string](#string) | | msg | -| nowTime | [int64](#int64) | | 时间戳 | -| data | [SendStatus](#login-SendStatus) | | 数据 | - - - - - - - - -### IsCheckImageCodeRequest - - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| nationCode | [string](#string) | | 区号 | -| telephone | [string](#string) | | 手机号 | -| scene | [string](#string) | | 场景 | - - - - - - - - -### IsCheckImageCodeResponse - - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| code | [int64](#int64) | | code | -| msg | [string](#string) | | msg | -| nowTime | [int64](#int64) | | 时间戳 | -| data | [bool](#bool) | | 数据 | - - - - - - - - -### SendCodeRequest - - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| nationCode | [string](#string) | | 区号 | -| telephone | [string](#string) | | 电话 | -| sendType | [string](#string) | | 发送类型,call ,sms | -| ip | [string](#string) | | ip | -| template | [string](#string) | | 模板 | - - - - - - - - -### SendCodeResponse - - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| code | [int64](#int64) | | code | -| msg | [string](#string) | | msg | -| nowTime | [int64](#int64) | | 时间戳 | -| data | [SendCodeResponse.DataEntry](#login-SendCodeResponse-DataEntry) | repeated | 数据 | - - - - - - - - -### SendCodeResponse.DataEntry - - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| key | [string](#string) | | | -| value | [string](#string) | | | - - - - - - - - -### SendStatus - - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| needImageCode | [bool](#bool) | | 需要图形验证码 | -| forceCall | [bool](#bool) | | 强制语音 | -| isForbidden | [bool](#bool) | | 被禁止 | -| numberLimit | [bool](#bool) | | 数量超限制 | - - - - - - - - -### VerifyImageCodeRequest - - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| nationCode | [string](#string) | | 区号 | -| telephone | [string](#string) | | 手机号 | -| ticket | [string](#string) | | 图形验证码ticket | -| randStr | [string](#string) | | 图形验证码randStr | -| ip | [string](#string) | | 图形验证码ip | -| scene | [string](#string) | | 场景 | - - - - - - - - -### VerifyImageCodeResponse - - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| code | [int64](#int64) | | code | -| msg | [string](#string) | | msg | -| nowTime | [int64](#int64) | | 时间戳 | - - - - - - - - -### VerifyRequest - - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| nationCode | [string](#string) | | 区号 | -| telephone | [string](#string) | | 手机号 | -| code | [string](#string) | | 验证码 | -| template | [string](#string) | | 模板 | - - - - - - - - -### VerifyResponse - - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| code | [int64](#int64) | | code | -| msg | [string](#string) | | msg | -| nowTime | [int64](#int64) | | 时间戳 | -| data | [VerifyResponse.DataEntry](#login-VerifyResponse-DataEntry) | repeated | 数据 | - - - - - - - - -### VerifyResponse.DataEntry - - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| key | [string](#string) | | | -| value | [string](#string) | | | - - - - - - - - - - - - - - -### Code -验证码 - -| Method Name | Request Type | Response Type | Description | -| ----------- | ------------ | ------------- | ------------| -| SendCode | [SendCodeRequest](#login-SendCodeRequest) | [SendCodeResponse](#login-SendCodeResponse) | 发送 | -| Verify | [VerifyRequest](#login-VerifyRequest) | [VerifyResponse](#login-VerifyResponse) | 校验 | -| IsCheckImageCode | [IsCheckImageCodeRequest](#login-IsCheckImageCodeRequest) | [IsCheckImageCodeResponse](#login-IsCheckImageCodeResponse) | 是否校验图片验证码 | -| VerifyImageCode | [VerifyImageCodeRequest](#login-VerifyImageCodeRequest) | [VerifyImageCodeResponse](#login-VerifyImageCodeResponse) | 校验图片验证码 | -| GetSendStatus | [GetSendStatusRequest](#login-GetSendStatusRequest) | [GetSendStatusResponse](#login-GetSendStatusResponse) | 获取发送状态 | - - - - - - -

Top

- -## proto/login/login.proto - - - - - -### AuthenticateRequest - - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| credentials | [AuthenticateRequest.CredentialsEntry](#login-AuthenticateRequest-CredentialsEntry) | repeated | 凭证,cookie:string or token:sting | - - - - - - - - -### AuthenticateRequest.CredentialsEntry - - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| key | [string](#string) | | | -| value | [string](#string) | | | - - - - - - - - -### AuthenticateResponse - - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| code | [int64](#int64) | | 错误码,0 为正常 | -| msg | [string](#string) | | 错误信息 | -| nowTime | [int64](#int64) | | 请求响应时间戳 | -| data | [Data](#login-Data) | | 数据 | - - - - - - - - -### Credentials - - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| uid | [int64](#int64) | | userinfoId 对应 bindId | -| uri | [string](#string) | | uri | -| openid | [string](#string) | | openid | -| isNew | [bool](#bool) | | isNew | -| isFirstRegister | [bool](#bool) | | 是否首次注册 | -| isBindTelephone | [bool](#bool) | | 是否绑定手机号 | -| platformInfo | [PlatformInfo](#login-PlatformInfo) | | platformId | - - - - - - - - -### Data - - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| uid | [int64](#int64) | | userinfoId | -| uri | [string](#string) | | uri | -| nickname | [string](#string) | | 个人昵称,没有店铺昵称覆盖逻辑 | -| headImgUrl | [string](#string) | | 个人头像,没有店铺头像覆盖逻辑 | -| signature | [string](#string) | | 签名 | -| sex | [int64](#int64) | | 性别, 性别 0未知,1男,2女 | -| region | [string](#string) | | 区域 | -| country | [string](#string) | | 国家 | -| province | [string](#string) | | 省市 | -| city | [string](#string) | | 城市 | -| lang | [string](#string) | | 语言类型,默认 "" | -| createTime | [int64](#int64) | | 注册时间戳 | -| modifyTime | [int64](#int64) | | 更新时间戳 | -| currentlyLoggedPlatformId | [int64](#int64) | | 当前登录平台id ,对应 center 表 type 字段 | - - - - - - - - -### LoginRequest - - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| platformId | [int64](#int64) | | 平台id ,对应 center 表 type 字段 | -| data | [LoginRequest.DataEntry](#login-LoginRequest-DataEntry) | repeated | 登录相关信息,json,手机号登录参数 UserType int64 `json:"userType"` VerifyType string `json:"verifyType"` NationCode string `json:"nationCode"` Telephone string `json:"telephone"` Code string `json:"code"` LoginToken string `json:"loginToken"` DeviceId string `json:"deviceId"` SysMessageNum int64 `json:"sysMessageNum"` | -| scope | [string](#string) | | 凭据类型,普通用户 base, 特权?超级? super | - - - - - - - - -### LoginRequest.DataEntry - - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| key | [string](#string) | | | -| value | [string](#string) | | | - - - - - - - - -### LoginResponse - - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| code | [int64](#int64) | | 错误码,0 为正常 | -| msg | [string](#string) | | 错误信息 | -| nowTime | [int64](#int64) | | 请求响应时间戳 | -| data | [Credentials](#login-Credentials) | | 数据 | - - - - - - - - -### PlatformInfo - - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| platformId | [int64](#int64) | | platformId | -| originalUid | [int64](#int64) | | originalId 原始ID,platformId 对应的user | -| originalUri | [string](#string) | | originalUri 原始uri,platformId 对应的user | -| originalOpenid | [string](#string) | | originalOpenid 原始openid,platformId 对应的user | - - - - - - - - - - - - - - -### Login -统一登录入口 - -| Method Name | Request Type | Response Type | Description | -| ----------- | ------------ | ------------- | ------------| -| Login | [LoginRequest](#login-LoginRequest) | [LoginResponse](#login-LoginResponse) | 登录注册获取凭证,cookie,token | -| Authenticate | [AuthenticateRequest](#login-AuthenticateRequest) | [AuthenticateResponse](#login-AuthenticateResponse) | 使用凭证获取用户信息 | - - - - - - -

Top

- -## proto/login/merge.proto - - - - - -### Reply - - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| code | [int64](#int64) | | code | -| msg | [string](#string) | | msg | -| nowTime | [int64](#int64) | | 时间戳 | -| data | [Reply.DataEntry](#login-Reply-DataEntry) | repeated | 数据 | - - - - - - - - -### Reply.DataEntry - - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| key | [string](#string) | | | -| value | [string](#string) | | | - - - - - - - - -### TelephoneRequest - - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| uid | [int64](#int64) | | 登陆用户 | -| targetTelephone | [string](#string) | | 新手机号 | -| isNewProcess | [bool](#bool) | | 是否走新流程 | - - - - - - - - -### WeChatRequest - - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| uid | [int64](#int64) | | 登陆用户 | -| targetUid | [int64](#int64) | | 要合并的用户 | - - - - - - - - -### WeChatUnMergeRequest - - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| uid | [int64](#int64) | | 登陆用户 | - - - - - - - - - - - - - - -### Merge -账户合并 - -| Method Name | Request Type | Response Type | Description | -| ----------- | ------------ | ------------- | ------------| -| Telephone | [TelephoneRequest](#login-TelephoneRequest) | [Reply](#login-Reply) | 手机号合并,换绑,手机号更换 | -| TelephoneCheck | [TelephoneRequest](#login-TelephoneRequest) | [Reply](#login-Reply) | 手机号账户合并检查 | -| WeChat | [WeChatRequest](#login-WeChatRequest) | [Reply](#login-Reply) | 微信账户绑定 | -| WeChatCheck | [WeChatRequest](#login-WeChatRequest) | [Reply](#login-Reply) | 微信合并检查 | -| WeChatUnMerge | [WeChatUnMergeRequest](#login-WeChatUnMergeRequest) | [Reply](#login-Reply) | 解除微信绑定, 必须拥有手机号 | - - - - - -## Scalar Value Types - -| .proto Type | Notes | C++ | Java | Python | Go | C# | PHP | Ruby | -| ----------- | ----- | --- | ---- | ------ | -- | -- | --- | ---- | -| double | | double | double | float | float64 | double | float | Float | -| float | | float | float | float | float32 | float | float | Float | -| int32 | Uses variable-length encoding. Inefficient for encoding negative numbers – if your field is likely to have negative values, use sint32 instead. | int32 | int | int | int32 | int | integer | Bignum or Fixnum (as required) | -| int64 | Uses variable-length encoding. Inefficient for encoding negative numbers – if your field is likely to have negative values, use sint64 instead. | int64 | long | int/long | int64 | long | integer/string | Bignum | -| uint32 | Uses variable-length encoding. | uint32 | int | int/long | uint32 | uint | integer | Bignum or Fixnum (as required) | -| uint64 | Uses variable-length encoding. | uint64 | long | int/long | uint64 | ulong | integer/string | Bignum or Fixnum (as required) | -| sint32 | Uses variable-length encoding. Signed int value. These more efficiently encode negative numbers than regular int32s. | int32 | int | int | int32 | int | integer | Bignum or Fixnum (as required) | -| sint64 | Uses variable-length encoding. Signed int value. These more efficiently encode negative numbers than regular int64s. | int64 | long | int/long | int64 | long | integer/string | Bignum | -| fixed32 | Always four bytes. More efficient than uint32 if values are often greater than 2^28. | uint32 | int | int | uint32 | uint | integer | Bignum or Fixnum (as required) | -| fixed64 | Always eight bytes. More efficient than uint64 if values are often greater than 2^56. | uint64 | long | int/long | uint64 | ulong | integer/string | Bignum | -| sfixed32 | Always four bytes. | int32 | int | int | int32 | int | integer | Bignum or Fixnum (as required) | -| sfixed64 | Always eight bytes. | int64 | long | int/long | int64 | long | integer/string | Bignum | -| bool | | bool | boolean | boolean | bool | bool | boolean | TrueClass/FalseClass | -| string | A string must always contain UTF-8 encoded or 7-bit ASCII text. | string | String | str/unicode | string | string | string | String (UTF-8) | -| bytes | May contain any arbitrary sequence of bytes. | string | ByteString | str | []byte | ByteString | string | String (ASCII-8BIT) | - diff --git a/example/docs/markdown/proto/sqlx/index.md b/example/docs/markdown/proto/sqlx/index.md deleted file mode 100644 index e5af18ccb..000000000 --- a/example/docs/markdown/proto/sqlx/index.md +++ /dev/null @@ -1,311 +0,0 @@ -# Protocol Documentation - - -## Table of Contents - -- [proto/sqlx/code.proto](#proto_sqlx_code-proto) - - [GetSendStatusRequest](#hello-v1-sqlx-GetSendStatusRequest) - - [GetSendStatusResponse](#hello-v1-sqlx-GetSendStatusResponse) - - [IsCheckImageCodeRequest](#hello-v1-sqlx-IsCheckImageCodeRequest) - - [IsCheckImageCodeResponse](#hello-v1-sqlx-IsCheckImageCodeResponse) - - [SendCodeRequest](#hello-v1-sqlx-SendCodeRequest) - - [SendCodeResponse](#hello-v1-sqlx-SendCodeResponse) - - [SendCodeResponse.DataEntry](#hello-v1-sqlx-SendCodeResponse-DataEntry) - - [SendStatus](#hello-v1-sqlx-SendStatus) - - [VerifyImageCodeRequest](#hello-v1-sqlx-VerifyImageCodeRequest) - - [VerifyImageCodeResponse](#hello-v1-sqlx-VerifyImageCodeResponse) - - [VerifyRequest](#hello-v1-sqlx-VerifyRequest) - - [VerifyResponse](#hello-v1-sqlx-VerifyResponse) - - [VerifyResponse.DataEntry](#hello-v1-sqlx-VerifyResponse-DataEntry) - - - [Code](#hello-v1-sqlx-Code) - -- [Scalar Value Types](#scalar-value-types) - - - - -

Top

- -## proto/sqlx/code.proto - - - - - -### GetSendStatusRequest - - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| nationCode | [string](#string) | | 区号 | -| telephone | [string](#string) | | 手机号 | -| sendType | [string](#string) | | 发送类型 | -| template | [string](#string) | | 模板 | -| signR | [int64](#int64) | | 是否越狱标示 | -| ip | [string](#string) | | ip | - - - - - - - - -### GetSendStatusResponse - - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| code | [int64](#int64) | | code | -| msg | [string](#string) | | msg | -| nowTime | [int64](#int64) | | 时间戳 | -| data | [SendStatus](#hello-v1-sqlx-SendStatus) | | 数据 | - - - - - - - - -### IsCheckImageCodeRequest - - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| nationCode | [string](#string) | | 区号 | -| telephone | [string](#string) | | 手机号 | -| scene | [string](#string) | | 场景 | - - - - - - - - -### IsCheckImageCodeResponse - - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| code | [int64](#int64) | | code | -| msg | [string](#string) | | msg | -| nowTime | [int64](#int64) | | 时间戳 | -| data | [bool](#bool) | | 数据 | - - - - - - - - -### SendCodeRequest - - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| nationCode | [string](#string) | | 区号 | -| a | [string](#string) | | | -| telephone | [string](#string) | | 电话 | -| sendType | [string](#string) | | 发送类型,call ,sms | -| ip | [string](#string) | | ip - -模板 string template = 5; | - - - - - - - - -### SendCodeResponse - - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| code | [int64](#int64) | | code | -| msg | [string](#string) | | msg | -| nowTime | [int64](#int64) | | 时间戳 @gotags: valid:"ip" custom_tag:"custom_value" | -| data | [SendCodeResponse.DataEntry](#hello-v1-sqlx-SendCodeResponse-DataEntry) | repeated | 数据 | - - - - - - - - -### SendCodeResponse.DataEntry - - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| key | [string](#string) | | | -| value | [string](#string) | | | - - - - - - - - -### SendStatus - - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| needImageCode | [bool](#bool) | | 需要图形验证码 | -| forceCall | [bool](#bool) | | 强制语音 | -| isForbidden | [bool](#bool) | | 被禁止 | -| numberLimit | [bool](#bool) | | 数量超限制 | - - - - - - - - -### VerifyImageCodeRequest - - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| nationCode | [string](#string) | | 区号 | -| telephone | [string](#string) | | 手机号 | -| ticket | [string](#string) | | 图形验证码ticket | -| randStr | [string](#string) | | 图形验证码randStr | -| ip | [string](#string) | | 图形验证码ip | -| scene | [string](#string) | | 场景 | - - - - - - - - -### VerifyImageCodeResponse - - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| code | [int64](#int64) | | code | -| msg | [string](#string) | | msg | -| nowTime | [int64](#int64) | | 时间戳 | - - - - - - - - -### VerifyRequest - - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| nationCode | [string](#string) | | 区号 | -| telephone | [string](#string) | | 手机号 | -| code | [string](#string) | | 验证码 | -| template | [string](#string) | | 模板 | - - - - - - - - -### VerifyResponse - - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| code | [int64](#int64) | | code | -| msg | [string](#string) | | msg | -| nowTime | [int64](#int64) | | 时间戳 | -| data | [VerifyResponse.DataEntry](#hello-v1-sqlx-VerifyResponse-DataEntry) | repeated | 数据 | - - - - - - - - -### VerifyResponse.DataEntry - - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| key | [string](#string) | | | -| value | [string](#string) | | | - - - - - - - - - - - - - - -### Code -验证码 - -| Method Name | Request Type | Response Type | Description | -| ----------- | ------------ | ------------- | ------------| -| SendCode | [SendCodeRequest](#hello-v1-sqlx-SendCodeRequest) | [SendCodeResponse](#hello-v1-sqlx-SendCodeResponse) | 发送 | -| Verify | [VerifyRequest](#hello-v1-sqlx-VerifyRequest) | [VerifyResponse](#hello-v1-sqlx-VerifyResponse) | 校验 | -| IsCheckImageCode | [IsCheckImageCodeRequest](#hello-v1-sqlx-IsCheckImageCodeRequest) | [IsCheckImageCodeResponse](#hello-v1-sqlx-IsCheckImageCodeResponse) | 是否校验图片验证码 | -| VerifyImageCode | [VerifyImageCodeRequest](#hello-v1-sqlx-VerifyImageCodeRequest) | [VerifyImageCodeResponse](#hello-v1-sqlx-VerifyImageCodeResponse) | 校验图片验证码 | -| GetSendStatus | [GetSendStatusRequest](#hello-v1-sqlx-GetSendStatusRequest) | [GetSendStatusResponse](#hello-v1-sqlx-GetSendStatusResponse) | 获取发送状态 | - - - - - -## Scalar Value Types - -| .proto Type | Notes | C++ | Java | Python | Go | C# | PHP | Ruby | -| ----------- | ----- | --- | ---- | ------ | -- | -- | --- | ---- | -| double | | double | double | float | float64 | double | float | Float | -| float | | float | float | float | float32 | float | float | Float | -| int32 | Uses variable-length encoding. Inefficient for encoding negative numbers – if your field is likely to have negative values, use sint32 instead. | int32 | int | int | int32 | int | integer | Bignum or Fixnum (as required) | -| int64 | Uses variable-length encoding. Inefficient for encoding negative numbers – if your field is likely to have negative values, use sint64 instead. | int64 | long | int/long | int64 | long | integer/string | Bignum | -| uint32 | Uses variable-length encoding. | uint32 | int | int/long | uint32 | uint | integer | Bignum or Fixnum (as required) | -| uint64 | Uses variable-length encoding. | uint64 | long | int/long | uint64 | ulong | integer/string | Bignum or Fixnum (as required) | -| sint32 | Uses variable-length encoding. Signed int value. These more efficiently encode negative numbers than regular int32s. | int32 | int | int | int32 | int | integer | Bignum or Fixnum (as required) | -| sint64 | Uses variable-length encoding. Signed int value. These more efficiently encode negative numbers than regular int64s. | int64 | long | int/long | int64 | long | integer/string | Bignum | -| fixed32 | Always four bytes. More efficient than uint32 if values are often greater than 2^28. | uint32 | int | int | uint32 | uint | integer | Bignum or Fixnum (as required) | -| fixed64 | Always eight bytes. More efficient than uint64 if values are often greater than 2^56. | uint64 | long | int/long | uint64 | ulong | integer/string | Bignum | -| sfixed32 | Always four bytes. | int32 | int | int | int32 | int | integer | Bignum or Fixnum (as required) | -| sfixed64 | Always eight bytes. | int64 | long | int/long | int64 | long | integer/string | Bignum | -| bool | | bool | boolean | boolean | bool | bool | boolean | TrueClass/FalseClass | -| string | A string must always contain UTF-8 encoded or 7-bit ASCII text. | string | String | str/unicode | string | string | string | String (UTF-8) | -| bytes | May contain any arbitrary sequence of bytes. | string | ByteString | str | []byte | ByteString | string | String (ASCII-8BIT) | - diff --git a/example/docs/markdown/proto/user/index.md b/example/docs/markdown/proto/user/index.md deleted file mode 100644 index 0e519c5fe..000000000 --- a/example/docs/markdown/proto/user/index.md +++ /dev/null @@ -1,548 +0,0 @@ -# Protocol Documentation - - -## Table of Contents - -- [proto/user/user.proto](#proto_user_user-proto) - - [ABitOfEverything](#gid-ABitOfEverything) - - [ABitOfEverything.MapValueEntry](#gid-ABitOfEverything-MapValueEntry) - - [ABitOfEverything.MappedNestedValueEntry](#gid-ABitOfEverything-MappedNestedValueEntry) - - [ABitOfEverything.MappedStringValueEntry](#gid-ABitOfEverything-MappedStringValueEntry) - - [ABitOfEverything.Nested](#gid-ABitOfEverything-Nested) - - [ABitOfEverythingRepeated](#gid-ABitOfEverythingRepeated) - - [Body](#gid-Body) - - [Book](#gid-Book) - - [CheckStatusResponse](#gid-CheckStatusResponse) - - [CreateBookRequest](#gid-CreateBookRequest) - - [ErrorObject](#gid-ErrorObject) - - [ErrorResponse](#gid-ErrorResponse) - - [GenerateRequest](#gid-GenerateRequest) - - [GenerateResponse](#gid-GenerateResponse) - - [MessageWithBody](#gid-MessageWithBody) - - [Tag](#gid-Tag) - - [TypesRequest](#gid-TypesRequest) - - [TypesResponse](#gid-TypesResponse) - - [UpdateBookRequest](#gid-UpdateBookRequest) - - [UpdateV2Request](#gid-UpdateV2Request) - - - [ABitOfEverything.Nested.DeepEnum](#gid-ABitOfEverything-Nested-DeepEnum) - - [NumericEnum](#gid-NumericEnum) - - - [ABitOfEverythingService](#gid-ABitOfEverythingService) - - [AnotherServiceWithNoBindings](#gid-AnotherServiceWithNoBindings) - - [User](#gid-User) - - [camelCaseServiceName](#gid-camelCaseServiceName) - -- [Scalar Value Types](#scalar-value-types) - - - - -

Top

- -## proto/user/user.proto - - - - - -### ABitOfEverything -Intentionally complicated message type to cover many features of Protobuf. - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| single_nested | [ABitOfEverything.Nested](#gid-ABitOfEverything-Nested) | | | -| uuid | [string](#string) | | | -| nested | [ABitOfEverything.Nested](#gid-ABitOfEverything-Nested) | repeated | | -| float_value | [float](#float) | | | -| double_value | [double](#double) | | | -| int64_value | [int64](#int64) | | | -| uint64_value | [uint64](#uint64) | | | -| int32_value | [int32](#int32) | | | -| fixed64_value | [fixed64](#fixed64) | | | -| fixed32_value | [fixed32](#fixed32) | | | -| bool_value | [bool](#bool) | | | -| string_value | [string](#string) | | | -| bytes_value | [bytes](#bytes) | | | -| uint32_value | [uint32](#uint32) | | | -| enum_value | [NumericEnum](#gid-NumericEnum) | | | -| sfixed32_value | [sfixed32](#sfixed32) | | | -| sfixed64_value | [sfixed64](#sfixed64) | | | -| sint32_value | [sint32](#sint32) | | | -| sint64_value | [sint64](#sint64) | | | -| repeated_string_value | [string](#string) | repeated | | -| oneof_empty | [google.protobuf.Empty](#google-protobuf-Empty) | | | -| oneof_string | [string](#string) | | | -| map_value | [ABitOfEverything.MapValueEntry](#gid-ABitOfEverything-MapValueEntry) | repeated | | -| mapped_string_value | [ABitOfEverything.MappedStringValueEntry](#gid-ABitOfEverything-MappedStringValueEntry) | repeated | | -| mapped_nested_value | [ABitOfEverything.MappedNestedValueEntry](#gid-ABitOfEverything-MappedNestedValueEntry) | repeated | | -| nonConventionalNameValue | [string](#string) | | | -| timestamp_value | [google.protobuf.Timestamp](#google-protobuf-Timestamp) | | | -| repeated_enum_value | [NumericEnum](#gid-NumericEnum) | repeated | repeated enum value. it is comma-separated in query | -| repeated_enum_annotation | [NumericEnum](#gid-NumericEnum) | repeated | repeated numeric enum comment (This comment is overridden by the field annotation) | -| enum_value_annotation | [NumericEnum](#gid-NumericEnum) | | numeric enum comment (This comment is overridden by the field annotation) | -| repeated_string_annotation | [string](#string) | repeated | repeated string comment (This comment is overridden by the field annotation) | -| repeated_nested_annotation | [ABitOfEverything.Nested](#gid-ABitOfEverything-Nested) | repeated | repeated nested object comment (This comment is overridden by the field annotation) | -| nested_annotation | [ABitOfEverything.Nested](#gid-ABitOfEverything-Nested) | | nested object comments (This comment is overridden by the field annotation) | -| int64_override_type | [int64](#int64) | | | -| required_string_via_field_behavior_annotation | [string](#string) | | mark a field as required in Open API definition | -| output_only_string_via_field_behavior_annotation | [string](#string) | | mark a field as readonly in Open API definition | - - - - - - - - -### ABitOfEverything.MapValueEntry - - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| key | [string](#string) | | | -| value | [NumericEnum](#gid-NumericEnum) | | | - - - - - - - - -### ABitOfEverything.MappedNestedValueEntry - - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| key | [string](#string) | | | -| value | [ABitOfEverything.Nested](#gid-ABitOfEverything-Nested) | | | - - - - - - - - -### ABitOfEverything.MappedStringValueEntry - - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| key | [string](#string) | | | -| value | [string](#string) | | | - - - - - - - - -### ABitOfEverything.Nested -Nested is nested type. - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| name | [string](#string) | | name is nested field. | -| amount | [uint32](#uint32) | | | -| ok | [ABitOfEverything.Nested.DeepEnum](#gid-ABitOfEverything-Nested-DeepEnum) | | DeepEnum comment. | - - - - - - - - -### ABitOfEverythingRepeated -ABitOfEverythingRepeated is used to validate repeated path parameter functionality - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| path_repeated_float_value | [float](#float) | repeated | repeated values. they are comma-separated in path | -| path_repeated_double_value | [double](#double) | repeated | | -| path_repeated_int64_value | [int64](#int64) | repeated | | -| path_repeated_uint64_value | [uint64](#uint64) | repeated | | -| path_repeated_int32_value | [int32](#int32) | repeated | | -| path_repeated_fixed64_value | [fixed64](#fixed64) | repeated | | -| path_repeated_fixed32_value | [fixed32](#fixed32) | repeated | | -| path_repeated_bool_value | [bool](#bool) | repeated | | -| path_repeated_string_value | [string](#string) | repeated | | -| path_repeated_bytes_value | [bytes](#bytes) | repeated | | -| path_repeated_uint32_value | [uint32](#uint32) | repeated | | -| path_repeated_enum_value | [NumericEnum](#gid-NumericEnum) | repeated | | -| path_repeated_sfixed32_value | [sfixed32](#sfixed32) | repeated | | -| path_repeated_sfixed64_value | [sfixed64](#sfixed64) | repeated | | -| path_repeated_sint32_value | [sint32](#sint32) | repeated | | -| path_repeated_sint64_value | [sint64](#sint64) | repeated | | - - - - - - - - -### Body - - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| name | [string](#string) | | | - - - - - - - - -### Book -An example resource type from AIP-123 used to test the behavior described in -the CreateBookRequest message. - -See: https://google.aip.dev/123 - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| name | [string](#string) | | The resource name of the book. - -Format: `publishers/{publisher}/books/{book}` - -Example: `publishers/1257894000000000000/books/my-book` | -| id | [string](#string) | | Output only. The book's ID. | -| create_time | [google.protobuf.Timestamp](#google-protobuf-Timestamp) | | Output only. Creation time of the book. | - - - - - - - - -### CheckStatusResponse - - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| status | [google.rpc.Status](#google-rpc-Status) | | | - - - - - - - - -### CreateBookRequest -A standard Create message from AIP-133 with a user-specified ID. -The user-specified ID (the `book_id` field in this example) must become a -query parameter in the OpenAPI spec. - -See: https://google.aip.dev/133#user-specified-ids - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| parent | [string](#string) | | The publisher in which to create the book. - -Format: `publishers/{publisher}` - -Example: `publishers/1257894000000000000` | -| book | [Book](#gid-Book) | | The book to create. | -| book_id | [string](#string) | | The ID to use for the book. - -This must start with an alphanumeric character. | - - - - - - - - -### ErrorObject - - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| code | [int32](#int32) | | | -| message | [string](#string) | | | - - - - - - - - -### ErrorResponse - - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| correlationId | [string](#string) | | | -| error | [ErrorObject](#gid-ErrorObject) | | | - - - - - - - - -### GenerateRequest -Generate a unique ID. Defaults to uuid. - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| type | [string](#string) | | type of id e.g uuid, shortid, snowflake (64 bit), bigflake (128 bit) | - - - - - - - - -### GenerateResponse - - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| id | [string](#string) | | the unique id generated | -| type | [string](#string) | | the type of id generated | - - - - - - - - -### MessageWithBody - - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| id | [string](#string) | | | -| data | [Body](#gid-Body) | | | - - - - - - - - -### Tag - - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| key | [string](#string) | | | -| value | [string](#string) | | | - - - - - - - - -### TypesRequest -List the types of IDs available. No query params needed. - - - - - - - - -### TypesResponse -TypesResponse 返回值类型 - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| types | [string](#string) | repeated | | - - - - - - - - -### UpdateBookRequest -A standard Update message from AIP-134 - -See: https://google.aip.dev/134#request-message - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| book | [Book](#gid-Book) | | The book to update. - -The book's `name` field is used to identify the book to be updated. Format: publishers/{publisher}/books/{book} | -| update_mask | [google.protobuf.FieldMask](#google-protobuf-FieldMask) | | The list of fields to be updated. | -| allow_missing | [bool](#bool) | | If set to true, and the book is not found, a new book will be created. In this situation, `update_mask` is ignored. | - - - - - - - - -### UpdateV2Request -UpdateV2Request request for update includes the message and the update mask - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| abe | [ABitOfEverything](#gid-ABitOfEverything) | | | -| update_mask | [google.protobuf.FieldMask](#google-protobuf-FieldMask) | | The paths to update. | - - - - - - - - - - -### ABitOfEverything.Nested.DeepEnum -DeepEnum is one or zero. - -| Name | Number | Description | -| ---- | ------ | ----------- | -| FALSE | 0 | FALSE is false. | -| TRUE | 1 | TRUE is true. | - - - - - -### NumericEnum -NumericEnum is one or zero. - -| Name | Number | Description | -| ---- | ------ | ----------- | -| ZERO | 0 | ZERO means 0 | -| ONE | 1 | ONE means 1 | - - - - - - - - - -### ABitOfEverythingService -ABitOfEverything service is used to validate that APIs with complicated -proto messages and URL templates are still processed correctly. - -| Method Name | Request Type | Response Type | Description | -| ----------- | ------------ | ------------- | ------------| -| Create | [ABitOfEverything](#gid-ABitOfEverything) | [ABitOfEverything](#gid-ABitOfEverything) | Create a new ABitOfEverything - -This API creates a new ABitOfEverything | -| CreateBody | [ABitOfEverything](#gid-ABitOfEverything) | [ABitOfEverything](#gid-ABitOfEverything) | | -| CreateBook | [CreateBookRequest](#gid-CreateBookRequest) | [Book](#gid-Book) | Create a book. | -| UpdateBook | [UpdateBookRequest](#gid-UpdateBookRequest) | [Book](#gid-Book) | | -| Update | [ABitOfEverything](#gid-ABitOfEverything) | [.google.protobuf.Empty](#google-protobuf-Empty) | | -| UpdateV2 | [UpdateV2Request](#gid-UpdateV2Request) | [.google.protobuf.Empty](#google-protobuf-Empty) | | -| GetQuery | [ABitOfEverything](#gid-ABitOfEverything) | [.google.protobuf.Empty](#google-protobuf-Empty) | rpc Delete(grpc.gateway.examples.internal.proto.sub2.IdMessage) returns (google.protobuf.Empty) { option (google.api.http) = { delete: "/v1/example/a_bit_of_everything/{uuid}" }; option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation) = { security: { security_requirement: { key: "ApiKeyAuth"; value: {} } security_requirement: { key: "OAuth2"; value: { scope: "read"; scope: "write"; } } } extensions: { key: "x-irreversible"; value { bool_value: true; } } }; } | -| GetRepeatedQuery | [ABitOfEverythingRepeated](#gid-ABitOfEverythingRepeated) | [ABitOfEverythingRepeated](#gid-ABitOfEverythingRepeated) | | -| DeepPathEcho | [ABitOfEverything](#gid-ABitOfEverything) | [ABitOfEverything](#gid-ABitOfEverything) | Echo allows posting a StringMessage value. - -It also exposes multiple bindings. - -This makes it useful when validating that the OpenAPI v2 API description exposes documentation correctly on all paths defined as additional_bindings in the proto. rpc Echo(grpc.gateway.examples.internal.proto.sub.StringMessage) returns (grpc.gateway.examples.internal.proto.sub.StringMessage) { option (google.api.http) = { get: "/v1/example/a_bit_of_everything/echo/{value}" additional_bindings { post: "/v2/example/echo" body: "value" } additional_bindings { get: "/v2/example/echo" } }; option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation) = { description: "Description Echo"; summary: "Summary: Echo rpc"; tags: "echo rpc"; external_docs: { url: "https://github.com/grpc-ecosystem/grpc-gateway"; description: "Find out more Echo"; } responses: { key: "200" value: { examples: { key: "application/json" value: '{"value": "the input value"}' } } } responses: { key: "503"; value: { description: "Returned when the resource is temporarily unavailable."; extensions: { key: "x-number"; value { number_value: 100; } } } } responses: { // Overwrites global definition. key: "404"; value: { description: "Returned when the resource does not exist."; schema: { json_schema: { type: INTEGER; } } } } }; } | -| NoBindings | [.google.protobuf.Duration](#google-protobuf-Duration) | [.google.protobuf.Empty](#google-protobuf-Empty) | | -| Timeout | [.google.protobuf.Empty](#google-protobuf-Empty) | [.google.protobuf.Empty](#google-protobuf-Empty) | | -| ErrorWithDetails | [.google.protobuf.Empty](#google-protobuf-Empty) | [.google.protobuf.Empty](#google-protobuf-Empty) | | -| GetMessageWithBody | [MessageWithBody](#gid-MessageWithBody) | [.google.protobuf.Empty](#google-protobuf-Empty) | | -| PostWithEmptyBody | [Body](#gid-Body) | [.google.protobuf.Empty](#google-protobuf-Empty) | | -| CheckGetQueryParams | [ABitOfEverything](#gid-ABitOfEverything) | [ABitOfEverything](#gid-ABitOfEverything) | | -| CheckNestedEnumGetQueryParams | [ABitOfEverything](#gid-ABitOfEverything) | [ABitOfEverything](#gid-ABitOfEverything) | | -| CheckPostQueryParams | [ABitOfEverything](#gid-ABitOfEverything) | [ABitOfEverything](#gid-ABitOfEverything) | | -| OverwriteResponseContentType | [.google.protobuf.Empty](#google-protobuf-Empty) | [.google.protobuf.StringValue](#google-protobuf-StringValue) | | -| CheckStatus | [.google.protobuf.Empty](#google-protobuf-Empty) | [CheckStatusResponse](#gid-CheckStatusResponse) | | - - - - -### AnotherServiceWithNoBindings - - -| Method Name | Request Type | Response Type | Description | -| ----------- | ------------ | ------------- | ------------| -| NoBindings | [.google.protobuf.Empty](#google-protobuf-Empty) | [.google.protobuf.Empty](#google-protobuf-Empty) | | - - - - -### User -User 用户服务 - -| Method Name | Request Type | Response Type | Description | -| ----------- | ------------ | ------------- | ------------| -| Generate | [GenerateRequest](#gid-GenerateRequest) | [GenerateResponse](#gid-GenerateResponse) | Generate 生成ID | -| Types | [TypesRequest](#gid-TypesRequest) | [TypesResponse](#gid-TypesResponse) | Types id类型 | - - - - -### camelCaseServiceName -camelCase and lowercase service names are valid but not recommended (use TitleCase instead) - -| Method Name | Request Type | Response Type | Description | -| ----------- | ------------ | ------------- | ------------| -| Empty | [.google.protobuf.Empty](#google-protobuf-Empty) | [.google.protobuf.Empty](#google-protobuf-Empty) | | - - - - - -## Scalar Value Types - -| .proto Type | Notes | C++ | Java | Python | Go | C# | PHP | Ruby | -| ----------- | ----- | --- | ---- | ------ | -- | -- | --- | ---- | -| double | | double | double | float | float64 | double | float | Float | -| float | | float | float | float | float32 | float | float | Float | -| int32 | Uses variable-length encoding. Inefficient for encoding negative numbers – if your field is likely to have negative values, use sint32 instead. | int32 | int | int | int32 | int | integer | Bignum or Fixnum (as required) | -| int64 | Uses variable-length encoding. Inefficient for encoding negative numbers – if your field is likely to have negative values, use sint64 instead. | int64 | long | int/long | int64 | long | integer/string | Bignum | -| uint32 | Uses variable-length encoding. | uint32 | int | int/long | uint32 | uint | integer | Bignum or Fixnum (as required) | -| uint64 | Uses variable-length encoding. | uint64 | long | int/long | uint64 | ulong | integer/string | Bignum or Fixnum (as required) | -| sint32 | Uses variable-length encoding. Signed int value. These more efficiently encode negative numbers than regular int32s. | int32 | int | int | int32 | int | integer | Bignum or Fixnum (as required) | -| sint64 | Uses variable-length encoding. Signed int value. These more efficiently encode negative numbers than regular int64s. | int64 | long | int/long | int64 | long | integer/string | Bignum | -| fixed32 | Always four bytes. More efficient than uint32 if values are often greater than 2^28. | uint32 | int | int | uint32 | uint | integer | Bignum or Fixnum (as required) | -| fixed64 | Always eight bytes. More efficient than uint64 if values are often greater than 2^56. | uint64 | long | int/long | uint64 | ulong | integer/string | Bignum | -| sfixed32 | Always four bytes. | int32 | int | int | int32 | int | integer | Bignum or Fixnum (as required) | -| sfixed64 | Always eight bytes. | int64 | long | int/long | int64 | long | integer/string | Bignum | -| bool | | bool | boolean | boolean | bool | bool | boolean | TrueClass/FalseClass | -| string | A string must always contain UTF-8 encoded or 7-bit ASCII text. | string | String | str/unicode | string | string | string | String (UTF-8) | -| bytes | May contain any arbitrary sequence of bytes. | string | ByteString | str | []byte | ByteString | string | String (ASCII-8BIT) | - diff --git a/example/docs/markdown/proto/yuque/index.md b/example/docs/markdown/proto/yuque/index.md deleted file mode 100644 index ef56b9489..000000000 --- a/example/docs/markdown/proto/yuque/index.md +++ /dev/null @@ -1,263 +0,0 @@ -# Protocol Documentation - - -## Table of Contents - -- [proto/yuque/yuque.proto](#proto_yuque_yuque-proto) - - [CreateGroupReq](#yuque-v2-CreateGroupReq) - - [CreateGroupResp](#yuque-v2-CreateGroupResp) - - [CreateGroupResp.Data](#yuque-v2-CreateGroupResp-Data) - - [DoormanConfig](#yuque-v2-DoormanConfig) - - [FacebookConfig](#yuque-v2-FacebookConfig) - - [GuardianConfig](#yuque-v2-GuardianConfig) - - [User](#yuque-v2-User) - - [UserInfoReq](#yuque-v2-UserInfoReq) - - [UserInfoResp](#yuque-v2-UserInfoResp) - - [UserInfoResp.Data](#yuque-v2-UserInfoResp-Data) - - - [UserService](#yuque-v2-UserService) - - [Yuque](#yuque-v2-Yuque) - -- [Scalar Value Types](#scalar-value-types) - - - - -

Top

- -## proto/yuque/yuque.proto - - - - - -### CreateGroupReq - - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| login | [string](#string) | | login | -| name | [string](#string) | | 组织名称 | -| description | [string](#string) | | 介绍 | - - - - - - - - -### CreateGroupResp - - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| data | [CreateGroupResp.Data](#yuque-v2-CreateGroupResp-Data) | repeated | | -| response | [lava.Response](#lava-Response) | | | - - - - - - - - -### CreateGroupResp.Data - - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| id | [uint32](#uint32) | | | -| login | [string](#string) | | | -| name | [string](#string) | | | -| avatar_url | [string](#string) | | | -| description | [string](#string) | | | -| created_at | [string](#string) | | | -| updated_at | [string](#string) | | | - - - - - - - - -### DoormanConfig -doorman service config - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| grpc_port | [uint32](#uint32) | | gRPC port | -| wss_port | [uint32](#uint32) | | websocket port | - - - - - - - - -### FacebookConfig -facebook auth configuration - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| base_url | [string](#string) | | | -| auth_url | [string](#string) | | | -| avatar_url | [string](#string) | | | - - - - - - - - -### GuardianConfig -guardian service config - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| token_secret | [string](#string) | | auth token secret | -| conn_str | [string](#string) | | auth db conn str | -| expiring_days | [uint32](#uint32) | | auth token expiration | -| facebook | [FacebookConfig](#yuque-v2-FacebookConfig) | | facebook configuration | - - - - - - - - -### User -basic user information - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| id | [string](#string) | | user id | -| email | [string](#string) | | user's email | -| first_name | [string](#string) | | user's first name | -| last_name | [string](#string) | | user's last name | -| gender | [string](#string) | | user's gender - Unspecified if none | -| birthday | [int64](#int64) | | user's birthday in UTC timestamp, 0 if none | -| avatar | [string](#string) | | user's avatar | - - - - - - - - -### UserInfoReq - - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| login | [string](#string) | | login or id | - - - - - - - - -### UserInfoResp - - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| data | [UserInfoResp.Data](#yuque-v2-UserInfoResp-Data) | | | -| response | [lava.Response](#lava-Response) | | | - - - - - - - - -### UserInfoResp.Data - - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| id | [uint32](#uint32) | | | -| type | [string](#string) | | | -| login | [string](#string) | | | -| name | [string](#string) | | | -| description | [string](#string) | | | -| avatar_url | [string](#string) | | | -| created_at | [string](#string) | | | -| updated_at | [string](#string) | | | - - - - - - - - - - - - - - -### UserService - - -| Method Name | Request Type | Response Type | Description | -| ----------- | ------------ | ------------- | ------------| -| Signin | [UserInfoReq](#yuque-v2-UserInfoReq) | [UserInfoResp](#yuque-v2-UserInfoResp) | user signin | -| Signin1 | [UserInfoReq](#yuque-v2-UserInfoReq) | [UserInfoResp](#yuque-v2-UserInfoResp) | | -| ResetPassword | [UserInfoReq](#yuque-v2-UserInfoReq) | [.google.protobuf.Empty](#google-protobuf-Empty) | user resets password | - - - - -### Yuque - - -| Method Name | Request Type | Response Type | Description | -| ----------- | ------------ | ------------- | ------------| -| UserInfo | [.google.protobuf.Empty](#google-protobuf-Empty) | [UserInfoResp](#yuque-v2-UserInfoResp) | 获取认证的用户的个人信息 | -| UserInfoByLogin | [UserInfoReq](#yuque-v2-UserInfoReq) | [UserInfoResp](#yuque-v2-UserInfoResp) | 获取单个用户信息 | -| CreateGroup | [CreateGroupReq](#yuque-v2-CreateGroupReq) | [CreateGroupResp](#yuque-v2-CreateGroupResp) | 创建 Group | - - - - - -## Scalar Value Types - -| .proto Type | Notes | C++ | Java | Python | Go | C# | PHP | Ruby | -| ----------- | ----- | --- | ---- | ------ | -- | -- | --- | ---- | -| double | | double | double | float | float64 | double | float | Float | -| float | | float | float | float | float32 | float | float | Float | -| int32 | Uses variable-length encoding. Inefficient for encoding negative numbers – if your field is likely to have negative values, use sint32 instead. | int32 | int | int | int32 | int | integer | Bignum or Fixnum (as required) | -| int64 | Uses variable-length encoding. Inefficient for encoding negative numbers – if your field is likely to have negative values, use sint64 instead. | int64 | long | int/long | int64 | long | integer/string | Bignum | -| uint32 | Uses variable-length encoding. | uint32 | int | int/long | uint32 | uint | integer | Bignum or Fixnum (as required) | -| uint64 | Uses variable-length encoding. | uint64 | long | int/long | uint64 | ulong | integer/string | Bignum or Fixnum (as required) | -| sint32 | Uses variable-length encoding. Signed int value. These more efficiently encode negative numbers than regular int32s. | int32 | int | int | int32 | int | integer | Bignum or Fixnum (as required) | -| sint64 | Uses variable-length encoding. Signed int value. These more efficiently encode negative numbers than regular int64s. | int64 | long | int/long | int64 | long | integer/string | Bignum | -| fixed32 | Always four bytes. More efficient than uint32 if values are often greater than 2^28. | uint32 | int | int | uint32 | uint | integer | Bignum or Fixnum (as required) | -| fixed64 | Always eight bytes. More efficient than uint64 if values are often greater than 2^56. | uint64 | long | int/long | uint64 | ulong | integer/string | Bignum | -| sfixed32 | Always four bytes. | int32 | int | int | int32 | int | integer | Bignum or Fixnum (as required) | -| sfixed64 | Always eight bytes. | int64 | long | int/long | int64 | long | integer/string | Bignum | -| bool | | bool | boolean | boolean | bool | bool | boolean | TrueClass/FalseClass | -| string | A string must always contain UTF-8 encoded or 7-bit ASCII text. | string | String | str/unicode | string | string | string | String (UTF-8) | -| bytes | May contain any arbitrary sequence of bytes. | string | ByteString | str | []byte | ByteString | string | String (ASCII-8BIT) | - diff --git a/example/docs/markdown/proto/yuquepb/index.md b/example/docs/markdown/proto/yuquepb/index.md deleted file mode 100644 index a5f438b94..000000000 --- a/example/docs/markdown/proto/yuquepb/index.md +++ /dev/null @@ -1,263 +0,0 @@ -# Protocol Documentation - - -## Table of Contents - -- [proto/yuquepb/yuque.proto](#proto_yuquepb_yuque-proto) - - [CreateGroupReq](#yuque-v2-CreateGroupReq) - - [CreateGroupResp](#yuque-v2-CreateGroupResp) - - [CreateGroupResp.Data](#yuque-v2-CreateGroupResp-Data) - - [DoormanConfig](#yuque-v2-DoormanConfig) - - [FacebookConfig](#yuque-v2-FacebookConfig) - - [GuardianConfig](#yuque-v2-GuardianConfig) - - [User](#yuque-v2-User) - - [UserInfoReq](#yuque-v2-UserInfoReq) - - [UserInfoResp](#yuque-v2-UserInfoResp) - - [UserInfoResp.Data](#yuque-v2-UserInfoResp-Data) - - - [UserService](#yuque-v2-UserService) - - [Yuque](#yuque-v2-Yuque) - -- [Scalar Value Types](#scalar-value-types) - - - - -

Top

- -## proto/yuquepb/yuque.proto - - - - - -### CreateGroupReq - - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| login | [string](#string) | | login | -| name | [string](#string) | | 组织名称 | -| description | [string](#string) | | 介绍 | - - - - - - - - -### CreateGroupResp - - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| data | [CreateGroupResp.Data](#yuque-v2-CreateGroupResp-Data) | repeated | | -| response | [lava.Response](#lava-Response) | | | - - - - - - - - -### CreateGroupResp.Data - - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| id | [uint32](#uint32) | | | -| login | [string](#string) | | | -| name | [string](#string) | | | -| avatar_url | [string](#string) | | | -| description | [string](#string) | | | -| created_at | [string](#string) | | | -| updated_at | [string](#string) | | | - - - - - - - - -### DoormanConfig -doorman service config - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| grpc_port | [uint32](#uint32) | | gRPC port | -| wss_port | [uint32](#uint32) | | websocket port | - - - - - - - - -### FacebookConfig -facebook auth configuration - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| base_url | [string](#string) | | | -| auth_url | [string](#string) | | | -| avatar_url | [string](#string) | | | - - - - - - - - -### GuardianConfig -guardian service config - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| token_secret | [string](#string) | | auth token secret | -| conn_str | [string](#string) | | auth db conn str | -| expiring_days | [uint32](#uint32) | | auth token expiration | -| facebook | [FacebookConfig](#yuque-v2-FacebookConfig) | | facebook configuration | - - - - - - - - -### User -basic user information - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| id | [string](#string) | | user id | -| email | [string](#string) | | user's email | -| first_name | [string](#string) | | user's first name | -| last_name | [string](#string) | | user's last name | -| gender | [string](#string) | | user's gender - Unspecified if none | -| birthday | [int64](#int64) | | user's birthday in UTC timestamp, 0 if none | -| avatar | [string](#string) | | user's avatar | - - - - - - - - -### UserInfoReq - - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| login | [string](#string) | | login or id | - - - - - - - - -### UserInfoResp - - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| data | [UserInfoResp.Data](#yuque-v2-UserInfoResp-Data) | | | -| response | [lava.Response](#lava-Response) | | | - - - - - - - - -### UserInfoResp.Data - - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| id | [uint32](#uint32) | | | -| type | [string](#string) | | | -| login | [string](#string) | | | -| name | [string](#string) | | | -| description | [string](#string) | | | -| avatar_url | [string](#string) | | | -| created_at | [string](#string) | | | -| updated_at | [string](#string) | | | - - - - - - - - - - - - - - -### UserService - - -| Method Name | Request Type | Response Type | Description | -| ----------- | ------------ | ------------- | ------------| -| Signin | [UserInfoReq](#yuque-v2-UserInfoReq) | [UserInfoResp](#yuque-v2-UserInfoResp) | user signin | -| Signin1 | [UserInfoReq](#yuque-v2-UserInfoReq) | [UserInfoResp](#yuque-v2-UserInfoResp) | | -| ResetPassword | [UserInfoReq](#yuque-v2-UserInfoReq) | [.google.protobuf.Empty](#google-protobuf-Empty) | user resets password | - - - - -### Yuque - - -| Method Name | Request Type | Response Type | Description | -| ----------- | ------------ | ------------- | ------------| -| UserInfo | [.google.protobuf.Empty](#google-protobuf-Empty) | [UserInfoResp](#yuque-v2-UserInfoResp) | 获取认证的用户的个人信息 | -| UserInfoByLogin | [UserInfoReq](#yuque-v2-UserInfoReq) | [UserInfoResp](#yuque-v2-UserInfoResp) | 获取单个用户信息 | -| CreateGroup | [CreateGroupReq](#yuque-v2-CreateGroupReq) | [CreateGroupResp](#yuque-v2-CreateGroupResp) | 创建 Group | - - - - - -## Scalar Value Types - -| .proto Type | Notes | C++ | Java | Python | Go | C# | PHP | Ruby | -| ----------- | ----- | --- | ---- | ------ | -- | -- | --- | ---- | -| double | | double | double | float | float64 | double | float | Float | -| float | | float | float | float | float32 | float | float | Float | -| int32 | Uses variable-length encoding. Inefficient for encoding negative numbers – if your field is likely to have negative values, use sint32 instead. | int32 | int | int | int32 | int | integer | Bignum or Fixnum (as required) | -| int64 | Uses variable-length encoding. Inefficient for encoding negative numbers – if your field is likely to have negative values, use sint64 instead. | int64 | long | int/long | int64 | long | integer/string | Bignum | -| uint32 | Uses variable-length encoding. | uint32 | int | int/long | uint32 | uint | integer | Bignum or Fixnum (as required) | -| uint64 | Uses variable-length encoding. | uint64 | long | int/long | uint64 | ulong | integer/string | Bignum or Fixnum (as required) | -| sint32 | Uses variable-length encoding. Signed int value. These more efficiently encode negative numbers than regular int32s. | int32 | int | int | int32 | int | integer | Bignum or Fixnum (as required) | -| sint64 | Uses variable-length encoding. Signed int value. These more efficiently encode negative numbers than regular int64s. | int64 | long | int/long | int64 | long | integer/string | Bignum | -| fixed32 | Always four bytes. More efficient than uint32 if values are often greater than 2^28. | uint32 | int | int | uint32 | uint | integer | Bignum or Fixnum (as required) | -| fixed64 | Always eight bytes. More efficient than uint64 if values are often greater than 2^56. | uint64 | long | int/long | uint64 | ulong | integer/string | Bignum | -| sfixed32 | Always four bytes. | int32 | int | int | int32 | int | integer | Bignum or Fixnum (as required) | -| sfixed64 | Always eight bytes. | int64 | long | int/long | int64 | long | integer/string | Bignum | -| bool | | bool | boolean | boolean | bool | bool | boolean | TrueClass/FalseClass | -| string | A string must always contain UTF-8 encoded or 7-bit ASCII text. | string | String | str/unicode | string | string | string | String (UTF-8) | -| bytes | May contain any arbitrary sequence of bytes. | string | ByteString | str | []byte | ByteString | string | String (ASCII-8BIT) | - diff --git a/example/docs/markdown/rsocket/index.md b/example/docs/markdown/rsocket/index.md deleted file mode 100644 index 62cea916a..000000000 --- a/example/docs/markdown/rsocket/index.md +++ /dev/null @@ -1,140 +0,0 @@ -# Protocol Documentation - - -## Table of Contents - -- [rsocket/metadata.proto](#rsocket/metadata.proto) - - [Metadata](#transport.Metadata) - - [Metadata.HeaderEntry](#transport.Metadata.HeaderEntry) - - [Request](#transport.Request) - - [Request.HeaderEntry](#transport.Request.HeaderEntry) - - [Response](#transport.Response) - -- [Scalar Value Types](#scalar-value-types) - - - - -

Top

- -## rsocket/metadata.proto - - - - - -### Metadata - - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| version | [string](#string) | | | -| service | [string](#string) | | | -| method | [string](#string) | | | -| trace | [string](#string) | | | -| address | [string](#string) | | | -| requestId | [string](#string) | | | -| header | [Metadata.HeaderEntry](#transport.Metadata.HeaderEntry) | repeated | | - - - - - - - - -### Metadata.HeaderEntry - - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| key | [string](#string) | | | -| value | [string](#string) | | | - - - - - - - - -### Request - - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| method | [string](#string) | | | -| contentType | [string](#string) | | | -| requestId | [string](#string) | | | -| header | [Request.HeaderEntry](#transport.Request.HeaderEntry) | repeated | | - - - - - - - - -### Request.HeaderEntry - - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| key | [string](#string) | | | -| value | [string](#string) | | | - - - - - - - - -### Response - - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| code | [int32](#int32) | | | -| msg | [string](#string) | | | -| metadata | [Metadata](#transport.Metadata) | | | - - - - - - - - - - - - - - - -## Scalar Value Types - -| .proto Type | Notes | C++ | Java | Python | Go | C# | PHP | Ruby | -| ----------- | ----- | --- | ---- | ------ | -- | -- | --- | ---- | -| double | | double | double | float | float64 | double | float | Float | -| float | | float | float | float | float32 | float | float | Float | -| int32 | Uses variable-length encoding. Inefficient for encoding negative numbers – if your field is likely to have negative values, use sint32 instead. | int32 | int | int | int32 | int | integer | Bignum or Fixnum (as required) | -| int64 | Uses variable-length encoding. Inefficient for encoding negative numbers – if your field is likely to have negative values, use sint64 instead. | int64 | long | int/long | int64 | long | integer/string | Bignum | -| uint32 | Uses variable-length encoding. | uint32 | int | int/long | uint32 | uint | integer | Bignum or Fixnum (as required) | -| uint64 | Uses variable-length encoding. | uint64 | long | int/long | uint64 | ulong | integer/string | Bignum or Fixnum (as required) | -| sint32 | Uses variable-length encoding. Signed int value. These more efficiently encode negative numbers than regular int32s. | int32 | int | int | int32 | int | integer | Bignum or Fixnum (as required) | -| sint64 | Uses variable-length encoding. Signed int value. These more efficiently encode negative numbers than regular int64s. | int64 | long | int/long | int64 | long | integer/string | Bignum | -| fixed32 | Always four bytes. More efficient than uint32 if values are often greater than 2^28. | uint32 | int | int | uint32 | uint | integer | Bignum or Fixnum (as required) | -| fixed64 | Always eight bytes. More efficient than uint64 if values are often greater than 2^56. | uint64 | long | int/long | uint64 | ulong | integer/string | Bignum | -| sfixed32 | Always four bytes. | int32 | int | int | int32 | int | integer | Bignum or Fixnum (as required) | -| sfixed64 | Always eight bytes. | int64 | long | int/long | int64 | long | integer/string | Bignum | -| bool | | bool | boolean | boolean | bool | bool | boolean | TrueClass/FalseClass | -| string | A string must always contain UTF-8 encoded or 7-bit ASCII text. | string | String | str/unicode | string | string | string | String (UTF-8) | -| bytes | May contain any arbitrary sequence of bytes. | string | ByteString | str | []byte | ByteString | string | String (ASCII-8BIT) | - diff --git a/example/docs/swagger/proto/gid/a_bit_of_everything.swagger.json b/example/docs/swagger/proto/gid/a_bit_of_everything.swagger.json deleted file mode 100644 index 1e3dce964..000000000 --- a/example/docs/swagger/proto/gid/a_bit_of_everything.swagger.json +++ /dev/null @@ -1,184 +0,0 @@ -{ - "swagger": "2.0", - "info": { - "title": "proto/gid/a_bit_of_everything.proto", - "version": "version not set" - }, - "tags": [ - { - "name": "LoginService" - } - ], - "consumes": [ - "application/json" - ], - "produces": [ - "application/json" - ], - "paths": { - "/v1/example/login": { - "post": { - "summary": "Login", - "description": "{{.MethodDescriptorProto.Name}} is a call with the method(s) {{$first := true}}{{range .Bindings}}{{if $first}}{{$first = false}}{{else}}, {{end}}{{.HTTPMethod}}{{end}} within the \"{{.Service.Name}}\" service.\nIt takes in \"{{.RequestType.Name}}\" and returns a \"{{.ResponseType.Name}}\".\n\n## {{.RequestType.Name}}\n| Field ID | Name | Type | Description |\n| ----------- | --------- | --------------------------------------------------------- | ---------------------------- | {{range .RequestType.Fields}}\n| {{.Number}} | {{.Name}} | {{if eq .Label.String \"LABEL_REPEATED\"}}[]{{end}}{{.Type}} | {{fieldcomments .Message .}} | {{end}}\n\n## {{.ResponseType.Name}}\n| Field ID | Name | Type | Description |\n| ----------- | --------- | ---------------------------------------------------------- | ---------------------------- | {{range .ResponseType.Fields}}\n| {{.Number}} | {{.Name}} | {{if eq .Label.String \"LABEL_REPEATED\"}}[]{{end}}{{.Type}} | {{fieldcomments .Message .}} | {{end}}", - "operationId": "LoginService_Login", - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "$ref": "#/definitions/gidLoginReply" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "#/definitions/rpcStatus" - } - } - }, - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/gidLoginRequest" - } - } - ], - "tags": [ - "LoginService" - ] - } - }, - "/v1/example/logout": { - "post": { - "summary": "Logout", - "description": "{{.MethodDescriptorProto.Name}} is a call with the method(s) {{$first := true}}{{range .Bindings}}{{if $first}}{{$first = false}}{{else}}, {{end}}{{.HTTPMethod}}{{end}} within the \"{{.Service.Name}}\" service.\nIt takes in \"{{.RequestType.Name}}\" and returns a \"{{.ResponseType.Name}}\".\n\n## {{.RequestType.Name}}\n| Field ID | Name | Type | Description |\n| ----------- | --------- | --------------------------------------------------------- | ---------------------------- | {{range .RequestType.Fields}}\n| {{.Number}} | {{.Name}} | {{if eq .Label.String \"LABEL_REPEATED\"}}[]{{end}}{{.Type}} | {{fieldcomments .Message .}} | {{end}}\n\n## {{.ResponseType.Name}}\n| Field ID | Name | Type | Description |\n| ----------- | --------- | ---------------------------------------------------------- | ---------------------------- | {{range .ResponseType.Fields}}\n| {{.Number}} | {{.Name}} | {{if eq .Label.String \"LABEL_REPEATED\"}}[]{{end}}{{.Type}} | {{fieldcomments .Message .}} | {{end}}", - "operationId": "LoginService_Logout", - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "$ref": "#/definitions/gidLogoutReply" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "#/definitions/rpcStatus" - } - } - }, - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/gidLogoutRequest" - } - } - ], - "tags": [ - "LoginService" - ] - } - } - }, - "definitions": { - "gidLoginReply": { - "type": "object", - "properties": { - "message": { - "type": "string" - }, - "access": { - "type": "boolean", - "title": "Whether you have access or not" - } - } - }, - "gidLoginRequest": { - "type": "object", - "properties": { - "username": { - "type": "string", - "title": "The entered username" - }, - "password": { - "type": "string", - "title": "The entered password" - } - } - }, - "gidLogoutReply": { - "type": "object", - "properties": { - "message": { - "type": "string", - "title": "Message that tells you whether your\nlogout was succesful or not" - } - } - }, - "gidLogoutRequest": { - "type": "object", - "properties": { - "timeoflogout": { - "type": "string", - "title": "The time the logout was registered" - }, - "test": { - "type": "integer", - "format": "int32", - "description": "This is the \"Description\" of field test\nyou can use as many newlines as you want\n\n\nit will still format the same in the table", - "title": "This is the title" - }, - "stringarray": { - "type": "array", - "items": { - "type": "string" - }, - "description": "It displays that using [] infront of the type", - "title": "This is an array" - } - } - }, - "protobufAny": { - "type": "object", - "properties": { - "typeUrl": { - "type": "string", - "description": "A URL/resource name that uniquely identifies the type of the serialized\nprotocol buffer message. This string must contain at least\none \"/\" character. The last segment of the URL's path must represent\nthe fully qualified name of the type (as in\n`path/google.protobuf.Duration`). The name should be in a canonical form\n(e.g., leading \".\" is not accepted).\n\nIn practice, teams usually precompile into the binary all types that they\nexpect it to use in the context of Any. However, for URLs which use the\nscheme `http`, `https`, or no scheme, one can optionally set up a type\nserver that maps type URLs to message definitions as follows:\n\n* If no scheme is provided, `https` is assumed.\n* An HTTP GET on the URL must yield a [google.protobuf.Type][]\n value in binary format, or produce an error.\n* Applications are allowed to cache lookup results based on the\n URL, or have them precompiled into a binary to avoid any\n lookup. Therefore, binary compatibility needs to be preserved\n on changes to types. (Use versioned type names to manage\n breaking changes.)\n\nNote: this functionality is not currently available in the official\nprotobuf release, and it is not used for type URLs beginning with\ntype.googleapis.com.\n\nSchemes other than `http`, `https` (or the empty scheme) might be\nused with implementation specific semantics." - }, - "value": { - "type": "string", - "format": "byte", - "description": "Must be a valid serialized protocol buffer of the above specified type." - } - }, - "description": "`Any` contains an arbitrary serialized protocol buffer message along with a\nURL that describes the type of the serialized message.\n\nProtobuf library provides support to pack/unpack Any values in the form\nof utility functions or additional generated methods of the Any type.\n\nExample 1: Pack and unpack a message in C++.\n\n Foo foo = ...;\n Any any;\n any.PackFrom(foo);\n ...\n if (any.UnpackTo(\u0026foo)) {\n ...\n }\n\nExample 2: Pack and unpack a message in Java.\n\n Foo foo = ...;\n Any any = Any.pack(foo);\n ...\n if (any.is(Foo.class)) {\n foo = any.unpack(Foo.class);\n }\n\n Example 3: Pack and unpack a message in Python.\n\n foo = Foo(...)\n any = Any()\n any.Pack(foo)\n ...\n if any.Is(Foo.DESCRIPTOR):\n any.Unpack(foo)\n ...\n\n Example 4: Pack and unpack a message in Go\n\n foo := \u0026pb.Foo{...}\n any, err := anypb.New(foo)\n if err != nil {\n ...\n }\n ...\n foo := \u0026pb.Foo{}\n if err := any.UnmarshalTo(foo); err != nil {\n ...\n }\n\nThe pack methods provided by protobuf library will by default use\n'type.googleapis.com/full.type.name' as the type URL and the unpack\nmethods only use the fully qualified type name after the last '/'\nin the type URL, for example \"foo.bar.com/x/y.z\" will yield type\nname \"y.z\".\n\n\nJSON\n====\nThe JSON representation of an `Any` value uses the regular\nrepresentation of the deserialized, embedded message, with an\nadditional field `@type` which contains the type URL. Example:\n\n package google.profile;\n message Person {\n string first_name = 1;\n string last_name = 2;\n }\n\n {\n \"@type\": \"type.googleapis.com/google.profile.Person\",\n \"firstName\": \u003cstring\u003e,\n \"lastName\": \u003cstring\u003e\n }\n\nIf the embedded message type is well-known and has a custom JSON\nrepresentation, that representation will be embedded adding a field\n`value` which holds the custom JSON in addition to the `@type`\nfield. Example (for message [google.protobuf.Duration][]):\n\n {\n \"@type\": \"type.googleapis.com/google.protobuf.Duration\",\n \"value\": \"1.212s\"\n }" - }, - "rpcStatus": { - "type": "object", - "properties": { - "code": { - "type": "integer", - "format": "int32", - "description": "The status code, which should be an enum value of [google.rpc.Code][google.rpc.Code]." - }, - "message": { - "type": "string", - "description": "A developer-facing error message, which should be in English. Any\nuser-facing error message should be localized and sent in the\n[google.rpc.Status.details][google.rpc.Status.details] field, or localized by the client." - }, - "details": { - "type": "array", - "items": { - "$ref": "#/definitions/protobufAny" - }, - "description": "A list of messages that carry the error details. There is a common set of\nmessage types for APIs to use." - } - }, - "description": "The `Status` type defines a logical error model that is suitable for\ndifferent programming environments, including REST APIs and RPC APIs. It is\nused by [gRPC](https://github.com/grpc). Each `Status` message contains\nthree pieces of data: error code, error message, and error details.\n\nYou can find out more about this error model and how to work with it in the\n[API Design Guide](https://cloud.google.com/apis/design/errors)." - } - } -} diff --git a/example/docs/swagger/proto/gid/echo_service.swagger.json b/example/docs/swagger/proto/gid/echo_service.swagger.json deleted file mode 100644 index bc96ac34f..000000000 --- a/example/docs/swagger/proto/gid/echo_service.swagger.json +++ /dev/null @@ -1,732 +0,0 @@ -{ - "swagger": "2.0", - "info": { - "title": "proto/gid/echo_service.proto", - "version": "version not set" - }, - "tags": [ - { - "name": "EchoService" - } - ], - "consumes": [ - "application/json" - ], - "produces": [ - "application/json" - ], - "paths": { - "/v1/example/echo/{id}": { - "post": { - "summary": "Echo method receives a simple message and returns it.", - "description": "The message posted as the id parameter will also be\nreturned.", - "operationId": "EchoService_Echo", - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "$ref": "#/definitions/gidSimpleMessage" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "#/definitions/rpcStatus" - } - } - }, - "parameters": [ - { - "name": "id", - "description": "Id represents the message identifier.", - "in": "path", - "required": true, - "type": "string" - } - ], - "tags": [ - "EchoService" - ] - } - }, - "/v1/example/echo/{id}/{num}": { - "get": { - "summary": "Echo method receives a simple message and returns it.", - "description": "The message posted as the id parameter will also be\nreturned.", - "operationId": "EchoService_Echo2", - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "$ref": "#/definitions/gidSimpleMessage" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "#/definitions/rpcStatus" - } - } - }, - "parameters": [ - { - "name": "id", - "description": "Id represents the message identifier.", - "in": "path", - "required": true, - "type": "string" - }, - { - "name": "num", - "in": "path", - "required": true, - "type": "string", - "format": "int64" - }, - { - "name": "lineNum", - "in": "query", - "required": false, - "type": "string", - "format": "int64" - }, - { - "name": "lang", - "in": "query", - "required": false, - "type": "string" - }, - { - "name": "status.progress", - "in": "query", - "required": false, - "type": "string", - "format": "int64" - }, - { - "name": "status.note", - "in": "query", - "required": false, - "type": "string" - }, - { - "name": "en", - "in": "query", - "required": false, - "type": "string", - "format": "int64" - }, - { - "name": "no.progress", - "in": "query", - "required": false, - "type": "string", - "format": "int64" - }, - { - "name": "no.note", - "in": "query", - "required": false, - "type": "string" - } - ], - "tags": [ - "EchoService" - ] - } - }, - "/v1/example/echo/{id}/{num}/{lang}": { - "get": { - "summary": "Echo method receives a simple message and returns it.", - "description": "The message posted as the id parameter will also be\nreturned.", - "operationId": "EchoService_Echo3", - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "$ref": "#/definitions/gidSimpleMessage" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "#/definitions/rpcStatus" - } - } - }, - "parameters": [ - { - "name": "id", - "description": "Id represents the message identifier.", - "in": "path", - "required": true, - "type": "string" - }, - { - "name": "num", - "in": "path", - "required": true, - "type": "string", - "format": "int64" - }, - { - "name": "lang", - "in": "path", - "required": true, - "type": "string" - }, - { - "name": "lineNum", - "in": "query", - "required": false, - "type": "string", - "format": "int64" - }, - { - "name": "status.progress", - "in": "query", - "required": false, - "type": "string", - "format": "int64" - }, - { - "name": "status.note", - "in": "query", - "required": false, - "type": "string" - }, - { - "name": "en", - "in": "query", - "required": false, - "type": "string", - "format": "int64" - }, - { - "name": "no.progress", - "in": "query", - "required": false, - "type": "string", - "format": "int64" - }, - { - "name": "no.note", - "in": "query", - "required": false, - "type": "string" - } - ], - "tags": [ - "EchoService" - ] - } - }, - "/v1/example/echo1/{id}/{lineNum}/{status.note}": { - "get": { - "summary": "Echo method receives a simple message and returns it.", - "description": "The message posted as the id parameter will also be\nreturned.", - "operationId": "EchoService_Echo4", - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "$ref": "#/definitions/gidSimpleMessage" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "#/definitions/rpcStatus" - } - } - }, - "parameters": [ - { - "name": "id", - "description": "Id represents the message identifier.", - "in": "path", - "required": true, - "type": "string" - }, - { - "name": "lineNum", - "in": "path", - "required": true, - "type": "string", - "format": "int64" - }, - { - "name": "status.note", - "in": "path", - "required": true, - "type": "string" - }, - { - "name": "num", - "in": "query", - "required": false, - "type": "string", - "format": "int64" - }, - { - "name": "lang", - "in": "query", - "required": false, - "type": "string" - }, - { - "name": "status.progress", - "in": "query", - "required": false, - "type": "string", - "format": "int64" - }, - { - "name": "en", - "in": "query", - "required": false, - "type": "string", - "format": "int64" - }, - { - "name": "no.progress", - "in": "query", - "required": false, - "type": "string", - "format": "int64" - } - ], - "tags": [ - "EchoService" - ] - } - }, - "/v1/example/echo2/{no.note}": { - "get": { - "summary": "Echo method receives a simple message and returns it.", - "description": "The message posted as the id parameter will also be\nreturned.", - "operationId": "EchoService_Echo5", - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "$ref": "#/definitions/gidSimpleMessage" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "#/definitions/rpcStatus" - } - } - }, - "parameters": [ - { - "name": "no.note", - "in": "path", - "required": true, - "type": "string" - }, - { - "name": "id", - "description": "Id represents the message identifier.", - "in": "query", - "required": false, - "type": "string" - }, - { - "name": "num", - "in": "query", - "required": false, - "type": "string", - "format": "int64" - }, - { - "name": "lineNum", - "in": "query", - "required": false, - "type": "string", - "format": "int64" - }, - { - "name": "lang", - "in": "query", - "required": false, - "type": "string" - }, - { - "name": "status.progress", - "in": "query", - "required": false, - "type": "string", - "format": "int64" - }, - { - "name": "en", - "in": "query", - "required": false, - "type": "string", - "format": "int64" - }, - { - "name": "no.progress", - "in": "query", - "required": false, - "type": "string", - "format": "int64" - } - ], - "tags": [ - "EchoService" - ] - } - }, - "/v1/example/echo_body": { - "post": { - "summary": "EchoBody method receives a simple message and returns it.", - "operationId": "EchoService_EchoBody", - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "$ref": "#/definitions/gidSimpleMessage" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "#/definitions/rpcStatus" - } - } - }, - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/gidSimpleMessage" - } - } - ], - "tags": [ - "EchoService" - ] - } - }, - "/v1/example/echo_delete": { - "delete": { - "summary": "EchoDelete method receives a simple message and returns it.", - "operationId": "EchoService_EchoDelete", - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "$ref": "#/definitions/gidSimpleMessage" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "#/definitions/rpcStatus" - } - } - }, - "parameters": [ - { - "name": "id", - "description": "Id represents the message identifier.", - "in": "query", - "required": false, - "type": "string" - }, - { - "name": "num", - "in": "query", - "required": false, - "type": "string", - "format": "int64" - }, - { - "name": "lineNum", - "in": "query", - "required": false, - "type": "string", - "format": "int64" - }, - { - "name": "lang", - "in": "query", - "required": false, - "type": "string" - }, - { - "name": "status.progress", - "in": "query", - "required": false, - "type": "string", - "format": "int64" - }, - { - "name": "status.note", - "in": "query", - "required": false, - "type": "string" - }, - { - "name": "en", - "in": "query", - "required": false, - "type": "string", - "format": "int64" - }, - { - "name": "no.progress", - "in": "query", - "required": false, - "type": "string", - "format": "int64" - }, - { - "name": "no.note", - "in": "query", - "required": false, - "type": "string" - } - ], - "tags": [ - "EchoService" - ] - } - }, - "/v1/example/echo_patch": { - "patch": { - "summary": "EchoPatch method receives a NonStandardUpdateRequest and returns it.", - "operationId": "EchoService_EchoPatch", - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "$ref": "#/definitions/gidDynamicMessageUpdate" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "#/definitions/rpcStatus" - } - } - }, - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/gidDynamicMessage" - } - } - ], - "tags": [ - "EchoService" - ] - } - }, - "/v1/example/echo_unauthorized": { - "get": { - "summary": "EchoUnauthorized method receives a simple message and returns it. It must\nalways return a google.rpc.Code of `UNAUTHENTICATED` and a HTTP Status code\nof 401.", - "operationId": "EchoService_EchoUnauthorized", - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "$ref": "#/definitions/gidSimpleMessage" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "#/definitions/rpcStatus" - } - } - }, - "parameters": [ - { - "name": "id", - "description": "Id represents the message identifier.", - "in": "query", - "required": false, - "type": "string" - }, - { - "name": "num", - "in": "query", - "required": false, - "type": "string", - "format": "int64" - }, - { - "name": "lineNum", - "in": "query", - "required": false, - "type": "string", - "format": "int64" - }, - { - "name": "lang", - "in": "query", - "required": false, - "type": "string" - }, - { - "name": "status.progress", - "in": "query", - "required": false, - "type": "string", - "format": "int64" - }, - { - "name": "status.note", - "in": "query", - "required": false, - "type": "string" - }, - { - "name": "en", - "in": "query", - "required": false, - "type": "string", - "format": "int64" - }, - { - "name": "no.progress", - "in": "query", - "required": false, - "type": "string", - "format": "int64" - }, - { - "name": "no.note", - "in": "query", - "required": false, - "type": "string" - } - ], - "tags": [ - "EchoService" - ] - } - } - }, - "definitions": { - "gidDynamicMessage": { - "type": "object", - "properties": { - "structField": { - "type": "object" - }, - "valueField": { - "type": "object" - } - }, - "description": "DynamicMessage represents a message which can have its structure\nbuilt dynamically using Struct and Values." - }, - "gidDynamicMessageUpdate": { - "type": "object", - "properties": { - "body": { - "$ref": "#/definitions/gidDynamicMessage" - } - } - }, - "gidEmbedded": { - "type": "object", - "properties": { - "progress": { - "type": "string", - "format": "int64" - }, - "note": { - "type": "string" - } - }, - "description": "Embedded represents a message embedded in SimpleMessage." - }, - "gidSimpleMessage": { - "type": "object", - "properties": { - "id": { - "type": "string", - "description": "Id represents the message identifier." - }, - "num": { - "type": "string", - "format": "int64" - }, - "lineNum": { - "type": "string", - "format": "int64" - }, - "lang": { - "type": "string" - }, - "status": { - "$ref": "#/definitions/gidEmbedded" - }, - "en": { - "type": "string", - "format": "int64" - }, - "no": { - "$ref": "#/definitions/gidEmbedded" - } - }, - "description": "SimpleMessage represents a simple message sent to the Echo service." - }, - "protobufAny": { - "type": "object", - "properties": { - "typeUrl": { - "type": "string", - "description": "A URL/resource name that uniquely identifies the type of the serialized\nprotocol buffer message. This string must contain at least\none \"/\" character. The last segment of the URL's path must represent\nthe fully qualified name of the type (as in\n`path/google.protobuf.Duration`). The name should be in a canonical form\n(e.g., leading \".\" is not accepted).\n\nIn practice, teams usually precompile into the binary all types that they\nexpect it to use in the context of Any. However, for URLs which use the\nscheme `http`, `https`, or no scheme, one can optionally set up a type\nserver that maps type URLs to message definitions as follows:\n\n* If no scheme is provided, `https` is assumed.\n* An HTTP GET on the URL must yield a [google.protobuf.Type][]\n value in binary format, or produce an error.\n* Applications are allowed to cache lookup results based on the\n URL, or have them precompiled into a binary to avoid any\n lookup. Therefore, binary compatibility needs to be preserved\n on changes to types. (Use versioned type names to manage\n breaking changes.)\n\nNote: this functionality is not currently available in the official\nprotobuf release, and it is not used for type URLs beginning with\ntype.googleapis.com.\n\nSchemes other than `http`, `https` (or the empty scheme) might be\nused with implementation specific semantics." - }, - "value": { - "type": "string", - "format": "byte", - "description": "Must be a valid serialized protocol buffer of the above specified type." - } - }, - "description": "`Any` contains an arbitrary serialized protocol buffer message along with a\nURL that describes the type of the serialized message.\n\nProtobuf library provides support to pack/unpack Any values in the form\nof utility functions or additional generated methods of the Any type.\n\nExample 1: Pack and unpack a message in C++.\n\n Foo foo = ...;\n Any any;\n any.PackFrom(foo);\n ...\n if (any.UnpackTo(\u0026foo)) {\n ...\n }\n\nExample 2: Pack and unpack a message in Java.\n\n Foo foo = ...;\n Any any = Any.pack(foo);\n ...\n if (any.is(Foo.class)) {\n foo = any.unpack(Foo.class);\n }\n\n Example 3: Pack and unpack a message in Python.\n\n foo = Foo(...)\n any = Any()\n any.Pack(foo)\n ...\n if any.Is(Foo.DESCRIPTOR):\n any.Unpack(foo)\n ...\n\n Example 4: Pack and unpack a message in Go\n\n foo := \u0026pb.Foo{...}\n any, err := anypb.New(foo)\n if err != nil {\n ...\n }\n ...\n foo := \u0026pb.Foo{}\n if err := any.UnmarshalTo(foo); err != nil {\n ...\n }\n\nThe pack methods provided by protobuf library will by default use\n'type.googleapis.com/full.type.name' as the type URL and the unpack\nmethods only use the fully qualified type name after the last '/'\nin the type URL, for example \"foo.bar.com/x/y.z\" will yield type\nname \"y.z\".\n\n\nJSON\n====\nThe JSON representation of an `Any` value uses the regular\nrepresentation of the deserialized, embedded message, with an\nadditional field `@type` which contains the type URL. Example:\n\n package google.profile;\n message Person {\n string first_name = 1;\n string last_name = 2;\n }\n\n {\n \"@type\": \"type.googleapis.com/google.profile.Person\",\n \"firstName\": \u003cstring\u003e,\n \"lastName\": \u003cstring\u003e\n }\n\nIf the embedded message type is well-known and has a custom JSON\nrepresentation, that representation will be embedded adding a field\n`value` which holds the custom JSON in addition to the `@type`\nfield. Example (for message [google.protobuf.Duration][]):\n\n {\n \"@type\": \"type.googleapis.com/google.protobuf.Duration\",\n \"value\": \"1.212s\"\n }" - }, - "protobufNullValue": { - "type": "string", - "enum": [ - "NULL_VALUE" - ], - "default": "NULL_VALUE", - "description": "`NullValue` is a singleton enumeration to represent the null value for the\n`Value` type union.\n\n The JSON representation for `NullValue` is JSON `null`.\n\n - NULL_VALUE: Null value." - }, - "rpcStatus": { - "type": "object", - "properties": { - "code": { - "type": "integer", - "format": "int32", - "description": "The status code, which should be an enum value of [google.rpc.Code][google.rpc.Code]." - }, - "message": { - "type": "string", - "description": "A developer-facing error message, which should be in English. Any\nuser-facing error message should be localized and sent in the\n[google.rpc.Status.details][google.rpc.Status.details] field, or localized by the client." - }, - "details": { - "type": "array", - "items": { - "$ref": "#/definitions/protobufAny" - }, - "description": "A list of messages that carry the error details. There is a common set of\nmessage types for APIs to use." - } - }, - "description": "The `Status` type defines a logical error model that is suitable for\ndifferent programming environments, including REST APIs and RPC APIs. It is\nused by [gRPC](https://github.com/grpc). Each `Status` message contains\nthree pieces of data: error code, error message, and error details.\n\nYou can find out more about this error model and how to work with it in the\n[API Design Guide](https://cloud.google.com/apis/design/errors)." - } - } -} diff --git a/example/docs/swagger/proto/gid/id.swagger.json b/example/docs/swagger/proto/gid/id.swagger.json deleted file mode 100644 index 11e40e1c3..000000000 --- a/example/docs/swagger/proto/gid/id.swagger.json +++ /dev/null @@ -1,189 +0,0 @@ -{ - "swagger": "2.0", - "info": { - "title": "A Bit of Everything", - "version": "1.0", - "contact": { - "name": "gRPC-Gateway project", - "url": "https://github.com/grpc-ecosystem/grpc-gateway", - "email": "none@example.com" - }, - "license": { - "name": "BSD 3-Clause License", - "url": "https://github.com/grpc-ecosystem/grpc-gateway/blob/master/LICENSE.txt" - }, - "x-something-something": "yadda" - }, - "tags": [ - { - "name": "Id" - } - ], - "host": "localhost:8080", - "schemes": [ - "http", - "https", - "wss" - ], - "consumes": [ - "application/json", - "application/x-foo-mime" - ], - "produces": [ - "application/json", - "application/x-foo-mime" - ], - "paths": { - "/api/v1/id/types": { - "get": { - "summary": "Types id类型", - "description": "Registers a producer to begin publishing notifications in the local MEC environment.", - "operationId": "Id_Types", - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/gidTypesResponse" - } - }, - "400": { - "description": "Invalid content, a required property is missing", - "schema": {} - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "#/definitions/rpcStatus" - } - } - }, - "tags": [ - "Id" - ], - "deprecated": true - } - }, - "/v1/id/generate": { - "post": { - "summary": "Generate 生成ID", - "description": "Connect to a secure WebSocket to receive streaming notifications (see reference for notification to consumer for schema of messages received on websocket).", - "operationId": "Id_Generate", - "responses": { - "101": { - "description": "Upgrade to Websockets", - "schema": {} - }, - "200": { - "description": "A successful response.", - "schema": { - "$ref": "#/definitions/gidGenerateResponse" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "#/definitions/rpcStatus" - } - } - }, - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/gidGenerateRequest" - } - } - ], - "tags": [ - "Id" - ], - "deprecated": true - } - } - }, - "definitions": { - "gidGenerateRequest": { - "type": "object", - "properties": { - "type": { - "type": "string", - "title": "type of id e.g uuid, shortid, snowflake (64 bit), bigflake (128 bit)" - } - }, - "description": "Generate a unique ID. Defaults to uuid." - }, - "gidGenerateResponse": { - "type": "object", - "properties": { - "id": { - "type": "string", - "title": "the unique id generated" - }, - "type": { - "type": "string", - "title": "the type of id generated" - } - } - }, - "gidTypesResponse": { - "type": "object", - "properties": { - "types": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "title": "TypesResponse 返回值类型" - }, - "protobufAny": { - "type": "object", - "properties": { - "typeUrl": { - "type": "string", - "description": "A URL/resource name that uniquely identifies the type of the serialized\nprotocol buffer message. This string must contain at least\none \"/\" character. The last segment of the URL's path must represent\nthe fully qualified name of the type (as in\n`path/google.protobuf.Duration`). The name should be in a canonical form\n(e.g., leading \".\" is not accepted).\n\nIn practice, teams usually precompile into the binary all types that they\nexpect it to use in the context of Any. However, for URLs which use the\nscheme `http`, `https`, or no scheme, one can optionally set up a type\nserver that maps type URLs to message definitions as follows:\n\n* If no scheme is provided, `https` is assumed.\n* An HTTP GET on the URL must yield a [google.protobuf.Type][]\n value in binary format, or produce an error.\n* Applications are allowed to cache lookup results based on the\n URL, or have them precompiled into a binary to avoid any\n lookup. Therefore, binary compatibility needs to be preserved\n on changes to types. (Use versioned type names to manage\n breaking changes.)\n\nNote: this functionality is not currently available in the official\nprotobuf release, and it is not used for type URLs beginning with\ntype.googleapis.com.\n\nSchemes other than `http`, `https` (or the empty scheme) might be\nused with implementation specific semantics." - }, - "value": { - "type": "string", - "format": "byte", - "description": "Must be a valid serialized protocol buffer of the above specified type." - } - }, - "description": "`Any` contains an arbitrary serialized protocol buffer message along with a\nURL that describes the type of the serialized message.\n\nProtobuf library provides support to pack/unpack Any values in the form\nof utility functions or additional generated methods of the Any type.\n\nExample 1: Pack and unpack a message in C++.\n\n Foo foo = ...;\n Any any;\n any.PackFrom(foo);\n ...\n if (any.UnpackTo(\u0026foo)) {\n ...\n }\n\nExample 2: Pack and unpack a message in Java.\n\n Foo foo = ...;\n Any any = Any.pack(foo);\n ...\n if (any.is(Foo.class)) {\n foo = any.unpack(Foo.class);\n }\n\n Example 3: Pack and unpack a message in Python.\n\n foo = Foo(...)\n any = Any()\n any.Pack(foo)\n ...\n if any.Is(Foo.DESCRIPTOR):\n any.Unpack(foo)\n ...\n\n Example 4: Pack and unpack a message in Go\n\n foo := \u0026pb.Foo{...}\n any, err := anypb.New(foo)\n if err != nil {\n ...\n }\n ...\n foo := \u0026pb.Foo{}\n if err := any.UnmarshalTo(foo); err != nil {\n ...\n }\n\nThe pack methods provided by protobuf library will by default use\n'type.googleapis.com/full.type.name' as the type URL and the unpack\nmethods only use the fully qualified type name after the last '/'\nin the type URL, for example \"foo.bar.com/x/y.z\" will yield type\nname \"y.z\".\n\n\nJSON\n====\nThe JSON representation of an `Any` value uses the regular\nrepresentation of the deserialized, embedded message, with an\nadditional field `@type` which contains the type URL. Example:\n\n package google.profile;\n message Person {\n string first_name = 1;\n string last_name = 2;\n }\n\n {\n \"@type\": \"type.googleapis.com/google.profile.Person\",\n \"firstName\": \u003cstring\u003e,\n \"lastName\": \u003cstring\u003e\n }\n\nIf the embedded message type is well-known and has a custom JSON\nrepresentation, that representation will be embedded adding a field\n`value` which holds the custom JSON in addition to the `@type`\nfield. Example (for message [google.protobuf.Duration][]):\n\n {\n \"@type\": \"type.googleapis.com/google.protobuf.Duration\",\n \"value\": \"1.212s\"\n }" - }, - "rpcStatus": { - "type": "object", - "properties": { - "code": { - "type": "integer", - "format": "int32", - "description": "The status code, which should be an enum value of [google.rpc.Code][google.rpc.Code]." - }, - "message": { - "type": "string", - "description": "A developer-facing error message, which should be in English. Any\nuser-facing error message should be localized and sent in the\n[google.rpc.Status.details][google.rpc.Status.details] field, or localized by the client." - }, - "details": { - "type": "array", - "items": { - "$ref": "#/definitions/protobufAny" - }, - "description": "A list of messages that carry the error details. There is a common set of\nmessage types for APIs to use." - } - }, - "description": "The `Status` type defines a logical error model that is suitable for\ndifferent programming environments, including REST APIs and RPC APIs. It is\nused by [gRPC](https://github.com/grpc). Each `Status` message contains\nthree pieces of data: error code, error message, and error details.\n\nYou can find out more about this error model and how to work with it in the\n[API Design Guide](https://cloud.google.com/apis/design/errors)." - } - }, - "externalDocs": { - "description": "生成随机id", - "url": "https://github.com/pubgo/lava/tree/master/example/gid" - }, - "x-grpc-gateway-baz-list": [ - "one", - true - ], - "x-grpc-gateway-foo": "bar" -} diff --git a/example/docs/swagger/proto/hello/api.swagger.json b/example/docs/swagger/proto/hello/api.swagger.json deleted file mode 100644 index fc664faf3..000000000 --- a/example/docs/swagger/proto/hello/api.swagger.json +++ /dev/null @@ -1,373 +0,0 @@ -{ - "swagger": "2.0", - "info": { - "title": "proto/hello/api.proto", - "version": "1.0" - }, - "tags": [ - { - "name": "TestApi" - }, - { - "name": "TestApiV2" - } - ], - "schemes": [ - "https" - ], - "consumes": [ - "application/json" - ], - "produces": [ - "application/json" - ], - "paths": { - "/v1/example/versionTestCustom": { - "get": { - "summary": "VersionTest rpc custom", - "operationId": "TestApi_VersionTestCustom", - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "$ref": "#/definitions/helloTestApiOutput" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "#/definitions/rpcStatus" - } - } - }, - "parameters": [ - { - "name": "input", - "in": "query", - "required": false, - "type": "string" - }, - { - "name": "name", - "in": "query", - "required": false, - "type": "string" - } - ], - "tags": [ - "TestApi" - ] - } - }, - "/v1/example/versiontest": { - "get": { - "summary": "VersionTest rpc", - "operationId": "TestApi_VersionTest", - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "$ref": "#/definitions/helloTestApiOutput" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "#/definitions/rpcStatus" - } - } - }, - "parameters": [ - { - "name": "input", - "in": "query", - "required": false, - "type": "string" - }, - { - "name": "name", - "in": "query", - "required": false, - "type": "string" - } - ], - "tags": [ - "TestApi" - ] - } - }, - "/v1/version": { - "get": { - "summary": "Version rpc", - "operationId": "TestApi_Version", - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "$ref": "#/definitions/helloTestApiOutput" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "#/definitions/rpcStatus" - } - } - }, - "parameters": [ - { - "name": "input", - "in": "query", - "required": false, - "type": "string" - }, - { - "name": "name", - "in": "query", - "required": false, - "type": "string" - } - ], - "tags": [ - "TestApi" - ] - } - }, - "/v1/version1": { - "post": { - "operationId": "TestApi_Version1", - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "$ref": "#/definitions/helloTestApiOutput1" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "#/definitions/rpcStatus" - } - } - }, - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "type": "object" - } - } - ], - "tags": [ - "TestApi" - ] - } - }, - "/v2/example/version/{name}": { - "post": { - "operationId": "TestApiV2_Version1", - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "$ref": "#/definitions/helloTestApiOutput" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "#/definitions/rpcStatus" - } - } - }, - "parameters": [ - { - "name": "name", - "in": "path", - "required": true, - "type": "string" - }, - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "type": "object", - "properties": { - "input": { - "type": "string" - }, - "lists": { - "type": "array", - "items": { - "type": "object" - } - }, - "headers": { - "type": "object", - "additionalProperties": { - "type": "array", - "items": { - "type": "object" - } - } - } - } - } - } - ], - "tags": [ - "TestApiV2" - ] - } - }, - "/v2/example/versiontest": { - "post": { - "operationId": "TestApiV2_VersionTest1", - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "$ref": "#/definitions/helloTestApiOutput" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "#/definitions/rpcStatus" - } - } - }, - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/helloTestReq" - } - } - ], - "tags": [ - "TestApiV2" - ] - } - } - }, - "definitions": { - "helloTestApiData": { - "type": "object", - "properties": { - "version": { - "type": "string" - }, - "srv_ver": { - "type": "string" - } - } - }, - "helloTestApiOutput": { - "type": "object", - "properties": { - "code": { - "type": "integer", - "format": "int32" - }, - "msg": { - "type": "string" - }, - "nowTime": { - "type": "string", - "format": "int64" - }, - "data": { - "$ref": "#/definitions/helloTestApiData" - } - } - }, - "helloTestApiOutput1": { - "type": "object", - "properties": { - "data": { - "type": "object" - }, - "abc": { - "type": "string" - } - } - }, - "helloTestReq": { - "type": "object", - "properties": { - "input": { - "type": "string" - }, - "name": { - "type": "string" - }, - "lists": { - "type": "array", - "items": { - "type": "object" - } - }, - "headers": { - "type": "object", - "additionalProperties": { - "type": "array", - "items": { - "type": "object" - } - } - } - } - }, - "protobufAny": { - "type": "object", - "properties": { - "typeUrl": { - "type": "string", - "description": "A URL/resource name that uniquely identifies the type of the serialized\nprotocol buffer message. This string must contain at least\none \"/\" character. The last segment of the URL's path must represent\nthe fully qualified name of the type (as in\n`path/google.protobuf.Duration`). The name should be in a canonical form\n(e.g., leading \".\" is not accepted).\n\nIn practice, teams usually precompile into the binary all types that they\nexpect it to use in the context of Any. However, for URLs which use the\nscheme `http`, `https`, or no scheme, one can optionally set up a type\nserver that maps type URLs to message definitions as follows:\n\n* If no scheme is provided, `https` is assumed.\n* An HTTP GET on the URL must yield a [google.protobuf.Type][]\n value in binary format, or produce an error.\n* Applications are allowed to cache lookup results based on the\n URL, or have them precompiled into a binary to avoid any\n lookup. Therefore, binary compatibility needs to be preserved\n on changes to types. (Use versioned type names to manage\n breaking changes.)\n\nNote: this functionality is not currently available in the official\nprotobuf release, and it is not used for type URLs beginning with\ntype.googleapis.com.\n\nSchemes other than `http`, `https` (or the empty scheme) might be\nused with implementation specific semantics." - }, - "value": { - "type": "string", - "format": "byte", - "description": "Must be a valid serialized protocol buffer of the above specified type." - } - }, - "description": "`Any` contains an arbitrary serialized protocol buffer message along with a\nURL that describes the type of the serialized message.\n\nProtobuf library provides support to pack/unpack Any values in the form\nof utility functions or additional generated methods of the Any type.\n\nExample 1: Pack and unpack a message in C++.\n\n Foo foo = ...;\n Any any;\n any.PackFrom(foo);\n ...\n if (any.UnpackTo(\u0026foo)) {\n ...\n }\n\nExample 2: Pack and unpack a message in Java.\n\n Foo foo = ...;\n Any any = Any.pack(foo);\n ...\n if (any.is(Foo.class)) {\n foo = any.unpack(Foo.class);\n }\n\n Example 3: Pack and unpack a message in Python.\n\n foo = Foo(...)\n any = Any()\n any.Pack(foo)\n ...\n if any.Is(Foo.DESCRIPTOR):\n any.Unpack(foo)\n ...\n\n Example 4: Pack and unpack a message in Go\n\n foo := \u0026pb.Foo{...}\n any, err := anypb.New(foo)\n if err != nil {\n ...\n }\n ...\n foo := \u0026pb.Foo{}\n if err := any.UnmarshalTo(foo); err != nil {\n ...\n }\n\nThe pack methods provided by protobuf library will by default use\n'type.googleapis.com/full.type.name' as the type URL and the unpack\nmethods only use the fully qualified type name after the last '/'\nin the type URL, for example \"foo.bar.com/x/y.z\" will yield type\nname \"y.z\".\n\n\nJSON\n====\nThe JSON representation of an `Any` value uses the regular\nrepresentation of the deserialized, embedded message, with an\nadditional field `@type` which contains the type URL. Example:\n\n package google.profile;\n message Person {\n string first_name = 1;\n string last_name = 2;\n }\n\n {\n \"@type\": \"type.googleapis.com/google.profile.Person\",\n \"firstName\": \u003cstring\u003e,\n \"lastName\": \u003cstring\u003e\n }\n\nIf the embedded message type is well-known and has a custom JSON\nrepresentation, that representation will be embedded adding a field\n`value` which holds the custom JSON in addition to the `@type`\nfield. Example (for message [google.protobuf.Duration][]):\n\n {\n \"@type\": \"type.googleapis.com/google.protobuf.Duration\",\n \"value\": \"1.212s\"\n }" - }, - "protobufNullValue": { - "type": "string", - "enum": [ - "NULL_VALUE" - ], - "default": "NULL_VALUE", - "description": "`NullValue` is a singleton enumeration to represent the null value for the\n`Value` type union.\n\n The JSON representation for `NullValue` is JSON `null`.\n\n - NULL_VALUE: Null value." - }, - "rpcStatus": { - "type": "object", - "properties": { - "code": { - "type": "integer", - "format": "int32" - }, - "message": { - "type": "string" - }, - "details": { - "type": "array", - "items": { - "$ref": "#/definitions/protobufAny" - } - } - } - } - }, - "externalDocs": { - "description": "gRPC example repository", - "url": "https://github.com/gogo/grpc-example" - } -} diff --git a/example/docs/swagger/proto/hello/api1.swagger.json b/example/docs/swagger/proto/hello/api1.swagger.json deleted file mode 100644 index ec5c26fba..000000000 --- a/example/docs/swagger/proto/hello/api1.swagger.json +++ /dev/null @@ -1,49 +0,0 @@ -{ - "swagger": "2.0", - "info": { - "title": "proto/hello/api1.proto", - "version": "version not set" - }, - "consumes": [ - "application/json" - ], - "produces": [ - "application/json" - ], - "paths": {}, - "definitions": { - "protobufAny": { - "type": "object", - "properties": { - "typeUrl": { - "type": "string", - "description": "A URL/resource name that uniquely identifies the type of the serialized\nprotocol buffer message. This string must contain at least\none \"/\" character. The last segment of the URL's path must represent\nthe fully qualified name of the type (as in\n`path/google.protobuf.Duration`). The name should be in a canonical form\n(e.g., leading \".\" is not accepted).\n\nIn practice, teams usually precompile into the binary all types that they\nexpect it to use in the context of Any. However, for URLs which use the\nscheme `http`, `https`, or no scheme, one can optionally set up a type\nserver that maps type URLs to message definitions as follows:\n\n* If no scheme is provided, `https` is assumed.\n* An HTTP GET on the URL must yield a [google.protobuf.Type][]\n value in binary format, or produce an error.\n* Applications are allowed to cache lookup results based on the\n URL, or have them precompiled into a binary to avoid any\n lookup. Therefore, binary compatibility needs to be preserved\n on changes to types. (Use versioned type names to manage\n breaking changes.)\n\nNote: this functionality is not currently available in the official\nprotobuf release, and it is not used for type URLs beginning with\ntype.googleapis.com.\n\nSchemes other than `http`, `https` (or the empty scheme) might be\nused with implementation specific semantics." - }, - "value": { - "type": "string", - "format": "byte", - "description": "Must be a valid serialized protocol buffer of the above specified type." - } - }, - "description": "`Any` contains an arbitrary serialized protocol buffer message along with a\nURL that describes the type of the serialized message.\n\nProtobuf library provides support to pack/unpack Any values in the form\nof utility functions or additional generated methods of the Any type.\n\nExample 1: Pack and unpack a message in C++.\n\n Foo foo = ...;\n Any any;\n any.PackFrom(foo);\n ...\n if (any.UnpackTo(\u0026foo)) {\n ...\n }\n\nExample 2: Pack and unpack a message in Java.\n\n Foo foo = ...;\n Any any = Any.pack(foo);\n ...\n if (any.is(Foo.class)) {\n foo = any.unpack(Foo.class);\n }\n\n Example 3: Pack and unpack a message in Python.\n\n foo = Foo(...)\n any = Any()\n any.Pack(foo)\n ...\n if any.Is(Foo.DESCRIPTOR):\n any.Unpack(foo)\n ...\n\n Example 4: Pack and unpack a message in Go\n\n foo := \u0026pb.Foo{...}\n any, err := anypb.New(foo)\n if err != nil {\n ...\n }\n ...\n foo := \u0026pb.Foo{}\n if err := any.UnmarshalTo(foo); err != nil {\n ...\n }\n\nThe pack methods provided by protobuf library will by default use\n'type.googleapis.com/full.type.name' as the type URL and the unpack\nmethods only use the fully qualified type name after the last '/'\nin the type URL, for example \"foo.bar.com/x/y.z\" will yield type\nname \"y.z\".\n\n\nJSON\n====\nThe JSON representation of an `Any` value uses the regular\nrepresentation of the deserialized, embedded message, with an\nadditional field `@type` which contains the type URL. Example:\n\n package google.profile;\n message Person {\n string first_name = 1;\n string last_name = 2;\n }\n\n {\n \"@type\": \"type.googleapis.com/google.profile.Person\",\n \"firstName\": \u003cstring\u003e,\n \"lastName\": \u003cstring\u003e\n }\n\nIf the embedded message type is well-known and has a custom JSON\nrepresentation, that representation will be embedded adding a field\n`value` which holds the custom JSON in addition to the `@type`\nfield. Example (for message [google.protobuf.Duration][]):\n\n {\n \"@type\": \"type.googleapis.com/google.protobuf.Duration\",\n \"value\": \"1.212s\"\n }" - }, - "rpcStatus": { - "type": "object", - "properties": { - "code": { - "type": "integer", - "format": "int32" - }, - "message": { - "type": "string" - }, - "details": { - "type": "array", - "items": { - "$ref": "#/definitions/protobufAny" - } - } - } - } - } -} diff --git a/example/docs/swagger/proto/hello/example.swagger.json b/example/docs/swagger/proto/hello/example.swagger.json deleted file mode 100644 index 19df46d19..000000000 --- a/example/docs/swagger/proto/hello/example.swagger.json +++ /dev/null @@ -1,271 +0,0 @@ -{ - "swagger": "2.0", - "info": { - "title": "GoGo gRPC Example", - "description": "This example is used to show how to use gRPC and\ngRPC-Gateway with GoGo Protobuf.", - "version": "1.0" - }, - "tags": [ - { - "name": "UserService" - } - ], - "schemes": [ - "https" - ], - "consumes": [ - "application/json" - ], - "produces": [ - "application/json" - ], - "paths": { - "/api/v1/users": { - "get": { - "operationId": "UserService_ListUsers", - "responses": { - "200": { - "description": "A successful response.(streaming responses)", - "schema": { - "type": "object", - "properties": { - "result": { - "$ref": "#/definitions/helloUser" - }, - "error": { - "$ref": "#/definitions/rpcStatus" - } - }, - "title": "Stream result of helloUser" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "#/definitions/rpcStatus" - } - } - }, - "parameters": [ - { - "name": "createdSince", - "description": "Only list users created after this timestamp.", - "in": "query", - "required": false, - "type": "string", - "format": "date-time" - }, - { - "name": "olderThan", - "description": "Only list users older than this Duration.", - "in": "query", - "required": false, - "type": "string" - } - ], - "tags": [ - "UserService" - ] - }, - "post": { - "operationId": "UserService_AddUser", - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "properties": {} - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "#/definitions/rpcStatus" - } - } - }, - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/helloUser" - } - } - ], - "tags": [ - "UserService" - ] - } - }, - "/api/v1/users/role": { - "get": { - "operationId": "UserService_ListUsersByRole", - "responses": { - "200": { - "description": "A successful response.(streaming responses)", - "schema": { - "type": "object", - "properties": { - "result": { - "$ref": "#/definitions/helloUser" - }, - "error": { - "$ref": "#/definitions/rpcStatus" - } - }, - "title": "Stream result of helloUser" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "#/definitions/rpcStatus" - } - } - }, - "parameters": [ - { - "name": "role", - "in": "query", - "required": false, - "type": "string", - "enum": [ - "GUEST", - "MEMBER", - "ADMIN" - ], - "default": "GUEST" - } - ], - "tags": [ - "UserService" - ] - } - }, - "/api/v1/users/{user.id}": { - "patch": { - "operationId": "UserService_UpdateUser", - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "$ref": "#/definitions/helloUser" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "#/definitions/rpcStatus" - } - } - }, - "parameters": [ - { - "name": "user.id", - "in": "path", - "required": true, - "type": "integer", - "format": "int64" - }, - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/helloUpdateUserRequest" - } - } - ], - "tags": [ - "UserService" - ] - } - } - }, - "definitions": { - "helloRole": { - "type": "string", - "enum": [ - "GUEST", - "MEMBER", - "ADMIN" - ], - "default": "GUEST" - }, - "helloUpdateUserRequest": { - "type": "object", - "properties": { - "user": { - "$ref": "#/definitions/helloUser", - "description": "The user resource which replaces the resource on the server." - }, - "updateMask": { - "type": "string", - "title": "The update mask applies to the resource. For the `FieldMask` definition,\nsee https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask" - } - } - }, - "helloUser": { - "type": "object", - "properties": { - "id": { - "type": "integer", - "format": "int64" - }, - "role": { - "$ref": "#/definitions/helloRole" - }, - "createDate": { - "type": "string", - "format": "date-time" - } - } - }, - "protobufAny": { - "type": "object", - "properties": { - "typeUrl": { - "type": "string", - "description": "A URL/resource name that uniquely identifies the type of the serialized\nprotocol buffer message. This string must contain at least\none \"/\" character. The last segment of the URL's path must represent\nthe fully qualified name of the type (as in\n`path/google.protobuf.Duration`). The name should be in a canonical form\n(e.g., leading \".\" is not accepted).\n\nIn practice, teams usually precompile into the binary all types that they\nexpect it to use in the context of Any. However, for URLs which use the\nscheme `http`, `https`, or no scheme, one can optionally set up a type\nserver that maps type URLs to message definitions as follows:\n\n* If no scheme is provided, `https` is assumed.\n* An HTTP GET on the URL must yield a [google.protobuf.Type][]\n value in binary format, or produce an error.\n* Applications are allowed to cache lookup results based on the\n URL, or have them precompiled into a binary to avoid any\n lookup. Therefore, binary compatibility needs to be preserved\n on changes to types. (Use versioned type names to manage\n breaking changes.)\n\nNote: this functionality is not currently available in the official\nprotobuf release, and it is not used for type URLs beginning with\ntype.googleapis.com.\n\nSchemes other than `http`, `https` (or the empty scheme) might be\nused with implementation specific semantics." - }, - "value": { - "type": "string", - "format": "byte", - "description": "Must be a valid serialized protocol buffer of the above specified type." - } - }, - "description": "`Any` contains an arbitrary serialized protocol buffer message along with a\nURL that describes the type of the serialized message.\n\nProtobuf library provides support to pack/unpack Any values in the form\nof utility functions or additional generated methods of the Any type.\n\nExample 1: Pack and unpack a message in C++.\n\n Foo foo = ...;\n Any any;\n any.PackFrom(foo);\n ...\n if (any.UnpackTo(\u0026foo)) {\n ...\n }\n\nExample 2: Pack and unpack a message in Java.\n\n Foo foo = ...;\n Any any = Any.pack(foo);\n ...\n if (any.is(Foo.class)) {\n foo = any.unpack(Foo.class);\n }\n\n Example 3: Pack and unpack a message in Python.\n\n foo = Foo(...)\n any = Any()\n any.Pack(foo)\n ...\n if any.Is(Foo.DESCRIPTOR):\n any.Unpack(foo)\n ...\n\n Example 4: Pack and unpack a message in Go\n\n foo := \u0026pb.Foo{...}\n any, err := anypb.New(foo)\n if err != nil {\n ...\n }\n ...\n foo := \u0026pb.Foo{}\n if err := any.UnmarshalTo(foo); err != nil {\n ...\n }\n\nThe pack methods provided by protobuf library will by default use\n'type.googleapis.com/full.type.name' as the type URL and the unpack\nmethods only use the fully qualified type name after the last '/'\nin the type URL, for example \"foo.bar.com/x/y.z\" will yield type\nname \"y.z\".\n\n\nJSON\n====\nThe JSON representation of an `Any` value uses the regular\nrepresentation of the deserialized, embedded message, with an\nadditional field `@type` which contains the type URL. Example:\n\n package google.profile;\n message Person {\n string first_name = 1;\n string last_name = 2;\n }\n\n {\n \"@type\": \"type.googleapis.com/google.profile.Person\",\n \"firstName\": \u003cstring\u003e,\n \"lastName\": \u003cstring\u003e\n }\n\nIf the embedded message type is well-known and has a custom JSON\nrepresentation, that representation will be embedded adding a field\n`value` which holds the custom JSON in addition to the `@type`\nfield. Example (for message [google.protobuf.Duration][]):\n\n {\n \"@type\": \"type.googleapis.com/google.protobuf.Duration\",\n \"value\": \"1.212s\"\n }" - }, - "protobufNullValue": { - "type": "string", - "enum": [ - "NULL_VALUE" - ], - "default": "NULL_VALUE", - "description": "`NullValue` is a singleton enumeration to represent the null value for the\n`Value` type union.\n\n The JSON representation for `NullValue` is JSON `null`.\n\n - NULL_VALUE: Null value." - }, - "rpcStatus": { - "type": "object", - "properties": { - "code": { - "type": "integer", - "format": "int32" - }, - "message": { - "type": "string" - }, - "details": { - "type": "array", - "items": { - "$ref": "#/definitions/protobufAny" - } - } - } - } - }, - "externalDocs": { - "description": "gRPC example repository", - "url": "https://github.com/gogo/grpc-example" - } -} diff --git a/example/docs/swagger/proto/hello/helloworld.swagger.json b/example/docs/swagger/proto/hello/helloworld.swagger.json deleted file mode 100644 index 45e49e553..000000000 --- a/example/docs/swagger/proto/hello/helloworld.swagger.json +++ /dev/null @@ -1,973 +0,0 @@ -{ - "swagger": "2.0", - "info": { - "title": "proto/hello/helloworld.proto", - "version": "version not set" - }, - "tags": [ - { - "name": "Greeter" - } - ], - "consumes": [ - "application/json" - ], - "produces": [ - "application/json" - ], - "paths": { - "/say/boolval/{boolVal}": { - "get": { - "operationId": "Greeter_SayHello5", - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "$ref": "#/definitions/helloHelloReply" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "#/definitions/rpcStatus" - } - } - }, - "parameters": [ - { - "name": "boolVal", - "in": "path", - "required": true, - "type": "boolean" - }, - { - "name": "name", - "in": "query", - "required": false, - "type": "string" - }, - { - "name": "strVal", - "in": "query", - "required": false, - "type": "string" - }, - { - "name": "floatVal", - "in": "query", - "required": false, - "type": "number", - "format": "float" - }, - { - "name": "doubleVal", - "in": "query", - "required": false, - "type": "number", - "format": "double" - }, - { - "name": "bytesVal", - "in": "query", - "required": false, - "type": "string", - "format": "byte" - }, - { - "name": "int32Val", - "in": "query", - "required": false, - "type": "integer", - "format": "int32" - }, - { - "name": "uint32Val", - "in": "query", - "required": false, - "type": "integer", - "format": "int64" - }, - { - "name": "int64Val", - "in": "query", - "required": false, - "type": "string", - "format": "int64" - }, - { - "name": "uint64Val", - "in": "query", - "required": false, - "type": "string", - "format": "uint64" - } - ], - "tags": [ - "Greeter" - ] - } - }, - "/say/bytesval/{bytesVal}": { - "get": { - "operationId": "Greeter_SayHello6", - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "$ref": "#/definitions/helloHelloReply" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "#/definitions/rpcStatus" - } - } - }, - "parameters": [ - { - "name": "bytesVal", - "in": "path", - "required": true, - "type": "string", - "format": "byte" - }, - { - "name": "name", - "in": "query", - "required": false, - "type": "string" - }, - { - "name": "strVal", - "in": "query", - "required": false, - "type": "string" - }, - { - "name": "floatVal", - "in": "query", - "required": false, - "type": "number", - "format": "float" - }, - { - "name": "doubleVal", - "in": "query", - "required": false, - "type": "number", - "format": "double" - }, - { - "name": "boolVal", - "in": "query", - "required": false, - "type": "boolean" - }, - { - "name": "int32Val", - "in": "query", - "required": false, - "type": "integer", - "format": "int32" - }, - { - "name": "uint32Val", - "in": "query", - "required": false, - "type": "integer", - "format": "int64" - }, - { - "name": "int64Val", - "in": "query", - "required": false, - "type": "string", - "format": "int64" - }, - { - "name": "uint64Val", - "in": "query", - "required": false, - "type": "string", - "format": "uint64" - } - ], - "tags": [ - "Greeter" - ] - } - }, - "/say/doubleval/{doubleVal}": { - "get": { - "operationId": "Greeter_SayHello4", - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "$ref": "#/definitions/helloHelloReply" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "#/definitions/rpcStatus" - } - } - }, - "parameters": [ - { - "name": "doubleVal", - "in": "path", - "required": true, - "type": "number", - "format": "double" - }, - { - "name": "name", - "in": "query", - "required": false, - "type": "string" - }, - { - "name": "strVal", - "in": "query", - "required": false, - "type": "string" - }, - { - "name": "floatVal", - "in": "query", - "required": false, - "type": "number", - "format": "float" - }, - { - "name": "boolVal", - "in": "query", - "required": false, - "type": "boolean" - }, - { - "name": "bytesVal", - "in": "query", - "required": false, - "type": "string", - "format": "byte" - }, - { - "name": "int32Val", - "in": "query", - "required": false, - "type": "integer", - "format": "int32" - }, - { - "name": "uint32Val", - "in": "query", - "required": false, - "type": "integer", - "format": "int64" - }, - { - "name": "int64Val", - "in": "query", - "required": false, - "type": "string", - "format": "int64" - }, - { - "name": "uint64Val", - "in": "query", - "required": false, - "type": "string", - "format": "uint64" - } - ], - "tags": [ - "Greeter" - ] - } - }, - "/say/floatval/{floatVal}": { - "get": { - "operationId": "Greeter_SayHello3", - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "$ref": "#/definitions/helloHelloReply" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "#/definitions/rpcStatus" - } - } - }, - "parameters": [ - { - "name": "floatVal", - "in": "path", - "required": true, - "type": "number", - "format": "float" - }, - { - "name": "name", - "in": "query", - "required": false, - "type": "string" - }, - { - "name": "strVal", - "in": "query", - "required": false, - "type": "string" - }, - { - "name": "doubleVal", - "in": "query", - "required": false, - "type": "number", - "format": "double" - }, - { - "name": "boolVal", - "in": "query", - "required": false, - "type": "boolean" - }, - { - "name": "bytesVal", - "in": "query", - "required": false, - "type": "string", - "format": "byte" - }, - { - "name": "int32Val", - "in": "query", - "required": false, - "type": "integer", - "format": "int32" - }, - { - "name": "uint32Val", - "in": "query", - "required": false, - "type": "integer", - "format": "int64" - }, - { - "name": "int64Val", - "in": "query", - "required": false, - "type": "string", - "format": "int64" - }, - { - "name": "uint64Val", - "in": "query", - "required": false, - "type": "string", - "format": "uint64" - } - ], - "tags": [ - "Greeter" - ] - } - }, - "/say/int32val/{int32Val}": { - "get": { - "operationId": "Greeter_SayHello7", - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "$ref": "#/definitions/helloHelloReply" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "#/definitions/rpcStatus" - } - } - }, - "parameters": [ - { - "name": "int32Val", - "in": "path", - "required": true, - "type": "integer", - "format": "int32" - }, - { - "name": "name", - "in": "query", - "required": false, - "type": "string" - }, - { - "name": "strVal", - "in": "query", - "required": false, - "type": "string" - }, - { - "name": "floatVal", - "in": "query", - "required": false, - "type": "number", - "format": "float" - }, - { - "name": "doubleVal", - "in": "query", - "required": false, - "type": "number", - "format": "double" - }, - { - "name": "boolVal", - "in": "query", - "required": false, - "type": "boolean" - }, - { - "name": "bytesVal", - "in": "query", - "required": false, - "type": "string", - "format": "byte" - }, - { - "name": "uint32Val", - "in": "query", - "required": false, - "type": "integer", - "format": "int64" - }, - { - "name": "int64Val", - "in": "query", - "required": false, - "type": "string", - "format": "int64" - }, - { - "name": "uint64Val", - "in": "query", - "required": false, - "type": "string", - "format": "uint64" - } - ], - "tags": [ - "Greeter" - ] - } - }, - "/say/int64val/{int64Val}": { - "get": { - "operationId": "Greeter_SayHello9", - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "$ref": "#/definitions/helloHelloReply" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "#/definitions/rpcStatus" - } - } - }, - "parameters": [ - { - "name": "int64Val", - "in": "path", - "required": true, - "type": "string", - "format": "int64" - }, - { - "name": "name", - "in": "query", - "required": false, - "type": "string" - }, - { - "name": "strVal", - "in": "query", - "required": false, - "type": "string" - }, - { - "name": "floatVal", - "in": "query", - "required": false, - "type": "number", - "format": "float" - }, - { - "name": "doubleVal", - "in": "query", - "required": false, - "type": "number", - "format": "double" - }, - { - "name": "boolVal", - "in": "query", - "required": false, - "type": "boolean" - }, - { - "name": "bytesVal", - "in": "query", - "required": false, - "type": "string", - "format": "byte" - }, - { - "name": "int32Val", - "in": "query", - "required": false, - "type": "integer", - "format": "int32" - }, - { - "name": "uint32Val", - "in": "query", - "required": false, - "type": "integer", - "format": "int64" - }, - { - "name": "uint64Val", - "in": "query", - "required": false, - "type": "string", - "format": "uint64" - } - ], - "tags": [ - "Greeter" - ] - } - }, - "/say/strval/{strVal}": { - "get": { - "operationId": "Greeter_SayHello2", - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "$ref": "#/definitions/helloHelloReply" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "#/definitions/rpcStatus" - } - } - }, - "parameters": [ - { - "name": "strVal", - "in": "path", - "required": true, - "type": "string" - }, - { - "name": "name", - "in": "query", - "required": false, - "type": "string" - }, - { - "name": "floatVal", - "in": "query", - "required": false, - "type": "number", - "format": "float" - }, - { - "name": "doubleVal", - "in": "query", - "required": false, - "type": "number", - "format": "double" - }, - { - "name": "boolVal", - "in": "query", - "required": false, - "type": "boolean" - }, - { - "name": "bytesVal", - "in": "query", - "required": false, - "type": "string", - "format": "byte" - }, - { - "name": "int32Val", - "in": "query", - "required": false, - "type": "integer", - "format": "int32" - }, - { - "name": "uint32Val", - "in": "query", - "required": false, - "type": "integer", - "format": "int64" - }, - { - "name": "int64Val", - "in": "query", - "required": false, - "type": "string", - "format": "int64" - }, - { - "name": "uint64Val", - "in": "query", - "required": false, - "type": "string", - "format": "uint64" - } - ], - "tags": [ - "Greeter" - ] - } - }, - "/say/uint32val/{uint32Val}": { - "get": { - "operationId": "Greeter_SayHello8", - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "$ref": "#/definitions/helloHelloReply" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "#/definitions/rpcStatus" - } - } - }, - "parameters": [ - { - "name": "uint32Val", - "in": "path", - "required": true, - "type": "integer", - "format": "int64" - }, - { - "name": "name", - "in": "query", - "required": false, - "type": "string" - }, - { - "name": "strVal", - "in": "query", - "required": false, - "type": "string" - }, - { - "name": "floatVal", - "in": "query", - "required": false, - "type": "number", - "format": "float" - }, - { - "name": "doubleVal", - "in": "query", - "required": false, - "type": "number", - "format": "double" - }, - { - "name": "boolVal", - "in": "query", - "required": false, - "type": "boolean" - }, - { - "name": "bytesVal", - "in": "query", - "required": false, - "type": "string", - "format": "byte" - }, - { - "name": "int32Val", - "in": "query", - "required": false, - "type": "integer", - "format": "int32" - }, - { - "name": "int64Val", - "in": "query", - "required": false, - "type": "string", - "format": "int64" - }, - { - "name": "uint64Val", - "in": "query", - "required": false, - "type": "string", - "format": "uint64" - } - ], - "tags": [ - "Greeter" - ] - } - }, - "/say/uint64val/{uint64Val}": { - "get": { - "operationId": "Greeter_SayHello10", - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "$ref": "#/definitions/helloHelloReply" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "#/definitions/rpcStatus" - } - } - }, - "parameters": [ - { - "name": "uint64Val", - "in": "path", - "required": true, - "type": "string", - "format": "uint64" - }, - { - "name": "name", - "in": "query", - "required": false, - "type": "string" - }, - { - "name": "strVal", - "in": "query", - "required": false, - "type": "string" - }, - { - "name": "floatVal", - "in": "query", - "required": false, - "type": "number", - "format": "float" - }, - { - "name": "doubleVal", - "in": "query", - "required": false, - "type": "number", - "format": "double" - }, - { - "name": "boolVal", - "in": "query", - "required": false, - "type": "boolean" - }, - { - "name": "bytesVal", - "in": "query", - "required": false, - "type": "string", - "format": "byte" - }, - { - "name": "int32Val", - "in": "query", - "required": false, - "type": "integer", - "format": "int32" - }, - { - "name": "uint32Val", - "in": "query", - "required": false, - "type": "integer", - "format": "int64" - }, - { - "name": "int64Val", - "in": "query", - "required": false, - "type": "string", - "format": "int64" - } - ], - "tags": [ - "Greeter" - ] - } - }, - "/say/{name}": { - "get": { - "operationId": "Greeter_SayHello", - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "$ref": "#/definitions/helloHelloReply" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "#/definitions/rpcStatus" - } - } - }, - "parameters": [ - { - "name": "name", - "in": "path", - "required": true, - "type": "string" - }, - { - "name": "strVal", - "in": "query", - "required": false, - "type": "string" - }, - { - "name": "floatVal", - "in": "query", - "required": false, - "type": "number", - "format": "float" - }, - { - "name": "doubleVal", - "in": "query", - "required": false, - "type": "number", - "format": "double" - }, - { - "name": "boolVal", - "in": "query", - "required": false, - "type": "boolean" - }, - { - "name": "bytesVal", - "in": "query", - "required": false, - "type": "string", - "format": "byte" - }, - { - "name": "int32Val", - "in": "query", - "required": false, - "type": "integer", - "format": "int32" - }, - { - "name": "uint32Val", - "in": "query", - "required": false, - "type": "integer", - "format": "int64" - }, - { - "name": "int64Val", - "in": "query", - "required": false, - "type": "string", - "format": "int64" - }, - { - "name": "uint64Val", - "in": "query", - "required": false, - "type": "string", - "format": "uint64" - } - ], - "tags": [ - "Greeter" - ] - } - } - }, - "definitions": { - "helloHelloReply": { - "type": "object", - "properties": { - "message": { - "type": "string" - } - } - }, - "protobufAny": { - "type": "object", - "properties": { - "typeUrl": { - "type": "string", - "description": "A URL/resource name that uniquely identifies the type of the serialized\nprotocol buffer message. This string must contain at least\none \"/\" character. The last segment of the URL's path must represent\nthe fully qualified name of the type (as in\n`path/google.protobuf.Duration`). The name should be in a canonical form\n(e.g., leading \".\" is not accepted).\n\nIn practice, teams usually precompile into the binary all types that they\nexpect it to use in the context of Any. However, for URLs which use the\nscheme `http`, `https`, or no scheme, one can optionally set up a type\nserver that maps type URLs to message definitions as follows:\n\n* If no scheme is provided, `https` is assumed.\n* An HTTP GET on the URL must yield a [google.protobuf.Type][]\n value in binary format, or produce an error.\n* Applications are allowed to cache lookup results based on the\n URL, or have them precompiled into a binary to avoid any\n lookup. Therefore, binary compatibility needs to be preserved\n on changes to types. (Use versioned type names to manage\n breaking changes.)\n\nNote: this functionality is not currently available in the official\nprotobuf release, and it is not used for type URLs beginning with\ntype.googleapis.com.\n\nSchemes other than `http`, `https` (or the empty scheme) might be\nused with implementation specific semantics." - }, - "value": { - "type": "string", - "format": "byte", - "description": "Must be a valid serialized protocol buffer of the above specified type." - } - }, - "description": "`Any` contains an arbitrary serialized protocol buffer message along with a\nURL that describes the type of the serialized message.\n\nProtobuf library provides support to pack/unpack Any values in the form\nof utility functions or additional generated methods of the Any type.\n\nExample 1: Pack and unpack a message in C++.\n\n Foo foo = ...;\n Any any;\n any.PackFrom(foo);\n ...\n if (any.UnpackTo(\u0026foo)) {\n ...\n }\n\nExample 2: Pack and unpack a message in Java.\n\n Foo foo = ...;\n Any any = Any.pack(foo);\n ...\n if (any.is(Foo.class)) {\n foo = any.unpack(Foo.class);\n }\n\n Example 3: Pack and unpack a message in Python.\n\n foo = Foo(...)\n any = Any()\n any.Pack(foo)\n ...\n if any.Is(Foo.DESCRIPTOR):\n any.Unpack(foo)\n ...\n\n Example 4: Pack and unpack a message in Go\n\n foo := \u0026pb.Foo{...}\n any, err := anypb.New(foo)\n if err != nil {\n ...\n }\n ...\n foo := \u0026pb.Foo{}\n if err := any.UnmarshalTo(foo); err != nil {\n ...\n }\n\nThe pack methods provided by protobuf library will by default use\n'type.googleapis.com/full.type.name' as the type URL and the unpack\nmethods only use the fully qualified type name after the last '/'\nin the type URL, for example \"foo.bar.com/x/y.z\" will yield type\nname \"y.z\".\n\n\nJSON\n====\nThe JSON representation of an `Any` value uses the regular\nrepresentation of the deserialized, embedded message, with an\nadditional field `@type` which contains the type URL. Example:\n\n package google.profile;\n message Person {\n string first_name = 1;\n string last_name = 2;\n }\n\n {\n \"@type\": \"type.googleapis.com/google.profile.Person\",\n \"firstName\": \u003cstring\u003e,\n \"lastName\": \u003cstring\u003e\n }\n\nIf the embedded message type is well-known and has a custom JSON\nrepresentation, that representation will be embedded adding a field\n`value` which holds the custom JSON in addition to the `@type`\nfield. Example (for message [google.protobuf.Duration][]):\n\n {\n \"@type\": \"type.googleapis.com/google.protobuf.Duration\",\n \"value\": \"1.212s\"\n }" - }, - "rpcStatus": { - "type": "object", - "properties": { - "code": { - "type": "integer", - "format": "int32" - }, - "message": { - "type": "string" - }, - "details": { - "type": "array", - "items": { - "$ref": "#/definitions/protobufAny" - } - } - } - } - } -} diff --git a/example/docs/swagger/proto/hello/proto3.swagger.json b/example/docs/swagger/proto/hello/proto3.swagger.json deleted file mode 100644 index fe345320b..000000000 --- a/example/docs/swagger/proto/hello/proto3.swagger.json +++ /dev/null @@ -1,49 +0,0 @@ -{ - "swagger": "2.0", - "info": { - "title": "proto/hello/proto3.proto", - "version": "version not set" - }, - "consumes": [ - "application/json" - ], - "produces": [ - "application/json" - ], - "paths": {}, - "definitions": { - "protobufAny": { - "type": "object", - "properties": { - "typeUrl": { - "type": "string", - "description": "A URL/resource name that uniquely identifies the type of the serialized\nprotocol buffer message. This string must contain at least\none \"/\" character. The last segment of the URL's path must represent\nthe fully qualified name of the type (as in\n`path/google.protobuf.Duration`). The name should be in a canonical form\n(e.g., leading \".\" is not accepted).\n\nIn practice, teams usually precompile into the binary all types that they\nexpect it to use in the context of Any. However, for URLs which use the\nscheme `http`, `https`, or no scheme, one can optionally set up a type\nserver that maps type URLs to message definitions as follows:\n\n* If no scheme is provided, `https` is assumed.\n* An HTTP GET on the URL must yield a [google.protobuf.Type][]\n value in binary format, or produce an error.\n* Applications are allowed to cache lookup results based on the\n URL, or have them precompiled into a binary to avoid any\n lookup. Therefore, binary compatibility needs to be preserved\n on changes to types. (Use versioned type names to manage\n breaking changes.)\n\nNote: this functionality is not currently available in the official\nprotobuf release, and it is not used for type URLs beginning with\ntype.googleapis.com.\n\nSchemes other than `http`, `https` (or the empty scheme) might be\nused with implementation specific semantics." - }, - "value": { - "type": "string", - "format": "byte", - "description": "Must be a valid serialized protocol buffer of the above specified type." - } - }, - "description": "`Any` contains an arbitrary serialized protocol buffer message along with a\nURL that describes the type of the serialized message.\n\nProtobuf library provides support to pack/unpack Any values in the form\nof utility functions or additional generated methods of the Any type.\n\nExample 1: Pack and unpack a message in C++.\n\n Foo foo = ...;\n Any any;\n any.PackFrom(foo);\n ...\n if (any.UnpackTo(\u0026foo)) {\n ...\n }\n\nExample 2: Pack and unpack a message in Java.\n\n Foo foo = ...;\n Any any = Any.pack(foo);\n ...\n if (any.is(Foo.class)) {\n foo = any.unpack(Foo.class);\n }\n\n Example 3: Pack and unpack a message in Python.\n\n foo = Foo(...)\n any = Any()\n any.Pack(foo)\n ...\n if any.Is(Foo.DESCRIPTOR):\n any.Unpack(foo)\n ...\n\n Example 4: Pack and unpack a message in Go\n\n foo := \u0026pb.Foo{...}\n any, err := anypb.New(foo)\n if err != nil {\n ...\n }\n ...\n foo := \u0026pb.Foo{}\n if err := any.UnmarshalTo(foo); err != nil {\n ...\n }\n\nThe pack methods provided by protobuf library will by default use\n'type.googleapis.com/full.type.name' as the type URL and the unpack\nmethods only use the fully qualified type name after the last '/'\nin the type URL, for example \"foo.bar.com/x/y.z\" will yield type\nname \"y.z\".\n\n\nJSON\n====\nThe JSON representation of an `Any` value uses the regular\nrepresentation of the deserialized, embedded message, with an\nadditional field `@type` which contains the type URL. Example:\n\n package google.profile;\n message Person {\n string first_name = 1;\n string last_name = 2;\n }\n\n {\n \"@type\": \"type.googleapis.com/google.profile.Person\",\n \"firstName\": \u003cstring\u003e,\n \"lastName\": \u003cstring\u003e\n }\n\nIf the embedded message type is well-known and has a custom JSON\nrepresentation, that representation will be embedded adding a field\n`value` which holds the custom JSON in addition to the `@type`\nfield. Example (for message [google.protobuf.Duration][]):\n\n {\n \"@type\": \"type.googleapis.com/google.protobuf.Duration\",\n \"value\": \"1.212s\"\n }" - }, - "rpcStatus": { - "type": "object", - "properties": { - "code": { - "type": "integer", - "format": "int32" - }, - "message": { - "type": "string" - }, - "details": { - "type": "array", - "items": { - "$ref": "#/definitions/protobufAny" - } - } - } - } - } -} diff --git a/example/docs/swagger/proto/hello/transport.swagger.json b/example/docs/swagger/proto/hello/transport.swagger.json deleted file mode 100644 index 0dc785d5f..000000000 --- a/example/docs/swagger/proto/hello/transport.swagger.json +++ /dev/null @@ -1,101 +0,0 @@ -{ - "swagger": "2.0", - "info": { - "title": "proto/hello/transport.proto", - "version": "version not set" - }, - "tags": [ - { - "name": "Transport" - } - ], - "consumes": [ - "application/json" - ], - "produces": [ - "application/json" - ], - "paths": { - "/v1/Transport/TestStream3": { - "get": { - "operationId": "Transport_TestStream3", - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "$ref": "#/definitions/helloMessage" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "#/definitions/rpcStatus" - } - } - }, - "parameters": [ - { - "name": "body", - "in": "query", - "required": false, - "type": "string", - "format": "byte" - } - ], - "tags": [ - "Transport" - ] - } - } - }, - "definitions": { - "helloMessage": { - "type": "object", - "properties": { - "header": { - "type": "object", - "additionalProperties": { - "type": "string" - } - }, - "body": { - "type": "string", - "format": "byte" - } - } - }, - "protobufAny": { - "type": "object", - "properties": { - "typeUrl": { - "type": "string", - "description": "A URL/resource name that uniquely identifies the type of the serialized\nprotocol buffer message. This string must contain at least\none \"/\" character. The last segment of the URL's path must represent\nthe fully qualified name of the type (as in\n`path/google.protobuf.Duration`). The name should be in a canonical form\n(e.g., leading \".\" is not accepted).\n\nIn practice, teams usually precompile into the binary all types that they\nexpect it to use in the context of Any. However, for URLs which use the\nscheme `http`, `https`, or no scheme, one can optionally set up a type\nserver that maps type URLs to message definitions as follows:\n\n* If no scheme is provided, `https` is assumed.\n* An HTTP GET on the URL must yield a [google.protobuf.Type][]\n value in binary format, or produce an error.\n* Applications are allowed to cache lookup results based on the\n URL, or have them precompiled into a binary to avoid any\n lookup. Therefore, binary compatibility needs to be preserved\n on changes to types. (Use versioned type names to manage\n breaking changes.)\n\nNote: this functionality is not currently available in the official\nprotobuf release, and it is not used for type URLs beginning with\ntype.googleapis.com.\n\nSchemes other than `http`, `https` (or the empty scheme) might be\nused with implementation specific semantics." - }, - "value": { - "type": "string", - "format": "byte", - "description": "Must be a valid serialized protocol buffer of the above specified type." - } - }, - "description": "`Any` contains an arbitrary serialized protocol buffer message along with a\nURL that describes the type of the serialized message.\n\nProtobuf library provides support to pack/unpack Any values in the form\nof utility functions or additional generated methods of the Any type.\n\nExample 1: Pack and unpack a message in C++.\n\n Foo foo = ...;\n Any any;\n any.PackFrom(foo);\n ...\n if (any.UnpackTo(\u0026foo)) {\n ...\n }\n\nExample 2: Pack and unpack a message in Java.\n\n Foo foo = ...;\n Any any = Any.pack(foo);\n ...\n if (any.is(Foo.class)) {\n foo = any.unpack(Foo.class);\n }\n\n Example 3: Pack and unpack a message in Python.\n\n foo = Foo(...)\n any = Any()\n any.Pack(foo)\n ...\n if any.Is(Foo.DESCRIPTOR):\n any.Unpack(foo)\n ...\n\n Example 4: Pack and unpack a message in Go\n\n foo := \u0026pb.Foo{...}\n any, err := anypb.New(foo)\n if err != nil {\n ...\n }\n ...\n foo := \u0026pb.Foo{}\n if err := any.UnmarshalTo(foo); err != nil {\n ...\n }\n\nThe pack methods provided by protobuf library will by default use\n'type.googleapis.com/full.type.name' as the type URL and the unpack\nmethods only use the fully qualified type name after the last '/'\nin the type URL, for example \"foo.bar.com/x/y.z\" will yield type\nname \"y.z\".\n\n\nJSON\n====\nThe JSON representation of an `Any` value uses the regular\nrepresentation of the deserialized, embedded message, with an\nadditional field `@type` which contains the type URL. Example:\n\n package google.profile;\n message Person {\n string first_name = 1;\n string last_name = 2;\n }\n\n {\n \"@type\": \"type.googleapis.com/google.profile.Person\",\n \"firstName\": \u003cstring\u003e,\n \"lastName\": \u003cstring\u003e\n }\n\nIf the embedded message type is well-known and has a custom JSON\nrepresentation, that representation will be embedded adding a field\n`value` which holds the custom JSON in addition to the `@type`\nfield. Example (for message [google.protobuf.Duration][]):\n\n {\n \"@type\": \"type.googleapis.com/google.protobuf.Duration\",\n \"value\": \"1.212s\"\n }" - }, - "rpcStatus": { - "type": "object", - "properties": { - "code": { - "type": "integer", - "format": "int32" - }, - "message": { - "type": "string" - }, - "details": { - "type": "array", - "items": { - "$ref": "#/definitions/protobufAny" - } - } - } - } - } -} diff --git a/example/docs/swagger/proto/login/bind.swagger.json b/example/docs/swagger/proto/login/bind.swagger.json deleted file mode 100644 index 4f91ec2c6..000000000 --- a/example/docs/swagger/proto/login/bind.swagger.json +++ /dev/null @@ -1,551 +0,0 @@ -{ - "swagger": "2.0", - "info": { - "title": "绑定手机号", - "version": "version not set" - }, - "tags": [ - { - "name": "BindTelephone" - } - ], - "consumes": [ - "application/json" - ], - "produces": [ - "application/json" - ], - "paths": { - "/user/bind-telephone/automatic-bind": { - "post": { - "summary": "手机号绑定,不通过验证码", - "operationId": "BindTelephone_AutomaticBind", - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "$ref": "#/definitions/loginAutomaticBindResponse" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "#/definitions/rpcStatus" - } - } - }, - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/loginAutomaticBindRequest" - } - } - ], - "tags": [ - "BindTelephone" - ] - } - }, - "/user/bind-telephone/bind-change": { - "post": { - "summary": "通过验证码,进行手机号绑定,换绑", - "operationId": "BindTelephone_BindChange", - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "$ref": "#/definitions/loginBindChangeResponse" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "#/definitions/rpcStatus" - } - } - }, - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/loginBindChangeRequest" - } - } - ], - "tags": [ - "BindTelephone" - ] - } - }, - "/user/bind-telephone/bind-phone-parse": { - "post": { - "summary": "绑定手机号解析,通过第三方小程序code换取手机号", - "operationId": "BindTelephone_BindPhoneParse", - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "$ref": "#/definitions/loginBindPhoneParseResponse" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "#/definitions/rpcStatus" - } - } - }, - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/loginBindPhoneParseRequest" - } - } - ], - "tags": [ - "BindTelephone" - ] - } - }, - "/user/bind-telephone/bind-phone-parse-by-one-click": { - "post": { - "summary": "绑定手机号解析,通过阿里一键", - "operationId": "BindTelephone_BindPhoneParseByOneClick", - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "$ref": "#/definitions/loginBindPhoneParseByOneClickResponse" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "#/definitions/rpcStatus" - } - } - }, - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/loginBindPhoneParseByOneClickRequest" - } - } - ], - "tags": [ - "BindTelephone" - ] - } - }, - "/user/bind-telephone/bind-verify": { - "post": { - "summary": "通过验证码,校验手机号是否可以接收验证码", - "operationId": "BindTelephone_BindVerify", - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "$ref": "#/definitions/loginBindVerifyResponse" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "#/definitions/rpcStatus" - } - } - }, - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/loginBindVerifyRequest" - } - } - ], - "tags": [ - "BindTelephone" - ] - } - }, - "/user/bind-telephone/check": { - "post": { - "summary": "检查是否可以绑定", - "operationId": "BindTelephone_Check", - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "$ref": "#/definitions/loginCheckResponse" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "#/definitions/rpcStatus" - } - } - }, - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/loginCheckRequest" - } - } - ], - "tags": [ - "BindTelephone" - ] - } - } - }, - "definitions": { - "loginAutomaticBindRequest": { - "type": "object", - "properties": { - "nationCode": { - "type": "string", - "title": "区号" - }, - "telephone": { - "type": "string", - "title": "手机号" - }, - "uid": { - "type": "string", - "format": "int64", - "title": "uid" - }, - "origin": { - "type": "string", - "title": "前缀,通常为空,抖音必须为DY-" - } - } - }, - "loginAutomaticBindResponse": { - "type": "object", - "properties": { - "code": { - "type": "string", - "format": "int64", - "title": "code" - }, - "msg": { - "type": "string", - "title": "消息" - }, - "nowTime": { - "type": "string", - "format": "int64", - "title": "时间戳" - }, - "data": { - "$ref": "#/definitions/loginBindData", - "title": "数据" - } - } - }, - "loginBindChangeRequest": { - "type": "object", - "properties": { - "nationCode": { - "type": "string", - "title": "区号" - }, - "telephone": { - "type": "string", - "title": "手机号" - }, - "uid": { - "type": "string", - "format": "int64", - "title": "uid" - }, - "code": { - "type": "string", - "title": "验证码" - }, - "origin": { - "type": "string", - "title": "前缀,通常为空,抖音必须为DY-" - } - } - }, - "loginBindChangeResponse": { - "type": "object", - "properties": { - "code": { - "type": "string", - "format": "int64", - "title": "code" - }, - "msg": { - "type": "string", - "title": "msg" - }, - "nowTime": { - "type": "string", - "format": "int64", - "title": "时间戳" - }, - "data": { - "$ref": "#/definitions/loginBindData", - "title": "数据" - } - } - }, - "loginBindData": { - "type": "object", - "properties": { - "bindId": { - "type": "string", - "format": "int64", - "title": "uid" - } - } - }, - "loginBindPhoneParseByOneClickRequest": { - "type": "object", - "properties": { - "code": { - "type": "string", - "title": "用于解析手机号加密数据" - }, - "platformId": { - "type": "string", - "format": "int64", - "title": "platformId" - }, - "telephone": { - "type": "string", - "title": "telephone 有手机号即验证手机号" - } - } - }, - "loginBindPhoneParseByOneClickResponse": { - "type": "object", - "properties": { - "code": { - "type": "string", - "format": "int64", - "title": "code" - }, - "msg": { - "type": "string", - "title": "消息" - }, - "nowTime": { - "type": "string", - "format": "int64", - "title": "时间戳" - }, - "data": { - "type": "object", - "additionalProperties": { - "type": "string" - }, - "title": "数据" - } - } - }, - "loginBindPhoneParseRequest": { - "type": "object", - "properties": { - "code": { - "type": "string", - "title": "用于解析手机号加密数据" - }, - "encryptedData": { - "type": "string", - "title": "用于解析手机号加密数据" - }, - "iv": { - "type": "string", - "title": "用于解析手机号加密数据" - }, - "platformId": { - "type": "string", - "format": "int64", - "title": "platformId" - }, - "uid": { - "type": "string", - "format": "int64", - "title": "uid,有uid的情况下不使用code" - } - } - }, - "loginBindPhoneParseResponse": { - "type": "object", - "properties": { - "code": { - "type": "string", - "format": "int64", - "title": "code" - }, - "msg": { - "type": "string", - "title": "消息" - }, - "nowTime": { - "type": "string", - "format": "int64", - "title": "时间戳" - }, - "data": { - "type": "object", - "additionalProperties": { - "type": "string" - }, - "title": "数据" - } - } - }, - "loginBindVerifyRequest": { - "type": "object", - "properties": { - "nationCode": { - "type": "string", - "title": "区号" - }, - "telephone": { - "type": "string", - "title": "手机号" - }, - "uid": { - "type": "string", - "format": "int64", - "title": "uid" - }, - "code": { - "type": "string", - "title": "验证码" - }, - "origin": { - "type": "string", - "title": "前缀,通常为空,抖音必须为DY-" - } - } - }, - "loginBindVerifyResponse": { - "type": "object", - "properties": { - "code": { - "type": "string", - "format": "int64", - "title": "code" - }, - "msg": { - "type": "string", - "title": "消息" - }, - "nowTime": { - "type": "string", - "format": "int64", - "title": "时间戳" - }, - "data": { - "type": "object", - "additionalProperties": { - "type": "string" - }, - "title": "数据" - } - } - }, - "loginCheckRequest": { - "type": "object", - "properties": { - "nationCode": { - "type": "string", - "title": "区号" - }, - "telephone": { - "type": "string", - "title": "手机号" - }, - "uid": { - "type": "string", - "format": "int64", - "title": "uid" - }, - "origin": { - "type": "string", - "title": "前缀,通常为空,抖音必须为DY-" - } - } - }, - "loginCheckResponse": { - "type": "object", - "properties": { - "code": { - "type": "string", - "format": "int64", - "title": "code,不为0为错误" - }, - "msg": { - "type": "string", - "title": "错误信息" - }, - "nowTime": { - "type": "string", - "format": "int64", - "title": "时间戳" - }, - "data": { - "type": "object", - "additionalProperties": { - "type": "string" - }, - "title": "数据" - } - } - }, - "protobufAny": { - "type": "object", - "properties": { - "typeUrl": { - "type": "string" - }, - "value": { - "type": "string", - "format": "byte" - } - } - }, - "rpcStatus": { - "type": "object", - "properties": { - "code": { - "type": "integer", - "format": "int32" - }, - "message": { - "type": "string" - }, - "details": { - "type": "array", - "items": { - "$ref": "#/definitions/protobufAny" - } - } - } - } - } -} diff --git a/example/docs/swagger/proto/login/code.swagger.json b/example/docs/swagger/proto/login/code.swagger.json deleted file mode 100644 index 08ff02187..000000000 --- a/example/docs/swagger/proto/login/code.swagger.json +++ /dev/null @@ -1,477 +0,0 @@ -{ - "swagger": "2.0", - "info": { - "title": "proto/login/code.proto", - "version": "version not set" - }, - "tags": [ - { - "name": "Code" - } - ], - "consumes": [ - "application/json" - ], - "produces": [ - "application/json" - ], - "paths": { - "/user/code/get-send-status": { - "post": { - "summary": "获取发送状态", - "operationId": "Code_GetSendStatus", - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "$ref": "#/definitions/loginGetSendStatusResponse" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "#/definitions/rpcStatus" - } - } - }, - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/loginGetSendStatusRequest" - } - } - ], - "tags": [ - "Code" - ] - } - }, - "/user/code/is-check-image-code": { - "post": { - "summary": "是否校验图片验证码", - "operationId": "Code_IsCheckImageCode", - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "$ref": "#/definitions/loginIsCheckImageCodeResponse" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "#/definitions/rpcStatus" - } - } - }, - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/loginIsCheckImageCodeRequest" - } - } - ], - "tags": [ - "Code" - ] - } - }, - "/user/code/send-code": { - "post": { - "summary": "发送", - "operationId": "Code_SendCode", - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "$ref": "#/definitions/loginSendCodeResponse" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "#/definitions/rpcStatus" - } - } - }, - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/loginSendCodeRequest" - } - } - ], - "tags": [ - "Code" - ] - } - }, - "/user/code/verify": { - "post": { - "summary": "校验", - "operationId": "Code_Verify", - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "$ref": "#/definitions/loginVerifyResponse" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "#/definitions/rpcStatus" - } - } - }, - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/loginVerifyRequest" - } - } - ], - "tags": [ - "Code" - ] - } - }, - "/user/code/verify-image-code": { - "post": { - "summary": "校验图片验证码", - "operationId": "Code_VerifyImageCode", - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "$ref": "#/definitions/loginVerifyImageCodeResponse" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "#/definitions/rpcStatus" - } - } - }, - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/loginVerifyImageCodeRequest" - } - } - ], - "tags": [ - "Code" - ] - } - } - }, - "definitions": { - "loginGetSendStatusRequest": { - "type": "object", - "properties": { - "nationCode": { - "type": "string", - "title": "区号" - }, - "telephone": { - "type": "string", - "title": "手机号" - }, - "sendType": { - "type": "string", - "title": "发送类型" - }, - "template": { - "type": "string", - "title": "模板" - }, - "signR": { - "type": "string", - "format": "int64", - "title": "是否越狱标示" - }, - "ip": { - "type": "string", - "title": "ip" - } - } - }, - "loginGetSendStatusResponse": { - "type": "object", - "properties": { - "code": { - "type": "string", - "format": "int64", - "title": "code" - }, - "msg": { - "type": "string", - "title": "msg" - }, - "nowTime": { - "type": "string", - "format": "int64", - "title": "时间戳" - }, - "data": { - "$ref": "#/definitions/loginSendStatus", - "title": "数据" - } - } - }, - "loginIsCheckImageCodeRequest": { - "type": "object", - "properties": { - "nationCode": { - "type": "string", - "title": "区号" - }, - "telephone": { - "type": "string", - "title": "手机号" - }, - "scene": { - "type": "string", - "title": "场景" - } - } - }, - "loginIsCheckImageCodeResponse": { - "type": "object", - "properties": { - "code": { - "type": "string", - "format": "int64", - "title": "code" - }, - "msg": { - "type": "string", - "title": "msg" - }, - "nowTime": { - "type": "string", - "format": "int64", - "title": "时间戳" - }, - "data": { - "type": "boolean", - "title": "数据" - } - } - }, - "loginSendCodeRequest": { - "type": "object", - "properties": { - "nationCode": { - "type": "string", - "title": "区号" - }, - "telephone": { - "type": "string", - "title": "电话" - }, - "sendType": { - "type": "string", - "title": "发送类型,call ,sms" - }, - "ip": { - "type": "string", - "title": "ip" - }, - "template": { - "type": "string", - "title": "模板" - } - } - }, - "loginSendCodeResponse": { - "type": "object", - "properties": { - "code": { - "type": "string", - "format": "int64", - "title": "code" - }, - "msg": { - "type": "string", - "title": "msg" - }, - "nowTime": { - "type": "string", - "format": "int64", - "title": "时间戳" - }, - "data": { - "type": "object", - "additionalProperties": { - "type": "string" - }, - "title": "数据" - } - } - }, - "loginSendStatus": { - "type": "object", - "properties": { - "needImageCode": { - "type": "boolean", - "title": "需要图形验证码" - }, - "forceCall": { - "type": "boolean", - "title": "强制语音" - }, - "isForbidden": { - "type": "boolean", - "title": "被禁止" - }, - "numberLimit": { - "type": "boolean", - "title": "数量超限制" - } - } - }, - "loginVerifyImageCodeRequest": { - "type": "object", - "properties": { - "nationCode": { - "type": "string", - "title": "区号" - }, - "telephone": { - "type": "string", - "title": "手机号" - }, - "ticket": { - "type": "string", - "title": "图形验证码ticket" - }, - "randStr": { - "type": "string", - "title": "图形验证码randStr" - }, - "ip": { - "type": "string", - "title": "图形验证码ip" - }, - "scene": { - "type": "string", - "title": "场景" - } - } - }, - "loginVerifyImageCodeResponse": { - "type": "object", - "properties": { - "code": { - "type": "string", - "format": "int64", - "title": "code" - }, - "msg": { - "type": "string", - "title": "msg" - }, - "nowTime": { - "type": "string", - "format": "int64", - "title": "时间戳" - } - } - }, - "loginVerifyRequest": { - "type": "object", - "properties": { - "nationCode": { - "type": "string", - "title": "区号" - }, - "telephone": { - "type": "string", - "title": "手机号" - }, - "code": { - "type": "string", - "title": "验证码" - }, - "template": { - "type": "string", - "title": "模板" - } - } - }, - "loginVerifyResponse": { - "type": "object", - "properties": { - "code": { - "type": "string", - "format": "int64", - "title": "code" - }, - "msg": { - "type": "string", - "title": "msg" - }, - "nowTime": { - "type": "string", - "format": "int64", - "title": "时间戳" - }, - "data": { - "type": "object", - "additionalProperties": { - "type": "string" - }, - "title": "数据" - } - } - }, - "protobufAny": { - "type": "object", - "properties": { - "typeUrl": { - "type": "string" - }, - "value": { - "type": "string", - "format": "byte" - } - } - }, - "rpcStatus": { - "type": "object", - "properties": { - "code": { - "type": "integer", - "format": "int32" - }, - "message": { - "type": "string" - }, - "details": { - "type": "array", - "items": { - "$ref": "#/definitions/protobufAny" - } - } - } - } - } -} diff --git a/example/docs/swagger/proto/login/login.swagger.json b/example/docs/swagger/proto/login/login.swagger.json deleted file mode 100644 index 7464594b7..000000000 --- a/example/docs/swagger/proto/login/login.swagger.json +++ /dev/null @@ -1,320 +0,0 @@ -{ - "swagger": "2.0", - "info": { - "title": "统一登录入口", - "version": "version not set" - }, - "tags": [ - { - "name": "Login" - } - ], - "consumes": [ - "application/json" - ], - "produces": [ - "application/json" - ], - "paths": { - "/user/login/authenticate": { - "post": { - "summary": "使用凭证获取用户信息", - "operationId": "Login_Authenticate", - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "$ref": "#/definitions/loginAuthenticateResponse" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "#/definitions/rpcStatus" - } - } - }, - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/loginAuthenticateRequest" - } - } - ], - "tags": [ - "Login" - ] - } - }, - "/user/login/login": { - "post": { - "summary": "登录注册获取凭证,cookie,token", - "operationId": "Login_Login", - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "$ref": "#/definitions/loginLoginResponse" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "#/definitions/rpcStatus" - } - } - }, - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/loginLoginRequest" - } - } - ], - "tags": [ - "Login" - ] - } - } - }, - "definitions": { - "loginAuthenticateRequest": { - "type": "object", - "properties": { - "credentials": { - "type": "object", - "additionalProperties": { - "type": "string" - }, - "title": "凭证,cookie:string or token:sting" - } - } - }, - "loginAuthenticateResponse": { - "type": "object", - "properties": { - "code": { - "type": "string", - "format": "int64", - "title": "错误码,0 为正常" - }, - "msg": { - "type": "string", - "title": "错误信息" - }, - "nowTime": { - "type": "string", - "format": "int64", - "title": "请求响应时间戳" - }, - "data": { - "$ref": "#/definitions/loginData", - "title": "数据" - } - } - }, - "loginCredentials": { - "type": "object", - "properties": { - "uid": { - "type": "string", - "format": "int64", - "title": "userinfoId 对应 bindId" - }, - "uri": { - "type": "string", - "title": "uri" - }, - "openid": { - "type": "string", - "title": "openid" - }, - "isNew": { - "type": "boolean", - "title": "isNew" - }, - "isFirstRegister": { - "type": "boolean", - "title": "是否首次注册" - }, - "isBindTelephone": { - "type": "boolean", - "title": "是否绑定手机号" - }, - "platformInfo": { - "$ref": "#/definitions/loginPlatformInfo", - "title": "platformId" - } - } - }, - "loginData": { - "type": "object", - "properties": { - "uid": { - "type": "string", - "format": "int64", - "title": "userinfoId" - }, - "uri": { - "type": "string", - "title": "uri" - }, - "nickname": { - "type": "string", - "title": "个人昵称,没有店铺昵称覆盖逻辑" - }, - "headImgUrl": { - "type": "string", - "title": "个人头像,没有店铺头像覆盖逻辑" - }, - "signature": { - "type": "string", - "title": "签名" - }, - "sex": { - "type": "string", - "format": "int64", - "title": "性别, 性别 0未知,1男,2女" - }, - "region": { - "type": "string", - "title": "区域" - }, - "country": { - "type": "string", - "title": "国家" - }, - "province": { - "type": "string", - "title": "省市" - }, - "city": { - "type": "string", - "title": "城市" - }, - "lang": { - "type": "string", - "title": "语言类型,默认 \"\"" - }, - "createTime": { - "type": "string", - "format": "int64", - "title": "注册时间戳" - }, - "modifyTime": { - "type": "string", - "format": "int64", - "title": "更新时间戳" - }, - "currentlyLoggedPlatformId": { - "type": "string", - "format": "int64", - "title": "当前登录平台id ,对应 center 表 type 字段" - } - } - }, - "loginLoginRequest": { - "type": "object", - "properties": { - "platformId": { - "type": "string", - "format": "int64", - "title": "平台id ,对应 center 表 type 字段" - }, - "data": { - "type": "object", - "additionalProperties": { - "type": "string" - }, - "title": "登录相关信息,json,手机号登录参数\nUserType int64 `json:\"userType\"`\n\tVerifyType string `json:\"verifyType\"`\n\tNationCode string `json:\"nationCode\"`\n\tTelephone string `json:\"telephone\"`\n\tCode string `json:\"code\"`\n\tLoginToken string `json:\"loginToken\"`\n\tDeviceId string `json:\"deviceId\"`\n\tSysMessageNum int64 `json:\"sysMessageNum\"`" - }, - "scope": { - "type": "string", - "title": "凭据类型,普通用户 base, 特权?超级? super" - } - } - }, - "loginLoginResponse": { - "type": "object", - "properties": { - "code": { - "type": "string", - "format": "int64", - "title": "错误码,0 为正常" - }, - "msg": { - "type": "string", - "title": "错误信息" - }, - "nowTime": { - "type": "string", - "format": "int64", - "title": "请求响应时间戳" - }, - "data": { - "$ref": "#/definitions/loginCredentials", - "title": "数据" - } - } - }, - "loginPlatformInfo": { - "type": "object", - "properties": { - "platformId": { - "type": "string", - "format": "int64", - "title": "platformId" - }, - "originalUid": { - "type": "string", - "format": "int64", - "title": "originalId 原始ID,platformId 对应的user" - }, - "originalUri": { - "type": "string", - "title": "originalUri 原始uri,platformId 对应的user" - }, - "originalOpenid": { - "type": "string", - "title": "originalOpenid 原始openid,platformId 对应的user" - } - } - }, - "protobufAny": { - "type": "object", - "properties": { - "typeUrl": { - "type": "string" - }, - "value": { - "type": "string", - "format": "byte" - } - } - }, - "rpcStatus": { - "type": "object", - "properties": { - "code": { - "type": "integer", - "format": "int32" - }, - "message": { - "type": "string" - }, - "details": { - "type": "array", - "items": { - "$ref": "#/definitions/protobufAny" - } - } - } - } - } -} diff --git a/example/docs/swagger/proto/login/merge.swagger.json b/example/docs/swagger/proto/login/merge.swagger.json deleted file mode 100644 index 899d31a5d..000000000 --- a/example/docs/swagger/proto/login/merge.swagger.json +++ /dev/null @@ -1,286 +0,0 @@ -{ - "swagger": "2.0", - "info": { - "title": "账户合并相关", - "version": "version not set" - }, - "tags": [ - { - "name": "Merge" - } - ], - "consumes": [ - "application/json" - ], - "produces": [ - "application/json" - ], - "paths": { - "/user/merge/telephone": { - "post": { - "summary": "手机号合并,换绑,手机号更换", - "operationId": "Merge_Telephone", - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "$ref": "#/definitions/loginReply" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "#/definitions/rpcStatus" - } - } - }, - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/loginTelephoneRequest" - } - } - ], - "tags": [ - "Merge" - ] - } - }, - "/user/merge/telephone-check": { - "post": { - "summary": "手机号账户合并检查", - "operationId": "Merge_TelephoneCheck", - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "$ref": "#/definitions/loginReply" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "#/definitions/rpcStatus" - } - } - }, - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/loginTelephoneRequest" - } - } - ], - "tags": [ - "Merge" - ] - } - }, - "/user/merge/we-chat": { - "post": { - "summary": "微信账户绑定", - "operationId": "Merge_WeChat", - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "$ref": "#/definitions/loginReply" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "#/definitions/rpcStatus" - } - } - }, - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/loginWeChatRequest" - } - } - ], - "tags": [ - "Merge" - ] - } - }, - "/user/merge/we-chat-check": { - "post": { - "summary": "微信合并检查", - "operationId": "Merge_WeChatCheck", - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "$ref": "#/definitions/loginReply" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "#/definitions/rpcStatus" - } - } - }, - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/loginWeChatRequest" - } - } - ], - "tags": [ - "Merge" - ] - } - }, - "/user/merge/we-chat-un-merge": { - "post": { - "summary": "解除微信绑定, 必须拥有手机号", - "operationId": "Merge_WeChatUnMerge", - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "$ref": "#/definitions/loginReply" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "#/definitions/rpcStatus" - } - } - }, - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/loginWeChatUnMergeRequest" - } - } - ], - "tags": [ - "Merge" - ] - } - } - }, - "definitions": { - "loginReply": { - "type": "object", - "properties": { - "code": { - "type": "string", - "format": "int64", - "title": "code" - }, - "msg": { - "type": "string", - "title": "msg" - }, - "nowTime": { - "type": "string", - "format": "int64", - "title": "时间戳" - }, - "data": { - "type": "object", - "additionalProperties": { - "type": "string" - }, - "title": "数据" - } - } - }, - "loginTelephoneRequest": { - "type": "object", - "properties": { - "uid": { - "type": "string", - "format": "int64", - "title": "登陆用户" - }, - "targetTelephone": { - "type": "string", - "title": "新手机号" - }, - "isNewProcess": { - "type": "boolean", - "title": "是否走新流程" - } - } - }, - "loginWeChatRequest": { - "type": "object", - "properties": { - "uid": { - "type": "string", - "format": "int64", - "title": "登陆用户" - }, - "targetUid": { - "type": "string", - "format": "int64", - "title": "要合并的用户" - } - } - }, - "loginWeChatUnMergeRequest": { - "type": "object", - "properties": { - "uid": { - "type": "string", - "format": "int64", - "title": "登陆用户" - } - } - }, - "protobufAny": { - "type": "object", - "properties": { - "typeUrl": { - "type": "string" - }, - "value": { - "type": "string", - "format": "byte" - } - } - }, - "rpcStatus": { - "type": "object", - "properties": { - "code": { - "type": "integer", - "format": "int32" - }, - "message": { - "type": "string" - }, - "details": { - "type": "array", - "items": { - "$ref": "#/definitions/protobufAny" - } - } - } - } - } -} diff --git a/example/docs/swagger/proto/sqlx/code.swagger.json b/example/docs/swagger/proto/sqlx/code.swagger.json deleted file mode 100644 index 85b321bd6..000000000 --- a/example/docs/swagger/proto/sqlx/code.swagger.json +++ /dev/null @@ -1,476 +0,0 @@ -{ - "swagger": "2.0", - "info": { - "title": "proto/sqlx/code.proto", - "version": "version not set" - }, - "tags": [ - { - "name": "Code" - } - ], - "consumes": [ - "application/json" - ], - "produces": [ - "application/json" - ], - "paths": { - "/user/code/get-send-status": { - "post": { - "summary": "获取发送状态", - "operationId": "Code_GetSendStatus", - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "$ref": "#/definitions/sqlxGetSendStatusResponse" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "#/definitions/rpcStatus" - } - } - }, - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/sqlxGetSendStatusRequest" - } - } - ], - "tags": [ - "Code" - ] - } - }, - "/user/code/is-check-image-code": { - "post": { - "summary": "是否校验图片验证码", - "operationId": "Code_IsCheckImageCode", - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "$ref": "#/definitions/sqlxIsCheckImageCodeResponse" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "#/definitions/rpcStatus" - } - } - }, - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/sqlxIsCheckImageCodeRequest" - } - } - ], - "tags": [ - "Code" - ] - } - }, - "/user/code/send-code": { - "post": { - "summary": "发送", - "operationId": "Code_SendCode", - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "$ref": "#/definitions/sqlxSendCodeResponse" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "#/definitions/rpcStatus" - } - } - }, - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/sqlxSendCodeRequest" - } - } - ], - "tags": [ - "Code" - ] - } - }, - "/user/code/verify": { - "post": { - "summary": "校验", - "operationId": "Code_Verify", - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "$ref": "#/definitions/sqlxVerifyResponse" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "#/definitions/rpcStatus" - } - } - }, - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/sqlxVerifyRequest" - } - } - ], - "tags": [ - "Code" - ] - } - }, - "/user/code/verify-image-code": { - "post": { - "summary": "校验图片验证码", - "operationId": "Code_VerifyImageCode", - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "$ref": "#/definitions/sqlxVerifyImageCodeResponse" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "#/definitions/rpcStatus" - } - } - }, - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/sqlxVerifyImageCodeRequest" - } - } - ], - "tags": [ - "Code" - ] - } - } - }, - "definitions": { - "protobufAny": { - "type": "object", - "properties": { - "typeUrl": { - "type": "string" - }, - "value": { - "type": "string", - "format": "byte" - } - } - }, - "rpcStatus": { - "type": "object", - "properties": { - "code": { - "type": "integer", - "format": "int32" - }, - "message": { - "type": "string" - }, - "details": { - "type": "array", - "items": { - "$ref": "#/definitions/protobufAny" - } - } - } - }, - "sqlxGetSendStatusRequest": { - "type": "object", - "properties": { - "nationCode": { - "type": "string", - "title": "区号" - }, - "telephone": { - "type": "string", - "title": "手机号" - }, - "sendType": { - "type": "string", - "title": "发送类型" - }, - "template": { - "type": "string", - "title": "模板" - }, - "signR": { - "type": "string", - "format": "int64", - "title": "是否越狱标示" - }, - "ip": { - "type": "string", - "title": "ip" - } - } - }, - "sqlxGetSendStatusResponse": { - "type": "object", - "properties": { - "code": { - "type": "string", - "format": "int64", - "title": "code" - }, - "msg": { - "type": "string", - "title": "msg" - }, - "nowTime": { - "type": "string", - "format": "int64", - "title": "时间戳" - }, - "data": { - "$ref": "#/definitions/sqlxSendStatus", - "title": "数据" - } - } - }, - "sqlxIsCheckImageCodeRequest": { - "type": "object", - "properties": { - "nationCode": { - "type": "string", - "title": "区号" - }, - "telephone": { - "type": "string", - "title": "手机号" - }, - "scene": { - "type": "string", - "title": "场景" - } - } - }, - "sqlxIsCheckImageCodeResponse": { - "type": "object", - "properties": { - "code": { - "type": "string", - "format": "int64", - "title": "code" - }, - "msg": { - "type": "string", - "title": "msg" - }, - "nowTime": { - "type": "string", - "format": "int64", - "title": "时间戳" - }, - "data": { - "type": "boolean", - "title": "数据" - } - } - }, - "sqlxSendCodeRequest": { - "type": "object", - "properties": { - "nationCode": { - "type": "string", - "title": "区号" - }, - "a": { - "type": "string" - }, - "telephone": { - "type": "string", - "title": "电话" - }, - "sendType": { - "type": "string", - "title": "发送类型,call ,sms" - }, - "ip": { - "type": "string", - "title": "ip" - } - } - }, - "sqlxSendCodeResponse": { - "type": "object", - "properties": { - "code": { - "type": "string", - "format": "int64", - "title": "code" - }, - "msg": { - "type": "string", - "title": "msg" - }, - "nowTime": { - "type": "string", - "format": "int64", - "title": "时间戳\n@gotags: valid:\"ip\" custom_tag:\"custom_value\"" - }, - "data": { - "type": "object", - "additionalProperties": { - "type": "string" - }, - "title": "数据" - } - } - }, - "sqlxSendStatus": { - "type": "object", - "properties": { - "needImageCode": { - "type": "boolean", - "title": "需要图形验证码" - }, - "forceCall": { - "type": "boolean", - "title": "强制语音" - }, - "isForbidden": { - "type": "boolean", - "title": "被禁止" - }, - "numberLimit": { - "type": "boolean", - "title": "数量超限制" - } - } - }, - "sqlxVerifyImageCodeRequest": { - "type": "object", - "properties": { - "nationCode": { - "type": "string", - "title": "区号" - }, - "telephone": { - "type": "string", - "title": "手机号" - }, - "ticket": { - "type": "string", - "title": "图形验证码ticket" - }, - "randStr": { - "type": "string", - "title": "图形验证码randStr" - }, - "ip": { - "type": "string", - "title": "图形验证码ip" - }, - "scene": { - "type": "string", - "title": "场景" - } - } - }, - "sqlxVerifyImageCodeResponse": { - "type": "object", - "properties": { - "code": { - "type": "string", - "format": "int64", - "title": "code" - }, - "msg": { - "type": "string", - "title": "msg" - }, - "nowTime": { - "type": "string", - "format": "int64", - "title": "时间戳" - } - } - }, - "sqlxVerifyRequest": { - "type": "object", - "properties": { - "nationCode": { - "type": "string", - "title": "区号" - }, - "telephone": { - "type": "string", - "title": "手机号" - }, - "code": { - "type": "string", - "title": "验证码" - }, - "template": { - "type": "string", - "title": "模板" - } - } - }, - "sqlxVerifyResponse": { - "type": "object", - "properties": { - "code": { - "type": "string", - "format": "int64", - "title": "code" - }, - "msg": { - "type": "string", - "title": "msg" - }, - "nowTime": { - "type": "string", - "format": "int64", - "title": "时间戳" - }, - "data": { - "type": "object", - "additionalProperties": { - "type": "string" - }, - "title": "数据" - } - } - } - } -} diff --git a/example/docs/swagger/proto/user/user.swagger.json b/example/docs/swagger/proto/user/user.swagger.json deleted file mode 100644 index 1d2bf59b2..000000000 --- a/example/docs/swagger/proto/user/user.swagger.json +++ /dev/null @@ -1,2938 +0,0 @@ -{ - "swagger": "2.0", - "info": { - "title": "A Bit of Everything", - "version": "1.0", - "contact": { - "name": "gRPC-Gateway project", - "url": "https://github.com/grpc-ecosystem/grpc-gateway", - "email": "none@example.com" - }, - "license": { - "name": "BSD 3-Clause License", - "url": "https://github.com/grpc-ecosystem/grpc-gateway/blob/master/LICENSE.txt" - }, - "x-something-something": "yadda" - }, - "tags": [ - { - "name": "User" - }, - { - "name": "ABitOfEverythingService", - "description": "ABitOfEverythingService description -- which should not be used in place of the documentation comment!", - "externalDocs": { - "description": "Find out more about EchoService", - "url": "https://github.com/grpc-ecosystem/grpc-gateway" - } - }, - { - "name": "camelCaseServiceName" - }, - { - "name": "AnotherServiceWithNoBindings" - } - ], - "host": "localhost:8080", - "schemes": [ - "http", - "https", - "wss" - ], - "consumes": [ - "application/json", - "application/x-foo-mime" - ], - "produces": [ - "application/json", - "application/x-foo-mime" - ], - "paths": { - "/v1/example/a_bit_of_everything": { - "post": { - "operationId": "ABitOfEverythingService_CreateBody", - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "$ref": "#/definitions/gidABitOfEverything" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "#/definitions/rpcStatus" - } - } - }, - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/gidABitOfEverything" - } - } - ], - "tags": [ - "ABitOfEverythingService" - ] - } - }, - "/v1/example/a_bit_of_everything/params/get/nested_enum/{singleNested.ok}": { - "get": { - "operationId": "ABitOfEverythingService_CheckNestedEnumGetQueryParams", - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "$ref": "#/definitions/gidABitOfEverything" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "#/definitions/rpcStatus" - } - } - }, - "parameters": [ - { - "name": "singleNested.ok", - "description": "DeepEnum description.", - "in": "path", - "required": true, - "type": "string", - "enum": [ - "FALSE", - "TRUE" - ] - }, - { - "name": "singleNested.name", - "description": "name is nested field.", - "in": "query", - "required": false, - "type": "string" - }, - { - "name": "singleNested.amount", - "in": "query", - "required": false, - "type": "integer", - "format": "int64" - }, - { - "name": "uuid", - "in": "query", - "required": false, - "type": "string" - }, - { - "name": "floatValue", - "description": "Float value field", - "in": "query", - "required": true, - "type": "number", - "format": "float", - "default": "0.2" - }, - { - "name": "doubleValue", - "in": "query", - "required": false, - "type": "number", - "format": "double" - }, - { - "name": "int64Value", - "in": "query", - "required": false, - "type": "string", - "format": "int64" - }, - { - "name": "uint64Value", - "in": "query", - "required": false, - "type": "string", - "format": "uint64" - }, - { - "name": "int32Value", - "in": "query", - "required": false, - "type": "integer", - "format": "int32" - }, - { - "name": "fixed64Value", - "in": "query", - "required": false, - "type": "string", - "format": "uint64" - }, - { - "name": "fixed32Value", - "in": "query", - "required": false, - "type": "integer", - "format": "int64" - }, - { - "name": "boolValue", - "in": "query", - "required": false, - "type": "boolean" - }, - { - "name": "stringValue", - "in": "query", - "required": false, - "type": "string" - }, - { - "name": "bytesValue", - "in": "query", - "required": false, - "type": "string", - "format": "byte" - }, - { - "name": "uint32Value", - "in": "query", - "required": false, - "type": "integer", - "format": "int64" - }, - { - "name": "enumValue", - "description": " - ZERO: ZERO means 0\n - ONE: ONE means 1", - "in": "query", - "required": false, - "type": "string", - "enum": [ - "ZERO", - "ONE" - ], - "default": "ZERO" - }, - { - "name": "sfixed32Value", - "in": "query", - "required": false, - "type": "integer", - "format": "int32" - }, - { - "name": "sfixed64Value", - "in": "query", - "required": false, - "type": "string", - "format": "int64" - }, - { - "name": "sint32Value", - "in": "query", - "required": false, - "type": "integer", - "format": "int32" - }, - { - "name": "sint64Value", - "in": "query", - "required": false, - "type": "string", - "format": "int64" - }, - { - "name": "repeatedStringValue", - "in": "query", - "required": false, - "type": "array", - "items": { - "type": "string" - }, - "collectionFormat": "multi" - }, - { - "name": "oneofString", - "in": "query", - "required": false, - "type": "string" - }, - { - "name": "nonConventionalNameValue", - "in": "query", - "required": false, - "type": "string" - }, - { - "name": "timestampValue", - "in": "query", - "required": false, - "type": "string", - "format": "date-time" - }, - { - "name": "repeatedEnumValue", - "description": "repeated enum value. it is comma-separated in query.\n\n - ZERO: ZERO means 0\n - ONE: ONE means 1", - "in": "query", - "required": false, - "type": "array", - "items": { - "type": "string", - "enum": [ - "ZERO", - "ONE" - ] - }, - "collectionFormat": "multi" - }, - { - "name": "repeatedEnumAnnotation", - "description": "Repeated numeric enum title. Repeated numeric enum description.\n\n - ZERO: ZERO means 0\n - ONE: ONE means 1", - "in": "query", - "required": false, - "type": "array", - "items": { - "type": "string", - "enum": [ - "ZERO", - "ONE" - ] - }, - "collectionFormat": "multi" - }, - { - "name": "enumValueAnnotation", - "description": "Numeric enum title. Numeric enum description.\n\n - ZERO: ZERO means 0\n - ONE: ONE means 1", - "in": "query", - "required": false, - "type": "string", - "enum": [ - "ZERO", - "ONE" - ], - "default": "ZERO" - }, - { - "name": "repeatedStringAnnotation", - "description": "Repeated string title. Repeated string description.", - "in": "query", - "required": false, - "type": "array", - "items": { - "type": "string" - }, - "collectionFormat": "multi" - }, - { - "name": "nestedAnnotation.name", - "description": "name is nested field.", - "in": "query", - "required": false, - "type": "string" - }, - { - "name": "nestedAnnotation.amount", - "in": "query", - "required": false, - "type": "integer", - "format": "int64" - }, - { - "name": "int64OverrideType", - "in": "query", - "required": false, - "type": "integer", - "format": "int64" - }, - { - "name": "requiredStringViaFieldBehaviorAnnotation", - "description": "mark a field as required in Open API definition.", - "in": "query", - "required": true, - "type": "string" - }, - { - "name": "outputOnlyStringViaFieldBehaviorAnnotation", - "description": "mark a field as readonly in Open API definition.", - "in": "query", - "required": false, - "type": "string" - } - ], - "tags": [ - "ABitOfEverythingService" - ] - } - }, - "/v1/example/a_bit_of_everything/params/get/{singleNested.name}": { - "get": { - "operationId": "ABitOfEverythingService_CheckGetQueryParams", - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "$ref": "#/definitions/gidABitOfEverything" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "#/definitions/rpcStatus" - } - } - }, - "parameters": [ - { - "name": "singleNested.name", - "description": "name is nested field.", - "in": "path", - "required": true, - "type": "string" - }, - { - "name": "singleNested.amount", - "in": "query", - "required": false, - "type": "integer", - "format": "int64" - }, - { - "name": "singleNested.ok", - "description": "DeepEnum description.\n\n - FALSE: FALSE is false.\n - TRUE: TRUE is true.", - "in": "query", - "required": false, - "type": "string", - "enum": [ - "FALSE", - "TRUE" - ], - "default": "FALSE" - }, - { - "name": "uuid", - "in": "query", - "required": false, - "type": "string" - }, - { - "name": "floatValue", - "description": "Float value field", - "in": "query", - "required": true, - "type": "number", - "format": "float", - "default": "0.2" - }, - { - "name": "doubleValue", - "in": "query", - "required": false, - "type": "number", - "format": "double" - }, - { - "name": "int64Value", - "in": "query", - "required": false, - "type": "string", - "format": "int64" - }, - { - "name": "uint64Value", - "in": "query", - "required": false, - "type": "string", - "format": "uint64" - }, - { - "name": "int32Value", - "in": "query", - "required": false, - "type": "integer", - "format": "int32" - }, - { - "name": "fixed64Value", - "in": "query", - "required": false, - "type": "string", - "format": "uint64" - }, - { - "name": "fixed32Value", - "in": "query", - "required": false, - "type": "integer", - "format": "int64" - }, - { - "name": "boolValue", - "in": "query", - "required": false, - "type": "boolean" - }, - { - "name": "stringValue", - "in": "query", - "required": false, - "type": "string" - }, - { - "name": "bytesValue", - "in": "query", - "required": false, - "type": "string", - "format": "byte" - }, - { - "name": "uint32Value", - "in": "query", - "required": false, - "type": "integer", - "format": "int64" - }, - { - "name": "enumValue", - "description": " - ZERO: ZERO means 0\n - ONE: ONE means 1", - "in": "query", - "required": false, - "type": "string", - "enum": [ - "ZERO", - "ONE" - ], - "default": "ZERO" - }, - { - "name": "sfixed32Value", - "in": "query", - "required": false, - "type": "integer", - "format": "int32" - }, - { - "name": "sfixed64Value", - "in": "query", - "required": false, - "type": "string", - "format": "int64" - }, - { - "name": "sint32Value", - "in": "query", - "required": false, - "type": "integer", - "format": "int32" - }, - { - "name": "sint64Value", - "in": "query", - "required": false, - "type": "string", - "format": "int64" - }, - { - "name": "repeatedStringValue", - "in": "query", - "required": false, - "type": "array", - "items": { - "type": "string" - }, - "collectionFormat": "multi" - }, - { - "name": "oneofString", - "in": "query", - "required": false, - "type": "string" - }, - { - "name": "nonConventionalNameValue", - "in": "query", - "required": false, - "type": "string" - }, - { - "name": "timestampValue", - "in": "query", - "required": false, - "type": "string", - "format": "date-time" - }, - { - "name": "repeatedEnumValue", - "description": "repeated enum value. it is comma-separated in query.\n\n - ZERO: ZERO means 0\n - ONE: ONE means 1", - "in": "query", - "required": false, - "type": "array", - "items": { - "type": "string", - "enum": [ - "ZERO", - "ONE" - ] - }, - "collectionFormat": "multi" - }, - { - "name": "repeatedEnumAnnotation", - "description": "Repeated numeric enum title. Repeated numeric enum description.\n\n - ZERO: ZERO means 0\n - ONE: ONE means 1", - "in": "query", - "required": false, - "type": "array", - "items": { - "type": "string", - "enum": [ - "ZERO", - "ONE" - ] - }, - "collectionFormat": "multi" - }, - { - "name": "enumValueAnnotation", - "description": "Numeric enum title. Numeric enum description.\n\n - ZERO: ZERO means 0\n - ONE: ONE means 1", - "in": "query", - "required": false, - "type": "string", - "enum": [ - "ZERO", - "ONE" - ], - "default": "ZERO" - }, - { - "name": "repeatedStringAnnotation", - "description": "Repeated string title. Repeated string description.", - "in": "query", - "required": false, - "type": "array", - "items": { - "type": "string" - }, - "collectionFormat": "multi" - }, - { - "name": "nestedAnnotation.amount", - "in": "query", - "required": false, - "type": "integer", - "format": "int64" - }, - { - "name": "nestedAnnotation.ok", - "description": "DeepEnum description.\n\n - FALSE: FALSE is false.\n - TRUE: TRUE is true.", - "in": "query", - "required": false, - "type": "string", - "enum": [ - "FALSE", - "TRUE" - ], - "default": "FALSE" - }, - { - "name": "int64OverrideType", - "in": "query", - "required": false, - "type": "integer", - "format": "int64" - }, - { - "name": "requiredStringViaFieldBehaviorAnnotation", - "description": "mark a field as required in Open API definition.", - "in": "query", - "required": true, - "type": "string" - }, - { - "name": "outputOnlyStringViaFieldBehaviorAnnotation", - "description": "mark a field as readonly in Open API definition.", - "in": "query", - "required": false, - "type": "string" - } - ], - "tags": [ - "ABitOfEverythingService" - ] - } - }, - "/v1/example/a_bit_of_everything/params/post/{stringValue}": { - "post": { - "operationId": "ABitOfEverythingService_CheckPostQueryParams", - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "$ref": "#/definitions/gidABitOfEverything" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "#/definitions/rpcStatus" - } - } - }, - "parameters": [ - { - "name": "stringValue", - "in": "path", - "required": true, - "type": "string" - }, - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/ABitOfEverythingNested" - } - }, - { - "name": "uuid", - "in": "query", - "required": false, - "type": "string" - }, - { - "name": "floatValue", - "description": "Float value field", - "in": "query", - "required": true, - "type": "number", - "format": "float", - "default": "0.2" - }, - { - "name": "doubleValue", - "in": "query", - "required": false, - "type": "number", - "format": "double" - }, - { - "name": "int64Value", - "in": "query", - "required": false, - "type": "string", - "format": "int64" - }, - { - "name": "uint64Value", - "in": "query", - "required": false, - "type": "string", - "format": "uint64" - }, - { - "name": "int32Value", - "in": "query", - "required": false, - "type": "integer", - "format": "int32" - }, - { - "name": "fixed64Value", - "in": "query", - "required": false, - "type": "string", - "format": "uint64" - }, - { - "name": "fixed32Value", - "in": "query", - "required": false, - "type": "integer", - "format": "int64" - }, - { - "name": "boolValue", - "in": "query", - "required": false, - "type": "boolean" - }, - { - "name": "bytesValue", - "in": "query", - "required": false, - "type": "string", - "format": "byte" - }, - { - "name": "uint32Value", - "in": "query", - "required": false, - "type": "integer", - "format": "int64" - }, - { - "name": "enumValue", - "description": " - ZERO: ZERO means 0\n - ONE: ONE means 1", - "in": "query", - "required": false, - "type": "string", - "enum": [ - "ZERO", - "ONE" - ], - "default": "ZERO" - }, - { - "name": "sfixed32Value", - "in": "query", - "required": false, - "type": "integer", - "format": "int32" - }, - { - "name": "sfixed64Value", - "in": "query", - "required": false, - "type": "string", - "format": "int64" - }, - { - "name": "sint32Value", - "in": "query", - "required": false, - "type": "integer", - "format": "int32" - }, - { - "name": "sint64Value", - "in": "query", - "required": false, - "type": "string", - "format": "int64" - }, - { - "name": "repeatedStringValue", - "in": "query", - "required": false, - "type": "array", - "items": { - "type": "string" - }, - "collectionFormat": "multi" - }, - { - "name": "oneofString", - "in": "query", - "required": false, - "type": "string" - }, - { - "name": "nonConventionalNameValue", - "in": "query", - "required": false, - "type": "string" - }, - { - "name": "timestampValue", - "in": "query", - "required": false, - "type": "string", - "format": "date-time" - }, - { - "name": "repeatedEnumValue", - "description": "repeated enum value. it is comma-separated in query.\n\n - ZERO: ZERO means 0\n - ONE: ONE means 1", - "in": "query", - "required": false, - "type": "array", - "items": { - "type": "string", - "enum": [ - "ZERO", - "ONE" - ] - }, - "collectionFormat": "multi" - }, - { - "name": "repeatedEnumAnnotation", - "description": "Repeated numeric enum title. Repeated numeric enum description.\n\n - ZERO: ZERO means 0\n - ONE: ONE means 1", - "in": "query", - "required": false, - "type": "array", - "items": { - "type": "string", - "enum": [ - "ZERO", - "ONE" - ] - }, - "collectionFormat": "multi" - }, - { - "name": "enumValueAnnotation", - "description": "Numeric enum title. Numeric enum description.\n\n - ZERO: ZERO means 0\n - ONE: ONE means 1", - "in": "query", - "required": false, - "type": "string", - "enum": [ - "ZERO", - "ONE" - ], - "default": "ZERO" - }, - { - "name": "repeatedStringAnnotation", - "description": "Repeated string title. Repeated string description.", - "in": "query", - "required": false, - "type": "array", - "items": { - "type": "string" - }, - "collectionFormat": "multi" - }, - { - "name": "nestedAnnotation.name", - "description": "name is nested field.", - "in": "query", - "required": false, - "type": "string" - }, - { - "name": "nestedAnnotation.amount", - "in": "query", - "required": false, - "type": "integer", - "format": "int64" - }, - { - "name": "nestedAnnotation.ok", - "description": "DeepEnum description.\n\n - FALSE: FALSE is false.\n - TRUE: TRUE is true.", - "in": "query", - "required": false, - "type": "string", - "enum": [ - "FALSE", - "TRUE" - ], - "default": "FALSE" - }, - { - "name": "int64OverrideType", - "in": "query", - "required": false, - "type": "integer", - "format": "int64" - }, - { - "name": "requiredStringViaFieldBehaviorAnnotation", - "description": "mark a field as required in Open API definition.", - "in": "query", - "required": true, - "type": "string" - }, - { - "name": "outputOnlyStringViaFieldBehaviorAnnotation", - "description": "mark a field as readonly in Open API definition.", - "in": "query", - "required": false, - "type": "string" - } - ], - "tags": [ - "ABitOfEverythingService" - ] - } - }, - "/v1/example/a_bit_of_everything/query/{uuid}": { - "get": { - "summary": "rpc Delete(grpc.gateway.examples.internal.proto.sub2.IdMessage) returns (google.protobuf.Empty) {\n option (google.api.http) = {\n delete: \"/v1/example/a_bit_of_everything/{uuid}\"\n };\n option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation) = {\n security: {\n security_requirement: {\n key: \"ApiKeyAuth\";\n value: {}\n }\n security_requirement: {\n key: \"OAuth2\";\n value: {\n scope: \"read\";\n scope: \"write\";\n }\n }\n }\n extensions: {\n key: \"x-irreversible\";\n value {\n bool_value: true;\n }\n }\n };\n }", - "operationId": "ABitOfEverythingService_GetQuery", - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "properties": {} - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "#/definitions/rpcStatus" - } - } - }, - "parameters": [ - { - "name": "uuid", - "in": "path", - "required": true, - "type": "string" - }, - { - "name": "singleNested.name", - "description": "name is nested field.", - "in": "query", - "required": false, - "type": "string" - }, - { - "name": "singleNested.amount", - "in": "query", - "required": false, - "type": "integer", - "format": "int64" - }, - { - "name": "singleNested.ok", - "description": "DeepEnum description.\n\n - FALSE: FALSE is false.\n - TRUE: TRUE is true.", - "in": "query", - "required": false, - "type": "string", - "enum": [ - "FALSE", - "TRUE" - ], - "default": "FALSE" - }, - { - "name": "floatValue", - "description": "Float value field", - "in": "query", - "required": true, - "type": "number", - "format": "float", - "default": "0.2" - }, - { - "name": "doubleValue", - "in": "query", - "required": false, - "type": "number", - "format": "double" - }, - { - "name": "int64Value", - "in": "query", - "required": false, - "type": "string", - "format": "int64" - }, - { - "name": "uint64Value", - "in": "query", - "required": false, - "type": "string", - "format": "uint64" - }, - { - "name": "int32Value", - "in": "query", - "required": false, - "type": "integer", - "format": "int32" - }, - { - "name": "fixed64Value", - "in": "query", - "required": false, - "type": "string", - "format": "uint64" - }, - { - "name": "fixed32Value", - "in": "query", - "required": false, - "type": "integer", - "format": "int64" - }, - { - "name": "boolValue", - "in": "query", - "required": false, - "type": "boolean" - }, - { - "name": "stringValue", - "in": "query", - "required": false, - "type": "string" - }, - { - "name": "bytesValue", - "in": "query", - "required": false, - "type": "string", - "format": "byte" - }, - { - "name": "uint32Value", - "in": "query", - "required": false, - "type": "integer", - "format": "int64" - }, - { - "name": "enumValue", - "description": " - ZERO: ZERO means 0\n - ONE: ONE means 1", - "in": "query", - "required": false, - "type": "string", - "enum": [ - "ZERO", - "ONE" - ], - "default": "ZERO" - }, - { - "name": "sfixed32Value", - "in": "query", - "required": false, - "type": "integer", - "format": "int32" - }, - { - "name": "sfixed64Value", - "in": "query", - "required": false, - "type": "string", - "format": "int64" - }, - { - "name": "sint32Value", - "in": "query", - "required": false, - "type": "integer", - "format": "int32" - }, - { - "name": "sint64Value", - "in": "query", - "required": false, - "type": "string", - "format": "int64" - }, - { - "name": "repeatedStringValue", - "in": "query", - "required": false, - "type": "array", - "items": { - "type": "string" - }, - "collectionFormat": "multi" - }, - { - "name": "oneofString", - "in": "query", - "required": false, - "type": "string" - }, - { - "name": "nonConventionalNameValue", - "in": "query", - "required": false, - "type": "string" - }, - { - "name": "timestampValue", - "in": "query", - "required": false, - "type": "string", - "format": "date-time" - }, - { - "name": "repeatedEnumValue", - "description": "repeated enum value. it is comma-separated in query.\n\n - ZERO: ZERO means 0\n - ONE: ONE means 1", - "in": "query", - "required": false, - "type": "array", - "items": { - "type": "string", - "enum": [ - "ZERO", - "ONE" - ] - }, - "collectionFormat": "multi" - }, - { - "name": "repeatedEnumAnnotation", - "description": "Repeated numeric enum title. Repeated numeric enum description.\n\n - ZERO: ZERO means 0\n - ONE: ONE means 1", - "in": "query", - "required": false, - "type": "array", - "items": { - "type": "string", - "enum": [ - "ZERO", - "ONE" - ] - }, - "collectionFormat": "multi" - }, - { - "name": "enumValueAnnotation", - "description": "Numeric enum title. Numeric enum description.\n\n - ZERO: ZERO means 0\n - ONE: ONE means 1", - "in": "query", - "required": false, - "type": "string", - "enum": [ - "ZERO", - "ONE" - ], - "default": "ZERO" - }, - { - "name": "repeatedStringAnnotation", - "description": "Repeated string title. Repeated string description.", - "in": "query", - "required": false, - "type": "array", - "items": { - "type": "string" - }, - "collectionFormat": "multi" - }, - { - "name": "nestedAnnotation.name", - "description": "name is nested field.", - "in": "query", - "required": false, - "type": "string" - }, - { - "name": "nestedAnnotation.amount", - "in": "query", - "required": false, - "type": "integer", - "format": "int64" - }, - { - "name": "nestedAnnotation.ok", - "description": "DeepEnum description.\n\n - FALSE: FALSE is false.\n - TRUE: TRUE is true.", - "in": "query", - "required": false, - "type": "string", - "enum": [ - "FALSE", - "TRUE" - ], - "default": "FALSE" - }, - { - "name": "int64OverrideType", - "in": "query", - "required": false, - "type": "integer", - "format": "int64" - }, - { - "name": "requiredStringViaFieldBehaviorAnnotation", - "description": "mark a field as required in Open API definition.", - "in": "query", - "required": true, - "type": "string" - }, - { - "name": "outputOnlyStringViaFieldBehaviorAnnotation", - "description": "mark a field as readonly in Open API definition.", - "in": "query", - "required": false, - "type": "string" - } - ], - "tags": [ - "ABitOfEverythingService" - ], - "deprecated": true, - "security": [], - "externalDocs": { - "description": "Find out more about GetQuery", - "url": "https://github.com/grpc-ecosystem/grpc-gateway" - } - } - }, - "/v1/example/a_bit_of_everything/{floatValue}/{doubleValue}/{int64Value}/separator/{uint64Value}/{int32Value}/{fixed64Value}/{fixed32Value}/{boolValue}/{stringValue}/{uint32Value}/{sfixed32Value}/{sfixed64Value}/{sint32Value}/{sint64Value}/{nonConventionalNameValue}/{enumValue}": { - "post": { - "summary": "Create a new ABitOfEverything", - "description": "This API creates a new ABitOfEverything", - "operationId": "ABitOfEverythingService_Create", - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "$ref": "#/definitions/gidABitOfEverything" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "#/definitions/rpcStatus" - } - } - }, - "parameters": [ - { - "name": "floatValue", - "description": "Float value field", - "in": "path", - "required": true, - "type": "number", - "format": "float", - "default": "0.2" - }, - { - "name": "doubleValue", - "in": "path", - "required": true, - "type": "number", - "format": "double" - }, - { - "name": "int64Value", - "in": "path", - "required": true, - "type": "string", - "format": "int64" - }, - { - "name": "uint64Value", - "in": "path", - "required": true, - "type": "string", - "format": "uint64" - }, - { - "name": "int32Value", - "in": "path", - "required": true, - "type": "integer", - "format": "int32" - }, - { - "name": "fixed64Value", - "in": "path", - "required": true, - "type": "string", - "format": "uint64" - }, - { - "name": "fixed32Value", - "in": "path", - "required": true, - "type": "integer", - "format": "int64" - }, - { - "name": "boolValue", - "in": "path", - "required": true, - "type": "boolean" - }, - { - "name": "stringValue", - "in": "path", - "required": true, - "type": "string" - }, - { - "name": "uint32Value", - "in": "path", - "required": true, - "type": "integer", - "format": "int64" - }, - { - "name": "sfixed32Value", - "in": "path", - "required": true, - "type": "integer", - "format": "int32" - }, - { - "name": "sfixed64Value", - "in": "path", - "required": true, - "type": "string", - "format": "int64" - }, - { - "name": "sint32Value", - "in": "path", - "required": true, - "type": "integer", - "format": "int32" - }, - { - "name": "sint64Value", - "in": "path", - "required": true, - "type": "string", - "format": "int64" - }, - { - "name": "nonConventionalNameValue", - "in": "path", - "required": true, - "type": "string" - }, - { - "name": "enumValue", - "in": "path", - "required": true, - "type": "string", - "enum": [ - "ZERO", - "ONE" - ] - } - ], - "tags": [ - "ABitOfEverythingService" - ] - } - }, - "/v1/example/a_bit_of_everything/{uuid}": { - "put": { - "operationId": "ABitOfEverythingService_Update", - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "properties": {} - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "#/definitions/rpcStatus" - } - } - }, - "parameters": [ - { - "name": "uuid", - "in": "path", - "required": true, - "type": "string" - }, - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "type": "object", - "example": { - "int64_value": 12, - "double_value": 12.3 - }, - "properties": { - "singleNested": { - "$ref": "#/definitions/ABitOfEverythingNested" - }, - "nested": { - "type": "array", - "items": { - "$ref": "#/definitions/ABitOfEverythingNested" - } - }, - "floatValue": { - "type": "number", - "format": "float", - "default": "0.2", - "description": "Float value field", - "required": [ - "float_value" - ] - }, - "doubleValue": { - "type": "number", - "format": "double" - }, - "int64Value": { - "type": "string", - "format": "int64" - }, - "uint64Value": { - "type": "string", - "format": "uint64" - }, - "int32Value": { - "type": "integer", - "format": "int32" - }, - "fixed64Value": { - "type": "string", - "format": "uint64" - }, - "fixed32Value": { - "type": "integer", - "format": "int64" - }, - "boolValue": { - "type": "boolean" - }, - "stringValue": { - "type": "string" - }, - "bytesValue": { - "type": "string", - "format": "byte" - }, - "uint32Value": { - "type": "integer", - "format": "int64" - }, - "enumValue": { - "$ref": "#/definitions/gidNumericEnum" - }, - "sfixed32Value": { - "type": "integer", - "format": "int32" - }, - "sfixed64Value": { - "type": "string", - "format": "int64" - }, - "sint32Value": { - "type": "integer", - "format": "int32" - }, - "sint64Value": { - "type": "string", - "format": "int64" - }, - "repeatedStringValue": { - "type": "array", - "items": { - "type": "string" - } - }, - "oneofEmpty": { - "properties": {} - }, - "oneofString": { - "type": "string" - }, - "mapValue": { - "type": "object", - "additionalProperties": { - "$ref": "#/definitions/gidNumericEnum" - } - }, - "mappedStringValue": { - "type": "object", - "additionalProperties": { - "type": "string" - } - }, - "mappedNestedValue": { - "type": "object", - "additionalProperties": { - "$ref": "#/definitions/ABitOfEverythingNested" - } - }, - "nonConventionalNameValue": { - "type": "string" - }, - "timestampValue": { - "type": "string", - "format": "date-time" - }, - "repeatedEnumValue": { - "type": "array", - "items": { - "$ref": "#/definitions/gidNumericEnum" - }, - "title": "repeated enum value. it is comma-separated in query" - }, - "repeatedEnumAnnotation": { - "type": "array", - "items": { - "$ref": "#/definitions/gidNumericEnum" - }, - "description": "Repeated numeric enum description.", - "title": "Repeated numeric enum title" - }, - "enumValueAnnotation": { - "$ref": "#/definitions/gidNumericEnum", - "description": "Numeric enum description.", - "title": "Numeric enum title" - }, - "repeatedStringAnnotation": { - "type": "array", - "items": { - "type": "string" - }, - "description": "Repeated string description.", - "title": "Repeated string title" - }, - "repeatedNestedAnnotation": { - "type": "array", - "items": { - "$ref": "#/definitions/ABitOfEverythingNested" - }, - "description": "Repeated nested object description.", - "title": "Repeated nested object title" - }, - "nestedAnnotation": { - "$ref": "#/definitions/ABitOfEverythingNested", - "description": "Nested object description.", - "title": "Nested object title" - }, - "int64OverrideType": { - "type": "integer", - "format": "int64" - }, - "requiredStringViaFieldBehaviorAnnotation": { - "type": "string", - "title": "mark a field as required in Open API definition", - "required": [ - "required_string_via_field_behavior_annotation" - ] - }, - "outputOnlyStringViaFieldBehaviorAnnotation": { - "type": "string", - "title": "mark a field as readonly in Open API definition", - "readOnly": true - } - }, - "description": "Intentionaly complicated message type to cover many features of Protobuf.", - "title": "A bit of everything", - "externalDocs": { - "description": "Find out more about ABitOfEverything", - "url": "https://github.com/grpc-ecosystem/grpc-gateway" - }, - "required": [ - "int64Value", - "doubleValue", - "floatValue", - "requiredStringViaFieldBehaviorAnnotation" - ] - } - } - ], - "tags": [ - "ABitOfEverythingService" - ] - } - }, - "/v1/example/a_bit_of_everything_repeated/{pathRepeatedFloatValue}/{pathRepeatedDoubleValue}/{pathRepeatedInt64Value}/{pathRepeatedUint64Value}/{pathRepeatedInt32Value}/{pathRepeatedFixed64Value}/{pathRepeatedFixed32Value}/{pathRepeatedBoolValue}/{pathRepeatedStringValue}/{pathRepeatedBytesValue}/{pathRepeatedUint32Value}/{pathRepeatedEnumValue}/{pathRepeatedSfixed32Value}/{pathRepeatedSfixed64Value}/{pathRepeatedSint32Value}/{pathRepeatedSint64Value}": { - "get": { - "operationId": "ABitOfEverythingService_GetRepeatedQuery", - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "$ref": "#/definitions/gidABitOfEverythingRepeated" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "#/definitions/rpcStatus" - } - } - }, - "parameters": [ - { - "name": "pathRepeatedFloatValue", - "description": "repeated values. they are comma-separated in path", - "in": "path", - "required": true, - "type": "array", - "items": { - "type": "number", - "format": "float" - }, - "collectionFormat": "ssv", - "minItems": 1 - }, - { - "name": "pathRepeatedDoubleValue", - "in": "path", - "required": true, - "type": "array", - "items": { - "type": "number", - "format": "double" - }, - "collectionFormat": "ssv", - "minItems": 1 - }, - { - "name": "pathRepeatedInt64Value", - "in": "path", - "required": true, - "type": "array", - "items": { - "type": "string", - "format": "int64" - }, - "collectionFormat": "ssv", - "minItems": 1 - }, - { - "name": "pathRepeatedUint64Value", - "in": "path", - "required": true, - "type": "array", - "items": { - "type": "string", - "format": "uint64" - }, - "collectionFormat": "ssv", - "minItems": 1 - }, - { - "name": "pathRepeatedInt32Value", - "in": "path", - "required": true, - "type": "array", - "items": { - "type": "integer", - "format": "int32" - }, - "collectionFormat": "ssv", - "minItems": 1 - }, - { - "name": "pathRepeatedFixed64Value", - "in": "path", - "required": true, - "type": "array", - "items": { - "type": "string", - "format": "uint64" - }, - "collectionFormat": "ssv", - "minItems": 1 - }, - { - "name": "pathRepeatedFixed32Value", - "in": "path", - "required": true, - "type": "array", - "items": { - "type": "integer", - "format": "int64" - }, - "collectionFormat": "ssv", - "minItems": 1 - }, - { - "name": "pathRepeatedBoolValue", - "in": "path", - "required": true, - "type": "array", - "items": { - "type": "boolean" - }, - "collectionFormat": "ssv", - "minItems": 1 - }, - { - "name": "pathRepeatedStringValue", - "in": "path", - "required": true, - "type": "array", - "items": { - "type": "string" - }, - "collectionFormat": "ssv", - "minItems": 1 - }, - { - "name": "pathRepeatedBytesValue", - "in": "path", - "required": true, - "type": "array", - "items": { - "type": "string", - "format": "byte" - }, - "collectionFormat": "ssv", - "minItems": 1 - }, - { - "name": "pathRepeatedUint32Value", - "in": "path", - "required": true, - "type": "array", - "items": { - "type": "integer", - "format": "int64" - }, - "collectionFormat": "ssv", - "minItems": 1 - }, - { - "name": "pathRepeatedEnumValue", - "in": "path", - "required": true, - "type": "array", - "items": { - "type": "string", - "enum": [ - "ZERO", - "ONE" - ] - }, - "collectionFormat": "ssv", - "minItems": 1 - }, - { - "name": "pathRepeatedSfixed32Value", - "in": "path", - "required": true, - "type": "array", - "items": { - "type": "integer", - "format": "int32" - }, - "collectionFormat": "ssv", - "minItems": 1 - }, - { - "name": "pathRepeatedSfixed64Value", - "in": "path", - "required": true, - "type": "array", - "items": { - "type": "string", - "format": "int64" - }, - "collectionFormat": "ssv", - "minItems": 1 - }, - { - "name": "pathRepeatedSint32Value", - "in": "path", - "required": true, - "type": "array", - "items": { - "type": "integer", - "format": "int32" - }, - "collectionFormat": "ssv", - "minItems": 1 - }, - { - "name": "pathRepeatedSint64Value", - "in": "path", - "required": true, - "type": "array", - "items": { - "type": "string", - "format": "int64" - }, - "collectionFormat": "ssv", - "minItems": 1 - } - ], - "tags": [ - "ABitOfEverythingService" - ] - } - }, - "/v1/example/checkStatus": { - "get": { - "operationId": "ABitOfEverythingService_CheckStatus", - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "$ref": "#/definitions/gidCheckStatusResponse" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "#/definitions/rpcStatus" - } - } - }, - "tags": [ - "ABitOfEverythingService" - ] - } - }, - "/v1/example/deep_path/{singleNested.name}": { - "post": { - "summary": "Echo allows posting a StringMessage value.", - "description": "It also exposes multiple bindings.\n\nThis makes it useful when validating that the OpenAPI v2 API\ndescription exposes documentation correctly on all paths\ndefined as additional_bindings in the proto.\n rpc Echo(grpc.gateway.examples.internal.proto.sub.StringMessage) returns (grpc.gateway.examples.internal.proto.sub.StringMessage) {\n option (google.api.http) = {\n get: \"/v1/example/a_bit_of_everything/echo/{value}\"\n additional_bindings {\n post: \"/v2/example/echo\"\n body: \"value\"\n }\n additional_bindings {\n get: \"/v2/example/echo\"\n }\n };\n option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation) = {\n description: \"Description Echo\";\n summary: \"Summary: Echo rpc\";\n tags: \"echo rpc\";\n external_docs: {\n url: \"https://github.com/grpc-ecosystem/grpc-gateway\";\n description: \"Find out more Echo\";\n }\n responses: {\n key: \"200\"\n value: {\n examples: {\n key: \"application/json\"\n value: '{\"value\": \"the input value\"}'\n }\n }\n }\n responses: {\n key: \"503\";\n value: {\n description: \"Returned when the resource is temporarily unavailable.\";\n extensions: {\n key: \"x-number\";\n value {\n number_value: 100;\n }\n }\n }\n }\n responses: {\n // Overwrites global definition.\n key: \"404\";\n value: {\n description: \"Returned when the resource does not exist.\";\n schema: {\n json_schema: {\n type: INTEGER;\n }\n }\n }\n }\n };\n }", - "operationId": "ABitOfEverythingService_DeepPathEcho", - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "$ref": "#/definitions/gidABitOfEverything" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "#/definitions/rpcStatus" - } - } - }, - "parameters": [ - { - "name": "singleNested.name", - "description": "name is nested field.", - "in": "path", - "required": true, - "type": "string" - }, - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/gidABitOfEverything" - } - } - ], - "tags": [ - "ABitOfEverythingService" - ] - } - }, - "/v1/id/generate": { - "post": { - "summary": "Generate 生成ID", - "operationId": "User_Generate", - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "$ref": "#/definitions/gidGenerateResponse" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "#/definitions/rpcStatus" - } - } - }, - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/gidGenerateRequest" - } - } - ], - "tags": [ - "User" - ] - } - }, - "/v1/id/types": { - "get": { - "summary": "Types id类型", - "operationId": "User_Types", - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "$ref": "#/definitions/gidTypesResponse" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "#/definitions/rpcStatus" - } - } - }, - "tags": [ - "User" - ] - } - }, - "/v1/{book.name=publishers/*/books/*}": { - "patch": { - "operationId": "ABitOfEverythingService_UpdateBook", - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "$ref": "#/definitions/gidBook" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "#/definitions/rpcStatus" - } - } - }, - "parameters": [ - { - "name": "book.name", - "description": "The resource name of the book.\n\nFormat: `publishers/{publisher}/books/{book}`\n\nExample: `publishers/1257894000000000000/books/my-book`", - "in": "path", - "required": true, - "type": "string" - }, - { - "name": "body", - "description": "The book to update.\n\nThe book's `name` field is used to identify the book to be updated.\nFormat: publishers/{publisher}/books/{book}", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/gidBook" - } - }, - { - "name": "updateMask", - "description": "The list of fields to be updated.", - "in": "query", - "required": false, - "type": "string" - }, - { - "name": "allowMissing", - "description": "If set to true, and the book is not found, a new book will be created.\nIn this situation, `update_mask` is ignored.", - "in": "query", - "required": false, - "type": "boolean" - } - ], - "tags": [ - "ABitOfEverythingService" - ] - } - }, - "/v1/{parent=publishers/*}/books": { - "post": { - "summary": "Create a book.", - "operationId": "ABitOfEverythingService_CreateBook", - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "$ref": "#/definitions/gidBook" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "#/definitions/rpcStatus" - } - } - }, - "parameters": [ - { - "name": "parent", - "description": "The publisher in which to create the book.\n\nFormat: `publishers/{publisher}`\n\nExample: `publishers/1257894000000000000`", - "in": "path", - "required": true, - "type": "string" - }, - { - "name": "body", - "description": "The book to create.", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/gidBook" - } - }, - { - "name": "bookId", - "description": "The ID to use for the book.\n\nThis must start with an alphanumeric character.", - "in": "query", - "required": false, - "type": "string" - } - ], - "tags": [ - "ABitOfEverythingService" - ] - } - }, - "/v2/another/no-bindings": { - "get": { - "operationId": "AnotherServiceWithNoBindings_NoBindings", - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "properties": {} - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "#/definitions/rpcStatus" - } - } - }, - "tags": [ - "AnotherServiceWithNoBindings" - ] - } - }, - "/v2/example/NoBindings": { - "get": { - "operationId": "ABitOfEverythingService_NoBindings", - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "properties": {} - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "#/definitions/rpcStatus" - } - } - }, - "parameters": [ - { - "name": "seconds", - "description": "Signed seconds of the span of time. Must be from -315,576,000,000\nto +315,576,000,000 inclusive. Note: these bounds are computed from:\n60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years.", - "in": "query", - "required": false, - "type": "string", - "format": "int64" - }, - { - "name": "nanos", - "description": "Signed fractions of a second at nanosecond resolution of the span\nof time. Durations less than one second are represented with a 0\n`seconds` field and a positive or negative `nanos` field. For durations\nof one second or more, a non-zero value for the `nanos` field must be\nof the same sign as the `seconds` field. Must be from -999,999,999\nto +999,999,999 inclusive.", - "in": "query", - "required": false, - "type": "integer", - "format": "int32" - } - ], - "tags": [ - "ABitOfEverythingService" - ] - } - }, - "/v2/example/a_bit_of_everything/{abe.uuid}": { - "put": { - "operationId": "ABitOfEverythingService_UpdateV2", - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "properties": {} - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "#/definitions/rpcStatus" - } - } - }, - "parameters": [ - { - "name": "abe.uuid", - "in": "path", - "required": true, - "type": "string" - }, - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/gidUpdateV2Request" - } - } - ], - "tags": [ - "ABitOfEverythingService" - ], - "security": [ - { - "ApiKeyAuth": [], - "OAuth2": [ - "read", - "write" - ] - } - ], - "x-irreversible": true - }, - "patch": { - "operationId": "ABitOfEverythingService_UpdateV22", - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "properties": {} - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "#/definitions/rpcStatus" - } - } - }, - "parameters": [ - { - "name": "abe.uuid", - "in": "path", - "required": true, - "type": "string" - }, - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/gidUpdateV2Request" - } - } - ], - "tags": [ - "ABitOfEverythingService" - ], - "security": [ - { - "ApiKeyAuth": [], - "OAuth2": [ - "read", - "write" - ] - } - ], - "x-irreversible": true - } - }, - "/v2/example/empty": { - "get": { - "operationId": "camelCaseServiceName_Empty", - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "properties": {} - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "#/definitions/rpcStatus" - } - } - }, - "tags": [ - "camelCaseServiceName" - ] - } - }, - "/v2/example/errorwithdetails": { - "get": { - "operationId": "ABitOfEverythingService_ErrorWithDetails", - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "properties": {} - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "#/definitions/rpcStatus" - } - } - }, - "tags": [ - "ABitOfEverythingService" - ] - } - }, - "/v2/example/overwriteresponsecontenttype": { - "get": { - "operationId": "ABitOfEverythingService_OverwriteResponseContentType", - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "type": "string" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "#/definitions/rpcStatus" - } - } - }, - "tags": [ - "ABitOfEverythingService" - ], - "produces": [ - "application/text" - ] - } - }, - "/v2/example/postwithemptybody/{name}": { - "post": { - "operationId": "ABitOfEverythingService_PostWithEmptyBody", - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "properties": {} - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "#/definitions/rpcStatus" - } - } - }, - "parameters": [ - { - "name": "name", - "in": "path", - "required": true, - "type": "string" - }, - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "type": "object" - } - } - ], - "tags": [ - "ABitOfEverythingService" - ] - } - }, - "/v2/example/timeout": { - "get": { - "operationId": "ABitOfEverythingService_Timeout", - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "properties": {} - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "#/definitions/rpcStatus" - } - } - }, - "tags": [ - "ABitOfEverythingService" - ] - } - }, - "/v2/example/withbody/{id}": { - "post": { - "operationId": "ABitOfEverythingService_GetMessageWithBody", - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "properties": {} - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "#/definitions/rpcStatus" - } - } - }, - "parameters": [ - { - "name": "id", - "in": "path", - "required": true, - "type": "string" - }, - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "type": "object", - "properties": { - "data": { - "$ref": "#/definitions/gidBody" - } - } - } - } - ], - "tags": [ - "ABitOfEverythingService" - ] - } - }, - "/v2a/example/a_bit_of_everything/{abe.uuid}": { - "patch": { - "operationId": "ABitOfEverythingService_UpdateV23", - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "properties": {} - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "#/definitions/rpcStatus" - } - } - }, - "parameters": [ - { - "name": "abe.uuid", - "in": "path", - "required": true, - "type": "string" - }, - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/gidUpdateV2Request" - } - } - ], - "tags": [ - "ABitOfEverythingService" - ], - "security": [ - { - "ApiKeyAuth": [], - "OAuth2": [ - "read", - "write" - ] - } - ], - "x-irreversible": true - } - } - }, - "definitions": { - "ABitOfEverythingNested": { - "type": "object", - "example": { - "ok": "TRUE" - }, - "properties": { - "name": { - "type": "string", - "description": "name is nested field." - }, - "amount": { - "type": "integer", - "format": "int64" - }, - "ok": { - "$ref": "#/definitions/NestedDeepEnum", - "description": "DeepEnum description." - } - }, - "description": "Nested is nested type." - }, - "NestedDeepEnum": { - "type": "string", - "enum": [ - "FALSE", - "TRUE" - ], - "default": "FALSE", - "description": "DeepEnum is one or zero.\n\n - FALSE: FALSE is false.\n - TRUE: TRUE is true." - }, - "gidABitOfEverything": { - "type": "object", - "example": { - "int64_value": 12, - "double_value": 12.3 - }, - "properties": { - "singleNested": { - "$ref": "#/definitions/ABitOfEverythingNested" - }, - "uuid": { - "type": "string", - "minLength": 1, - "pattern": "[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}" - }, - "nested": { - "type": "array", - "items": { - "$ref": "#/definitions/ABitOfEverythingNested" - } - }, - "floatValue": { - "type": "number", - "format": "float", - "default": "0.2", - "description": "Float value field", - "required": [ - "float_value" - ] - }, - "doubleValue": { - "type": "number", - "format": "double" - }, - "int64Value": { - "type": "string", - "format": "int64" - }, - "uint64Value": { - "type": "string", - "format": "uint64" - }, - "int32Value": { - "type": "integer", - "format": "int32" - }, - "fixed64Value": { - "type": "string", - "format": "uint64" - }, - "fixed32Value": { - "type": "integer", - "format": "int64" - }, - "boolValue": { - "type": "boolean" - }, - "stringValue": { - "type": "string" - }, - "bytesValue": { - "type": "string", - "format": "byte" - }, - "uint32Value": { - "type": "integer", - "format": "int64" - }, - "enumValue": { - "$ref": "#/definitions/gidNumericEnum" - }, - "sfixed32Value": { - "type": "integer", - "format": "int32" - }, - "sfixed64Value": { - "type": "string", - "format": "int64" - }, - "sint32Value": { - "type": "integer", - "format": "int32" - }, - "sint64Value": { - "type": "string", - "format": "int64" - }, - "repeatedStringValue": { - "type": "array", - "items": { - "type": "string" - } - }, - "oneofEmpty": { - "properties": {} - }, - "oneofString": { - "type": "string" - }, - "mapValue": { - "type": "object", - "additionalProperties": { - "$ref": "#/definitions/gidNumericEnum" - } - }, - "mappedStringValue": { - "type": "object", - "additionalProperties": { - "type": "string" - } - }, - "mappedNestedValue": { - "type": "object", - "additionalProperties": { - "$ref": "#/definitions/ABitOfEverythingNested" - } - }, - "nonConventionalNameValue": { - "type": "string" - }, - "timestampValue": { - "type": "string", - "format": "date-time" - }, - "repeatedEnumValue": { - "type": "array", - "items": { - "$ref": "#/definitions/gidNumericEnum" - }, - "title": "repeated enum value. it is comma-separated in query" - }, - "repeatedEnumAnnotation": { - "type": "array", - "items": { - "$ref": "#/definitions/gidNumericEnum" - }, - "description": "Repeated numeric enum description.", - "title": "Repeated numeric enum title" - }, - "enumValueAnnotation": { - "$ref": "#/definitions/gidNumericEnum", - "description": "Numeric enum description.", - "title": "Numeric enum title" - }, - "repeatedStringAnnotation": { - "type": "array", - "items": { - "type": "string" - }, - "description": "Repeated string description.", - "title": "Repeated string title" - }, - "repeatedNestedAnnotation": { - "type": "array", - "items": { - "$ref": "#/definitions/ABitOfEverythingNested" - }, - "description": "Repeated nested object description.", - "title": "Repeated nested object title" - }, - "nestedAnnotation": { - "$ref": "#/definitions/ABitOfEverythingNested", - "description": "Nested object description.", - "title": "Nested object title" - }, - "int64OverrideType": { - "type": "integer", - "format": "int64" - }, - "requiredStringViaFieldBehaviorAnnotation": { - "type": "string", - "title": "mark a field as required in Open API definition", - "required": [ - "required_string_via_field_behavior_annotation" - ] - }, - "outputOnlyStringViaFieldBehaviorAnnotation": { - "type": "string", - "title": "mark a field as readonly in Open API definition", - "readOnly": true - } - }, - "description": "Intentionaly complicated message type to cover many features of Protobuf.", - "title": "A bit of everything", - "externalDocs": { - "description": "Find out more about ABitOfEverything", - "url": "https://github.com/grpc-ecosystem/grpc-gateway" - }, - "required": [ - "uuid", - "int64Value", - "doubleValue", - "floatValue", - "requiredStringViaFieldBehaviorAnnotation" - ] - }, - "gidABitOfEverythingRepeated": { - "type": "object", - "example": { - "path_repeated_bool_value": [ - true, - true, - false, - true - ], - "path_repeated_int32_value": [ - 1, - 2, - 3 - ] - }, - "properties": { - "pathRepeatedFloatValue": { - "type": "array", - "items": { - "type": "number", - "format": "float" - }, - "title": "repeated values. they are comma-separated in path" - }, - "pathRepeatedDoubleValue": { - "type": "array", - "items": { - "type": "number", - "format": "double" - } - }, - "pathRepeatedInt64Value": { - "type": "array", - "items": { - "type": "string", - "format": "int64" - } - }, - "pathRepeatedUint64Value": { - "type": "array", - "items": { - "type": "string", - "format": "uint64" - } - }, - "pathRepeatedInt32Value": { - "type": "array", - "items": { - "type": "integer", - "format": "int32" - } - }, - "pathRepeatedFixed64Value": { - "type": "array", - "items": { - "type": "string", - "format": "uint64" - } - }, - "pathRepeatedFixed32Value": { - "type": "array", - "items": { - "type": "integer", - "format": "int64" - } - }, - "pathRepeatedBoolValue": { - "type": "array", - "items": { - "type": "boolean" - } - }, - "pathRepeatedStringValue": { - "type": "array", - "items": { - "type": "string" - } - }, - "pathRepeatedBytesValue": { - "type": "array", - "items": { - "type": "string", - "format": "byte" - } - }, - "pathRepeatedUint32Value": { - "type": "array", - "items": { - "type": "integer", - "format": "int64" - } - }, - "pathRepeatedEnumValue": { - "type": "array", - "items": { - "$ref": "#/definitions/gidNumericEnum" - } - }, - "pathRepeatedSfixed32Value": { - "type": "array", - "items": { - "type": "integer", - "format": "int32" - } - }, - "pathRepeatedSfixed64Value": { - "type": "array", - "items": { - "type": "string", - "format": "int64" - } - }, - "pathRepeatedSint32Value": { - "type": "array", - "items": { - "type": "integer", - "format": "int32" - } - }, - "pathRepeatedSint64Value": { - "type": "array", - "items": { - "type": "string", - "format": "int64" - } - } - }, - "title": "ABitOfEverythingRepeated is used to validate repeated path parameter functionality" - }, - "gidBody": { - "type": "object", - "properties": { - "name": { - "type": "string" - } - } - }, - "gidBook": { - "type": "object", - "properties": { - "name": { - "type": "string", - "description": "The resource name of the book.\n\nFormat: `publishers/{publisher}/books/{book}`\n\nExample: `publishers/1257894000000000000/books/my-book`" - }, - "id": { - "type": "string", - "description": "Output only. The book's ID.", - "readOnly": true - }, - "createTime": { - "type": "string", - "format": "date-time", - "description": "Output only. Creation time of the book.", - "readOnly": true - } - }, - "description": "An example resource type from AIP-123 used to test the behavior described in\nthe CreateBookRequest message.\n\nSee: https://google.aip.dev/123" - }, - "gidCheckStatusResponse": { - "type": "object", - "properties": { - "status": { - "$ref": "#/definitions/rpcStatus" - } - } - }, - "gidGenerateRequest": { - "type": "object", - "properties": { - "type": { - "type": "string", - "title": "type of id e.g uuid, shortid, snowflake (64 bit), bigflake (128 bit)" - } - }, - "description": "Generate a unique ID. Defaults to uuid." - }, - "gidGenerateResponse": { - "type": "object", - "properties": { - "id": { - "type": "string", - "title": "the unique id generated" - }, - "type": { - "type": "string", - "title": "the type of id generated" - } - } - }, - "gidNumericEnum": { - "type": "string", - "enum": [ - "ZERO", - "ONE" - ], - "default": "ZERO", - "description": "NumericEnum is one or zero.\n\n - ZERO: ZERO means 0\n - ONE: ONE means 1" - }, - "gidTypesResponse": { - "type": "object", - "properties": { - "types": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "title": "TypesResponse 返回值类型" - }, - "gidUpdateV2Request": { - "type": "object", - "properties": { - "abe": { - "$ref": "#/definitions/gidABitOfEverything" - }, - "updateMask": { - "type": "string", - "description": "The paths to update." - } - }, - "title": "UpdateV2Request request for update includes the message and the update mask" - }, - "protobufAny": { - "type": "object", - "properties": { - "typeUrl": { - "type": "string", - "description": "A URL/resource name that uniquely identifies the type of the serialized\nprotocol buffer message. This string must contain at least\none \"/\" character. The last segment of the URL's path must represent\nthe fully qualified name of the type (as in\n`path/google.protobuf.Duration`). The name should be in a canonical form\n(e.g., leading \".\" is not accepted).\n\nIn practice, teams usually precompile into the binary all types that they\nexpect it to use in the context of Any. However, for URLs which use the\nscheme `http`, `https`, or no scheme, one can optionally set up a type\nserver that maps type URLs to message definitions as follows:\n\n* If no scheme is provided, `https` is assumed.\n* An HTTP GET on the URL must yield a [google.protobuf.Type][]\n value in binary format, or produce an error.\n* Applications are allowed to cache lookup results based on the\n URL, or have them precompiled into a binary to avoid any\n lookup. Therefore, binary compatibility needs to be preserved\n on changes to types. (Use versioned type names to manage\n breaking changes.)\n\nNote: this functionality is not currently available in the official\nprotobuf release, and it is not used for type URLs beginning with\ntype.googleapis.com.\n\nSchemes other than `http`, `https` (or the empty scheme) might be\nused with implementation specific semantics." - }, - "value": { - "type": "string", - "format": "byte", - "description": "Must be a valid serialized protocol buffer of the above specified type." - } - }, - "description": "`Any` contains an arbitrary serialized protocol buffer message along with a\nURL that describes the type of the serialized message.\n\nProtobuf library provides support to pack/unpack Any values in the form\nof utility functions or additional generated methods of the Any type.\n\nExample 1: Pack and unpack a message in C++.\n\n Foo foo = ...;\n Any any;\n any.PackFrom(foo);\n ...\n if (any.UnpackTo(\u0026foo)) {\n ...\n }\n\nExample 2: Pack and unpack a message in Java.\n\n Foo foo = ...;\n Any any = Any.pack(foo);\n ...\n if (any.is(Foo.class)) {\n foo = any.unpack(Foo.class);\n }\n\n Example 3: Pack and unpack a message in Python.\n\n foo = Foo(...)\n any = Any()\n any.Pack(foo)\n ...\n if any.Is(Foo.DESCRIPTOR):\n any.Unpack(foo)\n ...\n\n Example 4: Pack and unpack a message in Go\n\n foo := \u0026pb.Foo{...}\n any, err := anypb.New(foo)\n if err != nil {\n ...\n }\n ...\n foo := \u0026pb.Foo{}\n if err := any.UnmarshalTo(foo); err != nil {\n ...\n }\n\nThe pack methods provided by protobuf library will by default use\n'type.googleapis.com/full.type.name' as the type URL and the unpack\nmethods only use the fully qualified type name after the last '/'\nin the type URL, for example \"foo.bar.com/x/y.z\" will yield type\nname \"y.z\".\n\n\nJSON\n====\nThe JSON representation of an `Any` value uses the regular\nrepresentation of the deserialized, embedded message, with an\nadditional field `@type` which contains the type URL. Example:\n\n package google.profile;\n message Person {\n string first_name = 1;\n string last_name = 2;\n }\n\n {\n \"@type\": \"type.googleapis.com/google.profile.Person\",\n \"firstName\": \u003cstring\u003e,\n \"lastName\": \u003cstring\u003e\n }\n\nIf the embedded message type is well-known and has a custom JSON\nrepresentation, that representation will be embedded adding a field\n`value` which holds the custom JSON in addition to the `@type`\nfield. Example (for message [google.protobuf.Duration][]):\n\n {\n \"@type\": \"type.googleapis.com/google.protobuf.Duration\",\n \"value\": \"1.212s\"\n }" - }, - "rpcStatus": { - "type": "object", - "properties": { - "code": { - "type": "integer", - "format": "int32", - "description": "The status code, which should be an enum value of [google.rpc.Code][google.rpc.Code]." - }, - "message": { - "type": "string", - "description": "A developer-facing error message, which should be in English. Any\nuser-facing error message should be localized and sent in the\n[google.rpc.Status.details][google.rpc.Status.details] field, or localized by the client." - }, - "details": { - "type": "array", - "items": { - "$ref": "#/definitions/protobufAny" - }, - "description": "A list of messages that carry the error details. There is a common set of\nmessage types for APIs to use." - } - }, - "description": "The `Status` type defines a logical error model that is suitable for\ndifferent programming environments, including REST APIs and RPC APIs. It is\nused by [gRPC](https://github.com/grpc). Each `Status` message contains\nthree pieces of data: error code, error message, and error details.\n\nYou can find out more about this error model and how to work with it in the\n[API Design Guide](https://cloud.google.com/apis/design/errors)." - } - }, - "externalDocs": { - "description": "生成随机id", - "url": "https://github.com/pubgo/lava/tree/master/example/gid" - }, - "x-grpc-gateway-baz-list": [ - "one", - true - ], - "x-grpc-gateway-foo": "bar" -} diff --git a/example/docs/swagger/proto/yuque/yuque.swagger.json b/example/docs/swagger/proto/yuque/yuque.swagger.json deleted file mode 100644 index 394affffd..000000000 --- a/example/docs/swagger/proto/yuque/yuque.swagger.json +++ /dev/null @@ -1,511 +0,0 @@ -{ - "swagger": "2.0", - "info": { - "title": "yuque restful api interface", - "version": "2.0", - "contact": { - "name": "barry", - "url": "https://github.com/kooksee", - "email": "kooksee@163.com" - }, - "license": { - "name": "Apache 2.0 License" - } - }, - "tags": [ - { - "name": "Yuque" - }, - { - "name": "UserService" - } - ], - "host": "www.yuque.com", - "basePath": "/api/v2", - "schemes": [ - "https" - ], - "consumes": [ - "application/json" - ], - "produces": [ - "application/json" - ], - "paths": { - "/api/v1/users/reset_password": { - "post": { - "summary": "User reset password", - "description": "Reset password for users. For first time setting password, old password should be empty string", - "operationId": "UserService_ResetPassword", - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "properties": {} - } - }, - "400": { - "description": "请求的参数不正确,或缺少必要信息,请对比文档", - "schema": {} - }, - "401": { - "description": "需要用户认证的接口用户信息不正确", - "schema": {} - }, - "403": { - "description": "缺少对应功能的权限", - "schema": {} - }, - "404": { - "description": "数据不存在,或未开放", - "schema": {} - }, - "500": { - "description": "服务器异常", - "schema": {} - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "#/definitions/rpcStatus" - } - } - }, - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/v2UserInfoReq" - } - } - ], - "tags": [ - "Users" - ], - "security": [ - { - "ApiKey": [] - } - ] - } - }, - "/api/v1/users/signin/{login}": { - "get": { - "operationId": "UserService_Signin1", - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "$ref": "#/definitions/v2UserInfoResp" - } - }, - "400": { - "description": "请求的参数不正确,或缺少必要信息,请对比文档", - "schema": {} - }, - "401": { - "description": "需要用户认证的接口用户信息不正确", - "schema": {} - }, - "403": { - "description": "缺少对应功能的权限", - "schema": {} - }, - "404": { - "description": "数据不存在,或未开放", - "schema": {} - }, - "500": { - "description": "服务器异常", - "schema": {} - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "#/definitions/rpcStatus" - } - } - }, - "parameters": [ - { - "name": "login", - "description": "login or id", - "in": "path", - "required": true, - "type": "string" - } - ], - "tags": [ - "UserService" - ] - }, - "post": { - "summary": "User signin", - "description": "Sign in a user by using an auth provider", - "operationId": "UserService_Signin", - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "$ref": "#/definitions/v2UserInfoResp" - } - }, - "400": { - "description": "请求的参数不正确,或缺少必要信息,请对比文档", - "schema": {} - }, - "401": { - "description": "需要用户认证的接口用户信息不正确", - "schema": {} - }, - "403": { - "description": "缺少对应功能的权限", - "schema": {} - }, - "404": { - "description": "数据不存在,或未开放", - "schema": {} - }, - "500": { - "description": "服务器异常", - "schema": {} - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "#/definitions/rpcStatus" - } - } - }, - "parameters": [ - { - "name": "login", - "description": "login or id", - "in": "path", - "required": true, - "type": "string" - }, - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "type": "object" - } - } - ], - "tags": [ - "Users" - ] - } - }, - "/groups": { - "post": { - "summary": "创建 Group", - "operationId": "Yuque_CreateGroup", - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "$ref": "#/definitions/v2CreateGroupResp" - } - }, - "400": { - "description": "请求的参数不正确,或缺少必要信息,请对比文档", - "schema": {} - }, - "401": { - "description": "需要用户认证的接口用户信息不正确", - "schema": {} - }, - "403": { - "description": "缺少对应功能的权限", - "schema": {} - }, - "404": { - "description": "数据不存在,或未开放", - "schema": {} - }, - "500": { - "description": "服务器异常", - "schema": {} - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "#/definitions/rpcStatus" - } - } - }, - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/v2CreateGroupReq" - } - } - ], - "tags": [ - "Yuque" - ] - } - }, - "/user": { - "get": { - "summary": "获取认证的用户的个人信息", - "operationId": "Yuque_UserInfo", - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "$ref": "#/definitions/v2UserInfoResp" - } - }, - "400": { - "description": "请求的参数不正确,或缺少必要信息,请对比文档", - "schema": {} - }, - "401": { - "description": "需要用户认证的接口用户信息不正确", - "schema": {} - }, - "403": { - "description": "缺少对应功能的权限", - "schema": {} - }, - "404": { - "description": "数据不存在,或未开放", - "schema": {} - }, - "500": { - "description": "服务器异常", - "schema": {} - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "#/definitions/rpcStatus" - } - } - }, - "tags": [ - "Yuque" - ] - } - }, - "/users/{login}": { - "get": { - "summary": "获取单个用户信息", - "operationId": "Yuque_UserInfoByLogin", - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "$ref": "#/definitions/v2UserInfoResp" - } - }, - "400": { - "description": "请求的参数不正确,或缺少必要信息,请对比文档", - "schema": {} - }, - "401": { - "description": "需要用户认证的接口用户信息不正确", - "schema": {} - }, - "403": { - "description": "缺少对应功能的权限", - "schema": {} - }, - "404": { - "description": "数据不存在,或未开放", - "schema": {} - }, - "500": { - "description": "服务器异常", - "schema": {} - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "#/definitions/rpcStatus" - } - } - }, - "parameters": [ - { - "name": "login", - "description": "login or id", - "in": "path", - "required": true, - "type": "string" - } - ], - "tags": [ - "Yuque" - ] - } - } - }, - "definitions": { - "lavaResponse": { - "type": "object", - "properties": { - "code": { - "type": "integer", - "format": "int32" - }, - "headers": { - "type": "object", - "additionalProperties": { - "type": "string" - } - } - } - }, - "protobufAny": { - "type": "object", - "properties": { - "typeUrl": { - "type": "string" - }, - "value": { - "type": "string", - "format": "byte" - } - } - }, - "rpcStatus": { - "type": "object", - "properties": { - "code": { - "type": "integer", - "format": "int32" - }, - "message": { - "type": "string" - }, - "details": { - "type": "array", - "items": { - "$ref": "#/definitions/protobufAny" - } - } - } - }, - "v2CreateGroupReq": { - "type": "object", - "properties": { - "login": { - "type": "string", - "title": "login" - }, - "name": { - "type": "string", - "title": "组织名称" - }, - "description": { - "type": "string", - "title": "介绍" - } - } - }, - "v2CreateGroupResp": { - "type": "object", - "properties": { - "data": { - "type": "array", - "items": { - "$ref": "#/definitions/v2CreateGroupRespData" - } - }, - "response": { - "$ref": "#/definitions/lavaResponse" - } - } - }, - "v2CreateGroupRespData": { - "type": "object", - "properties": { - "id": { - "type": "integer", - "format": "int64" - }, - "login": { - "type": "string" - }, - "name": { - "type": "string" - }, - "avatarUrl": { - "type": "string" - }, - "description": { - "type": "string" - }, - "createdAt": { - "type": "string" - }, - "updatedAt": { - "type": "string" - } - } - }, - "v2UserInfoReq": { - "type": "object", - "properties": { - "login": { - "type": "string", - "title": "login or id" - } - } - }, - "v2UserInfoResp": { - "type": "object", - "properties": { - "data": { - "$ref": "#/definitions/v2UserInfoRespData" - }, - "response": { - "$ref": "#/definitions/lavaResponse" - } - } - }, - "v2UserInfoRespData": { - "type": "object", - "properties": { - "id": { - "type": "integer", - "format": "int64" - }, - "type": { - "type": "string" - }, - "login": { - "type": "string" - }, - "name": { - "type": "string" - }, - "description": { - "type": "string" - }, - "avatarUrl": { - "type": "string" - }, - "createdAt": { - "type": "string" - }, - "updatedAt": { - "type": "string" - } - } - } - }, - "externalDocs": { - "url": "https://www.yuque.com/yuque/developer/api" - } -} diff --git a/example/docs/swagger/proto/yuque_pb/yuque.swagger.json b/example/docs/swagger/proto/yuque_pb/yuque.swagger.json deleted file mode 100644 index 7fdb144d0..000000000 --- a/example/docs/swagger/proto/yuque_pb/yuque.swagger.json +++ /dev/null @@ -1,455 +0,0 @@ -{ - "swagger": "2.0", - "info": { - "title": "yuque restful api interface", - "version": "2.0", - "contact": { - "name": "barry", - "url": "https://github.com/kooksee", - "email": "kooksee@163.com" - }, - "license": { - "name": "Apache 2.0 License" - } - }, - "tags": [ - { - "name": "Yuque" - }, - { - "name": "UserService" - } - ], - "host": "www.yuque.com", - "basePath": "/api/v2", - "schemes": [ - "https" - ], - "consumes": [ - "application/json" - ], - "produces": [ - "application/json" - ], - "paths": { - "/api/v1/users/reset_password": { - "post": { - "summary": "User reset password", - "description": "Reset password for users. For first time setting password, old password should be empty string", - "operationId": "UserService_ResetPassword", - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "properties": {} - } - }, - "400": { - "description": "请求的参数不正确,或缺少必要信息,请对比文档", - "schema": {} - }, - "401": { - "description": "需要用户认证的接口用户信息不正确", - "schema": {} - }, - "403": { - "description": "缺少对应功能的权限", - "schema": {} - }, - "404": { - "description": "数据不存在,或未开放", - "schema": {} - }, - "500": { - "description": "服务器异常", - "schema": {} - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "#/definitions/rpcStatus" - } - } - }, - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/v2UserInfoReq" - } - } - ], - "tags": [ - "Users" - ], - "security": [ - { - "ApiKey": [] - } - ] - } - }, - "/api/v1/users/signin": { - "post": { - "summary": "User signin", - "description": "Sign in a user by using an auth provider", - "operationId": "UserService_Signin", - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "$ref": "#/definitions/v2UserInfoResp" - } - }, - "400": { - "description": "请求的参数不正确,或缺少必要信息,请对比文档", - "schema": {} - }, - "401": { - "description": "需要用户认证的接口用户信息不正确", - "schema": {} - }, - "403": { - "description": "缺少对应功能的权限", - "schema": {} - }, - "404": { - "description": "数据不存在,或未开放", - "schema": {} - }, - "500": { - "description": "服务器异常", - "schema": {} - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "#/definitions/rpcStatus" - } - } - }, - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/v2UserInfoReq" - } - } - ], - "tags": [ - "Users" - ] - } - }, - "/groups": { - "post": { - "summary": "创建 Group", - "operationId": "Yuque_CreateGroup", - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "$ref": "#/definitions/v2CreateGroupResp" - } - }, - "400": { - "description": "请求的参数不正确,或缺少必要信息,请对比文档", - "schema": {} - }, - "401": { - "description": "需要用户认证的接口用户信息不正确", - "schema": {} - }, - "403": { - "description": "缺少对应功能的权限", - "schema": {} - }, - "404": { - "description": "数据不存在,或未开放", - "schema": {} - }, - "500": { - "description": "服务器异常", - "schema": {} - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "#/definitions/rpcStatus" - } - } - }, - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/v2CreateGroupReq" - } - } - ], - "tags": [ - "Yuque" - ] - } - }, - "/user": { - "get": { - "summary": "获取认证的用户的个人信息", - "operationId": "Yuque_UserInfo", - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "$ref": "#/definitions/v2UserInfoResp" - } - }, - "400": { - "description": "请求的参数不正确,或缺少必要信息,请对比文档", - "schema": {} - }, - "401": { - "description": "需要用户认证的接口用户信息不正确", - "schema": {} - }, - "403": { - "description": "缺少对应功能的权限", - "schema": {} - }, - "404": { - "description": "数据不存在,或未开放", - "schema": {} - }, - "500": { - "description": "服务器异常", - "schema": {} - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "#/definitions/rpcStatus" - } - } - }, - "tags": [ - "Yuque" - ] - } - }, - "/users/{login}": { - "get": { - "summary": "获取单个用户信息", - "operationId": "Yuque_UserInfoByLogin", - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "$ref": "#/definitions/v2UserInfoResp" - } - }, - "400": { - "description": "请求的参数不正确,或缺少必要信息,请对比文档", - "schema": {} - }, - "401": { - "description": "需要用户认证的接口用户信息不正确", - "schema": {} - }, - "403": { - "description": "缺少对应功能的权限", - "schema": {} - }, - "404": { - "description": "数据不存在,或未开放", - "schema": {} - }, - "500": { - "description": "服务器异常", - "schema": {} - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "#/definitions/rpcStatus" - } - } - }, - "parameters": [ - { - "name": "login", - "description": "login or id", - "in": "path", - "required": true, - "type": "string" - } - ], - "tags": [ - "Yuque" - ] - } - } - }, - "definitions": { - "lavaResponse": { - "type": "object", - "properties": { - "code": { - "type": "integer", - "format": "int32" - }, - "headers": { - "type": "object", - "additionalProperties": { - "type": "string" - } - } - } - }, - "protobufAny": { - "type": "object", - "properties": { - "typeUrl": { - "type": "string" - }, - "value": { - "type": "string", - "format": "byte" - } - } - }, - "rpcStatus": { - "type": "object", - "properties": { - "code": { - "type": "integer", - "format": "int32" - }, - "message": { - "type": "string" - }, - "details": { - "type": "array", - "items": { - "$ref": "#/definitions/protobufAny" - } - } - } - }, - "v2CreateGroupReq": { - "type": "object", - "properties": { - "login": { - "type": "string", - "title": "login" - }, - "name": { - "type": "string", - "title": "组织名称" - }, - "description": { - "type": "string", - "title": "介绍" - } - } - }, - "v2CreateGroupResp": { - "type": "object", - "properties": { - "data": { - "type": "array", - "items": { - "$ref": "#/definitions/v2CreateGroupRespData" - } - }, - "response": { - "$ref": "#/definitions/lavaResponse" - } - } - }, - "v2CreateGroupRespData": { - "type": "object", - "properties": { - "id": { - "type": "integer", - "format": "int64" - }, - "login": { - "type": "string" - }, - "name": { - "type": "string" - }, - "avatarUrl": { - "type": "string" - }, - "description": { - "type": "string" - }, - "createdAt": { - "type": "string" - }, - "updatedAt": { - "type": "string" - } - } - }, - "v2UserInfoReq": { - "type": "object", - "properties": { - "login": { - "type": "string", - "title": "login or id" - } - } - }, - "v2UserInfoResp": { - "type": "object", - "properties": { - "data": { - "$ref": "#/definitions/v2UserInfoRespData" - }, - "response": { - "$ref": "#/definitions/lavaResponse" - } - } - }, - "v2UserInfoRespData": { - "type": "object", - "properties": { - "id": { - "type": "integer", - "format": "int64" - }, - "type": { - "type": "string" - }, - "login": { - "type": "string" - }, - "name": { - "type": "string" - }, - "description": { - "type": "string" - }, - "avatarUrl": { - "type": "string" - }, - "createdAt": { - "type": "string" - }, - "updatedAt": { - "type": "string" - } - } - } - }, - "externalDocs": { - "url": "https://www.yuque.com/yuque/developer/api" - } -} diff --git a/example/docs/swagger/proto/yuquepb/yuque.swagger.json b/example/docs/swagger/proto/yuquepb/yuque.swagger.json deleted file mode 100644 index 394affffd..000000000 --- a/example/docs/swagger/proto/yuquepb/yuque.swagger.json +++ /dev/null @@ -1,511 +0,0 @@ -{ - "swagger": "2.0", - "info": { - "title": "yuque restful api interface", - "version": "2.0", - "contact": { - "name": "barry", - "url": "https://github.com/kooksee", - "email": "kooksee@163.com" - }, - "license": { - "name": "Apache 2.0 License" - } - }, - "tags": [ - { - "name": "Yuque" - }, - { - "name": "UserService" - } - ], - "host": "www.yuque.com", - "basePath": "/api/v2", - "schemes": [ - "https" - ], - "consumes": [ - "application/json" - ], - "produces": [ - "application/json" - ], - "paths": { - "/api/v1/users/reset_password": { - "post": { - "summary": "User reset password", - "description": "Reset password for users. For first time setting password, old password should be empty string", - "operationId": "UserService_ResetPassword", - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "properties": {} - } - }, - "400": { - "description": "请求的参数不正确,或缺少必要信息,请对比文档", - "schema": {} - }, - "401": { - "description": "需要用户认证的接口用户信息不正确", - "schema": {} - }, - "403": { - "description": "缺少对应功能的权限", - "schema": {} - }, - "404": { - "description": "数据不存在,或未开放", - "schema": {} - }, - "500": { - "description": "服务器异常", - "schema": {} - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "#/definitions/rpcStatus" - } - } - }, - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/v2UserInfoReq" - } - } - ], - "tags": [ - "Users" - ], - "security": [ - { - "ApiKey": [] - } - ] - } - }, - "/api/v1/users/signin/{login}": { - "get": { - "operationId": "UserService_Signin1", - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "$ref": "#/definitions/v2UserInfoResp" - } - }, - "400": { - "description": "请求的参数不正确,或缺少必要信息,请对比文档", - "schema": {} - }, - "401": { - "description": "需要用户认证的接口用户信息不正确", - "schema": {} - }, - "403": { - "description": "缺少对应功能的权限", - "schema": {} - }, - "404": { - "description": "数据不存在,或未开放", - "schema": {} - }, - "500": { - "description": "服务器异常", - "schema": {} - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "#/definitions/rpcStatus" - } - } - }, - "parameters": [ - { - "name": "login", - "description": "login or id", - "in": "path", - "required": true, - "type": "string" - } - ], - "tags": [ - "UserService" - ] - }, - "post": { - "summary": "User signin", - "description": "Sign in a user by using an auth provider", - "operationId": "UserService_Signin", - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "$ref": "#/definitions/v2UserInfoResp" - } - }, - "400": { - "description": "请求的参数不正确,或缺少必要信息,请对比文档", - "schema": {} - }, - "401": { - "description": "需要用户认证的接口用户信息不正确", - "schema": {} - }, - "403": { - "description": "缺少对应功能的权限", - "schema": {} - }, - "404": { - "description": "数据不存在,或未开放", - "schema": {} - }, - "500": { - "description": "服务器异常", - "schema": {} - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "#/definitions/rpcStatus" - } - } - }, - "parameters": [ - { - "name": "login", - "description": "login or id", - "in": "path", - "required": true, - "type": "string" - }, - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "type": "object" - } - } - ], - "tags": [ - "Users" - ] - } - }, - "/groups": { - "post": { - "summary": "创建 Group", - "operationId": "Yuque_CreateGroup", - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "$ref": "#/definitions/v2CreateGroupResp" - } - }, - "400": { - "description": "请求的参数不正确,或缺少必要信息,请对比文档", - "schema": {} - }, - "401": { - "description": "需要用户认证的接口用户信息不正确", - "schema": {} - }, - "403": { - "description": "缺少对应功能的权限", - "schema": {} - }, - "404": { - "description": "数据不存在,或未开放", - "schema": {} - }, - "500": { - "description": "服务器异常", - "schema": {} - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "#/definitions/rpcStatus" - } - } - }, - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/v2CreateGroupReq" - } - } - ], - "tags": [ - "Yuque" - ] - } - }, - "/user": { - "get": { - "summary": "获取认证的用户的个人信息", - "operationId": "Yuque_UserInfo", - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "$ref": "#/definitions/v2UserInfoResp" - } - }, - "400": { - "description": "请求的参数不正确,或缺少必要信息,请对比文档", - "schema": {} - }, - "401": { - "description": "需要用户认证的接口用户信息不正确", - "schema": {} - }, - "403": { - "description": "缺少对应功能的权限", - "schema": {} - }, - "404": { - "description": "数据不存在,或未开放", - "schema": {} - }, - "500": { - "description": "服务器异常", - "schema": {} - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "#/definitions/rpcStatus" - } - } - }, - "tags": [ - "Yuque" - ] - } - }, - "/users/{login}": { - "get": { - "summary": "获取单个用户信息", - "operationId": "Yuque_UserInfoByLogin", - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "$ref": "#/definitions/v2UserInfoResp" - } - }, - "400": { - "description": "请求的参数不正确,或缺少必要信息,请对比文档", - "schema": {} - }, - "401": { - "description": "需要用户认证的接口用户信息不正确", - "schema": {} - }, - "403": { - "description": "缺少对应功能的权限", - "schema": {} - }, - "404": { - "description": "数据不存在,或未开放", - "schema": {} - }, - "500": { - "description": "服务器异常", - "schema": {} - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "#/definitions/rpcStatus" - } - } - }, - "parameters": [ - { - "name": "login", - "description": "login or id", - "in": "path", - "required": true, - "type": "string" - } - ], - "tags": [ - "Yuque" - ] - } - } - }, - "definitions": { - "lavaResponse": { - "type": "object", - "properties": { - "code": { - "type": "integer", - "format": "int32" - }, - "headers": { - "type": "object", - "additionalProperties": { - "type": "string" - } - } - } - }, - "protobufAny": { - "type": "object", - "properties": { - "typeUrl": { - "type": "string" - }, - "value": { - "type": "string", - "format": "byte" - } - } - }, - "rpcStatus": { - "type": "object", - "properties": { - "code": { - "type": "integer", - "format": "int32" - }, - "message": { - "type": "string" - }, - "details": { - "type": "array", - "items": { - "$ref": "#/definitions/protobufAny" - } - } - } - }, - "v2CreateGroupReq": { - "type": "object", - "properties": { - "login": { - "type": "string", - "title": "login" - }, - "name": { - "type": "string", - "title": "组织名称" - }, - "description": { - "type": "string", - "title": "介绍" - } - } - }, - "v2CreateGroupResp": { - "type": "object", - "properties": { - "data": { - "type": "array", - "items": { - "$ref": "#/definitions/v2CreateGroupRespData" - } - }, - "response": { - "$ref": "#/definitions/lavaResponse" - } - } - }, - "v2CreateGroupRespData": { - "type": "object", - "properties": { - "id": { - "type": "integer", - "format": "int64" - }, - "login": { - "type": "string" - }, - "name": { - "type": "string" - }, - "avatarUrl": { - "type": "string" - }, - "description": { - "type": "string" - }, - "createdAt": { - "type": "string" - }, - "updatedAt": { - "type": "string" - } - } - }, - "v2UserInfoReq": { - "type": "object", - "properties": { - "login": { - "type": "string", - "title": "login or id" - } - } - }, - "v2UserInfoResp": { - "type": "object", - "properties": { - "data": { - "$ref": "#/definitions/v2UserInfoRespData" - }, - "response": { - "$ref": "#/definitions/lavaResponse" - } - } - }, - "v2UserInfoRespData": { - "type": "object", - "properties": { - "id": { - "type": "integer", - "format": "int64" - }, - "type": { - "type": "string" - }, - "login": { - "type": "string" - }, - "name": { - "type": "string" - }, - "description": { - "type": "string" - }, - "avatarUrl": { - "type": "string" - }, - "createdAt": { - "type": "string" - }, - "updatedAt": { - "type": "string" - } - } - } - }, - "externalDocs": { - "url": "https://www.yuque.com/yuque/developer/api" - } -} diff --git a/example/docs/swagger/rsocket/metadata.swagger.json b/example/docs/swagger/rsocket/metadata.swagger.json deleted file mode 100644 index c98949ca1..000000000 --- a/example/docs/swagger/rsocket/metadata.swagger.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "swagger": "2.0", - "info": { - "title": "rsocket/metadata.proto", - "version": "version not set" - }, - "consumes": [ - "application/json" - ], - "produces": [ - "application/json" - ], - "paths": {}, - "definitions": { - "protobufAny": { - "type": "object", - "properties": { - "typeUrl": { - "type": "string" - }, - "value": { - "type": "string", - "format": "byte" - } - } - }, - "rpcStatus": { - "type": "object", - "properties": { - "code": { - "type": "integer", - "format": "int32" - }, - "message": { - "type": "string" - }, - "details": { - "type": "array", - "items": { - "$ref": "#/definitions/protobufAny" - } - } - } - } - } -} diff --git a/example/example/fx/main.go b/example/example/fx/main.go deleted file mode 100644 index 194bdf319..000000000 --- a/example/example/fx/main.go +++ /dev/null @@ -1,40 +0,0 @@ -package main - -import ( - "fmt" - "github.com/pubgo/xerror" - "go.uber.org/fx" -) - -type Reg interface { - Hello() -} - -type helloImpl struct { - ss string -} - -func (t *helloImpl) Hello() { - -} - -func main() { - xerror.Exit(fx.New( - fx.Provide(fx.Annotated{ - Group: "jj", - Target: func() Reg { - return &helloImpl{ss: "dd"} - }, - }), - fx.Provide(fx.Annotated{ - Group: "jj", - Target: func() Reg { - return nil - }, - }), fx.Invoke(func(jj struct { - fx.In - Jj []Reg `group:"jj"` - }) { - fmt.Println(jj.Jj, len(jj.Jj)) - })).Err()) -} diff --git a/example/example/header/main.go b/example/example/header/main.go deleted file mode 100644 index fa9199a56..000000000 --- a/example/example/header/main.go +++ /dev/null @@ -1,20 +0,0 @@ -package main - -import ( - "github.com/kr/pretty" - "github.com/pubgo/lava/pkg/utils" - "github.com/valyala/fasthttp" - "google.golang.org/grpc/metadata" -) - -func main() { - var h = fasthttp.RequestHeader{} - h.Set("a", "b") - h.Add("b", "c") - h.Add("b", "d") - var md = make(metadata.MD) - h.VisitAll(func(key, value []byte) { - md.Append(utils.BtoS(key), utils.BtoS(value)) - }) - pretty.Logln(md) -} diff --git a/example/grpc-proxy/proxy/DOC.md b/example/grpc-proxy/proxy/DOC.md deleted file mode 100644 index cc5e93e8b..000000000 --- a/example/grpc-proxy/proxy/DOC.md +++ /dev/null @@ -1,84 +0,0 @@ -# proxy -```go -import "github.com/trusch/grpc-proxy/proxy" -``` - -Package proxy provides a reverse proxy handler for gRPC. - -The implementation allows a `grpc.Server` to pass a received ServerStream to a -ClientStream without understanding the semantics of the messages exchanged. It -basically provides a transparent reverse-proxy. - -This package is intentionally generic, exposing a `StreamDirector` function that -allows users of this package to implement whatever logic of backend-picking, -dialing and service verification to perform. - -See examples on documented functions. - -## Usage - -#### func Codec - -```go -func Codec() grpc.Codec -``` -Codec returns a proxying grpc.Codec with the default protobuf codec as parent. - -See CodecWithParent. - -#### func CodecWithParent - -```go -func CodecWithParent(fallback grpc.Codec) grpc.Codec -``` -CodecWithParent returns a proxying grpc.Codec with a user provided codec as -parent. - -This codec is *crucial* to the functioning of the proxy. It allows the proxy -server to be oblivious to the schema of the forwarded messages. It basically -treats a gRPC message frame as raw bytes. However, if the server handler, or the -client caller are not proxy-internal functions it will fall back to trying to -decode the message using a fallback codec. - -#### func RegisterService - -```go -func RegisterService(server *grpc.Server, director StreamDirector, serviceName string, methodNames ...string) -``` -RegisterService sets up a proxy handler for a particular gRPC service and -method. The behaviour is the same as if you were registering a handler method, -e.g. from a codegenerated pb.go file. - -This can *only* be used if the `server` also uses grpcproxy.CodecForServer() -ServerOption. - -#### func TransparentHandler - -```go -func TransparentHandler(director StreamDirector) grpc.StreamHandler -``` -TransparentHandler returns a handler that attempts to proxy all requests that -are not registered in the server. The indented use here is as a transparent -proxy, where the server doesn't know about the services implemented by the -backends. It should be used as a `grpc.UnknownServiceHandler`. - -This can *only* be used if the `server` also uses grpcproxy.CodecForServer() -ServerOption. - -#### type StreamDirector - -```go -type StreamDirector func(ctx context.Context, fullMethodName string) (*grpc.ClientConn, error) -``` - -StreamDirector returns a gRPC ClientConn to be used to forward the call to. - -The presence of the `Context` allows for rich filtering, e.g. based on Metadata -(headers). If no handling is meant to be done, a `codes.NotImplemented` gRPC -error should be returned. - -It is worth noting that the StreamDirector will be fired *after* all server-side -stream interceptors are invoked. So decisions around authorization, monitoring -etc. are better to be handled there. - -See the rather rich example. diff --git a/example/grpc-proxy/proxy/codec/codec.go b/example/grpc-proxy/proxy/codec/codec.go deleted file mode 100644 index cccceb9ca..000000000 --- a/example/grpc-proxy/proxy/codec/codec.go +++ /dev/null @@ -1,92 +0,0 @@ -package codec - -import ( - "github.com/golang/protobuf/proto" - "google.golang.org/grpc/encoding" -) - -// Name is the name by which the proxy codec is registered in the encoding codec registry -// We have to say that we are the "proto" codec otherwise marshaling will fail! -const Name = "proto" - -func init() { - Register() -} - -// Register manually registers the codec -func Register() { - encoding.RegisterCodec(codec()) -} - -// codec returns a proxying grpc.codec with the default protobuf codec as parent. -// -// See CodecWithParent. -func codec() encoding.Codec { - // since we have registered the default codec by importing it, - // we can fetch it from the registry and use it as our parent - // and overwrite the existing codec in the registry - return codecWithParent(&protoCodec{}) -} - -// CodecWithParent returns a proxying grpc.Codec with a user provided codec as parent. -// -// This codec is *crucial* to the functioning of the proxy. It allows the proxy server to be oblivious -// to the schema of the forwarded messages. It basically treats a gRPC message frame as raw bytes. -// However, if the server handler, or the client caller are not proxy-internal functions it will fall back -// to trying to decode the message using a fallback codec. -func codecWithParent(fallback encoding.Codec) encoding.Codec { - return &Proxy{parentCodec: fallback} -} - -// Proxy satisfies the encoding.Codec interface -type Proxy struct { - parentCodec encoding.Codec -} - -// Frame holds the proxy transported data -type Frame struct { - payload []byte -} - -// ProtoMessage tags a frame as valid proto message -func (f *Frame) ProtoMessage() {} - -// Marshal implents the encoding.Codec interface method -func (p *Proxy) Marshal(v interface{}) ([]byte, error) { - out, ok := v.(*Frame) - if !ok { - return p.parentCodec.Marshal(v) - } - return out.payload, nil - -} - -// Unmarshal implents the encoding.Codec interface method -func (p *Proxy) Unmarshal(data []byte, v interface{}) error { - dst, ok := v.(*Frame) - if !ok { - return p.parentCodec.Unmarshal(data, v) - } - dst.payload = data - return nil -} - -// Name implents the encoding.Codec interface method -func (*Proxy) Name() string { - return Name -} - -// protoCodec is a Codec implementation with protobuf. It is the default rawCodec for gRPC. -type protoCodec struct{} - -func (*protoCodec) Marshal(v interface{}) ([]byte, error) { - return proto.Marshal(v.(proto.Message)) -} - -func (*protoCodec) Unmarshal(data []byte, v interface{}) error { - return proto.Unmarshal(data, v.(proto.Message)) -} - -func (*protoCodec) Name() string { - return "proxy>proto" -} diff --git a/example/grpc-proxy/proxy/director.go b/example/grpc-proxy/proxy/director.go deleted file mode 100644 index 371ca6050..000000000 --- a/example/grpc-proxy/proxy/director.go +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright 2017 Michal Witkowski. All Rights Reserved. -// See LICENSE for licensing terms. - -package proxy - -import ( - "golang.org/x/net/context" - "google.golang.org/grpc" -) - -// StreamDirector returns a gRPC ClientConn to be used to forward the call to. -// -// The presence of the `Context` allows for rich filtering, e.g. based on Metadata (headers). -// If no handling is meant to be done, a `codes.NotImplemented` gRPC error should be returned. -// -// The context returned from this function should be the context for the *outgoing* (to backend) call. In case you want -// to forward any Metadata between the inbound request and outbound requests, you should do it manually. However, you -// *must* propagate the cancel function (`context.WithCancel`) of the inbound context to the one returned. -// -// It is worth noting that the StreamDirector will be fired *after* all server-side stream interceptors -// are invoked. So decisions around authorization, monitoring etc. are better to be handled there. -// -// See the rather rich example. -type StreamDirector func(ctx context.Context, fullMethodName string) (context.Context, *grpc.ClientConn, error) diff --git a/example/grpc-proxy/proxy/doc.go b/example/grpc-proxy/proxy/doc.go deleted file mode 100644 index 01328f332..000000000 --- a/example/grpc-proxy/proxy/doc.go +++ /dev/null @@ -1,15 +0,0 @@ -// Copyright 2017 Michal Witkowski. All Rights Reserved. -// See LICENSE for licensing terms. - -/* -Package proxy provides a reverse proxy handler for gRPC. - -The implementation allows a `grpc.Server` to pass a received ServerStream to a ClientStream without understanding -the semantics of the messages exchanged. It basically provides a transparent reverse-proxy. - -This package is intentionally generic, exposing a `StreamDirector` function that allows users of this package -to implement whatever logic of backend-picking, dialing and service verification to perform. - -See examples on documented functions. -*/ -package proxy diff --git a/example/grpc-proxy/proxy/handler.go b/example/grpc-proxy/proxy/handler.go deleted file mode 100644 index f5c15dcb9..000000000 --- a/example/grpc-proxy/proxy/handler.go +++ /dev/null @@ -1,164 +0,0 @@ -// Copyright 2017 Michal Witkowski. All Rights Reserved. -// See LICENSE for licensing terms. - -package proxy - -import ( - "io" - - "github.com/pubgo/lava/example/grpc-proxy/proxy/codec" - "golang.org/x/net/context" - "google.golang.org/grpc" - "google.golang.org/grpc/codes" - "google.golang.org/grpc/status" -) - -var ( - clientStreamDescForProxying = &grpc.StreamDesc{ - ServerStreams: true, - ClientStreams: true, - } -) - -// RegisterService sets up a proxy handler for a particular gRPC service and method. -// The behaviour is the same as if you were registering a handler method, e.g. from a codegenerated pb.go file. -// -// This can *only* be used if the `server` also uses grpcproxy.CodecForServer() ServerOption. -func RegisterService(server *grpc.Server, director StreamDirector, serviceName string, methodNames ...string) { - streamer := &handler{director} - fakeDesc := &grpc.ServiceDesc{ - ServiceName: serviceName, - HandlerType: (*interface{})(nil), - } - for _, m := range methodNames { - streamDesc := grpc.StreamDesc{ - StreamName: m, - Handler: streamer.handler, - ServerStreams: true, - ClientStreams: true, - } - fakeDesc.Streams = append(fakeDesc.Streams, streamDesc) - } - server.RegisterService(fakeDesc, streamer) -} - -// TransparentHandler returns a handler that attempts to proxy all requests that are not registered in the server. -// The indented use here is as a transparent proxy, where the server doesn't know about the services implemented by the -// backends. It should be used as a `grpc.UnknownServiceHandler`. -// -// This can *only* be used if the `server` also uses grpcproxy.CodecForServer() ServerOption. -func TransparentHandler(director StreamDirector) grpc.StreamHandler { - streamer := &handler{director} - return streamer.handler -} - -type handler struct { - director StreamDirector -} - -// handler is where the real magic of proxying happens. -// It is invoked like any gRPC server stream and uses the gRPC server framing to get and receive bytes from the wire, -// forwarding it to a ClientStream established against the relevant ClientConn. -func (s *handler) handler(srv interface{}, serverStream grpc.ServerStream) error { - // little bit of gRPC internals never hurt anyone - fullMethodName, ok := grpc.MethodFromServerStream(serverStream) - if !ok { - return status.Errorf(codes.Internal, "lowLevelServerStream not exists in context") - } - // We require that the director's returned context inherits from the serverStream.Context(). - outgoingCtx, backendConn, err := s.director(serverStream.Context(), fullMethodName) - if err != nil { - return err - } - - clientCtx, clientCancel := context.WithCancel(outgoingCtx) - // TODO(mwitkow): Add a `forwarded` header to metadata, https://en.wikipedia.org/wiki/X-Forwarded-For. - clientStream, err := grpc.NewClientStream(clientCtx, clientStreamDescForProxying, backendConn, fullMethodName, grpc.CallContentSubtype((&codec.Proxy{}).Name())) - if err != nil { - return err - } - // Explicitly *do not close* s2cErrChan and c2sErrChan, otherwise the select below will not terminate. - // Channels do not have to be closed, it is just a control flow mechanism, see - // https://groups.google.com/forum/#!msg/golang-nuts/pZwdYRGxCIk/qpbHxRRPJdUJ - s2cErrChan := s.forwardServerToClient(serverStream, clientStream) - c2sErrChan := s.forwardClientToServer(clientStream, serverStream) - // We don't know which side is going to stop sending first, so we need a select between the two. - for i := 0; i < 2; i++ { - select { - case s2cErr := <-s2cErrChan: - if s2cErr == io.EOF { - // this is the happy case where the sender has encountered io.EOF, and won't be sending anymore./ - // the clientStream>serverStream may continue pumping though. - clientStream.CloseSend() - continue - } else { - // however, we may have gotten a receive error (stream disconnected, a read error etc) in which case we need - // to cancel the clientStream to the backend, let all of its goroutines be freed up by the CancelFunc and - // exit with an error to the stack - clientCancel() - return status.Errorf(codes.Internal, "failed proxying s2c: %v", s2cErr) - } - case c2sErr := <-c2sErrChan: - // This happens when the clientStream has nothing else to offer (io.EOF), returned a gRPC error. In those two - // cases we may have received Trailers as part of the call. In case of other errors (stream closed) the trailers - // will be nil. - serverStream.SetTrailer(clientStream.Trailer()) - // c2sErr will contain RPC error from client code. If not io.EOF return the RPC error as server stream error. - if c2sErr != io.EOF { - return c2sErr - } - return nil - } - } - return status.Errorf(codes.Internal, "gRPC proxying should never reach this stage.") -} - -func (s *handler) forwardClientToServer(src grpc.ClientStream, dst grpc.ServerStream) chan error { - ret := make(chan error, 1) - go func() { - f := &codec.Frame{} - for i := 0; ; i++ { - if err := src.RecvMsg(f); err != nil { - ret <- err // this can be io.EOF which is happy case - break - } - if i == 0 { - // This is a bit of a hack, but client to server headers are only readable after first client msg is - // received but must be written to server stream before the first msg is flushed. - // This is the only place to do it nicely. - md, err := src.Header() - if err != nil { - ret <- err - break - } - if err := dst.SendHeader(md); err != nil { - ret <- err - break - } - } - if err := dst.SendMsg(f); err != nil { - ret <- err - break - } - } - }() - return ret -} - -func (s *handler) forwardServerToClient(src grpc.ServerStream, dst grpc.ClientStream) chan error { - ret := make(chan error, 1) - go func() { - f := &codec.Frame{} - for i := 0; ; i++ { - if err := src.RecvMsg(f); err != nil { - ret <- err // this can be io.EOF which is happy case - break - } - if err := dst.SendMsg(f); err != nil { - ret <- err - break - } - } - }() - return ret -} diff --git a/example/proto/gid/a_bit_of_everything.proto b/example/proto/gid/a_bit_of_everything.proto deleted file mode 100644 index 023b28fac..000000000 --- a/example/proto/gid/a_bit_of_everything.proto +++ /dev/null @@ -1,86 +0,0 @@ -syntax = "proto3"; - -option go_package = "./gidpb;gidpb"; -package gid; - -import "google/api/annotations.proto"; - -service LoginService { - // Login - // - // {{.MethodDescriptorProto.Name}} is a call with the method(s) {{$first := true}}{{range .Bindings}}{{if $first}}{{$first = false}}{{else}}, {{end}}{{.HTTPMethod}}{{end}} within the "{{.Service.Name}}" service. - // It takes in "{{.RequestType.Name}}" and returns a "{{.ResponseType.Name}}". - // - // ## {{.RequestType.Name}} - // | Field ID | Name | Type | Description | - // | ----------- | --------- | --------------------------------------------------------- | ---------------------------- | {{range .RequestType.Fields}} - // | {{.Number}} | {{.Name}} | {{if eq .Label.String "LABEL_REPEATED"}}[]{{end}}{{.Type}} | {{fieldcomments .Message .}} | {{end}} - // - // ## {{.ResponseType.Name}} - // | Field ID | Name | Type | Description | - // | ----------- | --------- | ---------------------------------------------------------- | ---------------------------- | {{range .ResponseType.Fields}} - // | {{.Number}} | {{.Name}} | {{if eq .Label.String "LABEL_REPEATED"}}[]{{end}}{{.Type}} | {{fieldcomments .Message .}} | {{end}} - rpc Login (LoginRequest) returns (LoginReply) { - option (google.api.http) = { - post: "/v1/example/login" - body: "*" - }; - } - - // Logout - // - // {{.MethodDescriptorProto.Name}} is a call with the method(s) {{$first := true}}{{range .Bindings}}{{if $first}}{{$first = false}}{{else}}, {{end}}{{.HTTPMethod}}{{end}} within the "{{.Service.Name}}" service. - // It takes in "{{.RequestType.Name}}" and returns a "{{.ResponseType.Name}}". - // - // ## {{.RequestType.Name}} - // | Field ID | Name | Type | Description | - // | ----------- | --------- | --------------------------------------------------------- | ---------------------------- | {{range .RequestType.Fields}} - // | {{.Number}} | {{.Name}} | {{if eq .Label.String "LABEL_REPEATED"}}[]{{end}}{{.Type}} | {{fieldcomments .Message .}} | {{end}} - // - // ## {{.ResponseType.Name}} - // | Field ID | Name | Type | Description | - // | ----------- | --------- | ---------------------------------------------------------- | ---------------------------- | {{range .ResponseType.Fields}} - // | {{.Number}} | {{.Name}} | {{if eq .Label.String "LABEL_REPEATED"}}[]{{end}}{{.Type}} | {{fieldcomments .Message .}} | {{end}} - rpc Logout (LogoutRequest) returns (LogoutReply) { - option (google.api.http) = { - post: "/v1/example/logout" - body: "*" - }; - } -} - -message LoginRequest { - // The entered username - string username = 1; - // The entered password - string password = 2; -} - -message LoginReply { - string message = 1; - // Whether you have access or not - bool access = 2; -} - -message LogoutRequest { - // The time the logout was registered - string timeoflogout = 1; - // This is the title - // - // This is the "Description" of field test - // you can use as many newlines as you want - // - // - // it will still format the same in the table - int32 test = 2; - // This is an array - // - // It displays that using [] infront of the type - repeated string stringarray = 3; -} - -message LogoutReply { - // Message that tells you whether your - // logout was succesful or not - string message = 1; -} diff --git a/example/proto/gid/echo_service.proto b/example/proto/gid/echo_service.proto deleted file mode 100644 index c3463b56a..000000000 --- a/example/proto/gid/echo_service.proto +++ /dev/null @@ -1,103 +0,0 @@ -syntax = "proto3"; - -package gid; - -option go_package = "./gidpb;gidpb"; - -// Echo Service -// -// Echo Service API consists of a single service which returns -// a message. - -import "google/api/annotations.proto"; -//import "google/protobuf/field_mask.proto"; -import "google/protobuf/struct.proto"; - -// Embedded represents a message embedded in SimpleMessage. -message Embedded { - oneof mark { - int64 progress = 1; - string note = 2; - } -} - -// SimpleMessage represents a simple message sent to the Echo service. -message SimpleMessage { - // Id represents the message identifier. - string id = 1; - int64 num = 2; - oneof code { - int64 line_num = 3; - string lang = 4; - } - Embedded status = 5; - oneof ext { - int64 en = 6; - Embedded no = 7; - } -} - -// DynamicMessage represents a message which can have its structure -// built dynamically using Struct and Values. -message DynamicMessage { - google.protobuf.Struct struct_field = 1; - google.protobuf.Value value_field = 2; -} - -message DynamicMessageUpdate { - DynamicMessage body = 1; -// google.protobuf.FieldMask update_mask = 2; -} - -// Echo service responds to incoming echo requests. -service EchoService { - // Echo method receives a simple message and returns it. - // - // The message posted as the id parameter will also be - // returned. - rpc Echo(SimpleMessage) returns (SimpleMessage) { - option (google.api.http) = { - post: "/v1/example/echo/{id}" - additional_bindings { - get: "/v1/example/echo/{id}/{num}" - } - additional_bindings { - get: "/v1/example/echo/{id}/{num}/{lang}" - } - additional_bindings { - get: "/v1/example/echo1/{id}/{line_num}/{status.note}" - } - additional_bindings { - get: "/v1/example/echo2/{no.note}" - } - }; - } - // EchoBody method receives a simple message and returns it. - rpc EchoBody(SimpleMessage) returns (SimpleMessage) { - option (google.api.http) = { - post: "/v1/example/echo_body" - body: "*" - }; - } - // EchoDelete method receives a simple message and returns it. - rpc EchoDelete(SimpleMessage) returns (SimpleMessage) { - option (google.api.http) = { - delete: "/v1/example/echo_delete" - }; - } - // EchoPatch method receives a NonStandardUpdateRequest and returns it. - rpc EchoPatch(DynamicMessageUpdate) returns (DynamicMessageUpdate) { - option (google.api.http) = { - patch: "/v1/example/echo_patch" - body: "body" - }; - } - // EchoUnauthorized method receives a simple message and returns it. It must - // always return a google.rpc.Code of `UNAUTHENTICATED` and a HTTP Status code - // of 401. - rpc EchoUnauthorized(SimpleMessage) returns (SimpleMessage) { - option (google.api.http) = { - get: "/v1/example/echo_unauthorized" - }; - } -} \ No newline at end of file diff --git a/example/proto/gid/id.proto b/example/proto/gid/id.proto deleted file mode 100644 index 6cd795940..000000000 --- a/example/proto/gid/id.proto +++ /dev/null @@ -1,146 +0,0 @@ -syntax = "proto3"; - -package gid; - -option go_package = "./gidpb;gidpb"; - -import "google/api/annotations.proto"; -import "google/api/client.proto"; -import "google/protobuf/empty.proto"; -import "google/api/field_behavior.proto"; -import "google/protobuf/wrappers.proto"; -import "google/rpc/status.proto"; -import "google/protobuf/field_mask.proto"; -import "google/protobuf/timestamp.proto"; -import "google/protobuf/duration.proto"; -import "protoc-gen-openapiv2/options/annotations.proto"; -import "google/protobuf/descriptor.proto"; -import "google/protobuf/struct.proto"; - -option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_swagger) = { - host: "localhost:8080", - info: { - title: "A Bit of Everything"; - version: "1.0"; - contact: { - name: "gRPC-Gateway project"; - url: "https://github.com/grpc-ecosystem/grpc-gateway"; - email: "none@example.com"; - }; - license: { - name: "BSD 3-Clause License"; - url: "https://github.com/grpc-ecosystem/grpc-gateway/blob/master/LICENSE.txt"; - }; - extensions: { - key: "x-something-something"; - value { - string_value: "yadda"; - } - } - }; - // Overwriting host entry breaks tests, so this is not done here. - external_docs: { - url: "https://github.com/pubgo/lava/tree/master/example/gid"; - description: "生成随机id"; - } - schemes: HTTP; - schemes: HTTPS; - schemes: WSS; - consumes: "application/json"; - consumes: "application/x-foo-mime"; - produces: "application/json"; - produces: "application/x-foo-mime"; - extensions: { - key: "x-grpc-gateway-foo"; - value { - string_value: "bar"; - } - } - extensions: { - key: "x-grpc-gateway-baz-list"; - value { - list_value: { - values: { - string_value: "one"; - } - values: { - bool_value: true; - } - } - } - } -}; - - -message Tag { - string key = 1; - string value = 2; -} - -message GenerateResponse { - // the unique id generated - string id = 1; - // the type of id generated - string type = 2; -} - - -// Id 生成随机ID服务 -service Id { - option (google.api.default_host) = "localhost:8080"; - - // Generate 生成ID - rpc Generate(GenerateRequest) returns (GenerateResponse) { - option (google.api.http) = { - post: "/v1/id/generate" - body: "*" - }; - option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation) = { - description: "Connect to a secure WebSocket to receive streaming notifications (see reference for notification to consumer for schema of messages received on websocket)."; - deprecated: true, - responses: { - key: "101"; - value: { - description: "Upgrade to Websockets"; - } - } - }; - } - - // Types id类型 - rpc Types(TypesRequest) returns (TypesResponse) { - option (google.api.http) = { - get: "/api/v1/id/types" - }; - option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation) = { - description: "Registers a producer to begin publishing notifications in the local MEC environment."; - deprecated: true, - responses: { - key: "200"; - value: { - description: "OK"; - } - } - responses: { - key: "400"; - value: { - description: "Invalid content, a required property is missing"; - } - } - }; - } -} - -// Generate a unique ID. Defaults to uuid. -message GenerateRequest { - // type of id e.g uuid, shortid, snowflake (64 bit), bigflake (128 bit) - string type = 1; -} - -// List the types of IDs available. No query params needed. -message TypesRequest {} - -// TypesResponse 返回值类型 -message TypesResponse { - repeated string types = 1; -} diff --git a/example/proto/hello/api.proto b/example/proto/hello/api.proto deleted file mode 100644 index 759e9b8ed..000000000 --- a/example/proto/hello/api.proto +++ /dev/null @@ -1,74 +0,0 @@ -syntax = "proto3"; - -package hello; - -import "proto/hello/api1.proto"; -import "google/api/annotations.proto"; -import "google/protobuf/struct.proto"; -import "protoc-gen-openapiv2/options/annotations.proto"; - -option go_package = "./hellopb;hellopb"; - -option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_swagger) = { - info: { - version: "1.0"; - }; - external_docs: { - url: "https://github.com/gogo/grpc-example"; - description: "gRPC example repository"; - } - schemes: HTTPS; -}; - -// TestApi service -service TestApi { - // Version rpc - rpc Version(hello.TestReq) returns (hello.TestApiOutput) { - option (google.api.http) = { - get: "/v1/version" - }; - } - - rpc Version1(google.protobuf.Value) returns (TestApiOutput1) { - option (google.api.http) = { - post: "/v1/version1" - body: "*" - }; - } - - // VersionTest rpc - rpc VersionTest(hello.TestReq) returns (hello.TestApiOutput) { - option (google.api.http) = { - get: "/v1/example/versiontest" - }; - } - - // VersionTest rpc custom - rpc VersionTestCustom(hello.TestReq) returns (hello.TestApiOutput) { - option (google.api.http) = { - get: "/v1/example/versionTestCustom" - }; - } -} - -service TestApiV2 { - rpc Version1(hello.TestReq) returns (hello.TestApiOutput) { - option (google.api.http) = { - post: "/v2/example/version/{name}" - body: "*" - }; - } - - rpc VersionTest1(hello.TestReq) returns (hello.TestApiOutput) { - option (google.api.http) = { - post: "/v2/example/versiontest" - body: "*" - }; - } -} - - -message TestApiOutput1 { - google.protobuf.Value data = 1; - string abc = 2; -} \ No newline at end of file diff --git a/example/proto/hello/api1.proto b/example/proto/hello/api1.proto deleted file mode 100644 index fc4b0ade7..000000000 --- a/example/proto/hello/api1.proto +++ /dev/null @@ -1,33 +0,0 @@ -syntax = "proto3"; - -package hello; - -import "google/protobuf/struct.proto"; - -option go_package = "./hellopb;hellopb"; - -message TestReq { - string input = 1; - string name = 2; - google.protobuf.ListValue lists = 3; - map headers = 4; -} - -message TestApiData { - string version = 1; - string srvVersion = 2 [json_name="srv_ver"]; -} - -message TestApiOutput { - int32 code = 1; - string msg = 2; - int64 nowTime = 3; - TestApiData data = 4; -} - -// 枚举消息类型 -enum PhoneType { - MOBILE = 0; //proto3版本中,首成员必须为0,成员不应有相同的值 - HOME = 1; - WORK = 2; -} \ No newline at end of file diff --git a/example/proto/hello/example.proto b/example/proto/hello/example.proto deleted file mode 100644 index 0c0a7b6d9..000000000 --- a/example/proto/hello/example.proto +++ /dev/null @@ -1,100 +0,0 @@ -syntax="proto3"; - -// GoGo gRPC Example -// -// This example is used to show how to use gRPC and -// gRPC-Gateway with GoGo Protobuf. -package hello; - -import "google/protobuf/empty.proto"; -import "google/protobuf/timestamp.proto"; -import "google/protobuf/duration.proto"; -import "google/protobuf/field_mask.proto"; -import "google/protobuf/struct.proto"; -import "google/api/annotations.proto"; -import "protoc-gen-openapiv2/options/annotations.proto"; -import "go-proto-validators/validator.proto"; - -option go_package = "./hellopb;hellopb"; - -option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_swagger) = { - info: { - version: "1.0"; - }; - external_docs: { - url: "https://github.com/gogo/grpc-example"; - description: "gRPC example repository"; - } - schemes: HTTPS; -}; - - -service UserService { - rpc AddUser(User) returns (google.protobuf.Empty) { - option (google.api.http) = { - post: "/api/v1/users" - body: "*" - }; - } - - rpc GetUser(User) returns (google.protobuf.Empty) { - option (google.api.http) = { - get: "/api/v1/users" - }; - } - - rpc ListUsers(ListUsersRequest) returns (stream User) { - option (google.api.http) = { - get: "/api/v1/users" - }; - } - - rpc ListUsersByRole(stream UserRole) returns (stream User) { - option (google.api.http) = { - get: "/api/v1/users/role" - }; - } - - rpc UpdateUser(UpdateUserRequest) returns (User) { - option (google.api.http) = { - patch: "/api/v1/users/{user.id}" - body: "*" - }; - } -} - -enum Role { - GUEST = 0; - MEMBER = 1; - ADMIN = 2; -} - -message User { - uint32 id = 1 [ - (validator.field) = {int_gt: 0,human_error: "ID must be a positive integer"} - ]; - Role role = 2; - google.protobuf.Timestamp create_date = 3; -} - -message UserRole { - Role role = 1; - google.protobuf.ListValue lists = 2; - map headers = 3; -} - -message UpdateUserRequest { - // The user resource which replaces the resource on the server. - User user = 1; - - // The update mask applies to the resource. For the `FieldMask` definition, - // see https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask - google.protobuf.FieldMask update_mask = 2; -} - -message ListUsersRequest { - // Only list users created after this timestamp - google.protobuf.Timestamp created_since = 1; - // Only list users older than this Duration - google.protobuf.Duration older_than = 2; -} \ No newline at end of file diff --git a/example/proto/hello/helloworld.proto b/example/proto/hello/helloworld.proto deleted file mode 100644 index 8f088d064..000000000 --- a/example/proto/hello/helloworld.proto +++ /dev/null @@ -1,60 +0,0 @@ -syntax = "proto3"; - -package hello; - -option go_package = "./hellopb;hellopb"; - -import "google/api/annotations.proto"; -import "google/protobuf/wrappers.proto"; - -service Greeter { - rpc SayHello (HelloRequest) returns (HelloReply) { - option (google.api.http) = { - get: "/say/{name}" - additional_bindings: { - get: "/say/strval/{strVal}", - } - additional_bindings: { - get: "/say/floatval/{floatVal}", - } - additional_bindings: { - get: "/say/doubleval/{doubleVal}", - } - additional_bindings: { - get: "/say/boolval/{boolVal}", - } - additional_bindings: { - get: "/say/bytesval/{bytesVal}", - } - additional_bindings: { - get: "/say/int32val/{int32Val}", - } - additional_bindings: { - get: "/say/uint32val/{uint32Val}", - } - additional_bindings: { - get: "/say/int64val/{int64Val}", - } - additional_bindings: { - get: "/say/uint64val/{uint64Val}", - } - }; - } -} - -message HelloRequest { - string name = 1; - google.protobuf.StringValue strVal = 2; - google.protobuf.FloatValue floatVal = 3; - google.protobuf.DoubleValue doubleVal = 4; - google.protobuf.BoolValue boolVal = 5; - google.protobuf.BytesValue bytesVal = 6; - google.protobuf.Int32Value int32Val = 7; - google.protobuf.UInt32Value uint32Val = 8; - google.protobuf.Int64Value int64Val = 9; - google.protobuf.UInt64Value uint64Val = 10; -} - -message HelloReply { - string message = 1; -} diff --git a/example/proto/hello/proto3.proto b/example/proto/hello/proto3.proto deleted file mode 100644 index 388a31070..000000000 --- a/example/proto/hello/proto3.proto +++ /dev/null @@ -1,67 +0,0 @@ -syntax = "proto3"; - -package hello; - -option go_package = "./hellopb;hellopb"; - -import "google/protobuf/duration.proto"; -import "google/protobuf/any.proto"; -import "google/protobuf/field_mask.proto"; -import "google/protobuf/timestamp.proto"; -import "google/protobuf/wrappers.proto"; - -message Proto3Message { - // Next number: 46 - Proto3Message nested = 41; - float float_value = 42; - double double_value = 43; - int64 int64_value = 3; - int32 int32_value = 4; - uint64 uint64_value = 5; - uint32 uint32_value = 6; - bool bool_value = 7; - string string_value = 8; - bytes bytes_value = 9; - repeated string repeated_value = 10; - repeated google.protobuf.UInt64Value repeated_message = 44; - EnumValue enum_value = 11; - repeated EnumValue repeated_enum = 12; - google.protobuf.Timestamp timestamp_value = 13; - google.protobuf.Duration duration_value = 14; - google.protobuf.FieldMask fieldmask_value = 15; - oneof oneof_value { - bool oneof_bool_value = 1; - string oneof_string_value = 2; - } - - google.protobuf.DoubleValue wrapper_double_value = 17; - google.protobuf.FloatValue wrapper_float_value = 18; - google.protobuf.Int64Value wrapper_int64_value = 19; - google.protobuf.Int32Value wrapper_int32_value = 20; - google.protobuf.UInt64Value wrapper_u_int64_value = 21; - google.protobuf.UInt32Value wrapper_u_int32_value = 22; - google.protobuf.BoolValue wrapper_bool_value = 23; - google.protobuf.StringValue wrapper_string_value = 24; - google.protobuf.BytesValue wrapper_bytes_value = 25; - map map_value = 26; - map map_value2 = 27; - map map_value3 = 28; - map map_value4 = 29; - map map_value5 = 30; - map map_value6 = 31; - map map_value7 = 32; - map map_value8 = 33; - map map_value9 = 34; - map map_value10 = 35; - map map_value12 = 37; - map map_value14 = 39; - map map_value15 = 40; - map map_value16 = 45; - repeated google.protobuf.Any details = 46; -} - -enum EnumValue { - X = 0; - Y = 1; - Z = 2; -} diff --git a/example/proto/hello/transport.proto b/example/proto/hello/transport.proto deleted file mode 100644 index cbcdb6d2d..000000000 --- a/example/proto/hello/transport.proto +++ /dev/null @@ -1,24 +0,0 @@ -syntax = "proto3"; - -package hello; - -option go_package = "./hellopb;hellopb"; - -import "google/api/http.proto"; -import "google/api/annotations.proto"; - -service Transport { - rpc TestStream(stream Message) returns (stream Message) {} - rpc TestStream1(stream Message) returns (Message) {} - rpc TestStream2(Message) returns (stream Message) {} - rpc TestStream3( Message) returns (Message) { - option (google.api.http) = { - get: "/v1/Transport/TestStream3" - }; - } -} - -message Message { - map header = 1; - bytes body = 2; -} diff --git a/example/proto/sqlx/code.proto b/example/proto/sqlx/code.proto deleted file mode 100644 index b2e48bdfc..000000000 --- a/example/proto/sqlx/code.proto +++ /dev/null @@ -1,188 +0,0 @@ -syntax = "proto3"; - -package hello.v1.sqlx; - -option go_package = "./sqlxpb"; - -import "google/api/annotations.proto"; -import "retag/retag.proto"; - -// 验证码 -service Code { - // 发送 - rpc SendCode (SendCodeRequest) returns (SendCodeResponse) { - option (google.api.http) = { - post: "/user/code/send-code" - body: "*" - }; - } - - // 校验 - rpc Verify (VerifyRequest) returns (VerifyResponse) { - option (google.api.http) = { - post: "/user/code/verify" - body: "*" - }; - } - - // 是否校验图片验证码 - rpc IsCheckImageCode (IsCheckImageCodeRequest) returns (IsCheckImageCodeResponse) { - option (google.api.http) = { - post: "/user/code/is-check-image-code" - body: "*" - }; - } - - // 校验图片验证码 - rpc VerifyImageCode (VerifyImageCodeRequest) returns (VerifyImageCodeResponse) { - option (google.api.http) = { - post: "/user/code/verify-image-code" - body: "*" - }; - } - - // 获取发送状态 - rpc GetSendStatus (GetSendStatusRequest) returns (GetSendStatusResponse) { - option (google.api.http) = { - post: "/user/code/get-send-status" - body: "*" - }; - } -} - -message SendCodeRequest { - // 区号 - string nationCode = 1 [ - (retag.tags) = {name:"hello",value:"world"}, - (retag.tags) = {name:"hello1",value:"world1"} - ]; - - oneof one_of { - option (retag.oneof_tags) = {name:"json",value:"world"}; - string a = 5 [(retag.tags) = {name:"json",value:"world"}]; - } - - // 电话 - string telephone = 2; - // 发送类型,call ,sms - string sendType = 3; - // ip - string ip = 4; - // 模板 -// string template = 5; -} - -message SendCodeResponse { - // code - int64 code = 1; - // msg - string msg = 2; - // 时间戳 - // @gotags: valid:"ip" custom_tag:"custom_value" - int64 nowTime = 3; - // 数据 - map data = 4; -} - -message VerifyRequest { - // 区号 - string nationCode = 1; - // 手机号 - string telephone = 2; - // 验证码 - string code = 3; - // 模板 - string template = 4; -} - -message VerifyResponse { - // code - int64 code = 1; - // msg - string msg = 2; - // 时间戳 - int64 nowTime = 3; - // 数据 - map data = 4; -} - -message IsCheckImageCodeRequest { - // 区号 - string nationCode = 1; - // 手机号 - string telephone = 2; - // 场景 - string scene = 3; -} - -message IsCheckImageCodeResponse { - // code - int64 code = 1; - // msg - string msg = 2; - // 时间戳 - int64 nowTime = 3; - // 数据 - bool data = 4; -} - -message VerifyImageCodeRequest { - // 区号 - string nationCode = 1; - // 手机号 - string telephone = 2; - // 图形验证码ticket - string ticket = 3; - // 图形验证码randStr - string randStr = 4; - // 图形验证码ip - string ip = 5; - // 场景 - string scene = 6; -} - -message VerifyImageCodeResponse { - // code - int64 code = 1; - // msg - string msg = 2; - // 时间戳 - int64 nowTime = 3; -} - -message GetSendStatusRequest { - // 区号 - string nationCode = 1; - // 手机号 - string telephone = 2; - // 发送类型 - string sendType = 3; - // 模板 - string template = 4; - // 是否越狱标示 - int64 signR = 5; - // ip - string ip = 6; -} - -message GetSendStatusResponse { - // code - int64 code = 1; - // msg - string msg = 2; - // 时间戳 - int64 nowTime = 3; - // 数据 - SendStatus data = 4; -} - -message SendStatus { - // 需要图形验证码 - bool needImageCode = 1; - // 强制语音 - bool forceCall = 2; - // 被禁止 - bool isForbidden = 3; - // 数量超限制 - bool numberLimit = 4; -} \ No newline at end of file diff --git a/example/proto/user/user.proto b/example/proto/user/user.proto deleted file mode 100644 index 5f2d54979..000000000 --- a/example/proto/user/user.proto +++ /dev/null @@ -1,625 +0,0 @@ -syntax = "proto3"; - -package gid; - -option go_package = "./userpb;userpb"; - -import "google/api/annotations.proto"; -import "google/api/client.proto"; -import "google/protobuf/empty.proto"; -import "google/api/field_behavior.proto"; -import "google/protobuf/wrappers.proto"; -import "google/rpc/status.proto"; -import "google/protobuf/field_mask.proto"; -import "google/protobuf/timestamp.proto"; -import "google/protobuf/duration.proto"; -import "protoc-gen-openapiv2/options/annotations.proto"; -import "google/protobuf/descriptor.proto"; -import "google/protobuf/struct.proto"; - -option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_swagger) = { - host: "localhost:8080", - info: { - title: "A Bit of Everything"; - version: "1.0"; - contact: { - name: "gRPC-Gateway project"; - url: "https://github.com/grpc-ecosystem/grpc-gateway"; - email: "none@example.com"; - }; - license: { - name: "BSD 3-Clause License"; - url: "https://github.com/grpc-ecosystem/grpc-gateway/blob/master/LICENSE.txt"; - }; - extensions: { - key: "x-something-something"; - value { - string_value: "yadda"; - } - } - }; - // Overwriting host entry breaks tests, so this is not done here. - external_docs: { - url: "https://github.com/pubgo/lava/tree/master/example/gid"; - description: "生成随机id"; - } - schemes: HTTP; - schemes: HTTPS; - schemes: WSS; - consumes: "application/json"; - consumes: "application/x-foo-mime"; - produces: "application/json"; - produces: "application/x-foo-mime"; - extensions: { - key: "x-grpc-gateway-foo"; - value { - string_value: "bar"; - } - } - extensions: { - key: "x-grpc-gateway-baz-list"; - value { - list_value: { - values: { - string_value: "one"; - } - values: { - bool_value: true; - } - } - } - } -}; - - -message Tag { - string key = 1; - string value = 2; -} - -message GenerateResponse { - // the unique id generated - string id = 1; - // the type of id generated - string type = 2; -} - - -// User 用户服务 -service User { - option (google.api.default_host) = "localhost:8080"; - - // Generate 生成ID - rpc Generate(GenerateRequest) returns (GenerateResponse) { - option (google.api.http) = { - post: "/v1/id/generate" - body: "*" - }; - } - - // Types id类型 - rpc Types(TypesRequest) returns (TypesResponse) { - option (google.api.http) = { - get: "/v1/id/types" - }; - } -} - -// Generate a unique ID. Defaults to uuid. -message GenerateRequest { - // type of id e.g uuid, shortid, snowflake (64 bit), bigflake (128 bit) - string type = 1; -} - -// List the types of IDs available. No query params needed. -message TypesRequest {} - -// TypesResponse 返回值类型 -message TypesResponse { - repeated string types = 1; -} - -message ErrorResponse{ - string correlationId = 1 [(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { - pattern: "^[0-9A-F]{8}-[0-9A-F]{4}-4[0-9A-F]{3}-[89AB][0-9A-F]{3}-[0-9A-F]{12}$", - title: "x-correlation-id", - description: "Unique event identifier for server requests", - format: "uuid", - example: "\"2438ac3c-37eb-4902-adef-ed16b4431030\"" - }]; - ErrorObject error = 2; -} - -message ErrorObject{ - int32 code = 1 [(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { - pattern: "^[0-9]$", - title: "code", - description: "Response code", - format: "integer" - }]; - string message = 2 [(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { - pattern: "^[a-zA-Z0-9]{1, 32}$", - title: "message", - description: "Response message" - }]; -} - -// Intentionally complicated message type to cover many features of Protobuf. -message ABitOfEverything { - option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_schema) = { - json_schema: { - title: "A bit of everything" - description: "Intentionaly complicated message type to cover many features of Protobuf." - required: ["uuid", "int64_value", "double_value"] - } - external_docs: { - url: "https://github.com/grpc-ecosystem/grpc-gateway"; - description: "Find out more about ABitOfEverything"; - } - example: "{\"int64_value\": 12, \"double_value\": 12.3}" - }; - - // Nested is nested type. - message Nested { - option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_schema) = { - example: "{\"ok\": \"TRUE\"}" - }; - // name is nested field. - string name = 1; - uint32 amount = 2; - // DeepEnum is one or zero. - enum DeepEnum { - // FALSE is false. - FALSE = 0; - // TRUE is true. - TRUE = 1; - } - - // DeepEnum comment. - DeepEnum ok = 3 [(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {description: "DeepEnum description."}]; - } - Nested single_nested = 25; - - string uuid = 1 [(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {pattern: "[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}", min_length: 1}]; - repeated Nested nested = 2; - float float_value = 3 [(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {description: "Float value field", default: "0.2", required: ['float_value']}]; - double double_value = 4; - int64 int64_value = 5; - uint64 uint64_value = 6; - int32 int32_value = 7; - fixed64 fixed64_value = 8; - fixed32 fixed32_value = 9; - bool bool_value = 10; - string string_value = 11; - bytes bytes_value = 29; - uint32 uint32_value = 13; - NumericEnum enum_value = 14; - sfixed32 sfixed32_value = 15; - sfixed64 sfixed64_value = 16; - sint32 sint32_value = 17; - sint64 sint64_value = 18; - repeated string repeated_string_value = 19; - oneof oneof_value { - google.protobuf.Empty oneof_empty = 20; - string oneof_string = 21; - } - - map map_value = 22; - map mapped_string_value = 23; - map mapped_nested_value = 24; - - string nonConventionalNameValue = 26; - - google.protobuf.Timestamp timestamp_value = 27; - - // repeated enum value. it is comma-separated in query - repeated NumericEnum repeated_enum_value = 28; - - // repeated numeric enum comment (This comment is overridden by the field annotation) - repeated NumericEnum repeated_enum_annotation = 32 [(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {title: "Repeated numeric enum title", description: "Repeated numeric enum description."}]; - - // numeric enum comment (This comment is overridden by the field annotation) - NumericEnum enum_value_annotation = 33 [(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {title: "Numeric enum title", description: "Numeric enum description."}]; - - // repeated string comment (This comment is overridden by the field annotation) - repeated string repeated_string_annotation = 34 [(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {title: "Repeated string title", description: "Repeated string description."}]; - - // repeated nested object comment (This comment is overridden by the field annotation) - repeated Nested repeated_nested_annotation = 35 [(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {title: "Repeated nested object title", description: "Repeated nested object description."}]; - - // nested object comments (This comment is overridden by the field annotation) - Nested nested_annotation = 36 [(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {title: "Nested object title", description: "Nested object description."}]; - - int64 int64_override_type = 37 [(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {type: INTEGER}]; - - // mark a field as required in Open API definition - string required_string_via_field_behavior_annotation = 38 [(google.api.field_behavior) = REQUIRED]; - - // mark a field as readonly in Open API definition - string output_only_string_via_field_behavior_annotation = 39 [(google.api.field_behavior) = OUTPUT_ONLY]; -} - -// ABitOfEverythingRepeated is used to validate repeated path parameter functionality -message ABitOfEverythingRepeated { - option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_schema) = { - example: "{\"path_repeated_bool_value\": [true, true, false, true], \"path_repeated_int32_value\": [1, 2, 3]}" - }; - - // repeated values. they are comma-separated in path - repeated float path_repeated_float_value = 1; - repeated double path_repeated_double_value = 2; - repeated int64 path_repeated_int64_value = 3; - repeated uint64 path_repeated_uint64_value = 4; - repeated int32 path_repeated_int32_value = 5; - repeated fixed64 path_repeated_fixed64_value = 6; - repeated fixed32 path_repeated_fixed32_value = 7; - repeated bool path_repeated_bool_value = 8; - repeated string path_repeated_string_value = 9; - repeated bytes path_repeated_bytes_value = 10; - repeated uint32 path_repeated_uint32_value = 11; - repeated NumericEnum path_repeated_enum_value = 12; - repeated sfixed32 path_repeated_sfixed32_value = 13; - repeated sfixed64 path_repeated_sfixed64_value = 14; - repeated sint32 path_repeated_sint32_value = 15; - repeated sint64 path_repeated_sint64_value = 16; -} - -message CheckStatusResponse { - google.rpc.Status status = 1; -} - -message Body { - string name = 1; -} - -message MessageWithBody { - string id = 1; - Body data = 2; -} - - -// NumericEnum is one or zero. -enum NumericEnum { - // ZERO means 0 - ZERO = 0; - // ONE means 1 - ONE = 1; -} - -// UpdateV2Request request for update includes the message and the update mask -message UpdateV2Request { - ABitOfEverything abe = 1; - // The paths to update. - google.protobuf.FieldMask update_mask = 2; -} - -// An example resource type from AIP-123 used to test the behavior described in -// the CreateBookRequest message. -// -// See: https://google.aip.dev/123 -message Book { - // The resource name of the book. - // - // Format: `publishers/{publisher}/books/{book}` - // - // Example: `publishers/1257894000000000000/books/my-book` - string name = 1; - - // Output only. The book's ID. - string id = 2; - - // Output only. Creation time of the book. - google.protobuf.Timestamp create_time = 3; -} - -// A standard Create message from AIP-133 with a user-specified ID. -// The user-specified ID (the `book_id` field in this example) must become a -// query parameter in the OpenAPI spec. -// -// See: https://google.aip.dev/133#user-specified-ids -message CreateBookRequest { - // The publisher in which to create the book. - // - // Format: `publishers/{publisher}` - // - // Example: `publishers/1257894000000000000` - string parent = 1; - - // The book to create. - Book book = 2; - - // The ID to use for the book. - // - // This must start with an alphanumeric character. - string book_id = 3; -} - -// A standard Update message from AIP-134 -// -// See: https://google.aip.dev/134#request-message -message UpdateBookRequest { - // The book to update. - // - // The book's `name` field is used to identify the book to be updated. - // Format: publishers/{publisher}/books/{book} - Book book = 1 [(google.api.field_behavior) = REQUIRED]; - - // The list of fields to be updated. - google.protobuf.FieldMask update_mask = 2; - - // If set to true, and the book is not found, a new book will be created. - // In this situation, `update_mask` is ignored. - bool allow_missing = 3; - -} - -// ABitOfEverything service is used to validate that APIs with complicated -// proto messages and URL templates are still processed correctly. -service ABitOfEverythingService { - - option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_tag) = { - description: "ABitOfEverythingService description -- which should not be used in place of the documentation comment!" - external_docs: { - url: "https://github.com/grpc-ecosystem/grpc-gateway"; - description: "Find out more about EchoService"; - } - }; - - // Create a new ABitOfEverything - // - // This API creates a new ABitOfEverything - rpc Create(ABitOfEverything) returns (ABitOfEverything) { - option (google.api.http) = { - post: "/v1/example/a_bit_of_everything/{float_value}/{double_value}/{int64_value}/separator/{uint64_value}/{int32_value}/{fixed64_value}/{fixed32_value}/{bool_value}/{string_value=strprefix/*}/{uint32_value}/{sfixed32_value}/{sfixed64_value}/{sint32_value}/{sint64_value}/{nonConventionalNameValue}/{enum_value}" - }; - } - rpc CreateBody(ABitOfEverything) returns (ABitOfEverything) { - option (google.api.http) = { - post: "/v1/example/a_bit_of_everything" - body: "*" - }; - } - // Create a book. - rpc CreateBook(CreateBookRequest) returns (Book) { - option (google.api.http) = { - post: "/v1/{parent=publishers/*}/books" - body: "book" - }; - } - rpc UpdateBook(UpdateBookRequest) returns (Book) { - option (google.api.http) = { - patch: "/v1/{book.name=publishers/*/books/*}" - body: "book" - }; - } - rpc Update(ABitOfEverything) returns (google.protobuf.Empty) { - option (google.api.http) = { - put: "/v1/example/a_bit_of_everything/{uuid}" - body: "*" - }; - } - rpc UpdateV2(UpdateV2Request) returns (google.protobuf.Empty) { - option (google.api.http) = { - put: "/v2/example/a_bit_of_everything/{abe.uuid}" - body: "*" - additional_bindings: [ - { - patch: "/v2/example/a_bit_of_everything/{abe.uuid}" - body: "*" - }, - { - patch: "/v2a/example/a_bit_of_everything/{abe.uuid}" - body: "*" - } - ] - }; - - option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation) = { - security: { - security_requirement: { - key: "ApiKeyAuth"; - value: {} - } - security_requirement: { - key: "OAuth2"; - value: { - scope: "read"; - scope: "write"; - } - } - } - extensions: { - key: "x-irreversible"; - value { - bool_value: true; - } - } - }; - } - - // rpc Delete(grpc.gateway.examples.internal.proto.sub2.IdMessage) returns (google.protobuf.Empty) { - // option (google.api.http) = { - // delete: "/v1/example/a_bit_of_everything/{uuid}" - // }; - // option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation) = { - // security: { - // security_requirement: { - // key: "ApiKeyAuth"; - // value: {} - // } - // security_requirement: { - // key: "OAuth2"; - // value: { - // scope: "read"; - // scope: "write"; - // } - // } - // } - // extensions: { - // key: "x-irreversible"; - // value { - // bool_value: true; - // } - // } - // }; - // } - rpc GetQuery(ABitOfEverything) returns (google.protobuf.Empty) { - option (google.api.http) = { - get: "/v1/example/a_bit_of_everything/query/{uuid}" - }; - option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation) = { - deprecated: true // For testing purposes. - external_docs: { - url: "https://github.com/grpc-ecosystem/grpc-gateway"; - description: "Find out more about GetQuery"; - } - security: { - } - }; - } - rpc GetRepeatedQuery(ABitOfEverythingRepeated) returns (ABitOfEverythingRepeated) { - option (google.api.http) = { - get: "/v1/example/a_bit_of_everything_repeated/{path_repeated_float_value}/{path_repeated_double_value}/{path_repeated_int64_value}/{path_repeated_uint64_value}/{path_repeated_int32_value}/{path_repeated_fixed64_value}/{path_repeated_fixed32_value}/{path_repeated_bool_value}/{path_repeated_string_value}/{path_repeated_bytes_value}/{path_repeated_uint32_value}/{path_repeated_enum_value}/{path_repeated_sfixed32_value}/{path_repeated_sfixed64_value}/{path_repeated_sint32_value}/{path_repeated_sint64_value}" - }; - } - // Echo allows posting a StringMessage value. - // - // It also exposes multiple bindings. - // - // This makes it useful when validating that the OpenAPI v2 API - // description exposes documentation correctly on all paths - // defined as additional_bindings in the proto. - // rpc Echo(grpc.gateway.examples.internal.proto.sub.StringMessage) returns (grpc.gateway.examples.internal.proto.sub.StringMessage) { - // option (google.api.http) = { - // get: "/v1/example/a_bit_of_everything/echo/{value}" - // additional_bindings { - // post: "/v2/example/echo" - // body: "value" - // } - // additional_bindings { - // get: "/v2/example/echo" - // } - // }; - // option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation) = { - // description: "Description Echo"; - // summary: "Summary: Echo rpc"; - // tags: "echo rpc"; - // external_docs: { - // url: "https://github.com/grpc-ecosystem/grpc-gateway"; - // description: "Find out more Echo"; - // } - // responses: { - // key: "200" - // value: { - // examples: { - // key: "application/json" - // value: '{"value": "the input value"}' - // } - // } - // } - // responses: { - // key: "503"; - // value: { - // description: "Returned when the resource is temporarily unavailable."; - // extensions: { - // key: "x-number"; - // value { - // number_value: 100; - // } - // } - // } - // } - // responses: { - // // Overwrites global definition. - // key: "404"; - // value: { - // description: "Returned when the resource does not exist."; - // schema: { - // json_schema: { - // type: INTEGER; - // } - // } - // } - // } - // }; - // } - rpc DeepPathEcho(ABitOfEverything) returns (ABitOfEverything) { - option (google.api.http) = { - post: "/v1/example/deep_path/{single_nested.name}" - body: "*" - }; - } - rpc NoBindings(google.protobuf.Duration) returns (google.protobuf.Empty) { - option (google.api.http) = { - get: "/v2/example/NoBindings", - }; - } - rpc Timeout(google.protobuf.Empty) returns (google.protobuf.Empty) { - option (google.api.http) = { - get: "/v2/example/timeout", - }; - } - rpc ErrorWithDetails(google.protobuf.Empty) returns (google.protobuf.Empty) { - option (google.api.http) = { - get: "/v2/example/errorwithdetails", - }; - } - rpc GetMessageWithBody(MessageWithBody) returns (google.protobuf.Empty) { - option (google.api.http) = { - post: "/v2/example/withbody/{id}", - body: "*" - }; - } - rpc PostWithEmptyBody(Body) returns (google.protobuf.Empty) { - option (google.api.http) = { - post: "/v2/example/postwithemptybody/{name}", - body: "*" - }; - } - rpc CheckGetQueryParams(ABitOfEverything) returns (ABitOfEverything) { - option (google.api.http) = { - get: "/v1/example/a_bit_of_everything/params/get/{single_nested.name}" - }; - } - rpc CheckNestedEnumGetQueryParams(ABitOfEverything) returns (ABitOfEverything) { - option (google.api.http) = { - get: "/v1/example/a_bit_of_everything/params/get/nested_enum/{single_nested.ok}" - }; - } - rpc CheckPostQueryParams(ABitOfEverything) returns (ABitOfEverything) { - option (google.api.http) = { - post: "/v1/example/a_bit_of_everything/params/post/{string_value}" - body: "single_nested" - }; - } - rpc OverwriteResponseContentType(google.protobuf.Empty) returns (google.protobuf.StringValue) { - option (google.api.http) = { - get: "/v2/example/overwriteresponsecontenttype" - }; - option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation) = { - produces: "application/text" - }; - } - - rpc CheckStatus(google.protobuf.Empty) returns (CheckStatusResponse) { - option (google.api.http) = { - get: "/v1/example/checkStatus" - }; - } -} - -// camelCase and lowercase service names are valid but not recommended (use TitleCase instead) -service camelCaseServiceName { - rpc Empty(google.protobuf.Empty) returns (google.protobuf.Empty) { - option (google.api.http) = { - get: "/v2/example/empty", - }; - } -} -service AnotherServiceWithNoBindings { - rpc NoBindings(google.protobuf.Empty) returns (google.protobuf.Empty) { - option (google.api.http) = { - get: "/v2/another/no-bindings", - }; - } -} \ No newline at end of file diff --git a/example/protobuf.yaml b/example/protobuf.yaml deleted file mode 100644 index ec169de6a..000000000 --- a/example/protobuf.yaml +++ /dev/null @@ -1,49 +0,0 @@ -proto-path: ../.lava/proto -checksum: f6e6b1b83b55ba43a975fa0df78357bbebe141a6 -root: -- proto -- rsocket -deps: -- name: google - url: github.com/googleapis/googleapis - path: /google - version: v0.0.0-20220601021915-4e0282f92e4e -- name: protoc-gen-openapiv2 - url: github.com/grpc-ecosystem/grpc-gateway/v2 - path: /protoc-gen-openapiv2 - version: v2.5.0 -- name: go-proto-validators - url: github.com/mwitkow/go-proto-validators - version: v0.3.2 -- name: google/protobuf - url: /usr/local/include/google/protobuf -- name: retag - url: github.com/pubgo/protobuild - path: /retag - version: v0.0.7 -plugins: -- name: go - out: protopb - opt: paths=import -- name: go-grpc - out: protopb - opt: - - paths=import - - require_unimplemented_servers=false -- name: openapiv2 - out: ./docs/swagger - opt: - - logtostderr=true - - allow_repeated_fields_in_body=true - - repeated_path_param_separator=ssv -- name: doc - out: ./docs/markdown - opt: - - markdown,index.md -- name: errors - out: protopb - opt: paths=import -- name: retag - opt: - - paths=import - - outdir=protopb diff --git a/example/protopb/gidpb/a_bit_of_everything.pb.go b/example/protopb/gidpb/a_bit_of_everything.pb.go deleted file mode 100644 index 754068f4f..000000000 --- a/example/protopb/gidpb/a_bit_of_everything.pb.go +++ /dev/null @@ -1,404 +0,0 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.28.0 -// protoc v3.19.4 -// source: proto/gid/a_bit_of_everything.proto - -package gidpb - -import ( - _ "google.golang.org/genproto/googleapis/api/annotations" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - reflect "reflect" - sync "sync" -) - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -type LoginRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // The entered username - Username string `protobuf:"bytes,1,opt,name=username,proto3" json:"username,omitempty"` - // The entered password - Password string `protobuf:"bytes,2,opt,name=password,proto3" json:"password,omitempty"` -} - -func (x *LoginRequest) Reset() { - *x = LoginRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_proto_gid_a_bit_of_everything_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *LoginRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*LoginRequest) ProtoMessage() {} - -func (x *LoginRequest) ProtoReflect() protoreflect.Message { - mi := &file_proto_gid_a_bit_of_everything_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use LoginRequest.ProtoReflect.Descriptor instead. -func (*LoginRequest) Descriptor() ([]byte, []int) { - return file_proto_gid_a_bit_of_everything_proto_rawDescGZIP(), []int{0} -} - -func (x *LoginRequest) GetUsername() string { - if x != nil { - return x.Username - } - return "" -} - -func (x *LoginRequest) GetPassword() string { - if x != nil { - return x.Password - } - return "" -} - -type LoginReply struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Message string `protobuf:"bytes,1,opt,name=message,proto3" json:"message,omitempty"` - // Whether you have access or not - Access bool `protobuf:"varint,2,opt,name=access,proto3" json:"access,omitempty"` -} - -func (x *LoginReply) Reset() { - *x = LoginReply{} - if protoimpl.UnsafeEnabled { - mi := &file_proto_gid_a_bit_of_everything_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *LoginReply) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*LoginReply) ProtoMessage() {} - -func (x *LoginReply) ProtoReflect() protoreflect.Message { - mi := &file_proto_gid_a_bit_of_everything_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use LoginReply.ProtoReflect.Descriptor instead. -func (*LoginReply) Descriptor() ([]byte, []int) { - return file_proto_gid_a_bit_of_everything_proto_rawDescGZIP(), []int{1} -} - -func (x *LoginReply) GetMessage() string { - if x != nil { - return x.Message - } - return "" -} - -func (x *LoginReply) GetAccess() bool { - if x != nil { - return x.Access - } - return false -} - -type LogoutRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // The time the logout was registered - Timeoflogout string `protobuf:"bytes,1,opt,name=timeoflogout,proto3" json:"timeoflogout,omitempty"` - // This is the title - // - // This is the "Description" of field test - // you can use as many newlines as you want - // - // - // it will still format the same in the table - Test int32 `protobuf:"varint,2,opt,name=test,proto3" json:"test,omitempty"` - // This is an array - // - // It displays that using [] infront of the type - Stringarray []string `protobuf:"bytes,3,rep,name=stringarray,proto3" json:"stringarray,omitempty"` -} - -func (x *LogoutRequest) Reset() { - *x = LogoutRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_proto_gid_a_bit_of_everything_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *LogoutRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*LogoutRequest) ProtoMessage() {} - -func (x *LogoutRequest) ProtoReflect() protoreflect.Message { - mi := &file_proto_gid_a_bit_of_everything_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use LogoutRequest.ProtoReflect.Descriptor instead. -func (*LogoutRequest) Descriptor() ([]byte, []int) { - return file_proto_gid_a_bit_of_everything_proto_rawDescGZIP(), []int{2} -} - -func (x *LogoutRequest) GetTimeoflogout() string { - if x != nil { - return x.Timeoflogout - } - return "" -} - -func (x *LogoutRequest) GetTest() int32 { - if x != nil { - return x.Test - } - return 0 -} - -func (x *LogoutRequest) GetStringarray() []string { - if x != nil { - return x.Stringarray - } - return nil -} - -type LogoutReply struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Message that tells you whether your - // logout was succesful or not - Message string `protobuf:"bytes,1,opt,name=message,proto3" json:"message,omitempty"` -} - -func (x *LogoutReply) Reset() { - *x = LogoutReply{} - if protoimpl.UnsafeEnabled { - mi := &file_proto_gid_a_bit_of_everything_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *LogoutReply) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*LogoutReply) ProtoMessage() {} - -func (x *LogoutReply) ProtoReflect() protoreflect.Message { - mi := &file_proto_gid_a_bit_of_everything_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use LogoutReply.ProtoReflect.Descriptor instead. -func (*LogoutReply) Descriptor() ([]byte, []int) { - return file_proto_gid_a_bit_of_everything_proto_rawDescGZIP(), []int{3} -} - -func (x *LogoutReply) GetMessage() string { - if x != nil { - return x.Message - } - return "" -} - -var File_proto_gid_a_bit_of_everything_proto protoreflect.FileDescriptor - -var file_proto_gid_a_bit_of_everything_proto_rawDesc = []byte{ - 0x0a, 0x23, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x69, 0x64, 0x2f, 0x61, 0x5f, 0x62, 0x69, - 0x74, 0x5f, 0x6f, 0x66, 0x5f, 0x65, 0x76, 0x65, 0x72, 0x79, 0x74, 0x68, 0x69, 0x6e, 0x67, 0x2e, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x03, 0x67, 0x69, 0x64, 0x1a, 0x1c, 0x67, 0x6f, 0x6f, 0x67, - 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x46, 0x0a, 0x0c, 0x4c, 0x6f, 0x67, 0x69, - 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x75, 0x73, 0x65, 0x72, - 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x75, 0x73, 0x65, 0x72, - 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x70, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x70, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, - 0x22, 0x3e, 0x0a, 0x0a, 0x4c, 0x6f, 0x67, 0x69, 0x6e, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x12, 0x18, - 0x0a, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x61, 0x63, 0x63, 0x65, - 0x73, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x06, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, - 0x22, 0x69, 0x0a, 0x0d, 0x4c, 0x6f, 0x67, 0x6f, 0x75, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x12, 0x22, 0x0a, 0x0c, 0x74, 0x69, 0x6d, 0x65, 0x6f, 0x66, 0x6c, 0x6f, 0x67, 0x6f, 0x75, - 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x74, 0x69, 0x6d, 0x65, 0x6f, 0x66, 0x6c, - 0x6f, 0x67, 0x6f, 0x75, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x74, 0x65, 0x73, 0x74, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x05, 0x52, 0x04, 0x74, 0x65, 0x73, 0x74, 0x12, 0x20, 0x0a, 0x0b, 0x73, 0x74, 0x72, - 0x69, 0x6e, 0x67, 0x61, 0x72, 0x72, 0x61, 0x79, 0x18, 0x03, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0b, - 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x61, 0x72, 0x72, 0x61, 0x79, 0x22, 0x27, 0x0a, 0x0b, 0x4c, - 0x6f, 0x67, 0x6f, 0x75, 0x74, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x12, 0x18, 0x0a, 0x07, 0x6d, 0x65, - 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6d, 0x65, 0x73, - 0x73, 0x61, 0x67, 0x65, 0x32, 0xa8, 0x01, 0x0a, 0x0c, 0x4c, 0x6f, 0x67, 0x69, 0x6e, 0x53, 0x65, - 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x49, 0x0a, 0x05, 0x4c, 0x6f, 0x67, 0x69, 0x6e, 0x12, 0x11, - 0x2e, 0x67, 0x69, 0x64, 0x2e, 0x4c, 0x6f, 0x67, 0x69, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x1a, 0x0f, 0x2e, 0x67, 0x69, 0x64, 0x2e, 0x4c, 0x6f, 0x67, 0x69, 0x6e, 0x52, 0x65, 0x70, - 0x6c, 0x79, 0x22, 0x1c, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x16, 0x22, 0x11, 0x2f, 0x76, 0x31, 0x2f, - 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x2f, 0x6c, 0x6f, 0x67, 0x69, 0x6e, 0x3a, 0x01, 0x2a, - 0x12, 0x4d, 0x0a, 0x06, 0x4c, 0x6f, 0x67, 0x6f, 0x75, 0x74, 0x12, 0x12, 0x2e, 0x67, 0x69, 0x64, - 0x2e, 0x4c, 0x6f, 0x67, 0x6f, 0x75, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x10, - 0x2e, 0x67, 0x69, 0x64, 0x2e, 0x4c, 0x6f, 0x67, 0x6f, 0x75, 0x74, 0x52, 0x65, 0x70, 0x6c, 0x79, - 0x22, 0x1d, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x17, 0x22, 0x12, 0x2f, 0x76, 0x31, 0x2f, 0x65, 0x78, - 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x2f, 0x6c, 0x6f, 0x67, 0x6f, 0x75, 0x74, 0x3a, 0x01, 0x2a, 0x42, - 0x0f, 0x5a, 0x0d, 0x2e, 0x2f, 0x67, 0x69, 0x64, 0x70, 0x62, 0x3b, 0x67, 0x69, 0x64, 0x70, 0x62, - 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} - -var ( - file_proto_gid_a_bit_of_everything_proto_rawDescOnce sync.Once - file_proto_gid_a_bit_of_everything_proto_rawDescData = file_proto_gid_a_bit_of_everything_proto_rawDesc -) - -func file_proto_gid_a_bit_of_everything_proto_rawDescGZIP() []byte { - file_proto_gid_a_bit_of_everything_proto_rawDescOnce.Do(func() { - file_proto_gid_a_bit_of_everything_proto_rawDescData = protoimpl.X.CompressGZIP(file_proto_gid_a_bit_of_everything_proto_rawDescData) - }) - return file_proto_gid_a_bit_of_everything_proto_rawDescData -} - -var file_proto_gid_a_bit_of_everything_proto_msgTypes = make([]protoimpl.MessageInfo, 4) -var file_proto_gid_a_bit_of_everything_proto_goTypes = []interface{}{ - (*LoginRequest)(nil), // 0: gid.LoginRequest - (*LoginReply)(nil), // 1: gid.LoginReply - (*LogoutRequest)(nil), // 2: gid.LogoutRequest - (*LogoutReply)(nil), // 3: gid.LogoutReply -} -var file_proto_gid_a_bit_of_everything_proto_depIdxs = []int32{ - 0, // 0: gid.LoginService.Login:input_type -> gid.LoginRequest - 2, // 1: gid.LoginService.Logout:input_type -> gid.LogoutRequest - 1, // 2: gid.LoginService.Login:output_type -> gid.LoginReply - 3, // 3: gid.LoginService.Logout:output_type -> gid.LogoutReply - 2, // [2:4] is the sub-list for method output_type - 0, // [0:2] is the sub-list for method input_type - 0, // [0:0] is the sub-list for extension type_name - 0, // [0:0] is the sub-list for extension extendee - 0, // [0:0] is the sub-list for field type_name -} - -func init() { file_proto_gid_a_bit_of_everything_proto_init() } -func file_proto_gid_a_bit_of_everything_proto_init() { - if File_proto_gid_a_bit_of_everything_proto != nil { - return - } - if !protoimpl.UnsafeEnabled { - file_proto_gid_a_bit_of_everything_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*LoginRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_proto_gid_a_bit_of_everything_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*LoginReply); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_proto_gid_a_bit_of_everything_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*LogoutRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_proto_gid_a_bit_of_everything_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*LogoutReply); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_proto_gid_a_bit_of_everything_proto_rawDesc, - NumEnums: 0, - NumMessages: 4, - NumExtensions: 0, - NumServices: 1, - }, - GoTypes: file_proto_gid_a_bit_of_everything_proto_goTypes, - DependencyIndexes: file_proto_gid_a_bit_of_everything_proto_depIdxs, - MessageInfos: file_proto_gid_a_bit_of_everything_proto_msgTypes, - }.Build() - File_proto_gid_a_bit_of_everything_proto = out.File - file_proto_gid_a_bit_of_everything_proto_rawDesc = nil - file_proto_gid_a_bit_of_everything_proto_goTypes = nil - file_proto_gid_a_bit_of_everything_proto_depIdxs = nil -} diff --git a/example/protopb/gidpb/a_bit_of_everything_grpc.pb.go b/example/protopb/gidpb/a_bit_of_everything_grpc.pb.go deleted file mode 100644 index 34f834f40..000000000 --- a/example/protopb/gidpb/a_bit_of_everything_grpc.pb.go +++ /dev/null @@ -1,191 +0,0 @@ -// Code generated by protoc-gen-go-grpc. DO NOT EDIT. - -package gidpb - -import ( - context "context" - grpc "google.golang.org/grpc" - codes "google.golang.org/grpc/codes" - status "google.golang.org/grpc/status" -) - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the grpc package it is being compiled against. -// Requires gRPC-Go v1.32.0 or later. -const _ = grpc.SupportPackageIsVersion7 - -// LoginServiceClient is the client API for LoginService service. -// -// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. -type LoginServiceClient interface { - // Login - // - // {{.MethodDescriptorProto.Name}} is a call with the method(s) {{$first := true}}{{range .Bindings}}{{if $first}}{{$first = false}}{{else}}, {{end}}{{.HTTPMethod}}{{end}} within the "{{.Service.Name}}" service. - // It takes in "{{.RequestType.Name}}" and returns a "{{.ResponseType.Name}}". - // - // ## {{.RequestType.Name}} - // | Field ID | Name | Type | Description | - // | ----------- | --------- | --------------------------------------------------------- | ---------------------------- | {{range .RequestType.Fields}} - // | {{.Number}} | {{.Name}} | {{if eq .Label.String "LABEL_REPEATED"}}[]{{end}}{{.Type}} | {{fieldcomments .Message .}} | {{end}} - // - // ## {{.ResponseType.Name}} - // | Field ID | Name | Type | Description | - // | ----------- | --------- | ---------------------------------------------------------- | ---------------------------- | {{range .ResponseType.Fields}} - // | {{.Number}} | {{.Name}} | {{if eq .Label.String "LABEL_REPEATED"}}[]{{end}}{{.Type}} | {{fieldcomments .Message .}} | {{end}} - Login(ctx context.Context, in *LoginRequest, opts ...grpc.CallOption) (*LoginReply, error) - // Logout - // - // {{.MethodDescriptorProto.Name}} is a call with the method(s) {{$first := true}}{{range .Bindings}}{{if $first}}{{$first = false}}{{else}}, {{end}}{{.HTTPMethod}}{{end}} within the "{{.Service.Name}}" service. - // It takes in "{{.RequestType.Name}}" and returns a "{{.ResponseType.Name}}". - // - // ## {{.RequestType.Name}} - // | Field ID | Name | Type | Description | - // | ----------- | --------- | --------------------------------------------------------- | ---------------------------- | {{range .RequestType.Fields}} - // | {{.Number}} | {{.Name}} | {{if eq .Label.String "LABEL_REPEATED"}}[]{{end}}{{.Type}} | {{fieldcomments .Message .}} | {{end}} - // - // ## {{.ResponseType.Name}} - // | Field ID | Name | Type | Description | - // | ----------- | --------- | ---------------------------------------------------------- | ---------------------------- | {{range .ResponseType.Fields}} - // | {{.Number}} | {{.Name}} | {{if eq .Label.String "LABEL_REPEATED"}}[]{{end}}{{.Type}} | {{fieldcomments .Message .}} | {{end}} - Logout(ctx context.Context, in *LogoutRequest, opts ...grpc.CallOption) (*LogoutReply, error) -} - -type loginServiceClient struct { - cc grpc.ClientConnInterface -} - -func NewLoginServiceClient(cc grpc.ClientConnInterface) LoginServiceClient { - return &loginServiceClient{cc} -} - -func (c *loginServiceClient) Login(ctx context.Context, in *LoginRequest, opts ...grpc.CallOption) (*LoginReply, error) { - out := new(LoginReply) - err := c.cc.Invoke(ctx, "/gid.LoginService/Login", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *loginServiceClient) Logout(ctx context.Context, in *LogoutRequest, opts ...grpc.CallOption) (*LogoutReply, error) { - out := new(LogoutReply) - err := c.cc.Invoke(ctx, "/gid.LoginService/Logout", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -// LoginServiceServer is the server API for LoginService service. -// All implementations should embed UnimplementedLoginServiceServer -// for forward compatibility -type LoginServiceServer interface { - // Login - // - // {{.MethodDescriptorProto.Name}} is a call with the method(s) {{$first := true}}{{range .Bindings}}{{if $first}}{{$first = false}}{{else}}, {{end}}{{.HTTPMethod}}{{end}} within the "{{.Service.Name}}" service. - // It takes in "{{.RequestType.Name}}" and returns a "{{.ResponseType.Name}}". - // - // ## {{.RequestType.Name}} - // | Field ID | Name | Type | Description | - // | ----------- | --------- | --------------------------------------------------------- | ---------------------------- | {{range .RequestType.Fields}} - // | {{.Number}} | {{.Name}} | {{if eq .Label.String "LABEL_REPEATED"}}[]{{end}}{{.Type}} | {{fieldcomments .Message .}} | {{end}} - // - // ## {{.ResponseType.Name}} - // | Field ID | Name | Type | Description | - // | ----------- | --------- | ---------------------------------------------------------- | ---------------------------- | {{range .ResponseType.Fields}} - // | {{.Number}} | {{.Name}} | {{if eq .Label.String "LABEL_REPEATED"}}[]{{end}}{{.Type}} | {{fieldcomments .Message .}} | {{end}} - Login(context.Context, *LoginRequest) (*LoginReply, error) - // Logout - // - // {{.MethodDescriptorProto.Name}} is a call with the method(s) {{$first := true}}{{range .Bindings}}{{if $first}}{{$first = false}}{{else}}, {{end}}{{.HTTPMethod}}{{end}} within the "{{.Service.Name}}" service. - // It takes in "{{.RequestType.Name}}" and returns a "{{.ResponseType.Name}}". - // - // ## {{.RequestType.Name}} - // | Field ID | Name | Type | Description | - // | ----------- | --------- | --------------------------------------------------------- | ---------------------------- | {{range .RequestType.Fields}} - // | {{.Number}} | {{.Name}} | {{if eq .Label.String "LABEL_REPEATED"}}[]{{end}}{{.Type}} | {{fieldcomments .Message .}} | {{end}} - // - // ## {{.ResponseType.Name}} - // | Field ID | Name | Type | Description | - // | ----------- | --------- | ---------------------------------------------------------- | ---------------------------- | {{range .ResponseType.Fields}} - // | {{.Number}} | {{.Name}} | {{if eq .Label.String "LABEL_REPEATED"}}[]{{end}}{{.Type}} | {{fieldcomments .Message .}} | {{end}} - Logout(context.Context, *LogoutRequest) (*LogoutReply, error) -} - -// UnimplementedLoginServiceServer should be embedded to have forward compatible implementations. -type UnimplementedLoginServiceServer struct { -} - -func (UnimplementedLoginServiceServer) Login(context.Context, *LoginRequest) (*LoginReply, error) { - return nil, status.Errorf(codes.Unimplemented, "method Login not implemented") -} -func (UnimplementedLoginServiceServer) Logout(context.Context, *LogoutRequest) (*LogoutReply, error) { - return nil, status.Errorf(codes.Unimplemented, "method Logout not implemented") -} - -// UnsafeLoginServiceServer may be embedded to opt out of forward compatibility for this service. -// Use of this interface is not recommended, as added methods to LoginServiceServer will -// result in compilation errors. -type UnsafeLoginServiceServer interface { - mustEmbedUnimplementedLoginServiceServer() -} - -func RegisterLoginServiceServer(s grpc.ServiceRegistrar, srv LoginServiceServer) { - s.RegisterService(&LoginService_ServiceDesc, srv) -} - -func _LoginService_Login_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(LoginRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(LoginServiceServer).Login(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/gid.LoginService/Login", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(LoginServiceServer).Login(ctx, req.(*LoginRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _LoginService_Logout_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(LogoutRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(LoginServiceServer).Logout(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/gid.LoginService/Logout", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(LoginServiceServer).Logout(ctx, req.(*LogoutRequest)) - } - return interceptor(ctx, in, info, handler) -} - -// LoginService_ServiceDesc is the grpc.ServiceDesc for LoginService service. -// It's only intended for direct use with grpc.RegisterService, -// and not to be introspected or modified (even as a copy) -var LoginService_ServiceDesc = grpc.ServiceDesc{ - ServiceName: "gid.LoginService", - HandlerType: (*LoginServiceServer)(nil), - Methods: []grpc.MethodDesc{ - { - MethodName: "Login", - Handler: _LoginService_Login_Handler, - }, - { - MethodName: "Logout", - Handler: _LoginService_Logout_Handler, - }, - }, - Streams: []grpc.StreamDesc{}, - Metadata: "proto/gid/a_bit_of_everything.proto", -} diff --git a/example/protopb/gidpb/echo_service.pb.go b/example/protopb/gidpb/echo_service.pb.go deleted file mode 100644 index 0f65ded43..000000000 --- a/example/protopb/gidpb/echo_service.pb.go +++ /dev/null @@ -1,566 +0,0 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.28.0 -// protoc v3.19.4 -// source: proto/gid/echo_service.proto - -package gidpb - -import ( - _ "google.golang.org/genproto/googleapis/api/annotations" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - structpb "google.golang.org/protobuf/types/known/structpb" - reflect "reflect" - sync "sync" -) - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -// Embedded represents a message embedded in SimpleMessage. -type Embedded struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Types that are assignable to Mark: - // *Embedded_Progress - // *Embedded_Note - Mark isEmbedded_Mark `protobuf_oneof:"mark"` -} - -func (x *Embedded) Reset() { - *x = Embedded{} - if protoimpl.UnsafeEnabled { - mi := &file_proto_gid_echo_service_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Embedded) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Embedded) ProtoMessage() {} - -func (x *Embedded) ProtoReflect() protoreflect.Message { - mi := &file_proto_gid_echo_service_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use Embedded.ProtoReflect.Descriptor instead. -func (*Embedded) Descriptor() ([]byte, []int) { - return file_proto_gid_echo_service_proto_rawDescGZIP(), []int{0} -} - -func (m *Embedded) GetMark() isEmbedded_Mark { - if m != nil { - return m.Mark - } - return nil -} - -func (x *Embedded) GetProgress() int64 { - if x, ok := x.GetMark().(*Embedded_Progress); ok { - return x.Progress - } - return 0 -} - -func (x *Embedded) GetNote() string { - if x, ok := x.GetMark().(*Embedded_Note); ok { - return x.Note - } - return "" -} - -type isEmbedded_Mark interface { - isEmbedded_Mark() -} - -type Embedded_Progress struct { - Progress int64 `protobuf:"varint,1,opt,name=progress,proto3,oneof"` -} - -type Embedded_Note struct { - Note string `protobuf:"bytes,2,opt,name=note,proto3,oneof"` -} - -func (*Embedded_Progress) isEmbedded_Mark() {} - -func (*Embedded_Note) isEmbedded_Mark() {} - -// SimpleMessage represents a simple message sent to the Echo service. -type SimpleMessage struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Id represents the message identifier. - Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` - Num int64 `protobuf:"varint,2,opt,name=num,proto3" json:"num,omitempty"` - // Types that are assignable to Code: - // *SimpleMessage_LineNum - // *SimpleMessage_Lang - Code isSimpleMessage_Code `protobuf_oneof:"code"` - Status *Embedded `protobuf:"bytes,5,opt,name=status,proto3" json:"status,omitempty"` - // Types that are assignable to Ext: - // *SimpleMessage_En - // *SimpleMessage_No - Ext isSimpleMessage_Ext `protobuf_oneof:"ext"` -} - -func (x *SimpleMessage) Reset() { - *x = SimpleMessage{} - if protoimpl.UnsafeEnabled { - mi := &file_proto_gid_echo_service_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *SimpleMessage) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*SimpleMessage) ProtoMessage() {} - -func (x *SimpleMessage) ProtoReflect() protoreflect.Message { - mi := &file_proto_gid_echo_service_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use SimpleMessage.ProtoReflect.Descriptor instead. -func (*SimpleMessage) Descriptor() ([]byte, []int) { - return file_proto_gid_echo_service_proto_rawDescGZIP(), []int{1} -} - -func (x *SimpleMessage) GetId() string { - if x != nil { - return x.Id - } - return "" -} - -func (x *SimpleMessage) GetNum() int64 { - if x != nil { - return x.Num - } - return 0 -} - -func (m *SimpleMessage) GetCode() isSimpleMessage_Code { - if m != nil { - return m.Code - } - return nil -} - -func (x *SimpleMessage) GetLineNum() int64 { - if x, ok := x.GetCode().(*SimpleMessage_LineNum); ok { - return x.LineNum - } - return 0 -} - -func (x *SimpleMessage) GetLang() string { - if x, ok := x.GetCode().(*SimpleMessage_Lang); ok { - return x.Lang - } - return "" -} - -func (x *SimpleMessage) GetStatus() *Embedded { - if x != nil { - return x.Status - } - return nil -} - -func (m *SimpleMessage) GetExt() isSimpleMessage_Ext { - if m != nil { - return m.Ext - } - return nil -} - -func (x *SimpleMessage) GetEn() int64 { - if x, ok := x.GetExt().(*SimpleMessage_En); ok { - return x.En - } - return 0 -} - -func (x *SimpleMessage) GetNo() *Embedded { - if x, ok := x.GetExt().(*SimpleMessage_No); ok { - return x.No - } - return nil -} - -type isSimpleMessage_Code interface { - isSimpleMessage_Code() -} - -type SimpleMessage_LineNum struct { - LineNum int64 `protobuf:"varint,3,opt,name=line_num,json=lineNum,proto3,oneof"` -} - -type SimpleMessage_Lang struct { - Lang string `protobuf:"bytes,4,opt,name=lang,proto3,oneof"` -} - -func (*SimpleMessage_LineNum) isSimpleMessage_Code() {} - -func (*SimpleMessage_Lang) isSimpleMessage_Code() {} - -type isSimpleMessage_Ext interface { - isSimpleMessage_Ext() -} - -type SimpleMessage_En struct { - En int64 `protobuf:"varint,6,opt,name=en,proto3,oneof"` -} - -type SimpleMessage_No struct { - No *Embedded `protobuf:"bytes,7,opt,name=no,proto3,oneof"` -} - -func (*SimpleMessage_En) isSimpleMessage_Ext() {} - -func (*SimpleMessage_No) isSimpleMessage_Ext() {} - -// DynamicMessage represents a message which can have its structure -// built dynamically using Struct and Values. -type DynamicMessage struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - StructField *structpb.Struct `protobuf:"bytes,1,opt,name=struct_field,json=structField,proto3" json:"struct_field,omitempty"` - ValueField *structpb.Value `protobuf:"bytes,2,opt,name=value_field,json=valueField,proto3" json:"value_field,omitempty"` -} - -func (x *DynamicMessage) Reset() { - *x = DynamicMessage{} - if protoimpl.UnsafeEnabled { - mi := &file_proto_gid_echo_service_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *DynamicMessage) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*DynamicMessage) ProtoMessage() {} - -func (x *DynamicMessage) ProtoReflect() protoreflect.Message { - mi := &file_proto_gid_echo_service_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use DynamicMessage.ProtoReflect.Descriptor instead. -func (*DynamicMessage) Descriptor() ([]byte, []int) { - return file_proto_gid_echo_service_proto_rawDescGZIP(), []int{2} -} - -func (x *DynamicMessage) GetStructField() *structpb.Struct { - if x != nil { - return x.StructField - } - return nil -} - -func (x *DynamicMessage) GetValueField() *structpb.Value { - if x != nil { - return x.ValueField - } - return nil -} - -type DynamicMessageUpdate struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Body *DynamicMessage `protobuf:"bytes,1,opt,name=body,proto3" json:"body,omitempty"` // google.protobuf.FieldMask update_mask = 2; -} - -func (x *DynamicMessageUpdate) Reset() { - *x = DynamicMessageUpdate{} - if protoimpl.UnsafeEnabled { - mi := &file_proto_gid_echo_service_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *DynamicMessageUpdate) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*DynamicMessageUpdate) ProtoMessage() {} - -func (x *DynamicMessageUpdate) ProtoReflect() protoreflect.Message { - mi := &file_proto_gid_echo_service_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use DynamicMessageUpdate.ProtoReflect.Descriptor instead. -func (*DynamicMessageUpdate) Descriptor() ([]byte, []int) { - return file_proto_gid_echo_service_proto_rawDescGZIP(), []int{3} -} - -func (x *DynamicMessageUpdate) GetBody() *DynamicMessage { - if x != nil { - return x.Body - } - return nil -} - -var File_proto_gid_echo_service_proto protoreflect.FileDescriptor - -var file_proto_gid_echo_service_proto_rawDesc = []byte{ - 0x0a, 0x1c, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x69, 0x64, 0x2f, 0x65, 0x63, 0x68, 0x6f, - 0x5f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x03, - 0x67, 0x69, 0x64, 0x1a, 0x1c, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, - 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x1a, 0x1c, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, - 0x75, 0x66, 0x2f, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, - 0x46, 0x0a, 0x08, 0x45, 0x6d, 0x62, 0x65, 0x64, 0x64, 0x65, 0x64, 0x12, 0x1c, 0x0a, 0x08, 0x70, - 0x72, 0x6f, 0x67, 0x72, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x48, 0x00, 0x52, - 0x08, 0x70, 0x72, 0x6f, 0x67, 0x72, 0x65, 0x73, 0x73, 0x12, 0x14, 0x0a, 0x04, 0x6e, 0x6f, 0x74, - 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x04, 0x6e, 0x6f, 0x74, 0x65, 0x42, - 0x06, 0x0a, 0x04, 0x6d, 0x61, 0x72, 0x6b, 0x22, 0xcd, 0x01, 0x0a, 0x0d, 0x53, 0x69, 0x6d, 0x70, - 0x6c, 0x65, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x10, 0x0a, 0x03, 0x6e, 0x75, 0x6d, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x03, 0x6e, 0x75, 0x6d, 0x12, 0x1b, 0x0a, 0x08, 0x6c, - 0x69, 0x6e, 0x65, 0x5f, 0x6e, 0x75, 0x6d, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x48, 0x00, 0x52, - 0x07, 0x6c, 0x69, 0x6e, 0x65, 0x4e, 0x75, 0x6d, 0x12, 0x14, 0x0a, 0x04, 0x6c, 0x61, 0x6e, 0x67, - 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x04, 0x6c, 0x61, 0x6e, 0x67, 0x12, 0x25, - 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0d, - 0x2e, 0x67, 0x69, 0x64, 0x2e, 0x45, 0x6d, 0x62, 0x65, 0x64, 0x64, 0x65, 0x64, 0x52, 0x06, 0x73, - 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x10, 0x0a, 0x02, 0x65, 0x6e, 0x18, 0x06, 0x20, 0x01, 0x28, - 0x03, 0x48, 0x01, 0x52, 0x02, 0x65, 0x6e, 0x12, 0x1f, 0x0a, 0x02, 0x6e, 0x6f, 0x18, 0x07, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x67, 0x69, 0x64, 0x2e, 0x45, 0x6d, 0x62, 0x65, 0x64, 0x64, - 0x65, 0x64, 0x48, 0x01, 0x52, 0x02, 0x6e, 0x6f, 0x42, 0x06, 0x0a, 0x04, 0x63, 0x6f, 0x64, 0x65, - 0x42, 0x05, 0x0a, 0x03, 0x65, 0x78, 0x74, 0x22, 0x85, 0x01, 0x0a, 0x0e, 0x44, 0x79, 0x6e, 0x61, - 0x6d, 0x69, 0x63, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x3a, 0x0a, 0x0c, 0x73, 0x74, - 0x72, 0x75, 0x63, 0x74, 0x5f, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x17, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, - 0x75, 0x66, 0x2e, 0x53, 0x74, 0x72, 0x75, 0x63, 0x74, 0x52, 0x0b, 0x73, 0x74, 0x72, 0x75, 0x63, - 0x74, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x12, 0x37, 0x0a, 0x0b, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x5f, - 0x66, 0x69, 0x65, 0x6c, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x67, 0x6f, - 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x56, 0x61, - 0x6c, 0x75, 0x65, 0x52, 0x0a, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x22, - 0x3f, 0x0a, 0x14, 0x44, 0x79, 0x6e, 0x61, 0x6d, 0x69, 0x63, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, - 0x65, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x12, 0x27, 0x0a, 0x04, 0x62, 0x6f, 0x64, 0x79, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x67, 0x69, 0x64, 0x2e, 0x44, 0x79, 0x6e, 0x61, - 0x6d, 0x69, 0x63, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x52, 0x04, 0x62, 0x6f, 0x64, 0x79, - 0x32, 0xef, 0x04, 0x0a, 0x0b, 0x45, 0x63, 0x68, 0x6f, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, - 0x12, 0xe6, 0x01, 0x0a, 0x04, 0x45, 0x63, 0x68, 0x6f, 0x12, 0x12, 0x2e, 0x67, 0x69, 0x64, 0x2e, - 0x53, 0x69, 0x6d, 0x70, 0x6c, 0x65, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x1a, 0x12, 0x2e, - 0x67, 0x69, 0x64, 0x2e, 0x53, 0x69, 0x6d, 0x70, 0x6c, 0x65, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, - 0x65, 0x22, 0xb5, 0x01, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0xae, 0x01, 0x22, 0x15, 0x2f, 0x76, 0x31, - 0x2f, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x2f, 0x65, 0x63, 0x68, 0x6f, 0x2f, 0x7b, 0x69, - 0x64, 0x7d, 0x5a, 0x1d, 0x12, 0x1b, 0x2f, 0x76, 0x31, 0x2f, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, - 0x65, 0x2f, 0x65, 0x63, 0x68, 0x6f, 0x2f, 0x7b, 0x69, 0x64, 0x7d, 0x2f, 0x7b, 0x6e, 0x75, 0x6d, - 0x7d, 0x5a, 0x24, 0x12, 0x22, 0x2f, 0x76, 0x31, 0x2f, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, - 0x2f, 0x65, 0x63, 0x68, 0x6f, 0x2f, 0x7b, 0x69, 0x64, 0x7d, 0x2f, 0x7b, 0x6e, 0x75, 0x6d, 0x7d, - 0x2f, 0x7b, 0x6c, 0x61, 0x6e, 0x67, 0x7d, 0x5a, 0x31, 0x12, 0x2f, 0x2f, 0x76, 0x31, 0x2f, 0x65, - 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x2f, 0x65, 0x63, 0x68, 0x6f, 0x31, 0x2f, 0x7b, 0x69, 0x64, - 0x7d, 0x2f, 0x7b, 0x6c, 0x69, 0x6e, 0x65, 0x5f, 0x6e, 0x75, 0x6d, 0x7d, 0x2f, 0x7b, 0x73, 0x74, - 0x61, 0x74, 0x75, 0x73, 0x2e, 0x6e, 0x6f, 0x74, 0x65, 0x7d, 0x5a, 0x1d, 0x12, 0x1b, 0x2f, 0x76, - 0x31, 0x2f, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x2f, 0x65, 0x63, 0x68, 0x6f, 0x32, 0x2f, - 0x7b, 0x6e, 0x6f, 0x2e, 0x6e, 0x6f, 0x74, 0x65, 0x7d, 0x12, 0x54, 0x0a, 0x08, 0x45, 0x63, 0x68, - 0x6f, 0x42, 0x6f, 0x64, 0x79, 0x12, 0x12, 0x2e, 0x67, 0x69, 0x64, 0x2e, 0x53, 0x69, 0x6d, 0x70, - 0x6c, 0x65, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x1a, 0x12, 0x2e, 0x67, 0x69, 0x64, 0x2e, - 0x53, 0x69, 0x6d, 0x70, 0x6c, 0x65, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x22, 0x20, 0x82, - 0xd3, 0xe4, 0x93, 0x02, 0x1a, 0x22, 0x15, 0x2f, 0x76, 0x31, 0x2f, 0x65, 0x78, 0x61, 0x6d, 0x70, - 0x6c, 0x65, 0x2f, 0x65, 0x63, 0x68, 0x6f, 0x5f, 0x62, 0x6f, 0x64, 0x79, 0x3a, 0x01, 0x2a, 0x12, - 0x55, 0x0a, 0x0a, 0x45, 0x63, 0x68, 0x6f, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x12, 0x12, 0x2e, - 0x67, 0x69, 0x64, 0x2e, 0x53, 0x69, 0x6d, 0x70, 0x6c, 0x65, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, - 0x65, 0x1a, 0x12, 0x2e, 0x67, 0x69, 0x64, 0x2e, 0x53, 0x69, 0x6d, 0x70, 0x6c, 0x65, 0x4d, 0x65, - 0x73, 0x73, 0x61, 0x67, 0x65, 0x22, 0x1f, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x19, 0x2a, 0x17, 0x2f, - 0x76, 0x31, 0x2f, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x2f, 0x65, 0x63, 0x68, 0x6f, 0x5f, - 0x64, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x12, 0x67, 0x0a, 0x09, 0x45, 0x63, 0x68, 0x6f, 0x50, 0x61, - 0x74, 0x63, 0x68, 0x12, 0x19, 0x2e, 0x67, 0x69, 0x64, 0x2e, 0x44, 0x79, 0x6e, 0x61, 0x6d, 0x69, - 0x63, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x1a, 0x19, - 0x2e, 0x67, 0x69, 0x64, 0x2e, 0x44, 0x79, 0x6e, 0x61, 0x6d, 0x69, 0x63, 0x4d, 0x65, 0x73, 0x73, - 0x61, 0x67, 0x65, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x22, 0x24, 0x82, 0xd3, 0xe4, 0x93, 0x02, - 0x1e, 0x32, 0x16, 0x2f, 0x76, 0x31, 0x2f, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x2f, 0x65, - 0x63, 0x68, 0x6f, 0x5f, 0x70, 0x61, 0x74, 0x63, 0x68, 0x3a, 0x04, 0x62, 0x6f, 0x64, 0x79, 0x12, - 0x61, 0x0a, 0x10, 0x45, 0x63, 0x68, 0x6f, 0x55, 0x6e, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, - 0x7a, 0x65, 0x64, 0x12, 0x12, 0x2e, 0x67, 0x69, 0x64, 0x2e, 0x53, 0x69, 0x6d, 0x70, 0x6c, 0x65, - 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x1a, 0x12, 0x2e, 0x67, 0x69, 0x64, 0x2e, 0x53, 0x69, - 0x6d, 0x70, 0x6c, 0x65, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x22, 0x25, 0x82, 0xd3, 0xe4, - 0x93, 0x02, 0x1f, 0x12, 0x1d, 0x2f, 0x76, 0x31, 0x2f, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, - 0x2f, 0x65, 0x63, 0x68, 0x6f, 0x5f, 0x75, 0x6e, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, - 0x65, 0x64, 0x42, 0x0f, 0x5a, 0x0d, 0x2e, 0x2f, 0x67, 0x69, 0x64, 0x70, 0x62, 0x3b, 0x67, 0x69, - 0x64, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} - -var ( - file_proto_gid_echo_service_proto_rawDescOnce sync.Once - file_proto_gid_echo_service_proto_rawDescData = file_proto_gid_echo_service_proto_rawDesc -) - -func file_proto_gid_echo_service_proto_rawDescGZIP() []byte { - file_proto_gid_echo_service_proto_rawDescOnce.Do(func() { - file_proto_gid_echo_service_proto_rawDescData = protoimpl.X.CompressGZIP(file_proto_gid_echo_service_proto_rawDescData) - }) - return file_proto_gid_echo_service_proto_rawDescData -} - -var file_proto_gid_echo_service_proto_msgTypes = make([]protoimpl.MessageInfo, 4) -var file_proto_gid_echo_service_proto_goTypes = []interface{}{ - (*Embedded)(nil), // 0: gid.Embedded - (*SimpleMessage)(nil), // 1: gid.SimpleMessage - (*DynamicMessage)(nil), // 2: gid.DynamicMessage - (*DynamicMessageUpdate)(nil), // 3: gid.DynamicMessageUpdate - (*structpb.Struct)(nil), // 4: google.protobuf.Struct - (*structpb.Value)(nil), // 5: google.protobuf.Value -} -var file_proto_gid_echo_service_proto_depIdxs = []int32{ - 0, // 0: gid.SimpleMessage.status:type_name -> gid.Embedded - 0, // 1: gid.SimpleMessage.no:type_name -> gid.Embedded - 4, // 2: gid.DynamicMessage.struct_field:type_name -> google.protobuf.Struct - 5, // 3: gid.DynamicMessage.value_field:type_name -> google.protobuf.Value - 2, // 4: gid.DynamicMessageUpdate.body:type_name -> gid.DynamicMessage - 1, // 5: gid.EchoService.Echo:input_type -> gid.SimpleMessage - 1, // 6: gid.EchoService.EchoBody:input_type -> gid.SimpleMessage - 1, // 7: gid.EchoService.EchoDelete:input_type -> gid.SimpleMessage - 3, // 8: gid.EchoService.EchoPatch:input_type -> gid.DynamicMessageUpdate - 1, // 9: gid.EchoService.EchoUnauthorized:input_type -> gid.SimpleMessage - 1, // 10: gid.EchoService.Echo:output_type -> gid.SimpleMessage - 1, // 11: gid.EchoService.EchoBody:output_type -> gid.SimpleMessage - 1, // 12: gid.EchoService.EchoDelete:output_type -> gid.SimpleMessage - 3, // 13: gid.EchoService.EchoPatch:output_type -> gid.DynamicMessageUpdate - 1, // 14: gid.EchoService.EchoUnauthorized:output_type -> gid.SimpleMessage - 10, // [10:15] is the sub-list for method output_type - 5, // [5:10] is the sub-list for method input_type - 5, // [5:5] is the sub-list for extension type_name - 5, // [5:5] is the sub-list for extension extendee - 0, // [0:5] is the sub-list for field type_name -} - -func init() { file_proto_gid_echo_service_proto_init() } -func file_proto_gid_echo_service_proto_init() { - if File_proto_gid_echo_service_proto != nil { - return - } - if !protoimpl.UnsafeEnabled { - file_proto_gid_echo_service_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Embedded); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_proto_gid_echo_service_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*SimpleMessage); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_proto_gid_echo_service_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*DynamicMessage); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_proto_gid_echo_service_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*DynamicMessageUpdate); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - file_proto_gid_echo_service_proto_msgTypes[0].OneofWrappers = []interface{}{ - (*Embedded_Progress)(nil), - (*Embedded_Note)(nil), - } - file_proto_gid_echo_service_proto_msgTypes[1].OneofWrappers = []interface{}{ - (*SimpleMessage_LineNum)(nil), - (*SimpleMessage_Lang)(nil), - (*SimpleMessage_En)(nil), - (*SimpleMessage_No)(nil), - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_proto_gid_echo_service_proto_rawDesc, - NumEnums: 0, - NumMessages: 4, - NumExtensions: 0, - NumServices: 1, - }, - GoTypes: file_proto_gid_echo_service_proto_goTypes, - DependencyIndexes: file_proto_gid_echo_service_proto_depIdxs, - MessageInfos: file_proto_gid_echo_service_proto_msgTypes, - }.Build() - File_proto_gid_echo_service_proto = out.File - file_proto_gid_echo_service_proto_rawDesc = nil - file_proto_gid_echo_service_proto_goTypes = nil - file_proto_gid_echo_service_proto_depIdxs = nil -} diff --git a/example/protopb/gidpb/echo_service_grpc.pb.go b/example/protopb/gidpb/echo_service_grpc.pb.go deleted file mode 100644 index 7c1eb81db..000000000 --- a/example/protopb/gidpb/echo_service_grpc.pb.go +++ /dev/null @@ -1,263 +0,0 @@ -// Code generated by protoc-gen-go-grpc. DO NOT EDIT. - -package gidpb - -import ( - context "context" - grpc "google.golang.org/grpc" - codes "google.golang.org/grpc/codes" - status "google.golang.org/grpc/status" -) - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the grpc package it is being compiled against. -// Requires gRPC-Go v1.32.0 or later. -const _ = grpc.SupportPackageIsVersion7 - -// EchoServiceClient is the client API for EchoService service. -// -// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. -type EchoServiceClient interface { - // Echo method receives a simple message and returns it. - // - // The message posted as the id parameter will also be - // returned. - Echo(ctx context.Context, in *SimpleMessage, opts ...grpc.CallOption) (*SimpleMessage, error) - // EchoBody method receives a simple message and returns it. - EchoBody(ctx context.Context, in *SimpleMessage, opts ...grpc.CallOption) (*SimpleMessage, error) - // EchoDelete method receives a simple message and returns it. - EchoDelete(ctx context.Context, in *SimpleMessage, opts ...grpc.CallOption) (*SimpleMessage, error) - // EchoPatch method receives a NonStandardUpdateRequest and returns it. - EchoPatch(ctx context.Context, in *DynamicMessageUpdate, opts ...grpc.CallOption) (*DynamicMessageUpdate, error) - // EchoUnauthorized method receives a simple message and returns it. It must - // always return a google.rpc.Code of `UNAUTHENTICATED` and a HTTP Status code - // of 401. - EchoUnauthorized(ctx context.Context, in *SimpleMessage, opts ...grpc.CallOption) (*SimpleMessage, error) -} - -type echoServiceClient struct { - cc grpc.ClientConnInterface -} - -func NewEchoServiceClient(cc grpc.ClientConnInterface) EchoServiceClient { - return &echoServiceClient{cc} -} - -func (c *echoServiceClient) Echo(ctx context.Context, in *SimpleMessage, opts ...grpc.CallOption) (*SimpleMessage, error) { - out := new(SimpleMessage) - err := c.cc.Invoke(ctx, "/gid.EchoService/Echo", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *echoServiceClient) EchoBody(ctx context.Context, in *SimpleMessage, opts ...grpc.CallOption) (*SimpleMessage, error) { - out := new(SimpleMessage) - err := c.cc.Invoke(ctx, "/gid.EchoService/EchoBody", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *echoServiceClient) EchoDelete(ctx context.Context, in *SimpleMessage, opts ...grpc.CallOption) (*SimpleMessage, error) { - out := new(SimpleMessage) - err := c.cc.Invoke(ctx, "/gid.EchoService/EchoDelete", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *echoServiceClient) EchoPatch(ctx context.Context, in *DynamicMessageUpdate, opts ...grpc.CallOption) (*DynamicMessageUpdate, error) { - out := new(DynamicMessageUpdate) - err := c.cc.Invoke(ctx, "/gid.EchoService/EchoPatch", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *echoServiceClient) EchoUnauthorized(ctx context.Context, in *SimpleMessage, opts ...grpc.CallOption) (*SimpleMessage, error) { - out := new(SimpleMessage) - err := c.cc.Invoke(ctx, "/gid.EchoService/EchoUnauthorized", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -// EchoServiceServer is the server API for EchoService service. -// All implementations should embed UnimplementedEchoServiceServer -// for forward compatibility -type EchoServiceServer interface { - // Echo method receives a simple message and returns it. - // - // The message posted as the id parameter will also be - // returned. - Echo(context.Context, *SimpleMessage) (*SimpleMessage, error) - // EchoBody method receives a simple message and returns it. - EchoBody(context.Context, *SimpleMessage) (*SimpleMessage, error) - // EchoDelete method receives a simple message and returns it. - EchoDelete(context.Context, *SimpleMessage) (*SimpleMessage, error) - // EchoPatch method receives a NonStandardUpdateRequest and returns it. - EchoPatch(context.Context, *DynamicMessageUpdate) (*DynamicMessageUpdate, error) - // EchoUnauthorized method receives a simple message and returns it. It must - // always return a google.rpc.Code of `UNAUTHENTICATED` and a HTTP Status code - // of 401. - EchoUnauthorized(context.Context, *SimpleMessage) (*SimpleMessage, error) -} - -// UnimplementedEchoServiceServer should be embedded to have forward compatible implementations. -type UnimplementedEchoServiceServer struct { -} - -func (UnimplementedEchoServiceServer) Echo(context.Context, *SimpleMessage) (*SimpleMessage, error) { - return nil, status.Errorf(codes.Unimplemented, "method Echo not implemented") -} -func (UnimplementedEchoServiceServer) EchoBody(context.Context, *SimpleMessage) (*SimpleMessage, error) { - return nil, status.Errorf(codes.Unimplemented, "method EchoBody not implemented") -} -func (UnimplementedEchoServiceServer) EchoDelete(context.Context, *SimpleMessage) (*SimpleMessage, error) { - return nil, status.Errorf(codes.Unimplemented, "method EchoDelete not implemented") -} -func (UnimplementedEchoServiceServer) EchoPatch(context.Context, *DynamicMessageUpdate) (*DynamicMessageUpdate, error) { - return nil, status.Errorf(codes.Unimplemented, "method EchoPatch not implemented") -} -func (UnimplementedEchoServiceServer) EchoUnauthorized(context.Context, *SimpleMessage) (*SimpleMessage, error) { - return nil, status.Errorf(codes.Unimplemented, "method EchoUnauthorized not implemented") -} - -// UnsafeEchoServiceServer may be embedded to opt out of forward compatibility for this service. -// Use of this interface is not recommended, as added methods to EchoServiceServer will -// result in compilation errors. -type UnsafeEchoServiceServer interface { - mustEmbedUnimplementedEchoServiceServer() -} - -func RegisterEchoServiceServer(s grpc.ServiceRegistrar, srv EchoServiceServer) { - s.RegisterService(&EchoService_ServiceDesc, srv) -} - -func _EchoService_Echo_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(SimpleMessage) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(EchoServiceServer).Echo(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/gid.EchoService/Echo", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(EchoServiceServer).Echo(ctx, req.(*SimpleMessage)) - } - return interceptor(ctx, in, info, handler) -} - -func _EchoService_EchoBody_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(SimpleMessage) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(EchoServiceServer).EchoBody(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/gid.EchoService/EchoBody", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(EchoServiceServer).EchoBody(ctx, req.(*SimpleMessage)) - } - return interceptor(ctx, in, info, handler) -} - -func _EchoService_EchoDelete_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(SimpleMessage) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(EchoServiceServer).EchoDelete(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/gid.EchoService/EchoDelete", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(EchoServiceServer).EchoDelete(ctx, req.(*SimpleMessage)) - } - return interceptor(ctx, in, info, handler) -} - -func _EchoService_EchoPatch_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(DynamicMessageUpdate) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(EchoServiceServer).EchoPatch(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/gid.EchoService/EchoPatch", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(EchoServiceServer).EchoPatch(ctx, req.(*DynamicMessageUpdate)) - } - return interceptor(ctx, in, info, handler) -} - -func _EchoService_EchoUnauthorized_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(SimpleMessage) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(EchoServiceServer).EchoUnauthorized(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/gid.EchoService/EchoUnauthorized", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(EchoServiceServer).EchoUnauthorized(ctx, req.(*SimpleMessage)) - } - return interceptor(ctx, in, info, handler) -} - -// EchoService_ServiceDesc is the grpc.ServiceDesc for EchoService service. -// It's only intended for direct use with grpc.RegisterService, -// and not to be introspected or modified (even as a copy) -var EchoService_ServiceDesc = grpc.ServiceDesc{ - ServiceName: "gid.EchoService", - HandlerType: (*EchoServiceServer)(nil), - Methods: []grpc.MethodDesc{ - { - MethodName: "Echo", - Handler: _EchoService_Echo_Handler, - }, - { - MethodName: "EchoBody", - Handler: _EchoService_EchoBody_Handler, - }, - { - MethodName: "EchoDelete", - Handler: _EchoService_EchoDelete_Handler, - }, - { - MethodName: "EchoPatch", - Handler: _EchoService_EchoPatch_Handler, - }, - { - MethodName: "EchoUnauthorized", - Handler: _EchoService_EchoUnauthorized_Handler, - }, - }, - Streams: []grpc.StreamDesc{}, - Metadata: "proto/gid/echo_service.proto", -} diff --git a/example/protopb/gidpb/id.pb.go b/example/protopb/gidpb/id.pb.go deleted file mode 100644 index 5efbcd4e8..000000000 --- a/example/protopb/gidpb/id.pb.go +++ /dev/null @@ -1,509 +0,0 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.28.0 -// protoc v3.19.4 -// source: proto/gid/id.proto - -package gidpb - -import ( - _ "github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-openapiv2/options" - _ "google.golang.org/genproto/googleapis/api/annotations" - _ "google.golang.org/genproto/googleapis/rpc/status" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - _ "google.golang.org/protobuf/types/descriptorpb" - _ "google.golang.org/protobuf/types/known/durationpb" - _ "google.golang.org/protobuf/types/known/emptypb" - _ "google.golang.org/protobuf/types/known/fieldmaskpb" - _ "google.golang.org/protobuf/types/known/structpb" - _ "google.golang.org/protobuf/types/known/timestamppb" - _ "google.golang.org/protobuf/types/known/wrapperspb" - reflect "reflect" - sync "sync" -) - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -type Tag struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Key string `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"` - Value string `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"` -} - -func (x *Tag) Reset() { - *x = Tag{} - if protoimpl.UnsafeEnabled { - mi := &file_proto_gid_id_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Tag) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Tag) ProtoMessage() {} - -func (x *Tag) ProtoReflect() protoreflect.Message { - mi := &file_proto_gid_id_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use Tag.ProtoReflect.Descriptor instead. -func (*Tag) Descriptor() ([]byte, []int) { - return file_proto_gid_id_proto_rawDescGZIP(), []int{0} -} - -func (x *Tag) GetKey() string { - if x != nil { - return x.Key - } - return "" -} - -func (x *Tag) GetValue() string { - if x != nil { - return x.Value - } - return "" -} - -type GenerateResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // the unique id generated - Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` - // the type of id generated - Type string `protobuf:"bytes,2,opt,name=type,proto3" json:"type,omitempty"` -} - -func (x *GenerateResponse) Reset() { - *x = GenerateResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_proto_gid_id_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *GenerateResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GenerateResponse) ProtoMessage() {} - -func (x *GenerateResponse) ProtoReflect() protoreflect.Message { - mi := &file_proto_gid_id_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use GenerateResponse.ProtoReflect.Descriptor instead. -func (*GenerateResponse) Descriptor() ([]byte, []int) { - return file_proto_gid_id_proto_rawDescGZIP(), []int{1} -} - -func (x *GenerateResponse) GetId() string { - if x != nil { - return x.Id - } - return "" -} - -func (x *GenerateResponse) GetType() string { - if x != nil { - return x.Type - } - return "" -} - -// Generate a unique ID. Defaults to uuid. -type GenerateRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // type of id e.g uuid, shortid, snowflake (64 bit), bigflake (128 bit) - Type string `protobuf:"bytes,1,opt,name=type,proto3" json:"type,omitempty"` -} - -func (x *GenerateRequest) Reset() { - *x = GenerateRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_proto_gid_id_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *GenerateRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GenerateRequest) ProtoMessage() {} - -func (x *GenerateRequest) ProtoReflect() protoreflect.Message { - mi := &file_proto_gid_id_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use GenerateRequest.ProtoReflect.Descriptor instead. -func (*GenerateRequest) Descriptor() ([]byte, []int) { - return file_proto_gid_id_proto_rawDescGZIP(), []int{2} -} - -func (x *GenerateRequest) GetType() string { - if x != nil { - return x.Type - } - return "" -} - -// List the types of IDs available. No query params needed. -type TypesRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields -} - -func (x *TypesRequest) Reset() { - *x = TypesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_proto_gid_id_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *TypesRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*TypesRequest) ProtoMessage() {} - -func (x *TypesRequest) ProtoReflect() protoreflect.Message { - mi := &file_proto_gid_id_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use TypesRequest.ProtoReflect.Descriptor instead. -func (*TypesRequest) Descriptor() ([]byte, []int) { - return file_proto_gid_id_proto_rawDescGZIP(), []int{3} -} - -// TypesResponse 返回值类型 -type TypesResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Types []string `protobuf:"bytes,1,rep,name=types,proto3" json:"types,omitempty"` -} - -func (x *TypesResponse) Reset() { - *x = TypesResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_proto_gid_id_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *TypesResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*TypesResponse) ProtoMessage() {} - -func (x *TypesResponse) ProtoReflect() protoreflect.Message { - mi := &file_proto_gid_id_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use TypesResponse.ProtoReflect.Descriptor instead. -func (*TypesResponse) Descriptor() ([]byte, []int) { - return file_proto_gid_id_proto_rawDescGZIP(), []int{4} -} - -func (x *TypesResponse) GetTypes() []string { - if x != nil { - return x.Types - } - return nil -} - -var File_proto_gid_id_proto protoreflect.FileDescriptor - -var file_proto_gid_id_proto_rawDesc = []byte{ - 0x0a, 0x12, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x69, 0x64, 0x2f, 0x69, 0x64, 0x2e, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x03, 0x67, 0x69, 0x64, 0x1a, 0x1c, 0x67, 0x6f, 0x6f, 0x67, 0x6c, - 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x17, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, - 0x61, 0x70, 0x69, 0x2f, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x1a, 0x1b, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, - 0x66, 0x2f, 0x65, 0x6d, 0x70, 0x74, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1f, 0x67, - 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x5f, - 0x62, 0x65, 0x68, 0x61, 0x76, 0x69, 0x6f, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1e, - 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, - 0x77, 0x72, 0x61, 0x70, 0x70, 0x65, 0x72, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x17, - 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x72, 0x70, 0x63, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, - 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x20, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x5f, 0x6d, - 0x61, 0x73, 0x6b, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, - 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x74, 0x69, 0x6d, 0x65, 0x73, - 0x74, 0x61, 0x6d, 0x70, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1e, 0x67, 0x6f, 0x6f, 0x67, - 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x64, 0x75, 0x72, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x63, 0x2d, 0x67, 0x65, 0x6e, 0x2d, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x76, 0x32, - 0x2f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x20, 0x67, 0x6f, 0x6f, 0x67, - 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x64, 0x65, 0x73, 0x63, - 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1c, 0x67, 0x6f, - 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x73, 0x74, - 0x72, 0x75, 0x63, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x2d, 0x0a, 0x03, 0x54, 0x61, - 0x67, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, - 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0x36, 0x0a, 0x10, 0x47, 0x65, 0x6e, - 0x65, 0x72, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x0e, 0x0a, - 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x12, 0x0a, - 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x74, 0x79, 0x70, - 0x65, 0x22, 0x25, 0x0a, 0x0f, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x22, 0x0e, 0x0a, 0x0c, 0x54, 0x79, 0x70, 0x65, - 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x25, 0x0a, 0x0d, 0x54, 0x79, 0x70, 0x65, - 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x74, 0x79, 0x70, - 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x05, 0x74, 0x79, 0x70, 0x65, 0x73, 0x32, - 0xa1, 0x04, 0x0a, 0x02, 0x49, 0x64, 0x12, 0x98, 0x02, 0x0a, 0x08, 0x47, 0x65, 0x6e, 0x65, 0x72, - 0x61, 0x74, 0x65, 0x12, 0x14, 0x2e, 0x67, 0x69, 0x64, 0x2e, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, - 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x15, 0x2e, 0x67, 0x69, 0x64, 0x2e, - 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x22, 0xde, 0x01, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x14, 0x22, 0x0f, 0x2f, 0x76, 0x31, 0x2f, 0x69, - 0x64, 0x2f, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x3a, 0x01, 0x2a, 0x92, 0x41, 0xc0, - 0x01, 0x1a, 0x9b, 0x01, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x20, 0x74, 0x6f, 0x20, 0x61, - 0x20, 0x73, 0x65, 0x63, 0x75, 0x72, 0x65, 0x20, 0x57, 0x65, 0x62, 0x53, 0x6f, 0x63, 0x6b, 0x65, - 0x74, 0x20, 0x74, 0x6f, 0x20, 0x72, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x20, 0x73, 0x74, 0x72, - 0x65, 0x61, 0x6d, 0x69, 0x6e, 0x67, 0x20, 0x6e, 0x6f, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x73, 0x20, 0x28, 0x73, 0x65, 0x65, 0x20, 0x72, 0x65, 0x66, 0x65, 0x72, 0x65, - 0x6e, 0x63, 0x65, 0x20, 0x66, 0x6f, 0x72, 0x20, 0x6e, 0x6f, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x74, 0x6f, 0x20, 0x63, 0x6f, 0x6e, 0x73, 0x75, 0x6d, 0x65, 0x72, - 0x20, 0x66, 0x6f, 0x72, 0x20, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x20, 0x6f, 0x66, 0x20, 0x6d, - 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x20, 0x72, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x64, - 0x20, 0x6f, 0x6e, 0x20, 0x77, 0x65, 0x62, 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x29, 0x2e, 0x4a, - 0x1e, 0x0a, 0x03, 0x31, 0x30, 0x31, 0x12, 0x17, 0x0a, 0x15, 0x55, 0x70, 0x67, 0x72, 0x61, 0x64, - 0x65, 0x20, 0x74, 0x6f, 0x20, 0x57, 0x65, 0x62, 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x73, 0x58, - 0x01, 0x12, 0xec, 0x01, 0x0a, 0x05, 0x54, 0x79, 0x70, 0x65, 0x73, 0x12, 0x11, 0x2e, 0x67, 0x69, - 0x64, 0x2e, 0x54, 0x79, 0x70, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x12, - 0x2e, 0x67, 0x69, 0x64, 0x2e, 0x54, 0x79, 0x70, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x22, 0xbb, 0x01, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x12, 0x12, 0x10, 0x2f, 0x61, 0x70, - 0x69, 0x2f, 0x76, 0x31, 0x2f, 0x69, 0x64, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x92, 0x41, 0x9f, - 0x01, 0x1a, 0x54, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x73, 0x20, 0x61, 0x20, 0x70, - 0x72, 0x6f, 0x64, 0x75, 0x63, 0x65, 0x72, 0x20, 0x74, 0x6f, 0x20, 0x62, 0x65, 0x67, 0x69, 0x6e, - 0x20, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x73, 0x68, 0x69, 0x6e, 0x67, 0x20, 0x6e, 0x6f, 0x74, 0x69, - 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x20, 0x69, 0x6e, 0x20, 0x74, 0x68, 0x65, - 0x20, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x20, 0x4d, 0x45, 0x43, 0x20, 0x65, 0x6e, 0x76, 0x69, 0x72, - 0x6f, 0x6e, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x4a, 0x0b, 0x0a, 0x03, 0x32, 0x30, 0x30, 0x12, 0x04, - 0x0a, 0x02, 0x4f, 0x4b, 0x4a, 0x38, 0x0a, 0x03, 0x34, 0x30, 0x30, 0x12, 0x31, 0x0a, 0x2f, 0x49, - 0x6e, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x20, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x2c, 0x20, - 0x61, 0x20, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x64, 0x20, 0x70, 0x72, 0x6f, 0x70, 0x65, - 0x72, 0x74, 0x79, 0x20, 0x69, 0x73, 0x20, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6e, 0x67, 0x58, 0x01, - 0x1a, 0x11, 0xca, 0x41, 0x0e, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x68, 0x6f, 0x73, 0x74, 0x3a, 0x38, - 0x30, 0x38, 0x30, 0x42, 0x85, 0x04, 0x5a, 0x0d, 0x2e, 0x2f, 0x67, 0x69, 0x64, 0x70, 0x62, 0x3b, - 0x67, 0x69, 0x64, 0x70, 0x62, 0x92, 0x41, 0xf2, 0x03, 0x12, 0xf6, 0x01, 0x0a, 0x13, 0x41, 0x20, - 0x42, 0x69, 0x74, 0x20, 0x6f, 0x66, 0x20, 0x45, 0x76, 0x65, 0x72, 0x79, 0x74, 0x68, 0x69, 0x6e, - 0x67, 0x22, 0x58, 0x0a, 0x14, 0x67, 0x52, 0x50, 0x43, 0x2d, 0x47, 0x61, 0x74, 0x65, 0x77, 0x61, - 0x79, 0x20, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x12, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x73, - 0x3a, 0x2f, 0x2f, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x67, 0x72, - 0x70, 0x63, 0x2d, 0x65, 0x63, 0x6f, 0x73, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x2f, 0x67, 0x72, 0x70, - 0x63, 0x2d, 0x67, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x1a, 0x10, 0x6e, 0x6f, 0x6e, 0x65, 0x40, - 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x2e, 0x63, 0x6f, 0x6d, 0x2a, 0x5e, 0x0a, 0x14, 0x42, - 0x53, 0x44, 0x20, 0x33, 0x2d, 0x43, 0x6c, 0x61, 0x75, 0x73, 0x65, 0x20, 0x4c, 0x69, 0x63, 0x65, - 0x6e, 0x73, 0x65, 0x12, 0x46, 0x68, 0x74, 0x74, 0x70, 0x73, 0x3a, 0x2f, 0x2f, 0x67, 0x69, 0x74, - 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x67, 0x72, 0x70, 0x63, 0x2d, 0x65, 0x63, 0x6f, - 0x73, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x2f, 0x67, 0x72, 0x70, 0x63, 0x2d, 0x67, 0x61, 0x74, 0x65, - 0x77, 0x61, 0x79, 0x2f, 0x62, 0x6c, 0x6f, 0x62, 0x2f, 0x6d, 0x61, 0x73, 0x74, 0x65, 0x72, 0x2f, - 0x4c, 0x49, 0x43, 0x45, 0x4e, 0x53, 0x45, 0x2e, 0x74, 0x78, 0x74, 0x32, 0x03, 0x31, 0x2e, 0x30, - 0x3a, 0x20, 0x0a, 0x15, 0x78, 0x2d, 0x73, 0x6f, 0x6d, 0x65, 0x74, 0x68, 0x69, 0x6e, 0x67, 0x2d, - 0x73, 0x6f, 0x6d, 0x65, 0x74, 0x68, 0x69, 0x6e, 0x67, 0x12, 0x07, 0x1a, 0x05, 0x79, 0x61, 0x64, - 0x64, 0x61, 0x1a, 0x0e, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x68, 0x6f, 0x73, 0x74, 0x3a, 0x38, 0x30, - 0x38, 0x30, 0x2a, 0x03, 0x01, 0x02, 0x04, 0x32, 0x10, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x6a, 0x73, 0x6f, 0x6e, 0x32, 0x16, 0x61, 0x70, 0x70, 0x6c, 0x69, - 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x78, 0x2d, 0x66, 0x6f, 0x6f, 0x2d, 0x6d, 0x69, 0x6d, - 0x65, 0x3a, 0x10, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x6a, - 0x73, 0x6f, 0x6e, 0x3a, 0x16, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x2f, 0x78, 0x2d, 0x66, 0x6f, 0x6f, 0x2d, 0x6d, 0x69, 0x6d, 0x65, 0x72, 0x47, 0x0a, 0x0e, 0xe7, - 0x94, 0x9f, 0xe6, 0x88, 0x90, 0xe9, 0x9a, 0x8f, 0xe6, 0x9c, 0xba, 0x69, 0x64, 0x12, 0x35, 0x68, - 0x74, 0x74, 0x70, 0x73, 0x3a, 0x2f, 0x2f, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, - 0x6d, 0x2f, 0x70, 0x75, 0x62, 0x67, 0x6f, 0x2f, 0x6c, 0x61, 0x76, 0x61, 0x2f, 0x74, 0x72, 0x65, - 0x65, 0x2f, 0x6d, 0x61, 0x73, 0x74, 0x65, 0x72, 0x2f, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, - 0x2f, 0x67, 0x69, 0x64, 0x7a, 0x1b, 0x0a, 0x12, 0x78, 0x2d, 0x67, 0x72, 0x70, 0x63, 0x2d, 0x67, - 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x2d, 0x66, 0x6f, 0x6f, 0x12, 0x05, 0x1a, 0x03, 0x62, 0x61, - 0x72, 0x7a, 0x28, 0x0a, 0x17, 0x78, 0x2d, 0x67, 0x72, 0x70, 0x63, 0x2d, 0x67, 0x61, 0x74, 0x65, - 0x77, 0x61, 0x79, 0x2d, 0x62, 0x61, 0x7a, 0x2d, 0x6c, 0x69, 0x73, 0x74, 0x12, 0x0d, 0x32, 0x0b, - 0x0a, 0x05, 0x1a, 0x03, 0x6f, 0x6e, 0x65, 0x0a, 0x02, 0x20, 0x01, 0x62, 0x06, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x33, -} - -var ( - file_proto_gid_id_proto_rawDescOnce sync.Once - file_proto_gid_id_proto_rawDescData = file_proto_gid_id_proto_rawDesc -) - -func file_proto_gid_id_proto_rawDescGZIP() []byte { - file_proto_gid_id_proto_rawDescOnce.Do(func() { - file_proto_gid_id_proto_rawDescData = protoimpl.X.CompressGZIP(file_proto_gid_id_proto_rawDescData) - }) - return file_proto_gid_id_proto_rawDescData -} - -var file_proto_gid_id_proto_msgTypes = make([]protoimpl.MessageInfo, 5) -var file_proto_gid_id_proto_goTypes = []interface{}{ - (*Tag)(nil), // 0: gid.Tag - (*GenerateResponse)(nil), // 1: gid.GenerateResponse - (*GenerateRequest)(nil), // 2: gid.GenerateRequest - (*TypesRequest)(nil), // 3: gid.TypesRequest - (*TypesResponse)(nil), // 4: gid.TypesResponse -} -var file_proto_gid_id_proto_depIdxs = []int32{ - 2, // 0: gid.Id.Generate:input_type -> gid.GenerateRequest - 3, // 1: gid.Id.Types:input_type -> gid.TypesRequest - 1, // 2: gid.Id.Generate:output_type -> gid.GenerateResponse - 4, // 3: gid.Id.Types:output_type -> gid.TypesResponse - 2, // [2:4] is the sub-list for method output_type - 0, // [0:2] is the sub-list for method input_type - 0, // [0:0] is the sub-list for extension type_name - 0, // [0:0] is the sub-list for extension extendee - 0, // [0:0] is the sub-list for field type_name -} - -func init() { file_proto_gid_id_proto_init() } -func file_proto_gid_id_proto_init() { - if File_proto_gid_id_proto != nil { - return - } - if !protoimpl.UnsafeEnabled { - file_proto_gid_id_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Tag); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_proto_gid_id_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GenerateResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_proto_gid_id_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GenerateRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_proto_gid_id_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*TypesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_proto_gid_id_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*TypesResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_proto_gid_id_proto_rawDesc, - NumEnums: 0, - NumMessages: 5, - NumExtensions: 0, - NumServices: 1, - }, - GoTypes: file_proto_gid_id_proto_goTypes, - DependencyIndexes: file_proto_gid_id_proto_depIdxs, - MessageInfos: file_proto_gid_id_proto_msgTypes, - }.Build() - File_proto_gid_id_proto = out.File - file_proto_gid_id_proto_rawDesc = nil - file_proto_gid_id_proto_goTypes = nil - file_proto_gid_id_proto_depIdxs = nil -} diff --git a/example/protopb/gidpb/id_grpc.pb.go b/example/protopb/gidpb/id_grpc.pb.go deleted file mode 100644 index 72fe423de..000000000 --- a/example/protopb/gidpb/id_grpc.pb.go +++ /dev/null @@ -1,139 +0,0 @@ -// Code generated by protoc-gen-go-grpc. DO NOT EDIT. - -package gidpb - -import ( - context "context" - grpc "google.golang.org/grpc" - codes "google.golang.org/grpc/codes" - status "google.golang.org/grpc/status" -) - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the grpc package it is being compiled against. -// Requires gRPC-Go v1.32.0 or later. -const _ = grpc.SupportPackageIsVersion7 - -// IdClient is the client API for Id service. -// -// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. -type IdClient interface { - // Generate 生成ID - Generate(ctx context.Context, in *GenerateRequest, opts ...grpc.CallOption) (*GenerateResponse, error) - // Types id类型 - Types(ctx context.Context, in *TypesRequest, opts ...grpc.CallOption) (*TypesResponse, error) -} - -type idClient struct { - cc grpc.ClientConnInterface -} - -func NewIdClient(cc grpc.ClientConnInterface) IdClient { - return &idClient{cc} -} - -func (c *idClient) Generate(ctx context.Context, in *GenerateRequest, opts ...grpc.CallOption) (*GenerateResponse, error) { - out := new(GenerateResponse) - err := c.cc.Invoke(ctx, "/gid.Id/Generate", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *idClient) Types(ctx context.Context, in *TypesRequest, opts ...grpc.CallOption) (*TypesResponse, error) { - out := new(TypesResponse) - err := c.cc.Invoke(ctx, "/gid.Id/Types", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -// IdServer is the server API for Id service. -// All implementations should embed UnimplementedIdServer -// for forward compatibility -type IdServer interface { - // Generate 生成ID - Generate(context.Context, *GenerateRequest) (*GenerateResponse, error) - // Types id类型 - Types(context.Context, *TypesRequest) (*TypesResponse, error) -} - -// UnimplementedIdServer should be embedded to have forward compatible implementations. -type UnimplementedIdServer struct { -} - -func (UnimplementedIdServer) Generate(context.Context, *GenerateRequest) (*GenerateResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method Generate not implemented") -} -func (UnimplementedIdServer) Types(context.Context, *TypesRequest) (*TypesResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method Types not implemented") -} - -// UnsafeIdServer may be embedded to opt out of forward compatibility for this service. -// Use of this interface is not recommended, as added methods to IdServer will -// result in compilation errors. -type UnsafeIdServer interface { - mustEmbedUnimplementedIdServer() -} - -func RegisterIdServer(s grpc.ServiceRegistrar, srv IdServer) { - s.RegisterService(&Id_ServiceDesc, srv) -} - -func _Id_Generate_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(GenerateRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(IdServer).Generate(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/gid.Id/Generate", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(IdServer).Generate(ctx, req.(*GenerateRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _Id_Types_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(TypesRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(IdServer).Types(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/gid.Id/Types", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(IdServer).Types(ctx, req.(*TypesRequest)) - } - return interceptor(ctx, in, info, handler) -} - -// Id_ServiceDesc is the grpc.ServiceDesc for Id service. -// It's only intended for direct use with grpc.RegisterService, -// and not to be introspected or modified (even as a copy) -var Id_ServiceDesc = grpc.ServiceDesc{ - ServiceName: "gid.Id", - HandlerType: (*IdServer)(nil), - Methods: []grpc.MethodDesc{ - { - MethodName: "Generate", - Handler: _Id_Generate_Handler, - }, - { - MethodName: "Types", - Handler: _Id_Types_Handler, - }, - }, - Streams: []grpc.StreamDesc{}, - Metadata: "proto/gid/id.proto", -} diff --git a/example/protopb/hellopb/api.pb.go b/example/protopb/hellopb/api.pb.go deleted file mode 100644 index 2b10958c7..000000000 --- a/example/protopb/hellopb/api.pb.go +++ /dev/null @@ -1,220 +0,0 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.28.0 -// protoc v3.19.4 -// source: proto/hello/api.proto - -package hellopb - -import ( - _ "github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-openapiv2/options" - _ "google.golang.org/genproto/googleapis/api/annotations" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - structpb "google.golang.org/protobuf/types/known/structpb" - reflect "reflect" - sync "sync" -) - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -type TestApiOutput1 struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Data *structpb.Value `protobuf:"bytes,1,opt,name=data,proto3" json:"data,omitempty"` - Abc string `protobuf:"bytes,2,opt,name=abc,proto3" json:"abc,omitempty"` -} - -func (x *TestApiOutput1) Reset() { - *x = TestApiOutput1{} - if protoimpl.UnsafeEnabled { - mi := &file_proto_hello_api_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *TestApiOutput1) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*TestApiOutput1) ProtoMessage() {} - -func (x *TestApiOutput1) ProtoReflect() protoreflect.Message { - mi := &file_proto_hello_api_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use TestApiOutput1.ProtoReflect.Descriptor instead. -func (*TestApiOutput1) Descriptor() ([]byte, []int) { - return file_proto_hello_api_proto_rawDescGZIP(), []int{0} -} - -func (x *TestApiOutput1) GetData() *structpb.Value { - if x != nil { - return x.Data - } - return nil -} - -func (x *TestApiOutput1) GetAbc() string { - if x != nil { - return x.Abc - } - return "" -} - -var File_proto_hello_api_proto protoreflect.FileDescriptor - -var file_proto_hello_api_proto_rawDesc = []byte{ - 0x0a, 0x15, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x68, 0x65, 0x6c, 0x6c, 0x6f, 0x2f, 0x61, 0x70, - 0x69, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x05, 0x68, 0x65, 0x6c, 0x6c, 0x6f, 0x1a, 0x16, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x68, 0x65, 0x6c, 0x6c, 0x6f, 0x2f, 0x61, 0x70, 0x69, 0x31, - 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1c, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, - 0x70, 0x69, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1c, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x1a, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x2d, 0x67, 0x65, 0x6e, 0x2d, 0x6f, - 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x76, 0x32, 0x2f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, - 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x22, 0x4e, 0x0a, 0x0e, 0x54, 0x65, 0x73, 0x74, 0x41, 0x70, 0x69, 0x4f, 0x75, 0x74, - 0x70, 0x75, 0x74, 0x31, 0x12, 0x2a, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, - 0x12, 0x10, 0x0a, 0x03, 0x61, 0x62, 0x63, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x61, - 0x62, 0x63, 0x32, 0xdb, 0x02, 0x0a, 0x07, 0x54, 0x65, 0x73, 0x74, 0x41, 0x70, 0x69, 0x12, 0x44, - 0x0a, 0x07, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x0e, 0x2e, 0x68, 0x65, 0x6c, 0x6c, - 0x6f, 0x2e, 0x54, 0x65, 0x73, 0x74, 0x52, 0x65, 0x71, 0x1a, 0x14, 0x2e, 0x68, 0x65, 0x6c, 0x6c, - 0x6f, 0x2e, 0x54, 0x65, 0x73, 0x74, 0x41, 0x70, 0x69, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x22, - 0x13, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x0d, 0x12, 0x0b, 0x2f, 0x76, 0x31, 0x2f, 0x76, 0x65, 0x72, - 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x52, 0x0a, 0x08, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x31, - 0x12, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, - 0x75, 0x66, 0x2e, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x1a, 0x15, 0x2e, 0x68, 0x65, 0x6c, 0x6c, 0x6f, - 0x2e, 0x54, 0x65, 0x73, 0x74, 0x41, 0x70, 0x69, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x31, 0x22, - 0x17, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x11, 0x22, 0x0c, 0x2f, 0x76, 0x31, 0x2f, 0x76, 0x65, 0x72, - 0x73, 0x69, 0x6f, 0x6e, 0x31, 0x3a, 0x01, 0x2a, 0x12, 0x54, 0x0a, 0x0b, 0x56, 0x65, 0x72, 0x73, - 0x69, 0x6f, 0x6e, 0x54, 0x65, 0x73, 0x74, 0x12, 0x0e, 0x2e, 0x68, 0x65, 0x6c, 0x6c, 0x6f, 0x2e, - 0x54, 0x65, 0x73, 0x74, 0x52, 0x65, 0x71, 0x1a, 0x14, 0x2e, 0x68, 0x65, 0x6c, 0x6c, 0x6f, 0x2e, - 0x54, 0x65, 0x73, 0x74, 0x41, 0x70, 0x69, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x22, 0x1f, 0x82, - 0xd3, 0xe4, 0x93, 0x02, 0x19, 0x12, 0x17, 0x2f, 0x76, 0x31, 0x2f, 0x65, 0x78, 0x61, 0x6d, 0x70, - 0x6c, 0x65, 0x2f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x74, 0x65, 0x73, 0x74, 0x12, 0x60, - 0x0a, 0x11, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x54, 0x65, 0x73, 0x74, 0x43, 0x75, 0x73, - 0x74, 0x6f, 0x6d, 0x12, 0x0e, 0x2e, 0x68, 0x65, 0x6c, 0x6c, 0x6f, 0x2e, 0x54, 0x65, 0x73, 0x74, - 0x52, 0x65, 0x71, 0x1a, 0x14, 0x2e, 0x68, 0x65, 0x6c, 0x6c, 0x6f, 0x2e, 0x54, 0x65, 0x73, 0x74, - 0x41, 0x70, 0x69, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x22, 0x25, 0x82, 0xd3, 0xe4, 0x93, 0x02, - 0x1f, 0x12, 0x1d, 0x2f, 0x76, 0x31, 0x2f, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x2f, 0x76, - 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x54, 0x65, 0x73, 0x74, 0x43, 0x75, 0x73, 0x74, 0x6f, 0x6d, - 0x32, 0xbe, 0x01, 0x0a, 0x09, 0x54, 0x65, 0x73, 0x74, 0x41, 0x70, 0x69, 0x56, 0x32, 0x12, 0x57, - 0x0a, 0x08, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x31, 0x12, 0x0e, 0x2e, 0x68, 0x65, 0x6c, - 0x6c, 0x6f, 0x2e, 0x54, 0x65, 0x73, 0x74, 0x52, 0x65, 0x71, 0x1a, 0x14, 0x2e, 0x68, 0x65, 0x6c, - 0x6c, 0x6f, 0x2e, 0x54, 0x65, 0x73, 0x74, 0x41, 0x70, 0x69, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, - 0x22, 0x25, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1f, 0x22, 0x1a, 0x2f, 0x76, 0x32, 0x2f, 0x65, 0x78, - 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x2f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x2f, 0x7b, 0x6e, - 0x61, 0x6d, 0x65, 0x7d, 0x3a, 0x01, 0x2a, 0x12, 0x58, 0x0a, 0x0c, 0x56, 0x65, 0x72, 0x73, 0x69, - 0x6f, 0x6e, 0x54, 0x65, 0x73, 0x74, 0x31, 0x12, 0x0e, 0x2e, 0x68, 0x65, 0x6c, 0x6c, 0x6f, 0x2e, - 0x54, 0x65, 0x73, 0x74, 0x52, 0x65, 0x71, 0x1a, 0x14, 0x2e, 0x68, 0x65, 0x6c, 0x6c, 0x6f, 0x2e, - 0x54, 0x65, 0x73, 0x74, 0x41, 0x70, 0x69, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x22, 0x22, 0x82, - 0xd3, 0xe4, 0x93, 0x02, 0x1c, 0x22, 0x17, 0x2f, 0x76, 0x32, 0x2f, 0x65, 0x78, 0x61, 0x6d, 0x70, - 0x6c, 0x65, 0x2f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x74, 0x65, 0x73, 0x74, 0x3a, 0x01, - 0x2a, 0x42, 0x61, 0x5a, 0x11, 0x2e, 0x2f, 0x68, 0x65, 0x6c, 0x6c, 0x6f, 0x70, 0x62, 0x3b, 0x68, - 0x65, 0x6c, 0x6c, 0x6f, 0x70, 0x62, 0x92, 0x41, 0x4b, 0x12, 0x05, 0x32, 0x03, 0x31, 0x2e, 0x30, - 0x2a, 0x01, 0x02, 0x72, 0x3f, 0x0a, 0x17, 0x67, 0x52, 0x50, 0x43, 0x20, 0x65, 0x78, 0x61, 0x6d, - 0x70, 0x6c, 0x65, 0x20, 0x72, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x12, 0x24, - 0x68, 0x74, 0x74, 0x70, 0x73, 0x3a, 0x2f, 0x2f, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, - 0x6f, 0x6d, 0x2f, 0x67, 0x6f, 0x67, 0x6f, 0x2f, 0x67, 0x72, 0x70, 0x63, 0x2d, 0x65, 0x78, 0x61, - 0x6d, 0x70, 0x6c, 0x65, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} - -var ( - file_proto_hello_api_proto_rawDescOnce sync.Once - file_proto_hello_api_proto_rawDescData = file_proto_hello_api_proto_rawDesc -) - -func file_proto_hello_api_proto_rawDescGZIP() []byte { - file_proto_hello_api_proto_rawDescOnce.Do(func() { - file_proto_hello_api_proto_rawDescData = protoimpl.X.CompressGZIP(file_proto_hello_api_proto_rawDescData) - }) - return file_proto_hello_api_proto_rawDescData -} - -var file_proto_hello_api_proto_msgTypes = make([]protoimpl.MessageInfo, 1) -var file_proto_hello_api_proto_goTypes = []interface{}{ - (*TestApiOutput1)(nil), // 0: hello.TestApiOutput1 - (*structpb.Value)(nil), // 1: google.protobuf.Value - (*TestReq)(nil), // 2: hello.TestReq - (*TestApiOutput)(nil), // 3: hello.TestApiOutput -} -var file_proto_hello_api_proto_depIdxs = []int32{ - 1, // 0: hello.TestApiOutput1.data:type_name -> google.protobuf.Value - 2, // 1: hello.TestApi.Version:input_type -> hello.TestReq - 1, // 2: hello.TestApi.Version1:input_type -> google.protobuf.Value - 2, // 3: hello.TestApi.VersionTest:input_type -> hello.TestReq - 2, // 4: hello.TestApi.VersionTestCustom:input_type -> hello.TestReq - 2, // 5: hello.TestApiV2.Version1:input_type -> hello.TestReq - 2, // 6: hello.TestApiV2.VersionTest1:input_type -> hello.TestReq - 3, // 7: hello.TestApi.Version:output_type -> hello.TestApiOutput - 0, // 8: hello.TestApi.Version1:output_type -> hello.TestApiOutput1 - 3, // 9: hello.TestApi.VersionTest:output_type -> hello.TestApiOutput - 3, // 10: hello.TestApi.VersionTestCustom:output_type -> hello.TestApiOutput - 3, // 11: hello.TestApiV2.Version1:output_type -> hello.TestApiOutput - 3, // 12: hello.TestApiV2.VersionTest1:output_type -> hello.TestApiOutput - 7, // [7:13] is the sub-list for method output_type - 1, // [1:7] is the sub-list for method input_type - 1, // [1:1] is the sub-list for extension type_name - 1, // [1:1] is the sub-list for extension extendee - 0, // [0:1] is the sub-list for field type_name -} - -func init() { file_proto_hello_api_proto_init() } -func file_proto_hello_api_proto_init() { - if File_proto_hello_api_proto != nil { - return - } - file_proto_hello_api1_proto_init() - if !protoimpl.UnsafeEnabled { - file_proto_hello_api_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*TestApiOutput1); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_proto_hello_api_proto_rawDesc, - NumEnums: 0, - NumMessages: 1, - NumExtensions: 0, - NumServices: 2, - }, - GoTypes: file_proto_hello_api_proto_goTypes, - DependencyIndexes: file_proto_hello_api_proto_depIdxs, - MessageInfos: file_proto_hello_api_proto_msgTypes, - }.Build() - File_proto_hello_api_proto = out.File - file_proto_hello_api_proto_rawDesc = nil - file_proto_hello_api_proto_goTypes = nil - file_proto_hello_api_proto_depIdxs = nil -} diff --git a/example/protopb/hellopb/api1.pb.go b/example/protopb/hellopb/api1.pb.go deleted file mode 100644 index 31fb49ef5..000000000 --- a/example/protopb/hellopb/api1.pb.go +++ /dev/null @@ -1,408 +0,0 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.28.0 -// protoc v3.19.4 -// source: proto/hello/api1.proto - -package hellopb - -import ( - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - structpb "google.golang.org/protobuf/types/known/structpb" - reflect "reflect" - sync "sync" -) - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -// 枚举消息类型 -type PhoneType int32 - -const ( - PhoneType_MOBILE PhoneType = 0 //proto3版本中,首成员必须为0,成员不应有相同的值 - PhoneType_HOME PhoneType = 1 - PhoneType_WORK PhoneType = 2 -) - -// Enum value maps for PhoneType. -var ( - PhoneType_name = map[int32]string{ - 0: "MOBILE", - 1: "HOME", - 2: "WORK", - } - PhoneType_value = map[string]int32{ - "MOBILE": 0, - "HOME": 1, - "WORK": 2, - } -) - -func (x PhoneType) Enum() *PhoneType { - p := new(PhoneType) - *p = x - return p -} - -func (x PhoneType) String() string { - return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) -} - -func (PhoneType) Descriptor() protoreflect.EnumDescriptor { - return file_proto_hello_api1_proto_enumTypes[0].Descriptor() -} - -func (PhoneType) Type() protoreflect.EnumType { - return &file_proto_hello_api1_proto_enumTypes[0] -} - -func (x PhoneType) Number() protoreflect.EnumNumber { - return protoreflect.EnumNumber(x) -} - -// Deprecated: Use PhoneType.Descriptor instead. -func (PhoneType) EnumDescriptor() ([]byte, []int) { - return file_proto_hello_api1_proto_rawDescGZIP(), []int{0} -} - -type TestReq struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Input string `protobuf:"bytes,1,opt,name=input,proto3" json:"input,omitempty"` - Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` - Lists *structpb.ListValue `protobuf:"bytes,3,opt,name=lists,proto3" json:"lists,omitempty"` - Headers map[string]*structpb.ListValue `protobuf:"bytes,4,rep,name=headers,proto3" json:"headers,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` -} - -func (x *TestReq) Reset() { - *x = TestReq{} - if protoimpl.UnsafeEnabled { - mi := &file_proto_hello_api1_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *TestReq) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*TestReq) ProtoMessage() {} - -func (x *TestReq) ProtoReflect() protoreflect.Message { - mi := &file_proto_hello_api1_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use TestReq.ProtoReflect.Descriptor instead. -func (*TestReq) Descriptor() ([]byte, []int) { - return file_proto_hello_api1_proto_rawDescGZIP(), []int{0} -} - -func (x *TestReq) GetInput() string { - if x != nil { - return x.Input - } - return "" -} - -func (x *TestReq) GetName() string { - if x != nil { - return x.Name - } - return "" -} - -func (x *TestReq) GetLists() *structpb.ListValue { - if x != nil { - return x.Lists - } - return nil -} - -func (x *TestReq) GetHeaders() map[string]*structpb.ListValue { - if x != nil { - return x.Headers - } - return nil -} - -type TestApiData struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Version string `protobuf:"bytes,1,opt,name=version,proto3" json:"version,omitempty"` - SrvVersion string `protobuf:"bytes,2,opt,name=srvVersion,json=srv_ver,proto3" json:"srvVersion,omitempty"` -} - -func (x *TestApiData) Reset() { - *x = TestApiData{} - if protoimpl.UnsafeEnabled { - mi := &file_proto_hello_api1_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *TestApiData) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*TestApiData) ProtoMessage() {} - -func (x *TestApiData) ProtoReflect() protoreflect.Message { - mi := &file_proto_hello_api1_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use TestApiData.ProtoReflect.Descriptor instead. -func (*TestApiData) Descriptor() ([]byte, []int) { - return file_proto_hello_api1_proto_rawDescGZIP(), []int{1} -} - -func (x *TestApiData) GetVersion() string { - if x != nil { - return x.Version - } - return "" -} - -func (x *TestApiData) GetSrvVersion() string { - if x != nil { - return x.SrvVersion - } - return "" -} - -type TestApiOutput struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Code int32 `protobuf:"varint,1,opt,name=code,proto3" json:"code,omitempty"` - Msg string `protobuf:"bytes,2,opt,name=msg,proto3" json:"msg,omitempty"` - NowTime int64 `protobuf:"varint,3,opt,name=nowTime,proto3" json:"nowTime,omitempty"` - Data *TestApiData `protobuf:"bytes,4,opt,name=data,proto3" json:"data,omitempty"` -} - -func (x *TestApiOutput) Reset() { - *x = TestApiOutput{} - if protoimpl.UnsafeEnabled { - mi := &file_proto_hello_api1_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *TestApiOutput) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*TestApiOutput) ProtoMessage() {} - -func (x *TestApiOutput) ProtoReflect() protoreflect.Message { - mi := &file_proto_hello_api1_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use TestApiOutput.ProtoReflect.Descriptor instead. -func (*TestApiOutput) Descriptor() ([]byte, []int) { - return file_proto_hello_api1_proto_rawDescGZIP(), []int{2} -} - -func (x *TestApiOutput) GetCode() int32 { - if x != nil { - return x.Code - } - return 0 -} - -func (x *TestApiOutput) GetMsg() string { - if x != nil { - return x.Msg - } - return "" -} - -func (x *TestApiOutput) GetNowTime() int64 { - if x != nil { - return x.NowTime - } - return 0 -} - -func (x *TestApiOutput) GetData() *TestApiData { - if x != nil { - return x.Data - } - return nil -} - -var File_proto_hello_api1_proto protoreflect.FileDescriptor - -var file_proto_hello_api1_proto_rawDesc = []byte{ - 0x0a, 0x16, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x68, 0x65, 0x6c, 0x6c, 0x6f, 0x2f, 0x61, 0x70, - 0x69, 0x31, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x05, 0x68, 0x65, 0x6c, 0x6c, 0x6f, 0x1a, - 0x1c, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, - 0x2f, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xf4, 0x01, - 0x0a, 0x07, 0x54, 0x65, 0x73, 0x74, 0x52, 0x65, 0x71, 0x12, 0x14, 0x0a, 0x05, 0x69, 0x6e, 0x70, - 0x75, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x69, 0x6e, 0x70, 0x75, 0x74, 0x12, - 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, - 0x61, 0x6d, 0x65, 0x12, 0x30, 0x0a, 0x05, 0x6c, 0x69, 0x73, 0x74, 0x73, 0x18, 0x03, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x05, - 0x6c, 0x69, 0x73, 0x74, 0x73, 0x12, 0x35, 0x0a, 0x07, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, - 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x68, 0x65, 0x6c, 0x6c, 0x6f, 0x2e, 0x54, - 0x65, 0x73, 0x74, 0x52, 0x65, 0x71, 0x2e, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x45, 0x6e, - 0x74, 0x72, 0x79, 0x52, 0x07, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x1a, 0x56, 0x0a, 0x0c, - 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, - 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x30, - 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, - 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, - 0x4c, 0x69, 0x73, 0x74, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, - 0x3a, 0x02, 0x38, 0x01, 0x22, 0x44, 0x0a, 0x0b, 0x54, 0x65, 0x73, 0x74, 0x41, 0x70, 0x69, 0x44, - 0x61, 0x74, 0x61, 0x12, 0x18, 0x0a, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x1b, 0x0a, - 0x0a, 0x73, 0x72, 0x76, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x07, 0x73, 0x72, 0x76, 0x5f, 0x76, 0x65, 0x72, 0x22, 0x77, 0x0a, 0x0d, 0x54, 0x65, - 0x73, 0x74, 0x41, 0x70, 0x69, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x63, - 0x6f, 0x64, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x12, - 0x10, 0x0a, 0x03, 0x6d, 0x73, 0x67, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6d, 0x73, - 0x67, 0x12, 0x18, 0x0a, 0x07, 0x6e, 0x6f, 0x77, 0x54, 0x69, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, - 0x28, 0x03, 0x52, 0x07, 0x6e, 0x6f, 0x77, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x26, 0x0a, 0x04, 0x64, - 0x61, 0x74, 0x61, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x68, 0x65, 0x6c, 0x6c, - 0x6f, 0x2e, 0x54, 0x65, 0x73, 0x74, 0x41, 0x70, 0x69, 0x44, 0x61, 0x74, 0x61, 0x52, 0x04, 0x64, - 0x61, 0x74, 0x61, 0x2a, 0x2b, 0x0a, 0x09, 0x50, 0x68, 0x6f, 0x6e, 0x65, 0x54, 0x79, 0x70, 0x65, - 0x12, 0x0a, 0x0a, 0x06, 0x4d, 0x4f, 0x42, 0x49, 0x4c, 0x45, 0x10, 0x00, 0x12, 0x08, 0x0a, 0x04, - 0x48, 0x4f, 0x4d, 0x45, 0x10, 0x01, 0x12, 0x08, 0x0a, 0x04, 0x57, 0x4f, 0x52, 0x4b, 0x10, 0x02, - 0x42, 0x13, 0x5a, 0x11, 0x2e, 0x2f, 0x68, 0x65, 0x6c, 0x6c, 0x6f, 0x70, 0x62, 0x3b, 0x68, 0x65, - 0x6c, 0x6c, 0x6f, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} - -var ( - file_proto_hello_api1_proto_rawDescOnce sync.Once - file_proto_hello_api1_proto_rawDescData = file_proto_hello_api1_proto_rawDesc -) - -func file_proto_hello_api1_proto_rawDescGZIP() []byte { - file_proto_hello_api1_proto_rawDescOnce.Do(func() { - file_proto_hello_api1_proto_rawDescData = protoimpl.X.CompressGZIP(file_proto_hello_api1_proto_rawDescData) - }) - return file_proto_hello_api1_proto_rawDescData -} - -var file_proto_hello_api1_proto_enumTypes = make([]protoimpl.EnumInfo, 1) -var file_proto_hello_api1_proto_msgTypes = make([]protoimpl.MessageInfo, 4) -var file_proto_hello_api1_proto_goTypes = []interface{}{ - (PhoneType)(0), // 0: hello.PhoneType - (*TestReq)(nil), // 1: hello.TestReq - (*TestApiData)(nil), // 2: hello.TestApiData - (*TestApiOutput)(nil), // 3: hello.TestApiOutput - nil, // 4: hello.TestReq.HeadersEntry - (*structpb.ListValue)(nil), // 5: google.protobuf.ListValue -} -var file_proto_hello_api1_proto_depIdxs = []int32{ - 5, // 0: hello.TestReq.lists:type_name -> google.protobuf.ListValue - 4, // 1: hello.TestReq.headers:type_name -> hello.TestReq.HeadersEntry - 2, // 2: hello.TestApiOutput.data:type_name -> hello.TestApiData - 5, // 3: hello.TestReq.HeadersEntry.value:type_name -> google.protobuf.ListValue - 4, // [4:4] is the sub-list for method output_type - 4, // [4:4] is the sub-list for method input_type - 4, // [4:4] is the sub-list for extension type_name - 4, // [4:4] is the sub-list for extension extendee - 0, // [0:4] is the sub-list for field type_name -} - -func init() { file_proto_hello_api1_proto_init() } -func file_proto_hello_api1_proto_init() { - if File_proto_hello_api1_proto != nil { - return - } - if !protoimpl.UnsafeEnabled { - file_proto_hello_api1_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*TestReq); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_proto_hello_api1_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*TestApiData); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_proto_hello_api1_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*TestApiOutput); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_proto_hello_api1_proto_rawDesc, - NumEnums: 1, - NumMessages: 4, - NumExtensions: 0, - NumServices: 0, - }, - GoTypes: file_proto_hello_api1_proto_goTypes, - DependencyIndexes: file_proto_hello_api1_proto_depIdxs, - EnumInfos: file_proto_hello_api1_proto_enumTypes, - MessageInfos: file_proto_hello_api1_proto_msgTypes, - }.Build() - File_proto_hello_api1_proto = out.File - file_proto_hello_api1_proto_rawDesc = nil - file_proto_hello_api1_proto_goTypes = nil - file_proto_hello_api1_proto_depIdxs = nil -} diff --git a/example/protopb/hellopb/api_grpc.pb.go b/example/protopb/hellopb/api_grpc.pb.go deleted file mode 100644 index 5a442f158..000000000 --- a/example/protopb/hellopb/api_grpc.pb.go +++ /dev/null @@ -1,334 +0,0 @@ -// Code generated by protoc-gen-go-grpc. DO NOT EDIT. - -package hellopb - -import ( - context "context" - grpc "google.golang.org/grpc" - codes "google.golang.org/grpc/codes" - status "google.golang.org/grpc/status" - structpb "google.golang.org/protobuf/types/known/structpb" -) - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the grpc package it is being compiled against. -// Requires gRPC-Go v1.32.0 or later. -const _ = grpc.SupportPackageIsVersion7 - -// TestApiClient is the client API for TestApi service. -// -// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. -type TestApiClient interface { - // Version rpc - Version(ctx context.Context, in *TestReq, opts ...grpc.CallOption) (*TestApiOutput, error) - Version1(ctx context.Context, in *structpb.Value, opts ...grpc.CallOption) (*TestApiOutput1, error) - // VersionTest rpc - VersionTest(ctx context.Context, in *TestReq, opts ...grpc.CallOption) (*TestApiOutput, error) - // VersionTest rpc custom - VersionTestCustom(ctx context.Context, in *TestReq, opts ...grpc.CallOption) (*TestApiOutput, error) -} - -type testApiClient struct { - cc grpc.ClientConnInterface -} - -func NewTestApiClient(cc grpc.ClientConnInterface) TestApiClient { - return &testApiClient{cc} -} - -func (c *testApiClient) Version(ctx context.Context, in *TestReq, opts ...grpc.CallOption) (*TestApiOutput, error) { - out := new(TestApiOutput) - err := c.cc.Invoke(ctx, "/hello.TestApi/Version", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *testApiClient) Version1(ctx context.Context, in *structpb.Value, opts ...grpc.CallOption) (*TestApiOutput1, error) { - out := new(TestApiOutput1) - err := c.cc.Invoke(ctx, "/hello.TestApi/Version1", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *testApiClient) VersionTest(ctx context.Context, in *TestReq, opts ...grpc.CallOption) (*TestApiOutput, error) { - out := new(TestApiOutput) - err := c.cc.Invoke(ctx, "/hello.TestApi/VersionTest", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *testApiClient) VersionTestCustom(ctx context.Context, in *TestReq, opts ...grpc.CallOption) (*TestApiOutput, error) { - out := new(TestApiOutput) - err := c.cc.Invoke(ctx, "/hello.TestApi/VersionTestCustom", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -// TestApiServer is the server API for TestApi service. -// All implementations should embed UnimplementedTestApiServer -// for forward compatibility -type TestApiServer interface { - // Version rpc - Version(context.Context, *TestReq) (*TestApiOutput, error) - Version1(context.Context, *structpb.Value) (*TestApiOutput1, error) - // VersionTest rpc - VersionTest(context.Context, *TestReq) (*TestApiOutput, error) - // VersionTest rpc custom - VersionTestCustom(context.Context, *TestReq) (*TestApiOutput, error) -} - -// UnimplementedTestApiServer should be embedded to have forward compatible implementations. -type UnimplementedTestApiServer struct { -} - -func (UnimplementedTestApiServer) Version(context.Context, *TestReq) (*TestApiOutput, error) { - return nil, status.Errorf(codes.Unimplemented, "method Version not implemented") -} -func (UnimplementedTestApiServer) Version1(context.Context, *structpb.Value) (*TestApiOutput1, error) { - return nil, status.Errorf(codes.Unimplemented, "method Version1 not implemented") -} -func (UnimplementedTestApiServer) VersionTest(context.Context, *TestReq) (*TestApiOutput, error) { - return nil, status.Errorf(codes.Unimplemented, "method VersionTest not implemented") -} -func (UnimplementedTestApiServer) VersionTestCustom(context.Context, *TestReq) (*TestApiOutput, error) { - return nil, status.Errorf(codes.Unimplemented, "method VersionTestCustom not implemented") -} - -// UnsafeTestApiServer may be embedded to opt out of forward compatibility for this service. -// Use of this interface is not recommended, as added methods to TestApiServer will -// result in compilation errors. -type UnsafeTestApiServer interface { - mustEmbedUnimplementedTestApiServer() -} - -func RegisterTestApiServer(s grpc.ServiceRegistrar, srv TestApiServer) { - s.RegisterService(&TestApi_ServiceDesc, srv) -} - -func _TestApi_Version_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(TestReq) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(TestApiServer).Version(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/hello.TestApi/Version", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(TestApiServer).Version(ctx, req.(*TestReq)) - } - return interceptor(ctx, in, info, handler) -} - -func _TestApi_Version1_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(structpb.Value) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(TestApiServer).Version1(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/hello.TestApi/Version1", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(TestApiServer).Version1(ctx, req.(*structpb.Value)) - } - return interceptor(ctx, in, info, handler) -} - -func _TestApi_VersionTest_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(TestReq) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(TestApiServer).VersionTest(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/hello.TestApi/VersionTest", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(TestApiServer).VersionTest(ctx, req.(*TestReq)) - } - return interceptor(ctx, in, info, handler) -} - -func _TestApi_VersionTestCustom_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(TestReq) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(TestApiServer).VersionTestCustom(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/hello.TestApi/VersionTestCustom", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(TestApiServer).VersionTestCustom(ctx, req.(*TestReq)) - } - return interceptor(ctx, in, info, handler) -} - -// TestApi_ServiceDesc is the grpc.ServiceDesc for TestApi service. -// It's only intended for direct use with grpc.RegisterService, -// and not to be introspected or modified (even as a copy) -var TestApi_ServiceDesc = grpc.ServiceDesc{ - ServiceName: "hello.TestApi", - HandlerType: (*TestApiServer)(nil), - Methods: []grpc.MethodDesc{ - { - MethodName: "Version", - Handler: _TestApi_Version_Handler, - }, - { - MethodName: "Version1", - Handler: _TestApi_Version1_Handler, - }, - { - MethodName: "VersionTest", - Handler: _TestApi_VersionTest_Handler, - }, - { - MethodName: "VersionTestCustom", - Handler: _TestApi_VersionTestCustom_Handler, - }, - }, - Streams: []grpc.StreamDesc{}, - Metadata: "proto/hello/api.proto", -} - -// TestApiV2Client is the client API for TestApiV2 service. -// -// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. -type TestApiV2Client interface { - Version1(ctx context.Context, in *TestReq, opts ...grpc.CallOption) (*TestApiOutput, error) - VersionTest1(ctx context.Context, in *TestReq, opts ...grpc.CallOption) (*TestApiOutput, error) -} - -type testApiV2Client struct { - cc grpc.ClientConnInterface -} - -func NewTestApiV2Client(cc grpc.ClientConnInterface) TestApiV2Client { - return &testApiV2Client{cc} -} - -func (c *testApiV2Client) Version1(ctx context.Context, in *TestReq, opts ...grpc.CallOption) (*TestApiOutput, error) { - out := new(TestApiOutput) - err := c.cc.Invoke(ctx, "/hello.TestApiV2/Version1", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *testApiV2Client) VersionTest1(ctx context.Context, in *TestReq, opts ...grpc.CallOption) (*TestApiOutput, error) { - out := new(TestApiOutput) - err := c.cc.Invoke(ctx, "/hello.TestApiV2/VersionTest1", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -// TestApiV2Server is the server API for TestApiV2 service. -// All implementations should embed UnimplementedTestApiV2Server -// for forward compatibility -type TestApiV2Server interface { - Version1(context.Context, *TestReq) (*TestApiOutput, error) - VersionTest1(context.Context, *TestReq) (*TestApiOutput, error) -} - -// UnimplementedTestApiV2Server should be embedded to have forward compatible implementations. -type UnimplementedTestApiV2Server struct { -} - -func (UnimplementedTestApiV2Server) Version1(context.Context, *TestReq) (*TestApiOutput, error) { - return nil, status.Errorf(codes.Unimplemented, "method Version1 not implemented") -} -func (UnimplementedTestApiV2Server) VersionTest1(context.Context, *TestReq) (*TestApiOutput, error) { - return nil, status.Errorf(codes.Unimplemented, "method VersionTest1 not implemented") -} - -// UnsafeTestApiV2Server may be embedded to opt out of forward compatibility for this service. -// Use of this interface is not recommended, as added methods to TestApiV2Server will -// result in compilation errors. -type UnsafeTestApiV2Server interface { - mustEmbedUnimplementedTestApiV2Server() -} - -func RegisterTestApiV2Server(s grpc.ServiceRegistrar, srv TestApiV2Server) { - s.RegisterService(&TestApiV2_ServiceDesc, srv) -} - -func _TestApiV2_Version1_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(TestReq) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(TestApiV2Server).Version1(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/hello.TestApiV2/Version1", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(TestApiV2Server).Version1(ctx, req.(*TestReq)) - } - return interceptor(ctx, in, info, handler) -} - -func _TestApiV2_VersionTest1_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(TestReq) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(TestApiV2Server).VersionTest1(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/hello.TestApiV2/VersionTest1", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(TestApiV2Server).VersionTest1(ctx, req.(*TestReq)) - } - return interceptor(ctx, in, info, handler) -} - -// TestApiV2_ServiceDesc is the grpc.ServiceDesc for TestApiV2 service. -// It's only intended for direct use with grpc.RegisterService, -// and not to be introspected or modified (even as a copy) -var TestApiV2_ServiceDesc = grpc.ServiceDesc{ - ServiceName: "hello.TestApiV2", - HandlerType: (*TestApiV2Server)(nil), - Methods: []grpc.MethodDesc{ - { - MethodName: "Version1", - Handler: _TestApiV2_Version1_Handler, - }, - { - MethodName: "VersionTest1", - Handler: _TestApiV2_VersionTest1_Handler, - }, - }, - Streams: []grpc.StreamDesc{}, - Metadata: "proto/hello/api.proto", -} diff --git a/example/protopb/hellopb/example.pb.go b/example/protopb/hellopb/example.pb.go deleted file mode 100644 index ece49ca6e..000000000 --- a/example/protopb/hellopb/example.pb.go +++ /dev/null @@ -1,555 +0,0 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.28.0 -// protoc v3.19.4 -// source: proto/hello/example.proto - -// GoGo gRPC Example -// -// This example is used to show how to use gRPC and -// gRPC-Gateway with GoGo Protobuf. - -package hellopb - -import ( - _ "github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-openapiv2/options" - _ "github.com/mwitkow/go-proto-validators" - _ "google.golang.org/genproto/googleapis/api/annotations" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - durationpb "google.golang.org/protobuf/types/known/durationpb" - emptypb "google.golang.org/protobuf/types/known/emptypb" - fieldmaskpb "google.golang.org/protobuf/types/known/fieldmaskpb" - structpb "google.golang.org/protobuf/types/known/structpb" - timestamppb "google.golang.org/protobuf/types/known/timestamppb" - reflect "reflect" - sync "sync" -) - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -type Role int32 - -const ( - Role_GUEST Role = 0 - Role_MEMBER Role = 1 - Role_ADMIN Role = 2 -) - -// Enum value maps for Role. -var ( - Role_name = map[int32]string{ - 0: "GUEST", - 1: "MEMBER", - 2: "ADMIN", - } - Role_value = map[string]int32{ - "GUEST": 0, - "MEMBER": 1, - "ADMIN": 2, - } -) - -func (x Role) Enum() *Role { - p := new(Role) - *p = x - return p -} - -func (x Role) String() string { - return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) -} - -func (Role) Descriptor() protoreflect.EnumDescriptor { - return file_proto_hello_example_proto_enumTypes[0].Descriptor() -} - -func (Role) Type() protoreflect.EnumType { - return &file_proto_hello_example_proto_enumTypes[0] -} - -func (x Role) Number() protoreflect.EnumNumber { - return protoreflect.EnumNumber(x) -} - -// Deprecated: Use Role.Descriptor instead. -func (Role) EnumDescriptor() ([]byte, []int) { - return file_proto_hello_example_proto_rawDescGZIP(), []int{0} -} - -type User struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Id uint32 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` - Role Role `protobuf:"varint,2,opt,name=role,proto3,enum=hello.Role" json:"role,omitempty"` - CreateDate *timestamppb.Timestamp `protobuf:"bytes,3,opt,name=create_date,json=createDate,proto3" json:"create_date,omitempty"` -} - -func (x *User) Reset() { - *x = User{} - if protoimpl.UnsafeEnabled { - mi := &file_proto_hello_example_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *User) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*User) ProtoMessage() {} - -func (x *User) ProtoReflect() protoreflect.Message { - mi := &file_proto_hello_example_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use User.ProtoReflect.Descriptor instead. -func (*User) Descriptor() ([]byte, []int) { - return file_proto_hello_example_proto_rawDescGZIP(), []int{0} -} - -func (x *User) GetId() uint32 { - if x != nil { - return x.Id - } - return 0 -} - -func (x *User) GetRole() Role { - if x != nil { - return x.Role - } - return Role_GUEST -} - -func (x *User) GetCreateDate() *timestamppb.Timestamp { - if x != nil { - return x.CreateDate - } - return nil -} - -type UserRole struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Role Role `protobuf:"varint,1,opt,name=role,proto3,enum=hello.Role" json:"role,omitempty"` - Lists *structpb.ListValue `protobuf:"bytes,2,opt,name=lists,proto3" json:"lists,omitempty"` - Headers map[string]*structpb.ListValue `protobuf:"bytes,3,rep,name=headers,proto3" json:"headers,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` -} - -func (x *UserRole) Reset() { - *x = UserRole{} - if protoimpl.UnsafeEnabled { - mi := &file_proto_hello_example_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *UserRole) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*UserRole) ProtoMessage() {} - -func (x *UserRole) ProtoReflect() protoreflect.Message { - mi := &file_proto_hello_example_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use UserRole.ProtoReflect.Descriptor instead. -func (*UserRole) Descriptor() ([]byte, []int) { - return file_proto_hello_example_proto_rawDescGZIP(), []int{1} -} - -func (x *UserRole) GetRole() Role { - if x != nil { - return x.Role - } - return Role_GUEST -} - -func (x *UserRole) GetLists() *structpb.ListValue { - if x != nil { - return x.Lists - } - return nil -} - -func (x *UserRole) GetHeaders() map[string]*structpb.ListValue { - if x != nil { - return x.Headers - } - return nil -} - -type UpdateUserRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // The user resource which replaces the resource on the server. - User *User `protobuf:"bytes,1,opt,name=user,proto3" json:"user,omitempty"` - // The update mask applies to the resource. For the `FieldMask` definition, - // see https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask - UpdateMask *fieldmaskpb.FieldMask `protobuf:"bytes,2,opt,name=update_mask,json=updateMask,proto3" json:"update_mask,omitempty"` -} - -func (x *UpdateUserRequest) Reset() { - *x = UpdateUserRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_proto_hello_example_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *UpdateUserRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*UpdateUserRequest) ProtoMessage() {} - -func (x *UpdateUserRequest) ProtoReflect() protoreflect.Message { - mi := &file_proto_hello_example_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use UpdateUserRequest.ProtoReflect.Descriptor instead. -func (*UpdateUserRequest) Descriptor() ([]byte, []int) { - return file_proto_hello_example_proto_rawDescGZIP(), []int{2} -} - -func (x *UpdateUserRequest) GetUser() *User { - if x != nil { - return x.User - } - return nil -} - -func (x *UpdateUserRequest) GetUpdateMask() *fieldmaskpb.FieldMask { - if x != nil { - return x.UpdateMask - } - return nil -} - -type ListUsersRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Only list users created after this timestamp - CreatedSince *timestamppb.Timestamp `protobuf:"bytes,1,opt,name=created_since,json=createdSince,proto3" json:"created_since,omitempty"` - // Only list users older than this Duration - OlderThan *durationpb.Duration `protobuf:"bytes,2,opt,name=older_than,json=olderThan,proto3" json:"older_than,omitempty"` -} - -func (x *ListUsersRequest) Reset() { - *x = ListUsersRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_proto_hello_example_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *ListUsersRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ListUsersRequest) ProtoMessage() {} - -func (x *ListUsersRequest) ProtoReflect() protoreflect.Message { - mi := &file_proto_hello_example_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use ListUsersRequest.ProtoReflect.Descriptor instead. -func (*ListUsersRequest) Descriptor() ([]byte, []int) { - return file_proto_hello_example_proto_rawDescGZIP(), []int{3} -} - -func (x *ListUsersRequest) GetCreatedSince() *timestamppb.Timestamp { - if x != nil { - return x.CreatedSince - } - return nil -} - -func (x *ListUsersRequest) GetOlderThan() *durationpb.Duration { - if x != nil { - return x.OlderThan - } - return nil -} - -var File_proto_hello_example_proto protoreflect.FileDescriptor - -var file_proto_hello_example_proto_rawDesc = []byte{ - 0x0a, 0x19, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x68, 0x65, 0x6c, 0x6c, 0x6f, 0x2f, 0x65, 0x78, - 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x05, 0x68, 0x65, 0x6c, - 0x6c, 0x6f, 0x1a, 0x1b, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x62, 0x75, 0x66, 0x2f, 0x65, 0x6d, 0x70, 0x74, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, - 0x1f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, - 0x2f, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x1a, 0x1e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, - 0x66, 0x2f, 0x64, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x1a, 0x20, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, - 0x66, 0x2f, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x5f, 0x6d, 0x61, 0x73, 0x6b, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x1a, 0x1c, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x62, 0x75, 0x66, 0x2f, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x1a, 0x1c, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x61, 0x6e, 0x6e, - 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x2e, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x2d, 0x67, 0x65, 0x6e, 0x2d, 0x6f, 0x70, 0x65, 0x6e, 0x61, - 0x70, 0x69, 0x76, 0x32, 0x2f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x61, 0x6e, 0x6e, - 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x23, - 0x67, 0x6f, 0x2d, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2d, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, - 0x6f, 0x72, 0x73, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x22, 0x9b, 0x01, 0x0a, 0x04, 0x55, 0x73, 0x65, 0x72, 0x12, 0x35, 0x0a, 0x02, - 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x42, 0x25, 0xe2, 0xdf, 0x1f, 0x21, 0x10, 0x00, - 0x2a, 0x1d, 0x49, 0x44, 0x20, 0x6d, 0x75, 0x73, 0x74, 0x20, 0x62, 0x65, 0x20, 0x61, 0x20, 0x70, - 0x6f, 0x73, 0x69, 0x74, 0x69, 0x76, 0x65, 0x20, 0x69, 0x6e, 0x74, 0x65, 0x67, 0x65, 0x72, 0x52, - 0x02, 0x69, 0x64, 0x12, 0x1f, 0x0a, 0x04, 0x72, 0x6f, 0x6c, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x0e, 0x32, 0x0b, 0x2e, 0x68, 0x65, 0x6c, 0x6c, 0x6f, 0x2e, 0x52, 0x6f, 0x6c, 0x65, 0x52, 0x04, - 0x72, 0x6f, 0x6c, 0x65, 0x12, 0x3b, 0x0a, 0x0b, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x5f, 0x64, - 0x61, 0x74, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, - 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, - 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x0a, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x44, 0x61, 0x74, - 0x65, 0x22, 0xed, 0x01, 0x0a, 0x08, 0x55, 0x73, 0x65, 0x72, 0x52, 0x6f, 0x6c, 0x65, 0x12, 0x1f, - 0x0a, 0x04, 0x72, 0x6f, 0x6c, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x0b, 0x2e, 0x68, - 0x65, 0x6c, 0x6c, 0x6f, 0x2e, 0x52, 0x6f, 0x6c, 0x65, 0x52, 0x04, 0x72, 0x6f, 0x6c, 0x65, 0x12, - 0x30, 0x0a, 0x05, 0x6c, 0x69, 0x73, 0x74, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, - 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, - 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x05, 0x6c, 0x69, 0x73, 0x74, - 0x73, 0x12, 0x36, 0x0a, 0x07, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x18, 0x03, 0x20, 0x03, - 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x68, 0x65, 0x6c, 0x6c, 0x6f, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x52, - 0x6f, 0x6c, 0x65, 0x2e, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, - 0x52, 0x07, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x1a, 0x56, 0x0a, 0x0c, 0x48, 0x65, 0x61, - 0x64, 0x65, 0x72, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x30, 0x0a, 0x05, 0x76, - 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, - 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x4c, 0x69, 0x73, - 0x74, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, - 0x01, 0x22, 0x71, 0x0a, 0x11, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x55, 0x73, 0x65, 0x72, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1f, 0x0a, 0x04, 0x75, 0x73, 0x65, 0x72, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0b, 0x2e, 0x68, 0x65, 0x6c, 0x6c, 0x6f, 0x2e, 0x55, 0x73, 0x65, - 0x72, 0x52, 0x04, 0x75, 0x73, 0x65, 0x72, 0x12, 0x3b, 0x0a, 0x0b, 0x75, 0x70, 0x64, 0x61, 0x74, - 0x65, 0x5f, 0x6d, 0x61, 0x73, 0x6b, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, - 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, - 0x69, 0x65, 0x6c, 0x64, 0x4d, 0x61, 0x73, 0x6b, 0x52, 0x0a, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, - 0x4d, 0x61, 0x73, 0x6b, 0x22, 0x8d, 0x01, 0x0a, 0x10, 0x4c, 0x69, 0x73, 0x74, 0x55, 0x73, 0x65, - 0x72, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x3f, 0x0a, 0x0d, 0x63, 0x72, 0x65, - 0x61, 0x74, 0x65, 0x64, 0x5f, 0x73, 0x69, 0x6e, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, - 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x0c, 0x63, 0x72, - 0x65, 0x61, 0x74, 0x65, 0x64, 0x53, 0x69, 0x6e, 0x63, 0x65, 0x12, 0x38, 0x0a, 0x0a, 0x6f, 0x6c, - 0x64, 0x65, 0x72, 0x5f, 0x74, 0x68, 0x61, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, - 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, - 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x09, 0x6f, 0x6c, 0x64, 0x65, 0x72, - 0x54, 0x68, 0x61, 0x6e, 0x2a, 0x28, 0x0a, 0x04, 0x52, 0x6f, 0x6c, 0x65, 0x12, 0x09, 0x0a, 0x05, - 0x47, 0x55, 0x45, 0x53, 0x54, 0x10, 0x00, 0x12, 0x0a, 0x0a, 0x06, 0x4d, 0x45, 0x4d, 0x42, 0x45, - 0x52, 0x10, 0x01, 0x12, 0x09, 0x0a, 0x05, 0x41, 0x44, 0x4d, 0x49, 0x4e, 0x10, 0x02, 0x32, 0x94, - 0x03, 0x0a, 0x0b, 0x55, 0x73, 0x65, 0x72, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x48, - 0x0a, 0x07, 0x41, 0x64, 0x64, 0x55, 0x73, 0x65, 0x72, 0x12, 0x0b, 0x2e, 0x68, 0x65, 0x6c, 0x6c, - 0x6f, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x18, - 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x12, 0x22, 0x0d, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, 0x2f, - 0x75, 0x73, 0x65, 0x72, 0x73, 0x3a, 0x01, 0x2a, 0x12, 0x45, 0x0a, 0x07, 0x47, 0x65, 0x74, 0x55, - 0x73, 0x65, 0x72, 0x12, 0x0b, 0x2e, 0x68, 0x65, 0x6c, 0x6c, 0x6f, 0x2e, 0x55, 0x73, 0x65, 0x72, - 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, - 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x15, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x0f, - 0x12, 0x0d, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, 0x2f, 0x75, 0x73, 0x65, 0x72, 0x73, 0x12, - 0x4a, 0x0a, 0x09, 0x4c, 0x69, 0x73, 0x74, 0x55, 0x73, 0x65, 0x72, 0x73, 0x12, 0x17, 0x2e, 0x68, - 0x65, 0x6c, 0x6c, 0x6f, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x55, 0x73, 0x65, 0x72, 0x73, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x0b, 0x2e, 0x68, 0x65, 0x6c, 0x6c, 0x6f, 0x2e, 0x55, 0x73, - 0x65, 0x72, 0x22, 0x15, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x0f, 0x12, 0x0d, 0x2f, 0x61, 0x70, 0x69, - 0x2f, 0x76, 0x31, 0x2f, 0x75, 0x73, 0x65, 0x72, 0x73, 0x30, 0x01, 0x12, 0x4f, 0x0a, 0x0f, 0x4c, - 0x69, 0x73, 0x74, 0x55, 0x73, 0x65, 0x72, 0x73, 0x42, 0x79, 0x52, 0x6f, 0x6c, 0x65, 0x12, 0x0f, - 0x2e, 0x68, 0x65, 0x6c, 0x6c, 0x6f, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x52, 0x6f, 0x6c, 0x65, 0x1a, - 0x0b, 0x2e, 0x68, 0x65, 0x6c, 0x6c, 0x6f, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x22, 0x1a, 0x82, 0xd3, - 0xe4, 0x93, 0x02, 0x14, 0x12, 0x12, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, 0x2f, 0x75, 0x73, - 0x65, 0x72, 0x73, 0x2f, 0x72, 0x6f, 0x6c, 0x65, 0x28, 0x01, 0x30, 0x01, 0x12, 0x57, 0x0a, 0x0a, - 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x55, 0x73, 0x65, 0x72, 0x12, 0x18, 0x2e, 0x68, 0x65, 0x6c, - 0x6c, 0x6f, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x1a, 0x0b, 0x2e, 0x68, 0x65, 0x6c, 0x6c, 0x6f, 0x2e, 0x55, 0x73, 0x65, - 0x72, 0x22, 0x22, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1c, 0x32, 0x17, 0x2f, 0x61, 0x70, 0x69, 0x2f, - 0x76, 0x31, 0x2f, 0x75, 0x73, 0x65, 0x72, 0x73, 0x2f, 0x7b, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x69, - 0x64, 0x7d, 0x3a, 0x01, 0x2a, 0x42, 0x61, 0x5a, 0x11, 0x2e, 0x2f, 0x68, 0x65, 0x6c, 0x6c, 0x6f, - 0x70, 0x62, 0x3b, 0x68, 0x65, 0x6c, 0x6c, 0x6f, 0x70, 0x62, 0x92, 0x41, 0x4b, 0x12, 0x05, 0x32, - 0x03, 0x31, 0x2e, 0x30, 0x2a, 0x01, 0x02, 0x72, 0x3f, 0x0a, 0x17, 0x67, 0x52, 0x50, 0x43, 0x20, - 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x20, 0x72, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, - 0x72, 0x79, 0x12, 0x24, 0x68, 0x74, 0x74, 0x70, 0x73, 0x3a, 0x2f, 0x2f, 0x67, 0x69, 0x74, 0x68, - 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x67, 0x6f, 0x67, 0x6f, 0x2f, 0x67, 0x72, 0x70, 0x63, - 0x2d, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} - -var ( - file_proto_hello_example_proto_rawDescOnce sync.Once - file_proto_hello_example_proto_rawDescData = file_proto_hello_example_proto_rawDesc -) - -func file_proto_hello_example_proto_rawDescGZIP() []byte { - file_proto_hello_example_proto_rawDescOnce.Do(func() { - file_proto_hello_example_proto_rawDescData = protoimpl.X.CompressGZIP(file_proto_hello_example_proto_rawDescData) - }) - return file_proto_hello_example_proto_rawDescData -} - -var file_proto_hello_example_proto_enumTypes = make([]protoimpl.EnumInfo, 1) -var file_proto_hello_example_proto_msgTypes = make([]protoimpl.MessageInfo, 5) -var file_proto_hello_example_proto_goTypes = []interface{}{ - (Role)(0), // 0: hello.Role - (*User)(nil), // 1: hello.User - (*UserRole)(nil), // 2: hello.UserRole - (*UpdateUserRequest)(nil), // 3: hello.UpdateUserRequest - (*ListUsersRequest)(nil), // 4: hello.ListUsersRequest - nil, // 5: hello.UserRole.HeadersEntry - (*timestamppb.Timestamp)(nil), // 6: google.protobuf.Timestamp - (*structpb.ListValue)(nil), // 7: google.protobuf.ListValue - (*fieldmaskpb.FieldMask)(nil), // 8: google.protobuf.FieldMask - (*durationpb.Duration)(nil), // 9: google.protobuf.Duration - (*emptypb.Empty)(nil), // 10: google.protobuf.Empty -} -var file_proto_hello_example_proto_depIdxs = []int32{ - 0, // 0: hello.User.role:type_name -> hello.Role - 6, // 1: hello.User.create_date:type_name -> google.protobuf.Timestamp - 0, // 2: hello.UserRole.role:type_name -> hello.Role - 7, // 3: hello.UserRole.lists:type_name -> google.protobuf.ListValue - 5, // 4: hello.UserRole.headers:type_name -> hello.UserRole.HeadersEntry - 1, // 5: hello.UpdateUserRequest.user:type_name -> hello.User - 8, // 6: hello.UpdateUserRequest.update_mask:type_name -> google.protobuf.FieldMask - 6, // 7: hello.ListUsersRequest.created_since:type_name -> google.protobuf.Timestamp - 9, // 8: hello.ListUsersRequest.older_than:type_name -> google.protobuf.Duration - 7, // 9: hello.UserRole.HeadersEntry.value:type_name -> google.protobuf.ListValue - 1, // 10: hello.UserService.AddUser:input_type -> hello.User - 1, // 11: hello.UserService.GetUser:input_type -> hello.User - 4, // 12: hello.UserService.ListUsers:input_type -> hello.ListUsersRequest - 2, // 13: hello.UserService.ListUsersByRole:input_type -> hello.UserRole - 3, // 14: hello.UserService.UpdateUser:input_type -> hello.UpdateUserRequest - 10, // 15: hello.UserService.AddUser:output_type -> google.protobuf.Empty - 10, // 16: hello.UserService.GetUser:output_type -> google.protobuf.Empty - 1, // 17: hello.UserService.ListUsers:output_type -> hello.User - 1, // 18: hello.UserService.ListUsersByRole:output_type -> hello.User - 1, // 19: hello.UserService.UpdateUser:output_type -> hello.User - 15, // [15:20] is the sub-list for method output_type - 10, // [10:15] is the sub-list for method input_type - 10, // [10:10] is the sub-list for extension type_name - 10, // [10:10] is the sub-list for extension extendee - 0, // [0:10] is the sub-list for field type_name -} - -func init() { file_proto_hello_example_proto_init() } -func file_proto_hello_example_proto_init() { - if File_proto_hello_example_proto != nil { - return - } - if !protoimpl.UnsafeEnabled { - file_proto_hello_example_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*User); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_proto_hello_example_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*UserRole); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_proto_hello_example_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*UpdateUserRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_proto_hello_example_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ListUsersRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_proto_hello_example_proto_rawDesc, - NumEnums: 1, - NumMessages: 5, - NumExtensions: 0, - NumServices: 1, - }, - GoTypes: file_proto_hello_example_proto_goTypes, - DependencyIndexes: file_proto_hello_example_proto_depIdxs, - EnumInfos: file_proto_hello_example_proto_enumTypes, - MessageInfos: file_proto_hello_example_proto_msgTypes, - }.Build() - File_proto_hello_example_proto = out.File - file_proto_hello_example_proto_rawDesc = nil - file_proto_hello_example_proto_goTypes = nil - file_proto_hello_example_proto_depIdxs = nil -} diff --git a/example/protopb/hellopb/example_grpc.pb.go b/example/protopb/hellopb/example_grpc.pb.go deleted file mode 100644 index 8c7534356..000000000 --- a/example/protopb/hellopb/example_grpc.pb.go +++ /dev/null @@ -1,304 +0,0 @@ -// Code generated by protoc-gen-go-grpc. DO NOT EDIT. - -package hellopb - -import ( - context "context" - grpc "google.golang.org/grpc" - codes "google.golang.org/grpc/codes" - status "google.golang.org/grpc/status" - emptypb "google.golang.org/protobuf/types/known/emptypb" -) - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the grpc package it is being compiled against. -// Requires gRPC-Go v1.32.0 or later. -const _ = grpc.SupportPackageIsVersion7 - -// UserServiceClient is the client API for UserService service. -// -// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. -type UserServiceClient interface { - AddUser(ctx context.Context, in *User, opts ...grpc.CallOption) (*emptypb.Empty, error) - GetUser(ctx context.Context, in *User, opts ...grpc.CallOption) (*emptypb.Empty, error) - ListUsers(ctx context.Context, in *ListUsersRequest, opts ...grpc.CallOption) (UserService_ListUsersClient, error) - ListUsersByRole(ctx context.Context, opts ...grpc.CallOption) (UserService_ListUsersByRoleClient, error) - UpdateUser(ctx context.Context, in *UpdateUserRequest, opts ...grpc.CallOption) (*User, error) -} - -type userServiceClient struct { - cc grpc.ClientConnInterface -} - -func NewUserServiceClient(cc grpc.ClientConnInterface) UserServiceClient { - return &userServiceClient{cc} -} - -func (c *userServiceClient) AddUser(ctx context.Context, in *User, opts ...grpc.CallOption) (*emptypb.Empty, error) { - out := new(emptypb.Empty) - err := c.cc.Invoke(ctx, "/hello.UserService/AddUser", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *userServiceClient) GetUser(ctx context.Context, in *User, opts ...grpc.CallOption) (*emptypb.Empty, error) { - out := new(emptypb.Empty) - err := c.cc.Invoke(ctx, "/hello.UserService/GetUser", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *userServiceClient) ListUsers(ctx context.Context, in *ListUsersRequest, opts ...grpc.CallOption) (UserService_ListUsersClient, error) { - stream, err := c.cc.NewStream(ctx, &UserService_ServiceDesc.Streams[0], "/hello.UserService/ListUsers", opts...) - if err != nil { - return nil, err - } - x := &userServiceListUsersClient{stream} - if err := x.ClientStream.SendMsg(in); err != nil { - return nil, err - } - if err := x.ClientStream.CloseSend(); err != nil { - return nil, err - } - return x, nil -} - -type UserService_ListUsersClient interface { - Recv() (*User, error) - grpc.ClientStream -} - -type userServiceListUsersClient struct { - grpc.ClientStream -} - -func (x *userServiceListUsersClient) Recv() (*User, error) { - m := new(User) - if err := x.ClientStream.RecvMsg(m); err != nil { - return nil, err - } - return m, nil -} - -func (c *userServiceClient) ListUsersByRole(ctx context.Context, opts ...grpc.CallOption) (UserService_ListUsersByRoleClient, error) { - stream, err := c.cc.NewStream(ctx, &UserService_ServiceDesc.Streams[1], "/hello.UserService/ListUsersByRole", opts...) - if err != nil { - return nil, err - } - x := &userServiceListUsersByRoleClient{stream} - return x, nil -} - -type UserService_ListUsersByRoleClient interface { - Send(*UserRole) error - Recv() (*User, error) - grpc.ClientStream -} - -type userServiceListUsersByRoleClient struct { - grpc.ClientStream -} - -func (x *userServiceListUsersByRoleClient) Send(m *UserRole) error { - return x.ClientStream.SendMsg(m) -} - -func (x *userServiceListUsersByRoleClient) Recv() (*User, error) { - m := new(User) - if err := x.ClientStream.RecvMsg(m); err != nil { - return nil, err - } - return m, nil -} - -func (c *userServiceClient) UpdateUser(ctx context.Context, in *UpdateUserRequest, opts ...grpc.CallOption) (*User, error) { - out := new(User) - err := c.cc.Invoke(ctx, "/hello.UserService/UpdateUser", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -// UserServiceServer is the server API for UserService service. -// All implementations should embed UnimplementedUserServiceServer -// for forward compatibility -type UserServiceServer interface { - AddUser(context.Context, *User) (*emptypb.Empty, error) - GetUser(context.Context, *User) (*emptypb.Empty, error) - ListUsers(*ListUsersRequest, UserService_ListUsersServer) error - ListUsersByRole(UserService_ListUsersByRoleServer) error - UpdateUser(context.Context, *UpdateUserRequest) (*User, error) -} - -// UnimplementedUserServiceServer should be embedded to have forward compatible implementations. -type UnimplementedUserServiceServer struct { -} - -func (UnimplementedUserServiceServer) AddUser(context.Context, *User) (*emptypb.Empty, error) { - return nil, status.Errorf(codes.Unimplemented, "method AddUser not implemented") -} -func (UnimplementedUserServiceServer) GetUser(context.Context, *User) (*emptypb.Empty, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetUser not implemented") -} -func (UnimplementedUserServiceServer) ListUsers(*ListUsersRequest, UserService_ListUsersServer) error { - return status.Errorf(codes.Unimplemented, "method ListUsers not implemented") -} -func (UnimplementedUserServiceServer) ListUsersByRole(UserService_ListUsersByRoleServer) error { - return status.Errorf(codes.Unimplemented, "method ListUsersByRole not implemented") -} -func (UnimplementedUserServiceServer) UpdateUser(context.Context, *UpdateUserRequest) (*User, error) { - return nil, status.Errorf(codes.Unimplemented, "method UpdateUser not implemented") -} - -// UnsafeUserServiceServer may be embedded to opt out of forward compatibility for this service. -// Use of this interface is not recommended, as added methods to UserServiceServer will -// result in compilation errors. -type UnsafeUserServiceServer interface { - mustEmbedUnimplementedUserServiceServer() -} - -func RegisterUserServiceServer(s grpc.ServiceRegistrar, srv UserServiceServer) { - s.RegisterService(&UserService_ServiceDesc, srv) -} - -func _UserService_AddUser_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(User) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(UserServiceServer).AddUser(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/hello.UserService/AddUser", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(UserServiceServer).AddUser(ctx, req.(*User)) - } - return interceptor(ctx, in, info, handler) -} - -func _UserService_GetUser_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(User) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(UserServiceServer).GetUser(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/hello.UserService/GetUser", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(UserServiceServer).GetUser(ctx, req.(*User)) - } - return interceptor(ctx, in, info, handler) -} - -func _UserService_ListUsers_Handler(srv interface{}, stream grpc.ServerStream) error { - m := new(ListUsersRequest) - if err := stream.RecvMsg(m); err != nil { - return err - } - return srv.(UserServiceServer).ListUsers(m, &userServiceListUsersServer{stream}) -} - -type UserService_ListUsersServer interface { - Send(*User) error - grpc.ServerStream -} - -type userServiceListUsersServer struct { - grpc.ServerStream -} - -func (x *userServiceListUsersServer) Send(m *User) error { - return x.ServerStream.SendMsg(m) -} - -func _UserService_ListUsersByRole_Handler(srv interface{}, stream grpc.ServerStream) error { - return srv.(UserServiceServer).ListUsersByRole(&userServiceListUsersByRoleServer{stream}) -} - -type UserService_ListUsersByRoleServer interface { - Send(*User) error - Recv() (*UserRole, error) - grpc.ServerStream -} - -type userServiceListUsersByRoleServer struct { - grpc.ServerStream -} - -func (x *userServiceListUsersByRoleServer) Send(m *User) error { - return x.ServerStream.SendMsg(m) -} - -func (x *userServiceListUsersByRoleServer) Recv() (*UserRole, error) { - m := new(UserRole) - if err := x.ServerStream.RecvMsg(m); err != nil { - return nil, err - } - return m, nil -} - -func _UserService_UpdateUser_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(UpdateUserRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(UserServiceServer).UpdateUser(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/hello.UserService/UpdateUser", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(UserServiceServer).UpdateUser(ctx, req.(*UpdateUserRequest)) - } - return interceptor(ctx, in, info, handler) -} - -// UserService_ServiceDesc is the grpc.ServiceDesc for UserService service. -// It's only intended for direct use with grpc.RegisterService, -// and not to be introspected or modified (even as a copy) -var UserService_ServiceDesc = grpc.ServiceDesc{ - ServiceName: "hello.UserService", - HandlerType: (*UserServiceServer)(nil), - Methods: []grpc.MethodDesc{ - { - MethodName: "AddUser", - Handler: _UserService_AddUser_Handler, - }, - { - MethodName: "GetUser", - Handler: _UserService_GetUser_Handler, - }, - { - MethodName: "UpdateUser", - Handler: _UserService_UpdateUser_Handler, - }, - }, - Streams: []grpc.StreamDesc{ - { - StreamName: "ListUsers", - Handler: _UserService_ListUsers_Handler, - ServerStreams: true, - }, - { - StreamName: "ListUsersByRole", - Handler: _UserService_ListUsersByRole_Handler, - ServerStreams: true, - ClientStreams: true, - }, - }, - Metadata: "proto/hello/example.proto", -} diff --git a/example/protopb/hellopb/helloworld.pb.go b/example/protopb/hellopb/helloworld.pb.go deleted file mode 100644 index 6ef4b62d9..000000000 --- a/example/protopb/hellopb/helloworld.pb.go +++ /dev/null @@ -1,357 +0,0 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.28.0 -// protoc v3.19.4 -// source: proto/hello/helloworld.proto - -package hellopb - -import ( - _ "google.golang.org/genproto/googleapis/api/annotations" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - wrapperspb "google.golang.org/protobuf/types/known/wrapperspb" - reflect "reflect" - sync "sync" -) - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -type HelloRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` - StrVal *wrapperspb.StringValue `protobuf:"bytes,2,opt,name=strVal,proto3" json:"strVal,omitempty"` - FloatVal *wrapperspb.FloatValue `protobuf:"bytes,3,opt,name=floatVal,proto3" json:"floatVal,omitempty"` - DoubleVal *wrapperspb.DoubleValue `protobuf:"bytes,4,opt,name=doubleVal,proto3" json:"doubleVal,omitempty"` - BoolVal *wrapperspb.BoolValue `protobuf:"bytes,5,opt,name=boolVal,proto3" json:"boolVal,omitempty"` - BytesVal *wrapperspb.BytesValue `protobuf:"bytes,6,opt,name=bytesVal,proto3" json:"bytesVal,omitempty"` - Int32Val *wrapperspb.Int32Value `protobuf:"bytes,7,opt,name=int32Val,proto3" json:"int32Val,omitempty"` - Uint32Val *wrapperspb.UInt32Value `protobuf:"bytes,8,opt,name=uint32Val,proto3" json:"uint32Val,omitempty"` - Int64Val *wrapperspb.Int64Value `protobuf:"bytes,9,opt,name=int64Val,proto3" json:"int64Val,omitempty"` - Uint64Val *wrapperspb.UInt64Value `protobuf:"bytes,10,opt,name=uint64Val,proto3" json:"uint64Val,omitempty"` -} - -func (x *HelloRequest) Reset() { - *x = HelloRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_proto_hello_helloworld_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *HelloRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*HelloRequest) ProtoMessage() {} - -func (x *HelloRequest) ProtoReflect() protoreflect.Message { - mi := &file_proto_hello_helloworld_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use HelloRequest.ProtoReflect.Descriptor instead. -func (*HelloRequest) Descriptor() ([]byte, []int) { - return file_proto_hello_helloworld_proto_rawDescGZIP(), []int{0} -} - -func (x *HelloRequest) GetName() string { - if x != nil { - return x.Name - } - return "" -} - -func (x *HelloRequest) GetStrVal() *wrapperspb.StringValue { - if x != nil { - return x.StrVal - } - return nil -} - -func (x *HelloRequest) GetFloatVal() *wrapperspb.FloatValue { - if x != nil { - return x.FloatVal - } - return nil -} - -func (x *HelloRequest) GetDoubleVal() *wrapperspb.DoubleValue { - if x != nil { - return x.DoubleVal - } - return nil -} - -func (x *HelloRequest) GetBoolVal() *wrapperspb.BoolValue { - if x != nil { - return x.BoolVal - } - return nil -} - -func (x *HelloRequest) GetBytesVal() *wrapperspb.BytesValue { - if x != nil { - return x.BytesVal - } - return nil -} - -func (x *HelloRequest) GetInt32Val() *wrapperspb.Int32Value { - if x != nil { - return x.Int32Val - } - return nil -} - -func (x *HelloRequest) GetUint32Val() *wrapperspb.UInt32Value { - if x != nil { - return x.Uint32Val - } - return nil -} - -func (x *HelloRequest) GetInt64Val() *wrapperspb.Int64Value { - if x != nil { - return x.Int64Val - } - return nil -} - -func (x *HelloRequest) GetUint64Val() *wrapperspb.UInt64Value { - if x != nil { - return x.Uint64Val - } - return nil -} - -type HelloReply struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Message string `protobuf:"bytes,1,opt,name=message,proto3" json:"message,omitempty"` -} - -func (x *HelloReply) Reset() { - *x = HelloReply{} - if protoimpl.UnsafeEnabled { - mi := &file_proto_hello_helloworld_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *HelloReply) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*HelloReply) ProtoMessage() {} - -func (x *HelloReply) ProtoReflect() protoreflect.Message { - mi := &file_proto_hello_helloworld_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use HelloReply.ProtoReflect.Descriptor instead. -func (*HelloReply) Descriptor() ([]byte, []int) { - return file_proto_hello_helloworld_proto_rawDescGZIP(), []int{1} -} - -func (x *HelloReply) GetMessage() string { - if x != nil { - return x.Message - } - return "" -} - -var File_proto_hello_helloworld_proto protoreflect.FileDescriptor - -var file_proto_hello_helloworld_proto_rawDesc = []byte{ - 0x0a, 0x1c, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x68, 0x65, 0x6c, 0x6c, 0x6f, 0x2f, 0x68, 0x65, - 0x6c, 0x6c, 0x6f, 0x77, 0x6f, 0x72, 0x6c, 0x64, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x05, - 0x68, 0x65, 0x6c, 0x6c, 0x6f, 0x1a, 0x1c, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, - 0x69, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x1a, 0x1e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x77, 0x72, 0x61, 0x70, 0x70, 0x65, 0x72, 0x73, 0x2e, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x22, 0xa6, 0x04, 0x0a, 0x0c, 0x48, 0x65, 0x6c, 0x6c, 0x6f, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x34, 0x0a, 0x06, 0x73, 0x74, 0x72, 0x56, - 0x61, 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, - 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, 0x74, 0x72, 0x69, 0x6e, - 0x67, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x06, 0x73, 0x74, 0x72, 0x56, 0x61, 0x6c, 0x12, 0x37, - 0x0a, 0x08, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x56, 0x61, 0x6c, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x1b, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, - 0x75, 0x66, 0x2e, 0x46, 0x6c, 0x6f, 0x61, 0x74, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x08, 0x66, - 0x6c, 0x6f, 0x61, 0x74, 0x56, 0x61, 0x6c, 0x12, 0x3a, 0x0a, 0x09, 0x64, 0x6f, 0x75, 0x62, 0x6c, - 0x65, 0x56, 0x61, 0x6c, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, - 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x6f, 0x75, - 0x62, 0x6c, 0x65, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x09, 0x64, 0x6f, 0x75, 0x62, 0x6c, 0x65, - 0x56, 0x61, 0x6c, 0x12, 0x34, 0x0a, 0x07, 0x62, 0x6f, 0x6f, 0x6c, 0x56, 0x61, 0x6c, 0x18, 0x05, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x42, 0x6f, 0x6f, 0x6c, 0x56, 0x61, 0x6c, 0x75, 0x65, - 0x52, 0x07, 0x62, 0x6f, 0x6f, 0x6c, 0x56, 0x61, 0x6c, 0x12, 0x37, 0x0a, 0x08, 0x62, 0x79, 0x74, - 0x65, 0x73, 0x56, 0x61, 0x6c, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x67, 0x6f, - 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x42, 0x79, - 0x74, 0x65, 0x73, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x08, 0x62, 0x79, 0x74, 0x65, 0x73, 0x56, - 0x61, 0x6c, 0x12, 0x37, 0x0a, 0x08, 0x69, 0x6e, 0x74, 0x33, 0x32, 0x56, 0x61, 0x6c, 0x18, 0x07, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x49, 0x6e, 0x74, 0x33, 0x32, 0x56, 0x61, 0x6c, 0x75, - 0x65, 0x52, 0x08, 0x69, 0x6e, 0x74, 0x33, 0x32, 0x56, 0x61, 0x6c, 0x12, 0x3a, 0x0a, 0x09, 0x75, - 0x69, 0x6e, 0x74, 0x33, 0x32, 0x56, 0x61, 0x6c, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, - 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, - 0x2e, 0x55, 0x49, 0x6e, 0x74, 0x33, 0x32, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x09, 0x75, 0x69, - 0x6e, 0x74, 0x33, 0x32, 0x56, 0x61, 0x6c, 0x12, 0x37, 0x0a, 0x08, 0x69, 0x6e, 0x74, 0x36, 0x34, - 0x56, 0x61, 0x6c, 0x18, 0x09, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x67, 0x6f, 0x6f, 0x67, - 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x49, 0x6e, 0x74, 0x36, - 0x34, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x08, 0x69, 0x6e, 0x74, 0x36, 0x34, 0x56, 0x61, 0x6c, - 0x12, 0x3a, 0x0a, 0x09, 0x75, 0x69, 0x6e, 0x74, 0x36, 0x34, 0x56, 0x61, 0x6c, 0x18, 0x0a, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x55, 0x49, 0x6e, 0x74, 0x36, 0x34, 0x56, 0x61, 0x6c, 0x75, - 0x65, 0x52, 0x09, 0x75, 0x69, 0x6e, 0x74, 0x36, 0x34, 0x56, 0x61, 0x6c, 0x22, 0x26, 0x0a, 0x0a, - 0x48, 0x65, 0x6c, 0x6c, 0x6f, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x12, 0x18, 0x0a, 0x07, 0x6d, 0x65, - 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6d, 0x65, 0x73, - 0x73, 0x61, 0x67, 0x65, 0x32, 0xd1, 0x02, 0x0a, 0x07, 0x47, 0x72, 0x65, 0x65, 0x74, 0x65, 0x72, - 0x12, 0xc5, 0x02, 0x0a, 0x08, 0x53, 0x61, 0x79, 0x48, 0x65, 0x6c, 0x6c, 0x6f, 0x12, 0x13, 0x2e, - 0x68, 0x65, 0x6c, 0x6c, 0x6f, 0x2e, 0x48, 0x65, 0x6c, 0x6c, 0x6f, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x1a, 0x11, 0x2e, 0x68, 0x65, 0x6c, 0x6c, 0x6f, 0x2e, 0x48, 0x65, 0x6c, 0x6c, 0x6f, - 0x52, 0x65, 0x70, 0x6c, 0x79, 0x22, 0x90, 0x02, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x89, 0x02, 0x12, - 0x0b, 0x2f, 0x73, 0x61, 0x79, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x7d, 0x5a, 0x16, 0x12, 0x14, - 0x2f, 0x73, 0x61, 0x79, 0x2f, 0x73, 0x74, 0x72, 0x76, 0x61, 0x6c, 0x2f, 0x7b, 0x73, 0x74, 0x72, - 0x56, 0x61, 0x6c, 0x7d, 0x5a, 0x1a, 0x12, 0x18, 0x2f, 0x73, 0x61, 0x79, 0x2f, 0x66, 0x6c, 0x6f, - 0x61, 0x74, 0x76, 0x61, 0x6c, 0x2f, 0x7b, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x56, 0x61, 0x6c, 0x7d, - 0x5a, 0x1c, 0x12, 0x1a, 0x2f, 0x73, 0x61, 0x79, 0x2f, 0x64, 0x6f, 0x75, 0x62, 0x6c, 0x65, 0x76, - 0x61, 0x6c, 0x2f, 0x7b, 0x64, 0x6f, 0x75, 0x62, 0x6c, 0x65, 0x56, 0x61, 0x6c, 0x7d, 0x5a, 0x18, - 0x12, 0x16, 0x2f, 0x73, 0x61, 0x79, 0x2f, 0x62, 0x6f, 0x6f, 0x6c, 0x76, 0x61, 0x6c, 0x2f, 0x7b, - 0x62, 0x6f, 0x6f, 0x6c, 0x56, 0x61, 0x6c, 0x7d, 0x5a, 0x1a, 0x12, 0x18, 0x2f, 0x73, 0x61, 0x79, - 0x2f, 0x62, 0x79, 0x74, 0x65, 0x73, 0x76, 0x61, 0x6c, 0x2f, 0x7b, 0x62, 0x79, 0x74, 0x65, 0x73, - 0x56, 0x61, 0x6c, 0x7d, 0x5a, 0x1a, 0x12, 0x18, 0x2f, 0x73, 0x61, 0x79, 0x2f, 0x69, 0x6e, 0x74, - 0x33, 0x32, 0x76, 0x61, 0x6c, 0x2f, 0x7b, 0x69, 0x6e, 0x74, 0x33, 0x32, 0x56, 0x61, 0x6c, 0x7d, - 0x5a, 0x1c, 0x12, 0x1a, 0x2f, 0x73, 0x61, 0x79, 0x2f, 0x75, 0x69, 0x6e, 0x74, 0x33, 0x32, 0x76, - 0x61, 0x6c, 0x2f, 0x7b, 0x75, 0x69, 0x6e, 0x74, 0x33, 0x32, 0x56, 0x61, 0x6c, 0x7d, 0x5a, 0x1a, - 0x12, 0x18, 0x2f, 0x73, 0x61, 0x79, 0x2f, 0x69, 0x6e, 0x74, 0x36, 0x34, 0x76, 0x61, 0x6c, 0x2f, - 0x7b, 0x69, 0x6e, 0x74, 0x36, 0x34, 0x56, 0x61, 0x6c, 0x7d, 0x5a, 0x1c, 0x12, 0x1a, 0x2f, 0x73, - 0x61, 0x79, 0x2f, 0x75, 0x69, 0x6e, 0x74, 0x36, 0x34, 0x76, 0x61, 0x6c, 0x2f, 0x7b, 0x75, 0x69, - 0x6e, 0x74, 0x36, 0x34, 0x56, 0x61, 0x6c, 0x7d, 0x42, 0x13, 0x5a, 0x11, 0x2e, 0x2f, 0x68, 0x65, - 0x6c, 0x6c, 0x6f, 0x70, 0x62, 0x3b, 0x68, 0x65, 0x6c, 0x6c, 0x6f, 0x70, 0x62, 0x62, 0x06, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x33, -} - -var ( - file_proto_hello_helloworld_proto_rawDescOnce sync.Once - file_proto_hello_helloworld_proto_rawDescData = file_proto_hello_helloworld_proto_rawDesc -) - -func file_proto_hello_helloworld_proto_rawDescGZIP() []byte { - file_proto_hello_helloworld_proto_rawDescOnce.Do(func() { - file_proto_hello_helloworld_proto_rawDescData = protoimpl.X.CompressGZIP(file_proto_hello_helloworld_proto_rawDescData) - }) - return file_proto_hello_helloworld_proto_rawDescData -} - -var file_proto_hello_helloworld_proto_msgTypes = make([]protoimpl.MessageInfo, 2) -var file_proto_hello_helloworld_proto_goTypes = []interface{}{ - (*HelloRequest)(nil), // 0: hello.HelloRequest - (*HelloReply)(nil), // 1: hello.HelloReply - (*wrapperspb.StringValue)(nil), // 2: google.protobuf.StringValue - (*wrapperspb.FloatValue)(nil), // 3: google.protobuf.FloatValue - (*wrapperspb.DoubleValue)(nil), // 4: google.protobuf.DoubleValue - (*wrapperspb.BoolValue)(nil), // 5: google.protobuf.BoolValue - (*wrapperspb.BytesValue)(nil), // 6: google.protobuf.BytesValue - (*wrapperspb.Int32Value)(nil), // 7: google.protobuf.Int32Value - (*wrapperspb.UInt32Value)(nil), // 8: google.protobuf.UInt32Value - (*wrapperspb.Int64Value)(nil), // 9: google.protobuf.Int64Value - (*wrapperspb.UInt64Value)(nil), // 10: google.protobuf.UInt64Value -} -var file_proto_hello_helloworld_proto_depIdxs = []int32{ - 2, // 0: hello.HelloRequest.strVal:type_name -> google.protobuf.StringValue - 3, // 1: hello.HelloRequest.floatVal:type_name -> google.protobuf.FloatValue - 4, // 2: hello.HelloRequest.doubleVal:type_name -> google.protobuf.DoubleValue - 5, // 3: hello.HelloRequest.boolVal:type_name -> google.protobuf.BoolValue - 6, // 4: hello.HelloRequest.bytesVal:type_name -> google.protobuf.BytesValue - 7, // 5: hello.HelloRequest.int32Val:type_name -> google.protobuf.Int32Value - 8, // 6: hello.HelloRequest.uint32Val:type_name -> google.protobuf.UInt32Value - 9, // 7: hello.HelloRequest.int64Val:type_name -> google.protobuf.Int64Value - 10, // 8: hello.HelloRequest.uint64Val:type_name -> google.protobuf.UInt64Value - 0, // 9: hello.Greeter.SayHello:input_type -> hello.HelloRequest - 1, // 10: hello.Greeter.SayHello:output_type -> hello.HelloReply - 10, // [10:11] is the sub-list for method output_type - 9, // [9:10] is the sub-list for method input_type - 9, // [9:9] is the sub-list for extension type_name - 9, // [9:9] is the sub-list for extension extendee - 0, // [0:9] is the sub-list for field type_name -} - -func init() { file_proto_hello_helloworld_proto_init() } -func file_proto_hello_helloworld_proto_init() { - if File_proto_hello_helloworld_proto != nil { - return - } - if !protoimpl.UnsafeEnabled { - file_proto_hello_helloworld_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*HelloRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_proto_hello_helloworld_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*HelloReply); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_proto_hello_helloworld_proto_rawDesc, - NumEnums: 0, - NumMessages: 2, - NumExtensions: 0, - NumServices: 1, - }, - GoTypes: file_proto_hello_helloworld_proto_goTypes, - DependencyIndexes: file_proto_hello_helloworld_proto_depIdxs, - MessageInfos: file_proto_hello_helloworld_proto_msgTypes, - }.Build() - File_proto_hello_helloworld_proto = out.File - file_proto_hello_helloworld_proto_rawDesc = nil - file_proto_hello_helloworld_proto_goTypes = nil - file_proto_hello_helloworld_proto_depIdxs = nil -} diff --git a/example/protopb/hellopb/helloworld_grpc.pb.go b/example/protopb/hellopb/helloworld_grpc.pb.go deleted file mode 100644 index 7183b763d..000000000 --- a/example/protopb/hellopb/helloworld_grpc.pb.go +++ /dev/null @@ -1,99 +0,0 @@ -// Code generated by protoc-gen-go-grpc. DO NOT EDIT. - -package hellopb - -import ( - context "context" - grpc "google.golang.org/grpc" - codes "google.golang.org/grpc/codes" - status "google.golang.org/grpc/status" -) - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the grpc package it is being compiled against. -// Requires gRPC-Go v1.32.0 or later. -const _ = grpc.SupportPackageIsVersion7 - -// GreeterClient is the client API for Greeter service. -// -// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. -type GreeterClient interface { - SayHello(ctx context.Context, in *HelloRequest, opts ...grpc.CallOption) (*HelloReply, error) -} - -type greeterClient struct { - cc grpc.ClientConnInterface -} - -func NewGreeterClient(cc grpc.ClientConnInterface) GreeterClient { - return &greeterClient{cc} -} - -func (c *greeterClient) SayHello(ctx context.Context, in *HelloRequest, opts ...grpc.CallOption) (*HelloReply, error) { - out := new(HelloReply) - err := c.cc.Invoke(ctx, "/hello.Greeter/SayHello", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -// GreeterServer is the server API for Greeter service. -// All implementations should embed UnimplementedGreeterServer -// for forward compatibility -type GreeterServer interface { - SayHello(context.Context, *HelloRequest) (*HelloReply, error) -} - -// UnimplementedGreeterServer should be embedded to have forward compatible implementations. -type UnimplementedGreeterServer struct { -} - -func (UnimplementedGreeterServer) SayHello(context.Context, *HelloRequest) (*HelloReply, error) { - return nil, status.Errorf(codes.Unimplemented, "method SayHello not implemented") -} - -// UnsafeGreeterServer may be embedded to opt out of forward compatibility for this service. -// Use of this interface is not recommended, as added methods to GreeterServer will -// result in compilation errors. -type UnsafeGreeterServer interface { - mustEmbedUnimplementedGreeterServer() -} - -func RegisterGreeterServer(s grpc.ServiceRegistrar, srv GreeterServer) { - s.RegisterService(&Greeter_ServiceDesc, srv) -} - -func _Greeter_SayHello_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(HelloRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(GreeterServer).SayHello(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/hello.Greeter/SayHello", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(GreeterServer).SayHello(ctx, req.(*HelloRequest)) - } - return interceptor(ctx, in, info, handler) -} - -// Greeter_ServiceDesc is the grpc.ServiceDesc for Greeter service. -// It's only intended for direct use with grpc.RegisterService, -// and not to be introspected or modified (even as a copy) -var Greeter_ServiceDesc = grpc.ServiceDesc{ - ServiceName: "hello.Greeter", - HandlerType: (*GreeterServer)(nil), - Methods: []grpc.MethodDesc{ - { - MethodName: "SayHello", - Handler: _Greeter_SayHello_Handler, - }, - }, - Streams: []grpc.StreamDesc{}, - Metadata: "proto/hello/helloworld.proto", -} diff --git a/example/protopb/hellopb/proto3.pb.go b/example/protopb/hellopb/proto3.pb.go deleted file mode 100644 index ee3f77991..000000000 --- a/example/protopb/hellopb/proto3.pb.go +++ /dev/null @@ -1,854 +0,0 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.28.0 -// protoc v3.19.4 -// source: proto/hello/proto3.proto - -package hellopb - -import ( - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - anypb "google.golang.org/protobuf/types/known/anypb" - durationpb "google.golang.org/protobuf/types/known/durationpb" - fieldmaskpb "google.golang.org/protobuf/types/known/fieldmaskpb" - timestamppb "google.golang.org/protobuf/types/known/timestamppb" - wrapperspb "google.golang.org/protobuf/types/known/wrapperspb" - reflect "reflect" - sync "sync" -) - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -type EnumValue int32 - -const ( - EnumValue_X EnumValue = 0 - EnumValue_Y EnumValue = 1 - EnumValue_Z EnumValue = 2 -) - -// Enum value maps for EnumValue. -var ( - EnumValue_name = map[int32]string{ - 0: "X", - 1: "Y", - 2: "Z", - } - EnumValue_value = map[string]int32{ - "X": 0, - "Y": 1, - "Z": 2, - } -) - -func (x EnumValue) Enum() *EnumValue { - p := new(EnumValue) - *p = x - return p -} - -func (x EnumValue) String() string { - return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) -} - -func (EnumValue) Descriptor() protoreflect.EnumDescriptor { - return file_proto_hello_proto3_proto_enumTypes[0].Descriptor() -} - -func (EnumValue) Type() protoreflect.EnumType { - return &file_proto_hello_proto3_proto_enumTypes[0] -} - -func (x EnumValue) Number() protoreflect.EnumNumber { - return protoreflect.EnumNumber(x) -} - -// Deprecated: Use EnumValue.Descriptor instead. -func (EnumValue) EnumDescriptor() ([]byte, []int) { - return file_proto_hello_proto3_proto_rawDescGZIP(), []int{0} -} - -type Proto3Message struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Next number: 46 - Nested *Proto3Message `protobuf:"bytes,41,opt,name=nested,proto3" json:"nested,omitempty"` - FloatValue float32 `protobuf:"fixed32,42,opt,name=float_value,json=floatValue,proto3" json:"float_value,omitempty"` - DoubleValue float64 `protobuf:"fixed64,43,opt,name=double_value,json=doubleValue,proto3" json:"double_value,omitempty"` - Int64Value int64 `protobuf:"varint,3,opt,name=int64_value,json=int64Value,proto3" json:"int64_value,omitempty"` - Int32Value int32 `protobuf:"varint,4,opt,name=int32_value,json=int32Value,proto3" json:"int32_value,omitempty"` - Uint64Value uint64 `protobuf:"varint,5,opt,name=uint64_value,json=uint64Value,proto3" json:"uint64_value,omitempty"` - Uint32Value uint32 `protobuf:"varint,6,opt,name=uint32_value,json=uint32Value,proto3" json:"uint32_value,omitempty"` - BoolValue bool `protobuf:"varint,7,opt,name=bool_value,json=boolValue,proto3" json:"bool_value,omitempty"` - StringValue string `protobuf:"bytes,8,opt,name=string_value,json=stringValue,proto3" json:"string_value,omitempty"` - BytesValue []byte `protobuf:"bytes,9,opt,name=bytes_value,json=bytesValue,proto3" json:"bytes_value,omitempty"` - RepeatedValue []string `protobuf:"bytes,10,rep,name=repeated_value,json=repeatedValue,proto3" json:"repeated_value,omitempty"` - RepeatedMessage []*wrapperspb.UInt64Value `protobuf:"bytes,44,rep,name=repeated_message,json=repeatedMessage,proto3" json:"repeated_message,omitempty"` - EnumValue EnumValue `protobuf:"varint,11,opt,name=enum_value,json=enumValue,proto3,enum=hello.EnumValue" json:"enum_value,omitempty"` - RepeatedEnum []EnumValue `protobuf:"varint,12,rep,packed,name=repeated_enum,json=repeatedEnum,proto3,enum=hello.EnumValue" json:"repeated_enum,omitempty"` - TimestampValue *timestamppb.Timestamp `protobuf:"bytes,13,opt,name=timestamp_value,json=timestampValue,proto3" json:"timestamp_value,omitempty"` - DurationValue *durationpb.Duration `protobuf:"bytes,14,opt,name=duration_value,json=durationValue,proto3" json:"duration_value,omitempty"` - FieldmaskValue *fieldmaskpb.FieldMask `protobuf:"bytes,15,opt,name=fieldmask_value,json=fieldmaskValue,proto3" json:"fieldmask_value,omitempty"` - // Types that are assignable to OneofValue: - // *Proto3Message_OneofBoolValue - // *Proto3Message_OneofStringValue - OneofValue isProto3Message_OneofValue `protobuf_oneof:"oneof_value"` - WrapperDoubleValue *wrapperspb.DoubleValue `protobuf:"bytes,17,opt,name=wrapper_double_value,json=wrapperDoubleValue,proto3" json:"wrapper_double_value,omitempty"` - WrapperFloatValue *wrapperspb.FloatValue `protobuf:"bytes,18,opt,name=wrapper_float_value,json=wrapperFloatValue,proto3" json:"wrapper_float_value,omitempty"` - WrapperInt64Value *wrapperspb.Int64Value `protobuf:"bytes,19,opt,name=wrapper_int64_value,json=wrapperInt64Value,proto3" json:"wrapper_int64_value,omitempty"` - WrapperInt32Value *wrapperspb.Int32Value `protobuf:"bytes,20,opt,name=wrapper_int32_value,json=wrapperInt32Value,proto3" json:"wrapper_int32_value,omitempty"` - WrapperUInt64Value *wrapperspb.UInt64Value `protobuf:"bytes,21,opt,name=wrapper_u_int64_value,json=wrapperUInt64Value,proto3" json:"wrapper_u_int64_value,omitempty"` - WrapperUInt32Value *wrapperspb.UInt32Value `protobuf:"bytes,22,opt,name=wrapper_u_int32_value,json=wrapperUInt32Value,proto3" json:"wrapper_u_int32_value,omitempty"` - WrapperBoolValue *wrapperspb.BoolValue `protobuf:"bytes,23,opt,name=wrapper_bool_value,json=wrapperBoolValue,proto3" json:"wrapper_bool_value,omitempty"` - WrapperStringValue *wrapperspb.StringValue `protobuf:"bytes,24,opt,name=wrapper_string_value,json=wrapperStringValue,proto3" json:"wrapper_string_value,omitempty"` - WrapperBytesValue *wrapperspb.BytesValue `protobuf:"bytes,25,opt,name=wrapper_bytes_value,json=wrapperBytesValue,proto3" json:"wrapper_bytes_value,omitempty"` - MapValue map[string]string `protobuf:"bytes,26,rep,name=map_value,json=mapValue,proto3" json:"map_value,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` - MapValue2 map[string]int32 `protobuf:"bytes,27,rep,name=map_value2,json=mapValue2,proto3" json:"map_value2,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"` - MapValue3 map[int32]string `protobuf:"bytes,28,rep,name=map_value3,json=mapValue3,proto3" json:"map_value3,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` - MapValue4 map[string]int64 `protobuf:"bytes,29,rep,name=map_value4,json=mapValue4,proto3" json:"map_value4,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"` - MapValue5 map[int64]string `protobuf:"bytes,30,rep,name=map_value5,json=mapValue5,proto3" json:"map_value5,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` - MapValue6 map[string]uint32 `protobuf:"bytes,31,rep,name=map_value6,json=mapValue6,proto3" json:"map_value6,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"` - MapValue7 map[uint32]string `protobuf:"bytes,32,rep,name=map_value7,json=mapValue7,proto3" json:"map_value7,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` - MapValue8 map[string]uint64 `protobuf:"bytes,33,rep,name=map_value8,json=mapValue8,proto3" json:"map_value8,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"` - MapValue9 map[uint64]string `protobuf:"bytes,34,rep,name=map_value9,json=mapValue9,proto3" json:"map_value9,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` - MapValue10 map[string]float32 `protobuf:"bytes,35,rep,name=map_value10,json=mapValue10,proto3" json:"map_value10,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"fixed32,2,opt,name=value,proto3"` - MapValue12 map[string]float64 `protobuf:"bytes,37,rep,name=map_value12,json=mapValue12,proto3" json:"map_value12,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"fixed64,2,opt,name=value,proto3"` - MapValue14 map[string]bool `protobuf:"bytes,39,rep,name=map_value14,json=mapValue14,proto3" json:"map_value14,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"` - MapValue15 map[bool]string `protobuf:"bytes,40,rep,name=map_value15,json=mapValue15,proto3" json:"map_value15,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` - MapValue16 map[string]*wrapperspb.UInt64Value `protobuf:"bytes,45,rep,name=map_value16,json=mapValue16,proto3" json:"map_value16,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` - Details []*anypb.Any `protobuf:"bytes,46,rep,name=details,proto3" json:"details,omitempty"` -} - -func (x *Proto3Message) Reset() { - *x = Proto3Message{} - if protoimpl.UnsafeEnabled { - mi := &file_proto_hello_proto3_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Proto3Message) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Proto3Message) ProtoMessage() {} - -func (x *Proto3Message) ProtoReflect() protoreflect.Message { - mi := &file_proto_hello_proto3_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use Proto3Message.ProtoReflect.Descriptor instead. -func (*Proto3Message) Descriptor() ([]byte, []int) { - return file_proto_hello_proto3_proto_rawDescGZIP(), []int{0} -} - -func (x *Proto3Message) GetNested() *Proto3Message { - if x != nil { - return x.Nested - } - return nil -} - -func (x *Proto3Message) GetFloatValue() float32 { - if x != nil { - return x.FloatValue - } - return 0 -} - -func (x *Proto3Message) GetDoubleValue() float64 { - if x != nil { - return x.DoubleValue - } - return 0 -} - -func (x *Proto3Message) GetInt64Value() int64 { - if x != nil { - return x.Int64Value - } - return 0 -} - -func (x *Proto3Message) GetInt32Value() int32 { - if x != nil { - return x.Int32Value - } - return 0 -} - -func (x *Proto3Message) GetUint64Value() uint64 { - if x != nil { - return x.Uint64Value - } - return 0 -} - -func (x *Proto3Message) GetUint32Value() uint32 { - if x != nil { - return x.Uint32Value - } - return 0 -} - -func (x *Proto3Message) GetBoolValue() bool { - if x != nil { - return x.BoolValue - } - return false -} - -func (x *Proto3Message) GetStringValue() string { - if x != nil { - return x.StringValue - } - return "" -} - -func (x *Proto3Message) GetBytesValue() []byte { - if x != nil { - return x.BytesValue - } - return nil -} - -func (x *Proto3Message) GetRepeatedValue() []string { - if x != nil { - return x.RepeatedValue - } - return nil -} - -func (x *Proto3Message) GetRepeatedMessage() []*wrapperspb.UInt64Value { - if x != nil { - return x.RepeatedMessage - } - return nil -} - -func (x *Proto3Message) GetEnumValue() EnumValue { - if x != nil { - return x.EnumValue - } - return EnumValue_X -} - -func (x *Proto3Message) GetRepeatedEnum() []EnumValue { - if x != nil { - return x.RepeatedEnum - } - return nil -} - -func (x *Proto3Message) GetTimestampValue() *timestamppb.Timestamp { - if x != nil { - return x.TimestampValue - } - return nil -} - -func (x *Proto3Message) GetDurationValue() *durationpb.Duration { - if x != nil { - return x.DurationValue - } - return nil -} - -func (x *Proto3Message) GetFieldmaskValue() *fieldmaskpb.FieldMask { - if x != nil { - return x.FieldmaskValue - } - return nil -} - -func (m *Proto3Message) GetOneofValue() isProto3Message_OneofValue { - if m != nil { - return m.OneofValue - } - return nil -} - -func (x *Proto3Message) GetOneofBoolValue() bool { - if x, ok := x.GetOneofValue().(*Proto3Message_OneofBoolValue); ok { - return x.OneofBoolValue - } - return false -} - -func (x *Proto3Message) GetOneofStringValue() string { - if x, ok := x.GetOneofValue().(*Proto3Message_OneofStringValue); ok { - return x.OneofStringValue - } - return "" -} - -func (x *Proto3Message) GetWrapperDoubleValue() *wrapperspb.DoubleValue { - if x != nil { - return x.WrapperDoubleValue - } - return nil -} - -func (x *Proto3Message) GetWrapperFloatValue() *wrapperspb.FloatValue { - if x != nil { - return x.WrapperFloatValue - } - return nil -} - -func (x *Proto3Message) GetWrapperInt64Value() *wrapperspb.Int64Value { - if x != nil { - return x.WrapperInt64Value - } - return nil -} - -func (x *Proto3Message) GetWrapperInt32Value() *wrapperspb.Int32Value { - if x != nil { - return x.WrapperInt32Value - } - return nil -} - -func (x *Proto3Message) GetWrapperUInt64Value() *wrapperspb.UInt64Value { - if x != nil { - return x.WrapperUInt64Value - } - return nil -} - -func (x *Proto3Message) GetWrapperUInt32Value() *wrapperspb.UInt32Value { - if x != nil { - return x.WrapperUInt32Value - } - return nil -} - -func (x *Proto3Message) GetWrapperBoolValue() *wrapperspb.BoolValue { - if x != nil { - return x.WrapperBoolValue - } - return nil -} - -func (x *Proto3Message) GetWrapperStringValue() *wrapperspb.StringValue { - if x != nil { - return x.WrapperStringValue - } - return nil -} - -func (x *Proto3Message) GetWrapperBytesValue() *wrapperspb.BytesValue { - if x != nil { - return x.WrapperBytesValue - } - return nil -} - -func (x *Proto3Message) GetMapValue() map[string]string { - if x != nil { - return x.MapValue - } - return nil -} - -func (x *Proto3Message) GetMapValue2() map[string]int32 { - if x != nil { - return x.MapValue2 - } - return nil -} - -func (x *Proto3Message) GetMapValue3() map[int32]string { - if x != nil { - return x.MapValue3 - } - return nil -} - -func (x *Proto3Message) GetMapValue4() map[string]int64 { - if x != nil { - return x.MapValue4 - } - return nil -} - -func (x *Proto3Message) GetMapValue5() map[int64]string { - if x != nil { - return x.MapValue5 - } - return nil -} - -func (x *Proto3Message) GetMapValue6() map[string]uint32 { - if x != nil { - return x.MapValue6 - } - return nil -} - -func (x *Proto3Message) GetMapValue7() map[uint32]string { - if x != nil { - return x.MapValue7 - } - return nil -} - -func (x *Proto3Message) GetMapValue8() map[string]uint64 { - if x != nil { - return x.MapValue8 - } - return nil -} - -func (x *Proto3Message) GetMapValue9() map[uint64]string { - if x != nil { - return x.MapValue9 - } - return nil -} - -func (x *Proto3Message) GetMapValue10() map[string]float32 { - if x != nil { - return x.MapValue10 - } - return nil -} - -func (x *Proto3Message) GetMapValue12() map[string]float64 { - if x != nil { - return x.MapValue12 - } - return nil -} - -func (x *Proto3Message) GetMapValue14() map[string]bool { - if x != nil { - return x.MapValue14 - } - return nil -} - -func (x *Proto3Message) GetMapValue15() map[bool]string { - if x != nil { - return x.MapValue15 - } - return nil -} - -func (x *Proto3Message) GetMapValue16() map[string]*wrapperspb.UInt64Value { - if x != nil { - return x.MapValue16 - } - return nil -} - -func (x *Proto3Message) GetDetails() []*anypb.Any { - if x != nil { - return x.Details - } - return nil -} - -type isProto3Message_OneofValue interface { - isProto3Message_OneofValue() -} - -type Proto3Message_OneofBoolValue struct { - OneofBoolValue bool `protobuf:"varint,1,opt,name=oneof_bool_value,json=oneofBoolValue,proto3,oneof"` -} - -type Proto3Message_OneofStringValue struct { - OneofStringValue string `protobuf:"bytes,2,opt,name=oneof_string_value,json=oneofStringValue,proto3,oneof"` -} - -func (*Proto3Message_OneofBoolValue) isProto3Message_OneofValue() {} - -func (*Proto3Message_OneofStringValue) isProto3Message_OneofValue() {} - -var File_proto_hello_proto3_proto protoreflect.FileDescriptor - -var file_proto_hello_proto3_proto_rawDesc = []byte{ - 0x0a, 0x18, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x68, 0x65, 0x6c, 0x6c, 0x6f, 0x2f, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x33, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x05, 0x68, 0x65, 0x6c, 0x6c, - 0x6f, 0x1a, 0x1e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, - 0x75, 0x66, 0x2f, 0x64, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x1a, 0x19, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, - 0x75, 0x66, 0x2f, 0x61, 0x6e, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x20, 0x67, 0x6f, - 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x66, 0x69, - 0x65, 0x6c, 0x64, 0x5f, 0x6d, 0x61, 0x73, 0x6b, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1f, - 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, - 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, - 0x1e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, - 0x2f, 0x77, 0x72, 0x61, 0x70, 0x70, 0x65, 0x72, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, - 0xb5, 0x1b, 0x0a, 0x0d, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x33, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, - 0x65, 0x12, 0x2c, 0x0a, 0x06, 0x6e, 0x65, 0x73, 0x74, 0x65, 0x64, 0x18, 0x29, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x14, 0x2e, 0x68, 0x65, 0x6c, 0x6c, 0x6f, 0x2e, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x33, - 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x52, 0x06, 0x6e, 0x65, 0x73, 0x74, 0x65, 0x64, 0x12, - 0x1f, 0x0a, 0x0b, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x2a, - 0x20, 0x01, 0x28, 0x02, 0x52, 0x0a, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x56, 0x61, 0x6c, 0x75, 0x65, - 0x12, 0x21, 0x0a, 0x0c, 0x64, 0x6f, 0x75, 0x62, 0x6c, 0x65, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, - 0x18, 0x2b, 0x20, 0x01, 0x28, 0x01, 0x52, 0x0b, 0x64, 0x6f, 0x75, 0x62, 0x6c, 0x65, 0x56, 0x61, - 0x6c, 0x75, 0x65, 0x12, 0x1f, 0x0a, 0x0b, 0x69, 0x6e, 0x74, 0x36, 0x34, 0x5f, 0x76, 0x61, 0x6c, - 0x75, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0a, 0x69, 0x6e, 0x74, 0x36, 0x34, 0x56, - 0x61, 0x6c, 0x75, 0x65, 0x12, 0x1f, 0x0a, 0x0b, 0x69, 0x6e, 0x74, 0x33, 0x32, 0x5f, 0x76, 0x61, - 0x6c, 0x75, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0a, 0x69, 0x6e, 0x74, 0x33, 0x32, - 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x21, 0x0a, 0x0c, 0x75, 0x69, 0x6e, 0x74, 0x36, 0x34, 0x5f, - 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0b, 0x75, 0x69, 0x6e, - 0x74, 0x36, 0x34, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x21, 0x0a, 0x0c, 0x75, 0x69, 0x6e, 0x74, - 0x33, 0x32, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x0b, - 0x75, 0x69, 0x6e, 0x74, 0x33, 0x32, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x62, - 0x6f, 0x6f, 0x6c, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x08, 0x52, - 0x09, 0x62, 0x6f, 0x6f, 0x6c, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x21, 0x0a, 0x0c, 0x73, 0x74, - 0x72, 0x69, 0x6e, 0x67, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x0b, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x1f, 0x0a, - 0x0b, 0x62, 0x79, 0x74, 0x65, 0x73, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x09, 0x20, 0x01, - 0x28, 0x0c, 0x52, 0x0a, 0x62, 0x79, 0x74, 0x65, 0x73, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x25, - 0x0a, 0x0e, 0x72, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, - 0x18, 0x0a, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0d, 0x72, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, - 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x47, 0x0a, 0x10, 0x72, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, - 0x64, 0x5f, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x2c, 0x20, 0x03, 0x28, 0x0b, 0x32, - 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, - 0x66, 0x2e, 0x55, 0x49, 0x6e, 0x74, 0x36, 0x34, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x0f, 0x72, - 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x2f, - 0x0a, 0x0a, 0x65, 0x6e, 0x75, 0x6d, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x0b, 0x20, 0x01, - 0x28, 0x0e, 0x32, 0x10, 0x2e, 0x68, 0x65, 0x6c, 0x6c, 0x6f, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x56, - 0x61, 0x6c, 0x75, 0x65, 0x52, 0x09, 0x65, 0x6e, 0x75, 0x6d, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, - 0x35, 0x0a, 0x0d, 0x72, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x65, 0x6e, 0x75, 0x6d, - 0x18, 0x0c, 0x20, 0x03, 0x28, 0x0e, 0x32, 0x10, 0x2e, 0x68, 0x65, 0x6c, 0x6c, 0x6f, 0x2e, 0x45, - 0x6e, 0x75, 0x6d, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x0c, 0x72, 0x65, 0x70, 0x65, 0x61, 0x74, - 0x65, 0x64, 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x43, 0x0a, 0x0f, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, - 0x61, 0x6d, 0x70, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, - 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x0e, 0x74, 0x69, 0x6d, - 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x40, 0x0a, 0x0e, 0x64, - 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x0e, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0d, - 0x64, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x43, 0x0a, - 0x0f, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x6d, 0x61, 0x73, 0x6b, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, - 0x18, 0x0f, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4d, 0x61, - 0x73, 0x6b, 0x52, 0x0e, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x6d, 0x61, 0x73, 0x6b, 0x56, 0x61, 0x6c, - 0x75, 0x65, 0x12, 0x2a, 0x0a, 0x10, 0x6f, 0x6e, 0x65, 0x6f, 0x66, 0x5f, 0x62, 0x6f, 0x6f, 0x6c, - 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x48, 0x00, 0x52, 0x0e, - 0x6f, 0x6e, 0x65, 0x6f, 0x66, 0x42, 0x6f, 0x6f, 0x6c, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x2e, - 0x0a, 0x12, 0x6f, 0x6e, 0x65, 0x6f, 0x66, 0x5f, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x5f, 0x76, - 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x10, 0x6f, 0x6e, - 0x65, 0x6f, 0x66, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x4e, - 0x0a, 0x14, 0x77, 0x72, 0x61, 0x70, 0x70, 0x65, 0x72, 0x5f, 0x64, 0x6f, 0x75, 0x62, 0x6c, 0x65, - 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x11, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, - 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, - 0x6f, 0x75, 0x62, 0x6c, 0x65, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x12, 0x77, 0x72, 0x61, 0x70, - 0x70, 0x65, 0x72, 0x44, 0x6f, 0x75, 0x62, 0x6c, 0x65, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x4b, - 0x0a, 0x13, 0x77, 0x72, 0x61, 0x70, 0x70, 0x65, 0x72, 0x5f, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x5f, - 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x12, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x67, 0x6f, - 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x6c, - 0x6f, 0x61, 0x74, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x11, 0x77, 0x72, 0x61, 0x70, 0x70, 0x65, - 0x72, 0x46, 0x6c, 0x6f, 0x61, 0x74, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x4b, 0x0a, 0x13, 0x77, - 0x72, 0x61, 0x70, 0x70, 0x65, 0x72, 0x5f, 0x69, 0x6e, 0x74, 0x36, 0x34, 0x5f, 0x76, 0x61, 0x6c, - 0x75, 0x65, 0x18, 0x13, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, - 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x49, 0x6e, 0x74, 0x36, 0x34, - 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x11, 0x77, 0x72, 0x61, 0x70, 0x70, 0x65, 0x72, 0x49, 0x6e, - 0x74, 0x36, 0x34, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x4b, 0x0a, 0x13, 0x77, 0x72, 0x61, 0x70, - 0x70, 0x65, 0x72, 0x5f, 0x69, 0x6e, 0x74, 0x33, 0x32, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, - 0x14, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x49, 0x6e, 0x74, 0x33, 0x32, 0x56, 0x61, 0x6c, - 0x75, 0x65, 0x52, 0x11, 0x77, 0x72, 0x61, 0x70, 0x70, 0x65, 0x72, 0x49, 0x6e, 0x74, 0x33, 0x32, - 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x4f, 0x0a, 0x15, 0x77, 0x72, 0x61, 0x70, 0x70, 0x65, 0x72, - 0x5f, 0x75, 0x5f, 0x69, 0x6e, 0x74, 0x36, 0x34, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x15, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x55, 0x49, 0x6e, 0x74, 0x36, 0x34, 0x56, 0x61, 0x6c, - 0x75, 0x65, 0x52, 0x12, 0x77, 0x72, 0x61, 0x70, 0x70, 0x65, 0x72, 0x55, 0x49, 0x6e, 0x74, 0x36, - 0x34, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x4f, 0x0a, 0x15, 0x77, 0x72, 0x61, 0x70, 0x70, 0x65, - 0x72, 0x5f, 0x75, 0x5f, 0x69, 0x6e, 0x74, 0x33, 0x32, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, - 0x16, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x55, 0x49, 0x6e, 0x74, 0x33, 0x32, 0x56, 0x61, - 0x6c, 0x75, 0x65, 0x52, 0x12, 0x77, 0x72, 0x61, 0x70, 0x70, 0x65, 0x72, 0x55, 0x49, 0x6e, 0x74, - 0x33, 0x32, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x48, 0x0a, 0x12, 0x77, 0x72, 0x61, 0x70, 0x70, - 0x65, 0x72, 0x5f, 0x62, 0x6f, 0x6f, 0x6c, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x17, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x42, 0x6f, 0x6f, 0x6c, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, - 0x10, 0x77, 0x72, 0x61, 0x70, 0x70, 0x65, 0x72, 0x42, 0x6f, 0x6f, 0x6c, 0x56, 0x61, 0x6c, 0x75, - 0x65, 0x12, 0x4e, 0x0a, 0x14, 0x77, 0x72, 0x61, 0x70, 0x70, 0x65, 0x72, 0x5f, 0x73, 0x74, 0x72, - 0x69, 0x6e, 0x67, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x18, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, - 0x66, 0x2e, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x12, 0x77, - 0x72, 0x61, 0x70, 0x70, 0x65, 0x72, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x56, 0x61, 0x6c, 0x75, - 0x65, 0x12, 0x4b, 0x0a, 0x13, 0x77, 0x72, 0x61, 0x70, 0x70, 0x65, 0x72, 0x5f, 0x62, 0x79, 0x74, - 0x65, 0x73, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x19, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, - 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, - 0x2e, 0x42, 0x79, 0x74, 0x65, 0x73, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x11, 0x77, 0x72, 0x61, - 0x70, 0x70, 0x65, 0x72, 0x42, 0x79, 0x74, 0x65, 0x73, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x3f, - 0x0a, 0x09, 0x6d, 0x61, 0x70, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x1a, 0x20, 0x03, 0x28, - 0x0b, 0x32, 0x22, 0x2e, 0x68, 0x65, 0x6c, 0x6c, 0x6f, 0x2e, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x33, - 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x2e, 0x4d, 0x61, 0x70, 0x56, 0x61, 0x6c, 0x75, 0x65, - 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x08, 0x6d, 0x61, 0x70, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, - 0x42, 0x0a, 0x0a, 0x6d, 0x61, 0x70, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x32, 0x18, 0x1b, 0x20, - 0x03, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x68, 0x65, 0x6c, 0x6c, 0x6f, 0x2e, 0x50, 0x72, 0x6f, 0x74, - 0x6f, 0x33, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x2e, 0x4d, 0x61, 0x70, 0x56, 0x61, 0x6c, - 0x75, 0x65, 0x32, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x09, 0x6d, 0x61, 0x70, 0x56, 0x61, 0x6c, - 0x75, 0x65, 0x32, 0x12, 0x42, 0x0a, 0x0a, 0x6d, 0x61, 0x70, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, - 0x33, 0x18, 0x1c, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x68, 0x65, 0x6c, 0x6c, 0x6f, 0x2e, - 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x33, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x2e, 0x4d, 0x61, - 0x70, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x33, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x09, 0x6d, 0x61, - 0x70, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x33, 0x12, 0x42, 0x0a, 0x0a, 0x6d, 0x61, 0x70, 0x5f, 0x76, - 0x61, 0x6c, 0x75, 0x65, 0x34, 0x18, 0x1d, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x68, 0x65, - 0x6c, 0x6c, 0x6f, 0x2e, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x33, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, - 0x65, 0x2e, 0x4d, 0x61, 0x70, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x34, 0x45, 0x6e, 0x74, 0x72, 0x79, - 0x52, 0x09, 0x6d, 0x61, 0x70, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x34, 0x12, 0x42, 0x0a, 0x0a, 0x6d, - 0x61, 0x70, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x35, 0x18, 0x1e, 0x20, 0x03, 0x28, 0x0b, 0x32, - 0x23, 0x2e, 0x68, 0x65, 0x6c, 0x6c, 0x6f, 0x2e, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x33, 0x4d, 0x65, - 0x73, 0x73, 0x61, 0x67, 0x65, 0x2e, 0x4d, 0x61, 0x70, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x35, 0x45, - 0x6e, 0x74, 0x72, 0x79, 0x52, 0x09, 0x6d, 0x61, 0x70, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x35, 0x12, - 0x42, 0x0a, 0x0a, 0x6d, 0x61, 0x70, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x36, 0x18, 0x1f, 0x20, - 0x03, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x68, 0x65, 0x6c, 0x6c, 0x6f, 0x2e, 0x50, 0x72, 0x6f, 0x74, - 0x6f, 0x33, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x2e, 0x4d, 0x61, 0x70, 0x56, 0x61, 0x6c, - 0x75, 0x65, 0x36, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x09, 0x6d, 0x61, 0x70, 0x56, 0x61, 0x6c, - 0x75, 0x65, 0x36, 0x12, 0x42, 0x0a, 0x0a, 0x6d, 0x61, 0x70, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, - 0x37, 0x18, 0x20, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x68, 0x65, 0x6c, 0x6c, 0x6f, 0x2e, - 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x33, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x2e, 0x4d, 0x61, - 0x70, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x37, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x09, 0x6d, 0x61, - 0x70, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x37, 0x12, 0x42, 0x0a, 0x0a, 0x6d, 0x61, 0x70, 0x5f, 0x76, - 0x61, 0x6c, 0x75, 0x65, 0x38, 0x18, 0x21, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x68, 0x65, - 0x6c, 0x6c, 0x6f, 0x2e, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x33, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, - 0x65, 0x2e, 0x4d, 0x61, 0x70, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x38, 0x45, 0x6e, 0x74, 0x72, 0x79, - 0x52, 0x09, 0x6d, 0x61, 0x70, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x38, 0x12, 0x42, 0x0a, 0x0a, 0x6d, - 0x61, 0x70, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x39, 0x18, 0x22, 0x20, 0x03, 0x28, 0x0b, 0x32, - 0x23, 0x2e, 0x68, 0x65, 0x6c, 0x6c, 0x6f, 0x2e, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x33, 0x4d, 0x65, - 0x73, 0x73, 0x61, 0x67, 0x65, 0x2e, 0x4d, 0x61, 0x70, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x39, 0x45, - 0x6e, 0x74, 0x72, 0x79, 0x52, 0x09, 0x6d, 0x61, 0x70, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x39, 0x12, - 0x45, 0x0a, 0x0b, 0x6d, 0x61, 0x70, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x31, 0x30, 0x18, 0x23, - 0x20, 0x03, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x68, 0x65, 0x6c, 0x6c, 0x6f, 0x2e, 0x50, 0x72, 0x6f, - 0x74, 0x6f, 0x33, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x2e, 0x4d, 0x61, 0x70, 0x56, 0x61, - 0x6c, 0x75, 0x65, 0x31, 0x30, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x0a, 0x6d, 0x61, 0x70, 0x56, - 0x61, 0x6c, 0x75, 0x65, 0x31, 0x30, 0x12, 0x45, 0x0a, 0x0b, 0x6d, 0x61, 0x70, 0x5f, 0x76, 0x61, - 0x6c, 0x75, 0x65, 0x31, 0x32, 0x18, 0x25, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x68, 0x65, - 0x6c, 0x6c, 0x6f, 0x2e, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x33, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, - 0x65, 0x2e, 0x4d, 0x61, 0x70, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x31, 0x32, 0x45, 0x6e, 0x74, 0x72, - 0x79, 0x52, 0x0a, 0x6d, 0x61, 0x70, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x31, 0x32, 0x12, 0x45, 0x0a, - 0x0b, 0x6d, 0x61, 0x70, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x31, 0x34, 0x18, 0x27, 0x20, 0x03, - 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x68, 0x65, 0x6c, 0x6c, 0x6f, 0x2e, 0x50, 0x72, 0x6f, 0x74, 0x6f, - 0x33, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x2e, 0x4d, 0x61, 0x70, 0x56, 0x61, 0x6c, 0x75, - 0x65, 0x31, 0x34, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x0a, 0x6d, 0x61, 0x70, 0x56, 0x61, 0x6c, - 0x75, 0x65, 0x31, 0x34, 0x12, 0x45, 0x0a, 0x0b, 0x6d, 0x61, 0x70, 0x5f, 0x76, 0x61, 0x6c, 0x75, - 0x65, 0x31, 0x35, 0x18, 0x28, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x68, 0x65, 0x6c, 0x6c, - 0x6f, 0x2e, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x33, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x2e, - 0x4d, 0x61, 0x70, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x31, 0x35, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, - 0x0a, 0x6d, 0x61, 0x70, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x31, 0x35, 0x12, 0x45, 0x0a, 0x0b, 0x6d, - 0x61, 0x70, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x31, 0x36, 0x18, 0x2d, 0x20, 0x03, 0x28, 0x0b, - 0x32, 0x24, 0x2e, 0x68, 0x65, 0x6c, 0x6c, 0x6f, 0x2e, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x33, 0x4d, - 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x2e, 0x4d, 0x61, 0x70, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x31, - 0x36, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x0a, 0x6d, 0x61, 0x70, 0x56, 0x61, 0x6c, 0x75, 0x65, - 0x31, 0x36, 0x12, 0x2e, 0x0a, 0x07, 0x64, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, 0x18, 0x2e, 0x20, - 0x03, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x41, 0x6e, 0x79, 0x52, 0x07, 0x64, 0x65, 0x74, 0x61, 0x69, - 0x6c, 0x73, 0x1a, 0x3b, 0x0a, 0x0d, 0x4d, 0x61, 0x70, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x45, 0x6e, - 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x1a, - 0x3c, 0x0a, 0x0e, 0x4d, 0x61, 0x70, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x32, 0x45, 0x6e, 0x74, 0x72, - 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, - 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, - 0x28, 0x05, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x1a, 0x3c, 0x0a, - 0x0e, 0x4d, 0x61, 0x70, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x33, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, - 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x03, 0x6b, 0x65, - 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x1a, 0x3c, 0x0a, 0x0e, 0x4d, - 0x61, 0x70, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x34, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, - 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, - 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, - 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x1a, 0x3c, 0x0a, 0x0e, 0x4d, 0x61, 0x70, - 0x56, 0x61, 0x6c, 0x75, 0x65, 0x35, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, - 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, - 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, - 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x1a, 0x3c, 0x0a, 0x0e, 0x4d, 0x61, 0x70, 0x56, 0x61, - 0x6c, 0x75, 0x65, 0x36, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, - 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, - 0x65, 0x3a, 0x02, 0x38, 0x01, 0x1a, 0x3c, 0x0a, 0x0e, 0x4d, 0x61, 0x70, 0x56, 0x61, 0x6c, 0x75, - 0x65, 0x37, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x0d, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, - 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, - 0x02, 0x38, 0x01, 0x1a, 0x3c, 0x0a, 0x0e, 0x4d, 0x61, 0x70, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x38, - 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, - 0x01, 0x1a, 0x3c, 0x0a, 0x0e, 0x4d, 0x61, 0x70, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x39, 0x45, 0x6e, - 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, - 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x1a, - 0x3d, 0x0a, 0x0f, 0x4d, 0x61, 0x70, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x31, 0x30, 0x45, 0x6e, 0x74, - 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x02, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x1a, 0x3d, - 0x0a, 0x0f, 0x4d, 0x61, 0x70, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x31, 0x32, 0x45, 0x6e, 0x74, 0x72, - 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, - 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, - 0x28, 0x01, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x1a, 0x3d, 0x0a, - 0x0f, 0x4d, 0x61, 0x70, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x31, 0x34, 0x45, 0x6e, 0x74, 0x72, 0x79, - 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, - 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x08, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x1a, 0x3d, 0x0a, 0x0f, - 0x4d, 0x61, 0x70, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x31, 0x35, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, - 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x03, 0x6b, 0x65, - 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x1a, 0x5b, 0x0a, 0x0f, 0x4d, - 0x61, 0x70, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x31, 0x36, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, - 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, - 0x12, 0x32, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, - 0x66, 0x2e, 0x55, 0x49, 0x6e, 0x74, 0x36, 0x34, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x05, 0x76, - 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x42, 0x0d, 0x0a, 0x0b, 0x6f, 0x6e, 0x65, 0x6f, - 0x66, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x2a, 0x20, 0x0a, 0x09, 0x45, 0x6e, 0x75, 0x6d, 0x56, - 0x61, 0x6c, 0x75, 0x65, 0x12, 0x05, 0x0a, 0x01, 0x58, 0x10, 0x00, 0x12, 0x05, 0x0a, 0x01, 0x59, - 0x10, 0x01, 0x12, 0x05, 0x0a, 0x01, 0x5a, 0x10, 0x02, 0x42, 0x13, 0x5a, 0x11, 0x2e, 0x2f, 0x68, - 0x65, 0x6c, 0x6c, 0x6f, 0x70, 0x62, 0x3b, 0x68, 0x65, 0x6c, 0x6c, 0x6f, 0x70, 0x62, 0x62, 0x06, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} - -var ( - file_proto_hello_proto3_proto_rawDescOnce sync.Once - file_proto_hello_proto3_proto_rawDescData = file_proto_hello_proto3_proto_rawDesc -) - -func file_proto_hello_proto3_proto_rawDescGZIP() []byte { - file_proto_hello_proto3_proto_rawDescOnce.Do(func() { - file_proto_hello_proto3_proto_rawDescData = protoimpl.X.CompressGZIP(file_proto_hello_proto3_proto_rawDescData) - }) - return file_proto_hello_proto3_proto_rawDescData -} - -var file_proto_hello_proto3_proto_enumTypes = make([]protoimpl.EnumInfo, 1) -var file_proto_hello_proto3_proto_msgTypes = make([]protoimpl.MessageInfo, 15) -var file_proto_hello_proto3_proto_goTypes = []interface{}{ - (EnumValue)(0), // 0: hello.EnumValue - (*Proto3Message)(nil), // 1: hello.Proto3Message - nil, // 2: hello.Proto3Message.MapValueEntry - nil, // 3: hello.Proto3Message.MapValue2Entry - nil, // 4: hello.Proto3Message.MapValue3Entry - nil, // 5: hello.Proto3Message.MapValue4Entry - nil, // 6: hello.Proto3Message.MapValue5Entry - nil, // 7: hello.Proto3Message.MapValue6Entry - nil, // 8: hello.Proto3Message.MapValue7Entry - nil, // 9: hello.Proto3Message.MapValue8Entry - nil, // 10: hello.Proto3Message.MapValue9Entry - nil, // 11: hello.Proto3Message.MapValue10Entry - nil, // 12: hello.Proto3Message.MapValue12Entry - nil, // 13: hello.Proto3Message.MapValue14Entry - nil, // 14: hello.Proto3Message.MapValue15Entry - nil, // 15: hello.Proto3Message.MapValue16Entry - (*wrapperspb.UInt64Value)(nil), // 16: google.protobuf.UInt64Value - (*timestamppb.Timestamp)(nil), // 17: google.protobuf.Timestamp - (*durationpb.Duration)(nil), // 18: google.protobuf.Duration - (*fieldmaskpb.FieldMask)(nil), // 19: google.protobuf.FieldMask - (*wrapperspb.DoubleValue)(nil), // 20: google.protobuf.DoubleValue - (*wrapperspb.FloatValue)(nil), // 21: google.protobuf.FloatValue - (*wrapperspb.Int64Value)(nil), // 22: google.protobuf.Int64Value - (*wrapperspb.Int32Value)(nil), // 23: google.protobuf.Int32Value - (*wrapperspb.UInt32Value)(nil), // 24: google.protobuf.UInt32Value - (*wrapperspb.BoolValue)(nil), // 25: google.protobuf.BoolValue - (*wrapperspb.StringValue)(nil), // 26: google.protobuf.StringValue - (*wrapperspb.BytesValue)(nil), // 27: google.protobuf.BytesValue - (*anypb.Any)(nil), // 28: google.protobuf.Any -} -var file_proto_hello_proto3_proto_depIdxs = []int32{ - 1, // 0: hello.Proto3Message.nested:type_name -> hello.Proto3Message - 16, // 1: hello.Proto3Message.repeated_message:type_name -> google.protobuf.UInt64Value - 0, // 2: hello.Proto3Message.enum_value:type_name -> hello.EnumValue - 0, // 3: hello.Proto3Message.repeated_enum:type_name -> hello.EnumValue - 17, // 4: hello.Proto3Message.timestamp_value:type_name -> google.protobuf.Timestamp - 18, // 5: hello.Proto3Message.duration_value:type_name -> google.protobuf.Duration - 19, // 6: hello.Proto3Message.fieldmask_value:type_name -> google.protobuf.FieldMask - 20, // 7: hello.Proto3Message.wrapper_double_value:type_name -> google.protobuf.DoubleValue - 21, // 8: hello.Proto3Message.wrapper_float_value:type_name -> google.protobuf.FloatValue - 22, // 9: hello.Proto3Message.wrapper_int64_value:type_name -> google.protobuf.Int64Value - 23, // 10: hello.Proto3Message.wrapper_int32_value:type_name -> google.protobuf.Int32Value - 16, // 11: hello.Proto3Message.wrapper_u_int64_value:type_name -> google.protobuf.UInt64Value - 24, // 12: hello.Proto3Message.wrapper_u_int32_value:type_name -> google.protobuf.UInt32Value - 25, // 13: hello.Proto3Message.wrapper_bool_value:type_name -> google.protobuf.BoolValue - 26, // 14: hello.Proto3Message.wrapper_string_value:type_name -> google.protobuf.StringValue - 27, // 15: hello.Proto3Message.wrapper_bytes_value:type_name -> google.protobuf.BytesValue - 2, // 16: hello.Proto3Message.map_value:type_name -> hello.Proto3Message.MapValueEntry - 3, // 17: hello.Proto3Message.map_value2:type_name -> hello.Proto3Message.MapValue2Entry - 4, // 18: hello.Proto3Message.map_value3:type_name -> hello.Proto3Message.MapValue3Entry - 5, // 19: hello.Proto3Message.map_value4:type_name -> hello.Proto3Message.MapValue4Entry - 6, // 20: hello.Proto3Message.map_value5:type_name -> hello.Proto3Message.MapValue5Entry - 7, // 21: hello.Proto3Message.map_value6:type_name -> hello.Proto3Message.MapValue6Entry - 8, // 22: hello.Proto3Message.map_value7:type_name -> hello.Proto3Message.MapValue7Entry - 9, // 23: hello.Proto3Message.map_value8:type_name -> hello.Proto3Message.MapValue8Entry - 10, // 24: hello.Proto3Message.map_value9:type_name -> hello.Proto3Message.MapValue9Entry - 11, // 25: hello.Proto3Message.map_value10:type_name -> hello.Proto3Message.MapValue10Entry - 12, // 26: hello.Proto3Message.map_value12:type_name -> hello.Proto3Message.MapValue12Entry - 13, // 27: hello.Proto3Message.map_value14:type_name -> hello.Proto3Message.MapValue14Entry - 14, // 28: hello.Proto3Message.map_value15:type_name -> hello.Proto3Message.MapValue15Entry - 15, // 29: hello.Proto3Message.map_value16:type_name -> hello.Proto3Message.MapValue16Entry - 28, // 30: hello.Proto3Message.details:type_name -> google.protobuf.Any - 16, // 31: hello.Proto3Message.MapValue16Entry.value:type_name -> google.protobuf.UInt64Value - 32, // [32:32] is the sub-list for method output_type - 32, // [32:32] is the sub-list for method input_type - 32, // [32:32] is the sub-list for extension type_name - 32, // [32:32] is the sub-list for extension extendee - 0, // [0:32] is the sub-list for field type_name -} - -func init() { file_proto_hello_proto3_proto_init() } -func file_proto_hello_proto3_proto_init() { - if File_proto_hello_proto3_proto != nil { - return - } - if !protoimpl.UnsafeEnabled { - file_proto_hello_proto3_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Proto3Message); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - file_proto_hello_proto3_proto_msgTypes[0].OneofWrappers = []interface{}{ - (*Proto3Message_OneofBoolValue)(nil), - (*Proto3Message_OneofStringValue)(nil), - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_proto_hello_proto3_proto_rawDesc, - NumEnums: 1, - NumMessages: 15, - NumExtensions: 0, - NumServices: 0, - }, - GoTypes: file_proto_hello_proto3_proto_goTypes, - DependencyIndexes: file_proto_hello_proto3_proto_depIdxs, - EnumInfos: file_proto_hello_proto3_proto_enumTypes, - MessageInfos: file_proto_hello_proto3_proto_msgTypes, - }.Build() - File_proto_hello_proto3_proto = out.File - file_proto_hello_proto3_proto_rawDesc = nil - file_proto_hello_proto3_proto_goTypes = nil - file_proto_hello_proto3_proto_depIdxs = nil -} diff --git a/example/protopb/hellopb/transport.pb.go b/example/protopb/hellopb/transport.pb.go deleted file mode 100644 index 4f55a072c..000000000 --- a/example/protopb/hellopb/transport.pb.go +++ /dev/null @@ -1,187 +0,0 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.28.0 -// protoc v3.19.4 -// source: proto/hello/transport.proto - -package hellopb - -import ( - _ "google.golang.org/genproto/googleapis/api/annotations" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - reflect "reflect" - sync "sync" -) - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -type Message struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Header map[string]string `protobuf:"bytes,1,rep,name=header,proto3" json:"header,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` - Body []byte `protobuf:"bytes,2,opt,name=body,proto3" json:"body,omitempty"` -} - -func (x *Message) Reset() { - *x = Message{} - if protoimpl.UnsafeEnabled { - mi := &file_proto_hello_transport_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Message) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Message) ProtoMessage() {} - -func (x *Message) ProtoReflect() protoreflect.Message { - mi := &file_proto_hello_transport_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use Message.ProtoReflect.Descriptor instead. -func (*Message) Descriptor() ([]byte, []int) { - return file_proto_hello_transport_proto_rawDescGZIP(), []int{0} -} - -func (x *Message) GetHeader() map[string]string { - if x != nil { - return x.Header - } - return nil -} - -func (x *Message) GetBody() []byte { - if x != nil { - return x.Body - } - return nil -} - -var File_proto_hello_transport_proto protoreflect.FileDescriptor - -var file_proto_hello_transport_proto_rawDesc = []byte{ - 0x0a, 0x1b, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x68, 0x65, 0x6c, 0x6c, 0x6f, 0x2f, 0x74, 0x72, - 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x05, 0x68, - 0x65, 0x6c, 0x6c, 0x6f, 0x1a, 0x15, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, - 0x2f, 0x68, 0x74, 0x74, 0x70, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1c, 0x67, 0x6f, 0x6f, - 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x8c, 0x01, 0x0a, 0x07, 0x4d, 0x65, - 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x32, 0x0a, 0x06, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x18, - 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x68, 0x65, 0x6c, 0x6c, 0x6f, 0x2e, 0x4d, 0x65, - 0x73, 0x73, 0x61, 0x67, 0x65, 0x2e, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x45, 0x6e, 0x74, 0x72, - 0x79, 0x52, 0x06, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x12, 0x12, 0x0a, 0x04, 0x62, 0x6f, 0x64, - 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x04, 0x62, 0x6f, 0x64, 0x79, 0x1a, 0x39, 0x0a, - 0x0b, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, - 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, - 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, - 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x32, 0xf7, 0x01, 0x0a, 0x09, 0x54, 0x72, 0x61, - 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x12, 0x32, 0x0a, 0x0a, 0x54, 0x65, 0x73, 0x74, 0x53, 0x74, - 0x72, 0x65, 0x61, 0x6d, 0x12, 0x0e, 0x2e, 0x68, 0x65, 0x6c, 0x6c, 0x6f, 0x2e, 0x4d, 0x65, 0x73, - 0x73, 0x61, 0x67, 0x65, 0x1a, 0x0e, 0x2e, 0x68, 0x65, 0x6c, 0x6c, 0x6f, 0x2e, 0x4d, 0x65, 0x73, - 0x73, 0x61, 0x67, 0x65, 0x22, 0x00, 0x28, 0x01, 0x30, 0x01, 0x12, 0x31, 0x0a, 0x0b, 0x54, 0x65, - 0x73, 0x74, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x31, 0x12, 0x0e, 0x2e, 0x68, 0x65, 0x6c, 0x6c, - 0x6f, 0x2e, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x1a, 0x0e, 0x2e, 0x68, 0x65, 0x6c, 0x6c, - 0x6f, 0x2e, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x22, 0x00, 0x28, 0x01, 0x12, 0x31, 0x0a, - 0x0b, 0x54, 0x65, 0x73, 0x74, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x32, 0x12, 0x0e, 0x2e, 0x68, - 0x65, 0x6c, 0x6c, 0x6f, 0x2e, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x1a, 0x0e, 0x2e, 0x68, - 0x65, 0x6c, 0x6c, 0x6f, 0x2e, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x22, 0x00, 0x30, 0x01, - 0x12, 0x50, 0x0a, 0x0b, 0x54, 0x65, 0x73, 0x74, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x33, 0x12, - 0x0e, 0x2e, 0x68, 0x65, 0x6c, 0x6c, 0x6f, 0x2e, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x1a, - 0x0e, 0x2e, 0x68, 0x65, 0x6c, 0x6c, 0x6f, 0x2e, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x22, - 0x21, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1b, 0x12, 0x19, 0x2f, 0x76, 0x31, 0x2f, 0x54, 0x72, 0x61, - 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x2f, 0x54, 0x65, 0x73, 0x74, 0x53, 0x74, 0x72, 0x65, 0x61, - 0x6d, 0x33, 0x42, 0x13, 0x5a, 0x11, 0x2e, 0x2f, 0x68, 0x65, 0x6c, 0x6c, 0x6f, 0x70, 0x62, 0x3b, - 0x68, 0x65, 0x6c, 0x6c, 0x6f, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} - -var ( - file_proto_hello_transport_proto_rawDescOnce sync.Once - file_proto_hello_transport_proto_rawDescData = file_proto_hello_transport_proto_rawDesc -) - -func file_proto_hello_transport_proto_rawDescGZIP() []byte { - file_proto_hello_transport_proto_rawDescOnce.Do(func() { - file_proto_hello_transport_proto_rawDescData = protoimpl.X.CompressGZIP(file_proto_hello_transport_proto_rawDescData) - }) - return file_proto_hello_transport_proto_rawDescData -} - -var file_proto_hello_transport_proto_msgTypes = make([]protoimpl.MessageInfo, 2) -var file_proto_hello_transport_proto_goTypes = []interface{}{ - (*Message)(nil), // 0: hello.Message - nil, // 1: hello.Message.HeaderEntry -} -var file_proto_hello_transport_proto_depIdxs = []int32{ - 1, // 0: hello.Message.header:type_name -> hello.Message.HeaderEntry - 0, // 1: hello.Transport.TestStream:input_type -> hello.Message - 0, // 2: hello.Transport.TestStream1:input_type -> hello.Message - 0, // 3: hello.Transport.TestStream2:input_type -> hello.Message - 0, // 4: hello.Transport.TestStream3:input_type -> hello.Message - 0, // 5: hello.Transport.TestStream:output_type -> hello.Message - 0, // 6: hello.Transport.TestStream1:output_type -> hello.Message - 0, // 7: hello.Transport.TestStream2:output_type -> hello.Message - 0, // 8: hello.Transport.TestStream3:output_type -> hello.Message - 5, // [5:9] is the sub-list for method output_type - 1, // [1:5] is the sub-list for method input_type - 1, // [1:1] is the sub-list for extension type_name - 1, // [1:1] is the sub-list for extension extendee - 0, // [0:1] is the sub-list for field type_name -} - -func init() { file_proto_hello_transport_proto_init() } -func file_proto_hello_transport_proto_init() { - if File_proto_hello_transport_proto != nil { - return - } - if !protoimpl.UnsafeEnabled { - file_proto_hello_transport_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Message); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_proto_hello_transport_proto_rawDesc, - NumEnums: 0, - NumMessages: 2, - NumExtensions: 0, - NumServices: 1, - }, - GoTypes: file_proto_hello_transport_proto_goTypes, - DependencyIndexes: file_proto_hello_transport_proto_depIdxs, - MessageInfos: file_proto_hello_transport_proto_msgTypes, - }.Build() - File_proto_hello_transport_proto = out.File - file_proto_hello_transport_proto_rawDesc = nil - file_proto_hello_transport_proto_goTypes = nil - file_proto_hello_transport_proto_depIdxs = nil -} diff --git a/example/protopb/hellopb/transport_grpc.pb.go b/example/protopb/hellopb/transport_grpc.pb.go deleted file mode 100644 index fb8b97c35..000000000 --- a/example/protopb/hellopb/transport_grpc.pb.go +++ /dev/null @@ -1,301 +0,0 @@ -// Code generated by protoc-gen-go-grpc. DO NOT EDIT. - -package hellopb - -import ( - context "context" - grpc "google.golang.org/grpc" - codes "google.golang.org/grpc/codes" - status "google.golang.org/grpc/status" -) - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the grpc package it is being compiled against. -// Requires gRPC-Go v1.32.0 or later. -const _ = grpc.SupportPackageIsVersion7 - -// TransportClient is the client API for Transport service. -// -// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. -type TransportClient interface { - TestStream(ctx context.Context, opts ...grpc.CallOption) (Transport_TestStreamClient, error) - TestStream1(ctx context.Context, opts ...grpc.CallOption) (Transport_TestStream1Client, error) - TestStream2(ctx context.Context, in *Message, opts ...grpc.CallOption) (Transport_TestStream2Client, error) - TestStream3(ctx context.Context, in *Message, opts ...grpc.CallOption) (*Message, error) -} - -type transportClient struct { - cc grpc.ClientConnInterface -} - -func NewTransportClient(cc grpc.ClientConnInterface) TransportClient { - return &transportClient{cc} -} - -func (c *transportClient) TestStream(ctx context.Context, opts ...grpc.CallOption) (Transport_TestStreamClient, error) { - stream, err := c.cc.NewStream(ctx, &Transport_ServiceDesc.Streams[0], "/hello.Transport/TestStream", opts...) - if err != nil { - return nil, err - } - x := &transportTestStreamClient{stream} - return x, nil -} - -type Transport_TestStreamClient interface { - Send(*Message) error - Recv() (*Message, error) - grpc.ClientStream -} - -type transportTestStreamClient struct { - grpc.ClientStream -} - -func (x *transportTestStreamClient) Send(m *Message) error { - return x.ClientStream.SendMsg(m) -} - -func (x *transportTestStreamClient) Recv() (*Message, error) { - m := new(Message) - if err := x.ClientStream.RecvMsg(m); err != nil { - return nil, err - } - return m, nil -} - -func (c *transportClient) TestStream1(ctx context.Context, opts ...grpc.CallOption) (Transport_TestStream1Client, error) { - stream, err := c.cc.NewStream(ctx, &Transport_ServiceDesc.Streams[1], "/hello.Transport/TestStream1", opts...) - if err != nil { - return nil, err - } - x := &transportTestStream1Client{stream} - return x, nil -} - -type Transport_TestStream1Client interface { - Send(*Message) error - CloseAndRecv() (*Message, error) - grpc.ClientStream -} - -type transportTestStream1Client struct { - grpc.ClientStream -} - -func (x *transportTestStream1Client) Send(m *Message) error { - return x.ClientStream.SendMsg(m) -} - -func (x *transportTestStream1Client) CloseAndRecv() (*Message, error) { - if err := x.ClientStream.CloseSend(); err != nil { - return nil, err - } - m := new(Message) - if err := x.ClientStream.RecvMsg(m); err != nil { - return nil, err - } - return m, nil -} - -func (c *transportClient) TestStream2(ctx context.Context, in *Message, opts ...grpc.CallOption) (Transport_TestStream2Client, error) { - stream, err := c.cc.NewStream(ctx, &Transport_ServiceDesc.Streams[2], "/hello.Transport/TestStream2", opts...) - if err != nil { - return nil, err - } - x := &transportTestStream2Client{stream} - if err := x.ClientStream.SendMsg(in); err != nil { - return nil, err - } - if err := x.ClientStream.CloseSend(); err != nil { - return nil, err - } - return x, nil -} - -type Transport_TestStream2Client interface { - Recv() (*Message, error) - grpc.ClientStream -} - -type transportTestStream2Client struct { - grpc.ClientStream -} - -func (x *transportTestStream2Client) Recv() (*Message, error) { - m := new(Message) - if err := x.ClientStream.RecvMsg(m); err != nil { - return nil, err - } - return m, nil -} - -func (c *transportClient) TestStream3(ctx context.Context, in *Message, opts ...grpc.CallOption) (*Message, error) { - out := new(Message) - err := c.cc.Invoke(ctx, "/hello.Transport/TestStream3", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -// TransportServer is the server API for Transport service. -// All implementations should embed UnimplementedTransportServer -// for forward compatibility -type TransportServer interface { - TestStream(Transport_TestStreamServer) error - TestStream1(Transport_TestStream1Server) error - TestStream2(*Message, Transport_TestStream2Server) error - TestStream3(context.Context, *Message) (*Message, error) -} - -// UnimplementedTransportServer should be embedded to have forward compatible implementations. -type UnimplementedTransportServer struct { -} - -func (UnimplementedTransportServer) TestStream(Transport_TestStreamServer) error { - return status.Errorf(codes.Unimplemented, "method TestStream not implemented") -} -func (UnimplementedTransportServer) TestStream1(Transport_TestStream1Server) error { - return status.Errorf(codes.Unimplemented, "method TestStream1 not implemented") -} -func (UnimplementedTransportServer) TestStream2(*Message, Transport_TestStream2Server) error { - return status.Errorf(codes.Unimplemented, "method TestStream2 not implemented") -} -func (UnimplementedTransportServer) TestStream3(context.Context, *Message) (*Message, error) { - return nil, status.Errorf(codes.Unimplemented, "method TestStream3 not implemented") -} - -// UnsafeTransportServer may be embedded to opt out of forward compatibility for this service. -// Use of this interface is not recommended, as added methods to TransportServer will -// result in compilation errors. -type UnsafeTransportServer interface { - mustEmbedUnimplementedTransportServer() -} - -func RegisterTransportServer(s grpc.ServiceRegistrar, srv TransportServer) { - s.RegisterService(&Transport_ServiceDesc, srv) -} - -func _Transport_TestStream_Handler(srv interface{}, stream grpc.ServerStream) error { - return srv.(TransportServer).TestStream(&transportTestStreamServer{stream}) -} - -type Transport_TestStreamServer interface { - Send(*Message) error - Recv() (*Message, error) - grpc.ServerStream -} - -type transportTestStreamServer struct { - grpc.ServerStream -} - -func (x *transportTestStreamServer) Send(m *Message) error { - return x.ServerStream.SendMsg(m) -} - -func (x *transportTestStreamServer) Recv() (*Message, error) { - m := new(Message) - if err := x.ServerStream.RecvMsg(m); err != nil { - return nil, err - } - return m, nil -} - -func _Transport_TestStream1_Handler(srv interface{}, stream grpc.ServerStream) error { - return srv.(TransportServer).TestStream1(&transportTestStream1Server{stream}) -} - -type Transport_TestStream1Server interface { - SendAndClose(*Message) error - Recv() (*Message, error) - grpc.ServerStream -} - -type transportTestStream1Server struct { - grpc.ServerStream -} - -func (x *transportTestStream1Server) SendAndClose(m *Message) error { - return x.ServerStream.SendMsg(m) -} - -func (x *transportTestStream1Server) Recv() (*Message, error) { - m := new(Message) - if err := x.ServerStream.RecvMsg(m); err != nil { - return nil, err - } - return m, nil -} - -func _Transport_TestStream2_Handler(srv interface{}, stream grpc.ServerStream) error { - m := new(Message) - if err := stream.RecvMsg(m); err != nil { - return err - } - return srv.(TransportServer).TestStream2(m, &transportTestStream2Server{stream}) -} - -type Transport_TestStream2Server interface { - Send(*Message) error - grpc.ServerStream -} - -type transportTestStream2Server struct { - grpc.ServerStream -} - -func (x *transportTestStream2Server) Send(m *Message) error { - return x.ServerStream.SendMsg(m) -} - -func _Transport_TestStream3_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(Message) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(TransportServer).TestStream3(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/hello.Transport/TestStream3", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(TransportServer).TestStream3(ctx, req.(*Message)) - } - return interceptor(ctx, in, info, handler) -} - -// Transport_ServiceDesc is the grpc.ServiceDesc for Transport service. -// It's only intended for direct use with grpc.RegisterService, -// and not to be introspected or modified (even as a copy) -var Transport_ServiceDesc = grpc.ServiceDesc{ - ServiceName: "hello.Transport", - HandlerType: (*TransportServer)(nil), - Methods: []grpc.MethodDesc{ - { - MethodName: "TestStream3", - Handler: _Transport_TestStream3_Handler, - }, - }, - Streams: []grpc.StreamDesc{ - { - StreamName: "TestStream", - Handler: _Transport_TestStream_Handler, - ServerStreams: true, - ClientStreams: true, - }, - { - StreamName: "TestStream1", - Handler: _Transport_TestStream1_Handler, - ClientStreams: true, - }, - { - StreamName: "TestStream2", - Handler: _Transport_TestStream2_Handler, - ServerStreams: true, - }, - }, - Metadata: "proto/hello/transport.proto", -} diff --git a/example/protopb/sqlxpb/code.pb.go b/example/protopb/sqlxpb/code.pb.go deleted file mode 100644 index 22ed4cc8e..000000000 --- a/example/protopb/sqlxpb/code.pb.go +++ /dev/null @@ -1,1265 +0,0 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.28.0 -// protoc v3.19.4 -// source: proto/sqlx/code.proto - -package sqlxpb - -import ( - _ "github.com/pubgo/protobuild/retag" - _ "google.golang.org/genproto/googleapis/api/annotations" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - reflect "reflect" - sync "sync" -) - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -type SendCodeRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // 区号 - NationCode string `protobuf:"bytes,1,opt,name=nationCode,proto3" json:"nationCode,omitempty" hello:"world" hello1:"world1"` - // Types that are assignable to OneOf: - // *SendCodeRequest_A - OneOf isSendCodeRequest_OneOf `protobuf_oneof:"one_of" json:"world"` - // 电话 - Telephone string `protobuf:"bytes,2,opt,name=telephone,proto3" json:"telephone,omitempty"` - // 发送类型,call ,sms - SendType string `protobuf:"bytes,3,opt,name=sendType,proto3" json:"sendType,omitempty"` - // ip - Ip string `protobuf:"bytes,4,opt,name=ip,proto3" json:"ip,omitempty"` -} - -func (x *SendCodeRequest) Reset() { - *x = SendCodeRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_proto_sqlx_code_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *SendCodeRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*SendCodeRequest) ProtoMessage() {} - -func (x *SendCodeRequest) ProtoReflect() protoreflect.Message { - mi := &file_proto_sqlx_code_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use SendCodeRequest.ProtoReflect.Descriptor instead. -func (*SendCodeRequest) Descriptor() ([]byte, []int) { - return file_proto_sqlx_code_proto_rawDescGZIP(), []int{0} -} - -func (x *SendCodeRequest) GetNationCode() string { - if x != nil { - return x.NationCode - } - return "" -} - -func (m *SendCodeRequest) GetOneOf() isSendCodeRequest_OneOf { - if m != nil { - return m.OneOf - } - return nil -} - -func (x *SendCodeRequest) GetA() string { - if x, ok := x.GetOneOf().(*SendCodeRequest_A); ok { - return x.A - } - return "" -} - -func (x *SendCodeRequest) GetTelephone() string { - if x != nil { - return x.Telephone - } - return "" -} - -func (x *SendCodeRequest) GetSendType() string { - if x != nil { - return x.SendType - } - return "" -} - -func (x *SendCodeRequest) GetIp() string { - if x != nil { - return x.Ip - } - return "" -} - -type isSendCodeRequest_OneOf interface { - isSendCodeRequest_OneOf() -} - -type SendCodeRequest_A struct { - A string `protobuf:"bytes,5,opt,name=a,proto3,oneof" json:"world"` -} - -func (*SendCodeRequest_A) isSendCodeRequest_OneOf() {} - -type SendCodeResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // code - Code int64 `protobuf:"varint,1,opt,name=code,proto3" json:"code,omitempty"` - // msg - Msg string `protobuf:"bytes,2,opt,name=msg,proto3" json:"msg,omitempty"` - // 时间戳 - // @gotags: valid:"ip" custom_tag:"custom_value" - NowTime int64 `protobuf:"varint,3,opt,name=nowTime,proto3" json:"nowTime,omitempty"` - // 数据 - Data map[string]string `protobuf:"bytes,4,rep,name=data,proto3" json:"data,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` -} - -func (x *SendCodeResponse) Reset() { - *x = SendCodeResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_proto_sqlx_code_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *SendCodeResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*SendCodeResponse) ProtoMessage() {} - -func (x *SendCodeResponse) ProtoReflect() protoreflect.Message { - mi := &file_proto_sqlx_code_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use SendCodeResponse.ProtoReflect.Descriptor instead. -func (*SendCodeResponse) Descriptor() ([]byte, []int) { - return file_proto_sqlx_code_proto_rawDescGZIP(), []int{1} -} - -func (x *SendCodeResponse) GetCode() int64 { - if x != nil { - return x.Code - } - return 0 -} - -func (x *SendCodeResponse) GetMsg() string { - if x != nil { - return x.Msg - } - return "" -} - -func (x *SendCodeResponse) GetNowTime() int64 { - if x != nil { - return x.NowTime - } - return 0 -} - -func (x *SendCodeResponse) GetData() map[string]string { - if x != nil { - return x.Data - } - return nil -} - -type VerifyRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // 区号 - NationCode string `protobuf:"bytes,1,opt,name=nationCode,proto3" json:"nationCode,omitempty"` - // 手机号 - Telephone string `protobuf:"bytes,2,opt,name=telephone,proto3" json:"telephone,omitempty"` - // 验证码 - Code string `protobuf:"bytes,3,opt,name=code,proto3" json:"code,omitempty"` - // 模板 - Template string `protobuf:"bytes,4,opt,name=template,proto3" json:"template,omitempty"` -} - -func (x *VerifyRequest) Reset() { - *x = VerifyRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_proto_sqlx_code_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *VerifyRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*VerifyRequest) ProtoMessage() {} - -func (x *VerifyRequest) ProtoReflect() protoreflect.Message { - mi := &file_proto_sqlx_code_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use VerifyRequest.ProtoReflect.Descriptor instead. -func (*VerifyRequest) Descriptor() ([]byte, []int) { - return file_proto_sqlx_code_proto_rawDescGZIP(), []int{2} -} - -func (x *VerifyRequest) GetNationCode() string { - if x != nil { - return x.NationCode - } - return "" -} - -func (x *VerifyRequest) GetTelephone() string { - if x != nil { - return x.Telephone - } - return "" -} - -func (x *VerifyRequest) GetCode() string { - if x != nil { - return x.Code - } - return "" -} - -func (x *VerifyRequest) GetTemplate() string { - if x != nil { - return x.Template - } - return "" -} - -type VerifyResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // code - Code int64 `protobuf:"varint,1,opt,name=code,proto3" json:"code,omitempty"` - // msg - Msg string `protobuf:"bytes,2,opt,name=msg,proto3" json:"msg,omitempty"` - // 时间戳 - NowTime int64 `protobuf:"varint,3,opt,name=nowTime,proto3" json:"nowTime,omitempty"` - // 数据 - Data map[string]string `protobuf:"bytes,4,rep,name=data,proto3" json:"data,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` -} - -func (x *VerifyResponse) Reset() { - *x = VerifyResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_proto_sqlx_code_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *VerifyResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*VerifyResponse) ProtoMessage() {} - -func (x *VerifyResponse) ProtoReflect() protoreflect.Message { - mi := &file_proto_sqlx_code_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use VerifyResponse.ProtoReflect.Descriptor instead. -func (*VerifyResponse) Descriptor() ([]byte, []int) { - return file_proto_sqlx_code_proto_rawDescGZIP(), []int{3} -} - -func (x *VerifyResponse) GetCode() int64 { - if x != nil { - return x.Code - } - return 0 -} - -func (x *VerifyResponse) GetMsg() string { - if x != nil { - return x.Msg - } - return "" -} - -func (x *VerifyResponse) GetNowTime() int64 { - if x != nil { - return x.NowTime - } - return 0 -} - -func (x *VerifyResponse) GetData() map[string]string { - if x != nil { - return x.Data - } - return nil -} - -type IsCheckImageCodeRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // 区号 - NationCode string `protobuf:"bytes,1,opt,name=nationCode,proto3" json:"nationCode,omitempty"` - // 手机号 - Telephone string `protobuf:"bytes,2,opt,name=telephone,proto3" json:"telephone,omitempty"` - // 场景 - Scene string `protobuf:"bytes,3,opt,name=scene,proto3" json:"scene,omitempty"` -} - -func (x *IsCheckImageCodeRequest) Reset() { - *x = IsCheckImageCodeRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_proto_sqlx_code_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *IsCheckImageCodeRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*IsCheckImageCodeRequest) ProtoMessage() {} - -func (x *IsCheckImageCodeRequest) ProtoReflect() protoreflect.Message { - mi := &file_proto_sqlx_code_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use IsCheckImageCodeRequest.ProtoReflect.Descriptor instead. -func (*IsCheckImageCodeRequest) Descriptor() ([]byte, []int) { - return file_proto_sqlx_code_proto_rawDescGZIP(), []int{4} -} - -func (x *IsCheckImageCodeRequest) GetNationCode() string { - if x != nil { - return x.NationCode - } - return "" -} - -func (x *IsCheckImageCodeRequest) GetTelephone() string { - if x != nil { - return x.Telephone - } - return "" -} - -func (x *IsCheckImageCodeRequest) GetScene() string { - if x != nil { - return x.Scene - } - return "" -} - -type IsCheckImageCodeResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // code - Code int64 `protobuf:"varint,1,opt,name=code,proto3" json:"code,omitempty"` - // msg - Msg string `protobuf:"bytes,2,opt,name=msg,proto3" json:"msg,omitempty"` - // 时间戳 - NowTime int64 `protobuf:"varint,3,opt,name=nowTime,proto3" json:"nowTime,omitempty"` - // 数据 - Data bool `protobuf:"varint,4,opt,name=data,proto3" json:"data,omitempty"` -} - -func (x *IsCheckImageCodeResponse) Reset() { - *x = IsCheckImageCodeResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_proto_sqlx_code_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *IsCheckImageCodeResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*IsCheckImageCodeResponse) ProtoMessage() {} - -func (x *IsCheckImageCodeResponse) ProtoReflect() protoreflect.Message { - mi := &file_proto_sqlx_code_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use IsCheckImageCodeResponse.ProtoReflect.Descriptor instead. -func (*IsCheckImageCodeResponse) Descriptor() ([]byte, []int) { - return file_proto_sqlx_code_proto_rawDescGZIP(), []int{5} -} - -func (x *IsCheckImageCodeResponse) GetCode() int64 { - if x != nil { - return x.Code - } - return 0 -} - -func (x *IsCheckImageCodeResponse) GetMsg() string { - if x != nil { - return x.Msg - } - return "" -} - -func (x *IsCheckImageCodeResponse) GetNowTime() int64 { - if x != nil { - return x.NowTime - } - return 0 -} - -func (x *IsCheckImageCodeResponse) GetData() bool { - if x != nil { - return x.Data - } - return false -} - -type VerifyImageCodeRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // 区号 - NationCode string `protobuf:"bytes,1,opt,name=nationCode,proto3" json:"nationCode,omitempty"` - // 手机号 - Telephone string `protobuf:"bytes,2,opt,name=telephone,proto3" json:"telephone,omitempty"` - // 图形验证码ticket - Ticket string `protobuf:"bytes,3,opt,name=ticket,proto3" json:"ticket,omitempty"` - // 图形验证码randStr - RandStr string `protobuf:"bytes,4,opt,name=randStr,proto3" json:"randStr,omitempty"` - // 图形验证码ip - Ip string `protobuf:"bytes,5,opt,name=ip,proto3" json:"ip,omitempty"` - // 场景 - Scene string `protobuf:"bytes,6,opt,name=scene,proto3" json:"scene,omitempty"` -} - -func (x *VerifyImageCodeRequest) Reset() { - *x = VerifyImageCodeRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_proto_sqlx_code_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *VerifyImageCodeRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*VerifyImageCodeRequest) ProtoMessage() {} - -func (x *VerifyImageCodeRequest) ProtoReflect() protoreflect.Message { - mi := &file_proto_sqlx_code_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use VerifyImageCodeRequest.ProtoReflect.Descriptor instead. -func (*VerifyImageCodeRequest) Descriptor() ([]byte, []int) { - return file_proto_sqlx_code_proto_rawDescGZIP(), []int{6} -} - -func (x *VerifyImageCodeRequest) GetNationCode() string { - if x != nil { - return x.NationCode - } - return "" -} - -func (x *VerifyImageCodeRequest) GetTelephone() string { - if x != nil { - return x.Telephone - } - return "" -} - -func (x *VerifyImageCodeRequest) GetTicket() string { - if x != nil { - return x.Ticket - } - return "" -} - -func (x *VerifyImageCodeRequest) GetRandStr() string { - if x != nil { - return x.RandStr - } - return "" -} - -func (x *VerifyImageCodeRequest) GetIp() string { - if x != nil { - return x.Ip - } - return "" -} - -func (x *VerifyImageCodeRequest) GetScene() string { - if x != nil { - return x.Scene - } - return "" -} - -type VerifyImageCodeResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // code - Code int64 `protobuf:"varint,1,opt,name=code,proto3" json:"code,omitempty"` - // msg - Msg string `protobuf:"bytes,2,opt,name=msg,proto3" json:"msg,omitempty"` - // 时间戳 - NowTime int64 `protobuf:"varint,3,opt,name=nowTime,proto3" json:"nowTime,omitempty"` -} - -func (x *VerifyImageCodeResponse) Reset() { - *x = VerifyImageCodeResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_proto_sqlx_code_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *VerifyImageCodeResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*VerifyImageCodeResponse) ProtoMessage() {} - -func (x *VerifyImageCodeResponse) ProtoReflect() protoreflect.Message { - mi := &file_proto_sqlx_code_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use VerifyImageCodeResponse.ProtoReflect.Descriptor instead. -func (*VerifyImageCodeResponse) Descriptor() ([]byte, []int) { - return file_proto_sqlx_code_proto_rawDescGZIP(), []int{7} -} - -func (x *VerifyImageCodeResponse) GetCode() int64 { - if x != nil { - return x.Code - } - return 0 -} - -func (x *VerifyImageCodeResponse) GetMsg() string { - if x != nil { - return x.Msg - } - return "" -} - -func (x *VerifyImageCodeResponse) GetNowTime() int64 { - if x != nil { - return x.NowTime - } - return 0 -} - -type GetSendStatusRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // 区号 - NationCode string `protobuf:"bytes,1,opt,name=nationCode,proto3" json:"nationCode,omitempty"` - // 手机号 - Telephone string `protobuf:"bytes,2,opt,name=telephone,proto3" json:"telephone,omitempty"` - // 发送类型 - SendType string `protobuf:"bytes,3,opt,name=sendType,proto3" json:"sendType,omitempty"` - // 模板 - Template string `protobuf:"bytes,4,opt,name=template,proto3" json:"template,omitempty"` - // 是否越狱标示 - SignR int64 `protobuf:"varint,5,opt,name=signR,proto3" json:"signR,omitempty"` - // ip - Ip string `protobuf:"bytes,6,opt,name=ip,proto3" json:"ip,omitempty"` -} - -func (x *GetSendStatusRequest) Reset() { - *x = GetSendStatusRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_proto_sqlx_code_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *GetSendStatusRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GetSendStatusRequest) ProtoMessage() {} - -func (x *GetSendStatusRequest) ProtoReflect() protoreflect.Message { - mi := &file_proto_sqlx_code_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use GetSendStatusRequest.ProtoReflect.Descriptor instead. -func (*GetSendStatusRequest) Descriptor() ([]byte, []int) { - return file_proto_sqlx_code_proto_rawDescGZIP(), []int{8} -} - -func (x *GetSendStatusRequest) GetNationCode() string { - if x != nil { - return x.NationCode - } - return "" -} - -func (x *GetSendStatusRequest) GetTelephone() string { - if x != nil { - return x.Telephone - } - return "" -} - -func (x *GetSendStatusRequest) GetSendType() string { - if x != nil { - return x.SendType - } - return "" -} - -func (x *GetSendStatusRequest) GetTemplate() string { - if x != nil { - return x.Template - } - return "" -} - -func (x *GetSendStatusRequest) GetSignR() int64 { - if x != nil { - return x.SignR - } - return 0 -} - -func (x *GetSendStatusRequest) GetIp() string { - if x != nil { - return x.Ip - } - return "" -} - -type GetSendStatusResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // code - Code int64 `protobuf:"varint,1,opt,name=code,proto3" json:"code,omitempty"` - // msg - Msg string `protobuf:"bytes,2,opt,name=msg,proto3" json:"msg,omitempty"` - // 时间戳 - NowTime int64 `protobuf:"varint,3,opt,name=nowTime,proto3" json:"nowTime,omitempty"` - // 数据 - Data *SendStatus `protobuf:"bytes,4,opt,name=data,proto3" json:"data,omitempty"` -} - -func (x *GetSendStatusResponse) Reset() { - *x = GetSendStatusResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_proto_sqlx_code_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *GetSendStatusResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GetSendStatusResponse) ProtoMessage() {} - -func (x *GetSendStatusResponse) ProtoReflect() protoreflect.Message { - mi := &file_proto_sqlx_code_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use GetSendStatusResponse.ProtoReflect.Descriptor instead. -func (*GetSendStatusResponse) Descriptor() ([]byte, []int) { - return file_proto_sqlx_code_proto_rawDescGZIP(), []int{9} -} - -func (x *GetSendStatusResponse) GetCode() int64 { - if x != nil { - return x.Code - } - return 0 -} - -func (x *GetSendStatusResponse) GetMsg() string { - if x != nil { - return x.Msg - } - return "" -} - -func (x *GetSendStatusResponse) GetNowTime() int64 { - if x != nil { - return x.NowTime - } - return 0 -} - -func (x *GetSendStatusResponse) GetData() *SendStatus { - if x != nil { - return x.Data - } - return nil -} - -type SendStatus struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // 需要图形验证码 - NeedImageCode bool `protobuf:"varint,1,opt,name=needImageCode,proto3" json:"needImageCode,omitempty"` - // 强制语音 - ForceCall bool `protobuf:"varint,2,opt,name=forceCall,proto3" json:"forceCall,omitempty"` - // 被禁止 - IsForbidden bool `protobuf:"varint,3,opt,name=isForbidden,proto3" json:"isForbidden,omitempty"` - // 数量超限制 - NumberLimit bool `protobuf:"varint,4,opt,name=numberLimit,proto3" json:"numberLimit,omitempty"` -} - -func (x *SendStatus) Reset() { - *x = SendStatus{} - if protoimpl.UnsafeEnabled { - mi := &file_proto_sqlx_code_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *SendStatus) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*SendStatus) ProtoMessage() {} - -func (x *SendStatus) ProtoReflect() protoreflect.Message { - mi := &file_proto_sqlx_code_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use SendStatus.ProtoReflect.Descriptor instead. -func (*SendStatus) Descriptor() ([]byte, []int) { - return file_proto_sqlx_code_proto_rawDescGZIP(), []int{10} -} - -func (x *SendStatus) GetNeedImageCode() bool { - if x != nil { - return x.NeedImageCode - } - return false -} - -func (x *SendStatus) GetForceCall() bool { - if x != nil { - return x.ForceCall - } - return false -} - -func (x *SendStatus) GetIsForbidden() bool { - if x != nil { - return x.IsForbidden - } - return false -} - -func (x *SendStatus) GetNumberLimit() bool { - if x != nil { - return x.NumberLimit - } - return false -} - -var File_proto_sqlx_code_proto protoreflect.FileDescriptor - -var file_proto_sqlx_code_proto_rawDesc = []byte{ - 0x0a, 0x15, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x73, 0x71, 0x6c, 0x78, 0x2f, 0x63, 0x6f, 0x64, - 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0d, 0x68, 0x65, 0x6c, 0x6c, 0x6f, 0x2e, 0x76, - 0x31, 0x2e, 0x73, 0x71, 0x6c, 0x78, 0x1a, 0x1c, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, - 0x70, 0x69, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x11, 0x72, 0x65, 0x74, 0x61, 0x67, 0x2f, 0x72, 0x65, 0x74, 0x61, - 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xe3, 0x01, 0x0a, 0x0f, 0x53, 0x65, 0x6e, 0x64, - 0x43, 0x6f, 0x64, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x46, 0x0a, 0x0a, 0x6e, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x64, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, - 0x26, 0x82, 0xea, 0x30, 0x0e, 0x0a, 0x05, 0x68, 0x65, 0x6c, 0x6c, 0x6f, 0x12, 0x05, 0x77, 0x6f, - 0x72, 0x6c, 0x64, 0x82, 0xea, 0x30, 0x10, 0x0a, 0x06, 0x68, 0x65, 0x6c, 0x6c, 0x6f, 0x31, 0x12, - 0x06, 0x77, 0x6f, 0x72, 0x6c, 0x64, 0x31, 0x52, 0x0a, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x43, - 0x6f, 0x64, 0x65, 0x12, 0x21, 0x0a, 0x01, 0x61, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x42, 0x11, - 0x82, 0xea, 0x30, 0x0d, 0x0a, 0x04, 0x6a, 0x73, 0x6f, 0x6e, 0x12, 0x05, 0x77, 0x6f, 0x72, 0x6c, - 0x64, 0x48, 0x00, 0x52, 0x01, 0x61, 0x12, 0x1c, 0x0a, 0x09, 0x74, 0x65, 0x6c, 0x65, 0x70, 0x68, - 0x6f, 0x6e, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x74, 0x65, 0x6c, 0x65, 0x70, - 0x68, 0x6f, 0x6e, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x73, 0x65, 0x6e, 0x64, 0x54, 0x79, 0x70, 0x65, - 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x73, 0x65, 0x6e, 0x64, 0x54, 0x79, 0x70, 0x65, - 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x70, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x70, - 0x42, 0x1b, 0x0a, 0x06, 0x6f, 0x6e, 0x65, 0x5f, 0x6f, 0x66, 0x12, 0x11, 0x82, 0xea, 0x30, 0x0d, - 0x0a, 0x04, 0x6a, 0x73, 0x6f, 0x6e, 0x12, 0x05, 0x77, 0x6f, 0x72, 0x6c, 0x64, 0x22, 0xca, 0x01, - 0x0a, 0x10, 0x53, 0x65, 0x6e, 0x64, 0x43, 0x6f, 0x64, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, - 0x52, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x6d, 0x73, 0x67, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x03, 0x6d, 0x73, 0x67, 0x12, 0x18, 0x0a, 0x07, 0x6e, 0x6f, 0x77, 0x54, - 0x69, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x07, 0x6e, 0x6f, 0x77, 0x54, 0x69, - 0x6d, 0x65, 0x12, 0x3d, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, - 0x32, 0x29, 0x2e, 0x68, 0x65, 0x6c, 0x6c, 0x6f, 0x2e, 0x76, 0x31, 0x2e, 0x73, 0x71, 0x6c, 0x78, - 0x2e, 0x53, 0x65, 0x6e, 0x64, 0x43, 0x6f, 0x64, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x2e, 0x44, 0x61, 0x74, 0x61, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x04, 0x64, 0x61, 0x74, - 0x61, 0x1a, 0x37, 0x0a, 0x09, 0x44, 0x61, 0x74, 0x61, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, - 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, - 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0x7d, 0x0a, 0x0d, 0x56, 0x65, - 0x72, 0x69, 0x66, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1e, 0x0a, 0x0a, 0x6e, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x64, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x0a, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x64, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x74, - 0x65, 0x6c, 0x65, 0x70, 0x68, 0x6f, 0x6e, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, - 0x74, 0x65, 0x6c, 0x65, 0x70, 0x68, 0x6f, 0x6e, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x63, 0x6f, 0x64, - 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x12, 0x1a, 0x0a, - 0x08, 0x74, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x08, 0x74, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x22, 0xc6, 0x01, 0x0a, 0x0e, 0x56, 0x65, - 0x72, 0x69, 0x66, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x12, 0x0a, 0x04, - 0x63, 0x6f, 0x64, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x04, 0x63, 0x6f, 0x64, 0x65, - 0x12, 0x10, 0x0a, 0x03, 0x6d, 0x73, 0x67, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6d, - 0x73, 0x67, 0x12, 0x18, 0x0a, 0x07, 0x6e, 0x6f, 0x77, 0x54, 0x69, 0x6d, 0x65, 0x18, 0x03, 0x20, - 0x01, 0x28, 0x03, 0x52, 0x07, 0x6e, 0x6f, 0x77, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x3b, 0x0a, 0x04, - 0x64, 0x61, 0x74, 0x61, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x68, 0x65, 0x6c, - 0x6c, 0x6f, 0x2e, 0x76, 0x31, 0x2e, 0x73, 0x71, 0x6c, 0x78, 0x2e, 0x56, 0x65, 0x72, 0x69, 0x66, - 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x44, 0x61, 0x74, 0x61, 0x45, 0x6e, - 0x74, 0x72, 0x79, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x1a, 0x37, 0x0a, 0x09, 0x44, 0x61, 0x74, - 0x61, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, - 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, - 0x38, 0x01, 0x22, 0x6d, 0x0a, 0x17, 0x49, 0x73, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x49, 0x6d, 0x61, - 0x67, 0x65, 0x43, 0x6f, 0x64, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1e, 0x0a, - 0x0a, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x64, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x0a, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x64, 0x65, 0x12, 0x1c, 0x0a, - 0x09, 0x74, 0x65, 0x6c, 0x65, 0x70, 0x68, 0x6f, 0x6e, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x09, 0x74, 0x65, 0x6c, 0x65, 0x70, 0x68, 0x6f, 0x6e, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x73, - 0x63, 0x65, 0x6e, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x73, 0x63, 0x65, 0x6e, - 0x65, 0x22, 0x6e, 0x0a, 0x18, 0x49, 0x73, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x49, 0x6d, 0x61, 0x67, - 0x65, 0x43, 0x6f, 0x64, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x12, 0x0a, - 0x04, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x04, 0x63, 0x6f, 0x64, - 0x65, 0x12, 0x10, 0x0a, 0x03, 0x6d, 0x73, 0x67, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, - 0x6d, 0x73, 0x67, 0x12, 0x18, 0x0a, 0x07, 0x6e, 0x6f, 0x77, 0x54, 0x69, 0x6d, 0x65, 0x18, 0x03, - 0x20, 0x01, 0x28, 0x03, 0x52, 0x07, 0x6e, 0x6f, 0x77, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x12, 0x0a, - 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, 0x04, 0x64, 0x61, 0x74, - 0x61, 0x22, 0xae, 0x01, 0x0a, 0x16, 0x56, 0x65, 0x72, 0x69, 0x66, 0x79, 0x49, 0x6d, 0x61, 0x67, - 0x65, 0x43, 0x6f, 0x64, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1e, 0x0a, 0x0a, - 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x64, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x0a, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x64, 0x65, 0x12, 0x1c, 0x0a, 0x09, - 0x74, 0x65, 0x6c, 0x65, 0x70, 0x68, 0x6f, 0x6e, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x09, 0x74, 0x65, 0x6c, 0x65, 0x70, 0x68, 0x6f, 0x6e, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x74, 0x69, - 0x63, 0x6b, 0x65, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x74, 0x69, 0x63, 0x6b, - 0x65, 0x74, 0x12, 0x18, 0x0a, 0x07, 0x72, 0x61, 0x6e, 0x64, 0x53, 0x74, 0x72, 0x18, 0x04, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x07, 0x72, 0x61, 0x6e, 0x64, 0x53, 0x74, 0x72, 0x12, 0x0e, 0x0a, 0x02, - 0x69, 0x70, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x70, 0x12, 0x14, 0x0a, 0x05, - 0x73, 0x63, 0x65, 0x6e, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x73, 0x63, 0x65, - 0x6e, 0x65, 0x22, 0x59, 0x0a, 0x17, 0x56, 0x65, 0x72, 0x69, 0x66, 0x79, 0x49, 0x6d, 0x61, 0x67, - 0x65, 0x43, 0x6f, 0x64, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x12, 0x0a, - 0x04, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x04, 0x63, 0x6f, 0x64, - 0x65, 0x12, 0x10, 0x0a, 0x03, 0x6d, 0x73, 0x67, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, - 0x6d, 0x73, 0x67, 0x12, 0x18, 0x0a, 0x07, 0x6e, 0x6f, 0x77, 0x54, 0x69, 0x6d, 0x65, 0x18, 0x03, - 0x20, 0x01, 0x28, 0x03, 0x52, 0x07, 0x6e, 0x6f, 0x77, 0x54, 0x69, 0x6d, 0x65, 0x22, 0xb2, 0x01, - 0x0a, 0x14, 0x47, 0x65, 0x74, 0x53, 0x65, 0x6e, 0x64, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1e, 0x0a, 0x0a, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x43, 0x6f, 0x64, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x6e, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x43, 0x6f, 0x64, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x74, 0x65, 0x6c, 0x65, 0x70, 0x68, - 0x6f, 0x6e, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x74, 0x65, 0x6c, 0x65, 0x70, - 0x68, 0x6f, 0x6e, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x73, 0x65, 0x6e, 0x64, 0x54, 0x79, 0x70, 0x65, - 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x73, 0x65, 0x6e, 0x64, 0x54, 0x79, 0x70, 0x65, - 0x12, 0x1a, 0x0a, 0x08, 0x74, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x18, 0x04, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x08, 0x74, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x12, 0x14, 0x0a, 0x05, - 0x73, 0x69, 0x67, 0x6e, 0x52, 0x18, 0x05, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x73, 0x69, 0x67, - 0x6e, 0x52, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x70, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, - 0x69, 0x70, 0x22, 0x86, 0x01, 0x0a, 0x15, 0x47, 0x65, 0x74, 0x53, 0x65, 0x6e, 0x64, 0x53, 0x74, - 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x12, 0x0a, 0x04, - 0x63, 0x6f, 0x64, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x04, 0x63, 0x6f, 0x64, 0x65, - 0x12, 0x10, 0x0a, 0x03, 0x6d, 0x73, 0x67, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6d, - 0x73, 0x67, 0x12, 0x18, 0x0a, 0x07, 0x6e, 0x6f, 0x77, 0x54, 0x69, 0x6d, 0x65, 0x18, 0x03, 0x20, - 0x01, 0x28, 0x03, 0x52, 0x07, 0x6e, 0x6f, 0x77, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x2d, 0x0a, 0x04, - 0x64, 0x61, 0x74, 0x61, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x68, 0x65, 0x6c, - 0x6c, 0x6f, 0x2e, 0x76, 0x31, 0x2e, 0x73, 0x71, 0x6c, 0x78, 0x2e, 0x53, 0x65, 0x6e, 0x64, 0x53, - 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x22, 0x94, 0x01, 0x0a, 0x0a, - 0x53, 0x65, 0x6e, 0x64, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x24, 0x0a, 0x0d, 0x6e, 0x65, - 0x65, 0x64, 0x49, 0x6d, 0x61, 0x67, 0x65, 0x43, 0x6f, 0x64, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x08, 0x52, 0x0d, 0x6e, 0x65, 0x65, 0x64, 0x49, 0x6d, 0x61, 0x67, 0x65, 0x43, 0x6f, 0x64, 0x65, - 0x12, 0x1c, 0x0a, 0x09, 0x66, 0x6f, 0x72, 0x63, 0x65, 0x43, 0x61, 0x6c, 0x6c, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x08, 0x52, 0x09, 0x66, 0x6f, 0x72, 0x63, 0x65, 0x43, 0x61, 0x6c, 0x6c, 0x12, 0x20, - 0x0a, 0x0b, 0x69, 0x73, 0x46, 0x6f, 0x72, 0x62, 0x69, 0x64, 0x64, 0x65, 0x6e, 0x18, 0x03, 0x20, - 0x01, 0x28, 0x08, 0x52, 0x0b, 0x69, 0x73, 0x46, 0x6f, 0x72, 0x62, 0x69, 0x64, 0x64, 0x65, 0x6e, - 0x12, 0x20, 0x0a, 0x0b, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x18, - 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0b, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x4c, 0x69, 0x6d, - 0x69, 0x74, 0x32, 0xfa, 0x04, 0x0a, 0x04, 0x43, 0x6f, 0x64, 0x65, 0x12, 0x6c, 0x0a, 0x08, 0x53, - 0x65, 0x6e, 0x64, 0x43, 0x6f, 0x64, 0x65, 0x12, 0x1e, 0x2e, 0x68, 0x65, 0x6c, 0x6c, 0x6f, 0x2e, - 0x76, 0x31, 0x2e, 0x73, 0x71, 0x6c, 0x78, 0x2e, 0x53, 0x65, 0x6e, 0x64, 0x43, 0x6f, 0x64, 0x65, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1f, 0x2e, 0x68, 0x65, 0x6c, 0x6c, 0x6f, 0x2e, - 0x76, 0x31, 0x2e, 0x73, 0x71, 0x6c, 0x78, 0x2e, 0x53, 0x65, 0x6e, 0x64, 0x43, 0x6f, 0x64, 0x65, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x1f, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x19, - 0x22, 0x14, 0x2f, 0x75, 0x73, 0x65, 0x72, 0x2f, 0x63, 0x6f, 0x64, 0x65, 0x2f, 0x73, 0x65, 0x6e, - 0x64, 0x2d, 0x63, 0x6f, 0x64, 0x65, 0x3a, 0x01, 0x2a, 0x12, 0x63, 0x0a, 0x06, 0x56, 0x65, 0x72, - 0x69, 0x66, 0x79, 0x12, 0x1c, 0x2e, 0x68, 0x65, 0x6c, 0x6c, 0x6f, 0x2e, 0x76, 0x31, 0x2e, 0x73, - 0x71, 0x6c, 0x78, 0x2e, 0x56, 0x65, 0x72, 0x69, 0x66, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x1a, 0x1d, 0x2e, 0x68, 0x65, 0x6c, 0x6c, 0x6f, 0x2e, 0x76, 0x31, 0x2e, 0x73, 0x71, 0x6c, - 0x78, 0x2e, 0x56, 0x65, 0x72, 0x69, 0x66, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x22, 0x1c, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x16, 0x22, 0x11, 0x2f, 0x75, 0x73, 0x65, 0x72, 0x2f, - 0x63, 0x6f, 0x64, 0x65, 0x2f, 0x76, 0x65, 0x72, 0x69, 0x66, 0x79, 0x3a, 0x01, 0x2a, 0x12, 0x8e, - 0x01, 0x0a, 0x10, 0x49, 0x73, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x49, 0x6d, 0x61, 0x67, 0x65, 0x43, - 0x6f, 0x64, 0x65, 0x12, 0x26, 0x2e, 0x68, 0x65, 0x6c, 0x6c, 0x6f, 0x2e, 0x76, 0x31, 0x2e, 0x73, - 0x71, 0x6c, 0x78, 0x2e, 0x49, 0x73, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x49, 0x6d, 0x61, 0x67, 0x65, - 0x43, 0x6f, 0x64, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x27, 0x2e, 0x68, 0x65, - 0x6c, 0x6c, 0x6f, 0x2e, 0x76, 0x31, 0x2e, 0x73, 0x71, 0x6c, 0x78, 0x2e, 0x49, 0x73, 0x43, 0x68, - 0x65, 0x63, 0x6b, 0x49, 0x6d, 0x61, 0x67, 0x65, 0x43, 0x6f, 0x64, 0x65, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x29, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x23, 0x22, 0x1e, 0x2f, 0x75, - 0x73, 0x65, 0x72, 0x2f, 0x63, 0x6f, 0x64, 0x65, 0x2f, 0x69, 0x73, 0x2d, 0x63, 0x68, 0x65, 0x63, - 0x6b, 0x2d, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x2d, 0x63, 0x6f, 0x64, 0x65, 0x3a, 0x01, 0x2a, 0x12, - 0x89, 0x01, 0x0a, 0x0f, 0x56, 0x65, 0x72, 0x69, 0x66, 0x79, 0x49, 0x6d, 0x61, 0x67, 0x65, 0x43, - 0x6f, 0x64, 0x65, 0x12, 0x25, 0x2e, 0x68, 0x65, 0x6c, 0x6c, 0x6f, 0x2e, 0x76, 0x31, 0x2e, 0x73, - 0x71, 0x6c, 0x78, 0x2e, 0x56, 0x65, 0x72, 0x69, 0x66, 0x79, 0x49, 0x6d, 0x61, 0x67, 0x65, 0x43, - 0x6f, 0x64, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x26, 0x2e, 0x68, 0x65, 0x6c, - 0x6c, 0x6f, 0x2e, 0x76, 0x31, 0x2e, 0x73, 0x71, 0x6c, 0x78, 0x2e, 0x56, 0x65, 0x72, 0x69, 0x66, - 0x79, 0x49, 0x6d, 0x61, 0x67, 0x65, 0x43, 0x6f, 0x64, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x22, 0x27, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x21, 0x22, 0x1c, 0x2f, 0x75, 0x73, 0x65, - 0x72, 0x2f, 0x63, 0x6f, 0x64, 0x65, 0x2f, 0x76, 0x65, 0x72, 0x69, 0x66, 0x79, 0x2d, 0x69, 0x6d, - 0x61, 0x67, 0x65, 0x2d, 0x63, 0x6f, 0x64, 0x65, 0x3a, 0x01, 0x2a, 0x12, 0x81, 0x01, 0x0a, 0x0d, - 0x47, 0x65, 0x74, 0x53, 0x65, 0x6e, 0x64, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x23, 0x2e, - 0x68, 0x65, 0x6c, 0x6c, 0x6f, 0x2e, 0x76, 0x31, 0x2e, 0x73, 0x71, 0x6c, 0x78, 0x2e, 0x47, 0x65, - 0x74, 0x53, 0x65, 0x6e, 0x64, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x1a, 0x24, 0x2e, 0x68, 0x65, 0x6c, 0x6c, 0x6f, 0x2e, 0x76, 0x31, 0x2e, 0x73, 0x71, - 0x6c, 0x78, 0x2e, 0x47, 0x65, 0x74, 0x53, 0x65, 0x6e, 0x64, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x25, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1f, - 0x22, 0x1a, 0x2f, 0x75, 0x73, 0x65, 0x72, 0x2f, 0x63, 0x6f, 0x64, 0x65, 0x2f, 0x67, 0x65, 0x74, - 0x2d, 0x73, 0x65, 0x6e, 0x64, 0x2d, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x3a, 0x01, 0x2a, 0x42, - 0x0a, 0x5a, 0x08, 0x2e, 0x2f, 0x73, 0x71, 0x6c, 0x78, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x33, -} - -var ( - file_proto_sqlx_code_proto_rawDescOnce sync.Once - file_proto_sqlx_code_proto_rawDescData = file_proto_sqlx_code_proto_rawDesc -) - -func file_proto_sqlx_code_proto_rawDescGZIP() []byte { - file_proto_sqlx_code_proto_rawDescOnce.Do(func() { - file_proto_sqlx_code_proto_rawDescData = protoimpl.X.CompressGZIP(file_proto_sqlx_code_proto_rawDescData) - }) - return file_proto_sqlx_code_proto_rawDescData -} - -var file_proto_sqlx_code_proto_msgTypes = make([]protoimpl.MessageInfo, 13) -var file_proto_sqlx_code_proto_goTypes = []interface{}{ - (*SendCodeRequest)(nil), // 0: hello.v1.sqlx.SendCodeRequest - (*SendCodeResponse)(nil), // 1: hello.v1.sqlx.SendCodeResponse - (*VerifyRequest)(nil), // 2: hello.v1.sqlx.VerifyRequest - (*VerifyResponse)(nil), // 3: hello.v1.sqlx.VerifyResponse - (*IsCheckImageCodeRequest)(nil), // 4: hello.v1.sqlx.IsCheckImageCodeRequest - (*IsCheckImageCodeResponse)(nil), // 5: hello.v1.sqlx.IsCheckImageCodeResponse - (*VerifyImageCodeRequest)(nil), // 6: hello.v1.sqlx.VerifyImageCodeRequest - (*VerifyImageCodeResponse)(nil), // 7: hello.v1.sqlx.VerifyImageCodeResponse - (*GetSendStatusRequest)(nil), // 8: hello.v1.sqlx.GetSendStatusRequest - (*GetSendStatusResponse)(nil), // 9: hello.v1.sqlx.GetSendStatusResponse - (*SendStatus)(nil), // 10: hello.v1.sqlx.SendStatus - nil, // 11: hello.v1.sqlx.SendCodeResponse.DataEntry - nil, // 12: hello.v1.sqlx.VerifyResponse.DataEntry -} -var file_proto_sqlx_code_proto_depIdxs = []int32{ - 11, // 0: hello.v1.sqlx.SendCodeResponse.data:type_name -> hello.v1.sqlx.SendCodeResponse.DataEntry - 12, // 1: hello.v1.sqlx.VerifyResponse.data:type_name -> hello.v1.sqlx.VerifyResponse.DataEntry - 10, // 2: hello.v1.sqlx.GetSendStatusResponse.data:type_name -> hello.v1.sqlx.SendStatus - 0, // 3: hello.v1.sqlx.Code.SendCode:input_type -> hello.v1.sqlx.SendCodeRequest - 2, // 4: hello.v1.sqlx.Code.Verify:input_type -> hello.v1.sqlx.VerifyRequest - 4, // 5: hello.v1.sqlx.Code.IsCheckImageCode:input_type -> hello.v1.sqlx.IsCheckImageCodeRequest - 6, // 6: hello.v1.sqlx.Code.VerifyImageCode:input_type -> hello.v1.sqlx.VerifyImageCodeRequest - 8, // 7: hello.v1.sqlx.Code.GetSendStatus:input_type -> hello.v1.sqlx.GetSendStatusRequest - 1, // 8: hello.v1.sqlx.Code.SendCode:output_type -> hello.v1.sqlx.SendCodeResponse - 3, // 9: hello.v1.sqlx.Code.Verify:output_type -> hello.v1.sqlx.VerifyResponse - 5, // 10: hello.v1.sqlx.Code.IsCheckImageCode:output_type -> hello.v1.sqlx.IsCheckImageCodeResponse - 7, // 11: hello.v1.sqlx.Code.VerifyImageCode:output_type -> hello.v1.sqlx.VerifyImageCodeResponse - 9, // 12: hello.v1.sqlx.Code.GetSendStatus:output_type -> hello.v1.sqlx.GetSendStatusResponse - 8, // [8:13] is the sub-list for method output_type - 3, // [3:8] is the sub-list for method input_type - 3, // [3:3] is the sub-list for extension type_name - 3, // [3:3] is the sub-list for extension extendee - 0, // [0:3] is the sub-list for field type_name -} - -func init() { file_proto_sqlx_code_proto_init() } -func file_proto_sqlx_code_proto_init() { - if File_proto_sqlx_code_proto != nil { - return - } - if !protoimpl.UnsafeEnabled { - file_proto_sqlx_code_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*SendCodeRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_proto_sqlx_code_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*SendCodeResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_proto_sqlx_code_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*VerifyRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_proto_sqlx_code_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*VerifyResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_proto_sqlx_code_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*IsCheckImageCodeRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_proto_sqlx_code_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*IsCheckImageCodeResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_proto_sqlx_code_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*VerifyImageCodeRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_proto_sqlx_code_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*VerifyImageCodeResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_proto_sqlx_code_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetSendStatusRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_proto_sqlx_code_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetSendStatusResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_proto_sqlx_code_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*SendStatus); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - file_proto_sqlx_code_proto_msgTypes[0].OneofWrappers = []interface{}{ - (*SendCodeRequest_A)(nil), - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_proto_sqlx_code_proto_rawDesc, - NumEnums: 0, - NumMessages: 13, - NumExtensions: 0, - NumServices: 1, - }, - GoTypes: file_proto_sqlx_code_proto_goTypes, - DependencyIndexes: file_proto_sqlx_code_proto_depIdxs, - MessageInfos: file_proto_sqlx_code_proto_msgTypes, - }.Build() - File_proto_sqlx_code_proto = out.File - file_proto_sqlx_code_proto_rawDesc = nil - file_proto_sqlx_code_proto_goTypes = nil - file_proto_sqlx_code_proto_depIdxs = nil -} diff --git a/example/protopb/sqlxpb/code_grpc.pb.go b/example/protopb/sqlxpb/code_grpc.pb.go deleted file mode 100644 index 0ae368974..000000000 --- a/example/protopb/sqlxpb/code_grpc.pb.go +++ /dev/null @@ -1,253 +0,0 @@ -// Code generated by protoc-gen-go-grpc. DO NOT EDIT. - -package sqlxpb - -import ( - context "context" - grpc "google.golang.org/grpc" - codes "google.golang.org/grpc/codes" - status "google.golang.org/grpc/status" -) - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the grpc package it is being compiled against. -// Requires gRPC-Go v1.32.0 or later. -const _ = grpc.SupportPackageIsVersion7 - -// CodeClient is the client API for Code service. -// -// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. -type CodeClient interface { - // 发送 - SendCode(ctx context.Context, in *SendCodeRequest, opts ...grpc.CallOption) (*SendCodeResponse, error) - // 校验 - Verify(ctx context.Context, in *VerifyRequest, opts ...grpc.CallOption) (*VerifyResponse, error) - // 是否校验图片验证码 - IsCheckImageCode(ctx context.Context, in *IsCheckImageCodeRequest, opts ...grpc.CallOption) (*IsCheckImageCodeResponse, error) - // 校验图片验证码 - VerifyImageCode(ctx context.Context, in *VerifyImageCodeRequest, opts ...grpc.CallOption) (*VerifyImageCodeResponse, error) - // 获取发送状态 - GetSendStatus(ctx context.Context, in *GetSendStatusRequest, opts ...grpc.CallOption) (*GetSendStatusResponse, error) -} - -type codeClient struct { - cc grpc.ClientConnInterface -} - -func NewCodeClient(cc grpc.ClientConnInterface) CodeClient { - return &codeClient{cc} -} - -func (c *codeClient) SendCode(ctx context.Context, in *SendCodeRequest, opts ...grpc.CallOption) (*SendCodeResponse, error) { - out := new(SendCodeResponse) - err := c.cc.Invoke(ctx, "/hello.v1.sqlx.Code/SendCode", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *codeClient) Verify(ctx context.Context, in *VerifyRequest, opts ...grpc.CallOption) (*VerifyResponse, error) { - out := new(VerifyResponse) - err := c.cc.Invoke(ctx, "/hello.v1.sqlx.Code/Verify", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *codeClient) IsCheckImageCode(ctx context.Context, in *IsCheckImageCodeRequest, opts ...grpc.CallOption) (*IsCheckImageCodeResponse, error) { - out := new(IsCheckImageCodeResponse) - err := c.cc.Invoke(ctx, "/hello.v1.sqlx.Code/IsCheckImageCode", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *codeClient) VerifyImageCode(ctx context.Context, in *VerifyImageCodeRequest, opts ...grpc.CallOption) (*VerifyImageCodeResponse, error) { - out := new(VerifyImageCodeResponse) - err := c.cc.Invoke(ctx, "/hello.v1.sqlx.Code/VerifyImageCode", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *codeClient) GetSendStatus(ctx context.Context, in *GetSendStatusRequest, opts ...grpc.CallOption) (*GetSendStatusResponse, error) { - out := new(GetSendStatusResponse) - err := c.cc.Invoke(ctx, "/hello.v1.sqlx.Code/GetSendStatus", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -// CodeServer is the server API for Code service. -// All implementations should embed UnimplementedCodeServer -// for forward compatibility -type CodeServer interface { - // 发送 - SendCode(context.Context, *SendCodeRequest) (*SendCodeResponse, error) - // 校验 - Verify(context.Context, *VerifyRequest) (*VerifyResponse, error) - // 是否校验图片验证码 - IsCheckImageCode(context.Context, *IsCheckImageCodeRequest) (*IsCheckImageCodeResponse, error) - // 校验图片验证码 - VerifyImageCode(context.Context, *VerifyImageCodeRequest) (*VerifyImageCodeResponse, error) - // 获取发送状态 - GetSendStatus(context.Context, *GetSendStatusRequest) (*GetSendStatusResponse, error) -} - -// UnimplementedCodeServer should be embedded to have forward compatible implementations. -type UnimplementedCodeServer struct { -} - -func (UnimplementedCodeServer) SendCode(context.Context, *SendCodeRequest) (*SendCodeResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method SendCode not implemented") -} -func (UnimplementedCodeServer) Verify(context.Context, *VerifyRequest) (*VerifyResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method Verify not implemented") -} -func (UnimplementedCodeServer) IsCheckImageCode(context.Context, *IsCheckImageCodeRequest) (*IsCheckImageCodeResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method IsCheckImageCode not implemented") -} -func (UnimplementedCodeServer) VerifyImageCode(context.Context, *VerifyImageCodeRequest) (*VerifyImageCodeResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method VerifyImageCode not implemented") -} -func (UnimplementedCodeServer) GetSendStatus(context.Context, *GetSendStatusRequest) (*GetSendStatusResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetSendStatus not implemented") -} - -// UnsafeCodeServer may be embedded to opt out of forward compatibility for this service. -// Use of this interface is not recommended, as added methods to CodeServer will -// result in compilation errors. -type UnsafeCodeServer interface { - mustEmbedUnimplementedCodeServer() -} - -func RegisterCodeServer(s grpc.ServiceRegistrar, srv CodeServer) { - s.RegisterService(&Code_ServiceDesc, srv) -} - -func _Code_SendCode_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(SendCodeRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(CodeServer).SendCode(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/hello.v1.sqlx.Code/SendCode", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(CodeServer).SendCode(ctx, req.(*SendCodeRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _Code_Verify_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(VerifyRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(CodeServer).Verify(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/hello.v1.sqlx.Code/Verify", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(CodeServer).Verify(ctx, req.(*VerifyRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _Code_IsCheckImageCode_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(IsCheckImageCodeRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(CodeServer).IsCheckImageCode(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/hello.v1.sqlx.Code/IsCheckImageCode", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(CodeServer).IsCheckImageCode(ctx, req.(*IsCheckImageCodeRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _Code_VerifyImageCode_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(VerifyImageCodeRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(CodeServer).VerifyImageCode(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/hello.v1.sqlx.Code/VerifyImageCode", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(CodeServer).VerifyImageCode(ctx, req.(*VerifyImageCodeRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _Code_GetSendStatus_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(GetSendStatusRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(CodeServer).GetSendStatus(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/hello.v1.sqlx.Code/GetSendStatus", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(CodeServer).GetSendStatus(ctx, req.(*GetSendStatusRequest)) - } - return interceptor(ctx, in, info, handler) -} - -// Code_ServiceDesc is the grpc.ServiceDesc for Code service. -// It's only intended for direct use with grpc.RegisterService, -// and not to be introspected or modified (even as a copy) -var Code_ServiceDesc = grpc.ServiceDesc{ - ServiceName: "hello.v1.sqlx.Code", - HandlerType: (*CodeServer)(nil), - Methods: []grpc.MethodDesc{ - { - MethodName: "SendCode", - Handler: _Code_SendCode_Handler, - }, - { - MethodName: "Verify", - Handler: _Code_Verify_Handler, - }, - { - MethodName: "IsCheckImageCode", - Handler: _Code_IsCheckImageCode_Handler, - }, - { - MethodName: "VerifyImageCode", - Handler: _Code_VerifyImageCode_Handler, - }, - { - MethodName: "GetSendStatus", - Handler: _Code_GetSendStatus_Handler, - }, - }, - Streams: []grpc.StreamDesc{}, - Metadata: "proto/sqlx/code.proto", -} diff --git a/example/protopb/userpb/user.pb.go b/example/protopb/userpb/user.pb.go deleted file mode 100644 index 29e799a6b..000000000 --- a/example/protopb/userpb/user.pb.go +++ /dev/null @@ -1,2527 +0,0 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.28.0 -// protoc v3.19.4 -// source: proto/user/user.proto - -package userpb - -import ( - _ "github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-openapiv2/options" - _ "google.golang.org/genproto/googleapis/api/annotations" - status "google.golang.org/genproto/googleapis/rpc/status" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - _ "google.golang.org/protobuf/types/descriptorpb" - durationpb "google.golang.org/protobuf/types/known/durationpb" - emptypb "google.golang.org/protobuf/types/known/emptypb" - fieldmaskpb "google.golang.org/protobuf/types/known/fieldmaskpb" - _ "google.golang.org/protobuf/types/known/structpb" - timestamppb "google.golang.org/protobuf/types/known/timestamppb" - wrapperspb "google.golang.org/protobuf/types/known/wrapperspb" - reflect "reflect" - sync "sync" -) - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -// NumericEnum is one or zero. -type NumericEnum int32 - -const ( - // ZERO means 0 - NumericEnum_ZERO NumericEnum = 0 - // ONE means 1 - NumericEnum_ONE NumericEnum = 1 -) - -// Enum value maps for NumericEnum. -var ( - NumericEnum_name = map[int32]string{ - 0: "ZERO", - 1: "ONE", - } - NumericEnum_value = map[string]int32{ - "ZERO": 0, - "ONE": 1, - } -) - -func (x NumericEnum) Enum() *NumericEnum { - p := new(NumericEnum) - *p = x - return p -} - -func (x NumericEnum) String() string { - return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) -} - -func (NumericEnum) Descriptor() protoreflect.EnumDescriptor { - return file_proto_user_user_proto_enumTypes[0].Descriptor() -} - -func (NumericEnum) Type() protoreflect.EnumType { - return &file_proto_user_user_proto_enumTypes[0] -} - -func (x NumericEnum) Number() protoreflect.EnumNumber { - return protoreflect.EnumNumber(x) -} - -// Deprecated: Use NumericEnum.Descriptor instead. -func (NumericEnum) EnumDescriptor() ([]byte, []int) { - return file_proto_user_user_proto_rawDescGZIP(), []int{0} -} - -// DeepEnum is one or zero. -type ABitOfEverything_Nested_DeepEnum int32 - -const ( - // FALSE is false. - ABitOfEverything_Nested_FALSE ABitOfEverything_Nested_DeepEnum = 0 - // TRUE is true. - ABitOfEverything_Nested_TRUE ABitOfEverything_Nested_DeepEnum = 1 -) - -// Enum value maps for ABitOfEverything_Nested_DeepEnum. -var ( - ABitOfEverything_Nested_DeepEnum_name = map[int32]string{ - 0: "FALSE", - 1: "TRUE", - } - ABitOfEverything_Nested_DeepEnum_value = map[string]int32{ - "FALSE": 0, - "TRUE": 1, - } -) - -func (x ABitOfEverything_Nested_DeepEnum) Enum() *ABitOfEverything_Nested_DeepEnum { - p := new(ABitOfEverything_Nested_DeepEnum) - *p = x - return p -} - -func (x ABitOfEverything_Nested_DeepEnum) String() string { - return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) -} - -func (ABitOfEverything_Nested_DeepEnum) Descriptor() protoreflect.EnumDescriptor { - return file_proto_user_user_proto_enumTypes[1].Descriptor() -} - -func (ABitOfEverything_Nested_DeepEnum) Type() protoreflect.EnumType { - return &file_proto_user_user_proto_enumTypes[1] -} - -func (x ABitOfEverything_Nested_DeepEnum) Number() protoreflect.EnumNumber { - return protoreflect.EnumNumber(x) -} - -// Deprecated: Use ABitOfEverything_Nested_DeepEnum.Descriptor instead. -func (ABitOfEverything_Nested_DeepEnum) EnumDescriptor() ([]byte, []int) { - return file_proto_user_user_proto_rawDescGZIP(), []int{7, 0, 0} -} - -type Tag struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Key string `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"` - Value string `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"` -} - -func (x *Tag) Reset() { - *x = Tag{} - if protoimpl.UnsafeEnabled { - mi := &file_proto_user_user_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Tag) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Tag) ProtoMessage() {} - -func (x *Tag) ProtoReflect() protoreflect.Message { - mi := &file_proto_user_user_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use Tag.ProtoReflect.Descriptor instead. -func (*Tag) Descriptor() ([]byte, []int) { - return file_proto_user_user_proto_rawDescGZIP(), []int{0} -} - -func (x *Tag) GetKey() string { - if x != nil { - return x.Key - } - return "" -} - -func (x *Tag) GetValue() string { - if x != nil { - return x.Value - } - return "" -} - -type GenerateResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // the unique id generated - Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` - // the type of id generated - Type string `protobuf:"bytes,2,opt,name=type,proto3" json:"type,omitempty"` -} - -func (x *GenerateResponse) Reset() { - *x = GenerateResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_proto_user_user_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *GenerateResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GenerateResponse) ProtoMessage() {} - -func (x *GenerateResponse) ProtoReflect() protoreflect.Message { - mi := &file_proto_user_user_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use GenerateResponse.ProtoReflect.Descriptor instead. -func (*GenerateResponse) Descriptor() ([]byte, []int) { - return file_proto_user_user_proto_rawDescGZIP(), []int{1} -} - -func (x *GenerateResponse) GetId() string { - if x != nil { - return x.Id - } - return "" -} - -func (x *GenerateResponse) GetType() string { - if x != nil { - return x.Type - } - return "" -} - -// Generate a unique ID. Defaults to uuid. -type GenerateRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // type of id e.g uuid, shortid, snowflake (64 bit), bigflake (128 bit) - Type string `protobuf:"bytes,1,opt,name=type,proto3" json:"type,omitempty"` -} - -func (x *GenerateRequest) Reset() { - *x = GenerateRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_proto_user_user_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *GenerateRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GenerateRequest) ProtoMessage() {} - -func (x *GenerateRequest) ProtoReflect() protoreflect.Message { - mi := &file_proto_user_user_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use GenerateRequest.ProtoReflect.Descriptor instead. -func (*GenerateRequest) Descriptor() ([]byte, []int) { - return file_proto_user_user_proto_rawDescGZIP(), []int{2} -} - -func (x *GenerateRequest) GetType() string { - if x != nil { - return x.Type - } - return "" -} - -// List the types of IDs available. No query params needed. -type TypesRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields -} - -func (x *TypesRequest) Reset() { - *x = TypesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_proto_user_user_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *TypesRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*TypesRequest) ProtoMessage() {} - -func (x *TypesRequest) ProtoReflect() protoreflect.Message { - mi := &file_proto_user_user_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use TypesRequest.ProtoReflect.Descriptor instead. -func (*TypesRequest) Descriptor() ([]byte, []int) { - return file_proto_user_user_proto_rawDescGZIP(), []int{3} -} - -// TypesResponse 返回值类型 -type TypesResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Types []string `protobuf:"bytes,1,rep,name=types,proto3" json:"types,omitempty"` -} - -func (x *TypesResponse) Reset() { - *x = TypesResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_proto_user_user_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *TypesResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*TypesResponse) ProtoMessage() {} - -func (x *TypesResponse) ProtoReflect() protoreflect.Message { - mi := &file_proto_user_user_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use TypesResponse.ProtoReflect.Descriptor instead. -func (*TypesResponse) Descriptor() ([]byte, []int) { - return file_proto_user_user_proto_rawDescGZIP(), []int{4} -} - -func (x *TypesResponse) GetTypes() []string { - if x != nil { - return x.Types - } - return nil -} - -type ErrorResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - CorrelationId string `protobuf:"bytes,1,opt,name=correlationId,proto3" json:"correlationId,omitempty"` - Error *ErrorObject `protobuf:"bytes,2,opt,name=error,proto3" json:"error,omitempty"` -} - -func (x *ErrorResponse) Reset() { - *x = ErrorResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_proto_user_user_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *ErrorResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ErrorResponse) ProtoMessage() {} - -func (x *ErrorResponse) ProtoReflect() protoreflect.Message { - mi := &file_proto_user_user_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use ErrorResponse.ProtoReflect.Descriptor instead. -func (*ErrorResponse) Descriptor() ([]byte, []int) { - return file_proto_user_user_proto_rawDescGZIP(), []int{5} -} - -func (x *ErrorResponse) GetCorrelationId() string { - if x != nil { - return x.CorrelationId - } - return "" -} - -func (x *ErrorResponse) GetError() *ErrorObject { - if x != nil { - return x.Error - } - return nil -} - -type ErrorObject struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Code int32 `protobuf:"varint,1,opt,name=code,proto3" json:"code,omitempty"` - Message string `protobuf:"bytes,2,opt,name=message,proto3" json:"message,omitempty"` -} - -func (x *ErrorObject) Reset() { - *x = ErrorObject{} - if protoimpl.UnsafeEnabled { - mi := &file_proto_user_user_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *ErrorObject) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ErrorObject) ProtoMessage() {} - -func (x *ErrorObject) ProtoReflect() protoreflect.Message { - mi := &file_proto_user_user_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use ErrorObject.ProtoReflect.Descriptor instead. -func (*ErrorObject) Descriptor() ([]byte, []int) { - return file_proto_user_user_proto_rawDescGZIP(), []int{6} -} - -func (x *ErrorObject) GetCode() int32 { - if x != nil { - return x.Code - } - return 0 -} - -func (x *ErrorObject) GetMessage() string { - if x != nil { - return x.Message - } - return "" -} - -// Intentionally complicated message type to cover many features of Protobuf. -type ABitOfEverything struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - SingleNested *ABitOfEverything_Nested `protobuf:"bytes,25,opt,name=single_nested,json=singleNested,proto3" json:"single_nested,omitempty"` - Uuid string `protobuf:"bytes,1,opt,name=uuid,proto3" json:"uuid,omitempty"` - Nested []*ABitOfEverything_Nested `protobuf:"bytes,2,rep,name=nested,proto3" json:"nested,omitempty"` - FloatValue float32 `protobuf:"fixed32,3,opt,name=float_value,json=floatValue,proto3" json:"float_value,omitempty"` - DoubleValue float64 `protobuf:"fixed64,4,opt,name=double_value,json=doubleValue,proto3" json:"double_value,omitempty"` - Int64Value int64 `protobuf:"varint,5,opt,name=int64_value,json=int64Value,proto3" json:"int64_value,omitempty"` - Uint64Value uint64 `protobuf:"varint,6,opt,name=uint64_value,json=uint64Value,proto3" json:"uint64_value,omitempty"` - Int32Value int32 `protobuf:"varint,7,opt,name=int32_value,json=int32Value,proto3" json:"int32_value,omitempty"` - Fixed64Value uint64 `protobuf:"fixed64,8,opt,name=fixed64_value,json=fixed64Value,proto3" json:"fixed64_value,omitempty"` - Fixed32Value uint32 `protobuf:"fixed32,9,opt,name=fixed32_value,json=fixed32Value,proto3" json:"fixed32_value,omitempty"` - BoolValue bool `protobuf:"varint,10,opt,name=bool_value,json=boolValue,proto3" json:"bool_value,omitempty"` - StringValue string `protobuf:"bytes,11,opt,name=string_value,json=stringValue,proto3" json:"string_value,omitempty"` - BytesValue []byte `protobuf:"bytes,29,opt,name=bytes_value,json=bytesValue,proto3" json:"bytes_value,omitempty"` - Uint32Value uint32 `protobuf:"varint,13,opt,name=uint32_value,json=uint32Value,proto3" json:"uint32_value,omitempty"` - EnumValue NumericEnum `protobuf:"varint,14,opt,name=enum_value,json=enumValue,proto3,enum=gid.NumericEnum" json:"enum_value,omitempty"` - Sfixed32Value int32 `protobuf:"fixed32,15,opt,name=sfixed32_value,json=sfixed32Value,proto3" json:"sfixed32_value,omitempty"` - Sfixed64Value int64 `protobuf:"fixed64,16,opt,name=sfixed64_value,json=sfixed64Value,proto3" json:"sfixed64_value,omitempty"` - Sint32Value int32 `protobuf:"zigzag32,17,opt,name=sint32_value,json=sint32Value,proto3" json:"sint32_value,omitempty"` - Sint64Value int64 `protobuf:"zigzag64,18,opt,name=sint64_value,json=sint64Value,proto3" json:"sint64_value,omitempty"` - RepeatedStringValue []string `protobuf:"bytes,19,rep,name=repeated_string_value,json=repeatedStringValue,proto3" json:"repeated_string_value,omitempty"` - // Types that are assignable to OneofValue: - // *ABitOfEverything_OneofEmpty - // *ABitOfEverything_OneofString - OneofValue isABitOfEverything_OneofValue `protobuf_oneof:"oneof_value"` - MapValue map[string]NumericEnum `protobuf:"bytes,22,rep,name=map_value,json=mapValue,proto3" json:"map_value,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3,enum=gid.NumericEnum"` - MappedStringValue map[string]string `protobuf:"bytes,23,rep,name=mapped_string_value,json=mappedStringValue,proto3" json:"mapped_string_value,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` - MappedNestedValue map[string]*ABitOfEverything_Nested `protobuf:"bytes,24,rep,name=mapped_nested_value,json=mappedNestedValue,proto3" json:"mapped_nested_value,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` - NonConventionalNameValue string `protobuf:"bytes,26,opt,name=nonConventionalNameValue,proto3" json:"nonConventionalNameValue,omitempty"` - TimestampValue *timestamppb.Timestamp `protobuf:"bytes,27,opt,name=timestamp_value,json=timestampValue,proto3" json:"timestamp_value,omitempty"` - // repeated enum value. it is comma-separated in query - RepeatedEnumValue []NumericEnum `protobuf:"varint,28,rep,packed,name=repeated_enum_value,json=repeatedEnumValue,proto3,enum=gid.NumericEnum" json:"repeated_enum_value,omitempty"` - // repeated numeric enum comment (This comment is overridden by the field annotation) - RepeatedEnumAnnotation []NumericEnum `protobuf:"varint,32,rep,packed,name=repeated_enum_annotation,json=repeatedEnumAnnotation,proto3,enum=gid.NumericEnum" json:"repeated_enum_annotation,omitempty"` - // numeric enum comment (This comment is overridden by the field annotation) - EnumValueAnnotation NumericEnum `protobuf:"varint,33,opt,name=enum_value_annotation,json=enumValueAnnotation,proto3,enum=gid.NumericEnum" json:"enum_value_annotation,omitempty"` - // repeated string comment (This comment is overridden by the field annotation) - RepeatedStringAnnotation []string `protobuf:"bytes,34,rep,name=repeated_string_annotation,json=repeatedStringAnnotation,proto3" json:"repeated_string_annotation,omitempty"` - // repeated nested object comment (This comment is overridden by the field annotation) - RepeatedNestedAnnotation []*ABitOfEverything_Nested `protobuf:"bytes,35,rep,name=repeated_nested_annotation,json=repeatedNestedAnnotation,proto3" json:"repeated_nested_annotation,omitempty"` - // nested object comments (This comment is overridden by the field annotation) - NestedAnnotation *ABitOfEverything_Nested `protobuf:"bytes,36,opt,name=nested_annotation,json=nestedAnnotation,proto3" json:"nested_annotation,omitempty"` - Int64OverrideType int64 `protobuf:"varint,37,opt,name=int64_override_type,json=int64OverrideType,proto3" json:"int64_override_type,omitempty"` - // mark a field as required in Open API definition - RequiredStringViaFieldBehaviorAnnotation string `protobuf:"bytes,38,opt,name=required_string_via_field_behavior_annotation,json=requiredStringViaFieldBehaviorAnnotation,proto3" json:"required_string_via_field_behavior_annotation,omitempty"` - // mark a field as readonly in Open API definition - OutputOnlyStringViaFieldBehaviorAnnotation string `protobuf:"bytes,39,opt,name=output_only_string_via_field_behavior_annotation,json=outputOnlyStringViaFieldBehaviorAnnotation,proto3" json:"output_only_string_via_field_behavior_annotation,omitempty"` -} - -func (x *ABitOfEverything) Reset() { - *x = ABitOfEverything{} - if protoimpl.UnsafeEnabled { - mi := &file_proto_user_user_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *ABitOfEverything) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ABitOfEverything) ProtoMessage() {} - -func (x *ABitOfEverything) ProtoReflect() protoreflect.Message { - mi := &file_proto_user_user_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use ABitOfEverything.ProtoReflect.Descriptor instead. -func (*ABitOfEverything) Descriptor() ([]byte, []int) { - return file_proto_user_user_proto_rawDescGZIP(), []int{7} -} - -func (x *ABitOfEverything) GetSingleNested() *ABitOfEverything_Nested { - if x != nil { - return x.SingleNested - } - return nil -} - -func (x *ABitOfEverything) GetUuid() string { - if x != nil { - return x.Uuid - } - return "" -} - -func (x *ABitOfEverything) GetNested() []*ABitOfEverything_Nested { - if x != nil { - return x.Nested - } - return nil -} - -func (x *ABitOfEverything) GetFloatValue() float32 { - if x != nil { - return x.FloatValue - } - return 0 -} - -func (x *ABitOfEverything) GetDoubleValue() float64 { - if x != nil { - return x.DoubleValue - } - return 0 -} - -func (x *ABitOfEverything) GetInt64Value() int64 { - if x != nil { - return x.Int64Value - } - return 0 -} - -func (x *ABitOfEverything) GetUint64Value() uint64 { - if x != nil { - return x.Uint64Value - } - return 0 -} - -func (x *ABitOfEverything) GetInt32Value() int32 { - if x != nil { - return x.Int32Value - } - return 0 -} - -func (x *ABitOfEverything) GetFixed64Value() uint64 { - if x != nil { - return x.Fixed64Value - } - return 0 -} - -func (x *ABitOfEverything) GetFixed32Value() uint32 { - if x != nil { - return x.Fixed32Value - } - return 0 -} - -func (x *ABitOfEverything) GetBoolValue() bool { - if x != nil { - return x.BoolValue - } - return false -} - -func (x *ABitOfEverything) GetStringValue() string { - if x != nil { - return x.StringValue - } - return "" -} - -func (x *ABitOfEverything) GetBytesValue() []byte { - if x != nil { - return x.BytesValue - } - return nil -} - -func (x *ABitOfEverything) GetUint32Value() uint32 { - if x != nil { - return x.Uint32Value - } - return 0 -} - -func (x *ABitOfEverything) GetEnumValue() NumericEnum { - if x != nil { - return x.EnumValue - } - return NumericEnum_ZERO -} - -func (x *ABitOfEverything) GetSfixed32Value() int32 { - if x != nil { - return x.Sfixed32Value - } - return 0 -} - -func (x *ABitOfEverything) GetSfixed64Value() int64 { - if x != nil { - return x.Sfixed64Value - } - return 0 -} - -func (x *ABitOfEverything) GetSint32Value() int32 { - if x != nil { - return x.Sint32Value - } - return 0 -} - -func (x *ABitOfEverything) GetSint64Value() int64 { - if x != nil { - return x.Sint64Value - } - return 0 -} - -func (x *ABitOfEverything) GetRepeatedStringValue() []string { - if x != nil { - return x.RepeatedStringValue - } - return nil -} - -func (m *ABitOfEverything) GetOneofValue() isABitOfEverything_OneofValue { - if m != nil { - return m.OneofValue - } - return nil -} - -func (x *ABitOfEverything) GetOneofEmpty() *emptypb.Empty { - if x, ok := x.GetOneofValue().(*ABitOfEverything_OneofEmpty); ok { - return x.OneofEmpty - } - return nil -} - -func (x *ABitOfEverything) GetOneofString() string { - if x, ok := x.GetOneofValue().(*ABitOfEverything_OneofString); ok { - return x.OneofString - } - return "" -} - -func (x *ABitOfEverything) GetMapValue() map[string]NumericEnum { - if x != nil { - return x.MapValue - } - return nil -} - -func (x *ABitOfEverything) GetMappedStringValue() map[string]string { - if x != nil { - return x.MappedStringValue - } - return nil -} - -func (x *ABitOfEverything) GetMappedNestedValue() map[string]*ABitOfEverything_Nested { - if x != nil { - return x.MappedNestedValue - } - return nil -} - -func (x *ABitOfEverything) GetNonConventionalNameValue() string { - if x != nil { - return x.NonConventionalNameValue - } - return "" -} - -func (x *ABitOfEverything) GetTimestampValue() *timestamppb.Timestamp { - if x != nil { - return x.TimestampValue - } - return nil -} - -func (x *ABitOfEverything) GetRepeatedEnumValue() []NumericEnum { - if x != nil { - return x.RepeatedEnumValue - } - return nil -} - -func (x *ABitOfEverything) GetRepeatedEnumAnnotation() []NumericEnum { - if x != nil { - return x.RepeatedEnumAnnotation - } - return nil -} - -func (x *ABitOfEverything) GetEnumValueAnnotation() NumericEnum { - if x != nil { - return x.EnumValueAnnotation - } - return NumericEnum_ZERO -} - -func (x *ABitOfEverything) GetRepeatedStringAnnotation() []string { - if x != nil { - return x.RepeatedStringAnnotation - } - return nil -} - -func (x *ABitOfEverything) GetRepeatedNestedAnnotation() []*ABitOfEverything_Nested { - if x != nil { - return x.RepeatedNestedAnnotation - } - return nil -} - -func (x *ABitOfEverything) GetNestedAnnotation() *ABitOfEverything_Nested { - if x != nil { - return x.NestedAnnotation - } - return nil -} - -func (x *ABitOfEverything) GetInt64OverrideType() int64 { - if x != nil { - return x.Int64OverrideType - } - return 0 -} - -func (x *ABitOfEverything) GetRequiredStringViaFieldBehaviorAnnotation() string { - if x != nil { - return x.RequiredStringViaFieldBehaviorAnnotation - } - return "" -} - -func (x *ABitOfEverything) GetOutputOnlyStringViaFieldBehaviorAnnotation() string { - if x != nil { - return x.OutputOnlyStringViaFieldBehaviorAnnotation - } - return "" -} - -type isABitOfEverything_OneofValue interface { - isABitOfEverything_OneofValue() -} - -type ABitOfEverything_OneofEmpty struct { - OneofEmpty *emptypb.Empty `protobuf:"bytes,20,opt,name=oneof_empty,json=oneofEmpty,proto3,oneof"` -} - -type ABitOfEverything_OneofString struct { - OneofString string `protobuf:"bytes,21,opt,name=oneof_string,json=oneofString,proto3,oneof"` -} - -func (*ABitOfEverything_OneofEmpty) isABitOfEverything_OneofValue() {} - -func (*ABitOfEverything_OneofString) isABitOfEverything_OneofValue() {} - -// ABitOfEverythingRepeated is used to validate repeated path parameter functionality -type ABitOfEverythingRepeated struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // repeated values. they are comma-separated in path - PathRepeatedFloatValue []float32 `protobuf:"fixed32,1,rep,packed,name=path_repeated_float_value,json=pathRepeatedFloatValue,proto3" json:"path_repeated_float_value,omitempty"` - PathRepeatedDoubleValue []float64 `protobuf:"fixed64,2,rep,packed,name=path_repeated_double_value,json=pathRepeatedDoubleValue,proto3" json:"path_repeated_double_value,omitempty"` - PathRepeatedInt64Value []int64 `protobuf:"varint,3,rep,packed,name=path_repeated_int64_value,json=pathRepeatedInt64Value,proto3" json:"path_repeated_int64_value,omitempty"` - PathRepeatedUint64Value []uint64 `protobuf:"varint,4,rep,packed,name=path_repeated_uint64_value,json=pathRepeatedUint64Value,proto3" json:"path_repeated_uint64_value,omitempty"` - PathRepeatedInt32Value []int32 `protobuf:"varint,5,rep,packed,name=path_repeated_int32_value,json=pathRepeatedInt32Value,proto3" json:"path_repeated_int32_value,omitempty"` - PathRepeatedFixed64Value []uint64 `protobuf:"fixed64,6,rep,packed,name=path_repeated_fixed64_value,json=pathRepeatedFixed64Value,proto3" json:"path_repeated_fixed64_value,omitempty"` - PathRepeatedFixed32Value []uint32 `protobuf:"fixed32,7,rep,packed,name=path_repeated_fixed32_value,json=pathRepeatedFixed32Value,proto3" json:"path_repeated_fixed32_value,omitempty"` - PathRepeatedBoolValue []bool `protobuf:"varint,8,rep,packed,name=path_repeated_bool_value,json=pathRepeatedBoolValue,proto3" json:"path_repeated_bool_value,omitempty"` - PathRepeatedStringValue []string `protobuf:"bytes,9,rep,name=path_repeated_string_value,json=pathRepeatedStringValue,proto3" json:"path_repeated_string_value,omitempty"` - PathRepeatedBytesValue [][]byte `protobuf:"bytes,10,rep,name=path_repeated_bytes_value,json=pathRepeatedBytesValue,proto3" json:"path_repeated_bytes_value,omitempty"` - PathRepeatedUint32Value []uint32 `protobuf:"varint,11,rep,packed,name=path_repeated_uint32_value,json=pathRepeatedUint32Value,proto3" json:"path_repeated_uint32_value,omitempty"` - PathRepeatedEnumValue []NumericEnum `protobuf:"varint,12,rep,packed,name=path_repeated_enum_value,json=pathRepeatedEnumValue,proto3,enum=gid.NumericEnum" json:"path_repeated_enum_value,omitempty"` - PathRepeatedSfixed32Value []int32 `protobuf:"fixed32,13,rep,packed,name=path_repeated_sfixed32_value,json=pathRepeatedSfixed32Value,proto3" json:"path_repeated_sfixed32_value,omitempty"` - PathRepeatedSfixed64Value []int64 `protobuf:"fixed64,14,rep,packed,name=path_repeated_sfixed64_value,json=pathRepeatedSfixed64Value,proto3" json:"path_repeated_sfixed64_value,omitempty"` - PathRepeatedSint32Value []int32 `protobuf:"zigzag32,15,rep,packed,name=path_repeated_sint32_value,json=pathRepeatedSint32Value,proto3" json:"path_repeated_sint32_value,omitempty"` - PathRepeatedSint64Value []int64 `protobuf:"zigzag64,16,rep,packed,name=path_repeated_sint64_value,json=pathRepeatedSint64Value,proto3" json:"path_repeated_sint64_value,omitempty"` -} - -func (x *ABitOfEverythingRepeated) Reset() { - *x = ABitOfEverythingRepeated{} - if protoimpl.UnsafeEnabled { - mi := &file_proto_user_user_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *ABitOfEverythingRepeated) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ABitOfEverythingRepeated) ProtoMessage() {} - -func (x *ABitOfEverythingRepeated) ProtoReflect() protoreflect.Message { - mi := &file_proto_user_user_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use ABitOfEverythingRepeated.ProtoReflect.Descriptor instead. -func (*ABitOfEverythingRepeated) Descriptor() ([]byte, []int) { - return file_proto_user_user_proto_rawDescGZIP(), []int{8} -} - -func (x *ABitOfEverythingRepeated) GetPathRepeatedFloatValue() []float32 { - if x != nil { - return x.PathRepeatedFloatValue - } - return nil -} - -func (x *ABitOfEverythingRepeated) GetPathRepeatedDoubleValue() []float64 { - if x != nil { - return x.PathRepeatedDoubleValue - } - return nil -} - -func (x *ABitOfEverythingRepeated) GetPathRepeatedInt64Value() []int64 { - if x != nil { - return x.PathRepeatedInt64Value - } - return nil -} - -func (x *ABitOfEverythingRepeated) GetPathRepeatedUint64Value() []uint64 { - if x != nil { - return x.PathRepeatedUint64Value - } - return nil -} - -func (x *ABitOfEverythingRepeated) GetPathRepeatedInt32Value() []int32 { - if x != nil { - return x.PathRepeatedInt32Value - } - return nil -} - -func (x *ABitOfEverythingRepeated) GetPathRepeatedFixed64Value() []uint64 { - if x != nil { - return x.PathRepeatedFixed64Value - } - return nil -} - -func (x *ABitOfEverythingRepeated) GetPathRepeatedFixed32Value() []uint32 { - if x != nil { - return x.PathRepeatedFixed32Value - } - return nil -} - -func (x *ABitOfEverythingRepeated) GetPathRepeatedBoolValue() []bool { - if x != nil { - return x.PathRepeatedBoolValue - } - return nil -} - -func (x *ABitOfEverythingRepeated) GetPathRepeatedStringValue() []string { - if x != nil { - return x.PathRepeatedStringValue - } - return nil -} - -func (x *ABitOfEverythingRepeated) GetPathRepeatedBytesValue() [][]byte { - if x != nil { - return x.PathRepeatedBytesValue - } - return nil -} - -func (x *ABitOfEverythingRepeated) GetPathRepeatedUint32Value() []uint32 { - if x != nil { - return x.PathRepeatedUint32Value - } - return nil -} - -func (x *ABitOfEverythingRepeated) GetPathRepeatedEnumValue() []NumericEnum { - if x != nil { - return x.PathRepeatedEnumValue - } - return nil -} - -func (x *ABitOfEverythingRepeated) GetPathRepeatedSfixed32Value() []int32 { - if x != nil { - return x.PathRepeatedSfixed32Value - } - return nil -} - -func (x *ABitOfEverythingRepeated) GetPathRepeatedSfixed64Value() []int64 { - if x != nil { - return x.PathRepeatedSfixed64Value - } - return nil -} - -func (x *ABitOfEverythingRepeated) GetPathRepeatedSint32Value() []int32 { - if x != nil { - return x.PathRepeatedSint32Value - } - return nil -} - -func (x *ABitOfEverythingRepeated) GetPathRepeatedSint64Value() []int64 { - if x != nil { - return x.PathRepeatedSint64Value - } - return nil -} - -type CheckStatusResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Status *status.Status `protobuf:"bytes,1,opt,name=status,proto3" json:"status,omitempty"` -} - -func (x *CheckStatusResponse) Reset() { - *x = CheckStatusResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_proto_user_user_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *CheckStatusResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*CheckStatusResponse) ProtoMessage() {} - -func (x *CheckStatusResponse) ProtoReflect() protoreflect.Message { - mi := &file_proto_user_user_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use CheckStatusResponse.ProtoReflect.Descriptor instead. -func (*CheckStatusResponse) Descriptor() ([]byte, []int) { - return file_proto_user_user_proto_rawDescGZIP(), []int{9} -} - -func (x *CheckStatusResponse) GetStatus() *status.Status { - if x != nil { - return x.Status - } - return nil -} - -type Body struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` -} - -func (x *Body) Reset() { - *x = Body{} - if protoimpl.UnsafeEnabled { - mi := &file_proto_user_user_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Body) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Body) ProtoMessage() {} - -func (x *Body) ProtoReflect() protoreflect.Message { - mi := &file_proto_user_user_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use Body.ProtoReflect.Descriptor instead. -func (*Body) Descriptor() ([]byte, []int) { - return file_proto_user_user_proto_rawDescGZIP(), []int{10} -} - -func (x *Body) GetName() string { - if x != nil { - return x.Name - } - return "" -} - -type MessageWithBody struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` - Data *Body `protobuf:"bytes,2,opt,name=data,proto3" json:"data,omitempty"` -} - -func (x *MessageWithBody) Reset() { - *x = MessageWithBody{} - if protoimpl.UnsafeEnabled { - mi := &file_proto_user_user_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *MessageWithBody) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*MessageWithBody) ProtoMessage() {} - -func (x *MessageWithBody) ProtoReflect() protoreflect.Message { - mi := &file_proto_user_user_proto_msgTypes[11] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use MessageWithBody.ProtoReflect.Descriptor instead. -func (*MessageWithBody) Descriptor() ([]byte, []int) { - return file_proto_user_user_proto_rawDescGZIP(), []int{11} -} - -func (x *MessageWithBody) GetId() string { - if x != nil { - return x.Id - } - return "" -} - -func (x *MessageWithBody) GetData() *Body { - if x != nil { - return x.Data - } - return nil -} - -// UpdateV2Request request for update includes the message and the update mask -type UpdateV2Request struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Abe *ABitOfEverything `protobuf:"bytes,1,opt,name=abe,proto3" json:"abe,omitempty"` - // The paths to update. - UpdateMask *fieldmaskpb.FieldMask `protobuf:"bytes,2,opt,name=update_mask,json=updateMask,proto3" json:"update_mask,omitempty"` -} - -func (x *UpdateV2Request) Reset() { - *x = UpdateV2Request{} - if protoimpl.UnsafeEnabled { - mi := &file_proto_user_user_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *UpdateV2Request) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*UpdateV2Request) ProtoMessage() {} - -func (x *UpdateV2Request) ProtoReflect() protoreflect.Message { - mi := &file_proto_user_user_proto_msgTypes[12] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use UpdateV2Request.ProtoReflect.Descriptor instead. -func (*UpdateV2Request) Descriptor() ([]byte, []int) { - return file_proto_user_user_proto_rawDescGZIP(), []int{12} -} - -func (x *UpdateV2Request) GetAbe() *ABitOfEverything { - if x != nil { - return x.Abe - } - return nil -} - -func (x *UpdateV2Request) GetUpdateMask() *fieldmaskpb.FieldMask { - if x != nil { - return x.UpdateMask - } - return nil -} - -// An example resource type from AIP-123 used to test the behavior described in -// the CreateBookRequest message. -// -// See: https://google.aip.dev/123 -type Book struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // The resource name of the book. - // - // Format: `publishers/{publisher}/books/{book}` - // - // Example: `publishers/1257894000000000000/books/my-book` - Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` - // Output only. The book's ID. - Id string `protobuf:"bytes,2,opt,name=id,proto3" json:"id,omitempty"` - // Output only. Creation time of the book. - CreateTime *timestamppb.Timestamp `protobuf:"bytes,3,opt,name=create_time,json=createTime,proto3" json:"create_time,omitempty"` -} - -func (x *Book) Reset() { - *x = Book{} - if protoimpl.UnsafeEnabled { - mi := &file_proto_user_user_proto_msgTypes[13] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Book) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Book) ProtoMessage() {} - -func (x *Book) ProtoReflect() protoreflect.Message { - mi := &file_proto_user_user_proto_msgTypes[13] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use Book.ProtoReflect.Descriptor instead. -func (*Book) Descriptor() ([]byte, []int) { - return file_proto_user_user_proto_rawDescGZIP(), []int{13} -} - -func (x *Book) GetName() string { - if x != nil { - return x.Name - } - return "" -} - -func (x *Book) GetId() string { - if x != nil { - return x.Id - } - return "" -} - -func (x *Book) GetCreateTime() *timestamppb.Timestamp { - if x != nil { - return x.CreateTime - } - return nil -} - -// A standard Create message from AIP-133 with a user-specified ID. -// The user-specified ID (the `book_id` field in this example) must become a -// query parameter in the OpenAPI spec. -// -// See: https://google.aip.dev/133#user-specified-ids -type CreateBookRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // The publisher in which to create the book. - // - // Format: `publishers/{publisher}` - // - // Example: `publishers/1257894000000000000` - Parent string `protobuf:"bytes,1,opt,name=parent,proto3" json:"parent,omitempty"` - // The book to create. - Book *Book `protobuf:"bytes,2,opt,name=book,proto3" json:"book,omitempty"` - // The ID to use for the book. - // - // This must start with an alphanumeric character. - BookId string `protobuf:"bytes,3,opt,name=book_id,json=bookId,proto3" json:"book_id,omitempty"` -} - -func (x *CreateBookRequest) Reset() { - *x = CreateBookRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_proto_user_user_proto_msgTypes[14] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *CreateBookRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*CreateBookRequest) ProtoMessage() {} - -func (x *CreateBookRequest) ProtoReflect() protoreflect.Message { - mi := &file_proto_user_user_proto_msgTypes[14] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use CreateBookRequest.ProtoReflect.Descriptor instead. -func (*CreateBookRequest) Descriptor() ([]byte, []int) { - return file_proto_user_user_proto_rawDescGZIP(), []int{14} -} - -func (x *CreateBookRequest) GetParent() string { - if x != nil { - return x.Parent - } - return "" -} - -func (x *CreateBookRequest) GetBook() *Book { - if x != nil { - return x.Book - } - return nil -} - -func (x *CreateBookRequest) GetBookId() string { - if x != nil { - return x.BookId - } - return "" -} - -// A standard Update message from AIP-134 -// -// See: https://google.aip.dev/134#request-message -type UpdateBookRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // The book to update. - // - // The book's `name` field is used to identify the book to be updated. - // Format: publishers/{publisher}/books/{book} - Book *Book `protobuf:"bytes,1,opt,name=book,proto3" json:"book,omitempty"` - // The list of fields to be updated. - UpdateMask *fieldmaskpb.FieldMask `protobuf:"bytes,2,opt,name=update_mask,json=updateMask,proto3" json:"update_mask,omitempty"` - // If set to true, and the book is not found, a new book will be created. - // In this situation, `update_mask` is ignored. - AllowMissing bool `protobuf:"varint,3,opt,name=allow_missing,json=allowMissing,proto3" json:"allow_missing,omitempty"` -} - -func (x *UpdateBookRequest) Reset() { - *x = UpdateBookRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_proto_user_user_proto_msgTypes[15] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *UpdateBookRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*UpdateBookRequest) ProtoMessage() {} - -func (x *UpdateBookRequest) ProtoReflect() protoreflect.Message { - mi := &file_proto_user_user_proto_msgTypes[15] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use UpdateBookRequest.ProtoReflect.Descriptor instead. -func (*UpdateBookRequest) Descriptor() ([]byte, []int) { - return file_proto_user_user_proto_rawDescGZIP(), []int{15} -} - -func (x *UpdateBookRequest) GetBook() *Book { - if x != nil { - return x.Book - } - return nil -} - -func (x *UpdateBookRequest) GetUpdateMask() *fieldmaskpb.FieldMask { - if x != nil { - return x.UpdateMask - } - return nil -} - -func (x *UpdateBookRequest) GetAllowMissing() bool { - if x != nil { - return x.AllowMissing - } - return false -} - -// Nested is nested type. -type ABitOfEverything_Nested struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // name is nested field. - Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` - Amount uint32 `protobuf:"varint,2,opt,name=amount,proto3" json:"amount,omitempty"` - // DeepEnum comment. - Ok ABitOfEverything_Nested_DeepEnum `protobuf:"varint,3,opt,name=ok,proto3,enum=gid.ABitOfEverything_Nested_DeepEnum" json:"ok,omitempty"` -} - -func (x *ABitOfEverything_Nested) Reset() { - *x = ABitOfEverything_Nested{} - if protoimpl.UnsafeEnabled { - mi := &file_proto_user_user_proto_msgTypes[16] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *ABitOfEverything_Nested) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ABitOfEverything_Nested) ProtoMessage() {} - -func (x *ABitOfEverything_Nested) ProtoReflect() protoreflect.Message { - mi := &file_proto_user_user_proto_msgTypes[16] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use ABitOfEverything_Nested.ProtoReflect.Descriptor instead. -func (*ABitOfEverything_Nested) Descriptor() ([]byte, []int) { - return file_proto_user_user_proto_rawDescGZIP(), []int{7, 0} -} - -func (x *ABitOfEverything_Nested) GetName() string { - if x != nil { - return x.Name - } - return "" -} - -func (x *ABitOfEverything_Nested) GetAmount() uint32 { - if x != nil { - return x.Amount - } - return 0 -} - -func (x *ABitOfEverything_Nested) GetOk() ABitOfEverything_Nested_DeepEnum { - if x != nil { - return x.Ok - } - return ABitOfEverything_Nested_FALSE -} - -var File_proto_user_user_proto protoreflect.FileDescriptor - -var file_proto_user_user_proto_rawDesc = []byte{ - 0x0a, 0x15, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x75, 0x73, 0x65, 0x72, 0x2f, 0x75, 0x73, 0x65, - 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x03, 0x67, 0x69, 0x64, 0x1a, 0x1c, 0x67, 0x6f, - 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x17, 0x67, 0x6f, 0x6f, 0x67, - 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x2e, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x1a, 0x1b, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x65, 0x6d, 0x70, 0x74, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x1a, 0x1f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x66, 0x69, 0x65, - 0x6c, 0x64, 0x5f, 0x62, 0x65, 0x68, 0x61, 0x76, 0x69, 0x6f, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x1a, 0x1e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, - 0x75, 0x66, 0x2f, 0x77, 0x72, 0x61, 0x70, 0x70, 0x65, 0x72, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x1a, 0x17, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x72, 0x70, 0x63, 0x2f, 0x73, 0x74, - 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x20, 0x67, 0x6f, 0x6f, 0x67, - 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x66, 0x69, 0x65, 0x6c, - 0x64, 0x5f, 0x6d, 0x61, 0x73, 0x6b, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1f, 0x67, 0x6f, - 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x74, 0x69, - 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1e, 0x67, - 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x64, - 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x2e, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x2d, 0x67, 0x65, 0x6e, 0x2d, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, - 0x69, 0x76, 0x32, 0x2f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, - 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x20, 0x67, - 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x64, - 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, - 0x1c, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, - 0x2f, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x2d, 0x0a, - 0x03, 0x54, 0x61, 0x67, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0x36, 0x0a, 0x10, - 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, - 0x12, 0x12, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, - 0x74, 0x79, 0x70, 0x65, 0x22, 0x25, 0x0a, 0x0f, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x22, 0x0e, 0x0a, 0x0c, 0x54, - 0x79, 0x70, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x25, 0x0a, 0x0d, 0x54, - 0x79, 0x70, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x14, 0x0a, 0x05, - 0x74, 0x79, 0x70, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x05, 0x74, 0x79, 0x70, - 0x65, 0x73, 0x22, 0x9b, 0x02, 0x0a, 0x0d, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x12, 0xe1, 0x01, 0x0a, 0x0d, 0x63, 0x6f, 0x72, 0x72, 0x65, 0x6c, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0xba, 0x01, 0x92, - 0x41, 0xb6, 0x01, 0x2a, 0x10, 0x78, 0x2d, 0x63, 0x6f, 0x72, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x2d, 0x69, 0x64, 0x32, 0x2b, 0x55, 0x6e, 0x69, 0x71, 0x75, 0x65, 0x20, 0x65, 0x76, - 0x65, 0x6e, 0x74, 0x20, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x66, 0x69, 0x65, 0x72, 0x20, 0x66, - 0x6f, 0x72, 0x20, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x20, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x73, 0x4a, 0x26, 0x22, 0x32, 0x34, 0x33, 0x38, 0x61, 0x63, 0x33, 0x63, 0x2d, 0x33, 0x37, - 0x65, 0x62, 0x2d, 0x34, 0x39, 0x30, 0x32, 0x2d, 0x61, 0x64, 0x65, 0x66, 0x2d, 0x65, 0x64, 0x31, - 0x36, 0x62, 0x34, 0x34, 0x33, 0x31, 0x30, 0x33, 0x30, 0x22, 0x8a, 0x01, 0x45, 0x5e, 0x5b, 0x30, - 0x2d, 0x39, 0x41, 0x2d, 0x46, 0x5d, 0x7b, 0x38, 0x7d, 0x2d, 0x5b, 0x30, 0x2d, 0x39, 0x41, 0x2d, - 0x46, 0x5d, 0x7b, 0x34, 0x7d, 0x2d, 0x34, 0x5b, 0x30, 0x2d, 0x39, 0x41, 0x2d, 0x46, 0x5d, 0x7b, - 0x33, 0x7d, 0x2d, 0x5b, 0x38, 0x39, 0x41, 0x42, 0x5d, 0x5b, 0x30, 0x2d, 0x39, 0x41, 0x2d, 0x46, - 0x5d, 0x7b, 0x33, 0x7d, 0x2d, 0x5b, 0x30, 0x2d, 0x39, 0x41, 0x2d, 0x46, 0x5d, 0x7b, 0x31, 0x32, - 0x7d, 0x24, 0xa2, 0x02, 0x04, 0x75, 0x75, 0x69, 0x64, 0x52, 0x0d, 0x63, 0x6f, 0x72, 0x72, 0x65, - 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x12, 0x26, 0x0a, 0x05, 0x65, 0x72, 0x72, 0x6f, - 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x67, 0x69, 0x64, 0x2e, 0x45, 0x72, - 0x72, 0x6f, 0x72, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, - 0x22, 0xa0, 0x01, 0x0a, 0x0b, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, - 0x12, 0x40, 0x0a, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x42, 0x2c, - 0x92, 0x41, 0x29, 0x2a, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x32, 0x0d, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x20, 0x63, 0x6f, 0x64, 0x65, 0x8a, 0x01, 0x07, 0x5e, 0x5b, 0x30, 0x2d, 0x39, - 0x5d, 0x24, 0xa2, 0x02, 0x07, 0x69, 0x6e, 0x74, 0x65, 0x67, 0x65, 0x72, 0x52, 0x04, 0x63, 0x6f, - 0x64, 0x65, 0x12, 0x4f, 0x0a, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x09, 0x42, 0x35, 0x92, 0x41, 0x32, 0x2a, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, - 0x65, 0x32, 0x10, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x20, 0x6d, 0x65, 0x73, 0x73, - 0x61, 0x67, 0x65, 0x8a, 0x01, 0x14, 0x5e, 0x5b, 0x61, 0x2d, 0x7a, 0x41, 0x2d, 0x5a, 0x30, 0x2d, - 0x39, 0x5d, 0x7b, 0x31, 0x2c, 0x20, 0x33, 0x32, 0x7d, 0x24, 0x52, 0x07, 0x6d, 0x65, 0x73, 0x73, - 0x61, 0x67, 0x65, 0x22, 0xc1, 0x18, 0x0a, 0x10, 0x41, 0x42, 0x69, 0x74, 0x4f, 0x66, 0x45, 0x76, - 0x65, 0x72, 0x79, 0x74, 0x68, 0x69, 0x6e, 0x67, 0x12, 0x41, 0x0a, 0x0d, 0x73, 0x69, 0x6e, 0x67, - 0x6c, 0x65, 0x5f, 0x6e, 0x65, 0x73, 0x74, 0x65, 0x64, 0x18, 0x19, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x1c, 0x2e, 0x67, 0x69, 0x64, 0x2e, 0x41, 0x42, 0x69, 0x74, 0x4f, 0x66, 0x45, 0x76, 0x65, 0x72, - 0x79, 0x74, 0x68, 0x69, 0x6e, 0x67, 0x2e, 0x4e, 0x65, 0x73, 0x74, 0x65, 0x64, 0x52, 0x0c, 0x73, - 0x69, 0x6e, 0x67, 0x6c, 0x65, 0x4e, 0x65, 0x73, 0x74, 0x65, 0x64, 0x12, 0x68, 0x0a, 0x04, 0x75, - 0x75, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x54, 0x92, 0x41, 0x51, 0x80, 0x01, - 0x01, 0x8a, 0x01, 0x4b, 0x5b, 0x61, 0x2d, 0x66, 0x41, 0x2d, 0x46, 0x30, 0x2d, 0x39, 0x5d, 0x7b, - 0x38, 0x7d, 0x2d, 0x5b, 0x61, 0x2d, 0x66, 0x41, 0x2d, 0x46, 0x30, 0x2d, 0x39, 0x5d, 0x7b, 0x34, - 0x7d, 0x2d, 0x5b, 0x61, 0x2d, 0x66, 0x41, 0x2d, 0x46, 0x30, 0x2d, 0x39, 0x5d, 0x7b, 0x34, 0x7d, - 0x2d, 0x5b, 0x61, 0x2d, 0x66, 0x41, 0x2d, 0x46, 0x30, 0x2d, 0x39, 0x5d, 0x7b, 0x34, 0x7d, 0x2d, - 0x5b, 0x61, 0x2d, 0x66, 0x41, 0x2d, 0x46, 0x30, 0x2d, 0x39, 0x5d, 0x7b, 0x31, 0x32, 0x7d, 0x52, - 0x04, 0x75, 0x75, 0x69, 0x64, 0x12, 0x34, 0x0a, 0x06, 0x6e, 0x65, 0x73, 0x74, 0x65, 0x64, 0x18, - 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x69, 0x64, 0x2e, 0x41, 0x42, 0x69, 0x74, - 0x4f, 0x66, 0x45, 0x76, 0x65, 0x72, 0x79, 0x74, 0x68, 0x69, 0x6e, 0x67, 0x2e, 0x4e, 0x65, 0x73, - 0x74, 0x65, 0x64, 0x52, 0x06, 0x6e, 0x65, 0x73, 0x74, 0x65, 0x64, 0x12, 0x4a, 0x0a, 0x0b, 0x66, - 0x6c, 0x6f, 0x61, 0x74, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x02, - 0x42, 0x29, 0x92, 0x41, 0x26, 0x32, 0x11, 0x46, 0x6c, 0x6f, 0x61, 0x74, 0x20, 0x76, 0x61, 0x6c, - 0x75, 0x65, 0x20, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x3a, 0x03, 0x30, 0x2e, 0x32, 0xd2, 0x01, 0x0b, - 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x0a, 0x66, 0x6c, 0x6f, - 0x61, 0x74, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x21, 0x0a, 0x0c, 0x64, 0x6f, 0x75, 0x62, 0x6c, - 0x65, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x01, 0x52, 0x0b, 0x64, - 0x6f, 0x75, 0x62, 0x6c, 0x65, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x1f, 0x0a, 0x0b, 0x69, 0x6e, - 0x74, 0x36, 0x34, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x03, 0x52, - 0x0a, 0x69, 0x6e, 0x74, 0x36, 0x34, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x21, 0x0a, 0x0c, 0x75, - 0x69, 0x6e, 0x74, 0x36, 0x34, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, - 0x04, 0x52, 0x0b, 0x75, 0x69, 0x6e, 0x74, 0x36, 0x34, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x1f, - 0x0a, 0x0b, 0x69, 0x6e, 0x74, 0x33, 0x32, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x07, 0x20, - 0x01, 0x28, 0x05, 0x52, 0x0a, 0x69, 0x6e, 0x74, 0x33, 0x32, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, - 0x23, 0x0a, 0x0d, 0x66, 0x69, 0x78, 0x65, 0x64, 0x36, 0x34, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, - 0x18, 0x08, 0x20, 0x01, 0x28, 0x06, 0x52, 0x0c, 0x66, 0x69, 0x78, 0x65, 0x64, 0x36, 0x34, 0x56, - 0x61, 0x6c, 0x75, 0x65, 0x12, 0x23, 0x0a, 0x0d, 0x66, 0x69, 0x78, 0x65, 0x64, 0x33, 0x32, 0x5f, - 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x09, 0x20, 0x01, 0x28, 0x07, 0x52, 0x0c, 0x66, 0x69, 0x78, - 0x65, 0x64, 0x33, 0x32, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x62, 0x6f, 0x6f, - 0x6c, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x08, 0x52, 0x09, 0x62, - 0x6f, 0x6f, 0x6c, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x21, 0x0a, 0x0c, 0x73, 0x74, 0x72, 0x69, - 0x6e, 0x67, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, - 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x1f, 0x0a, 0x0b, 0x62, - 0x79, 0x74, 0x65, 0x73, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x1d, 0x20, 0x01, 0x28, 0x0c, - 0x52, 0x0a, 0x62, 0x79, 0x74, 0x65, 0x73, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x21, 0x0a, 0x0c, - 0x75, 0x69, 0x6e, 0x74, 0x33, 0x32, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x0d, 0x20, 0x01, - 0x28, 0x0d, 0x52, 0x0b, 0x75, 0x69, 0x6e, 0x74, 0x33, 0x32, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, - 0x2f, 0x0a, 0x0a, 0x65, 0x6e, 0x75, 0x6d, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x0e, 0x20, - 0x01, 0x28, 0x0e, 0x32, 0x10, 0x2e, 0x67, 0x69, 0x64, 0x2e, 0x4e, 0x75, 0x6d, 0x65, 0x72, 0x69, - 0x63, 0x45, 0x6e, 0x75, 0x6d, 0x52, 0x09, 0x65, 0x6e, 0x75, 0x6d, 0x56, 0x61, 0x6c, 0x75, 0x65, - 0x12, 0x25, 0x0a, 0x0e, 0x73, 0x66, 0x69, 0x78, 0x65, 0x64, 0x33, 0x32, 0x5f, 0x76, 0x61, 0x6c, - 0x75, 0x65, 0x18, 0x0f, 0x20, 0x01, 0x28, 0x0f, 0x52, 0x0d, 0x73, 0x66, 0x69, 0x78, 0x65, 0x64, - 0x33, 0x32, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x25, 0x0a, 0x0e, 0x73, 0x66, 0x69, 0x78, 0x65, - 0x64, 0x36, 0x34, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x10, 0x20, 0x01, 0x28, 0x10, 0x52, - 0x0d, 0x73, 0x66, 0x69, 0x78, 0x65, 0x64, 0x36, 0x34, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x21, - 0x0a, 0x0c, 0x73, 0x69, 0x6e, 0x74, 0x33, 0x32, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x11, - 0x20, 0x01, 0x28, 0x11, 0x52, 0x0b, 0x73, 0x69, 0x6e, 0x74, 0x33, 0x32, 0x56, 0x61, 0x6c, 0x75, - 0x65, 0x12, 0x21, 0x0a, 0x0c, 0x73, 0x69, 0x6e, 0x74, 0x36, 0x34, 0x5f, 0x76, 0x61, 0x6c, 0x75, - 0x65, 0x18, 0x12, 0x20, 0x01, 0x28, 0x12, 0x52, 0x0b, 0x73, 0x69, 0x6e, 0x74, 0x36, 0x34, 0x56, - 0x61, 0x6c, 0x75, 0x65, 0x12, 0x32, 0x0a, 0x15, 0x72, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, - 0x5f, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x13, 0x20, - 0x03, 0x28, 0x09, 0x52, 0x13, 0x72, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x53, 0x74, 0x72, - 0x69, 0x6e, 0x67, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x39, 0x0a, 0x0b, 0x6f, 0x6e, 0x65, 0x6f, - 0x66, 0x5f, 0x65, 0x6d, 0x70, 0x74, 0x79, 0x18, 0x14, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, - 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, - 0x45, 0x6d, 0x70, 0x74, 0x79, 0x48, 0x00, 0x52, 0x0a, 0x6f, 0x6e, 0x65, 0x6f, 0x66, 0x45, 0x6d, - 0x70, 0x74, 0x79, 0x12, 0x23, 0x0a, 0x0c, 0x6f, 0x6e, 0x65, 0x6f, 0x66, 0x5f, 0x73, 0x74, 0x72, - 0x69, 0x6e, 0x67, 0x18, 0x15, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x0b, 0x6f, 0x6e, 0x65, - 0x6f, 0x66, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x12, 0x40, 0x0a, 0x09, 0x6d, 0x61, 0x70, 0x5f, - 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x16, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x67, 0x69, - 0x64, 0x2e, 0x41, 0x42, 0x69, 0x74, 0x4f, 0x66, 0x45, 0x76, 0x65, 0x72, 0x79, 0x74, 0x68, 0x69, - 0x6e, 0x67, 0x2e, 0x4d, 0x61, 0x70, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x45, 0x6e, 0x74, 0x72, 0x79, - 0x52, 0x08, 0x6d, 0x61, 0x70, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x5c, 0x0a, 0x13, 0x6d, 0x61, - 0x70, 0x70, 0x65, 0x64, 0x5f, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x5f, 0x76, 0x61, 0x6c, 0x75, - 0x65, 0x18, 0x17, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2c, 0x2e, 0x67, 0x69, 0x64, 0x2e, 0x41, 0x42, - 0x69, 0x74, 0x4f, 0x66, 0x45, 0x76, 0x65, 0x72, 0x79, 0x74, 0x68, 0x69, 0x6e, 0x67, 0x2e, 0x4d, - 0x61, 0x70, 0x70, 0x65, 0x64, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x56, 0x61, 0x6c, 0x75, 0x65, - 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x11, 0x6d, 0x61, 0x70, 0x70, 0x65, 0x64, 0x53, 0x74, 0x72, - 0x69, 0x6e, 0x67, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x5c, 0x0a, 0x13, 0x6d, 0x61, 0x70, 0x70, - 0x65, 0x64, 0x5f, 0x6e, 0x65, 0x73, 0x74, 0x65, 0x64, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, - 0x18, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2c, 0x2e, 0x67, 0x69, 0x64, 0x2e, 0x41, 0x42, 0x69, 0x74, - 0x4f, 0x66, 0x45, 0x76, 0x65, 0x72, 0x79, 0x74, 0x68, 0x69, 0x6e, 0x67, 0x2e, 0x4d, 0x61, 0x70, - 0x70, 0x65, 0x64, 0x4e, 0x65, 0x73, 0x74, 0x65, 0x64, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x45, 0x6e, - 0x74, 0x72, 0x79, 0x52, 0x11, 0x6d, 0x61, 0x70, 0x70, 0x65, 0x64, 0x4e, 0x65, 0x73, 0x74, 0x65, - 0x64, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x3a, 0x0a, 0x18, 0x6e, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, - 0x76, 0x65, 0x6e, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x4e, 0x61, 0x6d, 0x65, 0x56, 0x61, 0x6c, - 0x75, 0x65, 0x18, 0x1a, 0x20, 0x01, 0x28, 0x09, 0x52, 0x18, 0x6e, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, - 0x76, 0x65, 0x6e, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x4e, 0x61, 0x6d, 0x65, 0x56, 0x61, 0x6c, - 0x75, 0x65, 0x12, 0x43, 0x0a, 0x0f, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x5f, - 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x1b, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, - 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, - 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x0e, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, - 0x6d, 0x70, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x40, 0x0a, 0x13, 0x72, 0x65, 0x70, 0x65, 0x61, - 0x74, 0x65, 0x64, 0x5f, 0x65, 0x6e, 0x75, 0x6d, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x1c, - 0x20, 0x03, 0x28, 0x0e, 0x32, 0x10, 0x2e, 0x67, 0x69, 0x64, 0x2e, 0x4e, 0x75, 0x6d, 0x65, 0x72, - 0x69, 0x63, 0x45, 0x6e, 0x75, 0x6d, 0x52, 0x11, 0x72, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, - 0x45, 0x6e, 0x75, 0x6d, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x90, 0x01, 0x0a, 0x18, 0x72, 0x65, - 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x65, 0x6e, 0x75, 0x6d, 0x5f, 0x61, 0x6e, 0x6e, 0x6f, - 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x20, 0x20, 0x03, 0x28, 0x0e, 0x32, 0x10, 0x2e, 0x67, - 0x69, 0x64, 0x2e, 0x4e, 0x75, 0x6d, 0x65, 0x72, 0x69, 0x63, 0x45, 0x6e, 0x75, 0x6d, 0x42, 0x44, - 0x92, 0x41, 0x41, 0x2a, 0x1b, 0x52, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x20, 0x6e, 0x75, - 0x6d, 0x65, 0x72, 0x69, 0x63, 0x20, 0x65, 0x6e, 0x75, 0x6d, 0x20, 0x74, 0x69, 0x74, 0x6c, 0x65, - 0x32, 0x22, 0x52, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x20, 0x6e, 0x75, 0x6d, 0x65, 0x72, - 0x69, 0x63, 0x20, 0x65, 0x6e, 0x75, 0x6d, 0x20, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, - 0x69, 0x6f, 0x6e, 0x2e, 0x52, 0x16, 0x72, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x45, 0x6e, - 0x75, 0x6d, 0x41, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x78, 0x0a, 0x15, - 0x65, 0x6e, 0x75, 0x6d, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x5f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x21, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x10, 0x2e, 0x67, 0x69, - 0x64, 0x2e, 0x4e, 0x75, 0x6d, 0x65, 0x72, 0x69, 0x63, 0x45, 0x6e, 0x75, 0x6d, 0x42, 0x32, 0x92, - 0x41, 0x2f, 0x2a, 0x12, 0x4e, 0x75, 0x6d, 0x65, 0x72, 0x69, 0x63, 0x20, 0x65, 0x6e, 0x75, 0x6d, - 0x20, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x32, 0x19, 0x4e, 0x75, 0x6d, 0x65, 0x72, 0x69, 0x63, 0x20, - 0x65, 0x6e, 0x75, 0x6d, 0x20, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, - 0x2e, 0x52, 0x13, 0x65, 0x6e, 0x75, 0x6d, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x41, 0x6e, 0x6e, 0x6f, - 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x76, 0x0a, 0x1a, 0x72, 0x65, 0x70, 0x65, 0x61, 0x74, - 0x65, 0x64, 0x5f, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x5f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x22, 0x20, 0x03, 0x28, 0x09, 0x42, 0x38, 0x92, 0x41, 0x35, 0x2a, - 0x15, 0x52, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x20, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, - 0x20, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x32, 0x1c, 0x52, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, - 0x20, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x20, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, - 0x69, 0x6f, 0x6e, 0x2e, 0x52, 0x18, 0x72, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x53, 0x74, - 0x72, 0x69, 0x6e, 0x67, 0x41, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0xa2, - 0x01, 0x0a, 0x1a, 0x72, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x6e, 0x65, 0x73, 0x74, - 0x65, 0x64, 0x5f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x23, 0x20, - 0x03, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x69, 0x64, 0x2e, 0x41, 0x42, 0x69, 0x74, 0x4f, 0x66, - 0x45, 0x76, 0x65, 0x72, 0x79, 0x74, 0x68, 0x69, 0x6e, 0x67, 0x2e, 0x4e, 0x65, 0x73, 0x74, 0x65, - 0x64, 0x42, 0x46, 0x92, 0x41, 0x43, 0x2a, 0x1c, 0x52, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, - 0x20, 0x6e, 0x65, 0x73, 0x74, 0x65, 0x64, 0x20, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x20, 0x74, - 0x69, 0x74, 0x6c, 0x65, 0x32, 0x23, 0x52, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x20, 0x6e, - 0x65, 0x73, 0x74, 0x65, 0x64, 0x20, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x20, 0x64, 0x65, 0x73, - 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x52, 0x18, 0x72, 0x65, 0x70, 0x65, 0x61, - 0x74, 0x65, 0x64, 0x4e, 0x65, 0x73, 0x74, 0x65, 0x64, 0x41, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x12, 0x7f, 0x0a, 0x11, 0x6e, 0x65, 0x73, 0x74, 0x65, 0x64, 0x5f, 0x61, 0x6e, - 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x24, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, - 0x2e, 0x67, 0x69, 0x64, 0x2e, 0x41, 0x42, 0x69, 0x74, 0x4f, 0x66, 0x45, 0x76, 0x65, 0x72, 0x79, - 0x74, 0x68, 0x69, 0x6e, 0x67, 0x2e, 0x4e, 0x65, 0x73, 0x74, 0x65, 0x64, 0x42, 0x34, 0x92, 0x41, - 0x31, 0x2a, 0x13, 0x4e, 0x65, 0x73, 0x74, 0x65, 0x64, 0x20, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, - 0x20, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x32, 0x1a, 0x4e, 0x65, 0x73, 0x74, 0x65, 0x64, 0x20, 0x6f, - 0x62, 0x6a, 0x65, 0x63, 0x74, 0x20, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, - 0x6e, 0x2e, 0x52, 0x10, 0x6e, 0x65, 0x73, 0x74, 0x65, 0x64, 0x41, 0x6e, 0x6e, 0x6f, 0x74, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x37, 0x0a, 0x13, 0x69, 0x6e, 0x74, 0x36, 0x34, 0x5f, 0x6f, 0x76, - 0x65, 0x72, 0x72, 0x69, 0x64, 0x65, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x25, 0x20, 0x01, 0x28, - 0x03, 0x42, 0x07, 0x92, 0x41, 0x04, 0x9a, 0x02, 0x01, 0x03, 0x52, 0x11, 0x69, 0x6e, 0x74, 0x36, - 0x34, 0x4f, 0x76, 0x65, 0x72, 0x72, 0x69, 0x64, 0x65, 0x54, 0x79, 0x70, 0x65, 0x12, 0x64, 0x0a, - 0x2d, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x64, 0x5f, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, - 0x5f, 0x76, 0x69, 0x61, 0x5f, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x5f, 0x62, 0x65, 0x68, 0x61, 0x76, - 0x69, 0x6f, 0x72, 0x5f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x26, - 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x02, 0x52, 0x28, 0x72, 0x65, 0x71, 0x75, 0x69, - 0x72, 0x65, 0x64, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x56, 0x69, 0x61, 0x46, 0x69, 0x65, 0x6c, - 0x64, 0x42, 0x65, 0x68, 0x61, 0x76, 0x69, 0x6f, 0x72, 0x41, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x12, 0x69, 0x0a, 0x30, 0x6f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x5f, 0x6f, 0x6e, - 0x6c, 0x79, 0x5f, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x5f, 0x76, 0x69, 0x61, 0x5f, 0x66, 0x69, - 0x65, 0x6c, 0x64, 0x5f, 0x62, 0x65, 0x68, 0x61, 0x76, 0x69, 0x6f, 0x72, 0x5f, 0x61, 0x6e, 0x6e, - 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x27, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, - 0x41, 0x03, 0x52, 0x2a, 0x6f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x4f, 0x6e, 0x6c, 0x79, 0x53, 0x74, - 0x72, 0x69, 0x6e, 0x67, 0x56, 0x69, 0x61, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x42, 0x65, 0x68, 0x61, - 0x76, 0x69, 0x6f, 0x72, 0x41, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x1a, 0xbd, - 0x01, 0x0a, 0x06, 0x4e, 0x65, 0x73, 0x74, 0x65, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, - 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x16, 0x0a, - 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x06, 0x61, - 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x51, 0x0a, 0x02, 0x6f, 0x6b, 0x18, 0x03, 0x20, 0x01, 0x28, - 0x0e, 0x32, 0x25, 0x2e, 0x67, 0x69, 0x64, 0x2e, 0x41, 0x42, 0x69, 0x74, 0x4f, 0x66, 0x45, 0x76, - 0x65, 0x72, 0x79, 0x74, 0x68, 0x69, 0x6e, 0x67, 0x2e, 0x4e, 0x65, 0x73, 0x74, 0x65, 0x64, 0x2e, - 0x44, 0x65, 0x65, 0x70, 0x45, 0x6e, 0x75, 0x6d, 0x42, 0x1a, 0x92, 0x41, 0x17, 0x32, 0x15, 0x44, - 0x65, 0x65, 0x70, 0x45, 0x6e, 0x75, 0x6d, 0x20, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, - 0x69, 0x6f, 0x6e, 0x2e, 0x52, 0x02, 0x6f, 0x6b, 0x22, 0x1f, 0x0a, 0x08, 0x44, 0x65, 0x65, 0x70, - 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x09, 0x0a, 0x05, 0x46, 0x41, 0x4c, 0x53, 0x45, 0x10, 0x00, 0x12, - 0x08, 0x0a, 0x04, 0x54, 0x52, 0x55, 0x45, 0x10, 0x01, 0x3a, 0x13, 0x92, 0x41, 0x10, 0x32, 0x0e, - 0x7b, 0x22, 0x6f, 0x6b, 0x22, 0x3a, 0x20, 0x22, 0x54, 0x52, 0x55, 0x45, 0x22, 0x7d, 0x1a, 0x4d, - 0x0a, 0x0d, 0x4d, 0x61, 0x70, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, - 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, - 0x79, 0x12, 0x26, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, - 0x32, 0x10, 0x2e, 0x67, 0x69, 0x64, 0x2e, 0x4e, 0x75, 0x6d, 0x65, 0x72, 0x69, 0x63, 0x45, 0x6e, - 0x75, 0x6d, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x1a, 0x44, 0x0a, - 0x16, 0x4d, 0x61, 0x70, 0x70, 0x65, 0x64, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x56, 0x61, 0x6c, - 0x75, 0x65, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, - 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, - 0x02, 0x38, 0x01, 0x1a, 0x62, 0x0a, 0x16, 0x4d, 0x61, 0x70, 0x70, 0x65, 0x64, 0x4e, 0x65, 0x73, - 0x74, 0x65, 0x64, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, - 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, - 0x32, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, - 0x2e, 0x67, 0x69, 0x64, 0x2e, 0x41, 0x42, 0x69, 0x74, 0x4f, 0x66, 0x45, 0x76, 0x65, 0x72, 0x79, - 0x74, 0x68, 0x69, 0x6e, 0x67, 0x2e, 0x4e, 0x65, 0x73, 0x74, 0x65, 0x64, 0x52, 0x05, 0x76, 0x61, - 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x3a, 0x8e, 0x02, 0x92, 0x41, 0x8a, 0x02, 0x0a, 0x84, - 0x01, 0x2a, 0x13, 0x41, 0x20, 0x62, 0x69, 0x74, 0x20, 0x6f, 0x66, 0x20, 0x65, 0x76, 0x65, 0x72, - 0x79, 0x74, 0x68, 0x69, 0x6e, 0x67, 0x32, 0x49, 0x49, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x69, 0x6f, - 0x6e, 0x61, 0x6c, 0x79, 0x20, 0x63, 0x6f, 0x6d, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x65, 0x64, - 0x20, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x20, 0x74, 0x79, 0x70, 0x65, 0x20, 0x74, 0x6f, - 0x20, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x20, 0x6d, 0x61, 0x6e, 0x79, 0x20, 0x66, 0x65, 0x61, 0x74, - 0x75, 0x72, 0x65, 0x73, 0x20, 0x6f, 0x66, 0x20, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, - 0x2e, 0xd2, 0x01, 0x04, 0x75, 0x75, 0x69, 0x64, 0xd2, 0x01, 0x0b, 0x69, 0x6e, 0x74, 0x36, 0x34, - 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0xd2, 0x01, 0x0c, 0x64, 0x6f, 0x75, 0x62, 0x6c, 0x65, 0x5f, - 0x76, 0x61, 0x6c, 0x75, 0x65, 0x2a, 0x56, 0x0a, 0x24, 0x46, 0x69, 0x6e, 0x64, 0x20, 0x6f, 0x75, - 0x74, 0x20, 0x6d, 0x6f, 0x72, 0x65, 0x20, 0x61, 0x62, 0x6f, 0x75, 0x74, 0x20, 0x41, 0x42, 0x69, - 0x74, 0x4f, 0x66, 0x45, 0x76, 0x65, 0x72, 0x79, 0x74, 0x68, 0x69, 0x6e, 0x67, 0x12, 0x2e, 0x68, - 0x74, 0x74, 0x70, 0x73, 0x3a, 0x2f, 0x2f, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, - 0x6d, 0x2f, 0x67, 0x72, 0x70, 0x63, 0x2d, 0x65, 0x63, 0x6f, 0x73, 0x79, 0x73, 0x74, 0x65, 0x6d, - 0x2f, 0x67, 0x72, 0x70, 0x63, 0x2d, 0x67, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x32, 0x29, 0x7b, - 0x22, 0x69, 0x6e, 0x74, 0x36, 0x34, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0x3a, 0x20, 0x31, - 0x32, 0x2c, 0x20, 0x22, 0x64, 0x6f, 0x75, 0x62, 0x6c, 0x65, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, - 0x22, 0x3a, 0x20, 0x31, 0x32, 0x2e, 0x33, 0x7d, 0x42, 0x0d, 0x0a, 0x0b, 0x6f, 0x6e, 0x65, 0x6f, - 0x66, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0xde, 0x08, 0x0a, 0x18, 0x41, 0x42, 0x69, 0x74, - 0x4f, 0x66, 0x45, 0x76, 0x65, 0x72, 0x79, 0x74, 0x68, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x70, 0x65, - 0x61, 0x74, 0x65, 0x64, 0x12, 0x39, 0x0a, 0x19, 0x70, 0x61, 0x74, 0x68, 0x5f, 0x72, 0x65, 0x70, - 0x65, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x5f, 0x76, 0x61, 0x6c, 0x75, - 0x65, 0x18, 0x01, 0x20, 0x03, 0x28, 0x02, 0x52, 0x16, 0x70, 0x61, 0x74, 0x68, 0x52, 0x65, 0x70, - 0x65, 0x61, 0x74, 0x65, 0x64, 0x46, 0x6c, 0x6f, 0x61, 0x74, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, - 0x3b, 0x0a, 0x1a, 0x70, 0x61, 0x74, 0x68, 0x5f, 0x72, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, - 0x5f, 0x64, 0x6f, 0x75, 0x62, 0x6c, 0x65, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, - 0x03, 0x28, 0x01, 0x52, 0x17, 0x70, 0x61, 0x74, 0x68, 0x52, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, - 0x64, 0x44, 0x6f, 0x75, 0x62, 0x6c, 0x65, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x39, 0x0a, 0x19, - 0x70, 0x61, 0x74, 0x68, 0x5f, 0x72, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x69, 0x6e, - 0x74, 0x36, 0x34, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x03, 0x20, 0x03, 0x28, 0x03, 0x52, - 0x16, 0x70, 0x61, 0x74, 0x68, 0x52, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x49, 0x6e, 0x74, - 0x36, 0x34, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x3b, 0x0a, 0x1a, 0x70, 0x61, 0x74, 0x68, 0x5f, - 0x72, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x75, 0x69, 0x6e, 0x74, 0x36, 0x34, 0x5f, - 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x04, 0x20, 0x03, 0x28, 0x04, 0x52, 0x17, 0x70, 0x61, 0x74, - 0x68, 0x52, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x55, 0x69, 0x6e, 0x74, 0x36, 0x34, 0x56, - 0x61, 0x6c, 0x75, 0x65, 0x12, 0x39, 0x0a, 0x19, 0x70, 0x61, 0x74, 0x68, 0x5f, 0x72, 0x65, 0x70, - 0x65, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x69, 0x6e, 0x74, 0x33, 0x32, 0x5f, 0x76, 0x61, 0x6c, 0x75, - 0x65, 0x18, 0x05, 0x20, 0x03, 0x28, 0x05, 0x52, 0x16, 0x70, 0x61, 0x74, 0x68, 0x52, 0x65, 0x70, - 0x65, 0x61, 0x74, 0x65, 0x64, 0x49, 0x6e, 0x74, 0x33, 0x32, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, - 0x3d, 0x0a, 0x1b, 0x70, 0x61, 0x74, 0x68, 0x5f, 0x72, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, - 0x5f, 0x66, 0x69, 0x78, 0x65, 0x64, 0x36, 0x34, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x06, - 0x20, 0x03, 0x28, 0x06, 0x52, 0x18, 0x70, 0x61, 0x74, 0x68, 0x52, 0x65, 0x70, 0x65, 0x61, 0x74, - 0x65, 0x64, 0x46, 0x69, 0x78, 0x65, 0x64, 0x36, 0x34, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x3d, - 0x0a, 0x1b, 0x70, 0x61, 0x74, 0x68, 0x5f, 0x72, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x5f, - 0x66, 0x69, 0x78, 0x65, 0x64, 0x33, 0x32, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x07, 0x20, - 0x03, 0x28, 0x07, 0x52, 0x18, 0x70, 0x61, 0x74, 0x68, 0x52, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, - 0x64, 0x46, 0x69, 0x78, 0x65, 0x64, 0x33, 0x32, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x37, 0x0a, - 0x18, 0x70, 0x61, 0x74, 0x68, 0x5f, 0x72, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x62, - 0x6f, 0x6f, 0x6c, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x08, 0x20, 0x03, 0x28, 0x08, 0x52, - 0x15, 0x70, 0x61, 0x74, 0x68, 0x52, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x42, 0x6f, 0x6f, - 0x6c, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x3b, 0x0a, 0x1a, 0x70, 0x61, 0x74, 0x68, 0x5f, 0x72, - 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x5f, 0x76, - 0x61, 0x6c, 0x75, 0x65, 0x18, 0x09, 0x20, 0x03, 0x28, 0x09, 0x52, 0x17, 0x70, 0x61, 0x74, 0x68, - 0x52, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x56, 0x61, - 0x6c, 0x75, 0x65, 0x12, 0x39, 0x0a, 0x19, 0x70, 0x61, 0x74, 0x68, 0x5f, 0x72, 0x65, 0x70, 0x65, - 0x61, 0x74, 0x65, 0x64, 0x5f, 0x62, 0x79, 0x74, 0x65, 0x73, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, - 0x18, 0x0a, 0x20, 0x03, 0x28, 0x0c, 0x52, 0x16, 0x70, 0x61, 0x74, 0x68, 0x52, 0x65, 0x70, 0x65, - 0x61, 0x74, 0x65, 0x64, 0x42, 0x79, 0x74, 0x65, 0x73, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x3b, - 0x0a, 0x1a, 0x70, 0x61, 0x74, 0x68, 0x5f, 0x72, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x5f, - 0x75, 0x69, 0x6e, 0x74, 0x33, 0x32, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x0b, 0x20, 0x03, - 0x28, 0x0d, 0x52, 0x17, 0x70, 0x61, 0x74, 0x68, 0x52, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, - 0x55, 0x69, 0x6e, 0x74, 0x33, 0x32, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x49, 0x0a, 0x18, 0x70, - 0x61, 0x74, 0x68, 0x5f, 0x72, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x65, 0x6e, 0x75, - 0x6d, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x0c, 0x20, 0x03, 0x28, 0x0e, 0x32, 0x10, 0x2e, - 0x67, 0x69, 0x64, 0x2e, 0x4e, 0x75, 0x6d, 0x65, 0x72, 0x69, 0x63, 0x45, 0x6e, 0x75, 0x6d, 0x52, - 0x15, 0x70, 0x61, 0x74, 0x68, 0x52, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x45, 0x6e, 0x75, - 0x6d, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x3f, 0x0a, 0x1c, 0x70, 0x61, 0x74, 0x68, 0x5f, 0x72, - 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x73, 0x66, 0x69, 0x78, 0x65, 0x64, 0x33, 0x32, - 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x0d, 0x20, 0x03, 0x28, 0x0f, 0x52, 0x19, 0x70, 0x61, - 0x74, 0x68, 0x52, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x53, 0x66, 0x69, 0x78, 0x65, 0x64, - 0x33, 0x32, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x3f, 0x0a, 0x1c, 0x70, 0x61, 0x74, 0x68, 0x5f, - 0x72, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x73, 0x66, 0x69, 0x78, 0x65, 0x64, 0x36, - 0x34, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x0e, 0x20, 0x03, 0x28, 0x10, 0x52, 0x19, 0x70, - 0x61, 0x74, 0x68, 0x52, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x53, 0x66, 0x69, 0x78, 0x65, - 0x64, 0x36, 0x34, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x3b, 0x0a, 0x1a, 0x70, 0x61, 0x74, 0x68, - 0x5f, 0x72, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x73, 0x69, 0x6e, 0x74, 0x33, 0x32, - 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x0f, 0x20, 0x03, 0x28, 0x11, 0x52, 0x17, 0x70, 0x61, - 0x74, 0x68, 0x52, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x53, 0x69, 0x6e, 0x74, 0x33, 0x32, - 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x3b, 0x0a, 0x1a, 0x70, 0x61, 0x74, 0x68, 0x5f, 0x72, 0x65, - 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x73, 0x69, 0x6e, 0x74, 0x36, 0x34, 0x5f, 0x76, 0x61, - 0x6c, 0x75, 0x65, 0x18, 0x10, 0x20, 0x03, 0x28, 0x12, 0x52, 0x17, 0x70, 0x61, 0x74, 0x68, 0x52, - 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x53, 0x69, 0x6e, 0x74, 0x36, 0x34, 0x56, 0x61, 0x6c, - 0x75, 0x65, 0x3a, 0x64, 0x92, 0x41, 0x61, 0x32, 0x5f, 0x7b, 0x22, 0x70, 0x61, 0x74, 0x68, 0x5f, - 0x72, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x62, 0x6f, 0x6f, 0x6c, 0x5f, 0x76, 0x61, - 0x6c, 0x75, 0x65, 0x22, 0x3a, 0x20, 0x5b, 0x74, 0x72, 0x75, 0x65, 0x2c, 0x20, 0x74, 0x72, 0x75, - 0x65, 0x2c, 0x20, 0x66, 0x61, 0x6c, 0x73, 0x65, 0x2c, 0x20, 0x74, 0x72, 0x75, 0x65, 0x5d, 0x2c, - 0x20, 0x22, 0x70, 0x61, 0x74, 0x68, 0x5f, 0x72, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x5f, - 0x69, 0x6e, 0x74, 0x33, 0x32, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0x3a, 0x20, 0x5b, 0x31, - 0x2c, 0x20, 0x32, 0x2c, 0x20, 0x33, 0x5d, 0x7d, 0x22, 0x41, 0x0a, 0x13, 0x43, 0x68, 0x65, 0x63, - 0x6b, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, - 0x2a, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x12, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x72, 0x70, 0x63, 0x2e, 0x53, 0x74, 0x61, - 0x74, 0x75, 0x73, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x22, 0x1a, 0x0a, 0x04, 0x42, - 0x6f, 0x64, 0x79, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0x40, 0x0a, 0x0f, 0x4d, 0x65, 0x73, 0x73, 0x61, - 0x67, 0x65, 0x57, 0x69, 0x74, 0x68, 0x42, 0x6f, 0x64, 0x79, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x1d, 0x0a, 0x04, 0x64, 0x61, - 0x74, 0x61, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x09, 0x2e, 0x67, 0x69, 0x64, 0x2e, 0x42, - 0x6f, 0x64, 0x79, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x22, 0x77, 0x0a, 0x0f, 0x55, 0x70, 0x64, - 0x61, 0x74, 0x65, 0x56, 0x32, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x27, 0x0a, 0x03, - 0x61, 0x62, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x67, 0x69, 0x64, 0x2e, - 0x41, 0x42, 0x69, 0x74, 0x4f, 0x66, 0x45, 0x76, 0x65, 0x72, 0x79, 0x74, 0x68, 0x69, 0x6e, 0x67, - 0x52, 0x03, 0x61, 0x62, 0x65, 0x12, 0x3b, 0x0a, 0x0b, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x5f, - 0x6d, 0x61, 0x73, 0x6b, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, - 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x69, 0x65, - 0x6c, 0x64, 0x4d, 0x61, 0x73, 0x6b, 0x52, 0x0a, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x4d, 0x61, - 0x73, 0x6b, 0x22, 0x67, 0x0a, 0x04, 0x42, 0x6f, 0x6f, 0x6b, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, - 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x0e, - 0x0a, 0x02, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x3b, - 0x0a, 0x0b, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x03, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, - 0x0a, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x22, 0x63, 0x0a, 0x11, 0x43, - 0x72, 0x65, 0x61, 0x74, 0x65, 0x42, 0x6f, 0x6f, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x12, 0x16, 0x0a, 0x06, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x06, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x12, 0x1d, 0x0a, 0x04, 0x62, 0x6f, 0x6f, 0x6b, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x09, 0x2e, 0x67, 0x69, 0x64, 0x2e, 0x42, 0x6f, 0x6f, - 0x6b, 0x52, 0x04, 0x62, 0x6f, 0x6f, 0x6b, 0x12, 0x17, 0x0a, 0x07, 0x62, 0x6f, 0x6f, 0x6b, 0x5f, - 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x62, 0x6f, 0x6f, 0x6b, 0x49, 0x64, - 0x22, 0x99, 0x01, 0x0a, 0x11, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x42, 0x6f, 0x6f, 0x6b, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x22, 0x0a, 0x04, 0x62, 0x6f, 0x6f, 0x6b, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x09, 0x2e, 0x67, 0x69, 0x64, 0x2e, 0x42, 0x6f, 0x6f, 0x6b, 0x42, - 0x03, 0xe0, 0x41, 0x02, 0x52, 0x04, 0x62, 0x6f, 0x6f, 0x6b, 0x12, 0x3b, 0x0a, 0x0b, 0x75, 0x70, - 0x64, 0x61, 0x74, 0x65, 0x5f, 0x6d, 0x61, 0x73, 0x6b, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, - 0x66, 0x2e, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4d, 0x61, 0x73, 0x6b, 0x52, 0x0a, 0x75, 0x70, 0x64, - 0x61, 0x74, 0x65, 0x4d, 0x61, 0x73, 0x6b, 0x12, 0x23, 0x0a, 0x0d, 0x61, 0x6c, 0x6c, 0x6f, 0x77, - 0x5f, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6e, 0x67, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0c, - 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x4d, 0x69, 0x73, 0x73, 0x69, 0x6e, 0x67, 0x2a, 0x20, 0x0a, 0x0b, - 0x4e, 0x75, 0x6d, 0x65, 0x72, 0x69, 0x63, 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x08, 0x0a, 0x04, 0x5a, - 0x45, 0x52, 0x4f, 0x10, 0x00, 0x12, 0x07, 0x0a, 0x03, 0x4f, 0x4e, 0x45, 0x10, 0x01, 0x32, 0xb4, - 0x01, 0x0a, 0x04, 0x55, 0x73, 0x65, 0x72, 0x12, 0x53, 0x0a, 0x08, 0x47, 0x65, 0x6e, 0x65, 0x72, - 0x61, 0x74, 0x65, 0x12, 0x14, 0x2e, 0x67, 0x69, 0x64, 0x2e, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, - 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x15, 0x2e, 0x67, 0x69, 0x64, 0x2e, - 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x22, 0x1a, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x14, 0x22, 0x0f, 0x2f, 0x76, 0x31, 0x2f, 0x69, 0x64, - 0x2f, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x3a, 0x01, 0x2a, 0x12, 0x44, 0x0a, 0x05, - 0x54, 0x79, 0x70, 0x65, 0x73, 0x12, 0x11, 0x2e, 0x67, 0x69, 0x64, 0x2e, 0x54, 0x79, 0x70, 0x65, - 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x12, 0x2e, 0x67, 0x69, 0x64, 0x2e, 0x54, - 0x79, 0x70, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x14, 0x82, 0xd3, - 0xe4, 0x93, 0x02, 0x0e, 0x12, 0x0c, 0x2f, 0x76, 0x31, 0x2f, 0x69, 0x64, 0x2f, 0x74, 0x79, 0x70, - 0x65, 0x73, 0x1a, 0x11, 0xca, 0x41, 0x0e, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x68, 0x6f, 0x73, 0x74, - 0x3a, 0x38, 0x30, 0x38, 0x30, 0x32, 0xdc, 0x1a, 0x0a, 0x17, 0x41, 0x42, 0x69, 0x74, 0x4f, 0x66, - 0x45, 0x76, 0x65, 0x72, 0x79, 0x74, 0x68, 0x69, 0x6e, 0x67, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, - 0x65, 0x12, 0xf3, 0x02, 0x0a, 0x06, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x12, 0x15, 0x2e, 0x67, - 0x69, 0x64, 0x2e, 0x41, 0x42, 0x69, 0x74, 0x4f, 0x66, 0x45, 0x76, 0x65, 0x72, 0x79, 0x74, 0x68, - 0x69, 0x6e, 0x67, 0x1a, 0x15, 0x2e, 0x67, 0x69, 0x64, 0x2e, 0x41, 0x42, 0x69, 0x74, 0x4f, 0x66, - 0x45, 0x76, 0x65, 0x72, 0x79, 0x74, 0x68, 0x69, 0x6e, 0x67, 0x22, 0xba, 0x02, 0x82, 0xd3, 0xe4, - 0x93, 0x02, 0xb3, 0x02, 0x22, 0xb0, 0x02, 0x2f, 0x76, 0x31, 0x2f, 0x65, 0x78, 0x61, 0x6d, 0x70, - 0x6c, 0x65, 0x2f, 0x61, 0x5f, 0x62, 0x69, 0x74, 0x5f, 0x6f, 0x66, 0x5f, 0x65, 0x76, 0x65, 0x72, - 0x79, 0x74, 0x68, 0x69, 0x6e, 0x67, 0x2f, 0x7b, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x5f, 0x76, 0x61, - 0x6c, 0x75, 0x65, 0x7d, 0x2f, 0x7b, 0x64, 0x6f, 0x75, 0x62, 0x6c, 0x65, 0x5f, 0x76, 0x61, 0x6c, - 0x75, 0x65, 0x7d, 0x2f, 0x7b, 0x69, 0x6e, 0x74, 0x36, 0x34, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, - 0x7d, 0x2f, 0x73, 0x65, 0x70, 0x61, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x2f, 0x7b, 0x75, 0x69, 0x6e, - 0x74, 0x36, 0x34, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x7d, 0x2f, 0x7b, 0x69, 0x6e, 0x74, 0x33, - 0x32, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x7d, 0x2f, 0x7b, 0x66, 0x69, 0x78, 0x65, 0x64, 0x36, - 0x34, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x7d, 0x2f, 0x7b, 0x66, 0x69, 0x78, 0x65, 0x64, 0x33, - 0x32, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x7d, 0x2f, 0x7b, 0x62, 0x6f, 0x6f, 0x6c, 0x5f, 0x76, - 0x61, 0x6c, 0x75, 0x65, 0x7d, 0x2f, 0x7b, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x5f, 0x76, 0x61, - 0x6c, 0x75, 0x65, 0x3d, 0x73, 0x74, 0x72, 0x70, 0x72, 0x65, 0x66, 0x69, 0x78, 0x2f, 0x2a, 0x7d, - 0x2f, 0x7b, 0x75, 0x69, 0x6e, 0x74, 0x33, 0x32, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x7d, 0x2f, - 0x7b, 0x73, 0x66, 0x69, 0x78, 0x65, 0x64, 0x33, 0x32, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x7d, - 0x2f, 0x7b, 0x73, 0x66, 0x69, 0x78, 0x65, 0x64, 0x36, 0x34, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, - 0x7d, 0x2f, 0x7b, 0x73, 0x69, 0x6e, 0x74, 0x33, 0x32, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x7d, - 0x2f, 0x7b, 0x73, 0x69, 0x6e, 0x74, 0x36, 0x34, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x7d, 0x2f, - 0x7b, 0x6e, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x76, 0x65, 0x6e, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, - 0x4e, 0x61, 0x6d, 0x65, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x7d, 0x2f, 0x7b, 0x65, 0x6e, 0x75, 0x6d, - 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x7d, 0x12, 0x66, 0x0a, 0x0a, 0x43, 0x72, 0x65, 0x61, 0x74, - 0x65, 0x42, 0x6f, 0x64, 0x79, 0x12, 0x15, 0x2e, 0x67, 0x69, 0x64, 0x2e, 0x41, 0x42, 0x69, 0x74, - 0x4f, 0x66, 0x45, 0x76, 0x65, 0x72, 0x79, 0x74, 0x68, 0x69, 0x6e, 0x67, 0x1a, 0x15, 0x2e, 0x67, - 0x69, 0x64, 0x2e, 0x41, 0x42, 0x69, 0x74, 0x4f, 0x66, 0x45, 0x76, 0x65, 0x72, 0x79, 0x74, 0x68, - 0x69, 0x6e, 0x67, 0x22, 0x2a, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x24, 0x22, 0x1f, 0x2f, 0x76, 0x31, - 0x2f, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x2f, 0x61, 0x5f, 0x62, 0x69, 0x74, 0x5f, 0x6f, - 0x66, 0x5f, 0x65, 0x76, 0x65, 0x72, 0x79, 0x74, 0x68, 0x69, 0x6e, 0x67, 0x3a, 0x01, 0x2a, 0x12, - 0x5e, 0x0a, 0x0a, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x42, 0x6f, 0x6f, 0x6b, 0x12, 0x16, 0x2e, - 0x67, 0x69, 0x64, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x42, 0x6f, 0x6f, 0x6b, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x09, 0x2e, 0x67, 0x69, 0x64, 0x2e, 0x42, 0x6f, 0x6f, 0x6b, - 0x22, 0x2d, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x27, 0x22, 0x1f, 0x2f, 0x76, 0x31, 0x2f, 0x7b, 0x70, - 0x61, 0x72, 0x65, 0x6e, 0x74, 0x3d, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x73, 0x68, 0x65, 0x72, 0x73, - 0x2f, 0x2a, 0x7d, 0x2f, 0x62, 0x6f, 0x6f, 0x6b, 0x73, 0x3a, 0x04, 0x62, 0x6f, 0x6f, 0x6b, 0x12, - 0x63, 0x0a, 0x0a, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x42, 0x6f, 0x6f, 0x6b, 0x12, 0x16, 0x2e, - 0x67, 0x69, 0x64, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x42, 0x6f, 0x6f, 0x6b, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x09, 0x2e, 0x67, 0x69, 0x64, 0x2e, 0x42, 0x6f, 0x6f, 0x6b, - 0x22, 0x32, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x2c, 0x32, 0x24, 0x2f, 0x76, 0x31, 0x2f, 0x7b, 0x62, - 0x6f, 0x6f, 0x6b, 0x2e, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x73, 0x68, - 0x65, 0x72, 0x73, 0x2f, 0x2a, 0x2f, 0x62, 0x6f, 0x6f, 0x6b, 0x73, 0x2f, 0x2a, 0x7d, 0x3a, 0x04, - 0x62, 0x6f, 0x6f, 0x6b, 0x12, 0x6a, 0x0a, 0x06, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x12, 0x15, - 0x2e, 0x67, 0x69, 0x64, 0x2e, 0x41, 0x42, 0x69, 0x74, 0x4f, 0x66, 0x45, 0x76, 0x65, 0x72, 0x79, - 0x74, 0x68, 0x69, 0x6e, 0x67, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x31, 0x82, - 0xd3, 0xe4, 0x93, 0x02, 0x2b, 0x1a, 0x26, 0x2f, 0x76, 0x31, 0x2f, 0x65, 0x78, 0x61, 0x6d, 0x70, - 0x6c, 0x65, 0x2f, 0x61, 0x5f, 0x62, 0x69, 0x74, 0x5f, 0x6f, 0x66, 0x5f, 0x65, 0x76, 0x65, 0x72, - 0x79, 0x74, 0x68, 0x69, 0x6e, 0x67, 0x2f, 0x7b, 0x75, 0x75, 0x69, 0x64, 0x7d, 0x3a, 0x01, 0x2a, - 0x12, 0x98, 0x02, 0x0a, 0x08, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x56, 0x32, 0x12, 0x14, 0x2e, - 0x67, 0x69, 0x64, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x56, 0x32, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0xdd, 0x01, 0x82, 0xd3, - 0xe4, 0x93, 0x02, 0x92, 0x01, 0x1a, 0x2a, 0x2f, 0x76, 0x32, 0x2f, 0x65, 0x78, 0x61, 0x6d, 0x70, - 0x6c, 0x65, 0x2f, 0x61, 0x5f, 0x62, 0x69, 0x74, 0x5f, 0x6f, 0x66, 0x5f, 0x65, 0x76, 0x65, 0x72, - 0x79, 0x74, 0x68, 0x69, 0x6e, 0x67, 0x2f, 0x7b, 0x61, 0x62, 0x65, 0x2e, 0x75, 0x75, 0x69, 0x64, - 0x7d, 0x3a, 0x01, 0x2a, 0x5a, 0x2f, 0x32, 0x2a, 0x2f, 0x76, 0x32, 0x2f, 0x65, 0x78, 0x61, 0x6d, - 0x70, 0x6c, 0x65, 0x2f, 0x61, 0x5f, 0x62, 0x69, 0x74, 0x5f, 0x6f, 0x66, 0x5f, 0x65, 0x76, 0x65, - 0x72, 0x79, 0x74, 0x68, 0x69, 0x6e, 0x67, 0x2f, 0x7b, 0x61, 0x62, 0x65, 0x2e, 0x75, 0x75, 0x69, - 0x64, 0x7d, 0x3a, 0x01, 0x2a, 0x5a, 0x30, 0x32, 0x2b, 0x2f, 0x76, 0x32, 0x61, 0x2f, 0x65, 0x78, - 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x2f, 0x61, 0x5f, 0x62, 0x69, 0x74, 0x5f, 0x6f, 0x66, 0x5f, 0x65, - 0x76, 0x65, 0x72, 0x79, 0x74, 0x68, 0x69, 0x6e, 0x67, 0x2f, 0x7b, 0x61, 0x62, 0x65, 0x2e, 0x75, - 0x75, 0x69, 0x64, 0x7d, 0x3a, 0x01, 0x2a, 0x92, 0x41, 0x41, 0x62, 0x29, 0x0a, 0x0e, 0x0a, 0x0a, - 0x41, 0x70, 0x69, 0x4b, 0x65, 0x79, 0x41, 0x75, 0x74, 0x68, 0x12, 0x00, 0x0a, 0x17, 0x0a, 0x06, - 0x4f, 0x41, 0x75, 0x74, 0x68, 0x32, 0x12, 0x0d, 0x0a, 0x04, 0x72, 0x65, 0x61, 0x64, 0x0a, 0x05, - 0x77, 0x72, 0x69, 0x74, 0x65, 0x6a, 0x14, 0x0a, 0x0e, 0x78, 0x2d, 0x69, 0x72, 0x72, 0x65, 0x76, - 0x65, 0x72, 0x73, 0x69, 0x62, 0x6c, 0x65, 0x12, 0x02, 0x20, 0x01, 0x12, 0xc7, 0x01, 0x0a, 0x08, - 0x47, 0x65, 0x74, 0x51, 0x75, 0x65, 0x72, 0x79, 0x12, 0x15, 0x2e, 0x67, 0x69, 0x64, 0x2e, 0x41, - 0x42, 0x69, 0x74, 0x4f, 0x66, 0x45, 0x76, 0x65, 0x72, 0x79, 0x74, 0x68, 0x69, 0x6e, 0x67, 0x1a, - 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, - 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x8b, 0x01, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x2e, - 0x12, 0x2c, 0x2f, 0x76, 0x31, 0x2f, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x2f, 0x61, 0x5f, - 0x62, 0x69, 0x74, 0x5f, 0x6f, 0x66, 0x5f, 0x65, 0x76, 0x65, 0x72, 0x79, 0x74, 0x68, 0x69, 0x6e, - 0x67, 0x2f, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2f, 0x7b, 0x75, 0x75, 0x69, 0x64, 0x7d, 0x92, 0x41, - 0x54, 0x22, 0x4e, 0x0a, 0x1c, 0x46, 0x69, 0x6e, 0x64, 0x20, 0x6f, 0x75, 0x74, 0x20, 0x6d, 0x6f, - 0x72, 0x65, 0x20, 0x61, 0x62, 0x6f, 0x75, 0x74, 0x20, 0x47, 0x65, 0x74, 0x51, 0x75, 0x65, 0x72, - 0x79, 0x12, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x73, 0x3a, 0x2f, 0x2f, 0x67, 0x69, 0x74, 0x68, 0x75, - 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x67, 0x72, 0x70, 0x63, 0x2d, 0x65, 0x63, 0x6f, 0x73, 0x79, - 0x73, 0x74, 0x65, 0x6d, 0x2f, 0x67, 0x72, 0x70, 0x63, 0x2d, 0x67, 0x61, 0x74, 0x65, 0x77, 0x61, - 0x79, 0x58, 0x01, 0x62, 0x00, 0x12, 0xd3, 0x04, 0x0a, 0x10, 0x47, 0x65, 0x74, 0x52, 0x65, 0x70, - 0x65, 0x61, 0x74, 0x65, 0x64, 0x51, 0x75, 0x65, 0x72, 0x79, 0x12, 0x1d, 0x2e, 0x67, 0x69, 0x64, - 0x2e, 0x41, 0x42, 0x69, 0x74, 0x4f, 0x66, 0x45, 0x76, 0x65, 0x72, 0x79, 0x74, 0x68, 0x69, 0x6e, - 0x67, 0x52, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x1a, 0x1d, 0x2e, 0x67, 0x69, 0x64, 0x2e, - 0x41, 0x42, 0x69, 0x74, 0x4f, 0x66, 0x45, 0x76, 0x65, 0x72, 0x79, 0x74, 0x68, 0x69, 0x6e, 0x67, - 0x52, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x22, 0x80, 0x04, 0x82, 0xd3, 0xe4, 0x93, 0x02, - 0xf9, 0x03, 0x12, 0xf6, 0x03, 0x2f, 0x76, 0x31, 0x2f, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, - 0x2f, 0x61, 0x5f, 0x62, 0x69, 0x74, 0x5f, 0x6f, 0x66, 0x5f, 0x65, 0x76, 0x65, 0x72, 0x79, 0x74, - 0x68, 0x69, 0x6e, 0x67, 0x5f, 0x72, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x2f, 0x7b, 0x70, - 0x61, 0x74, 0x68, 0x5f, 0x72, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x66, 0x6c, 0x6f, - 0x61, 0x74, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x7d, 0x2f, 0x7b, 0x70, 0x61, 0x74, 0x68, 0x5f, - 0x72, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x64, 0x6f, 0x75, 0x62, 0x6c, 0x65, 0x5f, - 0x76, 0x61, 0x6c, 0x75, 0x65, 0x7d, 0x2f, 0x7b, 0x70, 0x61, 0x74, 0x68, 0x5f, 0x72, 0x65, 0x70, - 0x65, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x69, 0x6e, 0x74, 0x36, 0x34, 0x5f, 0x76, 0x61, 0x6c, 0x75, - 0x65, 0x7d, 0x2f, 0x7b, 0x70, 0x61, 0x74, 0x68, 0x5f, 0x72, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, - 0x64, 0x5f, 0x75, 0x69, 0x6e, 0x74, 0x36, 0x34, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x7d, 0x2f, - 0x7b, 0x70, 0x61, 0x74, 0x68, 0x5f, 0x72, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x69, - 0x6e, 0x74, 0x33, 0x32, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x7d, 0x2f, 0x7b, 0x70, 0x61, 0x74, - 0x68, 0x5f, 0x72, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x66, 0x69, 0x78, 0x65, 0x64, - 0x36, 0x34, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x7d, 0x2f, 0x7b, 0x70, 0x61, 0x74, 0x68, 0x5f, - 0x72, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x66, 0x69, 0x78, 0x65, 0x64, 0x33, 0x32, - 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x7d, 0x2f, 0x7b, 0x70, 0x61, 0x74, 0x68, 0x5f, 0x72, 0x65, - 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x62, 0x6f, 0x6f, 0x6c, 0x5f, 0x76, 0x61, 0x6c, 0x75, - 0x65, 0x7d, 0x2f, 0x7b, 0x70, 0x61, 0x74, 0x68, 0x5f, 0x72, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, - 0x64, 0x5f, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x7d, 0x2f, - 0x7b, 0x70, 0x61, 0x74, 0x68, 0x5f, 0x72, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x62, - 0x79, 0x74, 0x65, 0x73, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x7d, 0x2f, 0x7b, 0x70, 0x61, 0x74, - 0x68, 0x5f, 0x72, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x75, 0x69, 0x6e, 0x74, 0x33, - 0x32, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x7d, 0x2f, 0x7b, 0x70, 0x61, 0x74, 0x68, 0x5f, 0x72, - 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x65, 0x6e, 0x75, 0x6d, 0x5f, 0x76, 0x61, 0x6c, - 0x75, 0x65, 0x7d, 0x2f, 0x7b, 0x70, 0x61, 0x74, 0x68, 0x5f, 0x72, 0x65, 0x70, 0x65, 0x61, 0x74, - 0x65, 0x64, 0x5f, 0x73, 0x66, 0x69, 0x78, 0x65, 0x64, 0x33, 0x32, 0x5f, 0x76, 0x61, 0x6c, 0x75, - 0x65, 0x7d, 0x2f, 0x7b, 0x70, 0x61, 0x74, 0x68, 0x5f, 0x72, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, - 0x64, 0x5f, 0x73, 0x66, 0x69, 0x78, 0x65, 0x64, 0x36, 0x34, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, - 0x7d, 0x2f, 0x7b, 0x70, 0x61, 0x74, 0x68, 0x5f, 0x72, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, - 0x5f, 0x73, 0x69, 0x6e, 0x74, 0x33, 0x32, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x7d, 0x2f, 0x7b, - 0x70, 0x61, 0x74, 0x68, 0x5f, 0x72, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x73, 0x69, - 0x6e, 0x74, 0x36, 0x34, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x7d, 0x12, 0x73, 0x0a, 0x0c, 0x44, - 0x65, 0x65, 0x70, 0x50, 0x61, 0x74, 0x68, 0x45, 0x63, 0x68, 0x6f, 0x12, 0x15, 0x2e, 0x67, 0x69, - 0x64, 0x2e, 0x41, 0x42, 0x69, 0x74, 0x4f, 0x66, 0x45, 0x76, 0x65, 0x72, 0x79, 0x74, 0x68, 0x69, - 0x6e, 0x67, 0x1a, 0x15, 0x2e, 0x67, 0x69, 0x64, 0x2e, 0x41, 0x42, 0x69, 0x74, 0x4f, 0x66, 0x45, - 0x76, 0x65, 0x72, 0x79, 0x74, 0x68, 0x69, 0x6e, 0x67, 0x22, 0x35, 0x82, 0xd3, 0xe4, 0x93, 0x02, - 0x2f, 0x22, 0x2a, 0x2f, 0x76, 0x31, 0x2f, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x2f, 0x64, - 0x65, 0x65, 0x70, 0x5f, 0x70, 0x61, 0x74, 0x68, 0x2f, 0x7b, 0x73, 0x69, 0x6e, 0x67, 0x6c, 0x65, - 0x5f, 0x6e, 0x65, 0x73, 0x74, 0x65, 0x64, 0x2e, 0x6e, 0x61, 0x6d, 0x65, 0x7d, 0x3a, 0x01, 0x2a, - 0x12, 0x5f, 0x0a, 0x0a, 0x4e, 0x6f, 0x42, 0x69, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x73, 0x12, 0x19, - 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, - 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, - 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, - 0x79, 0x22, 0x1e, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x18, 0x12, 0x16, 0x2f, 0x76, 0x32, 0x2f, 0x65, - 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x2f, 0x4e, 0x6f, 0x42, 0x69, 0x6e, 0x64, 0x69, 0x6e, 0x67, - 0x73, 0x12, 0x56, 0x0a, 0x07, 0x54, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x12, 0x16, 0x2e, 0x67, - 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, - 0x6d, 0x70, 0x74, 0x79, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x1b, 0x82, 0xd3, - 0xe4, 0x93, 0x02, 0x15, 0x12, 0x13, 0x2f, 0x76, 0x32, 0x2f, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, - 0x65, 0x2f, 0x74, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x12, 0x68, 0x0a, 0x10, 0x45, 0x72, 0x72, - 0x6f, 0x72, 0x57, 0x69, 0x74, 0x68, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, 0x12, 0x16, 0x2e, - 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, - 0x45, 0x6d, 0x70, 0x74, 0x79, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x24, 0x82, - 0xd3, 0xe4, 0x93, 0x02, 0x1e, 0x12, 0x1c, 0x2f, 0x76, 0x32, 0x2f, 0x65, 0x78, 0x61, 0x6d, 0x70, - 0x6c, 0x65, 0x2f, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x77, 0x69, 0x74, 0x68, 0x64, 0x65, 0x74, 0x61, - 0x69, 0x6c, 0x73, 0x12, 0x68, 0x0a, 0x12, 0x47, 0x65, 0x74, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, - 0x65, 0x57, 0x69, 0x74, 0x68, 0x42, 0x6f, 0x64, 0x79, 0x12, 0x14, 0x2e, 0x67, 0x69, 0x64, 0x2e, - 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x57, 0x69, 0x74, 0x68, 0x42, 0x6f, 0x64, 0x79, 0x1a, - 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, - 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x24, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1e, 0x22, - 0x19, 0x2f, 0x76, 0x32, 0x2f, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x2f, 0x77, 0x69, 0x74, - 0x68, 0x62, 0x6f, 0x64, 0x79, 0x2f, 0x7b, 0x69, 0x64, 0x7d, 0x3a, 0x01, 0x2a, 0x12, 0x67, 0x0a, - 0x11, 0x50, 0x6f, 0x73, 0x74, 0x57, 0x69, 0x74, 0x68, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x42, 0x6f, - 0x64, 0x79, 0x12, 0x09, 0x2e, 0x67, 0x69, 0x64, 0x2e, 0x42, 0x6f, 0x64, 0x79, 0x1a, 0x16, 0x2e, - 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, - 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x2f, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x29, 0x22, 0x24, 0x2f, - 0x76, 0x32, 0x2f, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x2f, 0x70, 0x6f, 0x73, 0x74, 0x77, - 0x69, 0x74, 0x68, 0x65, 0x6d, 0x70, 0x74, 0x79, 0x62, 0x6f, 0x64, 0x79, 0x2f, 0x7b, 0x6e, 0x61, - 0x6d, 0x65, 0x7d, 0x3a, 0x01, 0x2a, 0x12, 0x8c, 0x01, 0x0a, 0x13, 0x43, 0x68, 0x65, 0x63, 0x6b, - 0x47, 0x65, 0x74, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x15, - 0x2e, 0x67, 0x69, 0x64, 0x2e, 0x41, 0x42, 0x69, 0x74, 0x4f, 0x66, 0x45, 0x76, 0x65, 0x72, 0x79, - 0x74, 0x68, 0x69, 0x6e, 0x67, 0x1a, 0x15, 0x2e, 0x67, 0x69, 0x64, 0x2e, 0x41, 0x42, 0x69, 0x74, - 0x4f, 0x66, 0x45, 0x76, 0x65, 0x72, 0x79, 0x74, 0x68, 0x69, 0x6e, 0x67, 0x22, 0x47, 0x82, 0xd3, - 0xe4, 0x93, 0x02, 0x41, 0x12, 0x3f, 0x2f, 0x76, 0x31, 0x2f, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, - 0x65, 0x2f, 0x61, 0x5f, 0x62, 0x69, 0x74, 0x5f, 0x6f, 0x66, 0x5f, 0x65, 0x76, 0x65, 0x72, 0x79, - 0x74, 0x68, 0x69, 0x6e, 0x67, 0x2f, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x2f, 0x67, 0x65, 0x74, - 0x2f, 0x7b, 0x73, 0x69, 0x6e, 0x67, 0x6c, 0x65, 0x5f, 0x6e, 0x65, 0x73, 0x74, 0x65, 0x64, 0x2e, - 0x6e, 0x61, 0x6d, 0x65, 0x7d, 0x12, 0xa0, 0x01, 0x0a, 0x1d, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x4e, - 0x65, 0x73, 0x74, 0x65, 0x64, 0x45, 0x6e, 0x75, 0x6d, 0x47, 0x65, 0x74, 0x51, 0x75, 0x65, 0x72, - 0x79, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x15, 0x2e, 0x67, 0x69, 0x64, 0x2e, 0x41, 0x42, - 0x69, 0x74, 0x4f, 0x66, 0x45, 0x76, 0x65, 0x72, 0x79, 0x74, 0x68, 0x69, 0x6e, 0x67, 0x1a, 0x15, - 0x2e, 0x67, 0x69, 0x64, 0x2e, 0x41, 0x42, 0x69, 0x74, 0x4f, 0x66, 0x45, 0x76, 0x65, 0x72, 0x79, - 0x74, 0x68, 0x69, 0x6e, 0x67, 0x22, 0x51, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x4b, 0x12, 0x49, 0x2f, - 0x76, 0x31, 0x2f, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x2f, 0x61, 0x5f, 0x62, 0x69, 0x74, - 0x5f, 0x6f, 0x66, 0x5f, 0x65, 0x76, 0x65, 0x72, 0x79, 0x74, 0x68, 0x69, 0x6e, 0x67, 0x2f, 0x70, - 0x61, 0x72, 0x61, 0x6d, 0x73, 0x2f, 0x67, 0x65, 0x74, 0x2f, 0x6e, 0x65, 0x73, 0x74, 0x65, 0x64, - 0x5f, 0x65, 0x6e, 0x75, 0x6d, 0x2f, 0x7b, 0x73, 0x69, 0x6e, 0x67, 0x6c, 0x65, 0x5f, 0x6e, 0x65, - 0x73, 0x74, 0x65, 0x64, 0x2e, 0x6f, 0x6b, 0x7d, 0x12, 0x97, 0x01, 0x0a, 0x14, 0x43, 0x68, 0x65, - 0x63, 0x6b, 0x50, 0x6f, 0x73, 0x74, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x61, 0x72, 0x61, 0x6d, - 0x73, 0x12, 0x15, 0x2e, 0x67, 0x69, 0x64, 0x2e, 0x41, 0x42, 0x69, 0x74, 0x4f, 0x66, 0x45, 0x76, - 0x65, 0x72, 0x79, 0x74, 0x68, 0x69, 0x6e, 0x67, 0x1a, 0x15, 0x2e, 0x67, 0x69, 0x64, 0x2e, 0x41, - 0x42, 0x69, 0x74, 0x4f, 0x66, 0x45, 0x76, 0x65, 0x72, 0x79, 0x74, 0x68, 0x69, 0x6e, 0x67, 0x22, - 0x51, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x4b, 0x22, 0x3a, 0x2f, 0x76, 0x31, 0x2f, 0x65, 0x78, 0x61, - 0x6d, 0x70, 0x6c, 0x65, 0x2f, 0x61, 0x5f, 0x62, 0x69, 0x74, 0x5f, 0x6f, 0x66, 0x5f, 0x65, 0x76, - 0x65, 0x72, 0x79, 0x74, 0x68, 0x69, 0x6e, 0x67, 0x2f, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x2f, - 0x70, 0x6f, 0x73, 0x74, 0x2f, 0x7b, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x5f, 0x76, 0x61, 0x6c, - 0x75, 0x65, 0x7d, 0x3a, 0x0d, 0x73, 0x69, 0x6e, 0x67, 0x6c, 0x65, 0x5f, 0x6e, 0x65, 0x73, 0x74, - 0x65, 0x64, 0x12, 0x9b, 0x01, 0x0a, 0x1c, 0x4f, 0x76, 0x65, 0x72, 0x77, 0x72, 0x69, 0x74, 0x65, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x54, - 0x79, 0x70, 0x65, 0x12, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x1a, 0x1c, 0x2e, 0x67, 0x6f, - 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, 0x74, - 0x72, 0x69, 0x6e, 0x67, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x22, 0x45, 0x82, 0xd3, 0xe4, 0x93, 0x02, - 0x2a, 0x12, 0x28, 0x2f, 0x76, 0x32, 0x2f, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x2f, 0x6f, - 0x76, 0x65, 0x72, 0x77, 0x72, 0x69, 0x74, 0x65, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x74, 0x79, 0x70, 0x65, 0x92, 0x41, 0x12, 0x3a, 0x10, - 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x74, 0x65, 0x78, 0x74, - 0x12, 0x60, 0x0a, 0x0b, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, - 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, - 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x1a, 0x18, 0x2e, 0x67, 0x69, 0x64, 0x2e, 0x43, 0x68, - 0x65, 0x63, 0x6b, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x22, 0x1f, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x19, 0x12, 0x17, 0x2f, 0x76, 0x31, 0x2f, 0x65, - 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x2f, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x53, 0x74, 0x61, 0x74, - 0x75, 0x73, 0x1a, 0xbf, 0x01, 0x92, 0x41, 0xbb, 0x01, 0x12, 0x66, 0x41, 0x42, 0x69, 0x74, 0x4f, - 0x66, 0x45, 0x76, 0x65, 0x72, 0x79, 0x74, 0x68, 0x69, 0x6e, 0x67, 0x53, 0x65, 0x72, 0x76, 0x69, - 0x63, 0x65, 0x20, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x2d, - 0x2d, 0x20, 0x77, 0x68, 0x69, 0x63, 0x68, 0x20, 0x73, 0x68, 0x6f, 0x75, 0x6c, 0x64, 0x20, 0x6e, - 0x6f, 0x74, 0x20, 0x62, 0x65, 0x20, 0x75, 0x73, 0x65, 0x64, 0x20, 0x69, 0x6e, 0x20, 0x70, 0x6c, - 0x61, 0x63, 0x65, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, 0x20, 0x64, 0x6f, 0x63, 0x75, 0x6d, - 0x65, 0x6e, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x63, 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x74, - 0x21, 0x1a, 0x51, 0x0a, 0x1f, 0x46, 0x69, 0x6e, 0x64, 0x20, 0x6f, 0x75, 0x74, 0x20, 0x6d, 0x6f, - 0x72, 0x65, 0x20, 0x61, 0x62, 0x6f, 0x75, 0x74, 0x20, 0x45, 0x63, 0x68, 0x6f, 0x53, 0x65, 0x72, - 0x76, 0x69, 0x63, 0x65, 0x12, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x73, 0x3a, 0x2f, 0x2f, 0x67, 0x69, - 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x67, 0x72, 0x70, 0x63, 0x2d, 0x65, 0x63, - 0x6f, 0x73, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x2f, 0x67, 0x72, 0x70, 0x63, 0x2d, 0x67, 0x61, 0x74, - 0x65, 0x77, 0x61, 0x79, 0x32, 0x6a, 0x0a, 0x14, 0x63, 0x61, 0x6d, 0x65, 0x6c, 0x43, 0x61, 0x73, - 0x65, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x52, 0x0a, 0x05, - 0x45, 0x6d, 0x70, 0x74, 0x79, 0x12, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x1a, 0x16, 0x2e, - 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, - 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x19, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x13, 0x12, 0x11, 0x2f, - 0x76, 0x32, 0x2f, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x2f, 0x65, 0x6d, 0x70, 0x74, 0x79, - 0x32, 0x7d, 0x0a, 0x1c, 0x41, 0x6e, 0x6f, 0x74, 0x68, 0x65, 0x72, 0x53, 0x65, 0x72, 0x76, 0x69, - 0x63, 0x65, 0x57, 0x69, 0x74, 0x68, 0x4e, 0x6f, 0x42, 0x69, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x73, - 0x12, 0x5d, 0x0a, 0x0a, 0x4e, 0x6f, 0x42, 0x69, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x73, 0x12, 0x16, - 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, - 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x1f, - 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x19, 0x12, 0x17, 0x2f, 0x76, 0x32, 0x2f, 0x61, 0x6e, 0x6f, 0x74, - 0x68, 0x65, 0x72, 0x2f, 0x6e, 0x6f, 0x2d, 0x62, 0x69, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x73, 0x42, - 0x87, 0x04, 0x5a, 0x0f, 0x2e, 0x2f, 0x75, 0x73, 0x65, 0x72, 0x70, 0x62, 0x3b, 0x75, 0x73, 0x65, - 0x72, 0x70, 0x62, 0x92, 0x41, 0xf2, 0x03, 0x12, 0xf6, 0x01, 0x0a, 0x13, 0x41, 0x20, 0x42, 0x69, - 0x74, 0x20, 0x6f, 0x66, 0x20, 0x45, 0x76, 0x65, 0x72, 0x79, 0x74, 0x68, 0x69, 0x6e, 0x67, 0x22, - 0x58, 0x0a, 0x14, 0x67, 0x52, 0x50, 0x43, 0x2d, 0x47, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x20, - 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x12, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x73, 0x3a, 0x2f, - 0x2f, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x67, 0x72, 0x70, 0x63, - 0x2d, 0x65, 0x63, 0x6f, 0x73, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x2f, 0x67, 0x72, 0x70, 0x63, 0x2d, - 0x67, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x1a, 0x10, 0x6e, 0x6f, 0x6e, 0x65, 0x40, 0x65, 0x78, - 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x2e, 0x63, 0x6f, 0x6d, 0x2a, 0x5e, 0x0a, 0x14, 0x42, 0x53, 0x44, - 0x20, 0x33, 0x2d, 0x43, 0x6c, 0x61, 0x75, 0x73, 0x65, 0x20, 0x4c, 0x69, 0x63, 0x65, 0x6e, 0x73, - 0x65, 0x12, 0x46, 0x68, 0x74, 0x74, 0x70, 0x73, 0x3a, 0x2f, 0x2f, 0x67, 0x69, 0x74, 0x68, 0x75, - 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x67, 0x72, 0x70, 0x63, 0x2d, 0x65, 0x63, 0x6f, 0x73, 0x79, - 0x73, 0x74, 0x65, 0x6d, 0x2f, 0x67, 0x72, 0x70, 0x63, 0x2d, 0x67, 0x61, 0x74, 0x65, 0x77, 0x61, - 0x79, 0x2f, 0x62, 0x6c, 0x6f, 0x62, 0x2f, 0x6d, 0x61, 0x73, 0x74, 0x65, 0x72, 0x2f, 0x4c, 0x49, - 0x43, 0x45, 0x4e, 0x53, 0x45, 0x2e, 0x74, 0x78, 0x74, 0x32, 0x03, 0x31, 0x2e, 0x30, 0x3a, 0x20, - 0x0a, 0x15, 0x78, 0x2d, 0x73, 0x6f, 0x6d, 0x65, 0x74, 0x68, 0x69, 0x6e, 0x67, 0x2d, 0x73, 0x6f, - 0x6d, 0x65, 0x74, 0x68, 0x69, 0x6e, 0x67, 0x12, 0x07, 0x1a, 0x05, 0x79, 0x61, 0x64, 0x64, 0x61, - 0x1a, 0x0e, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x68, 0x6f, 0x73, 0x74, 0x3a, 0x38, 0x30, 0x38, 0x30, - 0x2a, 0x03, 0x01, 0x02, 0x04, 0x32, 0x10, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x2f, 0x6a, 0x73, 0x6f, 0x6e, 0x32, 0x16, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x78, 0x2d, 0x66, 0x6f, 0x6f, 0x2d, 0x6d, 0x69, 0x6d, 0x65, 0x3a, - 0x10, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x6a, 0x73, 0x6f, - 0x6e, 0x3a, 0x16, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x78, - 0x2d, 0x66, 0x6f, 0x6f, 0x2d, 0x6d, 0x69, 0x6d, 0x65, 0x72, 0x47, 0x0a, 0x0e, 0xe7, 0x94, 0x9f, - 0xe6, 0x88, 0x90, 0xe9, 0x9a, 0x8f, 0xe6, 0x9c, 0xba, 0x69, 0x64, 0x12, 0x35, 0x68, 0x74, 0x74, - 0x70, 0x73, 0x3a, 0x2f, 0x2f, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, - 0x70, 0x75, 0x62, 0x67, 0x6f, 0x2f, 0x6c, 0x61, 0x76, 0x61, 0x2f, 0x74, 0x72, 0x65, 0x65, 0x2f, - 0x6d, 0x61, 0x73, 0x74, 0x65, 0x72, 0x2f, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x2f, 0x67, - 0x69, 0x64, 0x7a, 0x1b, 0x0a, 0x12, 0x78, 0x2d, 0x67, 0x72, 0x70, 0x63, 0x2d, 0x67, 0x61, 0x74, - 0x65, 0x77, 0x61, 0x79, 0x2d, 0x66, 0x6f, 0x6f, 0x12, 0x05, 0x1a, 0x03, 0x62, 0x61, 0x72, 0x7a, - 0x28, 0x0a, 0x17, 0x78, 0x2d, 0x67, 0x72, 0x70, 0x63, 0x2d, 0x67, 0x61, 0x74, 0x65, 0x77, 0x61, - 0x79, 0x2d, 0x62, 0x61, 0x7a, 0x2d, 0x6c, 0x69, 0x73, 0x74, 0x12, 0x0d, 0x32, 0x0b, 0x0a, 0x05, - 0x1a, 0x03, 0x6f, 0x6e, 0x65, 0x0a, 0x02, 0x20, 0x01, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x33, -} - -var ( - file_proto_user_user_proto_rawDescOnce sync.Once - file_proto_user_user_proto_rawDescData = file_proto_user_user_proto_rawDesc -) - -func file_proto_user_user_proto_rawDescGZIP() []byte { - file_proto_user_user_proto_rawDescOnce.Do(func() { - file_proto_user_user_proto_rawDescData = protoimpl.X.CompressGZIP(file_proto_user_user_proto_rawDescData) - }) - return file_proto_user_user_proto_rawDescData -} - -var file_proto_user_user_proto_enumTypes = make([]protoimpl.EnumInfo, 2) -var file_proto_user_user_proto_msgTypes = make([]protoimpl.MessageInfo, 20) -var file_proto_user_user_proto_goTypes = []interface{}{ - (NumericEnum)(0), // 0: gid.NumericEnum - (ABitOfEverything_Nested_DeepEnum)(0), // 1: gid.ABitOfEverything.Nested.DeepEnum - (*Tag)(nil), // 2: gid.Tag - (*GenerateResponse)(nil), // 3: gid.GenerateResponse - (*GenerateRequest)(nil), // 4: gid.GenerateRequest - (*TypesRequest)(nil), // 5: gid.TypesRequest - (*TypesResponse)(nil), // 6: gid.TypesResponse - (*ErrorResponse)(nil), // 7: gid.ErrorResponse - (*ErrorObject)(nil), // 8: gid.ErrorObject - (*ABitOfEverything)(nil), // 9: gid.ABitOfEverything - (*ABitOfEverythingRepeated)(nil), // 10: gid.ABitOfEverythingRepeated - (*CheckStatusResponse)(nil), // 11: gid.CheckStatusResponse - (*Body)(nil), // 12: gid.Body - (*MessageWithBody)(nil), // 13: gid.MessageWithBody - (*UpdateV2Request)(nil), // 14: gid.UpdateV2Request - (*Book)(nil), // 15: gid.Book - (*CreateBookRequest)(nil), // 16: gid.CreateBookRequest - (*UpdateBookRequest)(nil), // 17: gid.UpdateBookRequest - (*ABitOfEverything_Nested)(nil), // 18: gid.ABitOfEverything.Nested - nil, // 19: gid.ABitOfEverything.MapValueEntry - nil, // 20: gid.ABitOfEverything.MappedStringValueEntry - nil, // 21: gid.ABitOfEverything.MappedNestedValueEntry - (*emptypb.Empty)(nil), // 22: google.protobuf.Empty - (*timestamppb.Timestamp)(nil), // 23: google.protobuf.Timestamp - (*status.Status)(nil), // 24: google.rpc.Status - (*fieldmaskpb.FieldMask)(nil), // 25: google.protobuf.FieldMask - (*durationpb.Duration)(nil), // 26: google.protobuf.Duration - (*wrapperspb.StringValue)(nil), // 27: google.protobuf.StringValue -} -var file_proto_user_user_proto_depIdxs = []int32{ - 8, // 0: gid.ErrorResponse.error:type_name -> gid.ErrorObject - 18, // 1: gid.ABitOfEverything.single_nested:type_name -> gid.ABitOfEverything.Nested - 18, // 2: gid.ABitOfEverything.nested:type_name -> gid.ABitOfEverything.Nested - 0, // 3: gid.ABitOfEverything.enum_value:type_name -> gid.NumericEnum - 22, // 4: gid.ABitOfEverything.oneof_empty:type_name -> google.protobuf.Empty - 19, // 5: gid.ABitOfEverything.map_value:type_name -> gid.ABitOfEverything.MapValueEntry - 20, // 6: gid.ABitOfEverything.mapped_string_value:type_name -> gid.ABitOfEverything.MappedStringValueEntry - 21, // 7: gid.ABitOfEverything.mapped_nested_value:type_name -> gid.ABitOfEverything.MappedNestedValueEntry - 23, // 8: gid.ABitOfEverything.timestamp_value:type_name -> google.protobuf.Timestamp - 0, // 9: gid.ABitOfEverything.repeated_enum_value:type_name -> gid.NumericEnum - 0, // 10: gid.ABitOfEverything.repeated_enum_annotation:type_name -> gid.NumericEnum - 0, // 11: gid.ABitOfEverything.enum_value_annotation:type_name -> gid.NumericEnum - 18, // 12: gid.ABitOfEverything.repeated_nested_annotation:type_name -> gid.ABitOfEverything.Nested - 18, // 13: gid.ABitOfEverything.nested_annotation:type_name -> gid.ABitOfEverything.Nested - 0, // 14: gid.ABitOfEverythingRepeated.path_repeated_enum_value:type_name -> gid.NumericEnum - 24, // 15: gid.CheckStatusResponse.status:type_name -> google.rpc.Status - 12, // 16: gid.MessageWithBody.data:type_name -> gid.Body - 9, // 17: gid.UpdateV2Request.abe:type_name -> gid.ABitOfEverything - 25, // 18: gid.UpdateV2Request.update_mask:type_name -> google.protobuf.FieldMask - 23, // 19: gid.Book.create_time:type_name -> google.protobuf.Timestamp - 15, // 20: gid.CreateBookRequest.book:type_name -> gid.Book - 15, // 21: gid.UpdateBookRequest.book:type_name -> gid.Book - 25, // 22: gid.UpdateBookRequest.update_mask:type_name -> google.protobuf.FieldMask - 1, // 23: gid.ABitOfEverything.Nested.ok:type_name -> gid.ABitOfEverything.Nested.DeepEnum - 0, // 24: gid.ABitOfEverything.MapValueEntry.value:type_name -> gid.NumericEnum - 18, // 25: gid.ABitOfEverything.MappedNestedValueEntry.value:type_name -> gid.ABitOfEverything.Nested - 4, // 26: gid.User.Generate:input_type -> gid.GenerateRequest - 5, // 27: gid.User.Types:input_type -> gid.TypesRequest - 9, // 28: gid.ABitOfEverythingService.Create:input_type -> gid.ABitOfEverything - 9, // 29: gid.ABitOfEverythingService.CreateBody:input_type -> gid.ABitOfEverything - 16, // 30: gid.ABitOfEverythingService.CreateBook:input_type -> gid.CreateBookRequest - 17, // 31: gid.ABitOfEverythingService.UpdateBook:input_type -> gid.UpdateBookRequest - 9, // 32: gid.ABitOfEverythingService.Update:input_type -> gid.ABitOfEverything - 14, // 33: gid.ABitOfEverythingService.UpdateV2:input_type -> gid.UpdateV2Request - 9, // 34: gid.ABitOfEverythingService.GetQuery:input_type -> gid.ABitOfEverything - 10, // 35: gid.ABitOfEverythingService.GetRepeatedQuery:input_type -> gid.ABitOfEverythingRepeated - 9, // 36: gid.ABitOfEverythingService.DeepPathEcho:input_type -> gid.ABitOfEverything - 26, // 37: gid.ABitOfEverythingService.NoBindings:input_type -> google.protobuf.Duration - 22, // 38: gid.ABitOfEverythingService.Timeout:input_type -> google.protobuf.Empty - 22, // 39: gid.ABitOfEverythingService.ErrorWithDetails:input_type -> google.protobuf.Empty - 13, // 40: gid.ABitOfEverythingService.GetMessageWithBody:input_type -> gid.MessageWithBody - 12, // 41: gid.ABitOfEverythingService.PostWithEmptyBody:input_type -> gid.Body - 9, // 42: gid.ABitOfEverythingService.CheckGetQueryParams:input_type -> gid.ABitOfEverything - 9, // 43: gid.ABitOfEverythingService.CheckNestedEnumGetQueryParams:input_type -> gid.ABitOfEverything - 9, // 44: gid.ABitOfEverythingService.CheckPostQueryParams:input_type -> gid.ABitOfEverything - 22, // 45: gid.ABitOfEverythingService.OverwriteResponseContentType:input_type -> google.protobuf.Empty - 22, // 46: gid.ABitOfEverythingService.CheckStatus:input_type -> google.protobuf.Empty - 22, // 47: gid.camelCaseServiceName.Empty:input_type -> google.protobuf.Empty - 22, // 48: gid.AnotherServiceWithNoBindings.NoBindings:input_type -> google.protobuf.Empty - 3, // 49: gid.User.Generate:output_type -> gid.GenerateResponse - 6, // 50: gid.User.Types:output_type -> gid.TypesResponse - 9, // 51: gid.ABitOfEverythingService.Create:output_type -> gid.ABitOfEverything - 9, // 52: gid.ABitOfEverythingService.CreateBody:output_type -> gid.ABitOfEverything - 15, // 53: gid.ABitOfEverythingService.CreateBook:output_type -> gid.Book - 15, // 54: gid.ABitOfEverythingService.UpdateBook:output_type -> gid.Book - 22, // 55: gid.ABitOfEverythingService.Update:output_type -> google.protobuf.Empty - 22, // 56: gid.ABitOfEverythingService.UpdateV2:output_type -> google.protobuf.Empty - 22, // 57: gid.ABitOfEverythingService.GetQuery:output_type -> google.protobuf.Empty - 10, // 58: gid.ABitOfEverythingService.GetRepeatedQuery:output_type -> gid.ABitOfEverythingRepeated - 9, // 59: gid.ABitOfEverythingService.DeepPathEcho:output_type -> gid.ABitOfEverything - 22, // 60: gid.ABitOfEverythingService.NoBindings:output_type -> google.protobuf.Empty - 22, // 61: gid.ABitOfEverythingService.Timeout:output_type -> google.protobuf.Empty - 22, // 62: gid.ABitOfEverythingService.ErrorWithDetails:output_type -> google.protobuf.Empty - 22, // 63: gid.ABitOfEverythingService.GetMessageWithBody:output_type -> google.protobuf.Empty - 22, // 64: gid.ABitOfEverythingService.PostWithEmptyBody:output_type -> google.protobuf.Empty - 9, // 65: gid.ABitOfEverythingService.CheckGetQueryParams:output_type -> gid.ABitOfEverything - 9, // 66: gid.ABitOfEverythingService.CheckNestedEnumGetQueryParams:output_type -> gid.ABitOfEverything - 9, // 67: gid.ABitOfEverythingService.CheckPostQueryParams:output_type -> gid.ABitOfEverything - 27, // 68: gid.ABitOfEverythingService.OverwriteResponseContentType:output_type -> google.protobuf.StringValue - 11, // 69: gid.ABitOfEverythingService.CheckStatus:output_type -> gid.CheckStatusResponse - 22, // 70: gid.camelCaseServiceName.Empty:output_type -> google.protobuf.Empty - 22, // 71: gid.AnotherServiceWithNoBindings.NoBindings:output_type -> google.protobuf.Empty - 49, // [49:72] is the sub-list for method output_type - 26, // [26:49] is the sub-list for method input_type - 26, // [26:26] is the sub-list for extension type_name - 26, // [26:26] is the sub-list for extension extendee - 0, // [0:26] is the sub-list for field type_name -} - -func init() { file_proto_user_user_proto_init() } -func file_proto_user_user_proto_init() { - if File_proto_user_user_proto != nil { - return - } - if !protoimpl.UnsafeEnabled { - file_proto_user_user_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Tag); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_proto_user_user_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GenerateResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_proto_user_user_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GenerateRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_proto_user_user_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*TypesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_proto_user_user_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*TypesResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_proto_user_user_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ErrorResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_proto_user_user_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ErrorObject); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_proto_user_user_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ABitOfEverything); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_proto_user_user_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ABitOfEverythingRepeated); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_proto_user_user_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*CheckStatusResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_proto_user_user_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Body); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_proto_user_user_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*MessageWithBody); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_proto_user_user_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*UpdateV2Request); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_proto_user_user_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Book); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_proto_user_user_proto_msgTypes[14].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*CreateBookRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_proto_user_user_proto_msgTypes[15].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*UpdateBookRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_proto_user_user_proto_msgTypes[16].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ABitOfEverything_Nested); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - file_proto_user_user_proto_msgTypes[7].OneofWrappers = []interface{}{ - (*ABitOfEverything_OneofEmpty)(nil), - (*ABitOfEverything_OneofString)(nil), - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_proto_user_user_proto_rawDesc, - NumEnums: 2, - NumMessages: 20, - NumExtensions: 0, - NumServices: 4, - }, - GoTypes: file_proto_user_user_proto_goTypes, - DependencyIndexes: file_proto_user_user_proto_depIdxs, - EnumInfos: file_proto_user_user_proto_enumTypes, - MessageInfos: file_proto_user_user_proto_msgTypes, - }.Build() - File_proto_user_user_proto = out.File - file_proto_user_user_proto_rawDesc = nil - file_proto_user_user_proto_goTypes = nil - file_proto_user_user_proto_depIdxs = nil -} diff --git a/example/protopb/userpb/user_grpc.pb.go b/example/protopb/userpb/user_grpc.pb.go deleted file mode 100644 index fffcb098d..000000000 --- a/example/protopb/userpb/user_grpc.pb.go +++ /dev/null @@ -1,1224 +0,0 @@ -// Code generated by protoc-gen-go-grpc. DO NOT EDIT. - -package userpb - -import ( - context "context" - grpc "google.golang.org/grpc" - codes "google.golang.org/grpc/codes" - status "google.golang.org/grpc/status" - durationpb "google.golang.org/protobuf/types/known/durationpb" - emptypb "google.golang.org/protobuf/types/known/emptypb" - wrapperspb "google.golang.org/protobuf/types/known/wrapperspb" -) - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the grpc package it is being compiled against. -// Requires gRPC-Go v1.32.0 or later. -const _ = grpc.SupportPackageIsVersion7 - -// UserClient is the client API for User service. -// -// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. -type UserClient interface { - // Generate 生成ID - Generate(ctx context.Context, in *GenerateRequest, opts ...grpc.CallOption) (*GenerateResponse, error) - // Types id类型 - Types(ctx context.Context, in *TypesRequest, opts ...grpc.CallOption) (*TypesResponse, error) -} - -type userClient struct { - cc grpc.ClientConnInterface -} - -func NewUserClient(cc grpc.ClientConnInterface) UserClient { - return &userClient{cc} -} - -func (c *userClient) Generate(ctx context.Context, in *GenerateRequest, opts ...grpc.CallOption) (*GenerateResponse, error) { - out := new(GenerateResponse) - err := c.cc.Invoke(ctx, "/gid.User/Generate", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *userClient) Types(ctx context.Context, in *TypesRequest, opts ...grpc.CallOption) (*TypesResponse, error) { - out := new(TypesResponse) - err := c.cc.Invoke(ctx, "/gid.User/Types", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -// UserServer is the server API for User service. -// All implementations should embed UnimplementedUserServer -// for forward compatibility -type UserServer interface { - // Generate 生成ID - Generate(context.Context, *GenerateRequest) (*GenerateResponse, error) - // Types id类型 - Types(context.Context, *TypesRequest) (*TypesResponse, error) -} - -// UnimplementedUserServer should be embedded to have forward compatible implementations. -type UnimplementedUserServer struct { -} - -func (UnimplementedUserServer) Generate(context.Context, *GenerateRequest) (*GenerateResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method Generate not implemented") -} -func (UnimplementedUserServer) Types(context.Context, *TypesRequest) (*TypesResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method Types not implemented") -} - -// UnsafeUserServer may be embedded to opt out of forward compatibility for this service. -// Use of this interface is not recommended, as added methods to UserServer will -// result in compilation errors. -type UnsafeUserServer interface { - mustEmbedUnimplementedUserServer() -} - -func RegisterUserServer(s grpc.ServiceRegistrar, srv UserServer) { - s.RegisterService(&User_ServiceDesc, srv) -} - -func _User_Generate_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(GenerateRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(UserServer).Generate(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/gid.User/Generate", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(UserServer).Generate(ctx, req.(*GenerateRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _User_Types_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(TypesRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(UserServer).Types(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/gid.User/Types", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(UserServer).Types(ctx, req.(*TypesRequest)) - } - return interceptor(ctx, in, info, handler) -} - -// User_ServiceDesc is the grpc.ServiceDesc for User service. -// It's only intended for direct use with grpc.RegisterService, -// and not to be introspected or modified (even as a copy) -var User_ServiceDesc = grpc.ServiceDesc{ - ServiceName: "gid.User", - HandlerType: (*UserServer)(nil), - Methods: []grpc.MethodDesc{ - { - MethodName: "Generate", - Handler: _User_Generate_Handler, - }, - { - MethodName: "Types", - Handler: _User_Types_Handler, - }, - }, - Streams: []grpc.StreamDesc{}, - Metadata: "proto/user/user.proto", -} - -// ABitOfEverythingServiceClient is the client API for ABitOfEverythingService service. -// -// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. -type ABitOfEverythingServiceClient interface { - // Create a new ABitOfEverything - // - // This API creates a new ABitOfEverything - Create(ctx context.Context, in *ABitOfEverything, opts ...grpc.CallOption) (*ABitOfEverything, error) - CreateBody(ctx context.Context, in *ABitOfEverything, opts ...grpc.CallOption) (*ABitOfEverything, error) - // Create a book. - CreateBook(ctx context.Context, in *CreateBookRequest, opts ...grpc.CallOption) (*Book, error) - UpdateBook(ctx context.Context, in *UpdateBookRequest, opts ...grpc.CallOption) (*Book, error) - Update(ctx context.Context, in *ABitOfEverything, opts ...grpc.CallOption) (*emptypb.Empty, error) - UpdateV2(ctx context.Context, in *UpdateV2Request, opts ...grpc.CallOption) (*emptypb.Empty, error) - // rpc Delete(grpc.gateway.examples.internal.proto.sub2.IdMessage) returns (google.protobuf.Empty) { - // option (google.api.http) = { - // delete: "/v1/example/a_bit_of_everything/{uuid}" - // }; - // option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation) = { - // security: { - // security_requirement: { - // key: "ApiKeyAuth"; - // value: {} - // } - // security_requirement: { - // key: "OAuth2"; - // value: { - // scope: "read"; - // scope: "write"; - // } - // } - // } - // extensions: { - // key: "x-irreversible"; - // value { - // bool_value: true; - // } - // } - // }; - // } - GetQuery(ctx context.Context, in *ABitOfEverything, opts ...grpc.CallOption) (*emptypb.Empty, error) - GetRepeatedQuery(ctx context.Context, in *ABitOfEverythingRepeated, opts ...grpc.CallOption) (*ABitOfEverythingRepeated, error) - // Echo allows posting a StringMessage value. - // - // It also exposes multiple bindings. - // - // This makes it useful when validating that the OpenAPI v2 API - // description exposes documentation correctly on all paths - // defined as additional_bindings in the proto. - // rpc Echo(grpc.gateway.examples.internal.proto.sub.StringMessage) returns (grpc.gateway.examples.internal.proto.sub.StringMessage) { - // option (google.api.http) = { - // get: "/v1/example/a_bit_of_everything/echo/{value}" - // additional_bindings { - // post: "/v2/example/echo" - // body: "value" - // } - // additional_bindings { - // get: "/v2/example/echo" - // } - // }; - // option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation) = { - // description: "Description Echo"; - // summary: "Summary: Echo rpc"; - // tags: "echo rpc"; - // external_docs: { - // url: "https://github.com/grpc-ecosystem/grpc-gateway"; - // description: "Find out more Echo"; - // } - // responses: { - // key: "200" - // value: { - // examples: { - // key: "application/json" - // value: '{"value": "the input value"}' - // } - // } - // } - // responses: { - // key: "503"; - // value: { - // description: "Returned when the resource is temporarily unavailable."; - // extensions: { - // key: "x-number"; - // value { - // number_value: 100; - // } - // } - // } - // } - // responses: { - // // Overwrites global definition. - // key: "404"; - // value: { - // description: "Returned when the resource does not exist."; - // schema: { - // json_schema: { - // type: INTEGER; - // } - // } - // } - // } - // }; - // } - DeepPathEcho(ctx context.Context, in *ABitOfEverything, opts ...grpc.CallOption) (*ABitOfEverything, error) - NoBindings(ctx context.Context, in *durationpb.Duration, opts ...grpc.CallOption) (*emptypb.Empty, error) - Timeout(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*emptypb.Empty, error) - ErrorWithDetails(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*emptypb.Empty, error) - GetMessageWithBody(ctx context.Context, in *MessageWithBody, opts ...grpc.CallOption) (*emptypb.Empty, error) - PostWithEmptyBody(ctx context.Context, in *Body, opts ...grpc.CallOption) (*emptypb.Empty, error) - CheckGetQueryParams(ctx context.Context, in *ABitOfEverything, opts ...grpc.CallOption) (*ABitOfEverything, error) - CheckNestedEnumGetQueryParams(ctx context.Context, in *ABitOfEverything, opts ...grpc.CallOption) (*ABitOfEverything, error) - CheckPostQueryParams(ctx context.Context, in *ABitOfEverything, opts ...grpc.CallOption) (*ABitOfEverything, error) - OverwriteResponseContentType(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*wrapperspb.StringValue, error) - CheckStatus(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*CheckStatusResponse, error) -} - -type aBitOfEverythingServiceClient struct { - cc grpc.ClientConnInterface -} - -func NewABitOfEverythingServiceClient(cc grpc.ClientConnInterface) ABitOfEverythingServiceClient { - return &aBitOfEverythingServiceClient{cc} -} - -func (c *aBitOfEverythingServiceClient) Create(ctx context.Context, in *ABitOfEverything, opts ...grpc.CallOption) (*ABitOfEverything, error) { - out := new(ABitOfEverything) - err := c.cc.Invoke(ctx, "/gid.ABitOfEverythingService/Create", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *aBitOfEverythingServiceClient) CreateBody(ctx context.Context, in *ABitOfEverything, opts ...grpc.CallOption) (*ABitOfEverything, error) { - out := new(ABitOfEverything) - err := c.cc.Invoke(ctx, "/gid.ABitOfEverythingService/CreateBody", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *aBitOfEverythingServiceClient) CreateBook(ctx context.Context, in *CreateBookRequest, opts ...grpc.CallOption) (*Book, error) { - out := new(Book) - err := c.cc.Invoke(ctx, "/gid.ABitOfEverythingService/CreateBook", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *aBitOfEverythingServiceClient) UpdateBook(ctx context.Context, in *UpdateBookRequest, opts ...grpc.CallOption) (*Book, error) { - out := new(Book) - err := c.cc.Invoke(ctx, "/gid.ABitOfEverythingService/UpdateBook", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *aBitOfEverythingServiceClient) Update(ctx context.Context, in *ABitOfEverything, opts ...grpc.CallOption) (*emptypb.Empty, error) { - out := new(emptypb.Empty) - err := c.cc.Invoke(ctx, "/gid.ABitOfEverythingService/Update", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *aBitOfEverythingServiceClient) UpdateV2(ctx context.Context, in *UpdateV2Request, opts ...grpc.CallOption) (*emptypb.Empty, error) { - out := new(emptypb.Empty) - err := c.cc.Invoke(ctx, "/gid.ABitOfEverythingService/UpdateV2", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *aBitOfEverythingServiceClient) GetQuery(ctx context.Context, in *ABitOfEverything, opts ...grpc.CallOption) (*emptypb.Empty, error) { - out := new(emptypb.Empty) - err := c.cc.Invoke(ctx, "/gid.ABitOfEverythingService/GetQuery", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *aBitOfEverythingServiceClient) GetRepeatedQuery(ctx context.Context, in *ABitOfEverythingRepeated, opts ...grpc.CallOption) (*ABitOfEverythingRepeated, error) { - out := new(ABitOfEverythingRepeated) - err := c.cc.Invoke(ctx, "/gid.ABitOfEverythingService/GetRepeatedQuery", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *aBitOfEverythingServiceClient) DeepPathEcho(ctx context.Context, in *ABitOfEverything, opts ...grpc.CallOption) (*ABitOfEverything, error) { - out := new(ABitOfEverything) - err := c.cc.Invoke(ctx, "/gid.ABitOfEverythingService/DeepPathEcho", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *aBitOfEverythingServiceClient) NoBindings(ctx context.Context, in *durationpb.Duration, opts ...grpc.CallOption) (*emptypb.Empty, error) { - out := new(emptypb.Empty) - err := c.cc.Invoke(ctx, "/gid.ABitOfEverythingService/NoBindings", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *aBitOfEverythingServiceClient) Timeout(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*emptypb.Empty, error) { - out := new(emptypb.Empty) - err := c.cc.Invoke(ctx, "/gid.ABitOfEverythingService/Timeout", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *aBitOfEverythingServiceClient) ErrorWithDetails(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*emptypb.Empty, error) { - out := new(emptypb.Empty) - err := c.cc.Invoke(ctx, "/gid.ABitOfEverythingService/ErrorWithDetails", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *aBitOfEverythingServiceClient) GetMessageWithBody(ctx context.Context, in *MessageWithBody, opts ...grpc.CallOption) (*emptypb.Empty, error) { - out := new(emptypb.Empty) - err := c.cc.Invoke(ctx, "/gid.ABitOfEverythingService/GetMessageWithBody", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *aBitOfEverythingServiceClient) PostWithEmptyBody(ctx context.Context, in *Body, opts ...grpc.CallOption) (*emptypb.Empty, error) { - out := new(emptypb.Empty) - err := c.cc.Invoke(ctx, "/gid.ABitOfEverythingService/PostWithEmptyBody", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *aBitOfEverythingServiceClient) CheckGetQueryParams(ctx context.Context, in *ABitOfEverything, opts ...grpc.CallOption) (*ABitOfEverything, error) { - out := new(ABitOfEverything) - err := c.cc.Invoke(ctx, "/gid.ABitOfEverythingService/CheckGetQueryParams", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *aBitOfEverythingServiceClient) CheckNestedEnumGetQueryParams(ctx context.Context, in *ABitOfEverything, opts ...grpc.CallOption) (*ABitOfEverything, error) { - out := new(ABitOfEverything) - err := c.cc.Invoke(ctx, "/gid.ABitOfEverythingService/CheckNestedEnumGetQueryParams", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *aBitOfEverythingServiceClient) CheckPostQueryParams(ctx context.Context, in *ABitOfEverything, opts ...grpc.CallOption) (*ABitOfEverything, error) { - out := new(ABitOfEverything) - err := c.cc.Invoke(ctx, "/gid.ABitOfEverythingService/CheckPostQueryParams", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *aBitOfEverythingServiceClient) OverwriteResponseContentType(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*wrapperspb.StringValue, error) { - out := new(wrapperspb.StringValue) - err := c.cc.Invoke(ctx, "/gid.ABitOfEverythingService/OverwriteResponseContentType", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *aBitOfEverythingServiceClient) CheckStatus(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*CheckStatusResponse, error) { - out := new(CheckStatusResponse) - err := c.cc.Invoke(ctx, "/gid.ABitOfEverythingService/CheckStatus", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -// ABitOfEverythingServiceServer is the server API for ABitOfEverythingService service. -// All implementations should embed UnimplementedABitOfEverythingServiceServer -// for forward compatibility -type ABitOfEverythingServiceServer interface { - // Create a new ABitOfEverything - // - // This API creates a new ABitOfEverything - Create(context.Context, *ABitOfEverything) (*ABitOfEverything, error) - CreateBody(context.Context, *ABitOfEverything) (*ABitOfEverything, error) - // Create a book. - CreateBook(context.Context, *CreateBookRequest) (*Book, error) - UpdateBook(context.Context, *UpdateBookRequest) (*Book, error) - Update(context.Context, *ABitOfEverything) (*emptypb.Empty, error) - UpdateV2(context.Context, *UpdateV2Request) (*emptypb.Empty, error) - // rpc Delete(grpc.gateway.examples.internal.proto.sub2.IdMessage) returns (google.protobuf.Empty) { - // option (google.api.http) = { - // delete: "/v1/example/a_bit_of_everything/{uuid}" - // }; - // option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation) = { - // security: { - // security_requirement: { - // key: "ApiKeyAuth"; - // value: {} - // } - // security_requirement: { - // key: "OAuth2"; - // value: { - // scope: "read"; - // scope: "write"; - // } - // } - // } - // extensions: { - // key: "x-irreversible"; - // value { - // bool_value: true; - // } - // } - // }; - // } - GetQuery(context.Context, *ABitOfEverything) (*emptypb.Empty, error) - GetRepeatedQuery(context.Context, *ABitOfEverythingRepeated) (*ABitOfEverythingRepeated, error) - // Echo allows posting a StringMessage value. - // - // It also exposes multiple bindings. - // - // This makes it useful when validating that the OpenAPI v2 API - // description exposes documentation correctly on all paths - // defined as additional_bindings in the proto. - // rpc Echo(grpc.gateway.examples.internal.proto.sub.StringMessage) returns (grpc.gateway.examples.internal.proto.sub.StringMessage) { - // option (google.api.http) = { - // get: "/v1/example/a_bit_of_everything/echo/{value}" - // additional_bindings { - // post: "/v2/example/echo" - // body: "value" - // } - // additional_bindings { - // get: "/v2/example/echo" - // } - // }; - // option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation) = { - // description: "Description Echo"; - // summary: "Summary: Echo rpc"; - // tags: "echo rpc"; - // external_docs: { - // url: "https://github.com/grpc-ecosystem/grpc-gateway"; - // description: "Find out more Echo"; - // } - // responses: { - // key: "200" - // value: { - // examples: { - // key: "application/json" - // value: '{"value": "the input value"}' - // } - // } - // } - // responses: { - // key: "503"; - // value: { - // description: "Returned when the resource is temporarily unavailable."; - // extensions: { - // key: "x-number"; - // value { - // number_value: 100; - // } - // } - // } - // } - // responses: { - // // Overwrites global definition. - // key: "404"; - // value: { - // description: "Returned when the resource does not exist."; - // schema: { - // json_schema: { - // type: INTEGER; - // } - // } - // } - // } - // }; - // } - DeepPathEcho(context.Context, *ABitOfEverything) (*ABitOfEverything, error) - NoBindings(context.Context, *durationpb.Duration) (*emptypb.Empty, error) - Timeout(context.Context, *emptypb.Empty) (*emptypb.Empty, error) - ErrorWithDetails(context.Context, *emptypb.Empty) (*emptypb.Empty, error) - GetMessageWithBody(context.Context, *MessageWithBody) (*emptypb.Empty, error) - PostWithEmptyBody(context.Context, *Body) (*emptypb.Empty, error) - CheckGetQueryParams(context.Context, *ABitOfEverything) (*ABitOfEverything, error) - CheckNestedEnumGetQueryParams(context.Context, *ABitOfEverything) (*ABitOfEverything, error) - CheckPostQueryParams(context.Context, *ABitOfEverything) (*ABitOfEverything, error) - OverwriteResponseContentType(context.Context, *emptypb.Empty) (*wrapperspb.StringValue, error) - CheckStatus(context.Context, *emptypb.Empty) (*CheckStatusResponse, error) -} - -// UnimplementedABitOfEverythingServiceServer should be embedded to have forward compatible implementations. -type UnimplementedABitOfEverythingServiceServer struct { -} - -func (UnimplementedABitOfEverythingServiceServer) Create(context.Context, *ABitOfEverything) (*ABitOfEverything, error) { - return nil, status.Errorf(codes.Unimplemented, "method Create not implemented") -} -func (UnimplementedABitOfEverythingServiceServer) CreateBody(context.Context, *ABitOfEverything) (*ABitOfEverything, error) { - return nil, status.Errorf(codes.Unimplemented, "method CreateBody not implemented") -} -func (UnimplementedABitOfEverythingServiceServer) CreateBook(context.Context, *CreateBookRequest) (*Book, error) { - return nil, status.Errorf(codes.Unimplemented, "method CreateBook not implemented") -} -func (UnimplementedABitOfEverythingServiceServer) UpdateBook(context.Context, *UpdateBookRequest) (*Book, error) { - return nil, status.Errorf(codes.Unimplemented, "method UpdateBook not implemented") -} -func (UnimplementedABitOfEverythingServiceServer) Update(context.Context, *ABitOfEverything) (*emptypb.Empty, error) { - return nil, status.Errorf(codes.Unimplemented, "method Update not implemented") -} -func (UnimplementedABitOfEverythingServiceServer) UpdateV2(context.Context, *UpdateV2Request) (*emptypb.Empty, error) { - return nil, status.Errorf(codes.Unimplemented, "method UpdateV2 not implemented") -} -func (UnimplementedABitOfEverythingServiceServer) GetQuery(context.Context, *ABitOfEverything) (*emptypb.Empty, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetQuery not implemented") -} -func (UnimplementedABitOfEverythingServiceServer) GetRepeatedQuery(context.Context, *ABitOfEverythingRepeated) (*ABitOfEverythingRepeated, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetRepeatedQuery not implemented") -} -func (UnimplementedABitOfEverythingServiceServer) DeepPathEcho(context.Context, *ABitOfEverything) (*ABitOfEverything, error) { - return nil, status.Errorf(codes.Unimplemented, "method DeepPathEcho not implemented") -} -func (UnimplementedABitOfEverythingServiceServer) NoBindings(context.Context, *durationpb.Duration) (*emptypb.Empty, error) { - return nil, status.Errorf(codes.Unimplemented, "method NoBindings not implemented") -} -func (UnimplementedABitOfEverythingServiceServer) Timeout(context.Context, *emptypb.Empty) (*emptypb.Empty, error) { - return nil, status.Errorf(codes.Unimplemented, "method Timeout not implemented") -} -func (UnimplementedABitOfEverythingServiceServer) ErrorWithDetails(context.Context, *emptypb.Empty) (*emptypb.Empty, error) { - return nil, status.Errorf(codes.Unimplemented, "method ErrorWithDetails not implemented") -} -func (UnimplementedABitOfEverythingServiceServer) GetMessageWithBody(context.Context, *MessageWithBody) (*emptypb.Empty, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetMessageWithBody not implemented") -} -func (UnimplementedABitOfEverythingServiceServer) PostWithEmptyBody(context.Context, *Body) (*emptypb.Empty, error) { - return nil, status.Errorf(codes.Unimplemented, "method PostWithEmptyBody not implemented") -} -func (UnimplementedABitOfEverythingServiceServer) CheckGetQueryParams(context.Context, *ABitOfEverything) (*ABitOfEverything, error) { - return nil, status.Errorf(codes.Unimplemented, "method CheckGetQueryParams not implemented") -} -func (UnimplementedABitOfEverythingServiceServer) CheckNestedEnumGetQueryParams(context.Context, *ABitOfEverything) (*ABitOfEverything, error) { - return nil, status.Errorf(codes.Unimplemented, "method CheckNestedEnumGetQueryParams not implemented") -} -func (UnimplementedABitOfEverythingServiceServer) CheckPostQueryParams(context.Context, *ABitOfEverything) (*ABitOfEverything, error) { - return nil, status.Errorf(codes.Unimplemented, "method CheckPostQueryParams not implemented") -} -func (UnimplementedABitOfEverythingServiceServer) OverwriteResponseContentType(context.Context, *emptypb.Empty) (*wrapperspb.StringValue, error) { - return nil, status.Errorf(codes.Unimplemented, "method OverwriteResponseContentType not implemented") -} -func (UnimplementedABitOfEverythingServiceServer) CheckStatus(context.Context, *emptypb.Empty) (*CheckStatusResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method CheckStatus not implemented") -} - -// UnsafeABitOfEverythingServiceServer may be embedded to opt out of forward compatibility for this service. -// Use of this interface is not recommended, as added methods to ABitOfEverythingServiceServer will -// result in compilation errors. -type UnsafeABitOfEverythingServiceServer interface { - mustEmbedUnimplementedABitOfEverythingServiceServer() -} - -func RegisterABitOfEverythingServiceServer(s grpc.ServiceRegistrar, srv ABitOfEverythingServiceServer) { - s.RegisterService(&ABitOfEverythingService_ServiceDesc, srv) -} - -func _ABitOfEverythingService_Create_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(ABitOfEverything) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(ABitOfEverythingServiceServer).Create(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/gid.ABitOfEverythingService/Create", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(ABitOfEverythingServiceServer).Create(ctx, req.(*ABitOfEverything)) - } - return interceptor(ctx, in, info, handler) -} - -func _ABitOfEverythingService_CreateBody_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(ABitOfEverything) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(ABitOfEverythingServiceServer).CreateBody(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/gid.ABitOfEverythingService/CreateBody", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(ABitOfEverythingServiceServer).CreateBody(ctx, req.(*ABitOfEverything)) - } - return interceptor(ctx, in, info, handler) -} - -func _ABitOfEverythingService_CreateBook_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(CreateBookRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(ABitOfEverythingServiceServer).CreateBook(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/gid.ABitOfEverythingService/CreateBook", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(ABitOfEverythingServiceServer).CreateBook(ctx, req.(*CreateBookRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _ABitOfEverythingService_UpdateBook_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(UpdateBookRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(ABitOfEverythingServiceServer).UpdateBook(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/gid.ABitOfEverythingService/UpdateBook", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(ABitOfEverythingServiceServer).UpdateBook(ctx, req.(*UpdateBookRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _ABitOfEverythingService_Update_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(ABitOfEverything) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(ABitOfEverythingServiceServer).Update(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/gid.ABitOfEverythingService/Update", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(ABitOfEverythingServiceServer).Update(ctx, req.(*ABitOfEverything)) - } - return interceptor(ctx, in, info, handler) -} - -func _ABitOfEverythingService_UpdateV2_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(UpdateV2Request) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(ABitOfEverythingServiceServer).UpdateV2(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/gid.ABitOfEverythingService/UpdateV2", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(ABitOfEverythingServiceServer).UpdateV2(ctx, req.(*UpdateV2Request)) - } - return interceptor(ctx, in, info, handler) -} - -func _ABitOfEverythingService_GetQuery_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(ABitOfEverything) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(ABitOfEverythingServiceServer).GetQuery(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/gid.ABitOfEverythingService/GetQuery", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(ABitOfEverythingServiceServer).GetQuery(ctx, req.(*ABitOfEverything)) - } - return interceptor(ctx, in, info, handler) -} - -func _ABitOfEverythingService_GetRepeatedQuery_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(ABitOfEverythingRepeated) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(ABitOfEverythingServiceServer).GetRepeatedQuery(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/gid.ABitOfEverythingService/GetRepeatedQuery", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(ABitOfEverythingServiceServer).GetRepeatedQuery(ctx, req.(*ABitOfEverythingRepeated)) - } - return interceptor(ctx, in, info, handler) -} - -func _ABitOfEverythingService_DeepPathEcho_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(ABitOfEverything) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(ABitOfEverythingServiceServer).DeepPathEcho(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/gid.ABitOfEverythingService/DeepPathEcho", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(ABitOfEverythingServiceServer).DeepPathEcho(ctx, req.(*ABitOfEverything)) - } - return interceptor(ctx, in, info, handler) -} - -func _ABitOfEverythingService_NoBindings_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(durationpb.Duration) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(ABitOfEverythingServiceServer).NoBindings(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/gid.ABitOfEverythingService/NoBindings", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(ABitOfEverythingServiceServer).NoBindings(ctx, req.(*durationpb.Duration)) - } - return interceptor(ctx, in, info, handler) -} - -func _ABitOfEverythingService_Timeout_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(emptypb.Empty) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(ABitOfEverythingServiceServer).Timeout(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/gid.ABitOfEverythingService/Timeout", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(ABitOfEverythingServiceServer).Timeout(ctx, req.(*emptypb.Empty)) - } - return interceptor(ctx, in, info, handler) -} - -func _ABitOfEverythingService_ErrorWithDetails_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(emptypb.Empty) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(ABitOfEverythingServiceServer).ErrorWithDetails(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/gid.ABitOfEverythingService/ErrorWithDetails", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(ABitOfEverythingServiceServer).ErrorWithDetails(ctx, req.(*emptypb.Empty)) - } - return interceptor(ctx, in, info, handler) -} - -func _ABitOfEverythingService_GetMessageWithBody_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(MessageWithBody) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(ABitOfEverythingServiceServer).GetMessageWithBody(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/gid.ABitOfEverythingService/GetMessageWithBody", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(ABitOfEverythingServiceServer).GetMessageWithBody(ctx, req.(*MessageWithBody)) - } - return interceptor(ctx, in, info, handler) -} - -func _ABitOfEverythingService_PostWithEmptyBody_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(Body) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(ABitOfEverythingServiceServer).PostWithEmptyBody(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/gid.ABitOfEverythingService/PostWithEmptyBody", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(ABitOfEverythingServiceServer).PostWithEmptyBody(ctx, req.(*Body)) - } - return interceptor(ctx, in, info, handler) -} - -func _ABitOfEverythingService_CheckGetQueryParams_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(ABitOfEverything) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(ABitOfEverythingServiceServer).CheckGetQueryParams(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/gid.ABitOfEverythingService/CheckGetQueryParams", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(ABitOfEverythingServiceServer).CheckGetQueryParams(ctx, req.(*ABitOfEverything)) - } - return interceptor(ctx, in, info, handler) -} - -func _ABitOfEverythingService_CheckNestedEnumGetQueryParams_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(ABitOfEverything) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(ABitOfEverythingServiceServer).CheckNestedEnumGetQueryParams(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/gid.ABitOfEverythingService/CheckNestedEnumGetQueryParams", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(ABitOfEverythingServiceServer).CheckNestedEnumGetQueryParams(ctx, req.(*ABitOfEverything)) - } - return interceptor(ctx, in, info, handler) -} - -func _ABitOfEverythingService_CheckPostQueryParams_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(ABitOfEverything) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(ABitOfEverythingServiceServer).CheckPostQueryParams(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/gid.ABitOfEverythingService/CheckPostQueryParams", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(ABitOfEverythingServiceServer).CheckPostQueryParams(ctx, req.(*ABitOfEverything)) - } - return interceptor(ctx, in, info, handler) -} - -func _ABitOfEverythingService_OverwriteResponseContentType_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(emptypb.Empty) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(ABitOfEverythingServiceServer).OverwriteResponseContentType(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/gid.ABitOfEverythingService/OverwriteResponseContentType", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(ABitOfEverythingServiceServer).OverwriteResponseContentType(ctx, req.(*emptypb.Empty)) - } - return interceptor(ctx, in, info, handler) -} - -func _ABitOfEverythingService_CheckStatus_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(emptypb.Empty) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(ABitOfEverythingServiceServer).CheckStatus(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/gid.ABitOfEverythingService/CheckStatus", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(ABitOfEverythingServiceServer).CheckStatus(ctx, req.(*emptypb.Empty)) - } - return interceptor(ctx, in, info, handler) -} - -// ABitOfEverythingService_ServiceDesc is the grpc.ServiceDesc for ABitOfEverythingService service. -// It's only intended for direct use with grpc.RegisterService, -// and not to be introspected or modified (even as a copy) -var ABitOfEverythingService_ServiceDesc = grpc.ServiceDesc{ - ServiceName: "gid.ABitOfEverythingService", - HandlerType: (*ABitOfEverythingServiceServer)(nil), - Methods: []grpc.MethodDesc{ - { - MethodName: "Create", - Handler: _ABitOfEverythingService_Create_Handler, - }, - { - MethodName: "CreateBody", - Handler: _ABitOfEverythingService_CreateBody_Handler, - }, - { - MethodName: "CreateBook", - Handler: _ABitOfEverythingService_CreateBook_Handler, - }, - { - MethodName: "UpdateBook", - Handler: _ABitOfEverythingService_UpdateBook_Handler, - }, - { - MethodName: "Update", - Handler: _ABitOfEverythingService_Update_Handler, - }, - { - MethodName: "UpdateV2", - Handler: _ABitOfEverythingService_UpdateV2_Handler, - }, - { - MethodName: "GetQuery", - Handler: _ABitOfEverythingService_GetQuery_Handler, - }, - { - MethodName: "GetRepeatedQuery", - Handler: _ABitOfEverythingService_GetRepeatedQuery_Handler, - }, - { - MethodName: "DeepPathEcho", - Handler: _ABitOfEverythingService_DeepPathEcho_Handler, - }, - { - MethodName: "NoBindings", - Handler: _ABitOfEverythingService_NoBindings_Handler, - }, - { - MethodName: "Timeout", - Handler: _ABitOfEverythingService_Timeout_Handler, - }, - { - MethodName: "ErrorWithDetails", - Handler: _ABitOfEverythingService_ErrorWithDetails_Handler, - }, - { - MethodName: "GetMessageWithBody", - Handler: _ABitOfEverythingService_GetMessageWithBody_Handler, - }, - { - MethodName: "PostWithEmptyBody", - Handler: _ABitOfEverythingService_PostWithEmptyBody_Handler, - }, - { - MethodName: "CheckGetQueryParams", - Handler: _ABitOfEverythingService_CheckGetQueryParams_Handler, - }, - { - MethodName: "CheckNestedEnumGetQueryParams", - Handler: _ABitOfEverythingService_CheckNestedEnumGetQueryParams_Handler, - }, - { - MethodName: "CheckPostQueryParams", - Handler: _ABitOfEverythingService_CheckPostQueryParams_Handler, - }, - { - MethodName: "OverwriteResponseContentType", - Handler: _ABitOfEverythingService_OverwriteResponseContentType_Handler, - }, - { - MethodName: "CheckStatus", - Handler: _ABitOfEverythingService_CheckStatus_Handler, - }, - }, - Streams: []grpc.StreamDesc{}, - Metadata: "proto/user/user.proto", -} - -// CamelCaseServiceNameClient is the client API for CamelCaseServiceName service. -// -// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. -type CamelCaseServiceNameClient interface { - Empty(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*emptypb.Empty, error) -} - -type camelCaseServiceNameClient struct { - cc grpc.ClientConnInterface -} - -func NewCamelCaseServiceNameClient(cc grpc.ClientConnInterface) CamelCaseServiceNameClient { - return &camelCaseServiceNameClient{cc} -} - -func (c *camelCaseServiceNameClient) Empty(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*emptypb.Empty, error) { - out := new(emptypb.Empty) - err := c.cc.Invoke(ctx, "/gid.camelCaseServiceName/Empty", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -// CamelCaseServiceNameServer is the server API for CamelCaseServiceName service. -// All implementations should embed UnimplementedCamelCaseServiceNameServer -// for forward compatibility -type CamelCaseServiceNameServer interface { - Empty(context.Context, *emptypb.Empty) (*emptypb.Empty, error) -} - -// UnimplementedCamelCaseServiceNameServer should be embedded to have forward compatible implementations. -type UnimplementedCamelCaseServiceNameServer struct { -} - -func (UnimplementedCamelCaseServiceNameServer) Empty(context.Context, *emptypb.Empty) (*emptypb.Empty, error) { - return nil, status.Errorf(codes.Unimplemented, "method Empty not implemented") -} - -// UnsafeCamelCaseServiceNameServer may be embedded to opt out of forward compatibility for this service. -// Use of this interface is not recommended, as added methods to CamelCaseServiceNameServer will -// result in compilation errors. -type UnsafeCamelCaseServiceNameServer interface { - mustEmbedUnimplementedCamelCaseServiceNameServer() -} - -func RegisterCamelCaseServiceNameServer(s grpc.ServiceRegistrar, srv CamelCaseServiceNameServer) { - s.RegisterService(&CamelCaseServiceName_ServiceDesc, srv) -} - -func _CamelCaseServiceName_Empty_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(emptypb.Empty) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(CamelCaseServiceNameServer).Empty(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/gid.camelCaseServiceName/Empty", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(CamelCaseServiceNameServer).Empty(ctx, req.(*emptypb.Empty)) - } - return interceptor(ctx, in, info, handler) -} - -// CamelCaseServiceName_ServiceDesc is the grpc.ServiceDesc for CamelCaseServiceName service. -// It's only intended for direct use with grpc.RegisterService, -// and not to be introspected or modified (even as a copy) -var CamelCaseServiceName_ServiceDesc = grpc.ServiceDesc{ - ServiceName: "gid.camelCaseServiceName", - HandlerType: (*CamelCaseServiceNameServer)(nil), - Methods: []grpc.MethodDesc{ - { - MethodName: "Empty", - Handler: _CamelCaseServiceName_Empty_Handler, - }, - }, - Streams: []grpc.StreamDesc{}, - Metadata: "proto/user/user.proto", -} - -// AnotherServiceWithNoBindingsClient is the client API for AnotherServiceWithNoBindings service. -// -// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. -type AnotherServiceWithNoBindingsClient interface { - NoBindings(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*emptypb.Empty, error) -} - -type anotherServiceWithNoBindingsClient struct { - cc grpc.ClientConnInterface -} - -func NewAnotherServiceWithNoBindingsClient(cc grpc.ClientConnInterface) AnotherServiceWithNoBindingsClient { - return &anotherServiceWithNoBindingsClient{cc} -} - -func (c *anotherServiceWithNoBindingsClient) NoBindings(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*emptypb.Empty, error) { - out := new(emptypb.Empty) - err := c.cc.Invoke(ctx, "/gid.AnotherServiceWithNoBindings/NoBindings", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -// AnotherServiceWithNoBindingsServer is the server API for AnotherServiceWithNoBindings service. -// All implementations should embed UnimplementedAnotherServiceWithNoBindingsServer -// for forward compatibility -type AnotherServiceWithNoBindingsServer interface { - NoBindings(context.Context, *emptypb.Empty) (*emptypb.Empty, error) -} - -// UnimplementedAnotherServiceWithNoBindingsServer should be embedded to have forward compatible implementations. -type UnimplementedAnotherServiceWithNoBindingsServer struct { -} - -func (UnimplementedAnotherServiceWithNoBindingsServer) NoBindings(context.Context, *emptypb.Empty) (*emptypb.Empty, error) { - return nil, status.Errorf(codes.Unimplemented, "method NoBindings not implemented") -} - -// UnsafeAnotherServiceWithNoBindingsServer may be embedded to opt out of forward compatibility for this service. -// Use of this interface is not recommended, as added methods to AnotherServiceWithNoBindingsServer will -// result in compilation errors. -type UnsafeAnotherServiceWithNoBindingsServer interface { - mustEmbedUnimplementedAnotherServiceWithNoBindingsServer() -} - -func RegisterAnotherServiceWithNoBindingsServer(s grpc.ServiceRegistrar, srv AnotherServiceWithNoBindingsServer) { - s.RegisterService(&AnotherServiceWithNoBindings_ServiceDesc, srv) -} - -func _AnotherServiceWithNoBindings_NoBindings_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(emptypb.Empty) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(AnotherServiceWithNoBindingsServer).NoBindings(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/gid.AnotherServiceWithNoBindings/NoBindings", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(AnotherServiceWithNoBindingsServer).NoBindings(ctx, req.(*emptypb.Empty)) - } - return interceptor(ctx, in, info, handler) -} - -// AnotherServiceWithNoBindings_ServiceDesc is the grpc.ServiceDesc for AnotherServiceWithNoBindings service. -// It's only intended for direct use with grpc.RegisterService, -// and not to be introspected or modified (even as a copy) -var AnotherServiceWithNoBindings_ServiceDesc = grpc.ServiceDesc{ - ServiceName: "gid.AnotherServiceWithNoBindings", - HandlerType: (*AnotherServiceWithNoBindingsServer)(nil), - Methods: []grpc.MethodDesc{ - { - MethodName: "NoBindings", - Handler: _AnotherServiceWithNoBindings_NoBindings_Handler, - }, - }, - Streams: []grpc.StreamDesc{}, - Metadata: "proto/user/user.proto", -} diff --git a/example/proxy/main.go b/example/proxy/main.go deleted file mode 100644 index 533323a1f..000000000 --- a/example/proxy/main.go +++ /dev/null @@ -1,31 +0,0 @@ -package main - -import ( - "context" - "github.com/trusch/grpc-proxy/proxy" - "github.com/trusch/grpc-proxy/proxy/codec" - - "google.golang.org/grpc/metadata" - "net" - - _ "github.com/trusch/grpc-proxy/proxy" - _ "github.com/trusch/grpc-proxy/proxy/codec" - - "github.com/pubgo/xerror" - "google.golang.org/grpc" -) - -func main() { - var conn, err = grpc.Dial("localhost:8080", grpc.WithBlock(), grpc.WithInsecure(), grpc.WithDefaultCallOptions(grpc.CallContentSubtype((&codec.Proxy{}).Name()))) - xerror.Exit(err) - defer conn.Close() - - server := grpc.NewServer(grpc.UnknownServiceHandler(proxy.TransparentHandler(func(ctx context.Context, fullMethodName string) (context.Context, *grpc.ClientConn, error) { - md, _ := metadata.FromIncomingContext(ctx) - outCtx := metadata.NewOutgoingContext(ctx, md.Copy()) - return outCtx, conn, nil - }))) - lis, err := net.Listen("tcp", ":8081") - xerror.Exit(err) - xerror.Exit(server.Serve(lis)) -} diff --git a/example/srv/gid/gid.go b/example/srv/gid/gid.go deleted file mode 100644 index 3a8710314..000000000 --- a/example/srv/gid/gid.go +++ /dev/null @@ -1,15 +0,0 @@ -package gid - -import ( - "github.com/pubgo/lava" - "github.com/pubgo/lava/example/protopb/gidpb" - "github.com/pubgo/lava/example/srv/gid/handler" - "github.com/pubgo/lava/service" -) - -func NewSrv() service.Command { - var srv = lava.NewSrv("gid", "gid generate") - srv.Dix(gidpb.RegisterIdServer) - srv.Dix(handler.NewId) - return srv -} diff --git a/example/srv/gid/handler/gid.id.go b/example/srv/gid/handler/gid.id.go deleted file mode 100644 index 085a17b8a..000000000 --- a/example/srv/gid/handler/gid.id.go +++ /dev/null @@ -1,108 +0,0 @@ -package handler - -import ( - "context" - "fmt" - "math/rand" - - "github.com/google/uuid" - "github.com/mattheath/kala/bigflake" - "github.com/mattheath/kala/snowflake" - "github.com/pubgo/lava/core/metric" - "github.com/pubgo/lava/core/scheduler" - "github.com/pubgo/lava/errors" - "github.com/pubgo/lava/example/protopb/gidpb" - "github.com/pubgo/lava/logging" - "github.com/teris-io/shortid" -) - -type Id struct { - snowflake *snowflake.Snowflake - bigflake *bigflake.Bigflake - Cron *scheduler.Scheduler - Metric metric.Stats -} - -func (id *Id) Init() { - //id.Cron.Every("test gid", time.Second*2, func(name string) { - // //id.Metric.Tagged(metric.Tags{"name": name, "time": time.Now().Format("15:04")}).Counter(name).Inc(1) - // //id.Metric.Tagged(metric.Tags{"name": name, "time": time.Now().Format("15:04")}).Gauge(name).Update(1) - // //"time": time.Now().Format("15:04:05") - // id.Metric.Tagged(metric.Tags{"module": "scheduler"}).Gauge(name).Update(1) - // fmt.Println("test cron every") - //}) -} - -func NewId(cron *scheduler.Scheduler, metric metric.Stats) gidpb.IdServer { - id := rand.Intn(100) - - sf, err := snowflake.New(uint32(id)) - if err != nil { - panic(err.Error()) - } - bg, err := bigflake.New(uint64(id)) - if err != nil { - panic(err.Error()) - } - - return &Id{ - Cron: cron, - Metric: metric, - snowflake: sf, - bigflake: bg, - } -} - -func (id *Id) Generate(ctx context.Context, req *gidpb.GenerateRequest) (*gidpb.GenerateResponse, error) { - var rsp = new(gidpb.GenerateResponse) - var log = logging.GetLog(ctx) - - if len(req.Type) == 0 { - req.Type = "uuid" - } - - switch req.Type { - case "uuid": - rsp.Type = "uuid" - rsp.Id = uuid.New().String() - case "snowflake": - id, err := id.snowflake.Mint() - if err != nil { - log.Sugar().Errorf("Failed to generate snowflake id: %v", err) - return nil, errors.InternalServerError(errors.New("id.generate", "failed to mint snowflake id")) - } - rsp.Type = "snowflake" - rsp.Id = fmt.Sprintf("%v", id) - case "bigflake": - id, err := id.bigflake.Mint() - if err != nil { - log.Sugar().Errorf("Failed to generate bigflake id: %v", err) - return nil, errors.InternalServerError(errors.New("id.generate", "failed to mint bigflake id")) - } - rsp.Type = "bigflake" - rsp.Id = fmt.Sprintf("%v", id) - case "shortid": - id, err := shortid.Generate() - if err != nil { - log.Sugar().Errorf("Failed to generate shortid id: %v", err) - return nil, errors.InternalServerError(errors.New("id.generate", "failed to generate short id")) - } - rsp.Type = "shortid" - rsp.Id = id - default: - return nil, errors.InvalidArgument(errors.New("id.generate", "unsupported id type")) - } - - return rsp, nil -} - -func (id *Id) Types(ctx context.Context, req *gidpb.TypesRequest) (*gidpb.TypesResponse, error) { - var rsp = new(gidpb.TypesResponse) - rsp.Types = []string{ - "uuid", - "shortid", - "snowflake", - "bigflake", - } - return rsp, nil -} diff --git a/example/srv/hello/handler/testapi.go b/example/srv/hello/handler/testapi.go deleted file mode 100644 index 7b860d395..000000000 --- a/example/srv/hello/handler/testapi.go +++ /dev/null @@ -1,137 +0,0 @@ -package handler - -import ( - "context" - "database/sql" - "errors" - "fmt" - "time" - - "github.com/pubgo/xerror" - "go.uber.org/zap" - "google.golang.org/protobuf/types/known/structpb" - "gorm.io/gorm" - - "github.com/pubgo/lava/clients/grpcc" - "github.com/pubgo/lava/clients/orm" - "github.com/pubgo/lava/config" - "github.com/pubgo/lava/core/metric" - "github.com/pubgo/lava/core/scheduler" - "github.com/pubgo/lava/example/protopb/hellopb" - "github.com/pubgo/lava/logging" - "github.com/pubgo/lava/logging/logutil" -) - -type User struct { - gorm.Model - ID uint - Name string - Email *string - Age uint8 - Birthday time.Time - MemberNumber sql.NullString - ActivatedAt sql.NullTime - CreatedAt time.Time - UpdatedAt time.Time -} - -var ll = logging.Component("handler") - -func NewTestAPIHandler(Db *orm.Client, Cron *scheduler.Scheduler, conns map[string]*grpcc.Client, L *logging.Logger) hellopb.TestApiServer { - return &testApiHandler{ - Db: Db, - Cron: Cron, - TestApiSrv: hellopb.NewTestApiClient(conns["test-grpc"]), - L: L, - } -} - -type testApiHandler struct { - Db *orm.Client - Cron *scheduler.Scheduler - TestApiSrv hellopb.TestApiClient - L *logging.Logger -} - -func (h *testApiHandler) Close() { - h.L.Info("close") -} - -func (h *testApiHandler) Init() { - defer xerror.RecoverAndExit() - - var db = h.Db - - xerror.Panic(db.AutoMigrate(&User{})) - var user = User{Name: "Jinzhu", Age: 18, Birthday: time.Now()} - xerror.Panic(db.Create(&user).Error) - - logutil.ColorPretty(user) - - //buf := &bytes.Buffer{} - //memviz.Map(buf, &user) - //xerror.Panic(ioutil.WriteFile("example-tree-data", buf.Bytes(), 0644)) - - h.Cron.Every("test grpc client", time.Second*5, func(name string) { - defer xerror.RecoverAndExit() - zap.L().Debug("客户端访问") - var out, err1 = h.TestApiSrv.Version(context.Background(), &hellopb.TestReq{Input: "input", Name: "hello"}) - xerror.Panic(err1) - fmt.Printf("%#v \n", out) - }) -} - -func (h *testApiHandler) VersionTestCustom(ctx context.Context, req *hellopb.TestReq) (*hellopb.TestApiOutput, error) { - panic("implement me") -} - -func (h *testApiHandler) Version1(ctx context.Context, value *structpb.Value) (*hellopb.TestApiOutput1, error) { - fmt.Printf("%#v\n", value.GetStructValue().AsMap()) - return &hellopb.TestApiOutput1{ - Data: value, - }, nil -} - -func (h *testApiHandler) Version(ctx context.Context, in *hellopb.TestReq) (out *hellopb.TestApiOutput, err error) { - var log = logging.GetLog(ctx) - log.Sugar().Infof("Received Helloworld.Call request, name: %s", in.Input) - ll.S().Infof("Received Helloworld.Call request, name: %s", in.Input) - - var m = metric.GetMetric(ctx) - m.Counter("test-counter").Inc(1) - defer m.Timer("test-timer").Start().Stop() - - if h.Db != nil { - var user User - - var db = h.Db - - xerror.Panic(db.WithContext(ctx).First(&user).Error) - log.Sugar().Infow("data", "data", user) - - xerror.Panic(db.Raw("select * from users limit 1").First(&user).Error) - log.Sugar().Infow("data", "data", user) - - xerror.Panic(db.Model(&User{}).Where("Age = ?", 18).First(&user).Error) - log.Sugar().Infow("data", "data", user) - - log.Sugar().Infow("config ok", "cfg", config.CfgPath) - } - - out = &hellopb.TestApiOutput{ - Msg: in.Input, - } - - if in.Input == "error" { - return out, errors.New("error test") - } - - return -} - -func (h *testApiHandler) VersionTest(ctx context.Context, in *hellopb.TestReq) (out *hellopb.TestApiOutput, err error) { - out = &hellopb.TestApiOutput{ - Msg: in.Input + "_test", - } - return -} diff --git a/example/srv/hello/handler/testapi_test.go b/example/srv/hello/handler/testapi_test.go deleted file mode 100644 index de3336c2c..000000000 --- a/example/srv/hello/handler/testapi_test.go +++ /dev/null @@ -1,43 +0,0 @@ -package handler - -import ( - "context" - "fmt" - "testing" - - "github.com/pubgo/dix" - "github.com/pubgo/xerror" - - _ "github.com/pubgo/lava" - "github.com/pubgo/lava/clients/grpcc" - "github.com/pubgo/lava/clients/orm" - _ "github.com/pubgo/lava/clients/orm/driver/sqlite" - "github.com/pubgo/lava/core/scheduler" - "github.com/pubgo/lava/example/protopb/hellopb" - "github.com/pubgo/lava/logging" -) - -var _srv *testApiHandler - -func TestMain(t *testing.M) { - defer xerror.RecoverAndExit() - dix.Register(func(Db *orm.Client, Cron *scheduler.Scheduler, conns map[string]*grpcc.Client, L *logging.Logger) { - _srv = &testApiHandler{ - Db: Db, - Cron: Cron, - TestApiSrv: hellopb.NewTestApiClient(conns["test-grpc"]), - L: L, - } - }) - - dix.Invoke() - - _srv.Init() - t.Run() -} - -func TestInit(t *testing.T) { - fmt.Println(_srv.Version(context.Background(), &hellopb.TestReq{ - Input: "hello", - })) -} diff --git a/example/srv/hello/hello.go b/example/srv/hello/hello.go deleted file mode 100644 index f8a96062c..000000000 --- a/example/srv/hello/hello.go +++ /dev/null @@ -1,17 +0,0 @@ -package hello - -import ( - "github.com/pubgo/lava" - "github.com/pubgo/lava/example/protopb/hellopb" - "github.com/pubgo/lava/example/srv/hello/handler" - "github.com/pubgo/lava/service" -) - -var name = "test-grpc" - -func NewSrv() service.Service { - srv := lava.NewSrv(name, "entry grpc test") - srv.Dix(hellopb.RegisterTestApiServer) - srv.Dix(handler.NewTestAPIHandler) - return srv -} diff --git a/go.mod b/go.mod index 14b4f54b2..d363621c0 100644 --- a/go.mod +++ b/go.mod @@ -73,19 +73,15 @@ require ( github.com/go-logr/zapr v1.2.2 github.com/goccy/go-json v0.7.10 github.com/golang-jwt/jwt/v4 v4.2.0 - github.com/jhump/protoreflect v1.10.3 - github.com/jjeffcaii/reactor-go v0.5.1 + github.com/jhump/protoreflect v1.10.3 // indirect github.com/kr/pretty v0.3.0 github.com/magefile/mage v1.11.0 github.com/mailgun/holster/v4 v4.0.6 github.com/manifoldco/promptui v0.8.0 - github.com/mattheath/kala v0.0.0-20171219141654-d6276794bf0e github.com/prometheus/client_golang v1.11.0 github.com/pseudomuto/protoc-gen-doc v1.3.2 - github.com/rsocket/rsocket-go v0.8.6 github.com/spf13/cast v1.4.1 github.com/spf13/pflag v1.0.5 - github.com/teris-io/shortid v0.0.0-20201117134242-e59966efd125 github.com/urfave/cli/v2 v2.8.0 github.com/valyala/bytebufferpool v1.0.0 go.opentelemetry.io/otel/bridge/opentracing v1.3.0 @@ -106,12 +102,9 @@ require ( github.com/gofiber/template v1.6.25 github.com/gofiber/utils v0.1.2 github.com/pubgo/dix v0.2.8 - github.com/pubgo/protobuild v0.0.7 github.com/smartystreets/assertions v1.0.0 - github.com/trusch/grpc-proxy v0.0.0-20190529073533-02b64529f274 github.com/valyala/fasthttp v1.34.0 github.com/valyala/fasttemplate v1.2.1 - go.uber.org/fx v1.17.1 ) require ( @@ -126,6 +119,7 @@ require ( github.com/andybalholm/brotli v1.0.4 // indirect github.com/antzucaro/matchr v0.0.0-20210222213004-b04723ef80f0 // indirect github.com/asaskevich/govalidator v0.0.0-20200428143746-21a406dcc535 // indirect + github.com/benbjohnson/clock v1.3.0 // indirect github.com/beorn7/perks v1.0.1 // indirect github.com/cenkalti/backoff v2.2.1+incompatible // indirect github.com/census-instrumentation/opencensus-proto v0.3.0 // indirect @@ -157,7 +151,6 @@ require ( github.com/google/gofuzz v1.1.1-0.20200604201612-c04b05f3adfa // indirect github.com/google/pprof v0.0.0-20210720184732-4bb14d4b1be1 // indirect github.com/googleapis/gnostic v0.4.1 // indirect - github.com/gorilla/websocket v1.4.2 // indirect github.com/huandu/xstrings v1.3.2 // indirect github.com/imdario/mergo v0.3.12 // indirect github.com/jinzhu/inflection v1.0.0 // indirect @@ -173,7 +166,6 @@ require ( github.com/m3db/prometheus_procfs v0.8.1 // indirect github.com/magiconair/properties v1.8.5 // indirect github.com/mailru/easyjson v0.7.6 // indirect - github.com/mattheath/base62 v0.0.0-20150408093626-b80cdc656a7a // indirect github.com/mattn/go-colorable v0.1.12 // indirect github.com/mattn/go-isatty v0.0.14 // indirect github.com/mattn/go-runewidth v0.0.12 // indirect @@ -184,7 +176,6 @@ require ( github.com/mitchellh/reflectwalk v1.0.1 // indirect github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect github.com/modern-go/reflect2 v1.0.2 // indirect - github.com/panjf2000/ants/v2 v2.4.5 // indirect github.com/prometheus/client_model v0.2.0 // indirect github.com/prometheus/common v0.26.0 // indirect github.com/prometheus/procfs v0.6.0 // indirect @@ -206,7 +197,7 @@ require ( go.mongodb.org/mongo-driver v1.3.4 // indirect go.opentelemetry.io/otel v1.4.0 // indirect go.opentelemetry.io/otel/trace v1.4.0 // indirect - go.uber.org/dig v1.14.0 // indirect + go.uber.org/goleak v1.1.11 // indirect go.uber.org/multierr v1.7.0 // indirect golang.org/x/oauth2 v0.0.0-20211104180415-d3ed0bb246c8 // indirect golang.org/x/term v0.0.0-20210927222741-03fcf44c2211 // indirect diff --git a/go.sum b/go.sum index a5711ba52..1921c3540 100644 --- a/go.sum +++ b/go.sum @@ -196,7 +196,6 @@ github.com/aws/aws-sdk-go v1.27.0/go.mod h1:KmX6BPdI08NWTb3/sm4ZGu5ShLoqVDhKgpiN github.com/aws/aws-sdk-go-v2 v0.18.0/go.mod h1:JWVYvqSMppoMJC0x5wdwiImzgXTI9FuZwxzkQq9wy+g= github.com/axgle/mahonia v0.0.0-20180208002826-3358181d7394/go.mod h1:Q8n74mJTIgjX4RBBcHnJ05h//6/k6foqmgE45jTQtxg= github.com/aybabtme/rgbterm v0.0.0-20170906152045-cc83f3b3ce59/go.mod h1:q/89r3U2H7sSsE2t6Kca0lfwTK8JdoNGS/yzM/4iH5I= -github.com/aymerick/douceur v0.2.0/go.mod h1:wlT5vV2O3h55X9m7iVYN0TBM0NH/MmbLnd30/FjWUq4= github.com/aymerick/raymond v2.0.2+incompatible/go.mod h1:osfaiScAUVup+UC9Nfq76eWqDhXlp+4UYaA8uhTBO6g= github.com/benbjohnson/clock v1.1.0/go.mod h1:J11/hYXuz8f4ySSvYwY0FKfm+ezbsZBKZxNJlLklBHA= github.com/benbjohnson/clock v1.3.0 h1:ip6w0uFQkncKQ979AypyG0ER7mqUSBdKLOgAle/AT8A= @@ -245,7 +244,6 @@ github.com/cespare/xxhash v1.1.0/go.mod h1:XrSqR1VqqWfGrhpAt58auRo0WTKS1nRRg3ghf github.com/cespare/xxhash/v2 v2.1.1/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= github.com/cespare/xxhash/v2 v2.1.2 h1:YRXhKfTDauu4ajMg1TPgFO5jnlC2HCbmLXMcTG5cbYE= github.com/cespare/xxhash/v2 v2.1.2/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= -github.com/chris-ramon/douceur v0.2.0/go.mod h1:wDW5xjJdeoMm1mRt4sD4c/LbF/mWdEpRXQKjTR8nIBE= github.com/chzyer/logex v1.1.10 h1:Swpa1K6QvQznwJRcfTfQJmTE72DqScAa40E+fbHEXEE= github.com/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWRnGsAI= github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e h1:fY5BOSpyZCqRo5OhCuC+XN+r/bBCmeuuJtjz+bCNIf8= @@ -269,7 +267,6 @@ github.com/cncf/xds/go v0.0.0-20211001041855-01bcc9b48dfe/go.mod h1:eXthEFrGJvWH github.com/cncf/xds/go v0.0.0-20211011173535-cb28da3451f1/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= github.com/cncf/xds/go v0.0.0-20211130200136-a8f946100490 h1:KwaoQzs/WeUxxJqiJsZ4euOly1Az/IgZXXSxlD/UBNk= github.com/cncf/xds/go v0.0.0-20211130200136-a8f946100490/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= -github.com/cnf/structhash v0.0.0-20201127153200-e1b16c1ebc08/go.mod h1:pCxVEbcm3AMg7ejXyorUXi6HQCzOIBf7zEDVPtw0/U4= github.com/cockroachdb/apd v1.1.0/go.mod h1:8Sl8LxpKi29FqWXR16WEFZRNSz3SoPzUzeMeY4+DwBQ= github.com/cockroachdb/datadriven v0.0.0-20190809214429-80d97fb3cbaa/go.mod h1:zn76sxSg3SzpJ0PPJaLDCu+Bu0Lg3sKTORVIj19EIF8= github.com/codahale/hdrhistogram v0.0.0-20161010025455-3a0bb77429bd/go.mod h1:sE/e/2PUdi/liOCUjSTXgM1o87ZssimdTWN964YiIeI= @@ -356,12 +353,10 @@ github.com/ethereum/go-ethereum v1.9.25/go.mod h1:vMkFiYLHI4tgPw4k2j4MHKoovchFE8 github.com/evanphx/json-patch v4.9.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk= github.com/fasthttp/websocket v1.5.0 h1:B4zbe3xXyvIdnqjOZrafVFklCUq5ZLo/TqCt5JA1wLE= github.com/fasthttp/websocket v1.5.0/go.mod h1:n0BlOQvJdPbTuBkZT0O5+jk/sp/1/VCzquR1BehI2F4= -github.com/fastly/go-utils v0.0.0-20180712184237-d95a45783239/go.mod h1:Gdwt2ce0yfBxPvZrHkprdPPTTS3N5rwmLE8T22KBXlw= github.com/fatih/color v1.3.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4= github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4= github.com/fatih/color v1.9.0/go.mod h1:eQcE1qtQxscV5RaZvpXrrb8Drkc3/DdQ+uUYCNjL+zU= github.com/fatih/color v1.13.0/go.mod h1:kLAiJbzzSOZDVNGyDpeOxJ47H46qBXwg5ILebYFFOfk= -github.com/fatih/structtag v1.2.0/go.mod h1:mBJUNpUnHmRKrKlQQlmCrh5PuhftFbNv8Ys4/aAZl94= github.com/felixge/fgprof v0.9.1 h1:E6FUJ2Mlv043ipLOCFqo8+cHo9MhQ203E2cdEK/isEs= github.com/felixge/fgprof v0.9.1/go.mod h1:7/HK6JFtFaARhIljgP2IV8rJLIoHDoOYoUphsnGvqxE= github.com/felixge/httpsnoop v1.0.1/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSwevea8zH2U= @@ -575,7 +570,6 @@ github.com/golang/mock v1.4.1/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt github.com/golang/mock v1.4.3/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= github.com/golang/mock v1.4.4/go.mod h1:l3mdAwkq5BuhzHwde/uurv3sEJeZMXNpwsxVWU71h+4= github.com/golang/mock v1.5.0/go.mod h1:CWnOUgYIOo4TcNZ0wHX3YZCqsaM1I1Jvs6v3mP3KVu8= -github.com/golang/mock v1.6.0 h1:ErTB+efbowRARo13NNdxyJji2egdxLGQhRaY+DUumQc= github.com/golang/mock v1.6.0/go.mod h1:p6yTPP+5HYm5mzsMV8JkE6ZKdX+/wYM6Hr+LicevLPs= github.com/golang/protobuf v1.1.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= @@ -673,7 +667,6 @@ github.com/gordonklaus/ineffassign v0.0.0-20200309095847-7953dde2c7bf/go.mod h1: github.com/goreleaser/goreleaser v0.134.0/go.mod h1:ZT6Y2rSYa6NxQzIsdfWWNWAlYGXGbreo66NmE+3X3WQ= github.com/goreleaser/nfpm v1.2.1/go.mod h1:TtWrABZozuLOttX2uDlYyECfQX7x5XYkVxhjYcR6G9w= github.com/gorilla/context v1.1.1/go.mod h1:kBGZzfjB9CEq2AlWe17Uuf7NDRt0dE0s8S51q0aT7Yg= -github.com/gorilla/css v1.0.0/go.mod h1:Dn721qIggHpt4+EFCcTLTU/vk5ySda2ReITrtgBl60c= github.com/gorilla/handlers v1.5.1/go.mod h1:t8XrUpc4KVXb7HGyJ4/cEnwQiaxrX/hz1Zv/4g96P1Q= github.com/gorilla/mux v1.6.2/go.mod h1:1lud6UwP+6orDFRuTfBEV8e9/aOM/c4fVVCaMa2zaAs= github.com/gorilla/mux v1.7.3/go.mod h1:1lud6UwP+6orDFRuTfBEV8e9/aOM/c4fVVCaMa2zaAs= @@ -682,7 +675,6 @@ github.com/gorilla/mux v1.8.0/go.mod h1:DVbg23sWSpFRCP0SfiEN6jmj59UnW/n46BH5rLB7 github.com/gorilla/websocket v0.0.0-20170926233335-4201258b820c/go.mod h1:E7qHFY5m1UJ88s3WnNqhKjPHQ0heANvMoAMk2YaljkQ= github.com/gorilla/websocket v1.4.0/go.mod h1:E7qHFY5m1UJ88s3WnNqhKjPHQ0heANvMoAMk2YaljkQ= github.com/gorilla/websocket v1.4.1-0.20190629185528-ae1634f6a989/go.mod h1:E7qHFY5m1UJ88s3WnNqhKjPHQ0heANvMoAMk2YaljkQ= -github.com/gorilla/websocket v1.4.2 h1:+/TMaTYc4QFitKJxsQ7Yye35DkWvkdLcvGKqM+x0Ufc= github.com/gorilla/websocket v1.4.2/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= github.com/grandcat/zeroconf v1.0.0 h1:uHhahLBKqwWBV6WZUDAT71044vwOTL+McW0mBJvo6kE= github.com/grandcat/zeroconf v1.0.0/go.mod h1:lTKmG1zh86XyCoUeIHSA4FJMBwCJiQmGfcP2PdzytEs= @@ -837,7 +829,6 @@ github.com/jbenet/go-context v0.0.0-20150711004518-d14ea06fba99/go.mod h1:1lJo3i github.com/jcmturner/gofork v0.0.0-20190328161633-dc7c13fece03/go.mod h1:MK8+TM0La+2rjBD4jE12Kj1pCCxK7d2LK/UM3ncEo0o= github.com/jcmturner/gofork v1.0.0/go.mod h1:MK8+TM0La+2rjBD4jE12Kj1pCCxK7d2LK/UM3ncEo0o= github.com/jedisct1/go-minisign v0.0.0-20190909160543-45766022959e/go.mod h1:G1CVv03EnqU1wYL2dFwXxW2An0az9JTl/ZsqXQeBlkU= -github.com/jehiah/go-strftime v0.0.0-20171201141054-1d33003b3869/go.mod h1:cJ6Cj7dQo+O6GJNiMx+Pa94qKj+TG8ONdKHgMNIyyag= github.com/jessevdk/go-flags v0.0.0-20141203071132-1679536dcc89/go.mod h1:4FA24M0QyGHXBuZZK/XkWh8h0e1EYbRYJSGM75WSRxI= github.com/jessevdk/go-flags v1.4.0/go.mod h1:4FA24M0QyGHXBuZZK/XkWh8h0e1EYbRYJSGM75WSRxI= github.com/jhump/gopoet v0.0.0-20190322174617-17282ff210b3/go.mod h1:me9yfT6IJSlOL3FCfrg+L6yzUEZ+5jW6WHt4Sk+UPUI= @@ -856,8 +847,6 @@ github.com/jinzhu/now v1.1.2/go.mod h1:d3SSVoowX0Lcu0IBviAWJpolVfI5UJVZZ7cO71lE/ github.com/jinzhu/now v1.1.4/go.mod h1:d3SSVoowX0Lcu0IBviAWJpolVfI5UJVZZ7cO71lE/z8= github.com/jinzhu/now v1.1.5 h1:/o9tlHleP7gOFmsnYNz3RGnqzefHA47wQpKrrdTIwXQ= github.com/jinzhu/now v1.1.5/go.mod h1:d3SSVoowX0Lcu0IBviAWJpolVfI5UJVZZ7cO71lE/z8= -github.com/jjeffcaii/reactor-go v0.5.1 h1:YG2SUE/Pag2ChZOcJ+Twfb+D10lNOavoYly+xUUbA7w= -github.com/jjeffcaii/reactor-go v0.5.1/go.mod h1:qYN34C2UANFOtDeUGvhxlExLpFMDbvSrphX3Gb3H6S8= github.com/jmespath/go-jmespath v0.0.0-20160202185014-0b12d6b521d8/go.mod h1:Nht3zPeWKUH0NzdCt2Blrr5ys8VGpn0CEB0cQHVjt7k= github.com/jmespath/go-jmespath v0.0.0-20180206201540-c2b33e8439af/go.mod h1:Nht3zPeWKUH0NzdCt2Blrr5ys8VGpn0CEB0cQHVjt7k= github.com/joho/godotenv v1.3.0/go.mod h1:7hK45KPybAkOC6peb+G5yklZfMxEjkZhHbwpqxOKXbg= @@ -919,8 +908,6 @@ github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= github.com/kylelemons/godebug v1.1.0/go.mod h1:9/0rRGxNHcop5bhtWyNeEfOS8JIWk580+fNqagV/RAw= -github.com/lestrrat-go/envload v0.0.0-20180220234015-a3eb8ddeffcc/go.mod h1:kopuH9ugFRkIXf3YoqHKyrJ9YfUFsckUU9S7B+XP+is= -github.com/lestrrat-go/strftime v1.0.3/go.mod h1:E1nN3pCbtMSu1yjSVeyuRFVm/U0xoR76fd03sz+Qz4g= github.com/lib/pq v1.0.0/go.mod h1:5WUZQaWbwv1U+lTReE5YruASi9Al49XbQIvNi/34Woo= github.com/lib/pq v1.1.0/go.mod h1:5WUZQaWbwv1U+lTReE5YruASi9Al49XbQIvNi/34Woo= github.com/lib/pq v1.1.1/go.mod h1:5WUZQaWbwv1U+lTReE5YruASi9Al49XbQIvNi/34Woo= @@ -932,7 +919,6 @@ github.com/lunixbochs/vtclean v0.0.0-20180621232353-2d01aacdc34a/go.mod h1:pHhQN github.com/lunixbochs/vtclean v1.0.0 h1:xu2sLAri4lGiovBDQKxl5mrXyESr3gUr5m5SM5+LVb8= github.com/lunixbochs/vtclean v1.0.0/go.mod h1:pHhQNgMf3btfWnGBVipUOjRYhoOsdGqdm/+2c2E2WMI= github.com/lyft/protoc-gen-star v0.5.3/go.mod h1:V0xaHgaf5oCCqmcxYcWiDfTiKsZsRc87/1qhoTACD8w= -github.com/lyft/protoc-gen-star v0.6.0/go.mod h1:TGAoBVkt8w7MPG72TrKIu85MIdXwDuzJYeZuUPFPNwA= github.com/lyft/protoc-gen-validate v0.0.13/go.mod h1:XbGvPuh87YZc5TdIa2/I4pLk0QoUACkjt2znoq26NVQ= github.com/m3db/prometheus_client_golang v0.8.1 h1:t7w/tcFws81JL1j5sqmpqcOyQOpH4RDOmIe3A3fdN3w= github.com/m3db/prometheus_client_golang v0.8.1/go.mod h1:8R/f1xYhXWq59KD/mbRqoBulXejss7vYtYzWmruNUwI= @@ -964,10 +950,6 @@ github.com/maragudk/gomponents v0.17.2 h1:+hdokU3WHVLaWj7UYOvSDUslSd2WHLH2RAq2SY github.com/maragudk/gomponents v0.17.2/go.mod h1:0OdlqOoqxcwvhBFrp8wlKHnEXhNB7IVhb8GuARmd+tI= github.com/markbates/oncer v0.0.0-20181203154359-bf2de49a0be2/go.mod h1:Ld9puTsIW75CHf65OeIOkyKbteujpZVXDpWK6YGZbxE= github.com/markbates/safe v1.0.1/go.mod h1:nAqgmRi7cY2nqMc92/bSEeQA+R4OheNU2T1kNSCBdG0= -github.com/mattheath/base62 v0.0.0-20150408093626-b80cdc656a7a h1:rnrxZue85aKdMU4nJ50GgKA31lCaVbft+7Xl8OXj55U= -github.com/mattheath/base62 v0.0.0-20150408093626-b80cdc656a7a/go.mod h1:hJJYoBMTZIONmUEpX3+9v2057zuRM0n3n77U4Ob4wE4= -github.com/mattheath/kala v0.0.0-20171219141654-d6276794bf0e h1:cj+w63ez19o7y7vunA8Q3rUIWwKEOUx7foqjnr4qbtI= -github.com/mattheath/kala v0.0.0-20171219141654-d6276794bf0e/go.mod h1:OFd5kqMcMRr5LyBjZulGPJxaEK9r/jQ6JCV4Xi32bKo= github.com/mattn/go-colorable v0.0.9/go.mod h1:9vuHe8Xs5qXnSaW/c/ABM9alt+Vo+STaOChaDxuIBZU= github.com/mattn/go-colorable v0.1.0/go.mod h1:9vuHe8Xs5qXnSaW/c/ABM9alt+Vo+STaOChaDxuIBZU= github.com/mattn/go-colorable v0.1.1/go.mod h1:FuOcm+DKB9mbwrcAfNl7/TZVBZ6rcnceauSikq3lYCQ= @@ -1007,7 +989,6 @@ github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5 github.com/melbahja/goph v0.2.0/go.mod h1:iSTKQ5cr4oS0+xW+qNPySWygq8OV91/7CToImPJE1QE= github.com/mgutz/ansi v0.0.0-20170206155736-9520e82c474b/go.mod h1:01TrycV0kFyexm33Z7vhZRXopbI8J3TDReVlkTgMUxE= github.com/microcosm-cc/bluemonday v1.0.2/go.mod h1:iVP4YcDBq+n/5fb23BhYFvIMq/leAFZyRl6bYmGDlGc= -github.com/microcosm-cc/bluemonday v1.0.5/go.mod h1:8iwZnFn2CDDNZ0r6UXhF4xawGvzaqzCRa1n3/lO3W2w= github.com/miekg/dns v1.0.14/go.mod h1:W1PPwlIAgtquWBMBEV9nkV9Cazfe8ScdGz/Lj7v3Nrg= github.com/miekg/dns v1.1.26/go.mod h1:bPDLeHnStXmXAq1m/Ch/hvfNHr14JKNPMBo3VZKjuso= github.com/miekg/dns v1.1.27/go.mod h1:KNUDUusw/aVsxyTYZM1oqvCicbwhgbNgztCETuNZ7xM= @@ -1051,7 +1032,6 @@ github.com/mwitkow/go-conntrack v0.0.0-20190716064945-2f068394615f/go.mod h1:qRW github.com/mwitkow/go-proto-validators v0.0.0-20180403085117-0950a7990007/go.mod h1:m2XC9Qq0AlmmVksL6FktJCdTYyLk7V3fKyp0sl1yWQo= github.com/mwitkow/go-proto-validators v0.3.2 h1:qRlmpTzm2pstMKKzTdvwPCF5QfBNURSlAgN/R+qbKos= github.com/mwitkow/go-proto-validators v0.3.2/go.mod h1:ej0Qp0qMgHN/KtDyUt+Q1/tA7a5VarXUOUxD+oeD30w= -github.com/mwitkow/grpc-proxy v0.0.0-20181017164139-0f1106ef9c76/go.mod h1:x5OoJHDHqxHS801UIuhqGl6QdSAEJvtausosHSdazIo= github.com/mxk/go-flowrate v0.0.0-20140419014527-cca7078d478f/go.mod h1:ZdcZmHo+o7JKHSa8/e818NopupXU1YMK5fe1lsApnBw= github.com/naoina/go-stringutil v0.1.0/go.mod h1:XJ2SJL9jCtBh+P9q5btrd/Ylo8XwT/h1USek5+NqSA0= github.com/naoina/toml v0.1.2-0.20170918210437-9fafd6967416/go.mod h1:NBIhNtsFMo3G2szEBne+bO4gS192HuIYRqfvOWb4i1E= @@ -1109,9 +1089,6 @@ github.com/openzipkin/zipkin-go v0.1.6/go.mod h1:QgAqvLzwWbR/WpD4A3cGpPtJrZXNIiJ github.com/openzipkin/zipkin-go v0.2.1/go.mod h1:NaW6tEwdmWMaCDZzg8sh+IBNOxHMPnhQw8ySjnjRyN4= github.com/openzipkin/zipkin-go v0.2.2/go.mod h1:NaW6tEwdmWMaCDZzg8sh+IBNOxHMPnhQw8ySjnjRyN4= github.com/pact-foundation/pact-go v1.0.4/go.mod h1:uExwJY4kCzNPcHRj+hCR/HBbOOIwwtUjcrb0b5/5kLM= -github.com/panjf2000/ants/v2 v2.4.3/go.mod h1:f6F0NZVFsGCp5A7QW/Zj/m92atWwOkY0OIhFxRNFr4A= -github.com/panjf2000/ants/v2 v2.4.5 h1:kcGvjXB7ea0MrzzszpnlVFthhYKoFxLi75nRbsq01HY= -github.com/panjf2000/ants/v2 v2.4.5/go.mod h1:f6F0NZVFsGCp5A7QW/Zj/m92atWwOkY0OIhFxRNFr4A= github.com/pascaldekloe/goe v0.0.0-20180627143212-57f6aae5913c/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144TG7ZOy1lc= github.com/pascaldekloe/goe v0.1.0/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144TG7ZOy1lc= github.com/pborman/uuid v0.0.0-20170112150404-1b00554d8222/go.mod h1:VyrYX9gd7irzKovcSS6BIIEwPRkP2Wm2m9ufcdFSJ34= @@ -1139,7 +1116,6 @@ github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINE github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/profile v1.2.1/go.mod h1:hJw3o1OdXxsrSjjVksARp5W95eeEaEfptyVZyv6JUPA= -github.com/pkg/profile v1.5.0/go.mod h1:qBsxPvzyUincmltOk6iyRVxHYg4adc0OFOv72ZdLa18= github.com/pkg/sftp v1.10.1/go.mod h1:lYOWFsE0bwd1+KfKJaKeuokY15vzFx25BLbzYYoAxZI= github.com/pkg/sftp v1.11.0/go.mod h1:lYOWFsE0bwd1+KfKJaKeuokY15vzFx25BLbzYYoAxZI= github.com/pkg/sftp v1.13.1/go.mod h1:3HaPG6Dq1ILlpPZRO0HVMrsydcdLt6HRDccSgb87qRg= @@ -1195,19 +1171,12 @@ github.com/pseudomuto/protokit v0.2.0 h1:hlnBDcy3YEDXH7kc9gV+NLaN0cDzhDvD1s7Y6FZ github.com/pseudomuto/protokit v0.2.0/go.mod h1:2PdH30hxVHsup8KpBTOXTBeMVhJZVio3Q8ViKSAXT0Q= github.com/pubgo/dix v0.2.8 h1:s5EXWroOlU+Hksi9VSYgsNNO8vO1H9niVkc0cgJBalE= github.com/pubgo/dix v0.2.8/go.mod h1:QlD2BLBFkcmOnw4ZfnMIUM6boyfg+Bh/Gvmz/00RIpw= -github.com/pubgo/protobuild v0.0.7 h1:xLKYUbrLavfcWnWPHUDT/5QoH3+Xrt680UueKCqYNIg= -github.com/pubgo/protobuild v0.0.7/go.mod h1:DsSlplrGAF4CewJ7ULoBnBbpV40ej/lAuB8EWKQqlQ0= -github.com/pubgo/x v0.3.36/go.mod h1:i3n1XrT39kzcgA8gt886bfCSg6u6uwohbwAtC8h8ePI= github.com/pubgo/x v0.3.37 h1:hOj+yqTc2XqpP4Ap5V7FnDYh7gOQ09/sPm6TbiMgCNE= github.com/pubgo/x v0.3.37/go.mod h1:6EQsDssieDejOCOw+jnq3/60XQGaLjL6LNPVaUGDNt8= -github.com/pubgo/xerror v0.4.1/go.mod h1:pUIhJ7l6dFmsaCE4GEULEIVpjdqMq/MCnHixg56mxJQ= -github.com/pubgo/xerror v0.4.10/go.mod h1:dBoxo5qbKQIoSw3w4cJfX7fTHjgF9G4loeXdIAw2Oc4= -github.com/pubgo/xerror v0.4.18/go.mod h1:oII+ykbOChXWPDP55anP3C+ORCc/hn70lBRu5zcqEeE= github.com/pubgo/xerror v0.4.20/go.mod h1:oII+ykbOChXWPDP55anP3C+ORCc/hn70lBRu5zcqEeE= github.com/pubgo/xerror v0.4.29/go.mod h1:oII+ykbOChXWPDP55anP3C+ORCc/hn70lBRu5zcqEeE= github.com/pubgo/xerror v0.4.30 h1:S4fNd/ACDO8817NH79CsNRgZiQUKVi4hdRtEb9tQZ+0= github.com/pubgo/xerror v0.4.30/go.mod h1:oII+ykbOChXWPDP55anP3C+ORCc/hn70lBRu5zcqEeE= -github.com/pubgo/xlog v0.2.8/go.mod h1:ceFOxHSwkcTjtMkbMq0e6j8ihr32p2z2mkbfYD5pHLc= github.com/rcrowley/go-metrics v0.0.0-20181016184325-3113b8401b8a/go.mod h1:bCqnVzQkZxMG4s8nGwiZ5l3QUCyqpo9Y+/ZMZ9VjZe4= github.com/rcrowley/go-metrics v0.0.0-20190826022208-cac0b30c2563/go.mod h1:bCqnVzQkZxMG4s8nGwiZ5l3QUCyqpo9Y+/ZMZ9VjZe4= github.com/reugn/go-quartz v0.3.7 h1:4Xc90qSQa2WRkPU+wI9iV5o+mf+0e4W2nao5hUmPH/A= @@ -1231,8 +1200,6 @@ github.com/rs/xhandler v0.0.0-20160618193221-ed27b6fd6521/go.mod h1:RvLn4FgxWubr github.com/rs/xid v1.2.1/go.mod h1:+uKXf+4Djp6Md1KODXJxgGQPKngRmWyn10oCKFzNHOQ= github.com/rs/zerolog v1.13.0/go.mod h1:YbFCdg8HfsridGWAh22vktObvhZbQsZXe4/zB0OKkWU= github.com/rs/zerolog v1.15.0/go.mod h1:xYTKnLHcpfU2225ny5qZjxnj9NvkumZYjJHlAThCjNc= -github.com/rsocket/rsocket-go v0.8.6 h1:7/nR2cfUcgAkt/8DmV+zRhsrPvepXugFSdbl0agmrxI= -github.com/rsocket/rsocket-go v0.8.6/go.mod h1:NhUzuOWcPBI4Of1drSHrfiRK+NZqqk3ixHPFWnnKf8Q= github.com/russross/blackfriday v1.5.2 h1:HyvC0ARfnZBqnXwABFeSZHpKvJHJJfPz81GNueLj0oo= github.com/russross/blackfriday v1.5.2/go.mod h1:JO/DiYxRf+HjHt06OyowR9PTA263kcR/rfWxYHBV53g= github.com/russross/blackfriday/v2 v2.0.1/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= @@ -1250,7 +1217,6 @@ github.com/securego/gosec v0.0.0-20200203094520-d13bb6d2420c/go.mod h1:gp0gaHj0W github.com/segmentio/ksuid v1.0.3 h1:FoResxvleQwYiPAVKe1tMUlEirodZqlqglIuFsdDntY= github.com/segmentio/ksuid v1.0.3/go.mod h1:/XUiZBD3kVx5SmUOl55voK5yeAbBNNIed+2O73XgrPE= github.com/sergi/go-diff v1.0.0/go.mod h1:0CfEIISq7TuYL3j771MWULgwwjU+GofnZX9QAmXWZgo= -github.com/sergi/go-diff v1.1.0/go.mod h1:STckp+ISIX8hZLjrqAeVduY0gWCT9IjLuqbuNXdaHfM= github.com/shirou/gopsutil v2.20.5+incompatible/go.mod h1:5b4v6he4MtMOwMlS0TUMTu2PcXUg8+E1lC7eC3UO/RA= github.com/shirou/gopsutil/v3 v3.21.2/go.mod h1:ghfMypLDrFSWN2c9cDYFLHyynQ+QUht0cv/18ZqVczw= github.com/shopspring/decimal v0.0.0-20180709203117-cd690d0c9e24/go.mod h1:M+9NzErvs504Cn4c5DxATwIqPbtswREoFCre64PpcG4= @@ -1335,11 +1301,8 @@ github.com/swaggo/http-swagger v1.1.1/go.mod h1:cKIcshBU9yEAnfWv6ZzVKSsEf8h5ozxB github.com/swaggo/swag v1.7.0 h1:5bCA/MTLQoIqDXXyHfOpMeDvL9j68OY/udlK4pQoo4E= github.com/swaggo/swag v1.7.0/go.mod h1:BdPIL73gvS9NBsdi7M1JOxLvlbfvNRaBP8m6WT6Aajo= github.com/syndtr/goleveldb v1.0.1-0.20200815110645-5c35d600f0ca/go.mod h1:u2MKkTVTVJWe5D1rCvame8WqhBd88EuIwODJZ1VHCPM= -github.com/tebeka/strftime v0.1.5/go.mod h1:29/OidkoWHdEKZqzyDLUyC+LmgDgdHo4WAFCDT7D/Ig= github.com/templexxx/cpufeat v0.0.0-20180724012125-cef66df7f161/go.mod h1:wM7WEvslTq+iOEAMDLSzhVuOt5BRZ05WirO+b09GHQU= github.com/templexxx/xor v0.0.0-20191217153810-f85b25db303b/go.mod h1:5XA7W9S6mni3h5uvOC75dA3m9CCCaS83lltmc0ukdi4= -github.com/teris-io/shortid v0.0.0-20201117134242-e59966efd125 h1:3SNcvBmEPE1YlB1JpVZouslJpI3GBNoiqW7+wb0Rz7w= -github.com/teris-io/shortid v0.0.0-20201117134242-e59966efd125/go.mod h1:M8agBzgqHIhgj7wEn9/0hJUZcrvt9VY+Ln+S1I5Mha0= github.com/tidwall/pretty v1.0.0 h1:HsD+QiTn7sK6flMKIvNmpqz1qrpP3Ps6jOKIKMooyg4= github.com/tidwall/pretty v1.0.0/go.mod h1:XNkn88O1ChpSDQmQeStsy+sBenx6DDtFZJxhVysOjyk= github.com/tj/assert v0.0.0-20171129193455-018094318fb0/go.mod h1:mZ9/Rh9oLWpLLDRpvE+3b7gP/C2YyLFYxNmcLnPTMe0= @@ -1352,8 +1315,6 @@ github.com/tklauser/numcpus v0.2.1/go.mod h1:9aU+wOc6WjUIZEwWMP62PL/41d65P+iks1g github.com/tmc/grpc-websocket-proxy v0.0.0-20170815181823-89b8d40f7ca8/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= github.com/tmc/grpc-websocket-proxy v0.0.0-20190109142713-0ad062ec5ee5/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= github.com/treewei/blackfriday v2.0.0+incompatible/go.mod h1:GoXmmuqRz2P2DqRgI2oWz8L5OHvFEKgNgrSEjViYn8w= -github.com/trusch/grpc-proxy v0.0.0-20190529073533-02b64529f274 h1:ChAMVBRng5Dsv0rnfOxUj7vg2M9D0rafbRY1N2EEAZ8= -github.com/trusch/grpc-proxy v0.0.0-20190529073533-02b64529f274/go.mod h1:dzrPb02OTNDVimdCCBR1WAPu9a69n3VnfDyCX/GT/gE= github.com/tv42/httpunix v0.0.0-20150427012821-b75d8614f926/go.mod h1:9ESjWnEqriFuLhtthL60Sar/7RFoluCcXsuvEwTV5KM= github.com/twmb/murmur3 v1.1.6 h1:mqrRot1BRxm+Yct+vavLMou2/iJt0tNVTTC0QoIjaZg= github.com/twmb/murmur3 v1.1.6/go.mod h1:Qq/R7NUyOfr65zD+6Q5IHKsJLwP7exErjN6lyyq3OSQ= @@ -1465,10 +1426,6 @@ go.uber.org/atomic v1.9.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc= go.uber.org/automaxprocs v1.3.0/go.mod h1:9CWT6lKIep8U41DDaPiH6eFscnTyjfTANNQNx6LrIcA= go.uber.org/automaxprocs v1.4.0 h1:CpDZl6aOlLhReez+8S3eEotD7Jx0Os++lemPlMULQP0= go.uber.org/automaxprocs v1.4.0/go.mod h1:/mTEdr7LvHhs0v7mjdxDreTz1OG5zdZGqgOnhWiR/+Q= -go.uber.org/dig v1.14.0 h1:VmGvIH45/aapXPQkaOrK5u4B5B7jxZB98HM/utx0eME= -go.uber.org/dig v1.14.0/go.mod h1:jHAn/z1Ld1luVVyGKOAIFYz/uBFqKjjEEdIqVAqfQ2o= -go.uber.org/fx v1.17.1 h1:S42dZ6Pok8hQ3jxKwo6ZMYcCgHQA/wAS/gnpRa1Pksg= -go.uber.org/fx v1.17.1/go.mod h1:yO7KN5rhlARljyo4LR047AjaV6J+KFzd/Z7rnTbEn0A= go.uber.org/goleak v1.1.10/go.mod h1:8a7PlsEVH3e/a/GLqe5IIrQx6GzcnRmZEufDUTk4A7A= go.uber.org/goleak v1.1.11 h1:wy28qYRKZgnJTxGxvye5/wgWr1EKjmUDGYox5mGlRlI= go.uber.org/goleak v1.1.11/go.mod h1:cwTWslyiVhfpKIDGSZEM2HlOvcqm+tG4zioyIeLoqMQ= @@ -1779,7 +1736,6 @@ golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c/go.mod h1:oPkhp1MJrh7nUepCBc golang.org/x/sys v0.0.0-20210806184541-e5e7981a1069/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210816183151-1e6c022a8912/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210823070655-63515b42dcdf/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20210903071746-97244b99971b/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210908233432-aa78b53d3365/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210927094055-39ccf1dd6fa6/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20211007075335-d3039528d8ac/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= @@ -2129,7 +2085,6 @@ gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.3/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.5/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= -gopkg.in/yaml.v2 v2.2.7/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.3.0/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY= diff --git a/internal/entry/gateway/_doc.go b/internal/entry/gateway/_doc.go deleted file mode 100644 index 0657ec659..000000000 --- a/internal/entry/gateway/_doc.go +++ /dev/null @@ -1,18 +0,0 @@ -package gateway - -// API 网关的职能 -// 请求接入 -// 业务聚合 -// 统一管理 -// middleware - -// https://blog.csdn.net/rain_web/article/details/102469745 -// https://github.com/go-kratos/gateway -// https://gitee.com/fagongzi/gateway?utm_source=alading&utm_campaign=repo -// https://github.com/resgateio/resgate -// https://github.com/motiv-labs/janus -// https://github.com/eolinker/goku_lite -// https://github.com/megaease/easegress -// https://github.com/luraproject/lura -// https://github.com/TykTechnologies/tyk -// https://github.com/fagongzi/manba \ No newline at end of file diff --git a/internal/entry/restful/doc.go b/internal/entry/restful/doc.go deleted file mode 100644 index 729027104..000000000 --- a/internal/entry/restful/doc.go +++ /dev/null @@ -1,4 +0,0 @@ -package restful - -//https://github.com/emicklei/go-restful -//https://github.com/emicklei/go-restful-openapi \ No newline at end of file diff --git a/internal/entry/rsocket/internal/call_options.go b/internal/entry/rsocket/internal/call_options.go deleted file mode 100644 index 67262bc99..000000000 --- a/internal/entry/rsocket/internal/call_options.go +++ /dev/null @@ -1,104 +0,0 @@ -package internal - -import ( - "context" - "fmt" - - "google.golang.org/grpc" - "google.golang.org/grpc/credentials" - "google.golang.org/grpc/metadata" - "google.golang.org/grpc/peer" -) - -// CallOptions represents the state of in-effect grpc.CallOptions. -type CallOptions struct { - // Headers is a slice of metadata pointers which should all be set when - // response header metadata is received. - Headers []*metadata.MD - // Trailers is a slice of metadata pointers which should all be set when - // response trailer metadata is received. - Trailers []*metadata.MD - // Peer is a slice of peer pointers which should all be set when the - // remote peer is known. - Peer []*peer.Peer - // Creds are per-RPC credentials to use for a call. - Creds credentials.PerRPCCredentials - // MaxRecv is the maximum number of bytes to receive for a single message - // in a call. - MaxRecv int - // MaxSend is the maximum number of bytes to send for a single message in - // a call. - MaxSend int -} - -// SetHeaders sets all accumulated header addresses to the given metadata. This -// satisfies grpc.Header call options. -func (co *CallOptions) SetHeaders(md metadata.MD) { - for _, hdr := range co.Headers { - *hdr = md - } -} - -// SetTrailers sets all accumulated trailer addresses to the given metadata. -// This satisfies grpc.Trailer call options. -func (co *CallOptions) SetTrailers(md metadata.MD) { - for _, tlr := range co.Trailers { - *tlr = md - } -} - -// SetPeer sets all accumulated peer addresses to the given peer. This satisfies -// grpc.Peer call options. -func (co *CallOptions) SetPeer(p *peer.Peer) { - for _, pr := range co.Peer { - *pr = *p - } -} - -// GetCallOptions converts the given slice of grpc.CallOptions into a -// CallOptions struct. -func GetCallOptions(opts []grpc.CallOption) *CallOptions { - var copts CallOptions - for _, o := range opts { - switch o := o.(type) { - case grpc.HeaderCallOption: - copts.Headers = append(copts.Headers, o.HeaderAddr) - case grpc.TrailerCallOption: - copts.Trailers = append(copts.Trailers, o.TrailerAddr) - case grpc.PeerCallOption: - copts.Peer = append(copts.Peer, o.PeerAddr) - case grpc.PerRPCCredsCallOption: - copts.Creds = o.Creds - case grpc.MaxRecvMsgSizeCallOption: - copts.MaxRecv = o.MaxRecvMsgSize - case grpc.MaxSendMsgSizeCallOption: - copts.MaxSend = o.MaxSendMsgSize - } - } - return &copts -} - -// ApplyPerRPCCreds applies any per-RPC credentials in the given call options and -// returns a new context with the additional metadata. It will return an error if -// isChannelSecure is false but the per-RPC credentials require a secure channel. -func ApplyPerRPCCreds(ctx context.Context, copts *CallOptions, uri string, isChannelSecure bool) (context.Context, error) { - if copts.Creds != nil { - if copts.Creds.RequireTransportSecurity() && !isChannelSecure { - return nil, fmt.Errorf("transport security is required") - } - md, err := copts.Creds.GetRequestMetadata(ctx, uri) - if err != nil { - return nil, err - } - if len(md) > 0 { - reqHeaders, ok := metadata.FromOutgoingContext(ctx) - if ok { - reqHeaders = metadata.Join(reqHeaders, metadata.New(md)) - } else { - reqHeaders = metadata.New(md) - } - ctx = metadata.NewOutgoingContext(ctx, reqHeaders) - } - } - return ctx, nil -} diff --git a/internal/entry/rsocket/internal/misc.go b/internal/entry/rsocket/internal/misc.go deleted file mode 100644 index c49f4fefe..000000000 --- a/internal/entry/rsocket/internal/misc.go +++ /dev/null @@ -1,93 +0,0 @@ -package internal - -import ( - "context" - "fmt" - "reflect" - - //lint:ignore SA1019 we use the old v1 package because - // we need to support older generated messages - "github.com/golang/protobuf/proto" - "github.com/jhump/protoreflect/dynamic" - "google.golang.org/grpc" - "google.golang.org/grpc/codes" - "google.golang.org/grpc/status" -) - -// CopyMessage copies data from the given in value to the given out value. It returns an -// error if the two values do not have the same type or if the given out value is not -// settable. -func CopyMessage(out, in interface{}) error { - pmIn, ok := in.(proto.Message) - if !ok { - return fmt.Errorf("value to copy is not a proto.Message: %T; use a custom cloner", in) - } - pmOut, ok := out.(proto.Message) - if !ok { - return fmt.Errorf("destination for copy is not a proto.Message: %T; use a custom cloner", in) - } - - pmOut.Reset() - // This will check that types are compatible and return an error if not. - // Unlike proto.Merge, this allows one or the other to be a dynamic message. - return dynamic.TryMerge(pmOut, pmIn) -} - -// CloneMessage returns a copy of the given value. -func CloneMessage(m interface{}) (interface{}, error) { - pm, ok := m.(proto.Message) - if !ok { - return nil, fmt.Errorf("value to clone is not a proto.Message: %T; use a custom cloner", m) - } - - // this does a proper deep copy - return proto.Clone(pm), nil -} - -// ClearMessage resets the given value to its zero-value state. It returns an error -// if the given out value is not settable. -func ClearMessage(m interface{}) error { - dest := reflect.Indirect(reflect.ValueOf(m)) - if !dest.CanSet() { - return fmt.Errorf("unable to set destination: %v", reflect.ValueOf(m).Type()) - } - dest.Set(reflect.Zero(dest.Type())) - return nil -} - -// TranslateContextError converts the given error to a gRPC status error if it -// is a context error. If it is context.DeadlineExceeded, it is converted to an -// error with a status code of DeadlineExceeded. If it is context.Canceled, it -// is converted to an error with a status code of Canceled. If it is not a -// context error, it is returned without any conversion. -func TranslateContextError(err error) error { - switch err { - case context.DeadlineExceeded: - return status.Errorf(codes.DeadlineExceeded, err.Error()) - case context.Canceled: - return status.Errorf(codes.Canceled, err.Error()) - } - return err -} - -// FindUnaryMethod returns the method descriptor for the named method. If the -// method is not found in the given slice of descriptors, nil is returned. -func FindUnaryMethod(methodName string, methods []grpc.MethodDesc) *grpc.MethodDesc { - for i := range methods { - if methods[i].MethodName == methodName { - return &methods[i] - } - } - return nil -} - -// FindStreamingMethod returns the stream descriptor for the named method. If -// the method is not found in the given slice of descriptors, nil is returned. -func FindStreamingMethod(methodName string, methods []grpc.StreamDesc) *grpc.StreamDesc { - for i := range methods { - if methods[i].StreamName == methodName { - return &methods[i] - } - } - return nil -} diff --git a/internal/entry/rsocket/internal/transport_stream.go b/internal/entry/rsocket/internal/transport_stream.go deleted file mode 100644 index 443035365..000000000 --- a/internal/entry/rsocket/internal/transport_stream.go +++ /dev/null @@ -1,151 +0,0 @@ -package internal - -import ( - "fmt" - "sync" - - "google.golang.org/grpc" - "google.golang.org/grpc/metadata" -) - -// UnaryServerTransportStream implements grpc.ServerTransportStream and can be -// used by unary calls to collect headers and trailers from a handler. -type UnaryServerTransportStream struct { - // Name is the full method name in "/service/method" format. - Name string - - mu sync.Mutex - hdrs metadata.MD - hdrsSent bool - tlrs metadata.MD - tlrsSent bool -} - -// Method satisfies the grpc.ServerTransportStream, returning the full path of -// the method invocation that the stream represents. -func (sts *UnaryServerTransportStream) Method() string { - return sts.Name -} - -// Finish marks headers and trailers as sent, so that subsequent calls to -// SetHeader, SendHeader, or SetTrailer will fail. -func (sts *UnaryServerTransportStream) Finish() { - sts.mu.Lock() - defer sts.mu.Unlock() - sts.hdrsSent = true - sts.tlrsSent = true -} - -// SetHeader satisfies the grpc.ServerTransportStream, adding the given metadata -// to the set of response headers that will be sent to the client. -func (sts *UnaryServerTransportStream) SetHeader(md metadata.MD) error { - sts.mu.Lock() - defer sts.mu.Unlock() - return sts.setHeaderLocked(md) -} - -// SendHeader satisfies the grpc.ServerTransportStream, adding the given -// metadata to the set of response headers. This implementation does not -// actually send the headers but rather marks the headers as sent so that future -// calls to SetHeader or SendHeader will return an error. -func (sts *UnaryServerTransportStream) SendHeader(md metadata.MD) error { - sts.mu.Lock() - defer sts.mu.Unlock() - if err := sts.setHeaderLocked(md); err != nil { - return err - } - sts.hdrsSent = true - return nil -} - -func (sts *UnaryServerTransportStream) setHeaderLocked(md metadata.MD) error { - if sts.hdrsSent { - return fmt.Errorf("headers already sent") - } - if sts.hdrs == nil { - sts.hdrs = metadata.MD{} - } - for k, v := range md { - sts.hdrs[k] = append(sts.hdrs[k], v...) - } - return nil -} - -// GetHeaders returns the cumulative set of headers set by calls to SetHeader -// and SendHeader. This is used by a server to gather the headers that must -// actually be sent to a client. -func (sts *UnaryServerTransportStream) GetHeaders() metadata.MD { - sts.mu.Lock() - defer sts.mu.Unlock() - return sts.hdrs -} - -// SetTrailer satisfies the grpc.ServerTransportStream, adding the given -// metadata to the set of response trailers that will be sent to the client. -func (sts *UnaryServerTransportStream) SetTrailer(md metadata.MD) error { - sts.mu.Lock() - defer sts.mu.Unlock() - if sts.tlrsSent { - return fmt.Errorf("trailers already sent") - } - if sts.tlrs == nil { - sts.tlrs = metadata.MD{} - } - for k, v := range md { - sts.tlrs[k] = append(sts.tlrs[k], v...) - } - return nil -} - -// GetTrailers returns the cumulative set of trailers set by calls to -// SetTrailer. This is used by a server to gather the headers that must actually -// be sent to a client. -func (sts *UnaryServerTransportStream) GetTrailers() metadata.MD { - sts.mu.Lock() - defer sts.mu.Unlock() - return sts.tlrs -} - -// ServerTransportStream implements grpc.ServerTransportStream and wraps a -// grpc.ServerStream, delegating most calls to it. -type ServerTransportStream struct { - // Name is the full method name in "/service/method" format. - Name string - // Stream is the underlying stream to which header and trailer calls are - // delegated. - Stream grpc.ServerStream -} - -// Method satisfies the grpc.ServerTransportStream, returning the full path of -// the method invocation that the stream represents. -func (sts *ServerTransportStream) Method() string { - return sts.Name -} - -// SetHeader satisfies the grpc.ServerTransportStream and delegates to the -// underlying grpc.ServerStream. -func (sts *ServerTransportStream) SetHeader(md metadata.MD) error { - return sts.Stream.SetHeader(md) -} - -// SendHeader satisfies the grpc.ServerTransportStream and delegates to the -// underlying grpc.ServerStream. -func (sts *ServerTransportStream) SendHeader(md metadata.MD) error { - return sts.Stream.SendHeader(md) -} - -// SetTrailer satisfies the grpc.ServerTransportStream and delegates to the -// underlying grpc.ServerStream. If the underlying stream provides a -// TrySetTrailer(metadata.MD) error method, it will be used to set trailers. -// Otherwise, the normal SetTrailer(metadata.MD) method will be used and a nil -// error will always be returned. -func (sts *ServerTransportStream) SetTrailer(md metadata.MD) error { - type trailerWithErrors interface { - TrySetTrailer(md metadata.MD) error - } - if t, ok := sts.Stream.(trailerWithErrors); ok { - return t.TrySetTrailer(md) - } - sts.Stream.SetTrailer(md) - return nil -} diff --git a/internal/entry/rsocket/sockets/abc.go b/internal/entry/rsocket/sockets/abc.go deleted file mode 100644 index ba1201bc0..000000000 --- a/internal/entry/rsocket/sockets/abc.go +++ /dev/null @@ -1,10 +0,0 @@ -package sockets - -import ( - "context" - - "google.golang.org/grpc" -) - -type StreamHandler = grpc.StreamHandler -type UnaryHandler = func(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) diff --git a/internal/entry/rsocket/sockets/client.go b/internal/entry/rsocket/sockets/client.go deleted file mode 100644 index 3d1311a23..000000000 --- a/internal/entry/rsocket/sockets/client.go +++ /dev/null @@ -1,282 +0,0 @@ -package sockets - -import ( - "context" - "fmt" - "sync" - - "github.com/golang/protobuf/proto" - "github.com/pubgo/xerror" - "github.com/rsocket/rsocket-go" - "github.com/rsocket/rsocket-go/payload" - "github.com/rsocket/rsocket-go/rx" - "github.com/rsocket/rsocket-go/rx/flux" - "google.golang.org/grpc" - "google.golang.org/grpc/encoding" - "google.golang.org/grpc/metadata" - "google.golang.org/protobuf/types/known/emptypb" - - "github.com/pubgo/lava/errors" - "github.com/pubgo/lava/logging" - "github.com/pubgo/lava/logging/logutil" -) - -var _ grpc.ClientConnInterface = (*Client)(nil) - -type Client struct { - // contentType 默认内容类型, 由应用设置 - contentType string - socket rsocket.RSocket - - // ctxHandlers 从context中获取值 - ctxHandlers []func(ctx context.Context) -} - -// Invoke 请求响应模型实现 -func (t *Client) Invoke(ctx context.Context, method string, args interface{}, reply interface{}, opts ...grpc.CallOption) error { - // 从ctx获取metadata - // 从opts获取编码等 - // FireAndForget - // RequestResponse - - // 根据获取的metadata做log和metric - // data.Metadata() - - // 从 opts 获取codec - // 对结果进行解码 - // 超时 - - //"missing metadata" - // TODO 获取ContentType - // ctxHandlers - - var optCall = GetCallOptions(opts...) - - contentType := t.contentType - if optCall.ContentSubtype != "" { - contentType = optCall.ContentSubtype - } - - var cdc = encoding.GetCodec(contentType) - if optCall.Codec != nil { - cdc = optCall.Codec - } - - // 方法名字 内容类型 版本 链路 请求id 链路 请求方 - var req = &Request{ - Method: method, - ContentType: contentType, - } - - reqMd, err := proto.Marshal(req) - if err != nil { - return xerror.Wrap(err) - } - - data, err := cdc.Marshal(args) - if err != nil { - return xerror.Wrap(err) - } - - ctx, cancel := context.WithCancel(ctx) - defer cancel() - - switch reply.(type) { - // TODO reply 为*emptypb.Empty的情况 - case *emptypb.Empty: - t.socket.FireAndForget(payload.New(data, reqMd)) - return nil - default: - var resp = t.socket.RequestResponse(payload.New(data, reqMd)) - pp, release, err := resp.BlockUnsafe(ctx) - if err != nil { - return xerror.Wrap(err) - } - - defer release() - - var md, ok = pp.Metadata() - if ok && md != nil { - var respMd Response - if err := proto.Unmarshal(md, &respMd); err != nil { - return err - } - - // code不是0, 服务端数据处理有问题 - if respMd.Code != 0 { - return fmt.Errorf("server response") - } - - // TODO 处理 metadata - //if respMd.Metadata.Header != nil { - // for k, v := range req.Metadata.Header { - // s.headers.Set(k, v) - // } - //} - } - - return cdc.Unmarshal(pp.Data(), reply) - } -} - -// NewStream 单项流和双向流实现 -func (t *Client) NewStream(ctx context.Context, desc *grpc.StreamDesc, method string, opts ...grpc.CallOption) (grpc.ClientStream, error) { - // RequestStream - // RequestChannel - // 获取元数据 - - var optCall = GetCallOptions(opts...) - - contentType := t.contentType - if optCall.ContentSubtype != "" { - contentType = optCall.ContentSubtype - } - - var cdc = encoding.GetCodec(contentType) - if optCall.Codec != nil { - cdc = optCall.Codec - } - - // 方法名字 内容类型 版本 链路 请求id 链路 请求方 - var req = &Request{ - Method: method, - ContentType: contentType, - } - - reqMd, err := proto.Marshal(req) - if err != nil { - return nil, xerror.Wrap(err) - } - - ctx, cancel := context.WithCancel(ctx) - - var in = make(chan *ErrPayload) - var out = make(chan *ErrPayload) - - go func() { - t.socket. - RequestChannel(flux.Create(func(ctx context.Context, s flux.Sink) { - // 客户端输入数据 - for { - select { - case pp := <-in: - s.Next(pp.Payload) - pp.Err <- nil - case <-ctx.Done(): - s.Complete() - return - } - } - })). - DoOnNext(func(input payload.Payload) error { - // 客户端接收数据 - var p = NewErrPayload(input) - out <- p - return <-p.Err - }). - DoOnError(func(err error) { - cancel() - logging.L().Error("err", logutil.ErrField(err)...) - }). - DoOnComplete(func() { cancel() }). - DoFinally(func(s rx.SignalType) { cancel() }).Subscribe(ctx) - }() - - return &clientStream{md: reqMd, cdc: cdc, in: in, out: out, ctx: ctx}, nil -} - -type clientStream struct { - reqMdOnce sync.Once - md []byte - cdc encoding.Codec - out chan *ErrPayload - in chan *ErrPayload - ctx context.Context - responseStream bool - headers metadata.MD - trailers metadata.MD - socket rsocket.RSocket - sendClosed bool -} - -func (s *clientStream) Header() (metadata.MD, error) { - return s.headers, nil -} - -func (s *clientStream) Trailer() metadata.MD { - return s.trailers -} - -func (s *clientStream) CloseSend() error { - s.sendClosed = true - return nil -} - -func (s *clientStream) Context() context.Context { return s.ctx } - -// SendMsg 客户端发送数据到服务端 -func (s *clientStream) SendMsg(m interface{}) error { - if s.sendClosed { - return ErrSendClosed - } - - if m == nil { - return errors.InvalidArgument(errors.New("clientStream.SendMsg", "message to send is nil")) - } - - var data, err = s.cdc.Marshal(m) - if err != nil { - return xerror.Wrap(err, "clientStream.SendMsg Marshal error") - } - - var md []byte - // 客户端发送metadata, 只在第一次的时候发送 - // 服务端第一次接收数据解析metadata, 获取method等相关信息 - s.reqMdOnce.Do(func() { md = s.md }) - - var p = NewErrPayload(payload.New(data, md)) - select { - case s.in <- p: - return <-p.Err - case <-s.ctx.Done(): - return s.ctx.Err() - } -} - -// RecvMsg 客户端从服务端接收数据 -func (s *clientStream) RecvMsg(m interface{}) error { - select { - case resp := <-s.out: - var md, ok = resp.Metadata() - if ok && md != nil { - var req Response - if err := proto.Unmarshal(md, &req); err != nil { - resp.Err <- err - return err - } - - // code不是0, 服务端数据处理有问题 - if req.Code != 0 { - return errors.Internal(errors.New("server.response.code", "code=%d msg=%s", req.Code, req.Msg)) - } - - // 处理 metadata - //if req.Metadata.Header != nil { - // for k, v := range req.Metadata.Header { - // s.headers.Set(k, v) - // } - //} - } - - var err = s.cdc.Unmarshal(resp.Data(), m) - - // TODO 错误信息做处理 - // 把错误信息告诉服务方 - resp.Err <- err - - // 错误信息返回给业务处理者 - return err - case <-s.ctx.Done(): - return s.ctx.Err() - } -} diff --git a/internal/entry/rsocket/sockets/errs.go b/internal/entry/rsocket/sockets/errs.go deleted file mode 100644 index 6f7bd57c2..000000000 --- a/internal/entry/rsocket/sockets/errs.go +++ /dev/null @@ -1,5 +0,0 @@ -package sockets - -import "fmt" - -var ErrSendClosed = fmt.Errorf("send closed") diff --git a/internal/entry/rsocket/sockets/logger.go b/internal/entry/rsocket/sockets/logger.go deleted file mode 100644 index 19e61b764..000000000 --- a/internal/entry/rsocket/sockets/logger.go +++ /dev/null @@ -1,11 +0,0 @@ -package sockets - -import ( - "github.com/pubgo/lava/logging" - "github.com/rsocket/rsocket-go/logger" -) - -func init() { - logger.SetLevel(logger.LevelDebug) - logger.SetLogger(logging.S()) -} diff --git a/internal/entry/rsocket/sockets/metadata.pb.go b/internal/entry/rsocket/sockets/metadata.pb.go deleted file mode 100644 index eef214f36..000000000 --- a/internal/entry/rsocket/sockets/metadata.pb.go +++ /dev/null @@ -1,408 +0,0 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.27.1 -// protoc v3.19.4 -// source: entry/rsocketEntry/sockets/metadata.proto - -package sockets - -import ( - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - reflect "reflect" - sync "sync" -) - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -type Request struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Method string `protobuf:"bytes,1,opt,name=method,proto3" json:"method,omitempty"` - ContentType string `protobuf:"bytes,2,opt,name=contentType,proto3" json:"contentType,omitempty"` - RequestId string `protobuf:"bytes,3,opt,name=requestId,proto3" json:"requestId,omitempty"` - Headers map[string]string `protobuf:"bytes,4,rep,name=headers,proto3" json:"headers,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` -} - -func (x *Request) Reset() { - *x = Request{} - if protoimpl.UnsafeEnabled { - mi := &file_entry_rsocketEntry_sockets_metadata_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Request) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Request) ProtoMessage() {} - -func (x *Request) ProtoReflect() protoreflect.Message { - mi := &file_entry_rsocketEntry_sockets_metadata_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use Request.ProtoReflect.Descriptor instead. -func (*Request) Descriptor() ([]byte, []int) { - return file_entry_rsocketEntry_sockets_metadata_proto_rawDescGZIP(), []int{0} -} - -func (x *Request) GetMethod() string { - if x != nil { - return x.Method - } - return "" -} - -func (x *Request) GetContentType() string { - if x != nil { - return x.ContentType - } - return "" -} - -func (x *Request) GetRequestId() string { - if x != nil { - return x.RequestId - } - return "" -} - -func (x *Request) GetHeaders() map[string]string { - if x != nil { - return x.Headers - } - return nil -} - -type Response struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Code int32 `protobuf:"varint,1,opt,name=code,proto3" json:"code,omitempty"` - Msg string `protobuf:"bytes,2,opt,name=msg,proto3" json:"msg,omitempty"` - // 持续时间(ms) - Duration int32 `protobuf:"varint,3,opt,name=duration,proto3" json:"duration,omitempty"` - Headers map[string]string `protobuf:"bytes,4,rep,name=headers,proto3" json:"headers,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` -} - -func (x *Response) Reset() { - *x = Response{} - if protoimpl.UnsafeEnabled { - mi := &file_entry_rsocketEntry_sockets_metadata_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Response) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Response) ProtoMessage() {} - -func (x *Response) ProtoReflect() protoreflect.Message { - mi := &file_entry_rsocketEntry_sockets_metadata_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use Response.ProtoReflect.Descriptor instead. -func (*Response) Descriptor() ([]byte, []int) { - return file_entry_rsocketEntry_sockets_metadata_proto_rawDescGZIP(), []int{1} -} - -func (x *Response) GetCode() int32 { - if x != nil { - return x.Code - } - return 0 -} - -func (x *Response) GetMsg() string { - if x != nil { - return x.Msg - } - return "" -} - -func (x *Response) GetDuration() int32 { - if x != nil { - return x.Duration - } - return 0 -} - -func (x *Response) GetHeaders() map[string]string { - if x != nil { - return x.Headers - } - return nil -} - -type Metadata struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Version string `protobuf:"bytes,1,opt,name=version,proto3" json:"version,omitempty"` - Service string `protobuf:"bytes,2,opt,name=service,proto3" json:"service,omitempty"` - Method string `protobuf:"bytes,3,opt,name=method,proto3" json:"method,omitempty"` - Trace string `protobuf:"bytes,4,opt,name=trace,proto3" json:"trace,omitempty"` - Address string `protobuf:"bytes,5,opt,name=address,proto3" json:"address,omitempty"` - RequestId string `protobuf:"bytes,6,opt,name=requestId,proto3" json:"requestId,omitempty"` - Header map[string]string `protobuf:"bytes,7,rep,name=header,proto3" json:"header,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` -} - -func (x *Metadata) Reset() { - *x = Metadata{} - if protoimpl.UnsafeEnabled { - mi := &file_entry_rsocketEntry_sockets_metadata_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Metadata) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Metadata) ProtoMessage() {} - -func (x *Metadata) ProtoReflect() protoreflect.Message { - mi := &file_entry_rsocketEntry_sockets_metadata_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use Metadata.ProtoReflect.Descriptor instead. -func (*Metadata) Descriptor() ([]byte, []int) { - return file_entry_rsocketEntry_sockets_metadata_proto_rawDescGZIP(), []int{2} -} - -func (x *Metadata) GetVersion() string { - if x != nil { - return x.Version - } - return "" -} - -func (x *Metadata) GetService() string { - if x != nil { - return x.Service - } - return "" -} - -func (x *Metadata) GetMethod() string { - if x != nil { - return x.Method - } - return "" -} - -func (x *Metadata) GetTrace() string { - if x != nil { - return x.Trace - } - return "" -} - -func (x *Metadata) GetAddress() string { - if x != nil { - return x.Address - } - return "" -} - -func (x *Metadata) GetRequestId() string { - if x != nil { - return x.RequestId - } - return "" -} - -func (x *Metadata) GetHeader() map[string]string { - if x != nil { - return x.Header - } - return nil -} - -var File_entry_rsocketEntry_sockets_metadata_proto protoreflect.FileDescriptor - -var file_entry_rsocketEntry_sockets_metadata_proto_rawDesc = []byte{ - 0x0a, 0x29, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x2f, 0x72, 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x45, - 0x6e, 0x74, 0x72, 0x79, 0x2f, 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x73, 0x2f, 0x6d, 0x65, 0x74, - 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x09, 0x74, 0x72, 0x61, - 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x22, 0xd8, 0x01, 0x0a, 0x07, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x6d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x06, 0x6d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x12, 0x20, 0x0a, 0x0b, 0x63, 0x6f, - 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x54, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x0b, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x54, 0x79, 0x70, 0x65, 0x12, 0x1c, 0x0a, 0x09, - 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x49, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x09, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x49, 0x64, 0x12, 0x39, 0x0a, 0x07, 0x68, 0x65, - 0x61, 0x64, 0x65, 0x72, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x74, 0x72, - 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x2e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x2e, - 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x07, 0x68, 0x65, - 0x61, 0x64, 0x65, 0x72, 0x73, 0x1a, 0x3a, 0x0a, 0x0c, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, - 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, - 0x01, 0x22, 0xc4, 0x01, 0x0a, 0x08, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x12, - 0x0a, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x04, 0x63, 0x6f, - 0x64, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x6d, 0x73, 0x67, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x03, 0x6d, 0x73, 0x67, 0x12, 0x1a, 0x0a, 0x08, 0x64, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x64, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x12, 0x3a, 0x0a, 0x07, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, - 0x0b, 0x32, 0x20, 0x2e, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x2e, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x45, 0x6e, - 0x74, 0x72, 0x79, 0x52, 0x07, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x1a, 0x3a, 0x0a, 0x0c, - 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, - 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, - 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, - 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0x98, 0x02, 0x0a, 0x08, 0x4d, 0x65, 0x74, - 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x18, 0x0a, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, - 0x18, 0x0a, 0x07, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x07, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x6d, 0x65, 0x74, - 0x68, 0x6f, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x6d, 0x65, 0x74, 0x68, 0x6f, - 0x64, 0x12, 0x14, 0x0a, 0x05, 0x74, 0x72, 0x61, 0x63, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x05, 0x74, 0x72, 0x61, 0x63, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, - 0x73, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, - 0x73, 0x12, 0x1c, 0x0a, 0x09, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x49, 0x64, 0x18, 0x06, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x49, 0x64, 0x12, - 0x37, 0x0a, 0x06, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x18, 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, - 0x1f, 0x2e, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x2e, 0x4d, 0x65, 0x74, 0x61, - 0x64, 0x61, 0x74, 0x61, 0x2e, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x45, 0x6e, 0x74, 0x72, 0x79, - 0x52, 0x06, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x1a, 0x39, 0x0a, 0x0b, 0x48, 0x65, 0x61, 0x64, - 0x65, 0x72, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, - 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, - 0x02, 0x38, 0x01, 0x42, 0x0c, 0x5a, 0x0a, 0x2e, 0x2f, 0x3b, 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, - 0x73, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} - -var ( - file_entry_rsocketEntry_sockets_metadata_proto_rawDescOnce sync.Once - file_entry_rsocketEntry_sockets_metadata_proto_rawDescData = file_entry_rsocketEntry_sockets_metadata_proto_rawDesc -) - -func file_entry_rsocketEntry_sockets_metadata_proto_rawDescGZIP() []byte { - file_entry_rsocketEntry_sockets_metadata_proto_rawDescOnce.Do(func() { - file_entry_rsocketEntry_sockets_metadata_proto_rawDescData = protoimpl.X.CompressGZIP(file_entry_rsocketEntry_sockets_metadata_proto_rawDescData) - }) - return file_entry_rsocketEntry_sockets_metadata_proto_rawDescData -} - -var file_entry_rsocketEntry_sockets_metadata_proto_msgTypes = make([]protoimpl.MessageInfo, 6) -var file_entry_rsocketEntry_sockets_metadata_proto_goTypes = []interface{}{ - (*Request)(nil), // 0: transport.Request - (*Response)(nil), // 1: transport.Response - (*Metadata)(nil), // 2: transport.Metadata - nil, // 3: transport.Request.HeadersEntry - nil, // 4: transport.Response.HeadersEntry - nil, // 5: transport.Metadata.HeaderEntry -} -var file_entry_rsocketEntry_sockets_metadata_proto_depIdxs = []int32{ - 3, // 0: transport.Request.headers:type_name -> transport.Request.HeadersEntry - 4, // 1: transport.Response.headers:type_name -> transport.Response.HeadersEntry - 5, // 2: transport.Metadata.header:type_name -> transport.Metadata.HeaderEntry - 3, // [3:3] is the sub-list for method output_type - 3, // [3:3] is the sub-list for method input_type - 3, // [3:3] is the sub-list for extension type_name - 3, // [3:3] is the sub-list for extension extendee - 0, // [0:3] is the sub-list for field type_name -} - -func init() { file_entry_rsocketEntry_sockets_metadata_proto_init() } -func file_entry_rsocketEntry_sockets_metadata_proto_init() { - if File_entry_rsocketEntry_sockets_metadata_proto != nil { - return - } - if !protoimpl.UnsafeEnabled { - file_entry_rsocketEntry_sockets_metadata_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Request); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_entry_rsocketEntry_sockets_metadata_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Response); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_entry_rsocketEntry_sockets_metadata_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Metadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_entry_rsocketEntry_sockets_metadata_proto_rawDesc, - NumEnums: 0, - NumMessages: 6, - NumExtensions: 0, - NumServices: 0, - }, - GoTypes: file_entry_rsocketEntry_sockets_metadata_proto_goTypes, - DependencyIndexes: file_entry_rsocketEntry_sockets_metadata_proto_depIdxs, - MessageInfos: file_entry_rsocketEntry_sockets_metadata_proto_msgTypes, - }.Build() - File_entry_rsocketEntry_sockets_metadata_proto = out.File - file_entry_rsocketEntry_sockets_metadata_proto_rawDesc = nil - file_entry_rsocketEntry_sockets_metadata_proto_goTypes = nil - file_entry_rsocketEntry_sockets_metadata_proto_depIdxs = nil -} diff --git a/internal/entry/rsocket/sockets/metadata.proto b/internal/entry/rsocket/sockets/metadata.proto deleted file mode 100644 index 911225f50..000000000 --- a/internal/entry/rsocket/sockets/metadata.proto +++ /dev/null @@ -1,33 +0,0 @@ -syntax = "proto3"; - -package transport; - -option go_package = "./;sockets"; - -message Request { - string method = 1; - string contentType = 2; - string requestId = 3; - map headers = 4; -} - -message Response { - int32 code = 1; - string msg = 2; - // 持续时间(ms) - int32 duration = 3; - map headers = 4; -} - -message Metadata { - string version = 1; - string service = 2; - string method = 3; - string trace = 4; - string address = 5; - string requestId = 6; - map header = 7; -} - -// TODO 客户端信息 -// TODO 服务端信息 \ No newline at end of file diff --git a/internal/entry/rsocket/sockets/options.go b/internal/entry/rsocket/sockets/options.go deleted file mode 100644 index fdd315add..000000000 --- a/internal/entry/rsocket/sockets/options.go +++ /dev/null @@ -1,100 +0,0 @@ -package sockets - -import ( - "google.golang.org/grpc" - "google.golang.org/grpc/credentials" - "google.golang.org/grpc/encoding" - "google.golang.org/grpc/metadata" - "google.golang.org/grpc/peer" -) - -type CallOption interface { - grpc.CallOption - Lava() -} - -var _ CallOption = (*CallOptions)(nil) - -// CallOptions represents the state of in-effect grpc.CallOptions. -type CallOptions struct { - grpc.EmptyCallOption - // Headers is a slice of metadata pointers which should all be set when - // response header metadata is received. - Headers []*metadata.MD - // Trailers is a slice of metadata pointers which should all be set when - // response trailer metadata is received. - Trailers []*metadata.MD - // Peer is a slice of peer pointers which should all be set when the - // remote peer is known. - Peer []*peer.Peer - // Creds are per-RPC credentials to use for a call. - Creds credentials.PerRPCCredentials - // MaxRecv is the maximum number of bytes to receive for a single message - // in a call. - MaxRecv int - // MaxSend is the maximum number of bytes to send for a single message in - // a call. - MaxSend int - - ContentSubtype string - - CompressorType string - - Codec encoding.Codec -} - -func (co *CallOptions) Lava() {} - -// SetHeaders sets all accumulated header addresses to the given metadata. This -// satisfies grpc.Header call options. -func (co *CallOptions) SetHeaders(md metadata.MD) { - for _, hdr := range co.Headers { - *hdr = md - } -} - -// SetTrailers sets all accumulated trailer addresses to the given metadata. -// This satisfies grpc.Trailer call options. -func (co *CallOptions) SetTrailers(md metadata.MD) { - for _, tlr := range co.Trailers { - *tlr = md - } -} - -// SetPeer sets all accumulated peer addresses to the given peer. This satisfies -// grpc.Peer call options. -func (co *CallOptions) SetPeer(p *peer.Peer) { - for _, pr := range co.Peer { - *pr = *p - } -} - -// GetCallOptions converts the given slice of grpc.CallOptions into a -// CallOptions struct. -func GetCallOptions(opts ...grpc.CallOption) *CallOptions { - var copts CallOptions - for _, o := range opts { - switch o := o.(type) { - case grpc.HeaderCallOption: - copts.Headers = append(copts.Headers, o.HeaderAddr) - case grpc.TrailerCallOption: - copts.Trailers = append(copts.Trailers, o.TrailerAddr) - case grpc.PeerCallOption: - copts.Peer = append(copts.Peer, o.PeerAddr) - case grpc.PerRPCCredsCallOption: - copts.Creds = o.Creds - case grpc.MaxRecvMsgSizeCallOption: - copts.MaxRecv = o.MaxRecvMsgSize - case grpc.MaxSendMsgSizeCallOption: - copts.MaxSend = o.MaxSendMsgSize - case grpc.CompressorCallOption: - case grpc.ContentSubtypeCallOption: - case grpc.CustomCodecCallOption: - case grpc.ForceCodecCallOption: - // TODO 完善 - case CallOption: - - } - } - return &copts -} diff --git a/internal/entry/rsocket/sockets/payload.go b/internal/entry/rsocket/sockets/payload.go deleted file mode 100644 index 7f8712a25..000000000 --- a/internal/entry/rsocket/sockets/payload.go +++ /dev/null @@ -1,12 +0,0 @@ -package sockets - -import "github.com/rsocket/rsocket-go/payload" - -type ErrPayload struct { - payload.Payload - Err chan error -} - -func NewErrPayload(data payload.Payload) *ErrPayload { - return &ErrPayload{Payload: data, Err: make(chan error)} -} diff --git a/internal/entry/rsocket/sockets/server.go b/internal/entry/rsocket/sockets/server.go deleted file mode 100644 index cc37bf553..000000000 --- a/internal/entry/rsocket/sockets/server.go +++ /dev/null @@ -1,386 +0,0 @@ -package sockets - -import ( - "context" - "fmt" - "reflect" - "strings" - - "github.com/golang/protobuf/proto" - "github.com/pubgo/xerror" - "github.com/rsocket/rsocket-go" - "github.com/rsocket/rsocket-go/payload" - "github.com/rsocket/rsocket-go/rx/flux" - "github.com/rsocket/rsocket-go/rx/mono" - "google.golang.org/grpc" - "google.golang.org/grpc/encoding" - "google.golang.org/grpc/metadata" - - "github.com/pubgo/lava/logging" - "github.com/pubgo/lava/logging/logutil" -) - -var _ rsocket.RSocket = (*handlerMap)(nil) - -type Server struct { - srv interface{} - handler UnaryHandler - stream StreamHandler - ServerStreams bool - ClientStreams bool -} - -type handlerMap struct { - // contentType 默认内容类型, 由应用设置 - contentType string - ctx context.Context - interceptor grpc.UnaryServerInterceptor - handlers map[string]*Server -} - -// RegisterService 注册服务描述和handler实现 -func (t *handlerMap) RegisterService(desc *grpc.ServiceDesc, srv interface{}) { - // 类型检查, 检查srv是否实现desc.HandlerType接口 - if srv != nil { - ht := reflect.TypeOf(desc.HandlerType).Elem() - st := reflect.TypeOf(srv) - if !st.Implements(ht) { - logging.S().Fatalf("rsocket: Server.RegisterService found the handler of type %v that does not satisfy %v", st, ht) - } - } - - if t.handlers == nil { - t.handlers = make(map[string]*Server) - } - - for i := range desc.Methods { - var h = desc.Methods[i] - t.handlers[desc.ServiceName+"."+h.MethodName] = &Server{ - srv: srv, - handler: h.Handler, - } - } - - for i := range desc.Streams { - var h = desc.Streams[i] - t.handlers[desc.ServiceName+"."+h.StreamName] = &Server{ - srv: srv, - stream: h.Handler, - ServerStreams: h.ServerStreams, - ClientStreams: h.ClientStreams, - } - } -} - -func (t *handlerMap) FireAndForget(msg payload.Payload) { - var method string - var cdc = encoding.GetCodec(t.contentType) - - var md, ok = msg.Metadata() - if ok && md != nil { - var reqMd Request - xerror.Panic(proto.Unmarshal(md, &reqMd)) - method = reqMd.Method - cdc = encoding.GetCodec(reqMd.ContentType) - return - } - - var h = t.handlers[method] - var _, err = h.handler(h.srv, nil, func(i interface{}) error { return cdc.Unmarshal(msg.Data(), i) }, nil) - xerror.Panic(err) - - // 对应grpc的服务定义 rpc Func(Message) returns (google.protobuf.Empty) -} - -func (t *handlerMap) MetadataPush(msg payload.Payload) { - // TODO implement me - panic("implement me") -} - -func (t *handlerMap) RequestResponse(msg payload.Payload) mono.Mono { - var reqMd, ok = msg.Metadata() - if !ok || reqMd == nil { - return mono.Error(fmt.Errorf("method not found")) - } - - var req = &Request{} - if err := proto.Unmarshal(reqMd, req); err != nil { - return mono.Error(err) - } - - var method = req.Method - var handler = t.handlers[method] - if handler == nil || handler.handler == nil { - return mono.Error(fmt.Errorf("method not found")) - } - - var contentType = t.contentType - if req.ContentType != "" { - contentType = req.ContentType - } - var cdc = encoding.GetCodec(contentType) - - var reqData = msg.Data() - - // 响应 header - return mono.Create(func(ctx context.Context, sink mono.Sink) { - // msg - // 解码 得到metadata和方法名字, header - // t.handlers 获取对应的handler, 得到handler和srv - - ctx, cancel := context.WithCancel(ctx) - defer cancel() - - // TODO middleware 处理 - // TODO 获取 处理后的header - - var respMd = Response{} - - // 执行 handler - resp, err := handler.handler( - handler.srv, ctx, func(in interface{}) error { return cdc.Unmarshal(reqData, in) }, func(ctx context.Context, req interface{}, info *grpc.UnaryServerInfo, handler grpc.UnaryHandler) (resp interface{}, err error) { - // 获取元数据 - return handler(ctx, req) - }) - if err != nil { - // TODO error 处理 - sink.Error(err) - return - } - - data, err := cdc.Marshal(resp) - if err != nil { - // TODO error 处理 - sink.Error(err) - return - } - - md, err := proto.Marshal(&respMd) - if err != nil { - sink.Error(err) - return - } - - // TODO header 处理 - sink.Success(payload.New(data, md)) - }) -} - -func (t *handlerMap) RequestStream(msg payload.Payload) flux.Flux { - //msg - //解码 得到metadata和方法名字, header - //t.handlers 获取对应的handler - - var reqMd, ok = msg.Metadata() - if !ok || reqMd == nil { - return flux.Error(fmt.Errorf("method not found")) - } - - var req = &Request{} - if err := proto.Unmarshal(reqMd, req); err != nil { - return flux.Error(err) - } - - var method = req.Method - var handler = t.handlers[method] - if handler == nil || handler.handler == nil { - return flux.Error(fmt.Errorf("method not found")) - } - - var contentType = t.contentType - if req.ContentType != "" { - contentType = req.ContentType - } - var cdc = encoding.GetCodec(contentType) - - var reqData = msg.Data() - - var in = make(chan *ErrPayload) - var out = make(chan *ErrPayload) - - go func() { - in <- NewErrPayload(payload.New(reqData, nil)) - }() - - return flux.Create(func(ctx context.Context, s flux.Sink) { - ctx, cancel := context.WithCancel(ctx) - defer cancel() - - // TODO header放进去 - var stream = &serverStream{ctx: ctx, in: in, out: out, cdc: cdc} - go func() { - // handler 服务端handler - if err := handler.stream(handler.srv, stream); err != nil { - cancel() - s.Error(err) - } - }() - - for { - select { - case pp := <-in: - s.Next(pp) - pp.Err <- nil - case <-ctx.Done(): - s.Complete() - return - } - } - }) -} - -func (t *handlerMap) RequestChannel(msg flux.Flux) flux.Flux { - return flux.Clone(msg).SwitchOnFirst(func(s flux.Signal, f flux.Flux) flux.Flux { - v, ok := s.Value() - if !ok && v == nil { - return flux.Error(fmt.Errorf("get metadata fail")) - } - - reqMd, ok := v.Metadata() - if !ok || reqMd == nil { - return flux.Error(fmt.Errorf("method not found")) - } - - var req = &Request{} - if err := proto.Unmarshal(reqMd, req); err != nil { - return flux.Error(err) - } - - var method = req.Method - var handler = t.handlers[method] - if handler == nil || handler.handler == nil { - return flux.Error(fmt.Errorf("method not found")) - } - - var contentType = t.contentType - if req.ContentType != "" { - contentType = req.ContentType - } - var cdc = encoding.GetCodec(contentType) - - var in = make(chan *ErrPayload) - var out = make(chan *ErrPayload) - - return flux.Create(func(ctx context.Context, sink flux.Sink) { - ctx, cancel := context.WithCancel(ctx) - defer cancel() - - var stream = &serverStream{ctx: ctx, in: in, out: out, cdc: cdc} - go func() { - if err := handler.stream(handler.srv, stream); err != nil { - cancel() - sink.Error(err) - } - }() - - f.DoOnNext(func(input payload.Payload) error { - var pp = NewErrPayload(input) - in <- pp - return <-pp.Err - }).DoOnError(func(e error) { - cancel() - logging.L().Error("err", logutil.ErrField(e)...) - }).DoOnComplete(func() { cancel() }).Subscribe(ctx) - - for { - select { - case pp := <-out: - sink.Next(pp.Payload) - pp.Err <- nil - case <-ctx.Done(): - sink.Complete() - return - } - } - }) - }) -} - -type serverStream struct { - cdc encoding.Codec - in chan *ErrPayload - out chan *ErrPayload - ctx context.Context - onDone context.CancelFunc - headers map[string]string - sendHeaders map[string]string - trailers map[string]string -} - -func (s *serverStream) SetHeader(md metadata.MD) error { - return s.setHeader(md, false) -} - -func (s *serverStream) SendHeader(md metadata.MD) error { - return s.setHeader(md, true) -} - -func (s *serverStream) setHeader(md metadata.MD, send bool) error { - if s.headers == nil { - s.headers = make(map[string]string) - } - for k, v := range md { - s.headers[k] = strings.Join(v, ",") - } - - if send { - s.sendHeaders = s.headers - s.headers = nil - } - return nil -} - -func (s *serverStream) SetTrailer(md metadata.MD) { - _ = s.TrySetTrailer(md) // must ignore return value -} - -func (s *serverStream) TrySetTrailer(md metadata.MD) error { - //if s.trailers == nil { - // s.trailers = metadata.MD{} - //} - //for k, v := range md { - // s.trailers[k] = append(s.trailers[k], v...) - //} - return nil -} - -func (s *serverStream) Context() context.Context { return s.ctx } - -// SendMsg 服务端发送数据到客户端 -func (s *serverStream) SendMsg(m interface{}) error { - var data, err = s.cdc.Marshal(m) - if err != nil { - return err - } - - var respMd Response - if s.sendHeaders != nil { - // TODO 元数据发送到客户端 - respMd.Headers = s.sendHeaders - } - - md, err := proto.Marshal(&respMd) - if err != nil { - return err - } - - var pp = NewErrPayload(payload.New(data, md)) - s.out <- pp - return <-pp.Err -} - -// RecvMsg 服务端接收客户端数据 -func (s *serverStream) RecvMsg(m interface{}) error { - var pp = <-s.in - - var md, ok = pp.Metadata() - if ok && md != nil { - // TODO 元数据处理 - // 元数据调整header等 - } - - var err = s.cdc.Unmarshal(pp.Data(), m) - // 把错误信息反馈给客户端 - pp.Err <- err - return err -} diff --git a/internal/entry/rsocket/util/client.go b/internal/entry/rsocket/util/client.go deleted file mode 100644 index eaf4de90d..000000000 --- a/internal/entry/rsocket/util/client.go +++ /dev/null @@ -1,59 +0,0 @@ -package util - -import ( - "runtime" - "time" - - "github.com/jjeffcaii/reactor-go/scheduler" - "github.com/rsocket/rsocket-go" - "github.com/rsocket/rsocket-go/extension" - "github.com/rsocket/rsocket-go/payload" -) - -// ClientCfg client config -type ClientCfg struct { - // ConnectTimeout rsocket connect timeout - ConnectTimeout time.Duration - - // KeepaliveInterval rsocket keepalive interval - KeepaliveInterval time.Duration - - // KeepaliveLifetime rsocket keepalive life time - KeepaliveLifetime time.Duration - - Setup payload.Payload - - Socket rsocket.ClientSocketAcceptor - - OnClose func(err error) - OnConnect func(rsocket.Client, error) -} - -func (t *ClientCfg) Build() rsocket.ClientBuilder { - var client = rsocket.Connect() - - // 默认metadata数据类型 - client.MetadataMimeType(extension.ApplicationProtobuf.String()) - // 默认data数据类型 - client.DataMimeType(extension.ApplicationProtobuf.String()) - - // set scheduler to best - client.Scheduler(scheduler.NewElastic(runtime.NumCPU()<<8), scheduler.NewElastic(runtime.NumCPU()<<8)) - client.KeepAlive(t.KeepaliveInterval, t.KeepaliveLifetime, 1) - client.ConnectTimeout(t.ConnectTimeout) - - // 连接服务器后发送的消息 - // 服务注册消息到 - // 认证信息等 - client.SetupPayload(t.Setup) - - // handler when connect success - client.OnConnect(t.OnConnect) - - // when net occur some error,it's will be callback the error serverCfg ip address - client.OnClose(t.OnClose) - - client.Acceptor(t.Socket) - - return client -} diff --git a/internal/entry/rsocket/util/server.go b/internal/entry/rsocket/util/server.go deleted file mode 100644 index 6a59452c0..000000000 --- a/internal/entry/rsocket/util/server.go +++ /dev/null @@ -1,108 +0,0 @@ -package util - -import ( - "context" - "fmt" - "runtime" - "sync" - - "github.com/jjeffcaii/reactor-go/scheduler" - "github.com/rsocket/rsocket-go" - "github.com/rsocket/rsocket-go/payload" - - "github.com/pubgo/lava/logging" - "github.com/pubgo/lava/logging/logutil" -) - -type serverCfg struct { - - //wait serverCfg run success - wg *sync.WaitGroup - - //given serverName to service discovery to find - serverName string - - //tcp socket address - tcpAddress string - - //websocket address - wssAddress string - - //requestChannel buffSize setting - buffSize int - - //rsocket serverBuilder - serverBuilder rsocket.ServerBuilder - - //rsocket serverStarter - serverStart rsocket.ToServerStarter -} - -func (r *serverCfg) Address() string { - return "[tcp: " + r.tcpAddress + "] [wss: " + r.wssAddress + "]" -} - -func (r *serverCfg) String() string { - return "rsocket" -} - -func NewServer(tcpAddress, wssAddress, serverName string, buffSize int) *serverCfg { - return &serverCfg{ - serverName: serverName, - tcpAddress: tcpAddress, - wssAddress: wssAddress, - buffSize: buffSize, - } -} - -func (r *serverCfg) Build(rs rsocket.RSocket) rsocket.ServerBuilder { - var srv = rsocket.Receive() - srv.OnStart(func() { - logging.L().Info("serverCfg start") - }) - - srv.Resume() - - // setting scheduler goroutine on numCPU*2 to better working - srv.Scheduler(scheduler.NewElastic(runtime.NumCPU()<<8), scheduler.NewElastic(runtime.NumCPU()<<8)) - - srv.Acceptor(func(ctx context.Context, setup payload.SetupPayload, socket rsocket.CloseableRSocket) (rsocket.RSocket, error) { - ctx, cancel := context.WithCancel(ctx) - - // 客户端关闭 - socket.OnClose(func(err error) { - cancel() - logutil.LogOrErr(logging.L(), "client close", func() error { return err }) - }) - - // 客户端地址 - var remoteIp, ok = rsocket.GetAddr(socket) - if !ok { - return nil, fmt.Errorf("get address info failed") - } - fmt.Println("remoteIp=>", remoteIp) - - // 服务名字 - // 版本 - // 绑定客户端的信息 - - // 用于服务端和客户端版本协调 - _ = setup.Version() - - // 默认metadata的编码方式 - _ = setup.MetadataMimeType() - - // 默认data的编码方式 - _ = setup.DataMimeType() - - setup.TimeBetweenKeepalive() - _, _ = setup.Metadata() - - // 客户端启动注册的信息 - _ = setup.Data() - - return rs, nil - }) - - return srv -} diff --git a/internal/entry/stream/_doc.go b/internal/entry/stream/_doc.go deleted file mode 100644 index b196ef01d..000000000 --- a/internal/entry/stream/_doc.go +++ /dev/null @@ -1,3 +0,0 @@ -package stream - -//import _ "github.com/reugn/go-streams" diff --git a/internal/plugins/automaxprocs/plugin.go b/internal/modules/automaxprocs/builder.go similarity index 100% rename from internal/plugins/automaxprocs/plugin.go rename to internal/modules/automaxprocs/builder.go diff --git a/internal/plugins/gcnotifier/plugin.go b/internal/modules/gcnotifier/builder.go similarity index 83% rename from internal/plugins/gcnotifier/plugin.go rename to internal/modules/gcnotifier/builder.go index 75cea8b19..af1115948 100644 --- a/internal/plugins/gcnotifier/plugin.go +++ b/internal/modules/gcnotifier/builder.go @@ -2,12 +2,12 @@ package gcnotifier import ( "context" - "github.com/pubgo/lava/core/runmode" - "github.com/CAFxX/gcnotifier" - "go.uber.org/fx" + "github.com/pubgo/dix" + "github.com/CAFxX/gcnotifier" "github.com/pubgo/lava/core/lifecycle" + "github.com/pubgo/lava/core/runmode" "github.com/pubgo/lava/logging" "github.com/pubgo/lava/pkg/syncx" ) @@ -15,13 +15,13 @@ import ( var Name = "gc" var logs = logging.Component(Name) -func Module() fx.Option { - return fx.Invoke(func(r lifecycle.Lifecycle) { +func init() { + dix.Register(func(r lifecycle.Lifecycle) { if runmode.IsProd() || runmode.IsRelease() { return } - r.AfterStops(func() { + r.AfterStarts(func() { syncx.GoCtx(func(ctx context.Context) { var gc = gcnotifier.New() defer gc.Close() diff --git a/internal/plugins/gops/agent.go b/internal/modules/gops/agent.go similarity index 100% rename from internal/plugins/gops/agent.go rename to internal/modules/gops/agent.go diff --git a/internal/services/auth/auth.proto b/internal/services/auth/auth.proto deleted file mode 100644 index dcc7229fc..000000000 --- a/internal/services/auth/auth.proto +++ /dev/null @@ -1,48 +0,0 @@ -syntax = "proto3"; - -package auth; - -import "google/protobuf/timestamp.proto"; - -service Auth { - rpc GetPublicKey (Empty) returns (PublicKey); - rpc LoginUser (Login) returns (SignedToken); - rpc VerifyToken (SignedToken) returns (Token); - rpc RenewToken (SignedToken) returns (SignedToken); -} - -message Empty {} - -message PublicKey { - bytes pem = 1; -} - -message Login { - string username = 1; - string password = 2; -} - -message Token { - string uuid = 1; - google.protobuf.Timestamp issuedAt = 2; - google.protobuf.Timestamp expiresAt = 3; - string username = 4; - string name = 5; - string mail = 6; - repeated string roles = 7; - uint32 renewed = 8; -} - -/* -message User { - string username = 1; - string name = 2; - string mail = 3; - repeated groups = 4; - repeated roles = 5; -} -*/ - -message SignedToken { - string token = 1; -} \ No newline at end of file diff --git a/internal/services/doc.go b/internal/services/doc.go deleted file mode 100644 index 7082d375b..000000000 --- a/internal/services/doc.go +++ /dev/null @@ -1,5 +0,0 @@ -package services - -// https://github.com/openconfig/grpctunnel/blob/master/doc/grpctunnel_design.md -// https://github.com/micro/services -// https://github.com/ake-persson/grpc-exec-example diff --git a/internal/services/pubsub/doc.go b/internal/services/pubsub/doc.go deleted file mode 100644 index fec182c29..000000000 --- a/internal/services/pubsub/doc.go +++ /dev/null @@ -1,11 +0,0 @@ -package pubsub - -// https://github.com/autom8ter/machine/blob/master/machine.go -// https://github.com/emitter-io/emitter -// https://github.com/liftbridge-io/liftbridge -// https://github.com/kelindar/iostream - -// goworker is a Go-based background worker that runs 10 to 100,000* times faster than Ruby-based workers. -// 异步任务处理 -// https://www.goworker.org -// https://github.com/benmanns/goworker diff --git a/internal/services/pubsub/pubsub.proto b/internal/services/pubsub/pubsub.proto deleted file mode 100644 index 80a21d0c6..000000000 --- a/internal/services/pubsub/pubsub.proto +++ /dev/null @@ -1,15 +0,0 @@ -syntax = "proto3"; - -package pubsub; - -option go_package = "github.com/lileio/pubsub/v2"; - -import "google/protobuf/timestamp.proto"; - -// Msg is a wrapper message that alllows us to keep metadata and other -// different and useful information across all providers -message MessageWrapper { - bytes data = 2; - map metadata = 3; - google.protobuf.Timestamp publish_time = 4; -} diff --git a/internal/services/tunnel/tunnel.proto b/internal/services/tunnel/tunnel.proto deleted file mode 100644 index 30fc43394..000000000 --- a/internal/services/tunnel/tunnel.proto +++ /dev/null @@ -1,111 +0,0 @@ -// -// Copyright 2019 Google Inc. All Rights Reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -// Version: 0.1 - -syntax = "proto3"; - -// Package grpctunnel defines a service specification for a TCP over gRPC proxy -// interface. This interface is set so that the tunnel can act as a transparent -// TCP proxy between a pair of gRPC client and server endpoints. -package grpctunnel; - -option go_package = "proto/tunnel;grpctunnel"; - -service Tunnel { - // Register is used to register targets reachable via either the client - // or server and request new Tunnel RPC invocations. - rpc Register(stream RegisterOp) returns (stream RegisterOp); - // Tunnel allows the tunnel client and server to create a bidirectional stream - // in which data can be forwarded. - rpc Tunnel(stream Data) returns (stream Data); -} - -message Data { - int32 tag = 1; // Tag associated with the initial TCP stream setup. - bytes data = 2; // Bytes received from client connection. - bool close = 3; // Connection has reached EOF. -} - -message RegisterOp { - oneof Registration { - Target target = 1; - Session session = 2; - Subscription subscription = 3; - } -} - -enum TargetType { - UNKNOWN = 0; - // https://www.iana.org/assignments/service-names-port-numbers/service-names-port-numbers.xhtml?search=22 - SSH = 22; - // https://www.iana.org/assignments/service-names-port-numbers/service-names-port-numbers.xhtml?search=6653 - OPENFLOW = 6653; - // https://www.iana.org/assignments/service-names-port-numbers/service-names-port-numbers.xhtml?search=9339 - GNMI_GNOI = 9339; - // https://www.iana.org/assignments/service-names-port-numbers/service-names-port-numbers.xhtml?search=9559 - P4_RUNTIME = 9559; -} - -message Target { - enum TargetOp { - UNKNOWN = 0; - ADD = 1; - REMOVE = 2; - } - TargetOp op = 1; - // Used to ack the registration of target_id and target_type. - bool accept = 2; - // Target id identifies which handler to use for a tunnel stream. - string target_id = 3; - // String value of the corresponding TargetType for a standard protocol. - // A non-enumerated protocol is supported so long as both tunnel client and - // server are in agreement on a particular value. - string target_type = 4; - string error = 5; -} - -message Session { - // The tag associated with the initial TCP stream setup. - int32 tag = 1; - // Used to ack the connection tag. - bool accept = 2; - // Target id identifies which handler to use for a tunnel stream. - string target_id = 3; - // String value of the corresponding TargetType for a standard protocol. - // A non-enumerated protocol is supported so long as both tunnel client and - // server are in agreement on a particular value. - string target_type = 4; - // Error allows the register stream to return an error without breaking the - // stream. - string error = 5; -} - - -message Subscription { - enum SubscriptionOp { - UNKNOWN = 0; - SUBCRIBE = 1; - UNSUBCRIBE = 2; - } - SubscriptionOp op = 1; - // Used to ack the registration of (un)subscription. - bool accept = 2; - // String value of the corresponding TargetType for a standard protocol. - // Used to filter targets for subscription. If empty, it will subscribe all. - string target_type = 3; - string error = 4; -} \ No newline at end of file diff --git a/modules/automaxprocs/module.go b/modules/automaxprocs/module.go deleted file mode 100644 index 492fef492..000000000 --- a/modules/automaxprocs/module.go +++ /dev/null @@ -1,5 +0,0 @@ -package automaxprocs - -import ( - _ "github.com/pubgo/lava/internal/plugins/automaxprocs" -) diff --git a/modules/gops/module.go b/modules/gops/module.go deleted file mode 100644 index 1cc0948ab..000000000 --- a/modules/gops/module.go +++ /dev/null @@ -1,5 +0,0 @@ -package gops - -import ( - _ "github.com/pubgo/lava/internal/plugins/gops" -) diff --git a/modules/grpc_log/module.go b/modules/grpc_log/module.go deleted file mode 100644 index 9301d2a25..000000000 --- a/modules/grpc_log/module.go +++ /dev/null @@ -1,5 +0,0 @@ -package grpc_log - -import ( - _ "github.com/pubgo/lava/logging/log_ext/grpclog" -) diff --git a/plugin.go b/plugin.go index bae50a598..1bd9fd057 100644 --- a/plugin.go +++ b/plugin.go @@ -5,7 +5,7 @@ import ( _ "github.com/pubgo/lava/core/metric/drivers/prometheus" // set GOMAXPROCS - _ "github.com/pubgo/lava/internal/plugins/automaxprocs" + _ "github.com/pubgo/lava/internal/modules/automaxprocs" // 编码加载 _ "github.com/pubgo/lava/encoding/json" @@ -14,14 +14,14 @@ import ( _ "github.com/pubgo/lava/encoding/protobuf" // gc plugin - _ "github.com/pubgo/lava/internal/plugins/gcnotifier" + _ "github.com/pubgo/lava/internal/modules/gcnotifier" // metric //_ "github.com/pubgo/lava/core/metric/metric_builder" // 用于系统诊断 - _ "github.com/pubgo/lava/modules/gops" - _ "github.com/pubgo/lava/modules/grpc_log" + _ "github.com/pubgo/lava/internal/modules/gops" + _ "github.com/pubgo/lava/logging/log_ext/grpclog" ) // 加载middleware, 注意加载顺序 diff --git a/version/util.go b/version/util.go deleted file mode 100644 index 3300632d7..000000000 --- a/version/util.go +++ /dev/null @@ -1,27 +0,0 @@ -package version - -import ( - "github.com/pubgo/lava/core/runmode" - rt "runtime" -) - -func GetVersion() map[string]interface{} { - return map[string]interface{}{ - "namespace": runmode.Namespace, - "app_id": runmode.InstanceID, - "device_id": runmode.DeviceID, - "project": runmode.Project, - "data": Data, - "build_time": BuildTime, - "version": Version, - "tag": Tag, - "commit_id": CommitID, - "domain": Domain, - "go_root": rt.GOROOT(), - "go_arch": rt.GOARCH, - "go_os": rt.GOOS, - "go_version": rt.Version(), - "num_cpu": rt.NumCPU(), - "num_goroutine": rt.NumGoroutine(), - } -} diff --git a/version/version.go b/version/version.go index 29c715163..e43932a16 100644 --- a/version/version.go +++ b/version/version.go @@ -2,7 +2,6 @@ package version import ( ver "github.com/hashicorp/go-version" - "github.com/pubgo/lava/core/runmode" "github.com/pubgo/xerror" ) @@ -18,8 +17,4 @@ func init() { Version = "v0.0.1-dev" } xerror.PanicErr(ver.NewVersion(Version)) - - if Domain != "" { - runmode.Domain = Domain - } }