From c539b464f5b261c3fe692da3cb9ead764841a362 Mon Sep 17 00:00:00 2001 From: Yusan Kurban <21994267+yusank@users.noreply.github.com> Date: Wed, 15 Jun 2022 17:33:58 +0800 Subject: [PATCH 01/35] Delete semgrep.yml --- .github/workflows/semgrep.yml | 21 --------------------- 1 file changed, 21 deletions(-) delete mode 100644 .github/workflows/semgrep.yml diff --git a/.github/workflows/semgrep.yml b/.github/workflows/semgrep.yml deleted file mode 100644 index 97cba71..0000000 --- a/.github/workflows/semgrep.yml +++ /dev/null @@ -1,21 +0,0 @@ -on: - pull_request: {} - push: - branches: - - main - paths: - - .github/workflows/semgrep.yml - schedule: - - cron: '0 0 * * *' -name: Semgrep -jobs: - semgrep: - name: Scan - runs-on: ubuntu-20.04 - env: - SEMGREP_APP_TOKEN: ${{ secrets.SEMGREP_APP_TOKEN }} - container: - image: returntocorp/semgrep - steps: - - uses: actions/checkout@v3 - - run: semgrep ci From 282d4d5804edaf8e49e36e0f28d2993114c8efe8 Mon Sep 17 00:00:00 2001 From: Yusan Kurban <21994267+yusank@users.noreply.github.com> Date: Wed, 15 Jun 2022 17:38:32 +0800 Subject: [PATCH 02/35] Create dependabot.yml --- .github/dependabot.yml | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 .github/dependabot.yml diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 0000000..b444581 --- /dev/null +++ b/.github/dependabot.yml @@ -0,0 +1,11 @@ +# To get started with Dependabot version updates, you'll need to specify which +# package ecosystems to update and where the package manifests are located. +# Please see the documentation for all configuration options: +# https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates + +version: 2 +updates: + - package-ecosystem: "gomod" # See documentation for possible values + directory: "/" # Location of package manifests + schedule: + interval: "daily" From e4664ebc239341cd190b39c2f1149c559e1e8298 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 15 Jun 2022 09:38:54 +0000 Subject: [PATCH 03/35] build(deps): bump github.com/stretchr/testify from 1.7.0 to 1.7.2 Bumps [github.com/stretchr/testify](https://github.com/stretchr/testify) from 1.7.0 to 1.7.2. - [Release notes](https://github.com/stretchr/testify/releases) - [Commits](https://github.com/stretchr/testify/compare/v1.7.0...v1.7.2) --- updated-dependencies: - dependency-name: github.com/stretchr/testify dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- go.mod | 4 ++-- go.sum | 6 ++++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/go.mod b/go.mod index 32ccf14..088284f 100644 --- a/go.mod +++ b/go.mod @@ -4,7 +4,7 @@ go 1.18 require ( github.com/envoyproxy/protoc-gen-validate v0.6.7 - github.com/stretchr/testify v1.7.0 + github.com/stretchr/testify v1.7.2 google.golang.org/grpc v1.47.0 google.golang.org/protobuf v1.28.0 ) @@ -17,5 +17,5 @@ require ( golang.org/x/sys v0.0.0-20210816183151-1e6c022a8912 // indirect golang.org/x/text v0.3.7 // indirect google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013 // indirect - gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c // indirect + gopkg.in/yaml.v3 v3.0.1 // indirect ) diff --git a/go.sum b/go.sum index 9721b98..f4e9d92 100644 --- a/go.sum +++ b/go.sum @@ -63,8 +63,9 @@ github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+ github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA= github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= -github.com/stretchr/testify v1.7.0 h1:nwc3DEeHmmLAfoZucVR881uASk0Mfjw8xYJ99tb5CcY= github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= +github.com/stretchr/testify v1.7.2 h1:4jaiDzPyXQvSd7D0EjG45355tLlV3VOECpq10pLC+8s= +github.com/stretchr/testify v1.7.2/go.mod h1:R6va5+xMeoiuVRoj+gSkQ7d3FALtqAAGI1FQKckRals= github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= go.opentelemetry.io/proto/otlp v0.7.0/go.mod h1:PqfVotwruBrMGOCsRd/89rSnXhoiJIqeYNgFYFoEGnI= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= @@ -162,7 +163,8 @@ gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+ gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= 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.v3 v3.0.0-20200313102051-9f266ea9e77c h1:dUUwHk2QECo/6vqA44rthZ8ie2QXMNeKRTHCNY2nXvo= gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= +gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= +gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= From 7704bf5638a1463a0a4de20bba2769e8dde9b7c0 Mon Sep 17 00:00:00 2001 From: yusank Date: Fri, 17 Jun 2022 11:35:33 +0800 Subject: [PATCH 04/35] fix: update makefile --- Makefile | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/Makefile b/Makefile index c632574..ebb0911 100644 --- a/Makefile +++ b/Makefile @@ -31,6 +31,29 @@ gen-protoc: ## Run protoc command to generate pb code. # call gen_proto.sh ./gen_proto.sh +.PHONY: protoc + +COLOR := "\e[1;36m%s\e[0m" + +PROTO_ROOT := . +PROTO_IGNORE := ./third_party +PROTO_FILES = $(shell find $(PROTO_ROOT) -path $(PROTO_IGNORE) -prune -o -type f -name "*.proto" -print) +PROTO_DIRS = $(sort $(dir $(PROTO_FILES))) +PROTO_IMPORTS := --proto_path=. --proto_path=./third_party +PROTO_OPTIONS := --go_out=paths=source_relative:. --go-grpc_out=paths=source_relative:. --validate_out=lang=go,paths=source_relative:. + +define NEWLINE + + +endef + +protoc: ## Generate pb code. + @printf $(COLOR) "Generating protobuf code..." +# Run protoc command to generate pb code. + $(foreach PROTO_DIR,$(PROTO_DIRS),\ + protoc $(PROTO_IMPORTS) $(PROTO_OPTIONS) $(PROTO_DIR)*.proto \ + $(NEWLINE)) + .PHONY: tools-install tools-install: ## Install tools. go get -u github.com/golang/protobuf/protoc-gen-go From 36218929a2cc86af51127279a1fb80c4def0f577 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 20 Jun 2022 13:09:39 +0000 Subject: [PATCH 05/35] build(deps): bump github.com/stretchr/testify from 1.7.2 to 1.7.3 Bumps [github.com/stretchr/testify](https://github.com/stretchr/testify) from 1.7.2 to 1.7.3. - [Release notes](https://github.com/stretchr/testify/releases) - [Commits](https://github.com/stretchr/testify/compare/v1.7.2...v1.7.3) --- updated-dependencies: - dependency-name: github.com/stretchr/testify dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- go.mod | 4 ++-- go.sum | 9 ++++++--- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/go.mod b/go.mod index 088284f..db8de5b 100644 --- a/go.mod +++ b/go.mod @@ -4,13 +4,13 @@ go 1.18 require ( github.com/envoyproxy/protoc-gen-validate v0.6.7 - github.com/stretchr/testify v1.7.2 + github.com/stretchr/testify v1.7.3 google.golang.org/grpc v1.47.0 google.golang.org/protobuf v1.28.0 ) require ( - github.com/davecgh/go-spew v1.1.0 // indirect + github.com/davecgh/go-spew v1.1.1 // indirect github.com/golang/protobuf v1.5.2 // indirect github.com/pmezard/go-difflib v1.0.0 // indirect golang.org/x/net v0.0.0-20210813160813-60bc85c4be6d // indirect diff --git a/go.sum b/go.sum index f4e9d92..5e70fd2 100644 --- a/go.sum +++ b/go.sum @@ -11,8 +11,9 @@ github.com/cncf/udpa/go v0.0.0-20210930031921-04548b0d99d4/go.mod h1:6pvJx4me5XP github.com/cncf/xds/go v0.0.0-20210922020428-25de7278fc84/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= github.com/cncf/xds/go v0.0.0-20211001041855-01bcc9b48dfe/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= github.com/cncf/xds/go v0.0.0-20211011173535-cb28da3451f1/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= -github.com/davecgh/go-spew v1.1.0 h1:ZDRjVQ15GmhC3fiQ8ni8+OwkZQO4DARzQgrnXU1Liz8= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= +github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1mIlRU8Am5FuJP05cCM98= @@ -60,12 +61,14 @@ github.com/rogpeppe/fastuuid v1.2.0/go.mod h1:jVj6XXZzXRy/MSR5jhDC/2q6DgLz+nrA6L github.com/spf13/afero v1.3.3/go.mod h1:5KUK8ByomD5Ti5Artl0RtHeI5pTF7MIDuXL3yY520V4= github.com/spf13/afero v1.6.0/go.mod h1:Ai8FlHk4v/PARR026UzYexafAt9roJ7LcLMAmO6Z93I= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= +github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw= github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA= github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= -github.com/stretchr/testify v1.7.2 h1:4jaiDzPyXQvSd7D0EjG45355tLlV3VOECpq10pLC+8s= -github.com/stretchr/testify v1.7.2/go.mod h1:R6va5+xMeoiuVRoj+gSkQ7d3FALtqAAGI1FQKckRals= +github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= +github.com/stretchr/testify v1.7.3 h1:dAm0YRdRQlWojc3CrCRgPBzG5f941d0zvAKu7qY4e+I= +github.com/stretchr/testify v1.7.3/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU= github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= go.opentelemetry.io/proto/otlp v0.7.0/go.mod h1:PqfVotwruBrMGOCsRd/89rSnXhoiJIqeYNgFYFoEGnI= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= From eab7bb1c61240c7560ffec96314438a221895b0e Mon Sep 17 00:00:00 2001 From: Yusan Kurban <21994267+yusank@users.noreply.github.com> Date: Tue, 21 Jun 2022 10:21:52 +0800 Subject: [PATCH 06/35] Update dependabot.yml --- .github/dependabot.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/dependabot.yml b/.github/dependabot.yml index b444581..2e2be69 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -9,3 +9,5 @@ updates: directory: "/" # Location of package manifests schedule: interval: "daily" + reviewers: + - "yusank" From 85e31b786a2549bf675f9f8a81f4409a2c218b8b Mon Sep 17 00:00:00 2001 From: yusank Date: Wed, 22 Jun 2022 19:06:04 +0800 Subject: [PATCH 07/35] fix: add group defination --- Makefile | 1 + transport/response/response.pb.go | 34 +- transport/response/response.proto | 8 + user/group/v1/group.pb.go | 1600 +++++++++++++++++++++--- user/group/v1/group.pb.validate.go | 1861 +++++++++++++++++++++++++++- user/group/v1/group.proto | 150 ++- user/group/v1/group_grpc.pb.go | 144 +-- user/v1/user.pb.go | 204 +-- user/v1/user.pb.validate.go | 12 +- user/v1/user.proto | 4 +- 10 files changed, 3593 insertions(+), 425 deletions(-) diff --git a/Makefile b/Makefile index ebb0911..a8967c9 100644 --- a/Makefile +++ b/Makefile @@ -53,6 +53,7 @@ protoc: ## Generate pb code. $(foreach PROTO_DIR,$(PROTO_DIRS),\ protoc $(PROTO_IMPORTS) $(PROTO_OPTIONS) $(PROTO_DIR)*.proto \ $(NEWLINE)) + @printf $(COLOR) "Done." .PHONY: tools-install tools-install: ## Install tools. diff --git a/transport/response/response.pb.go b/transport/response/response.pb.go index 100852e..25730a0 100644 --- a/transport/response/response.pb.go +++ b/transport/response/response.pb.go @@ -42,6 +42,12 @@ const ( Code_FriendRequestStatusError Code = 31002 // push server error codes Code_UserNotOnline Code = 40001 + // group error codes + Code_GroupNotExist Code = 50001 + Code_GroupExist Code = 50002 + Code_NotGroupMember Code = 50003 + Code_NotGroupOwner Code = 50004 + Code_GroupLimitExceed Code = 50005 ) // Enum value maps for Code. @@ -61,6 +67,11 @@ var ( 31001: "FriendRequestNotExist", 31002: "FriendRequestStatusError", 40001: "UserNotOnline", + 50001: "GroupNotExist", + 50002: "GroupExist", + 50003: "NotGroupMember", + 50004: "NotGroupOwner", + 50005: "GroupLimitExceed", } Code_value = map[string]int32{ "OK": 0, @@ -77,6 +88,11 @@ var ( "FriendRequestNotExist": 31001, "FriendRequestStatusError": 31002, "UserNotOnline": 40001, + "GroupNotExist": 50001, + "GroupExist": 50002, + "NotGroupMember": 50003, + "NotGroupOwner": 50004, + "GroupLimitExceed": 50005, } ) @@ -185,7 +201,7 @@ var file_transport_response_response_proto_rawDesc = []byte{ 0x06, 0x72, 0x65, 0x61, 0x73, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x72, 0x65, 0x61, 0x73, 0x6f, 0x6e, 0x12, 0x18, 0x0a, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x2a, - 0xbd, 0x02, 0x0a, 0x04, 0x43, 0x6f, 0x64, 0x65, 0x12, 0x06, 0x0a, 0x02, 0x4f, 0x4b, 0x10, 0x00, + 0xa7, 0x03, 0x0a, 0x04, 0x43, 0x6f, 0x64, 0x65, 0x12, 0x06, 0x0a, 0x02, 0x4f, 0x4b, 0x10, 0x00, 0x12, 0x12, 0x0a, 0x0d, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x10, 0x91, 0x4e, 0x12, 0x12, 0x0a, 0x0d, 0x49, 0x6e, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x10, 0x92, 0x4e, 0x12, 0x0c, 0x0a, 0x07, 0x44, 0x42, 0x45, 0x72, @@ -204,11 +220,17 @@ var file_transport_response_response_proto_rawDesc = []byte{ 0x74, 0x45, 0x78, 0x69, 0x73, 0x74, 0x10, 0x99, 0xf2, 0x01, 0x12, 0x1e, 0x0a, 0x18, 0x46, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x10, 0x9a, 0xf2, 0x01, 0x12, 0x13, 0x0a, 0x0d, 0x55, 0x73, - 0x65, 0x72, 0x4e, 0x6f, 0x74, 0x4f, 0x6e, 0x6c, 0x69, 0x6e, 0x65, 0x10, 0xc1, 0xb8, 0x02, 0x42, - 0x2b, 0x5a, 0x29, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x67, 0x6f, - 0x2d, 0x67, 0x6f, 0x69, 0x6d, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, - 0x6f, 0x72, 0x74, 0x2f, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x62, 0x06, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x33, + 0x65, 0x72, 0x4e, 0x6f, 0x74, 0x4f, 0x6e, 0x6c, 0x69, 0x6e, 0x65, 0x10, 0xc1, 0xb8, 0x02, 0x12, + 0x13, 0x0a, 0x0d, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x4e, 0x6f, 0x74, 0x45, 0x78, 0x69, 0x73, 0x74, + 0x10, 0xd1, 0x86, 0x03, 0x12, 0x10, 0x0a, 0x0a, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x45, 0x78, 0x69, + 0x73, 0x74, 0x10, 0xd2, 0x86, 0x03, 0x12, 0x14, 0x0a, 0x0e, 0x4e, 0x6f, 0x74, 0x47, 0x72, 0x6f, + 0x75, 0x70, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x10, 0xd3, 0x86, 0x03, 0x12, 0x13, 0x0a, 0x0d, + 0x4e, 0x6f, 0x74, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x4f, 0x77, 0x6e, 0x65, 0x72, 0x10, 0xd4, 0x86, + 0x03, 0x12, 0x16, 0x0a, 0x10, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x45, + 0x78, 0x63, 0x65, 0x65, 0x64, 0x10, 0xd5, 0x86, 0x03, 0x42, 0x2b, 0x5a, 0x29, 0x67, 0x69, 0x74, + 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x67, 0x6f, 0x2d, 0x67, 0x6f, 0x69, 0x6d, 0x2f, + 0x61, 0x70, 0x69, 0x2f, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x2f, 0x72, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/transport/response/response.proto b/transport/response/response.proto index 8d2ba5c..184abce 100644 --- a/transport/response/response.proto +++ b/transport/response/response.proto @@ -28,6 +28,14 @@ enum Code { // push server error codes UserNotOnline = 40001; + + // group error codes + GroupNotExist = 50001; + GroupExist = 50002; + NotGroupMember = 50003; + NotGroupOwner = 50004; + GroupLimitExceed = 50005; + } // BaseResponse use as define response code and message diff --git a/user/group/v1/group.pb.go b/user/group/v1/group.pb.go index 03a3387..f0c3da4 100644 --- a/user/group/v1/group.pb.go +++ b/user/group/v1/group.pb.go @@ -7,6 +7,7 @@ package v1 import ( + response "github.com/go-goim/api/transport/response" v1 "github.com/go-goim/api/user/v1" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" @@ -21,93 +22,142 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) -type GroupType int32 +type GroupStatus int32 const ( - GroupType_Normal GroupType = 0 // more types + GroupStatus_Active GroupStatus = 0 + GroupStatus_Silent GroupStatus = 1 // more statuses ) -// Enum value maps for GroupType. +// Enum value maps for GroupStatus. var ( - GroupType_name = map[int32]string{ - 0: "Normal", + GroupStatus_name = map[int32]string{ + 0: "Active", + 1: "Silent", } - GroupType_value = map[string]int32{ - "Normal": 0, + GroupStatus_value = map[string]int32{ + "Active": 0, + "Silent": 1, } ) -func (x GroupType) Enum() *GroupType { - p := new(GroupType) +func (x GroupStatus) Enum() *GroupStatus { + p := new(GroupStatus) *p = x return p } -func (x GroupType) String() string { +func (x GroupStatus) String() string { return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) } -func (GroupType) Descriptor() protoreflect.EnumDescriptor { +func (GroupStatus) Descriptor() protoreflect.EnumDescriptor { return file_user_group_v1_group_proto_enumTypes[0].Descriptor() } -func (GroupType) Type() protoreflect.EnumType { +func (GroupStatus) Type() protoreflect.EnumType { return &file_user_group_v1_group_proto_enumTypes[0] } -func (x GroupType) Number() protoreflect.EnumNumber { +func (x GroupStatus) Number() protoreflect.EnumNumber { return protoreflect.EnumNumber(x) } -// Deprecated: Use GroupType.Descriptor instead. -func (GroupType) EnumDescriptor() ([]byte, []int) { +// Deprecated: Use GroupStatus.Descriptor instead. +func (GroupStatus) EnumDescriptor() ([]byte, []int) { return file_user_group_v1_group_proto_rawDescGZIP(), []int{0} } -type GroupStatus int32 +type GroupMember_Status int32 const ( - GroupStatus_Active GroupStatus = 0 - GroupStatus_Silent GroupStatus = 1 // more statuses + GroupMember_StatusActive GroupMember_Status = 0 + GroupMember_StatusSilent GroupMember_Status = 1 // more statuses ) -// Enum value maps for GroupStatus. +// Enum value maps for GroupMember_Status. var ( - GroupStatus_name = map[int32]string{ - 0: "Active", - 1: "Silent", + GroupMember_Status_name = map[int32]string{ + 0: "StatusActive", + 1: "StatusSilent", } - GroupStatus_value = map[string]int32{ - "Active": 0, - "Silent": 1, + GroupMember_Status_value = map[string]int32{ + "StatusActive": 0, + "StatusSilent": 1, } ) -func (x GroupStatus) Enum() *GroupStatus { - p := new(GroupStatus) +func (x GroupMember_Status) Enum() *GroupMember_Status { + p := new(GroupMember_Status) *p = x return p } -func (x GroupStatus) String() string { +func (x GroupMember_Status) String() string { return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) } -func (GroupStatus) Descriptor() protoreflect.EnumDescriptor { +func (GroupMember_Status) Descriptor() protoreflect.EnumDescriptor { return file_user_group_v1_group_proto_enumTypes[1].Descriptor() } -func (GroupStatus) Type() protoreflect.EnumType { +func (GroupMember_Status) Type() protoreflect.EnumType { return &file_user_group_v1_group_proto_enumTypes[1] } -func (x GroupStatus) Number() protoreflect.EnumNumber { +func (x GroupMember_Status) Number() protoreflect.EnumNumber { return protoreflect.EnumNumber(x) } -// Deprecated: Use GroupStatus.Descriptor instead. -func (GroupStatus) EnumDescriptor() ([]byte, []int) { - return file_user_group_v1_group_proto_rawDescGZIP(), []int{1} +// Deprecated: Use GroupMember_Status.Descriptor instead. +func (GroupMember_Status) EnumDescriptor() ([]byte, []int) { + return file_user_group_v1_group_proto_rawDescGZIP(), []int{1, 0} +} + +type GroupMember_Type int32 + +const ( + GroupMember_TypeOwner GroupMember_Type = 0 + GroupMember_TypeMember GroupMember_Type = 1 // more types +) + +// Enum value maps for GroupMember_Type. +var ( + GroupMember_Type_name = map[int32]string{ + 0: "TypeOwner", + 1: "TypeMember", + } + GroupMember_Type_value = map[string]int32{ + "TypeOwner": 0, + "TypeMember": 1, + } +) + +func (x GroupMember_Type) Enum() *GroupMember_Type { + p := new(GroupMember_Type) + *p = x + return p +} + +func (x GroupMember_Type) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (GroupMember_Type) Descriptor() protoreflect.EnumDescriptor { + return file_user_group_v1_group_proto_enumTypes[2].Descriptor() +} + +func (GroupMember_Type) Type() protoreflect.EnumType { + return &file_user_group_v1_group_proto_enumTypes[2] +} + +func (x GroupMember_Type) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use GroupMember_Type.Descriptor instead. +func (GroupMember_Type) EnumDescriptor() ([]byte, []int) { + return file_user_group_v1_group_proto_rawDescGZIP(), []int{1, 1} } type Group struct { @@ -115,15 +165,17 @@ type Group struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Id int64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` - Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` - Description string `protobuf:"bytes,3,opt,name=description,proto3" json:"description,omitempty"` - Type GroupType `protobuf:"varint,4,opt,name=type,proto3,enum=api.user.group.v1.GroupType" json:"type,omitempty"` - Status GroupStatus `protobuf:"varint,5,opt,name=status,proto3,enum=api.user.group.v1.GroupStatus" json:"status,omitempty"` - CreatedBy string `protobuf:"bytes,6,opt,name=created_by,json=createdBy,proto3" json:"created_by,omitempty"` - Members []string `protobuf:"bytes,7,rep,name=members,proto3" json:"members,omitempty"` - CreatedAt int64 `protobuf:"varint,8,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"` - UpdatedAt int64 `protobuf:"varint,9,opt,name=updated_at,json=updatedAt,proto3" json:"updated_at,omitempty"` + Id int64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` // use as session id + Gid string `protobuf:"bytes,2,opt,name=gid,proto3" json:"gid,omitempty"` + Name string `protobuf:"bytes,3,opt,name=name,proto3" json:"name,omitempty"` + Description string `protobuf:"bytes,4,opt,name=description,proto3" json:"description,omitempty"` + Avatar string `protobuf:"bytes,5,opt,name=avatar,proto3" json:"avatar,omitempty"` + OwnerUid string `protobuf:"bytes,6,opt,name=owner_uid,json=ownerUid,proto3" json:"owner_uid,omitempty"` + Owner *GroupMember `protobuf:"bytes,7,opt,name=owner,proto3,oneof" json:"owner,omitempty"` + Members []*GroupMember `protobuf:"bytes,8,rep,name=members,proto3" json:"members,omitempty"` + MaxMembers int32 `protobuf:"varint,9,opt,name=max_members,json=maxMembers,proto3" json:"max_members,omitempty"` + MemberCount int32 `protobuf:"varint,10,opt,name=member_count,json=memberCount,proto3" json:"member_count,omitempty"` + Status GroupStatus `protobuf:"varint,11,opt,name=status,proto3,enum=api.user.group.v1.GroupStatus" json:"status,omitempty"` } func (x *Group) Reset() { @@ -165,6 +217,13 @@ func (x *Group) GetId() int64 { return 0 } +func (x *Group) GetGid() string { + if x != nil { + return x.Gid + } + return "" +} + func (x *Group) GetName() string { if x != nil { return x.Name @@ -179,56 +238,71 @@ func (x *Group) GetDescription() string { return "" } -func (x *Group) GetType() GroupType { +func (x *Group) GetAvatar() string { if x != nil { - return x.Type + return x.Avatar } - return GroupType_Normal + return "" } -func (x *Group) GetStatus() GroupStatus { +func (x *Group) GetOwnerUid() string { if x != nil { - return x.Status + return x.OwnerUid } - return GroupStatus_Active + return "" } -func (x *Group) GetCreatedBy() string { +func (x *Group) GetOwner() *GroupMember { if x != nil { - return x.CreatedBy + return x.Owner } - return "" + return nil } -func (x *Group) GetMembers() []string { +func (x *Group) GetMembers() []*GroupMember { if x != nil { return x.Members } return nil } -func (x *Group) GetCreatedAt() int64 { +func (x *Group) GetMaxMembers() int32 { if x != nil { - return x.CreatedAt + return x.MaxMembers } return 0 } -func (x *Group) GetUpdatedAt() int64 { +func (x *Group) GetMemberCount() int32 { if x != nil { - return x.UpdatedAt + return x.MemberCount } return 0 } -type Empty struct { +func (x *Group) GetStatus() GroupStatus { + if x != nil { + return x.Status + } + return GroupStatus_Active +} + +type GroupMember struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields + + Id int64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` // use as session id + Gid string `protobuf:"bytes,2,opt,name=gid,proto3" json:"gid,omitempty"` + Uid string `protobuf:"bytes,3,opt,name=uid,proto3" json:"uid,omitempty"` + Group *Group `protobuf:"bytes,4,opt,name=group,proto3" json:"group,omitempty"` + User *v1.User `protobuf:"bytes,5,opt,name=user,proto3,oneof" json:"user,omitempty"` + Status GroupMember_Status `protobuf:"varint,6,opt,name=status,proto3,enum=api.user.group.v1.GroupMember_Status" json:"status,omitempty"` + Type GroupMember_Type `protobuf:"varint,7,opt,name=type,proto3,enum=api.user.group.v1.GroupMember_Type" json:"type,omitempty"` } -func (x *Empty) Reset() { - *x = Empty{} +func (x *GroupMember) Reset() { + *x = GroupMember{} if protoimpl.UnsafeEnabled { mi := &file_user_group_v1_group_proto_msgTypes[1] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -236,13 +310,13 @@ func (x *Empty) Reset() { } } -func (x *Empty) String() string { +func (x *GroupMember) String() string { return protoimpl.X.MessageStringOf(x) } -func (*Empty) ProtoMessage() {} +func (*GroupMember) ProtoMessage() {} -func (x *Empty) ProtoReflect() protoreflect.Message { +func (x *GroupMember) ProtoReflect() protoreflect.Message { mi := &file_user_group_v1_group_proto_msgTypes[1] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -254,143 +328,1291 @@ func (x *Empty) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use Empty.ProtoReflect.Descriptor instead. -func (*Empty) Descriptor() ([]byte, []int) { +// Deprecated: Use GroupMember.ProtoReflect.Descriptor instead. +func (*GroupMember) Descriptor() ([]byte, []int) { return file_user_group_v1_group_proto_rawDescGZIP(), []int{1} } -var File_user_group_v1_group_proto protoreflect.FileDescriptor +func (x *GroupMember) GetId() int64 { + if x != nil { + return x.Id + } + return 0 +} -var file_user_group_v1_group_proto_rawDesc = []byte{ - 0x0a, 0x19, 0x75, 0x73, 0x65, 0x72, 0x2f, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2f, 0x76, 0x31, 0x2f, - 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x11, 0x61, 0x70, 0x69, - 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2e, 0x76, 0x31, 0x1a, 0x12, - 0x75, 0x73, 0x65, 0x72, 0x2f, 0x76, 0x31, 0x2f, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x22, 0xae, 0x02, 0x0a, 0x05, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x12, 0x0e, 0x0a, 0x02, - 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x02, 0x69, 0x64, 0x12, 0x12, 0x0a, 0x04, - 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, - 0x12, 0x20, 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, - 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, - 0x6f, 0x6e, 0x12, 0x30, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0e, - 0x32, 0x1c, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x67, 0x72, 0x6f, 0x75, - 0x70, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x54, 0x79, 0x70, 0x65, 0x52, 0x04, - 0x74, 0x79, 0x70, 0x65, 0x12, 0x36, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x05, - 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1e, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, - 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x53, 0x74, - 0x61, 0x74, 0x75, 0x73, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x1d, 0x0a, 0x0a, - 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x62, 0x79, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x09, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x42, 0x79, 0x12, 0x18, 0x0a, 0x07, 0x6d, - 0x65, 0x6d, 0x62, 0x65, 0x72, 0x73, 0x18, 0x07, 0x20, 0x03, 0x28, 0x09, 0x52, 0x07, 0x6d, 0x65, - 0x6d, 0x62, 0x65, 0x72, 0x73, 0x12, 0x1d, 0x0a, 0x0a, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, - 0x5f, 0x61, 0x74, 0x18, 0x08, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x63, 0x72, 0x65, 0x61, 0x74, - 0x65, 0x64, 0x41, 0x74, 0x12, 0x1d, 0x0a, 0x0a, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x5f, - 0x61, 0x74, 0x18, 0x09, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, - 0x64, 0x41, 0x74, 0x22, 0x07, 0x0a, 0x05, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x2a, 0x17, 0x0a, 0x09, - 0x47, 0x72, 0x6f, 0x75, 0x70, 0x54, 0x79, 0x70, 0x65, 0x12, 0x0a, 0x0a, 0x06, 0x4e, 0x6f, 0x72, - 0x6d, 0x61, 0x6c, 0x10, 0x00, 0x2a, 0x25, 0x0a, 0x0b, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x53, 0x74, - 0x61, 0x74, 0x75, 0x73, 0x12, 0x0a, 0x0a, 0x06, 0x41, 0x63, 0x74, 0x69, 0x76, 0x65, 0x10, 0x00, - 0x12, 0x0a, 0x0a, 0x06, 0x53, 0x69, 0x6c, 0x65, 0x6e, 0x74, 0x10, 0x01, 0x32, 0xea, 0x03, 0x0a, - 0x0c, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x3e, 0x0a, - 0x08, 0x47, 0x65, 0x74, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x12, 0x18, 0x2e, 0x61, 0x70, 0x69, 0x2e, - 0x75, 0x73, 0x65, 0x72, 0x2e, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2e, 0x76, 0x31, 0x2e, 0x45, 0x6d, - 0x70, 0x74, 0x79, 0x1a, 0x18, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x67, - 0x72, 0x6f, 0x75, 0x70, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x12, 0x41, 0x0a, - 0x0b, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x12, 0x18, 0x2e, 0x61, - 0x70, 0x69, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2e, 0x76, 0x31, - 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x1a, 0x18, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x75, 0x73, 0x65, - 0x72, 0x2e, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x72, 0x6f, 0x75, 0x70, - 0x12, 0x41, 0x0a, 0x0b, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x12, - 0x18, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x67, 0x72, 0x6f, 0x75, 0x70, - 0x2e, 0x76, 0x31, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x1a, 0x18, 0x2e, 0x61, 0x70, 0x69, 0x2e, - 0x75, 0x73, 0x65, 0x72, 0x2e, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x72, - 0x6f, 0x75, 0x70, 0x12, 0x41, 0x0a, 0x0b, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x47, 0x72, 0x6f, - 0x75, 0x70, 0x12, 0x18, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x67, 0x72, - 0x6f, 0x75, 0x70, 0x2e, 0x76, 0x31, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x1a, 0x18, 0x2e, 0x61, - 0x70, 0x69, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2e, 0x76, 0x31, - 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x12, 0x42, 0x0a, 0x0f, 0x47, 0x65, 0x74, 0x47, 0x72, 0x6f, - 0x75, 0x70, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x73, 0x12, 0x18, 0x2e, 0x61, 0x70, 0x69, 0x2e, - 0x75, 0x73, 0x65, 0x72, 0x2e, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2e, 0x76, 0x31, 0x2e, 0x45, 0x6d, - 0x70, 0x74, 0x79, 0x1a, 0x15, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x76, - 0x31, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x44, 0x0a, 0x0e, 0x41, 0x64, - 0x64, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x12, 0x18, 0x2e, 0x61, - 0x70, 0x69, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2e, 0x76, 0x31, - 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x1a, 0x18, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x75, 0x73, 0x65, - 0x72, 0x2e, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2e, 0x76, 0x31, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, - 0x12, 0x47, 0x0a, 0x11, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x4d, - 0x65, 0x6d, 0x62, 0x65, 0x72, 0x12, 0x18, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x75, 0x73, 0x65, 0x72, - 0x2e, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2e, 0x76, 0x31, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x1a, - 0x18, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x67, 0x72, 0x6f, 0x75, 0x70, - 0x2e, 0x76, 0x31, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x42, 0x26, 0x5a, 0x24, 0x67, 0x69, 0x74, - 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x67, 0x6f, 0x2d, 0x67, 0x6f, 0x69, 0x6d, 0x2f, - 0x61, 0x70, 0x69, 0x2f, 0x75, 0x73, 0x65, 0x72, 0x2f, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2f, 0x76, - 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +func (x *GroupMember) GetGid() string { + if x != nil { + return x.Gid + } + return "" } -var ( - file_user_group_v1_group_proto_rawDescOnce sync.Once - file_user_group_v1_group_proto_rawDescData = file_user_group_v1_group_proto_rawDesc -) +func (x *GroupMember) GetUid() string { + if x != nil { + return x.Uid + } + return "" +} -func file_user_group_v1_group_proto_rawDescGZIP() []byte { - file_user_group_v1_group_proto_rawDescOnce.Do(func() { - file_user_group_v1_group_proto_rawDescData = protoimpl.X.CompressGZIP(file_user_group_v1_group_proto_rawDescData) - }) - return file_user_group_v1_group_proto_rawDescData +func (x *GroupMember) GetGroup() *Group { + if x != nil { + return x.Group + } + return nil } -var file_user_group_v1_group_proto_enumTypes = make([]protoimpl.EnumInfo, 2) -var file_user_group_v1_group_proto_msgTypes = make([]protoimpl.MessageInfo, 2) -var file_user_group_v1_group_proto_goTypes = []interface{}{ - (GroupType)(0), // 0: api.user.group.v1.GroupType - (GroupStatus)(0), // 1: api.user.group.v1.GroupStatus - (*Group)(nil), // 2: api.user.group.v1.Group - (*Empty)(nil), // 3: api.user.group.v1.Empty - (*v1.UserList)(nil), // 4: api.user.v1.UserList +func (x *GroupMember) GetUser() *v1.User { + if x != nil { + return x.User + } + return nil } -var file_user_group_v1_group_proto_depIdxs = []int32{ - 0, // 0: api.user.group.v1.Group.type:type_name -> api.user.group.v1.GroupType - 1, // 1: api.user.group.v1.Group.status:type_name -> api.user.group.v1.GroupStatus - 3, // 2: api.user.group.v1.GroupService.GetGroup:input_type -> api.user.group.v1.Empty - 3, // 3: api.user.group.v1.GroupService.CreateGroup:input_type -> api.user.group.v1.Empty - 3, // 4: api.user.group.v1.GroupService.UpdateGroup:input_type -> api.user.group.v1.Empty - 3, // 5: api.user.group.v1.GroupService.DeleteGroup:input_type -> api.user.group.v1.Empty - 3, // 6: api.user.group.v1.GroupService.GetGroupMembers:input_type -> api.user.group.v1.Empty - 3, // 7: api.user.group.v1.GroupService.AddGroupMember:input_type -> api.user.group.v1.Empty - 3, // 8: api.user.group.v1.GroupService.RemoveGroupMember:input_type -> api.user.group.v1.Empty - 2, // 9: api.user.group.v1.GroupService.GetGroup:output_type -> api.user.group.v1.Group - 2, // 10: api.user.group.v1.GroupService.CreateGroup:output_type -> api.user.group.v1.Group - 2, // 11: api.user.group.v1.GroupService.UpdateGroup:output_type -> api.user.group.v1.Group - 3, // 12: api.user.group.v1.GroupService.DeleteGroup:output_type -> api.user.group.v1.Empty - 4, // 13: api.user.group.v1.GroupService.GetGroupMembers:output_type -> api.user.v1.UserList - 3, // 14: api.user.group.v1.GroupService.AddGroupMember:output_type -> api.user.group.v1.Empty - 3, // 15: api.user.group.v1.GroupService.RemoveGroupMember:output_type -> api.user.group.v1.Empty - 9, // [9:16] is the sub-list for method output_type - 2, // [2:9] is the sub-list for method input_type - 2, // [2:2] is the sub-list for extension type_name - 2, // [2:2] is the sub-list for extension extendee - 0, // [0:2] is the sub-list for field type_name + +func (x *GroupMember) GetStatus() GroupMember_Status { + if x != nil { + return x.Status + } + return GroupMember_StatusActive } -func init() { file_user_group_v1_group_proto_init() } -func file_user_group_v1_group_proto_init() { - if File_user_group_v1_group_proto != nil { - return +func (x *GroupMember) GetType() GroupMember_Type { + if x != nil { + return x.Type } - if !protoimpl.UnsafeEnabled { - file_user_group_v1_group_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Group); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } + return GroupMember_TypeOwner +} + +type GetGroupRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Gid string `protobuf:"bytes,1,opt,name=gid,proto3" json:"gid,omitempty"` + WithMembers bool `protobuf:"varint,2,opt,name=with_members,json=withMembers,proto3" json:"with_members,omitempty"` +} + +func (x *GetGroupRequest) Reset() { + *x = GetGroupRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_user_group_v1_group_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetGroupRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetGroupRequest) ProtoMessage() {} + +func (x *GetGroupRequest) ProtoReflect() protoreflect.Message { + mi := &file_user_group_v1_group_proto_msgTypes[2] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) } - file_user_group_v1_group_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Empty); i { + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetGroupRequest.ProtoReflect.Descriptor instead. +func (*GetGroupRequest) Descriptor() ([]byte, []int) { + return file_user_group_v1_group_proto_rawDescGZIP(), []int{2} +} + +func (x *GetGroupRequest) GetGid() string { + if x != nil { + return x.Gid + } + return "" +} + +func (x *GetGroupRequest) GetWithMembers() bool { + if x != nil { + return x.WithMembers + } + return false +} + +type GetGroupResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Response *response.BaseResponse `protobuf:"bytes,1,opt,name=response,proto3" json:"response,omitempty"` + Group *Group `protobuf:"bytes,2,opt,name=group,proto3" json:"group,omitempty"` +} + +func (x *GetGroupResponse) Reset() { + *x = GetGroupResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_user_group_v1_group_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetGroupResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetGroupResponse) ProtoMessage() {} + +func (x *GetGroupResponse) ProtoReflect() protoreflect.Message { + mi := &file_user_group_v1_group_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 GetGroupResponse.ProtoReflect.Descriptor instead. +func (*GetGroupResponse) Descriptor() ([]byte, []int) { + return file_user_group_v1_group_proto_rawDescGZIP(), []int{3} +} + +func (x *GetGroupResponse) GetResponse() *response.BaseResponse { + if x != nil { + return x.Response + } + return nil +} + +func (x *GetGroupResponse) GetGroup() *Group { + if x != nil { + return x.Group + } + return nil +} + +type ListGroupsRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // list all groups no matter user is member or owner. + Uid string `protobuf:"bytes,1,opt,name=uid,proto3" json:"uid,omitempty"` + Page int32 `protobuf:"varint,2,opt,name=page,proto3" json:"page,omitempty"` + PageSize int32 `protobuf:"varint,3,opt,name=page_size,json=pageSize,proto3" json:"page_size,omitempty"` +} + +func (x *ListGroupsRequest) Reset() { + *x = ListGroupsRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_user_group_v1_group_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ListGroupsRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListGroupsRequest) ProtoMessage() {} + +func (x *ListGroupsRequest) ProtoReflect() protoreflect.Message { + mi := &file_user_group_v1_group_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 ListGroupsRequest.ProtoReflect.Descriptor instead. +func (*ListGroupsRequest) Descriptor() ([]byte, []int) { + return file_user_group_v1_group_proto_rawDescGZIP(), []int{4} +} + +func (x *ListGroupsRequest) GetUid() string { + if x != nil { + return x.Uid + } + return "" +} + +func (x *ListGroupsRequest) GetPage() int32 { + if x != nil { + return x.Page + } + return 0 +} + +func (x *ListGroupsRequest) GetPageSize() int32 { + if x != nil { + return x.PageSize + } + return 0 +} + +type ListGroupsResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Response *response.BaseResponse `protobuf:"bytes,1,opt,name=response,proto3" json:"response,omitempty"` + Groups []*Group `protobuf:"bytes,2,rep,name=groups,proto3" json:"groups,omitempty"` +} + +func (x *ListGroupsResponse) Reset() { + *x = ListGroupsResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_user_group_v1_group_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ListGroupsResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListGroupsResponse) ProtoMessage() {} + +func (x *ListGroupsResponse) ProtoReflect() protoreflect.Message { + mi := &file_user_group_v1_group_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 ListGroupsResponse.ProtoReflect.Descriptor instead. +func (*ListGroupsResponse) Descriptor() ([]byte, []int) { + return file_user_group_v1_group_proto_rawDescGZIP(), []int{5} +} + +func (x *ListGroupsResponse) GetResponse() *response.BaseResponse { + if x != nil { + return x.Response + } + return nil +} + +func (x *ListGroupsResponse) GetGroups() []*Group { + if x != nil { + return x.Groups + } + return nil +} + +type CreateGroupRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + Description string `protobuf:"bytes,2,opt,name=description,proto3" json:"description,omitempty"` + Avatar string `protobuf:"bytes,3,opt,name=avatar,proto3" json:"avatar,omitempty"` + OwnerUid string `protobuf:"bytes,4,opt,name=owner_uid,json=ownerUid,proto3" json:"owner_uid,omitempty"` + MembersUid []string `protobuf:"bytes,5,rep,name=members_uid,json=membersUid,proto3" json:"members_uid,omitempty"` +} + +func (x *CreateGroupRequest) Reset() { + *x = CreateGroupRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_user_group_v1_group_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *CreateGroupRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CreateGroupRequest) ProtoMessage() {} + +func (x *CreateGroupRequest) ProtoReflect() protoreflect.Message { + mi := &file_user_group_v1_group_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 CreateGroupRequest.ProtoReflect.Descriptor instead. +func (*CreateGroupRequest) Descriptor() ([]byte, []int) { + return file_user_group_v1_group_proto_rawDescGZIP(), []int{6} +} + +func (x *CreateGroupRequest) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *CreateGroupRequest) GetDescription() string { + if x != nil { + return x.Description + } + return "" +} + +func (x *CreateGroupRequest) GetAvatar() string { + if x != nil { + return x.Avatar + } + return "" +} + +func (x *CreateGroupRequest) GetOwnerUid() string { + if x != nil { + return x.OwnerUid + } + return "" +} + +func (x *CreateGroupRequest) GetMembersUid() []string { + if x != nil { + return x.MembersUid + } + return nil +} + +type CreateGroupResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Response *response.BaseResponse `protobuf:"bytes,1,opt,name=response,proto3" json:"response,omitempty"` + Group *Group `protobuf:"bytes,2,opt,name=group,proto3" json:"group,omitempty"` +} + +func (x *CreateGroupResponse) Reset() { + *x = CreateGroupResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_user_group_v1_group_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *CreateGroupResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CreateGroupResponse) ProtoMessage() {} + +func (x *CreateGroupResponse) ProtoReflect() protoreflect.Message { + mi := &file_user_group_v1_group_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 CreateGroupResponse.ProtoReflect.Descriptor instead. +func (*CreateGroupResponse) Descriptor() ([]byte, []int) { + return file_user_group_v1_group_proto_rawDescGZIP(), []int{7} +} + +func (x *CreateGroupResponse) GetResponse() *response.BaseResponse { + if x != nil { + return x.Response + } + return nil +} + +func (x *CreateGroupResponse) GetGroup() *Group { + if x != nil { + return x.Group + } + return nil +} + +type UpdateGroupRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Gid string `protobuf:"bytes,1,opt,name=gid,proto3" json:"gid,omitempty"` + Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` + Description string `protobuf:"bytes,3,opt,name=description,proto3" json:"description,omitempty"` + Avatar string `protobuf:"bytes,4,opt,name=avatar,proto3" json:"avatar,omitempty"` + Uid string `protobuf:"bytes,5,opt,name=uid,proto3" json:"uid,omitempty"` // current user id +} + +func (x *UpdateGroupRequest) Reset() { + *x = UpdateGroupRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_user_group_v1_group_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *UpdateGroupRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*UpdateGroupRequest) ProtoMessage() {} + +func (x *UpdateGroupRequest) ProtoReflect() protoreflect.Message { + mi := &file_user_group_v1_group_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 UpdateGroupRequest.ProtoReflect.Descriptor instead. +func (*UpdateGroupRequest) Descriptor() ([]byte, []int) { + return file_user_group_v1_group_proto_rawDescGZIP(), []int{8} +} + +func (x *UpdateGroupRequest) GetGid() string { + if x != nil { + return x.Gid + } + return "" +} + +func (x *UpdateGroupRequest) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *UpdateGroupRequest) GetDescription() string { + if x != nil { + return x.Description + } + return "" +} + +func (x *UpdateGroupRequest) GetAvatar() string { + if x != nil { + return x.Avatar + } + return "" +} + +func (x *UpdateGroupRequest) GetUid() string { + if x != nil { + return x.Uid + } + return "" +} + +type UpdateGroupResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Response *response.BaseResponse `protobuf:"bytes,1,opt,name=response,proto3" json:"response,omitempty"` + Group *Group `protobuf:"bytes,2,opt,name=group,proto3" json:"group,omitempty"` +} + +func (x *UpdateGroupResponse) Reset() { + *x = UpdateGroupResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_user_group_v1_group_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *UpdateGroupResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*UpdateGroupResponse) ProtoMessage() {} + +func (x *UpdateGroupResponse) ProtoReflect() protoreflect.Message { + mi := &file_user_group_v1_group_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 UpdateGroupResponse.ProtoReflect.Descriptor instead. +func (*UpdateGroupResponse) Descriptor() ([]byte, []int) { + return file_user_group_v1_group_proto_rawDescGZIP(), []int{9} +} + +func (x *UpdateGroupResponse) GetResponse() *response.BaseResponse { + if x != nil { + return x.Response + } + return nil +} + +func (x *UpdateGroupResponse) GetGroup() *Group { + if x != nil { + return x.Group + } + return nil +} + +type DeleteGroupRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Gid string `protobuf:"bytes,1,opt,name=gid,proto3" json:"gid,omitempty"` + Uid string `protobuf:"bytes,2,opt,name=uid,proto3" json:"uid,omitempty"` +} + +func (x *DeleteGroupRequest) Reset() { + *x = DeleteGroupRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_user_group_v1_group_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *DeleteGroupRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DeleteGroupRequest) ProtoMessage() {} + +func (x *DeleteGroupRequest) ProtoReflect() protoreflect.Message { + mi := &file_user_group_v1_group_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 DeleteGroupRequest.ProtoReflect.Descriptor instead. +func (*DeleteGroupRequest) Descriptor() ([]byte, []int) { + return file_user_group_v1_group_proto_rawDescGZIP(), []int{10} +} + +func (x *DeleteGroupRequest) GetGid() string { + if x != nil { + return x.Gid + } + return "" +} + +func (x *DeleteGroupRequest) GetUid() string { + if x != nil { + return x.Uid + } + return "" +} + +type AddGroupMemberRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Gid string `protobuf:"bytes,1,opt,name=gid,proto3" json:"gid,omitempty"` + Uid []string `protobuf:"bytes,2,rep,name=uid,proto3" json:"uid,omitempty"` +} + +func (x *AddGroupMemberRequest) Reset() { + *x = AddGroupMemberRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_user_group_v1_group_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *AddGroupMemberRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*AddGroupMemberRequest) ProtoMessage() {} + +func (x *AddGroupMemberRequest) ProtoReflect() protoreflect.Message { + mi := &file_user_group_v1_group_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 AddGroupMemberRequest.ProtoReflect.Descriptor instead. +func (*AddGroupMemberRequest) Descriptor() ([]byte, []int) { + return file_user_group_v1_group_proto_rawDescGZIP(), []int{11} +} + +func (x *AddGroupMemberRequest) GetGid() string { + if x != nil { + return x.Gid + } + return "" +} + +func (x *AddGroupMemberRequest) GetUid() []string { + if x != nil { + return x.Uid + } + return nil +} + +type AddGroupMemberResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Response *response.BaseResponse `protobuf:"bytes,1,opt,name=response,proto3" json:"response,omitempty"` + Added int32 `protobuf:"varint,2,opt,name=added,proto3" json:"added,omitempty"` +} + +func (x *AddGroupMemberResponse) Reset() { + *x = AddGroupMemberResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_user_group_v1_group_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *AddGroupMemberResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*AddGroupMemberResponse) ProtoMessage() {} + +func (x *AddGroupMemberResponse) ProtoReflect() protoreflect.Message { + mi := &file_user_group_v1_group_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 AddGroupMemberResponse.ProtoReflect.Descriptor instead. +func (*AddGroupMemberResponse) Descriptor() ([]byte, []int) { + return file_user_group_v1_group_proto_rawDescGZIP(), []int{12} +} + +func (x *AddGroupMemberResponse) GetResponse() *response.BaseResponse { + if x != nil { + return x.Response + } + return nil +} + +func (x *AddGroupMemberResponse) GetAdded() int32 { + if x != nil { + return x.Added + } + return 0 +} + +type RemoveGroupMemberRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Gid string `protobuf:"bytes,1,opt,name=gid,proto3" json:"gid,omitempty"` + Uid []string `protobuf:"bytes,2,rep,name=uid,proto3" json:"uid,omitempty"` + OwnerUid string `protobuf:"bytes,3,opt,name=owner_uid,json=ownerUid,proto3" json:"owner_uid,omitempty"` +} + +func (x *RemoveGroupMemberRequest) Reset() { + *x = RemoveGroupMemberRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_user_group_v1_group_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *RemoveGroupMemberRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*RemoveGroupMemberRequest) ProtoMessage() {} + +func (x *RemoveGroupMemberRequest) ProtoReflect() protoreflect.Message { + mi := &file_user_group_v1_group_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 RemoveGroupMemberRequest.ProtoReflect.Descriptor instead. +func (*RemoveGroupMemberRequest) Descriptor() ([]byte, []int) { + return file_user_group_v1_group_proto_rawDescGZIP(), []int{13} +} + +func (x *RemoveGroupMemberRequest) GetGid() string { + if x != nil { + return x.Gid + } + return "" +} + +func (x *RemoveGroupMemberRequest) GetUid() []string { + if x != nil { + return x.Uid + } + return nil +} + +func (x *RemoveGroupMemberRequest) GetOwnerUid() string { + if x != nil { + return x.OwnerUid + } + return "" +} + +type RemoveGroupMemberResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Response *response.BaseResponse `protobuf:"bytes,1,opt,name=response,proto3" json:"response,omitempty"` + Removed int32 `protobuf:"varint,2,opt,name=removed,proto3" json:"removed,omitempty"` +} + +func (x *RemoveGroupMemberResponse) Reset() { + *x = RemoveGroupMemberResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_user_group_v1_group_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *RemoveGroupMemberResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*RemoveGroupMemberResponse) ProtoMessage() {} + +func (x *RemoveGroupMemberResponse) ProtoReflect() protoreflect.Message { + mi := &file_user_group_v1_group_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 RemoveGroupMemberResponse.ProtoReflect.Descriptor instead. +func (*RemoveGroupMemberResponse) Descriptor() ([]byte, []int) { + return file_user_group_v1_group_proto_rawDescGZIP(), []int{14} +} + +func (x *RemoveGroupMemberResponse) GetResponse() *response.BaseResponse { + if x != nil { + return x.Response + } + return nil +} + +func (x *RemoveGroupMemberResponse) GetRemoved() int32 { + if x != nil { + return x.Removed + } + return 0 +} + +var File_user_group_v1_group_proto protoreflect.FileDescriptor + +var file_user_group_v1_group_proto_rawDesc = []byte{ + 0x0a, 0x19, 0x75, 0x73, 0x65, 0x72, 0x2f, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2f, 0x76, 0x31, 0x2f, + 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x11, 0x61, 0x70, 0x69, + 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2e, 0x76, 0x31, 0x1a, 0x12, + 0x75, 0x73, 0x65, 0x72, 0x2f, 0x76, 0x31, 0x2f, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x1a, 0x21, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x2f, 0x72, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2f, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x8f, 0x03, 0x0a, 0x05, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x12, + 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x02, 0x69, 0x64, 0x12, + 0x10, 0x0a, 0x03, 0x67, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x67, 0x69, + 0x64, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, + 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, 0x65, 0x73, 0x63, + 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x16, 0x0a, 0x06, 0x61, 0x76, 0x61, 0x74, 0x61, + 0x72, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x61, 0x76, 0x61, 0x74, 0x61, 0x72, 0x12, + 0x1b, 0x0a, 0x09, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x5f, 0x75, 0x69, 0x64, 0x18, 0x06, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x08, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x55, 0x69, 0x64, 0x12, 0x39, 0x0a, 0x05, + 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x61, 0x70, + 0x69, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2e, 0x76, 0x31, 0x2e, + 0x47, 0x72, 0x6f, 0x75, 0x70, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x48, 0x00, 0x52, 0x05, 0x6f, + 0x77, 0x6e, 0x65, 0x72, 0x88, 0x01, 0x01, 0x12, 0x38, 0x0a, 0x07, 0x6d, 0x65, 0x6d, 0x62, 0x65, + 0x72, 0x73, 0x18, 0x08, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x75, + 0x73, 0x65, 0x72, 0x2e, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x72, 0x6f, + 0x75, 0x70, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x52, 0x07, 0x6d, 0x65, 0x6d, 0x62, 0x65, 0x72, + 0x73, 0x12, 0x1f, 0x0a, 0x0b, 0x6d, 0x61, 0x78, 0x5f, 0x6d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x73, + 0x18, 0x09, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0a, 0x6d, 0x61, 0x78, 0x4d, 0x65, 0x6d, 0x62, 0x65, + 0x72, 0x73, 0x12, 0x21, 0x0a, 0x0c, 0x6d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x5f, 0x63, 0x6f, 0x75, + 0x6e, 0x74, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0b, 0x6d, 0x65, 0x6d, 0x62, 0x65, 0x72, + 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x36, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, + 0x0b, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1e, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x75, 0x73, 0x65, 0x72, + 0x2e, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x53, + 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x42, 0x08, 0x0a, + 0x06, 0x5f, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x22, 0xf3, 0x02, 0x0a, 0x0b, 0x47, 0x72, 0x6f, 0x75, + 0x70, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x03, 0x52, 0x02, 0x69, 0x64, 0x12, 0x10, 0x0a, 0x03, 0x67, 0x69, 0x64, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x67, 0x69, 0x64, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x69, 0x64, + 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x69, 0x64, 0x12, 0x2e, 0x0a, 0x05, 0x67, + 0x72, 0x6f, 0x75, 0x70, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x61, 0x70, 0x69, + 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2e, 0x76, 0x31, 0x2e, 0x47, + 0x72, 0x6f, 0x75, 0x70, 0x52, 0x05, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x12, 0x2a, 0x0a, 0x04, 0x75, + 0x73, 0x65, 0x72, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x61, 0x70, 0x69, 0x2e, + 0x75, 0x73, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x48, 0x00, 0x52, 0x04, + 0x75, 0x73, 0x65, 0x72, 0x88, 0x01, 0x01, 0x12, 0x3d, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, + 0x73, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x25, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x75, 0x73, + 0x65, 0x72, 0x2e, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x72, 0x6f, 0x75, + 0x70, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x06, + 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x37, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x07, + 0x20, 0x01, 0x28, 0x0e, 0x32, 0x23, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, + 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x4d, 0x65, + 0x6d, 0x62, 0x65, 0x72, 0x2e, 0x54, 0x79, 0x70, 0x65, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x22, + 0x2c, 0x0a, 0x06, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x10, 0x0a, 0x0c, 0x53, 0x74, 0x61, + 0x74, 0x75, 0x73, 0x41, 0x63, 0x74, 0x69, 0x76, 0x65, 0x10, 0x00, 0x12, 0x10, 0x0a, 0x0c, 0x53, + 0x74, 0x61, 0x74, 0x75, 0x73, 0x53, 0x69, 0x6c, 0x65, 0x6e, 0x74, 0x10, 0x01, 0x22, 0x25, 0x0a, + 0x04, 0x54, 0x79, 0x70, 0x65, 0x12, 0x0d, 0x0a, 0x09, 0x54, 0x79, 0x70, 0x65, 0x4f, 0x77, 0x6e, + 0x65, 0x72, 0x10, 0x00, 0x12, 0x0e, 0x0a, 0x0a, 0x54, 0x79, 0x70, 0x65, 0x4d, 0x65, 0x6d, 0x62, + 0x65, 0x72, 0x10, 0x01, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x75, 0x73, 0x65, 0x72, 0x22, 0x46, 0x0a, + 0x0f, 0x47, 0x65, 0x74, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x12, 0x10, 0x0a, 0x03, 0x67, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x67, + 0x69, 0x64, 0x12, 0x21, 0x0a, 0x0c, 0x77, 0x69, 0x74, 0x68, 0x5f, 0x6d, 0x65, 0x6d, 0x62, 0x65, + 0x72, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0b, 0x77, 0x69, 0x74, 0x68, 0x4d, 0x65, + 0x6d, 0x62, 0x65, 0x72, 0x73, 0x22, 0x84, 0x01, 0x0a, 0x10, 0x47, 0x65, 0x74, 0x47, 0x72, 0x6f, + 0x75, 0x70, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x40, 0x0a, 0x08, 0x72, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x61, + 0x70, 0x69, 0x2e, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x2e, 0x72, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x42, 0x61, 0x73, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x52, 0x08, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x2e, 0x0a, 0x05, + 0x67, 0x72, 0x6f, 0x75, 0x70, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x61, 0x70, + 0x69, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2e, 0x76, 0x31, 0x2e, + 0x47, 0x72, 0x6f, 0x75, 0x70, 0x52, 0x05, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x22, 0x56, 0x0a, 0x11, + 0x4c, 0x69, 0x73, 0x74, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, + 0x75, 0x69, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x70, 0x61, 0x67, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x05, 0x52, 0x04, 0x70, 0x61, 0x67, 0x65, 0x12, 0x1b, 0x0a, 0x09, 0x70, 0x61, 0x67, 0x65, 0x5f, + 0x73, 0x69, 0x7a, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x70, 0x61, 0x67, 0x65, + 0x53, 0x69, 0x7a, 0x65, 0x22, 0x88, 0x01, 0x0a, 0x12, 0x4c, 0x69, 0x73, 0x74, 0x47, 0x72, 0x6f, + 0x75, 0x70, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x40, 0x0a, 0x08, 0x72, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x24, 0x2e, + 0x61, 0x70, 0x69, 0x2e, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x2e, 0x72, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x42, 0x61, 0x73, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x52, 0x08, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x30, 0x0a, + 0x06, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x18, 0x2e, + 0x61, 0x70, 0x69, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2e, 0x76, + 0x31, 0x2e, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x52, 0x06, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x73, 0x22, + 0xa0, 0x01, 0x0a, 0x12, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 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, 0x20, 0x0a, 0x0b, 0x64, 0x65, + 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x16, 0x0a, 0x06, + 0x61, 0x76, 0x61, 0x74, 0x61, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x61, 0x76, + 0x61, 0x74, 0x61, 0x72, 0x12, 0x1b, 0x0a, 0x09, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x5f, 0x75, 0x69, + 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x55, 0x69, + 0x64, 0x12, 0x1f, 0x0a, 0x0b, 0x6d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x73, 0x5f, 0x75, 0x69, 0x64, + 0x18, 0x05, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0a, 0x6d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x73, 0x55, + 0x69, 0x64, 0x22, 0x87, 0x01, 0x0a, 0x13, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x47, 0x72, 0x6f, + 0x75, 0x70, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x40, 0x0a, 0x08, 0x72, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x61, + 0x70, 0x69, 0x2e, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x2e, 0x72, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x42, 0x61, 0x73, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x52, 0x08, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x2e, 0x0a, 0x05, + 0x67, 0x72, 0x6f, 0x75, 0x70, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x61, 0x70, + 0x69, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2e, 0x76, 0x31, 0x2e, + 0x47, 0x72, 0x6f, 0x75, 0x70, 0x52, 0x05, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x22, 0x86, 0x01, 0x0a, + 0x12, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x12, 0x10, 0x0a, 0x03, 0x67, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x03, 0x67, 0x69, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x64, 0x65, 0x73, + 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, + 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x16, 0x0a, 0x06, 0x61, + 0x76, 0x61, 0x74, 0x61, 0x72, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x61, 0x76, 0x61, + 0x74, 0x61, 0x72, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x69, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x03, 0x75, 0x69, 0x64, 0x22, 0x87, 0x01, 0x0a, 0x13, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, + 0x47, 0x72, 0x6f, 0x75, 0x70, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x40, 0x0a, + 0x08, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x24, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x2e, + 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x42, 0x61, 0x73, 0x65, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x52, 0x08, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, + 0x2e, 0x0a, 0x05, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x18, + 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2e, + 0x76, 0x31, 0x2e, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x52, 0x05, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x22, + 0x38, 0x0a, 0x12, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x10, 0x0a, 0x03, 0x67, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x03, 0x67, 0x69, 0x64, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x69, 0x64, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x69, 0x64, 0x22, 0x3b, 0x0a, 0x15, 0x41, 0x64, 0x64, + 0x47, 0x72, 0x6f, 0x75, 0x70, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x12, 0x10, 0x0a, 0x03, 0x67, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x03, 0x67, 0x69, 0x64, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x69, 0x64, 0x18, 0x02, 0x20, 0x03, 0x28, + 0x09, 0x52, 0x03, 0x75, 0x69, 0x64, 0x22, 0x70, 0x0a, 0x16, 0x41, 0x64, 0x64, 0x47, 0x72, 0x6f, + 0x75, 0x70, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x12, 0x40, 0x0a, 0x08, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, + 0x72, 0x74, 0x2e, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x42, 0x61, 0x73, 0x65, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x52, 0x08, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x61, 0x64, 0x64, 0x65, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x05, 0x52, 0x05, 0x61, 0x64, 0x64, 0x65, 0x64, 0x22, 0x5b, 0x0a, 0x18, 0x52, 0x65, 0x6d, 0x6f, + 0x76, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x12, 0x10, 0x0a, 0x03, 0x67, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x03, 0x67, 0x69, 0x64, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x69, 0x64, 0x18, 0x02, 0x20, + 0x03, 0x28, 0x09, 0x52, 0x03, 0x75, 0x69, 0x64, 0x12, 0x1b, 0x0a, 0x09, 0x6f, 0x77, 0x6e, 0x65, + 0x72, 0x5f, 0x75, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6f, 0x77, 0x6e, + 0x65, 0x72, 0x55, 0x69, 0x64, 0x22, 0x77, 0x0a, 0x19, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x47, + 0x72, 0x6f, 0x75, 0x70, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x12, 0x40, 0x0a, 0x08, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x74, 0x72, 0x61, 0x6e, 0x73, + 0x70, 0x6f, 0x72, 0x74, 0x2e, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x42, 0x61, + 0x73, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x52, 0x08, 0x72, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x72, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x64, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x07, 0x72, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x64, 0x2a, 0x25, + 0x0a, 0x0b, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x0a, 0x0a, + 0x06, 0x41, 0x63, 0x74, 0x69, 0x76, 0x65, 0x10, 0x00, 0x12, 0x0a, 0x0a, 0x06, 0x53, 0x69, 0x6c, + 0x65, 0x6e, 0x74, 0x10, 0x01, 0x32, 0xad, 0x05, 0x0a, 0x0c, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x53, + 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x53, 0x0a, 0x08, 0x47, 0x65, 0x74, 0x47, 0x72, 0x6f, + 0x75, 0x70, 0x12, 0x22, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x67, 0x72, + 0x6f, 0x75, 0x70, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x23, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x75, 0x73, 0x65, + 0x72, 0x2e, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x47, 0x72, + 0x6f, 0x75, 0x70, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x59, 0x0a, 0x0a, 0x4c, + 0x69, 0x73, 0x74, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x73, 0x12, 0x24, 0x2e, 0x61, 0x70, 0x69, 0x2e, + 0x75, 0x73, 0x65, 0x72, 0x2e, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x69, + 0x73, 0x74, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, + 0x25, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x67, 0x72, 0x6f, 0x75, 0x70, + 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x73, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x5c, 0x0a, 0x0b, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, + 0x47, 0x72, 0x6f, 0x75, 0x70, 0x12, 0x25, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x75, 0x73, 0x65, 0x72, + 0x2e, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, + 0x47, 0x72, 0x6f, 0x75, 0x70, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x26, 0x2e, 0x61, + 0x70, 0x69, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2e, 0x76, 0x31, + 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x5c, 0x0a, 0x0b, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x47, 0x72, + 0x6f, 0x75, 0x70, 0x12, 0x25, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x67, + 0x72, 0x6f, 0x75, 0x70, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x47, 0x72, + 0x6f, 0x75, 0x70, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x26, 0x2e, 0x61, 0x70, 0x69, + 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2e, 0x76, 0x31, 0x2e, 0x55, + 0x70, 0x64, 0x61, 0x74, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x12, 0x5a, 0x0a, 0x0b, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x47, 0x72, 0x6f, 0x75, + 0x70, 0x12, 0x25, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x67, 0x72, 0x6f, + 0x75, 0x70, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x47, 0x72, 0x6f, 0x75, + 0x70, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x24, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x74, + 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x2e, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x2e, 0x42, 0x61, 0x73, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x65, + 0x0a, 0x0e, 0x41, 0x64, 0x64, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, + 0x12, 0x28, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x67, 0x72, 0x6f, 0x75, + 0x70, 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x64, 0x64, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x4d, 0x65, 0x6d, + 0x62, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x29, 0x2e, 0x61, 0x70, 0x69, + 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2e, 0x76, 0x31, 0x2e, 0x41, + 0x64, 0x64, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x6e, 0x0a, 0x11, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x47, + 0x72, 0x6f, 0x75, 0x70, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x12, 0x2b, 0x2e, 0x61, 0x70, 0x69, + 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2e, 0x76, 0x31, 0x2e, 0x52, + 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2c, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x75, 0x73, + 0x65, 0x72, 0x2e, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x6d, 0x6f, + 0x76, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0x26, 0x5a, 0x24, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, + 0x63, 0x6f, 0x6d, 0x2f, 0x67, 0x6f, 0x2d, 0x67, 0x6f, 0x69, 0x6d, 0x2f, 0x61, 0x70, 0x69, 0x2f, + 0x75, 0x73, 0x65, 0x72, 0x2f, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2f, 0x76, 0x31, 0x62, 0x06, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_user_group_v1_group_proto_rawDescOnce sync.Once + file_user_group_v1_group_proto_rawDescData = file_user_group_v1_group_proto_rawDesc +) + +func file_user_group_v1_group_proto_rawDescGZIP() []byte { + file_user_group_v1_group_proto_rawDescOnce.Do(func() { + file_user_group_v1_group_proto_rawDescData = protoimpl.X.CompressGZIP(file_user_group_v1_group_proto_rawDescData) + }) + return file_user_group_v1_group_proto_rawDescData +} + +var file_user_group_v1_group_proto_enumTypes = make([]protoimpl.EnumInfo, 3) +var file_user_group_v1_group_proto_msgTypes = make([]protoimpl.MessageInfo, 15) +var file_user_group_v1_group_proto_goTypes = []interface{}{ + (GroupStatus)(0), // 0: api.user.group.v1.GroupStatus + (GroupMember_Status)(0), // 1: api.user.group.v1.GroupMember.Status + (GroupMember_Type)(0), // 2: api.user.group.v1.GroupMember.Type + (*Group)(nil), // 3: api.user.group.v1.Group + (*GroupMember)(nil), // 4: api.user.group.v1.GroupMember + (*GetGroupRequest)(nil), // 5: api.user.group.v1.GetGroupRequest + (*GetGroupResponse)(nil), // 6: api.user.group.v1.GetGroupResponse + (*ListGroupsRequest)(nil), // 7: api.user.group.v1.ListGroupsRequest + (*ListGroupsResponse)(nil), // 8: api.user.group.v1.ListGroupsResponse + (*CreateGroupRequest)(nil), // 9: api.user.group.v1.CreateGroupRequest + (*CreateGroupResponse)(nil), // 10: api.user.group.v1.CreateGroupResponse + (*UpdateGroupRequest)(nil), // 11: api.user.group.v1.UpdateGroupRequest + (*UpdateGroupResponse)(nil), // 12: api.user.group.v1.UpdateGroupResponse + (*DeleteGroupRequest)(nil), // 13: api.user.group.v1.DeleteGroupRequest + (*AddGroupMemberRequest)(nil), // 14: api.user.group.v1.AddGroupMemberRequest + (*AddGroupMemberResponse)(nil), // 15: api.user.group.v1.AddGroupMemberResponse + (*RemoveGroupMemberRequest)(nil), // 16: api.user.group.v1.RemoveGroupMemberRequest + (*RemoveGroupMemberResponse)(nil), // 17: api.user.group.v1.RemoveGroupMemberResponse + (*v1.User)(nil), // 18: api.user.v1.User + (*response.BaseResponse)(nil), // 19: api.transport.response.BaseResponse +} +var file_user_group_v1_group_proto_depIdxs = []int32{ + 4, // 0: api.user.group.v1.Group.owner:type_name -> api.user.group.v1.GroupMember + 4, // 1: api.user.group.v1.Group.members:type_name -> api.user.group.v1.GroupMember + 0, // 2: api.user.group.v1.Group.status:type_name -> api.user.group.v1.GroupStatus + 3, // 3: api.user.group.v1.GroupMember.group:type_name -> api.user.group.v1.Group + 18, // 4: api.user.group.v1.GroupMember.user:type_name -> api.user.v1.User + 1, // 5: api.user.group.v1.GroupMember.status:type_name -> api.user.group.v1.GroupMember.Status + 2, // 6: api.user.group.v1.GroupMember.type:type_name -> api.user.group.v1.GroupMember.Type + 19, // 7: api.user.group.v1.GetGroupResponse.response:type_name -> api.transport.response.BaseResponse + 3, // 8: api.user.group.v1.GetGroupResponse.group:type_name -> api.user.group.v1.Group + 19, // 9: api.user.group.v1.ListGroupsResponse.response:type_name -> api.transport.response.BaseResponse + 3, // 10: api.user.group.v1.ListGroupsResponse.groups:type_name -> api.user.group.v1.Group + 19, // 11: api.user.group.v1.CreateGroupResponse.response:type_name -> api.transport.response.BaseResponse + 3, // 12: api.user.group.v1.CreateGroupResponse.group:type_name -> api.user.group.v1.Group + 19, // 13: api.user.group.v1.UpdateGroupResponse.response:type_name -> api.transport.response.BaseResponse + 3, // 14: api.user.group.v1.UpdateGroupResponse.group:type_name -> api.user.group.v1.Group + 19, // 15: api.user.group.v1.AddGroupMemberResponse.response:type_name -> api.transport.response.BaseResponse + 19, // 16: api.user.group.v1.RemoveGroupMemberResponse.response:type_name -> api.transport.response.BaseResponse + 5, // 17: api.user.group.v1.GroupService.GetGroup:input_type -> api.user.group.v1.GetGroupRequest + 7, // 18: api.user.group.v1.GroupService.ListGroups:input_type -> api.user.group.v1.ListGroupsRequest + 9, // 19: api.user.group.v1.GroupService.CreateGroup:input_type -> api.user.group.v1.CreateGroupRequest + 11, // 20: api.user.group.v1.GroupService.UpdateGroup:input_type -> api.user.group.v1.UpdateGroupRequest + 13, // 21: api.user.group.v1.GroupService.DeleteGroup:input_type -> api.user.group.v1.DeleteGroupRequest + 14, // 22: api.user.group.v1.GroupService.AddGroupMember:input_type -> api.user.group.v1.AddGroupMemberRequest + 16, // 23: api.user.group.v1.GroupService.RemoveGroupMember:input_type -> api.user.group.v1.RemoveGroupMemberRequest + 6, // 24: api.user.group.v1.GroupService.GetGroup:output_type -> api.user.group.v1.GetGroupResponse + 8, // 25: api.user.group.v1.GroupService.ListGroups:output_type -> api.user.group.v1.ListGroupsResponse + 10, // 26: api.user.group.v1.GroupService.CreateGroup:output_type -> api.user.group.v1.CreateGroupResponse + 12, // 27: api.user.group.v1.GroupService.UpdateGroup:output_type -> api.user.group.v1.UpdateGroupResponse + 19, // 28: api.user.group.v1.GroupService.DeleteGroup:output_type -> api.transport.response.BaseResponse + 15, // 29: api.user.group.v1.GroupService.AddGroupMember:output_type -> api.user.group.v1.AddGroupMemberResponse + 17, // 30: api.user.group.v1.GroupService.RemoveGroupMember:output_type -> api.user.group.v1.RemoveGroupMemberResponse + 24, // [24:31] is the sub-list for method output_type + 17, // [17:24] is the sub-list for method input_type + 17, // [17:17] is the sub-list for extension type_name + 17, // [17:17] is the sub-list for extension extendee + 0, // [0:17] is the sub-list for field type_name +} + +func init() { file_user_group_v1_group_proto_init() } +func file_user_group_v1_group_proto_init() { + if File_user_group_v1_group_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_user_group_v1_group_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Group); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_user_group_v1_group_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GroupMember); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_user_group_v1_group_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetGroupRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_user_group_v1_group_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetGroupResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_user_group_v1_group_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ListGroupsRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_user_group_v1_group_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ListGroupsResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_user_group_v1_group_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*CreateGroupRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_user_group_v1_group_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*CreateGroupResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_user_group_v1_group_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*UpdateGroupRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_user_group_v1_group_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*UpdateGroupResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_user_group_v1_group_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*DeleteGroupRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_user_group_v1_group_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*AddGroupMemberRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_user_group_v1_group_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*AddGroupMemberResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_user_group_v1_group_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*RemoveGroupMemberRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_user_group_v1_group_proto_msgTypes[14].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*RemoveGroupMemberResponse); i { case 0: return &v.state case 1: @@ -402,13 +1624,15 @@ func file_user_group_v1_group_proto_init() { } } } + file_user_group_v1_group_proto_msgTypes[0].OneofWrappers = []interface{}{} + file_user_group_v1_group_proto_msgTypes[1].OneofWrappers = []interface{}{} type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_user_group_v1_group_proto_rawDesc, - NumEnums: 2, - NumMessages: 2, + NumEnums: 3, + NumMessages: 15, NumExtensions: 0, NumServices: 1, }, diff --git a/user/group/v1/group.pb.validate.go b/user/group/v1/group.pb.validate.go index 44c000a..4902003 100644 --- a/user/group/v1/group.pb.validate.go +++ b/user/group/v1/group.pb.validate.go @@ -58,19 +58,88 @@ func (m *Group) validate(all bool) error { // no validation rules for Id + // no validation rules for Gid + // no validation rules for Name // no validation rules for Description - // no validation rules for Type + // no validation rules for Avatar + + // no validation rules for OwnerUid + + for idx, item := range m.GetMembers() { + _, _ = idx, item + + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, GroupValidationError{ + field: fmt.Sprintf("Members[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, GroupValidationError{ + field: fmt.Sprintf("Members[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return GroupValidationError{ + field: fmt.Sprintf("Members[%v]", idx), + reason: "embedded message failed validation", + cause: err, + } + } + } + + } + + // no validation rules for MaxMembers + + // no validation rules for MemberCount // no validation rules for Status - // no validation rules for CreatedBy + if m.Owner != nil { - // no validation rules for CreatedAt + if all { + switch v := interface{}(m.GetOwner()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, GroupValidationError{ + field: "Owner", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, GroupValidationError{ + field: "Owner", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetOwner()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return GroupValidationError{ + field: "Owner", + reason: "embedded message failed validation", + cause: err, + } + } + } - // no validation rules for UpdatedAt + } if len(errors) > 0 { return GroupMultiError(errors) @@ -149,40 +218,113 @@ var _ interface { ErrorName() string } = GroupValidationError{} -// Validate checks the field values on Empty with the rules defined in the -// proto definition for this message. If any rules are violated, the first +// Validate checks the field values on GroupMember with the rules defined in +// the proto definition for this message. If any rules are violated, the first // error encountered is returned, or nil if there are no violations. -func (m *Empty) Validate() error { +func (m *GroupMember) Validate() error { return m.validate(false) } -// ValidateAll checks the field values on Empty with the rules defined in the -// proto definition for this message. If any rules are violated, the result is -// a list of violation errors wrapped in EmptyMultiError, or nil if none found. -func (m *Empty) ValidateAll() error { +// ValidateAll checks the field values on GroupMember with the rules defined in +// the proto definition for this message. If any rules are violated, the +// result is a list of violation errors wrapped in GroupMemberMultiError, or +// nil if none found. +func (m *GroupMember) ValidateAll() error { return m.validate(true) } -func (m *Empty) validate(all bool) error { +func (m *GroupMember) validate(all bool) error { if m == nil { return nil } var errors []error + // no validation rules for Id + + // no validation rules for Gid + + // no validation rules for Uid + + if all { + switch v := interface{}(m.GetGroup()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, GroupMemberValidationError{ + field: "Group", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, GroupMemberValidationError{ + field: "Group", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetGroup()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return GroupMemberValidationError{ + field: "Group", + reason: "embedded message failed validation", + cause: err, + } + } + } + + // no validation rules for Status + + // no validation rules for Type + + if m.User != nil { + + if all { + switch v := interface{}(m.GetUser()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, GroupMemberValidationError{ + field: "User", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, GroupMemberValidationError{ + field: "User", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetUser()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return GroupMemberValidationError{ + field: "User", + reason: "embedded message failed validation", + cause: err, + } + } + } + + } + if len(errors) > 0 { - return EmptyMultiError(errors) + return GroupMemberMultiError(errors) } return nil } -// EmptyMultiError is an error wrapping multiple validation errors returned by -// Empty.ValidateAll() if the designated constraints aren't met. -type EmptyMultiError []error +// GroupMemberMultiError is an error wrapping multiple validation errors +// returned by GroupMember.ValidateAll() if the designated constraints aren't met. +type GroupMemberMultiError []error // Error returns a concatenation of all the error messages it wraps. -func (m EmptyMultiError) Error() string { +func (m GroupMemberMultiError) Error() string { var msgs []string for _, err := range m { msgs = append(msgs, err.Error()) @@ -191,11 +333,379 @@ func (m EmptyMultiError) Error() string { } // AllErrors returns a list of validation violation errors. -func (m EmptyMultiError) AllErrors() []error { return m } +func (m GroupMemberMultiError) AllErrors() []error { return m } -// EmptyValidationError is the validation error returned by Empty.Validate if -// the designated constraints aren't met. -type EmptyValidationError struct { +// GroupMemberValidationError is the validation error returned by +// GroupMember.Validate if the designated constraints aren't met. +type GroupMemberValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e GroupMemberValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e GroupMemberValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e GroupMemberValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e GroupMemberValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e GroupMemberValidationError) ErrorName() string { return "GroupMemberValidationError" } + +// Error satisfies the builtin error interface +func (e GroupMemberValidationError) Error() string { + cause := "" + if e.cause != nil { + cause = fmt.Sprintf(" | caused by: %v", e.cause) + } + + key := "" + if e.key { + key = "key for " + } + + return fmt.Sprintf( + "invalid %sGroupMember.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = GroupMemberValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = GroupMemberValidationError{} + +// Validate checks the field values on GetGroupRequest with the rules defined +// in the proto definition for this message. If any rules are violated, the +// first error encountered is returned, or nil if there are no violations. +func (m *GetGroupRequest) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on GetGroupRequest with the rules +// defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// GetGroupRequestMultiError, or nil if none found. +func (m *GetGroupRequest) ValidateAll() error { + return m.validate(true) +} + +func (m *GetGroupRequest) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + // no validation rules for Gid + + // no validation rules for WithMembers + + if len(errors) > 0 { + return GetGroupRequestMultiError(errors) + } + + return nil +} + +// GetGroupRequestMultiError is an error wrapping multiple validation errors +// returned by GetGroupRequest.ValidateAll() if the designated constraints +// aren't met. +type GetGroupRequestMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m GetGroupRequestMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m GetGroupRequestMultiError) AllErrors() []error { return m } + +// GetGroupRequestValidationError is the validation error returned by +// GetGroupRequest.Validate if the designated constraints aren't met. +type GetGroupRequestValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e GetGroupRequestValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e GetGroupRequestValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e GetGroupRequestValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e GetGroupRequestValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e GetGroupRequestValidationError) ErrorName() string { return "GetGroupRequestValidationError" } + +// Error satisfies the builtin error interface +func (e GetGroupRequestValidationError) Error() string { + cause := "" + if e.cause != nil { + cause = fmt.Sprintf(" | caused by: %v", e.cause) + } + + key := "" + if e.key { + key = "key for " + } + + return fmt.Sprintf( + "invalid %sGetGroupRequest.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = GetGroupRequestValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = GetGroupRequestValidationError{} + +// Validate checks the field values on GetGroupResponse with the rules defined +// in the proto definition for this message. If any rules are violated, the +// first error encountered is returned, or nil if there are no violations. +func (m *GetGroupResponse) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on GetGroupResponse with the rules +// defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// GetGroupResponseMultiError, or nil if none found. +func (m *GetGroupResponse) ValidateAll() error { + return m.validate(true) +} + +func (m *GetGroupResponse) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + if all { + switch v := interface{}(m.GetResponse()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, GetGroupResponseValidationError{ + field: "Response", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, GetGroupResponseValidationError{ + field: "Response", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetResponse()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return GetGroupResponseValidationError{ + field: "Response", + reason: "embedded message failed validation", + cause: err, + } + } + } + + if all { + switch v := interface{}(m.GetGroup()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, GetGroupResponseValidationError{ + field: "Group", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, GetGroupResponseValidationError{ + field: "Group", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetGroup()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return GetGroupResponseValidationError{ + field: "Group", + reason: "embedded message failed validation", + cause: err, + } + } + } + + if len(errors) > 0 { + return GetGroupResponseMultiError(errors) + } + + return nil +} + +// GetGroupResponseMultiError is an error wrapping multiple validation errors +// returned by GetGroupResponse.ValidateAll() if the designated constraints +// aren't met. +type GetGroupResponseMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m GetGroupResponseMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m GetGroupResponseMultiError) AllErrors() []error { return m } + +// GetGroupResponseValidationError is the validation error returned by +// GetGroupResponse.Validate if the designated constraints aren't met. +type GetGroupResponseValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e GetGroupResponseValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e GetGroupResponseValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e GetGroupResponseValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e GetGroupResponseValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e GetGroupResponseValidationError) ErrorName() string { return "GetGroupResponseValidationError" } + +// Error satisfies the builtin error interface +func (e GetGroupResponseValidationError) Error() string { + cause := "" + if e.cause != nil { + cause = fmt.Sprintf(" | caused by: %v", e.cause) + } + + key := "" + if e.key { + key = "key for " + } + + return fmt.Sprintf( + "invalid %sGetGroupResponse.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = GetGroupResponseValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = GetGroupResponseValidationError{} + +// Validate checks the field values on ListGroupsRequest with the rules defined +// in the proto definition for this message. If any rules are violated, the +// first error encountered is returned, or nil if there are no violations. +func (m *ListGroupsRequest) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on ListGroupsRequest with the rules +// defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// ListGroupsRequestMultiError, or nil if none found. +func (m *ListGroupsRequest) ValidateAll() error { + return m.validate(true) +} + +func (m *ListGroupsRequest) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + // no validation rules for Uid + + // no validation rules for Page + + // no validation rules for PageSize + + if len(errors) > 0 { + return ListGroupsRequestMultiError(errors) + } + + return nil +} + +// ListGroupsRequestMultiError is an error wrapping multiple validation errors +// returned by ListGroupsRequest.ValidateAll() if the designated constraints +// aren't met. +type ListGroupsRequestMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m ListGroupsRequestMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m ListGroupsRequestMultiError) AllErrors() []error { return m } + +// ListGroupsRequestValidationError is the validation error returned by +// ListGroupsRequest.Validate if the designated constraints aren't met. +type ListGroupsRequestValidationError struct { field string reason string cause error @@ -203,22 +713,1313 @@ type EmptyValidationError struct { } // Field function returns field value. -func (e EmptyValidationError) Field() string { return e.field } +func (e ListGroupsRequestValidationError) Field() string { return e.field } // Reason function returns reason value. -func (e EmptyValidationError) Reason() string { return e.reason } +func (e ListGroupsRequestValidationError) Reason() string { return e.reason } // Cause function returns cause value. -func (e EmptyValidationError) Cause() error { return e.cause } +func (e ListGroupsRequestValidationError) Cause() error { return e.cause } // Key function returns key value. -func (e EmptyValidationError) Key() bool { return e.key } +func (e ListGroupsRequestValidationError) Key() bool { return e.key } // ErrorName returns error name. -func (e EmptyValidationError) ErrorName() string { return "EmptyValidationError" } +func (e ListGroupsRequestValidationError) ErrorName() string { + return "ListGroupsRequestValidationError" +} + +// Error satisfies the builtin error interface +func (e ListGroupsRequestValidationError) Error() string { + cause := "" + if e.cause != nil { + cause = fmt.Sprintf(" | caused by: %v", e.cause) + } + + key := "" + if e.key { + key = "key for " + } + + return fmt.Sprintf( + "invalid %sListGroupsRequest.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = ListGroupsRequestValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = ListGroupsRequestValidationError{} + +// Validate checks the field values on ListGroupsResponse with the rules +// defined in the proto definition for this message. If any rules are +// violated, the first error encountered is returned, or nil if there are no violations. +func (m *ListGroupsResponse) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on ListGroupsResponse with the rules +// defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// ListGroupsResponseMultiError, or nil if none found. +func (m *ListGroupsResponse) ValidateAll() error { + return m.validate(true) +} + +func (m *ListGroupsResponse) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + if all { + switch v := interface{}(m.GetResponse()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, ListGroupsResponseValidationError{ + field: "Response", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, ListGroupsResponseValidationError{ + field: "Response", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetResponse()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return ListGroupsResponseValidationError{ + field: "Response", + reason: "embedded message failed validation", + cause: err, + } + } + } + + for idx, item := range m.GetGroups() { + _, _ = idx, item + + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, ListGroupsResponseValidationError{ + field: fmt.Sprintf("Groups[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, ListGroupsResponseValidationError{ + field: fmt.Sprintf("Groups[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return ListGroupsResponseValidationError{ + field: fmt.Sprintf("Groups[%v]", idx), + reason: "embedded message failed validation", + cause: err, + } + } + } + + } + + if len(errors) > 0 { + return ListGroupsResponseMultiError(errors) + } + + return nil +} + +// ListGroupsResponseMultiError is an error wrapping multiple validation errors +// returned by ListGroupsResponse.ValidateAll() if the designated constraints +// aren't met. +type ListGroupsResponseMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m ListGroupsResponseMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m ListGroupsResponseMultiError) AllErrors() []error { return m } + +// ListGroupsResponseValidationError is the validation error returned by +// ListGroupsResponse.Validate if the designated constraints aren't met. +type ListGroupsResponseValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e ListGroupsResponseValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e ListGroupsResponseValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e ListGroupsResponseValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e ListGroupsResponseValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e ListGroupsResponseValidationError) ErrorName() string { + return "ListGroupsResponseValidationError" +} + +// Error satisfies the builtin error interface +func (e ListGroupsResponseValidationError) Error() string { + cause := "" + if e.cause != nil { + cause = fmt.Sprintf(" | caused by: %v", e.cause) + } + + key := "" + if e.key { + key = "key for " + } + + return fmt.Sprintf( + "invalid %sListGroupsResponse.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = ListGroupsResponseValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = ListGroupsResponseValidationError{} + +// Validate checks the field values on CreateGroupRequest with the rules +// defined in the proto definition for this message. If any rules are +// violated, the first error encountered is returned, or nil if there are no violations. +func (m *CreateGroupRequest) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on CreateGroupRequest with the rules +// defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// CreateGroupRequestMultiError, or nil if none found. +func (m *CreateGroupRequest) ValidateAll() error { + return m.validate(true) +} + +func (m *CreateGroupRequest) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + // no validation rules for Name + + // no validation rules for Description + + // no validation rules for Avatar + + // no validation rules for OwnerUid + + if len(errors) > 0 { + return CreateGroupRequestMultiError(errors) + } + + return nil +} + +// CreateGroupRequestMultiError is an error wrapping multiple validation errors +// returned by CreateGroupRequest.ValidateAll() if the designated constraints +// aren't met. +type CreateGroupRequestMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m CreateGroupRequestMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m CreateGroupRequestMultiError) AllErrors() []error { return m } + +// CreateGroupRequestValidationError is the validation error returned by +// CreateGroupRequest.Validate if the designated constraints aren't met. +type CreateGroupRequestValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e CreateGroupRequestValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e CreateGroupRequestValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e CreateGroupRequestValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e CreateGroupRequestValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e CreateGroupRequestValidationError) ErrorName() string { + return "CreateGroupRequestValidationError" +} + +// Error satisfies the builtin error interface +func (e CreateGroupRequestValidationError) Error() string { + cause := "" + if e.cause != nil { + cause = fmt.Sprintf(" | caused by: %v", e.cause) + } + + key := "" + if e.key { + key = "key for " + } + + return fmt.Sprintf( + "invalid %sCreateGroupRequest.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = CreateGroupRequestValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = CreateGroupRequestValidationError{} + +// Validate checks the field values on CreateGroupResponse with the rules +// defined in the proto definition for this message. If any rules are +// violated, the first error encountered is returned, or nil if there are no violations. +func (m *CreateGroupResponse) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on CreateGroupResponse with the rules +// defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// CreateGroupResponseMultiError, or nil if none found. +func (m *CreateGroupResponse) ValidateAll() error { + return m.validate(true) +} + +func (m *CreateGroupResponse) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + if all { + switch v := interface{}(m.GetResponse()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, CreateGroupResponseValidationError{ + field: "Response", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, CreateGroupResponseValidationError{ + field: "Response", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetResponse()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return CreateGroupResponseValidationError{ + field: "Response", + reason: "embedded message failed validation", + cause: err, + } + } + } + + if all { + switch v := interface{}(m.GetGroup()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, CreateGroupResponseValidationError{ + field: "Group", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, CreateGroupResponseValidationError{ + field: "Group", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetGroup()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return CreateGroupResponseValidationError{ + field: "Group", + reason: "embedded message failed validation", + cause: err, + } + } + } + + if len(errors) > 0 { + return CreateGroupResponseMultiError(errors) + } + + return nil +} + +// CreateGroupResponseMultiError is an error wrapping multiple validation +// errors returned by CreateGroupResponse.ValidateAll() if the designated +// constraints aren't met. +type CreateGroupResponseMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m CreateGroupResponseMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m CreateGroupResponseMultiError) AllErrors() []error { return m } + +// CreateGroupResponseValidationError is the validation error returned by +// CreateGroupResponse.Validate if the designated constraints aren't met. +type CreateGroupResponseValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e CreateGroupResponseValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e CreateGroupResponseValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e CreateGroupResponseValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e CreateGroupResponseValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e CreateGroupResponseValidationError) ErrorName() string { + return "CreateGroupResponseValidationError" +} + +// Error satisfies the builtin error interface +func (e CreateGroupResponseValidationError) Error() string { + cause := "" + if e.cause != nil { + cause = fmt.Sprintf(" | caused by: %v", e.cause) + } + + key := "" + if e.key { + key = "key for " + } + + return fmt.Sprintf( + "invalid %sCreateGroupResponse.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = CreateGroupResponseValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = CreateGroupResponseValidationError{} + +// Validate checks the field values on UpdateGroupRequest with the rules +// defined in the proto definition for this message. If any rules are +// violated, the first error encountered is returned, or nil if there are no violations. +func (m *UpdateGroupRequest) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on UpdateGroupRequest with the rules +// defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// UpdateGroupRequestMultiError, or nil if none found. +func (m *UpdateGroupRequest) ValidateAll() error { + return m.validate(true) +} + +func (m *UpdateGroupRequest) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + // no validation rules for Gid + + // no validation rules for Name + + // no validation rules for Description + + // no validation rules for Avatar + + // no validation rules for Uid + + if len(errors) > 0 { + return UpdateGroupRequestMultiError(errors) + } + + return nil +} + +// UpdateGroupRequestMultiError is an error wrapping multiple validation errors +// returned by UpdateGroupRequest.ValidateAll() if the designated constraints +// aren't met. +type UpdateGroupRequestMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m UpdateGroupRequestMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m UpdateGroupRequestMultiError) AllErrors() []error { return m } + +// UpdateGroupRequestValidationError is the validation error returned by +// UpdateGroupRequest.Validate if the designated constraints aren't met. +type UpdateGroupRequestValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e UpdateGroupRequestValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e UpdateGroupRequestValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e UpdateGroupRequestValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e UpdateGroupRequestValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e UpdateGroupRequestValidationError) ErrorName() string { + return "UpdateGroupRequestValidationError" +} + +// Error satisfies the builtin error interface +func (e UpdateGroupRequestValidationError) Error() string { + cause := "" + if e.cause != nil { + cause = fmt.Sprintf(" | caused by: %v", e.cause) + } + + key := "" + if e.key { + key = "key for " + } + + return fmt.Sprintf( + "invalid %sUpdateGroupRequest.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = UpdateGroupRequestValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = UpdateGroupRequestValidationError{} + +// Validate checks the field values on UpdateGroupResponse with the rules +// defined in the proto definition for this message. If any rules are +// violated, the first error encountered is returned, or nil if there are no violations. +func (m *UpdateGroupResponse) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on UpdateGroupResponse with the rules +// defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// UpdateGroupResponseMultiError, or nil if none found. +func (m *UpdateGroupResponse) ValidateAll() error { + return m.validate(true) +} + +func (m *UpdateGroupResponse) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + if all { + switch v := interface{}(m.GetResponse()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, UpdateGroupResponseValidationError{ + field: "Response", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, UpdateGroupResponseValidationError{ + field: "Response", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetResponse()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return UpdateGroupResponseValidationError{ + field: "Response", + reason: "embedded message failed validation", + cause: err, + } + } + } + + if all { + switch v := interface{}(m.GetGroup()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, UpdateGroupResponseValidationError{ + field: "Group", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, UpdateGroupResponseValidationError{ + field: "Group", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetGroup()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return UpdateGroupResponseValidationError{ + field: "Group", + reason: "embedded message failed validation", + cause: err, + } + } + } + + if len(errors) > 0 { + return UpdateGroupResponseMultiError(errors) + } + + return nil +} + +// UpdateGroupResponseMultiError is an error wrapping multiple validation +// errors returned by UpdateGroupResponse.ValidateAll() if the designated +// constraints aren't met. +type UpdateGroupResponseMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m UpdateGroupResponseMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m UpdateGroupResponseMultiError) AllErrors() []error { return m } + +// UpdateGroupResponseValidationError is the validation error returned by +// UpdateGroupResponse.Validate if the designated constraints aren't met. +type UpdateGroupResponseValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e UpdateGroupResponseValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e UpdateGroupResponseValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e UpdateGroupResponseValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e UpdateGroupResponseValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e UpdateGroupResponseValidationError) ErrorName() string { + return "UpdateGroupResponseValidationError" +} + +// Error satisfies the builtin error interface +func (e UpdateGroupResponseValidationError) Error() string { + cause := "" + if e.cause != nil { + cause = fmt.Sprintf(" | caused by: %v", e.cause) + } + + key := "" + if e.key { + key = "key for " + } + + return fmt.Sprintf( + "invalid %sUpdateGroupResponse.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = UpdateGroupResponseValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = UpdateGroupResponseValidationError{} + +// Validate checks the field values on DeleteGroupRequest with the rules +// defined in the proto definition for this message. If any rules are +// violated, the first error encountered is returned, or nil if there are no violations. +func (m *DeleteGroupRequest) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on DeleteGroupRequest with the rules +// defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// DeleteGroupRequestMultiError, or nil if none found. +func (m *DeleteGroupRequest) ValidateAll() error { + return m.validate(true) +} + +func (m *DeleteGroupRequest) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + // no validation rules for Gid + + // no validation rules for Uid + + if len(errors) > 0 { + return DeleteGroupRequestMultiError(errors) + } + + return nil +} + +// DeleteGroupRequestMultiError is an error wrapping multiple validation errors +// returned by DeleteGroupRequest.ValidateAll() if the designated constraints +// aren't met. +type DeleteGroupRequestMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m DeleteGroupRequestMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m DeleteGroupRequestMultiError) AllErrors() []error { return m } + +// DeleteGroupRequestValidationError is the validation error returned by +// DeleteGroupRequest.Validate if the designated constraints aren't met. +type DeleteGroupRequestValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e DeleteGroupRequestValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e DeleteGroupRequestValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e DeleteGroupRequestValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e DeleteGroupRequestValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e DeleteGroupRequestValidationError) ErrorName() string { + return "DeleteGroupRequestValidationError" +} + +// Error satisfies the builtin error interface +func (e DeleteGroupRequestValidationError) Error() string { + cause := "" + if e.cause != nil { + cause = fmt.Sprintf(" | caused by: %v", e.cause) + } + + key := "" + if e.key { + key = "key for " + } + + return fmt.Sprintf( + "invalid %sDeleteGroupRequest.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = DeleteGroupRequestValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = DeleteGroupRequestValidationError{} + +// Validate checks the field values on AddGroupMemberRequest with the rules +// defined in the proto definition for this message. If any rules are +// violated, the first error encountered is returned, or nil if there are no violations. +func (m *AddGroupMemberRequest) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on AddGroupMemberRequest with the rules +// defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// AddGroupMemberRequestMultiError, or nil if none found. +func (m *AddGroupMemberRequest) ValidateAll() error { + return m.validate(true) +} + +func (m *AddGroupMemberRequest) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + // no validation rules for Gid + + if len(errors) > 0 { + return AddGroupMemberRequestMultiError(errors) + } + + return nil +} + +// AddGroupMemberRequestMultiError is an error wrapping multiple validation +// errors returned by AddGroupMemberRequest.ValidateAll() if the designated +// constraints aren't met. +type AddGroupMemberRequestMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m AddGroupMemberRequestMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m AddGroupMemberRequestMultiError) AllErrors() []error { return m } + +// AddGroupMemberRequestValidationError is the validation error returned by +// AddGroupMemberRequest.Validate if the designated constraints aren't met. +type AddGroupMemberRequestValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e AddGroupMemberRequestValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e AddGroupMemberRequestValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e AddGroupMemberRequestValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e AddGroupMemberRequestValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e AddGroupMemberRequestValidationError) ErrorName() string { + return "AddGroupMemberRequestValidationError" +} + +// Error satisfies the builtin error interface +func (e AddGroupMemberRequestValidationError) Error() string { + cause := "" + if e.cause != nil { + cause = fmt.Sprintf(" | caused by: %v", e.cause) + } + + key := "" + if e.key { + key = "key for " + } + + return fmt.Sprintf( + "invalid %sAddGroupMemberRequest.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = AddGroupMemberRequestValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = AddGroupMemberRequestValidationError{} + +// Validate checks the field values on AddGroupMemberResponse with the rules +// defined in the proto definition for this message. If any rules are +// violated, the first error encountered is returned, or nil if there are no violations. +func (m *AddGroupMemberResponse) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on AddGroupMemberResponse with the rules +// defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// AddGroupMemberResponseMultiError, or nil if none found. +func (m *AddGroupMemberResponse) ValidateAll() error { + return m.validate(true) +} + +func (m *AddGroupMemberResponse) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + if all { + switch v := interface{}(m.GetResponse()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, AddGroupMemberResponseValidationError{ + field: "Response", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, AddGroupMemberResponseValidationError{ + field: "Response", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetResponse()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return AddGroupMemberResponseValidationError{ + field: "Response", + reason: "embedded message failed validation", + cause: err, + } + } + } + + // no validation rules for Added + + if len(errors) > 0 { + return AddGroupMemberResponseMultiError(errors) + } + + return nil +} + +// AddGroupMemberResponseMultiError is an error wrapping multiple validation +// errors returned by AddGroupMemberResponse.ValidateAll() if the designated +// constraints aren't met. +type AddGroupMemberResponseMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m AddGroupMemberResponseMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m AddGroupMemberResponseMultiError) AllErrors() []error { return m } + +// AddGroupMemberResponseValidationError is the validation error returned by +// AddGroupMemberResponse.Validate if the designated constraints aren't met. +type AddGroupMemberResponseValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e AddGroupMemberResponseValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e AddGroupMemberResponseValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e AddGroupMemberResponseValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e AddGroupMemberResponseValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e AddGroupMemberResponseValidationError) ErrorName() string { + return "AddGroupMemberResponseValidationError" +} + +// Error satisfies the builtin error interface +func (e AddGroupMemberResponseValidationError) Error() string { + cause := "" + if e.cause != nil { + cause = fmt.Sprintf(" | caused by: %v", e.cause) + } + + key := "" + if e.key { + key = "key for " + } + + return fmt.Sprintf( + "invalid %sAddGroupMemberResponse.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = AddGroupMemberResponseValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = AddGroupMemberResponseValidationError{} + +// Validate checks the field values on RemoveGroupMemberRequest with the rules +// defined in the proto definition for this message. If any rules are +// violated, the first error encountered is returned, or nil if there are no violations. +func (m *RemoveGroupMemberRequest) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on RemoveGroupMemberRequest with the +// rules defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// RemoveGroupMemberRequestMultiError, or nil if none found. +func (m *RemoveGroupMemberRequest) ValidateAll() error { + return m.validate(true) +} + +func (m *RemoveGroupMemberRequest) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + // no validation rules for Gid + + // no validation rules for OwnerUid + + if len(errors) > 0 { + return RemoveGroupMemberRequestMultiError(errors) + } + + return nil +} + +// RemoveGroupMemberRequestMultiError is an error wrapping multiple validation +// errors returned by RemoveGroupMemberRequest.ValidateAll() if the designated +// constraints aren't met. +type RemoveGroupMemberRequestMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m RemoveGroupMemberRequestMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m RemoveGroupMemberRequestMultiError) AllErrors() []error { return m } + +// RemoveGroupMemberRequestValidationError is the validation error returned by +// RemoveGroupMemberRequest.Validate if the designated constraints aren't met. +type RemoveGroupMemberRequestValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e RemoveGroupMemberRequestValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e RemoveGroupMemberRequestValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e RemoveGroupMemberRequestValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e RemoveGroupMemberRequestValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e RemoveGroupMemberRequestValidationError) ErrorName() string { + return "RemoveGroupMemberRequestValidationError" +} + +// Error satisfies the builtin error interface +func (e RemoveGroupMemberRequestValidationError) Error() string { + cause := "" + if e.cause != nil { + cause = fmt.Sprintf(" | caused by: %v", e.cause) + } + + key := "" + if e.key { + key = "key for " + } + + return fmt.Sprintf( + "invalid %sRemoveGroupMemberRequest.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = RemoveGroupMemberRequestValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = RemoveGroupMemberRequestValidationError{} + +// Validate checks the field values on RemoveGroupMemberResponse with the rules +// defined in the proto definition for this message. If any rules are +// violated, the first error encountered is returned, or nil if there are no violations. +func (m *RemoveGroupMemberResponse) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on RemoveGroupMemberResponse with the +// rules defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// RemoveGroupMemberResponseMultiError, or nil if none found. +func (m *RemoveGroupMemberResponse) ValidateAll() error { + return m.validate(true) +} + +func (m *RemoveGroupMemberResponse) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + if all { + switch v := interface{}(m.GetResponse()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, RemoveGroupMemberResponseValidationError{ + field: "Response", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, RemoveGroupMemberResponseValidationError{ + field: "Response", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetResponse()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return RemoveGroupMemberResponseValidationError{ + field: "Response", + reason: "embedded message failed validation", + cause: err, + } + } + } + + // no validation rules for Removed + + if len(errors) > 0 { + return RemoveGroupMemberResponseMultiError(errors) + } + + return nil +} + +// RemoveGroupMemberResponseMultiError is an error wrapping multiple validation +// errors returned by RemoveGroupMemberResponse.ValidateAll() if the +// designated constraints aren't met. +type RemoveGroupMemberResponseMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m RemoveGroupMemberResponseMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m RemoveGroupMemberResponseMultiError) AllErrors() []error { return m } + +// RemoveGroupMemberResponseValidationError is the validation error returned by +// RemoveGroupMemberResponse.Validate if the designated constraints aren't met. +type RemoveGroupMemberResponseValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e RemoveGroupMemberResponseValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e RemoveGroupMemberResponseValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e RemoveGroupMemberResponseValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e RemoveGroupMemberResponseValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e RemoveGroupMemberResponseValidationError) ErrorName() string { + return "RemoveGroupMemberResponseValidationError" +} // Error satisfies the builtin error interface -func (e EmptyValidationError) Error() string { +func (e RemoveGroupMemberResponseValidationError) Error() string { cause := "" if e.cause != nil { cause = fmt.Sprintf(" | caused by: %v", e.cause) @@ -230,14 +2031,14 @@ func (e EmptyValidationError) Error() string { } return fmt.Sprintf( - "invalid %sEmpty.%s: %s%s", + "invalid %sRemoveGroupMemberResponse.%s: %s%s", key, e.field, e.reason, cause) } -var _ error = EmptyValidationError{} +var _ error = RemoveGroupMemberResponseValidationError{} var _ interface { Field() string @@ -245,4 +2046,4 @@ var _ interface { Key() bool Cause() error ErrorName() string -} = EmptyValidationError{} +} = RemoveGroupMemberResponseValidationError{} diff --git a/user/group/v1/group.proto b/user/group/v1/group.proto index 9d99f65..3fcc0d2 100644 --- a/user/group/v1/group.proto +++ b/user/group/v1/group.proto @@ -5,38 +5,144 @@ option go_package = "github.com/go-goim/api/user/group/v1"; import "user/v1/user.proto"; +import "transport/response/response.proto"; + message Group { - int64 id = 1; + int64 id = 1; // use as session id + string gid = 2; + string name = 3; + string description = 4; + string avatar = 5; + string owner_uid = 6; + optional GroupMember owner = 7; + repeated GroupMember members = 8; + int32 max_members = 9; + int32 member_count = 10; + GroupStatus status = 11; +} + +enum GroupStatus { + Active = 0; + Silent = 1; + // more statuses +} + +message GroupMember { + int64 id = 1; // use as session id + string gid = 2; + string uid = 3; + Group group = 4; + optional user.v1.User user = 5; + enum Status { + StatusActive = 0; + StatusSilent = 1; + // more statuses + } + Status status = 6; + enum Type { + TypeOwner = 0; + TypeMember = 1; + // more types + } + Type type = 7; +} + +// GetGroup + +message GetGroupRequest { + string gid = 1; + bool with_members = 2; +} + +message GetGroupResponse { + transport.response.BaseResponse response = 1; + Group group = 2; +} + +// ListGroups + +message ListGroupsRequest { + // list all groups no matter user is member or owner. + string uid = 1; + int32 page = 2; + int32 page_size = 3; +} + +message ListGroupsResponse { + transport.response.BaseResponse response = 1; + repeated Group groups = 2; +} + +// CreateGroup + +message CreateGroupRequest { + string name = 1; + string description = 2; + string avatar = 3; + string owner_uid = 4; + repeated string members_uid = 5; +} + +message CreateGroupResponse { + transport.response.BaseResponse response = 1; + Group group = 2; +} + +// UpdateGroup + +message UpdateGroupRequest { + string gid = 1; string name = 2; string description = 3; - GroupType type = 4; - GroupStatus status = 5; - string created_by = 6; - repeated string members = 7; - int64 created_at = 8; - int64 updated_at = 9; + string avatar = 4; + string uid = 5; // current user id } +message UpdateGroupResponse { + transport.response.BaseResponse response = 1; + Group group = 2; +} + +// DeleteGroup -enum GroupType { - Normal = 0; - // more types +message DeleteGroupRequest { + string gid = 1; + string uid = 2; } -enum GroupStatus { - Active = 0; - Silent = 1; - // more statuses +// AddGroupMember + +message AddGroupMemberRequest { + string gid = 1; + repeated string uid = 2; +} + +message AddGroupMemberResponse { + transport.response.BaseResponse response = 1; + int32 added = 2; +} + + +// RemoveGroupMember + +message RemoveGroupMemberRequest { + string gid = 1; + repeated string uid = 2; + string owner_uid = 3; +} + +message RemoveGroupMemberResponse { + transport.response.BaseResponse response = 1; + int32 removed = 2; } -message Empty {} service GroupService { - rpc GetGroup(Empty) returns (Group); - rpc CreateGroup(Empty) returns (Group); - rpc UpdateGroup(Empty) returns (Group); - rpc DeleteGroup(Empty) returns (Empty); - rpc GetGroupMembers(Empty) returns (user.v1.UserList); - rpc AddGroupMember(Empty) returns (Empty); - rpc RemoveGroupMember(Empty) returns (Empty); + rpc GetGroup(GetGroupRequest) returns (GetGroupResponse); + rpc ListGroups(ListGroupsRequest) returns (ListGroupsResponse); + rpc CreateGroup(CreateGroupRequest) returns (CreateGroupResponse); + rpc UpdateGroup(UpdateGroupRequest) returns (UpdateGroupResponse); + rpc DeleteGroup(DeleteGroupRequest) returns (transport.response.BaseResponse); + rpc AddGroupMember(AddGroupMemberRequest) returns (AddGroupMemberResponse); + rpc RemoveGroupMember(RemoveGroupMemberRequest) returns (RemoveGroupMemberResponse); } \ No newline at end of file diff --git a/user/group/v1/group_grpc.pb.go b/user/group/v1/group_grpc.pb.go index a417b1d..1ec16cd 100644 --- a/user/group/v1/group_grpc.pb.go +++ b/user/group/v1/group_grpc.pb.go @@ -4,7 +4,7 @@ package v1 import ( context "context" - v1 "github.com/go-goim/api/user/v1" + response "github.com/go-goim/api/transport/response" grpc "google.golang.org/grpc" codes "google.golang.org/grpc/codes" status "google.golang.org/grpc/status" @@ -19,13 +19,13 @@ const _ = grpc.SupportPackageIsVersion7 // // 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 GroupServiceClient interface { - GetGroup(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*Group, error) - CreateGroup(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*Group, error) - UpdateGroup(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*Group, error) - DeleteGroup(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*Empty, error) - GetGroupMembers(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*v1.UserList, error) - AddGroupMember(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*Empty, error) - RemoveGroupMember(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*Empty, error) + GetGroup(ctx context.Context, in *GetGroupRequest, opts ...grpc.CallOption) (*GetGroupResponse, error) + ListGroups(ctx context.Context, in *ListGroupsRequest, opts ...grpc.CallOption) (*ListGroupsResponse, error) + CreateGroup(ctx context.Context, in *CreateGroupRequest, opts ...grpc.CallOption) (*CreateGroupResponse, error) + UpdateGroup(ctx context.Context, in *UpdateGroupRequest, opts ...grpc.CallOption) (*UpdateGroupResponse, error) + DeleteGroup(ctx context.Context, in *DeleteGroupRequest, opts ...grpc.CallOption) (*response.BaseResponse, error) + AddGroupMember(ctx context.Context, in *AddGroupMemberRequest, opts ...grpc.CallOption) (*AddGroupMemberResponse, error) + RemoveGroupMember(ctx context.Context, in *RemoveGroupMemberRequest, opts ...grpc.CallOption) (*RemoveGroupMemberResponse, error) } type groupServiceClient struct { @@ -36,8 +36,8 @@ func NewGroupServiceClient(cc grpc.ClientConnInterface) GroupServiceClient { return &groupServiceClient{cc} } -func (c *groupServiceClient) GetGroup(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*Group, error) { - out := new(Group) +func (c *groupServiceClient) GetGroup(ctx context.Context, in *GetGroupRequest, opts ...grpc.CallOption) (*GetGroupResponse, error) { + out := new(GetGroupResponse) err := c.cc.Invoke(ctx, "/api.user.group.v1.GroupService/GetGroup", in, out, opts...) if err != nil { return nil, err @@ -45,44 +45,44 @@ func (c *groupServiceClient) GetGroup(ctx context.Context, in *Empty, opts ...gr return out, nil } -func (c *groupServiceClient) CreateGroup(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*Group, error) { - out := new(Group) - err := c.cc.Invoke(ctx, "/api.user.group.v1.GroupService/CreateGroup", in, out, opts...) +func (c *groupServiceClient) ListGroups(ctx context.Context, in *ListGroupsRequest, opts ...grpc.CallOption) (*ListGroupsResponse, error) { + out := new(ListGroupsResponse) + err := c.cc.Invoke(ctx, "/api.user.group.v1.GroupService/ListGroups", in, out, opts...) if err != nil { return nil, err } return out, nil } -func (c *groupServiceClient) UpdateGroup(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*Group, error) { - out := new(Group) - err := c.cc.Invoke(ctx, "/api.user.group.v1.GroupService/UpdateGroup", in, out, opts...) +func (c *groupServiceClient) CreateGroup(ctx context.Context, in *CreateGroupRequest, opts ...grpc.CallOption) (*CreateGroupResponse, error) { + out := new(CreateGroupResponse) + err := c.cc.Invoke(ctx, "/api.user.group.v1.GroupService/CreateGroup", in, out, opts...) if err != nil { return nil, err } return out, nil } -func (c *groupServiceClient) DeleteGroup(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*Empty, error) { - out := new(Empty) - err := c.cc.Invoke(ctx, "/api.user.group.v1.GroupService/DeleteGroup", in, out, opts...) +func (c *groupServiceClient) UpdateGroup(ctx context.Context, in *UpdateGroupRequest, opts ...grpc.CallOption) (*UpdateGroupResponse, error) { + out := new(UpdateGroupResponse) + err := c.cc.Invoke(ctx, "/api.user.group.v1.GroupService/UpdateGroup", in, out, opts...) if err != nil { return nil, err } return out, nil } -func (c *groupServiceClient) GetGroupMembers(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*v1.UserList, error) { - out := new(v1.UserList) - err := c.cc.Invoke(ctx, "/api.user.group.v1.GroupService/GetGroupMembers", in, out, opts...) +func (c *groupServiceClient) DeleteGroup(ctx context.Context, in *DeleteGroupRequest, opts ...grpc.CallOption) (*response.BaseResponse, error) { + out := new(response.BaseResponse) + err := c.cc.Invoke(ctx, "/api.user.group.v1.GroupService/DeleteGroup", in, out, opts...) if err != nil { return nil, err } return out, nil } -func (c *groupServiceClient) AddGroupMember(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*Empty, error) { - out := new(Empty) +func (c *groupServiceClient) AddGroupMember(ctx context.Context, in *AddGroupMemberRequest, opts ...grpc.CallOption) (*AddGroupMemberResponse, error) { + out := new(AddGroupMemberResponse) err := c.cc.Invoke(ctx, "/api.user.group.v1.GroupService/AddGroupMember", in, out, opts...) if err != nil { return nil, err @@ -90,8 +90,8 @@ func (c *groupServiceClient) AddGroupMember(ctx context.Context, in *Empty, opts return out, nil } -func (c *groupServiceClient) RemoveGroupMember(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*Empty, error) { - out := new(Empty) +func (c *groupServiceClient) RemoveGroupMember(ctx context.Context, in *RemoveGroupMemberRequest, opts ...grpc.CallOption) (*RemoveGroupMemberResponse, error) { + out := new(RemoveGroupMemberResponse) err := c.cc.Invoke(ctx, "/api.user.group.v1.GroupService/RemoveGroupMember", in, out, opts...) if err != nil { return nil, err @@ -103,13 +103,13 @@ func (c *groupServiceClient) RemoveGroupMember(ctx context.Context, in *Empty, o // All implementations must embed UnimplementedGroupServiceServer // for forward compatibility type GroupServiceServer interface { - GetGroup(context.Context, *Empty) (*Group, error) - CreateGroup(context.Context, *Empty) (*Group, error) - UpdateGroup(context.Context, *Empty) (*Group, error) - DeleteGroup(context.Context, *Empty) (*Empty, error) - GetGroupMembers(context.Context, *Empty) (*v1.UserList, error) - AddGroupMember(context.Context, *Empty) (*Empty, error) - RemoveGroupMember(context.Context, *Empty) (*Empty, error) + GetGroup(context.Context, *GetGroupRequest) (*GetGroupResponse, error) + ListGroups(context.Context, *ListGroupsRequest) (*ListGroupsResponse, error) + CreateGroup(context.Context, *CreateGroupRequest) (*CreateGroupResponse, error) + UpdateGroup(context.Context, *UpdateGroupRequest) (*UpdateGroupResponse, error) + DeleteGroup(context.Context, *DeleteGroupRequest) (*response.BaseResponse, error) + AddGroupMember(context.Context, *AddGroupMemberRequest) (*AddGroupMemberResponse, error) + RemoveGroupMember(context.Context, *RemoveGroupMemberRequest) (*RemoveGroupMemberResponse, error) mustEmbedUnimplementedGroupServiceServer() } @@ -117,25 +117,25 @@ type GroupServiceServer interface { type UnimplementedGroupServiceServer struct { } -func (UnimplementedGroupServiceServer) GetGroup(context.Context, *Empty) (*Group, error) { +func (UnimplementedGroupServiceServer) GetGroup(context.Context, *GetGroupRequest) (*GetGroupResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method GetGroup not implemented") } -func (UnimplementedGroupServiceServer) CreateGroup(context.Context, *Empty) (*Group, error) { +func (UnimplementedGroupServiceServer) ListGroups(context.Context, *ListGroupsRequest) (*ListGroupsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method ListGroups not implemented") +} +func (UnimplementedGroupServiceServer) CreateGroup(context.Context, *CreateGroupRequest) (*CreateGroupResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method CreateGroup not implemented") } -func (UnimplementedGroupServiceServer) UpdateGroup(context.Context, *Empty) (*Group, error) { +func (UnimplementedGroupServiceServer) UpdateGroup(context.Context, *UpdateGroupRequest) (*UpdateGroupResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method UpdateGroup not implemented") } -func (UnimplementedGroupServiceServer) DeleteGroup(context.Context, *Empty) (*Empty, error) { +func (UnimplementedGroupServiceServer) DeleteGroup(context.Context, *DeleteGroupRequest) (*response.BaseResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method DeleteGroup not implemented") } -func (UnimplementedGroupServiceServer) GetGroupMembers(context.Context, *Empty) (*v1.UserList, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetGroupMembers not implemented") -} -func (UnimplementedGroupServiceServer) AddGroupMember(context.Context, *Empty) (*Empty, error) { +func (UnimplementedGroupServiceServer) AddGroupMember(context.Context, *AddGroupMemberRequest) (*AddGroupMemberResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method AddGroupMember not implemented") } -func (UnimplementedGroupServiceServer) RemoveGroupMember(context.Context, *Empty) (*Empty, error) { +func (UnimplementedGroupServiceServer) RemoveGroupMember(context.Context, *RemoveGroupMemberRequest) (*RemoveGroupMemberResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method RemoveGroupMember not implemented") } func (UnimplementedGroupServiceServer) mustEmbedUnimplementedGroupServiceServer() {} @@ -152,7 +152,7 @@ func RegisterGroupServiceServer(s grpc.ServiceRegistrar, srv GroupServiceServer) } func _GroupService_GetGroup_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(Empty) + in := new(GetGroupRequest) if err := dec(in); err != nil { return nil, err } @@ -164,85 +164,85 @@ func _GroupService_GetGroup_Handler(srv interface{}, ctx context.Context, dec fu FullMethod: "/api.user.group.v1.GroupService/GetGroup", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(GroupServiceServer).GetGroup(ctx, req.(*Empty)) + return srv.(GroupServiceServer).GetGroup(ctx, req.(*GetGroupRequest)) } return interceptor(ctx, in, info, handler) } -func _GroupService_CreateGroup_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(Empty) +func _GroupService_ListGroups_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ListGroupsRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { - return srv.(GroupServiceServer).CreateGroup(ctx, in) + return srv.(GroupServiceServer).ListGroups(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/api.user.group.v1.GroupService/CreateGroup", + FullMethod: "/api.user.group.v1.GroupService/ListGroups", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(GroupServiceServer).CreateGroup(ctx, req.(*Empty)) + return srv.(GroupServiceServer).ListGroups(ctx, req.(*ListGroupsRequest)) } return interceptor(ctx, in, info, handler) } -func _GroupService_UpdateGroup_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(Empty) +func _GroupService_CreateGroup_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(CreateGroupRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { - return srv.(GroupServiceServer).UpdateGroup(ctx, in) + return srv.(GroupServiceServer).CreateGroup(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/api.user.group.v1.GroupService/UpdateGroup", + FullMethod: "/api.user.group.v1.GroupService/CreateGroup", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(GroupServiceServer).UpdateGroup(ctx, req.(*Empty)) + return srv.(GroupServiceServer).CreateGroup(ctx, req.(*CreateGroupRequest)) } return interceptor(ctx, in, info, handler) } -func _GroupService_DeleteGroup_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(Empty) +func _GroupService_UpdateGroup_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(UpdateGroupRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { - return srv.(GroupServiceServer).DeleteGroup(ctx, in) + return srv.(GroupServiceServer).UpdateGroup(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/api.user.group.v1.GroupService/DeleteGroup", + FullMethod: "/api.user.group.v1.GroupService/UpdateGroup", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(GroupServiceServer).DeleteGroup(ctx, req.(*Empty)) + return srv.(GroupServiceServer).UpdateGroup(ctx, req.(*UpdateGroupRequest)) } return interceptor(ctx, in, info, handler) } -func _GroupService_GetGroupMembers_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(Empty) +func _GroupService_DeleteGroup_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(DeleteGroupRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { - return srv.(GroupServiceServer).GetGroupMembers(ctx, in) + return srv.(GroupServiceServer).DeleteGroup(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/api.user.group.v1.GroupService/GetGroupMembers", + FullMethod: "/api.user.group.v1.GroupService/DeleteGroup", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(GroupServiceServer).GetGroupMembers(ctx, req.(*Empty)) + return srv.(GroupServiceServer).DeleteGroup(ctx, req.(*DeleteGroupRequest)) } return interceptor(ctx, in, info, handler) } func _GroupService_AddGroupMember_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(Empty) + in := new(AddGroupMemberRequest) if err := dec(in); err != nil { return nil, err } @@ -254,13 +254,13 @@ func _GroupService_AddGroupMember_Handler(srv interface{}, ctx context.Context, FullMethod: "/api.user.group.v1.GroupService/AddGroupMember", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(GroupServiceServer).AddGroupMember(ctx, req.(*Empty)) + return srv.(GroupServiceServer).AddGroupMember(ctx, req.(*AddGroupMemberRequest)) } return interceptor(ctx, in, info, handler) } func _GroupService_RemoveGroupMember_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(Empty) + in := new(RemoveGroupMemberRequest) if err := dec(in); err != nil { return nil, err } @@ -272,7 +272,7 @@ func _GroupService_RemoveGroupMember_Handler(srv interface{}, ctx context.Contex FullMethod: "/api.user.group.v1.GroupService/RemoveGroupMember", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(GroupServiceServer).RemoveGroupMember(ctx, req.(*Empty)) + return srv.(GroupServiceServer).RemoveGroupMember(ctx, req.(*RemoveGroupMemberRequest)) } return interceptor(ctx, in, info, handler) } @@ -288,6 +288,10 @@ var GroupService_ServiceDesc = grpc.ServiceDesc{ MethodName: "GetGroup", Handler: _GroupService_GetGroup_Handler, }, + { + MethodName: "ListGroups", + Handler: _GroupService_ListGroups_Handler, + }, { MethodName: "CreateGroup", Handler: _GroupService_CreateGroup_Handler, @@ -300,10 +304,6 @@ var GroupService_ServiceDesc = grpc.ServiceDesc{ MethodName: "DeleteGroup", Handler: _GroupService_DeleteGroup_Handler, }, - { - MethodName: "GetGroupMembers", - Handler: _GroupService_GetGroupMembers_Handler, - }, { MethodName: "AddGroupMember", Handler: _GroupService_AddGroupMember_Handler, diff --git a/user/v1/user.pb.go b/user/v1/user.pb.go index 0dac113..153f2b0 100644 --- a/user/v1/user.pb.go +++ b/user/v1/user.pb.go @@ -301,11 +301,11 @@ type User struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Uid string `protobuf:"bytes,1,opt,name=uid,proto3" json:"uid,omitempty"` - Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` - Email string `protobuf:"bytes,3,opt,name=email,proto3" json:"email,omitempty"` - Phone string `protobuf:"bytes,4,opt,name=phone,proto3" json:"phone,omitempty"` - Avatar string `protobuf:"bytes,5,opt,name=avatar,proto3" json:"avatar,omitempty"` + Uid string `protobuf:"bytes,1,opt,name=uid,proto3" json:"uid,omitempty"` + Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` + Email *string `protobuf:"bytes,3,opt,name=email,proto3,oneof" json:"email,omitempty"` + Phone *string `protobuf:"bytes,4,opt,name=phone,proto3,oneof" json:"phone,omitempty"` + Avatar string `protobuf:"bytes,5,opt,name=avatar,proto3" json:"avatar,omitempty"` // ws_url is url of user need connect via ws or tcp ConnectUrl *string `protobuf:"bytes,6,opt,name=connect_url,json=connectUrl,proto3,oneof" json:"connect_url,omitempty"` // 0: first time login, need connect to push server @@ -360,15 +360,15 @@ func (x *User) GetName() string { } func (x *User) GetEmail() string { - if x != nil { - return x.Email + if x != nil && x.Email != nil { + return *x.Email } return "" } func (x *User) GetPhone() string { - if x != nil { - return x.Phone + if x != nil && x.Phone != nil { + return *x.Phone } return "" } @@ -881,102 +881,104 @@ var file_user_v1_user_proto_rawDesc = []byte{ 0x01, 0x28, 0x03, 0x52, 0x09, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x70, 0x68, 0x6f, 0x6e, 0x65, 0x42, 0x11, 0x0a, 0x0f, 0x5f, 0x70, 0x75, 0x73, 0x68, 0x5f, 0x73, 0x65, 0x72, 0x76, - 0x65, 0x72, 0x5f, 0x69, 0x70, 0x22, 0xe3, 0x01, 0x0a, 0x04, 0x55, 0x73, 0x65, 0x72, 0x12, 0x10, + 0x65, 0x72, 0x5f, 0x69, 0x70, 0x22, 0x81, 0x02, 0x0a, 0x04, 0x55, 0x73, 0x65, 0x72, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x69, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, - 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x18, 0x03, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x05, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x12, 0x14, 0x0a, 0x05, 0x70, 0x68, - 0x6f, 0x6e, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x70, 0x68, 0x6f, 0x6e, 0x65, - 0x12, 0x16, 0x0a, 0x06, 0x61, 0x76, 0x61, 0x74, 0x61, 0x72, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x06, 0x61, 0x76, 0x61, 0x74, 0x61, 0x72, 0x12, 0x24, 0x0a, 0x0b, 0x63, 0x6f, 0x6e, 0x6e, - 0x65, 0x63, 0x74, 0x5f, 0x75, 0x72, 0x6c, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, - 0x0a, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x55, 0x72, 0x6c, 0x88, 0x01, 0x01, 0x12, 0x3b, - 0x0a, 0x0c, 0x6c, 0x6f, 0x67, 0x69, 0x6e, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x08, - 0x20, 0x01, 0x28, 0x0e, 0x32, 0x18, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, - 0x76, 0x31, 0x2e, 0x4c, 0x6f, 0x67, 0x69, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x0b, - 0x6c, 0x6f, 0x67, 0x69, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x42, 0x0e, 0x0a, 0x0c, 0x5f, - 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x5f, 0x75, 0x72, 0x6c, 0x22, 0x33, 0x0a, 0x08, 0x55, - 0x73, 0x65, 0x72, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x27, 0x0a, 0x05, 0x75, 0x73, 0x65, 0x72, 0x73, - 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x75, 0x73, 0x65, - 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x52, 0x05, 0x75, 0x73, 0x65, 0x72, 0x73, - 0x22, 0x31, 0x0a, 0x12, 0x47, 0x65, 0x74, 0x55, 0x73, 0x65, 0x72, 0x49, 0x6e, 0x66, 0x6f, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1b, 0x0a, 0x03, 0x75, 0x69, 0x64, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x09, 0x42, 0x09, 0xfa, 0x42, 0x06, 0x72, 0x04, 0x10, 0x14, 0x18, 0x18, 0x52, 0x03, - 0x75, 0x69, 0x64, 0x22, 0x6e, 0x0a, 0x10, 0x51, 0x75, 0x65, 0x72, 0x79, 0x55, 0x73, 0x65, 0x72, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1f, 0x0a, 0x05, 0x65, 0x6d, 0x61, 0x69, 0x6c, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x60, 0x01, 0x48, - 0x00, 0x52, 0x05, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x12, 0x2c, 0x0a, 0x05, 0x70, 0x68, 0x6f, 0x6e, - 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x14, 0xfa, 0x42, 0x11, 0x72, 0x0f, 0x32, 0x0d, - 0x5e, 0x31, 0x5b, 0x33, 0x2d, 0x39, 0x5d, 0x5c, 0x64, 0x7b, 0x39, 0x7d, 0x24, 0x48, 0x00, 0x52, - 0x05, 0x70, 0x68, 0x6f, 0x6e, 0x65, 0x42, 0x0b, 0x0a, 0x04, 0x75, 0x73, 0x65, 0x72, 0x12, 0x03, - 0xf8, 0x42, 0x01, 0x22, 0xb5, 0x01, 0x0a, 0x11, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x55, 0x73, - 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1d, 0x0a, 0x04, 0x6e, 0x61, 0x6d, - 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x09, 0xfa, 0x42, 0x06, 0x72, 0x04, 0x10, 0x02, - 0x18, 0x14, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x1f, 0x0a, 0x05, 0x65, 0x6d, 0x61, 0x69, - 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x60, 0x01, - 0x48, 0x00, 0x52, 0x05, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x12, 0x2c, 0x0a, 0x05, 0x70, 0x68, 0x6f, - 0x6e, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x42, 0x14, 0xfa, 0x42, 0x11, 0x72, 0x0f, 0x32, - 0x0d, 0x5e, 0x31, 0x5b, 0x33, 0x2d, 0x39, 0x5d, 0x5c, 0x64, 0x7b, 0x39, 0x7d, 0x24, 0x48, 0x00, - 0x52, 0x05, 0x70, 0x68, 0x6f, 0x6e, 0x65, 0x12, 0x25, 0x0a, 0x08, 0x70, 0x61, 0x73, 0x73, 0x77, - 0x6f, 0x72, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x42, 0x09, 0xfa, 0x42, 0x06, 0x72, 0x04, - 0x10, 0x06, 0x18, 0x14, 0x52, 0x08, 0x70, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x42, 0x0b, - 0x0a, 0x04, 0x75, 0x73, 0x65, 0x72, 0x12, 0x03, 0xf8, 0x42, 0x01, 0x22, 0xc8, 0x01, 0x0a, 0x11, - 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x12, 0x1b, 0x0a, 0x03, 0x75, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x09, - 0xfa, 0x42, 0x06, 0x72, 0x04, 0x10, 0x14, 0x18, 0x18, 0x52, 0x03, 0x75, 0x69, 0x64, 0x12, 0x20, - 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x0c, 0xfa, 0x42, - 0x09, 0x72, 0x07, 0x10, 0x02, 0x18, 0x14, 0xd0, 0x01, 0x01, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, - 0x12, 0x20, 0x0a, 0x05, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x42, - 0x0a, 0xfa, 0x42, 0x07, 0x72, 0x05, 0x60, 0x01, 0xd0, 0x01, 0x01, 0x52, 0x05, 0x65, 0x6d, 0x61, - 0x69, 0x6c, 0x12, 0x2d, 0x0a, 0x05, 0x70, 0x68, 0x6f, 0x6e, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, - 0x09, 0x42, 0x17, 0xfa, 0x42, 0x14, 0x72, 0x12, 0x32, 0x0d, 0x5e, 0x31, 0x5b, 0x33, 0x2d, 0x39, - 0x5d, 0x5c, 0x64, 0x7b, 0x39, 0x7d, 0x24, 0xd0, 0x01, 0x01, 0x52, 0x05, 0x70, 0x68, 0x6f, 0x6e, - 0x65, 0x12, 0x23, 0x0a, 0x06, 0x61, 0x76, 0x61, 0x74, 0x61, 0x72, 0x18, 0x05, 0x20, 0x01, 0x28, - 0x09, 0x42, 0x0b, 0xfa, 0x42, 0x08, 0x72, 0x06, 0x18, 0x80, 0x01, 0xd0, 0x01, 0x01, 0x52, 0x06, - 0x61, 0x76, 0x61, 0x74, 0x61, 0x72, 0x22, 0xc1, 0x01, 0x0a, 0x10, 0x55, 0x73, 0x65, 0x72, 0x4c, - 0x6f, 0x67, 0x69, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1f, 0x0a, 0x05, 0x65, - 0x6d, 0x61, 0x69, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, - 0x02, 0x60, 0x01, 0x48, 0x00, 0x52, 0x05, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x12, 0x2c, 0x0a, 0x05, - 0x70, 0x68, 0x6f, 0x6e, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x14, 0xfa, 0x42, 0x11, - 0x72, 0x0f, 0x32, 0x0d, 0x5e, 0x31, 0x5b, 0x33, 0x2d, 0x39, 0x5d, 0x5c, 0x64, 0x7b, 0x39, 0x7d, - 0x24, 0x48, 0x00, 0x52, 0x05, 0x70, 0x68, 0x6f, 0x6e, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x70, 0x61, - 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x70, 0x61, - 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x12, 0x35, 0x0a, 0x0a, 0x6c, 0x6f, 0x67, 0x69, 0x6e, 0x5f, - 0x74, 0x79, 0x70, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x16, 0x2e, 0x61, 0x70, 0x69, - 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x6f, 0x67, 0x69, 0x6e, 0x54, 0x79, - 0x70, 0x65, 0x52, 0x09, 0x6c, 0x6f, 0x67, 0x69, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x42, 0x0b, 0x0a, - 0x04, 0x75, 0x73, 0x65, 0x72, 0x12, 0x03, 0xf8, 0x42, 0x01, 0x2a, 0x37, 0x0a, 0x0b, 0x4c, 0x6f, - 0x67, 0x69, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x09, 0x0a, 0x05, 0x4c, 0x4f, 0x47, - 0x49, 0x4e, 0x10, 0x00, 0x12, 0x11, 0x0a, 0x0d, 0x41, 0x4c, 0x52, 0x45, 0x41, 0x44, 0x59, 0x5f, - 0x4c, 0x4f, 0x47, 0x49, 0x4e, 0x10, 0x01, 0x12, 0x0a, 0x0a, 0x06, 0x4c, 0x4f, 0x47, 0x4f, 0x55, - 0x54, 0x10, 0x02, 0x2a, 0x35, 0x0a, 0x09, 0x4c, 0x6f, 0x67, 0x69, 0x6e, 0x54, 0x79, 0x70, 0x65, - 0x12, 0x12, 0x0a, 0x0e, 0x4c, 0x4f, 0x47, 0x49, 0x4e, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x54, - 0x52, 0x59, 0x10, 0x00, 0x12, 0x14, 0x0a, 0x10, 0x4c, 0x4f, 0x47, 0x49, 0x4e, 0x5f, 0x54, 0x59, - 0x50, 0x45, 0x5f, 0x46, 0x4f, 0x52, 0x43, 0x45, 0x10, 0x01, 0x32, 0xcd, 0x02, 0x0a, 0x0b, 0x55, - 0x73, 0x65, 0x72, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x4d, 0x0a, 0x07, 0x47, 0x65, - 0x74, 0x55, 0x73, 0x65, 0x72, 0x12, 0x1f, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x75, 0x73, 0x65, 0x72, - 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x55, 0x73, 0x65, 0x72, 0x49, 0x6e, 0x66, 0x6f, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x21, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x75, 0x73, 0x65, - 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, - 0x6c, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x4d, 0x0a, 0x09, 0x51, 0x75, 0x65, - 0x72, 0x79, 0x55, 0x73, 0x65, 0x72, 0x12, 0x1d, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x75, 0x73, 0x65, - 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, + 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x19, 0x0a, 0x05, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x18, 0x03, 0x20, + 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x05, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x88, 0x01, 0x01, 0x12, + 0x19, 0x0a, 0x05, 0x70, 0x68, 0x6f, 0x6e, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x48, 0x01, + 0x52, 0x05, 0x70, 0x68, 0x6f, 0x6e, 0x65, 0x88, 0x01, 0x01, 0x12, 0x16, 0x0a, 0x06, 0x61, 0x76, + 0x61, 0x74, 0x61, 0x72, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x61, 0x76, 0x61, 0x74, + 0x61, 0x72, 0x12, 0x24, 0x0a, 0x0b, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x5f, 0x75, 0x72, + 0x6c, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x48, 0x02, 0x52, 0x0a, 0x63, 0x6f, 0x6e, 0x6e, 0x65, + 0x63, 0x74, 0x55, 0x72, 0x6c, 0x88, 0x01, 0x01, 0x12, 0x3b, 0x0a, 0x0c, 0x6c, 0x6f, 0x67, 0x69, + 0x6e, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x18, + 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x6f, 0x67, + 0x69, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x0b, 0x6c, 0x6f, 0x67, 0x69, 0x6e, 0x53, + 0x74, 0x61, 0x74, 0x75, 0x73, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x42, + 0x08, 0x0a, 0x06, 0x5f, 0x70, 0x68, 0x6f, 0x6e, 0x65, 0x42, 0x0e, 0x0a, 0x0c, 0x5f, 0x63, 0x6f, + 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x5f, 0x75, 0x72, 0x6c, 0x22, 0x33, 0x0a, 0x08, 0x55, 0x73, 0x65, + 0x72, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x27, 0x0a, 0x05, 0x75, 0x73, 0x65, 0x72, 0x73, 0x18, 0x01, + 0x20, 0x03, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, + 0x76, 0x31, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x52, 0x05, 0x75, 0x73, 0x65, 0x72, 0x73, 0x22, 0x31, + 0x0a, 0x12, 0x47, 0x65, 0x74, 0x55, 0x73, 0x65, 0x72, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x12, 0x1b, 0x0a, 0x03, 0x75, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x09, 0x42, 0x09, 0xfa, 0x42, 0x06, 0x72, 0x04, 0x10, 0x14, 0x18, 0x18, 0x52, 0x03, 0x75, 0x69, + 0x64, 0x22, 0x6e, 0x0a, 0x10, 0x51, 0x75, 0x65, 0x72, 0x79, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1f, 0x0a, 0x05, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x60, 0x01, 0x48, 0x00, 0x52, + 0x05, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x12, 0x2c, 0x0a, 0x05, 0x70, 0x68, 0x6f, 0x6e, 0x65, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x14, 0xfa, 0x42, 0x11, 0x72, 0x0f, 0x32, 0x0d, 0x5e, 0x31, + 0x5b, 0x33, 0x2d, 0x39, 0x5d, 0x5c, 0x64, 0x7b, 0x39, 0x7d, 0x24, 0x48, 0x00, 0x52, 0x05, 0x70, + 0x68, 0x6f, 0x6e, 0x65, 0x42, 0x0b, 0x0a, 0x04, 0x75, 0x73, 0x65, 0x72, 0x12, 0x03, 0xf8, 0x42, + 0x01, 0x22, 0xb5, 0x01, 0x0a, 0x11, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x55, 0x73, 0x65, 0x72, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1d, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x09, 0xfa, 0x42, 0x06, 0x72, 0x04, 0x10, 0x02, 0x18, 0x14, + 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x1f, 0x0a, 0x05, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x60, 0x01, 0x48, 0x00, + 0x52, 0x05, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x12, 0x2c, 0x0a, 0x05, 0x70, 0x68, 0x6f, 0x6e, 0x65, + 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x42, 0x14, 0xfa, 0x42, 0x11, 0x72, 0x0f, 0x32, 0x0d, 0x5e, + 0x31, 0x5b, 0x33, 0x2d, 0x39, 0x5d, 0x5c, 0x64, 0x7b, 0x39, 0x7d, 0x24, 0x48, 0x00, 0x52, 0x05, + 0x70, 0x68, 0x6f, 0x6e, 0x65, 0x12, 0x25, 0x0a, 0x08, 0x70, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, + 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x42, 0x09, 0xfa, 0x42, 0x06, 0x72, 0x04, 0x10, 0x06, + 0x18, 0x14, 0x52, 0x08, 0x70, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x42, 0x0b, 0x0a, 0x04, + 0x75, 0x73, 0x65, 0x72, 0x12, 0x03, 0xf8, 0x42, 0x01, 0x22, 0xc8, 0x01, 0x0a, 0x11, 0x55, 0x70, + 0x64, 0x61, 0x74, 0x65, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, + 0x1b, 0x0a, 0x03, 0x75, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x09, 0xfa, 0x42, + 0x06, 0x72, 0x04, 0x10, 0x14, 0x18, 0x18, 0x52, 0x03, 0x75, 0x69, 0x64, 0x12, 0x20, 0x0a, 0x04, + 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x0c, 0xfa, 0x42, 0x09, 0x72, + 0x07, 0x10, 0x02, 0x18, 0x14, 0xd0, 0x01, 0x01, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x20, + 0x0a, 0x05, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x42, 0x0a, 0xfa, + 0x42, 0x07, 0x72, 0x05, 0x60, 0x01, 0xd0, 0x01, 0x01, 0x52, 0x05, 0x65, 0x6d, 0x61, 0x69, 0x6c, + 0x12, 0x2d, 0x0a, 0x05, 0x70, 0x68, 0x6f, 0x6e, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x42, + 0x17, 0xfa, 0x42, 0x14, 0x72, 0x12, 0x32, 0x0d, 0x5e, 0x31, 0x5b, 0x33, 0x2d, 0x39, 0x5d, 0x5c, + 0x64, 0x7b, 0x39, 0x7d, 0x24, 0xd0, 0x01, 0x01, 0x52, 0x05, 0x70, 0x68, 0x6f, 0x6e, 0x65, 0x12, + 0x23, 0x0a, 0x06, 0x61, 0x76, 0x61, 0x74, 0x61, 0x72, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x42, + 0x0b, 0xfa, 0x42, 0x08, 0x72, 0x06, 0x18, 0x80, 0x01, 0xd0, 0x01, 0x01, 0x52, 0x06, 0x61, 0x76, + 0x61, 0x74, 0x61, 0x72, 0x22, 0xc1, 0x01, 0x0a, 0x10, 0x55, 0x73, 0x65, 0x72, 0x4c, 0x6f, 0x67, + 0x69, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1f, 0x0a, 0x05, 0x65, 0x6d, 0x61, + 0x69, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x60, + 0x01, 0x48, 0x00, 0x52, 0x05, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x12, 0x2c, 0x0a, 0x05, 0x70, 0x68, + 0x6f, 0x6e, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x14, 0xfa, 0x42, 0x11, 0x72, 0x0f, + 0x32, 0x0d, 0x5e, 0x31, 0x5b, 0x33, 0x2d, 0x39, 0x5d, 0x5c, 0x64, 0x7b, 0x39, 0x7d, 0x24, 0x48, + 0x00, 0x52, 0x05, 0x70, 0x68, 0x6f, 0x6e, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x70, 0x61, 0x73, 0x73, + 0x77, 0x6f, 0x72, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x70, 0x61, 0x73, 0x73, + 0x77, 0x6f, 0x72, 0x64, 0x12, 0x35, 0x0a, 0x0a, 0x6c, 0x6f, 0x67, 0x69, 0x6e, 0x5f, 0x74, 0x79, + 0x70, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x16, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x75, + 0x73, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x6f, 0x67, 0x69, 0x6e, 0x54, 0x79, 0x70, 0x65, + 0x52, 0x09, 0x6c, 0x6f, 0x67, 0x69, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x42, 0x0b, 0x0a, 0x04, 0x75, + 0x73, 0x65, 0x72, 0x12, 0x03, 0xf8, 0x42, 0x01, 0x2a, 0x37, 0x0a, 0x0b, 0x4c, 0x6f, 0x67, 0x69, + 0x6e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x09, 0x0a, 0x05, 0x4c, 0x4f, 0x47, 0x49, 0x4e, + 0x10, 0x00, 0x12, 0x11, 0x0a, 0x0d, 0x41, 0x4c, 0x52, 0x45, 0x41, 0x44, 0x59, 0x5f, 0x4c, 0x4f, + 0x47, 0x49, 0x4e, 0x10, 0x01, 0x12, 0x0a, 0x0a, 0x06, 0x4c, 0x4f, 0x47, 0x4f, 0x55, 0x54, 0x10, + 0x02, 0x2a, 0x35, 0x0a, 0x09, 0x4c, 0x6f, 0x67, 0x69, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x12, 0x12, + 0x0a, 0x0e, 0x4c, 0x4f, 0x47, 0x49, 0x4e, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x54, 0x52, 0x59, + 0x10, 0x00, 0x12, 0x14, 0x0a, 0x10, 0x4c, 0x4f, 0x47, 0x49, 0x4e, 0x5f, 0x54, 0x59, 0x50, 0x45, + 0x5f, 0x46, 0x4f, 0x52, 0x43, 0x45, 0x10, 0x01, 0x32, 0xcd, 0x02, 0x0a, 0x0b, 0x55, 0x73, 0x65, + 0x72, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x4d, 0x0a, 0x07, 0x47, 0x65, 0x74, 0x55, + 0x73, 0x65, 0x72, 0x12, 0x1f, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x76, + 0x31, 0x2e, 0x47, 0x65, 0x74, 0x55, 0x73, 0x65, 0x72, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x1a, 0x21, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, + 0x76, 0x31, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x4d, 0x0a, 0x09, 0x51, 0x75, 0x65, 0x72, 0x79, + 0x55, 0x73, 0x65, 0x72, 0x12, 0x1d, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, + 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x1a, 0x21, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x76, + 0x31, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x4f, 0x0a, 0x0a, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, + 0x55, 0x73, 0x65, 0x72, 0x12, 0x1e, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, + 0x76, 0x31, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x1a, 0x21, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, + 0x76, 0x31, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x4f, 0x0a, 0x0a, 0x55, 0x70, 0x64, 0x61, 0x74, + 0x65, 0x55, 0x73, 0x65, 0x72, 0x12, 0x1e, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x75, 0x73, 0x65, 0x72, + 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x21, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x4f, 0x0a, 0x0a, 0x43, 0x72, 0x65, 0x61, - 0x74, 0x65, 0x55, 0x73, 0x65, 0x72, 0x12, 0x1e, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x75, 0x73, 0x65, - 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x55, 0x73, 0x65, 0x72, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x21, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x75, 0x73, 0x65, - 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, - 0x6c, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x4f, 0x0a, 0x0a, 0x55, 0x70, 0x64, - 0x61, 0x74, 0x65, 0x55, 0x73, 0x65, 0x72, 0x12, 0x1e, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x75, 0x73, - 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x55, 0x73, 0x65, 0x72, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x21, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x75, 0x73, - 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e, - 0x61, 0x6c, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0x20, 0x5a, 0x1e, 0x67, 0x69, - 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x67, 0x6f, 0x2d, 0x67, 0x6f, 0x69, 0x6d, - 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x75, 0x73, 0x65, 0x72, 0x2f, 0x76, 0x31, 0x62, 0x06, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x33, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0x20, 0x5a, 0x1e, 0x67, 0x69, 0x74, 0x68, + 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x67, 0x6f, 0x2d, 0x67, 0x6f, 0x69, 0x6d, 0x2f, 0x61, + 0x70, 0x69, 0x2f, 0x75, 0x73, 0x65, 0x72, 0x2f, 0x76, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x33, } var ( diff --git a/user/v1/user.pb.validate.go b/user/v1/user.pb.validate.go index 840cc0b..c3cae4c 100644 --- a/user/v1/user.pb.validate.go +++ b/user/v1/user.pb.validate.go @@ -345,14 +345,18 @@ func (m *User) validate(all bool) error { // no validation rules for Name - // no validation rules for Email - - // no validation rules for Phone - // no validation rules for Avatar // no validation rules for LoginStatus + if m.Email != nil { + // no validation rules for Email + } + + if m.Phone != nil { + // no validation rules for Phone + } + if m.ConnectUrl != nil { // no validation rules for ConnectUrl } diff --git a/user/v1/user.proto b/user/v1/user.proto index 6e9e0ba..197ff23 100644 --- a/user/v1/user.proto +++ b/user/v1/user.proto @@ -40,8 +40,8 @@ message UserInternal { message User { string uid = 1; string name = 2; - string email = 3; - string phone = 4; + optional string email = 3; + optional string phone = 4; string avatar = 5; // ws_url is url of user need connect via ws or tcp optional string connect_url = 6; From 96f8d808416f3654048a86798f82bf21355d7a74 Mon Sep 17 00:00:00 2001 From: yusank Date: Wed, 22 Jun 2022 19:19:03 +0800 Subject: [PATCH 08/35] fix: lint --- user/v1/user.ext.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/user/v1/user.ext.go b/user/v1/user.ext.go index bac2682..effff19 100644 --- a/user/v1/user.ext.go +++ b/user/v1/user.ext.go @@ -6,8 +6,8 @@ func (x *UserInternal) ToUser() *User { return &User{ Uid: x.GetUid(), Name: x.GetName(), - Email: x.GetEmail(), - Phone: x.GetPhone(), + Email: x.Email, + Phone: x.Phone, Avatar: x.GetAvatar(), ConnectUrl: x.PushServerIp, LoginStatus: x.GetLoginStatus(), From 1b0b6e76eb10b307a67de0658c3ff7ed93ed787a Mon Sep 17 00:00:00 2001 From: yusank Date: Tue, 28 Jun 2022 18:19:48 +0800 Subject: [PATCH 09/35] fix: update to buf --- Makefile | 17 +- buf.gen.tag.yaml | 5 + buf.gen.yaml | 13 + buf.lock | 7 + buf.yaml | 9 + config/registry/v1/registry.pb.go | 2 +- config/registry/v1/registry.proto | 67 +- config/v1/config.pb.go | 2 +- config/v1/config.proto | 184 ++-- message/v1/message.pb.go | 10 +- message/v1/message.proto | 16 +- third_party/google/protobuf/any.proto | 155 ---- third_party/google/protobuf/descriptor.proto | 911 ------------------- third_party/google/protobuf/duration.proto | 116 --- third_party/google/protobuf/timestamp.proto | 138 --- third_party/validate/validate.proto | 862 ------------------ transport/response/response.pb.go | 2 +- transport/response/response.proto | 2 +- user/friend/v1/friend.pb.go | 14 +- user/friend/v1/friend.proto | 54 +- user/group/v1/group.pb.go | 12 +- user/group/v1/group.proto | 12 +- user/session/v1/session.pb.go | 2 +- user/session/v1/session.proto | 4 +- user/v1/user.pb.go | 10 +- user/v1/user.proto | 51 +- 26 files changed, 320 insertions(+), 2357 deletions(-) create mode 100644 buf.gen.tag.yaml create mode 100644 buf.gen.yaml create mode 100644 buf.lock create mode 100644 buf.yaml delete mode 100644 third_party/google/protobuf/any.proto delete mode 100644 third_party/google/protobuf/descriptor.proto delete mode 100644 third_party/google/protobuf/duration.proto delete mode 100644 third_party/google/protobuf/timestamp.proto delete mode 100644 third_party/validate/validate.proto diff --git a/Makefile b/Makefile index a8967c9..a24202f 100644 --- a/Makefile +++ b/Makefile @@ -1,6 +1,10 @@ SHELL:=/usr/bin/env bash .DEFAULT_GOAL:=help +COLOR := "\e[1;36m%s\e[0m" + +# Note this is just for the tour! +export BUF_USER=yusank ################################################## # Development # @@ -26,15 +30,8 @@ test: ## Run test against code. ##@ Generate -.PHONY: gen-protoc -gen-protoc: ## Run protoc command to generate pb code. - # call gen_proto.sh - ./gen_proto.sh - .PHONY: protoc -COLOR := "\e[1;36m%s\e[0m" - PROTO_ROOT := . PROTO_IGNORE := ./third_party PROTO_FILES = $(shell find $(PROTO_ROOT) -path $(PROTO_IGNORE) -prune -o -type f -name "*.proto" -print) @@ -59,6 +56,12 @@ protoc: ## Generate pb code. tools-install: ## Install tools. go get -u github.com/golang/protobuf/protoc-gen-go +.PHONY: buf +buf: ## run buf generate command. + @printf $(COLOR) "Generating buf code..." + buf generate + @printf $(COLOR) "Done." + ################################################## # General # ################################################## diff --git a/buf.gen.tag.yaml b/buf.gen.tag.yaml new file mode 100644 index 0000000..5f6ba50 --- /dev/null +++ b/buf.gen.tag.yaml @@ -0,0 +1,5 @@ +version: v1 +plugins: + - name: gotag + out: . + opt: paths=source_relative,auto="form-as-snake" \ No newline at end of file diff --git a/buf.gen.yaml b/buf.gen.yaml new file mode 100644 index 0000000..a8e5e0c --- /dev/null +++ b/buf.gen.yaml @@ -0,0 +1,13 @@ +version: v1 +plugins: + - name: go + out: . + opt: paths=source_relative + - name: go-grpc + out: . + opt: paths=source_relative + - name: validate + out: . + opt: + - lang=go + - paths=source_relative \ No newline at end of file diff --git a/buf.lock b/buf.lock new file mode 100644 index 0000000..2415498 --- /dev/null +++ b/buf.lock @@ -0,0 +1,7 @@ +# Generated by buf. DO NOT EDIT. +version: v1 +deps: + - remote: buf.build + owner: envoyproxy + repository: protoc-gen-validate + commit: dc09a417d27241f7b069feae2cd74a0e diff --git a/buf.yaml b/buf.yaml new file mode 100644 index 0000000..c45e614 --- /dev/null +++ b/buf.yaml @@ -0,0 +1,9 @@ +version: v1 +deps: + - buf.build/envoyproxy/protoc-gen-validate +breaking: + use: + - FILE +lint: + use: + - DEFAULT diff --git a/config/registry/v1/registry.pb.go b/config/registry/v1/registry.pb.go index 459b173..fb89770 100644 --- a/config/registry/v1/registry.pb.go +++ b/config/registry/v1/registry.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.28.0 -// protoc v3.19.4 +// protoc (unknown) // source: config/registry/v1/registry.proto package v1 diff --git a/config/registry/v1/registry.proto b/config/registry/v1/registry.proto index 962a3a9..a7036bd 100644 --- a/config/registry/v1/registry.proto +++ b/config/registry/v1/registry.proto @@ -1,40 +1,57 @@ syntax = "proto3"; package api.config.registry.v1; -option go_package = "github.com/go-goim/api/config/registry/v1"; import "google/protobuf/duration.proto"; - import "validate/validate.proto"; +option go_package = "github.com/go-goim/api/config/registry/v1"; + message RegistryInfo { - repeated string addr = 1 [(validate.rules).repeated = { - min_items: 1, - unique: true, - }]; - string scheme = 2 [(validate.rules).string = {in: ["http", "grpc"]}]; - // range [10ms, 10s] - google.protobuf.Duration dial_timeout_sec = 3 [(validate.rules).duration = { - gte: {nanos: 1000000, seconds: 0}, - lte: {seconds: 10} - }]; - google.protobuf.Duration dial_keep_alive_time_sec = 4; - google.protobuf.Duration dial_keep_alive_timeout_sec = 5; + repeated string addr = 1 [(validate.rules).repeated = { + min_items: 1, + unique: true, + }]; + string scheme = 2 [(validate.rules).string = { + in: [ + "http", + "grpc" + ] + }]; + // range [10ms, 10s] + google.protobuf.Duration dial_timeout_sec = 3 [(validate.rules).duration = { + gte: { + nanos: 1000000, + seconds: 0 + }, + lte: { + seconds: 10 + } + }]; + google.protobuf.Duration dial_keep_alive_time_sec = 4; + google.protobuf.Duration dial_keep_alive_timeout_sec = 5; } message ConfigCenterInfo { - // PathPrefix is prefix key of config center. - string path_prefix = 1; - // Paths is config paths of config center. - repeated string paths = 2 [(validate.rules).repeated = {unique: true}]; - // Format is config format of config center. - string format = 3 [(validate.rules).string = {in: ["json", "yaml"]}]; + // PathPrefix is prefix key of config center. + string path_prefix = 1; + // Paths is config paths of config center. + repeated string paths = 2 [(validate.rules).repeated = { + unique: true + }]; + // Format is config format of config center. + string format = 3 [(validate.rules).string = { + in: [ + "json", + "yaml" + ] + }]; } message Registry { - ConfigCenterInfo config_center = 1; - oneof reg { - RegistryInfo consul = 2; - RegistryInfo etcd = 3; - } + ConfigCenterInfo config_center = 1; + oneof reg { + RegistryInfo consul = 2; + RegistryInfo etcd = 3; + } } diff --git a/config/v1/config.pb.go b/config/v1/config.pb.go index 9347499..e63bcd9 100644 --- a/config/v1/config.pb.go +++ b/config/v1/config.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.28.0 -// protoc v3.19.4 +// protoc (unknown) // source: config/v1/config.proto package v1 diff --git a/config/v1/config.proto b/config/v1/config.proto index 5e2fc2a..1704c69 100644 --- a/config/v1/config.proto +++ b/config/v1/config.proto @@ -1,99 +1,137 @@ syntax = "proto3"; package api.config.v1; -option go_package = "github.com/go-goim/api/config/v1"; import "google/protobuf/duration.proto"; - import "validate/validate.proto"; +option go_package = "github.com/go-goim/api/config/v1"; + message Server { - string scheme = 1 [(validate.rules).string = {in: ["http", "grpc", "tcp"]}]; - int32 port = 2 [(validate.rules).int32 = {gt: 10000, lt: 60535}]; - // range:[10ms, 10s] - google.protobuf.Duration timeout = 3 [(validate.rules).duration = { - gte: {nanos: 10000000, seconds: 0}, - lte: {seconds: 10} - }]; + string scheme = 1 [(validate.rules).string = { + in: [ + "http", + "grpc", + "tcp" + ] + }]; + int32 port = 2 [(validate.rules).int32 = { + gt: 10000, + lt: 60535 + }]; + // range:[10ms, 10s] + google.protobuf.Duration timeout = 3 [(validate.rules).duration = { + gte: { + nanos: 10000000, + seconds: 0 + }, + lte: { + seconds: 10 + } + }]; } message Service { - // name has three parts: - // 1. constant value: "goim" - // 2. service type: ["service", "worker", "admin"] - // 3. service name: any string - // parts joined by "." - // example: "goim.service.chat" - string name = 1 [(validate.rules).string = {pattern: "^goim\\.(service|worker|admin)\\.[a-zA-Z0-9_]+$"}]; - // version must match like "vx.y.z" - string version = 2 [(validate.rules).string = {pattern: "^v[0-9]+\\.[0-9]+\\.[0-9]+$"}]; - optional Server http = 3; - optional Server grpc = 4; - Log log = 5; - map metadata = 6; - Redis redis = 7; - MQ mq = 8; - MySQL mysql = 9; - // services name - string gatewayService = 10; - string userService = 11; - string pushService = 12; - string storeWorker = 13; - string msgService = 14; - string msgWorker = 15; + // name has three parts: + // 1. constant value: "goim" + // 2. service type: ["service", "worker", "admin"] + // 3. service name: any string + // parts joined by "." + // example: "goim.service.chat" + string name = 1 [(validate.rules).string = { + pattern: "^goim\\.(service|worker|admin)\\.[a-zA-Z0-9_]+$" + }]; + // version must match like "vx.y.z" + string version = 2 [(validate.rules).string = { + pattern: "^v[0-9]+\\.[0-9]+\\.[0-9]+$" + }]; + optional Server http = 3; + optional Server grpc = 4; + Log log = 5; + map metadata = 6; + Redis redis = 7; + MQ mq = 8; + MySQL mysql = 9; + // services name + string gatewayService = 10; + string userService = 11; + string pushService = 12; + string storeWorker = 13; + string msgService = 14; + string msgWorker = 15; } enum Level { - DEBUG = 0; - INFO = 1; - WARNING = 2; - ERROR = 3; - FATAL = 4; + DEBUG = 0; + INFO = 1; + WARNING = 2; + ERROR = 3; + FATAL = 4; } message Log { - optional string log_path = 1; - Level level = 2 [(validate.rules).enum.defined_only = true]; - bool enable_console = 3; + optional string log_path = 1; + Level level = 2 [(validate.rules).enum.defined_only = true]; + bool enable_console = 3; } message Redis { - string addr = 1; - string password = 2; - int32 max_conns = 3; - int32 min_idle_conns = 4; - // range: [10ms,10s] - google.protobuf.Duration dial_timeout = 5 [(validate.rules).duration = { - gte: {nanos: 10000000, seconds: 0}, - lte: {seconds: 10} - }]; - // range: [10ms,10s] - google.protobuf.Duration idle_timeout = 6 [(validate.rules).duration = { - gte: {nanos: 10000000, seconds: 0}, - lte: {seconds: 10} - }]; + string addr = 1; + string password = 2; + int32 max_conns = 3; + int32 min_idle_conns = 4; + // range: [10ms,10s] + google.protobuf.Duration dial_timeout = 5 [(validate.rules).duration = { + gte: { + nanos: 10000000, + seconds: 0 + }, + lte: { + seconds: 10 + } + }]; + // range: [10ms,10s] + google.protobuf.Duration idle_timeout = 6 [(validate.rules).duration = { + gte: { + nanos: 10000000, + seconds: 0 + }, + lte: { + seconds: 10 + } + }]; } message MQ { - repeated string addr = 1; - int32 max_retry = 2; + repeated string addr = 1; + int32 max_retry = 2; } message MySQL { - string addr = 1; - string user = 2; - string password = 3; - string db = 4; - int32 max_idle_conns = 5; - int32 max_open_conns = 6; - // range: [10ms,10s] - google.protobuf.Duration idle_timeout = 7 [(validate.rules).duration = { - gte: {nanos: 1000000, seconds: 0}, - lte: {seconds: 10} - }]; - // range: [10ms,10s] - google.protobuf.Duration open_timeout = 8 [(validate.rules).duration = { - gte: {nanos: 1000000, seconds: 0}, - lte: {seconds: 10} - }]; -} \ No newline at end of file + string addr = 1; + string user = 2; + string password = 3; + string db = 4; + int32 max_idle_conns = 5; + int32 max_open_conns = 6; + // range: [10ms,10s] + google.protobuf.Duration idle_timeout = 7 [(validate.rules).duration = { + gte: { + nanos: 1000000, + seconds: 0 + }, + lte: { + seconds: 10 + } + }]; + // range: [10ms,10s] + google.protobuf.Duration open_timeout = 8 [(validate.rules).duration = { + gte: { + nanos: 1000000, + seconds: 0 + }, + lte: { + seconds: 10 + } + }]; +} diff --git a/message/v1/message.pb.go b/message/v1/message.pb.go index 8a4ffee..bf038fb 100644 --- a/message/v1/message.pb.go +++ b/message/v1/message.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.28.0 -// protoc v3.19.4 +// protoc (unknown) // source: message/v1/message.proto package v1 @@ -685,10 +685,10 @@ var File_message_v1_message_proto protoreflect.FileDescriptor var file_message_v1_message_proto_rawDesc = []byte{ 0x0a, 0x18, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x2f, 0x76, 0x31, 0x2f, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0e, 0x61, 0x70, 0x69, 0x2e, - 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x31, 0x1a, 0x17, 0x76, 0x61, 0x6c, 0x69, - 0x64, 0x61, 0x74, 0x65, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x1a, 0x21, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x2f, 0x72, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2f, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x31, 0x1a, 0x21, 0x74, 0x72, 0x61, 0x6e, + 0x73, 0x70, 0x6f, 0x72, 0x74, 0x2f, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2f, 0x72, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x17, 0x76, + 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xcf, 0x01, 0x0a, 0x0e, 0x53, 0x65, 0x6e, 0x64, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x52, 0x65, 0x71, 0x12, 0x24, 0x0a, 0x09, 0x66, 0x72, 0x6f, 0x6d, 0x5f, 0x75, 0x73, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, diff --git a/message/v1/message.proto b/message/v1/message.proto index 597a118..294c025 100644 --- a/message/v1/message.proto +++ b/message/v1/message.proto @@ -1,11 +1,11 @@ syntax = "proto3"; package api.message.v1; -option go_package = "github.com/go-goim/api/message/v1"; +import "transport/response/response.proto"; import "validate/validate.proto"; -import "transport/response/response.proto"; +option go_package = "github.com/go-goim/api/message/v1"; enum MessageContentType { UnknownContentType = 0; @@ -19,7 +19,10 @@ message SendMessageReq { string from_user = 1 [(validate.rules).string.min_len = 20]; string to_user = 2 [(validate.rules).string.min_len = 20]; MessageContentType content_type = 3 [(validate.rules).enum.defined_only = true]; - string content = 4 [(validate.rules).string = {min_len: 1, max_len: 1024}]; + string content = 4 [(validate.rules).string = { + min_len: 1, + max_len: 1024 + }]; } // SendMessageResp is response body for sendMessage @@ -86,9 +89,12 @@ message BriefMessage { message QueryOfflineMessageReq { string user_id = 1 [(validate.rules).string.min_len = 20]; string last_msg_seq = 2 [(validate.rules).string.min_len = 10]; - bool onlyCount = 3; + bool onlyCount = 3; int32 page = 4; - int32 page_size = 5 [(validate.rules).int32 = {gte: 1, lte: 100}]; + int32 page_size = 5 [(validate.rules).int32 = { + gte: 1, + lte: 100 + }]; } message QueryOfflineMessageResp { diff --git a/third_party/google/protobuf/any.proto b/third_party/google/protobuf/any.proto deleted file mode 100644 index c9be854..0000000 --- a/third_party/google/protobuf/any.proto +++ /dev/null @@ -1,155 +0,0 @@ -// Protocol Buffers - Google's data interchange format -// Copyright 2008 Google Inc. All rights reserved. -// https://developers.google.com/protocol-buffers/ -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -syntax = "proto3"; - -package google.protobuf; - -option csharp_namespace = "Google.Protobuf.WellKnownTypes"; -option go_package = "github.com/golang/protobuf/ptypes/any"; -option java_package = "com.google.protobuf"; -option java_outer_classname = "AnyProto"; -option java_multiple_files = true; -option objc_class_prefix = "GPB"; - -// `Any` contains an arbitrary serialized protocol buffer message along with a -// URL that describes the type of the serialized message. -// -// Protobuf library provides support to pack/unpack Any values in the form -// of utility functions or additional generated methods of the Any type. -// -// Example 1: Pack and unpack a message in C++. -// -// Foo foo = ...; -// Any any; -// any.PackFrom(foo); -// ... -// if (any.UnpackTo(&foo)) { -// ... -// } -// -// Example 2: Pack and unpack a message in Java. -// -// Foo foo = ...; -// Any any = Any.pack(foo); -// ... -// if (any.is(Foo.class)) { -// foo = any.unpack(Foo.class); -// } -// -// Example 3: Pack and unpack a message in Python. -// -// foo = Foo(...) -// any = Any() -// any.Pack(foo) -// ... -// if any.Is(Foo.DESCRIPTOR): -// any.Unpack(foo) -// ... -// -// Example 4: Pack and unpack a message in Go -// -// foo := &pb.Foo{...} -// any, err := ptypes.MarshalAny(foo) -// ... -// foo := &pb.Foo{} -// if err := ptypes.UnmarshalAny(any, foo); err != nil { -// ... -// } -// -// The pack methods provided by protobuf library will by default use -// 'type.googleapis.com/full.type.name' as the type URL and the unpack -// methods only use the fully qualified type name after the last '/' -// in the type URL, for example "foo.bar.com/x/y.z" will yield type -// name "y.z". -// -// -// JSON -// ==== -// The JSON representation of an `Any` value uses the regular -// representation of the deserialized, embedded message, with an -// additional field `@type` which contains the type URL. Example: -// -// package google.profile; -// message Person { -// string first_name = 1; -// string last_name = 2; -// } -// -// { -// "@type": "type.googleapis.com/google.profile.Person", -// "firstName": , -// "lastName": -// } -// -// If the embedded message type is well-known and has a custom JSON -// representation, that representation will be embedded adding a field -// `value` which holds the custom JSON in addition to the `@type` -// field. Example (for message [google.protobuf.Duration][]): -// -// { -// "@type": "type.googleapis.com/google.protobuf.Duration", -// "value": "1.212s" -// } -// -message Any { - // A URL/resource name that uniquely identifies the type of the serialized - // protocol buffer message. This string must contain at least - // one "/" character. The last segment of the URL's path must represent - // the fully qualified name of the type (as in - // `path/google.protobuf.Duration`). The name should be in a canonical form - // (e.g., leading "." is not accepted). - // - // In practice, teams usually precompile into the binary all types that they - // expect it to use in the context of Any. However, for URLs which use the - // scheme `http`, `https`, or no scheme, one can optionally set up a type - // server that maps type URLs to message definitions as follows: - // - // * If no scheme is provided, `https` is assumed. - // * An HTTP GET on the URL must yield a [google.protobuf.Type][] - // value in binary format, or produce an error. - // * Applications are allowed to cache lookup results based on the - // URL, or have them precompiled into a binary to avoid any - // lookup. Therefore, binary compatibility needs to be preserved - // on changes to types. (Use versioned type names to manage - // breaking changes.) - // - // Note: this functionality is not currently available in the official - // protobuf release, and it is not used for type URLs beginning with - // type.googleapis.com. - // - // Schemes other than `http`, `https` (or the empty scheme) might be - // used with implementation specific semantics. - // - string type_url = 1; - - // Must be a valid serialized protocol buffer of the above specified type. - bytes value = 2; -} diff --git a/third_party/google/protobuf/descriptor.proto b/third_party/google/protobuf/descriptor.proto deleted file mode 100644 index ec568c3..0000000 --- a/third_party/google/protobuf/descriptor.proto +++ /dev/null @@ -1,911 +0,0 @@ -// Protocol Buffers - Google's data interchange format -// Copyright 2008 Google Inc. All rights reserved. -// https://developers.google.com/protocol-buffers/ -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// Author: kenton@google.com (Kenton Varda) -// Based on original Protocol Buffers design by -// Sanjay Ghemawat, Jeff Dean, and others. -// -// The messages in this file describe the definitions found in .proto files. -// A valid .proto file can be translated directly to a FileDescriptorProto -// without any other information (e.g. without reading its imports). - - -syntax = "proto2"; - -package google.protobuf; - -option go_package = "google.golang.org/protobuf/types/descriptorpb"; -option java_package = "com.google.protobuf"; -option java_outer_classname = "DescriptorProtos"; -option csharp_namespace = "Google.Protobuf.Reflection"; -option objc_class_prefix = "GPB"; -option cc_enable_arenas = true; - -// descriptor.proto must be optimized for speed because reflection-based -// algorithms don't work during bootstrapping. -option optimize_for = SPEED; - -// The protocol compiler can output a FileDescriptorSet containing the .proto -// files it parses. -message FileDescriptorSet { - repeated FileDescriptorProto file = 1; -} - -// Describes a complete .proto file. -message FileDescriptorProto { - optional string name = 1; // file name, relative to root of source tree - optional string package = 2; // e.g. "foo", "foo.bar", etc. - - // Names of files imported by this file. - repeated string dependency = 3; - // Indexes of the public imported files in the dependency list above. - repeated int32 public_dependency = 10; - // Indexes of the weak imported files in the dependency list. - // For Google-internal migration only. Do not use. - repeated int32 weak_dependency = 11; - - // All top-level definitions in this file. - repeated DescriptorProto message_type = 4; - repeated EnumDescriptorProto enum_type = 5; - repeated ServiceDescriptorProto service = 6; - repeated FieldDescriptorProto extension = 7; - - optional FileOptions options = 8; - - // This field contains optional information about the original source code. - // You may safely remove this entire field without harming runtime - // functionality of the descriptors -- the information is needed only by - // development tools. - optional SourceCodeInfo source_code_info = 9; - - // The syntax of the proto file. - // The supported values are "proto2" and "proto3". - optional string syntax = 12; -} - -// Describes a message type. -message DescriptorProto { - optional string name = 1; - - repeated FieldDescriptorProto field = 2; - repeated FieldDescriptorProto extension = 6; - - repeated DescriptorProto nested_type = 3; - repeated EnumDescriptorProto enum_type = 4; - - message ExtensionRange { - optional int32 start = 1; // Inclusive. - optional int32 end = 2; // Exclusive. - - optional ExtensionRangeOptions options = 3; - } - repeated ExtensionRange extension_range = 5; - - repeated OneofDescriptorProto oneof_decl = 8; - - optional MessageOptions options = 7; - - // Range of reserved tag numbers. Reserved tag numbers may not be used by - // fields or extension ranges in the same message. Reserved ranges may - // not overlap. - message ReservedRange { - optional int32 start = 1; // Inclusive. - optional int32 end = 2; // Exclusive. - } - repeated ReservedRange reserved_range = 9; - // Reserved field names, which may not be used by fields in the same message. - // A given name may only be reserved once. - repeated string reserved_name = 10; -} - -message ExtensionRangeOptions { - // The parser stores options it doesn't recognize here. See above. - repeated UninterpretedOption uninterpreted_option = 999; - - - // Clients can define custom options in extensions of this message. See above. - extensions 1000 to max; -} - -// Describes a field within a message. -message FieldDescriptorProto { - enum Type { - // 0 is reserved for errors. - // Order is weird for historical reasons. - TYPE_DOUBLE = 1; - TYPE_FLOAT = 2; - // Not ZigZag encoded. Negative numbers take 10 bytes. Use TYPE_SINT64 if - // negative values are likely. - TYPE_INT64 = 3; - TYPE_UINT64 = 4; - // Not ZigZag encoded. Negative numbers take 10 bytes. Use TYPE_SINT32 if - // negative values are likely. - TYPE_INT32 = 5; - TYPE_FIXED64 = 6; - TYPE_FIXED32 = 7; - TYPE_BOOL = 8; - TYPE_STRING = 9; - // Tag-delimited aggregate. - // Group type is deprecated and not supported in proto3. However, Proto3 - // implementations should still be able to parse the group wire format and - // treat group fields as unknown fields. - TYPE_GROUP = 10; - TYPE_MESSAGE = 11; // Length-delimited aggregate. - - // New in version 2. - TYPE_BYTES = 12; - TYPE_UINT32 = 13; - TYPE_ENUM = 14; - TYPE_SFIXED32 = 15; - TYPE_SFIXED64 = 16; - TYPE_SINT32 = 17; // Uses ZigZag encoding. - TYPE_SINT64 = 18; // Uses ZigZag encoding. - } - - enum Label { - // 0 is reserved for errors - LABEL_OPTIONAL = 1; - LABEL_REQUIRED = 2; - LABEL_REPEATED = 3; - } - - optional string name = 1; - optional int32 number = 3; - optional Label label = 4; - - // If type_name is set, this need not be set. If both this and type_name - // are set, this must be one of TYPE_ENUM, TYPE_MESSAGE or TYPE_GROUP. - optional Type type = 5; - - // For message and enum types, this is the name of the type. If the name - // starts with a '.', it is fully-qualified. Otherwise, C++-like scoping - // rules are used to find the type (i.e. first the nested types within this - // message are searched, then within the parent, on up to the root - // namespace). - optional string type_name = 6; - - // For extensions, this is the name of the type being extended. It is - // resolved in the same manner as type_name. - optional string extendee = 2; - - // For numeric types, contains the original text representation of the value. - // For booleans, "true" or "false". - // For strings, contains the default text contents (not escaped in any way). - // For bytes, contains the C escaped value. All bytes >= 128 are escaped. - // TODO(kenton): Base-64 encode? - optional string default_value = 7; - - // If set, gives the index of a oneof in the containing type's oneof_decl - // list. This field is a member of that oneof. - optional int32 oneof_index = 9; - - // JSON name of this field. The value is set by protocol compiler. If the - // user has set a "json_name" option on this field, that option's value - // will be used. Otherwise, it's deduced from the field's name by converting - // it to camelCase. - optional string json_name = 10; - - optional FieldOptions options = 8; - - // If true, this is a proto3 "optional". When a proto3 field is optional, it - // tracks presence regardless of field type. - // - // When proto3_optional is true, this field must be belong to a oneof to - // signal to old proto3 clients that presence is tracked for this field. This - // oneof is known as a "synthetic" oneof, and this field must be its sole - // member (each proto3 optional field gets its own synthetic oneof). Synthetic - // oneofs exist in the descriptor only, and do not generate any API. Synthetic - // oneofs must be ordered after all "real" oneofs. - // - // For message fields, proto3_optional doesn't create any semantic change, - // since non-repeated message fields always track presence. However it still - // indicates the semantic detail of whether the user wrote "optional" or not. - // This can be useful for round-tripping the .proto file. For consistency we - // give message fields a synthetic oneof also, even though it is not required - // to track presence. This is especially important because the parser can't - // tell if a field is a message or an enum, so it must always create a - // synthetic oneof. - // - // Proto2 optional fields do not set this flag, because they already indicate - // optional with `LABEL_OPTIONAL`. - optional bool proto3_optional = 17; -} - -// Describes a oneof. -message OneofDescriptorProto { - optional string name = 1; - optional OneofOptions options = 2; -} - -// Describes an enum type. -message EnumDescriptorProto { - optional string name = 1; - - repeated EnumValueDescriptorProto value = 2; - - optional EnumOptions options = 3; - - // Range of reserved numeric values. Reserved values may not be used by - // entries in the same enum. Reserved ranges may not overlap. - // - // Note that this is distinct from DescriptorProto.ReservedRange in that it - // is inclusive such that it can appropriately represent the entire int32 - // domain. - message EnumReservedRange { - optional int32 start = 1; // Inclusive. - optional int32 end = 2; // Inclusive. - } - - // Range of reserved numeric values. Reserved numeric values may not be used - // by enum values in the same enum declaration. Reserved ranges may not - // overlap. - repeated EnumReservedRange reserved_range = 4; - - // Reserved enum value names, which may not be reused. A given name may only - // be reserved once. - repeated string reserved_name = 5; -} - -// Describes a value within an enum. -message EnumValueDescriptorProto { - optional string name = 1; - optional int32 number = 2; - - optional EnumValueOptions options = 3; -} - -// Describes a service. -message ServiceDescriptorProto { - optional string name = 1; - repeated MethodDescriptorProto method = 2; - - optional ServiceOptions options = 3; -} - -// Describes a method of a service. -message MethodDescriptorProto { - optional string name = 1; - - // Input and output type names. These are resolved in the same way as - // FieldDescriptorProto.type_name, but must refer to a message type. - optional string input_type = 2; - optional string output_type = 3; - - optional MethodOptions options = 4; - - // Identifies if client streams multiple client messages - optional bool client_streaming = 5 [default = false]; - // Identifies if server streams multiple server messages - optional bool server_streaming = 6 [default = false]; -} - - -// =================================================================== -// Options - -// Each of the definitions above may have "options" attached. These are -// just annotations which may cause code to be generated slightly differently -// or may contain hints for code that manipulates protocol messages. -// -// Clients may define custom options as extensions of the *Options messages. -// These extensions may not yet be known at parsing time, so the parser cannot -// store the values in them. Instead it stores them in a field in the *Options -// message called uninterpreted_option. This field must have the same name -// across all *Options messages. We then use this field to populate the -// extensions when we build a descriptor, at which point all protos have been -// parsed and so all extensions are known. -// -// Extension numbers for custom options may be chosen as follows: -// * For options which will only be used within a single application or -// organization, or for experimental options, use field numbers 50000 -// through 99999. It is up to you to ensure that you do not use the -// same number for multiple options. -// * For options which will be published and used publicly by multiple -// independent entities, e-mail protobuf-global-extension-registry@google.com -// to reserve extension numbers. Simply provide your project name (e.g. -// Objective-C plugin) and your project website (if available) -- there's no -// need to explain how you intend to use them. Usually you only need one -// extension number. You can declare multiple options with only one extension -// number by putting them in a sub-message. See the Custom Options section of -// the docs for examples: -// https://developers.google.com/protocol-buffers/docs/proto#options -// If this turns out to be popular, a web service will be set up -// to automatically assign option numbers. - -message FileOptions { - - // Sets the Java package where classes generated from this .proto will be - // placed. By default, the proto package is used, but this is often - // inappropriate because proto packages do not normally start with backwards - // domain names. - optional string java_package = 1; - - - // Controls the name of the wrapper Java class generated for the .proto file. - // That class will always contain the .proto file's getDescriptor() method as - // well as any top-level extensions defined in the .proto file. - // If java_multiple_files is disabled, then all the other classes from the - // .proto file will be nested inside the single wrapper outer class. - optional string java_outer_classname = 8; - - // If enabled, then the Java code generator will generate a separate .java - // file for each top-level message, enum, and service defined in the .proto - // file. Thus, these types will *not* be nested inside the wrapper class - // named by java_outer_classname. However, the wrapper class will still be - // generated to contain the file's getDescriptor() method as well as any - // top-level extensions defined in the file. - optional bool java_multiple_files = 10 [default = false]; - - // This option does nothing. - optional bool java_generate_equals_and_hash = 20 [deprecated=true]; - - // If set true, then the Java2 code generator will generate code that - // throws an exception whenever an attempt is made to assign a non-UTF-8 - // byte sequence to a string field. - // Message reflection will do the same. - // However, an extension field still accepts non-UTF-8 byte sequences. - // This option has no effect on when used with the lite runtime. - optional bool java_string_check_utf8 = 27 [default = false]; - - - // Generated classes can be optimized for speed or code size. - enum OptimizeMode { - SPEED = 1; // Generate complete code for parsing, serialization, - // etc. - CODE_SIZE = 2; // Use ReflectionOps to implement these methods. - LITE_RUNTIME = 3; // Generate code using MessageLite and the lite runtime. - } - optional OptimizeMode optimize_for = 9 [default = SPEED]; - - // Sets the Go package where structs generated from this .proto will be - // placed. If omitted, the Go package will be derived from the following: - // - The basename of the package import path, if provided. - // - Otherwise, the package statement in the .proto file, if present. - // - Otherwise, the basename of the .proto file, without extension. - optional string go_package = 11; - - - - - // Should generic services be generated in each language? "Generic" services - // are not specific to any particular RPC system. They are generated by the - // main code generators in each language (without additional plugins). - // Generic services were the only kind of service generation supported by - // early versions of google.protobuf. - // - // Generic services are now considered deprecated in favor of using plugins - // that generate code specific to your particular RPC system. Therefore, - // these default to false. Old code which depends on generic services should - // explicitly set them to true. - optional bool cc_generic_services = 16 [default = false]; - optional bool java_generic_services = 17 [default = false]; - optional bool py_generic_services = 18 [default = false]; - optional bool php_generic_services = 42 [default = false]; - - // Is this file deprecated? - // Depending on the target platform, this can emit Deprecated annotations - // for everything in the file, or it will be completely ignored; in the very - // least, this is a formalization for deprecating files. - optional bool deprecated = 23 [default = false]; - - // Enables the use of arenas for the proto messages in this file. This applies - // only to generated classes for C++. - optional bool cc_enable_arenas = 31 [default = true]; - - - // Sets the objective c class prefix which is prepended to all objective c - // generated classes from this .proto. There is no default. - optional string objc_class_prefix = 36; - - // Namespace for generated classes; defaults to the package. - optional string csharp_namespace = 37; - - // By default Swift generators will take the proto package and CamelCase it - // replacing '.' with underscore and use that to prefix the types/symbols - // defined. When this options is provided, they will use this value instead - // to prefix the types/symbols defined. - optional string swift_prefix = 39; - - // Sets the php class prefix which is prepended to all php generated classes - // from this .proto. Default is empty. - optional string php_class_prefix = 40; - - // Use this option to change the namespace of php generated classes. Default - // is empty. When this option is empty, the package name will be used for - // determining the namespace. - optional string php_namespace = 41; - - // Use this option to change the namespace of php generated metadata classes. - // Default is empty. When this option is empty, the proto file name will be - // used for determining the namespace. - optional string php_metadata_namespace = 44; - - // Use this option to change the package of ruby generated classes. Default - // is empty. When this option is not set, the package name will be used for - // determining the ruby package. - optional string ruby_package = 45; - - - // The parser stores options it doesn't recognize here. - // See the documentation for the "Options" section above. - repeated UninterpretedOption uninterpreted_option = 999; - - // Clients can define custom options in extensions of this message. - // See the documentation for the "Options" section above. - extensions 1000 to max; - - reserved 38; -} - -message MessageOptions { - // Set true to use the old proto1 MessageSet wire format for extensions. - // This is provided for backwards-compatibility with the MessageSet wire - // format. You should not use this for any other reason: It's less - // efficient, has fewer features, and is more complicated. - // - // The message must be defined exactly as follows: - // message Foo { - // option message_set_wire_format = true; - // extensions 4 to max; - // } - // Note that the message cannot have any defined fields; MessageSets only - // have extensions. - // - // All extensions of your type must be singular messages; e.g. they cannot - // be int32s, enums, or repeated messages. - // - // Because this is an option, the above two restrictions are not enforced by - // the protocol compiler. - optional bool message_set_wire_format = 1 [default = false]; - - // Disables the generation of the standard "descriptor()" accessor, which can - // conflict with a field of the same name. This is meant to make migration - // from proto1 easier; new code should avoid fields named "descriptor". - optional bool no_standard_descriptor_accessor = 2 [default = false]; - - // Is this message deprecated? - // Depending on the target platform, this can emit Deprecated annotations - // for the message, or it will be completely ignored; in the very least, - // this is a formalization for deprecating messages. - optional bool deprecated = 3 [default = false]; - - reserved 4, 5, 6; - - // Whether the message is an automatically generated map entry type for the - // maps field. - // - // For maps fields: - // map map_field = 1; - // The parsed descriptor looks like: - // message MapFieldEntry { - // option map_entry = true; - // optional KeyType key = 1; - // optional ValueType value = 2; - // } - // repeated MapFieldEntry map_field = 1; - // - // Implementations may choose not to generate the map_entry=true message, but - // use a native map in the target language to hold the keys and values. - // The reflection APIs in such implementations still need to work as - // if the field is a repeated message field. - // - // NOTE: Do not set the option in .proto files. Always use the maps syntax - // instead. The option should only be implicitly set by the proto compiler - // parser. - optional bool map_entry = 7; - - reserved 8; // javalite_serializable - reserved 9; // javanano_as_lite - - - // The parser stores options it doesn't recognize here. See above. - repeated UninterpretedOption uninterpreted_option = 999; - - // Clients can define custom options in extensions of this message. See above. - extensions 1000 to max; -} - -message FieldOptions { - // The ctype option instructs the C++ code generator to use a different - // representation of the field than it normally would. See the specific - // options below. This option is not yet implemented in the open source - // release -- sorry, we'll try to include it in a future version! - optional CType ctype = 1 [default = STRING]; - enum CType { - // Default mode. - STRING = 0; - - CORD = 1; - - STRING_PIECE = 2; - } - // The packed option can be enabled for repeated primitive fields to enable - // a more efficient representation on the wire. Rather than repeatedly - // writing the tag and type for each element, the entire array is encoded as - // a single length-delimited blob. In proto3, only explicit setting it to - // false will avoid using packed encoding. - optional bool packed = 2; - - // The jstype option determines the JavaScript type used for values of the - // field. The option is permitted only for 64 bit integral and fixed types - // (int64, uint64, sint64, fixed64, sfixed64). A field with jstype JS_STRING - // is represented as JavaScript string, which avoids loss of precision that - // can happen when a large value is converted to a floating point JavaScript. - // Specifying JS_NUMBER for the jstype causes the generated JavaScript code to - // use the JavaScript "number" type. The behavior of the default option - // JS_NORMAL is implementation dependent. - // - // This option is an enum to permit additional types to be added, e.g. - // goog.math.Integer. - optional JSType jstype = 6 [default = JS_NORMAL]; - enum JSType { - // Use the default type. - JS_NORMAL = 0; - - // Use JavaScript strings. - JS_STRING = 1; - - // Use JavaScript numbers. - JS_NUMBER = 2; - } - - // Should this field be parsed lazily? Lazy applies only to message-type - // fields. It means that when the outer message is initially parsed, the - // inner message's contents will not be parsed but instead stored in encoded - // form. The inner message will actually be parsed when it is first accessed. - // - // This is only a hint. Implementations are free to choose whether to use - // eager or lazy parsing regardless of the value of this option. However, - // setting this option true suggests that the protocol author believes that - // using lazy parsing on this field is worth the additional bookkeeping - // overhead typically needed to implement it. - // - // This option does not affect the public interface of any generated code; - // all method signatures remain the same. Furthermore, thread-safety of the - // interface is not affected by this option; const methods remain safe to - // call from multiple threads concurrently, while non-const methods continue - // to require exclusive access. - // - // - // Note that implementations may choose not to check required fields within - // a lazy sub-message. That is, calling IsInitialized() on the outer message - // may return true even if the inner message has missing required fields. - // This is necessary because otherwise the inner message would have to be - // parsed in order to perform the check, defeating the purpose of lazy - // parsing. An implementation which chooses not to check required fields - // must be consistent about it. That is, for any particular sub-message, the - // implementation must either *always* check its required fields, or *never* - // check its required fields, regardless of whether or not the message has - // been parsed. - optional bool lazy = 5 [default = false]; - - // Is this field deprecated? - // Depending on the target platform, this can emit Deprecated annotations - // for accessors, or it will be completely ignored; in the very least, this - // is a formalization for deprecating fields. - optional bool deprecated = 3 [default = false]; - - // For Google-internal migration only. Do not use. - optional bool weak = 10 [default = false]; - - - // The parser stores options it doesn't recognize here. See above. - repeated UninterpretedOption uninterpreted_option = 999; - - // Clients can define custom options in extensions of this message. See above. - extensions 1000 to max; - - reserved 4; // removed jtype -} - -message OneofOptions { - // The parser stores options it doesn't recognize here. See above. - repeated UninterpretedOption uninterpreted_option = 999; - - // Clients can define custom options in extensions of this message. See above. - extensions 1000 to max; -} - -message EnumOptions { - - // Set this option to true to allow mapping different tag names to the same - // value. - optional bool allow_alias = 2; - - // Is this enum deprecated? - // Depending on the target platform, this can emit Deprecated annotations - // for the enum, or it will be completely ignored; in the very least, this - // is a formalization for deprecating enums. - optional bool deprecated = 3 [default = false]; - - reserved 5; // javanano_as_lite - - // The parser stores options it doesn't recognize here. See above. - repeated UninterpretedOption uninterpreted_option = 999; - - // Clients can define custom options in extensions of this message. See above. - extensions 1000 to max; -} - -message EnumValueOptions { - // Is this enum value deprecated? - // Depending on the target platform, this can emit Deprecated annotations - // for the enum value, or it will be completely ignored; in the very least, - // this is a formalization for deprecating enum values. - optional bool deprecated = 1 [default = false]; - - // The parser stores options it doesn't recognize here. See above. - repeated UninterpretedOption uninterpreted_option = 999; - - // Clients can define custom options in extensions of this message. See above. - extensions 1000 to max; -} - -message ServiceOptions { - - // Note: Field numbers 1 through 32 are reserved for Google's internal RPC - // framework. We apologize for hoarding these numbers to ourselves, but - // we were already using them long before we decided to release Protocol - // Buffers. - - // Is this service deprecated? - // Depending on the target platform, this can emit Deprecated annotations - // for the service, or it will be completely ignored; in the very least, - // this is a formalization for deprecating services. - optional bool deprecated = 33 [default = false]; - - // The parser stores options it doesn't recognize here. See above. - repeated UninterpretedOption uninterpreted_option = 999; - - // Clients can define custom options in extensions of this message. See above. - extensions 1000 to max; -} - -message MethodOptions { - - // Note: Field numbers 1 through 32 are reserved for Google's internal RPC - // framework. We apologize for hoarding these numbers to ourselves, but - // we were already using them long before we decided to release Protocol - // Buffers. - - // Is this method deprecated? - // Depending on the target platform, this can emit Deprecated annotations - // for the method, or it will be completely ignored; in the very least, - // this is a formalization for deprecating methods. - optional bool deprecated = 33 [default = false]; - - // Is this method side-effect-free (or safe in HTTP parlance), or idempotent, - // or neither? HTTP based RPC implementation may choose GET verb for safe - // methods, and PUT verb for idempotent methods instead of the default POST. - enum IdempotencyLevel { - IDEMPOTENCY_UNKNOWN = 0; - NO_SIDE_EFFECTS = 1; // implies idempotent - IDEMPOTENT = 2; // idempotent, but may have side effects - } - optional IdempotencyLevel idempotency_level = 34 - [default = IDEMPOTENCY_UNKNOWN]; - - // The parser stores options it doesn't recognize here. See above. - repeated UninterpretedOption uninterpreted_option = 999; - - // Clients can define custom options in extensions of this message. See above. - extensions 1000 to max; -} - - -// A message representing a option the parser does not recognize. This only -// appears in options protos created by the compiler::Parser class. -// DescriptorPool resolves these when building Descriptor objects. Therefore, -// options protos in descriptor objects (e.g. returned by Descriptor::options(), -// or produced by Descriptor::CopyTo()) will never have UninterpretedOptions -// in them. -message UninterpretedOption { - // The name of the uninterpreted option. Each string represents a segment in - // a dot-separated name. is_extension is true iff a segment represents an - // extension (denoted with parentheses in options specs in .proto files). - // E.g.,{ ["foo", false], ["bar.baz", true], ["qux", false] } represents - // "foo.(bar.baz).qux". - message NamePart { - required string name_part = 1; - required bool is_extension = 2; - } - repeated NamePart name = 2; - - // The value of the uninterpreted option, in whatever type the tokenizer - // identified it as during parsing. Exactly one of these should be set. - optional string identifier_value = 3; - optional uint64 positive_int_value = 4; - optional int64 negative_int_value = 5; - optional double double_value = 6; - optional bytes string_value = 7; - optional string aggregate_value = 8; -} - -// =================================================================== -// Optional source code info - -// Encapsulates information about the original source file from which a -// FileDescriptorProto was generated. -message SourceCodeInfo { - // A Location identifies a piece of source code in a .proto file which - // corresponds to a particular definition. This information is intended - // to be useful to IDEs, code indexers, documentation generators, and similar - // tools. - // - // For example, say we have a file like: - // message Foo { - // optional string foo = 1; - // } - // Let's look at just the field definition: - // optional string foo = 1; - // ^ ^^ ^^ ^ ^^^ - // a bc de f ghi - // We have the following locations: - // span path represents - // [a,i) [ 4, 0, 2, 0 ] The whole field definition. - // [a,b) [ 4, 0, 2, 0, 4 ] The label (optional). - // [c,d) [ 4, 0, 2, 0, 5 ] The type (string). - // [e,f) [ 4, 0, 2, 0, 1 ] The name (foo). - // [g,h) [ 4, 0, 2, 0, 3 ] The number (1). - // - // Notes: - // - A location may refer to a repeated field itself (i.e. not to any - // particular index within it). This is used whenever a set of elements are - // logically enclosed in a single code segment. For example, an entire - // extend block (possibly containing multiple extension definitions) will - // have an outer location whose path refers to the "extensions" repeated - // field without an index. - // - Multiple locations may have the same path. This happens when a single - // logical declaration is spread out across multiple places. The most - // obvious example is the "extend" block again -- there may be multiple - // extend blocks in the same scope, each of which will have the same path. - // - A location's span is not always a subset of its parent's span. For - // example, the "extendee" of an extension declaration appears at the - // beginning of the "extend" block and is shared by all extensions within - // the block. - // - Just because a location's span is a subset of some other location's span - // does not mean that it is a descendant. For example, a "group" defines - // both a type and a field in a single declaration. Thus, the locations - // corresponding to the type and field and their components will overlap. - // - Code which tries to interpret locations should probably be designed to - // ignore those that it doesn't understand, as more types of locations could - // be recorded in the future. - repeated Location location = 1; - message Location { - // Identifies which part of the FileDescriptorProto was defined at this - // location. - // - // Each element is a field number or an index. They form a path from - // the root FileDescriptorProto to the place where the definition occurs. For - // example, this path: - // [ 4, 3, 2, 7, 1 ] - // refers to: - // file.message_type(3) // 4, 3 - // .field(7) // 2, 7 - // .name() // 1 - // This is because FileDescriptorProto.message_type has field number 4: - // repeated DescriptorProto message_type = 4; - // and DescriptorProto.field has field number 2: - // repeated FieldDescriptorProto field = 2; - // and FieldDescriptorProto.name has field number 1: - // optional string name = 1; - // - // Thus, the above path gives the location of a field name. If we removed - // the last element: - // [ 4, 3, 2, 7 ] - // this path refers to the whole field declaration (from the beginning - // of the label to the terminating semicolon). - repeated int32 path = 1 [packed = true]; - - // Always has exactly three or four elements: start line, start column, - // end line (optional, otherwise assumed same as start line), end column. - // These are packed into a single field for efficiency. Note that line - // and column numbers are zero-based -- typically you will want to add - // 1 to each before displaying to a user. - repeated int32 span = 2 [packed = true]; - - // If this SourceCodeInfo represents a complete declaration, these are any - // comments appearing before and after the declaration which appear to be - // attached to the declaration. - // - // A series of line comments appearing on consecutive lines, with no other - // tokens appearing on those lines, will be treated as a single comment. - // - // leading_detached_comments will keep paragraphs of comments that appear - // before (but not connected to) the current element. Each paragraph, - // separated by empty lines, will be one comment element in the repeated - // field. - // - // Only the comment content is provided; comment markers (e.g. //) are - // stripped out. For block comments, leading whitespace and an asterisk - // will be stripped from the beginning of each line other than the first. - // Newlines are included in the output. - // - // Examples: - // - // optional int32 foo = 1; // Comment attached to foo. - // // Comment attached to bar. - // optional int32 bar = 2; - // - // optional string baz = 3; - // // Comment attached to baz. - // // Another line attached to baz. - // - // // Comment attached to qux. - // // - // // Another line attached to qux. - // optional double qux = 4; - // - // // Detached comment for corge. This is not leading or trailing comments - // // to qux or corge because there are blank lines separating it from - // // both. - // - // // Detached comment for corge paragraph 2. - // - // optional string corge = 5; - // /* Block comment attached - // * to corge. Leading asterisks - // * will be removed. */ - // /* Block comment attached to - // * grault. */ - // optional int32 grault = 6; - // - // // ignored detached comments. - optional string leading_comments = 3; - optional string trailing_comments = 4; - repeated string leading_detached_comments = 6; - } -} - -// Describes the relationship between generated code and its original source -// file. A GeneratedCodeInfo message is associated with only one generated -// source file, but may contain references to different source .proto files. -message GeneratedCodeInfo { - // An Annotation connects some span of text in generated code to an element - // of its generating .proto file. - repeated Annotation annotation = 1; - message Annotation { - // Identifies the element in the original source .proto file. This field - // is formatted the same as SourceCodeInfo.Location.path. - repeated int32 path = 1 [packed = true]; - - // Identifies the filesystem path to the original source .proto. - optional string source_file = 2; - - // Identifies the starting offset in bytes in the generated code - // that relates to the identified object. - optional int32 begin = 3; - - // Identifies the ending offset in bytes in the generated code that - // relates to the identified offset. The end offset should be one past - // the last relevant byte (so the length of the text = end - begin). - optional int32 end = 4; - } -} \ No newline at end of file diff --git a/third_party/google/protobuf/duration.proto b/third_party/google/protobuf/duration.proto deleted file mode 100644 index cb7cf0e..0000000 --- a/third_party/google/protobuf/duration.proto +++ /dev/null @@ -1,116 +0,0 @@ -// Protocol Buffers - Google's data interchange format -// Copyright 2008 Google Inc. All rights reserved. -// https://developers.google.com/protocol-buffers/ -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -syntax = "proto3"; - -package google.protobuf; - -option csharp_namespace = "Google.Protobuf.WellKnownTypes"; -option cc_enable_arenas = true; -option go_package = "google.golang.org/protobuf/types/known/durationpb"; -option java_package = "com.google.protobuf"; -option java_outer_classname = "DurationProto"; -option java_multiple_files = true; -option objc_class_prefix = "GPB"; - -// A Duration represents a signed, fixed-length span of time represented -// as a count of seconds and fractions of seconds at nanosecond -// resolution. It is independent of any calendar and concepts like "day" -// or "month". It is related to Timestamp in that the difference between -// two Timestamp values is a Duration and it can be added or subtracted -// from a Timestamp. Range is approximately +-10,000 years. -// -// # Examples -// -// Example 1: Compute Duration from two Timestamps in pseudo code. -// -// Timestamp start = ...; -// Timestamp end = ...; -// Duration duration = ...; -// -// duration.seconds = end.seconds - start.seconds; -// duration.nanos = end.nanos - start.nanos; -// -// if (duration.seconds < 0 && duration.nanos > 0) { -// duration.seconds += 1; -// duration.nanos -= 1000000000; -// } else if (duration.seconds > 0 && duration.nanos < 0) { -// duration.seconds -= 1; -// duration.nanos += 1000000000; -// } -// -// Example 2: Compute Timestamp from Timestamp + Duration in pseudo code. -// -// Timestamp start = ...; -// Duration duration = ...; -// Timestamp end = ...; -// -// end.seconds = start.seconds + duration.seconds; -// end.nanos = start.nanos + duration.nanos; -// -// if (end.nanos < 0) { -// end.seconds -= 1; -// end.nanos += 1000000000; -// } else if (end.nanos >= 1000000000) { -// end.seconds += 1; -// end.nanos -= 1000000000; -// } -// -// Example 3: Compute Duration from datetime.timedelta in Python. -// -// td = datetime.timedelta(days=3, minutes=10) -// duration = Duration() -// duration.FromTimedelta(td) -// -// # JSON Mapping -// -// In JSON format, the Duration type is encoded as a string rather than an -// object, where the string ends in the suffix "s" (indicating seconds) and -// is preceded by the number of seconds, with nanoseconds expressed as -// fractional seconds. For example, 3 seconds with 0 nanoseconds should be -// encoded in JSON format as "3s", while 3 seconds and 1 nanosecond should -// be expressed in JSON format as "3.000000001s", and 3 seconds and 1 -// microsecond should be expressed in JSON format as "3.000001s". -// -// -message Duration { - // Signed seconds of the span of time. Must be from -315,576,000,000 - // to +315,576,000,000 inclusive. Note: these bounds are computed from: - // 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years - int64 seconds = 1; - - // Signed fractions of a second at nanosecond resolution of the span - // of time. Durations less than one second are represented with a 0 - // `seconds` field and a positive or negative `nanos` field. For durations - // of one second or more, a non-zero value for the `nanos` field must be - // of the same sign as the `seconds` field. Must be from -999,999,999 - // to +999,999,999 inclusive. - int32 nanos = 2; -} \ No newline at end of file diff --git a/third_party/google/protobuf/timestamp.proto b/third_party/google/protobuf/timestamp.proto deleted file mode 100644 index cd35786..0000000 --- a/third_party/google/protobuf/timestamp.proto +++ /dev/null @@ -1,138 +0,0 @@ -// Protocol Buffers - Google's data interchange format -// Copyright 2008 Google Inc. All rights reserved. -// https://developers.google.com/protocol-buffers/ -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -syntax = "proto3"; - -package google.protobuf; - -option csharp_namespace = "Google.Protobuf.WellKnownTypes"; -option cc_enable_arenas = true; -option go_package = "github.com/golang/protobuf/ptypes/timestamp"; -option java_package = "com.google.protobuf"; -option java_outer_classname = "TimestampProto"; -option java_multiple_files = true; -option objc_class_prefix = "GPB"; - -// A Timestamp represents a point in time independent of any time zone or local -// calendar, encoded as a count of seconds and fractions of seconds at -// nanosecond resolution. The count is relative to an epoch at UTC midnight on -// January 1, 1970, in the proleptic Gregorian calendar which extends the -// Gregorian calendar backwards to year one. -// -// All minutes are 60 seconds long. Leap seconds are "smeared" so that no leap -// second table is needed for interpretation, using a [24-hour linear -// smear](https://developers.google.com/time/smear). -// -// The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By -// restricting to that range, we ensure that we can convert to and from [RFC -// 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. -// -// # Examples -// -// Example 1: Compute Timestamp from POSIX `time()`. -// -// Timestamp timestamp; -// timestamp.set_seconds(time(NULL)); -// timestamp.set_nanos(0); -// -// Example 2: Compute Timestamp from POSIX `gettimeofday()`. -// -// struct timeval tv; -// gettimeofday(&tv, NULL); -// -// Timestamp timestamp; -// timestamp.set_seconds(tv.tv_sec); -// timestamp.set_nanos(tv.tv_usec * 1000); -// -// Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. -// -// FILETIME ft; -// GetSystemTimeAsFileTime(&ft); -// UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; -// -// // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z -// // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. -// Timestamp timestamp; -// timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); -// timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); -// -// Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. -// -// long millis = System.currentTimeMillis(); -// -// Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) -// .setNanos((int) ((millis % 1000) * 1000000)).build(); -// -// -// Example 5: Compute Timestamp from current time in Python. -// -// timestamp = Timestamp() -// timestamp.GetCurrentTime() -// -// # JSON Mapping -// -// In JSON format, the Timestamp type is encoded as a string in the -// [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the -// format is "{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z" -// where {year} is always expressed using four digits while {month}, {day}, -// {hour}, {min}, and {sec} are zero-padded to two digits each. The fractional -// seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), -// are optional. The "Z" suffix indicates the timezone ("UTC"); the timezone -// is required. A proto3 JSON serializer should always use UTC (as indicated by -// "Z") when printing the Timestamp type and a proto3 JSON parser should be -// able to accept both UTC and other timezones (as indicated by an offset). -// -// For example, "2017-01-15T01:30:15.01Z" encodes 15.01 seconds past -// 01:30 UTC on January 15, 2017. -// -// In JavaScript, one can convert a Date object to this format using the -// standard -// [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) -// method. In Python, a standard `datetime.datetime` object can be converted -// to this format using -// [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with -// the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use -// the Joda Time's [`ISODateTimeFormat.dateTime()`]( -// http://www.joda.org/joda-time/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime%2D%2D -// ) to obtain a formatter capable of generating timestamps in this format. -// -// -message Timestamp { - // Represents seconds of UTC time since Unix epoch - // 1970-01-01T00:00:00Z. Must be from 0001-01-01T00:00:00Z to - // 9999-12-31T23:59:59Z inclusive. - int64 seconds = 1; - - // Non-negative fractions of a second at nanosecond resolution. Negative - // second values with fractions must still have non-negative nanos values - // that count forward in time. Must be from 0 to 999,999,999 - // inclusive. - int32 nanos = 2; -} diff --git a/third_party/validate/validate.proto b/third_party/validate/validate.proto deleted file mode 100644 index 42561c3..0000000 --- a/third_party/validate/validate.proto +++ /dev/null @@ -1,862 +0,0 @@ -syntax = "proto2"; -package validate; - -option go_package = "github.com/envoyproxy/protoc-gen-validate/validate"; -option java_package = "io.envoyproxy.pgv.validate"; - -import "google/protobuf/descriptor.proto"; -import "google/protobuf/duration.proto"; -import "google/protobuf/timestamp.proto"; - -// Validation rules applied at the message level -extend google.protobuf.MessageOptions { - // Disabled nullifies any validation rules for this message, including any - // message fields associated with it that do support validation. - optional bool disabled = 1071; - // Ignore skips generation of validation methods for this message. - optional bool ignored = 1072; -} - -// Validation rules applied at the oneof level -extend google.protobuf.OneofOptions { - // Required ensures that exactly one the field options in a oneof is set; - // validation fails if no fields in the oneof are set. - optional bool required = 1071; -} - -// Validation rules applied at the field level -extend google.protobuf.FieldOptions { - // Rules specify the validations to be performed on this field. By default, - // no validation is performed against a field. - optional FieldRules rules = 1071; -} - -// FieldRules encapsulates the rules for each type of field. Depending on the -// field, the correct set should be used to ensure proper validations. -message FieldRules { - optional MessageRules message = 17; - oneof type { - // Scalar Field Types - FloatRules float = 1; - DoubleRules double = 2; - Int32Rules int32 = 3; - Int64Rules int64 = 4; - UInt32Rules uint32 = 5; - UInt64Rules uint64 = 6; - SInt32Rules sint32 = 7; - SInt64Rules sint64 = 8; - Fixed32Rules fixed32 = 9; - Fixed64Rules fixed64 = 10; - SFixed32Rules sfixed32 = 11; - SFixed64Rules sfixed64 = 12; - BoolRules bool = 13; - StringRules string = 14; - BytesRules bytes = 15; - - // Complex Field Types - EnumRules enum = 16; - RepeatedRules repeated = 18; - MapRules map = 19; - - // Well-Known Field Types - AnyRules any = 20; - DurationRules duration = 21; - TimestampRules timestamp = 22; - } -} - -// FloatRules describes the constraints applied to `float` values -message FloatRules { - // Const specifies that this field must be exactly the specified value - optional float const = 1; - - // Lt specifies that this field must be less than the specified value, - // exclusive - optional float lt = 2; - - // Lte specifies that this field must be less than or equal to the - // specified value, inclusive - optional float lte = 3; - - // Gt specifies that this field must be greater than the specified value, - // exclusive. If the value of Gt is larger than a specified Lt or Lte, the - // range is reversed. - optional float gt = 4; - - // Gte specifies that this field must be greater than or equal to the - // specified value, inclusive. If the value of Gte is larger than a - // specified Lt or Lte, the range is reversed. - optional float gte = 5; - - // In specifies that this field must be equal to one of the specified - // values - repeated float in = 6; - - // NotIn specifies that this field cannot be equal to one of the specified - // values - repeated float not_in = 7; - - // IgnoreEmpty specifies that the validation rules of this field should be - // evaluated only if the field is not empty - optional bool ignore_empty = 8; -} - -// DoubleRules describes the constraints applied to `double` values -message DoubleRules { - // Const specifies that this field must be exactly the specified value - optional double const = 1; - - // Lt specifies that this field must be less than the specified value, - // exclusive - optional double lt = 2; - - // Lte specifies that this field must be less than or equal to the - // specified value, inclusive - optional double lte = 3; - - // Gt specifies that this field must be greater than the specified value, - // exclusive. If the value of Gt is larger than a specified Lt or Lte, the - // range is reversed. - optional double gt = 4; - - // Gte specifies that this field must be greater than or equal to the - // specified value, inclusive. If the value of Gte is larger than a - // specified Lt or Lte, the range is reversed. - optional double gte = 5; - - // In specifies that this field must be equal to one of the specified - // values - repeated double in = 6; - - // NotIn specifies that this field cannot be equal to one of the specified - // values - repeated double not_in = 7; - - // IgnoreEmpty specifies that the validation rules of this field should be - // evaluated only if the field is not empty - optional bool ignore_empty = 8; -} - -// Int32Rules describes the constraints applied to `int32` values -message Int32Rules { - // Const specifies that this field must be exactly the specified value - optional int32 const = 1; - - // Lt specifies that this field must be less than the specified value, - // exclusive - optional int32 lt = 2; - - // Lte specifies that this field must be less than or equal to the - // specified value, inclusive - optional int32 lte = 3; - - // Gt specifies that this field must be greater than the specified value, - // exclusive. If the value of Gt is larger than a specified Lt or Lte, the - // range is reversed. - optional int32 gt = 4; - - // Gte specifies that this field must be greater than or equal to the - // specified value, inclusive. If the value of Gte is larger than a - // specified Lt or Lte, the range is reversed. - optional int32 gte = 5; - - // In specifies that this field must be equal to one of the specified - // values - repeated int32 in = 6; - - // NotIn specifies that this field cannot be equal to one of the specified - // values - repeated int32 not_in = 7; - - // IgnoreEmpty specifies that the validation rules of this field should be - // evaluated only if the field is not empty - optional bool ignore_empty = 8; -} - -// Int64Rules describes the constraints applied to `int64` values -message Int64Rules { - // Const specifies that this field must be exactly the specified value - optional int64 const = 1; - - // Lt specifies that this field must be less than the specified value, - // exclusive - optional int64 lt = 2; - - // Lte specifies that this field must be less than or equal to the - // specified value, inclusive - optional int64 lte = 3; - - // Gt specifies that this field must be greater than the specified value, - // exclusive. If the value of Gt is larger than a specified Lt or Lte, the - // range is reversed. - optional int64 gt = 4; - - // Gte specifies that this field must be greater than or equal to the - // specified value, inclusive. If the value of Gte is larger than a - // specified Lt or Lte, the range is reversed. - optional int64 gte = 5; - - // In specifies that this field must be equal to one of the specified - // values - repeated int64 in = 6; - - // NotIn specifies that this field cannot be equal to one of the specified - // values - repeated int64 not_in = 7; - - // IgnoreEmpty specifies that the validation rules of this field should be - // evaluated only if the field is not empty - optional bool ignore_empty = 8; -} - -// UInt32Rules describes the constraints applied to `uint32` values -message UInt32Rules { - // Const specifies that this field must be exactly the specified value - optional uint32 const = 1; - - // Lt specifies that this field must be less than the specified value, - // exclusive - optional uint32 lt = 2; - - // Lte specifies that this field must be less than or equal to the - // specified value, inclusive - optional uint32 lte = 3; - - // Gt specifies that this field must be greater than the specified value, - // exclusive. If the value of Gt is larger than a specified Lt or Lte, the - // range is reversed. - optional uint32 gt = 4; - - // Gte specifies that this field must be greater than or equal to the - // specified value, inclusive. If the value of Gte is larger than a - // specified Lt or Lte, the range is reversed. - optional uint32 gte = 5; - - // In specifies that this field must be equal to one of the specified - // values - repeated uint32 in = 6; - - // NotIn specifies that this field cannot be equal to one of the specified - // values - repeated uint32 not_in = 7; - - // IgnoreEmpty specifies that the validation rules of this field should be - // evaluated only if the field is not empty - optional bool ignore_empty = 8; -} - -// UInt64Rules describes the constraints applied to `uint64` values -message UInt64Rules { - // Const specifies that this field must be exactly the specified value - optional uint64 const = 1; - - // Lt specifies that this field must be less than the specified value, - // exclusive - optional uint64 lt = 2; - - // Lte specifies that this field must be less than or equal to the - // specified value, inclusive - optional uint64 lte = 3; - - // Gt specifies that this field must be greater than the specified value, - // exclusive. If the value of Gt is larger than a specified Lt or Lte, the - // range is reversed. - optional uint64 gt = 4; - - // Gte specifies that this field must be greater than or equal to the - // specified value, inclusive. If the value of Gte is larger than a - // specified Lt or Lte, the range is reversed. - optional uint64 gte = 5; - - // In specifies that this field must be equal to one of the specified - // values - repeated uint64 in = 6; - - // NotIn specifies that this field cannot be equal to one of the specified - // values - repeated uint64 not_in = 7; - - // IgnoreEmpty specifies that the validation rules of this field should be - // evaluated only if the field is not empty - optional bool ignore_empty = 8; -} - -// SInt32Rules describes the constraints applied to `sint32` values -message SInt32Rules { - // Const specifies that this field must be exactly the specified value - optional sint32 const = 1; - - // Lt specifies that this field must be less than the specified value, - // exclusive - optional sint32 lt = 2; - - // Lte specifies that this field must be less than or equal to the - // specified value, inclusive - optional sint32 lte = 3; - - // Gt specifies that this field must be greater than the specified value, - // exclusive. If the value of Gt is larger than a specified Lt or Lte, the - // range is reversed. - optional sint32 gt = 4; - - // Gte specifies that this field must be greater than or equal to the - // specified value, inclusive. If the value of Gte is larger than a - // specified Lt or Lte, the range is reversed. - optional sint32 gte = 5; - - // In specifies that this field must be equal to one of the specified - // values - repeated sint32 in = 6; - - // NotIn specifies that this field cannot be equal to one of the specified - // values - repeated sint32 not_in = 7; - - // IgnoreEmpty specifies that the validation rules of this field should be - // evaluated only if the field is not empty - optional bool ignore_empty = 8; -} - -// SInt64Rules describes the constraints applied to `sint64` values -message SInt64Rules { - // Const specifies that this field must be exactly the specified value - optional sint64 const = 1; - - // Lt specifies that this field must be less than the specified value, - // exclusive - optional sint64 lt = 2; - - // Lte specifies that this field must be less than or equal to the - // specified value, inclusive - optional sint64 lte = 3; - - // Gt specifies that this field must be greater than the specified value, - // exclusive. If the value of Gt is larger than a specified Lt or Lte, the - // range is reversed. - optional sint64 gt = 4; - - // Gte specifies that this field must be greater than or equal to the - // specified value, inclusive. If the value of Gte is larger than a - // specified Lt or Lte, the range is reversed. - optional sint64 gte = 5; - - // In specifies that this field must be equal to one of the specified - // values - repeated sint64 in = 6; - - // NotIn specifies that this field cannot be equal to one of the specified - // values - repeated sint64 not_in = 7; - - // IgnoreEmpty specifies that the validation rules of this field should be - // evaluated only if the field is not empty - optional bool ignore_empty = 8; -} - -// Fixed32Rules describes the constraints applied to `fixed32` values -message Fixed32Rules { - // Const specifies that this field must be exactly the specified value - optional fixed32 const = 1; - - // Lt specifies that this field must be less than the specified value, - // exclusive - optional fixed32 lt = 2; - - // Lte specifies that this field must be less than or equal to the - // specified value, inclusive - optional fixed32 lte = 3; - - // Gt specifies that this field must be greater than the specified value, - // exclusive. If the value of Gt is larger than a specified Lt or Lte, the - // range is reversed. - optional fixed32 gt = 4; - - // Gte specifies that this field must be greater than or equal to the - // specified value, inclusive. If the value of Gte is larger than a - // specified Lt or Lte, the range is reversed. - optional fixed32 gte = 5; - - // In specifies that this field must be equal to one of the specified - // values - repeated fixed32 in = 6; - - // NotIn specifies that this field cannot be equal to one of the specified - // values - repeated fixed32 not_in = 7; - - // IgnoreEmpty specifies that the validation rules of this field should be - // evaluated only if the field is not empty - optional bool ignore_empty = 8; -} - -// Fixed64Rules describes the constraints applied to `fixed64` values -message Fixed64Rules { - // Const specifies that this field must be exactly the specified value - optional fixed64 const = 1; - - // Lt specifies that this field must be less than the specified value, - // exclusive - optional fixed64 lt = 2; - - // Lte specifies that this field must be less than or equal to the - // specified value, inclusive - optional fixed64 lte = 3; - - // Gt specifies that this field must be greater than the specified value, - // exclusive. If the value of Gt is larger than a specified Lt or Lte, the - // range is reversed. - optional fixed64 gt = 4; - - // Gte specifies that this field must be greater than or equal to the - // specified value, inclusive. If the value of Gte is larger than a - // specified Lt or Lte, the range is reversed. - optional fixed64 gte = 5; - - // In specifies that this field must be equal to one of the specified - // values - repeated fixed64 in = 6; - - // NotIn specifies that this field cannot be equal to one of the specified - // values - repeated fixed64 not_in = 7; - - // IgnoreEmpty specifies that the validation rules of this field should be - // evaluated only if the field is not empty - optional bool ignore_empty = 8; -} - -// SFixed32Rules describes the constraints applied to `sfixed32` values -message SFixed32Rules { - // Const specifies that this field must be exactly the specified value - optional sfixed32 const = 1; - - // Lt specifies that this field must be less than the specified value, - // exclusive - optional sfixed32 lt = 2; - - // Lte specifies that this field must be less than or equal to the - // specified value, inclusive - optional sfixed32 lte = 3; - - // Gt specifies that this field must be greater than the specified value, - // exclusive. If the value of Gt is larger than a specified Lt or Lte, the - // range is reversed. - optional sfixed32 gt = 4; - - // Gte specifies that this field must be greater than or equal to the - // specified value, inclusive. If the value of Gte is larger than a - // specified Lt or Lte, the range is reversed. - optional sfixed32 gte = 5; - - // In specifies that this field must be equal to one of the specified - // values - repeated sfixed32 in = 6; - - // NotIn specifies that this field cannot be equal to one of the specified - // values - repeated sfixed32 not_in = 7; - - // IgnoreEmpty specifies that the validation rules of this field should be - // evaluated only if the field is not empty - optional bool ignore_empty = 8; -} - -// SFixed64Rules describes the constraints applied to `sfixed64` values -message SFixed64Rules { - // Const specifies that this field must be exactly the specified value - optional sfixed64 const = 1; - - // Lt specifies that this field must be less than the specified value, - // exclusive - optional sfixed64 lt = 2; - - // Lte specifies that this field must be less than or equal to the - // specified value, inclusive - optional sfixed64 lte = 3; - - // Gt specifies that this field must be greater than the specified value, - // exclusive. If the value of Gt is larger than a specified Lt or Lte, the - // range is reversed. - optional sfixed64 gt = 4; - - // Gte specifies that this field must be greater than or equal to the - // specified value, inclusive. If the value of Gte is larger than a - // specified Lt or Lte, the range is reversed. - optional sfixed64 gte = 5; - - // In specifies that this field must be equal to one of the specified - // values - repeated sfixed64 in = 6; - - // NotIn specifies that this field cannot be equal to one of the specified - // values - repeated sfixed64 not_in = 7; - - // IgnoreEmpty specifies that the validation rules of this field should be - // evaluated only if the field is not empty - optional bool ignore_empty = 8; -} - -// BoolRules describes the constraints applied to `bool` values -message BoolRules { - // Const specifies that this field must be exactly the specified value - optional bool const = 1; -} - -// StringRules describe the constraints applied to `string` values -message StringRules { - // Const specifies that this field must be exactly the specified value - optional string const = 1; - - // Len specifies that this field must be the specified number of - // characters (Unicode code points). Note that the number of - // characters may differ from the number of bytes in the string. - optional uint64 len = 19; - - // MinLen specifies that this field must be the specified number of - // characters (Unicode code points) at a minimum. Note that the number of - // characters may differ from the number of bytes in the string. - optional uint64 min_len = 2; - - // MaxLen specifies that this field must be the specified number of - // characters (Unicode code points) at a maximum. Note that the number of - // characters may differ from the number of bytes in the string. - optional uint64 max_len = 3; - - // LenBytes specifies that this field must be the specified number of bytes - optional uint64 len_bytes = 20; - - // MinBytes specifies that this field must be the specified number of bytes - // at a minimum - optional uint64 min_bytes = 4; - - // MaxBytes specifies that this field must be the specified number of bytes - // at a maximum - optional uint64 max_bytes = 5; - - // Pattern specifes that this field must match against the specified - // regular expression (RE2 syntax). The included expression should elide - // any delimiters. - optional string pattern = 6; - - // Prefix specifies that this field must have the specified substring at - // the beginning of the string. - optional string prefix = 7; - - // Suffix specifies that this field must have the specified substring at - // the end of the string. - optional string suffix = 8; - - // Contains specifies that this field must have the specified substring - // anywhere in the string. - optional string contains = 9; - - // NotContains specifies that this field cannot have the specified substring - // anywhere in the string. - optional string not_contains = 23; - - // In specifies that this field must be equal to one of the specified - // values - repeated string in = 10; - - // NotIn specifies that this field cannot be equal to one of the specified - // values - repeated string not_in = 11; - - // WellKnown rules provide advanced constraints against common string - // patterns - oneof well_known { - // Email specifies that the field must be a valid email address as - // defined by RFC 5322 - bool email = 12; - - // Hostname specifies that the field must be a valid hostname as - // defined by RFC 1034. This constraint does not support - // internationalized domain names (IDNs). - bool hostname = 13; - - // Ip specifies that the field must be a valid IP (v4 or v6) address. - // Valid IPv6 addresses should not include surrounding square brackets. - bool ip = 14; - - // Ipv4 specifies that the field must be a valid IPv4 address. - bool ipv4 = 15; - - // Ipv6 specifies that the field must be a valid IPv6 address. Valid - // IPv6 addresses should not include surrounding square brackets. - bool ipv6 = 16; - - // Uri specifies that the field must be a valid, absolute URI as defined - // by RFC 3986 - bool uri = 17; - - // UriRef specifies that the field must be a valid URI as defined by RFC - // 3986 and may be relative or absolute. - bool uri_ref = 18; - - // Address specifies that the field must be either a valid hostname as - // defined by RFC 1034 (which does not support internationalized domain - // names or IDNs), or it can be a valid IP (v4 or v6). - bool address = 21; - - // Uuid specifies that the field must be a valid UUID as defined by - // RFC 4122 - bool uuid = 22; - - // WellKnownRegex specifies a common well known pattern defined as a regex. - KnownRegex well_known_regex = 24; - } - - // This applies to regexes HTTP_HEADER_NAME and HTTP_HEADER_VALUE to enable - // strict header validation. - // By default, this is true, and HTTP header validations are RFC-compliant. - // Setting to false will enable a looser validations that only disallows - // \r\n\0 characters, which can be used to bypass header matching rules. - optional bool strict = 25 [default = true]; - - // IgnoreEmpty specifies that the validation rules of this field should be - // evaluated only if the field is not empty - optional bool ignore_empty = 26; -} - -// WellKnownRegex contain some well-known patterns. -enum KnownRegex { - UNKNOWN = 0; - - // HTTP header name as defined by RFC 7230. - HTTP_HEADER_NAME = 1; - - // HTTP header value as defined by RFC 7230. - HTTP_HEADER_VALUE = 2; -} - -// BytesRules describe the constraints applied to `bytes` values -message BytesRules { - // Const specifies that this field must be exactly the specified value - optional bytes const = 1; - - // Len specifies that this field must be the specified number of bytes - optional uint64 len = 13; - - // MinLen specifies that this field must be the specified number of bytes - // at a minimum - optional uint64 min_len = 2; - - // MaxLen specifies that this field must be the specified number of bytes - // at a maximum - optional uint64 max_len = 3; - - // Pattern specifes that this field must match against the specified - // regular expression (RE2 syntax). The included expression should elide - // any delimiters. - optional string pattern = 4; - - // Prefix specifies that this field must have the specified bytes at the - // beginning of the string. - optional bytes prefix = 5; - - // Suffix specifies that this field must have the specified bytes at the - // end of the string. - optional bytes suffix = 6; - - // Contains specifies that this field must have the specified bytes - // anywhere in the string. - optional bytes contains = 7; - - // In specifies that this field must be equal to one of the specified - // values - repeated bytes in = 8; - - // NotIn specifies that this field cannot be equal to one of the specified - // values - repeated bytes not_in = 9; - - // WellKnown rules provide advanced constraints against common byte - // patterns - oneof well_known { - // Ip specifies that the field must be a valid IP (v4 or v6) address in - // byte format - bool ip = 10; - - // Ipv4 specifies that the field must be a valid IPv4 address in byte - // format - bool ipv4 = 11; - - // Ipv6 specifies that the field must be a valid IPv6 address in byte - // format - bool ipv6 = 12; - } - - // IgnoreEmpty specifies that the validation rules of this field should be - // evaluated only if the field is not empty - optional bool ignore_empty = 14; -} - -// EnumRules describe the constraints applied to enum values -message EnumRules { - // Const specifies that this field must be exactly the specified value - optional int32 const = 1; - - // DefinedOnly specifies that this field must be only one of the defined - // values for this enum, failing on any undefined value. - optional bool defined_only = 2; - - // In specifies that this field must be equal to one of the specified - // values - repeated int32 in = 3; - - // NotIn specifies that this field cannot be equal to one of the specified - // values - repeated int32 not_in = 4; -} - -// MessageRules describe the constraints applied to embedded message values. -// For message-type fields, validation is performed recursively. -message MessageRules { - // Skip specifies that the validation rules of this field should not be - // evaluated - optional bool skip = 1; - - // Required specifies that this field must be set - optional bool required = 2; -} - -// RepeatedRules describe the constraints applied to `repeated` values -message RepeatedRules { - // MinItems specifies that this field must have the specified number of - // items at a minimum - optional uint64 min_items = 1; - - // MaxItems specifies that this field must have the specified number of - // items at a maximum - optional uint64 max_items = 2; - - // Unique specifies that all elements in this field must be unique. This - // contraint is only applicable to scalar and enum types (messages are not - // supported). - optional bool unique = 3; - - // Items specifies the contraints to be applied to each item in the field. - // Repeated message fields will still execute validation against each item - // unless skip is specified here. - optional FieldRules items = 4; - - // IgnoreEmpty specifies that the validation rules of this field should be - // evaluated only if the field is not empty - optional bool ignore_empty = 5; -} - -// MapRules describe the constraints applied to `map` values -message MapRules { - // MinPairs specifies that this field must have the specified number of - // KVs at a minimum - optional uint64 min_pairs = 1; - - // MaxPairs specifies that this field must have the specified number of - // KVs at a maximum - optional uint64 max_pairs = 2; - - // NoSparse specifies values in this field cannot be unset. This only - // applies to map's with message value types. - optional bool no_sparse = 3; - - // Keys specifies the constraints to be applied to each key in the field. - optional FieldRules keys = 4; - - // Values specifies the constraints to be applied to the value of each key - // in the field. Message values will still have their validations evaluated - // unless skip is specified here. - optional FieldRules values = 5; - - // IgnoreEmpty specifies that the validation rules of this field should be - // evaluated only if the field is not empty - optional bool ignore_empty = 6; -} - -// AnyRules describe constraints applied exclusively to the -// `google.protobuf.Any` well-known type -message AnyRules { - // Required specifies that this field must be set - optional bool required = 1; - - // In specifies that this field's `type_url` must be equal to one of the - // specified values. - repeated string in = 2; - - // NotIn specifies that this field's `type_url` must not be equal to any of - // the specified values. - repeated string not_in = 3; -} - -// DurationRules describe the constraints applied exclusively to the -// `google.protobuf.Duration` well-known type -message DurationRules { - // Required specifies that this field must be set - optional bool required = 1; - - // Const specifies that this field must be exactly the specified value - optional google.protobuf.Duration const = 2; - - // Lt specifies that this field must be less than the specified value, - // exclusive - optional google.protobuf.Duration lt = 3; - - // Lt specifies that this field must be less than the specified value, - // inclusive - optional google.protobuf.Duration lte = 4; - - // Gt specifies that this field must be greater than the specified value, - // exclusive - optional google.protobuf.Duration gt = 5; - - // Gte specifies that this field must be greater than the specified value, - // inclusive - optional google.protobuf.Duration gte = 6; - - // In specifies that this field must be equal to one of the specified - // values - repeated google.protobuf.Duration in = 7; - - // NotIn specifies that this field cannot be equal to one of the specified - // values - repeated google.protobuf.Duration not_in = 8; -} - -// TimestampRules describe the constraints applied exclusively to the -// `google.protobuf.Timestamp` well-known type -message TimestampRules { - // Required specifies that this field must be set - optional bool required = 1; - - // Const specifies that this field must be exactly the specified value - optional google.protobuf.Timestamp const = 2; - - // Lt specifies that this field must be less than the specified value, - // exclusive - optional google.protobuf.Timestamp lt = 3; - - // Lte specifies that this field must be less than the specified value, - // inclusive - optional google.protobuf.Timestamp lte = 4; - - // Gt specifies that this field must be greater than the specified value, - // exclusive - optional google.protobuf.Timestamp gt = 5; - - // Gte specifies that this field must be greater than the specified value, - // inclusive - optional google.protobuf.Timestamp gte = 6; - - // LtNow specifies that this must be less than the current time. LtNow - // can only be used with the Within rule. - optional bool lt_now = 7; - - // GtNow specifies that this must be greater than the current time. GtNow - // can only be used with the Within rule. - optional bool gt_now = 8; - - // Within specifies that this field must be within this duration of the - // current time. This constraint can be used alone or with the LtNow and - // GtNow rules. - optional google.protobuf.Duration within = 9; -} diff --git a/transport/response/response.pb.go b/transport/response/response.pb.go index 25730a0..6ccc4c5 100644 --- a/transport/response/response.pb.go +++ b/transport/response/response.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.28.0 -// protoc v3.19.4 +// protoc (unknown) // source: transport/response/response.proto package response diff --git a/transport/response/response.proto b/transport/response/response.proto index 184abce..65e8078 100644 --- a/transport/response/response.proto +++ b/transport/response/response.proto @@ -1,6 +1,7 @@ syntax = "proto3"; package api.transport.response; + option go_package = "github.com/go-goim/api/transport/response"; enum Code { @@ -35,7 +36,6 @@ enum Code { NotGroupMember = 50003; NotGroupOwner = 50004; GroupLimitExceed = 50005; - } // BaseResponse use as define response code and message diff --git a/user/friend/v1/friend.pb.go b/user/friend/v1/friend.pb.go index 6c88cb4..bb0fe19 100644 --- a/user/friend/v1/friend.pb.go +++ b/user/friend/v1/friend.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.28.0 -// protoc v3.19.4 +// protoc (unknown) // source: user/friend/v1/friend.proto package v1 @@ -1218,12 +1218,12 @@ var file_user_friend_v1_friend_proto_rawDesc = []byte{ 0x0a, 0x1b, 0x75, 0x73, 0x65, 0x72, 0x2f, 0x66, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x2f, 0x76, 0x31, 0x2f, 0x66, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x12, 0x61, 0x70, 0x69, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x66, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x2e, 0x76, - 0x31, 0x1a, 0x17, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2f, 0x76, 0x61, 0x6c, 0x69, - 0x64, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x21, 0x74, 0x72, 0x61, 0x6e, - 0x73, 0x70, 0x6f, 0x72, 0x74, 0x2f, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2f, 0x72, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1d, 0x75, - 0x73, 0x65, 0x72, 0x2f, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x2f, 0x76, 0x31, 0x2f, 0x73, - 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xf7, 0x01, 0x0a, + 0x31, 0x1a, 0x21, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x2f, 0x72, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2f, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1d, 0x75, 0x73, 0x65, 0x72, 0x2f, 0x73, 0x65, 0x73, 0x73, 0x69, + 0x6f, 0x6e, 0x2f, 0x76, 0x31, 0x2f, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x1a, 0x17, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2f, 0x76, 0x61, + 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xf7, 0x01, 0x0a, 0x06, 0x46, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x69, 0x64, 0x12, 0x1d, 0x0a, 0x0a, 0x66, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x5f, 0x75, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x66, diff --git a/user/friend/v1/friend.proto b/user/friend/v1/friend.proto index 5b9e952..1653660 100644 --- a/user/friend/v1/friend.proto +++ b/user/friend/v1/friend.proto @@ -1,13 +1,12 @@ syntax = "proto3"; package api.user.friend.v1; -option go_package = "github.com/go-goim/api/user/friend/v1"; - -import "validate/validate.proto"; import "transport/response/response.proto"; - import "user/session/v1/session.proto"; +import "validate/validate.proto"; + +option go_package = "github.com/go-goim/api/user/friend/v1"; message Friend { string uid = 1; @@ -42,7 +41,10 @@ message GetFriendResponse { } message QueryFriendListRequest { - string uid = 1 [(validate.rules).string = {min_len: 20, max_len: 24}]; + string uid = 1 [(validate.rules).string = { + min_len: 20, + max_len: 24 + }]; } message QueryFriendListResponse { @@ -77,13 +79,25 @@ enum FriendRequestStatus { } message AddFriendRequest { - string uid = 1 [(validate.rules).string = {min_len: 20, max_len: 24}]; - string friend_uid = 2 [(validate.rules).string = {min_len: 20, max_len: 24}]; + string uid = 1 [(validate.rules).string = { + min_len: 20, + max_len: 24 + }]; + string friend_uid = 2 [(validate.rules).string = { + min_len: 20, + max_len: 24 + }]; } message BaseFriendRequest { - string uid = 1 [(validate.rules).string = {min_len: 20, max_len: 24}]; - string friend_uid = 2 [(validate.rules).string = {min_len: 20, max_len: 24}]; + string uid = 1 [(validate.rules).string = { + min_len: 20, + max_len: 24 + }]; + string friend_uid = 2 [(validate.rules).string = { + min_len: 20, + max_len: 24 + }]; } message AddFriendResponse { @@ -105,8 +119,11 @@ enum AddFriendStatus { } message ConfirmFriendRequestReq { - string uid = 1 [(validate.rules).string = {min_len: 20, max_len: 24}]; - int64 friend_request_id = 2[(validate.rules).int64.gt = 0]; + string uid = 1 [(validate.rules).string = { + min_len: 20, + max_len: 24 + }]; + int64 friend_request_id = 2 [(validate.rules).int64.gt = 0]; ConfirmFriendRequestAction action = 3 [(validate.rules).enum.defined_only = true]; } @@ -121,7 +138,10 @@ message GetFriendRequestResponse { } message QueryFriendRequestListRequest { - string uid = 1 [(validate.rules).string = {min_len: 20, max_len: 24}]; + string uid = 1 [(validate.rules).string = { + min_len: 20, + max_len: 24 + }]; FriendRequestStatus status = 2 [(validate.rules).enum.defined_only = true]; } @@ -132,8 +152,14 @@ message QueryFriendRequestListResponse { // CheckSendMessageAbilityRequest is the request data for checking send message ability. message CheckSendMessageAbilityRequest { - string from_uid = 1 [(validate.rules).string = {min_len: 20, max_len: 24}]; - string to_uid = 2 [(validate.rules).string = {min_len: 20, max_len: 24}]; + string from_uid = 1 [(validate.rules).string = { + min_len: 20, + max_len: 24 + }]; + string to_uid = 2 [(validate.rules).string = { + min_len: 20, + max_len: 24 + }]; user.session.v1.SessionType session_type = 3; } diff --git a/user/group/v1/group.pb.go b/user/group/v1/group.pb.go index f0c3da4..6883393 100644 --- a/user/group/v1/group.pb.go +++ b/user/group/v1/group.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.28.0 -// protoc v3.19.4 +// protoc (unknown) // source: user/group/v1/group.proto package v1 @@ -165,7 +165,7 @@ type Group struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Id int64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` // use as session id + Id int64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` Gid string `protobuf:"bytes,2,opt,name=gid,proto3" json:"gid,omitempty"` Name string `protobuf:"bytes,3,opt,name=name,proto3" json:"name,omitempty"` Description string `protobuf:"bytes,4,opt,name=description,proto3" json:"description,omitempty"` @@ -1167,10 +1167,10 @@ var File_user_group_v1_group_proto protoreflect.FileDescriptor var file_user_group_v1_group_proto_rawDesc = []byte{ 0x0a, 0x19, 0x75, 0x73, 0x65, 0x72, 0x2f, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2f, 0x76, 0x31, 0x2f, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x11, 0x61, 0x70, 0x69, - 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2e, 0x76, 0x31, 0x1a, 0x12, - 0x75, 0x73, 0x65, 0x72, 0x2f, 0x76, 0x31, 0x2f, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x1a, 0x21, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x2f, 0x72, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2f, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, + 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2e, 0x76, 0x31, 0x1a, 0x21, + 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x2f, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x2f, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x1a, 0x12, 0x75, 0x73, 0x65, 0x72, 0x2f, 0x76, 0x31, 0x2f, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x8f, 0x03, 0x0a, 0x05, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x02, 0x69, 0x64, 0x12, 0x10, 0x0a, 0x03, 0x67, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x67, 0x69, diff --git a/user/group/v1/group.proto b/user/group/v1/group.proto index 3fcc0d2..5da7ce5 100644 --- a/user/group/v1/group.proto +++ b/user/group/v1/group.proto @@ -1,14 +1,14 @@ syntax = "proto3"; package api.user.group.v1; -option go_package = "github.com/go-goim/api/user/group/v1"; +import "transport/response/response.proto"; import "user/v1/user.proto"; -import "transport/response/response.proto"; +option go_package = "github.com/go-goim/api/user/group/v1"; message Group { - int64 id = 1; // use as session id + int64 id = 1; string gid = 2; string name = 3; string description = 4; @@ -39,7 +39,7 @@ message GroupMember { // more statuses } Status status = 6; - enum Type { + enum Type { TypeOwner = 0; TypeMember = 1; // more types @@ -122,7 +122,6 @@ message AddGroupMemberResponse { int32 added = 2; } - // RemoveGroupMember message RemoveGroupMemberRequest { @@ -136,7 +135,6 @@ message RemoveGroupMemberResponse { int32 removed = 2; } - service GroupService { rpc GetGroup(GetGroupRequest) returns (GetGroupResponse); rpc ListGroups(ListGroupsRequest) returns (ListGroupsResponse); @@ -145,4 +143,4 @@ service GroupService { rpc DeleteGroup(DeleteGroupRequest) returns (transport.response.BaseResponse); rpc AddGroupMember(AddGroupMemberRequest) returns (AddGroupMemberResponse); rpc RemoveGroupMember(RemoveGroupMemberRequest) returns (RemoveGroupMemberResponse); -} \ No newline at end of file +} diff --git a/user/session/v1/session.pb.go b/user/session/v1/session.pb.go index 2b5cfa7..03277ed 100644 --- a/user/session/v1/session.pb.go +++ b/user/session/v1/session.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.28.0 -// protoc v3.19.4 +// protoc (unknown) // source: user/session/v1/session.proto package v1 diff --git a/user/session/v1/session.proto b/user/session/v1/session.proto index 5f3c6bb..de4caa9 100644 --- a/user/session/v1/session.proto +++ b/user/session/v1/session.proto @@ -1,6 +1,7 @@ syntax = "proto3"; package api.user.session.v1; + option go_package = "github.com/go-goim/api/user/session/v1"; // define session type and status @@ -8,4 +9,5 @@ enum SessionType { SingleChat = 0; GroupChat = 1; } -// more session message type \ No newline at end of file +// more session message type + diff --git a/user/v1/user.pb.go b/user/v1/user.pb.go index 153f2b0..7cc34a0 100644 --- a/user/v1/user.pb.go +++ b/user/v1/user.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.28.0 -// protoc v3.19.4 +// protoc (unknown) // source: user/v1/user.proto package v1 @@ -846,10 +846,10 @@ var File_user_v1_user_proto protoreflect.FileDescriptor var file_user_v1_user_proto_rawDesc = []byte{ 0x0a, 0x12, 0x75, 0x73, 0x65, 0x72, 0x2f, 0x76, 0x31, 0x2f, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0b, 0x61, 0x70, 0x69, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x76, - 0x31, 0x1a, 0x17, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2f, 0x76, 0x61, 0x6c, 0x69, - 0x64, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x21, 0x74, 0x72, 0x61, 0x6e, - 0x73, 0x70, 0x6f, 0x72, 0x74, 0x2f, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2f, 0x72, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x87, 0x01, + 0x31, 0x1a, 0x21, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x2f, 0x72, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2f, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x17, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2f, 0x76, + 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x87, 0x01, 0x0a, 0x14, 0x55, 0x73, 0x65, 0x72, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x40, 0x0a, 0x08, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x74, diff --git a/user/v1/user.proto b/user/v1/user.proto index 197ff23..196bf57 100644 --- a/user/v1/user.proto +++ b/user/v1/user.proto @@ -1,12 +1,12 @@ syntax = "proto3"; package api.user.v1; -option go_package = "github.com/go-goim/api/user/v1"; - -import "validate/validate.proto"; // import api/transport/v1/http.proto; import "transport/response/response.proto"; +import "validate/validate.proto"; + +option go_package = "github.com/go-goim/api/user/v1"; enum LoginStatus { LOGIN = 0; @@ -55,7 +55,10 @@ message UserList { } message GetUserInfoRequest { - string uid = 1 [(validate.rules).string = {min_len: 20, max_len: 24}]; + string uid = 1 [(validate.rules).string = { + min_len: 20, + max_len: 24 + }]; } message QueryUserRequest { @@ -66,26 +69,46 @@ message QueryUserRequest { } } - message CreateUserRequest { - string name = 1 [(validate.rules).string = {min_len: 2, max_len: 20}]; + string name = 1 [(validate.rules).string = { + min_len: 2, + max_len: 20 + }]; oneof user { option (validate.required) = true; string email = 2 [(validate.rules).string.email = true]; string phone = 3 [(validate.rules).string.pattern = "^1[3-9]\\d{9}$"]; } - string password = 4 [(validate.rules).string = {min_len: 6, max_len: 20}]; + string password = 4 [(validate.rules).string = { + min_len: 6, + max_len: 20 + }]; } message UpdateUserRequest { - string uid = 1 [(validate.rules).string = {min_len: 20, max_len: 24}]; - string name = 2 [(validate.rules).string = {min_len: 2, max_len: 20, ignore_empty: true}]; - string email = 3 [(validate.rules).string = {email: true,ignore_empty: true}]; - string phone = 4 [(validate.rules).string = {pattern: "^1[3-9]\\d{9}$", ignore_empty: true}]; - string avatar = 5 [(validate.rules).string = {max_len:128, ignore_empty: true}]; + string uid = 1 [(validate.rules).string = { + min_len: 20, + max_len: 24 + }]; + string name = 2 [(validate.rules).string = { + min_len: 2, + max_len: 20, + ignore_empty: true + }]; + string email = 3 [(validate.rules).string = { + email: true, + ignore_empty: true + }]; + string phone = 4 [(validate.rules).string = { + pattern: "^1[3-9]\\d{9}$", + ignore_empty: true + }]; + string avatar = 5 [(validate.rules).string = { + max_len: 128, + ignore_empty: true + }]; } - service UserService { // GetUser get user info by uid, called when uid is known. rpc GetUser(GetUserInfoRequest) returns (UserInternalResponse); @@ -97,8 +120,6 @@ service UserService { rpc UpdateUser(UpdateUserRequest) returns (UserInternalResponse); } - - message UserLoginRequest { oneof user { option (validate.required) = true; From d2a492fbdcbe8ef71c9667f7a3f7f2e40d3ac726 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 30 Jun 2022 12:45:07 +0000 Subject: [PATCH 10/35] build(deps): bump github.com/stretchr/testify from 1.7.3 to 1.8.0 Bumps [github.com/stretchr/testify](https://github.com/stretchr/testify) from 1.7.3 to 1.8.0. - [Release notes](https://github.com/stretchr/testify/releases) - [Commits](https://github.com/stretchr/testify/compare/v1.7.3...v1.8.0) --- updated-dependencies: - dependency-name: github.com/stretchr/testify dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- go.mod | 2 +- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index db8de5b..130bd10 100644 --- a/go.mod +++ b/go.mod @@ -4,7 +4,7 @@ go 1.18 require ( github.com/envoyproxy/protoc-gen-validate v0.6.7 - github.com/stretchr/testify v1.7.3 + github.com/stretchr/testify v1.8.0 google.golang.org/grpc v1.47.0 google.golang.org/protobuf v1.28.0 ) diff --git a/go.sum b/go.sum index 5e70fd2..dec3e9e 100644 --- a/go.sum +++ b/go.sum @@ -67,8 +67,8 @@ github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5 github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= -github.com/stretchr/testify v1.7.3 h1:dAm0YRdRQlWojc3CrCRgPBzG5f941d0zvAKu7qY4e+I= -github.com/stretchr/testify v1.7.3/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU= +github.com/stretchr/testify v1.8.0 h1:pSgiaMZlXftHpm5L7V1+rVB+AZJydKsMxsQBIJw4PKk= +github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU= github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= go.opentelemetry.io/proto/otlp v0.7.0/go.mod h1:PqfVotwruBrMGOCsRd/89rSnXhoiJIqeYNgFYFoEGnI= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= From 6789313a8200c92140c7cf3fa0c4bf3b4fab0f67 Mon Sep 17 00:00:00 2001 From: Yusan Kurban <21994267+yusank@users.noreply.github.com> Date: Fri, 1 Jul 2022 10:25:20 +0800 Subject: [PATCH 11/35] Update dependabot.yml --- .github/dependabot.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/dependabot.yml b/.github/dependabot.yml index 2e2be69..45c071d 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -11,3 +11,5 @@ updates: interval: "daily" reviewers: - "yusank" + assignees: + - "yusank" From 9726eb9e3b383dc3511bb8a30f32e42714d4efa2 Mon Sep 17 00:00:00 2001 From: yusank Date: Fri, 1 Jul 2022 18:57:08 +0800 Subject: [PATCH 12/35] fix: update goup pb --- user/group/v1/group.pb.go | 94 +++++++++++++----------------- user/group/v1/group.pb.validate.go | 29 --------- user/group/v1/group.proto | 9 ++- 3 files changed, 45 insertions(+), 87 deletions(-) diff --git a/user/group/v1/group.pb.go b/user/group/v1/group.pb.go index 6883393..05c091e 100644 --- a/user/group/v1/group.pb.go +++ b/user/group/v1/group.pb.go @@ -295,10 +295,9 @@ type GroupMember struct { Id int64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` // use as session id Gid string `protobuf:"bytes,2,opt,name=gid,proto3" json:"gid,omitempty"` Uid string `protobuf:"bytes,3,opt,name=uid,proto3" json:"uid,omitempty"` - Group *Group `protobuf:"bytes,4,opt,name=group,proto3" json:"group,omitempty"` - User *v1.User `protobuf:"bytes,5,opt,name=user,proto3,oneof" json:"user,omitempty"` - Status GroupMember_Status `protobuf:"varint,6,opt,name=status,proto3,enum=api.user.group.v1.GroupMember_Status" json:"status,omitempty"` - Type GroupMember_Type `protobuf:"varint,7,opt,name=type,proto3,enum=api.user.group.v1.GroupMember_Type" json:"type,omitempty"` + User *v1.User `protobuf:"bytes,4,opt,name=user,proto3,oneof" json:"user,omitempty"` + Status GroupMember_Status `protobuf:"varint,5,opt,name=status,proto3,enum=api.user.group.v1.GroupMember_Status" json:"status,omitempty"` + Type GroupMember_Type `protobuf:"varint,6,opt,name=type,proto3,enum=api.user.group.v1.GroupMember_Type" json:"type,omitempty"` } func (x *GroupMember) Reset() { @@ -354,13 +353,6 @@ func (x *GroupMember) GetUid() string { return "" } -func (x *GroupMember) GetGroup() *Group { - if x != nil { - return x.Group - } - return nil -} - func (x *GroupMember) GetUser() *v1.User { if x != nil { return x.User @@ -620,7 +612,7 @@ type CreateGroupRequest struct { Description string `protobuf:"bytes,2,opt,name=description,proto3" json:"description,omitempty"` Avatar string `protobuf:"bytes,3,opt,name=avatar,proto3" json:"avatar,omitempty"` OwnerUid string `protobuf:"bytes,4,opt,name=owner_uid,json=ownerUid,proto3" json:"owner_uid,omitempty"` - MembersUid []string `protobuf:"bytes,5,rep,name=members_uid,json=membersUid,proto3" json:"members_uid,omitempty"` + MembersUid []string `protobuf:"bytes,5,rep,name=members_uid,json=membersUid,proto3" json:"members_uid,omitempty"` // todo: limit to small number } func (x *CreateGroupRequest) Reset() { @@ -1196,21 +1188,18 @@ var file_user_group_v1_group_proto_rawDesc = []byte{ 0x0b, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1e, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x42, 0x08, 0x0a, - 0x06, 0x5f, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x22, 0xf3, 0x02, 0x0a, 0x0b, 0x47, 0x72, 0x6f, 0x75, + 0x06, 0x5f, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x22, 0xc3, 0x02, 0x0a, 0x0b, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x02, 0x69, 0x64, 0x12, 0x10, 0x0a, 0x03, 0x67, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x67, 0x69, 0x64, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x69, 0x64, - 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x69, 0x64, 0x12, 0x2e, 0x0a, 0x05, 0x67, - 0x72, 0x6f, 0x75, 0x70, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x61, 0x70, 0x69, - 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2e, 0x76, 0x31, 0x2e, 0x47, - 0x72, 0x6f, 0x75, 0x70, 0x52, 0x05, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x12, 0x2a, 0x0a, 0x04, 0x75, - 0x73, 0x65, 0x72, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x61, 0x70, 0x69, 0x2e, + 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x69, 0x64, 0x12, 0x2a, 0x0a, 0x04, 0x75, + 0x73, 0x65, 0x72, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x48, 0x00, 0x52, 0x04, 0x75, 0x73, 0x65, 0x72, 0x88, 0x01, 0x01, 0x12, 0x3d, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, - 0x73, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x25, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x75, 0x73, + 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x25, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x06, - 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x37, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x07, + 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x37, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x23, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x2e, 0x54, 0x79, 0x70, 0x65, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x22, @@ -1402,39 +1391,38 @@ var file_user_group_v1_group_proto_depIdxs = []int32{ 4, // 0: api.user.group.v1.Group.owner:type_name -> api.user.group.v1.GroupMember 4, // 1: api.user.group.v1.Group.members:type_name -> api.user.group.v1.GroupMember 0, // 2: api.user.group.v1.Group.status:type_name -> api.user.group.v1.GroupStatus - 3, // 3: api.user.group.v1.GroupMember.group:type_name -> api.user.group.v1.Group - 18, // 4: api.user.group.v1.GroupMember.user:type_name -> api.user.v1.User - 1, // 5: api.user.group.v1.GroupMember.status:type_name -> api.user.group.v1.GroupMember.Status - 2, // 6: api.user.group.v1.GroupMember.type:type_name -> api.user.group.v1.GroupMember.Type - 19, // 7: api.user.group.v1.GetGroupResponse.response:type_name -> api.transport.response.BaseResponse - 3, // 8: api.user.group.v1.GetGroupResponse.group:type_name -> api.user.group.v1.Group - 19, // 9: api.user.group.v1.ListGroupsResponse.response:type_name -> api.transport.response.BaseResponse - 3, // 10: api.user.group.v1.ListGroupsResponse.groups:type_name -> api.user.group.v1.Group - 19, // 11: api.user.group.v1.CreateGroupResponse.response:type_name -> api.transport.response.BaseResponse - 3, // 12: api.user.group.v1.CreateGroupResponse.group:type_name -> api.user.group.v1.Group - 19, // 13: api.user.group.v1.UpdateGroupResponse.response:type_name -> api.transport.response.BaseResponse - 3, // 14: api.user.group.v1.UpdateGroupResponse.group:type_name -> api.user.group.v1.Group - 19, // 15: api.user.group.v1.AddGroupMemberResponse.response:type_name -> api.transport.response.BaseResponse - 19, // 16: api.user.group.v1.RemoveGroupMemberResponse.response:type_name -> api.transport.response.BaseResponse - 5, // 17: api.user.group.v1.GroupService.GetGroup:input_type -> api.user.group.v1.GetGroupRequest - 7, // 18: api.user.group.v1.GroupService.ListGroups:input_type -> api.user.group.v1.ListGroupsRequest - 9, // 19: api.user.group.v1.GroupService.CreateGroup:input_type -> api.user.group.v1.CreateGroupRequest - 11, // 20: api.user.group.v1.GroupService.UpdateGroup:input_type -> api.user.group.v1.UpdateGroupRequest - 13, // 21: api.user.group.v1.GroupService.DeleteGroup:input_type -> api.user.group.v1.DeleteGroupRequest - 14, // 22: api.user.group.v1.GroupService.AddGroupMember:input_type -> api.user.group.v1.AddGroupMemberRequest - 16, // 23: api.user.group.v1.GroupService.RemoveGroupMember:input_type -> api.user.group.v1.RemoveGroupMemberRequest - 6, // 24: api.user.group.v1.GroupService.GetGroup:output_type -> api.user.group.v1.GetGroupResponse - 8, // 25: api.user.group.v1.GroupService.ListGroups:output_type -> api.user.group.v1.ListGroupsResponse - 10, // 26: api.user.group.v1.GroupService.CreateGroup:output_type -> api.user.group.v1.CreateGroupResponse - 12, // 27: api.user.group.v1.GroupService.UpdateGroup:output_type -> api.user.group.v1.UpdateGroupResponse - 19, // 28: api.user.group.v1.GroupService.DeleteGroup:output_type -> api.transport.response.BaseResponse - 15, // 29: api.user.group.v1.GroupService.AddGroupMember:output_type -> api.user.group.v1.AddGroupMemberResponse - 17, // 30: api.user.group.v1.GroupService.RemoveGroupMember:output_type -> api.user.group.v1.RemoveGroupMemberResponse - 24, // [24:31] is the sub-list for method output_type - 17, // [17:24] is the sub-list for method input_type - 17, // [17:17] is the sub-list for extension type_name - 17, // [17:17] is the sub-list for extension extendee - 0, // [0:17] is the sub-list for field type_name + 18, // 3: api.user.group.v1.GroupMember.user:type_name -> api.user.v1.User + 1, // 4: api.user.group.v1.GroupMember.status:type_name -> api.user.group.v1.GroupMember.Status + 2, // 5: api.user.group.v1.GroupMember.type:type_name -> api.user.group.v1.GroupMember.Type + 19, // 6: api.user.group.v1.GetGroupResponse.response:type_name -> api.transport.response.BaseResponse + 3, // 7: api.user.group.v1.GetGroupResponse.group:type_name -> api.user.group.v1.Group + 19, // 8: api.user.group.v1.ListGroupsResponse.response:type_name -> api.transport.response.BaseResponse + 3, // 9: api.user.group.v1.ListGroupsResponse.groups:type_name -> api.user.group.v1.Group + 19, // 10: api.user.group.v1.CreateGroupResponse.response:type_name -> api.transport.response.BaseResponse + 3, // 11: api.user.group.v1.CreateGroupResponse.group:type_name -> api.user.group.v1.Group + 19, // 12: api.user.group.v1.UpdateGroupResponse.response:type_name -> api.transport.response.BaseResponse + 3, // 13: api.user.group.v1.UpdateGroupResponse.group:type_name -> api.user.group.v1.Group + 19, // 14: api.user.group.v1.AddGroupMemberResponse.response:type_name -> api.transport.response.BaseResponse + 19, // 15: api.user.group.v1.RemoveGroupMemberResponse.response:type_name -> api.transport.response.BaseResponse + 5, // 16: api.user.group.v1.GroupService.GetGroup:input_type -> api.user.group.v1.GetGroupRequest + 7, // 17: api.user.group.v1.GroupService.ListGroups:input_type -> api.user.group.v1.ListGroupsRequest + 9, // 18: api.user.group.v1.GroupService.CreateGroup:input_type -> api.user.group.v1.CreateGroupRequest + 11, // 19: api.user.group.v1.GroupService.UpdateGroup:input_type -> api.user.group.v1.UpdateGroupRequest + 13, // 20: api.user.group.v1.GroupService.DeleteGroup:input_type -> api.user.group.v1.DeleteGroupRequest + 14, // 21: api.user.group.v1.GroupService.AddGroupMember:input_type -> api.user.group.v1.AddGroupMemberRequest + 16, // 22: api.user.group.v1.GroupService.RemoveGroupMember:input_type -> api.user.group.v1.RemoveGroupMemberRequest + 6, // 23: api.user.group.v1.GroupService.GetGroup:output_type -> api.user.group.v1.GetGroupResponse + 8, // 24: api.user.group.v1.GroupService.ListGroups:output_type -> api.user.group.v1.ListGroupsResponse + 10, // 25: api.user.group.v1.GroupService.CreateGroup:output_type -> api.user.group.v1.CreateGroupResponse + 12, // 26: api.user.group.v1.GroupService.UpdateGroup:output_type -> api.user.group.v1.UpdateGroupResponse + 19, // 27: api.user.group.v1.GroupService.DeleteGroup:output_type -> api.transport.response.BaseResponse + 15, // 28: api.user.group.v1.GroupService.AddGroupMember:output_type -> api.user.group.v1.AddGroupMemberResponse + 17, // 29: api.user.group.v1.GroupService.RemoveGroupMember:output_type -> api.user.group.v1.RemoveGroupMemberResponse + 23, // [23:30] is the sub-list for method output_type + 16, // [16:23] is the sub-list for method input_type + 16, // [16:16] is the sub-list for extension type_name + 16, // [16:16] is the sub-list for extension extendee + 0, // [0:16] is the sub-list for field type_name } func init() { file_user_group_v1_group_proto_init() } diff --git a/user/group/v1/group.pb.validate.go b/user/group/v1/group.pb.validate.go index 4902003..61a7e37 100644 --- a/user/group/v1/group.pb.validate.go +++ b/user/group/v1/group.pb.validate.go @@ -246,35 +246,6 @@ func (m *GroupMember) validate(all bool) error { // no validation rules for Uid - if all { - switch v := interface{}(m.GetGroup()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, GroupMemberValidationError{ - field: "Group", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, GroupMemberValidationError{ - field: "Group", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetGroup()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return GroupMemberValidationError{ - field: "Group", - reason: "embedded message failed validation", - cause: err, - } - } - } - // no validation rules for Status // no validation rules for Type diff --git a/user/group/v1/group.proto b/user/group/v1/group.proto index 5da7ce5..6c2b69a 100644 --- a/user/group/v1/group.proto +++ b/user/group/v1/group.proto @@ -31,20 +31,19 @@ message GroupMember { int64 id = 1; // use as session id string gid = 2; string uid = 3; - Group group = 4; - optional user.v1.User user = 5; + optional user.v1.User user = 4; enum Status { StatusActive = 0; StatusSilent = 1; // more statuses } - Status status = 6; + Status status = 5; enum Type { TypeOwner = 0; TypeMember = 1; // more types } - Type type = 7; + Type type = 6; } // GetGroup @@ -80,7 +79,7 @@ message CreateGroupRequest { string description = 2; string avatar = 3; string owner_uid = 4; - repeated string members_uid = 5; + repeated string members_uid = 5; // todo: limit to small number } message CreateGroupResponse { From e42dada961cd6f8697925c5f1740ac8b1ee734c0 Mon Sep 17 00:00:00 2001 From: yusank Date: Wed, 6 Jul 2022 16:36:27 +0800 Subject: [PATCH 13/35] fix: update api --- user/group/v1/group.pb.go | 124 +++++++++++++---------------- user/group/v1/group.pb.validate.go | 2 - user/group/v1/group.proto | 1 - 3 files changed, 57 insertions(+), 70 deletions(-) diff --git a/user/group/v1/group.pb.go b/user/group/v1/group.pb.go index 05c091e..489724e 100644 --- a/user/group/v1/group.pb.go +++ b/user/group/v1/group.pb.go @@ -1041,9 +1041,8 @@ type RemoveGroupMemberRequest struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Gid string `protobuf:"bytes,1,opt,name=gid,proto3" json:"gid,omitempty"` - Uid []string `protobuf:"bytes,2,rep,name=uid,proto3" json:"uid,omitempty"` - OwnerUid string `protobuf:"bytes,3,opt,name=owner_uid,json=ownerUid,proto3" json:"owner_uid,omitempty"` + Gid string `protobuf:"bytes,1,opt,name=gid,proto3" json:"gid,omitempty"` + Uid []string `protobuf:"bytes,2,rep,name=uid,proto3" json:"uid,omitempty"` } func (x *RemoveGroupMemberRequest) Reset() { @@ -1092,13 +1091,6 @@ func (x *RemoveGroupMemberRequest) GetUid() []string { return nil } -func (x *RemoveGroupMemberRequest) GetOwnerUid() string { - if x != nil { - return x.OwnerUid - } - return "" -} - type RemoveGroupMemberResponse struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -1286,69 +1278,67 @@ var file_user_group_v1_group_proto_rawDesc = []byte{ 0x72, 0x74, 0x2e, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x42, 0x61, 0x73, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x52, 0x08, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x61, 0x64, 0x64, 0x65, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x05, 0x52, 0x05, 0x61, 0x64, 0x64, 0x65, 0x64, 0x22, 0x5b, 0x0a, 0x18, 0x52, 0x65, 0x6d, 0x6f, + 0x05, 0x52, 0x05, 0x61, 0x64, 0x64, 0x65, 0x64, 0x22, 0x3e, 0x0a, 0x18, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x10, 0x0a, 0x03, 0x67, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x67, 0x69, 0x64, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x69, 0x64, 0x18, 0x02, 0x20, - 0x03, 0x28, 0x09, 0x52, 0x03, 0x75, 0x69, 0x64, 0x12, 0x1b, 0x0a, 0x09, 0x6f, 0x77, 0x6e, 0x65, - 0x72, 0x5f, 0x75, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6f, 0x77, 0x6e, - 0x65, 0x72, 0x55, 0x69, 0x64, 0x22, 0x77, 0x0a, 0x19, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x47, - 0x72, 0x6f, 0x75, 0x70, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x12, 0x40, 0x0a, 0x08, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x74, 0x72, 0x61, 0x6e, 0x73, - 0x70, 0x6f, 0x72, 0x74, 0x2e, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x42, 0x61, - 0x73, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x52, 0x08, 0x72, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x72, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x64, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x07, 0x72, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x64, 0x2a, 0x25, - 0x0a, 0x0b, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x0a, 0x0a, - 0x06, 0x41, 0x63, 0x74, 0x69, 0x76, 0x65, 0x10, 0x00, 0x12, 0x0a, 0x0a, 0x06, 0x53, 0x69, 0x6c, - 0x65, 0x6e, 0x74, 0x10, 0x01, 0x32, 0xad, 0x05, 0x0a, 0x0c, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x53, - 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x53, 0x0a, 0x08, 0x47, 0x65, 0x74, 0x47, 0x72, 0x6f, - 0x75, 0x70, 0x12, 0x22, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x67, 0x72, - 0x6f, 0x75, 0x70, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x23, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x75, 0x73, 0x65, - 0x72, 0x2e, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x47, 0x72, - 0x6f, 0x75, 0x70, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x59, 0x0a, 0x0a, 0x4c, - 0x69, 0x73, 0x74, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x73, 0x12, 0x24, 0x2e, 0x61, 0x70, 0x69, 0x2e, - 0x75, 0x73, 0x65, 0x72, 0x2e, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x69, - 0x73, 0x74, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, - 0x25, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x67, 0x72, 0x6f, 0x75, 0x70, - 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x73, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x5c, 0x0a, 0x0b, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, - 0x47, 0x72, 0x6f, 0x75, 0x70, 0x12, 0x25, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x75, 0x73, 0x65, 0x72, - 0x2e, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, - 0x47, 0x72, 0x6f, 0x75, 0x70, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x26, 0x2e, 0x61, + 0x03, 0x28, 0x09, 0x52, 0x03, 0x75, 0x69, 0x64, 0x22, 0x77, 0x0a, 0x19, 0x52, 0x65, 0x6d, 0x6f, + 0x76, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x40, 0x0a, 0x08, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x74, 0x72, + 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x2e, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x2e, 0x42, 0x61, 0x73, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x52, 0x08, 0x72, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x72, 0x65, 0x6d, 0x6f, 0x76, + 0x65, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x07, 0x72, 0x65, 0x6d, 0x6f, 0x76, 0x65, + 0x64, 0x2a, 0x25, 0x0a, 0x0b, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, + 0x12, 0x0a, 0x0a, 0x06, 0x41, 0x63, 0x74, 0x69, 0x76, 0x65, 0x10, 0x00, 0x12, 0x0a, 0x0a, 0x06, + 0x53, 0x69, 0x6c, 0x65, 0x6e, 0x74, 0x10, 0x01, 0x32, 0xad, 0x05, 0x0a, 0x0c, 0x47, 0x72, 0x6f, + 0x75, 0x70, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x53, 0x0a, 0x08, 0x47, 0x65, 0x74, + 0x47, 0x72, 0x6f, 0x75, 0x70, 0x12, 0x22, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x75, 0x73, 0x65, 0x72, + 0x2e, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x47, 0x72, 0x6f, + 0x75, 0x70, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x23, 0x2e, 0x61, 0x70, 0x69, 0x2e, + 0x75, 0x73, 0x65, 0x72, 0x2e, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, + 0x74, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x59, + 0x0a, 0x0a, 0x4c, 0x69, 0x73, 0x74, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x73, 0x12, 0x24, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2e, 0x76, 0x31, - 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x5c, 0x0a, 0x0b, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x47, 0x72, - 0x6f, 0x75, 0x70, 0x12, 0x25, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x67, - 0x72, 0x6f, 0x75, 0x70, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x47, 0x72, - 0x6f, 0x75, 0x70, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x26, 0x2e, 0x61, 0x70, 0x69, - 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2e, 0x76, 0x31, 0x2e, 0x55, - 0x70, 0x64, 0x61, 0x74, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x12, 0x5a, 0x0a, 0x0b, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x47, 0x72, 0x6f, 0x75, - 0x70, 0x12, 0x25, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x67, 0x72, 0x6f, - 0x75, 0x70, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x47, 0x72, 0x6f, 0x75, - 0x70, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x24, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x74, - 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x2e, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x2e, 0x42, 0x61, 0x73, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x65, - 0x0a, 0x0e, 0x41, 0x64, 0x64, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, - 0x12, 0x28, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x67, 0x72, 0x6f, 0x75, - 0x70, 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x64, 0x64, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x4d, 0x65, 0x6d, - 0x62, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x29, 0x2e, 0x61, 0x70, 0x69, - 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2e, 0x76, 0x31, 0x2e, 0x41, - 0x64, 0x64, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x6e, 0x0a, 0x11, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x47, - 0x72, 0x6f, 0x75, 0x70, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x12, 0x2b, 0x2e, 0x61, 0x70, 0x69, + 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x1a, 0x25, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x67, 0x72, + 0x6f, 0x75, 0x70, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x47, 0x72, 0x6f, 0x75, 0x70, + 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x5c, 0x0a, 0x0b, 0x43, 0x72, 0x65, + 0x61, 0x74, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x12, 0x25, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x75, + 0x73, 0x65, 0x72, 0x2e, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x72, 0x65, + 0x61, 0x74, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, + 0x26, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x67, 0x72, 0x6f, 0x75, 0x70, + 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x5c, 0x0a, 0x0b, 0x55, 0x70, 0x64, 0x61, 0x74, + 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x12, 0x25, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x75, 0x73, 0x65, + 0x72, 0x2e, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, + 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x26, 0x2e, + 0x61, 0x70, 0x69, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2e, 0x76, + 0x31, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x5a, 0x0a, 0x0b, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x47, + 0x72, 0x6f, 0x75, 0x70, 0x12, 0x25, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, + 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x47, + 0x72, 0x6f, 0x75, 0x70, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x24, 0x2e, 0x61, 0x70, + 0x69, 0x2e, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x2e, 0x72, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x42, 0x61, 0x73, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x12, 0x65, 0x0a, 0x0e, 0x41, 0x64, 0x64, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x4d, 0x65, 0x6d, + 0x62, 0x65, 0x72, 0x12, 0x28, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x67, + 0x72, 0x6f, 0x75, 0x70, 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x64, 0x64, 0x47, 0x72, 0x6f, 0x75, 0x70, + 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x29, 0x2e, + 0x61, 0x70, 0x69, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2e, 0x76, + 0x31, 0x2e, 0x41, 0x64, 0x64, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x6e, 0x0a, 0x11, 0x52, 0x65, 0x6d, 0x6f, + 0x76, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x12, 0x2b, 0x2e, + 0x61, 0x70, 0x69, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2e, 0x76, + 0x31, 0x2e, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x4d, 0x65, 0x6d, + 0x62, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2c, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2c, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x75, 0x73, - 0x65, 0x72, 0x2e, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x6d, 0x6f, - 0x76, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0x26, 0x5a, 0x24, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, - 0x63, 0x6f, 0x6d, 0x2f, 0x67, 0x6f, 0x2d, 0x67, 0x6f, 0x69, 0x6d, 0x2f, 0x61, 0x70, 0x69, 0x2f, - 0x75, 0x73, 0x65, 0x72, 0x2f, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2f, 0x76, 0x31, 0x62, 0x06, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0x26, 0x5a, 0x24, 0x67, 0x69, 0x74, 0x68, + 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x67, 0x6f, 0x2d, 0x67, 0x6f, 0x69, 0x6d, 0x2f, 0x61, + 0x70, 0x69, 0x2f, 0x75, 0x73, 0x65, 0x72, 0x2f, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2f, 0x76, 0x31, + 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/user/group/v1/group.pb.validate.go b/user/group/v1/group.pb.validate.go index 61a7e37..0f32dce 100644 --- a/user/group/v1/group.pb.validate.go +++ b/user/group/v1/group.pb.validate.go @@ -1804,8 +1804,6 @@ func (m *RemoveGroupMemberRequest) validate(all bool) error { // no validation rules for Gid - // no validation rules for OwnerUid - if len(errors) > 0 { return RemoveGroupMemberRequestMultiError(errors) } diff --git a/user/group/v1/group.proto b/user/group/v1/group.proto index 6c2b69a..8f0083b 100644 --- a/user/group/v1/group.proto +++ b/user/group/v1/group.proto @@ -126,7 +126,6 @@ message AddGroupMemberResponse { message RemoveGroupMemberRequest { string gid = 1; repeated string uid = 2; - string owner_uid = 3; } message RemoveGroupMemberResponse { From 311c538d1f6e102b58e7b181abbfad0d82120c5f Mon Sep 17 00:00:00 2001 From: yusank Date: Fri, 8 Jul 2022 18:40:35 +0800 Subject: [PATCH 14/35] fix: update api --- config/registry/v1/registry.pb.go | 2 +- config/v1/config.pb.go | 2 +- message/v1/message.pb.go | 458 +++++++++++++----------------- message/v1/message.pb.validate.go | 23 +- message/v1/message.proto | 51 ++-- message/v1/message_grpc.pb.go | 246 ++++------------ transport/response/response.pb.go | 2 +- user/friend/v1/friend.pb.go | 4 +- user/group/v1/group.pb.go | 2 +- user/session/v1/session.pb.go | 17 +- user/session/v1/session.proto | 2 + user/v1/user.pb.go | 2 +- 12 files changed, 321 insertions(+), 490 deletions(-) diff --git a/config/registry/v1/registry.pb.go b/config/registry/v1/registry.pb.go index fb89770..b24b160 100644 --- a/config/registry/v1/registry.pb.go +++ b/config/registry/v1/registry.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.28.0 +// protoc-gen-go v1.26.0 // protoc (unknown) // source: config/registry/v1/registry.proto diff --git a/config/v1/config.pb.go b/config/v1/config.pb.go index e63bcd9..f95bbde 100644 --- a/config/v1/config.pb.go +++ b/config/v1/config.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.28.0 +// protoc-gen-go v1.26.0 // protoc (unknown) // source: config/v1/config.proto diff --git a/message/v1/message.pb.go b/message/v1/message.pb.go index bf038fb..beca851 100644 --- a/message/v1/message.pb.go +++ b/message/v1/message.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.28.0 +// protoc-gen-go v1.26.0 // protoc (unknown) // source: message/v1/message.proto @@ -9,6 +9,7 @@ package v1 import ( _ "github.com/envoyproxy/protoc-gen-validate/validate" response "github.com/go-goim/api/transport/response" + v1 "github.com/go-goim/api/user/session/v1" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" reflect "reflect" @@ -25,25 +26,22 @@ const ( type MessageContentType int32 const ( - MessageContentType_UnknownContentType MessageContentType = 0 - MessageContentType_Text MessageContentType = 1 - MessageContentType_Image MessageContentType = 2 - MessageContentType_Voice MessageContentType = 3 + MessageContentType_Text MessageContentType = 0 + MessageContentType_Image MessageContentType = 1 + MessageContentType_Voice MessageContentType = 2 ) // Enum value maps for MessageContentType. var ( MessageContentType_name = map[int32]string{ - 0: "UnknownContentType", - 1: "Text", - 2: "Image", - 3: "Voice", + 0: "Text", + 1: "Image", + 2: "Voice", } MessageContentType_value = map[string]int32{ - "UnknownContentType": 0, - "Text": 1, - "Image": 2, - "Voice": 3, + "Text": 0, + "Image": 1, + "Voice": 2, } ) @@ -74,61 +72,6 @@ func (MessageContentType) EnumDescriptor() ([]byte, []int) { return file_message_v1_message_proto_rawDescGZIP(), []int{0} } -type PushMessageType int32 - -const ( - PushMessageType_UnknownUserType PushMessageType = 0 - // user to user - PushMessageType_User PushMessageType = 1 - // user to group - PushMessageType_Group PushMessageType = 2 - // global broadcast - PushMessageType_Broadcast PushMessageType = 3 -) - -// Enum value maps for PushMessageType. -var ( - PushMessageType_name = map[int32]string{ - 0: "UnknownUserType", - 1: "User", - 2: "Group", - 3: "Broadcast", - } - PushMessageType_value = map[string]int32{ - "UnknownUserType": 0, - "User": 1, - "Group": 2, - "Broadcast": 3, - } -) - -func (x PushMessageType) Enum() *PushMessageType { - p := new(PushMessageType) - *p = x - return p -} - -func (x PushMessageType) String() string { - return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) -} - -func (PushMessageType) Descriptor() protoreflect.EnumDescriptor { - return file_message_v1_message_proto_enumTypes[1].Descriptor() -} - -func (PushMessageType) Type() protoreflect.EnumType { - return &file_message_v1_message_proto_enumTypes[1] -} - -func (x PushMessageType) Number() protoreflect.EnumNumber { - return protoreflect.EnumNumber(x) -} - -// Deprecated: Use PushMessageType.Descriptor instead. -func (PushMessageType) EnumDescriptor() ([]byte, []int) { - return file_message_v1_message_proto_rawDescGZIP(), []int{1} -} - // SendMessageReq receive data from gateway type SendMessageReq struct { state protoimpl.MessageState @@ -137,8 +80,9 @@ type SendMessageReq struct { FromUser string `protobuf:"bytes,1,opt,name=from_user,json=fromUser,proto3" json:"from_user,omitempty"` ToUser string `protobuf:"bytes,2,opt,name=to_user,json=toUser,proto3" json:"to_user,omitempty"` - ContentType MessageContentType `protobuf:"varint,3,opt,name=content_type,json=contentType,proto3,enum=api.message.v1.MessageContentType" json:"content_type,omitempty"` - Content string `protobuf:"bytes,4,opt,name=content,proto3" json:"content,omitempty"` + SessionType v1.SessionType `protobuf:"varint,3,opt,name=session_type,json=sessionType,proto3,enum=api.user.session.v1.SessionType" json:"session_type,omitempty"` + ContentType MessageContentType `protobuf:"varint,4,opt,name=content_type,json=contentType,proto3,enum=api.message.v1.MessageContentType" json:"content_type,omitempty"` + Content string `protobuf:"bytes,5,opt,name=content,proto3" json:"content,omitempty"` } func (x *SendMessageReq) Reset() { @@ -187,11 +131,18 @@ func (x *SendMessageReq) GetToUser() string { return "" } +func (x *SendMessageReq) GetSessionType() v1.SessionType { + if x != nil { + return x.SessionType + } + return v1.SessionType_SingleChat +} + func (x *SendMessageReq) GetContentType() MessageContentType { if x != nil { return x.ContentType } - return MessageContentType_UnknownContentType + return MessageContentType_Text } func (x *SendMessageReq) GetContent() string { @@ -272,12 +223,12 @@ type MqMessage struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - FromUser string `protobuf:"bytes,1,opt,name=from_user,json=fromUser,proto3" json:"from_user,omitempty"` - ToUser string `protobuf:"bytes,2,opt,name=to_user,json=toUser,proto3" json:"to_user,omitempty"` - PushMessageType PushMessageType `protobuf:"varint,3,opt,name=push_message_type,json=pushMessageType,proto3,enum=api.message.v1.PushMessageType" json:"push_message_type,omitempty"` - ContentType MessageContentType `protobuf:"varint,4,opt,name=content_type,json=contentType,proto3,enum=api.message.v1.MessageContentType" json:"content_type,omitempty"` - Content string `protobuf:"bytes,5,opt,name=content,proto3" json:"content,omitempty"` - SessionId int64 `protobuf:"varint,6,opt,name=session_id,json=sessionId,proto3" json:"session_id,omitempty"` + FromUser string `protobuf:"bytes,1,opt,name=from_user,json=fromUser,proto3" json:"from_user,omitempty"` + ToUser string `protobuf:"bytes,2,opt,name=to_user,json=toUser,proto3" json:"to_user,omitempty"` + SessionType v1.SessionType `protobuf:"varint,3,opt,name=session_type,json=sessionType,proto3,enum=api.user.session.v1.SessionType" json:"session_type,omitempty"` + ContentType MessageContentType `protobuf:"varint,4,opt,name=content_type,json=contentType,proto3,enum=api.message.v1.MessageContentType" json:"content_type,omitempty"` + Content string `protobuf:"bytes,5,opt,name=content,proto3" json:"content,omitempty"` + SessionId int64 `protobuf:"varint,6,opt,name=session_id,json=sessionId,proto3" json:"session_id,omitempty"` } func (x *MqMessage) Reset() { @@ -326,18 +277,18 @@ func (x *MqMessage) GetToUser() string { return "" } -func (x *MqMessage) GetPushMessageType() PushMessageType { +func (x *MqMessage) GetSessionType() v1.SessionType { if x != nil { - return x.PushMessageType + return x.SessionType } - return PushMessageType_UnknownUserType + return v1.SessionType_SingleChat } func (x *MqMessage) GetContentType() MessageContentType { if x != nil { return x.ContentType } - return MessageContentType_UnknownContentType + return MessageContentType_Text } func (x *MqMessage) GetContent() string { @@ -360,13 +311,15 @@ type PushMessageReq struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - FromUser string `protobuf:"bytes,1,opt,name=from_user,json=fromUser,proto3" json:"from_user,omitempty"` - ToUser string `protobuf:"bytes,2,opt,name=to_user,json=toUser,proto3" json:"to_user,omitempty"` - PushMessageType PushMessageType `protobuf:"varint,3,opt,name=push_message_type,json=pushMessageType,proto3,enum=api.message.v1.PushMessageType" json:"push_message_type,omitempty"` - ContentType MessageContentType `protobuf:"varint,4,opt,name=content_type,json=contentType,proto3,enum=api.message.v1.MessageContentType" json:"content_type,omitempty"` - Content string `protobuf:"bytes,5,opt,name=content,proto3" json:"content,omitempty"` - MsgSeq string `protobuf:"bytes,6,opt,name=msg_seq,json=msgSeq,proto3" json:"msg_seq,omitempty"` - SessionId int64 `protobuf:"varint,7,opt,name=session_id,json=sessionId,proto3" json:"session_id,omitempty"` + FromUser string `protobuf:"bytes,1,opt,name=from_user,json=fromUser,proto3" json:"from_user,omitempty"` + ToUser string `protobuf:"bytes,2,opt,name=to_user,json=toUser,proto3" json:"to_user,omitempty"` + // to_group is validate when session_type is Group + ToGroup *string `protobuf:"bytes,3,opt,name=to_group,json=toGroup,proto3,oneof" json:"to_group,omitempty"` + SessionType v1.SessionType `protobuf:"varint,4,opt,name=session_type,json=sessionType,proto3,enum=api.user.session.v1.SessionType" json:"session_type,omitempty"` + ContentType MessageContentType `protobuf:"varint,5,opt,name=content_type,json=contentType,proto3,enum=api.message.v1.MessageContentType" json:"content_type,omitempty"` + Content string `protobuf:"bytes,6,opt,name=content,proto3" json:"content,omitempty"` + MsgSeq string `protobuf:"bytes,7,opt,name=msg_seq,json=msgSeq,proto3" json:"msg_seq,omitempty"` + SessionId int64 `protobuf:"varint,8,opt,name=session_id,json=sessionId,proto3" json:"session_id,omitempty"` } func (x *PushMessageReq) Reset() { @@ -415,18 +368,25 @@ func (x *PushMessageReq) GetToUser() string { return "" } -func (x *PushMessageReq) GetPushMessageType() PushMessageType { +func (x *PushMessageReq) GetToGroup() string { + if x != nil && x.ToGroup != nil { + return *x.ToGroup + } + return "" +} + +func (x *PushMessageReq) GetSessionType() v1.SessionType { if x != nil { - return x.PushMessageType + return x.SessionType } - return PushMessageType_UnknownUserType + return v1.SessionType_SingleChat } func (x *PushMessageReq) GetContentType() MessageContentType { if x != nil { return x.ContentType } - return MessageContentType_UnknownContentType + return MessageContentType_Text } func (x *PushMessageReq) GetContent() string { @@ -514,7 +474,7 @@ func (x *BriefMessage) GetContentType() MessageContentType { if x != nil { return x.ContentType } - return MessageContentType_UnknownContentType + return MessageContentType_Text } func (x *BriefMessage) GetContent() string { @@ -687,141 +647,133 @@ var file_message_v1_message_proto_rawDesc = []byte{ 0x73, 0x61, 0x67, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0e, 0x61, 0x70, 0x69, 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x31, 0x1a, 0x21, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x2f, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2f, 0x72, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x17, 0x76, - 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, - 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xcf, 0x01, 0x0a, 0x0e, 0x53, 0x65, 0x6e, 0x64, 0x4d, - 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x52, 0x65, 0x71, 0x12, 0x24, 0x0a, 0x09, 0x66, 0x72, 0x6f, - 0x6d, 0x5f, 0x75, 0x73, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, - 0x04, 0x72, 0x02, 0x10, 0x14, 0x52, 0x08, 0x66, 0x72, 0x6f, 0x6d, 0x55, 0x73, 0x65, 0x72, 0x12, - 0x20, 0x0a, 0x07, 0x74, 0x6f, 0x5f, 0x75, 0x73, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, - 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10, 0x14, 0x52, 0x06, 0x74, 0x6f, 0x55, 0x73, 0x65, - 0x72, 0x12, 0x4f, 0x0a, 0x0c, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x5f, 0x74, 0x79, 0x70, - 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x22, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x6d, 0x65, - 0x73, 0x73, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, - 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x54, 0x79, 0x70, 0x65, 0x42, 0x08, 0xfa, 0x42, 0x05, - 0x82, 0x01, 0x02, 0x10, 0x01, 0x52, 0x0b, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x54, 0x79, - 0x70, 0x65, 0x12, 0x24, 0x0a, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x18, 0x04, 0x20, - 0x01, 0x28, 0x09, 0x42, 0x0a, 0xfa, 0x42, 0x07, 0x72, 0x05, 0x10, 0x01, 0x18, 0x80, 0x08, 0x52, - 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x22, 0x8b, 0x01, 0x0a, 0x0f, 0x53, 0x65, 0x6e, - 0x64, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x52, 0x65, 0x73, 0x70, 0x12, 0x40, 0x0a, 0x08, - 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x24, - 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x2e, 0x72, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x42, 0x61, 0x73, 0x65, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x52, 0x08, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1d, - 0x0a, 0x0a, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, - 0x28, 0x03, 0x52, 0x09, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x12, 0x17, 0x0a, - 0x07, 0x6d, 0x73, 0x67, 0x5f, 0x73, 0x65, 0x71, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, - 0x6d, 0x73, 0x67, 0x53, 0x65, 0x71, 0x22, 0x8e, 0x02, 0x0a, 0x09, 0x4d, 0x71, 0x4d, 0x65, 0x73, - 0x73, 0x61, 0x67, 0x65, 0x12, 0x1b, 0x0a, 0x09, 0x66, 0x72, 0x6f, 0x6d, 0x5f, 0x75, 0x73, 0x65, - 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x66, 0x72, 0x6f, 0x6d, 0x55, 0x73, 0x65, - 0x72, 0x12, 0x17, 0x0a, 0x07, 0x74, 0x6f, 0x5f, 0x75, 0x73, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x06, 0x74, 0x6f, 0x55, 0x73, 0x65, 0x72, 0x12, 0x4b, 0x0a, 0x11, 0x70, 0x75, - 0x73, 0x68, 0x5f, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, - 0x03, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1f, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x6d, 0x65, 0x73, 0x73, - 0x61, 0x67, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x75, 0x73, 0x68, 0x4d, 0x65, 0x73, 0x73, 0x61, - 0x67, 0x65, 0x54, 0x79, 0x70, 0x65, 0x52, 0x0f, 0x70, 0x75, 0x73, 0x68, 0x4d, 0x65, 0x73, 0x73, - 0x61, 0x67, 0x65, 0x54, 0x79, 0x70, 0x65, 0x12, 0x45, 0x0a, 0x0c, 0x63, 0x6f, 0x6e, 0x74, 0x65, - 0x6e, 0x74, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x22, 0x2e, - 0x61, 0x70, 0x69, 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x4d, - 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x54, 0x79, 0x70, - 0x65, 0x52, 0x0b, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x54, 0x79, 0x70, 0x65, 0x12, 0x18, - 0x0a, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x12, 0x1d, 0x0a, 0x0a, 0x73, 0x65, 0x73, 0x73, - 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x06, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x73, 0x65, - 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x22, 0xac, 0x02, 0x0a, 0x0e, 0x50, 0x75, 0x73, 0x68, - 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x52, 0x65, 0x71, 0x12, 0x1b, 0x0a, 0x09, 0x66, 0x72, - 0x6f, 0x6d, 0x5f, 0x75, 0x73, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x66, - 0x72, 0x6f, 0x6d, 0x55, 0x73, 0x65, 0x72, 0x12, 0x17, 0x0a, 0x07, 0x74, 0x6f, 0x5f, 0x75, 0x73, - 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x74, 0x6f, 0x55, 0x73, 0x65, 0x72, - 0x12, 0x4b, 0x0a, 0x11, 0x70, 0x75, 0x73, 0x68, 0x5f, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, - 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1f, 0x2e, 0x61, 0x70, - 0x69, 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x75, 0x73, - 0x68, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x54, 0x79, 0x70, 0x65, 0x52, 0x0f, 0x70, 0x75, - 0x73, 0x68, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x54, 0x79, 0x70, 0x65, 0x12, 0x45, 0x0a, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1d, 0x75, + 0x73, 0x65, 0x72, 0x2f, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x2f, 0x76, 0x31, 0x2f, 0x73, + 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x17, 0x76, 0x61, + 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x9e, 0x02, 0x0a, 0x0e, 0x53, 0x65, 0x6e, 0x64, 0x4d, 0x65, + 0x73, 0x73, 0x61, 0x67, 0x65, 0x52, 0x65, 0x71, 0x12, 0x24, 0x0a, 0x09, 0x66, 0x72, 0x6f, 0x6d, + 0x5f, 0x75, 0x73, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, + 0x72, 0x02, 0x10, 0x14, 0x52, 0x08, 0x66, 0x72, 0x6f, 0x6d, 0x55, 0x73, 0x65, 0x72, 0x12, 0x20, + 0x0a, 0x07, 0x74, 0x6f, 0x5f, 0x75, 0x73, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, + 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10, 0x14, 0x52, 0x06, 0x74, 0x6f, 0x55, 0x73, 0x65, 0x72, + 0x12, 0x4d, 0x0a, 0x0c, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x79, 0x70, 0x65, + 0x18, 0x03, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x20, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x75, 0x73, 0x65, + 0x72, 0x2e, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x65, 0x73, + 0x73, 0x69, 0x6f, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x82, 0x01, 0x02, + 0x10, 0x01, 0x52, 0x0b, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x12, + 0x4f, 0x0a, 0x0c, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, + 0x04, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x22, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x6d, 0x65, 0x73, 0x73, + 0x61, 0x67, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x43, 0x6f, + 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x54, 0x79, 0x70, 0x65, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x82, 0x01, + 0x02, 0x10, 0x01, 0x52, 0x0b, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x54, 0x79, 0x70, 0x65, + 0x12, 0x24, 0x0a, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, + 0x09, 0x42, 0x0a, 0xfa, 0x42, 0x07, 0x72, 0x05, 0x10, 0x01, 0x18, 0x80, 0x20, 0x52, 0x07, 0x63, + 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x22, 0x8b, 0x01, 0x0a, 0x0f, 0x53, 0x65, 0x6e, 0x64, 0x4d, + 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x52, 0x65, 0x73, 0x70, 0x12, 0x40, 0x0a, 0x08, 0x72, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x61, + 0x70, 0x69, 0x2e, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x2e, 0x72, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x42, 0x61, 0x73, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x52, 0x08, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1d, 0x0a, 0x0a, + 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, + 0x52, 0x09, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x12, 0x17, 0x0a, 0x07, 0x6d, + 0x73, 0x67, 0x5f, 0x73, 0x65, 0x71, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x6d, 0x73, + 0x67, 0x53, 0x65, 0x71, 0x22, 0x86, 0x02, 0x0a, 0x09, 0x4d, 0x71, 0x4d, 0x65, 0x73, 0x73, 0x61, + 0x67, 0x65, 0x12, 0x1b, 0x0a, 0x09, 0x66, 0x72, 0x6f, 0x6d, 0x5f, 0x75, 0x73, 0x65, 0x72, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x66, 0x72, 0x6f, 0x6d, 0x55, 0x73, 0x65, 0x72, 0x12, + 0x17, 0x0a, 0x07, 0x74, 0x6f, 0x5f, 0x75, 0x73, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x06, 0x74, 0x6f, 0x55, 0x73, 0x65, 0x72, 0x12, 0x43, 0x0a, 0x0c, 0x73, 0x65, 0x73, 0x73, + 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x20, + 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, + 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x54, 0x79, 0x70, 0x65, + 0x52, 0x0b, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x12, 0x45, 0x0a, 0x0c, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x22, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x54, 0x79, 0x70, 0x65, 0x52, 0x0b, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x54, 0x79, 0x70, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x18, - 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x12, 0x17, - 0x0a, 0x07, 0x6d, 0x73, 0x67, 0x5f, 0x73, 0x65, 0x71, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x06, 0x6d, 0x73, 0x67, 0x53, 0x65, 0x71, 0x12, 0x1d, 0x0a, 0x0a, 0x73, 0x65, 0x73, 0x73, 0x69, - 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x07, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x73, 0x65, 0x73, - 0x73, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x22, 0xdd, 0x01, 0x0a, 0x0c, 0x42, 0x72, 0x69, 0x65, 0x66, - 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x1b, 0x0a, 0x09, 0x66, 0x72, 0x6f, 0x6d, 0x5f, - 0x75, 0x73, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x66, 0x72, 0x6f, 0x6d, - 0x55, 0x73, 0x65, 0x72, 0x12, 0x17, 0x0a, 0x07, 0x74, 0x6f, 0x5f, 0x75, 0x73, 0x65, 0x72, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x74, 0x6f, 0x55, 0x73, 0x65, 0x72, 0x12, 0x45, 0x0a, - 0x0c, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x03, 0x20, - 0x01, 0x28, 0x0e, 0x32, 0x22, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, - 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x43, 0x6f, 0x6e, 0x74, - 0x65, 0x6e, 0x74, 0x54, 0x79, 0x70, 0x65, 0x52, 0x0b, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, - 0x54, 0x79, 0x70, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x18, - 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x12, 0x17, - 0x0a, 0x07, 0x6d, 0x73, 0x67, 0x5f, 0x73, 0x65, 0x71, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x06, 0x6d, 0x73, 0x67, 0x53, 0x65, 0x71, 0x12, 0x1d, 0x0a, 0x0a, 0x73, 0x65, 0x73, 0x73, 0x69, - 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x06, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x73, 0x65, 0x73, - 0x73, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x22, 0xbf, 0x01, 0x0a, 0x16, 0x51, 0x75, 0x65, 0x72, 0x79, - 0x4f, 0x66, 0x66, 0x6c, 0x69, 0x6e, 0x65, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x52, 0x65, - 0x71, 0x12, 0x20, 0x0a, 0x07, 0x75, 0x73, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10, 0x14, 0x52, 0x06, 0x75, 0x73, 0x65, - 0x72, 0x49, 0x64, 0x12, 0x29, 0x0a, 0x0c, 0x6c, 0x61, 0x73, 0x74, 0x5f, 0x6d, 0x73, 0x67, 0x5f, - 0x73, 0x65, 0x71, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, - 0x10, 0x0a, 0x52, 0x0a, 0x6c, 0x61, 0x73, 0x74, 0x4d, 0x73, 0x67, 0x53, 0x65, 0x71, 0x12, 0x1c, - 0x0a, 0x09, 0x6f, 0x6e, 0x6c, 0x79, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, - 0x08, 0x52, 0x09, 0x6f, 0x6e, 0x6c, 0x79, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x12, 0x0a, 0x04, - 0x70, 0x61, 0x67, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x05, 0x52, 0x04, 0x70, 0x61, 0x67, 0x65, - 0x12, 0x26, 0x0a, 0x09, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x05, 0x20, - 0x01, 0x28, 0x05, 0x42, 0x09, 0xfa, 0x42, 0x06, 0x1a, 0x04, 0x18, 0x64, 0x28, 0x01, 0x52, 0x08, - 0x70, 0x61, 0x67, 0x65, 0x53, 0x69, 0x7a, 0x65, 0x22, 0xab, 0x01, 0x0a, 0x17, 0x51, 0x75, 0x65, - 0x72, 0x79, 0x4f, 0x66, 0x66, 0x6c, 0x69, 0x6e, 0x65, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, - 0x52, 0x65, 0x73, 0x70, 0x12, 0x40, 0x0a, 0x08, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x74, 0x72, 0x61, - 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x2e, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, - 0x42, 0x61, 0x73, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x52, 0x08, 0x72, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x12, 0x38, 0x0a, 0x08, - 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1c, - 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x31, 0x2e, - 0x42, 0x72, 0x69, 0x65, 0x66, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x52, 0x08, 0x6d, 0x65, - 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x2a, 0x4c, 0x0a, 0x12, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, - 0x65, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x54, 0x79, 0x70, 0x65, 0x12, 0x16, 0x0a, 0x12, - 0x55, 0x6e, 0x6b, 0x6e, 0x6f, 0x77, 0x6e, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x54, 0x79, - 0x70, 0x65, 0x10, 0x00, 0x12, 0x08, 0x0a, 0x04, 0x54, 0x65, 0x78, 0x74, 0x10, 0x01, 0x12, 0x09, - 0x0a, 0x05, 0x49, 0x6d, 0x61, 0x67, 0x65, 0x10, 0x02, 0x12, 0x09, 0x0a, 0x05, 0x56, 0x6f, 0x69, - 0x63, 0x65, 0x10, 0x03, 0x2a, 0x4a, 0x0a, 0x0f, 0x50, 0x75, 0x73, 0x68, 0x4d, 0x65, 0x73, 0x73, - 0x61, 0x67, 0x65, 0x54, 0x79, 0x70, 0x65, 0x12, 0x13, 0x0a, 0x0f, 0x55, 0x6e, 0x6b, 0x6e, 0x6f, - 0x77, 0x6e, 0x55, 0x73, 0x65, 0x72, 0x54, 0x79, 0x70, 0x65, 0x10, 0x00, 0x12, 0x08, 0x0a, 0x04, - 0x55, 0x73, 0x65, 0x72, 0x10, 0x01, 0x12, 0x09, 0x0a, 0x05, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x10, - 0x02, 0x12, 0x0d, 0x0a, 0x09, 0x42, 0x72, 0x6f, 0x61, 0x64, 0x63, 0x61, 0x73, 0x74, 0x10, 0x03, - 0x32, 0xac, 0x01, 0x0a, 0x0c, 0x53, 0x65, 0x6e, 0x64, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, - 0x72, 0x12, 0x4e, 0x0a, 0x0b, 0x53, 0x65, 0x6e, 0x64, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, - 0x12, 0x1e, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x2e, 0x76, - 0x31, 0x2e, 0x53, 0x65, 0x6e, 0x64, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x52, 0x65, 0x71, - 0x1a, 0x1f, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x2e, 0x76, - 0x31, 0x2e, 0x53, 0x65, 0x6e, 0x64, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x52, 0x65, 0x73, - 0x70, 0x12, 0x4c, 0x0a, 0x09, 0x42, 0x72, 0x6f, 0x61, 0x64, 0x63, 0x61, 0x73, 0x74, 0x12, 0x1e, - 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x31, 0x2e, - 0x53, 0x65, 0x6e, 0x64, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x52, 0x65, 0x71, 0x1a, 0x1f, - 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x31, 0x2e, - 0x53, 0x65, 0x6e, 0x64, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x52, 0x65, 0x73, 0x70, 0x32, - 0x63, 0x0a, 0x0c, 0x50, 0x75, 0x73, 0x68, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x72, 0x12, - 0x53, 0x0a, 0x0b, 0x50, 0x75, 0x73, 0x68, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x1e, + 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x12, 0x1d, + 0x0a, 0x0a, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x06, 0x20, 0x01, + 0x28, 0x03, 0x52, 0x09, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x22, 0xd1, 0x02, + 0x0a, 0x0e, 0x50, 0x75, 0x73, 0x68, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x52, 0x65, 0x71, + 0x12, 0x1b, 0x0a, 0x09, 0x66, 0x72, 0x6f, 0x6d, 0x5f, 0x75, 0x73, 0x65, 0x72, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x08, 0x66, 0x72, 0x6f, 0x6d, 0x55, 0x73, 0x65, 0x72, 0x12, 0x17, 0x0a, + 0x07, 0x74, 0x6f, 0x5f, 0x75, 0x73, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, + 0x74, 0x6f, 0x55, 0x73, 0x65, 0x72, 0x12, 0x1e, 0x0a, 0x08, 0x74, 0x6f, 0x5f, 0x67, 0x72, 0x6f, + 0x75, 0x70, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x07, 0x74, 0x6f, 0x47, 0x72, + 0x6f, 0x75, 0x70, 0x88, 0x01, 0x01, 0x12, 0x43, 0x0a, 0x0c, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, + 0x6e, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x20, 0x2e, 0x61, + 0x70, 0x69, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x2e, + 0x76, 0x31, 0x2e, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x52, 0x0b, + 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x12, 0x45, 0x0a, 0x0c, 0x63, + 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, + 0x0e, 0x32, 0x22, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x2e, + 0x76, 0x31, 0x2e, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x6e, + 0x74, 0x54, 0x79, 0x70, 0x65, 0x52, 0x0b, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x54, 0x79, + 0x70, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x18, 0x06, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x12, 0x17, 0x0a, 0x07, + 0x6d, 0x73, 0x67, 0x5f, 0x73, 0x65, 0x71, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x6d, + 0x73, 0x67, 0x53, 0x65, 0x71, 0x12, 0x1d, 0x0a, 0x0a, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, + 0x5f, 0x69, 0x64, 0x18, 0x08, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x73, 0x65, 0x73, 0x73, 0x69, + 0x6f, 0x6e, 0x49, 0x64, 0x42, 0x0b, 0x0a, 0x09, 0x5f, 0x74, 0x6f, 0x5f, 0x67, 0x72, 0x6f, 0x75, + 0x70, 0x22, 0xdd, 0x01, 0x0a, 0x0c, 0x42, 0x72, 0x69, 0x65, 0x66, 0x4d, 0x65, 0x73, 0x73, 0x61, + 0x67, 0x65, 0x12, 0x1b, 0x0a, 0x09, 0x66, 0x72, 0x6f, 0x6d, 0x5f, 0x75, 0x73, 0x65, 0x72, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x66, 0x72, 0x6f, 0x6d, 0x55, 0x73, 0x65, 0x72, 0x12, + 0x17, 0x0a, 0x07, 0x74, 0x6f, 0x5f, 0x75, 0x73, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x06, 0x74, 0x6f, 0x55, 0x73, 0x65, 0x72, 0x12, 0x45, 0x0a, 0x0c, 0x63, 0x6f, 0x6e, 0x74, + 0x65, 0x6e, 0x74, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x22, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x31, 0x2e, - 0x50, 0x75, 0x73, 0x68, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x52, 0x65, 0x71, 0x1a, 0x24, - 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x2e, 0x72, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x42, 0x61, 0x73, 0x65, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x32, 0x78, 0x0a, 0x0e, 0x4f, 0x66, 0x66, 0x6c, 0x69, 0x6e, 0x65, 0x4d, - 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x66, 0x0a, 0x13, 0x51, 0x75, 0x65, 0x72, 0x79, 0x4f, - 0x66, 0x66, 0x6c, 0x69, 0x6e, 0x65, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x26, 0x2e, - 0x61, 0x70, 0x69, 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x51, + 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x54, 0x79, + 0x70, 0x65, 0x52, 0x0b, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x54, 0x79, 0x70, 0x65, 0x12, + 0x18, 0x0a, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x12, 0x17, 0x0a, 0x07, 0x6d, 0x73, 0x67, + 0x5f, 0x73, 0x65, 0x71, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x6d, 0x73, 0x67, 0x53, + 0x65, 0x71, 0x12, 0x1d, 0x0a, 0x0a, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, + 0x18, 0x06, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x49, + 0x64, 0x22, 0xbf, 0x01, 0x0a, 0x16, 0x51, 0x75, 0x65, 0x72, 0x79, 0x4f, 0x66, 0x66, 0x6c, 0x69, + 0x6e, 0x65, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x52, 0x65, 0x71, 0x12, 0x20, 0x0a, 0x07, + 0x75, 0x73, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, + 0x42, 0x04, 0x72, 0x02, 0x10, 0x14, 0x52, 0x06, 0x75, 0x73, 0x65, 0x72, 0x49, 0x64, 0x12, 0x29, + 0x0a, 0x0c, 0x6c, 0x61, 0x73, 0x74, 0x5f, 0x6d, 0x73, 0x67, 0x5f, 0x73, 0x65, 0x71, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10, 0x0a, 0x52, 0x0a, 0x6c, + 0x61, 0x73, 0x74, 0x4d, 0x73, 0x67, 0x53, 0x65, 0x71, 0x12, 0x1c, 0x0a, 0x09, 0x6f, 0x6e, 0x6c, + 0x79, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x09, 0x6f, 0x6e, + 0x6c, 0x79, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x70, 0x61, 0x67, 0x65, 0x18, + 0x04, 0x20, 0x01, 0x28, 0x05, 0x52, 0x04, 0x70, 0x61, 0x67, 0x65, 0x12, 0x26, 0x0a, 0x09, 0x70, + 0x61, 0x67, 0x65, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x05, 0x42, 0x09, + 0xfa, 0x42, 0x06, 0x1a, 0x04, 0x18, 0x64, 0x28, 0x01, 0x52, 0x08, 0x70, 0x61, 0x67, 0x65, 0x53, + 0x69, 0x7a, 0x65, 0x22, 0xab, 0x01, 0x0a, 0x17, 0x51, 0x75, 0x65, 0x72, 0x79, 0x4f, 0x66, 0x66, + 0x6c, 0x69, 0x6e, 0x65, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x52, 0x65, 0x73, 0x70, 0x12, + 0x40, 0x0a, 0x08, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x24, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, + 0x74, 0x2e, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x42, 0x61, 0x73, 0x65, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x52, 0x08, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x12, 0x14, 0x0a, 0x05, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, + 0x52, 0x05, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x12, 0x38, 0x0a, 0x08, 0x6d, 0x65, 0x73, 0x73, 0x61, + 0x67, 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x61, 0x70, 0x69, 0x2e, + 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x42, 0x72, 0x69, 0x65, 0x66, + 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x52, 0x08, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, + 0x73, 0x2a, 0x34, 0x0a, 0x12, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x43, 0x6f, 0x6e, 0x74, + 0x65, 0x6e, 0x74, 0x54, 0x79, 0x70, 0x65, 0x12, 0x08, 0x0a, 0x04, 0x54, 0x65, 0x78, 0x74, 0x10, + 0x00, 0x12, 0x09, 0x0a, 0x05, 0x49, 0x6d, 0x61, 0x67, 0x65, 0x10, 0x01, 0x12, 0x09, 0x0a, 0x05, + 0x56, 0x6f, 0x69, 0x63, 0x65, 0x10, 0x02, 0x32, 0x69, 0x0a, 0x12, 0x50, 0x75, 0x73, 0x68, 0x4d, + 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x53, 0x0a, + 0x0b, 0x50, 0x75, 0x73, 0x68, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x1e, 0x2e, 0x61, + 0x70, 0x69, 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x75, + 0x73, 0x68, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x52, 0x65, 0x71, 0x1a, 0x24, 0x2e, 0x61, + 0x70, 0x69, 0x2e, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x2e, 0x72, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x42, 0x61, 0x73, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x32, 0x7f, 0x0a, 0x15, 0x4f, 0x66, 0x66, 0x6c, 0x69, 0x6e, 0x65, 0x4d, 0x65, 0x73, + 0x73, 0x61, 0x67, 0x65, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x66, 0x0a, 0x13, 0x51, 0x75, 0x65, 0x72, 0x79, 0x4f, 0x66, 0x66, 0x6c, 0x69, 0x6e, 0x65, 0x4d, 0x65, 0x73, 0x73, 0x61, - 0x67, 0x65, 0x52, 0x65, 0x71, 0x1a, 0x27, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x6d, 0x65, 0x73, 0x73, - 0x61, 0x67, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x4f, 0x66, 0x66, 0x6c, - 0x69, 0x6e, 0x65, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x52, 0x65, 0x73, 0x70, 0x42, 0x23, - 0x5a, 0x21, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x67, 0x6f, 0x2d, - 0x67, 0x6f, 0x69, 0x6d, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, - 0x2f, 0x76, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x67, 0x65, 0x12, 0x26, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, + 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x4f, 0x66, 0x66, 0x6c, 0x69, 0x6e, 0x65, + 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x52, 0x65, 0x71, 0x1a, 0x27, 0x2e, 0x61, 0x70, 0x69, + 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, + 0x79, 0x4f, 0x66, 0x66, 0x6c, 0x69, 0x6e, 0x65, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x52, + 0x65, 0x73, 0x70, 0x42, 0x23, 0x5a, 0x21, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, + 0x6d, 0x2f, 0x67, 0x6f, 0x2d, 0x67, 0x6f, 0x69, 0x6d, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x6d, 0x65, + 0x73, 0x73, 0x61, 0x67, 0x65, 0x2f, 0x76, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -836,43 +788,40 @@ func file_message_v1_message_proto_rawDescGZIP() []byte { return file_message_v1_message_proto_rawDescData } -var file_message_v1_message_proto_enumTypes = make([]protoimpl.EnumInfo, 2) +var file_message_v1_message_proto_enumTypes = make([]protoimpl.EnumInfo, 1) var file_message_v1_message_proto_msgTypes = make([]protoimpl.MessageInfo, 7) var file_message_v1_message_proto_goTypes = []interface{}{ (MessageContentType)(0), // 0: api.message.v1.MessageContentType - (PushMessageType)(0), // 1: api.message.v1.PushMessageType - (*SendMessageReq)(nil), // 2: api.message.v1.SendMessageReq - (*SendMessageResp)(nil), // 3: api.message.v1.SendMessageResp - (*MqMessage)(nil), // 4: api.message.v1.MqMessage - (*PushMessageReq)(nil), // 5: api.message.v1.PushMessageReq - (*BriefMessage)(nil), // 6: api.message.v1.BriefMessage - (*QueryOfflineMessageReq)(nil), // 7: api.message.v1.QueryOfflineMessageReq - (*QueryOfflineMessageResp)(nil), // 8: api.message.v1.QueryOfflineMessageResp + (*SendMessageReq)(nil), // 1: api.message.v1.SendMessageReq + (*SendMessageResp)(nil), // 2: api.message.v1.SendMessageResp + (*MqMessage)(nil), // 3: api.message.v1.MqMessage + (*PushMessageReq)(nil), // 4: api.message.v1.PushMessageReq + (*BriefMessage)(nil), // 5: api.message.v1.BriefMessage + (*QueryOfflineMessageReq)(nil), // 6: api.message.v1.QueryOfflineMessageReq + (*QueryOfflineMessageResp)(nil), // 7: api.message.v1.QueryOfflineMessageResp + (v1.SessionType)(0), // 8: api.user.session.v1.SessionType (*response.BaseResponse)(nil), // 9: api.transport.response.BaseResponse } var file_message_v1_message_proto_depIdxs = []int32{ - 0, // 0: api.message.v1.SendMessageReq.content_type:type_name -> api.message.v1.MessageContentType - 9, // 1: api.message.v1.SendMessageResp.response:type_name -> api.transport.response.BaseResponse - 1, // 2: api.message.v1.MqMessage.push_message_type:type_name -> api.message.v1.PushMessageType - 0, // 3: api.message.v1.MqMessage.content_type:type_name -> api.message.v1.MessageContentType - 1, // 4: api.message.v1.PushMessageReq.push_message_type:type_name -> api.message.v1.PushMessageType - 0, // 5: api.message.v1.PushMessageReq.content_type:type_name -> api.message.v1.MessageContentType - 0, // 6: api.message.v1.BriefMessage.content_type:type_name -> api.message.v1.MessageContentType - 9, // 7: api.message.v1.QueryOfflineMessageResp.response:type_name -> api.transport.response.BaseResponse - 6, // 8: api.message.v1.QueryOfflineMessageResp.messages:type_name -> api.message.v1.BriefMessage - 2, // 9: api.message.v1.SendMessager.SendMessage:input_type -> api.message.v1.SendMessageReq - 2, // 10: api.message.v1.SendMessager.Broadcast:input_type -> api.message.v1.SendMessageReq - 5, // 11: api.message.v1.PushMessager.PushMessage:input_type -> api.message.v1.PushMessageReq - 7, // 12: api.message.v1.OfflineMessage.QueryOfflineMessage:input_type -> api.message.v1.QueryOfflineMessageReq - 3, // 13: api.message.v1.SendMessager.SendMessage:output_type -> api.message.v1.SendMessageResp - 3, // 14: api.message.v1.SendMessager.Broadcast:output_type -> api.message.v1.SendMessageResp - 9, // 15: api.message.v1.PushMessager.PushMessage:output_type -> api.transport.response.BaseResponse - 8, // 16: api.message.v1.OfflineMessage.QueryOfflineMessage:output_type -> api.message.v1.QueryOfflineMessageResp - 13, // [13:17] is the sub-list for method output_type - 9, // [9:13] 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 + 8, // 0: api.message.v1.SendMessageReq.session_type:type_name -> api.user.session.v1.SessionType + 0, // 1: api.message.v1.SendMessageReq.content_type:type_name -> api.message.v1.MessageContentType + 9, // 2: api.message.v1.SendMessageResp.response:type_name -> api.transport.response.BaseResponse + 8, // 3: api.message.v1.MqMessage.session_type:type_name -> api.user.session.v1.SessionType + 0, // 4: api.message.v1.MqMessage.content_type:type_name -> api.message.v1.MessageContentType + 8, // 5: api.message.v1.PushMessageReq.session_type:type_name -> api.user.session.v1.SessionType + 0, // 6: api.message.v1.PushMessageReq.content_type:type_name -> api.message.v1.MessageContentType + 0, // 7: api.message.v1.BriefMessage.content_type:type_name -> api.message.v1.MessageContentType + 9, // 8: api.message.v1.QueryOfflineMessageResp.response:type_name -> api.transport.response.BaseResponse + 5, // 9: api.message.v1.QueryOfflineMessageResp.messages:type_name -> api.message.v1.BriefMessage + 4, // 10: api.message.v1.PushMessageService.PushMessage:input_type -> api.message.v1.PushMessageReq + 6, // 11: api.message.v1.OfflineMessageService.QueryOfflineMessage:input_type -> api.message.v1.QueryOfflineMessageReq + 9, // 12: api.message.v1.PushMessageService.PushMessage:output_type -> api.transport.response.BaseResponse + 7, // 13: api.message.v1.OfflineMessageService.QueryOfflineMessage:output_type -> api.message.v1.QueryOfflineMessageResp + 12, // [12:14] is the sub-list for method output_type + 10, // [10:12] 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_message_v1_message_proto_init() } @@ -966,15 +915,16 @@ func file_message_v1_message_proto_init() { } } } + file_message_v1_message_proto_msgTypes[3].OneofWrappers = []interface{}{} type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_message_v1_message_proto_rawDesc, - NumEnums: 2, + NumEnums: 1, NumMessages: 7, NumExtensions: 0, - NumServices: 3, + NumServices: 2, }, GoTypes: file_message_v1_message_proto_goTypes, DependencyIndexes: file_message_v1_message_proto_depIdxs, diff --git a/message/v1/message.pb.validate.go b/message/v1/message.pb.validate.go index 54b090f..0498de1 100644 --- a/message/v1/message.pb.validate.go +++ b/message/v1/message.pb.validate.go @@ -79,6 +79,17 @@ func (m *SendMessageReq) validate(all bool) error { errors = append(errors, err) } + if _, ok := v1.SessionType_name[int32(m.GetSessionType())]; !ok { + err := SendMessageReqValidationError{ + field: "SessionType", + reason: "value must be one of the defined enum values", + } + if !all { + return err + } + errors = append(errors, err) + } + if _, ok := MessageContentType_name[int32(m.GetContentType())]; !ok { err := SendMessageReqValidationError{ field: "ContentType", @@ -90,10 +101,10 @@ func (m *SendMessageReq) validate(all bool) error { errors = append(errors, err) } - if l := utf8.RuneCountInString(m.GetContent()); l < 1 || l > 1024 { + if l := utf8.RuneCountInString(m.GetContent()); l < 1 || l > 4096 { err := SendMessageReqValidationError{ field: "Content", - reason: "value length must be between 1 and 1024 runes, inclusive", + reason: "value length must be between 1 and 4096 runes, inclusive", } if !all { return err @@ -338,7 +349,7 @@ func (m *MqMessage) validate(all bool) error { // no validation rules for ToUser - // no validation rules for PushMessageType + // no validation rules for SessionType // no validation rules for ContentType @@ -449,7 +460,7 @@ func (m *PushMessageReq) validate(all bool) error { // no validation rules for ToUser - // no validation rules for PushMessageType + // no validation rules for SessionType // no validation rules for ContentType @@ -459,6 +470,10 @@ func (m *PushMessageReq) validate(all bool) error { // no validation rules for SessionId + if m.ToGroup != nil { + // no validation rules for ToGroup + } + if len(errors) > 0 { return PushMessageReqMultiError(errors) } diff --git a/message/v1/message.proto b/message/v1/message.proto index 294c025..bc25574 100644 --- a/message/v1/message.proto +++ b/message/v1/message.proto @@ -3,25 +3,26 @@ syntax = "proto3"; package api.message.v1; import "transport/response/response.proto"; +import "user/session/v1/session.proto"; import "validate/validate.proto"; option go_package = "github.com/go-goim/api/message/v1"; enum MessageContentType { - UnknownContentType = 0; - Text = 1; - Image = 2; - Voice = 3; + Text = 0; + Image = 1; + Voice = 2; } // SendMessageReq receive data from gateway message SendMessageReq { string from_user = 1 [(validate.rules).string.min_len = 20]; string to_user = 2 [(validate.rules).string.min_len = 20]; - MessageContentType content_type = 3 [(validate.rules).enum.defined_only = true]; - string content = 4 [(validate.rules).string = { + user.session.v1.SessionType session_type = 3 [(validate.rules).enum.defined_only = true]; + MessageContentType content_type = 4 [(validate.rules).enum.defined_only = true]; + string content = 5 [(validate.rules).string = { min_len: 1, - max_len: 1024 + max_len: 4096 }]; } @@ -33,29 +34,11 @@ message SendMessageResp { string msg_seq = 3; } -// SendMessager provide send message service -service SendMessager { - // SendMessage send message to one or multi users/channels - rpc SendMessage(SendMessageReq) returns (SendMessageResp); - // Broadcast send message to all online user - rpc Broadcast(SendMessageReq) returns (SendMessageResp); -} - -enum PushMessageType { - UnknownUserType = 0; - // user to user - User = 1; - // user to group - Group = 2; - // global broadcast - Broadcast = 3; -} - // MqMessage is message protocol when pub/sub msg to mq message MqMessage { string from_user = 1; string to_user = 2; - PushMessageType push_message_type = 3; + user.session.v1.SessionType session_type = 3; MessageContentType content_type = 4; string content = 5; int64 session_id = 6; @@ -65,14 +48,16 @@ message MqMessage { message PushMessageReq { string from_user = 1; string to_user = 2; - PushMessageType push_message_type = 3; - MessageContentType content_type = 4; - string content = 5; - string msg_seq = 6; - int64 session_id = 7; + // to_group is validate when session_type is Group + optional string to_group = 3; + user.session.v1.SessionType session_type = 4; + MessageContentType content_type = 5; + string content = 6; + string msg_seq = 7; + int64 session_id = 8; } -service PushMessager { +service PushMessageService { rpc PushMessage(PushMessageReq) returns (transport.response.BaseResponse); } @@ -103,6 +88,6 @@ message QueryOfflineMessageResp { repeated BriefMessage messages = 3; } -service OfflineMessage { +service OfflineMessageService { rpc QueryOfflineMessage(QueryOfflineMessageReq) returns (QueryOfflineMessageResp); } diff --git a/message/v1/message_grpc.pb.go b/message/v1/message_grpc.pb.go index 55a1807..c73c2bd 100644 --- a/message/v1/message_grpc.pb.go +++ b/message/v1/message_grpc.pb.go @@ -15,298 +15,172 @@ import ( // Requires gRPC-Go v1.32.0 or later. const _ = grpc.SupportPackageIsVersion7 -// SendMessagerClient is the client API for SendMessager service. +// PushMessageServiceClient is the client API for PushMessageService 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 SendMessagerClient interface { - // SendMessage send message to one or multi users/channels - SendMessage(ctx context.Context, in *SendMessageReq, opts ...grpc.CallOption) (*SendMessageResp, error) - // Broadcast send message to all online user - Broadcast(ctx context.Context, in *SendMessageReq, opts ...grpc.CallOption) (*SendMessageResp, error) -} - -type sendMessagerClient struct { - cc grpc.ClientConnInterface -} - -func NewSendMessagerClient(cc grpc.ClientConnInterface) SendMessagerClient { - return &sendMessagerClient{cc} -} - -func (c *sendMessagerClient) SendMessage(ctx context.Context, in *SendMessageReq, opts ...grpc.CallOption) (*SendMessageResp, error) { - out := new(SendMessageResp) - err := c.cc.Invoke(ctx, "/api.message.v1.SendMessager/SendMessage", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *sendMessagerClient) Broadcast(ctx context.Context, in *SendMessageReq, opts ...grpc.CallOption) (*SendMessageResp, error) { - out := new(SendMessageResp) - err := c.cc.Invoke(ctx, "/api.message.v1.SendMessager/Broadcast", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -// SendMessagerServer is the server API for SendMessager service. -// All implementations must embed UnimplementedSendMessagerServer -// for forward compatibility -type SendMessagerServer interface { - // SendMessage send message to one or multi users/channels - SendMessage(context.Context, *SendMessageReq) (*SendMessageResp, error) - // Broadcast send message to all online user - Broadcast(context.Context, *SendMessageReq) (*SendMessageResp, error) - mustEmbedUnimplementedSendMessagerServer() -} - -// UnimplementedSendMessagerServer must be embedded to have forward compatible implementations. -type UnimplementedSendMessagerServer struct { -} - -func (UnimplementedSendMessagerServer) SendMessage(context.Context, *SendMessageReq) (*SendMessageResp, error) { - return nil, status.Errorf(codes.Unimplemented, "method SendMessage not implemented") -} -func (UnimplementedSendMessagerServer) Broadcast(context.Context, *SendMessageReq) (*SendMessageResp, error) { - return nil, status.Errorf(codes.Unimplemented, "method Broadcast not implemented") -} -func (UnimplementedSendMessagerServer) mustEmbedUnimplementedSendMessagerServer() {} - -// UnsafeSendMessagerServer may be embedded to opt out of forward compatibility for this service. -// Use of this interface is not recommended, as added methods to SendMessagerServer will -// result in compilation errors. -type UnsafeSendMessagerServer interface { - mustEmbedUnimplementedSendMessagerServer() -} - -func RegisterSendMessagerServer(s grpc.ServiceRegistrar, srv SendMessagerServer) { - s.RegisterService(&SendMessager_ServiceDesc, srv) -} - -func _SendMessager_SendMessage_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(SendMessageReq) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(SendMessagerServer).SendMessage(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/api.message.v1.SendMessager/SendMessage", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(SendMessagerServer).SendMessage(ctx, req.(*SendMessageReq)) - } - return interceptor(ctx, in, info, handler) -} - -func _SendMessager_Broadcast_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(SendMessageReq) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(SendMessagerServer).Broadcast(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/api.message.v1.SendMessager/Broadcast", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(SendMessagerServer).Broadcast(ctx, req.(*SendMessageReq)) - } - return interceptor(ctx, in, info, handler) -} - -// SendMessager_ServiceDesc is the grpc.ServiceDesc for SendMessager service. -// It's only intended for direct use with grpc.RegisterService, -// and not to be introspected or modified (even as a copy) -var SendMessager_ServiceDesc = grpc.ServiceDesc{ - ServiceName: "api.message.v1.SendMessager", - HandlerType: (*SendMessagerServer)(nil), - Methods: []grpc.MethodDesc{ - { - MethodName: "SendMessage", - Handler: _SendMessager_SendMessage_Handler, - }, - { - MethodName: "Broadcast", - Handler: _SendMessager_Broadcast_Handler, - }, - }, - Streams: []grpc.StreamDesc{}, - Metadata: "message/v1/message.proto", -} - -// PushMessagerClient is the client API for PushMessager 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 PushMessagerClient interface { +type PushMessageServiceClient interface { PushMessage(ctx context.Context, in *PushMessageReq, opts ...grpc.CallOption) (*response.BaseResponse, error) } -type pushMessagerClient struct { +type pushMessageServiceClient struct { cc grpc.ClientConnInterface } -func NewPushMessagerClient(cc grpc.ClientConnInterface) PushMessagerClient { - return &pushMessagerClient{cc} +func NewPushMessageServiceClient(cc grpc.ClientConnInterface) PushMessageServiceClient { + return &pushMessageServiceClient{cc} } -func (c *pushMessagerClient) PushMessage(ctx context.Context, in *PushMessageReq, opts ...grpc.CallOption) (*response.BaseResponse, error) { +func (c *pushMessageServiceClient) PushMessage(ctx context.Context, in *PushMessageReq, opts ...grpc.CallOption) (*response.BaseResponse, error) { out := new(response.BaseResponse) - err := c.cc.Invoke(ctx, "/api.message.v1.PushMessager/PushMessage", in, out, opts...) + err := c.cc.Invoke(ctx, "/api.message.v1.PushMessageService/PushMessage", in, out, opts...) if err != nil { return nil, err } return out, nil } -// PushMessagerServer is the server API for PushMessager service. -// All implementations must embed UnimplementedPushMessagerServer +// PushMessageServiceServer is the server API for PushMessageService service. +// All implementations must embed UnimplementedPushMessageServiceServer // for forward compatibility -type PushMessagerServer interface { +type PushMessageServiceServer interface { PushMessage(context.Context, *PushMessageReq) (*response.BaseResponse, error) - mustEmbedUnimplementedPushMessagerServer() + mustEmbedUnimplementedPushMessageServiceServer() } -// UnimplementedPushMessagerServer must be embedded to have forward compatible implementations. -type UnimplementedPushMessagerServer struct { +// UnimplementedPushMessageServiceServer must be embedded to have forward compatible implementations. +type UnimplementedPushMessageServiceServer struct { } -func (UnimplementedPushMessagerServer) PushMessage(context.Context, *PushMessageReq) (*response.BaseResponse, error) { +func (UnimplementedPushMessageServiceServer) PushMessage(context.Context, *PushMessageReq) (*response.BaseResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method PushMessage not implemented") } -func (UnimplementedPushMessagerServer) mustEmbedUnimplementedPushMessagerServer() {} +func (UnimplementedPushMessageServiceServer) mustEmbedUnimplementedPushMessageServiceServer() {} -// UnsafePushMessagerServer may be embedded to opt out of forward compatibility for this service. -// Use of this interface is not recommended, as added methods to PushMessagerServer will +// UnsafePushMessageServiceServer may be embedded to opt out of forward compatibility for this service. +// Use of this interface is not recommended, as added methods to PushMessageServiceServer will // result in compilation errors. -type UnsafePushMessagerServer interface { - mustEmbedUnimplementedPushMessagerServer() +type UnsafePushMessageServiceServer interface { + mustEmbedUnimplementedPushMessageServiceServer() } -func RegisterPushMessagerServer(s grpc.ServiceRegistrar, srv PushMessagerServer) { - s.RegisterService(&PushMessager_ServiceDesc, srv) +func RegisterPushMessageServiceServer(s grpc.ServiceRegistrar, srv PushMessageServiceServer) { + s.RegisterService(&PushMessageService_ServiceDesc, srv) } -func _PushMessager_PushMessage_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { +func _PushMessageService_PushMessage_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(PushMessageReq) if err := dec(in); err != nil { return nil, err } if interceptor == nil { - return srv.(PushMessagerServer).PushMessage(ctx, in) + return srv.(PushMessageServiceServer).PushMessage(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/api.message.v1.PushMessager/PushMessage", + FullMethod: "/api.message.v1.PushMessageService/PushMessage", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(PushMessagerServer).PushMessage(ctx, req.(*PushMessageReq)) + return srv.(PushMessageServiceServer).PushMessage(ctx, req.(*PushMessageReq)) } return interceptor(ctx, in, info, handler) } -// PushMessager_ServiceDesc is the grpc.ServiceDesc for PushMessager service. +// PushMessageService_ServiceDesc is the grpc.ServiceDesc for PushMessageService service. // It's only intended for direct use with grpc.RegisterService, // and not to be introspected or modified (even as a copy) -var PushMessager_ServiceDesc = grpc.ServiceDesc{ - ServiceName: "api.message.v1.PushMessager", - HandlerType: (*PushMessagerServer)(nil), +var PushMessageService_ServiceDesc = grpc.ServiceDesc{ + ServiceName: "api.message.v1.PushMessageService", + HandlerType: (*PushMessageServiceServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "PushMessage", - Handler: _PushMessager_PushMessage_Handler, + Handler: _PushMessageService_PushMessage_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "message/v1/message.proto", } -// OfflineMessageClient is the client API for OfflineMessage service. +// OfflineMessageServiceClient is the client API for OfflineMessageService 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 OfflineMessageClient interface { +type OfflineMessageServiceClient interface { QueryOfflineMessage(ctx context.Context, in *QueryOfflineMessageReq, opts ...grpc.CallOption) (*QueryOfflineMessageResp, error) } -type offlineMessageClient struct { +type offlineMessageServiceClient struct { cc grpc.ClientConnInterface } -func NewOfflineMessageClient(cc grpc.ClientConnInterface) OfflineMessageClient { - return &offlineMessageClient{cc} +func NewOfflineMessageServiceClient(cc grpc.ClientConnInterface) OfflineMessageServiceClient { + return &offlineMessageServiceClient{cc} } -func (c *offlineMessageClient) QueryOfflineMessage(ctx context.Context, in *QueryOfflineMessageReq, opts ...grpc.CallOption) (*QueryOfflineMessageResp, error) { +func (c *offlineMessageServiceClient) QueryOfflineMessage(ctx context.Context, in *QueryOfflineMessageReq, opts ...grpc.CallOption) (*QueryOfflineMessageResp, error) { out := new(QueryOfflineMessageResp) - err := c.cc.Invoke(ctx, "/api.message.v1.OfflineMessage/QueryOfflineMessage", in, out, opts...) + err := c.cc.Invoke(ctx, "/api.message.v1.OfflineMessageService/QueryOfflineMessage", in, out, opts...) if err != nil { return nil, err } return out, nil } -// OfflineMessageServer is the server API for OfflineMessage service. -// All implementations must embed UnimplementedOfflineMessageServer +// OfflineMessageServiceServer is the server API for OfflineMessageService service. +// All implementations must embed UnimplementedOfflineMessageServiceServer // for forward compatibility -type OfflineMessageServer interface { +type OfflineMessageServiceServer interface { QueryOfflineMessage(context.Context, *QueryOfflineMessageReq) (*QueryOfflineMessageResp, error) - mustEmbedUnimplementedOfflineMessageServer() + mustEmbedUnimplementedOfflineMessageServiceServer() } -// UnimplementedOfflineMessageServer must be embedded to have forward compatible implementations. -type UnimplementedOfflineMessageServer struct { +// UnimplementedOfflineMessageServiceServer must be embedded to have forward compatible implementations. +type UnimplementedOfflineMessageServiceServer struct { } -func (UnimplementedOfflineMessageServer) QueryOfflineMessage(context.Context, *QueryOfflineMessageReq) (*QueryOfflineMessageResp, error) { +func (UnimplementedOfflineMessageServiceServer) QueryOfflineMessage(context.Context, *QueryOfflineMessageReq) (*QueryOfflineMessageResp, error) { return nil, status.Errorf(codes.Unimplemented, "method QueryOfflineMessage not implemented") } -func (UnimplementedOfflineMessageServer) mustEmbedUnimplementedOfflineMessageServer() {} +func (UnimplementedOfflineMessageServiceServer) mustEmbedUnimplementedOfflineMessageServiceServer() {} -// UnsafeOfflineMessageServer may be embedded to opt out of forward compatibility for this service. -// Use of this interface is not recommended, as added methods to OfflineMessageServer will +// UnsafeOfflineMessageServiceServer may be embedded to opt out of forward compatibility for this service. +// Use of this interface is not recommended, as added methods to OfflineMessageServiceServer will // result in compilation errors. -type UnsafeOfflineMessageServer interface { - mustEmbedUnimplementedOfflineMessageServer() +type UnsafeOfflineMessageServiceServer interface { + mustEmbedUnimplementedOfflineMessageServiceServer() } -func RegisterOfflineMessageServer(s grpc.ServiceRegistrar, srv OfflineMessageServer) { - s.RegisterService(&OfflineMessage_ServiceDesc, srv) +func RegisterOfflineMessageServiceServer(s grpc.ServiceRegistrar, srv OfflineMessageServiceServer) { + s.RegisterService(&OfflineMessageService_ServiceDesc, srv) } -func _OfflineMessage_QueryOfflineMessage_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { +func _OfflineMessageService_QueryOfflineMessage_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(QueryOfflineMessageReq) if err := dec(in); err != nil { return nil, err } if interceptor == nil { - return srv.(OfflineMessageServer).QueryOfflineMessage(ctx, in) + return srv.(OfflineMessageServiceServer).QueryOfflineMessage(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/api.message.v1.OfflineMessage/QueryOfflineMessage", + FullMethod: "/api.message.v1.OfflineMessageService/QueryOfflineMessage", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(OfflineMessageServer).QueryOfflineMessage(ctx, req.(*QueryOfflineMessageReq)) + return srv.(OfflineMessageServiceServer).QueryOfflineMessage(ctx, req.(*QueryOfflineMessageReq)) } return interceptor(ctx, in, info, handler) } -// OfflineMessage_ServiceDesc is the grpc.ServiceDesc for OfflineMessage service. +// OfflineMessageService_ServiceDesc is the grpc.ServiceDesc for OfflineMessageService service. // It's only intended for direct use with grpc.RegisterService, // and not to be introspected or modified (even as a copy) -var OfflineMessage_ServiceDesc = grpc.ServiceDesc{ - ServiceName: "api.message.v1.OfflineMessage", - HandlerType: (*OfflineMessageServer)(nil), +var OfflineMessageService_ServiceDesc = grpc.ServiceDesc{ + ServiceName: "api.message.v1.OfflineMessageService", + HandlerType: (*OfflineMessageServiceServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "QueryOfflineMessage", - Handler: _OfflineMessage_QueryOfflineMessage_Handler, + Handler: _OfflineMessageService_QueryOfflineMessage_Handler, }, }, Streams: []grpc.StreamDesc{}, diff --git a/transport/response/response.pb.go b/transport/response/response.pb.go index 6ccc4c5..a21b093 100644 --- a/transport/response/response.pb.go +++ b/transport/response/response.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.28.0 +// protoc-gen-go v1.26.0 // protoc (unknown) // source: transport/response/response.proto diff --git a/user/friend/v1/friend.pb.go b/user/friend/v1/friend.pb.go index bb0fe19..bb82283 100644 --- a/user/friend/v1/friend.pb.go +++ b/user/friend/v1/friend.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.28.0 +// protoc-gen-go v1.26.0 // protoc (unknown) // source: user/friend/v1/friend.proto @@ -1154,7 +1154,7 @@ func (x *CheckSendMessageAbilityRequest) GetSessionType() v1.SessionType { if x != nil { return x.SessionType } - return v1.SessionType(0) + return v1.SessionType_SingleChat } type CheckSendMessageAbilityResponse struct { diff --git a/user/group/v1/group.pb.go b/user/group/v1/group.pb.go index 489724e..f332102 100644 --- a/user/group/v1/group.pb.go +++ b/user/group/v1/group.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.28.0 +// protoc-gen-go v1.26.0 // protoc (unknown) // source: user/group/v1/group.proto diff --git a/user/session/v1/session.pb.go b/user/session/v1/session.pb.go index 03277ed..ef1564a 100644 --- a/user/session/v1/session.pb.go +++ b/user/session/v1/session.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.28.0 +// protoc-gen-go v1.26.0 // protoc (unknown) // source: user/session/v1/session.proto @@ -26,6 +26,8 @@ type SessionType int32 const ( SessionType_SingleChat SessionType = 0 SessionType_GroupChat SessionType = 1 + // broadcast actually not a standard chat type, but we still use it here + SessionType_Broadcast SessionType = 2 ) // Enum value maps for SessionType. @@ -33,10 +35,12 @@ var ( SessionType_name = map[int32]string{ 0: "SingleChat", 1: "GroupChat", + 2: "Broadcast", } SessionType_value = map[string]int32{ "SingleChat": 0, "GroupChat": 1, + "Broadcast": 2, } ) @@ -73,13 +77,14 @@ var file_user_session_v1_session_proto_rawDesc = []byte{ 0x0a, 0x1d, 0x75, 0x73, 0x65, 0x72, 0x2f, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x2f, 0x76, 0x31, 0x2f, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x13, 0x61, 0x70, 0x69, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, - 0x6e, 0x2e, 0x76, 0x31, 0x2a, 0x2c, 0x0a, 0x0b, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x54, + 0x6e, 0x2e, 0x76, 0x31, 0x2a, 0x3b, 0x0a, 0x0b, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x12, 0x0e, 0x0a, 0x0a, 0x53, 0x69, 0x6e, 0x67, 0x6c, 0x65, 0x43, 0x68, 0x61, 0x74, 0x10, 0x00, 0x12, 0x0d, 0x0a, 0x09, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x43, 0x68, 0x61, 0x74, - 0x10, 0x01, 0x42, 0x28, 0x5a, 0x26, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, - 0x2f, 0x67, 0x6f, 0x2d, 0x67, 0x6f, 0x69, 0x6d, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x75, 0x73, 0x65, - 0x72, 0x2f, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x2f, 0x76, 0x31, 0x62, 0x06, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x33, + 0x10, 0x01, 0x12, 0x0d, 0x0a, 0x09, 0x42, 0x72, 0x6f, 0x61, 0x64, 0x63, 0x61, 0x73, 0x74, 0x10, + 0x02, 0x42, 0x28, 0x5a, 0x26, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, + 0x67, 0x6f, 0x2d, 0x67, 0x6f, 0x69, 0x6d, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x75, 0x73, 0x65, 0x72, + 0x2f, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x2f, 0x76, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x33, } var ( diff --git a/user/session/v1/session.proto b/user/session/v1/session.proto index de4caa9..7edf6a0 100644 --- a/user/session/v1/session.proto +++ b/user/session/v1/session.proto @@ -8,6 +8,8 @@ option go_package = "github.com/go-goim/api/user/session/v1"; enum SessionType { SingleChat = 0; GroupChat = 1; + // broadcast actually not a standard chat type, but we still use it here + Broadcast = 2; } // more session message type diff --git a/user/v1/user.pb.go b/user/v1/user.pb.go index 7cc34a0..8f6d03b 100644 --- a/user/v1/user.pb.go +++ b/user/v1/user.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.28.0 +// protoc-gen-go v1.26.0 // protoc (unknown) // source: user/v1/user.proto From 7223e69d05a9da57409e268eb981cd331a2a19c2 Mon Sep 17 00:00:00 2001 From: yusank Date: Mon, 11 Jul 2022 10:21:34 +0800 Subject: [PATCH 15/35] fix: remove session validate --- message/v1/message.pb.go | 230 +++++++++++++++--------------- message/v1/message.pb.validate.go | 11 +- message/v1/message.proto | 2 +- 3 files changed, 117 insertions(+), 126 deletions(-) diff --git a/message/v1/message.pb.go b/message/v1/message.pb.go index beca851..552010b 100644 --- a/message/v1/message.pb.go +++ b/message/v1/message.pb.go @@ -651,129 +651,129 @@ var file_message_v1_message_proto_rawDesc = []byte{ 0x73, 0x65, 0x72, 0x2f, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x2f, 0x76, 0x31, 0x2f, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x17, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2e, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x9e, 0x02, 0x0a, 0x0e, 0x53, 0x65, 0x6e, 0x64, 0x4d, 0x65, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x94, 0x02, 0x0a, 0x0e, 0x53, 0x65, 0x6e, 0x64, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x52, 0x65, 0x71, 0x12, 0x24, 0x0a, 0x09, 0x66, 0x72, 0x6f, 0x6d, 0x5f, 0x75, 0x73, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10, 0x14, 0x52, 0x08, 0x66, 0x72, 0x6f, 0x6d, 0x55, 0x73, 0x65, 0x72, 0x12, 0x20, 0x0a, 0x07, 0x74, 0x6f, 0x5f, 0x75, 0x73, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10, 0x14, 0x52, 0x06, 0x74, 0x6f, 0x55, 0x73, 0x65, 0x72, - 0x12, 0x4d, 0x0a, 0x0c, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x79, 0x70, 0x65, + 0x12, 0x43, 0x0a, 0x0c, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x20, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x65, 0x73, - 0x73, 0x69, 0x6f, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x82, 0x01, 0x02, - 0x10, 0x01, 0x52, 0x0b, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x12, - 0x4f, 0x0a, 0x0c, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, - 0x04, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x22, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x6d, 0x65, 0x73, 0x73, - 0x61, 0x67, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x43, 0x6f, - 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x54, 0x79, 0x70, 0x65, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x82, 0x01, - 0x02, 0x10, 0x01, 0x52, 0x0b, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x54, 0x79, 0x70, 0x65, - 0x12, 0x24, 0x0a, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, - 0x09, 0x42, 0x0a, 0xfa, 0x42, 0x07, 0x72, 0x05, 0x10, 0x01, 0x18, 0x80, 0x20, 0x52, 0x07, 0x63, - 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x22, 0x8b, 0x01, 0x0a, 0x0f, 0x53, 0x65, 0x6e, 0x64, 0x4d, - 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x52, 0x65, 0x73, 0x70, 0x12, 0x40, 0x0a, 0x08, 0x72, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x61, - 0x70, 0x69, 0x2e, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x2e, 0x72, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x42, 0x61, 0x73, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x52, 0x08, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1d, 0x0a, 0x0a, - 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, - 0x52, 0x09, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x12, 0x17, 0x0a, 0x07, 0x6d, - 0x73, 0x67, 0x5f, 0x73, 0x65, 0x71, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x6d, 0x73, - 0x67, 0x53, 0x65, 0x71, 0x22, 0x86, 0x02, 0x0a, 0x09, 0x4d, 0x71, 0x4d, 0x65, 0x73, 0x73, 0x61, - 0x67, 0x65, 0x12, 0x1b, 0x0a, 0x09, 0x66, 0x72, 0x6f, 0x6d, 0x5f, 0x75, 0x73, 0x65, 0x72, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x66, 0x72, 0x6f, 0x6d, 0x55, 0x73, 0x65, 0x72, 0x12, - 0x17, 0x0a, 0x07, 0x74, 0x6f, 0x5f, 0x75, 0x73, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x06, 0x74, 0x6f, 0x55, 0x73, 0x65, 0x72, 0x12, 0x43, 0x0a, 0x0c, 0x73, 0x65, 0x73, 0x73, - 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x20, - 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, - 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x54, 0x79, 0x70, 0x65, - 0x52, 0x0b, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x12, 0x45, 0x0a, - 0x0c, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x04, 0x20, - 0x01, 0x28, 0x0e, 0x32, 0x22, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, - 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x43, 0x6f, 0x6e, 0x74, - 0x65, 0x6e, 0x74, 0x54, 0x79, 0x70, 0x65, 0x52, 0x0b, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, - 0x54, 0x79, 0x70, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x18, - 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x12, 0x1d, - 0x0a, 0x0a, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x06, 0x20, 0x01, - 0x28, 0x03, 0x52, 0x09, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x22, 0xd1, 0x02, - 0x0a, 0x0e, 0x50, 0x75, 0x73, 0x68, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x52, 0x65, 0x71, - 0x12, 0x1b, 0x0a, 0x09, 0x66, 0x72, 0x6f, 0x6d, 0x5f, 0x75, 0x73, 0x65, 0x72, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x08, 0x66, 0x72, 0x6f, 0x6d, 0x55, 0x73, 0x65, 0x72, 0x12, 0x17, 0x0a, - 0x07, 0x74, 0x6f, 0x5f, 0x75, 0x73, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, - 0x74, 0x6f, 0x55, 0x73, 0x65, 0x72, 0x12, 0x1e, 0x0a, 0x08, 0x74, 0x6f, 0x5f, 0x67, 0x72, 0x6f, - 0x75, 0x70, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x07, 0x74, 0x6f, 0x47, 0x72, - 0x6f, 0x75, 0x70, 0x88, 0x01, 0x01, 0x12, 0x43, 0x0a, 0x0c, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, - 0x6e, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x20, 0x2e, 0x61, - 0x70, 0x69, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x2e, - 0x76, 0x31, 0x2e, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x52, 0x0b, - 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x12, 0x45, 0x0a, 0x0c, 0x63, - 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, - 0x0e, 0x32, 0x22, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x2e, - 0x76, 0x31, 0x2e, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x6e, - 0x74, 0x54, 0x79, 0x70, 0x65, 0x52, 0x0b, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x54, 0x79, - 0x70, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x18, 0x06, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x12, 0x17, 0x0a, 0x07, - 0x6d, 0x73, 0x67, 0x5f, 0x73, 0x65, 0x71, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x6d, - 0x73, 0x67, 0x53, 0x65, 0x71, 0x12, 0x1d, 0x0a, 0x0a, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, - 0x5f, 0x69, 0x64, 0x18, 0x08, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x73, 0x65, 0x73, 0x73, 0x69, - 0x6f, 0x6e, 0x49, 0x64, 0x42, 0x0b, 0x0a, 0x09, 0x5f, 0x74, 0x6f, 0x5f, 0x67, 0x72, 0x6f, 0x75, - 0x70, 0x22, 0xdd, 0x01, 0x0a, 0x0c, 0x42, 0x72, 0x69, 0x65, 0x66, 0x4d, 0x65, 0x73, 0x73, 0x61, - 0x67, 0x65, 0x12, 0x1b, 0x0a, 0x09, 0x66, 0x72, 0x6f, 0x6d, 0x5f, 0x75, 0x73, 0x65, 0x72, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x66, 0x72, 0x6f, 0x6d, 0x55, 0x73, 0x65, 0x72, 0x12, - 0x17, 0x0a, 0x07, 0x74, 0x6f, 0x5f, 0x75, 0x73, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x06, 0x74, 0x6f, 0x55, 0x73, 0x65, 0x72, 0x12, 0x45, 0x0a, 0x0c, 0x63, 0x6f, 0x6e, 0x74, - 0x65, 0x6e, 0x74, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x22, - 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x31, 0x2e, - 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x54, 0x79, - 0x70, 0x65, 0x52, 0x0b, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x54, 0x79, 0x70, 0x65, 0x12, - 0x18, 0x0a, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x12, 0x17, 0x0a, 0x07, 0x6d, 0x73, 0x67, - 0x5f, 0x73, 0x65, 0x71, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x6d, 0x73, 0x67, 0x53, - 0x65, 0x71, 0x12, 0x1d, 0x0a, 0x0a, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, - 0x18, 0x06, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x49, - 0x64, 0x22, 0xbf, 0x01, 0x0a, 0x16, 0x51, 0x75, 0x65, 0x72, 0x79, 0x4f, 0x66, 0x66, 0x6c, 0x69, - 0x6e, 0x65, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x52, 0x65, 0x71, 0x12, 0x20, 0x0a, 0x07, - 0x75, 0x73, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, - 0x42, 0x04, 0x72, 0x02, 0x10, 0x14, 0x52, 0x06, 0x75, 0x73, 0x65, 0x72, 0x49, 0x64, 0x12, 0x29, - 0x0a, 0x0c, 0x6c, 0x61, 0x73, 0x74, 0x5f, 0x6d, 0x73, 0x67, 0x5f, 0x73, 0x65, 0x71, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10, 0x0a, 0x52, 0x0a, 0x6c, - 0x61, 0x73, 0x74, 0x4d, 0x73, 0x67, 0x53, 0x65, 0x71, 0x12, 0x1c, 0x0a, 0x09, 0x6f, 0x6e, 0x6c, - 0x79, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x09, 0x6f, 0x6e, - 0x6c, 0x79, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x70, 0x61, 0x67, 0x65, 0x18, - 0x04, 0x20, 0x01, 0x28, 0x05, 0x52, 0x04, 0x70, 0x61, 0x67, 0x65, 0x12, 0x26, 0x0a, 0x09, 0x70, - 0x61, 0x67, 0x65, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x05, 0x42, 0x09, - 0xfa, 0x42, 0x06, 0x1a, 0x04, 0x18, 0x64, 0x28, 0x01, 0x52, 0x08, 0x70, 0x61, 0x67, 0x65, 0x53, - 0x69, 0x7a, 0x65, 0x22, 0xab, 0x01, 0x0a, 0x17, 0x51, 0x75, 0x65, 0x72, 0x79, 0x4f, 0x66, 0x66, - 0x6c, 0x69, 0x6e, 0x65, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x52, 0x65, 0x73, 0x70, 0x12, - 0x40, 0x0a, 0x08, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x24, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, - 0x74, 0x2e, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x42, 0x61, 0x73, 0x65, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x52, 0x08, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x12, 0x14, 0x0a, 0x05, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, - 0x52, 0x05, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x12, 0x38, 0x0a, 0x08, 0x6d, 0x65, 0x73, 0x73, 0x61, - 0x67, 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x61, 0x70, 0x69, 0x2e, - 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x42, 0x72, 0x69, 0x65, 0x66, - 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x52, 0x08, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, - 0x73, 0x2a, 0x34, 0x0a, 0x12, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x43, 0x6f, 0x6e, 0x74, - 0x65, 0x6e, 0x74, 0x54, 0x79, 0x70, 0x65, 0x12, 0x08, 0x0a, 0x04, 0x54, 0x65, 0x78, 0x74, 0x10, - 0x00, 0x12, 0x09, 0x0a, 0x05, 0x49, 0x6d, 0x61, 0x67, 0x65, 0x10, 0x01, 0x12, 0x09, 0x0a, 0x05, - 0x56, 0x6f, 0x69, 0x63, 0x65, 0x10, 0x02, 0x32, 0x69, 0x0a, 0x12, 0x50, 0x75, 0x73, 0x68, 0x4d, - 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x53, 0x0a, - 0x0b, 0x50, 0x75, 0x73, 0x68, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x1e, 0x2e, 0x61, - 0x70, 0x69, 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x75, - 0x73, 0x68, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x52, 0x65, 0x71, 0x1a, 0x24, 0x2e, 0x61, - 0x70, 0x69, 0x2e, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x2e, 0x72, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x42, 0x61, 0x73, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x32, 0x7f, 0x0a, 0x15, 0x4f, 0x66, 0x66, 0x6c, 0x69, 0x6e, 0x65, 0x4d, 0x65, 0x73, - 0x73, 0x61, 0x67, 0x65, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x66, 0x0a, 0x13, 0x51, - 0x75, 0x65, 0x72, 0x79, 0x4f, 0x66, 0x66, 0x6c, 0x69, 0x6e, 0x65, 0x4d, 0x65, 0x73, 0x73, 0x61, - 0x67, 0x65, 0x12, 0x26, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, - 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x4f, 0x66, 0x66, 0x6c, 0x69, 0x6e, 0x65, - 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x52, 0x65, 0x71, 0x1a, 0x27, 0x2e, 0x61, 0x70, 0x69, - 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, + 0x73, 0x69, 0x6f, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x52, 0x0b, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, + 0x6e, 0x54, 0x79, 0x70, 0x65, 0x12, 0x4f, 0x0a, 0x0c, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, + 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x22, 0x2e, 0x61, 0x70, + 0x69, 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x65, 0x73, + 0x73, 0x61, 0x67, 0x65, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x54, 0x79, 0x70, 0x65, 0x42, + 0x08, 0xfa, 0x42, 0x05, 0x82, 0x01, 0x02, 0x10, 0x01, 0x52, 0x0b, 0x63, 0x6f, 0x6e, 0x74, 0x65, + 0x6e, 0x74, 0x54, 0x79, 0x70, 0x65, 0x12, 0x24, 0x0a, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, + 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x42, 0x0a, 0xfa, 0x42, 0x07, 0x72, 0x05, 0x10, 0x01, + 0x18, 0x80, 0x20, 0x52, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x22, 0x8b, 0x01, 0x0a, + 0x0f, 0x53, 0x65, 0x6e, 0x64, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x52, 0x65, 0x73, 0x70, + 0x12, 0x40, 0x0a, 0x08, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, + 0x72, 0x74, 0x2e, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x42, 0x61, 0x73, 0x65, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x52, 0x08, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x49, + 0x64, 0x12, 0x17, 0x0a, 0x07, 0x6d, 0x73, 0x67, 0x5f, 0x73, 0x65, 0x71, 0x18, 0x03, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x06, 0x6d, 0x73, 0x67, 0x53, 0x65, 0x71, 0x22, 0x86, 0x02, 0x0a, 0x09, 0x4d, + 0x71, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x1b, 0x0a, 0x09, 0x66, 0x72, 0x6f, 0x6d, + 0x5f, 0x75, 0x73, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x66, 0x72, 0x6f, + 0x6d, 0x55, 0x73, 0x65, 0x72, 0x12, 0x17, 0x0a, 0x07, 0x74, 0x6f, 0x5f, 0x75, 0x73, 0x65, 0x72, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x74, 0x6f, 0x55, 0x73, 0x65, 0x72, 0x12, 0x43, + 0x0a, 0x0c, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x03, + 0x20, 0x01, 0x28, 0x0e, 0x32, 0x20, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, + 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x65, 0x73, 0x73, 0x69, + 0x6f, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x52, 0x0b, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x54, + 0x79, 0x70, 0x65, 0x12, 0x45, 0x0a, 0x0c, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x5f, 0x74, + 0x79, 0x70, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x22, 0x2e, 0x61, 0x70, 0x69, 0x2e, + 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x65, 0x73, 0x73, 0x61, + 0x67, 0x65, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x54, 0x79, 0x70, 0x65, 0x52, 0x0b, 0x63, + 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x54, 0x79, 0x70, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x63, 0x6f, + 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x63, 0x6f, 0x6e, + 0x74, 0x65, 0x6e, 0x74, 0x12, 0x1d, 0x0a, 0x0a, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x5f, + 0x69, 0x64, 0x18, 0x06, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, + 0x6e, 0x49, 0x64, 0x22, 0xd1, 0x02, 0x0a, 0x0e, 0x50, 0x75, 0x73, 0x68, 0x4d, 0x65, 0x73, 0x73, + 0x61, 0x67, 0x65, 0x52, 0x65, 0x71, 0x12, 0x1b, 0x0a, 0x09, 0x66, 0x72, 0x6f, 0x6d, 0x5f, 0x75, + 0x73, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x66, 0x72, 0x6f, 0x6d, 0x55, + 0x73, 0x65, 0x72, 0x12, 0x17, 0x0a, 0x07, 0x74, 0x6f, 0x5f, 0x75, 0x73, 0x65, 0x72, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x74, 0x6f, 0x55, 0x73, 0x65, 0x72, 0x12, 0x1e, 0x0a, 0x08, + 0x74, 0x6f, 0x5f, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, + 0x52, 0x07, 0x74, 0x6f, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x88, 0x01, 0x01, 0x12, 0x43, 0x0a, 0x0c, + 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x04, 0x20, 0x01, + 0x28, 0x0e, 0x32, 0x20, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x73, 0x65, + 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, + 0x54, 0x79, 0x70, 0x65, 0x52, 0x0b, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x54, 0x79, 0x70, + 0x65, 0x12, 0x45, 0x0a, 0x0c, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x5f, 0x74, 0x79, 0x70, + 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x22, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x6d, 0x65, + 0x73, 0x73, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, + 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x54, 0x79, 0x70, 0x65, 0x52, 0x0b, 0x63, 0x6f, 0x6e, + 0x74, 0x65, 0x6e, 0x74, 0x54, 0x79, 0x70, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x63, 0x6f, 0x6e, 0x74, + 0x65, 0x6e, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, + 0x6e, 0x74, 0x12, 0x17, 0x0a, 0x07, 0x6d, 0x73, 0x67, 0x5f, 0x73, 0x65, 0x71, 0x18, 0x07, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x06, 0x6d, 0x73, 0x67, 0x53, 0x65, 0x71, 0x12, 0x1d, 0x0a, 0x0a, 0x73, + 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x08, 0x20, 0x01, 0x28, 0x03, 0x52, + 0x09, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x42, 0x0b, 0x0a, 0x09, 0x5f, 0x74, + 0x6f, 0x5f, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x22, 0xdd, 0x01, 0x0a, 0x0c, 0x42, 0x72, 0x69, 0x65, + 0x66, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x1b, 0x0a, 0x09, 0x66, 0x72, 0x6f, 0x6d, + 0x5f, 0x75, 0x73, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x66, 0x72, 0x6f, + 0x6d, 0x55, 0x73, 0x65, 0x72, 0x12, 0x17, 0x0a, 0x07, 0x74, 0x6f, 0x5f, 0x75, 0x73, 0x65, 0x72, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x74, 0x6f, 0x55, 0x73, 0x65, 0x72, 0x12, 0x45, + 0x0a, 0x0c, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x03, + 0x20, 0x01, 0x28, 0x0e, 0x32, 0x22, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, + 0x67, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x43, 0x6f, 0x6e, + 0x74, 0x65, 0x6e, 0x74, 0x54, 0x79, 0x70, 0x65, 0x52, 0x0b, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, + 0x74, 0x54, 0x79, 0x70, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, + 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x12, + 0x17, 0x0a, 0x07, 0x6d, 0x73, 0x67, 0x5f, 0x73, 0x65, 0x71, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x06, 0x6d, 0x73, 0x67, 0x53, 0x65, 0x71, 0x12, 0x1d, 0x0a, 0x0a, 0x73, 0x65, 0x73, 0x73, + 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x06, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x73, 0x65, + 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x22, 0xbf, 0x01, 0x0a, 0x16, 0x51, 0x75, 0x65, 0x72, 0x79, 0x4f, 0x66, 0x66, 0x6c, 0x69, 0x6e, 0x65, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x52, - 0x65, 0x73, 0x70, 0x42, 0x23, 0x5a, 0x21, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, - 0x6d, 0x2f, 0x67, 0x6f, 0x2d, 0x67, 0x6f, 0x69, 0x6d, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x6d, 0x65, - 0x73, 0x73, 0x61, 0x67, 0x65, 0x2f, 0x76, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x65, 0x71, 0x12, 0x20, 0x0a, 0x07, 0x75, 0x73, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10, 0x14, 0x52, 0x06, 0x75, 0x73, + 0x65, 0x72, 0x49, 0x64, 0x12, 0x29, 0x0a, 0x0c, 0x6c, 0x61, 0x73, 0x74, 0x5f, 0x6d, 0x73, 0x67, + 0x5f, 0x73, 0x65, 0x71, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, + 0x02, 0x10, 0x0a, 0x52, 0x0a, 0x6c, 0x61, 0x73, 0x74, 0x4d, 0x73, 0x67, 0x53, 0x65, 0x71, 0x12, + 0x1c, 0x0a, 0x09, 0x6f, 0x6e, 0x6c, 0x79, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, + 0x28, 0x08, 0x52, 0x09, 0x6f, 0x6e, 0x6c, 0x79, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x12, 0x0a, + 0x04, 0x70, 0x61, 0x67, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x05, 0x52, 0x04, 0x70, 0x61, 0x67, + 0x65, 0x12, 0x26, 0x0a, 0x09, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x05, + 0x20, 0x01, 0x28, 0x05, 0x42, 0x09, 0xfa, 0x42, 0x06, 0x1a, 0x04, 0x18, 0x64, 0x28, 0x01, 0x52, + 0x08, 0x70, 0x61, 0x67, 0x65, 0x53, 0x69, 0x7a, 0x65, 0x22, 0xab, 0x01, 0x0a, 0x17, 0x51, 0x75, + 0x65, 0x72, 0x79, 0x4f, 0x66, 0x66, 0x6c, 0x69, 0x6e, 0x65, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, + 0x65, 0x52, 0x65, 0x73, 0x70, 0x12, 0x40, 0x0a, 0x08, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x74, 0x72, + 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x2e, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x2e, 0x42, 0x61, 0x73, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x52, 0x08, 0x72, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x74, 0x6f, 0x74, 0x61, 0x6c, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x12, 0x38, 0x0a, + 0x08, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, + 0x1c, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x31, + 0x2e, 0x42, 0x72, 0x69, 0x65, 0x66, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x52, 0x08, 0x6d, + 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x2a, 0x34, 0x0a, 0x12, 0x4d, 0x65, 0x73, 0x73, 0x61, + 0x67, 0x65, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x54, 0x79, 0x70, 0x65, 0x12, 0x08, 0x0a, + 0x04, 0x54, 0x65, 0x78, 0x74, 0x10, 0x00, 0x12, 0x09, 0x0a, 0x05, 0x49, 0x6d, 0x61, 0x67, 0x65, + 0x10, 0x01, 0x12, 0x09, 0x0a, 0x05, 0x56, 0x6f, 0x69, 0x63, 0x65, 0x10, 0x02, 0x32, 0x69, 0x0a, + 0x12, 0x50, 0x75, 0x73, 0x68, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x53, 0x65, 0x72, 0x76, + 0x69, 0x63, 0x65, 0x12, 0x53, 0x0a, 0x0b, 0x50, 0x75, 0x73, 0x68, 0x4d, 0x65, 0x73, 0x73, 0x61, + 0x67, 0x65, 0x12, 0x1e, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, + 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x75, 0x73, 0x68, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x52, + 0x65, 0x71, 0x1a, 0x24, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, + 0x72, 0x74, 0x2e, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x42, 0x61, 0x73, 0x65, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x32, 0x7f, 0x0a, 0x15, 0x4f, 0x66, 0x66, 0x6c, + 0x69, 0x6e, 0x65, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, + 0x65, 0x12, 0x66, 0x0a, 0x13, 0x51, 0x75, 0x65, 0x72, 0x79, 0x4f, 0x66, 0x66, 0x6c, 0x69, 0x6e, + 0x65, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x26, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x6d, + 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x4f, + 0x66, 0x66, 0x6c, 0x69, 0x6e, 0x65, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x52, 0x65, 0x71, + 0x1a, 0x27, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x2e, 0x76, + 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x4f, 0x66, 0x66, 0x6c, 0x69, 0x6e, 0x65, 0x4d, 0x65, + 0x73, 0x73, 0x61, 0x67, 0x65, 0x52, 0x65, 0x73, 0x70, 0x42, 0x23, 0x5a, 0x21, 0x67, 0x69, 0x74, + 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x67, 0x6f, 0x2d, 0x67, 0x6f, 0x69, 0x6d, 0x2f, + 0x61, 0x70, 0x69, 0x2f, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x2f, 0x76, 0x31, 0x62, 0x06, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/message/v1/message.pb.validate.go b/message/v1/message.pb.validate.go index 0498de1..c50a329 100644 --- a/message/v1/message.pb.validate.go +++ b/message/v1/message.pb.validate.go @@ -79,16 +79,7 @@ func (m *SendMessageReq) validate(all bool) error { errors = append(errors, err) } - if _, ok := v1.SessionType_name[int32(m.GetSessionType())]; !ok { - err := SendMessageReqValidationError{ - field: "SessionType", - reason: "value must be one of the defined enum values", - } - if !all { - return err - } - errors = append(errors, err) - } + // no validation rules for SessionType if _, ok := MessageContentType_name[int32(m.GetContentType())]; !ok { err := SendMessageReqValidationError{ diff --git a/message/v1/message.proto b/message/v1/message.proto index bc25574..16d6e0c 100644 --- a/message/v1/message.proto +++ b/message/v1/message.proto @@ -18,7 +18,7 @@ enum MessageContentType { message SendMessageReq { string from_user = 1 [(validate.rules).string.min_len = 20]; string to_user = 2 [(validate.rules).string.min_len = 20]; - user.session.v1.SessionType session_type = 3 [(validate.rules).enum.defined_only = true]; + user.session.v1.SessionType session_type = 3; MessageContentType content_type = 4 [(validate.rules).enum.defined_only = true]; string content = 5 [(validate.rules).string = { min_len: 1, From 7f3e752b64067de36922e2716ee29258b58c6789 Mon Sep 17 00:00:00 2001 From: yusank Date: Mon, 11 Jul 2022 18:19:12 +0800 Subject: [PATCH 16/35] fix: fix message definition --- config/v1/config.pb.go | 273 ++++++++++------ config/v1/config.pb.validate.go | 129 ++++++++ config/v1/config.proto | 18 +- message/v1/message.pb.go | 507 ++++++++++++------------------ message/v1/message.pb.validate.go | 249 ++++++++------- message/v1/message.proto | 62 ++-- message/v1/message_grpc.pb.go | 11 +- 7 files changed, 681 insertions(+), 568 deletions(-) diff --git a/config/v1/config.pb.go b/config/v1/config.pb.go index f95bbde..f52f3a5 100644 --- a/config/v1/config.pb.go +++ b/config/v1/config.pb.go @@ -162,13 +162,14 @@ type Service struct { Redis *Redis `protobuf:"bytes,7,opt,name=redis,proto3" json:"redis,omitempty"` Mq *MQ `protobuf:"bytes,8,opt,name=mq,proto3" json:"mq,omitempty"` Mysql *MySQL `protobuf:"bytes,9,opt,name=mysql,proto3" json:"mysql,omitempty"` + Hbase *HBase `protobuf:"bytes,10,opt,name=hbase,proto3" json:"hbase,omitempty"` // services name - GatewayService string `protobuf:"bytes,10,opt,name=gatewayService,proto3" json:"gatewayService,omitempty"` - UserService string `protobuf:"bytes,11,opt,name=userService,proto3" json:"userService,omitempty"` - PushService string `protobuf:"bytes,12,opt,name=pushService,proto3" json:"pushService,omitempty"` - StoreWorker string `protobuf:"bytes,13,opt,name=storeWorker,proto3" json:"storeWorker,omitempty"` - MsgService string `protobuf:"bytes,14,opt,name=msgService,proto3" json:"msgService,omitempty"` - MsgWorker string `protobuf:"bytes,15,opt,name=msgWorker,proto3" json:"msgWorker,omitempty"` + GatewayService string `protobuf:"bytes,11,opt,name=gatewayService,proto3" json:"gatewayService,omitempty"` + UserService string `protobuf:"bytes,12,opt,name=userService,proto3" json:"userService,omitempty"` + PushService string `protobuf:"bytes,13,opt,name=pushService,proto3" json:"pushService,omitempty"` + StoreWorker string `protobuf:"bytes,14,opt,name=storeWorker,proto3" json:"storeWorker,omitempty"` + MsgService string `protobuf:"bytes,15,opt,name=msgService,proto3" json:"msgService,omitempty"` + MsgWorker string `protobuf:"bytes,16,opt,name=msgWorker,proto3" json:"msgWorker,omitempty"` } func (x *Service) Reset() { @@ -266,6 +267,13 @@ func (x *Service) GetMysql() *MySQL { return nil } +func (x *Service) GetHbase() *HBase { + if x != nil { + return x.Hbase + } + return nil +} + func (x *Service) GetGatewayService() string { if x != nil { return x.GatewayService @@ -620,6 +628,53 @@ func (x *MySQL) GetOpenTimeout() *durationpb.Duration { return nil } +type HBase struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Addr string `protobuf:"bytes,1,opt,name=addr,proto3" json:"addr,omitempty"` // add more +} + +func (x *HBase) Reset() { + *x = HBase{} + if protoimpl.UnsafeEnabled { + mi := &file_config_v1_config_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *HBase) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*HBase) ProtoMessage() {} + +func (x *HBase) ProtoReflect() protoreflect.Message { + mi := &file_config_v1_config_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 HBase.ProtoReflect.Descriptor instead. +func (*HBase) Descriptor() ([]byte, []int) { + return file_config_v1_config_proto_rawDescGZIP(), []int{6} +} + +func (x *HBase) GetAddr() string { + if x != nil { + return x.Addr + } + return "" +} + var File_config_v1_config_proto protoreflect.FileDescriptor var file_config_v1_config_proto_rawDesc = []byte{ @@ -639,7 +694,7 @@ var file_config_v1_config_proto_rawDesc = []byte{ 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, 0x42, 0x11, 0xfa, 0x42, 0x0e, 0xaa, 0x01, 0x0b, 0x22, 0x02, 0x08, 0x0a, 0x32, 0x05, 0x10, 0x80, 0xad, 0xe2, 0x04, 0x52, 0x07, 0x74, 0x69, - 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x22, 0xed, 0x05, 0x0a, 0x07, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, + 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x22, 0x99, 0x06, 0x0a, 0x07, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x48, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x34, 0xfa, 0x42, 0x31, 0x72, 0x2f, 0x32, 0x2d, 0x5e, 0x67, 0x6f, 0x69, 0x6d, 0x5c, 0x2e, 0x28, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x7c, 0x77, 0x6f, 0x72, 0x6b, 0x65, 0x72, 0x7c, 0x61, @@ -668,83 +723,87 @@ var file_config_v1_config_proto_rawDesc = []byte{ 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x51, 0x52, 0x02, 0x6d, 0x71, 0x12, 0x2a, 0x0a, 0x05, 0x6d, 0x79, 0x73, 0x71, 0x6c, 0x18, 0x09, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x79, - 0x53, 0x51, 0x4c, 0x52, 0x05, 0x6d, 0x79, 0x73, 0x71, 0x6c, 0x12, 0x26, 0x0a, 0x0e, 0x67, 0x61, - 0x74, 0x65, 0x77, 0x61, 0x79, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x18, 0x0a, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x0e, 0x67, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x53, 0x65, 0x72, 0x76, 0x69, - 0x63, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x75, 0x73, 0x65, 0x72, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, - 0x65, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x75, 0x73, 0x65, 0x72, 0x53, 0x65, 0x72, - 0x76, 0x69, 0x63, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x70, 0x75, 0x73, 0x68, 0x53, 0x65, 0x72, 0x76, - 0x69, 0x63, 0x65, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x70, 0x75, 0x73, 0x68, 0x53, - 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x57, - 0x6f, 0x72, 0x6b, 0x65, 0x72, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x73, 0x74, 0x6f, - 0x72, 0x65, 0x57, 0x6f, 0x72, 0x6b, 0x65, 0x72, 0x12, 0x1e, 0x0a, 0x0a, 0x6d, 0x73, 0x67, 0x53, - 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x6d, 0x73, - 0x67, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x6d, 0x73, 0x67, 0x57, - 0x6f, 0x72, 0x6b, 0x65, 0x72, 0x18, 0x0f, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6d, 0x73, 0x67, - 0x57, 0x6f, 0x72, 0x6b, 0x65, 0x72, 0x1a, 0x3b, 0x0a, 0x0d, 0x4d, 0x65, 0x74, 0x61, 0x64, 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, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x68, 0x74, 0x74, 0x70, 0x42, 0x07, 0x0a, 0x05, - 0x5f, 0x67, 0x72, 0x70, 0x63, 0x22, 0x8f, 0x01, 0x0a, 0x03, 0x4c, 0x6f, 0x67, 0x12, 0x1e, 0x0a, - 0x08, 0x6c, 0x6f, 0x67, 0x5f, 0x70, 0x61, 0x74, 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, - 0x00, 0x52, 0x07, 0x6c, 0x6f, 0x67, 0x50, 0x61, 0x74, 0x68, 0x88, 0x01, 0x01, 0x12, 0x34, 0x0a, - 0x05, 0x6c, 0x65, 0x76, 0x65, 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x14, 0x2e, 0x61, - 0x70, 0x69, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x65, 0x76, - 0x65, 0x6c, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x82, 0x01, 0x02, 0x10, 0x01, 0x52, 0x05, 0x6c, 0x65, - 0x76, 0x65, 0x6c, 0x12, 0x25, 0x0a, 0x0e, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x63, 0x6f, - 0x6e, 0x73, 0x6f, 0x6c, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0d, 0x65, 0x6e, 0x61, - 0x62, 0x6c, 0x65, 0x43, 0x6f, 0x6e, 0x73, 0x6f, 0x6c, 0x65, 0x42, 0x0b, 0x0a, 0x09, 0x5f, 0x6c, - 0x6f, 0x67, 0x5f, 0x70, 0x61, 0x74, 0x68, 0x22, 0x9c, 0x02, 0x0a, 0x05, 0x52, 0x65, 0x64, 0x69, - 0x73, 0x12, 0x12, 0x0a, 0x04, 0x61, 0x64, 0x64, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x04, 0x61, 0x64, 0x64, 0x72, 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, 0x12, 0x1b, 0x0a, 0x09, 0x6d, 0x61, 0x78, 0x5f, 0x63, 0x6f, 0x6e, 0x6e, 0x73, 0x18, 0x03, - 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x6d, 0x61, 0x78, 0x43, 0x6f, 0x6e, 0x6e, 0x73, 0x12, 0x24, - 0x0a, 0x0e, 0x6d, 0x69, 0x6e, 0x5f, 0x69, 0x64, 0x6c, 0x65, 0x5f, 0x63, 0x6f, 0x6e, 0x6e, 0x73, - 0x18, 0x04, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0c, 0x6d, 0x69, 0x6e, 0x49, 0x64, 0x6c, 0x65, 0x43, - 0x6f, 0x6e, 0x6e, 0x73, 0x12, 0x4f, 0x0a, 0x0c, 0x64, 0x69, 0x61, 0x6c, 0x5f, 0x74, 0x69, 0x6d, - 0x65, 0x6f, 0x75, 0x74, 0x18, 0x05, 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, 0x42, 0x11, 0xfa, 0x42, 0x0e, 0xaa, 0x01, 0x0b, 0x22, 0x02, 0x08, - 0x0a, 0x32, 0x05, 0x10, 0x80, 0xad, 0xe2, 0x04, 0x52, 0x0b, 0x64, 0x69, 0x61, 0x6c, 0x54, 0x69, - 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x12, 0x4f, 0x0a, 0x0c, 0x69, 0x64, 0x6c, 0x65, 0x5f, 0x74, 0x69, - 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x18, 0x06, 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, 0x42, 0x11, 0xfa, 0x42, 0x0e, 0xaa, 0x01, 0x0b, 0x22, 0x02, - 0x08, 0x0a, 0x32, 0x05, 0x10, 0x80, 0xad, 0xe2, 0x04, 0x52, 0x0b, 0x69, 0x64, 0x6c, 0x65, 0x54, - 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x22, 0x35, 0x0a, 0x02, 0x4d, 0x51, 0x12, 0x12, 0x0a, 0x04, - 0x61, 0x64, 0x64, 0x72, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x04, 0x61, 0x64, 0x64, 0x72, - 0x12, 0x1b, 0x0a, 0x09, 0x6d, 0x61, 0x78, 0x5f, 0x72, 0x65, 0x74, 0x72, 0x79, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x05, 0x52, 0x08, 0x6d, 0x61, 0x78, 0x52, 0x65, 0x74, 0x72, 0x79, 0x22, 0xc7, 0x02, - 0x0a, 0x05, 0x4d, 0x79, 0x53, 0x51, 0x4c, 0x12, 0x12, 0x0a, 0x04, 0x61, 0x64, 0x64, 0x72, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x61, 0x64, 0x64, 0x72, 0x12, 0x12, 0x0a, 0x04, 0x75, - 0x73, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x75, 0x73, 0x65, 0x72, 0x12, - 0x1a, 0x0a, 0x08, 0x70, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x08, 0x70, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x12, 0x0e, 0x0a, 0x02, 0x64, - 0x62, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x64, 0x62, 0x12, 0x24, 0x0a, 0x0e, 0x6d, - 0x61, 0x78, 0x5f, 0x69, 0x64, 0x6c, 0x65, 0x5f, 0x63, 0x6f, 0x6e, 0x6e, 0x73, 0x18, 0x05, 0x20, - 0x01, 0x28, 0x05, 0x52, 0x0c, 0x6d, 0x61, 0x78, 0x49, 0x64, 0x6c, 0x65, 0x43, 0x6f, 0x6e, 0x6e, - 0x73, 0x12, 0x24, 0x0a, 0x0e, 0x6d, 0x61, 0x78, 0x5f, 0x6f, 0x70, 0x65, 0x6e, 0x5f, 0x63, 0x6f, - 0x6e, 0x6e, 0x73, 0x18, 0x06, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0c, 0x6d, 0x61, 0x78, 0x4f, 0x70, - 0x65, 0x6e, 0x43, 0x6f, 0x6e, 0x6e, 0x73, 0x12, 0x4e, 0x0a, 0x0c, 0x69, 0x64, 0x6c, 0x65, 0x5f, - 0x74, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x18, 0x07, 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, 0x42, 0x10, 0xfa, 0x42, 0x0d, 0xaa, 0x01, 0x0a, - 0x22, 0x02, 0x08, 0x0a, 0x32, 0x04, 0x10, 0xc0, 0x84, 0x3d, 0x52, 0x0b, 0x69, 0x64, 0x6c, 0x65, - 0x54, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x12, 0x4e, 0x0a, 0x0c, 0x6f, 0x70, 0x65, 0x6e, 0x5f, - 0x74, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x18, 0x08, 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, 0x42, 0x10, 0xfa, 0x42, 0x0d, 0xaa, 0x01, 0x0a, - 0x22, 0x02, 0x08, 0x0a, 0x32, 0x04, 0x10, 0xc0, 0x84, 0x3d, 0x52, 0x0b, 0x6f, 0x70, 0x65, 0x6e, - 0x54, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x2a, 0x3f, 0x0a, 0x05, 0x4c, 0x65, 0x76, 0x65, 0x6c, - 0x12, 0x09, 0x0a, 0x05, 0x44, 0x45, 0x42, 0x55, 0x47, 0x10, 0x00, 0x12, 0x08, 0x0a, 0x04, 0x49, - 0x4e, 0x46, 0x4f, 0x10, 0x01, 0x12, 0x0b, 0x0a, 0x07, 0x57, 0x41, 0x52, 0x4e, 0x49, 0x4e, 0x47, - 0x10, 0x02, 0x12, 0x09, 0x0a, 0x05, 0x45, 0x52, 0x52, 0x4f, 0x52, 0x10, 0x03, 0x12, 0x09, 0x0a, - 0x05, 0x46, 0x41, 0x54, 0x41, 0x4c, 0x10, 0x04, 0x42, 0x22, 0x5a, 0x20, 0x67, 0x69, 0x74, 0x68, - 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x67, 0x6f, 0x2d, 0x67, 0x6f, 0x69, 0x6d, 0x2f, 0x61, - 0x70, 0x69, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x76, 0x31, 0x62, 0x06, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x33, + 0x53, 0x51, 0x4c, 0x52, 0x05, 0x6d, 0x79, 0x73, 0x71, 0x6c, 0x12, 0x2a, 0x0a, 0x05, 0x68, 0x62, + 0x61, 0x73, 0x65, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x61, 0x70, 0x69, 0x2e, + 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x76, 0x31, 0x2e, 0x48, 0x42, 0x61, 0x73, 0x65, 0x52, + 0x05, 0x68, 0x62, 0x61, 0x73, 0x65, 0x12, 0x26, 0x0a, 0x0e, 0x67, 0x61, 0x74, 0x65, 0x77, 0x61, + 0x79, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, + 0x67, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x20, + 0x0a, 0x0b, 0x75, 0x73, 0x65, 0x72, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x18, 0x0c, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x0b, 0x75, 0x73, 0x65, 0x72, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, + 0x12, 0x20, 0x0a, 0x0b, 0x70, 0x75, 0x73, 0x68, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x18, + 0x0d, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x70, 0x75, 0x73, 0x68, 0x53, 0x65, 0x72, 0x76, 0x69, + 0x63, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x57, 0x6f, 0x72, 0x6b, 0x65, + 0x72, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x57, 0x6f, + 0x72, 0x6b, 0x65, 0x72, 0x12, 0x1e, 0x0a, 0x0a, 0x6d, 0x73, 0x67, 0x53, 0x65, 0x72, 0x76, 0x69, + 0x63, 0x65, 0x18, 0x0f, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x6d, 0x73, 0x67, 0x53, 0x65, 0x72, + 0x76, 0x69, 0x63, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x6d, 0x73, 0x67, 0x57, 0x6f, 0x72, 0x6b, 0x65, + 0x72, 0x18, 0x10, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6d, 0x73, 0x67, 0x57, 0x6f, 0x72, 0x6b, + 0x65, 0x72, 0x1a, 0x3b, 0x0a, 0x0d, 0x4d, 0x65, 0x74, 0x61, 0x64, 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, 0x42, + 0x07, 0x0a, 0x05, 0x5f, 0x68, 0x74, 0x74, 0x70, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x67, 0x72, 0x70, + 0x63, 0x22, 0x8f, 0x01, 0x0a, 0x03, 0x4c, 0x6f, 0x67, 0x12, 0x1e, 0x0a, 0x08, 0x6c, 0x6f, 0x67, + 0x5f, 0x70, 0x61, 0x74, 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x07, 0x6c, + 0x6f, 0x67, 0x50, 0x61, 0x74, 0x68, 0x88, 0x01, 0x01, 0x12, 0x34, 0x0a, 0x05, 0x6c, 0x65, 0x76, + 0x65, 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x14, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x63, + 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x65, 0x76, 0x65, 0x6c, 0x42, 0x08, + 0xfa, 0x42, 0x05, 0x82, 0x01, 0x02, 0x10, 0x01, 0x52, 0x05, 0x6c, 0x65, 0x76, 0x65, 0x6c, 0x12, + 0x25, 0x0a, 0x0e, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x63, 0x6f, 0x6e, 0x73, 0x6f, 0x6c, + 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0d, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x43, + 0x6f, 0x6e, 0x73, 0x6f, 0x6c, 0x65, 0x42, 0x0b, 0x0a, 0x09, 0x5f, 0x6c, 0x6f, 0x67, 0x5f, 0x70, + 0x61, 0x74, 0x68, 0x22, 0x9c, 0x02, 0x0a, 0x05, 0x52, 0x65, 0x64, 0x69, 0x73, 0x12, 0x12, 0x0a, + 0x04, 0x61, 0x64, 0x64, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x61, 0x64, 0x64, + 0x72, 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, 0x12, 0x1b, 0x0a, + 0x09, 0x6d, 0x61, 0x78, 0x5f, 0x63, 0x6f, 0x6e, 0x6e, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, + 0x52, 0x08, 0x6d, 0x61, 0x78, 0x43, 0x6f, 0x6e, 0x6e, 0x73, 0x12, 0x24, 0x0a, 0x0e, 0x6d, 0x69, + 0x6e, 0x5f, 0x69, 0x64, 0x6c, 0x65, 0x5f, 0x63, 0x6f, 0x6e, 0x6e, 0x73, 0x18, 0x04, 0x20, 0x01, + 0x28, 0x05, 0x52, 0x0c, 0x6d, 0x69, 0x6e, 0x49, 0x64, 0x6c, 0x65, 0x43, 0x6f, 0x6e, 0x6e, 0x73, + 0x12, 0x4f, 0x0a, 0x0c, 0x64, 0x69, 0x61, 0x6c, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, + 0x18, 0x05, 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, 0x42, 0x11, 0xfa, 0x42, 0x0e, 0xaa, 0x01, 0x0b, 0x22, 0x02, 0x08, 0x0a, 0x32, 0x05, 0x10, + 0x80, 0xad, 0xe2, 0x04, 0x52, 0x0b, 0x64, 0x69, 0x61, 0x6c, 0x54, 0x69, 0x6d, 0x65, 0x6f, 0x75, + 0x74, 0x12, 0x4f, 0x0a, 0x0c, 0x69, 0x64, 0x6c, 0x65, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x6f, 0x75, + 0x74, 0x18, 0x06, 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, 0x42, 0x11, 0xfa, 0x42, 0x0e, 0xaa, 0x01, 0x0b, 0x22, 0x02, 0x08, 0x0a, 0x32, 0x05, + 0x10, 0x80, 0xad, 0xe2, 0x04, 0x52, 0x0b, 0x69, 0x64, 0x6c, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x6f, + 0x75, 0x74, 0x22, 0x35, 0x0a, 0x02, 0x4d, 0x51, 0x12, 0x12, 0x0a, 0x04, 0x61, 0x64, 0x64, 0x72, + 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x04, 0x61, 0x64, 0x64, 0x72, 0x12, 0x1b, 0x0a, 0x09, + 0x6d, 0x61, 0x78, 0x5f, 0x72, 0x65, 0x74, 0x72, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, + 0x08, 0x6d, 0x61, 0x78, 0x52, 0x65, 0x74, 0x72, 0x79, 0x22, 0xc7, 0x02, 0x0a, 0x05, 0x4d, 0x79, + 0x53, 0x51, 0x4c, 0x12, 0x12, 0x0a, 0x04, 0x61, 0x64, 0x64, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x04, 0x61, 0x64, 0x64, 0x72, 0x12, 0x12, 0x0a, 0x04, 0x75, 0x73, 0x65, 0x72, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x75, 0x73, 0x65, 0x72, 0x12, 0x1a, 0x0a, 0x08, 0x70, + 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x70, + 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x12, 0x0e, 0x0a, 0x02, 0x64, 0x62, 0x18, 0x04, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x02, 0x64, 0x62, 0x12, 0x24, 0x0a, 0x0e, 0x6d, 0x61, 0x78, 0x5f, 0x69, + 0x64, 0x6c, 0x65, 0x5f, 0x63, 0x6f, 0x6e, 0x6e, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x05, 0x52, + 0x0c, 0x6d, 0x61, 0x78, 0x49, 0x64, 0x6c, 0x65, 0x43, 0x6f, 0x6e, 0x6e, 0x73, 0x12, 0x24, 0x0a, + 0x0e, 0x6d, 0x61, 0x78, 0x5f, 0x6f, 0x70, 0x65, 0x6e, 0x5f, 0x63, 0x6f, 0x6e, 0x6e, 0x73, 0x18, + 0x06, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0c, 0x6d, 0x61, 0x78, 0x4f, 0x70, 0x65, 0x6e, 0x43, 0x6f, + 0x6e, 0x6e, 0x73, 0x12, 0x4e, 0x0a, 0x0c, 0x69, 0x64, 0x6c, 0x65, 0x5f, 0x74, 0x69, 0x6d, 0x65, + 0x6f, 0x75, 0x74, 0x18, 0x07, 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, 0x42, 0x10, 0xfa, 0x42, 0x0d, 0xaa, 0x01, 0x0a, 0x22, 0x02, 0x08, 0x0a, + 0x32, 0x04, 0x10, 0xc0, 0x84, 0x3d, 0x52, 0x0b, 0x69, 0x64, 0x6c, 0x65, 0x54, 0x69, 0x6d, 0x65, + 0x6f, 0x75, 0x74, 0x12, 0x4e, 0x0a, 0x0c, 0x6f, 0x70, 0x65, 0x6e, 0x5f, 0x74, 0x69, 0x6d, 0x65, + 0x6f, 0x75, 0x74, 0x18, 0x08, 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, 0x42, 0x10, 0xfa, 0x42, 0x0d, 0xaa, 0x01, 0x0a, 0x22, 0x02, 0x08, 0x0a, + 0x32, 0x04, 0x10, 0xc0, 0x84, 0x3d, 0x52, 0x0b, 0x6f, 0x70, 0x65, 0x6e, 0x54, 0x69, 0x6d, 0x65, + 0x6f, 0x75, 0x74, 0x22, 0x1b, 0x0a, 0x05, 0x48, 0x42, 0x61, 0x73, 0x65, 0x12, 0x12, 0x0a, 0x04, + 0x61, 0x64, 0x64, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x61, 0x64, 0x64, 0x72, + 0x2a, 0x3f, 0x0a, 0x05, 0x4c, 0x65, 0x76, 0x65, 0x6c, 0x12, 0x09, 0x0a, 0x05, 0x44, 0x45, 0x42, + 0x55, 0x47, 0x10, 0x00, 0x12, 0x08, 0x0a, 0x04, 0x49, 0x4e, 0x46, 0x4f, 0x10, 0x01, 0x12, 0x0b, + 0x0a, 0x07, 0x57, 0x41, 0x52, 0x4e, 0x49, 0x4e, 0x47, 0x10, 0x02, 0x12, 0x09, 0x0a, 0x05, 0x45, + 0x52, 0x52, 0x4f, 0x52, 0x10, 0x03, 0x12, 0x09, 0x0a, 0x05, 0x46, 0x41, 0x54, 0x41, 0x4c, 0x10, + 0x04, 0x42, 0x22, 0x5a, 0x20, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, + 0x67, 0x6f, 0x2d, 0x67, 0x6f, 0x69, 0x6d, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x63, 0x6f, 0x6e, 0x66, + 0x69, 0x67, 0x2f, 0x76, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -760,7 +819,7 @@ func file_config_v1_config_proto_rawDescGZIP() []byte { } var file_config_v1_config_proto_enumTypes = make([]protoimpl.EnumInfo, 1) -var file_config_v1_config_proto_msgTypes = make([]protoimpl.MessageInfo, 7) +var file_config_v1_config_proto_msgTypes = make([]protoimpl.MessageInfo, 8) var file_config_v1_config_proto_goTypes = []interface{}{ (Level)(0), // 0: api.config.v1.Level (*Server)(nil), // 1: api.config.v1.Server @@ -769,28 +828,30 @@ var file_config_v1_config_proto_goTypes = []interface{}{ (*Redis)(nil), // 4: api.config.v1.Redis (*MQ)(nil), // 5: api.config.v1.MQ (*MySQL)(nil), // 6: api.config.v1.MySQL - nil, // 7: api.config.v1.Service.MetadataEntry - (*durationpb.Duration)(nil), // 8: google.protobuf.Duration + (*HBase)(nil), // 7: api.config.v1.HBase + nil, // 8: api.config.v1.Service.MetadataEntry + (*durationpb.Duration)(nil), // 9: google.protobuf.Duration } var file_config_v1_config_proto_depIdxs = []int32{ - 8, // 0: api.config.v1.Server.timeout:type_name -> google.protobuf.Duration + 9, // 0: api.config.v1.Server.timeout:type_name -> google.protobuf.Duration 1, // 1: api.config.v1.Service.http:type_name -> api.config.v1.Server 1, // 2: api.config.v1.Service.grpc:type_name -> api.config.v1.Server 3, // 3: api.config.v1.Service.log:type_name -> api.config.v1.Log - 7, // 4: api.config.v1.Service.metadata:type_name -> api.config.v1.Service.MetadataEntry + 8, // 4: api.config.v1.Service.metadata:type_name -> api.config.v1.Service.MetadataEntry 4, // 5: api.config.v1.Service.redis:type_name -> api.config.v1.Redis 5, // 6: api.config.v1.Service.mq:type_name -> api.config.v1.MQ 6, // 7: api.config.v1.Service.mysql:type_name -> api.config.v1.MySQL - 0, // 8: api.config.v1.Log.level:type_name -> api.config.v1.Level - 8, // 9: api.config.v1.Redis.dial_timeout:type_name -> google.protobuf.Duration - 8, // 10: api.config.v1.Redis.idle_timeout:type_name -> google.protobuf.Duration - 8, // 11: api.config.v1.MySQL.idle_timeout:type_name -> google.protobuf.Duration - 8, // 12: api.config.v1.MySQL.open_timeout:type_name -> google.protobuf.Duration - 13, // [13:13] is the sub-list for method output_type - 13, // [13:13] is the sub-list for method input_type - 13, // [13:13] is the sub-list for extension type_name - 13, // [13:13] is the sub-list for extension extendee - 0, // [0:13] is the sub-list for field type_name + 7, // 8: api.config.v1.Service.hbase:type_name -> api.config.v1.HBase + 0, // 9: api.config.v1.Log.level:type_name -> api.config.v1.Level + 9, // 10: api.config.v1.Redis.dial_timeout:type_name -> google.protobuf.Duration + 9, // 11: api.config.v1.Redis.idle_timeout:type_name -> google.protobuf.Duration + 9, // 12: api.config.v1.MySQL.idle_timeout:type_name -> google.protobuf.Duration + 9, // 13: api.config.v1.MySQL.open_timeout:type_name -> google.protobuf.Duration + 14, // [14:14] is the sub-list for method output_type + 14, // [14:14] is the sub-list for method input_type + 14, // [14:14] is the sub-list for extension type_name + 14, // [14:14] is the sub-list for extension extendee + 0, // [0:14] is the sub-list for field type_name } func init() { file_config_v1_config_proto_init() } @@ -871,6 +932,18 @@ func file_config_v1_config_proto_init() { return nil } } + file_config_v1_config_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*HBase); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } } file_config_v1_config_proto_msgTypes[1].OneofWrappers = []interface{}{} file_config_v1_config_proto_msgTypes[2].OneofWrappers = []interface{}{} @@ -880,7 +953,7 @@ func file_config_v1_config_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_config_v1_config_proto_rawDesc, NumEnums: 1, - NumMessages: 7, + NumMessages: 8, NumExtensions: 0, NumServices: 0, }, diff --git a/config/v1/config.pb.validate.go b/config/v1/config.pb.validate.go index faf61f4..892034d 100644 --- a/config/v1/config.pb.validate.go +++ b/config/v1/config.pb.validate.go @@ -353,6 +353,35 @@ func (m *Service) validate(all bool) error { } } + if all { + switch v := interface{}(m.GetHbase()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, ServiceValidationError{ + field: "Hbase", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, ServiceValidationError{ + field: "Hbase", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetHbase()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return ServiceValidationError{ + field: "Hbase", + reason: "embedded message failed validation", + cause: err, + } + } + } + // no validation rules for GatewayService // no validation rules for UserService @@ -1066,3 +1095,103 @@ var _ interface { Cause() error ErrorName() string } = MySQLValidationError{} + +// Validate checks the field values on HBase with the rules defined in the +// proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. +func (m *HBase) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on HBase with the rules defined in the +// proto definition for this message. If any rules are violated, the result is +// a list of violation errors wrapped in HBaseMultiError, or nil if none found. +func (m *HBase) ValidateAll() error { + return m.validate(true) +} + +func (m *HBase) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + // no validation rules for Addr + + if len(errors) > 0 { + return HBaseMultiError(errors) + } + + return nil +} + +// HBaseMultiError is an error wrapping multiple validation errors returned by +// HBase.ValidateAll() if the designated constraints aren't met. +type HBaseMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m HBaseMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m HBaseMultiError) AllErrors() []error { return m } + +// HBaseValidationError is the validation error returned by HBase.Validate if +// the designated constraints aren't met. +type HBaseValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e HBaseValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e HBaseValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e HBaseValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e HBaseValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e HBaseValidationError) ErrorName() string { return "HBaseValidationError" } + +// Error satisfies the builtin error interface +func (e HBaseValidationError) Error() string { + cause := "" + if e.cause != nil { + cause = fmt.Sprintf(" | caused by: %v", e.cause) + } + + key := "" + if e.key { + key = "key for " + } + + return fmt.Sprintf( + "invalid %sHBase.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = HBaseValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = HBaseValidationError{} diff --git a/config/v1/config.proto b/config/v1/config.proto index 1704c69..ae1d565 100644 --- a/config/v1/config.proto +++ b/config/v1/config.proto @@ -52,13 +52,14 @@ message Service { Redis redis = 7; MQ mq = 8; MySQL mysql = 9; + HBase hbase = 10; // services name - string gatewayService = 10; - string userService = 11; - string pushService = 12; - string storeWorker = 13; - string msgService = 14; - string msgWorker = 15; + string gatewayService = 11; + string userService = 12; + string pushService = 13; + string storeWorker = 14; + string msgService = 15; + string msgWorker = 16; } enum Level { @@ -135,3 +136,8 @@ message MySQL { } }]; } + +message HBase { + string addr = 1; + // add more +} diff --git a/message/v1/message.pb.go b/message/v1/message.pb.go index 552010b..b7589a5 100644 --- a/message/v1/message.pb.go +++ b/message/v1/message.pb.go @@ -78,11 +78,12 @@ type SendMessageReq struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - FromUser string `protobuf:"bytes,1,opt,name=from_user,json=fromUser,proto3" json:"from_user,omitempty"` - ToUser string `protobuf:"bytes,2,opt,name=to_user,json=toUser,proto3" json:"to_user,omitempty"` + From string `protobuf:"bytes,1,opt,name=from,proto3" json:"from,omitempty"` + To string `protobuf:"bytes,2,opt,name=to,proto3" json:"to,omitempty"` SessionType v1.SessionType `protobuf:"varint,3,opt,name=session_type,json=sessionType,proto3,enum=api.user.session.v1.SessionType" json:"session_type,omitempty"` - ContentType MessageContentType `protobuf:"varint,4,opt,name=content_type,json=contentType,proto3,enum=api.message.v1.MessageContentType" json:"content_type,omitempty"` - Content string `protobuf:"bytes,5,opt,name=content,proto3" json:"content,omitempty"` + SessionId *string `protobuf:"bytes,4,opt,name=session_id,json=sessionId,proto3,oneof" json:"session_id,omitempty"` + ContentType MessageContentType `protobuf:"varint,5,opt,name=content_type,json=contentType,proto3,enum=api.message.v1.MessageContentType" json:"content_type,omitempty"` + Content string `protobuf:"bytes,6,opt,name=content,proto3" json:"content,omitempty"` } func (x *SendMessageReq) Reset() { @@ -117,16 +118,16 @@ func (*SendMessageReq) Descriptor() ([]byte, []int) { return file_message_v1_message_proto_rawDescGZIP(), []int{0} } -func (x *SendMessageReq) GetFromUser() string { +func (x *SendMessageReq) GetFrom() string { if x != nil { - return x.FromUser + return x.From } return "" } -func (x *SendMessageReq) GetToUser() string { +func (x *SendMessageReq) GetTo() string { if x != nil { - return x.ToUser + return x.To } return "" } @@ -138,6 +139,13 @@ func (x *SendMessageReq) GetSessionType() v1.SessionType { return v1.SessionType_SingleChat } +func (x *SendMessageReq) GetSessionId() string { + if x != nil && x.SessionId != nil { + return *x.SessionId + } + return "" +} + func (x *SendMessageReq) GetContentType() MessageContentType { if x != nil { return x.ContentType @@ -158,10 +166,8 @@ type SendMessageResp struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Response *response.BaseResponse `protobuf:"bytes,1,opt,name=response,proto3" json:"response,omitempty"` - // MsgSeq is unique seq of a message - SessionId int64 `protobuf:"varint,2,opt,name=session_id,json=sessionId,proto3" json:"session_id,omitempty"` - MsgSeq string `protobuf:"bytes,3,opt,name=msg_seq,json=msgSeq,proto3" json:"msg_seq,omitempty"` + SessionId int64 `protobuf:"varint,2,opt,name=session_id,json=sessionId,proto3" json:"session_id,omitempty"` + MsgId int64 `protobuf:"varint,3,opt,name=msg_id,json=msgId,proto3" json:"msg_id,omitempty"` } func (x *SendMessageResp) Reset() { @@ -196,13 +202,6 @@ func (*SendMessageResp) Descriptor() ([]byte, []int) { return file_message_v1_message_proto_rawDescGZIP(), []int{1} } -func (x *SendMessageResp) GetResponse() *response.BaseResponse { - if x != nil { - return x.Response - } - return nil -} - func (x *SendMessageResp) GetSessionId() int64 { if x != nil { return x.SessionId @@ -210,29 +209,31 @@ func (x *SendMessageResp) GetSessionId() int64 { return 0 } -func (x *SendMessageResp) GetMsgSeq() string { +func (x *SendMessageResp) GetMsgId() int64 { if x != nil { - return x.MsgSeq + return x.MsgId } - return "" + return 0 } -// MqMessage is message protocol when pub/sub msg to mq -type MqMessage struct { +// Message is definition of message +type Message struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - FromUser string `protobuf:"bytes,1,opt,name=from_user,json=fromUser,proto3" json:"from_user,omitempty"` - ToUser string `protobuf:"bytes,2,opt,name=to_user,json=toUser,proto3" json:"to_user,omitempty"` - SessionType v1.SessionType `protobuf:"varint,3,opt,name=session_type,json=sessionType,proto3,enum=api.user.session.v1.SessionType" json:"session_type,omitempty"` - ContentType MessageContentType `protobuf:"varint,4,opt,name=content_type,json=contentType,proto3,enum=api.message.v1.MessageContentType" json:"content_type,omitempty"` - Content string `protobuf:"bytes,5,opt,name=content,proto3" json:"content,omitempty"` - SessionId int64 `protobuf:"varint,6,opt,name=session_id,json=sessionId,proto3" json:"session_id,omitempty"` + MsgId int64 `protobuf:"varint,1,opt,name=msg_id,json=msgId,proto3" json:"msg_id,omitempty"` + From string `protobuf:"bytes,2,opt,name=from,proto3" json:"from,omitempty"` + To string `protobuf:"bytes,3,opt,name=to,proto3" json:"to,omitempty"` // to user id or group id + SessionType v1.SessionType `protobuf:"varint,4,opt,name=session_type,json=sessionType,proto3,enum=api.user.session.v1.SessionType" json:"session_type,omitempty"` + SessionId int64 `protobuf:"varint,5,opt,name=session_id,json=sessionId,proto3" json:"session_id,omitempty"` + ContentType MessageContentType `protobuf:"varint,6,opt,name=content_type,json=contentType,proto3,enum=api.message.v1.MessageContentType" json:"content_type,omitempty"` + Content string `protobuf:"bytes,7,opt,name=content,proto3" json:"content,omitempty"` + CreateTime int64 `protobuf:"varint,8,opt,name=create_time,json=createTime,proto3" json:"create_time,omitempty"` } -func (x *MqMessage) Reset() { - *x = MqMessage{} +func (x *Message) Reset() { + *x = Message{} if protoimpl.UnsafeEnabled { mi := &file_message_v1_message_proto_msgTypes[2] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -240,13 +241,13 @@ func (x *MqMessage) Reset() { } } -func (x *MqMessage) String() string { +func (x *Message) String() string { return protoimpl.X.MessageStringOf(x) } -func (*MqMessage) ProtoMessage() {} +func (*Message) ProtoMessage() {} -func (x *MqMessage) ProtoReflect() protoreflect.Message { +func (x *Message) ProtoReflect() protoreflect.Message { mi := &file_message_v1_message_proto_msgTypes[2] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -258,49 +259,63 @@ func (x *MqMessage) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use MqMessage.ProtoReflect.Descriptor instead. -func (*MqMessage) Descriptor() ([]byte, []int) { +// Deprecated: Use Message.ProtoReflect.Descriptor instead. +func (*Message) Descriptor() ([]byte, []int) { return file_message_v1_message_proto_rawDescGZIP(), []int{2} } -func (x *MqMessage) GetFromUser() string { +func (x *Message) GetMsgId() int64 { if x != nil { - return x.FromUser + return x.MsgId + } + return 0 +} + +func (x *Message) GetFrom() string { + if x != nil { + return x.From } return "" } -func (x *MqMessage) GetToUser() string { +func (x *Message) GetTo() string { if x != nil { - return x.ToUser + return x.To } return "" } -func (x *MqMessage) GetSessionType() v1.SessionType { +func (x *Message) GetSessionType() v1.SessionType { if x != nil { return x.SessionType } return v1.SessionType_SingleChat } -func (x *MqMessage) GetContentType() MessageContentType { +func (x *Message) GetSessionId() int64 { + if x != nil { + return x.SessionId + } + return 0 +} + +func (x *Message) GetContentType() MessageContentType { if x != nil { return x.ContentType } return MessageContentType_Text } -func (x *MqMessage) GetContent() string { +func (x *Message) GetContent() string { if x != nil { return x.Content } return "" } -func (x *MqMessage) GetSessionId() int64 { +func (x *Message) GetCreateTime() int64 { if x != nil { - return x.SessionId + return x.CreateTime } return 0 } @@ -311,15 +326,9 @@ type PushMessageReq struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - FromUser string `protobuf:"bytes,1,opt,name=from_user,json=fromUser,proto3" json:"from_user,omitempty"` - ToUser string `protobuf:"bytes,2,opt,name=to_user,json=toUser,proto3" json:"to_user,omitempty"` - // to_group is validate when session_type is Group - ToGroup *string `protobuf:"bytes,3,opt,name=to_group,json=toGroup,proto3,oneof" json:"to_group,omitempty"` - SessionType v1.SessionType `protobuf:"varint,4,opt,name=session_type,json=sessionType,proto3,enum=api.user.session.v1.SessionType" json:"session_type,omitempty"` - ContentType MessageContentType `protobuf:"varint,5,opt,name=content_type,json=contentType,proto3,enum=api.message.v1.MessageContentType" json:"content_type,omitempty"` - Content string `protobuf:"bytes,6,opt,name=content,proto3" json:"content,omitempty"` - MsgSeq string `protobuf:"bytes,7,opt,name=msg_seq,json=msgSeq,proto3" json:"msg_seq,omitempty"` - SessionId int64 `protobuf:"varint,8,opt,name=session_id,json=sessionId,proto3" json:"session_id,omitempty"` + Message *Message `protobuf:"bytes,1,opt,name=message,proto3" json:"message,omitempty"` + // ToUsers is a list of user id who receive this message + ToUsers []string `protobuf:"bytes,2,rep,name=to_users,json=toUsers,proto3" json:"to_users,omitempty"` } func (x *PushMessageReq) Reset() { @@ -354,78 +363,31 @@ func (*PushMessageReq) Descriptor() ([]byte, []int) { return file_message_v1_message_proto_rawDescGZIP(), []int{3} } -func (x *PushMessageReq) GetFromUser() string { - if x != nil { - return x.FromUser - } - return "" -} - -func (x *PushMessageReq) GetToUser() string { - if x != nil { - return x.ToUser - } - return "" -} - -func (x *PushMessageReq) GetToGroup() string { - if x != nil && x.ToGroup != nil { - return *x.ToGroup - } - return "" -} - -func (x *PushMessageReq) GetSessionType() v1.SessionType { +func (x *PushMessageReq) GetMessage() *Message { if x != nil { - return x.SessionType + return x.Message } - return v1.SessionType_SingleChat -} - -func (x *PushMessageReq) GetContentType() MessageContentType { - if x != nil { - return x.ContentType - } - return MessageContentType_Text -} - -func (x *PushMessageReq) GetContent() string { - if x != nil { - return x.Content - } - return "" -} - -func (x *PushMessageReq) GetMsgSeq() string { - if x != nil { - return x.MsgSeq - } - return "" + return nil } -func (x *PushMessageReq) GetSessionId() int64 { +func (x *PushMessageReq) GetToUsers() []string { if x != nil { - return x.SessionId + return x.ToUsers } - return 0 + return nil } -// BriefMessage is message with basic information -type BriefMessage struct { +type PushMessageResp struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - FromUser string `protobuf:"bytes,1,opt,name=from_user,json=fromUser,proto3" json:"from_user,omitempty"` - ToUser string `protobuf:"bytes,2,opt,name=to_user,json=toUser,proto3" json:"to_user,omitempty"` - ContentType MessageContentType `protobuf:"varint,3,opt,name=content_type,json=contentType,proto3,enum=api.message.v1.MessageContentType" json:"content_type,omitempty"` - Content string `protobuf:"bytes,4,opt,name=content,proto3" json:"content,omitempty"` - MsgSeq string `protobuf:"bytes,5,opt,name=msg_seq,json=msgSeq,proto3" json:"msg_seq,omitempty"` - SessionId int64 `protobuf:"varint,6,opt,name=session_id,json=sessionId,proto3" json:"session_id,omitempty"` + Response *response.BaseResponse `protobuf:"bytes,1,opt,name=response,proto3" json:"response,omitempty"` + FailedUsers []string `protobuf:"bytes,2,rep,name=failed_users,json=failedUsers,proto3" json:"failed_users,omitempty"` } -func (x *BriefMessage) Reset() { - *x = BriefMessage{} +func (x *PushMessageResp) Reset() { + *x = PushMessageResp{} if protoimpl.UnsafeEnabled { mi := &file_message_v1_message_proto_msgTypes[4] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -433,13 +395,13 @@ func (x *BriefMessage) Reset() { } } -func (x *BriefMessage) String() string { +func (x *PushMessageResp) String() string { return protoimpl.X.MessageStringOf(x) } -func (*BriefMessage) ProtoMessage() {} +func (*PushMessageResp) ProtoMessage() {} -func (x *BriefMessage) ProtoReflect() protoreflect.Message { +func (x *PushMessageResp) ProtoReflect() protoreflect.Message { mi := &file_message_v1_message_proto_msgTypes[4] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -451,51 +413,23 @@ func (x *BriefMessage) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use BriefMessage.ProtoReflect.Descriptor instead. -func (*BriefMessage) Descriptor() ([]byte, []int) { +// Deprecated: Use PushMessageResp.ProtoReflect.Descriptor instead. +func (*PushMessageResp) Descriptor() ([]byte, []int) { return file_message_v1_message_proto_rawDescGZIP(), []int{4} } -func (x *BriefMessage) GetFromUser() string { +func (x *PushMessageResp) GetResponse() *response.BaseResponse { if x != nil { - return x.FromUser - } - return "" -} - -func (x *BriefMessage) GetToUser() string { - if x != nil { - return x.ToUser - } - return "" -} - -func (x *BriefMessage) GetContentType() MessageContentType { - if x != nil { - return x.ContentType - } - return MessageContentType_Text -} - -func (x *BriefMessage) GetContent() string { - if x != nil { - return x.Content - } - return "" -} - -func (x *BriefMessage) GetMsgSeq() string { - if x != nil { - return x.MsgSeq + return x.Response } - return "" + return nil } -func (x *BriefMessage) GetSessionId() int64 { +func (x *PushMessageResp) GetFailedUsers() []string { if x != nil { - return x.SessionId + return x.FailedUsers } - return 0 + return nil } type QueryOfflineMessageReq struct { @@ -503,11 +437,11 @@ type QueryOfflineMessageReq struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - UserId string `protobuf:"bytes,1,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty"` - LastMsgSeq string `protobuf:"bytes,2,opt,name=last_msg_seq,json=lastMsgSeq,proto3" json:"last_msg_seq,omitempty"` - OnlyCount bool `protobuf:"varint,3,opt,name=onlyCount,proto3" json:"onlyCount,omitempty"` - Page int32 `protobuf:"varint,4,opt,name=page,proto3" json:"page,omitempty"` - PageSize int32 `protobuf:"varint,5,opt,name=page_size,json=pageSize,proto3" json:"page_size,omitempty"` + UserId string `protobuf:"bytes,1,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty"` + LastMsgId int64 `protobuf:"varint,2,opt,name=last_msg_id,json=lastMsgId,proto3" json:"last_msg_id,omitempty"` + OnlyCount bool `protobuf:"varint,3,opt,name=onlyCount,proto3" json:"onlyCount,omitempty"` + Page int32 `protobuf:"varint,4,opt,name=page,proto3" json:"page,omitempty"` + PageSize int32 `protobuf:"varint,5,opt,name=page_size,json=pageSize,proto3" json:"page_size,omitempty"` } func (x *QueryOfflineMessageReq) Reset() { @@ -549,11 +483,11 @@ func (x *QueryOfflineMessageReq) GetUserId() string { return "" } -func (x *QueryOfflineMessageReq) GetLastMsgSeq() string { +func (x *QueryOfflineMessageReq) GetLastMsgId() int64 { if x != nil { - return x.LastMsgSeq + return x.LastMsgId } - return "" + return 0 } func (x *QueryOfflineMessageReq) GetOnlyCount() bool { @@ -584,7 +518,7 @@ type QueryOfflineMessageResp struct { Response *response.BaseResponse `protobuf:"bytes,1,opt,name=response,proto3" json:"response,omitempty"` Total int32 `protobuf:"varint,2,opt,name=total,proto3" json:"total,omitempty"` - Messages []*BriefMessage `protobuf:"bytes,3,rep,name=messages,proto3" json:"messages,omitempty"` + Messages []*Message `protobuf:"bytes,3,rep,name=messages,proto3" json:"messages,omitempty"` } func (x *QueryOfflineMessageResp) Reset() { @@ -633,7 +567,7 @@ func (x *QueryOfflineMessageResp) GetTotal() int32 { return 0 } -func (x *QueryOfflineMessageResp) GetMessages() []*BriefMessage { +func (x *QueryOfflineMessageResp) GetMessages() []*Message { if x != nil { return x.Messages } @@ -651,129 +585,106 @@ var file_message_v1_message_proto_rawDesc = []byte{ 0x73, 0x65, 0x72, 0x2f, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x2f, 0x76, 0x31, 0x2f, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x17, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2e, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x94, 0x02, 0x0a, 0x0e, 0x53, 0x65, 0x6e, 0x64, 0x4d, 0x65, - 0x73, 0x73, 0x61, 0x67, 0x65, 0x52, 0x65, 0x71, 0x12, 0x24, 0x0a, 0x09, 0x66, 0x72, 0x6f, 0x6d, - 0x5f, 0x75, 0x73, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, - 0x72, 0x02, 0x10, 0x14, 0x52, 0x08, 0x66, 0x72, 0x6f, 0x6d, 0x55, 0x73, 0x65, 0x72, 0x12, 0x20, - 0x0a, 0x07, 0x74, 0x6f, 0x5f, 0x75, 0x73, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, - 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10, 0x14, 0x52, 0x06, 0x74, 0x6f, 0x55, 0x73, 0x65, 0x72, - 0x12, 0x43, 0x0a, 0x0c, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x79, 0x70, 0x65, - 0x18, 0x03, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x20, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x75, 0x73, 0x65, - 0x72, 0x2e, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x65, 0x73, - 0x73, 0x69, 0x6f, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x52, 0x0b, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, - 0x6e, 0x54, 0x79, 0x70, 0x65, 0x12, 0x4f, 0x0a, 0x0c, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, - 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x22, 0x2e, 0x61, 0x70, - 0x69, 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x65, 0x73, - 0x73, 0x61, 0x67, 0x65, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x54, 0x79, 0x70, 0x65, 0x42, - 0x08, 0xfa, 0x42, 0x05, 0x82, 0x01, 0x02, 0x10, 0x01, 0x52, 0x0b, 0x63, 0x6f, 0x6e, 0x74, 0x65, - 0x6e, 0x74, 0x54, 0x79, 0x70, 0x65, 0x12, 0x24, 0x0a, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, - 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x42, 0x0a, 0xfa, 0x42, 0x07, 0x72, 0x05, 0x10, 0x01, - 0x18, 0x80, 0x20, 0x52, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x22, 0x8b, 0x01, 0x0a, - 0x0f, 0x53, 0x65, 0x6e, 0x64, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x52, 0x65, 0x73, 0x70, - 0x12, 0x40, 0x0a, 0x08, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, - 0x72, 0x74, 0x2e, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x42, 0x61, 0x73, 0x65, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x52, 0x08, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x49, - 0x64, 0x12, 0x17, 0x0a, 0x07, 0x6d, 0x73, 0x67, 0x5f, 0x73, 0x65, 0x71, 0x18, 0x03, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x06, 0x6d, 0x73, 0x67, 0x53, 0x65, 0x71, 0x22, 0x86, 0x02, 0x0a, 0x09, 0x4d, - 0x71, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x1b, 0x0a, 0x09, 0x66, 0x72, 0x6f, 0x6d, - 0x5f, 0x75, 0x73, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x66, 0x72, 0x6f, - 0x6d, 0x55, 0x73, 0x65, 0x72, 0x12, 0x17, 0x0a, 0x07, 0x74, 0x6f, 0x5f, 0x75, 0x73, 0x65, 0x72, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x74, 0x6f, 0x55, 0x73, 0x65, 0x72, 0x12, 0x43, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xb5, 0x02, 0x0a, 0x0e, 0x53, 0x65, 0x6e, 0x64, 0x4d, 0x65, + 0x73, 0x73, 0x61, 0x67, 0x65, 0x52, 0x65, 0x71, 0x12, 0x1b, 0x0a, 0x04, 0x66, 0x72, 0x6f, 0x6d, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10, 0x14, 0x52, + 0x04, 0x66, 0x72, 0x6f, 0x6d, 0x12, 0x17, 0x0a, 0x02, 0x74, 0x6f, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10, 0x14, 0x52, 0x02, 0x74, 0x6f, 0x12, 0x43, 0x0a, 0x0c, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x20, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x52, 0x0b, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x54, - 0x79, 0x70, 0x65, 0x12, 0x45, 0x0a, 0x0c, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x5f, 0x74, - 0x79, 0x70, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x22, 0x2e, 0x61, 0x70, 0x69, 0x2e, - 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x65, 0x73, 0x73, 0x61, - 0x67, 0x65, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x54, 0x79, 0x70, 0x65, 0x52, 0x0b, 0x63, - 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x54, 0x79, 0x70, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x63, 0x6f, - 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x63, 0x6f, 0x6e, - 0x74, 0x65, 0x6e, 0x74, 0x12, 0x1d, 0x0a, 0x0a, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x5f, - 0x69, 0x64, 0x18, 0x06, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, - 0x6e, 0x49, 0x64, 0x22, 0xd1, 0x02, 0x0a, 0x0e, 0x50, 0x75, 0x73, 0x68, 0x4d, 0x65, 0x73, 0x73, - 0x61, 0x67, 0x65, 0x52, 0x65, 0x71, 0x12, 0x1b, 0x0a, 0x09, 0x66, 0x72, 0x6f, 0x6d, 0x5f, 0x75, - 0x73, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x66, 0x72, 0x6f, 0x6d, 0x55, - 0x73, 0x65, 0x72, 0x12, 0x17, 0x0a, 0x07, 0x74, 0x6f, 0x5f, 0x75, 0x73, 0x65, 0x72, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x74, 0x6f, 0x55, 0x73, 0x65, 0x72, 0x12, 0x1e, 0x0a, 0x08, - 0x74, 0x6f, 0x5f, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, - 0x52, 0x07, 0x74, 0x6f, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x88, 0x01, 0x01, 0x12, 0x43, 0x0a, 0x0c, - 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x04, 0x20, 0x01, - 0x28, 0x0e, 0x32, 0x20, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x73, 0x65, - 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, - 0x54, 0x79, 0x70, 0x65, 0x52, 0x0b, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x54, 0x79, 0x70, - 0x65, 0x12, 0x45, 0x0a, 0x0c, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x5f, 0x74, 0x79, 0x70, - 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x22, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x6d, 0x65, + 0x79, 0x70, 0x65, 0x12, 0x22, 0x0a, 0x0a, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x69, + 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x09, 0x73, 0x65, 0x73, 0x73, 0x69, + 0x6f, 0x6e, 0x49, 0x64, 0x88, 0x01, 0x01, 0x12, 0x4f, 0x0a, 0x0c, 0x63, 0x6f, 0x6e, 0x74, 0x65, + 0x6e, 0x74, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x22, 0x2e, + 0x61, 0x70, 0x69, 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x4d, + 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x54, 0x79, 0x70, + 0x65, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x82, 0x01, 0x02, 0x10, 0x01, 0x52, 0x0b, 0x63, 0x6f, 0x6e, + 0x74, 0x65, 0x6e, 0x74, 0x54, 0x79, 0x70, 0x65, 0x12, 0x24, 0x0a, 0x07, 0x63, 0x6f, 0x6e, 0x74, + 0x65, 0x6e, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x42, 0x0a, 0xfa, 0x42, 0x07, 0x72, 0x05, + 0x10, 0x01, 0x18, 0x80, 0x20, 0x52, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x42, 0x0d, + 0x0a, 0x0b, 0x5f, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x22, 0x47, 0x0a, + 0x0f, 0x53, 0x65, 0x6e, 0x64, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x52, 0x65, 0x73, 0x70, + 0x12, 0x1d, 0x0a, 0x0a, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x12, + 0x15, 0x0a, 0x06, 0x6d, 0x73, 0x67, 0x5f, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, + 0x05, 0x6d, 0x73, 0x67, 0x49, 0x64, 0x22, 0xaa, 0x02, 0x0a, 0x07, 0x4d, 0x65, 0x73, 0x73, 0x61, + 0x67, 0x65, 0x12, 0x15, 0x0a, 0x06, 0x6d, 0x73, 0x67, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x03, 0x52, 0x05, 0x6d, 0x73, 0x67, 0x49, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x66, 0x72, 0x6f, + 0x6d, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x66, 0x72, 0x6f, 0x6d, 0x12, 0x0e, 0x0a, + 0x02, 0x74, 0x6f, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x74, 0x6f, 0x12, 0x43, 0x0a, + 0x0c, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x04, 0x20, + 0x01, 0x28, 0x0e, 0x32, 0x20, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x73, + 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, + 0x6e, 0x54, 0x79, 0x70, 0x65, 0x52, 0x0b, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x54, 0x79, + 0x70, 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, + 0x18, 0x05, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x49, + 0x64, 0x12, 0x45, 0x0a, 0x0c, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x5f, 0x74, 0x79, 0x70, + 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x22, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x54, 0x79, 0x70, 0x65, 0x52, 0x0b, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x54, 0x79, 0x70, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x63, 0x6f, 0x6e, 0x74, - 0x65, 0x6e, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, - 0x6e, 0x74, 0x12, 0x17, 0x0a, 0x07, 0x6d, 0x73, 0x67, 0x5f, 0x73, 0x65, 0x71, 0x18, 0x07, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x06, 0x6d, 0x73, 0x67, 0x53, 0x65, 0x71, 0x12, 0x1d, 0x0a, 0x0a, 0x73, - 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x08, 0x20, 0x01, 0x28, 0x03, 0x52, - 0x09, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x42, 0x0b, 0x0a, 0x09, 0x5f, 0x74, - 0x6f, 0x5f, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x22, 0xdd, 0x01, 0x0a, 0x0c, 0x42, 0x72, 0x69, 0x65, - 0x66, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x1b, 0x0a, 0x09, 0x66, 0x72, 0x6f, 0x6d, - 0x5f, 0x75, 0x73, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x66, 0x72, 0x6f, - 0x6d, 0x55, 0x73, 0x65, 0x72, 0x12, 0x17, 0x0a, 0x07, 0x74, 0x6f, 0x5f, 0x75, 0x73, 0x65, 0x72, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x74, 0x6f, 0x55, 0x73, 0x65, 0x72, 0x12, 0x45, - 0x0a, 0x0c, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x03, - 0x20, 0x01, 0x28, 0x0e, 0x32, 0x22, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, - 0x67, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x43, 0x6f, 0x6e, - 0x74, 0x65, 0x6e, 0x74, 0x54, 0x79, 0x70, 0x65, 0x52, 0x0b, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, - 0x74, 0x54, 0x79, 0x70, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, - 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x12, - 0x17, 0x0a, 0x07, 0x6d, 0x73, 0x67, 0x5f, 0x73, 0x65, 0x71, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x06, 0x6d, 0x73, 0x67, 0x53, 0x65, 0x71, 0x12, 0x1d, 0x0a, 0x0a, 0x73, 0x65, 0x73, 0x73, - 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x06, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x73, 0x65, - 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x22, 0xbf, 0x01, 0x0a, 0x16, 0x51, 0x75, 0x65, 0x72, - 0x79, 0x4f, 0x66, 0x66, 0x6c, 0x69, 0x6e, 0x65, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x52, - 0x65, 0x71, 0x12, 0x20, 0x0a, 0x07, 0x75, 0x73, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10, 0x14, 0x52, 0x06, 0x75, 0x73, - 0x65, 0x72, 0x49, 0x64, 0x12, 0x29, 0x0a, 0x0c, 0x6c, 0x61, 0x73, 0x74, 0x5f, 0x6d, 0x73, 0x67, - 0x5f, 0x73, 0x65, 0x71, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, - 0x02, 0x10, 0x0a, 0x52, 0x0a, 0x6c, 0x61, 0x73, 0x74, 0x4d, 0x73, 0x67, 0x53, 0x65, 0x71, 0x12, - 0x1c, 0x0a, 0x09, 0x6f, 0x6e, 0x6c, 0x79, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, - 0x28, 0x08, 0x52, 0x09, 0x6f, 0x6e, 0x6c, 0x79, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x12, 0x0a, - 0x04, 0x70, 0x61, 0x67, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x05, 0x52, 0x04, 0x70, 0x61, 0x67, - 0x65, 0x12, 0x26, 0x0a, 0x09, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x05, - 0x20, 0x01, 0x28, 0x05, 0x42, 0x09, 0xfa, 0x42, 0x06, 0x1a, 0x04, 0x18, 0x64, 0x28, 0x01, 0x52, - 0x08, 0x70, 0x61, 0x67, 0x65, 0x53, 0x69, 0x7a, 0x65, 0x22, 0xab, 0x01, 0x0a, 0x17, 0x51, 0x75, - 0x65, 0x72, 0x79, 0x4f, 0x66, 0x66, 0x6c, 0x69, 0x6e, 0x65, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, - 0x65, 0x52, 0x65, 0x73, 0x70, 0x12, 0x40, 0x0a, 0x08, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x74, 0x72, - 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x2e, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x2e, 0x42, 0x61, 0x73, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x52, 0x08, 0x72, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x74, 0x6f, 0x74, 0x61, 0x6c, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x12, 0x38, 0x0a, - 0x08, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, - 0x1c, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x31, - 0x2e, 0x42, 0x72, 0x69, 0x65, 0x66, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x52, 0x08, 0x6d, - 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x2a, 0x34, 0x0a, 0x12, 0x4d, 0x65, 0x73, 0x73, 0x61, - 0x67, 0x65, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x54, 0x79, 0x70, 0x65, 0x12, 0x08, 0x0a, - 0x04, 0x54, 0x65, 0x78, 0x74, 0x10, 0x00, 0x12, 0x09, 0x0a, 0x05, 0x49, 0x6d, 0x61, 0x67, 0x65, - 0x10, 0x01, 0x12, 0x09, 0x0a, 0x05, 0x56, 0x6f, 0x69, 0x63, 0x65, 0x10, 0x02, 0x32, 0x69, 0x0a, - 0x12, 0x50, 0x75, 0x73, 0x68, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x53, 0x65, 0x72, 0x76, - 0x69, 0x63, 0x65, 0x12, 0x53, 0x0a, 0x0b, 0x50, 0x75, 0x73, 0x68, 0x4d, 0x65, 0x73, 0x73, 0x61, - 0x67, 0x65, 0x12, 0x1e, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, - 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x75, 0x73, 0x68, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x52, - 0x65, 0x71, 0x1a, 0x24, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, - 0x72, 0x74, 0x2e, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x42, 0x61, 0x73, 0x65, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x32, 0x7f, 0x0a, 0x15, 0x4f, 0x66, 0x66, 0x6c, - 0x69, 0x6e, 0x65, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, - 0x65, 0x12, 0x66, 0x0a, 0x13, 0x51, 0x75, 0x65, 0x72, 0x79, 0x4f, 0x66, 0x66, 0x6c, 0x69, 0x6e, - 0x65, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x26, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x6d, - 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x4f, - 0x66, 0x66, 0x6c, 0x69, 0x6e, 0x65, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x52, 0x65, 0x71, - 0x1a, 0x27, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x2e, 0x76, + 0x65, 0x6e, 0x74, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, + 0x6e, 0x74, 0x12, 0x1f, 0x0a, 0x0b, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x5f, 0x74, 0x69, 0x6d, + 0x65, 0x18, 0x08, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0a, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x54, + 0x69, 0x6d, 0x65, 0x22, 0x5e, 0x0a, 0x0e, 0x50, 0x75, 0x73, 0x68, 0x4d, 0x65, 0x73, 0x73, 0x61, + 0x67, 0x65, 0x52, 0x65, 0x71, 0x12, 0x31, 0x0a, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x6d, 0x65, 0x73, + 0x73, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x52, + 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x19, 0x0a, 0x08, 0x74, 0x6f, 0x5f, 0x75, + 0x73, 0x65, 0x72, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x07, 0x74, 0x6f, 0x55, 0x73, + 0x65, 0x72, 0x73, 0x22, 0x76, 0x0a, 0x0f, 0x50, 0x75, 0x73, 0x68, 0x4d, 0x65, 0x73, 0x73, 0x61, + 0x67, 0x65, 0x52, 0x65, 0x73, 0x70, 0x12, 0x40, 0x0a, 0x08, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x74, + 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x2e, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x2e, 0x42, 0x61, 0x73, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x52, 0x08, + 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x21, 0x0a, 0x0c, 0x66, 0x61, 0x69, 0x6c, + 0x65, 0x64, 0x5f, 0x75, 0x73, 0x65, 0x72, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0b, + 0x66, 0x61, 0x69, 0x6c, 0x65, 0x64, 0x55, 0x73, 0x65, 0x72, 0x73, 0x22, 0xbd, 0x01, 0x0a, 0x16, + 0x51, 0x75, 0x65, 0x72, 0x79, 0x4f, 0x66, 0x66, 0x6c, 0x69, 0x6e, 0x65, 0x4d, 0x65, 0x73, 0x73, + 0x61, 0x67, 0x65, 0x52, 0x65, 0x71, 0x12, 0x20, 0x0a, 0x07, 0x75, 0x73, 0x65, 0x72, 0x5f, 0x69, + 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10, 0x14, + 0x52, 0x06, 0x75, 0x73, 0x65, 0x72, 0x49, 0x64, 0x12, 0x27, 0x0a, 0x0b, 0x6c, 0x61, 0x73, 0x74, + 0x5f, 0x6d, 0x73, 0x67, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x42, 0x07, 0xfa, + 0x42, 0x04, 0x22, 0x02, 0x20, 0x00, 0x52, 0x09, 0x6c, 0x61, 0x73, 0x74, 0x4d, 0x73, 0x67, 0x49, + 0x64, 0x12, 0x1c, 0x0a, 0x09, 0x6f, 0x6e, 0x6c, 0x79, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x03, + 0x20, 0x01, 0x28, 0x08, 0x52, 0x09, 0x6f, 0x6e, 0x6c, 0x79, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x12, + 0x12, 0x0a, 0x04, 0x70, 0x61, 0x67, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x05, 0x52, 0x04, 0x70, + 0x61, 0x67, 0x65, 0x12, 0x26, 0x0a, 0x09, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x73, 0x69, 0x7a, 0x65, + 0x18, 0x05, 0x20, 0x01, 0x28, 0x05, 0x42, 0x09, 0xfa, 0x42, 0x06, 0x1a, 0x04, 0x18, 0x64, 0x28, + 0x01, 0x52, 0x08, 0x70, 0x61, 0x67, 0x65, 0x53, 0x69, 0x7a, 0x65, 0x22, 0xa6, 0x01, 0x0a, 0x17, + 0x51, 0x75, 0x65, 0x72, 0x79, 0x4f, 0x66, 0x66, 0x6c, 0x69, 0x6e, 0x65, 0x4d, 0x65, 0x73, 0x73, + 0x61, 0x67, 0x65, 0x52, 0x65, 0x73, 0x70, 0x12, 0x40, 0x0a, 0x08, 0x72, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x61, 0x70, 0x69, 0x2e, + 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x2e, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x2e, 0x42, 0x61, 0x73, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x52, + 0x08, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x74, 0x6f, 0x74, + 0x61, 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x12, + 0x33, 0x0a, 0x08, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, + 0x0b, 0x32, 0x17, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x2e, + 0x76, 0x31, 0x2e, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x52, 0x08, 0x6d, 0x65, 0x73, 0x73, + 0x61, 0x67, 0x65, 0x73, 0x2a, 0x34, 0x0a, 0x12, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x43, + 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x54, 0x79, 0x70, 0x65, 0x12, 0x08, 0x0a, 0x04, 0x54, 0x65, + 0x78, 0x74, 0x10, 0x00, 0x12, 0x09, 0x0a, 0x05, 0x49, 0x6d, 0x61, 0x67, 0x65, 0x10, 0x01, 0x12, + 0x09, 0x0a, 0x05, 0x56, 0x6f, 0x69, 0x63, 0x65, 0x10, 0x02, 0x32, 0x64, 0x0a, 0x12, 0x50, 0x75, + 0x73, 0x68, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, + 0x12, 0x4e, 0x0a, 0x0b, 0x50, 0x75, 0x73, 0x68, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, + 0x1e, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x31, + 0x2e, 0x50, 0x75, 0x73, 0x68, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x52, 0x65, 0x71, 0x1a, + 0x1f, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x31, + 0x2e, 0x50, 0x75, 0x73, 0x68, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x52, 0x65, 0x73, 0x70, + 0x32, 0x7f, 0x0a, 0x15, 0x4f, 0x66, 0x66, 0x6c, 0x69, 0x6e, 0x65, 0x4d, 0x65, 0x73, 0x73, 0x61, + 0x67, 0x65, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x66, 0x0a, 0x13, 0x51, 0x75, 0x65, + 0x72, 0x79, 0x4f, 0x66, 0x66, 0x6c, 0x69, 0x6e, 0x65, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, + 0x12, 0x26, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x4f, 0x66, 0x66, 0x6c, 0x69, 0x6e, 0x65, 0x4d, 0x65, - 0x73, 0x73, 0x61, 0x67, 0x65, 0x52, 0x65, 0x73, 0x70, 0x42, 0x23, 0x5a, 0x21, 0x67, 0x69, 0x74, - 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x67, 0x6f, 0x2d, 0x67, 0x6f, 0x69, 0x6d, 0x2f, - 0x61, 0x70, 0x69, 0x2f, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x2f, 0x76, 0x31, 0x62, 0x06, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x73, 0x73, 0x61, 0x67, 0x65, 0x52, 0x65, 0x71, 0x1a, 0x27, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x6d, + 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x4f, + 0x66, 0x66, 0x6c, 0x69, 0x6e, 0x65, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x52, 0x65, 0x73, + 0x70, 0x42, 0x23, 0x5a, 0x21, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, + 0x67, 0x6f, 0x2d, 0x67, 0x6f, 0x69, 0x6d, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x6d, 0x65, 0x73, 0x73, + 0x61, 0x67, 0x65, 0x2f, 0x76, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -794,9 +705,9 @@ var file_message_v1_message_proto_goTypes = []interface{}{ (MessageContentType)(0), // 0: api.message.v1.MessageContentType (*SendMessageReq)(nil), // 1: api.message.v1.SendMessageReq (*SendMessageResp)(nil), // 2: api.message.v1.SendMessageResp - (*MqMessage)(nil), // 3: api.message.v1.MqMessage + (*Message)(nil), // 3: api.message.v1.Message (*PushMessageReq)(nil), // 4: api.message.v1.PushMessageReq - (*BriefMessage)(nil), // 5: api.message.v1.BriefMessage + (*PushMessageResp)(nil), // 5: api.message.v1.PushMessageResp (*QueryOfflineMessageReq)(nil), // 6: api.message.v1.QueryOfflineMessageReq (*QueryOfflineMessageResp)(nil), // 7: api.message.v1.QueryOfflineMessageResp (v1.SessionType)(0), // 8: api.user.session.v1.SessionType @@ -805,23 +716,21 @@ var file_message_v1_message_proto_goTypes = []interface{}{ var file_message_v1_message_proto_depIdxs = []int32{ 8, // 0: api.message.v1.SendMessageReq.session_type:type_name -> api.user.session.v1.SessionType 0, // 1: api.message.v1.SendMessageReq.content_type:type_name -> api.message.v1.MessageContentType - 9, // 2: api.message.v1.SendMessageResp.response:type_name -> api.transport.response.BaseResponse - 8, // 3: api.message.v1.MqMessage.session_type:type_name -> api.user.session.v1.SessionType - 0, // 4: api.message.v1.MqMessage.content_type:type_name -> api.message.v1.MessageContentType - 8, // 5: api.message.v1.PushMessageReq.session_type:type_name -> api.user.session.v1.SessionType - 0, // 6: api.message.v1.PushMessageReq.content_type:type_name -> api.message.v1.MessageContentType - 0, // 7: api.message.v1.BriefMessage.content_type:type_name -> api.message.v1.MessageContentType - 9, // 8: api.message.v1.QueryOfflineMessageResp.response:type_name -> api.transport.response.BaseResponse - 5, // 9: api.message.v1.QueryOfflineMessageResp.messages:type_name -> api.message.v1.BriefMessage - 4, // 10: api.message.v1.PushMessageService.PushMessage:input_type -> api.message.v1.PushMessageReq - 6, // 11: api.message.v1.OfflineMessageService.QueryOfflineMessage:input_type -> api.message.v1.QueryOfflineMessageReq - 9, // 12: api.message.v1.PushMessageService.PushMessage:output_type -> api.transport.response.BaseResponse - 7, // 13: api.message.v1.OfflineMessageService.QueryOfflineMessage:output_type -> api.message.v1.QueryOfflineMessageResp - 12, // [12:14] is the sub-list for method output_type - 10, // [10:12] 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 + 8, // 2: api.message.v1.Message.session_type:type_name -> api.user.session.v1.SessionType + 0, // 3: api.message.v1.Message.content_type:type_name -> api.message.v1.MessageContentType + 3, // 4: api.message.v1.PushMessageReq.message:type_name -> api.message.v1.Message + 9, // 5: api.message.v1.PushMessageResp.response:type_name -> api.transport.response.BaseResponse + 9, // 6: api.message.v1.QueryOfflineMessageResp.response:type_name -> api.transport.response.BaseResponse + 3, // 7: api.message.v1.QueryOfflineMessageResp.messages:type_name -> api.message.v1.Message + 4, // 8: api.message.v1.PushMessageService.PushMessage:input_type -> api.message.v1.PushMessageReq + 6, // 9: api.message.v1.OfflineMessageService.QueryOfflineMessage:input_type -> api.message.v1.QueryOfflineMessageReq + 5, // 10: api.message.v1.PushMessageService.PushMessage:output_type -> api.message.v1.PushMessageResp + 7, // 11: api.message.v1.OfflineMessageService.QueryOfflineMessage:output_type -> api.message.v1.QueryOfflineMessageResp + 10, // [10:12] is the sub-list for method output_type + 8, // [8:10] is the sub-list for method input_type + 8, // [8:8] is the sub-list for extension type_name + 8, // [8:8] is the sub-list for extension extendee + 0, // [0:8] is the sub-list for field type_name } func init() { file_message_v1_message_proto_init() } @@ -855,7 +764,7 @@ func file_message_v1_message_proto_init() { } } file_message_v1_message_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*MqMessage); i { + switch v := v.(*Message); i { case 0: return &v.state case 1: @@ -879,7 +788,7 @@ func file_message_v1_message_proto_init() { } } file_message_v1_message_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*BriefMessage); i { + switch v := v.(*PushMessageResp); i { case 0: return &v.state case 1: @@ -915,7 +824,7 @@ func file_message_v1_message_proto_init() { } } } - file_message_v1_message_proto_msgTypes[3].OneofWrappers = []interface{}{} + file_message_v1_message_proto_msgTypes[0].OneofWrappers = []interface{}{} type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/message/v1/message.pb.validate.go b/message/v1/message.pb.validate.go index c50a329..17bc72f 100644 --- a/message/v1/message.pb.validate.go +++ b/message/v1/message.pb.validate.go @@ -57,9 +57,9 @@ func (m *SendMessageReq) validate(all bool) error { var errors []error - if utf8.RuneCountInString(m.GetFromUser()) < 20 { + if utf8.RuneCountInString(m.GetFrom()) < 20 { err := SendMessageReqValidationError{ - field: "FromUser", + field: "From", reason: "value length must be at least 20 runes", } if !all { @@ -68,9 +68,9 @@ func (m *SendMessageReq) validate(all bool) error { errors = append(errors, err) } - if utf8.RuneCountInString(m.GetToUser()) < 20 { + if utf8.RuneCountInString(m.GetTo()) < 20 { err := SendMessageReqValidationError{ - field: "ToUser", + field: "To", reason: "value length must be at least 20 runes", } if !all { @@ -103,6 +103,10 @@ func (m *SendMessageReq) validate(all bool) error { errors = append(errors, err) } + if m.SessionId != nil { + // no validation rules for SessionId + } + if len(errors) > 0 { return SendMessageReqMultiError(errors) } @@ -203,38 +207,9 @@ func (m *SendMessageResp) validate(all bool) error { var errors []error - if all { - switch v := interface{}(m.GetResponse()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, SendMessageRespValidationError{ - field: "Response", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, SendMessageRespValidationError{ - field: "Response", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetResponse()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return SendMessageRespValidationError{ - field: "Response", - reason: "embedded message failed validation", - cause: err, - } - } - } - // no validation rules for SessionId - // no validation rules for MsgSeq + // no validation rules for MsgId if len(errors) > 0 { return SendMessageRespMultiError(errors) @@ -314,53 +289,56 @@ var _ interface { ErrorName() string } = SendMessageRespValidationError{} -// Validate checks the field values on MqMessage with the rules defined in the +// Validate checks the field values on Message with the rules defined in the // proto definition for this message. If any rules are violated, the first // error encountered is returned, or nil if there are no violations. -func (m *MqMessage) Validate() error { +func (m *Message) Validate() error { return m.validate(false) } -// ValidateAll checks the field values on MqMessage with the rules defined in -// the proto definition for this message. If any rules are violated, the -// result is a list of violation errors wrapped in MqMessageMultiError, or nil -// if none found. -func (m *MqMessage) ValidateAll() error { +// ValidateAll checks the field values on Message with the rules defined in the +// proto definition for this message. If any rules are violated, the result is +// a list of violation errors wrapped in MessageMultiError, or nil if none found. +func (m *Message) ValidateAll() error { return m.validate(true) } -func (m *MqMessage) validate(all bool) error { +func (m *Message) validate(all bool) error { if m == nil { return nil } var errors []error - // no validation rules for FromUser + // no validation rules for MsgId - // no validation rules for ToUser + // no validation rules for From + + // no validation rules for To // no validation rules for SessionType + // no validation rules for SessionId + // no validation rules for ContentType // no validation rules for Content - // no validation rules for SessionId + // no validation rules for CreateTime if len(errors) > 0 { - return MqMessageMultiError(errors) + return MessageMultiError(errors) } return nil } -// MqMessageMultiError is an error wrapping multiple validation errors returned -// by MqMessage.ValidateAll() if the designated constraints aren't met. -type MqMessageMultiError []error +// MessageMultiError is an error wrapping multiple validation errors returned +// by Message.ValidateAll() if the designated constraints aren't met. +type MessageMultiError []error // Error returns a concatenation of all the error messages it wraps. -func (m MqMessageMultiError) Error() string { +func (m MessageMultiError) Error() string { var msgs []string for _, err := range m { msgs = append(msgs, err.Error()) @@ -369,11 +347,11 @@ func (m MqMessageMultiError) Error() string { } // AllErrors returns a list of validation violation errors. -func (m MqMessageMultiError) AllErrors() []error { return m } +func (m MessageMultiError) AllErrors() []error { return m } -// MqMessageValidationError is the validation error returned by -// MqMessage.Validate if the designated constraints aren't met. -type MqMessageValidationError struct { +// MessageValidationError is the validation error returned by Message.Validate +// if the designated constraints aren't met. +type MessageValidationError struct { field string reason string cause error @@ -381,22 +359,22 @@ type MqMessageValidationError struct { } // Field function returns field value. -func (e MqMessageValidationError) Field() string { return e.field } +func (e MessageValidationError) Field() string { return e.field } // Reason function returns reason value. -func (e MqMessageValidationError) Reason() string { return e.reason } +func (e MessageValidationError) Reason() string { return e.reason } // Cause function returns cause value. -func (e MqMessageValidationError) Cause() error { return e.cause } +func (e MessageValidationError) Cause() error { return e.cause } // Key function returns key value. -func (e MqMessageValidationError) Key() bool { return e.key } +func (e MessageValidationError) Key() bool { return e.key } // ErrorName returns error name. -func (e MqMessageValidationError) ErrorName() string { return "MqMessageValidationError" } +func (e MessageValidationError) ErrorName() string { return "MessageValidationError" } // Error satisfies the builtin error interface -func (e MqMessageValidationError) Error() string { +func (e MessageValidationError) Error() string { cause := "" if e.cause != nil { cause = fmt.Sprintf(" | caused by: %v", e.cause) @@ -408,14 +386,14 @@ func (e MqMessageValidationError) Error() string { } return fmt.Sprintf( - "invalid %sMqMessage.%s: %s%s", + "invalid %sMessage.%s: %s%s", key, e.field, e.reason, cause) } -var _ error = MqMessageValidationError{} +var _ error = MessageValidationError{} var _ interface { Field() string @@ -423,7 +401,7 @@ var _ interface { Key() bool Cause() error ErrorName() string -} = MqMessageValidationError{} +} = MessageValidationError{} // Validate checks the field values on PushMessageReq with the rules defined in // the proto definition for this message. If any rules are violated, the first @@ -447,22 +425,33 @@ func (m *PushMessageReq) validate(all bool) error { var errors []error - // no validation rules for FromUser - - // no validation rules for ToUser - - // no validation rules for SessionType - - // no validation rules for ContentType - - // no validation rules for Content - - // no validation rules for MsgSeq - - // no validation rules for SessionId - - if m.ToGroup != nil { - // no validation rules for ToGroup + if all { + switch v := interface{}(m.GetMessage()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, PushMessageReqValidationError{ + field: "Message", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, PushMessageReqValidationError{ + field: "Message", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetMessage()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return PushMessageReqValidationError{ + field: "Message", + reason: "embedded message failed validation", + cause: err, + } + } } if len(errors) > 0 { @@ -543,53 +532,71 @@ var _ interface { ErrorName() string } = PushMessageReqValidationError{} -// Validate checks the field values on BriefMessage with the rules defined in -// the proto definition for this message. If any rules are violated, the first -// error encountered is returned, or nil if there are no violations. -func (m *BriefMessage) Validate() error { +// Validate checks the field values on PushMessageResp with the rules defined +// in the proto definition for this message. If any rules are violated, the +// first error encountered is returned, or nil if there are no violations. +func (m *PushMessageResp) Validate() error { return m.validate(false) } -// ValidateAll checks the field values on BriefMessage with the rules defined -// in the proto definition for this message. If any rules are violated, the -// result is a list of violation errors wrapped in BriefMessageMultiError, or -// nil if none found. -func (m *BriefMessage) ValidateAll() error { +// ValidateAll checks the field values on PushMessageResp with the rules +// defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// PushMessageRespMultiError, or nil if none found. +func (m *PushMessageResp) ValidateAll() error { return m.validate(true) } -func (m *BriefMessage) validate(all bool) error { +func (m *PushMessageResp) validate(all bool) error { if m == nil { return nil } var errors []error - // no validation rules for FromUser - - // no validation rules for ToUser - - // no validation rules for ContentType - - // no validation rules for Content - - // no validation rules for MsgSeq - - // no validation rules for SessionId + if all { + switch v := interface{}(m.GetResponse()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, PushMessageRespValidationError{ + field: "Response", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, PushMessageRespValidationError{ + field: "Response", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetResponse()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return PushMessageRespValidationError{ + field: "Response", + reason: "embedded message failed validation", + cause: err, + } + } + } if len(errors) > 0 { - return BriefMessageMultiError(errors) + return PushMessageRespMultiError(errors) } return nil } -// BriefMessageMultiError is an error wrapping multiple validation errors -// returned by BriefMessage.ValidateAll() if the designated constraints aren't met. -type BriefMessageMultiError []error +// PushMessageRespMultiError is an error wrapping multiple validation errors +// returned by PushMessageResp.ValidateAll() if the designated constraints +// aren't met. +type PushMessageRespMultiError []error // Error returns a concatenation of all the error messages it wraps. -func (m BriefMessageMultiError) Error() string { +func (m PushMessageRespMultiError) Error() string { var msgs []string for _, err := range m { msgs = append(msgs, err.Error()) @@ -598,11 +605,11 @@ func (m BriefMessageMultiError) Error() string { } // AllErrors returns a list of validation violation errors. -func (m BriefMessageMultiError) AllErrors() []error { return m } +func (m PushMessageRespMultiError) AllErrors() []error { return m } -// BriefMessageValidationError is the validation error returned by -// BriefMessage.Validate if the designated constraints aren't met. -type BriefMessageValidationError struct { +// PushMessageRespValidationError is the validation error returned by +// PushMessageResp.Validate if the designated constraints aren't met. +type PushMessageRespValidationError struct { field string reason string cause error @@ -610,22 +617,22 @@ type BriefMessageValidationError struct { } // Field function returns field value. -func (e BriefMessageValidationError) Field() string { return e.field } +func (e PushMessageRespValidationError) Field() string { return e.field } // Reason function returns reason value. -func (e BriefMessageValidationError) Reason() string { return e.reason } +func (e PushMessageRespValidationError) Reason() string { return e.reason } // Cause function returns cause value. -func (e BriefMessageValidationError) Cause() error { return e.cause } +func (e PushMessageRespValidationError) Cause() error { return e.cause } // Key function returns key value. -func (e BriefMessageValidationError) Key() bool { return e.key } +func (e PushMessageRespValidationError) Key() bool { return e.key } // ErrorName returns error name. -func (e BriefMessageValidationError) ErrorName() string { return "BriefMessageValidationError" } +func (e PushMessageRespValidationError) ErrorName() string { return "PushMessageRespValidationError" } // Error satisfies the builtin error interface -func (e BriefMessageValidationError) Error() string { +func (e PushMessageRespValidationError) Error() string { cause := "" if e.cause != nil { cause = fmt.Sprintf(" | caused by: %v", e.cause) @@ -637,14 +644,14 @@ func (e BriefMessageValidationError) Error() string { } return fmt.Sprintf( - "invalid %sBriefMessage.%s: %s%s", + "invalid %sPushMessageResp.%s: %s%s", key, e.field, e.reason, cause) } -var _ error = BriefMessageValidationError{} +var _ error = PushMessageRespValidationError{} var _ interface { Field() string @@ -652,7 +659,7 @@ var _ interface { Key() bool Cause() error ErrorName() string -} = BriefMessageValidationError{} +} = PushMessageRespValidationError{} // Validate checks the field values on QueryOfflineMessageReq with the rules // defined in the proto definition for this message. If any rules are @@ -687,10 +694,10 @@ func (m *QueryOfflineMessageReq) validate(all bool) error { errors = append(errors, err) } - if utf8.RuneCountInString(m.GetLastMsgSeq()) < 10 { + if m.GetLastMsgId() <= 0 { err := QueryOfflineMessageReqValidationError{ - field: "LastMsgSeq", - reason: "value length must be at least 10 runes", + field: "LastMsgId", + reason: "value must be greater than 0", } if !all { return err diff --git a/message/v1/message.proto b/message/v1/message.proto index 16d6e0c..76d0824 100644 --- a/message/v1/message.proto +++ b/message/v1/message.proto @@ -16,11 +16,12 @@ enum MessageContentType { // SendMessageReq receive data from gateway message SendMessageReq { - string from_user = 1 [(validate.rules).string.min_len = 20]; - string to_user = 2 [(validate.rules).string.min_len = 20]; + string from = 1 [(validate.rules).string.min_len = 20]; + string to = 2 [(validate.rules).string.min_len = 20]; user.session.v1.SessionType session_type = 3; - MessageContentType content_type = 4 [(validate.rules).enum.defined_only = true]; - string content = 5 [(validate.rules).string = { + optional string session_id = 4; + MessageContentType content_type = 5 [(validate.rules).enum.defined_only = true]; + string content = 6 [(validate.rules).string = { min_len: 1, max_len: 4096 }]; @@ -28,52 +29,41 @@ message SendMessageReq { // SendMessageResp is response body for sendMessage message SendMessageResp { - transport.response.BaseResponse response = 1; - // MsgSeq is unique seq of a message int64 session_id = 2; - string msg_seq = 3; + int64 msg_id = 3; } -// MqMessage is message protocol when pub/sub msg to mq -message MqMessage { - string from_user = 1; - string to_user = 2; - user.session.v1.SessionType session_type = 3; - MessageContentType content_type = 4; - string content = 5; - int64 session_id = 6; +// Message is definition of message +message Message { + int64 msg_id = 1; + string from = 2; + string to = 3; // to user id or group id + user.session.v1.SessionType session_type = 4; + int64 session_id = 5; + MessageContentType content_type = 6; + string content = 7; + int64 create_time = 8; } // PushMessage use for push a message to persistence connection server message PushMessageReq { - string from_user = 1; - string to_user = 2; - // to_group is validate when session_type is Group - optional string to_group = 3; - user.session.v1.SessionType session_type = 4; - MessageContentType content_type = 5; - string content = 6; - string msg_seq = 7; - int64 session_id = 8; + Message message = 1; + // ToUsers is a list of user id who receive this message + repeated string to_users = 2; } -service PushMessageService { - rpc PushMessage(PushMessageReq) returns (transport.response.BaseResponse); +message PushMessageResp { + transport.response.BaseResponse response = 1; + repeated string failed_users = 2; } -// BriefMessage is message with basic information -message BriefMessage { - string from_user = 1; - string to_user = 2; - MessageContentType content_type = 3; - string content = 4; - string msg_seq = 5; - int64 session_id = 6; +service PushMessageService { + rpc PushMessage(PushMessageReq) returns (PushMessageResp); } message QueryOfflineMessageReq { string user_id = 1 [(validate.rules).string.min_len = 20]; - string last_msg_seq = 2 [(validate.rules).string.min_len = 10]; + int64 last_msg_id = 2 [(validate.rules).int64.gt = 0]; bool onlyCount = 3; int32 page = 4; int32 page_size = 5 [(validate.rules).int32 = { @@ -85,7 +75,7 @@ message QueryOfflineMessageReq { message QueryOfflineMessageResp { transport.response.BaseResponse response = 1; int32 total = 2; - repeated BriefMessage messages = 3; + repeated Message messages = 3; } service OfflineMessageService { diff --git a/message/v1/message_grpc.pb.go b/message/v1/message_grpc.pb.go index c73c2bd..0e87907 100644 --- a/message/v1/message_grpc.pb.go +++ b/message/v1/message_grpc.pb.go @@ -4,7 +4,6 @@ package v1 import ( context "context" - response "github.com/go-goim/api/transport/response" grpc "google.golang.org/grpc" codes "google.golang.org/grpc/codes" status "google.golang.org/grpc/status" @@ -19,7 +18,7 @@ const _ = grpc.SupportPackageIsVersion7 // // 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 PushMessageServiceClient interface { - PushMessage(ctx context.Context, in *PushMessageReq, opts ...grpc.CallOption) (*response.BaseResponse, error) + PushMessage(ctx context.Context, in *PushMessageReq, opts ...grpc.CallOption) (*PushMessageResp, error) } type pushMessageServiceClient struct { @@ -30,8 +29,8 @@ func NewPushMessageServiceClient(cc grpc.ClientConnInterface) PushMessageService return &pushMessageServiceClient{cc} } -func (c *pushMessageServiceClient) PushMessage(ctx context.Context, in *PushMessageReq, opts ...grpc.CallOption) (*response.BaseResponse, error) { - out := new(response.BaseResponse) +func (c *pushMessageServiceClient) PushMessage(ctx context.Context, in *PushMessageReq, opts ...grpc.CallOption) (*PushMessageResp, error) { + out := new(PushMessageResp) err := c.cc.Invoke(ctx, "/api.message.v1.PushMessageService/PushMessage", in, out, opts...) if err != nil { return nil, err @@ -43,7 +42,7 @@ func (c *pushMessageServiceClient) PushMessage(ctx context.Context, in *PushMess // All implementations must embed UnimplementedPushMessageServiceServer // for forward compatibility type PushMessageServiceServer interface { - PushMessage(context.Context, *PushMessageReq) (*response.BaseResponse, error) + PushMessage(context.Context, *PushMessageReq) (*PushMessageResp, error) mustEmbedUnimplementedPushMessageServiceServer() } @@ -51,7 +50,7 @@ type PushMessageServiceServer interface { type UnimplementedPushMessageServiceServer struct { } -func (UnimplementedPushMessageServiceServer) PushMessage(context.Context, *PushMessageReq) (*response.BaseResponse, error) { +func (UnimplementedPushMessageServiceServer) PushMessage(context.Context, *PushMessageReq) (*PushMessageResp, error) { return nil, status.Errorf(codes.Unimplemented, "method PushMessage not implemented") } func (UnimplementedPushMessageServiceServer) mustEmbedUnimplementedPushMessageServiceServer() {} From 8b0b0926afbb6a24628698530a64e6e223fa62c5 Mon Sep 17 00:00:00 2001 From: yusank Date: Wed, 13 Jul 2022 10:40:15 +0800 Subject: [PATCH 17/35] fix: config --- config/v1/config.pb.go | 12 ++++++------ config/v1/config.pb.validate.go | 10 +++++----- config/v1/config.proto | 2 +- 3 files changed, 12 insertions(+), 12 deletions(-) diff --git a/config/v1/config.pb.go b/config/v1/config.pb.go index f52f3a5..23cda00 100644 --- a/config/v1/config.pb.go +++ b/config/v1/config.pb.go @@ -162,7 +162,7 @@ type Service struct { Redis *Redis `protobuf:"bytes,7,opt,name=redis,proto3" json:"redis,omitempty"` Mq *MQ `protobuf:"bytes,8,opt,name=mq,proto3" json:"mq,omitempty"` Mysql *MySQL `protobuf:"bytes,9,opt,name=mysql,proto3" json:"mysql,omitempty"` - Hbase *HBase `protobuf:"bytes,10,opt,name=hbase,proto3" json:"hbase,omitempty"` + HBase *HBase `protobuf:"bytes,10,opt,name=hBase,proto3" json:"hBase,omitempty"` // services name GatewayService string `protobuf:"bytes,11,opt,name=gatewayService,proto3" json:"gatewayService,omitempty"` UserService string `protobuf:"bytes,12,opt,name=userService,proto3" json:"userService,omitempty"` @@ -267,9 +267,9 @@ func (x *Service) GetMysql() *MySQL { return nil } -func (x *Service) GetHbase() *HBase { +func (x *Service) GetHBase() *HBase { if x != nil { - return x.Hbase + return x.HBase } return nil } @@ -723,10 +723,10 @@ var file_config_v1_config_proto_rawDesc = []byte{ 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x51, 0x52, 0x02, 0x6d, 0x71, 0x12, 0x2a, 0x0a, 0x05, 0x6d, 0x79, 0x73, 0x71, 0x6c, 0x18, 0x09, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x79, - 0x53, 0x51, 0x4c, 0x52, 0x05, 0x6d, 0x79, 0x73, 0x71, 0x6c, 0x12, 0x2a, 0x0a, 0x05, 0x68, 0x62, + 0x53, 0x51, 0x4c, 0x52, 0x05, 0x6d, 0x79, 0x73, 0x71, 0x6c, 0x12, 0x2a, 0x0a, 0x05, 0x68, 0x42, 0x61, 0x73, 0x65, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x76, 0x31, 0x2e, 0x48, 0x42, 0x61, 0x73, 0x65, 0x52, - 0x05, 0x68, 0x62, 0x61, 0x73, 0x65, 0x12, 0x26, 0x0a, 0x0e, 0x67, 0x61, 0x74, 0x65, 0x77, 0x61, + 0x05, 0x68, 0x42, 0x61, 0x73, 0x65, 0x12, 0x26, 0x0a, 0x0e, 0x67, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x67, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x75, 0x73, 0x65, 0x72, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x18, 0x0c, 0x20, @@ -841,7 +841,7 @@ var file_config_v1_config_proto_depIdxs = []int32{ 4, // 5: api.config.v1.Service.redis:type_name -> api.config.v1.Redis 5, // 6: api.config.v1.Service.mq:type_name -> api.config.v1.MQ 6, // 7: api.config.v1.Service.mysql:type_name -> api.config.v1.MySQL - 7, // 8: api.config.v1.Service.hbase:type_name -> api.config.v1.HBase + 7, // 8: api.config.v1.Service.hBase:type_name -> api.config.v1.HBase 0, // 9: api.config.v1.Log.level:type_name -> api.config.v1.Level 9, // 10: api.config.v1.Redis.dial_timeout:type_name -> google.protobuf.Duration 9, // 11: api.config.v1.Redis.idle_timeout:type_name -> google.protobuf.Duration diff --git a/config/v1/config.pb.validate.go b/config/v1/config.pb.validate.go index 892034d..edc8447 100644 --- a/config/v1/config.pb.validate.go +++ b/config/v1/config.pb.validate.go @@ -354,11 +354,11 @@ func (m *Service) validate(all bool) error { } if all { - switch v := interface{}(m.GetHbase()).(type) { + switch v := interface{}(m.GetHBase()).(type) { case interface{ ValidateAll() error }: if err := v.ValidateAll(); err != nil { errors = append(errors, ServiceValidationError{ - field: "Hbase", + field: "HBase", reason: "embedded message failed validation", cause: err, }) @@ -366,16 +366,16 @@ func (m *Service) validate(all bool) error { case interface{ Validate() error }: if err := v.Validate(); err != nil { errors = append(errors, ServiceValidationError{ - field: "Hbase", + field: "HBase", reason: "embedded message failed validation", cause: err, }) } } - } else if v, ok := interface{}(m.GetHbase()).(interface{ Validate() error }); ok { + } else if v, ok := interface{}(m.GetHBase()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return ServiceValidationError{ - field: "Hbase", + field: "HBase", reason: "embedded message failed validation", cause: err, } diff --git a/config/v1/config.proto b/config/v1/config.proto index ae1d565..9a0e4cd 100644 --- a/config/v1/config.proto +++ b/config/v1/config.proto @@ -52,7 +52,7 @@ message Service { Redis redis = 7; MQ mq = 8; MySQL mysql = 9; - HBase hbase = 10; + HBase hBase = 10; // services name string gatewayService = 11; string userService = 12; From 5de68ea54e365083d8a52f9810cc0d31b16185e7 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 13 Jul 2022 12:57:45 +0000 Subject: [PATCH 18/35] build(deps): bump google.golang.org/grpc from 1.47.0 to 1.48.0 Bumps [google.golang.org/grpc](https://github.com/grpc/grpc-go) from 1.47.0 to 1.48.0. - [Release notes](https://github.com/grpc/grpc-go/releases) - [Commits](https://github.com/grpc/grpc-go/compare/v1.47.0...v1.48.0) --- updated-dependencies: - dependency-name: google.golang.org/grpc dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- go.mod | 2 +- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index 130bd10..0ac9692 100644 --- a/go.mod +++ b/go.mod @@ -5,7 +5,7 @@ go 1.18 require ( github.com/envoyproxy/protoc-gen-validate v0.6.7 github.com/stretchr/testify v1.8.0 - google.golang.org/grpc v1.47.0 + google.golang.org/grpc v1.48.0 google.golang.org/protobuf v1.28.0 ) diff --git a/go.sum b/go.sum index dec3e9e..e394b96 100644 --- a/go.sum +++ b/go.sum @@ -146,8 +146,8 @@ google.golang.org/grpc v1.25.1/go.mod h1:c3i+UQWmh7LiEpx4sFZnkU36qjEYZ0imhYfXVyQ google.golang.org/grpc v1.27.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= google.golang.org/grpc v1.33.1/go.mod h1:fr5YgcSWrqhRRxogOsw7RzIpsmvOZ6IcH4kBYTpR3n0= google.golang.org/grpc v1.36.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= -google.golang.org/grpc v1.47.0 h1:9n77onPX5F3qfFCqjy9dhn8PbNQsIKeVU04J9G7umt8= -google.golang.org/grpc v1.47.0/go.mod h1:vN9eftEi1UMyUsIF80+uQXhHjbXYbm0uXoFCACuMGWk= +google.golang.org/grpc v1.48.0 h1:rQOsyJ/8+ufEDJd/Gdsz7HG220Mh9HAhFHRGnIjda0w= +google.golang.org/grpc v1.48.0/go.mod h1:vN9eftEi1UMyUsIF80+uQXhHjbXYbm0uXoFCACuMGWk= google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM= From 81e175a90a0b91b7b84919009cf5b9d9f6fd2939 Mon Sep 17 00:00:00 2001 From: yusank Date: Fri, 15 Jul 2022 18:21:01 +0800 Subject: [PATCH 19/35] feat: chaneg uid and gui to int64 #7 --- Makefile | 2 + message/v1/message.pb.go | 332 ++++++----- message/v1/message.pb.validate.go | 14 +- message/v1/message.proto | 36 +- user/friend/v1/friend.pb.go | 779 +++++++++++-------------- user/friend/v1/friend.pb.validate.go | 211 ++----- user/friend/v1/friend.proto | 70 +-- user/friend/v1/friend_grpc.pb.go | 24 +- user/group/v1/group.pb.go | 622 ++++++++------------ user/group/v1/group.pb.validate.go | 371 +++--------- user/group/v1/group.proto | 66 +-- user/group/v1/group_grpc.pb.go | 28 +- user/session/v1/session.pb.go | 137 ----- user/session/v1/session.pb.validate.go | 36 -- user/session/v1/session.proto | 15 - user/v1/user.ext.go | 15 - user/v1/user.pb.go | 621 ++++++++------------ user/v1/user.pb.validate.go | 241 +++----- user/v1/user.proto | 52 +- user/v1/user_grpc.pb.go | 40 +- 20 files changed, 1374 insertions(+), 2338 deletions(-) delete mode 100644 user/session/v1/session.pb.go delete mode 100644 user/session/v1/session.pb.validate.go delete mode 100644 user/session/v1/session.proto delete mode 100644 user/v1/user.ext.go diff --git a/Makefile b/Makefile index a24202f..ee27903 100644 --- a/Makefile +++ b/Makefile @@ -59,8 +59,10 @@ tools-install: ## Install tools. .PHONY: buf buf: ## run buf generate command. @printf $(COLOR) "Generating buf code..." + @echo $(NEWLINE) buf generate @printf $(COLOR) "Done." + @echo $(NEWLINE) ################################################## # General # diff --git a/message/v1/message.pb.go b/message/v1/message.pb.go index b7589a5..3a5a8fc 100644 --- a/message/v1/message.pb.go +++ b/message/v1/message.pb.go @@ -9,7 +9,6 @@ package v1 import ( _ "github.com/envoyproxy/protoc-gen-validate/validate" response "github.com/go-goim/api/transport/response" - v1 "github.com/go-goim/api/user/session/v1" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" reflect "reflect" @@ -72,15 +71,70 @@ func (MessageContentType) EnumDescriptor() ([]byte, []int) { return file_message_v1_message_proto_rawDescGZIP(), []int{0} } +// define session type and status +type SessionType int32 + +const ( + SessionType_SingleChat SessionType = 0 + SessionType_GroupChat SessionType = 1 + // broadcast actually not a standard chat type, but we still use it here + SessionType_Broadcast SessionType = 2 + // Channel is for user subscribed channel msgs + SessionType_Channel SessionType = 3 // 255 at most +) + +// Enum value maps for SessionType. +var ( + SessionType_name = map[int32]string{ + 0: "SingleChat", + 1: "GroupChat", + 2: "Broadcast", + 3: "Channel", + } + SessionType_value = map[string]int32{ + "SingleChat": 0, + "GroupChat": 1, + "Broadcast": 2, + "Channel": 3, + } +) + +func (x SessionType) Enum() *SessionType { + p := new(SessionType) + *p = x + return p +} + +func (x SessionType) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (SessionType) Descriptor() protoreflect.EnumDescriptor { + return file_message_v1_message_proto_enumTypes[1].Descriptor() +} + +func (SessionType) Type() protoreflect.EnumType { + return &file_message_v1_message_proto_enumTypes[1] +} + +func (x SessionType) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use SessionType.Descriptor instead. +func (SessionType) EnumDescriptor() ([]byte, []int) { + return file_message_v1_message_proto_rawDescGZIP(), []int{1} +} + // SendMessageReq receive data from gateway type SendMessageReq struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - From string `protobuf:"bytes,1,opt,name=from,proto3" json:"from,omitempty"` - To string `protobuf:"bytes,2,opt,name=to,proto3" json:"to,omitempty"` - SessionType v1.SessionType `protobuf:"varint,3,opt,name=session_type,json=sessionType,proto3,enum=api.user.session.v1.SessionType" json:"session_type,omitempty"` + From int64 `protobuf:"varint,1,opt,name=from,proto3" json:"from,omitempty"` + To int64 `protobuf:"varint,2,opt,name=to,proto3" json:"to,omitempty"` + SessionType SessionType `protobuf:"varint,3,opt,name=session_type,json=sessionType,proto3,enum=api.message.v1.SessionType" json:"session_type,omitempty"` SessionId *string `protobuf:"bytes,4,opt,name=session_id,json=sessionId,proto3,oneof" json:"session_id,omitempty"` ContentType MessageContentType `protobuf:"varint,5,opt,name=content_type,json=contentType,proto3,enum=api.message.v1.MessageContentType" json:"content_type,omitempty"` Content string `protobuf:"bytes,6,opt,name=content,proto3" json:"content,omitempty"` @@ -118,25 +172,25 @@ func (*SendMessageReq) Descriptor() ([]byte, []int) { return file_message_v1_message_proto_rawDescGZIP(), []int{0} } -func (x *SendMessageReq) GetFrom() string { +func (x *SendMessageReq) GetFrom() int64 { if x != nil { return x.From } - return "" + return 0 } -func (x *SendMessageReq) GetTo() string { +func (x *SendMessageReq) GetTo() int64 { if x != nil { return x.To } - return "" + return 0 } -func (x *SendMessageReq) GetSessionType() v1.SessionType { +func (x *SendMessageReq) GetSessionType() SessionType { if x != nil { return x.SessionType } - return v1.SessionType_SingleChat + return SessionType_SingleChat } func (x *SendMessageReq) GetSessionId() string { @@ -166,8 +220,8 @@ type SendMessageResp struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - SessionId int64 `protobuf:"varint,2,opt,name=session_id,json=sessionId,proto3" json:"session_id,omitempty"` - MsgId int64 `protobuf:"varint,3,opt,name=msg_id,json=msgId,proto3" json:"msg_id,omitempty"` + SessionId string `protobuf:"bytes,1,opt,name=session_id,json=sessionId,proto3" json:"session_id,omitempty"` + MsgId int64 `protobuf:"varint,2,opt,name=msg_id,json=msgId,proto3" json:"msg_id,omitempty"` } func (x *SendMessageResp) Reset() { @@ -202,11 +256,11 @@ func (*SendMessageResp) Descriptor() ([]byte, []int) { return file_message_v1_message_proto_rawDescGZIP(), []int{1} } -func (x *SendMessageResp) GetSessionId() int64 { +func (x *SendMessageResp) GetSessionId() string { if x != nil { return x.SessionId } - return 0 + return "" } func (x *SendMessageResp) GetMsgId() int64 { @@ -223,10 +277,10 @@ type Message struct { unknownFields protoimpl.UnknownFields MsgId int64 `protobuf:"varint,1,opt,name=msg_id,json=msgId,proto3" json:"msg_id,omitempty"` - From string `protobuf:"bytes,2,opt,name=from,proto3" json:"from,omitempty"` - To string `protobuf:"bytes,3,opt,name=to,proto3" json:"to,omitempty"` // to user id or group id - SessionType v1.SessionType `protobuf:"varint,4,opt,name=session_type,json=sessionType,proto3,enum=api.user.session.v1.SessionType" json:"session_type,omitempty"` - SessionId int64 `protobuf:"varint,5,opt,name=session_id,json=sessionId,proto3" json:"session_id,omitempty"` + From int64 `protobuf:"varint,2,opt,name=from,proto3" json:"from,omitempty"` + To int64 `protobuf:"varint,3,opt,name=to,proto3" json:"to,omitempty"` // user id or group id or room id etc. + SessionType SessionType `protobuf:"varint,4,opt,name=session_type,json=sessionType,proto3,enum=api.message.v1.SessionType" json:"session_type,omitempty"` + SessionId string `protobuf:"bytes,5,opt,name=session_id,json=sessionId,proto3" json:"session_id,omitempty"` ContentType MessageContentType `protobuf:"varint,6,opt,name=content_type,json=contentType,proto3,enum=api.message.v1.MessageContentType" json:"content_type,omitempty"` Content string `protobuf:"bytes,7,opt,name=content,proto3" json:"content,omitempty"` CreateTime int64 `protobuf:"varint,8,opt,name=create_time,json=createTime,proto3" json:"create_time,omitempty"` @@ -271,32 +325,32 @@ func (x *Message) GetMsgId() int64 { return 0 } -func (x *Message) GetFrom() string { +func (x *Message) GetFrom() int64 { if x != nil { return x.From } - return "" + return 0 } -func (x *Message) GetTo() string { +func (x *Message) GetTo() int64 { if x != nil { return x.To } - return "" + return 0 } -func (x *Message) GetSessionType() v1.SessionType { +func (x *Message) GetSessionType() SessionType { if x != nil { return x.SessionType } - return v1.SessionType_SingleChat + return SessionType_SingleChat } -func (x *Message) GetSessionId() int64 { +func (x *Message) GetSessionId() string { if x != nil { return x.SessionId } - return 0 + return "" } func (x *Message) GetContentType() MessageContentType { @@ -328,7 +382,7 @@ type PushMessageReq struct { Message *Message `protobuf:"bytes,1,opt,name=message,proto3" json:"message,omitempty"` // ToUsers is a list of user id who receive this message - ToUsers []string `protobuf:"bytes,2,rep,name=to_users,json=toUsers,proto3" json:"to_users,omitempty"` + ToUsers []int64 `protobuf:"varint,2,rep,packed,name=to_users,json=toUsers,proto3" json:"to_users,omitempty"` } func (x *PushMessageReq) Reset() { @@ -370,7 +424,7 @@ func (x *PushMessageReq) GetMessage() *Message { return nil } -func (x *PushMessageReq) GetToUsers() []string { +func (x *PushMessageReq) GetToUsers() []int64 { if x != nil { return x.ToUsers } @@ -383,7 +437,7 @@ type PushMessageResp struct { unknownFields protoimpl.UnknownFields Response *response.BaseResponse `protobuf:"bytes,1,opt,name=response,proto3" json:"response,omitempty"` - FailedUsers []string `protobuf:"bytes,2,rep,name=failed_users,json=failedUsers,proto3" json:"failed_users,omitempty"` + FailedUsers []int64 `protobuf:"varint,2,rep,packed,name=failed_users,json=failedUsers,proto3" json:"failed_users,omitempty"` } func (x *PushMessageResp) Reset() { @@ -425,7 +479,7 @@ func (x *PushMessageResp) GetResponse() *response.BaseResponse { return nil } -func (x *PushMessageResp) GetFailedUsers() []string { +func (x *PushMessageResp) GetFailedUsers() []int64 { if x != nil { return x.FailedUsers } @@ -437,11 +491,11 @@ type QueryOfflineMessageReq struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - UserId string `protobuf:"bytes,1,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty"` - LastMsgId int64 `protobuf:"varint,2,opt,name=last_msg_id,json=lastMsgId,proto3" json:"last_msg_id,omitempty"` - OnlyCount bool `protobuf:"varint,3,opt,name=onlyCount,proto3" json:"onlyCount,omitempty"` - Page int32 `protobuf:"varint,4,opt,name=page,proto3" json:"page,omitempty"` - PageSize int32 `protobuf:"varint,5,opt,name=page_size,json=pageSize,proto3" json:"page_size,omitempty"` + Uid int64 `protobuf:"varint,1,opt,name=uid,proto3" json:"uid,omitempty"` + LastMsgId int64 `protobuf:"varint,2,opt,name=last_msg_id,json=lastMsgId,proto3" json:"last_msg_id,omitempty"` + OnlyCount bool `protobuf:"varint,3,opt,name=onlyCount,proto3" json:"onlyCount,omitempty"` + Page int32 `protobuf:"varint,4,opt,name=page,proto3" json:"page,omitempty"` + PageSize int32 `protobuf:"varint,5,opt,name=page_size,json=pageSize,proto3" json:"page_size,omitempty"` } func (x *QueryOfflineMessageReq) Reset() { @@ -476,11 +530,11 @@ func (*QueryOfflineMessageReq) Descriptor() ([]byte, []int) { return file_message_v1_message_proto_rawDescGZIP(), []int{5} } -func (x *QueryOfflineMessageReq) GetUserId() string { +func (x *QueryOfflineMessageReq) GetUid() int64 { if x != nil { - return x.UserId + return x.Uid } - return "" + return 0 } func (x *QueryOfflineMessageReq) GetLastMsgId() int64 { @@ -581,71 +635,68 @@ var file_message_v1_message_proto_rawDesc = []byte{ 0x73, 0x61, 0x67, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0e, 0x61, 0x70, 0x69, 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x31, 0x1a, 0x21, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x2f, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2f, 0x72, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1d, 0x75, - 0x73, 0x65, 0x72, 0x2f, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x2f, 0x76, 0x31, 0x2f, 0x73, - 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x17, 0x76, 0x61, - 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2e, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xb5, 0x02, 0x0a, 0x0e, 0x53, 0x65, 0x6e, 0x64, 0x4d, 0x65, - 0x73, 0x73, 0x61, 0x67, 0x65, 0x52, 0x65, 0x71, 0x12, 0x1b, 0x0a, 0x04, 0x66, 0x72, 0x6f, 0x6d, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10, 0x14, 0x52, - 0x04, 0x66, 0x72, 0x6f, 0x6d, 0x12, 0x17, 0x0a, 0x02, 0x74, 0x6f, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10, 0x14, 0x52, 0x02, 0x74, 0x6f, 0x12, 0x43, - 0x0a, 0x0c, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x03, - 0x20, 0x01, 0x28, 0x0e, 0x32, 0x20, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, - 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x65, 0x73, 0x73, 0x69, - 0x6f, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x52, 0x0b, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x54, - 0x79, 0x70, 0x65, 0x12, 0x22, 0x0a, 0x0a, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x69, - 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x09, 0x73, 0x65, 0x73, 0x73, 0x69, - 0x6f, 0x6e, 0x49, 0x64, 0x88, 0x01, 0x01, 0x12, 0x4f, 0x0a, 0x0c, 0x63, 0x6f, 0x6e, 0x74, 0x65, - 0x6e, 0x74, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x22, 0x2e, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x17, 0x76, + 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xb0, 0x02, 0x0a, 0x0e, 0x53, 0x65, 0x6e, 0x64, 0x4d, + 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x52, 0x65, 0x71, 0x12, 0x1b, 0x0a, 0x04, 0x66, 0x72, 0x6f, + 0x6d, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x22, 0x02, 0x20, 0x00, + 0x52, 0x04, 0x66, 0x72, 0x6f, 0x6d, 0x12, 0x17, 0x0a, 0x02, 0x74, 0x6f, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x03, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x22, 0x02, 0x20, 0x00, 0x52, 0x02, 0x74, 0x6f, 0x12, + 0x3e, 0x0a, 0x0c, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, + 0x03, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1b, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x6d, 0x65, 0x73, 0x73, + 0x61, 0x67, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x54, 0x79, + 0x70, 0x65, 0x52, 0x0b, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x12, + 0x22, 0x0a, 0x0a, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x04, 0x20, + 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x09, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x49, 0x64, + 0x88, 0x01, 0x01, 0x12, 0x4f, 0x0a, 0x0c, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x5f, 0x74, + 0x79, 0x70, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x22, 0x2e, 0x61, 0x70, 0x69, 0x2e, + 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x65, 0x73, 0x73, 0x61, + 0x67, 0x65, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x54, 0x79, 0x70, 0x65, 0x42, 0x08, 0xfa, + 0x42, 0x05, 0x82, 0x01, 0x02, 0x10, 0x01, 0x52, 0x0b, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, + 0x54, 0x79, 0x70, 0x65, 0x12, 0x24, 0x0a, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x18, + 0x06, 0x20, 0x01, 0x28, 0x09, 0x42, 0x0a, 0xfa, 0x42, 0x07, 0x72, 0x05, 0x10, 0x01, 0x18, 0x80, + 0x20, 0x52, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x42, 0x0d, 0x0a, 0x0b, 0x5f, 0x73, + 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x22, 0x47, 0x0a, 0x0f, 0x53, 0x65, 0x6e, + 0x64, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x52, 0x65, 0x73, 0x70, 0x12, 0x1d, 0x0a, 0x0a, + 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x09, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x12, 0x15, 0x0a, 0x06, 0x6d, + 0x73, 0x67, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x6d, 0x73, 0x67, + 0x49, 0x64, 0x22, 0xa5, 0x02, 0x0a, 0x07, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x15, + 0x0a, 0x06, 0x6d, 0x73, 0x67, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, + 0x6d, 0x73, 0x67, 0x49, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x66, 0x72, 0x6f, 0x6d, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x03, 0x52, 0x04, 0x66, 0x72, 0x6f, 0x6d, 0x12, 0x0e, 0x0a, 0x02, 0x74, 0x6f, 0x18, + 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x02, 0x74, 0x6f, 0x12, 0x3e, 0x0a, 0x0c, 0x73, 0x65, 0x73, + 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0e, 0x32, + 0x1b, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x31, + 0x2e, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x52, 0x0b, 0x73, 0x65, + 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x73, 0x65, 0x73, + 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x73, + 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x12, 0x45, 0x0a, 0x0c, 0x63, 0x6f, 0x6e, 0x74, + 0x65, 0x6e, 0x74, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x22, + 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x31, 0x2e, + 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x54, 0x79, + 0x70, 0x65, 0x52, 0x0b, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x54, 0x79, 0x70, 0x65, 0x12, + 0x18, 0x0a, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x12, 0x1f, 0x0a, 0x0b, 0x63, 0x72, 0x65, + 0x61, 0x74, 0x65, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x08, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0a, + 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x22, 0x5e, 0x0a, 0x0e, 0x50, 0x75, + 0x73, 0x68, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x52, 0x65, 0x71, 0x12, 0x31, 0x0a, 0x07, + 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x4d, - 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x54, 0x79, 0x70, - 0x65, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x82, 0x01, 0x02, 0x10, 0x01, 0x52, 0x0b, 0x63, 0x6f, 0x6e, - 0x74, 0x65, 0x6e, 0x74, 0x54, 0x79, 0x70, 0x65, 0x12, 0x24, 0x0a, 0x07, 0x63, 0x6f, 0x6e, 0x74, - 0x65, 0x6e, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x42, 0x0a, 0xfa, 0x42, 0x07, 0x72, 0x05, - 0x10, 0x01, 0x18, 0x80, 0x20, 0x52, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x42, 0x0d, - 0x0a, 0x0b, 0x5f, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x22, 0x47, 0x0a, - 0x0f, 0x53, 0x65, 0x6e, 0x64, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x52, 0x65, 0x73, 0x70, - 0x12, 0x1d, 0x0a, 0x0a, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x12, - 0x15, 0x0a, 0x06, 0x6d, 0x73, 0x67, 0x5f, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, - 0x05, 0x6d, 0x73, 0x67, 0x49, 0x64, 0x22, 0xaa, 0x02, 0x0a, 0x07, 0x4d, 0x65, 0x73, 0x73, 0x61, - 0x67, 0x65, 0x12, 0x15, 0x0a, 0x06, 0x6d, 0x73, 0x67, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x03, 0x52, 0x05, 0x6d, 0x73, 0x67, 0x49, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x66, 0x72, 0x6f, - 0x6d, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x66, 0x72, 0x6f, 0x6d, 0x12, 0x0e, 0x0a, - 0x02, 0x74, 0x6f, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x74, 0x6f, 0x12, 0x43, 0x0a, - 0x0c, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x04, 0x20, - 0x01, 0x28, 0x0e, 0x32, 0x20, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x73, - 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, - 0x6e, 0x54, 0x79, 0x70, 0x65, 0x52, 0x0b, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x54, 0x79, - 0x70, 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, - 0x18, 0x05, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x49, - 0x64, 0x12, 0x45, 0x0a, 0x0c, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x5f, 0x74, 0x79, 0x70, - 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x22, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x6d, 0x65, - 0x73, 0x73, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, - 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x54, 0x79, 0x70, 0x65, 0x52, 0x0b, 0x63, 0x6f, 0x6e, - 0x74, 0x65, 0x6e, 0x74, 0x54, 0x79, 0x70, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x63, 0x6f, 0x6e, 0x74, - 0x65, 0x6e, 0x74, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, - 0x6e, 0x74, 0x12, 0x1f, 0x0a, 0x0b, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x5f, 0x74, 0x69, 0x6d, - 0x65, 0x18, 0x08, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0a, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x54, - 0x69, 0x6d, 0x65, 0x22, 0x5e, 0x0a, 0x0e, 0x50, 0x75, 0x73, 0x68, 0x4d, 0x65, 0x73, 0x73, 0x61, - 0x67, 0x65, 0x52, 0x65, 0x71, 0x12, 0x31, 0x0a, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x6d, 0x65, 0x73, - 0x73, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x52, - 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x19, 0x0a, 0x08, 0x74, 0x6f, 0x5f, 0x75, - 0x73, 0x65, 0x72, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x07, 0x74, 0x6f, 0x55, 0x73, - 0x65, 0x72, 0x73, 0x22, 0x76, 0x0a, 0x0f, 0x50, 0x75, 0x73, 0x68, 0x4d, 0x65, 0x73, 0x73, 0x61, - 0x67, 0x65, 0x52, 0x65, 0x73, 0x70, 0x12, 0x40, 0x0a, 0x08, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x74, - 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x2e, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x2e, 0x42, 0x61, 0x73, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x52, 0x08, - 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x21, 0x0a, 0x0c, 0x66, 0x61, 0x69, 0x6c, - 0x65, 0x64, 0x5f, 0x75, 0x73, 0x65, 0x72, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0b, - 0x66, 0x61, 0x69, 0x6c, 0x65, 0x64, 0x55, 0x73, 0x65, 0x72, 0x73, 0x22, 0xbd, 0x01, 0x0a, 0x16, - 0x51, 0x75, 0x65, 0x72, 0x79, 0x4f, 0x66, 0x66, 0x6c, 0x69, 0x6e, 0x65, 0x4d, 0x65, 0x73, 0x73, - 0x61, 0x67, 0x65, 0x52, 0x65, 0x71, 0x12, 0x20, 0x0a, 0x07, 0x75, 0x73, 0x65, 0x72, 0x5f, 0x69, - 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10, 0x14, - 0x52, 0x06, 0x75, 0x73, 0x65, 0x72, 0x49, 0x64, 0x12, 0x27, 0x0a, 0x0b, 0x6c, 0x61, 0x73, 0x74, + 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x52, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, + 0x19, 0x0a, 0x08, 0x74, 0x6f, 0x5f, 0x75, 0x73, 0x65, 0x72, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, + 0x03, 0x52, 0x07, 0x74, 0x6f, 0x55, 0x73, 0x65, 0x72, 0x73, 0x22, 0x76, 0x0a, 0x0f, 0x50, 0x75, + 0x73, 0x68, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x52, 0x65, 0x73, 0x70, 0x12, 0x40, 0x0a, + 0x08, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x24, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x2e, + 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x42, 0x61, 0x73, 0x65, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x52, 0x08, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, + 0x21, 0x0a, 0x0c, 0x66, 0x61, 0x69, 0x6c, 0x65, 0x64, 0x5f, 0x75, 0x73, 0x65, 0x72, 0x73, 0x18, + 0x02, 0x20, 0x03, 0x28, 0x03, 0x52, 0x0b, 0x66, 0x61, 0x69, 0x6c, 0x65, 0x64, 0x55, 0x73, 0x65, + 0x72, 0x73, 0x22, 0xb6, 0x01, 0x0a, 0x16, 0x51, 0x75, 0x65, 0x72, 0x79, 0x4f, 0x66, 0x66, 0x6c, + 0x69, 0x6e, 0x65, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x52, 0x65, 0x71, 0x12, 0x19, 0x0a, + 0x03, 0x75, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x22, + 0x02, 0x20, 0x00, 0x52, 0x03, 0x75, 0x69, 0x64, 0x12, 0x27, 0x0a, 0x0b, 0x6c, 0x61, 0x73, 0x74, 0x5f, 0x6d, 0x73, 0x67, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x22, 0x02, 0x20, 0x00, 0x52, 0x09, 0x6c, 0x61, 0x73, 0x74, 0x4d, 0x73, 0x67, 0x49, 0x64, 0x12, 0x1c, 0x0a, 0x09, 0x6f, 0x6e, 0x6c, 0x79, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x03, @@ -667,24 +718,29 @@ var file_message_v1_message_proto_rawDesc = []byte{ 0x61, 0x67, 0x65, 0x73, 0x2a, 0x34, 0x0a, 0x12, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x54, 0x79, 0x70, 0x65, 0x12, 0x08, 0x0a, 0x04, 0x54, 0x65, 0x78, 0x74, 0x10, 0x00, 0x12, 0x09, 0x0a, 0x05, 0x49, 0x6d, 0x61, 0x67, 0x65, 0x10, 0x01, 0x12, - 0x09, 0x0a, 0x05, 0x56, 0x6f, 0x69, 0x63, 0x65, 0x10, 0x02, 0x32, 0x64, 0x0a, 0x12, 0x50, 0x75, - 0x73, 0x68, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, - 0x12, 0x4e, 0x0a, 0x0b, 0x50, 0x75, 0x73, 0x68, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, - 0x1e, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x31, - 0x2e, 0x50, 0x75, 0x73, 0x68, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x52, 0x65, 0x71, 0x1a, - 0x1f, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x31, - 0x2e, 0x50, 0x75, 0x73, 0x68, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x52, 0x65, 0x73, 0x70, - 0x32, 0x7f, 0x0a, 0x15, 0x4f, 0x66, 0x66, 0x6c, 0x69, 0x6e, 0x65, 0x4d, 0x65, 0x73, 0x73, 0x61, - 0x67, 0x65, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x66, 0x0a, 0x13, 0x51, 0x75, 0x65, - 0x72, 0x79, 0x4f, 0x66, 0x66, 0x6c, 0x69, 0x6e, 0x65, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, - 0x12, 0x26, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x2e, 0x76, - 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x4f, 0x66, 0x66, 0x6c, 0x69, 0x6e, 0x65, 0x4d, 0x65, - 0x73, 0x73, 0x61, 0x67, 0x65, 0x52, 0x65, 0x71, 0x1a, 0x27, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x6d, - 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x4f, - 0x66, 0x66, 0x6c, 0x69, 0x6e, 0x65, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x52, 0x65, 0x73, - 0x70, 0x42, 0x23, 0x5a, 0x21, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, - 0x67, 0x6f, 0x2d, 0x67, 0x6f, 0x69, 0x6d, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x6d, 0x65, 0x73, 0x73, - 0x61, 0x67, 0x65, 0x2f, 0x76, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x09, 0x0a, 0x05, 0x56, 0x6f, 0x69, 0x63, 0x65, 0x10, 0x02, 0x2a, 0x48, 0x0a, 0x0b, 0x53, 0x65, + 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x12, 0x0e, 0x0a, 0x0a, 0x53, 0x69, 0x6e, + 0x67, 0x6c, 0x65, 0x43, 0x68, 0x61, 0x74, 0x10, 0x00, 0x12, 0x0d, 0x0a, 0x09, 0x47, 0x72, 0x6f, + 0x75, 0x70, 0x43, 0x68, 0x61, 0x74, 0x10, 0x01, 0x12, 0x0d, 0x0a, 0x09, 0x42, 0x72, 0x6f, 0x61, + 0x64, 0x63, 0x61, 0x73, 0x74, 0x10, 0x02, 0x12, 0x0b, 0x0a, 0x07, 0x43, 0x68, 0x61, 0x6e, 0x6e, + 0x65, 0x6c, 0x10, 0x03, 0x32, 0x64, 0x0a, 0x12, 0x50, 0x75, 0x73, 0x68, 0x4d, 0x65, 0x73, 0x73, + 0x61, 0x67, 0x65, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x4e, 0x0a, 0x0b, 0x50, 0x75, + 0x73, 0x68, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x1e, 0x2e, 0x61, 0x70, 0x69, 0x2e, + 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x75, 0x73, 0x68, 0x4d, + 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x52, 0x65, 0x71, 0x1a, 0x1f, 0x2e, 0x61, 0x70, 0x69, 0x2e, + 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x75, 0x73, 0x68, 0x4d, + 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x52, 0x65, 0x73, 0x70, 0x32, 0x7f, 0x0a, 0x15, 0x4f, 0x66, + 0x66, 0x6c, 0x69, 0x6e, 0x65, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x53, 0x65, 0x72, 0x76, + 0x69, 0x63, 0x65, 0x12, 0x66, 0x0a, 0x13, 0x51, 0x75, 0x65, 0x72, 0x79, 0x4f, 0x66, 0x66, 0x6c, + 0x69, 0x6e, 0x65, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x26, 0x2e, 0x61, 0x70, 0x69, + 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, + 0x79, 0x4f, 0x66, 0x66, 0x6c, 0x69, 0x6e, 0x65, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x52, + 0x65, 0x71, 0x1a, 0x27, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, + 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x4f, 0x66, 0x66, 0x6c, 0x69, 0x6e, 0x65, + 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x52, 0x65, 0x73, 0x70, 0x42, 0x23, 0x5a, 0x21, 0x67, + 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x67, 0x6f, 0x2d, 0x67, 0x6f, 0x69, + 0x6d, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x2f, 0x76, 0x31, + 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -699,33 +755,33 @@ func file_message_v1_message_proto_rawDescGZIP() []byte { return file_message_v1_message_proto_rawDescData } -var file_message_v1_message_proto_enumTypes = make([]protoimpl.EnumInfo, 1) +var file_message_v1_message_proto_enumTypes = make([]protoimpl.EnumInfo, 2) var file_message_v1_message_proto_msgTypes = make([]protoimpl.MessageInfo, 7) var file_message_v1_message_proto_goTypes = []interface{}{ (MessageContentType)(0), // 0: api.message.v1.MessageContentType - (*SendMessageReq)(nil), // 1: api.message.v1.SendMessageReq - (*SendMessageResp)(nil), // 2: api.message.v1.SendMessageResp - (*Message)(nil), // 3: api.message.v1.Message - (*PushMessageReq)(nil), // 4: api.message.v1.PushMessageReq - (*PushMessageResp)(nil), // 5: api.message.v1.PushMessageResp - (*QueryOfflineMessageReq)(nil), // 6: api.message.v1.QueryOfflineMessageReq - (*QueryOfflineMessageResp)(nil), // 7: api.message.v1.QueryOfflineMessageResp - (v1.SessionType)(0), // 8: api.user.session.v1.SessionType + (SessionType)(0), // 1: api.message.v1.SessionType + (*SendMessageReq)(nil), // 2: api.message.v1.SendMessageReq + (*SendMessageResp)(nil), // 3: api.message.v1.SendMessageResp + (*Message)(nil), // 4: api.message.v1.Message + (*PushMessageReq)(nil), // 5: api.message.v1.PushMessageReq + (*PushMessageResp)(nil), // 6: api.message.v1.PushMessageResp + (*QueryOfflineMessageReq)(nil), // 7: api.message.v1.QueryOfflineMessageReq + (*QueryOfflineMessageResp)(nil), // 8: api.message.v1.QueryOfflineMessageResp (*response.BaseResponse)(nil), // 9: api.transport.response.BaseResponse } var file_message_v1_message_proto_depIdxs = []int32{ - 8, // 0: api.message.v1.SendMessageReq.session_type:type_name -> api.user.session.v1.SessionType + 1, // 0: api.message.v1.SendMessageReq.session_type:type_name -> api.message.v1.SessionType 0, // 1: api.message.v1.SendMessageReq.content_type:type_name -> api.message.v1.MessageContentType - 8, // 2: api.message.v1.Message.session_type:type_name -> api.user.session.v1.SessionType + 1, // 2: api.message.v1.Message.session_type:type_name -> api.message.v1.SessionType 0, // 3: api.message.v1.Message.content_type:type_name -> api.message.v1.MessageContentType - 3, // 4: api.message.v1.PushMessageReq.message:type_name -> api.message.v1.Message + 4, // 4: api.message.v1.PushMessageReq.message:type_name -> api.message.v1.Message 9, // 5: api.message.v1.PushMessageResp.response:type_name -> api.transport.response.BaseResponse 9, // 6: api.message.v1.QueryOfflineMessageResp.response:type_name -> api.transport.response.BaseResponse - 3, // 7: api.message.v1.QueryOfflineMessageResp.messages:type_name -> api.message.v1.Message - 4, // 8: api.message.v1.PushMessageService.PushMessage:input_type -> api.message.v1.PushMessageReq - 6, // 9: api.message.v1.OfflineMessageService.QueryOfflineMessage:input_type -> api.message.v1.QueryOfflineMessageReq - 5, // 10: api.message.v1.PushMessageService.PushMessage:output_type -> api.message.v1.PushMessageResp - 7, // 11: api.message.v1.OfflineMessageService.QueryOfflineMessage:output_type -> api.message.v1.QueryOfflineMessageResp + 4, // 7: api.message.v1.QueryOfflineMessageResp.messages:type_name -> api.message.v1.Message + 5, // 8: api.message.v1.PushMessageService.PushMessage:input_type -> api.message.v1.PushMessageReq + 7, // 9: api.message.v1.OfflineMessageService.QueryOfflineMessage:input_type -> api.message.v1.QueryOfflineMessageReq + 6, // 10: api.message.v1.PushMessageService.PushMessage:output_type -> api.message.v1.PushMessageResp + 8, // 11: api.message.v1.OfflineMessageService.QueryOfflineMessage:output_type -> api.message.v1.QueryOfflineMessageResp 10, // [10:12] is the sub-list for method output_type 8, // [8:10] is the sub-list for method input_type 8, // [8:8] is the sub-list for extension type_name @@ -830,7 +886,7 @@ func file_message_v1_message_proto_init() { File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_message_v1_message_proto_rawDesc, - NumEnums: 1, + NumEnums: 2, NumMessages: 7, NumExtensions: 0, NumServices: 2, diff --git a/message/v1/message.pb.validate.go b/message/v1/message.pb.validate.go index 17bc72f..a900709 100644 --- a/message/v1/message.pb.validate.go +++ b/message/v1/message.pb.validate.go @@ -57,10 +57,10 @@ func (m *SendMessageReq) validate(all bool) error { var errors []error - if utf8.RuneCountInString(m.GetFrom()) < 20 { + if m.GetFrom() <= 0 { err := SendMessageReqValidationError{ field: "From", - reason: "value length must be at least 20 runes", + reason: "value must be greater than 0", } if !all { return err @@ -68,10 +68,10 @@ func (m *SendMessageReq) validate(all bool) error { errors = append(errors, err) } - if utf8.RuneCountInString(m.GetTo()) < 20 { + if m.GetTo() <= 0 { err := SendMessageReqValidationError{ field: "To", - reason: "value length must be at least 20 runes", + reason: "value must be greater than 0", } if !all { return err @@ -683,10 +683,10 @@ func (m *QueryOfflineMessageReq) validate(all bool) error { var errors []error - if utf8.RuneCountInString(m.GetUserId()) < 20 { + if m.GetUid() <= 0 { err := QueryOfflineMessageReqValidationError{ - field: "UserId", - reason: "value length must be at least 20 runes", + field: "Uid", + reason: "value must be greater than 0", } if !all { return err diff --git a/message/v1/message.proto b/message/v1/message.proto index 76d0824..39b19b9 100644 --- a/message/v1/message.proto +++ b/message/v1/message.proto @@ -3,7 +3,6 @@ syntax = "proto3"; package api.message.v1; import "transport/response/response.proto"; -import "user/session/v1/session.proto"; import "validate/validate.proto"; option go_package = "github.com/go-goim/api/message/v1"; @@ -14,11 +13,22 @@ enum MessageContentType { Voice = 2; } +// define session type and status +enum SessionType { + SingleChat = 0; + GroupChat = 1; + // broadcast actually not a standard chat type, but we still use it here + Broadcast = 2; + // Channel is for user subscribed channel msgs + Channel = 3; + // 255 at most +} + // SendMessageReq receive data from gateway message SendMessageReq { - string from = 1 [(validate.rules).string.min_len = 20]; - string to = 2 [(validate.rules).string.min_len = 20]; - user.session.v1.SessionType session_type = 3; + int64 from = 1 [(validate.rules).int64.gt = 0]; + int64 to = 2 [(validate.rules).int64.gt = 0]; + SessionType session_type = 3; optional string session_id = 4; MessageContentType content_type = 5 [(validate.rules).enum.defined_only = true]; string content = 6 [(validate.rules).string = { @@ -29,17 +39,17 @@ message SendMessageReq { // SendMessageResp is response body for sendMessage message SendMessageResp { - int64 session_id = 2; - int64 msg_id = 3; + string session_id = 1; + int64 msg_id = 2; } // Message is definition of message message Message { int64 msg_id = 1; - string from = 2; - string to = 3; // to user id or group id - user.session.v1.SessionType session_type = 4; - int64 session_id = 5; + int64 from = 2; + int64 to = 3; // user id or group id or room id etc. + SessionType session_type = 4; + string session_id = 5; MessageContentType content_type = 6; string content = 7; int64 create_time = 8; @@ -49,12 +59,12 @@ message Message { message PushMessageReq { Message message = 1; // ToUsers is a list of user id who receive this message - repeated string to_users = 2; + repeated int64 to_users = 2; } message PushMessageResp { transport.response.BaseResponse response = 1; - repeated string failed_users = 2; + repeated int64 failed_users = 2; } service PushMessageService { @@ -62,7 +72,7 @@ service PushMessageService { } message QueryOfflineMessageReq { - string user_id = 1 [(validate.rules).string.min_len = 20]; + int64 uid = 1 [(validate.rules).int64.gt = 0]; int64 last_msg_id = 2 [(validate.rules).int64.gt = 0]; bool onlyCount = 3; int32 page = 4; diff --git a/user/friend/v1/friend.pb.go b/user/friend/v1/friend.pb.go index bb82283..67508eb 100644 --- a/user/friend/v1/friend.pb.go +++ b/user/friend/v1/friend.pb.go @@ -8,8 +8,8 @@ package v1 import ( _ "github.com/envoyproxy/protoc-gen-validate/validate" + v1 "github.com/go-goim/api/message/v1" response "github.com/go-goim/api/transport/response" - v1 "github.com/go-goim/api/user/session/v1" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" reflect "reflect" @@ -238,8 +238,8 @@ type Friend struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Uid string `protobuf:"bytes,1,opt,name=uid,proto3" json:"uid,omitempty"` - FriendUid string `protobuf:"bytes,2,opt,name=friend_uid,json=friendUid,proto3" json:"friend_uid,omitempty"` + Uid int64 `protobuf:"varint,1,opt,name=uid,proto3" json:"uid,omitempty"` + FriendUid int64 `protobuf:"varint,2,opt,name=friend_uid,json=friendUid,proto3" json:"friend_uid,omitempty"` FriendName string `protobuf:"bytes,3,opt,name=friend_name,json=friendName,proto3" json:"friend_name,omitempty"` FriendAvatar string `protobuf:"bytes,4,opt,name=friend_avatar,json=friendAvatar,proto3" json:"friend_avatar,omitempty"` Status FriendStatus `protobuf:"varint,5,opt,name=status,proto3,enum=api.user.friend.v1.FriendStatus" json:"status,omitempty"` @@ -279,18 +279,18 @@ func (*Friend) Descriptor() ([]byte, []int) { return file_user_friend_v1_friend_proto_rawDescGZIP(), []int{0} } -func (x *Friend) GetUid() string { +func (x *Friend) GetUid() int64 { if x != nil { return x.Uid } - return "" + return 0 } -func (x *Friend) GetFriendUid() string { +func (x *Friend) GetFriendUid() int64 { if x != nil { return x.FriendUid } - return "" + return 0 } func (x *Friend) GetFriendName() string { @@ -443,7 +443,7 @@ type QueryFriendListRequest struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Uid string `protobuf:"bytes,1,opt,name=uid,proto3" json:"uid,omitempty"` + Uid int64 `protobuf:"varint,1,opt,name=uid,proto3" json:"uid,omitempty"` } func (x *QueryFriendListRequest) Reset() { @@ -478,11 +478,11 @@ func (*QueryFriendListRequest) Descriptor() ([]byte, []int) { return file_user_friend_v1_friend_proto_rawDescGZIP(), []int{3} } -func (x *QueryFriendListRequest) GetUid() string { +func (x *QueryFriendListRequest) GetUid() int64 { if x != nil { return x.Uid } - return "" + return 0 } type QueryFriendListResponse struct { @@ -546,9 +546,9 @@ type FriendRequest struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Id int64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` - Uid string `protobuf:"bytes,2,opt,name=uid,proto3" json:"uid,omitempty"` - FriendUid string `protobuf:"bytes,3,opt,name=friend_uid,json=friendUid,proto3" json:"friend_uid,omitempty"` + Id uint64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` + Uid int64 `protobuf:"varint,2,opt,name=uid,proto3" json:"uid,omitempty"` + FriendUid int64 `protobuf:"varint,3,opt,name=friend_uid,json=friendUid,proto3" json:"friend_uid,omitempty"` Status FriendRequestStatus `protobuf:"varint,4,opt,name=status,proto3,enum=api.user.friend.v1.FriendRequestStatus" json:"status,omitempty"` CreatedAt int64 `protobuf:"varint,5,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"` UpdatedAt int64 `protobuf:"varint,6,opt,name=updated_at,json=updatedAt,proto3" json:"updated_at,omitempty"` @@ -589,25 +589,25 @@ func (*FriendRequest) Descriptor() ([]byte, []int) { return file_user_friend_v1_friend_proto_rawDescGZIP(), []int{5} } -func (x *FriendRequest) GetId() int64 { +func (x *FriendRequest) GetId() uint64 { if x != nil { return x.Id } return 0 } -func (x *FriendRequest) GetUid() string { +func (x *FriendRequest) GetUid() int64 { if x != nil { return x.Uid } - return "" + return 0 } -func (x *FriendRequest) GetFriendUid() string { +func (x *FriendRequest) GetFriendUid() int64 { if x != nil { return x.FriendUid } - return "" + return 0 } func (x *FriendRequest) GetStatus() FriendRequestStatus { @@ -645,74 +645,19 @@ func (x *FriendRequest) GetFriendAvatar() string { return "" } -type AddFriendRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Uid string `protobuf:"bytes,1,opt,name=uid,proto3" json:"uid,omitempty"` - FriendUid string `protobuf:"bytes,2,opt,name=friend_uid,json=friendUid,proto3" json:"friend_uid,omitempty"` -} - -func (x *AddFriendRequest) Reset() { - *x = AddFriendRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_user_friend_v1_friend_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *AddFriendRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*AddFriendRequest) ProtoMessage() {} - -func (x *AddFriendRequest) ProtoReflect() protoreflect.Message { - mi := &file_user_friend_v1_friend_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 AddFriendRequest.ProtoReflect.Descriptor instead. -func (*AddFriendRequest) Descriptor() ([]byte, []int) { - return file_user_friend_v1_friend_proto_rawDescGZIP(), []int{6} -} - -func (x *AddFriendRequest) GetUid() string { - if x != nil { - return x.Uid - } - return "" -} - -func (x *AddFriendRequest) GetFriendUid() string { - if x != nil { - return x.FriendUid - } - return "" -} - type BaseFriendRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Uid string `protobuf:"bytes,1,opt,name=uid,proto3" json:"uid,omitempty"` - FriendUid string `protobuf:"bytes,2,opt,name=friend_uid,json=friendUid,proto3" json:"friend_uid,omitempty"` + Uid int64 `protobuf:"varint,1,opt,name=uid,proto3" json:"uid,omitempty"` + FriendUid int64 `protobuf:"varint,2,opt,name=friend_uid,json=friendUid,proto3" json:"friend_uid,omitempty"` } func (x *BaseFriendRequest) Reset() { *x = BaseFriendRequest{} if protoimpl.UnsafeEnabled { - mi := &file_user_friend_v1_friend_proto_msgTypes[7] + mi := &file_user_friend_v1_friend_proto_msgTypes[6] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -725,7 +670,7 @@ func (x *BaseFriendRequest) String() string { func (*BaseFriendRequest) ProtoMessage() {} func (x *BaseFriendRequest) ProtoReflect() protoreflect.Message { - mi := &file_user_friend_v1_friend_proto_msgTypes[7] + mi := &file_user_friend_v1_friend_proto_msgTypes[6] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -738,21 +683,21 @@ func (x *BaseFriendRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use BaseFriendRequest.ProtoReflect.Descriptor instead. func (*BaseFriendRequest) Descriptor() ([]byte, []int) { - return file_user_friend_v1_friend_proto_rawDescGZIP(), []int{7} + return file_user_friend_v1_friend_proto_rawDescGZIP(), []int{6} } -func (x *BaseFriendRequest) GetUid() string { +func (x *BaseFriendRequest) GetUid() int64 { if x != nil { return x.Uid } - return "" + return 0 } -func (x *BaseFriendRequest) GetFriendUid() string { +func (x *BaseFriendRequest) GetFriendUid() int64 { if x != nil { return x.FriendUid } - return "" + return 0 } type AddFriendResponse struct { @@ -767,7 +712,7 @@ type AddFriendResponse struct { func (x *AddFriendResponse) Reset() { *x = AddFriendResponse{} if protoimpl.UnsafeEnabled { - mi := &file_user_friend_v1_friend_proto_msgTypes[8] + mi := &file_user_friend_v1_friend_proto_msgTypes[7] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -780,7 +725,7 @@ func (x *AddFriendResponse) String() string { func (*AddFriendResponse) ProtoMessage() {} func (x *AddFriendResponse) ProtoReflect() protoreflect.Message { - mi := &file_user_friend_v1_friend_proto_msgTypes[8] + mi := &file_user_friend_v1_friend_proto_msgTypes[7] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -793,7 +738,7 @@ func (x *AddFriendResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use AddFriendResponse.ProtoReflect.Descriptor instead. func (*AddFriendResponse) Descriptor() ([]byte, []int) { - return file_user_friend_v1_friend_proto_rawDescGZIP(), []int{8} + return file_user_friend_v1_friend_proto_rawDescGZIP(), []int{7} } func (x *AddFriendResponse) GetResponse() *response.BaseResponse { @@ -822,7 +767,7 @@ type AddFriendResult struct { func (x *AddFriendResult) Reset() { *x = AddFriendResult{} if protoimpl.UnsafeEnabled { - mi := &file_user_friend_v1_friend_proto_msgTypes[9] + mi := &file_user_friend_v1_friend_proto_msgTypes[8] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -835,7 +780,7 @@ func (x *AddFriendResult) String() string { func (*AddFriendResult) ProtoMessage() {} func (x *AddFriendResult) ProtoReflect() protoreflect.Message { - mi := &file_user_friend_v1_friend_proto_msgTypes[9] + mi := &file_user_friend_v1_friend_proto_msgTypes[8] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -848,7 +793,7 @@ func (x *AddFriendResult) ProtoReflect() protoreflect.Message { // Deprecated: Use AddFriendResult.ProtoReflect.Descriptor instead. func (*AddFriendResult) Descriptor() ([]byte, []int) { - return file_user_friend_v1_friend_proto_rawDescGZIP(), []int{9} + return file_user_friend_v1_friend_proto_rawDescGZIP(), []int{8} } func (x *AddFriendResult) GetStatus() AddFriendStatus { @@ -865,33 +810,33 @@ func (x *AddFriendResult) GetFriendRequest() *FriendRequest { return nil } -type ConfirmFriendRequestReq struct { +type ConfirmFriendRequestRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Uid string `protobuf:"bytes,1,opt,name=uid,proto3" json:"uid,omitempty"` - FriendRequestId int64 `protobuf:"varint,2,opt,name=friend_request_id,json=friendRequestId,proto3" json:"friend_request_id,omitempty"` + Uid int64 `protobuf:"varint,1,opt,name=uid,proto3" json:"uid,omitempty"` + FriendRequestId uint64 `protobuf:"varint,2,opt,name=friend_request_id,json=friendRequestId,proto3" json:"friend_request_id,omitempty"` Action ConfirmFriendRequestAction `protobuf:"varint,3,opt,name=action,proto3,enum=api.user.friend.v1.ConfirmFriendRequestAction" json:"action,omitempty"` } -func (x *ConfirmFriendRequestReq) Reset() { - *x = ConfirmFriendRequestReq{} +func (x *ConfirmFriendRequestRequest) Reset() { + *x = ConfirmFriendRequestRequest{} if protoimpl.UnsafeEnabled { - mi := &file_user_friend_v1_friend_proto_msgTypes[10] + mi := &file_user_friend_v1_friend_proto_msgTypes[9] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *ConfirmFriendRequestReq) String() string { +func (x *ConfirmFriendRequestRequest) String() string { return protoimpl.X.MessageStringOf(x) } -func (*ConfirmFriendRequestReq) ProtoMessage() {} +func (*ConfirmFriendRequestRequest) ProtoMessage() {} -func (x *ConfirmFriendRequestReq) ProtoReflect() protoreflect.Message { - mi := &file_user_friend_v1_friend_proto_msgTypes[10] +func (x *ConfirmFriendRequestRequest) ProtoReflect() protoreflect.Message { + mi := &file_user_friend_v1_friend_proto_msgTypes[9] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -902,26 +847,26 @@ func (x *ConfirmFriendRequestReq) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use ConfirmFriendRequestReq.ProtoReflect.Descriptor instead. -func (*ConfirmFriendRequestReq) Descriptor() ([]byte, []int) { - return file_user_friend_v1_friend_proto_rawDescGZIP(), []int{10} +// Deprecated: Use ConfirmFriendRequestRequest.ProtoReflect.Descriptor instead. +func (*ConfirmFriendRequestRequest) Descriptor() ([]byte, []int) { + return file_user_friend_v1_friend_proto_rawDescGZIP(), []int{9} } -func (x *ConfirmFriendRequestReq) GetUid() string { +func (x *ConfirmFriendRequestRequest) GetUid() int64 { if x != nil { return x.Uid } - return "" + return 0 } -func (x *ConfirmFriendRequestReq) GetFriendRequestId() int64 { +func (x *ConfirmFriendRequestRequest) GetFriendRequestId() uint64 { if x != nil { return x.FriendRequestId } return 0 } -func (x *ConfirmFriendRequestReq) GetAction() ConfirmFriendRequestAction { +func (x *ConfirmFriendRequestRequest) GetAction() ConfirmFriendRequestAction { if x != nil { return x.Action } @@ -940,7 +885,7 @@ type GetFriendRequestResponse struct { func (x *GetFriendRequestResponse) Reset() { *x = GetFriendRequestResponse{} if protoimpl.UnsafeEnabled { - mi := &file_user_friend_v1_friend_proto_msgTypes[11] + mi := &file_user_friend_v1_friend_proto_msgTypes[10] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -953,7 +898,7 @@ func (x *GetFriendRequestResponse) String() string { func (*GetFriendRequestResponse) ProtoMessage() {} func (x *GetFriendRequestResponse) ProtoReflect() protoreflect.Message { - mi := &file_user_friend_v1_friend_proto_msgTypes[11] + mi := &file_user_friend_v1_friend_proto_msgTypes[10] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -966,7 +911,7 @@ func (x *GetFriendRequestResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use GetFriendRequestResponse.ProtoReflect.Descriptor instead. func (*GetFriendRequestResponse) Descriptor() ([]byte, []int) { - return file_user_friend_v1_friend_proto_rawDescGZIP(), []int{11} + return file_user_friend_v1_friend_proto_rawDescGZIP(), []int{10} } func (x *GetFriendRequestResponse) GetResponse() *response.BaseResponse { @@ -988,14 +933,14 @@ type QueryFriendRequestListRequest struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Uid string `protobuf:"bytes,1,opt,name=uid,proto3" json:"uid,omitempty"` + Uid int64 `protobuf:"varint,1,opt,name=uid,proto3" json:"uid,omitempty"` Status FriendRequestStatus `protobuf:"varint,2,opt,name=status,proto3,enum=api.user.friend.v1.FriendRequestStatus" json:"status,omitempty"` } func (x *QueryFriendRequestListRequest) Reset() { *x = QueryFriendRequestListRequest{} if protoimpl.UnsafeEnabled { - mi := &file_user_friend_v1_friend_proto_msgTypes[12] + mi := &file_user_friend_v1_friend_proto_msgTypes[11] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1008,7 +953,7 @@ func (x *QueryFriendRequestListRequest) String() string { func (*QueryFriendRequestListRequest) ProtoMessage() {} func (x *QueryFriendRequestListRequest) ProtoReflect() protoreflect.Message { - mi := &file_user_friend_v1_friend_proto_msgTypes[12] + mi := &file_user_friend_v1_friend_proto_msgTypes[11] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1021,14 +966,14 @@ func (x *QueryFriendRequestListRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use QueryFriendRequestListRequest.ProtoReflect.Descriptor instead. func (*QueryFriendRequestListRequest) Descriptor() ([]byte, []int) { - return file_user_friend_v1_friend_proto_rawDescGZIP(), []int{12} + return file_user_friend_v1_friend_proto_rawDescGZIP(), []int{11} } -func (x *QueryFriendRequestListRequest) GetUid() string { +func (x *QueryFriendRequestListRequest) GetUid() int64 { if x != nil { return x.Uid } - return "" + return 0 } func (x *QueryFriendRequestListRequest) GetStatus() FriendRequestStatus { @@ -1050,7 +995,7 @@ type QueryFriendRequestListResponse struct { func (x *QueryFriendRequestListResponse) Reset() { *x = QueryFriendRequestListResponse{} if protoimpl.UnsafeEnabled { - mi := &file_user_friend_v1_friend_proto_msgTypes[13] + mi := &file_user_friend_v1_friend_proto_msgTypes[12] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1063,7 +1008,7 @@ func (x *QueryFriendRequestListResponse) String() string { func (*QueryFriendRequestListResponse) ProtoMessage() {} func (x *QueryFriendRequestListResponse) ProtoReflect() protoreflect.Message { - mi := &file_user_friend_v1_friend_proto_msgTypes[13] + mi := &file_user_friend_v1_friend_proto_msgTypes[12] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1076,7 +1021,7 @@ func (x *QueryFriendRequestListResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use QueryFriendRequestListResponse.ProtoReflect.Descriptor instead. func (*QueryFriendRequestListResponse) Descriptor() ([]byte, []int) { - return file_user_friend_v1_friend_proto_rawDescGZIP(), []int{13} + return file_user_friend_v1_friend_proto_rawDescGZIP(), []int{12} } func (x *QueryFriendRequestListResponse) GetResponse() *response.BaseResponse { @@ -1099,15 +1044,15 @@ type CheckSendMessageAbilityRequest struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - FromUid string `protobuf:"bytes,1,opt,name=from_uid,json=fromUid,proto3" json:"from_uid,omitempty"` - ToUid string `protobuf:"bytes,2,opt,name=to_uid,json=toUid,proto3" json:"to_uid,omitempty"` - SessionType v1.SessionType `protobuf:"varint,3,opt,name=session_type,json=sessionType,proto3,enum=api.user.session.v1.SessionType" json:"session_type,omitempty"` + FromUid int64 `protobuf:"varint,1,opt,name=from_uid,json=fromUid,proto3" json:"from_uid,omitempty"` + ToUid int64 `protobuf:"varint,2,opt,name=to_uid,json=toUid,proto3" json:"to_uid,omitempty"` + SessionType v1.SessionType `protobuf:"varint,3,opt,name=session_type,json=sessionType,proto3,enum=api.message.v1.SessionType" json:"session_type,omitempty"` } func (x *CheckSendMessageAbilityRequest) Reset() { *x = CheckSendMessageAbilityRequest{} if protoimpl.UnsafeEnabled { - mi := &file_user_friend_v1_friend_proto_msgTypes[14] + mi := &file_user_friend_v1_friend_proto_msgTypes[13] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1120,7 +1065,7 @@ func (x *CheckSendMessageAbilityRequest) String() string { func (*CheckSendMessageAbilityRequest) ProtoMessage() {} func (x *CheckSendMessageAbilityRequest) ProtoReflect() protoreflect.Message { - mi := &file_user_friend_v1_friend_proto_msgTypes[14] + mi := &file_user_friend_v1_friend_proto_msgTypes[13] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1133,21 +1078,21 @@ func (x *CheckSendMessageAbilityRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use CheckSendMessageAbilityRequest.ProtoReflect.Descriptor instead. func (*CheckSendMessageAbilityRequest) Descriptor() ([]byte, []int) { - return file_user_friend_v1_friend_proto_rawDescGZIP(), []int{14} + return file_user_friend_v1_friend_proto_rawDescGZIP(), []int{13} } -func (x *CheckSendMessageAbilityRequest) GetFromUid() string { +func (x *CheckSendMessageAbilityRequest) GetFromUid() int64 { if x != nil { return x.FromUid } - return "" + return 0 } -func (x *CheckSendMessageAbilityRequest) GetToUid() string { +func (x *CheckSendMessageAbilityRequest) GetToUid() int64 { if x != nil { return x.ToUid } - return "" + return 0 } func (x *CheckSendMessageAbilityRequest) GetSessionType() v1.SessionType { @@ -1163,13 +1108,13 @@ type CheckSendMessageAbilityResponse struct { unknownFields protoimpl.UnknownFields Response *response.BaseResponse `protobuf:"bytes,1,opt,name=response,proto3" json:"response,omitempty"` - SessionId *int64 `protobuf:"varint,2,opt,name=session_id,json=sessionId,proto3,oneof" json:"session_id,omitempty"` + SessionId *string `protobuf:"bytes,2,opt,name=session_id,json=sessionId,proto3,oneof" json:"session_id,omitempty"` } func (x *CheckSendMessageAbilityResponse) Reset() { *x = CheckSendMessageAbilityResponse{} if protoimpl.UnsafeEnabled { - mi := &file_user_friend_v1_friend_proto_msgTypes[15] + mi := &file_user_friend_v1_friend_proto_msgTypes[14] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1182,7 +1127,7 @@ func (x *CheckSendMessageAbilityResponse) String() string { func (*CheckSendMessageAbilityResponse) ProtoMessage() {} func (x *CheckSendMessageAbilityResponse) ProtoReflect() protoreflect.Message { - mi := &file_user_friend_v1_friend_proto_msgTypes[15] + mi := &file_user_friend_v1_friend_proto_msgTypes[14] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1195,7 +1140,7 @@ func (x *CheckSendMessageAbilityResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use CheckSendMessageAbilityResponse.ProtoReflect.Descriptor instead. func (*CheckSendMessageAbilityResponse) Descriptor() ([]byte, []int) { - return file_user_friend_v1_friend_proto_rawDescGZIP(), []int{15} + return file_user_friend_v1_friend_proto_rawDescGZIP(), []int{14} } func (x *CheckSendMessageAbilityResponse) GetResponse() *response.BaseResponse { @@ -1205,11 +1150,11 @@ func (x *CheckSendMessageAbilityResponse) GetResponse() *response.BaseResponse { return nil } -func (x *CheckSendMessageAbilityResponse) GetSessionId() int64 { +func (x *CheckSendMessageAbilityResponse) GetSessionId() string { if x != nil && x.SessionId != nil { return *x.SessionId } - return 0 + return "" } var File_user_friend_v1_friend_proto protoreflect.FileDescriptor @@ -1220,253 +1165,246 @@ var file_user_friend_v1_friend_proto_rawDesc = []byte{ 0x70, 0x69, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x66, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x2e, 0x76, 0x31, 0x1a, 0x21, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x2f, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2f, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1d, 0x75, 0x73, 0x65, 0x72, 0x2f, 0x73, 0x65, 0x73, 0x73, 0x69, - 0x6f, 0x6e, 0x2f, 0x76, 0x31, 0x2f, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x1a, 0x17, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2f, 0x76, 0x61, - 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xf7, 0x01, 0x0a, - 0x06, 0x46, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x69, 0x64, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x69, 0x64, 0x12, 0x1d, 0x0a, 0x0a, 0x66, 0x72, 0x69, - 0x65, 0x6e, 0x64, 0x5f, 0x75, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x66, - 0x72, 0x69, 0x65, 0x6e, 0x64, 0x55, 0x69, 0x64, 0x12, 0x1f, 0x0a, 0x0b, 0x66, 0x72, 0x69, 0x65, - 0x6e, 0x64, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x66, - 0x72, 0x69, 0x65, 0x6e, 0x64, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x23, 0x0a, 0x0d, 0x66, 0x72, 0x69, - 0x65, 0x6e, 0x64, 0x5f, 0x61, 0x76, 0x61, 0x74, 0x61, 0x72, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x0c, 0x66, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x41, 0x76, 0x61, 0x74, 0x61, 0x72, 0x12, 0x38, - 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x20, + 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x18, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x2f, 0x76, 0x31, + 0x2f, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x17, + 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, + 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xf7, 0x01, 0x0a, 0x06, 0x46, 0x72, 0x69, 0x65, + 0x6e, 0x64, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, + 0x03, 0x75, 0x69, 0x64, 0x12, 0x1d, 0x0a, 0x0a, 0x66, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x5f, 0x75, + 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x66, 0x72, 0x69, 0x65, 0x6e, 0x64, + 0x55, 0x69, 0x64, 0x12, 0x1f, 0x0a, 0x0b, 0x66, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x5f, 0x6e, 0x61, + 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x66, 0x72, 0x69, 0x65, 0x6e, 0x64, + 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x23, 0x0a, 0x0d, 0x66, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x5f, 0x61, + 0x76, 0x61, 0x74, 0x61, 0x72, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x66, 0x72, 0x69, + 0x65, 0x6e, 0x64, 0x41, 0x76, 0x61, 0x74, 0x61, 0x72, 0x12, 0x38, 0x0a, 0x06, 0x73, 0x74, 0x61, + 0x74, 0x75, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x20, 0x2e, 0x61, 0x70, 0x69, 0x2e, + 0x75, 0x73, 0x65, 0x72, 0x2e, 0x66, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x46, + 0x72, 0x69, 0x65, 0x6e, 0x64, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x06, 0x73, 0x74, 0x61, + 0x74, 0x75, 0x73, 0x12, 0x1d, 0x0a, 0x0a, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x61, + 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, + 0x41, 0x74, 0x12, 0x1d, 0x0a, 0x0a, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, + 0x18, 0x07, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x41, + 0x74, 0x22, 0x90, 0x01, 0x0a, 0x19, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x46, 0x72, 0x69, 0x65, + 0x6e, 0x64, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, + 0x39, 0x0a, 0x04, 0x69, 0x6e, 0x66, 0x6f, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x25, 0x2e, + 0x61, 0x70, 0x69, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x66, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x2e, + 0x76, 0x31, 0x2e, 0x42, 0x61, 0x73, 0x65, 0x46, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x52, 0x04, 0x69, 0x6e, 0x66, 0x6f, 0x12, 0x38, 0x0a, 0x06, 0x73, 0x74, + 0x61, 0x74, 0x75, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x20, 0x2e, 0x61, 0x70, 0x69, + 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x66, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x2e, 0x76, 0x31, 0x2e, + 0x46, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x06, 0x73, 0x74, + 0x61, 0x74, 0x75, 0x73, 0x22, 0x89, 0x01, 0x0a, 0x11, 0x47, 0x65, 0x74, 0x46, 0x72, 0x69, 0x65, + 0x6e, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x40, 0x0a, 0x08, 0x72, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x61, + 0x70, 0x69, 0x2e, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x2e, 0x72, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x42, 0x61, 0x73, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x52, 0x08, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x32, 0x0a, 0x06, + 0x66, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x61, + 0x70, 0x69, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x66, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x2e, 0x76, + 0x31, 0x2e, 0x46, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x52, 0x06, 0x66, 0x72, 0x69, 0x65, 0x6e, 0x64, + 0x22, 0x33, 0x0a, 0x16, 0x51, 0x75, 0x65, 0x72, 0x79, 0x46, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x4c, + 0x69, 0x73, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x19, 0x0a, 0x03, 0x75, 0x69, + 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x22, 0x02, 0x20, 0x00, + 0x52, 0x03, 0x75, 0x69, 0x64, 0x22, 0x98, 0x01, 0x0a, 0x17, 0x51, 0x75, 0x65, 0x72, 0x79, 0x46, + 0x72, 0x69, 0x65, 0x6e, 0x64, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x12, 0x40, 0x0a, 0x08, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, + 0x6f, 0x72, 0x74, 0x2e, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x42, 0x61, 0x73, + 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x52, 0x08, 0x72, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x12, 0x3b, 0x0a, 0x0b, 0x66, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x5f, 0x6c, 0x69, + 0x73, 0x74, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x75, + 0x73, 0x65, 0x72, 0x2e, 0x66, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x46, 0x72, + 0x69, 0x65, 0x6e, 0x64, 0x52, 0x0a, 0x66, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x4c, 0x69, 0x73, 0x74, + 0x22, 0x95, 0x02, 0x0a, 0x0d, 0x46, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x02, + 0x69, 0x64, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, + 0x03, 0x75, 0x69, 0x64, 0x12, 0x1d, 0x0a, 0x0a, 0x66, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x5f, 0x75, + 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x66, 0x72, 0x69, 0x65, 0x6e, 0x64, + 0x55, 0x69, 0x64, 0x12, 0x3f, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x04, 0x20, + 0x01, 0x28, 0x0e, 0x32, 0x27, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x66, + 0x72, 0x69, 0x65, 0x6e, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x46, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x06, 0x73, 0x74, + 0x61, 0x74, 0x75, 0x73, 0x12, 0x1d, 0x0a, 0x0a, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x5f, + 0x61, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, + 0x64, 0x41, 0x74, 0x12, 0x1d, 0x0a, 0x0a, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x61, + 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, + 0x41, 0x74, 0x12, 0x1f, 0x0a, 0x0b, 0x66, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x5f, 0x6e, 0x61, 0x6d, + 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x66, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x4e, + 0x61, 0x6d, 0x65, 0x12, 0x23, 0x0a, 0x0d, 0x66, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x5f, 0x61, 0x76, + 0x61, 0x74, 0x61, 0x72, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x66, 0x72, 0x69, 0x65, + 0x6e, 0x64, 0x41, 0x76, 0x61, 0x74, 0x61, 0x72, 0x22, 0x56, 0x0a, 0x11, 0x42, 0x61, 0x73, 0x65, + 0x46, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x19, 0x0a, + 0x03, 0x75, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x22, + 0x02, 0x20, 0x00, 0x52, 0x03, 0x75, 0x69, 0x64, 0x12, 0x26, 0x0a, 0x0a, 0x66, 0x72, 0x69, 0x65, + 0x6e, 0x64, 0x5f, 0x75, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x42, 0x07, 0xfa, 0x42, + 0x04, 0x22, 0x02, 0x20, 0x00, 0x52, 0x09, 0x66, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x55, 0x69, 0x64, + 0x22, 0x92, 0x01, 0x0a, 0x11, 0x41, 0x64, 0x64, 0x46, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x40, 0x0a, 0x08, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x74, + 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x2e, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x2e, 0x42, 0x61, 0x73, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x52, 0x08, + 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3b, 0x0a, 0x06, 0x72, 0x65, 0x73, 0x75, + 0x6c, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x75, + 0x73, 0x65, 0x72, 0x2e, 0x66, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x64, + 0x64, 0x46, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x52, 0x06, 0x72, + 0x65, 0x73, 0x75, 0x6c, 0x74, 0x22, 0x98, 0x01, 0x0a, 0x0f, 0x41, 0x64, 0x64, 0x46, 0x72, 0x69, + 0x65, 0x6e, 0x64, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x12, 0x3b, 0x0a, 0x06, 0x73, 0x74, 0x61, + 0x74, 0x75, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x23, 0x2e, 0x61, 0x70, 0x69, 0x2e, + 0x75, 0x73, 0x65, 0x72, 0x2e, 0x66, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x41, + 0x64, 0x64, 0x46, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x06, + 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x48, 0x0a, 0x0e, 0x66, 0x72, 0x69, 0x65, 0x6e, 0x64, + 0x5f, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x66, 0x72, 0x69, 0x65, 0x6e, 0x64, - 0x2e, 0x76, 0x31, 0x2e, 0x46, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, - 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x1d, 0x0a, 0x0a, 0x63, 0x72, 0x65, 0x61, - 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x63, 0x72, - 0x65, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x12, 0x1d, 0x0a, 0x0a, 0x75, 0x70, 0x64, 0x61, 0x74, - 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x07, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x75, 0x70, 0x64, - 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x22, 0x90, 0x01, 0x0a, 0x19, 0x55, 0x70, 0x64, 0x61, 0x74, - 0x65, 0x46, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x12, 0x39, 0x0a, 0x04, 0x69, 0x6e, 0x66, 0x6f, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x66, 0x72, - 0x69, 0x65, 0x6e, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x42, 0x61, 0x73, 0x65, 0x46, 0x72, 0x69, 0x65, - 0x6e, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x52, 0x04, 0x69, 0x6e, 0x66, 0x6f, 0x12, - 0x38, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, - 0x20, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x66, 0x72, 0x69, 0x65, 0x6e, - 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x46, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x53, 0x74, 0x61, 0x74, 0x75, - 0x73, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x22, 0x89, 0x01, 0x0a, 0x11, 0x47, 0x65, - 0x74, 0x46, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, + 0x2e, 0x76, 0x31, 0x2e, 0x46, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x52, 0x0d, 0x66, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x22, 0xbf, 0x01, 0x0a, 0x1b, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x72, 0x6d, 0x46, 0x72, 0x69, 0x65, + 0x6e, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x12, 0x19, 0x0a, 0x03, 0x75, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x42, 0x07, 0xfa, + 0x42, 0x04, 0x22, 0x02, 0x20, 0x00, 0x52, 0x03, 0x75, 0x69, 0x64, 0x12, 0x33, 0x0a, 0x11, 0x66, + 0x72, 0x69, 0x65, 0x6e, 0x64, 0x5f, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x5f, 0x69, 0x64, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x32, 0x02, 0x20, 0x00, 0x52, + 0x0f, 0x66, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x49, 0x64, + 0x12, 0x50, 0x0a, 0x06, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0e, + 0x32, 0x2e, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x66, 0x72, 0x69, 0x65, + 0x6e, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x72, 0x6d, 0x46, 0x72, 0x69, + 0x65, 0x6e, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, + 0x42, 0x08, 0xfa, 0x42, 0x05, 0x82, 0x01, 0x02, 0x10, 0x01, 0x52, 0x06, 0x61, 0x63, 0x74, 0x69, + 0x6f, 0x6e, 0x22, 0xa6, 0x01, 0x0a, 0x18, 0x47, 0x65, 0x74, 0x46, 0x72, 0x69, 0x65, 0x6e, 0x64, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x40, 0x0a, 0x08, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x2e, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x42, 0x61, 0x73, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x52, 0x08, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x12, 0x32, 0x0a, 0x06, 0x66, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x1a, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x66, 0x72, 0x69, - 0x65, 0x6e, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x46, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x52, 0x06, 0x66, - 0x72, 0x69, 0x65, 0x6e, 0x64, 0x22, 0x35, 0x0a, 0x16, 0x51, 0x75, 0x65, 0x72, 0x79, 0x46, 0x72, - 0x69, 0x65, 0x6e, 0x64, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, - 0x1b, 0x0a, 0x03, 0x75, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x09, 0xfa, 0x42, - 0x06, 0x72, 0x04, 0x10, 0x14, 0x18, 0x18, 0x52, 0x03, 0x75, 0x69, 0x64, 0x22, 0x98, 0x01, 0x0a, - 0x17, 0x51, 0x75, 0x65, 0x72, 0x79, 0x46, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x4c, 0x69, 0x73, 0x74, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x40, 0x0a, 0x08, 0x72, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x61, 0x70, 0x69, - 0x2e, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x2e, 0x72, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x2e, 0x42, 0x61, 0x73, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x52, 0x08, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3b, 0x0a, 0x0b, 0x66, 0x72, - 0x69, 0x65, 0x6e, 0x64, 0x5f, 0x6c, 0x69, 0x73, 0x74, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, - 0x1a, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x66, 0x72, 0x69, 0x65, 0x6e, - 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x46, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x52, 0x0a, 0x66, 0x72, 0x69, - 0x65, 0x6e, 0x64, 0x4c, 0x69, 0x73, 0x74, 0x22, 0x95, 0x02, 0x0a, 0x0d, 0x46, 0x72, 0x69, 0x65, - 0x6e, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x02, 0x69, 0x64, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x69, 0x64, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x69, 0x64, 0x12, 0x1d, 0x0a, 0x0a, 0x66, - 0x72, 0x69, 0x65, 0x6e, 0x64, 0x5f, 0x75, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x09, 0x66, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x55, 0x69, 0x64, 0x12, 0x3f, 0x0a, 0x06, 0x73, 0x74, - 0x61, 0x74, 0x75, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x27, 0x2e, 0x61, 0x70, 0x69, + 0x65, 0x12, 0x48, 0x0a, 0x0e, 0x66, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x5f, 0x72, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x61, 0x70, 0x69, 0x2e, + 0x75, 0x73, 0x65, 0x72, 0x2e, 0x66, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x46, + 0x72, 0x69, 0x65, 0x6e, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x52, 0x0d, 0x66, 0x72, + 0x69, 0x65, 0x6e, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x85, 0x01, 0x0a, 0x1d, + 0x51, 0x75, 0x65, 0x72, 0x79, 0x46, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x19, 0x0a, + 0x03, 0x75, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x22, + 0x02, 0x20, 0x00, 0x52, 0x03, 0x75, 0x69, 0x64, 0x12, 0x49, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, + 0x75, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x27, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x75, + 0x73, 0x65, 0x72, 0x2e, 0x66, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x46, 0x72, + 0x69, 0x65, 0x6e, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x53, 0x74, 0x61, 0x74, 0x75, + 0x73, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x82, 0x01, 0x02, 0x10, 0x01, 0x52, 0x06, 0x73, 0x74, 0x61, + 0x74, 0x75, 0x73, 0x22, 0xb5, 0x01, 0x0a, 0x1e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x46, 0x72, 0x69, + 0x65, 0x6e, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x40, 0x0a, 0x08, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x74, + 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x2e, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x2e, 0x42, 0x61, 0x73, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x52, 0x08, + 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x51, 0x0a, 0x13, 0x66, 0x72, 0x69, 0x65, + 0x6e, 0x64, 0x5f, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x5f, 0x6c, 0x69, 0x73, 0x74, 0x18, + 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x75, 0x73, 0x65, 0x72, + 0x2e, 0x66, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x46, 0x72, 0x69, 0x65, 0x6e, + 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x52, 0x11, 0x66, 0x72, 0x69, 0x65, 0x6e, 0x64, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x4c, 0x69, 0x73, 0x74, 0x22, 0xa4, 0x01, 0x0a, 0x1e, + 0x43, 0x68, 0x65, 0x63, 0x6b, 0x53, 0x65, 0x6e, 0x64, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, + 0x41, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x22, + 0x0a, 0x08, 0x66, 0x72, 0x6f, 0x6d, 0x5f, 0x75, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, + 0x42, 0x07, 0xfa, 0x42, 0x04, 0x22, 0x02, 0x20, 0x00, 0x52, 0x07, 0x66, 0x72, 0x6f, 0x6d, 0x55, + 0x69, 0x64, 0x12, 0x1e, 0x0a, 0x06, 0x74, 0x6f, 0x5f, 0x75, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x03, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x22, 0x02, 0x20, 0x00, 0x52, 0x05, 0x74, 0x6f, 0x55, + 0x69, 0x64, 0x12, 0x3e, 0x0a, 0x0c, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x79, + 0x70, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1b, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x6d, + 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, + 0x6e, 0x54, 0x79, 0x70, 0x65, 0x52, 0x0b, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x54, 0x79, + 0x70, 0x65, 0x22, 0x96, 0x01, 0x0a, 0x1f, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x53, 0x65, 0x6e, 0x64, + 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x41, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x40, 0x0a, 0x08, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x74, + 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x2e, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x2e, 0x42, 0x61, 0x73, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x52, 0x08, + 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x22, 0x0a, 0x0a, 0x73, 0x65, 0x73, 0x73, + 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x09, + 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x88, 0x01, 0x01, 0x42, 0x0d, 0x0a, 0x0b, + 0x5f, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x2a, 0x44, 0x0a, 0x0c, 0x46, + 0x72, 0x69, 0x65, 0x6e, 0x64, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x0a, 0x0a, 0x06, 0x46, + 0x52, 0x49, 0x45, 0x4e, 0x44, 0x10, 0x00, 0x12, 0x0c, 0x0a, 0x08, 0x53, 0x54, 0x52, 0x41, 0x4e, + 0x47, 0x45, 0x52, 0x10, 0x01, 0x12, 0x0b, 0x0a, 0x07, 0x42, 0x4c, 0x4f, 0x43, 0x4b, 0x45, 0x44, + 0x10, 0x02, 0x12, 0x0d, 0x0a, 0x09, 0x55, 0x4e, 0x42, 0x4c, 0x4f, 0x43, 0x4b, 0x45, 0x44, 0x10, + 0x03, 0x2a, 0x40, 0x0a, 0x13, 0x46, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x0d, 0x0a, 0x09, 0x52, 0x45, 0x51, 0x55, + 0x45, 0x53, 0x54, 0x45, 0x44, 0x10, 0x00, 0x12, 0x0c, 0x0a, 0x08, 0x41, 0x43, 0x43, 0x45, 0x50, + 0x54, 0x45, 0x44, 0x10, 0x01, 0x12, 0x0c, 0x0a, 0x08, 0x52, 0x45, 0x4a, 0x45, 0x43, 0x54, 0x45, + 0x44, 0x10, 0x02, 0x2a, 0x87, 0x01, 0x0a, 0x0f, 0x41, 0x64, 0x64, 0x46, 0x72, 0x69, 0x65, 0x6e, + 0x64, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x18, 0x0a, 0x14, 0x53, 0x45, 0x4e, 0x44, 0x5f, + 0x52, 0x45, 0x51, 0x55, 0x45, 0x53, 0x54, 0x5f, 0x53, 0x55, 0x43, 0x43, 0x45, 0x53, 0x53, 0x10, + 0x00, 0x12, 0x18, 0x0a, 0x14, 0x41, 0x4c, 0x52, 0x45, 0x41, 0x44, 0x59, 0x5f, 0x53, 0x45, 0x4e, + 0x54, 0x5f, 0x52, 0x45, 0x51, 0x55, 0x45, 0x53, 0x54, 0x10, 0x01, 0x12, 0x16, 0x0a, 0x12, 0x41, + 0x44, 0x44, 0x5f, 0x46, 0x52, 0x49, 0x45, 0x4e, 0x44, 0x5f, 0x53, 0x55, 0x43, 0x43, 0x45, 0x53, + 0x53, 0x10, 0x02, 0x12, 0x11, 0x0a, 0x0d, 0x42, 0x4c, 0x4f, 0x43, 0x4b, 0x45, 0x44, 0x5f, 0x42, + 0x59, 0x5f, 0x4d, 0x45, 0x10, 0x03, 0x12, 0x15, 0x0a, 0x11, 0x42, 0x4c, 0x4f, 0x43, 0x4b, 0x45, + 0x44, 0x5f, 0x42, 0x59, 0x5f, 0x46, 0x52, 0x49, 0x45, 0x4e, 0x44, 0x10, 0x04, 0x2a, 0x34, 0x0a, + 0x1a, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x72, 0x6d, 0x46, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x0a, 0x0a, 0x06, 0x41, + 0x43, 0x43, 0x45, 0x50, 0x54, 0x10, 0x00, 0x12, 0x0a, 0x0a, 0x06, 0x52, 0x45, 0x4a, 0x45, 0x43, + 0x54, 0x10, 0x01, 0x32, 0xd3, 0x07, 0x0a, 0x0d, 0x46, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x53, 0x65, + 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x59, 0x0a, 0x09, 0x41, 0x64, 0x64, 0x46, 0x72, 0x69, 0x65, + 0x6e, 0x64, 0x12, 0x25, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x66, 0x72, + 0x69, 0x65, 0x6e, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x42, 0x61, 0x73, 0x65, 0x46, 0x72, 0x69, 0x65, + 0x6e, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x25, 0x2e, 0x61, 0x70, 0x69, 0x2e, + 0x75, 0x73, 0x65, 0x72, 0x2e, 0x66, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x41, + 0x64, 0x64, 0x46, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x12, 0x6d, 0x0a, 0x14, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x72, 0x6d, 0x46, 0x72, 0x69, 0x65, 0x6e, + 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x2f, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x75, + 0x73, 0x65, 0x72, 0x2e, 0x66, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x6f, + 0x6e, 0x66, 0x69, 0x72, 0x6d, 0x46, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x24, 0x2e, 0x61, 0x70, 0x69, 0x2e, + 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x2e, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x2e, 0x42, 0x61, 0x73, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, + 0x67, 0x0a, 0x10, 0x47, 0x65, 0x74, 0x46, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x12, 0x25, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x66, + 0x72, 0x69, 0x65, 0x6e, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x42, 0x61, 0x73, 0x65, 0x46, 0x72, 0x69, + 0x65, 0x6e, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2c, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x66, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x2e, 0x76, 0x31, 0x2e, - 0x46, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x53, 0x74, 0x61, - 0x74, 0x75, 0x73, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x1d, 0x0a, 0x0a, 0x63, - 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x03, 0x52, - 0x09, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x12, 0x1d, 0x0a, 0x0a, 0x75, 0x70, - 0x64, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, - 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x12, 0x1f, 0x0a, 0x0b, 0x66, 0x72, 0x69, - 0x65, 0x6e, 0x64, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, - 0x66, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x23, 0x0a, 0x0d, 0x66, 0x72, - 0x69, 0x65, 0x6e, 0x64, 0x5f, 0x61, 0x76, 0x61, 0x74, 0x61, 0x72, 0x18, 0x08, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x0c, 0x66, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x41, 0x76, 0x61, 0x74, 0x61, 0x72, 0x22, - 0x59, 0x0a, 0x10, 0x41, 0x64, 0x64, 0x46, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x12, 0x1b, 0x0a, 0x03, 0x75, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, - 0x42, 0x09, 0xfa, 0x42, 0x06, 0x72, 0x04, 0x10, 0x14, 0x18, 0x18, 0x52, 0x03, 0x75, 0x69, 0x64, - 0x12, 0x28, 0x0a, 0x0a, 0x66, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x5f, 0x75, 0x69, 0x64, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x09, 0x42, 0x09, 0xfa, 0x42, 0x06, 0x72, 0x04, 0x10, 0x14, 0x18, 0x18, 0x52, - 0x09, 0x66, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x55, 0x69, 0x64, 0x22, 0x5a, 0x0a, 0x11, 0x42, 0x61, - 0x73, 0x65, 0x46, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, - 0x1b, 0x0a, 0x03, 0x75, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x09, 0xfa, 0x42, - 0x06, 0x72, 0x04, 0x10, 0x14, 0x18, 0x18, 0x52, 0x03, 0x75, 0x69, 0x64, 0x12, 0x28, 0x0a, 0x0a, - 0x66, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x5f, 0x75, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, - 0x42, 0x09, 0xfa, 0x42, 0x06, 0x72, 0x04, 0x10, 0x14, 0x18, 0x18, 0x52, 0x09, 0x66, 0x72, 0x69, - 0x65, 0x6e, 0x64, 0x55, 0x69, 0x64, 0x22, 0x92, 0x01, 0x0a, 0x11, 0x41, 0x64, 0x64, 0x46, 0x72, - 0x69, 0x65, 0x6e, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x40, 0x0a, 0x08, - 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x24, - 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x2e, 0x72, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x42, 0x61, 0x73, 0x65, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x52, 0x08, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3b, - 0x0a, 0x06, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x23, - 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x66, 0x72, 0x69, 0x65, 0x6e, 0x64, - 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x64, 0x64, 0x46, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x52, 0x65, 0x73, - 0x75, 0x6c, 0x74, 0x52, 0x06, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x22, 0x98, 0x01, 0x0a, 0x0f, - 0x41, 0x64, 0x64, 0x46, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x12, - 0x3b, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, - 0x23, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x66, 0x72, 0x69, 0x65, 0x6e, - 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x64, 0x64, 0x46, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x53, 0x74, - 0x61, 0x74, 0x75, 0x73, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x48, 0x0a, 0x0e, - 0x66, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x5f, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, - 0x66, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x46, 0x72, 0x69, 0x65, 0x6e, 0x64, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x52, 0x0d, 0x66, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0xbd, 0x01, 0x0a, 0x17, 0x43, 0x6f, 0x6e, 0x66, 0x69, - 0x72, 0x6d, 0x46, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x52, - 0x65, 0x71, 0x12, 0x1b, 0x0a, 0x03, 0x75, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, - 0x09, 0xfa, 0x42, 0x06, 0x72, 0x04, 0x10, 0x14, 0x18, 0x18, 0x52, 0x03, 0x75, 0x69, 0x64, 0x12, - 0x33, 0x0a, 0x11, 0x66, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x5f, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x22, - 0x02, 0x20, 0x00, 0x52, 0x0f, 0x66, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x49, 0x64, 0x12, 0x50, 0x0a, 0x06, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03, - 0x20, 0x01, 0x28, 0x0e, 0x32, 0x2e, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, - 0x66, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x72, - 0x6d, 0x46, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x41, 0x63, - 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x82, 0x01, 0x02, 0x10, 0x01, 0x52, 0x06, - 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0xa6, 0x01, 0x0a, 0x18, 0x47, 0x65, 0x74, 0x46, 0x72, - 0x69, 0x65, 0x6e, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x12, 0x40, 0x0a, 0x08, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x74, 0x72, 0x61, 0x6e, - 0x73, 0x70, 0x6f, 0x72, 0x74, 0x2e, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x42, - 0x61, 0x73, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x52, 0x08, 0x72, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x48, 0x0a, 0x0e, 0x66, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x5f, - 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x21, 0x2e, - 0x61, 0x70, 0x69, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x66, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x2e, - 0x76, 0x31, 0x2e, 0x46, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x52, 0x0d, 0x66, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, - 0x87, 0x01, 0x0a, 0x1d, 0x51, 0x75, 0x65, 0x72, 0x79, 0x46, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x12, 0x1b, 0x0a, 0x03, 0x75, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x09, - 0xfa, 0x42, 0x06, 0x72, 0x04, 0x10, 0x14, 0x18, 0x18, 0x52, 0x03, 0x75, 0x69, 0x64, 0x12, 0x49, - 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x27, - 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x66, 0x72, 0x69, 0x65, 0x6e, 0x64, - 0x2e, 0x76, 0x31, 0x2e, 0x46, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x82, 0x01, 0x02, 0x10, - 0x01, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x22, 0xb5, 0x01, 0x0a, 0x1e, 0x51, 0x75, - 0x65, 0x72, 0x79, 0x46, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x40, 0x0a, 0x08, - 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x24, + 0x47, 0x65, 0x74, 0x46, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x7f, 0x0a, 0x16, 0x51, 0x75, 0x65, 0x72, + 0x79, 0x46, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x4c, 0x69, + 0x73, 0x74, 0x12, 0x31, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x66, 0x72, + 0x69, 0x65, 0x6e, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x46, 0x72, 0x69, + 0x65, 0x6e, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x32, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x75, 0x73, 0x65, 0x72, + 0x2e, 0x66, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, + 0x46, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x4c, 0x69, 0x73, + 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x69, 0x0a, 0x12, 0x55, 0x70, 0x64, + 0x61, 0x74, 0x65, 0x46, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, + 0x2d, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x66, 0x72, 0x69, 0x65, 0x6e, + 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x46, 0x72, 0x69, 0x65, 0x6e, + 0x64, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x24, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x2e, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x42, 0x61, 0x73, 0x65, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x52, 0x08, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x51, - 0x0a, 0x13, 0x66, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x5f, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x5f, 0x6c, 0x69, 0x73, 0x74, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x61, 0x70, - 0x69, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x66, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x2e, 0x76, 0x31, - 0x2e, 0x46, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x52, 0x11, - 0x66, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x4c, 0x69, 0x73, - 0x74, 0x22, 0xad, 0x01, 0x0a, 0x1e, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x53, 0x65, 0x6e, 0x64, 0x4d, - 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x41, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x12, 0x24, 0x0a, 0x08, 0x66, 0x72, 0x6f, 0x6d, 0x5f, 0x75, 0x69, 0x64, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x09, 0xfa, 0x42, 0x06, 0x72, 0x04, 0x10, 0x14, 0x18, - 0x18, 0x52, 0x07, 0x66, 0x72, 0x6f, 0x6d, 0x55, 0x69, 0x64, 0x12, 0x20, 0x0a, 0x06, 0x74, 0x6f, - 0x5f, 0x75, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x09, 0xfa, 0x42, 0x06, 0x72, - 0x04, 0x10, 0x14, 0x18, 0x18, 0x52, 0x05, 0x74, 0x6f, 0x55, 0x69, 0x64, 0x12, 0x43, 0x0a, 0x0c, - 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x03, 0x20, 0x01, - 0x28, 0x0e, 0x32, 0x20, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x73, 0x65, - 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, - 0x54, 0x79, 0x70, 0x65, 0x52, 0x0b, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x54, 0x79, 0x70, - 0x65, 0x22, 0x96, 0x01, 0x0a, 0x1f, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x53, 0x65, 0x6e, 0x64, 0x4d, - 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x41, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x40, 0x0a, 0x08, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x74, 0x72, + 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x57, 0x0a, 0x08, 0x49, 0x73, 0x46, 0x72, 0x69, 0x65, 0x6e, 0x64, + 0x12, 0x25, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x66, 0x72, 0x69, 0x65, + 0x6e, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x42, 0x61, 0x73, 0x65, 0x46, 0x72, 0x69, 0x65, 0x6e, 0x64, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x24, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x2e, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x2e, 0x42, 0x61, 0x73, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x52, 0x08, 0x72, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x22, 0x0a, 0x0a, 0x73, 0x65, 0x73, 0x73, 0x69, - 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x48, 0x00, 0x52, 0x09, 0x73, - 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x88, 0x01, 0x01, 0x42, 0x0d, 0x0a, 0x0b, 0x5f, - 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x2a, 0x44, 0x0a, 0x0c, 0x46, 0x72, - 0x69, 0x65, 0x6e, 0x64, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x0a, 0x0a, 0x06, 0x46, 0x52, - 0x49, 0x45, 0x4e, 0x44, 0x10, 0x00, 0x12, 0x0c, 0x0a, 0x08, 0x53, 0x54, 0x52, 0x41, 0x4e, 0x47, - 0x45, 0x52, 0x10, 0x01, 0x12, 0x0b, 0x0a, 0x07, 0x42, 0x4c, 0x4f, 0x43, 0x4b, 0x45, 0x44, 0x10, - 0x02, 0x12, 0x0d, 0x0a, 0x09, 0x55, 0x4e, 0x42, 0x4c, 0x4f, 0x43, 0x4b, 0x45, 0x44, 0x10, 0x03, - 0x2a, 0x40, 0x0a, 0x13, 0x46, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x0d, 0x0a, 0x09, 0x52, 0x45, 0x51, 0x55, 0x45, - 0x53, 0x54, 0x45, 0x44, 0x10, 0x00, 0x12, 0x0c, 0x0a, 0x08, 0x41, 0x43, 0x43, 0x45, 0x50, 0x54, - 0x45, 0x44, 0x10, 0x01, 0x12, 0x0c, 0x0a, 0x08, 0x52, 0x45, 0x4a, 0x45, 0x43, 0x54, 0x45, 0x44, - 0x10, 0x02, 0x2a, 0x87, 0x01, 0x0a, 0x0f, 0x41, 0x64, 0x64, 0x46, 0x72, 0x69, 0x65, 0x6e, 0x64, - 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x18, 0x0a, 0x14, 0x53, 0x45, 0x4e, 0x44, 0x5f, 0x52, - 0x45, 0x51, 0x55, 0x45, 0x53, 0x54, 0x5f, 0x53, 0x55, 0x43, 0x43, 0x45, 0x53, 0x53, 0x10, 0x00, - 0x12, 0x18, 0x0a, 0x14, 0x41, 0x4c, 0x52, 0x45, 0x41, 0x44, 0x59, 0x5f, 0x53, 0x45, 0x4e, 0x54, - 0x5f, 0x52, 0x45, 0x51, 0x55, 0x45, 0x53, 0x54, 0x10, 0x01, 0x12, 0x16, 0x0a, 0x12, 0x41, 0x44, - 0x44, 0x5f, 0x46, 0x52, 0x49, 0x45, 0x4e, 0x44, 0x5f, 0x53, 0x55, 0x43, 0x43, 0x45, 0x53, 0x53, - 0x10, 0x02, 0x12, 0x11, 0x0a, 0x0d, 0x42, 0x4c, 0x4f, 0x43, 0x4b, 0x45, 0x44, 0x5f, 0x42, 0x59, - 0x5f, 0x4d, 0x45, 0x10, 0x03, 0x12, 0x15, 0x0a, 0x11, 0x42, 0x4c, 0x4f, 0x43, 0x4b, 0x45, 0x44, - 0x5f, 0x42, 0x59, 0x5f, 0x46, 0x52, 0x49, 0x45, 0x4e, 0x44, 0x10, 0x04, 0x2a, 0x34, 0x0a, 0x1a, - 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x72, 0x6d, 0x46, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x0a, 0x0a, 0x06, 0x41, 0x43, - 0x43, 0x45, 0x50, 0x54, 0x10, 0x00, 0x12, 0x0a, 0x0a, 0x06, 0x52, 0x45, 0x4a, 0x45, 0x43, 0x54, - 0x10, 0x01, 0x32, 0xce, 0x07, 0x0a, 0x0d, 0x46, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x53, 0x65, 0x72, - 0x76, 0x69, 0x63, 0x65, 0x12, 0x58, 0x0a, 0x09, 0x41, 0x64, 0x64, 0x46, 0x72, 0x69, 0x65, 0x6e, - 0x64, 0x12, 0x24, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x66, 0x72, 0x69, - 0x65, 0x6e, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x64, 0x64, 0x46, 0x72, 0x69, 0x65, 0x6e, 0x64, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x25, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x75, 0x73, - 0x65, 0x72, 0x2e, 0x66, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x64, 0x64, - 0x46, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x69, - 0x0a, 0x14, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x72, 0x6d, 0x46, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x2b, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x75, 0x73, 0x65, - 0x72, 0x2e, 0x66, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x6f, 0x6e, 0x66, - 0x69, 0x72, 0x6d, 0x46, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x52, 0x65, 0x71, 0x1a, 0x24, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, - 0x6f, 0x72, 0x74, 0x2e, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x42, 0x61, 0x73, - 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x67, 0x0a, 0x10, 0x47, 0x65, 0x74, - 0x46, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x25, 0x2e, - 0x61, 0x70, 0x69, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x66, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x2e, - 0x76, 0x31, 0x2e, 0x42, 0x61, 0x73, 0x65, 0x46, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2c, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, - 0x66, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x46, 0x72, 0x69, - 0x65, 0x6e, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x12, 0x7f, 0x0a, 0x16, 0x51, 0x75, 0x65, 0x72, 0x79, 0x46, 0x72, 0x69, 0x65, 0x6e, - 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x31, 0x2e, 0x61, - 0x70, 0x69, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x66, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x2e, 0x76, - 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x46, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, - 0x32, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x66, 0x72, 0x69, 0x65, 0x6e, - 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x46, 0x72, 0x69, 0x65, 0x6e, 0x64, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x12, 0x69, 0x0a, 0x12, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x46, 0x72, 0x69, - 0x65, 0x6e, 0x64, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x2d, 0x2e, 0x61, 0x70, 0x69, 0x2e, - 0x75, 0x73, 0x65, 0x72, 0x2e, 0x66, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x55, - 0x70, 0x64, 0x61, 0x74, 0x65, 0x46, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x53, 0x74, 0x61, 0x74, 0x75, - 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x24, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x74, - 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x2e, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x2e, 0x42, 0x61, 0x73, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x57, - 0x0a, 0x08, 0x49, 0x73, 0x46, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x12, 0x25, 0x2e, 0x61, 0x70, 0x69, + 0x2e, 0x42, 0x61, 0x73, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x59, 0x0a, + 0x09, 0x47, 0x65, 0x74, 0x46, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x12, 0x25, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x66, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x42, 0x61, 0x73, 0x65, 0x46, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x1a, 0x24, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, - 0x74, 0x2e, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x42, 0x61, 0x73, 0x65, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x59, 0x0a, 0x09, 0x47, 0x65, 0x74, 0x46, 0x72, - 0x69, 0x65, 0x6e, 0x64, 0x12, 0x25, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, - 0x66, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x42, 0x61, 0x73, 0x65, 0x46, 0x72, - 0x69, 0x65, 0x6e, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x25, 0x2e, 0x61, 0x70, + 0x74, 0x1a, 0x25, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x66, 0x72, 0x69, + 0x65, 0x6e, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x46, 0x72, 0x69, 0x65, 0x6e, 0x64, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x6a, 0x0a, 0x0f, 0x51, 0x75, 0x65, 0x72, + 0x79, 0x46, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x2a, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x66, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x2e, 0x76, 0x31, - 0x2e, 0x47, 0x65, 0x74, 0x46, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x12, 0x6a, 0x0a, 0x0f, 0x51, 0x75, 0x65, 0x72, 0x79, 0x46, 0x72, 0x69, 0x65, 0x6e, - 0x64, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x2a, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x75, 0x73, 0x65, 0x72, - 0x2e, 0x66, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, - 0x46, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x1a, 0x2b, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x66, 0x72, 0x69, - 0x65, 0x6e, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x46, 0x72, 0x69, 0x65, - 0x6e, 0x64, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x82, - 0x01, 0x0a, 0x17, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x53, 0x65, 0x6e, 0x64, 0x4d, 0x65, 0x73, 0x73, - 0x61, 0x67, 0x65, 0x41, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x12, 0x32, 0x2e, 0x61, 0x70, 0x69, - 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x66, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x2e, 0x76, 0x31, 0x2e, - 0x43, 0x68, 0x65, 0x63, 0x6b, 0x53, 0x65, 0x6e, 0x64, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, - 0x41, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x33, - 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x66, 0x72, 0x69, 0x65, 0x6e, 0x64, - 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x53, 0x65, 0x6e, 0x64, 0x4d, 0x65, 0x73, - 0x73, 0x61, 0x67, 0x65, 0x41, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x42, 0x27, 0x5a, 0x25, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, - 0x6d, 0x2f, 0x67, 0x6f, 0x2d, 0x67, 0x6f, 0x69, 0x6d, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x75, 0x73, - 0x65, 0x72, 0x2f, 0x66, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x2f, 0x76, 0x31, 0x62, 0x06, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x33, + 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x46, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x4c, 0x69, 0x73, 0x74, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2b, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x75, 0x73, + 0x65, 0x72, 0x2e, 0x66, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, + 0x72, 0x79, 0x46, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x82, 0x01, 0x0a, 0x17, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x53, 0x65, + 0x6e, 0x64, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x41, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, + 0x12, 0x32, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x66, 0x72, 0x69, 0x65, + 0x6e, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x53, 0x65, 0x6e, 0x64, 0x4d, + 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x41, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x1a, 0x33, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, + 0x66, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x53, + 0x65, 0x6e, 0x64, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x41, 0x62, 0x69, 0x6c, 0x69, 0x74, + 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0x27, 0x5a, 0x25, 0x67, 0x69, 0x74, + 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x67, 0x6f, 0x2d, 0x67, 0x6f, 0x69, 0x6d, 0x2f, + 0x61, 0x70, 0x69, 0x2f, 0x75, 0x73, 0x65, 0x72, 0x2f, 0x66, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x2f, + 0x76, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -1482,7 +1420,7 @@ func file_user_friend_v1_friend_proto_rawDescGZIP() []byte { } var file_user_friend_v1_friend_proto_enumTypes = make([]protoimpl.EnumInfo, 4) -var file_user_friend_v1_friend_proto_msgTypes = make([]protoimpl.MessageInfo, 16) +var file_user_friend_v1_friend_proto_msgTypes = make([]protoimpl.MessageInfo, 15) var file_user_friend_v1_friend_proto_goTypes = []interface{}{ (FriendStatus)(0), // 0: api.user.friend.v1.FriendStatus (FriendRequestStatus)(0), // 1: api.user.friend.v1.FriendRequestStatus @@ -1494,58 +1432,57 @@ var file_user_friend_v1_friend_proto_goTypes = []interface{}{ (*QueryFriendListRequest)(nil), // 7: api.user.friend.v1.QueryFriendListRequest (*QueryFriendListResponse)(nil), // 8: api.user.friend.v1.QueryFriendListResponse (*FriendRequest)(nil), // 9: api.user.friend.v1.FriendRequest - (*AddFriendRequest)(nil), // 10: api.user.friend.v1.AddFriendRequest - (*BaseFriendRequest)(nil), // 11: api.user.friend.v1.BaseFriendRequest - (*AddFriendResponse)(nil), // 12: api.user.friend.v1.AddFriendResponse - (*AddFriendResult)(nil), // 13: api.user.friend.v1.AddFriendResult - (*ConfirmFriendRequestReq)(nil), // 14: api.user.friend.v1.ConfirmFriendRequestReq - (*GetFriendRequestResponse)(nil), // 15: api.user.friend.v1.GetFriendRequestResponse - (*QueryFriendRequestListRequest)(nil), // 16: api.user.friend.v1.QueryFriendRequestListRequest - (*QueryFriendRequestListResponse)(nil), // 17: api.user.friend.v1.QueryFriendRequestListResponse - (*CheckSendMessageAbilityRequest)(nil), // 18: api.user.friend.v1.CheckSendMessageAbilityRequest - (*CheckSendMessageAbilityResponse)(nil), // 19: api.user.friend.v1.CheckSendMessageAbilityResponse - (*response.BaseResponse)(nil), // 20: api.transport.response.BaseResponse - (v1.SessionType)(0), // 21: api.user.session.v1.SessionType + (*BaseFriendRequest)(nil), // 10: api.user.friend.v1.BaseFriendRequest + (*AddFriendResponse)(nil), // 11: api.user.friend.v1.AddFriendResponse + (*AddFriendResult)(nil), // 12: api.user.friend.v1.AddFriendResult + (*ConfirmFriendRequestRequest)(nil), // 13: api.user.friend.v1.ConfirmFriendRequestRequest + (*GetFriendRequestResponse)(nil), // 14: api.user.friend.v1.GetFriendRequestResponse + (*QueryFriendRequestListRequest)(nil), // 15: api.user.friend.v1.QueryFriendRequestListRequest + (*QueryFriendRequestListResponse)(nil), // 16: api.user.friend.v1.QueryFriendRequestListResponse + (*CheckSendMessageAbilityRequest)(nil), // 17: api.user.friend.v1.CheckSendMessageAbilityRequest + (*CheckSendMessageAbilityResponse)(nil), // 18: api.user.friend.v1.CheckSendMessageAbilityResponse + (*response.BaseResponse)(nil), // 19: api.transport.response.BaseResponse + (v1.SessionType)(0), // 20: api.message.v1.SessionType } var file_user_friend_v1_friend_proto_depIdxs = []int32{ 0, // 0: api.user.friend.v1.Friend.status:type_name -> api.user.friend.v1.FriendStatus - 11, // 1: api.user.friend.v1.UpdateFriendStatusRequest.info:type_name -> api.user.friend.v1.BaseFriendRequest + 10, // 1: api.user.friend.v1.UpdateFriendStatusRequest.info:type_name -> api.user.friend.v1.BaseFriendRequest 0, // 2: api.user.friend.v1.UpdateFriendStatusRequest.status:type_name -> api.user.friend.v1.FriendStatus - 20, // 3: api.user.friend.v1.GetFriendResponse.response:type_name -> api.transport.response.BaseResponse + 19, // 3: api.user.friend.v1.GetFriendResponse.response:type_name -> api.transport.response.BaseResponse 4, // 4: api.user.friend.v1.GetFriendResponse.friend:type_name -> api.user.friend.v1.Friend - 20, // 5: api.user.friend.v1.QueryFriendListResponse.response:type_name -> api.transport.response.BaseResponse + 19, // 5: api.user.friend.v1.QueryFriendListResponse.response:type_name -> api.transport.response.BaseResponse 4, // 6: api.user.friend.v1.QueryFriendListResponse.friend_list:type_name -> api.user.friend.v1.Friend 1, // 7: api.user.friend.v1.FriendRequest.status:type_name -> api.user.friend.v1.FriendRequestStatus - 20, // 8: api.user.friend.v1.AddFriendResponse.response:type_name -> api.transport.response.BaseResponse - 13, // 9: api.user.friend.v1.AddFriendResponse.result:type_name -> api.user.friend.v1.AddFriendResult + 19, // 8: api.user.friend.v1.AddFriendResponse.response:type_name -> api.transport.response.BaseResponse + 12, // 9: api.user.friend.v1.AddFriendResponse.result:type_name -> api.user.friend.v1.AddFriendResult 2, // 10: api.user.friend.v1.AddFriendResult.status:type_name -> api.user.friend.v1.AddFriendStatus 9, // 11: api.user.friend.v1.AddFriendResult.friend_request:type_name -> api.user.friend.v1.FriendRequest - 3, // 12: api.user.friend.v1.ConfirmFriendRequestReq.action:type_name -> api.user.friend.v1.ConfirmFriendRequestAction - 20, // 13: api.user.friend.v1.GetFriendRequestResponse.response:type_name -> api.transport.response.BaseResponse + 3, // 12: api.user.friend.v1.ConfirmFriendRequestRequest.action:type_name -> api.user.friend.v1.ConfirmFriendRequestAction + 19, // 13: api.user.friend.v1.GetFriendRequestResponse.response:type_name -> api.transport.response.BaseResponse 9, // 14: api.user.friend.v1.GetFriendRequestResponse.friend_request:type_name -> api.user.friend.v1.FriendRequest 1, // 15: api.user.friend.v1.QueryFriendRequestListRequest.status:type_name -> api.user.friend.v1.FriendRequestStatus - 20, // 16: api.user.friend.v1.QueryFriendRequestListResponse.response:type_name -> api.transport.response.BaseResponse + 19, // 16: api.user.friend.v1.QueryFriendRequestListResponse.response:type_name -> api.transport.response.BaseResponse 9, // 17: api.user.friend.v1.QueryFriendRequestListResponse.friend_request_list:type_name -> api.user.friend.v1.FriendRequest - 21, // 18: api.user.friend.v1.CheckSendMessageAbilityRequest.session_type:type_name -> api.user.session.v1.SessionType - 20, // 19: api.user.friend.v1.CheckSendMessageAbilityResponse.response:type_name -> api.transport.response.BaseResponse - 10, // 20: api.user.friend.v1.FriendService.AddFriend:input_type -> api.user.friend.v1.AddFriendRequest - 14, // 21: api.user.friend.v1.FriendService.ConfirmFriendRequest:input_type -> api.user.friend.v1.ConfirmFriendRequestReq - 11, // 22: api.user.friend.v1.FriendService.GetFriendRequest:input_type -> api.user.friend.v1.BaseFriendRequest - 16, // 23: api.user.friend.v1.FriendService.QueryFriendRequestList:input_type -> api.user.friend.v1.QueryFriendRequestListRequest + 20, // 18: api.user.friend.v1.CheckSendMessageAbilityRequest.session_type:type_name -> api.message.v1.SessionType + 19, // 19: api.user.friend.v1.CheckSendMessageAbilityResponse.response:type_name -> api.transport.response.BaseResponse + 10, // 20: api.user.friend.v1.FriendService.AddFriend:input_type -> api.user.friend.v1.BaseFriendRequest + 13, // 21: api.user.friend.v1.FriendService.ConfirmFriendRequest:input_type -> api.user.friend.v1.ConfirmFriendRequestRequest + 10, // 22: api.user.friend.v1.FriendService.GetFriendRequest:input_type -> api.user.friend.v1.BaseFriendRequest + 15, // 23: api.user.friend.v1.FriendService.QueryFriendRequestList:input_type -> api.user.friend.v1.QueryFriendRequestListRequest 5, // 24: api.user.friend.v1.FriendService.UpdateFriendStatus:input_type -> api.user.friend.v1.UpdateFriendStatusRequest - 11, // 25: api.user.friend.v1.FriendService.IsFriend:input_type -> api.user.friend.v1.BaseFriendRequest - 11, // 26: api.user.friend.v1.FriendService.GetFriend:input_type -> api.user.friend.v1.BaseFriendRequest + 10, // 25: api.user.friend.v1.FriendService.IsFriend:input_type -> api.user.friend.v1.BaseFriendRequest + 10, // 26: api.user.friend.v1.FriendService.GetFriend:input_type -> api.user.friend.v1.BaseFriendRequest 7, // 27: api.user.friend.v1.FriendService.QueryFriendList:input_type -> api.user.friend.v1.QueryFriendListRequest - 18, // 28: api.user.friend.v1.FriendService.CheckSendMessageAbility:input_type -> api.user.friend.v1.CheckSendMessageAbilityRequest - 12, // 29: api.user.friend.v1.FriendService.AddFriend:output_type -> api.user.friend.v1.AddFriendResponse - 20, // 30: api.user.friend.v1.FriendService.ConfirmFriendRequest:output_type -> api.transport.response.BaseResponse - 15, // 31: api.user.friend.v1.FriendService.GetFriendRequest:output_type -> api.user.friend.v1.GetFriendRequestResponse - 17, // 32: api.user.friend.v1.FriendService.QueryFriendRequestList:output_type -> api.user.friend.v1.QueryFriendRequestListResponse - 20, // 33: api.user.friend.v1.FriendService.UpdateFriendStatus:output_type -> api.transport.response.BaseResponse - 20, // 34: api.user.friend.v1.FriendService.IsFriend:output_type -> api.transport.response.BaseResponse + 17, // 28: api.user.friend.v1.FriendService.CheckSendMessageAbility:input_type -> api.user.friend.v1.CheckSendMessageAbilityRequest + 11, // 29: api.user.friend.v1.FriendService.AddFriend:output_type -> api.user.friend.v1.AddFriendResponse + 19, // 30: api.user.friend.v1.FriendService.ConfirmFriendRequest:output_type -> api.transport.response.BaseResponse + 14, // 31: api.user.friend.v1.FriendService.GetFriendRequest:output_type -> api.user.friend.v1.GetFriendRequestResponse + 16, // 32: api.user.friend.v1.FriendService.QueryFriendRequestList:output_type -> api.user.friend.v1.QueryFriendRequestListResponse + 19, // 33: api.user.friend.v1.FriendService.UpdateFriendStatus:output_type -> api.transport.response.BaseResponse + 19, // 34: api.user.friend.v1.FriendService.IsFriend:output_type -> api.transport.response.BaseResponse 6, // 35: api.user.friend.v1.FriendService.GetFriend:output_type -> api.user.friend.v1.GetFriendResponse 8, // 36: api.user.friend.v1.FriendService.QueryFriendList:output_type -> api.user.friend.v1.QueryFriendListResponse - 19, // 37: api.user.friend.v1.FriendService.CheckSendMessageAbility:output_type -> api.user.friend.v1.CheckSendMessageAbilityResponse + 18, // 37: api.user.friend.v1.FriendService.CheckSendMessageAbility:output_type -> api.user.friend.v1.CheckSendMessageAbilityResponse 29, // [29:38] is the sub-list for method output_type 20, // [20:29] is the sub-list for method input_type 20, // [20:20] is the sub-list for extension type_name @@ -1632,7 +1569,7 @@ func file_user_friend_v1_friend_proto_init() { } } file_user_friend_v1_friend_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*AddFriendRequest); i { + switch v := v.(*BaseFriendRequest); i { case 0: return &v.state case 1: @@ -1644,7 +1581,7 @@ func file_user_friend_v1_friend_proto_init() { } } file_user_friend_v1_friend_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*BaseFriendRequest); i { + switch v := v.(*AddFriendResponse); i { case 0: return &v.state case 1: @@ -1656,7 +1593,7 @@ func file_user_friend_v1_friend_proto_init() { } } file_user_friend_v1_friend_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*AddFriendResponse); i { + switch v := v.(*AddFriendResult); i { case 0: return &v.state case 1: @@ -1668,7 +1605,7 @@ func file_user_friend_v1_friend_proto_init() { } } file_user_friend_v1_friend_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*AddFriendResult); i { + switch v := v.(*ConfirmFriendRequestRequest); i { case 0: return &v.state case 1: @@ -1680,18 +1617,6 @@ func file_user_friend_v1_friend_proto_init() { } } file_user_friend_v1_friend_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ConfirmFriendRequestReq); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_user_friend_v1_friend_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*GetFriendRequestResponse); i { case 0: return &v.state @@ -1703,7 +1628,7 @@ func file_user_friend_v1_friend_proto_init() { return nil } } - file_user_friend_v1_friend_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} { + file_user_friend_v1_friend_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*QueryFriendRequestListRequest); i { case 0: return &v.state @@ -1715,7 +1640,7 @@ func file_user_friend_v1_friend_proto_init() { return nil } } - file_user_friend_v1_friend_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} { + file_user_friend_v1_friend_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*QueryFriendRequestListResponse); i { case 0: return &v.state @@ -1727,7 +1652,7 @@ func file_user_friend_v1_friend_proto_init() { return nil } } - file_user_friend_v1_friend_proto_msgTypes[14].Exporter = func(v interface{}, i int) interface{} { + file_user_friend_v1_friend_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*CheckSendMessageAbilityRequest); i { case 0: return &v.state @@ -1739,7 +1664,7 @@ func file_user_friend_v1_friend_proto_init() { return nil } } - file_user_friend_v1_friend_proto_msgTypes[15].Exporter = func(v interface{}, i int) interface{} { + file_user_friend_v1_friend_proto_msgTypes[14].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*CheckSendMessageAbilityResponse); i { case 0: return &v.state @@ -1752,14 +1677,14 @@ func file_user_friend_v1_friend_proto_init() { } } } - file_user_friend_v1_friend_proto_msgTypes[15].OneofWrappers = []interface{}{} + file_user_friend_v1_friend_proto_msgTypes[14].OneofWrappers = []interface{}{} type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_user_friend_v1_friend_proto_rawDesc, NumEnums: 4, - NumMessages: 16, + NumMessages: 15, NumExtensions: 0, NumServices: 1, }, diff --git a/user/friend/v1/friend.pb.validate.go b/user/friend/v1/friend.pb.validate.go index bb3b04d..18cda87 100644 --- a/user/friend/v1/friend.pb.validate.go +++ b/user/friend/v1/friend.pb.validate.go @@ -462,10 +462,10 @@ func (m *QueryFriendListRequest) validate(all bool) error { var errors []error - if l := utf8.RuneCountInString(m.GetUid()); l < 20 || l > 24 { + if m.GetUid() <= 0 { err := QueryFriendListRequestValidationError{ field: "Uid", - reason: "value length must be between 20 and 24 runes, inclusive", + reason: "value must be greater than 0", } if !all { return err @@ -834,128 +834,6 @@ var _ interface { ErrorName() string } = FriendRequestValidationError{} -// Validate checks the field values on AddFriendRequest with the rules defined -// in the proto definition for this message. If any rules are violated, the -// first error encountered is returned, or nil if there are no violations. -func (m *AddFriendRequest) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on AddFriendRequest with the rules -// defined in the proto definition for this message. If any rules are -// violated, the result is a list of violation errors wrapped in -// AddFriendRequestMultiError, or nil if none found. -func (m *AddFriendRequest) ValidateAll() error { - return m.validate(true) -} - -func (m *AddFriendRequest) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - if l := utf8.RuneCountInString(m.GetUid()); l < 20 || l > 24 { - err := AddFriendRequestValidationError{ - field: "Uid", - reason: "value length must be between 20 and 24 runes, inclusive", - } - if !all { - return err - } - errors = append(errors, err) - } - - if l := utf8.RuneCountInString(m.GetFriendUid()); l < 20 || l > 24 { - err := AddFriendRequestValidationError{ - field: "FriendUid", - reason: "value length must be between 20 and 24 runes, inclusive", - } - if !all { - return err - } - errors = append(errors, err) - } - - if len(errors) > 0 { - return AddFriendRequestMultiError(errors) - } - - return nil -} - -// AddFriendRequestMultiError is an error wrapping multiple validation errors -// returned by AddFriendRequest.ValidateAll() if the designated constraints -// aren't met. -type AddFriendRequestMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m AddFriendRequestMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m AddFriendRequestMultiError) AllErrors() []error { return m } - -// AddFriendRequestValidationError is the validation error returned by -// AddFriendRequest.Validate if the designated constraints aren't met. -type AddFriendRequestValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e AddFriendRequestValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e AddFriendRequestValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e AddFriendRequestValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e AddFriendRequestValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e AddFriendRequestValidationError) ErrorName() string { return "AddFriendRequestValidationError" } - -// Error satisfies the builtin error interface -func (e AddFriendRequestValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sAddFriendRequest.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = AddFriendRequestValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = AddFriendRequestValidationError{} - // Validate checks the field values on BaseFriendRequest with the rules defined // in the proto definition for this message. If any rules are violated, the // first error encountered is returned, or nil if there are no violations. @@ -978,10 +856,10 @@ func (m *BaseFriendRequest) validate(all bool) error { var errors []error - if l := utf8.RuneCountInString(m.GetUid()); l < 20 || l > 24 { + if m.GetUid() <= 0 { err := BaseFriendRequestValidationError{ field: "Uid", - reason: "value length must be between 20 and 24 runes, inclusive", + reason: "value must be greater than 0", } if !all { return err @@ -989,10 +867,10 @@ func (m *BaseFriendRequest) validate(all bool) error { errors = append(errors, err) } - if l := utf8.RuneCountInString(m.GetFriendUid()); l < 20 || l > 24 { + if m.GetFriendUid() <= 0 { err := BaseFriendRequestValidationError{ field: "FriendUid", - reason: "value length must be between 20 and 24 runes, inclusive", + reason: "value must be greater than 0", } if !all { return err @@ -1371,32 +1249,32 @@ var _ interface { ErrorName() string } = AddFriendResultValidationError{} -// Validate checks the field values on ConfirmFriendRequestReq with the rules -// defined in the proto definition for this message. If any rules are +// Validate checks the field values on ConfirmFriendRequestRequest with the +// rules defined in the proto definition for this message. If any rules are // violated, the first error encountered is returned, or nil if there are no violations. -func (m *ConfirmFriendRequestReq) Validate() error { +func (m *ConfirmFriendRequestRequest) Validate() error { return m.validate(false) } -// ValidateAll checks the field values on ConfirmFriendRequestReq with the +// ValidateAll checks the field values on ConfirmFriendRequestRequest with the // rules defined in the proto definition for this message. If any rules are // violated, the result is a list of violation errors wrapped in -// ConfirmFriendRequestReqMultiError, or nil if none found. -func (m *ConfirmFriendRequestReq) ValidateAll() error { +// ConfirmFriendRequestRequestMultiError, or nil if none found. +func (m *ConfirmFriendRequestRequest) ValidateAll() error { return m.validate(true) } -func (m *ConfirmFriendRequestReq) validate(all bool) error { +func (m *ConfirmFriendRequestRequest) validate(all bool) error { if m == nil { return nil } var errors []error - if l := utf8.RuneCountInString(m.GetUid()); l < 20 || l > 24 { - err := ConfirmFriendRequestReqValidationError{ + if m.GetUid() <= 0 { + err := ConfirmFriendRequestRequestValidationError{ field: "Uid", - reason: "value length must be between 20 and 24 runes, inclusive", + reason: "value must be greater than 0", } if !all { return err @@ -1405,7 +1283,7 @@ func (m *ConfirmFriendRequestReq) validate(all bool) error { } if m.GetFriendRequestId() <= 0 { - err := ConfirmFriendRequestReqValidationError{ + err := ConfirmFriendRequestRequestValidationError{ field: "FriendRequestId", reason: "value must be greater than 0", } @@ -1416,7 +1294,7 @@ func (m *ConfirmFriendRequestReq) validate(all bool) error { } if _, ok := ConfirmFriendRequestAction_name[int32(m.GetAction())]; !ok { - err := ConfirmFriendRequestReqValidationError{ + err := ConfirmFriendRequestRequestValidationError{ field: "Action", reason: "value must be one of the defined enum values", } @@ -1427,19 +1305,19 @@ func (m *ConfirmFriendRequestReq) validate(all bool) error { } if len(errors) > 0 { - return ConfirmFriendRequestReqMultiError(errors) + return ConfirmFriendRequestRequestMultiError(errors) } return nil } -// ConfirmFriendRequestReqMultiError is an error wrapping multiple validation -// errors returned by ConfirmFriendRequestReq.ValidateAll() if the designated -// constraints aren't met. -type ConfirmFriendRequestReqMultiError []error +// ConfirmFriendRequestRequestMultiError is an error wrapping multiple +// validation errors returned by ConfirmFriendRequestRequest.ValidateAll() if +// the designated constraints aren't met. +type ConfirmFriendRequestRequestMultiError []error // Error returns a concatenation of all the error messages it wraps. -func (m ConfirmFriendRequestReqMultiError) Error() string { +func (m ConfirmFriendRequestRequestMultiError) Error() string { var msgs []string for _, err := range m { msgs = append(msgs, err.Error()) @@ -1448,11 +1326,12 @@ func (m ConfirmFriendRequestReqMultiError) Error() string { } // AllErrors returns a list of validation violation errors. -func (m ConfirmFriendRequestReqMultiError) AllErrors() []error { return m } +func (m ConfirmFriendRequestRequestMultiError) AllErrors() []error { return m } -// ConfirmFriendRequestReqValidationError is the validation error returned by -// ConfirmFriendRequestReq.Validate if the designated constraints aren't met. -type ConfirmFriendRequestReqValidationError struct { +// ConfirmFriendRequestRequestValidationError is the validation error returned +// by ConfirmFriendRequestRequest.Validate if the designated constraints +// aren't met. +type ConfirmFriendRequestRequestValidationError struct { field string reason string cause error @@ -1460,24 +1339,24 @@ type ConfirmFriendRequestReqValidationError struct { } // Field function returns field value. -func (e ConfirmFriendRequestReqValidationError) Field() string { return e.field } +func (e ConfirmFriendRequestRequestValidationError) Field() string { return e.field } // Reason function returns reason value. -func (e ConfirmFriendRequestReqValidationError) Reason() string { return e.reason } +func (e ConfirmFriendRequestRequestValidationError) Reason() string { return e.reason } // Cause function returns cause value. -func (e ConfirmFriendRequestReqValidationError) Cause() error { return e.cause } +func (e ConfirmFriendRequestRequestValidationError) Cause() error { return e.cause } // Key function returns key value. -func (e ConfirmFriendRequestReqValidationError) Key() bool { return e.key } +func (e ConfirmFriendRequestRequestValidationError) Key() bool { return e.key } // ErrorName returns error name. -func (e ConfirmFriendRequestReqValidationError) ErrorName() string { - return "ConfirmFriendRequestReqValidationError" +func (e ConfirmFriendRequestRequestValidationError) ErrorName() string { + return "ConfirmFriendRequestRequestValidationError" } // Error satisfies the builtin error interface -func (e ConfirmFriendRequestReqValidationError) Error() string { +func (e ConfirmFriendRequestRequestValidationError) Error() string { cause := "" if e.cause != nil { cause = fmt.Sprintf(" | caused by: %v", e.cause) @@ -1489,14 +1368,14 @@ func (e ConfirmFriendRequestReqValidationError) Error() string { } return fmt.Sprintf( - "invalid %sConfirmFriendRequestReq.%s: %s%s", + "invalid %sConfirmFriendRequestRequest.%s: %s%s", key, e.field, e.reason, cause) } -var _ error = ConfirmFriendRequestReqValidationError{} +var _ error = ConfirmFriendRequestRequestValidationError{} var _ interface { Field() string @@ -1504,7 +1383,7 @@ var _ interface { Key() bool Cause() error ErrorName() string -} = ConfirmFriendRequestReqValidationError{} +} = ConfirmFriendRequestRequestValidationError{} // Validate checks the field values on GetFriendRequestResponse with the rules // defined in the proto definition for this message. If any rules are @@ -1688,10 +1567,10 @@ func (m *QueryFriendRequestListRequest) validate(all bool) error { var errors []error - if l := utf8.RuneCountInString(m.GetUid()); l < 20 || l > 24 { + if m.GetUid() <= 0 { err := QueryFriendRequestListRequestValidationError{ field: "Uid", - reason: "value length must be between 20 and 24 runes, inclusive", + reason: "value must be greater than 0", } if !all { return err @@ -1979,10 +1858,10 @@ func (m *CheckSendMessageAbilityRequest) validate(all bool) error { var errors []error - if l := utf8.RuneCountInString(m.GetFromUid()); l < 20 || l > 24 { + if m.GetFromUid() <= 0 { err := CheckSendMessageAbilityRequestValidationError{ field: "FromUid", - reason: "value length must be between 20 and 24 runes, inclusive", + reason: "value must be greater than 0", } if !all { return err @@ -1990,10 +1869,10 @@ func (m *CheckSendMessageAbilityRequest) validate(all bool) error { errors = append(errors, err) } - if l := utf8.RuneCountInString(m.GetToUid()); l < 20 || l > 24 { + if m.GetToUid() <= 0 { err := CheckSendMessageAbilityRequestValidationError{ field: "ToUid", - reason: "value length must be between 20 and 24 runes, inclusive", + reason: "value must be greater than 0", } if !all { return err diff --git a/user/friend/v1/friend.proto b/user/friend/v1/friend.proto index 1653660..256f29e 100644 --- a/user/friend/v1/friend.proto +++ b/user/friend/v1/friend.proto @@ -3,14 +3,14 @@ syntax = "proto3"; package api.user.friend.v1; import "transport/response/response.proto"; -import "user/session/v1/session.proto"; +import "message/v1/message.proto"; import "validate/validate.proto"; option go_package = "github.com/go-goim/api/user/friend/v1"; message Friend { - string uid = 1; - string friend_uid = 2; + int64 uid = 1; + int64 friend_uid = 2; string friend_name = 3; string friend_avatar = 4; FriendStatus status = 5; @@ -41,9 +41,8 @@ message GetFriendResponse { } message QueryFriendListRequest { - string uid = 1 [(validate.rules).string = { - min_len: 20, - max_len: 24 + int64 uid = 1 [(validate.rules).int64 = { + gt: 0 }]; } @@ -58,9 +57,9 @@ message QueryFriendListResponse { // FriendRequest is the request data for adding friend message FriendRequest { - int64 id = 1; - string uid = 2; - string friend_uid = 3; + uint64 id = 1; + int64 uid = 2; + int64 friend_uid = 3; FriendRequestStatus status = 4; int64 created_at = 5; int64 updated_at = 6; @@ -78,25 +77,12 @@ enum FriendRequestStatus { REJECTED = 2; } -message AddFriendRequest { - string uid = 1 [(validate.rules).string = { - min_len: 20, - max_len: 24 - }]; - string friend_uid = 2 [(validate.rules).string = { - min_len: 20, - max_len: 24 - }]; -} - message BaseFriendRequest { - string uid = 1 [(validate.rules).string = { - min_len: 20, - max_len: 24 + int64 uid = 1 [(validate.rules).int64 = { + gt: 0 }]; - string friend_uid = 2 [(validate.rules).string = { - min_len: 20, - max_len: 24 + int64 friend_uid = 2 [(validate.rules).int64 = { + gt: 0 }]; } @@ -118,12 +104,11 @@ enum AddFriendStatus { BLOCKED_BY_FRIEND = 4; } -message ConfirmFriendRequestReq { - string uid = 1 [(validate.rules).string = { - min_len: 20, - max_len: 24 +message ConfirmFriendRequestRequest { + int64 uid = 1 [(validate.rules).int64 = { + gt: 0 }]; - int64 friend_request_id = 2 [(validate.rules).int64.gt = 0]; + uint64 friend_request_id = 2 [(validate.rules).uint64.gt = 0]; ConfirmFriendRequestAction action = 3 [(validate.rules).enum.defined_only = true]; } @@ -138,9 +123,8 @@ message GetFriendRequestResponse { } message QueryFriendRequestListRequest { - string uid = 1 [(validate.rules).string = { - min_len: 20, - max_len: 24 + int64 uid = 1 [(validate.rules).int64 = { + gt: 0 }]; FriendRequestStatus status = 2 [(validate.rules).enum.defined_only = true]; } @@ -152,26 +136,24 @@ message QueryFriendRequestListResponse { // CheckSendMessageAbilityRequest is the request data for checking send message ability. message CheckSendMessageAbilityRequest { - string from_uid = 1 [(validate.rules).string = { - min_len: 20, - max_len: 24 + int64 from_uid = 1 [(validate.rules).int64 = { + gt: 0 }]; - string to_uid = 2 [(validate.rules).string = { - min_len: 20, - max_len: 24 + int64 to_uid = 2 [(validate.rules).int64 = { + gt: 0 }]; - user.session.v1.SessionType session_type = 3; + api.message.v1.SessionType session_type = 3; } message CheckSendMessageAbilityResponse { transport.response.BaseResponse response = 1; - optional int64 session_id = 2; + optional string session_id = 2; } service FriendService { // friend request - rpc AddFriend(AddFriendRequest) returns (AddFriendResponse); - rpc ConfirmFriendRequest(ConfirmFriendRequestReq) returns (transport.response.BaseResponse); + rpc AddFriend(BaseFriendRequest) returns (AddFriendResponse); + rpc ConfirmFriendRequest(ConfirmFriendRequestRequest) returns (transport.response.BaseResponse); rpc GetFriendRequest(BaseFriendRequest) returns (GetFriendRequestResponse); rpc QueryFriendRequestList(QueryFriendRequestListRequest) returns (QueryFriendRequestListResponse); diff --git a/user/friend/v1/friend_grpc.pb.go b/user/friend/v1/friend_grpc.pb.go index dec4ab6..f811d77 100644 --- a/user/friend/v1/friend_grpc.pb.go +++ b/user/friend/v1/friend_grpc.pb.go @@ -20,8 +20,8 @@ const _ = grpc.SupportPackageIsVersion7 // 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 FriendServiceClient interface { // friend request - AddFriend(ctx context.Context, in *AddFriendRequest, opts ...grpc.CallOption) (*AddFriendResponse, error) - ConfirmFriendRequest(ctx context.Context, in *ConfirmFriendRequestReq, opts ...grpc.CallOption) (*response.BaseResponse, error) + AddFriend(ctx context.Context, in *BaseFriendRequest, opts ...grpc.CallOption) (*AddFriendResponse, error) + ConfirmFriendRequest(ctx context.Context, in *ConfirmFriendRequestRequest, opts ...grpc.CallOption) (*response.BaseResponse, error) GetFriendRequest(ctx context.Context, in *BaseFriendRequest, opts ...grpc.CallOption) (*GetFriendRequestResponse, error) QueryFriendRequestList(ctx context.Context, in *QueryFriendRequestListRequest, opts ...grpc.CallOption) (*QueryFriendRequestListResponse, error) // friend @@ -43,7 +43,7 @@ func NewFriendServiceClient(cc grpc.ClientConnInterface) FriendServiceClient { return &friendServiceClient{cc} } -func (c *friendServiceClient) AddFriend(ctx context.Context, in *AddFriendRequest, opts ...grpc.CallOption) (*AddFriendResponse, error) { +func (c *friendServiceClient) AddFriend(ctx context.Context, in *BaseFriendRequest, opts ...grpc.CallOption) (*AddFriendResponse, error) { out := new(AddFriendResponse) err := c.cc.Invoke(ctx, "/api.user.friend.v1.FriendService/AddFriend", in, out, opts...) if err != nil { @@ -52,7 +52,7 @@ func (c *friendServiceClient) AddFriend(ctx context.Context, in *AddFriendReques return out, nil } -func (c *friendServiceClient) ConfirmFriendRequest(ctx context.Context, in *ConfirmFriendRequestReq, opts ...grpc.CallOption) (*response.BaseResponse, error) { +func (c *friendServiceClient) ConfirmFriendRequest(ctx context.Context, in *ConfirmFriendRequestRequest, opts ...grpc.CallOption) (*response.BaseResponse, error) { out := new(response.BaseResponse) err := c.cc.Invoke(ctx, "/api.user.friend.v1.FriendService/ConfirmFriendRequest", in, out, opts...) if err != nil { @@ -129,8 +129,8 @@ func (c *friendServiceClient) CheckSendMessageAbility(ctx context.Context, in *C // for forward compatibility type FriendServiceServer interface { // friend request - AddFriend(context.Context, *AddFriendRequest) (*AddFriendResponse, error) - ConfirmFriendRequest(context.Context, *ConfirmFriendRequestReq) (*response.BaseResponse, error) + AddFriend(context.Context, *BaseFriendRequest) (*AddFriendResponse, error) + ConfirmFriendRequest(context.Context, *ConfirmFriendRequestRequest) (*response.BaseResponse, error) GetFriendRequest(context.Context, *BaseFriendRequest) (*GetFriendRequestResponse, error) QueryFriendRequestList(context.Context, *QueryFriendRequestListRequest) (*QueryFriendRequestListResponse, error) // friend @@ -149,10 +149,10 @@ type FriendServiceServer interface { type UnimplementedFriendServiceServer struct { } -func (UnimplementedFriendServiceServer) AddFriend(context.Context, *AddFriendRequest) (*AddFriendResponse, error) { +func (UnimplementedFriendServiceServer) AddFriend(context.Context, *BaseFriendRequest) (*AddFriendResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method AddFriend not implemented") } -func (UnimplementedFriendServiceServer) ConfirmFriendRequest(context.Context, *ConfirmFriendRequestReq) (*response.BaseResponse, error) { +func (UnimplementedFriendServiceServer) ConfirmFriendRequest(context.Context, *ConfirmFriendRequestRequest) (*response.BaseResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method ConfirmFriendRequest not implemented") } func (UnimplementedFriendServiceServer) GetFriendRequest(context.Context, *BaseFriendRequest) (*GetFriendRequestResponse, error) { @@ -190,7 +190,7 @@ func RegisterFriendServiceServer(s grpc.ServiceRegistrar, srv FriendServiceServe } func _FriendService_AddFriend_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(AddFriendRequest) + in := new(BaseFriendRequest) if err := dec(in); err != nil { return nil, err } @@ -202,13 +202,13 @@ func _FriendService_AddFriend_Handler(srv interface{}, ctx context.Context, dec FullMethod: "/api.user.friend.v1.FriendService/AddFriend", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(FriendServiceServer).AddFriend(ctx, req.(*AddFriendRequest)) + return srv.(FriendServiceServer).AddFriend(ctx, req.(*BaseFriendRequest)) } return interceptor(ctx, in, info, handler) } func _FriendService_ConfirmFriendRequest_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(ConfirmFriendRequestReq) + in := new(ConfirmFriendRequestRequest) if err := dec(in); err != nil { return nil, err } @@ -220,7 +220,7 @@ func _FriendService_ConfirmFriendRequest_Handler(srv interface{}, ctx context.Co FullMethod: "/api.user.friend.v1.FriendService/ConfirmFriendRequest", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(FriendServiceServer).ConfirmFriendRequest(ctx, req.(*ConfirmFriendRequestReq)) + return srv.(FriendServiceServer).ConfirmFriendRequest(ctx, req.(*ConfirmFriendRequestRequest)) } return interceptor(ctx, in, info, handler) } diff --git a/user/group/v1/group.pb.go b/user/group/v1/group.pb.go index f332102..0013e5c 100644 --- a/user/group/v1/group.pb.go +++ b/user/group/v1/group.pb.go @@ -165,12 +165,11 @@ type Group struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Id int64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` - Gid string `protobuf:"bytes,2,opt,name=gid,proto3" json:"gid,omitempty"` + Gid int64 `protobuf:"varint,2,opt,name=gid,proto3" json:"gid,omitempty"` Name string `protobuf:"bytes,3,opt,name=name,proto3" json:"name,omitempty"` Description string `protobuf:"bytes,4,opt,name=description,proto3" json:"description,omitempty"` Avatar string `protobuf:"bytes,5,opt,name=avatar,proto3" json:"avatar,omitempty"` - OwnerUid string `protobuf:"bytes,6,opt,name=owner_uid,json=ownerUid,proto3" json:"owner_uid,omitempty"` + OwnerUid int64 `protobuf:"varint,6,opt,name=owner_uid,json=ownerUid,proto3" json:"owner_uid,omitempty"` Owner *GroupMember `protobuf:"bytes,7,opt,name=owner,proto3,oneof" json:"owner,omitempty"` Members []*GroupMember `protobuf:"bytes,8,rep,name=members,proto3" json:"members,omitempty"` MaxMembers int32 `protobuf:"varint,9,opt,name=max_members,json=maxMembers,proto3" json:"max_members,omitempty"` @@ -210,18 +209,11 @@ func (*Group) Descriptor() ([]byte, []int) { return file_user_group_v1_group_proto_rawDescGZIP(), []int{0} } -func (x *Group) GetId() int64 { - if x != nil { - return x.Id - } - return 0 -} - -func (x *Group) GetGid() string { +func (x *Group) GetGid() int64 { if x != nil { return x.Gid } - return "" + return 0 } func (x *Group) GetName() string { @@ -245,11 +237,11 @@ func (x *Group) GetAvatar() string { return "" } -func (x *Group) GetOwnerUid() string { +func (x *Group) GetOwnerUid() int64 { if x != nil { return x.OwnerUid } - return "" + return 0 } func (x *Group) GetOwner() *GroupMember { @@ -292,9 +284,8 @@ type GroupMember struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Id int64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` // use as session id - Gid string `protobuf:"bytes,2,opt,name=gid,proto3" json:"gid,omitempty"` - Uid string `protobuf:"bytes,3,opt,name=uid,proto3" json:"uid,omitempty"` + Gid int64 `protobuf:"varint,2,opt,name=gid,proto3" json:"gid,omitempty"` + Uid int64 `protobuf:"varint,3,opt,name=uid,proto3" json:"uid,omitempty"` User *v1.User `protobuf:"bytes,4,opt,name=user,proto3,oneof" json:"user,omitempty"` Status GroupMember_Status `protobuf:"varint,5,opt,name=status,proto3,enum=api.user.group.v1.GroupMember_Status" json:"status,omitempty"` Type GroupMember_Type `protobuf:"varint,6,opt,name=type,proto3,enum=api.user.group.v1.GroupMember_Type" json:"type,omitempty"` @@ -332,25 +323,18 @@ func (*GroupMember) Descriptor() ([]byte, []int) { return file_user_group_v1_group_proto_rawDescGZIP(), []int{1} } -func (x *GroupMember) GetId() int64 { - if x != nil { - return x.Id - } - return 0 -} - -func (x *GroupMember) GetGid() string { +func (x *GroupMember) GetGid() int64 { if x != nil { return x.Gid } - return "" + return 0 } -func (x *GroupMember) GetUid() string { +func (x *GroupMember) GetUid() int64 { if x != nil { return x.Uid } - return "" + return 0 } func (x *GroupMember) GetUser() *v1.User { @@ -379,8 +363,10 @@ type GetGroupRequest struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Gid string `protobuf:"bytes,1,opt,name=gid,proto3" json:"gid,omitempty"` - WithMembers bool `protobuf:"varint,2,opt,name=with_members,json=withMembers,proto3" json:"with_members,omitempty"` + Gid int64 `protobuf:"varint,1,opt,name=gid,proto3" json:"gid,omitempty"` + OwnerUid int64 `protobuf:"varint,2,opt,name=owner_uid,json=ownerUid,proto3" json:"owner_uid,omitempty"` + WithMembers bool `protobuf:"varint,3,opt,name=with_members,json=withMembers,proto3" json:"with_members,omitempty"` + WithInfo bool `protobuf:"varint,4,opt,name=with_info,json=withInfo,proto3" json:"with_info,omitempty"` } func (x *GetGroupRequest) Reset() { @@ -415,11 +401,18 @@ func (*GetGroupRequest) Descriptor() ([]byte, []int) { return file_user_group_v1_group_proto_rawDescGZIP(), []int{2} } -func (x *GetGroupRequest) GetGid() string { +func (x *GetGroupRequest) GetGid() int64 { if x != nil { return x.Gid } - return "" + return 0 +} + +func (x *GetGroupRequest) GetOwnerUid() int64 { + if x != nil { + return x.OwnerUid + } + return 0 } func (x *GetGroupRequest) GetWithMembers() bool { @@ -429,6 +422,13 @@ func (x *GetGroupRequest) GetWithMembers() bool { return false } +func (x *GetGroupRequest) GetWithInfo() bool { + if x != nil { + return x.WithInfo + } + return false +} + type GetGroupResponse struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -490,9 +490,9 @@ type ListGroupsRequest struct { unknownFields protoimpl.UnknownFields // list all groups no matter user is member or owner. - Uid string `protobuf:"bytes,1,opt,name=uid,proto3" json:"uid,omitempty"` - Page int32 `protobuf:"varint,2,opt,name=page,proto3" json:"page,omitempty"` - PageSize int32 `protobuf:"varint,3,opt,name=page_size,json=pageSize,proto3" json:"page_size,omitempty"` + Uid int64 `protobuf:"varint,1,opt,name=uid,proto3" json:"uid,omitempty"` + Page int32 `protobuf:"varint,2,opt,name=page,proto3" json:"page,omitempty"` + PageSize int32 `protobuf:"varint,3,opt,name=page_size,json=pageSize,proto3" json:"page_size,omitempty"` } func (x *ListGroupsRequest) Reset() { @@ -527,11 +527,11 @@ func (*ListGroupsRequest) Descriptor() ([]byte, []int) { return file_user_group_v1_group_proto_rawDescGZIP(), []int{4} } -func (x *ListGroupsRequest) GetUid() string { +func (x *ListGroupsRequest) GetUid() int64 { if x != nil { return x.Uid } - return "" + return 0 } func (x *ListGroupsRequest) GetPage() int32 { @@ -608,11 +608,11 @@ type CreateGroupRequest struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` - Description string `protobuf:"bytes,2,opt,name=description,proto3" json:"description,omitempty"` - Avatar string `protobuf:"bytes,3,opt,name=avatar,proto3" json:"avatar,omitempty"` - OwnerUid string `protobuf:"bytes,4,opt,name=owner_uid,json=ownerUid,proto3" json:"owner_uid,omitempty"` - MembersUid []string `protobuf:"bytes,5,rep,name=members_uid,json=membersUid,proto3" json:"members_uid,omitempty"` // todo: limit to small number + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + Description string `protobuf:"bytes,2,opt,name=description,proto3" json:"description,omitempty"` + Avatar string `protobuf:"bytes,3,opt,name=avatar,proto3" json:"avatar,omitempty"` + OwnerUid int64 `protobuf:"varint,4,opt,name=owner_uid,json=ownerUid,proto3" json:"owner_uid,omitempty"` + MembersUid []int64 `protobuf:"varint,5,rep,packed,name=members_uid,json=membersUid,proto3" json:"members_uid,omitempty"` } func (x *CreateGroupRequest) Reset() { @@ -668,14 +668,14 @@ func (x *CreateGroupRequest) GetAvatar() string { return "" } -func (x *CreateGroupRequest) GetOwnerUid() string { +func (x *CreateGroupRequest) GetOwnerUid() int64 { if x != nil { return x.OwnerUid } - return "" + return 0 } -func (x *CreateGroupRequest) GetMembersUid() []string { +func (x *CreateGroupRequest) GetMembersUid() []int64 { if x != nil { return x.MembersUid } @@ -742,11 +742,11 @@ type UpdateGroupRequest struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Gid string `protobuf:"bytes,1,opt,name=gid,proto3" json:"gid,omitempty"` - Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` - Description string `protobuf:"bytes,3,opt,name=description,proto3" json:"description,omitempty"` - Avatar string `protobuf:"bytes,4,opt,name=avatar,proto3" json:"avatar,omitempty"` - Uid string `protobuf:"bytes,5,opt,name=uid,proto3" json:"uid,omitempty"` // current user id + Gid int64 `protobuf:"varint,1,opt,name=gid,proto3" json:"gid,omitempty"` + Name *string `protobuf:"bytes,2,opt,name=name,proto3,oneof" json:"name,omitempty"` + Description *string `protobuf:"bytes,3,opt,name=description,proto3,oneof" json:"description,omitempty"` + Avatar *string `protobuf:"bytes,4,opt,name=avatar,proto3,oneof" json:"avatar,omitempty"` + OwnerUid int64 `protobuf:"varint,5,opt,name=owner_uid,json=ownerUid,proto3" json:"owner_uid,omitempty"` // current user id } func (x *UpdateGroupRequest) Reset() { @@ -781,39 +781,39 @@ func (*UpdateGroupRequest) Descriptor() ([]byte, []int) { return file_user_group_v1_group_proto_rawDescGZIP(), []int{8} } -func (x *UpdateGroupRequest) GetGid() string { +func (x *UpdateGroupRequest) GetGid() int64 { if x != nil { return x.Gid } - return "" + return 0 } func (x *UpdateGroupRequest) GetName() string { - if x != nil { - return x.Name + if x != nil && x.Name != nil { + return *x.Name } return "" } func (x *UpdateGroupRequest) GetDescription() string { - if x != nil { - return x.Description + if x != nil && x.Description != nil { + return *x.Description } return "" } func (x *UpdateGroupRequest) GetAvatar() string { - if x != nil { - return x.Avatar + if x != nil && x.Avatar != nil { + return *x.Avatar } return "" } -func (x *UpdateGroupRequest) GetUid() string { +func (x *UpdateGroupRequest) GetOwnerUid() int64 { if x != nil { - return x.Uid + return x.OwnerUid } - return "" + return 0 } type UpdateGroupResponse struct { @@ -876,8 +876,8 @@ type DeleteGroupRequest struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Gid string `protobuf:"bytes,1,opt,name=gid,proto3" json:"gid,omitempty"` - Uid string `protobuf:"bytes,2,opt,name=uid,proto3" json:"uid,omitempty"` + Gid int64 `protobuf:"varint,1,opt,name=gid,proto3" json:"gid,omitempty"` + OwnerUid int64 `protobuf:"varint,2,opt,name=owner_uid,json=ownerUid,proto3" json:"owner_uid,omitempty"` } func (x *DeleteGroupRequest) Reset() { @@ -912,31 +912,33 @@ func (*DeleteGroupRequest) Descriptor() ([]byte, []int) { return file_user_group_v1_group_proto_rawDescGZIP(), []int{10} } -func (x *DeleteGroupRequest) GetGid() string { +func (x *DeleteGroupRequest) GetGid() int64 { if x != nil { return x.Gid } - return "" + return 0 } -func (x *DeleteGroupRequest) GetUid() string { +func (x *DeleteGroupRequest) GetOwnerUid() int64 { if x != nil { - return x.Uid + return x.OwnerUid } - return "" + return 0 } -type AddGroupMemberRequest struct { +// ChangeGroupMemberRequest add or remove group member +type ChangeGroupMemberRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Gid string `protobuf:"bytes,1,opt,name=gid,proto3" json:"gid,omitempty"` - Uid []string `protobuf:"bytes,2,rep,name=uid,proto3" json:"uid,omitempty"` + Gid int64 `protobuf:"varint,1,opt,name=gid,proto3" json:"gid,omitempty"` + OwnerUid int64 `protobuf:"varint,2,opt,name=owner_uid,json=ownerUid,proto3" json:"owner_uid,omitempty"` + Uids []int64 `protobuf:"varint,3,rep,packed,name=uids,proto3" json:"uids,omitempty"` } -func (x *AddGroupMemberRequest) Reset() { - *x = AddGroupMemberRequest{} +func (x *ChangeGroupMemberRequest) Reset() { + *x = ChangeGroupMemberRequest{} if protoimpl.UnsafeEnabled { mi := &file_user_group_v1_group_proto_msgTypes[11] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -944,13 +946,13 @@ func (x *AddGroupMemberRequest) Reset() { } } -func (x *AddGroupMemberRequest) String() string { +func (x *ChangeGroupMemberRequest) String() string { return protoimpl.X.MessageStringOf(x) } -func (*AddGroupMemberRequest) ProtoMessage() {} +func (*ChangeGroupMemberRequest) ProtoMessage() {} -func (x *AddGroupMemberRequest) ProtoReflect() protoreflect.Message { +func (x *ChangeGroupMemberRequest) ProtoReflect() protoreflect.Message { mi := &file_user_group_v1_group_proto_msgTypes[11] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -962,161 +964,58 @@ func (x *AddGroupMemberRequest) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use AddGroupMemberRequest.ProtoReflect.Descriptor instead. -func (*AddGroupMemberRequest) Descriptor() ([]byte, []int) { +// Deprecated: Use ChangeGroupMemberRequest.ProtoReflect.Descriptor instead. +func (*ChangeGroupMemberRequest) Descriptor() ([]byte, []int) { return file_user_group_v1_group_proto_rawDescGZIP(), []int{11} } -func (x *AddGroupMemberRequest) GetGid() string { +func (x *ChangeGroupMemberRequest) GetGid() int64 { if x != nil { return x.Gid } - return "" -} - -func (x *AddGroupMemberRequest) GetUid() []string { - if x != nil { - return x.Uid - } - return nil -} - -type AddGroupMemberResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Response *response.BaseResponse `protobuf:"bytes,1,opt,name=response,proto3" json:"response,omitempty"` - Added int32 `protobuf:"varint,2,opt,name=added,proto3" json:"added,omitempty"` -} - -func (x *AddGroupMemberResponse) Reset() { - *x = AddGroupMemberResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_user_group_v1_group_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *AddGroupMemberResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*AddGroupMemberResponse) ProtoMessage() {} - -func (x *AddGroupMemberResponse) ProtoReflect() protoreflect.Message { - mi := &file_user_group_v1_group_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 AddGroupMemberResponse.ProtoReflect.Descriptor instead. -func (*AddGroupMemberResponse) Descriptor() ([]byte, []int) { - return file_user_group_v1_group_proto_rawDescGZIP(), []int{12} -} - -func (x *AddGroupMemberResponse) GetResponse() *response.BaseResponse { - if x != nil { - return x.Response - } - return nil -} - -func (x *AddGroupMemberResponse) GetAdded() int32 { - if x != nil { - return x.Added - } return 0 } -type RemoveGroupMemberRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Gid string `protobuf:"bytes,1,opt,name=gid,proto3" json:"gid,omitempty"` - Uid []string `protobuf:"bytes,2,rep,name=uid,proto3" json:"uid,omitempty"` -} - -func (x *RemoveGroupMemberRequest) Reset() { - *x = RemoveGroupMemberRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_user_group_v1_group_proto_msgTypes[13] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *RemoveGroupMemberRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*RemoveGroupMemberRequest) ProtoMessage() {} - -func (x *RemoveGroupMemberRequest) ProtoReflect() protoreflect.Message { - mi := &file_user_group_v1_group_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 RemoveGroupMemberRequest.ProtoReflect.Descriptor instead. -func (*RemoveGroupMemberRequest) Descriptor() ([]byte, []int) { - return file_user_group_v1_group_proto_rawDescGZIP(), []int{13} -} - -func (x *RemoveGroupMemberRequest) GetGid() string { +func (x *ChangeGroupMemberRequest) GetOwnerUid() int64 { if x != nil { - return x.Gid + return x.OwnerUid } - return "" + return 0 } -func (x *RemoveGroupMemberRequest) GetUid() []string { +func (x *ChangeGroupMemberRequest) GetUids() []int64 { if x != nil { - return x.Uid + return x.Uids } return nil } -type RemoveGroupMemberResponse struct { +type ChangeGroupMemberResponse struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields Response *response.BaseResponse `protobuf:"bytes,1,opt,name=response,proto3" json:"response,omitempty"` - Removed int32 `protobuf:"varint,2,opt,name=removed,proto3" json:"removed,omitempty"` + Count int32 `protobuf:"varint,2,opt,name=count,proto3" json:"count,omitempty"` // count of members changed } -func (x *RemoveGroupMemberResponse) Reset() { - *x = RemoveGroupMemberResponse{} +func (x *ChangeGroupMemberResponse) Reset() { + *x = ChangeGroupMemberResponse{} if protoimpl.UnsafeEnabled { - mi := &file_user_group_v1_group_proto_msgTypes[14] + mi := &file_user_group_v1_group_proto_msgTypes[12] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *RemoveGroupMemberResponse) String() string { +func (x *ChangeGroupMemberResponse) String() string { return protoimpl.X.MessageStringOf(x) } -func (*RemoveGroupMemberResponse) ProtoMessage() {} +func (*ChangeGroupMemberResponse) ProtoMessage() {} -func (x *RemoveGroupMemberResponse) ProtoReflect() protoreflect.Message { - mi := &file_user_group_v1_group_proto_msgTypes[14] +func (x *ChangeGroupMemberResponse) ProtoReflect() protoreflect.Message { + mi := &file_user_group_v1_group_proto_msgTypes[12] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1127,21 +1026,21 @@ func (x *RemoveGroupMemberResponse) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use RemoveGroupMemberResponse.ProtoReflect.Descriptor instead. -func (*RemoveGroupMemberResponse) Descriptor() ([]byte, []int) { - return file_user_group_v1_group_proto_rawDescGZIP(), []int{14} +// Deprecated: Use ChangeGroupMemberResponse.ProtoReflect.Descriptor instead. +func (*ChangeGroupMemberResponse) Descriptor() ([]byte, []int) { + return file_user_group_v1_group_proto_rawDescGZIP(), []int{12} } -func (x *RemoveGroupMemberResponse) GetResponse() *response.BaseResponse { +func (x *ChangeGroupMemberResponse) GetResponse() *response.BaseResponse { if x != nil { return x.Response } return nil } -func (x *RemoveGroupMemberResponse) GetRemoved() int32 { +func (x *ChangeGroupMemberResponse) GetCount() int32 { if x != nil { - return x.Removed + return x.Count } return 0 } @@ -1155,16 +1054,15 @@ var file_user_group_v1_group_proto_rawDesc = []byte{ 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x2f, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2f, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x12, 0x75, 0x73, 0x65, 0x72, 0x2f, 0x76, 0x31, 0x2f, 0x75, 0x73, 0x65, 0x72, 0x2e, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x8f, 0x03, 0x0a, 0x05, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x12, - 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x02, 0x69, 0x64, 0x12, - 0x10, 0x0a, 0x03, 0x67, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x67, 0x69, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xff, 0x02, 0x0a, 0x05, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x12, + 0x10, 0x0a, 0x03, 0x67, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x03, 0x67, 0x69, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x16, 0x0a, 0x06, 0x61, 0x76, 0x61, 0x74, 0x61, 0x72, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x61, 0x76, 0x61, 0x74, 0x61, 0x72, 0x12, 0x1b, 0x0a, 0x09, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x5f, 0x75, 0x69, 0x64, 0x18, 0x06, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x08, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x55, 0x69, 0x64, 0x12, 0x39, 0x0a, 0x05, + 0x28, 0x03, 0x52, 0x08, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x55, 0x69, 0x64, 0x12, 0x39, 0x0a, 0x05, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x48, 0x00, 0x52, 0x05, 0x6f, @@ -1180,11 +1078,10 @@ var file_user_group_v1_group_proto_rawDesc = []byte{ 0x0b, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1e, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x42, 0x08, 0x0a, - 0x06, 0x5f, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x22, 0xc3, 0x02, 0x0a, 0x0b, 0x47, 0x72, 0x6f, 0x75, - 0x70, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x03, 0x52, 0x02, 0x69, 0x64, 0x12, 0x10, 0x0a, 0x03, 0x67, 0x69, 0x64, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x67, 0x69, 0x64, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x69, 0x64, - 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x69, 0x64, 0x12, 0x2a, 0x0a, 0x04, 0x75, + 0x06, 0x5f, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x22, 0xb3, 0x02, 0x0a, 0x0b, 0x47, 0x72, 0x6f, 0x75, + 0x70, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x12, 0x10, 0x0a, 0x03, 0x67, 0x69, 0x64, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x03, 0x52, 0x03, 0x67, 0x69, 0x64, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x69, 0x64, + 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x03, 0x75, 0x69, 0x64, 0x12, 0x2a, 0x0a, 0x04, 0x75, 0x73, 0x65, 0x72, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x48, 0x00, 0x52, 0x04, 0x75, 0x73, 0x65, 0x72, 0x88, 0x01, 0x01, 0x12, 0x3d, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, @@ -1200,99 +1097,98 @@ var file_user_group_v1_group_proto_rawDesc = []byte{ 0x74, 0x61, 0x74, 0x75, 0x73, 0x53, 0x69, 0x6c, 0x65, 0x6e, 0x74, 0x10, 0x01, 0x22, 0x25, 0x0a, 0x04, 0x54, 0x79, 0x70, 0x65, 0x12, 0x0d, 0x0a, 0x09, 0x54, 0x79, 0x70, 0x65, 0x4f, 0x77, 0x6e, 0x65, 0x72, 0x10, 0x00, 0x12, 0x0e, 0x0a, 0x0a, 0x54, 0x79, 0x70, 0x65, 0x4d, 0x65, 0x6d, 0x62, - 0x65, 0x72, 0x10, 0x01, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x75, 0x73, 0x65, 0x72, 0x22, 0x46, 0x0a, - 0x0f, 0x47, 0x65, 0x74, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x12, 0x10, 0x0a, 0x03, 0x67, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x67, - 0x69, 0x64, 0x12, 0x21, 0x0a, 0x0c, 0x77, 0x69, 0x74, 0x68, 0x5f, 0x6d, 0x65, 0x6d, 0x62, 0x65, - 0x72, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0b, 0x77, 0x69, 0x74, 0x68, 0x4d, 0x65, - 0x6d, 0x62, 0x65, 0x72, 0x73, 0x22, 0x84, 0x01, 0x0a, 0x10, 0x47, 0x65, 0x74, 0x47, 0x72, 0x6f, - 0x75, 0x70, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x40, 0x0a, 0x08, 0x72, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x61, - 0x70, 0x69, 0x2e, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x2e, 0x72, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x42, 0x61, 0x73, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x52, 0x08, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x2e, 0x0a, 0x05, - 0x67, 0x72, 0x6f, 0x75, 0x70, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x61, 0x70, - 0x69, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2e, 0x76, 0x31, 0x2e, - 0x47, 0x72, 0x6f, 0x75, 0x70, 0x52, 0x05, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x22, 0x56, 0x0a, 0x11, - 0x4c, 0x69, 0x73, 0x74, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, - 0x75, 0x69, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x70, 0x61, 0x67, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x05, 0x52, 0x04, 0x70, 0x61, 0x67, 0x65, 0x12, 0x1b, 0x0a, 0x09, 0x70, 0x61, 0x67, 0x65, 0x5f, - 0x73, 0x69, 0x7a, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x70, 0x61, 0x67, 0x65, - 0x53, 0x69, 0x7a, 0x65, 0x22, 0x88, 0x01, 0x0a, 0x12, 0x4c, 0x69, 0x73, 0x74, 0x47, 0x72, 0x6f, - 0x75, 0x70, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x40, 0x0a, 0x08, 0x72, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x24, 0x2e, - 0x61, 0x70, 0x69, 0x2e, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x2e, 0x72, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x42, 0x61, 0x73, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x52, 0x08, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x30, 0x0a, - 0x06, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x18, 0x2e, - 0x61, 0x70, 0x69, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2e, 0x76, - 0x31, 0x2e, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x52, 0x06, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x73, 0x22, - 0xa0, 0x01, 0x0a, 0x12, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 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, 0x20, 0x0a, 0x0b, 0x64, 0x65, - 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x16, 0x0a, 0x06, - 0x61, 0x76, 0x61, 0x74, 0x61, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x61, 0x76, - 0x61, 0x74, 0x61, 0x72, 0x12, 0x1b, 0x0a, 0x09, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x5f, 0x75, 0x69, - 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x55, 0x69, - 0x64, 0x12, 0x1f, 0x0a, 0x0b, 0x6d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x73, 0x5f, 0x75, 0x69, 0x64, - 0x18, 0x05, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0a, 0x6d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x73, 0x55, - 0x69, 0x64, 0x22, 0x87, 0x01, 0x0a, 0x13, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x47, 0x72, 0x6f, - 0x75, 0x70, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x40, 0x0a, 0x08, 0x72, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x61, - 0x70, 0x69, 0x2e, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x2e, 0x72, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x42, 0x61, 0x73, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x52, 0x08, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x2e, 0x0a, 0x05, - 0x67, 0x72, 0x6f, 0x75, 0x70, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x61, 0x70, - 0x69, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2e, 0x76, 0x31, 0x2e, - 0x47, 0x72, 0x6f, 0x75, 0x70, 0x52, 0x05, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x22, 0x86, 0x01, 0x0a, - 0x12, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x12, 0x10, 0x0a, 0x03, 0x67, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x03, 0x67, 0x69, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x64, 0x65, 0x73, - 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, - 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x16, 0x0a, 0x06, 0x61, - 0x76, 0x61, 0x74, 0x61, 0x72, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x61, 0x76, 0x61, - 0x74, 0x61, 0x72, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x69, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x03, 0x75, 0x69, 0x64, 0x22, 0x87, 0x01, 0x0a, 0x13, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, - 0x47, 0x72, 0x6f, 0x75, 0x70, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x40, 0x0a, - 0x08, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x24, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x2e, - 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x42, 0x61, 0x73, 0x65, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x52, 0x08, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, - 0x2e, 0x0a, 0x05, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x18, - 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2e, - 0x76, 0x31, 0x2e, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x52, 0x05, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x22, - 0x38, 0x0a, 0x12, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x10, 0x0a, 0x03, 0x67, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x03, 0x67, 0x69, 0x64, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x69, 0x64, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x69, 0x64, 0x22, 0x3b, 0x0a, 0x15, 0x41, 0x64, 0x64, - 0x47, 0x72, 0x6f, 0x75, 0x70, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x12, 0x10, 0x0a, 0x03, 0x67, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x03, 0x67, 0x69, 0x64, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x69, 0x64, 0x18, 0x02, 0x20, 0x03, 0x28, - 0x09, 0x52, 0x03, 0x75, 0x69, 0x64, 0x22, 0x70, 0x0a, 0x16, 0x41, 0x64, 0x64, 0x47, 0x72, 0x6f, - 0x75, 0x70, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x12, 0x40, 0x0a, 0x08, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, - 0x72, 0x74, 0x2e, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x42, 0x61, 0x73, 0x65, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x52, 0x08, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x61, 0x64, 0x64, 0x65, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x05, 0x52, 0x05, 0x61, 0x64, 0x64, 0x65, 0x64, 0x22, 0x3e, 0x0a, 0x18, 0x52, 0x65, 0x6d, 0x6f, - 0x76, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x12, 0x10, 0x0a, 0x03, 0x67, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x03, 0x67, 0x69, 0x64, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x69, 0x64, 0x18, 0x02, 0x20, - 0x03, 0x28, 0x09, 0x52, 0x03, 0x75, 0x69, 0x64, 0x22, 0x77, 0x0a, 0x19, 0x52, 0x65, 0x6d, 0x6f, - 0x76, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x52, 0x65, 0x73, + 0x65, 0x72, 0x10, 0x01, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x75, 0x73, 0x65, 0x72, 0x22, 0x80, 0x01, + 0x0a, 0x0f, 0x47, 0x65, 0x74, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x12, 0x10, 0x0a, 0x03, 0x67, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x03, + 0x67, 0x69, 0x64, 0x12, 0x1b, 0x0a, 0x09, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x5f, 0x75, 0x69, 0x64, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x08, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x55, 0x69, 0x64, + 0x12, 0x21, 0x0a, 0x0c, 0x77, 0x69, 0x74, 0x68, 0x5f, 0x6d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x73, + 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0b, 0x77, 0x69, 0x74, 0x68, 0x4d, 0x65, 0x6d, 0x62, + 0x65, 0x72, 0x73, 0x12, 0x1b, 0x0a, 0x09, 0x77, 0x69, 0x74, 0x68, 0x5f, 0x69, 0x6e, 0x66, 0x6f, + 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, 0x08, 0x77, 0x69, 0x74, 0x68, 0x49, 0x6e, 0x66, 0x6f, + 0x22, 0x84, 0x01, 0x0a, 0x10, 0x47, 0x65, 0x74, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x40, 0x0a, 0x08, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x2e, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x42, 0x61, 0x73, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x52, 0x08, 0x72, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x72, 0x65, 0x6d, 0x6f, 0x76, - 0x65, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x07, 0x72, 0x65, 0x6d, 0x6f, 0x76, 0x65, - 0x64, 0x2a, 0x25, 0x0a, 0x0b, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x2e, 0x0a, 0x05, 0x67, 0x72, 0x6f, 0x75, 0x70, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x75, 0x73, 0x65, + 0x72, 0x2e, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x72, 0x6f, 0x75, 0x70, + 0x52, 0x05, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x22, 0x56, 0x0a, 0x11, 0x4c, 0x69, 0x73, 0x74, 0x47, + 0x72, 0x6f, 0x75, 0x70, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x10, 0x0a, 0x03, + 0x75, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x03, 0x75, 0x69, 0x64, 0x12, 0x12, + 0x0a, 0x04, 0x70, 0x61, 0x67, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x04, 0x70, 0x61, + 0x67, 0x65, 0x12, 0x1b, 0x0a, 0x09, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x18, + 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x70, 0x61, 0x67, 0x65, 0x53, 0x69, 0x7a, 0x65, 0x22, + 0x88, 0x01, 0x0a, 0x12, 0x4c, 0x69, 0x73, 0x74, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x73, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x40, 0x0a, 0x08, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x74, + 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x2e, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x2e, 0x42, 0x61, 0x73, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x52, 0x08, + 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x30, 0x0a, 0x06, 0x67, 0x72, 0x6f, 0x75, + 0x70, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x75, + 0x73, 0x65, 0x72, 0x2e, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x72, 0x6f, + 0x75, 0x70, 0x52, 0x06, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x73, 0x22, 0xa0, 0x01, 0x0a, 0x12, 0x43, + 0x72, 0x65, 0x61, 0x74, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 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, 0x20, 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, + 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, 0x65, 0x73, 0x63, + 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x16, 0x0a, 0x06, 0x61, 0x76, 0x61, 0x74, 0x61, + 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x61, 0x76, 0x61, 0x74, 0x61, 0x72, 0x12, + 0x1b, 0x0a, 0x09, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x5f, 0x75, 0x69, 0x64, 0x18, 0x04, 0x20, 0x01, + 0x28, 0x03, 0x52, 0x08, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x55, 0x69, 0x64, 0x12, 0x1f, 0x0a, 0x0b, + 0x6d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x73, 0x5f, 0x75, 0x69, 0x64, 0x18, 0x05, 0x20, 0x03, 0x28, + 0x03, 0x52, 0x0a, 0x6d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x73, 0x55, 0x69, 0x64, 0x22, 0x87, 0x01, + 0x0a, 0x13, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x40, 0x0a, 0x08, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x74, 0x72, + 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x2e, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x2e, 0x42, 0x61, 0x73, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x52, 0x08, 0x72, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x2e, 0x0a, 0x05, 0x67, 0x72, 0x6f, 0x75, 0x70, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x75, 0x73, 0x65, + 0x72, 0x2e, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x72, 0x6f, 0x75, 0x70, + 0x52, 0x05, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x22, 0xc4, 0x01, 0x0a, 0x12, 0x55, 0x70, 0x64, 0x61, + 0x74, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x10, + 0x0a, 0x03, 0x67, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x03, 0x67, 0x69, 0x64, + 0x12, 0x17, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, + 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x88, 0x01, 0x01, 0x12, 0x25, 0x0a, 0x0b, 0x64, 0x65, 0x73, + 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x48, 0x01, + 0x52, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x88, 0x01, 0x01, + 0x12, 0x1b, 0x0a, 0x06, 0x61, 0x76, 0x61, 0x74, 0x61, 0x72, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, + 0x48, 0x02, 0x52, 0x06, 0x61, 0x76, 0x61, 0x74, 0x61, 0x72, 0x88, 0x01, 0x01, 0x12, 0x1b, 0x0a, + 0x09, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x5f, 0x75, 0x69, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x03, + 0x52, 0x08, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x55, 0x69, 0x64, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x6e, + 0x61, 0x6d, 0x65, 0x42, 0x0e, 0x0a, 0x0c, 0x5f, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, + 0x69, 0x6f, 0x6e, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x61, 0x76, 0x61, 0x74, 0x61, 0x72, 0x22, 0x87, + 0x01, 0x0a, 0x13, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x40, 0x0a, 0x08, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x74, + 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x2e, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x2e, 0x42, 0x61, 0x73, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x52, 0x08, + 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x2e, 0x0a, 0x05, 0x67, 0x72, 0x6f, 0x75, + 0x70, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x75, 0x73, + 0x65, 0x72, 0x2e, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x72, 0x6f, 0x75, + 0x70, 0x52, 0x05, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x22, 0x43, 0x0a, 0x12, 0x44, 0x65, 0x6c, 0x65, + 0x74, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x10, + 0x0a, 0x03, 0x67, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x03, 0x67, 0x69, 0x64, + 0x12, 0x1b, 0x0a, 0x09, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x5f, 0x75, 0x69, 0x64, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x03, 0x52, 0x08, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x55, 0x69, 0x64, 0x22, 0x5d, 0x0a, + 0x18, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x4d, 0x65, 0x6d, 0x62, + 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x10, 0x0a, 0x03, 0x67, 0x69, 0x64, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x03, 0x67, 0x69, 0x64, 0x12, 0x1b, 0x0a, 0x09, 0x6f, + 0x77, 0x6e, 0x65, 0x72, 0x5f, 0x75, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x08, + 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x55, 0x69, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x75, 0x69, 0x64, 0x73, + 0x18, 0x03, 0x20, 0x03, 0x28, 0x03, 0x52, 0x04, 0x75, 0x69, 0x64, 0x73, 0x22, 0x73, 0x0a, 0x19, + 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x4d, 0x65, 0x6d, 0x62, 0x65, + 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x40, 0x0a, 0x08, 0x72, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x61, 0x70, + 0x69, 0x2e, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x2e, 0x72, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x42, 0x61, 0x73, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x52, 0x08, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x63, + 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x63, 0x6f, 0x75, 0x6e, + 0x74, 0x2a, 0x25, 0x0a, 0x0b, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x0a, 0x0a, 0x06, 0x41, 0x63, 0x74, 0x69, 0x76, 0x65, 0x10, 0x00, 0x12, 0x0a, 0x0a, 0x06, - 0x53, 0x69, 0x6c, 0x65, 0x6e, 0x74, 0x10, 0x01, 0x32, 0xad, 0x05, 0x0a, 0x0c, 0x47, 0x72, 0x6f, + 0x53, 0x69, 0x6c, 0x65, 0x6e, 0x74, 0x10, 0x01, 0x32, 0xb3, 0x05, 0x0a, 0x0c, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x53, 0x0a, 0x08, 0x47, 0x65, 0x74, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x12, 0x22, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x47, 0x72, 0x6f, @@ -1322,23 +1218,23 @@ var file_user_group_v1_group_proto_rawDesc = []byte{ 0x72, 0x6f, 0x75, 0x70, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x24, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x2e, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x42, 0x61, 0x73, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x12, 0x65, 0x0a, 0x0e, 0x41, 0x64, 0x64, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x4d, 0x65, 0x6d, - 0x62, 0x65, 0x72, 0x12, 0x28, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x67, - 0x72, 0x6f, 0x75, 0x70, 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x64, 0x64, 0x47, 0x72, 0x6f, 0x75, 0x70, - 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x29, 0x2e, - 0x61, 0x70, 0x69, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2e, 0x76, - 0x31, 0x2e, 0x41, 0x64, 0x64, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x6e, 0x0a, 0x11, 0x52, 0x65, 0x6d, 0x6f, - 0x76, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x12, 0x2b, 0x2e, - 0x61, 0x70, 0x69, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2e, 0x76, - 0x31, 0x2e, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x4d, 0x65, 0x6d, - 0x62, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2c, 0x2e, 0x61, 0x70, 0x69, - 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2e, 0x76, 0x31, 0x2e, 0x52, - 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0x26, 0x5a, 0x24, 0x67, 0x69, 0x74, 0x68, - 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x67, 0x6f, 0x2d, 0x67, 0x6f, 0x69, 0x6d, 0x2f, 0x61, - 0x70, 0x69, 0x2f, 0x75, 0x73, 0x65, 0x72, 0x2f, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2f, 0x76, 0x31, - 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x65, 0x12, 0x6b, 0x0a, 0x0e, 0x41, 0x64, 0x64, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x4d, 0x65, 0x6d, + 0x62, 0x65, 0x72, 0x12, 0x2b, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x67, + 0x72, 0x6f, 0x75, 0x70, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x47, 0x72, + 0x6f, 0x75, 0x70, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x1a, 0x2c, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x67, 0x72, 0x6f, 0x75, + 0x70, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, + 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x6e, + 0x0a, 0x11, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x4d, 0x65, 0x6d, + 0x62, 0x65, 0x72, 0x12, 0x2b, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x67, + 0x72, 0x6f, 0x75, 0x70, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x47, 0x72, + 0x6f, 0x75, 0x70, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x1a, 0x2c, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x67, 0x72, 0x6f, 0x75, + 0x70, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, + 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0x26, + 0x5a, 0x24, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x67, 0x6f, 0x2d, + 0x67, 0x6f, 0x69, 0x6d, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x75, 0x73, 0x65, 0x72, 0x2f, 0x67, 0x72, + 0x6f, 0x75, 0x70, 0x2f, 0x76, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -1354,7 +1250,7 @@ func file_user_group_v1_group_proto_rawDescGZIP() []byte { } var file_user_group_v1_group_proto_enumTypes = make([]protoimpl.EnumInfo, 3) -var file_user_group_v1_group_proto_msgTypes = make([]protoimpl.MessageInfo, 15) +var file_user_group_v1_group_proto_msgTypes = make([]protoimpl.MessageInfo, 13) var file_user_group_v1_group_proto_goTypes = []interface{}{ (GroupStatus)(0), // 0: api.user.group.v1.GroupStatus (GroupMember_Status)(0), // 1: api.user.group.v1.GroupMember.Status @@ -1370,49 +1266,46 @@ var file_user_group_v1_group_proto_goTypes = []interface{}{ (*UpdateGroupRequest)(nil), // 11: api.user.group.v1.UpdateGroupRequest (*UpdateGroupResponse)(nil), // 12: api.user.group.v1.UpdateGroupResponse (*DeleteGroupRequest)(nil), // 13: api.user.group.v1.DeleteGroupRequest - (*AddGroupMemberRequest)(nil), // 14: api.user.group.v1.AddGroupMemberRequest - (*AddGroupMemberResponse)(nil), // 15: api.user.group.v1.AddGroupMemberResponse - (*RemoveGroupMemberRequest)(nil), // 16: api.user.group.v1.RemoveGroupMemberRequest - (*RemoveGroupMemberResponse)(nil), // 17: api.user.group.v1.RemoveGroupMemberResponse - (*v1.User)(nil), // 18: api.user.v1.User - (*response.BaseResponse)(nil), // 19: api.transport.response.BaseResponse + (*ChangeGroupMemberRequest)(nil), // 14: api.user.group.v1.ChangeGroupMemberRequest + (*ChangeGroupMemberResponse)(nil), // 15: api.user.group.v1.ChangeGroupMemberResponse + (*v1.User)(nil), // 16: api.user.v1.User + (*response.BaseResponse)(nil), // 17: api.transport.response.BaseResponse } var file_user_group_v1_group_proto_depIdxs = []int32{ 4, // 0: api.user.group.v1.Group.owner:type_name -> api.user.group.v1.GroupMember 4, // 1: api.user.group.v1.Group.members:type_name -> api.user.group.v1.GroupMember 0, // 2: api.user.group.v1.Group.status:type_name -> api.user.group.v1.GroupStatus - 18, // 3: api.user.group.v1.GroupMember.user:type_name -> api.user.v1.User + 16, // 3: api.user.group.v1.GroupMember.user:type_name -> api.user.v1.User 1, // 4: api.user.group.v1.GroupMember.status:type_name -> api.user.group.v1.GroupMember.Status 2, // 5: api.user.group.v1.GroupMember.type:type_name -> api.user.group.v1.GroupMember.Type - 19, // 6: api.user.group.v1.GetGroupResponse.response:type_name -> api.transport.response.BaseResponse + 17, // 6: api.user.group.v1.GetGroupResponse.response:type_name -> api.transport.response.BaseResponse 3, // 7: api.user.group.v1.GetGroupResponse.group:type_name -> api.user.group.v1.Group - 19, // 8: api.user.group.v1.ListGroupsResponse.response:type_name -> api.transport.response.BaseResponse + 17, // 8: api.user.group.v1.ListGroupsResponse.response:type_name -> api.transport.response.BaseResponse 3, // 9: api.user.group.v1.ListGroupsResponse.groups:type_name -> api.user.group.v1.Group - 19, // 10: api.user.group.v1.CreateGroupResponse.response:type_name -> api.transport.response.BaseResponse + 17, // 10: api.user.group.v1.CreateGroupResponse.response:type_name -> api.transport.response.BaseResponse 3, // 11: api.user.group.v1.CreateGroupResponse.group:type_name -> api.user.group.v1.Group - 19, // 12: api.user.group.v1.UpdateGroupResponse.response:type_name -> api.transport.response.BaseResponse + 17, // 12: api.user.group.v1.UpdateGroupResponse.response:type_name -> api.transport.response.BaseResponse 3, // 13: api.user.group.v1.UpdateGroupResponse.group:type_name -> api.user.group.v1.Group - 19, // 14: api.user.group.v1.AddGroupMemberResponse.response:type_name -> api.transport.response.BaseResponse - 19, // 15: api.user.group.v1.RemoveGroupMemberResponse.response:type_name -> api.transport.response.BaseResponse - 5, // 16: api.user.group.v1.GroupService.GetGroup:input_type -> api.user.group.v1.GetGroupRequest - 7, // 17: api.user.group.v1.GroupService.ListGroups:input_type -> api.user.group.v1.ListGroupsRequest - 9, // 18: api.user.group.v1.GroupService.CreateGroup:input_type -> api.user.group.v1.CreateGroupRequest - 11, // 19: api.user.group.v1.GroupService.UpdateGroup:input_type -> api.user.group.v1.UpdateGroupRequest - 13, // 20: api.user.group.v1.GroupService.DeleteGroup:input_type -> api.user.group.v1.DeleteGroupRequest - 14, // 21: api.user.group.v1.GroupService.AddGroupMember:input_type -> api.user.group.v1.AddGroupMemberRequest - 16, // 22: api.user.group.v1.GroupService.RemoveGroupMember:input_type -> api.user.group.v1.RemoveGroupMemberRequest - 6, // 23: api.user.group.v1.GroupService.GetGroup:output_type -> api.user.group.v1.GetGroupResponse - 8, // 24: api.user.group.v1.GroupService.ListGroups:output_type -> api.user.group.v1.ListGroupsResponse - 10, // 25: api.user.group.v1.GroupService.CreateGroup:output_type -> api.user.group.v1.CreateGroupResponse - 12, // 26: api.user.group.v1.GroupService.UpdateGroup:output_type -> api.user.group.v1.UpdateGroupResponse - 19, // 27: api.user.group.v1.GroupService.DeleteGroup:output_type -> api.transport.response.BaseResponse - 15, // 28: api.user.group.v1.GroupService.AddGroupMember:output_type -> api.user.group.v1.AddGroupMemberResponse - 17, // 29: api.user.group.v1.GroupService.RemoveGroupMember:output_type -> api.user.group.v1.RemoveGroupMemberResponse - 23, // [23:30] is the sub-list for method output_type - 16, // [16:23] is the sub-list for method input_type - 16, // [16:16] is the sub-list for extension type_name - 16, // [16:16] is the sub-list for extension extendee - 0, // [0:16] is the sub-list for field type_name + 17, // 14: api.user.group.v1.ChangeGroupMemberResponse.response:type_name -> api.transport.response.BaseResponse + 5, // 15: api.user.group.v1.GroupService.GetGroup:input_type -> api.user.group.v1.GetGroupRequest + 7, // 16: api.user.group.v1.GroupService.ListGroups:input_type -> api.user.group.v1.ListGroupsRequest + 9, // 17: api.user.group.v1.GroupService.CreateGroup:input_type -> api.user.group.v1.CreateGroupRequest + 11, // 18: api.user.group.v1.GroupService.UpdateGroup:input_type -> api.user.group.v1.UpdateGroupRequest + 13, // 19: api.user.group.v1.GroupService.DeleteGroup:input_type -> api.user.group.v1.DeleteGroupRequest + 14, // 20: api.user.group.v1.GroupService.AddGroupMember:input_type -> api.user.group.v1.ChangeGroupMemberRequest + 14, // 21: api.user.group.v1.GroupService.RemoveGroupMember:input_type -> api.user.group.v1.ChangeGroupMemberRequest + 6, // 22: api.user.group.v1.GroupService.GetGroup:output_type -> api.user.group.v1.GetGroupResponse + 8, // 23: api.user.group.v1.GroupService.ListGroups:output_type -> api.user.group.v1.ListGroupsResponse + 10, // 24: api.user.group.v1.GroupService.CreateGroup:output_type -> api.user.group.v1.CreateGroupResponse + 12, // 25: api.user.group.v1.GroupService.UpdateGroup:output_type -> api.user.group.v1.UpdateGroupResponse + 17, // 26: api.user.group.v1.GroupService.DeleteGroup:output_type -> api.transport.response.BaseResponse + 15, // 27: api.user.group.v1.GroupService.AddGroupMember:output_type -> api.user.group.v1.ChangeGroupMemberResponse + 15, // 28: api.user.group.v1.GroupService.RemoveGroupMember:output_type -> api.user.group.v1.ChangeGroupMemberResponse + 22, // [22:29] is the sub-list for method output_type + 15, // [15:22] is the sub-list for method input_type + 15, // [15:15] is the sub-list for extension type_name + 15, // [15:15] is the sub-list for extension extendee + 0, // [0:15] is the sub-list for field type_name } func init() { file_user_group_v1_group_proto_init() } @@ -1554,7 +1447,7 @@ func file_user_group_v1_group_proto_init() { } } file_user_group_v1_group_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*AddGroupMemberRequest); i { + switch v := v.(*ChangeGroupMemberRequest); i { case 0: return &v.state case 1: @@ -1566,31 +1459,7 @@ func file_user_group_v1_group_proto_init() { } } file_user_group_v1_group_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*AddGroupMemberResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_user_group_v1_group_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*RemoveGroupMemberRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_user_group_v1_group_proto_msgTypes[14].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*RemoveGroupMemberResponse); i { + switch v := v.(*ChangeGroupMemberResponse); i { case 0: return &v.state case 1: @@ -1604,13 +1473,14 @@ func file_user_group_v1_group_proto_init() { } file_user_group_v1_group_proto_msgTypes[0].OneofWrappers = []interface{}{} file_user_group_v1_group_proto_msgTypes[1].OneofWrappers = []interface{}{} + file_user_group_v1_group_proto_msgTypes[8].OneofWrappers = []interface{}{} type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_user_group_v1_group_proto_rawDesc, NumEnums: 3, - NumMessages: 15, + NumMessages: 13, NumExtensions: 0, NumServices: 1, }, diff --git a/user/group/v1/group.pb.validate.go b/user/group/v1/group.pb.validate.go index 0f32dce..f199050 100644 --- a/user/group/v1/group.pb.validate.go +++ b/user/group/v1/group.pb.validate.go @@ -56,8 +56,6 @@ func (m *Group) validate(all bool) error { var errors []error - // no validation rules for Id - // no validation rules for Gid // no validation rules for Name @@ -240,8 +238,6 @@ func (m *GroupMember) validate(all bool) error { var errors []error - // no validation rules for Id - // no validation rules for Gid // no validation rules for Uid @@ -384,8 +380,12 @@ func (m *GetGroupRequest) validate(all bool) error { // no validation rules for Gid + // no validation rules for OwnerUid + // no validation rules for WithMembers + // no validation rules for WithInfo + if len(errors) > 0 { return GetGroupRequestMultiError(errors) } @@ -1189,13 +1189,19 @@ func (m *UpdateGroupRequest) validate(all bool) error { // no validation rules for Gid - // no validation rules for Name + // no validation rules for OwnerUid - // no validation rules for Description + if m.Name != nil { + // no validation rules for Name + } - // no validation rules for Avatar + if m.Description != nil { + // no validation rules for Description + } - // no validation rules for Uid + if m.Avatar != nil { + // no validation rules for Avatar + } if len(errors) > 0 { return UpdateGroupRequestMultiError(errors) @@ -1461,7 +1467,7 @@ func (m *DeleteGroupRequest) validate(all bool) error { // no validation rules for Gid - // no validation rules for Uid + // no validation rules for OwnerUid if len(errors) > 0 { return DeleteGroupRequestMultiError(errors) @@ -1543,259 +1549,22 @@ var _ interface { ErrorName() string } = DeleteGroupRequestValidationError{} -// Validate checks the field values on AddGroupMemberRequest with the rules -// defined in the proto definition for this message. If any rules are -// violated, the first error encountered is returned, or nil if there are no violations. -func (m *AddGroupMemberRequest) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on AddGroupMemberRequest with the rules -// defined in the proto definition for this message. If any rules are -// violated, the result is a list of violation errors wrapped in -// AddGroupMemberRequestMultiError, or nil if none found. -func (m *AddGroupMemberRequest) ValidateAll() error { - return m.validate(true) -} - -func (m *AddGroupMemberRequest) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - // no validation rules for Gid - - if len(errors) > 0 { - return AddGroupMemberRequestMultiError(errors) - } - - return nil -} - -// AddGroupMemberRequestMultiError is an error wrapping multiple validation -// errors returned by AddGroupMemberRequest.ValidateAll() if the designated -// constraints aren't met. -type AddGroupMemberRequestMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m AddGroupMemberRequestMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m AddGroupMemberRequestMultiError) AllErrors() []error { return m } - -// AddGroupMemberRequestValidationError is the validation error returned by -// AddGroupMemberRequest.Validate if the designated constraints aren't met. -type AddGroupMemberRequestValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e AddGroupMemberRequestValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e AddGroupMemberRequestValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e AddGroupMemberRequestValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e AddGroupMemberRequestValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e AddGroupMemberRequestValidationError) ErrorName() string { - return "AddGroupMemberRequestValidationError" -} - -// Error satisfies the builtin error interface -func (e AddGroupMemberRequestValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sAddGroupMemberRequest.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = AddGroupMemberRequestValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = AddGroupMemberRequestValidationError{} - -// Validate checks the field values on AddGroupMemberResponse with the rules -// defined in the proto definition for this message. If any rules are -// violated, the first error encountered is returned, or nil if there are no violations. -func (m *AddGroupMemberResponse) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on AddGroupMemberResponse with the rules -// defined in the proto definition for this message. If any rules are -// violated, the result is a list of violation errors wrapped in -// AddGroupMemberResponseMultiError, or nil if none found. -func (m *AddGroupMemberResponse) ValidateAll() error { - return m.validate(true) -} - -func (m *AddGroupMemberResponse) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - if all { - switch v := interface{}(m.GetResponse()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, AddGroupMemberResponseValidationError{ - field: "Response", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, AddGroupMemberResponseValidationError{ - field: "Response", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetResponse()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return AddGroupMemberResponseValidationError{ - field: "Response", - reason: "embedded message failed validation", - cause: err, - } - } - } - - // no validation rules for Added - - if len(errors) > 0 { - return AddGroupMemberResponseMultiError(errors) - } - - return nil -} - -// AddGroupMemberResponseMultiError is an error wrapping multiple validation -// errors returned by AddGroupMemberResponse.ValidateAll() if the designated -// constraints aren't met. -type AddGroupMemberResponseMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m AddGroupMemberResponseMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m AddGroupMemberResponseMultiError) AllErrors() []error { return m } - -// AddGroupMemberResponseValidationError is the validation error returned by -// AddGroupMemberResponse.Validate if the designated constraints aren't met. -type AddGroupMemberResponseValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e AddGroupMemberResponseValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e AddGroupMemberResponseValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e AddGroupMemberResponseValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e AddGroupMemberResponseValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e AddGroupMemberResponseValidationError) ErrorName() string { - return "AddGroupMemberResponseValidationError" -} - -// Error satisfies the builtin error interface -func (e AddGroupMemberResponseValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sAddGroupMemberResponse.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = AddGroupMemberResponseValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = AddGroupMemberResponseValidationError{} - -// Validate checks the field values on RemoveGroupMemberRequest with the rules +// Validate checks the field values on ChangeGroupMemberRequest with the rules // defined in the proto definition for this message. If any rules are // violated, the first error encountered is returned, or nil if there are no violations. -func (m *RemoveGroupMemberRequest) Validate() error { +func (m *ChangeGroupMemberRequest) Validate() error { return m.validate(false) } -// ValidateAll checks the field values on RemoveGroupMemberRequest with the +// ValidateAll checks the field values on ChangeGroupMemberRequest with the // rules defined in the proto definition for this message. If any rules are // violated, the result is a list of violation errors wrapped in -// RemoveGroupMemberRequestMultiError, or nil if none found. -func (m *RemoveGroupMemberRequest) ValidateAll() error { +// ChangeGroupMemberRequestMultiError, or nil if none found. +func (m *ChangeGroupMemberRequest) ValidateAll() error { return m.validate(true) } -func (m *RemoveGroupMemberRequest) validate(all bool) error { +func (m *ChangeGroupMemberRequest) validate(all bool) error { if m == nil { return nil } @@ -1804,20 +1573,22 @@ func (m *RemoveGroupMemberRequest) validate(all bool) error { // no validation rules for Gid + // no validation rules for OwnerUid + if len(errors) > 0 { - return RemoveGroupMemberRequestMultiError(errors) + return ChangeGroupMemberRequestMultiError(errors) } return nil } -// RemoveGroupMemberRequestMultiError is an error wrapping multiple validation -// errors returned by RemoveGroupMemberRequest.ValidateAll() if the designated +// ChangeGroupMemberRequestMultiError is an error wrapping multiple validation +// errors returned by ChangeGroupMemberRequest.ValidateAll() if the designated // constraints aren't met. -type RemoveGroupMemberRequestMultiError []error +type ChangeGroupMemberRequestMultiError []error // Error returns a concatenation of all the error messages it wraps. -func (m RemoveGroupMemberRequestMultiError) Error() string { +func (m ChangeGroupMemberRequestMultiError) Error() string { var msgs []string for _, err := range m { msgs = append(msgs, err.Error()) @@ -1826,11 +1597,11 @@ func (m RemoveGroupMemberRequestMultiError) Error() string { } // AllErrors returns a list of validation violation errors. -func (m RemoveGroupMemberRequestMultiError) AllErrors() []error { return m } +func (m ChangeGroupMemberRequestMultiError) AllErrors() []error { return m } -// RemoveGroupMemberRequestValidationError is the validation error returned by -// RemoveGroupMemberRequest.Validate if the designated constraints aren't met. -type RemoveGroupMemberRequestValidationError struct { +// ChangeGroupMemberRequestValidationError is the validation error returned by +// ChangeGroupMemberRequest.Validate if the designated constraints aren't met. +type ChangeGroupMemberRequestValidationError struct { field string reason string cause error @@ -1838,24 +1609,24 @@ type RemoveGroupMemberRequestValidationError struct { } // Field function returns field value. -func (e RemoveGroupMemberRequestValidationError) Field() string { return e.field } +func (e ChangeGroupMemberRequestValidationError) Field() string { return e.field } // Reason function returns reason value. -func (e RemoveGroupMemberRequestValidationError) Reason() string { return e.reason } +func (e ChangeGroupMemberRequestValidationError) Reason() string { return e.reason } // Cause function returns cause value. -func (e RemoveGroupMemberRequestValidationError) Cause() error { return e.cause } +func (e ChangeGroupMemberRequestValidationError) Cause() error { return e.cause } // Key function returns key value. -func (e RemoveGroupMemberRequestValidationError) Key() bool { return e.key } +func (e ChangeGroupMemberRequestValidationError) Key() bool { return e.key } // ErrorName returns error name. -func (e RemoveGroupMemberRequestValidationError) ErrorName() string { - return "RemoveGroupMemberRequestValidationError" +func (e ChangeGroupMemberRequestValidationError) ErrorName() string { + return "ChangeGroupMemberRequestValidationError" } // Error satisfies the builtin error interface -func (e RemoveGroupMemberRequestValidationError) Error() string { +func (e ChangeGroupMemberRequestValidationError) Error() string { cause := "" if e.cause != nil { cause = fmt.Sprintf(" | caused by: %v", e.cause) @@ -1867,14 +1638,14 @@ func (e RemoveGroupMemberRequestValidationError) Error() string { } return fmt.Sprintf( - "invalid %sRemoveGroupMemberRequest.%s: %s%s", + "invalid %sChangeGroupMemberRequest.%s: %s%s", key, e.field, e.reason, cause) } -var _ error = RemoveGroupMemberRequestValidationError{} +var _ error = ChangeGroupMemberRequestValidationError{} var _ interface { Field() string @@ -1882,24 +1653,24 @@ var _ interface { Key() bool Cause() error ErrorName() string -} = RemoveGroupMemberRequestValidationError{} +} = ChangeGroupMemberRequestValidationError{} -// Validate checks the field values on RemoveGroupMemberResponse with the rules +// Validate checks the field values on ChangeGroupMemberResponse with the rules // defined in the proto definition for this message. If any rules are // violated, the first error encountered is returned, or nil if there are no violations. -func (m *RemoveGroupMemberResponse) Validate() error { +func (m *ChangeGroupMemberResponse) Validate() error { return m.validate(false) } -// ValidateAll checks the field values on RemoveGroupMemberResponse with the +// ValidateAll checks the field values on ChangeGroupMemberResponse with the // rules defined in the proto definition for this message. If any rules are // violated, the result is a list of violation errors wrapped in -// RemoveGroupMemberResponseMultiError, or nil if none found. -func (m *RemoveGroupMemberResponse) ValidateAll() error { +// ChangeGroupMemberResponseMultiError, or nil if none found. +func (m *ChangeGroupMemberResponse) ValidateAll() error { return m.validate(true) } -func (m *RemoveGroupMemberResponse) validate(all bool) error { +func (m *ChangeGroupMemberResponse) validate(all bool) error { if m == nil { return nil } @@ -1910,7 +1681,7 @@ func (m *RemoveGroupMemberResponse) validate(all bool) error { switch v := interface{}(m.GetResponse()).(type) { case interface{ ValidateAll() error }: if err := v.ValidateAll(); err != nil { - errors = append(errors, RemoveGroupMemberResponseValidationError{ + errors = append(errors, ChangeGroupMemberResponseValidationError{ field: "Response", reason: "embedded message failed validation", cause: err, @@ -1918,7 +1689,7 @@ func (m *RemoveGroupMemberResponse) validate(all bool) error { } case interface{ Validate() error }: if err := v.Validate(); err != nil { - errors = append(errors, RemoveGroupMemberResponseValidationError{ + errors = append(errors, ChangeGroupMemberResponseValidationError{ field: "Response", reason: "embedded message failed validation", cause: err, @@ -1927,7 +1698,7 @@ func (m *RemoveGroupMemberResponse) validate(all bool) error { } } else if v, ok := interface{}(m.GetResponse()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { - return RemoveGroupMemberResponseValidationError{ + return ChangeGroupMemberResponseValidationError{ field: "Response", reason: "embedded message failed validation", cause: err, @@ -1935,22 +1706,22 @@ func (m *RemoveGroupMemberResponse) validate(all bool) error { } } - // no validation rules for Removed + // no validation rules for Count if len(errors) > 0 { - return RemoveGroupMemberResponseMultiError(errors) + return ChangeGroupMemberResponseMultiError(errors) } return nil } -// RemoveGroupMemberResponseMultiError is an error wrapping multiple validation -// errors returned by RemoveGroupMemberResponse.ValidateAll() if the +// ChangeGroupMemberResponseMultiError is an error wrapping multiple validation +// errors returned by ChangeGroupMemberResponse.ValidateAll() if the // designated constraints aren't met. -type RemoveGroupMemberResponseMultiError []error +type ChangeGroupMemberResponseMultiError []error // Error returns a concatenation of all the error messages it wraps. -func (m RemoveGroupMemberResponseMultiError) Error() string { +func (m ChangeGroupMemberResponseMultiError) Error() string { var msgs []string for _, err := range m { msgs = append(msgs, err.Error()) @@ -1959,11 +1730,11 @@ func (m RemoveGroupMemberResponseMultiError) Error() string { } // AllErrors returns a list of validation violation errors. -func (m RemoveGroupMemberResponseMultiError) AllErrors() []error { return m } +func (m ChangeGroupMemberResponseMultiError) AllErrors() []error { return m } -// RemoveGroupMemberResponseValidationError is the validation error returned by -// RemoveGroupMemberResponse.Validate if the designated constraints aren't met. -type RemoveGroupMemberResponseValidationError struct { +// ChangeGroupMemberResponseValidationError is the validation error returned by +// ChangeGroupMemberResponse.Validate if the designated constraints aren't met. +type ChangeGroupMemberResponseValidationError struct { field string reason string cause error @@ -1971,24 +1742,24 @@ type RemoveGroupMemberResponseValidationError struct { } // Field function returns field value. -func (e RemoveGroupMemberResponseValidationError) Field() string { return e.field } +func (e ChangeGroupMemberResponseValidationError) Field() string { return e.field } // Reason function returns reason value. -func (e RemoveGroupMemberResponseValidationError) Reason() string { return e.reason } +func (e ChangeGroupMemberResponseValidationError) Reason() string { return e.reason } // Cause function returns cause value. -func (e RemoveGroupMemberResponseValidationError) Cause() error { return e.cause } +func (e ChangeGroupMemberResponseValidationError) Cause() error { return e.cause } // Key function returns key value. -func (e RemoveGroupMemberResponseValidationError) Key() bool { return e.key } +func (e ChangeGroupMemberResponseValidationError) Key() bool { return e.key } // ErrorName returns error name. -func (e RemoveGroupMemberResponseValidationError) ErrorName() string { - return "RemoveGroupMemberResponseValidationError" +func (e ChangeGroupMemberResponseValidationError) ErrorName() string { + return "ChangeGroupMemberResponseValidationError" } // Error satisfies the builtin error interface -func (e RemoveGroupMemberResponseValidationError) Error() string { +func (e ChangeGroupMemberResponseValidationError) Error() string { cause := "" if e.cause != nil { cause = fmt.Sprintf(" | caused by: %v", e.cause) @@ -2000,14 +1771,14 @@ func (e RemoveGroupMemberResponseValidationError) Error() string { } return fmt.Sprintf( - "invalid %sRemoveGroupMemberResponse.%s: %s%s", + "invalid %sChangeGroupMemberResponse.%s: %s%s", key, e.field, e.reason, cause) } -var _ error = RemoveGroupMemberResponseValidationError{} +var _ error = ChangeGroupMemberResponseValidationError{} var _ interface { Field() string @@ -2015,4 +1786,4 @@ var _ interface { Key() bool Cause() error ErrorName() string -} = RemoveGroupMemberResponseValidationError{} +} = ChangeGroupMemberResponseValidationError{} diff --git a/user/group/v1/group.proto b/user/group/v1/group.proto index 8f0083b..2b5d718 100644 --- a/user/group/v1/group.proto +++ b/user/group/v1/group.proto @@ -8,12 +8,11 @@ import "user/v1/user.proto"; option go_package = "github.com/go-goim/api/user/group/v1"; message Group { - int64 id = 1; - string gid = 2; + int64 gid = 2; string name = 3; string description = 4; string avatar = 5; - string owner_uid = 6; + int64 owner_uid = 6; optional GroupMember owner = 7; repeated GroupMember members = 8; int32 max_members = 9; @@ -28,9 +27,8 @@ enum GroupStatus { } message GroupMember { - int64 id = 1; // use as session id - string gid = 2; - string uid = 3; + int64 gid = 2; + int64 uid = 3; optional user.v1.User user = 4; enum Status { StatusActive = 0; @@ -49,8 +47,10 @@ message GroupMember { // GetGroup message GetGroupRequest { - string gid = 1; - bool with_members = 2; + int64 gid = 1; + int64 owner_uid = 2; + bool with_members = 3; + bool with_info = 4; } message GetGroupResponse { @@ -62,7 +62,7 @@ message GetGroupResponse { message ListGroupsRequest { // list all groups no matter user is member or owner. - string uid = 1; + int64 uid = 1; int32 page = 2; int32 page_size = 3; } @@ -78,8 +78,8 @@ message CreateGroupRequest { string name = 1; string description = 2; string avatar = 3; - string owner_uid = 4; - repeated string members_uid = 5; // todo: limit to small number + int64 owner_uid = 4; + repeated int64 members_uid = 5; } message CreateGroupResponse { @@ -90,11 +90,11 @@ message CreateGroupResponse { // UpdateGroup message UpdateGroupRequest { - string gid = 1; - string name = 2; - string description = 3; - string avatar = 4; - string uid = 5; // current user id + int64 gid = 1; + optional string name = 2; + optional string description = 3; + optional string avatar = 4; + int64 owner_uid = 5; // current user id } message UpdateGroupResponse { @@ -105,32 +105,20 @@ message UpdateGroupResponse { // DeleteGroup message DeleteGroupRequest { - string gid = 1; - string uid = 2; + int64 gid = 1; + int64 owner_uid = 2; } -// AddGroupMember - -message AddGroupMemberRequest { - string gid = 1; - repeated string uid = 2; -} - -message AddGroupMemberResponse { - transport.response.BaseResponse response = 1; - int32 added = 2; -} - -// RemoveGroupMember - -message RemoveGroupMemberRequest { - string gid = 1; - repeated string uid = 2; +// ChangeGroupMemberRequest add or remove group member +message ChangeGroupMemberRequest { + int64 gid = 1; + int64 owner_uid = 2; + repeated int64 uids = 3; } -message RemoveGroupMemberResponse { +message ChangeGroupMemberResponse { transport.response.BaseResponse response = 1; - int32 removed = 2; + int32 count = 2; // count of members changed } service GroupService { @@ -139,6 +127,6 @@ service GroupService { rpc CreateGroup(CreateGroupRequest) returns (CreateGroupResponse); rpc UpdateGroup(UpdateGroupRequest) returns (UpdateGroupResponse); rpc DeleteGroup(DeleteGroupRequest) returns (transport.response.BaseResponse); - rpc AddGroupMember(AddGroupMemberRequest) returns (AddGroupMemberResponse); - rpc RemoveGroupMember(RemoveGroupMemberRequest) returns (RemoveGroupMemberResponse); + rpc AddGroupMember(ChangeGroupMemberRequest) returns (ChangeGroupMemberResponse); + rpc RemoveGroupMember(ChangeGroupMemberRequest) returns (ChangeGroupMemberResponse); } diff --git a/user/group/v1/group_grpc.pb.go b/user/group/v1/group_grpc.pb.go index 1ec16cd..8643671 100644 --- a/user/group/v1/group_grpc.pb.go +++ b/user/group/v1/group_grpc.pb.go @@ -24,8 +24,8 @@ type GroupServiceClient interface { CreateGroup(ctx context.Context, in *CreateGroupRequest, opts ...grpc.CallOption) (*CreateGroupResponse, error) UpdateGroup(ctx context.Context, in *UpdateGroupRequest, opts ...grpc.CallOption) (*UpdateGroupResponse, error) DeleteGroup(ctx context.Context, in *DeleteGroupRequest, opts ...grpc.CallOption) (*response.BaseResponse, error) - AddGroupMember(ctx context.Context, in *AddGroupMemberRequest, opts ...grpc.CallOption) (*AddGroupMemberResponse, error) - RemoveGroupMember(ctx context.Context, in *RemoveGroupMemberRequest, opts ...grpc.CallOption) (*RemoveGroupMemberResponse, error) + AddGroupMember(ctx context.Context, in *ChangeGroupMemberRequest, opts ...grpc.CallOption) (*ChangeGroupMemberResponse, error) + RemoveGroupMember(ctx context.Context, in *ChangeGroupMemberRequest, opts ...grpc.CallOption) (*ChangeGroupMemberResponse, error) } type groupServiceClient struct { @@ -81,8 +81,8 @@ func (c *groupServiceClient) DeleteGroup(ctx context.Context, in *DeleteGroupReq return out, nil } -func (c *groupServiceClient) AddGroupMember(ctx context.Context, in *AddGroupMemberRequest, opts ...grpc.CallOption) (*AddGroupMemberResponse, error) { - out := new(AddGroupMemberResponse) +func (c *groupServiceClient) AddGroupMember(ctx context.Context, in *ChangeGroupMemberRequest, opts ...grpc.CallOption) (*ChangeGroupMemberResponse, error) { + out := new(ChangeGroupMemberResponse) err := c.cc.Invoke(ctx, "/api.user.group.v1.GroupService/AddGroupMember", in, out, opts...) if err != nil { return nil, err @@ -90,8 +90,8 @@ func (c *groupServiceClient) AddGroupMember(ctx context.Context, in *AddGroupMem return out, nil } -func (c *groupServiceClient) RemoveGroupMember(ctx context.Context, in *RemoveGroupMemberRequest, opts ...grpc.CallOption) (*RemoveGroupMemberResponse, error) { - out := new(RemoveGroupMemberResponse) +func (c *groupServiceClient) RemoveGroupMember(ctx context.Context, in *ChangeGroupMemberRequest, opts ...grpc.CallOption) (*ChangeGroupMemberResponse, error) { + out := new(ChangeGroupMemberResponse) err := c.cc.Invoke(ctx, "/api.user.group.v1.GroupService/RemoveGroupMember", in, out, opts...) if err != nil { return nil, err @@ -108,8 +108,8 @@ type GroupServiceServer interface { CreateGroup(context.Context, *CreateGroupRequest) (*CreateGroupResponse, error) UpdateGroup(context.Context, *UpdateGroupRequest) (*UpdateGroupResponse, error) DeleteGroup(context.Context, *DeleteGroupRequest) (*response.BaseResponse, error) - AddGroupMember(context.Context, *AddGroupMemberRequest) (*AddGroupMemberResponse, error) - RemoveGroupMember(context.Context, *RemoveGroupMemberRequest) (*RemoveGroupMemberResponse, error) + AddGroupMember(context.Context, *ChangeGroupMemberRequest) (*ChangeGroupMemberResponse, error) + RemoveGroupMember(context.Context, *ChangeGroupMemberRequest) (*ChangeGroupMemberResponse, error) mustEmbedUnimplementedGroupServiceServer() } @@ -132,10 +132,10 @@ func (UnimplementedGroupServiceServer) UpdateGroup(context.Context, *UpdateGroup func (UnimplementedGroupServiceServer) DeleteGroup(context.Context, *DeleteGroupRequest) (*response.BaseResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method DeleteGroup not implemented") } -func (UnimplementedGroupServiceServer) AddGroupMember(context.Context, *AddGroupMemberRequest) (*AddGroupMemberResponse, error) { +func (UnimplementedGroupServiceServer) AddGroupMember(context.Context, *ChangeGroupMemberRequest) (*ChangeGroupMemberResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method AddGroupMember not implemented") } -func (UnimplementedGroupServiceServer) RemoveGroupMember(context.Context, *RemoveGroupMemberRequest) (*RemoveGroupMemberResponse, error) { +func (UnimplementedGroupServiceServer) RemoveGroupMember(context.Context, *ChangeGroupMemberRequest) (*ChangeGroupMemberResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method RemoveGroupMember not implemented") } func (UnimplementedGroupServiceServer) mustEmbedUnimplementedGroupServiceServer() {} @@ -242,7 +242,7 @@ func _GroupService_DeleteGroup_Handler(srv interface{}, ctx context.Context, dec } func _GroupService_AddGroupMember_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(AddGroupMemberRequest) + in := new(ChangeGroupMemberRequest) if err := dec(in); err != nil { return nil, err } @@ -254,13 +254,13 @@ func _GroupService_AddGroupMember_Handler(srv interface{}, ctx context.Context, FullMethod: "/api.user.group.v1.GroupService/AddGroupMember", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(GroupServiceServer).AddGroupMember(ctx, req.(*AddGroupMemberRequest)) + return srv.(GroupServiceServer).AddGroupMember(ctx, req.(*ChangeGroupMemberRequest)) } return interceptor(ctx, in, info, handler) } func _GroupService_RemoveGroupMember_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(RemoveGroupMemberRequest) + in := new(ChangeGroupMemberRequest) if err := dec(in); err != nil { return nil, err } @@ -272,7 +272,7 @@ func _GroupService_RemoveGroupMember_Handler(srv interface{}, ctx context.Contex FullMethod: "/api.user.group.v1.GroupService/RemoveGroupMember", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(GroupServiceServer).RemoveGroupMember(ctx, req.(*RemoveGroupMemberRequest)) + return srv.(GroupServiceServer).RemoveGroupMember(ctx, req.(*ChangeGroupMemberRequest)) } return interceptor(ctx, in, info, handler) } diff --git a/user/session/v1/session.pb.go b/user/session/v1/session.pb.go deleted file mode 100644 index ef1564a..0000000 --- a/user/session/v1/session.pb.go +++ /dev/null @@ -1,137 +0,0 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.26.0 -// protoc (unknown) -// source: user/session/v1/session.proto - -package v1 - -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) -) - -// define session type and status -type SessionType int32 - -const ( - SessionType_SingleChat SessionType = 0 - SessionType_GroupChat SessionType = 1 - // broadcast actually not a standard chat type, but we still use it here - SessionType_Broadcast SessionType = 2 -) - -// Enum value maps for SessionType. -var ( - SessionType_name = map[int32]string{ - 0: "SingleChat", - 1: "GroupChat", - 2: "Broadcast", - } - SessionType_value = map[string]int32{ - "SingleChat": 0, - "GroupChat": 1, - "Broadcast": 2, - } -) - -func (x SessionType) Enum() *SessionType { - p := new(SessionType) - *p = x - return p -} - -func (x SessionType) String() string { - return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) -} - -func (SessionType) Descriptor() protoreflect.EnumDescriptor { - return file_user_session_v1_session_proto_enumTypes[0].Descriptor() -} - -func (SessionType) Type() protoreflect.EnumType { - return &file_user_session_v1_session_proto_enumTypes[0] -} - -func (x SessionType) Number() protoreflect.EnumNumber { - return protoreflect.EnumNumber(x) -} - -// Deprecated: Use SessionType.Descriptor instead. -func (SessionType) EnumDescriptor() ([]byte, []int) { - return file_user_session_v1_session_proto_rawDescGZIP(), []int{0} -} - -var File_user_session_v1_session_proto protoreflect.FileDescriptor - -var file_user_session_v1_session_proto_rawDesc = []byte{ - 0x0a, 0x1d, 0x75, 0x73, 0x65, 0x72, 0x2f, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x2f, 0x76, - 0x31, 0x2f, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, - 0x13, 0x61, 0x70, 0x69, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, - 0x6e, 0x2e, 0x76, 0x31, 0x2a, 0x3b, 0x0a, 0x0b, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x54, - 0x79, 0x70, 0x65, 0x12, 0x0e, 0x0a, 0x0a, 0x53, 0x69, 0x6e, 0x67, 0x6c, 0x65, 0x43, 0x68, 0x61, - 0x74, 0x10, 0x00, 0x12, 0x0d, 0x0a, 0x09, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x43, 0x68, 0x61, 0x74, - 0x10, 0x01, 0x12, 0x0d, 0x0a, 0x09, 0x42, 0x72, 0x6f, 0x61, 0x64, 0x63, 0x61, 0x73, 0x74, 0x10, - 0x02, 0x42, 0x28, 0x5a, 0x26, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, - 0x67, 0x6f, 0x2d, 0x67, 0x6f, 0x69, 0x6d, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x75, 0x73, 0x65, 0x72, - 0x2f, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x2f, 0x76, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x33, -} - -var ( - file_user_session_v1_session_proto_rawDescOnce sync.Once - file_user_session_v1_session_proto_rawDescData = file_user_session_v1_session_proto_rawDesc -) - -func file_user_session_v1_session_proto_rawDescGZIP() []byte { - file_user_session_v1_session_proto_rawDescOnce.Do(func() { - file_user_session_v1_session_proto_rawDescData = protoimpl.X.CompressGZIP(file_user_session_v1_session_proto_rawDescData) - }) - return file_user_session_v1_session_proto_rawDescData -} - -var file_user_session_v1_session_proto_enumTypes = make([]protoimpl.EnumInfo, 1) -var file_user_session_v1_session_proto_goTypes = []interface{}{ - (SessionType)(0), // 0: api.user.session.v1.SessionType -} -var file_user_session_v1_session_proto_depIdxs = []int32{ - 0, // [0:0] is the sub-list for method output_type - 0, // [0:0] 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_user_session_v1_session_proto_init() } -func file_user_session_v1_session_proto_init() { - if File_user_session_v1_session_proto != nil { - return - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_user_session_v1_session_proto_rawDesc, - NumEnums: 1, - NumMessages: 0, - NumExtensions: 0, - NumServices: 0, - }, - GoTypes: file_user_session_v1_session_proto_goTypes, - DependencyIndexes: file_user_session_v1_session_proto_depIdxs, - EnumInfos: file_user_session_v1_session_proto_enumTypes, - }.Build() - File_user_session_v1_session_proto = out.File - file_user_session_v1_session_proto_rawDesc = nil - file_user_session_v1_session_proto_goTypes = nil - file_user_session_v1_session_proto_depIdxs = nil -} diff --git a/user/session/v1/session.pb.validate.go b/user/session/v1/session.pb.validate.go deleted file mode 100644 index 48b4d90..0000000 --- a/user/session/v1/session.pb.validate.go +++ /dev/null @@ -1,36 +0,0 @@ -// Code generated by protoc-gen-validate. DO NOT EDIT. -// source: user/session/v1/session.proto - -package v1 - -import ( - "bytes" - "errors" - "fmt" - "net" - "net/mail" - "net/url" - "regexp" - "sort" - "strings" - "time" - "unicode/utf8" - - "google.golang.org/protobuf/types/known/anypb" -) - -// ensure the imports are used -var ( - _ = bytes.MinRead - _ = errors.New("") - _ = fmt.Print - _ = utf8.UTFMax - _ = (*regexp.Regexp)(nil) - _ = (*strings.Reader)(nil) - _ = net.IPv4len - _ = time.Duration(0) - _ = (*url.URL)(nil) - _ = (*mail.Address)(nil) - _ = anypb.Any{} - _ = sort.Sort -) diff --git a/user/session/v1/session.proto b/user/session/v1/session.proto deleted file mode 100644 index 7edf6a0..0000000 --- a/user/session/v1/session.proto +++ /dev/null @@ -1,15 +0,0 @@ -syntax = "proto3"; - -package api.user.session.v1; - -option go_package = "github.com/go-goim/api/user/session/v1"; - -// define session type and status -enum SessionType { - SingleChat = 0; - GroupChat = 1; - // broadcast actually not a standard chat type, but we still use it here - Broadcast = 2; -} -// more session message type - diff --git a/user/v1/user.ext.go b/user/v1/user.ext.go deleted file mode 100644 index effff19..0000000 --- a/user/v1/user.ext.go +++ /dev/null @@ -1,15 +0,0 @@ -// Code Written Manually - -package v1 - -func (x *UserInternal) ToUser() *User { - return &User{ - Uid: x.GetUid(), - Name: x.GetName(), - Email: x.Email, - Phone: x.Phone, - Avatar: x.GetAvatar(), - ConnectUrl: x.PushServerIp, - LoginStatus: x.GetLoginStatus(), - } -} diff --git a/user/v1/user.pb.go b/user/v1/user.pb.go index 8f6d03b..a4dcb7f 100644 --- a/user/v1/user.pb.go +++ b/user/v1/user.pb.go @@ -117,17 +117,17 @@ func (LoginType) EnumDescriptor() ([]byte, []int) { return file_user_v1_user_proto_rawDescGZIP(), []int{1} } -type UserInternalResponse struct { +type UserResponse struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields Response *response.BaseResponse `protobuf:"bytes,1,opt,name=response,proto3" json:"response,omitempty"` - User *UserInternal `protobuf:"bytes,2,opt,name=user,proto3" json:"user,omitempty"` + User *User `protobuf:"bytes,2,opt,name=user,proto3" json:"user,omitempty"` } -func (x *UserInternalResponse) Reset() { - *x = UserInternalResponse{} +func (x *UserResponse) Reset() { + *x = UserResponse{} if protoimpl.UnsafeEnabled { mi := &file_user_v1_user_proto_msgTypes[0] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -135,13 +135,13 @@ func (x *UserInternalResponse) Reset() { } } -func (x *UserInternalResponse) String() string { +func (x *UserResponse) String() string { return protoimpl.X.MessageStringOf(x) } -func (*UserInternalResponse) ProtoMessage() {} +func (*UserResponse) ProtoMessage() {} -func (x *UserInternalResponse) ProtoReflect() protoreflect.Message { +func (x *UserResponse) ProtoReflect() protoreflect.Message { mi := &file_user_v1_user_proto_msgTypes[0] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -153,32 +153,31 @@ func (x *UserInternalResponse) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use UserInternalResponse.ProtoReflect.Descriptor instead. -func (*UserInternalResponse) Descriptor() ([]byte, []int) { +// Deprecated: Use UserResponse.ProtoReflect.Descriptor instead. +func (*UserResponse) Descriptor() ([]byte, []int) { return file_user_v1_user_proto_rawDescGZIP(), []int{0} } -func (x *UserInternalResponse) GetResponse() *response.BaseResponse { +func (x *UserResponse) GetResponse() *response.BaseResponse { if x != nil { return x.Response } return nil } -func (x *UserInternalResponse) GetUser() *UserInternal { +func (x *UserResponse) GetUser() *User { if x != nil { return x.User } return nil } -// UserInternal is the internal representation of a user. -type UserInternal struct { +type User struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Uid string `protobuf:"bytes,1,opt,name=uid,proto3" json:"uid,omitempty"` + Uid int64 `protobuf:"varint,1,opt,name=uid,proto3" json:"uid,omitempty"` Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` Email *string `protobuf:"bytes,3,opt,name=email,proto3,oneof" json:"email,omitempty"` Phone *string `protobuf:"bytes,4,opt,name=phone,proto3,oneof" json:"phone,omitempty"` @@ -193,8 +192,8 @@ type UserInternal struct { UpdatedAt int64 `protobuf:"varint,10,opt,name=updated_at,json=updatedAt,proto3" json:"updated_at,omitempty"` } -func (x *UserInternal) Reset() { - *x = UserInternal{} +func (x *User) Reset() { + *x = User{} if protoimpl.UnsafeEnabled { mi := &file_user_v1_user_proto_msgTypes[1] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -202,13 +201,13 @@ func (x *UserInternal) Reset() { } } -func (x *UserInternal) String() string { +func (x *User) String() string { return protoimpl.X.MessageStringOf(x) } -func (*UserInternal) ProtoMessage() {} +func (*User) ProtoMessage() {} -func (x *UserInternal) ProtoReflect() protoreflect.Message { +func (x *User) ProtoReflect() protoreflect.Message { mi := &file_user_v1_user_proto_msgTypes[1] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -220,180 +219,81 @@ func (x *UserInternal) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use UserInternal.ProtoReflect.Descriptor instead. -func (*UserInternal) Descriptor() ([]byte, []int) { +// Deprecated: Use User.ProtoReflect.Descriptor instead. +func (*User) Descriptor() ([]byte, []int) { return file_user_v1_user_proto_rawDescGZIP(), []int{1} } -func (x *UserInternal) GetUid() string { +func (x *User) GetUid() int64 { if x != nil { return x.Uid } - return "" + return 0 } -func (x *UserInternal) GetName() string { +func (x *User) GetName() string { if x != nil { return x.Name } return "" } -func (x *UserInternal) GetEmail() string { +func (x *User) GetEmail() string { if x != nil && x.Email != nil { return *x.Email } return "" } -func (x *UserInternal) GetPhone() string { +func (x *User) GetPhone() string { if x != nil && x.Phone != nil { return *x.Phone } return "" } -func (x *UserInternal) GetAvatar() string { +func (x *User) GetAvatar() string { if x != nil { return x.Avatar } return "" } -func (x *UserInternal) GetPushServerIp() string { +func (x *User) GetPushServerIp() string { if x != nil && x.PushServerIp != nil { return *x.PushServerIp } return "" } -func (x *UserInternal) GetPassword() string { +func (x *User) GetPassword() string { if x != nil { return x.Password } return "" } -func (x *UserInternal) GetLoginStatus() LoginStatus { +func (x *User) GetLoginStatus() LoginStatus { if x != nil { return x.LoginStatus } return LoginStatus_LOGIN } -func (x *UserInternal) GetCreatedAt() int64 { +func (x *User) GetCreatedAt() int64 { if x != nil { return x.CreatedAt } return 0 } -func (x *UserInternal) GetUpdatedAt() int64 { +func (x *User) GetUpdatedAt() int64 { if x != nil { return x.UpdatedAt } return 0 } -// User use for return user info to client. -type User struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Uid string `protobuf:"bytes,1,opt,name=uid,proto3" json:"uid,omitempty"` - Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` - Email *string `protobuf:"bytes,3,opt,name=email,proto3,oneof" json:"email,omitempty"` - Phone *string `protobuf:"bytes,4,opt,name=phone,proto3,oneof" json:"phone,omitempty"` - Avatar string `protobuf:"bytes,5,opt,name=avatar,proto3" json:"avatar,omitempty"` - // ws_url is url of user need connect via ws or tcp - ConnectUrl *string `protobuf:"bytes,6,opt,name=connect_url,json=connectUrl,proto3,oneof" json:"connect_url,omitempty"` - // 0: first time login, need connect to push server - // 1: already login, no need connect to push server - LoginStatus LoginStatus `protobuf:"varint,8,opt,name=login_status,json=loginStatus,proto3,enum=api.user.v1.LoginStatus" json:"login_status,omitempty"` -} - -func (x *User) Reset() { - *x = User{} - if protoimpl.UnsafeEnabled { - mi := &file_user_v1_user_proto_msgTypes[2] - 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_user_v1_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 User.ProtoReflect.Descriptor instead. -func (*User) Descriptor() ([]byte, []int) { - return file_user_v1_user_proto_rawDescGZIP(), []int{2} -} - -func (x *User) GetUid() string { - if x != nil { - return x.Uid - } - return "" -} - -func (x *User) GetName() string { - if x != nil { - return x.Name - } - return "" -} - -func (x *User) GetEmail() string { - if x != nil && x.Email != nil { - return *x.Email - } - return "" -} - -func (x *User) GetPhone() string { - if x != nil && x.Phone != nil { - return *x.Phone - } - return "" -} - -func (x *User) GetAvatar() string { - if x != nil { - return x.Avatar - } - return "" -} - -func (x *User) GetConnectUrl() string { - if x != nil && x.ConnectUrl != nil { - return *x.ConnectUrl - } - return "" -} - -func (x *User) GetLoginStatus() LoginStatus { - if x != nil { - return x.LoginStatus - } - return LoginStatus_LOGIN -} - type UserList struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -405,7 +305,7 @@ type UserList struct { func (x *UserList) Reset() { *x = UserList{} if protoimpl.UnsafeEnabled { - mi := &file_user_v1_user_proto_msgTypes[3] + mi := &file_user_v1_user_proto_msgTypes[2] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -418,7 +318,7 @@ func (x *UserList) String() string { func (*UserList) ProtoMessage() {} func (x *UserList) ProtoReflect() protoreflect.Message { - mi := &file_user_v1_user_proto_msgTypes[3] + mi := &file_user_v1_user_proto_msgTypes[2] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -431,7 +331,7 @@ func (x *UserList) ProtoReflect() protoreflect.Message { // Deprecated: Use UserList.ProtoReflect.Descriptor instead. func (*UserList) Descriptor() ([]byte, []int) { - return file_user_v1_user_proto_rawDescGZIP(), []int{3} + return file_user_v1_user_proto_rawDescGZIP(), []int{2} } func (x *UserList) GetUsers() []*User { @@ -446,13 +346,13 @@ type GetUserInfoRequest struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Uid string `protobuf:"bytes,1,opt,name=uid,proto3" json:"uid,omitempty"` + Uid int64 `protobuf:"varint,1,opt,name=uid,proto3" json:"uid,omitempty"` } func (x *GetUserInfoRequest) Reset() { *x = GetUserInfoRequest{} if protoimpl.UnsafeEnabled { - mi := &file_user_v1_user_proto_msgTypes[4] + mi := &file_user_v1_user_proto_msgTypes[3] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -465,7 +365,7 @@ func (x *GetUserInfoRequest) String() string { func (*GetUserInfoRequest) ProtoMessage() {} func (x *GetUserInfoRequest) ProtoReflect() protoreflect.Message { - mi := &file_user_v1_user_proto_msgTypes[4] + mi := &file_user_v1_user_proto_msgTypes[3] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -478,14 +378,14 @@ func (x *GetUserInfoRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use GetUserInfoRequest.ProtoReflect.Descriptor instead. func (*GetUserInfoRequest) Descriptor() ([]byte, []int) { - return file_user_v1_user_proto_rawDescGZIP(), []int{4} + return file_user_v1_user_proto_rawDescGZIP(), []int{3} } -func (x *GetUserInfoRequest) GetUid() string { +func (x *GetUserInfoRequest) GetUid() int64 { if x != nil { return x.Uid } - return "" + return 0 } type QueryUserRequest struct { @@ -493,16 +393,16 @@ type QueryUserRequest struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // Types that are assignable to User: + // Types that are assignable to Field: // *QueryUserRequest_Email // *QueryUserRequest_Phone - User isQueryUserRequest_User `protobuf_oneof:"user"` + Field isQueryUserRequest_Field `protobuf_oneof:"field"` } func (x *QueryUserRequest) Reset() { *x = QueryUserRequest{} if protoimpl.UnsafeEnabled { - mi := &file_user_v1_user_proto_msgTypes[5] + mi := &file_user_v1_user_proto_msgTypes[4] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -515,7 +415,7 @@ func (x *QueryUserRequest) String() string { func (*QueryUserRequest) ProtoMessage() {} func (x *QueryUserRequest) ProtoReflect() protoreflect.Message { - mi := &file_user_v1_user_proto_msgTypes[5] + mi := &file_user_v1_user_proto_msgTypes[4] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -528,32 +428,32 @@ func (x *QueryUserRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use QueryUserRequest.ProtoReflect.Descriptor instead. func (*QueryUserRequest) Descriptor() ([]byte, []int) { - return file_user_v1_user_proto_rawDescGZIP(), []int{5} + return file_user_v1_user_proto_rawDescGZIP(), []int{4} } -func (m *QueryUserRequest) GetUser() isQueryUserRequest_User { +func (m *QueryUserRequest) GetField() isQueryUserRequest_Field { if m != nil { - return m.User + return m.Field } return nil } func (x *QueryUserRequest) GetEmail() string { - if x, ok := x.GetUser().(*QueryUserRequest_Email); ok { + if x, ok := x.GetField().(*QueryUserRequest_Email); ok { return x.Email } return "" } func (x *QueryUserRequest) GetPhone() string { - if x, ok := x.GetUser().(*QueryUserRequest_Phone); ok { + if x, ok := x.GetField().(*QueryUserRequest_Phone); ok { return x.Phone } return "" } -type isQueryUserRequest_User interface { - isQueryUserRequest_User() +type isQueryUserRequest_Field interface { + isQueryUserRequest_Field() } type QueryUserRequest_Email struct { @@ -564,9 +464,9 @@ type QueryUserRequest_Phone struct { Phone string `protobuf:"bytes,2,opt,name=phone,proto3,oneof"` } -func (*QueryUserRequest_Email) isQueryUserRequest_User() {} +func (*QueryUserRequest_Email) isQueryUserRequest_Field() {} -func (*QueryUserRequest_Phone) isQueryUserRequest_User() {} +func (*QueryUserRequest_Phone) isQueryUserRequest_Field() {} type CreateUserRequest struct { state protoimpl.MessageState @@ -574,17 +474,17 @@ type CreateUserRequest struct { unknownFields protoimpl.UnknownFields Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` - // Types that are assignable to User: + // Types that are assignable to Field: // *CreateUserRequest_Email // *CreateUserRequest_Phone - User isCreateUserRequest_User `protobuf_oneof:"user"` - Password string `protobuf:"bytes,4,opt,name=password,proto3" json:"password,omitempty"` + Field isCreateUserRequest_Field `protobuf_oneof:"field"` + Password string `protobuf:"bytes,4,opt,name=password,proto3" json:"password,omitempty"` } func (x *CreateUserRequest) Reset() { *x = CreateUserRequest{} if protoimpl.UnsafeEnabled { - mi := &file_user_v1_user_proto_msgTypes[6] + mi := &file_user_v1_user_proto_msgTypes[5] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -597,7 +497,7 @@ func (x *CreateUserRequest) String() string { func (*CreateUserRequest) ProtoMessage() {} func (x *CreateUserRequest) ProtoReflect() protoreflect.Message { - mi := &file_user_v1_user_proto_msgTypes[6] + mi := &file_user_v1_user_proto_msgTypes[5] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -610,7 +510,7 @@ func (x *CreateUserRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use CreateUserRequest.ProtoReflect.Descriptor instead. func (*CreateUserRequest) Descriptor() ([]byte, []int) { - return file_user_v1_user_proto_rawDescGZIP(), []int{6} + return file_user_v1_user_proto_rawDescGZIP(), []int{5} } func (x *CreateUserRequest) GetName() string { @@ -620,22 +520,22 @@ func (x *CreateUserRequest) GetName() string { return "" } -func (m *CreateUserRequest) GetUser() isCreateUserRequest_User { +func (m *CreateUserRequest) GetField() isCreateUserRequest_Field { if m != nil { - return m.User + return m.Field } return nil } func (x *CreateUserRequest) GetEmail() string { - if x, ok := x.GetUser().(*CreateUserRequest_Email); ok { + if x, ok := x.GetField().(*CreateUserRequest_Email); ok { return x.Email } return "" } func (x *CreateUserRequest) GetPhone() string { - if x, ok := x.GetUser().(*CreateUserRequest_Phone); ok { + if x, ok := x.GetField().(*CreateUserRequest_Phone); ok { return x.Phone } return "" @@ -648,8 +548,8 @@ func (x *CreateUserRequest) GetPassword() string { return "" } -type isCreateUserRequest_User interface { - isCreateUserRequest_User() +type isCreateUserRequest_Field interface { + isCreateUserRequest_Field() } type CreateUserRequest_Email struct { @@ -660,26 +560,27 @@ type CreateUserRequest_Phone struct { Phone string `protobuf:"bytes,3,opt,name=phone,proto3,oneof"` } -func (*CreateUserRequest_Email) isCreateUserRequest_User() {} +func (*CreateUserRequest_Email) isCreateUserRequest_Field() {} -func (*CreateUserRequest_Phone) isCreateUserRequest_User() {} +func (*CreateUserRequest_Phone) isCreateUserRequest_Field() {} type UpdateUserRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Uid string `protobuf:"bytes,1,opt,name=uid,proto3" json:"uid,omitempty"` - Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` - Email string `protobuf:"bytes,3,opt,name=email,proto3" json:"email,omitempty"` - Phone string `protobuf:"bytes,4,opt,name=phone,proto3" json:"phone,omitempty"` - Avatar string `protobuf:"bytes,5,opt,name=avatar,proto3" json:"avatar,omitempty"` + Uid int64 `protobuf:"varint,1,opt,name=uid,proto3" json:"uid,omitempty"` + Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` + Email string `protobuf:"bytes,3,opt,name=email,proto3" json:"email,omitempty"` + Phone string `protobuf:"bytes,4,opt,name=phone,proto3" json:"phone,omitempty"` + Avatar string `protobuf:"bytes,5,opt,name=avatar,proto3" json:"avatar,omitempty"` + Password string `protobuf:"bytes,6,opt,name=password,proto3" json:"password,omitempty"` } func (x *UpdateUserRequest) Reset() { *x = UpdateUserRequest{} if protoimpl.UnsafeEnabled { - mi := &file_user_v1_user_proto_msgTypes[7] + mi := &file_user_v1_user_proto_msgTypes[6] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -692,7 +593,7 @@ func (x *UpdateUserRequest) String() string { func (*UpdateUserRequest) ProtoMessage() {} func (x *UpdateUserRequest) ProtoReflect() protoreflect.Message { - mi := &file_user_v1_user_proto_msgTypes[7] + mi := &file_user_v1_user_proto_msgTypes[6] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -705,14 +606,14 @@ func (x *UpdateUserRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use UpdateUserRequest.ProtoReflect.Descriptor instead. func (*UpdateUserRequest) Descriptor() ([]byte, []int) { - return file_user_v1_user_proto_rawDescGZIP(), []int{7} + return file_user_v1_user_proto_rawDescGZIP(), []int{6} } -func (x *UpdateUserRequest) GetUid() string { +func (x *UpdateUserRequest) GetUid() int64 { if x != nil { return x.Uid } - return "" + return 0 } func (x *UpdateUserRequest) GetName() string { @@ -743,16 +644,23 @@ func (x *UpdateUserRequest) GetAvatar() string { return "" } +func (x *UpdateUserRequest) GetPassword() string { + if x != nil { + return x.Password + } + return "" +} + type UserLoginRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // Types that are assignable to User: + // Types that are assignable to Field: // *UserLoginRequest_Email // *UserLoginRequest_Phone - User isUserLoginRequest_User `protobuf_oneof:"user"` - Password string `protobuf:"bytes,3,opt,name=password,proto3" json:"password,omitempty"` + Field isUserLoginRequest_Field `protobuf_oneof:"field"` + Password string `protobuf:"bytes,3,opt,name=password,proto3" json:"password,omitempty"` // 0: try login , do nothing if already login // 1: force login , logout if already login LoginType LoginType `protobuf:"varint,4,opt,name=login_type,json=loginType,proto3,enum=api.user.v1.LoginType" json:"login_type,omitempty"` @@ -761,7 +669,7 @@ type UserLoginRequest struct { func (x *UserLoginRequest) Reset() { *x = UserLoginRequest{} if protoimpl.UnsafeEnabled { - mi := &file_user_v1_user_proto_msgTypes[8] + mi := &file_user_v1_user_proto_msgTypes[7] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -774,7 +682,7 @@ func (x *UserLoginRequest) String() string { func (*UserLoginRequest) ProtoMessage() {} func (x *UserLoginRequest) ProtoReflect() protoreflect.Message { - mi := &file_user_v1_user_proto_msgTypes[8] + mi := &file_user_v1_user_proto_msgTypes[7] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -787,25 +695,25 @@ func (x *UserLoginRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use UserLoginRequest.ProtoReflect.Descriptor instead. func (*UserLoginRequest) Descriptor() ([]byte, []int) { - return file_user_v1_user_proto_rawDescGZIP(), []int{8} + return file_user_v1_user_proto_rawDescGZIP(), []int{7} } -func (m *UserLoginRequest) GetUser() isUserLoginRequest_User { +func (m *UserLoginRequest) GetField() isUserLoginRequest_Field { if m != nil { - return m.User + return m.Field } return nil } func (x *UserLoginRequest) GetEmail() string { - if x, ok := x.GetUser().(*UserLoginRequest_Email); ok { + if x, ok := x.GetField().(*UserLoginRequest_Email); ok { return x.Email } return "" } func (x *UserLoginRequest) GetPhone() string { - if x, ok := x.GetUser().(*UserLoginRequest_Phone); ok { + if x, ok := x.GetField().(*UserLoginRequest_Phone); ok { return x.Phone } return "" @@ -825,8 +733,8 @@ func (x *UserLoginRequest) GetLoginType() LoginType { return LoginType_LOGIN_TYPE_TRY } -type isUserLoginRequest_User interface { - isUserLoginRequest_User() +type isUserLoginRequest_Field interface { + isUserLoginRequest_Field() } type UserLoginRequest_Email struct { @@ -837,9 +745,9 @@ type UserLoginRequest_Phone struct { Phone string `protobuf:"bytes,2,opt,name=phone,proto3,oneof"` } -func (*UserLoginRequest_Email) isUserLoginRequest_User() {} +func (*UserLoginRequest_Email) isUserLoginRequest_Field() {} -func (*UserLoginRequest_Phone) isUserLoginRequest_User() {} +func (*UserLoginRequest_Phone) isUserLoginRequest_Field() {} var File_user_v1_user_proto protoreflect.FileDescriptor @@ -849,136 +757,118 @@ var file_user_v1_user_proto_rawDesc = []byte{ 0x31, 0x1a, 0x21, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x2f, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2f, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x17, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2f, 0x76, - 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x87, 0x01, - 0x0a, 0x14, 0x55, 0x73, 0x65, 0x72, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x40, 0x0a, 0x08, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x74, - 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x2e, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x2e, 0x42, 0x61, 0x73, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x52, 0x08, - 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x2d, 0x0a, 0x04, 0x75, 0x73, 0x65, 0x72, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x75, 0x73, 0x65, - 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, - 0x6c, 0x52, 0x04, 0x75, 0x73, 0x65, 0x72, 0x22, 0xeb, 0x02, 0x0a, 0x0c, 0x55, 0x73, 0x65, 0x72, - 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x69, 0x64, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x69, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, - 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x19, - 0x0a, 0x05, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, - 0x05, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x88, 0x01, 0x01, 0x12, 0x19, 0x0a, 0x05, 0x70, 0x68, 0x6f, - 0x6e, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x48, 0x01, 0x52, 0x05, 0x70, 0x68, 0x6f, 0x6e, - 0x65, 0x88, 0x01, 0x01, 0x12, 0x16, 0x0a, 0x06, 0x61, 0x76, 0x61, 0x74, 0x61, 0x72, 0x18, 0x05, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x61, 0x76, 0x61, 0x74, 0x61, 0x72, 0x12, 0x29, 0x0a, 0x0e, - 0x70, 0x75, 0x73, 0x68, 0x5f, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x5f, 0x69, 0x70, 0x18, 0x06, - 0x20, 0x01, 0x28, 0x09, 0x48, 0x02, 0x52, 0x0c, 0x70, 0x75, 0x73, 0x68, 0x53, 0x65, 0x72, 0x76, - 0x65, 0x72, 0x49, 0x70, 0x88, 0x01, 0x01, 0x12, 0x1a, 0x0a, 0x08, 0x70, 0x61, 0x73, 0x73, 0x77, - 0x6f, 0x72, 0x64, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x70, 0x61, 0x73, 0x73, 0x77, - 0x6f, 0x72, 0x64, 0x12, 0x3b, 0x0a, 0x0c, 0x6c, 0x6f, 0x67, 0x69, 0x6e, 0x5f, 0x73, 0x74, 0x61, - 0x74, 0x75, 0x73, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x18, 0x2e, 0x61, 0x70, 0x69, 0x2e, - 0x75, 0x73, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x6f, 0x67, 0x69, 0x6e, 0x53, 0x74, 0x61, - 0x74, 0x75, 0x73, 0x52, 0x0b, 0x6c, 0x6f, 0x67, 0x69, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, - 0x12, 0x1d, 0x0a, 0x0a, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x09, - 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x12, - 0x1d, 0x0a, 0x0a, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x0a, 0x20, - 0x01, 0x28, 0x03, 0x52, 0x09, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x42, 0x08, - 0x0a, 0x06, 0x5f, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x70, 0x68, 0x6f, - 0x6e, 0x65, 0x42, 0x11, 0x0a, 0x0f, 0x5f, 0x70, 0x75, 0x73, 0x68, 0x5f, 0x73, 0x65, 0x72, 0x76, - 0x65, 0x72, 0x5f, 0x69, 0x70, 0x22, 0x81, 0x02, 0x0a, 0x04, 0x55, 0x73, 0x65, 0x72, 0x12, 0x10, - 0x0a, 0x03, 0x75, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x69, 0x64, - 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, - 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x19, 0x0a, 0x05, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x18, 0x03, 0x20, - 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x05, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x88, 0x01, 0x01, 0x12, - 0x19, 0x0a, 0x05, 0x70, 0x68, 0x6f, 0x6e, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x48, 0x01, - 0x52, 0x05, 0x70, 0x68, 0x6f, 0x6e, 0x65, 0x88, 0x01, 0x01, 0x12, 0x16, 0x0a, 0x06, 0x61, 0x76, - 0x61, 0x74, 0x61, 0x72, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x61, 0x76, 0x61, 0x74, - 0x61, 0x72, 0x12, 0x24, 0x0a, 0x0b, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x5f, 0x75, 0x72, - 0x6c, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x48, 0x02, 0x52, 0x0a, 0x63, 0x6f, 0x6e, 0x6e, 0x65, - 0x63, 0x74, 0x55, 0x72, 0x6c, 0x88, 0x01, 0x01, 0x12, 0x3b, 0x0a, 0x0c, 0x6c, 0x6f, 0x67, 0x69, - 0x6e, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x18, - 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x6f, 0x67, - 0x69, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x0b, 0x6c, 0x6f, 0x67, 0x69, 0x6e, 0x53, - 0x74, 0x61, 0x74, 0x75, 0x73, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x42, - 0x08, 0x0a, 0x06, 0x5f, 0x70, 0x68, 0x6f, 0x6e, 0x65, 0x42, 0x0e, 0x0a, 0x0c, 0x5f, 0x63, 0x6f, - 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x5f, 0x75, 0x72, 0x6c, 0x22, 0x33, 0x0a, 0x08, 0x55, 0x73, 0x65, - 0x72, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x27, 0x0a, 0x05, 0x75, 0x73, 0x65, 0x72, 0x73, 0x18, 0x01, - 0x20, 0x03, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, - 0x76, 0x31, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x52, 0x05, 0x75, 0x73, 0x65, 0x72, 0x73, 0x22, 0x31, - 0x0a, 0x12, 0x47, 0x65, 0x74, 0x55, 0x73, 0x65, 0x72, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x12, 0x1b, 0x0a, 0x03, 0x75, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x09, 0x42, 0x09, 0xfa, 0x42, 0x06, 0x72, 0x04, 0x10, 0x14, 0x18, 0x18, 0x52, 0x03, 0x75, 0x69, - 0x64, 0x22, 0x6e, 0x0a, 0x10, 0x51, 0x75, 0x65, 0x72, 0x79, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1f, 0x0a, 0x05, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x60, 0x01, 0x48, 0x00, 0x52, - 0x05, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x12, 0x2c, 0x0a, 0x05, 0x70, 0x68, 0x6f, 0x6e, 0x65, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x14, 0xfa, 0x42, 0x11, 0x72, 0x0f, 0x32, 0x0d, 0x5e, 0x31, - 0x5b, 0x33, 0x2d, 0x39, 0x5d, 0x5c, 0x64, 0x7b, 0x39, 0x7d, 0x24, 0x48, 0x00, 0x52, 0x05, 0x70, - 0x68, 0x6f, 0x6e, 0x65, 0x42, 0x0b, 0x0a, 0x04, 0x75, 0x73, 0x65, 0x72, 0x12, 0x03, 0xf8, 0x42, - 0x01, 0x22, 0xb5, 0x01, 0x0a, 0x11, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x55, 0x73, 0x65, 0x72, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1d, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x09, 0xfa, 0x42, 0x06, 0x72, 0x04, 0x10, 0x02, 0x18, 0x14, - 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x1f, 0x0a, 0x05, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x60, 0x01, 0x48, 0x00, + 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x77, 0x0a, + 0x0c, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x40, 0x0a, + 0x08, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x24, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x2e, + 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x42, 0x61, 0x73, 0x65, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x52, 0x08, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, + 0x25, 0x0a, 0x04, 0x75, 0x73, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x11, 0x2e, + 0x61, 0x70, 0x69, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x73, 0x65, 0x72, + 0x52, 0x04, 0x75, 0x73, 0x65, 0x72, 0x22, 0xe3, 0x02, 0x0a, 0x04, 0x55, 0x73, 0x65, 0x72, 0x12, + 0x10, 0x0a, 0x03, 0x75, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x03, 0x75, 0x69, + 0x64, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x19, 0x0a, 0x05, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x18, 0x03, + 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x05, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x88, 0x01, 0x01, + 0x12, 0x19, 0x0a, 0x05, 0x70, 0x68, 0x6f, 0x6e, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x48, + 0x01, 0x52, 0x05, 0x70, 0x68, 0x6f, 0x6e, 0x65, 0x88, 0x01, 0x01, 0x12, 0x16, 0x0a, 0x06, 0x61, + 0x76, 0x61, 0x74, 0x61, 0x72, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x61, 0x76, 0x61, + 0x74, 0x61, 0x72, 0x12, 0x29, 0x0a, 0x0e, 0x70, 0x75, 0x73, 0x68, 0x5f, 0x73, 0x65, 0x72, 0x76, + 0x65, 0x72, 0x5f, 0x69, 0x70, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x48, 0x02, 0x52, 0x0c, 0x70, + 0x75, 0x73, 0x68, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x49, 0x70, 0x88, 0x01, 0x01, 0x12, 0x1a, + 0x0a, 0x08, 0x70, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x08, 0x70, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x12, 0x3b, 0x0a, 0x0c, 0x6c, 0x6f, + 0x67, 0x69, 0x6e, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0e, + 0x32, 0x18, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x4c, + 0x6f, 0x67, 0x69, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x0b, 0x6c, 0x6f, 0x67, 0x69, + 0x6e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x1d, 0x0a, 0x0a, 0x63, 0x72, 0x65, 0x61, 0x74, + 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x09, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x63, 0x72, 0x65, + 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x12, 0x1d, 0x0a, 0x0a, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, + 0x64, 0x5f, 0x61, 0x74, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x75, 0x70, 0x64, 0x61, + 0x74, 0x65, 0x64, 0x41, 0x74, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x42, + 0x08, 0x0a, 0x06, 0x5f, 0x70, 0x68, 0x6f, 0x6e, 0x65, 0x42, 0x11, 0x0a, 0x0f, 0x5f, 0x70, 0x75, + 0x73, 0x68, 0x5f, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x5f, 0x69, 0x70, 0x22, 0x33, 0x0a, 0x08, + 0x55, 0x73, 0x65, 0x72, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x27, 0x0a, 0x05, 0x75, 0x73, 0x65, 0x72, + 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x75, 0x73, + 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x52, 0x05, 0x75, 0x73, 0x65, 0x72, + 0x73, 0x22, 0x2f, 0x0a, 0x12, 0x47, 0x65, 0x74, 0x55, 0x73, 0x65, 0x72, 0x49, 0x6e, 0x66, 0x6f, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x19, 0x0a, 0x03, 0x75, 0x69, 0x64, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x03, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x22, 0x02, 0x20, 0x00, 0x52, 0x03, 0x75, + 0x69, 0x64, 0x22, 0x6f, 0x0a, 0x10, 0x51, 0x75, 0x65, 0x72, 0x79, 0x55, 0x73, 0x65, 0x72, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1f, 0x0a, 0x05, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x60, 0x01, 0x48, 0x00, 0x52, 0x05, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x12, 0x2c, 0x0a, 0x05, 0x70, 0x68, 0x6f, 0x6e, 0x65, - 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x42, 0x14, 0xfa, 0x42, 0x11, 0x72, 0x0f, 0x32, 0x0d, 0x5e, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x14, 0xfa, 0x42, 0x11, 0x72, 0x0f, 0x32, 0x0d, 0x5e, 0x31, 0x5b, 0x33, 0x2d, 0x39, 0x5d, 0x5c, 0x64, 0x7b, 0x39, 0x7d, 0x24, 0x48, 0x00, 0x52, 0x05, - 0x70, 0x68, 0x6f, 0x6e, 0x65, 0x12, 0x25, 0x0a, 0x08, 0x70, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, - 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x42, 0x09, 0xfa, 0x42, 0x06, 0x72, 0x04, 0x10, 0x06, - 0x18, 0x14, 0x52, 0x08, 0x70, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x42, 0x0b, 0x0a, 0x04, - 0x75, 0x73, 0x65, 0x72, 0x12, 0x03, 0xf8, 0x42, 0x01, 0x22, 0xc8, 0x01, 0x0a, 0x11, 0x55, 0x70, - 0x64, 0x61, 0x74, 0x65, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, - 0x1b, 0x0a, 0x03, 0x75, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x09, 0xfa, 0x42, - 0x06, 0x72, 0x04, 0x10, 0x14, 0x18, 0x18, 0x52, 0x03, 0x75, 0x69, 0x64, 0x12, 0x20, 0x0a, 0x04, - 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x0c, 0xfa, 0x42, 0x09, 0x72, - 0x07, 0x10, 0x02, 0x18, 0x14, 0xd0, 0x01, 0x01, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x20, - 0x0a, 0x05, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x42, 0x0a, 0xfa, - 0x42, 0x07, 0x72, 0x05, 0x60, 0x01, 0xd0, 0x01, 0x01, 0x52, 0x05, 0x65, 0x6d, 0x61, 0x69, 0x6c, - 0x12, 0x2d, 0x0a, 0x05, 0x70, 0x68, 0x6f, 0x6e, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x42, - 0x17, 0xfa, 0x42, 0x14, 0x72, 0x12, 0x32, 0x0d, 0x5e, 0x31, 0x5b, 0x33, 0x2d, 0x39, 0x5d, 0x5c, - 0x64, 0x7b, 0x39, 0x7d, 0x24, 0xd0, 0x01, 0x01, 0x52, 0x05, 0x70, 0x68, 0x6f, 0x6e, 0x65, 0x12, - 0x23, 0x0a, 0x06, 0x61, 0x76, 0x61, 0x74, 0x61, 0x72, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x42, - 0x0b, 0xfa, 0x42, 0x08, 0x72, 0x06, 0x18, 0x80, 0x01, 0xd0, 0x01, 0x01, 0x52, 0x06, 0x61, 0x76, - 0x61, 0x74, 0x61, 0x72, 0x22, 0xc1, 0x01, 0x0a, 0x10, 0x55, 0x73, 0x65, 0x72, 0x4c, 0x6f, 0x67, - 0x69, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1f, 0x0a, 0x05, 0x65, 0x6d, 0x61, - 0x69, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x60, - 0x01, 0x48, 0x00, 0x52, 0x05, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x12, 0x2c, 0x0a, 0x05, 0x70, 0x68, - 0x6f, 0x6e, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x14, 0xfa, 0x42, 0x11, 0x72, 0x0f, - 0x32, 0x0d, 0x5e, 0x31, 0x5b, 0x33, 0x2d, 0x39, 0x5d, 0x5c, 0x64, 0x7b, 0x39, 0x7d, 0x24, 0x48, - 0x00, 0x52, 0x05, 0x70, 0x68, 0x6f, 0x6e, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x70, 0x61, 0x73, 0x73, - 0x77, 0x6f, 0x72, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x70, 0x61, 0x73, 0x73, - 0x77, 0x6f, 0x72, 0x64, 0x12, 0x35, 0x0a, 0x0a, 0x6c, 0x6f, 0x67, 0x69, 0x6e, 0x5f, 0x74, 0x79, - 0x70, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x16, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x75, - 0x73, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x6f, 0x67, 0x69, 0x6e, 0x54, 0x79, 0x70, 0x65, - 0x52, 0x09, 0x6c, 0x6f, 0x67, 0x69, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x42, 0x0b, 0x0a, 0x04, 0x75, - 0x73, 0x65, 0x72, 0x12, 0x03, 0xf8, 0x42, 0x01, 0x2a, 0x37, 0x0a, 0x0b, 0x4c, 0x6f, 0x67, 0x69, - 0x6e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x09, 0x0a, 0x05, 0x4c, 0x4f, 0x47, 0x49, 0x4e, - 0x10, 0x00, 0x12, 0x11, 0x0a, 0x0d, 0x41, 0x4c, 0x52, 0x45, 0x41, 0x44, 0x59, 0x5f, 0x4c, 0x4f, - 0x47, 0x49, 0x4e, 0x10, 0x01, 0x12, 0x0a, 0x0a, 0x06, 0x4c, 0x4f, 0x47, 0x4f, 0x55, 0x54, 0x10, - 0x02, 0x2a, 0x35, 0x0a, 0x09, 0x4c, 0x6f, 0x67, 0x69, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x12, 0x12, - 0x0a, 0x0e, 0x4c, 0x4f, 0x47, 0x49, 0x4e, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x54, 0x52, 0x59, - 0x10, 0x00, 0x12, 0x14, 0x0a, 0x10, 0x4c, 0x4f, 0x47, 0x49, 0x4e, 0x5f, 0x54, 0x59, 0x50, 0x45, - 0x5f, 0x46, 0x4f, 0x52, 0x43, 0x45, 0x10, 0x01, 0x32, 0xcd, 0x02, 0x0a, 0x0b, 0x55, 0x73, 0x65, - 0x72, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x4d, 0x0a, 0x07, 0x47, 0x65, 0x74, 0x55, - 0x73, 0x65, 0x72, 0x12, 0x1f, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x76, - 0x31, 0x2e, 0x47, 0x65, 0x74, 0x55, 0x73, 0x65, 0x72, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x1a, 0x21, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, - 0x76, 0x31, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x4d, 0x0a, 0x09, 0x51, 0x75, 0x65, 0x72, 0x79, - 0x55, 0x73, 0x65, 0x72, 0x12, 0x1d, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, - 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x1a, 0x21, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x76, - 0x31, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x4f, 0x0a, 0x0a, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, - 0x55, 0x73, 0x65, 0x72, 0x12, 0x1e, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, - 0x76, 0x31, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x1a, 0x21, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, - 0x76, 0x31, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x4f, 0x0a, 0x0a, 0x55, 0x70, 0x64, 0x61, 0x74, - 0x65, 0x55, 0x73, 0x65, 0x72, 0x12, 0x1e, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x75, 0x73, 0x65, 0x72, - 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x21, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x75, 0x73, 0x65, 0x72, - 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0x20, 0x5a, 0x1e, 0x67, 0x69, 0x74, 0x68, - 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x67, 0x6f, 0x2d, 0x67, 0x6f, 0x69, 0x6d, 0x2f, 0x61, - 0x70, 0x69, 0x2f, 0x75, 0x73, 0x65, 0x72, 0x2f, 0x76, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x33, + 0x70, 0x68, 0x6f, 0x6e, 0x65, 0x42, 0x0c, 0x0a, 0x05, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x12, 0x03, + 0xf8, 0x42, 0x01, 0x22, 0xb6, 0x01, 0x0a, 0x11, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x55, 0x73, + 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1d, 0x0a, 0x04, 0x6e, 0x61, 0x6d, + 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x09, 0xfa, 0x42, 0x06, 0x72, 0x04, 0x10, 0x02, + 0x18, 0x14, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x1f, 0x0a, 0x05, 0x65, 0x6d, 0x61, 0x69, + 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x60, 0x01, + 0x48, 0x00, 0x52, 0x05, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x12, 0x2c, 0x0a, 0x05, 0x70, 0x68, 0x6f, + 0x6e, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x42, 0x14, 0xfa, 0x42, 0x11, 0x72, 0x0f, 0x32, + 0x0d, 0x5e, 0x31, 0x5b, 0x33, 0x2d, 0x39, 0x5d, 0x5c, 0x64, 0x7b, 0x39, 0x7d, 0x24, 0x48, 0x00, + 0x52, 0x05, 0x70, 0x68, 0x6f, 0x6e, 0x65, 0x12, 0x25, 0x0a, 0x08, 0x70, 0x61, 0x73, 0x73, 0x77, + 0x6f, 0x72, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x42, 0x09, 0xfa, 0x42, 0x06, 0x72, 0x04, + 0x10, 0x06, 0x18, 0x14, 0x52, 0x08, 0x70, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x42, 0x0c, + 0x0a, 0x05, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x12, 0x03, 0xf8, 0x42, 0x01, 0x22, 0xf0, 0x01, 0x0a, + 0x11, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x12, 0x19, 0x0a, 0x03, 0x75, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x42, + 0x07, 0xfa, 0x42, 0x04, 0x22, 0x02, 0x20, 0x00, 0x52, 0x03, 0x75, 0x69, 0x64, 0x12, 0x20, 0x0a, + 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x0c, 0xfa, 0x42, 0x09, + 0x72, 0x07, 0x10, 0x02, 0x18, 0x14, 0xd0, 0x01, 0x01, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, + 0x20, 0x0a, 0x05, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x42, 0x0a, + 0xfa, 0x42, 0x07, 0x72, 0x05, 0x60, 0x01, 0xd0, 0x01, 0x01, 0x52, 0x05, 0x65, 0x6d, 0x61, 0x69, + 0x6c, 0x12, 0x2d, 0x0a, 0x05, 0x70, 0x68, 0x6f, 0x6e, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, + 0x42, 0x17, 0xfa, 0x42, 0x14, 0x72, 0x12, 0x32, 0x0d, 0x5e, 0x31, 0x5b, 0x33, 0x2d, 0x39, 0x5d, + 0x5c, 0x64, 0x7b, 0x39, 0x7d, 0x24, 0xd0, 0x01, 0x01, 0x52, 0x05, 0x70, 0x68, 0x6f, 0x6e, 0x65, + 0x12, 0x23, 0x0a, 0x06, 0x61, 0x76, 0x61, 0x74, 0x61, 0x72, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, + 0x42, 0x0b, 0xfa, 0x42, 0x08, 0x72, 0x06, 0x18, 0x80, 0x01, 0xd0, 0x01, 0x01, 0x52, 0x06, 0x61, + 0x76, 0x61, 0x74, 0x61, 0x72, 0x12, 0x28, 0x0a, 0x08, 0x70, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, + 0x64, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x42, 0x0c, 0xfa, 0x42, 0x09, 0x72, 0x07, 0x10, 0x06, + 0x18, 0x14, 0xd0, 0x01, 0x01, 0x52, 0x08, 0x70, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x22, + 0xc2, 0x01, 0x0a, 0x10, 0x55, 0x73, 0x65, 0x72, 0x4c, 0x6f, 0x67, 0x69, 0x6e, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x12, 0x1f, 0x0a, 0x05, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x60, 0x01, 0x48, 0x00, 0x52, 0x05, + 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x12, 0x2c, 0x0a, 0x05, 0x70, 0x68, 0x6f, 0x6e, 0x65, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x09, 0x42, 0x14, 0xfa, 0x42, 0x11, 0x72, 0x0f, 0x32, 0x0d, 0x5e, 0x31, 0x5b, + 0x33, 0x2d, 0x39, 0x5d, 0x5c, 0x64, 0x7b, 0x39, 0x7d, 0x24, 0x48, 0x00, 0x52, 0x05, 0x70, 0x68, + 0x6f, 0x6e, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x70, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x18, + 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x70, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x12, + 0x35, 0x0a, 0x0a, 0x6c, 0x6f, 0x67, 0x69, 0x6e, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x04, 0x20, + 0x01, 0x28, 0x0e, 0x32, 0x16, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x76, + 0x31, 0x2e, 0x4c, 0x6f, 0x67, 0x69, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x52, 0x09, 0x6c, 0x6f, 0x67, + 0x69, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x42, 0x0c, 0x0a, 0x05, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x12, + 0x03, 0xf8, 0x42, 0x01, 0x2a, 0x37, 0x0a, 0x0b, 0x4c, 0x6f, 0x67, 0x69, 0x6e, 0x53, 0x74, 0x61, + 0x74, 0x75, 0x73, 0x12, 0x09, 0x0a, 0x05, 0x4c, 0x4f, 0x47, 0x49, 0x4e, 0x10, 0x00, 0x12, 0x11, + 0x0a, 0x0d, 0x41, 0x4c, 0x52, 0x45, 0x41, 0x44, 0x59, 0x5f, 0x4c, 0x4f, 0x47, 0x49, 0x4e, 0x10, + 0x01, 0x12, 0x0a, 0x0a, 0x06, 0x4c, 0x4f, 0x47, 0x4f, 0x55, 0x54, 0x10, 0x02, 0x2a, 0x35, 0x0a, + 0x09, 0x4c, 0x6f, 0x67, 0x69, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x12, 0x12, 0x0a, 0x0e, 0x4c, 0x4f, + 0x47, 0x49, 0x4e, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x54, 0x52, 0x59, 0x10, 0x00, 0x12, 0x14, + 0x0a, 0x10, 0x4c, 0x4f, 0x47, 0x49, 0x4e, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x46, 0x4f, 0x52, + 0x43, 0x45, 0x10, 0x01, 0x32, 0xad, 0x02, 0x0a, 0x0b, 0x55, 0x73, 0x65, 0x72, 0x53, 0x65, 0x72, + 0x76, 0x69, 0x63, 0x65, 0x12, 0x45, 0x0a, 0x07, 0x47, 0x65, 0x74, 0x55, 0x73, 0x65, 0x72, 0x12, + 0x1f, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, + 0x74, 0x55, 0x73, 0x65, 0x72, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x1a, 0x19, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x55, + 0x73, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x45, 0x0a, 0x09, 0x51, + 0x75, 0x65, 0x72, 0x79, 0x55, 0x73, 0x65, 0x72, 0x12, 0x1d, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x75, + 0x73, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x55, 0x73, 0x65, 0x72, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x19, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x75, 0x73, + 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x12, 0x47, 0x0a, 0x0a, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x55, 0x73, 0x65, 0x72, + 0x12, 0x1e, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x43, + 0x72, 0x65, 0x61, 0x74, 0x65, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x1a, 0x19, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x55, + 0x73, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x47, 0x0a, 0x0a, 0x55, + 0x70, 0x64, 0x61, 0x74, 0x65, 0x55, 0x73, 0x65, 0x72, 0x12, 0x1e, 0x2e, 0x61, 0x70, 0x69, 0x2e, + 0x75, 0x73, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x55, 0x73, + 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x19, 0x2e, 0x61, 0x70, 0x69, 0x2e, + 0x75, 0x73, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x42, 0x20, 0x5a, 0x1e, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, + 0x6f, 0x6d, 0x2f, 0x67, 0x6f, 0x2d, 0x67, 0x6f, 0x69, 0x6d, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x75, + 0x73, 0x65, 0x72, 0x2f, 0x76, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -994,41 +884,39 @@ func file_user_v1_user_proto_rawDescGZIP() []byte { } var file_user_v1_user_proto_enumTypes = make([]protoimpl.EnumInfo, 2) -var file_user_v1_user_proto_msgTypes = make([]protoimpl.MessageInfo, 9) +var file_user_v1_user_proto_msgTypes = make([]protoimpl.MessageInfo, 8) var file_user_v1_user_proto_goTypes = []interface{}{ (LoginStatus)(0), // 0: api.user.v1.LoginStatus (LoginType)(0), // 1: api.user.v1.LoginType - (*UserInternalResponse)(nil), // 2: api.user.v1.UserInternalResponse - (*UserInternal)(nil), // 3: api.user.v1.UserInternal - (*User)(nil), // 4: api.user.v1.User - (*UserList)(nil), // 5: api.user.v1.UserList - (*GetUserInfoRequest)(nil), // 6: api.user.v1.GetUserInfoRequest - (*QueryUserRequest)(nil), // 7: api.user.v1.QueryUserRequest - (*CreateUserRequest)(nil), // 8: api.user.v1.CreateUserRequest - (*UpdateUserRequest)(nil), // 9: api.user.v1.UpdateUserRequest - (*UserLoginRequest)(nil), // 10: api.user.v1.UserLoginRequest - (*response.BaseResponse)(nil), // 11: api.transport.response.BaseResponse + (*UserResponse)(nil), // 2: api.user.v1.UserResponse + (*User)(nil), // 3: api.user.v1.User + (*UserList)(nil), // 4: api.user.v1.UserList + (*GetUserInfoRequest)(nil), // 5: api.user.v1.GetUserInfoRequest + (*QueryUserRequest)(nil), // 6: api.user.v1.QueryUserRequest + (*CreateUserRequest)(nil), // 7: api.user.v1.CreateUserRequest + (*UpdateUserRequest)(nil), // 8: api.user.v1.UpdateUserRequest + (*UserLoginRequest)(nil), // 9: api.user.v1.UserLoginRequest + (*response.BaseResponse)(nil), // 10: api.transport.response.BaseResponse } var file_user_v1_user_proto_depIdxs = []int32{ - 11, // 0: api.user.v1.UserInternalResponse.response:type_name -> api.transport.response.BaseResponse - 3, // 1: api.user.v1.UserInternalResponse.user:type_name -> api.user.v1.UserInternal - 0, // 2: api.user.v1.UserInternal.login_status:type_name -> api.user.v1.LoginStatus - 0, // 3: api.user.v1.User.login_status:type_name -> api.user.v1.LoginStatus - 4, // 4: api.user.v1.UserList.users:type_name -> api.user.v1.User - 1, // 5: api.user.v1.UserLoginRequest.login_type:type_name -> api.user.v1.LoginType - 6, // 6: api.user.v1.UserService.GetUser:input_type -> api.user.v1.GetUserInfoRequest - 7, // 7: api.user.v1.UserService.QueryUser:input_type -> api.user.v1.QueryUserRequest - 8, // 8: api.user.v1.UserService.CreateUser:input_type -> api.user.v1.CreateUserRequest - 9, // 9: api.user.v1.UserService.UpdateUser:input_type -> api.user.v1.UpdateUserRequest - 2, // 10: api.user.v1.UserService.GetUser:output_type -> api.user.v1.UserInternalResponse - 2, // 11: api.user.v1.UserService.QueryUser:output_type -> api.user.v1.UserInternalResponse - 2, // 12: api.user.v1.UserService.CreateUser:output_type -> api.user.v1.UserInternalResponse - 2, // 13: api.user.v1.UserService.UpdateUser:output_type -> api.user.v1.UserInternalResponse - 10, // [10:14] is the sub-list for method output_type - 6, // [6:10] is the sub-list for method input_type - 6, // [6:6] is the sub-list for extension type_name - 6, // [6:6] is the sub-list for extension extendee - 0, // [0:6] is the sub-list for field type_name + 10, // 0: api.user.v1.UserResponse.response:type_name -> api.transport.response.BaseResponse + 3, // 1: api.user.v1.UserResponse.user:type_name -> api.user.v1.User + 0, // 2: api.user.v1.User.login_status:type_name -> api.user.v1.LoginStatus + 3, // 3: api.user.v1.UserList.users:type_name -> api.user.v1.User + 1, // 4: api.user.v1.UserLoginRequest.login_type:type_name -> api.user.v1.LoginType + 5, // 5: api.user.v1.UserService.GetUser:input_type -> api.user.v1.GetUserInfoRequest + 6, // 6: api.user.v1.UserService.QueryUser:input_type -> api.user.v1.QueryUserRequest + 7, // 7: api.user.v1.UserService.CreateUser:input_type -> api.user.v1.CreateUserRequest + 8, // 8: api.user.v1.UserService.UpdateUser:input_type -> api.user.v1.UpdateUserRequest + 2, // 9: api.user.v1.UserService.GetUser:output_type -> api.user.v1.UserResponse + 2, // 10: api.user.v1.UserService.QueryUser:output_type -> api.user.v1.UserResponse + 2, // 11: api.user.v1.UserService.CreateUser:output_type -> api.user.v1.UserResponse + 2, // 12: api.user.v1.UserService.UpdateUser:output_type -> api.user.v1.UserResponse + 9, // [9:13] is the sub-list for method output_type + 5, // [5:9] 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_user_v1_user_proto_init() } @@ -1038,7 +926,7 @@ func file_user_v1_user_proto_init() { } if !protoimpl.UnsafeEnabled { file_user_v1_user_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*UserInternalResponse); i { + switch v := v.(*UserResponse); i { case 0: return &v.state case 1: @@ -1050,18 +938,6 @@ func file_user_v1_user_proto_init() { } } file_user_v1_user_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*UserInternal); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_user_v1_user_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*User); i { case 0: return &v.state @@ -1073,7 +949,7 @@ func file_user_v1_user_proto_init() { return nil } } - file_user_v1_user_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + file_user_v1_user_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*UserList); i { case 0: return &v.state @@ -1085,7 +961,7 @@ func file_user_v1_user_proto_init() { return nil } } - file_user_v1_user_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + file_user_v1_user_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*GetUserInfoRequest); i { case 0: return &v.state @@ -1097,7 +973,7 @@ func file_user_v1_user_proto_init() { return nil } } - file_user_v1_user_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + file_user_v1_user_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*QueryUserRequest); i { case 0: return &v.state @@ -1109,7 +985,7 @@ func file_user_v1_user_proto_init() { return nil } } - file_user_v1_user_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { + file_user_v1_user_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*CreateUserRequest); i { case 0: return &v.state @@ -1121,7 +997,7 @@ func file_user_v1_user_proto_init() { return nil } } - file_user_v1_user_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { + file_user_v1_user_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*UpdateUserRequest); i { case 0: return &v.state @@ -1133,7 +1009,7 @@ func file_user_v1_user_proto_init() { return nil } } - file_user_v1_user_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { + file_user_v1_user_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*UserLoginRequest); i { case 0: return &v.state @@ -1147,16 +1023,15 @@ func file_user_v1_user_proto_init() { } } file_user_v1_user_proto_msgTypes[1].OneofWrappers = []interface{}{} - file_user_v1_user_proto_msgTypes[2].OneofWrappers = []interface{}{} - file_user_v1_user_proto_msgTypes[5].OneofWrappers = []interface{}{ + file_user_v1_user_proto_msgTypes[4].OneofWrappers = []interface{}{ (*QueryUserRequest_Email)(nil), (*QueryUserRequest_Phone)(nil), } - file_user_v1_user_proto_msgTypes[6].OneofWrappers = []interface{}{ + file_user_v1_user_proto_msgTypes[5].OneofWrappers = []interface{}{ (*CreateUserRequest_Email)(nil), (*CreateUserRequest_Phone)(nil), } - file_user_v1_user_proto_msgTypes[8].OneofWrappers = []interface{}{ + file_user_v1_user_proto_msgTypes[7].OneofWrappers = []interface{}{ (*UserLoginRequest_Email)(nil), (*UserLoginRequest_Phone)(nil), } @@ -1166,7 +1041,7 @@ func file_user_v1_user_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_user_v1_user_proto_rawDesc, NumEnums: 2, - NumMessages: 9, + NumMessages: 8, NumExtensions: 0, NumServices: 1, }, diff --git a/user/v1/user.pb.validate.go b/user/v1/user.pb.validate.go index c3cae4c..9f88828 100644 --- a/user/v1/user.pb.validate.go +++ b/user/v1/user.pb.validate.go @@ -35,22 +35,22 @@ var ( _ = sort.Sort ) -// Validate checks the field values on UserInternalResponse with the rules -// defined in the proto definition for this message. If any rules are -// violated, the first error encountered is returned, or nil if there are no violations. -func (m *UserInternalResponse) Validate() error { +// Validate checks the field values on UserResponse with the rules defined in +// the proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. +func (m *UserResponse) Validate() error { return m.validate(false) } -// ValidateAll checks the field values on UserInternalResponse with the rules -// defined in the proto definition for this message. If any rules are -// violated, the result is a list of violation errors wrapped in -// UserInternalResponseMultiError, or nil if none found. -func (m *UserInternalResponse) ValidateAll() error { +// ValidateAll checks the field values on UserResponse with the rules defined +// in the proto definition for this message. If any rules are violated, the +// result is a list of violation errors wrapped in UserResponseMultiError, or +// nil if none found. +func (m *UserResponse) ValidateAll() error { return m.validate(true) } -func (m *UserInternalResponse) validate(all bool) error { +func (m *UserResponse) validate(all bool) error { if m == nil { return nil } @@ -61,7 +61,7 @@ func (m *UserInternalResponse) validate(all bool) error { switch v := interface{}(m.GetResponse()).(type) { case interface{ ValidateAll() error }: if err := v.ValidateAll(); err != nil { - errors = append(errors, UserInternalResponseValidationError{ + errors = append(errors, UserResponseValidationError{ field: "Response", reason: "embedded message failed validation", cause: err, @@ -69,7 +69,7 @@ func (m *UserInternalResponse) validate(all bool) error { } case interface{ Validate() error }: if err := v.Validate(); err != nil { - errors = append(errors, UserInternalResponseValidationError{ + errors = append(errors, UserResponseValidationError{ field: "Response", reason: "embedded message failed validation", cause: err, @@ -78,7 +78,7 @@ func (m *UserInternalResponse) validate(all bool) error { } } else if v, ok := interface{}(m.GetResponse()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { - return UserInternalResponseValidationError{ + return UserResponseValidationError{ field: "Response", reason: "embedded message failed validation", cause: err, @@ -90,7 +90,7 @@ func (m *UserInternalResponse) validate(all bool) error { switch v := interface{}(m.GetUser()).(type) { case interface{ ValidateAll() error }: if err := v.ValidateAll(); err != nil { - errors = append(errors, UserInternalResponseValidationError{ + errors = append(errors, UserResponseValidationError{ field: "User", reason: "embedded message failed validation", cause: err, @@ -98,7 +98,7 @@ func (m *UserInternalResponse) validate(all bool) error { } case interface{ Validate() error }: if err := v.Validate(); err != nil { - errors = append(errors, UserInternalResponseValidationError{ + errors = append(errors, UserResponseValidationError{ field: "User", reason: "embedded message failed validation", cause: err, @@ -107,7 +107,7 @@ func (m *UserInternalResponse) validate(all bool) error { } } else if v, ok := interface{}(m.GetUser()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { - return UserInternalResponseValidationError{ + return UserResponseValidationError{ field: "User", reason: "embedded message failed validation", cause: err, @@ -116,19 +116,18 @@ func (m *UserInternalResponse) validate(all bool) error { } if len(errors) > 0 { - return UserInternalResponseMultiError(errors) + return UserResponseMultiError(errors) } return nil } -// UserInternalResponseMultiError is an error wrapping multiple validation -// errors returned by UserInternalResponse.ValidateAll() if the designated -// constraints aren't met. -type UserInternalResponseMultiError []error +// UserResponseMultiError is an error wrapping multiple validation errors +// returned by UserResponse.ValidateAll() if the designated constraints aren't met. +type UserResponseMultiError []error // Error returns a concatenation of all the error messages it wraps. -func (m UserInternalResponseMultiError) Error() string { +func (m UserResponseMultiError) Error() string { var msgs []string for _, err := range m { msgs = append(msgs, err.Error()) @@ -137,11 +136,11 @@ func (m UserInternalResponseMultiError) Error() string { } // AllErrors returns a list of validation violation errors. -func (m UserInternalResponseMultiError) AllErrors() []error { return m } +func (m UserResponseMultiError) AllErrors() []error { return m } -// UserInternalResponseValidationError is the validation error returned by -// UserInternalResponse.Validate if the designated constraints aren't met. -type UserInternalResponseValidationError struct { +// UserResponseValidationError is the validation error returned by +// UserResponse.Validate if the designated constraints aren't met. +type UserResponseValidationError struct { field string reason string cause error @@ -149,24 +148,22 @@ type UserInternalResponseValidationError struct { } // Field function returns field value. -func (e UserInternalResponseValidationError) Field() string { return e.field } +func (e UserResponseValidationError) Field() string { return e.field } // Reason function returns reason value. -func (e UserInternalResponseValidationError) Reason() string { return e.reason } +func (e UserResponseValidationError) Reason() string { return e.reason } // Cause function returns cause value. -func (e UserInternalResponseValidationError) Cause() error { return e.cause } +func (e UserResponseValidationError) Cause() error { return e.cause } // Key function returns key value. -func (e UserInternalResponseValidationError) Key() bool { return e.key } +func (e UserResponseValidationError) Key() bool { return e.key } // ErrorName returns error name. -func (e UserInternalResponseValidationError) ErrorName() string { - return "UserInternalResponseValidationError" -} +func (e UserResponseValidationError) ErrorName() string { return "UserResponseValidationError" } // Error satisfies the builtin error interface -func (e UserInternalResponseValidationError) Error() string { +func (e UserResponseValidationError) Error() string { cause := "" if e.cause != nil { cause = fmt.Sprintf(" | caused by: %v", e.cause) @@ -178,14 +175,14 @@ func (e UserInternalResponseValidationError) Error() string { } return fmt.Sprintf( - "invalid %sUserInternalResponse.%s: %s%s", + "invalid %sUserResponse.%s: %s%s", key, e.field, e.reason, cause) } -var _ error = UserInternalResponseValidationError{} +var _ error = UserResponseValidationError{} var _ interface { Field() string @@ -193,132 +190,7 @@ var _ interface { Key() bool Cause() error ErrorName() string -} = UserInternalResponseValidationError{} - -// Validate checks the field values on UserInternal with the rules defined in -// the proto definition for this message. If any rules are violated, the first -// error encountered is returned, or nil if there are no violations. -func (m *UserInternal) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on UserInternal with the rules defined -// in the proto definition for this message. If any rules are violated, the -// result is a list of violation errors wrapped in UserInternalMultiError, or -// nil if none found. -func (m *UserInternal) ValidateAll() error { - return m.validate(true) -} - -func (m *UserInternal) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - // no validation rules for Uid - - // no validation rules for Name - - // no validation rules for Avatar - - // no validation rules for Password - - // no validation rules for LoginStatus - - // no validation rules for CreatedAt - - // no validation rules for UpdatedAt - - if m.Email != nil { - // no validation rules for Email - } - - if m.Phone != nil { - // no validation rules for Phone - } - - if m.PushServerIp != nil { - // no validation rules for PushServerIp - } - - if len(errors) > 0 { - return UserInternalMultiError(errors) - } - - return nil -} - -// UserInternalMultiError is an error wrapping multiple validation errors -// returned by UserInternal.ValidateAll() if the designated constraints aren't met. -type UserInternalMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m UserInternalMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m UserInternalMultiError) AllErrors() []error { return m } - -// UserInternalValidationError is the validation error returned by -// UserInternal.Validate if the designated constraints aren't met. -type UserInternalValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e UserInternalValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e UserInternalValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e UserInternalValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e UserInternalValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e UserInternalValidationError) ErrorName() string { return "UserInternalValidationError" } - -// Error satisfies the builtin error interface -func (e UserInternalValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sUserInternal.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = UserInternalValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = UserInternalValidationError{} +} = UserResponseValidationError{} // Validate checks the field values on User with the rules defined in the proto // definition for this message. If any rules are violated, the first error @@ -347,8 +219,14 @@ func (m *User) validate(all bool) error { // no validation rules for Avatar + // no validation rules for Password + // no validation rules for LoginStatus + // no validation rules for CreatedAt + + // no validation rules for UpdatedAt + if m.Email != nil { // no validation rules for Email } @@ -357,8 +235,8 @@ func (m *User) validate(all bool) error { // no validation rules for Phone } - if m.ConnectUrl != nil { - // no validation rules for ConnectUrl + if m.PushServerIp != nil { + // no validation rules for PushServerIp } if len(errors) > 0 { @@ -593,10 +471,10 @@ func (m *GetUserInfoRequest) validate(all bool) error { var errors []error - if l := utf8.RuneCountInString(m.GetUid()); l < 20 || l > 24 { + if m.GetUid() <= 0 { err := GetUserInfoRequestValidationError{ field: "Uid", - reason: "value length must be between 20 and 24 runes, inclusive", + reason: "value must be greater than 0", } if !all { return err @@ -706,7 +584,7 @@ func (m *QueryUserRequest) validate(all bool) error { var errors []error - switch m.User.(type) { + switch m.Field.(type) { case *QueryUserRequest_Email: @@ -737,7 +615,7 @@ func (m *QueryUserRequest) validate(all bool) error { default: err := QueryUserRequestValidationError{ - field: "User", + field: "Field", reason: "value is required", } if !all { @@ -921,7 +799,7 @@ func (m *CreateUserRequest) validate(all bool) error { errors = append(errors, err) } - switch m.User.(type) { + switch m.Field.(type) { case *CreateUserRequest_Email: @@ -952,7 +830,7 @@ func (m *CreateUserRequest) validate(all bool) error { default: err := CreateUserRequestValidationError{ - field: "User", + field: "Field", reason: "value is required", } if !all { @@ -1116,10 +994,10 @@ func (m *UpdateUserRequest) validate(all bool) error { var errors []error - if l := utf8.RuneCountInString(m.GetUid()); l < 20 || l > 24 { + if m.GetUid() <= 0 { err := UpdateUserRequestValidationError{ field: "Uid", - reason: "value length must be between 20 and 24 runes, inclusive", + reason: "value must be greater than 0", } if !all { return err @@ -1188,6 +1066,21 @@ func (m *UpdateUserRequest) validate(all bool) error { } + if m.GetPassword() != "" { + + if l := utf8.RuneCountInString(m.GetPassword()); l < 6 || l > 20 { + err := UpdateUserRequestValidationError{ + field: "Password", + reason: "value length must be between 6 and 20 runes, inclusive", + } + if !all { + return err + } + errors = append(errors, err) + } + + } + if len(errors) > 0 { return UpdateUserRequestMultiError(errors) } @@ -1346,7 +1239,7 @@ func (m *UserLoginRequest) validate(all bool) error { // no validation rules for LoginType - switch m.User.(type) { + switch m.Field.(type) { case *UserLoginRequest_Email: @@ -1377,7 +1270,7 @@ func (m *UserLoginRequest) validate(all bool) error { default: err := UserLoginRequestValidationError{ - field: "User", + field: "Field", reason: "value is required", } if !all { diff --git a/user/v1/user.proto b/user/v1/user.proto index 196bf57..220e20f 100644 --- a/user/v1/user.proto +++ b/user/v1/user.proto @@ -14,14 +14,13 @@ enum LoginStatus { LOGOUT = 2; } -message UserInternalResponse { +message UserResponse { api.transport.response.BaseResponse response = 1; - UserInternal user = 2; + User user = 2; } -// UserInternal is the internal representation of a user. -message UserInternal { - string uid = 1; +message User { + int64 uid = 1; string name = 2; optional string email = 3; optional string phone = 4; @@ -36,33 +35,18 @@ message UserInternal { int64 updated_at = 10; } -// User use for return user info to client. -message User { - string uid = 1; - string name = 2; - optional string email = 3; - optional string phone = 4; - string avatar = 5; - // ws_url is url of user need connect via ws or tcp - optional string connect_url = 6; - // 0: first time login, need connect to push server - // 1: already login, no need connect to push server - LoginStatus login_status = 8; -} - message UserList { repeated User users = 1; } message GetUserInfoRequest { - string uid = 1 [(validate.rules).string = { - min_len: 20, - max_len: 24 + int64 uid = 1 [(validate.rules).int64 = { + gt: 0 }]; } message QueryUserRequest { - oneof user { + oneof field { option (validate.required) = true; string email = 1 [(validate.rules).string.email = true]; string phone = 2 [(validate.rules).string.pattern = "^1[3-9]\\d{9}$"]; @@ -74,7 +58,7 @@ message CreateUserRequest { min_len: 2, max_len: 20 }]; - oneof user { + oneof field { option (validate.required) = true; string email = 2 [(validate.rules).string.email = true]; string phone = 3 [(validate.rules).string.pattern = "^1[3-9]\\d{9}$"]; @@ -86,9 +70,8 @@ message CreateUserRequest { } message UpdateUserRequest { - string uid = 1 [(validate.rules).string = { - min_len: 20, - max_len: 24 + int64 uid = 1 [(validate.rules).int64 = { + gt: 0 }]; string name = 2 [(validate.rules).string = { min_len: 2, @@ -107,21 +90,26 @@ message UpdateUserRequest { max_len: 128, ignore_empty: true }]; + string password = 6 [(validate.rules).string = { + min_len: 6, + max_len: 20, + ignore_empty: true + }]; } service UserService { // GetUser get user info by uid, called when uid is known. - rpc GetUser(GetUserInfoRequest) returns (UserInternalResponse); + rpc GetUser(GetUserInfoRequest) returns (UserResponse); // QueryUser query user info by email or phone, called when uid is unknown. - rpc QueryUser(QueryUserRequest) returns (UserInternalResponse); + rpc QueryUser(QueryUserRequest) returns (UserResponse); // CreateUser create user. - rpc CreateUser(CreateUserRequest) returns (UserInternalResponse); + rpc CreateUser(CreateUserRequest) returns (UserResponse); // UpdateUser update user info. - rpc UpdateUser(UpdateUserRequest) returns (UserInternalResponse); + rpc UpdateUser(UpdateUserRequest) returns (UserResponse); } message UserLoginRequest { - oneof user { + oneof field { option (validate.required) = true; string email = 1 [(validate.rules).string.email = true]; string phone = 2 [(validate.rules).string.pattern = "^1[3-9]\\d{9}$"]; diff --git a/user/v1/user_grpc.pb.go b/user/v1/user_grpc.pb.go index 11400dd..23e6729 100644 --- a/user/v1/user_grpc.pb.go +++ b/user/v1/user_grpc.pb.go @@ -19,13 +19,13 @@ const _ = grpc.SupportPackageIsVersion7 // 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 { // GetUser get user info by uid, called when uid is known. - GetUser(ctx context.Context, in *GetUserInfoRequest, opts ...grpc.CallOption) (*UserInternalResponse, error) + GetUser(ctx context.Context, in *GetUserInfoRequest, opts ...grpc.CallOption) (*UserResponse, error) // QueryUser query user info by email or phone, called when uid is unknown. - QueryUser(ctx context.Context, in *QueryUserRequest, opts ...grpc.CallOption) (*UserInternalResponse, error) + QueryUser(ctx context.Context, in *QueryUserRequest, opts ...grpc.CallOption) (*UserResponse, error) // CreateUser create user. - CreateUser(ctx context.Context, in *CreateUserRequest, opts ...grpc.CallOption) (*UserInternalResponse, error) + CreateUser(ctx context.Context, in *CreateUserRequest, opts ...grpc.CallOption) (*UserResponse, error) // UpdateUser update user info. - UpdateUser(ctx context.Context, in *UpdateUserRequest, opts ...grpc.CallOption) (*UserInternalResponse, error) + UpdateUser(ctx context.Context, in *UpdateUserRequest, opts ...grpc.CallOption) (*UserResponse, error) } type userServiceClient struct { @@ -36,8 +36,8 @@ func NewUserServiceClient(cc grpc.ClientConnInterface) UserServiceClient { return &userServiceClient{cc} } -func (c *userServiceClient) GetUser(ctx context.Context, in *GetUserInfoRequest, opts ...grpc.CallOption) (*UserInternalResponse, error) { - out := new(UserInternalResponse) +func (c *userServiceClient) GetUser(ctx context.Context, in *GetUserInfoRequest, opts ...grpc.CallOption) (*UserResponse, error) { + out := new(UserResponse) err := c.cc.Invoke(ctx, "/api.user.v1.UserService/GetUser", in, out, opts...) if err != nil { return nil, err @@ -45,8 +45,8 @@ func (c *userServiceClient) GetUser(ctx context.Context, in *GetUserInfoRequest, return out, nil } -func (c *userServiceClient) QueryUser(ctx context.Context, in *QueryUserRequest, opts ...grpc.CallOption) (*UserInternalResponse, error) { - out := new(UserInternalResponse) +func (c *userServiceClient) QueryUser(ctx context.Context, in *QueryUserRequest, opts ...grpc.CallOption) (*UserResponse, error) { + out := new(UserResponse) err := c.cc.Invoke(ctx, "/api.user.v1.UserService/QueryUser", in, out, opts...) if err != nil { return nil, err @@ -54,8 +54,8 @@ func (c *userServiceClient) QueryUser(ctx context.Context, in *QueryUserRequest, return out, nil } -func (c *userServiceClient) CreateUser(ctx context.Context, in *CreateUserRequest, opts ...grpc.CallOption) (*UserInternalResponse, error) { - out := new(UserInternalResponse) +func (c *userServiceClient) CreateUser(ctx context.Context, in *CreateUserRequest, opts ...grpc.CallOption) (*UserResponse, error) { + out := new(UserResponse) err := c.cc.Invoke(ctx, "/api.user.v1.UserService/CreateUser", in, out, opts...) if err != nil { return nil, err @@ -63,8 +63,8 @@ func (c *userServiceClient) CreateUser(ctx context.Context, in *CreateUserReques return out, nil } -func (c *userServiceClient) UpdateUser(ctx context.Context, in *UpdateUserRequest, opts ...grpc.CallOption) (*UserInternalResponse, error) { - out := new(UserInternalResponse) +func (c *userServiceClient) UpdateUser(ctx context.Context, in *UpdateUserRequest, opts ...grpc.CallOption) (*UserResponse, error) { + out := new(UserResponse) err := c.cc.Invoke(ctx, "/api.user.v1.UserService/UpdateUser", in, out, opts...) if err != nil { return nil, err @@ -77,13 +77,13 @@ func (c *userServiceClient) UpdateUser(ctx context.Context, in *UpdateUserReques // for forward compatibility type UserServiceServer interface { // GetUser get user info by uid, called when uid is known. - GetUser(context.Context, *GetUserInfoRequest) (*UserInternalResponse, error) + GetUser(context.Context, *GetUserInfoRequest) (*UserResponse, error) // QueryUser query user info by email or phone, called when uid is unknown. - QueryUser(context.Context, *QueryUserRequest) (*UserInternalResponse, error) + QueryUser(context.Context, *QueryUserRequest) (*UserResponse, error) // CreateUser create user. - CreateUser(context.Context, *CreateUserRequest) (*UserInternalResponse, error) + CreateUser(context.Context, *CreateUserRequest) (*UserResponse, error) // UpdateUser update user info. - UpdateUser(context.Context, *UpdateUserRequest) (*UserInternalResponse, error) + UpdateUser(context.Context, *UpdateUserRequest) (*UserResponse, error) mustEmbedUnimplementedUserServiceServer() } @@ -91,16 +91,16 @@ type UserServiceServer interface { type UnimplementedUserServiceServer struct { } -func (UnimplementedUserServiceServer) GetUser(context.Context, *GetUserInfoRequest) (*UserInternalResponse, error) { +func (UnimplementedUserServiceServer) GetUser(context.Context, *GetUserInfoRequest) (*UserResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method GetUser not implemented") } -func (UnimplementedUserServiceServer) QueryUser(context.Context, *QueryUserRequest) (*UserInternalResponse, error) { +func (UnimplementedUserServiceServer) QueryUser(context.Context, *QueryUserRequest) (*UserResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method QueryUser not implemented") } -func (UnimplementedUserServiceServer) CreateUser(context.Context, *CreateUserRequest) (*UserInternalResponse, error) { +func (UnimplementedUserServiceServer) CreateUser(context.Context, *CreateUserRequest) (*UserResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method CreateUser not implemented") } -func (UnimplementedUserServiceServer) UpdateUser(context.Context, *UpdateUserRequest) (*UserInternalResponse, error) { +func (UnimplementedUserServiceServer) UpdateUser(context.Context, *UpdateUserRequest) (*UserResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method UpdateUser not implemented") } func (UnimplementedUserServiceServer) mustEmbedUnimplementedUserServiceServer() {} From 36939828e775a6ea790ffbc07b8a9929368cba21 Mon Sep 17 00:00:00 2001 From: yusank Date: Sun, 17 Jul 2022 14:17:30 +0800 Subject: [PATCH 20/35] fix: update version --- config/registry/v1/registry.pb.go | 2 +- config/v1/config.pb.go | 2 +- message/v1/message.pb.go | 2 +- transport/response/response.pb.go | 2 +- user/friend/v1/friend.pb.go | 4 ++-- user/group/v1/group.pb.go | 2 +- user/v1/user.pb.go | 2 +- 7 files changed, 8 insertions(+), 8 deletions(-) diff --git a/config/registry/v1/registry.pb.go b/config/registry/v1/registry.pb.go index b24b160..44a616c 100644 --- a/config/registry/v1/registry.pb.go +++ b/config/registry/v1/registry.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.26.0 +// protoc-gen-go v1.27.1 // protoc (unknown) // source: config/registry/v1/registry.proto diff --git a/config/v1/config.pb.go b/config/v1/config.pb.go index 23cda00..0d45016 100644 --- a/config/v1/config.pb.go +++ b/config/v1/config.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.26.0 +// protoc-gen-go v1.27.1 // protoc (unknown) // source: config/v1/config.proto diff --git a/message/v1/message.pb.go b/message/v1/message.pb.go index 3a5a8fc..d4804d4 100644 --- a/message/v1/message.pb.go +++ b/message/v1/message.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.26.0 +// protoc-gen-go v1.27.1 // protoc (unknown) // source: message/v1/message.proto diff --git a/transport/response/response.pb.go b/transport/response/response.pb.go index a21b093..a3ee455 100644 --- a/transport/response/response.pb.go +++ b/transport/response/response.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.26.0 +// protoc-gen-go v1.27.1 // protoc (unknown) // source: transport/response/response.proto diff --git a/user/friend/v1/friend.pb.go b/user/friend/v1/friend.pb.go index 67508eb..d18fd85 100644 --- a/user/friend/v1/friend.pb.go +++ b/user/friend/v1/friend.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.26.0 +// protoc-gen-go v1.27.1 // protoc (unknown) // source: user/friend/v1/friend.proto @@ -1099,7 +1099,7 @@ func (x *CheckSendMessageAbilityRequest) GetSessionType() v1.SessionType { if x != nil { return x.SessionType } - return v1.SessionType_SingleChat + return v1.SessionType(0) } type CheckSendMessageAbilityResponse struct { diff --git a/user/group/v1/group.pb.go b/user/group/v1/group.pb.go index 0013e5c..48d804f 100644 --- a/user/group/v1/group.pb.go +++ b/user/group/v1/group.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.26.0 +// protoc-gen-go v1.27.1 // protoc (unknown) // source: user/group/v1/group.proto diff --git a/user/v1/user.pb.go b/user/v1/user.pb.go index a4dcb7f..034631d 100644 --- a/user/v1/user.pb.go +++ b/user/v1/user.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.26.0 +// protoc-gen-go v1.27.1 // protoc (unknown) // source: user/v1/user.proto From e200d2e4c32373653d586d7e17f8b9a4b2a3dd31 Mon Sep 17 00:00:00 2001 From: yusank Date: Mon, 18 Jul 2022 16:04:39 +0800 Subject: [PATCH 21/35] fix: remove unused types --- config/registry/v1/registry.pb.go | 2 +- config/v1/config.pb.go | 2 +- message/v1/message.pb.go | 306 +++++++++++------------------- message/v1/message.pb.validate.go | 104 ---------- message/v1/message.proto | 6 - transport/response/response.pb.go | 2 +- user/friend/v1/friend.pb.go | 4 +- user/group/v1/group.pb.go | 2 +- user/v1/user.pb.go | 2 +- 9 files changed, 123 insertions(+), 307 deletions(-) diff --git a/config/registry/v1/registry.pb.go b/config/registry/v1/registry.pb.go index 44a616c..b24b160 100644 --- a/config/registry/v1/registry.pb.go +++ b/config/registry/v1/registry.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.27.1 +// protoc-gen-go v1.26.0 // protoc (unknown) // source: config/registry/v1/registry.proto diff --git a/config/v1/config.pb.go b/config/v1/config.pb.go index 0d45016..23cda00 100644 --- a/config/v1/config.pb.go +++ b/config/v1/config.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.27.1 +// protoc-gen-go v1.26.0 // protoc (unknown) // source: config/v1/config.proto diff --git a/message/v1/message.pb.go b/message/v1/message.pb.go index d4804d4..b1ba857 100644 --- a/message/v1/message.pb.go +++ b/message/v1/message.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.27.1 +// protoc-gen-go v1.26.0 // protoc (unknown) // source: message/v1/message.proto @@ -214,62 +214,6 @@ func (x *SendMessageReq) GetContent() string { return "" } -// SendMessageResp is response body for sendMessage -type SendMessageResp struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - SessionId string `protobuf:"bytes,1,opt,name=session_id,json=sessionId,proto3" json:"session_id,omitempty"` - MsgId int64 `protobuf:"varint,2,opt,name=msg_id,json=msgId,proto3" json:"msg_id,omitempty"` -} - -func (x *SendMessageResp) Reset() { - *x = SendMessageResp{} - if protoimpl.UnsafeEnabled { - mi := &file_message_v1_message_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *SendMessageResp) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*SendMessageResp) ProtoMessage() {} - -func (x *SendMessageResp) ProtoReflect() protoreflect.Message { - mi := &file_message_v1_message_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 SendMessageResp.ProtoReflect.Descriptor instead. -func (*SendMessageResp) Descriptor() ([]byte, []int) { - return file_message_v1_message_proto_rawDescGZIP(), []int{1} -} - -func (x *SendMessageResp) GetSessionId() string { - if x != nil { - return x.SessionId - } - return "" -} - -func (x *SendMessageResp) GetMsgId() int64 { - if x != nil { - return x.MsgId - } - return 0 -} - // Message is definition of message type Message struct { state protoimpl.MessageState @@ -289,7 +233,7 @@ type Message struct { func (x *Message) Reset() { *x = Message{} if protoimpl.UnsafeEnabled { - mi := &file_message_v1_message_proto_msgTypes[2] + mi := &file_message_v1_message_proto_msgTypes[1] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -302,7 +246,7 @@ func (x *Message) String() string { func (*Message) ProtoMessage() {} func (x *Message) ProtoReflect() protoreflect.Message { - mi := &file_message_v1_message_proto_msgTypes[2] + mi := &file_message_v1_message_proto_msgTypes[1] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -315,7 +259,7 @@ func (x *Message) ProtoReflect() protoreflect.Message { // Deprecated: Use Message.ProtoReflect.Descriptor instead. func (*Message) Descriptor() ([]byte, []int) { - return file_message_v1_message_proto_rawDescGZIP(), []int{2} + return file_message_v1_message_proto_rawDescGZIP(), []int{1} } func (x *Message) GetMsgId() int64 { @@ -388,7 +332,7 @@ type PushMessageReq struct { func (x *PushMessageReq) Reset() { *x = PushMessageReq{} if protoimpl.UnsafeEnabled { - mi := &file_message_v1_message_proto_msgTypes[3] + mi := &file_message_v1_message_proto_msgTypes[2] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -401,7 +345,7 @@ func (x *PushMessageReq) String() string { func (*PushMessageReq) ProtoMessage() {} func (x *PushMessageReq) ProtoReflect() protoreflect.Message { - mi := &file_message_v1_message_proto_msgTypes[3] + mi := &file_message_v1_message_proto_msgTypes[2] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -414,7 +358,7 @@ func (x *PushMessageReq) ProtoReflect() protoreflect.Message { // Deprecated: Use PushMessageReq.ProtoReflect.Descriptor instead. func (*PushMessageReq) Descriptor() ([]byte, []int) { - return file_message_v1_message_proto_rawDescGZIP(), []int{3} + return file_message_v1_message_proto_rawDescGZIP(), []int{2} } func (x *PushMessageReq) GetMessage() *Message { @@ -443,7 +387,7 @@ type PushMessageResp struct { func (x *PushMessageResp) Reset() { *x = PushMessageResp{} if protoimpl.UnsafeEnabled { - mi := &file_message_v1_message_proto_msgTypes[4] + mi := &file_message_v1_message_proto_msgTypes[3] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -456,7 +400,7 @@ func (x *PushMessageResp) String() string { func (*PushMessageResp) ProtoMessage() {} func (x *PushMessageResp) ProtoReflect() protoreflect.Message { - mi := &file_message_v1_message_proto_msgTypes[4] + mi := &file_message_v1_message_proto_msgTypes[3] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -469,7 +413,7 @@ func (x *PushMessageResp) ProtoReflect() protoreflect.Message { // Deprecated: Use PushMessageResp.ProtoReflect.Descriptor instead. func (*PushMessageResp) Descriptor() ([]byte, []int) { - return file_message_v1_message_proto_rawDescGZIP(), []int{4} + return file_message_v1_message_proto_rawDescGZIP(), []int{3} } func (x *PushMessageResp) GetResponse() *response.BaseResponse { @@ -501,7 +445,7 @@ type QueryOfflineMessageReq struct { func (x *QueryOfflineMessageReq) Reset() { *x = QueryOfflineMessageReq{} if protoimpl.UnsafeEnabled { - mi := &file_message_v1_message_proto_msgTypes[5] + mi := &file_message_v1_message_proto_msgTypes[4] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -514,7 +458,7 @@ func (x *QueryOfflineMessageReq) String() string { func (*QueryOfflineMessageReq) ProtoMessage() {} func (x *QueryOfflineMessageReq) ProtoReflect() protoreflect.Message { - mi := &file_message_v1_message_proto_msgTypes[5] + mi := &file_message_v1_message_proto_msgTypes[4] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -527,7 +471,7 @@ func (x *QueryOfflineMessageReq) ProtoReflect() protoreflect.Message { // Deprecated: Use QueryOfflineMessageReq.ProtoReflect.Descriptor instead. func (*QueryOfflineMessageReq) Descriptor() ([]byte, []int) { - return file_message_v1_message_proto_rawDescGZIP(), []int{5} + return file_message_v1_message_proto_rawDescGZIP(), []int{4} } func (x *QueryOfflineMessageReq) GetUid() int64 { @@ -578,7 +522,7 @@ type QueryOfflineMessageResp struct { func (x *QueryOfflineMessageResp) Reset() { *x = QueryOfflineMessageResp{} if protoimpl.UnsafeEnabled { - mi := &file_message_v1_message_proto_msgTypes[6] + mi := &file_message_v1_message_proto_msgTypes[5] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -591,7 +535,7 @@ func (x *QueryOfflineMessageResp) String() string { func (*QueryOfflineMessageResp) ProtoMessage() {} func (x *QueryOfflineMessageResp) ProtoReflect() protoreflect.Message { - mi := &file_message_v1_message_proto_msgTypes[6] + mi := &file_message_v1_message_proto_msgTypes[5] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -604,7 +548,7 @@ func (x *QueryOfflineMessageResp) ProtoReflect() protoreflect.Message { // Deprecated: Use QueryOfflineMessageResp.ProtoReflect.Descriptor instead. func (*QueryOfflineMessageResp) Descriptor() ([]byte, []int) { - return file_message_v1_message_proto_rawDescGZIP(), []int{6} + return file_message_v1_message_proto_rawDescGZIP(), []int{5} } func (x *QueryOfflineMessageResp) GetResponse() *response.BaseResponse { @@ -656,91 +600,86 @@ var file_message_v1_message_proto_rawDesc = []byte{ 0x54, 0x79, 0x70, 0x65, 0x12, 0x24, 0x0a, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x42, 0x0a, 0xfa, 0x42, 0x07, 0x72, 0x05, 0x10, 0x01, 0x18, 0x80, 0x20, 0x52, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x42, 0x0d, 0x0a, 0x0b, 0x5f, 0x73, - 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x22, 0x47, 0x0a, 0x0f, 0x53, 0x65, 0x6e, - 0x64, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x52, 0x65, 0x73, 0x70, 0x12, 0x1d, 0x0a, 0x0a, - 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x09, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x12, 0x15, 0x0a, 0x06, 0x6d, - 0x73, 0x67, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x6d, 0x73, 0x67, - 0x49, 0x64, 0x22, 0xa5, 0x02, 0x0a, 0x07, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x15, - 0x0a, 0x06, 0x6d, 0x73, 0x67, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, - 0x6d, 0x73, 0x67, 0x49, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x66, 0x72, 0x6f, 0x6d, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x03, 0x52, 0x04, 0x66, 0x72, 0x6f, 0x6d, 0x12, 0x0e, 0x0a, 0x02, 0x74, 0x6f, 0x18, - 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x02, 0x74, 0x6f, 0x12, 0x3e, 0x0a, 0x0c, 0x73, 0x65, 0x73, - 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0e, 0x32, - 0x1b, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x31, - 0x2e, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x52, 0x0b, 0x73, 0x65, - 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x73, 0x65, 0x73, - 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x73, - 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x12, 0x45, 0x0a, 0x0c, 0x63, 0x6f, 0x6e, 0x74, - 0x65, 0x6e, 0x74, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x22, - 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x31, 0x2e, - 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x54, 0x79, - 0x70, 0x65, 0x52, 0x0b, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x54, 0x79, 0x70, 0x65, 0x12, - 0x18, 0x0a, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x12, 0x1f, 0x0a, 0x0b, 0x63, 0x72, 0x65, - 0x61, 0x74, 0x65, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x08, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0a, - 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x22, 0x5e, 0x0a, 0x0e, 0x50, 0x75, - 0x73, 0x68, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x52, 0x65, 0x71, 0x12, 0x31, 0x0a, 0x07, - 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, - 0x61, 0x70, 0x69, 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x4d, - 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x52, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, - 0x19, 0x0a, 0x08, 0x74, 0x6f, 0x5f, 0x75, 0x73, 0x65, 0x72, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, - 0x03, 0x52, 0x07, 0x74, 0x6f, 0x55, 0x73, 0x65, 0x72, 0x73, 0x22, 0x76, 0x0a, 0x0f, 0x50, 0x75, - 0x73, 0x68, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x52, 0x65, 0x73, 0x70, 0x12, 0x40, 0x0a, - 0x08, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x24, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x2e, - 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x42, 0x61, 0x73, 0x65, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x52, 0x08, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, - 0x21, 0x0a, 0x0c, 0x66, 0x61, 0x69, 0x6c, 0x65, 0x64, 0x5f, 0x75, 0x73, 0x65, 0x72, 0x73, 0x18, - 0x02, 0x20, 0x03, 0x28, 0x03, 0x52, 0x0b, 0x66, 0x61, 0x69, 0x6c, 0x65, 0x64, 0x55, 0x73, 0x65, - 0x72, 0x73, 0x22, 0xb6, 0x01, 0x0a, 0x16, 0x51, 0x75, 0x65, 0x72, 0x79, 0x4f, 0x66, 0x66, 0x6c, - 0x69, 0x6e, 0x65, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x52, 0x65, 0x71, 0x12, 0x19, 0x0a, - 0x03, 0x75, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x22, - 0x02, 0x20, 0x00, 0x52, 0x03, 0x75, 0x69, 0x64, 0x12, 0x27, 0x0a, 0x0b, 0x6c, 0x61, 0x73, 0x74, - 0x5f, 0x6d, 0x73, 0x67, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x42, 0x07, 0xfa, - 0x42, 0x04, 0x22, 0x02, 0x20, 0x00, 0x52, 0x09, 0x6c, 0x61, 0x73, 0x74, 0x4d, 0x73, 0x67, 0x49, - 0x64, 0x12, 0x1c, 0x0a, 0x09, 0x6f, 0x6e, 0x6c, 0x79, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x03, - 0x20, 0x01, 0x28, 0x08, 0x52, 0x09, 0x6f, 0x6e, 0x6c, 0x79, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x12, - 0x12, 0x0a, 0x04, 0x70, 0x61, 0x67, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x05, 0x52, 0x04, 0x70, - 0x61, 0x67, 0x65, 0x12, 0x26, 0x0a, 0x09, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x73, 0x69, 0x7a, 0x65, - 0x18, 0x05, 0x20, 0x01, 0x28, 0x05, 0x42, 0x09, 0xfa, 0x42, 0x06, 0x1a, 0x04, 0x18, 0x64, 0x28, - 0x01, 0x52, 0x08, 0x70, 0x61, 0x67, 0x65, 0x53, 0x69, 0x7a, 0x65, 0x22, 0xa6, 0x01, 0x0a, 0x17, - 0x51, 0x75, 0x65, 0x72, 0x79, 0x4f, 0x66, 0x66, 0x6c, 0x69, 0x6e, 0x65, 0x4d, 0x65, 0x73, 0x73, - 0x61, 0x67, 0x65, 0x52, 0x65, 0x73, 0x70, 0x12, 0x40, 0x0a, 0x08, 0x72, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x61, 0x70, 0x69, 0x2e, - 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x2e, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x2e, 0x42, 0x61, 0x73, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x52, - 0x08, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x74, 0x6f, 0x74, - 0x61, 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x12, - 0x33, 0x0a, 0x08, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, - 0x0b, 0x32, 0x17, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x2e, - 0x76, 0x31, 0x2e, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x52, 0x08, 0x6d, 0x65, 0x73, 0x73, - 0x61, 0x67, 0x65, 0x73, 0x2a, 0x34, 0x0a, 0x12, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x43, - 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x54, 0x79, 0x70, 0x65, 0x12, 0x08, 0x0a, 0x04, 0x54, 0x65, - 0x78, 0x74, 0x10, 0x00, 0x12, 0x09, 0x0a, 0x05, 0x49, 0x6d, 0x61, 0x67, 0x65, 0x10, 0x01, 0x12, - 0x09, 0x0a, 0x05, 0x56, 0x6f, 0x69, 0x63, 0x65, 0x10, 0x02, 0x2a, 0x48, 0x0a, 0x0b, 0x53, 0x65, - 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x12, 0x0e, 0x0a, 0x0a, 0x53, 0x69, 0x6e, - 0x67, 0x6c, 0x65, 0x43, 0x68, 0x61, 0x74, 0x10, 0x00, 0x12, 0x0d, 0x0a, 0x09, 0x47, 0x72, 0x6f, - 0x75, 0x70, 0x43, 0x68, 0x61, 0x74, 0x10, 0x01, 0x12, 0x0d, 0x0a, 0x09, 0x42, 0x72, 0x6f, 0x61, - 0x64, 0x63, 0x61, 0x73, 0x74, 0x10, 0x02, 0x12, 0x0b, 0x0a, 0x07, 0x43, 0x68, 0x61, 0x6e, 0x6e, - 0x65, 0x6c, 0x10, 0x03, 0x32, 0x64, 0x0a, 0x12, 0x50, 0x75, 0x73, 0x68, 0x4d, 0x65, 0x73, 0x73, - 0x61, 0x67, 0x65, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x4e, 0x0a, 0x0b, 0x50, 0x75, - 0x73, 0x68, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x1e, 0x2e, 0x61, 0x70, 0x69, 0x2e, - 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x75, 0x73, 0x68, 0x4d, - 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x52, 0x65, 0x71, 0x1a, 0x1f, 0x2e, 0x61, 0x70, 0x69, 0x2e, - 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x75, 0x73, 0x68, 0x4d, - 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x52, 0x65, 0x73, 0x70, 0x32, 0x7f, 0x0a, 0x15, 0x4f, 0x66, - 0x66, 0x6c, 0x69, 0x6e, 0x65, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x53, 0x65, 0x72, 0x76, - 0x69, 0x63, 0x65, 0x12, 0x66, 0x0a, 0x13, 0x51, 0x75, 0x65, 0x72, 0x79, 0x4f, 0x66, 0x66, 0x6c, - 0x69, 0x6e, 0x65, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x26, 0x2e, 0x61, 0x70, 0x69, - 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, - 0x79, 0x4f, 0x66, 0x66, 0x6c, 0x69, 0x6e, 0x65, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x52, - 0x65, 0x71, 0x1a, 0x27, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, - 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x4f, 0x66, 0x66, 0x6c, 0x69, 0x6e, 0x65, - 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x52, 0x65, 0x73, 0x70, 0x42, 0x23, 0x5a, 0x21, 0x67, - 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x67, 0x6f, 0x2d, 0x67, 0x6f, 0x69, - 0x6d, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x2f, 0x76, 0x31, - 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x22, 0xa5, 0x02, 0x0a, 0x07, 0x4d, 0x65, + 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x15, 0x0a, 0x06, 0x6d, 0x73, 0x67, 0x5f, 0x69, 0x64, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x6d, 0x73, 0x67, 0x49, 0x64, 0x12, 0x12, 0x0a, 0x04, + 0x66, 0x72, 0x6f, 0x6d, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x04, 0x66, 0x72, 0x6f, 0x6d, + 0x12, 0x0e, 0x0a, 0x02, 0x74, 0x6f, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x02, 0x74, 0x6f, + 0x12, 0x3e, 0x0a, 0x0c, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x79, 0x70, 0x65, + 0x18, 0x04, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1b, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x6d, 0x65, 0x73, + 0x73, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x54, + 0x79, 0x70, 0x65, 0x52, 0x0b, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x54, 0x79, 0x70, 0x65, + 0x12, 0x1d, 0x0a, 0x0a, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x05, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x12, + 0x45, 0x0a, 0x0c, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, + 0x06, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x22, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x6d, 0x65, 0x73, 0x73, + 0x61, 0x67, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x43, 0x6f, + 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x54, 0x79, 0x70, 0x65, 0x52, 0x0b, 0x63, 0x6f, 0x6e, 0x74, 0x65, + 0x6e, 0x74, 0x54, 0x79, 0x70, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, + 0x74, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, + 0x12, 0x1f, 0x0a, 0x0b, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, + 0x08, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0a, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x54, 0x69, 0x6d, + 0x65, 0x22, 0x5e, 0x0a, 0x0e, 0x50, 0x75, 0x73, 0x68, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, + 0x52, 0x65, 0x71, 0x12, 0x31, 0x0a, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, + 0x67, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x52, 0x07, 0x6d, + 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x19, 0x0a, 0x08, 0x74, 0x6f, 0x5f, 0x75, 0x73, 0x65, + 0x72, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x03, 0x52, 0x07, 0x74, 0x6f, 0x55, 0x73, 0x65, 0x72, + 0x73, 0x22, 0x76, 0x0a, 0x0f, 0x50, 0x75, 0x73, 0x68, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, + 0x52, 0x65, 0x73, 0x70, 0x12, 0x40, 0x0a, 0x08, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x74, 0x72, 0x61, + 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x2e, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, + 0x42, 0x61, 0x73, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x52, 0x08, 0x72, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x21, 0x0a, 0x0c, 0x66, 0x61, 0x69, 0x6c, 0x65, 0x64, + 0x5f, 0x75, 0x73, 0x65, 0x72, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x03, 0x52, 0x0b, 0x66, 0x61, + 0x69, 0x6c, 0x65, 0x64, 0x55, 0x73, 0x65, 0x72, 0x73, 0x22, 0xb6, 0x01, 0x0a, 0x16, 0x51, 0x75, + 0x65, 0x72, 0x79, 0x4f, 0x66, 0x66, 0x6c, 0x69, 0x6e, 0x65, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, + 0x65, 0x52, 0x65, 0x71, 0x12, 0x19, 0x0a, 0x03, 0x75, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x03, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x22, 0x02, 0x20, 0x00, 0x52, 0x03, 0x75, 0x69, 0x64, 0x12, + 0x27, 0x0a, 0x0b, 0x6c, 0x61, 0x73, 0x74, 0x5f, 0x6d, 0x73, 0x67, 0x5f, 0x69, 0x64, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x03, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x22, 0x02, 0x20, 0x00, 0x52, 0x09, 0x6c, + 0x61, 0x73, 0x74, 0x4d, 0x73, 0x67, 0x49, 0x64, 0x12, 0x1c, 0x0a, 0x09, 0x6f, 0x6e, 0x6c, 0x79, + 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x09, 0x6f, 0x6e, 0x6c, + 0x79, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x70, 0x61, 0x67, 0x65, 0x18, 0x04, + 0x20, 0x01, 0x28, 0x05, 0x52, 0x04, 0x70, 0x61, 0x67, 0x65, 0x12, 0x26, 0x0a, 0x09, 0x70, 0x61, + 0x67, 0x65, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x05, 0x42, 0x09, 0xfa, + 0x42, 0x06, 0x1a, 0x04, 0x18, 0x64, 0x28, 0x01, 0x52, 0x08, 0x70, 0x61, 0x67, 0x65, 0x53, 0x69, + 0x7a, 0x65, 0x22, 0xa6, 0x01, 0x0a, 0x17, 0x51, 0x75, 0x65, 0x72, 0x79, 0x4f, 0x66, 0x66, 0x6c, + 0x69, 0x6e, 0x65, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x52, 0x65, 0x73, 0x70, 0x12, 0x40, + 0x0a, 0x08, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x24, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, + 0x2e, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x42, 0x61, 0x73, 0x65, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x52, 0x08, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x12, 0x14, 0x0a, 0x05, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, + 0x05, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x12, 0x33, 0x0a, 0x08, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, + 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x6d, + 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, + 0x65, 0x52, 0x08, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x2a, 0x34, 0x0a, 0x12, 0x4d, + 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x54, 0x79, 0x70, + 0x65, 0x12, 0x08, 0x0a, 0x04, 0x54, 0x65, 0x78, 0x74, 0x10, 0x00, 0x12, 0x09, 0x0a, 0x05, 0x49, + 0x6d, 0x61, 0x67, 0x65, 0x10, 0x01, 0x12, 0x09, 0x0a, 0x05, 0x56, 0x6f, 0x69, 0x63, 0x65, 0x10, + 0x02, 0x2a, 0x48, 0x0a, 0x0b, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x54, 0x79, 0x70, 0x65, + 0x12, 0x0e, 0x0a, 0x0a, 0x53, 0x69, 0x6e, 0x67, 0x6c, 0x65, 0x43, 0x68, 0x61, 0x74, 0x10, 0x00, + 0x12, 0x0d, 0x0a, 0x09, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x43, 0x68, 0x61, 0x74, 0x10, 0x01, 0x12, + 0x0d, 0x0a, 0x09, 0x42, 0x72, 0x6f, 0x61, 0x64, 0x63, 0x61, 0x73, 0x74, 0x10, 0x02, 0x12, 0x0b, + 0x0a, 0x07, 0x43, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x10, 0x03, 0x32, 0x64, 0x0a, 0x12, 0x50, + 0x75, 0x73, 0x68, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, + 0x65, 0x12, 0x4e, 0x0a, 0x0b, 0x50, 0x75, 0x73, 0x68, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, + 0x12, 0x1e, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x2e, 0x76, + 0x31, 0x2e, 0x50, 0x75, 0x73, 0x68, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x52, 0x65, 0x71, + 0x1a, 0x1f, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x2e, 0x76, + 0x31, 0x2e, 0x50, 0x75, 0x73, 0x68, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x52, 0x65, 0x73, + 0x70, 0x32, 0x7f, 0x0a, 0x15, 0x4f, 0x66, 0x66, 0x6c, 0x69, 0x6e, 0x65, 0x4d, 0x65, 0x73, 0x73, + 0x61, 0x67, 0x65, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x66, 0x0a, 0x13, 0x51, 0x75, + 0x65, 0x72, 0x79, 0x4f, 0x66, 0x66, 0x6c, 0x69, 0x6e, 0x65, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, + 0x65, 0x12, 0x26, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x2e, + 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x4f, 0x66, 0x66, 0x6c, 0x69, 0x6e, 0x65, 0x4d, + 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x52, 0x65, 0x71, 0x1a, 0x27, 0x2e, 0x61, 0x70, 0x69, 0x2e, + 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, + 0x4f, 0x66, 0x66, 0x6c, 0x69, 0x6e, 0x65, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x52, 0x65, + 0x73, 0x70, 0x42, 0x23, 0x5a, 0x21, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, + 0x2f, 0x67, 0x6f, 0x2d, 0x67, 0x6f, 0x69, 0x6d, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x6d, 0x65, 0x73, + 0x73, 0x61, 0x67, 0x65, 0x2f, 0x76, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -756,32 +695,31 @@ func file_message_v1_message_proto_rawDescGZIP() []byte { } var file_message_v1_message_proto_enumTypes = make([]protoimpl.EnumInfo, 2) -var file_message_v1_message_proto_msgTypes = make([]protoimpl.MessageInfo, 7) +var file_message_v1_message_proto_msgTypes = make([]protoimpl.MessageInfo, 6) var file_message_v1_message_proto_goTypes = []interface{}{ (MessageContentType)(0), // 0: api.message.v1.MessageContentType (SessionType)(0), // 1: api.message.v1.SessionType (*SendMessageReq)(nil), // 2: api.message.v1.SendMessageReq - (*SendMessageResp)(nil), // 3: api.message.v1.SendMessageResp - (*Message)(nil), // 4: api.message.v1.Message - (*PushMessageReq)(nil), // 5: api.message.v1.PushMessageReq - (*PushMessageResp)(nil), // 6: api.message.v1.PushMessageResp - (*QueryOfflineMessageReq)(nil), // 7: api.message.v1.QueryOfflineMessageReq - (*QueryOfflineMessageResp)(nil), // 8: api.message.v1.QueryOfflineMessageResp - (*response.BaseResponse)(nil), // 9: api.transport.response.BaseResponse + (*Message)(nil), // 3: api.message.v1.Message + (*PushMessageReq)(nil), // 4: api.message.v1.PushMessageReq + (*PushMessageResp)(nil), // 5: api.message.v1.PushMessageResp + (*QueryOfflineMessageReq)(nil), // 6: api.message.v1.QueryOfflineMessageReq + (*QueryOfflineMessageResp)(nil), // 7: api.message.v1.QueryOfflineMessageResp + (*response.BaseResponse)(nil), // 8: api.transport.response.BaseResponse } var file_message_v1_message_proto_depIdxs = []int32{ 1, // 0: api.message.v1.SendMessageReq.session_type:type_name -> api.message.v1.SessionType 0, // 1: api.message.v1.SendMessageReq.content_type:type_name -> api.message.v1.MessageContentType 1, // 2: api.message.v1.Message.session_type:type_name -> api.message.v1.SessionType 0, // 3: api.message.v1.Message.content_type:type_name -> api.message.v1.MessageContentType - 4, // 4: api.message.v1.PushMessageReq.message:type_name -> api.message.v1.Message - 9, // 5: api.message.v1.PushMessageResp.response:type_name -> api.transport.response.BaseResponse - 9, // 6: api.message.v1.QueryOfflineMessageResp.response:type_name -> api.transport.response.BaseResponse - 4, // 7: api.message.v1.QueryOfflineMessageResp.messages:type_name -> api.message.v1.Message - 5, // 8: api.message.v1.PushMessageService.PushMessage:input_type -> api.message.v1.PushMessageReq - 7, // 9: api.message.v1.OfflineMessageService.QueryOfflineMessage:input_type -> api.message.v1.QueryOfflineMessageReq - 6, // 10: api.message.v1.PushMessageService.PushMessage:output_type -> api.message.v1.PushMessageResp - 8, // 11: api.message.v1.OfflineMessageService.QueryOfflineMessage:output_type -> api.message.v1.QueryOfflineMessageResp + 3, // 4: api.message.v1.PushMessageReq.message:type_name -> api.message.v1.Message + 8, // 5: api.message.v1.PushMessageResp.response:type_name -> api.transport.response.BaseResponse + 8, // 6: api.message.v1.QueryOfflineMessageResp.response:type_name -> api.transport.response.BaseResponse + 3, // 7: api.message.v1.QueryOfflineMessageResp.messages:type_name -> api.message.v1.Message + 4, // 8: api.message.v1.PushMessageService.PushMessage:input_type -> api.message.v1.PushMessageReq + 6, // 9: api.message.v1.OfflineMessageService.QueryOfflineMessage:input_type -> api.message.v1.QueryOfflineMessageReq + 5, // 10: api.message.v1.PushMessageService.PushMessage:output_type -> api.message.v1.PushMessageResp + 7, // 11: api.message.v1.OfflineMessageService.QueryOfflineMessage:output_type -> api.message.v1.QueryOfflineMessageResp 10, // [10:12] is the sub-list for method output_type 8, // [8:10] is the sub-list for method input_type 8, // [8:8] is the sub-list for extension type_name @@ -808,18 +746,6 @@ func file_message_v1_message_proto_init() { } } file_message_v1_message_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*SendMessageResp); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_message_v1_message_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*Message); i { case 0: return &v.state @@ -831,7 +757,7 @@ func file_message_v1_message_proto_init() { return nil } } - file_message_v1_message_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + file_message_v1_message_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PushMessageReq); i { case 0: return &v.state @@ -843,7 +769,7 @@ func file_message_v1_message_proto_init() { return nil } } - file_message_v1_message_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + file_message_v1_message_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PushMessageResp); i { case 0: return &v.state @@ -855,7 +781,7 @@ func file_message_v1_message_proto_init() { return nil } } - file_message_v1_message_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + file_message_v1_message_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*QueryOfflineMessageReq); i { case 0: return &v.state @@ -867,7 +793,7 @@ func file_message_v1_message_proto_init() { return nil } } - file_message_v1_message_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { + file_message_v1_message_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*QueryOfflineMessageResp); i { case 0: return &v.state @@ -887,7 +813,7 @@ func file_message_v1_message_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_message_v1_message_proto_rawDesc, NumEnums: 2, - NumMessages: 7, + NumMessages: 6, NumExtensions: 0, NumServices: 2, }, diff --git a/message/v1/message.pb.validate.go b/message/v1/message.pb.validate.go index a900709..cd56a4d 100644 --- a/message/v1/message.pb.validate.go +++ b/message/v1/message.pb.validate.go @@ -185,110 +185,6 @@ var _ interface { ErrorName() string } = SendMessageReqValidationError{} -// Validate checks the field values on SendMessageResp with the rules defined -// in the proto definition for this message. If any rules are violated, the -// first error encountered is returned, or nil if there are no violations. -func (m *SendMessageResp) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on SendMessageResp with the rules -// defined in the proto definition for this message. If any rules are -// violated, the result is a list of violation errors wrapped in -// SendMessageRespMultiError, or nil if none found. -func (m *SendMessageResp) ValidateAll() error { - return m.validate(true) -} - -func (m *SendMessageResp) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - // no validation rules for SessionId - - // no validation rules for MsgId - - if len(errors) > 0 { - return SendMessageRespMultiError(errors) - } - - return nil -} - -// SendMessageRespMultiError is an error wrapping multiple validation errors -// returned by SendMessageResp.ValidateAll() if the designated constraints -// aren't met. -type SendMessageRespMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m SendMessageRespMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m SendMessageRespMultiError) AllErrors() []error { return m } - -// SendMessageRespValidationError is the validation error returned by -// SendMessageResp.Validate if the designated constraints aren't met. -type SendMessageRespValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e SendMessageRespValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e SendMessageRespValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e SendMessageRespValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e SendMessageRespValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e SendMessageRespValidationError) ErrorName() string { return "SendMessageRespValidationError" } - -// Error satisfies the builtin error interface -func (e SendMessageRespValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sSendMessageResp.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = SendMessageRespValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = SendMessageRespValidationError{} - // Validate checks the field values on Message with the rules defined in the // proto definition for this message. If any rules are violated, the first // error encountered is returned, or nil if there are no violations. diff --git a/message/v1/message.proto b/message/v1/message.proto index 39b19b9..7413408 100644 --- a/message/v1/message.proto +++ b/message/v1/message.proto @@ -37,12 +37,6 @@ message SendMessageReq { }]; } -// SendMessageResp is response body for sendMessage -message SendMessageResp { - string session_id = 1; - int64 msg_id = 2; -} - // Message is definition of message message Message { int64 msg_id = 1; diff --git a/transport/response/response.pb.go b/transport/response/response.pb.go index a3ee455..a21b093 100644 --- a/transport/response/response.pb.go +++ b/transport/response/response.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.27.1 +// protoc-gen-go v1.26.0 // protoc (unknown) // source: transport/response/response.proto diff --git a/user/friend/v1/friend.pb.go b/user/friend/v1/friend.pb.go index d18fd85..67508eb 100644 --- a/user/friend/v1/friend.pb.go +++ b/user/friend/v1/friend.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.27.1 +// protoc-gen-go v1.26.0 // protoc (unknown) // source: user/friend/v1/friend.proto @@ -1099,7 +1099,7 @@ func (x *CheckSendMessageAbilityRequest) GetSessionType() v1.SessionType { if x != nil { return x.SessionType } - return v1.SessionType(0) + return v1.SessionType_SingleChat } type CheckSendMessageAbilityResponse struct { diff --git a/user/group/v1/group.pb.go b/user/group/v1/group.pb.go index 48d804f..0013e5c 100644 --- a/user/group/v1/group.pb.go +++ b/user/group/v1/group.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.27.1 +// protoc-gen-go v1.26.0 // protoc (unknown) // source: user/group/v1/group.proto diff --git a/user/v1/user.pb.go b/user/v1/user.pb.go index 034631d..a4dcb7f 100644 --- a/user/v1/user.pb.go +++ b/user/v1/user.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.27.1 +// protoc-gen-go v1.26.0 // protoc (unknown) // source: user/v1/user.proto From 90b2d24240fee8c8c536b72ef379e88cc3862ead Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 28 Jul 2022 13:00:32 +0000 Subject: [PATCH 22/35] build(deps): bump google.golang.org/protobuf from 1.28.0 to 1.28.1 Bumps [google.golang.org/protobuf](https://github.com/protocolbuffers/protobuf-go) from 1.28.0 to 1.28.1. - [Release notes](https://github.com/protocolbuffers/protobuf-go/releases) - [Changelog](https://github.com/protocolbuffers/protobuf-go/blob/master/release.bash) - [Commits](https://github.com/protocolbuffers/protobuf-go/compare/v1.28.0...v1.28.1) --- updated-dependencies: - dependency-name: google.golang.org/protobuf dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- go.mod | 2 +- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index 0ac9692..8e5e037 100644 --- a/go.mod +++ b/go.mod @@ -6,7 +6,7 @@ require ( github.com/envoyproxy/protoc-gen-validate v0.6.7 github.com/stretchr/testify v1.8.0 google.golang.org/grpc v1.48.0 - google.golang.org/protobuf v1.28.0 + google.golang.org/protobuf v1.28.1 ) require ( diff --git a/go.sum b/go.sum index e394b96..4839627 100644 --- a/go.sum +++ b/go.sum @@ -160,8 +160,8 @@ google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlba google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= google.golang.org/protobuf v1.27.1/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= -google.golang.org/protobuf v1.28.0 h1:w43yiav+6bVFTBQFZX0r7ipe9JQ1QsbMgHwbBziscLw= -google.golang.org/protobuf v1.28.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= +google.golang.org/protobuf v1.28.1 h1:d0NfwRgPtno5B1Wa6L2DAG+KivqkdutMf1UhdNx175w= +google.golang.org/protobuf v1.28.1/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= From 07c5262a2ead50f2378f210588b5a69a866db3d7 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 24 Aug 2022 12:41:35 +0000 Subject: [PATCH 23/35] build(deps): bump google.golang.org/grpc from 1.48.0 to 1.49.0 Bumps [google.golang.org/grpc](https://github.com/grpc/grpc-go) from 1.48.0 to 1.49.0. - [Release notes](https://github.com/grpc/grpc-go/releases) - [Commits](https://github.com/grpc/grpc-go/compare/v1.48.0...v1.49.0) --- updated-dependencies: - dependency-name: google.golang.org/grpc dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- go.mod | 2 +- go.sum | 45 ++------------------------------------------- 2 files changed, 3 insertions(+), 44 deletions(-) diff --git a/go.mod b/go.mod index 0ac9692..80705fa 100644 --- a/go.mod +++ b/go.mod @@ -5,7 +5,7 @@ go 1.18 require ( github.com/envoyproxy/protoc-gen-validate v0.6.7 github.com/stretchr/testify v1.8.0 - google.golang.org/grpc v1.48.0 + google.golang.org/grpc v1.49.0 google.golang.org/protobuf v1.28.0 ) diff --git a/go.sum b/go.sum index e394b96..ed00459 100644 --- a/go.sum +++ b/go.sum @@ -1,41 +1,24 @@ cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= -cloud.google.com/go v0.34.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= -github.com/antihax/optional v1.0.0/go.mod h1:uupD/76wgC+ih3iEmQUL+0Ugr19nfwCT1kdvxnR2qWY= github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= -github.com/cespare/xxhash/v2 v2.1.1/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= -github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc= -github.com/cncf/udpa/go v0.0.0-20201120205902-5459f2c99403/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk= -github.com/cncf/udpa/go v0.0.0-20210930031921-04548b0d99d4/go.mod h1:6pvJx4me5XPnfI9Z40ddWsdw2W/uZgQLFXToKeRcDiI= -github.com/cncf/xds/go v0.0.0-20210922020428-25de7278fc84/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= -github.com/cncf/xds/go v0.0.0-20211001041855-01bcc9b48dfe/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= -github.com/cncf/xds/go v0.0.0-20211011173535-cb28da3451f1/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= -github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1mIlRU8Am5FuJP05cCM98= -github.com/envoyproxy/go-control-plane v0.9.9-0.20201210154907-fd9021fe5dad/go.mod h1:cXg6YxExXjJnVBQHBLXeUAgxn2UodCpnH306RInaBQk= -github.com/envoyproxy/go-control-plane v0.10.2-0.20220325020618-49ff273808a1/go.mod h1:KJwIaB5Mv44NWtYuAOFCVOjcI94vtpEz2JU/D2v6IjE= github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= github.com/envoyproxy/protoc-gen-validate v0.6.7 h1:qcZcULcd/abmQg6dwigimCNEyi4gg31M/xaciQlDml8= github.com/envoyproxy/protoc-gen-validate v0.6.7/go.mod h1:dyJXwwfPK2VSqiB9Klm1J6romD608Ba7Hij42vrOBCo= -github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= -github.com/golang/protobuf v1.3.3/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw= github.com/golang/protobuf v1.4.0-rc.1/go.mod h1:ceaxUfeHdC40wWswd/P6IGgMaK3YpKi5j83Wpe3EHw8= github.com/golang/protobuf v1.4.0-rc.1.0.20200221234624-67d41d38c208/go.mod h1:xKAWHe0F5eneWXFV3EuXVDTCmh+JuBKY0li0aMyXATA= github.com/golang/protobuf v1.4.0-rc.2/go.mod h1:LlEzMj4AhA7rCAGe4KMBDvJI+AwstrUpVNzEA03Pprs= github.com/golang/protobuf v1.4.0-rc.4.0.20200313231945-b860323f09d0/go.mod h1:WU3c8KckQ9AFe+yFwt9sWVRKCVIyN9cPHBJSNnbL67w= github.com/golang/protobuf v1.4.0/go.mod h1:jodUvKwWbYaEsadDk5Fwe5c77LiNKVO9IDvqG2KuDX0= github.com/golang/protobuf v1.4.1/go.mod h1:U8fpvMrcmy5pZrNK1lt4xCsGvpyWQ/VVv6QDs8UjoX8= -github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= -github.com/golang/protobuf v1.4.3/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk= github.com/golang/protobuf v1.5.2 h1:ROPKBNFfQgOUMifHyP+KYbvpjbdoFNs+aK7DXlji0Tw= github.com/golang/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= @@ -43,12 +26,8 @@ github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5a github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.6 h1:BKbKCqvP6I+rmFHt06ZmyQtvB8xAkWdhFyr0ZUNZcxQ= -github.com/google/go-cmp v0.5.6/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= -github.com/grpc-ecosystem/grpc-gateway v1.16.0/go.mod h1:BDjrQk3hbvj6Nolgz8mAMFbcEtjT1g+wF4CSlocrBnw= github.com/iancoleman/strcase v0.2.0/go.mod h1:iwCmte+B7n89clKwxIoIXy/HfoL7AsD47ZCWhYzw7ho= github.com/kr/fs v0.1.0/go.mod h1:FFnZGqtBN9Gxj7eW1uZ42v5BccTP0vu6NEaFoC2HwRg= github.com/lyft/protoc-gen-star v0.6.0/go.mod h1:TGAoBVkt8w7MPG72TrKIu85MIdXwDuzJYeZuUPFPNwA= @@ -57,24 +36,19 @@ github.com/pkg/sftp v1.10.1/go.mod h1:lYOWFsE0bwd1+KfKJaKeuokY15vzFx25BLbzYYoAxZ github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= -github.com/rogpeppe/fastuuid v1.2.0/go.mod h1:jVj6XXZzXRy/MSR5jhDC/2q6DgLz+nrA6LYCDYWNEvQ= github.com/spf13/afero v1.3.3/go.mod h1:5KUK8ByomD5Ti5Artl0RtHeI5pTF7MIDuXL3yY520V4= github.com/spf13/afero v1.6.0/go.mod h1:Ai8FlHk4v/PARR026UzYexafAt9roJ7LcLMAmO6Z93I= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw= github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= -github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA= github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= -github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.8.0 h1:pSgiaMZlXftHpm5L7V1+rVB+AZJydKsMxsQBIJw4PKk= github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU= github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= -go.opentelemetry.io/proto/otlp v0.7.0/go.mod h1:PqfVotwruBrMGOCsRd/89rSnXhoiJIqeYNgFYFoEGnI= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/crypto v0.0.0-20190820162420-60c769a6c586/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= -golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvxsM5YxQ5yQlVC4a0KAMCusXpPoU= @@ -85,30 +59,22 @@ golang.org/x/mod v0.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.5.0/go.mod h1:5OXOZSfqPIIbmVBIIKWRFfZjPR0E5r58TLhUjH0a2Ro= golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20200822124328-c89045814202/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= -golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4/go.mod h1:p54w0d4576C0XHj96bSt6lcn1PtDYWL6XObtHCRCNQM= golang.org/x/net v0.0.0-20210813160813-60bc85c4be6d h1:LO7XpTYMwTqxjLcGWPijK3vRXg1aWdlNOVOHRq45d7c= golang.org/x/net v0.0.0-20210813160813-60bc85c4be6d/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= -golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210119212857-b64e53b001e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210330210617-4fbd30eecc44/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210510120138-977fb7262007/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= @@ -137,26 +103,20 @@ google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9Ywl google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= -google.golang.org/genproto v0.0.0-20200513103714-09dca8ec2884/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013 h1:+kGHl1aib/qcwaRi1CbqBZ1rk19r85MNUf8HaBghugY= google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013/go.mod h1:NbSheEEYHJ7i3ixzK3sjbqSGDJWnxyFXZblF3eUsNvo= google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= -google.golang.org/grpc v1.25.1/go.mod h1:c3i+UQWmh7LiEpx4sFZnkU36qjEYZ0imhYfXVyQciAY= google.golang.org/grpc v1.27.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= -google.golang.org/grpc v1.33.1/go.mod h1:fr5YgcSWrqhRRxogOsw7RzIpsmvOZ6IcH4kBYTpR3n0= -google.golang.org/grpc v1.36.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= -google.golang.org/grpc v1.48.0 h1:rQOsyJ/8+ufEDJd/Gdsz7HG220Mh9HAhFHRGnIjda0w= -google.golang.org/grpc v1.48.0/go.mod h1:vN9eftEi1UMyUsIF80+uQXhHjbXYbm0uXoFCACuMGWk= +google.golang.org/grpc v1.49.0 h1:WTLtQzmQori5FUH25Pq4WT22oCsv8USpQ+F6rqtsmxw= +google.golang.org/grpc v1.49.0/go.mod h1:ZgQEeidpAuNRZ8iRrlBKXZQP1ghovWIVhdJRyCDK+GI= google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM= google.golang.org/protobuf v1.20.1-0.20200309200217-e05f789c0967/go.mod h1:A+miEFZTKqfCUM6K7xSMQL9OKL/b6hQv+e19PK+JZNE= google.golang.org/protobuf v1.21.0/go.mod h1:47Nbq4nVaFHyn7ilMalzfO3qCViNmqZ2kzikPIcrTAo= google.golang.org/protobuf v1.22.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= -google.golang.org/protobuf v1.23.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= google.golang.org/protobuf v1.23.1-0.20200526195155-81db48ad09cc/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= -google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlbajtzgsN7c= google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= google.golang.org/protobuf v1.27.1/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= @@ -165,7 +125,6 @@ google.golang.org/protobuf v1.28.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqw gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= 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.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= From a7abf680f960c5960361fbd26b5432baaf3f7a7e Mon Sep 17 00:00:00 2001 From: yusank Date: Fri, 2 Sep 2022 15:52:17 +0800 Subject: [PATCH 24/35] feat: update message pb --- message/v1/message.ext.go | 32 ++ message/v1/message.pb.go | 557 ++++++++++++++++++++++++------ message/v1/message.pb.validate.go | 534 ++++++++++++++++++++++++++++ message/v1/message.proto | 21 ++ user/friend/v1/friend.pb.go | 8 +- user/friend/v1/friend.proto | 2 +- 6 files changed, 1035 insertions(+), 119 deletions(-) create mode 100644 message/v1/message.ext.go diff --git a/message/v1/message.ext.go b/message/v1/message.ext.go new file mode 100644 index 0000000..44d9bde --- /dev/null +++ b/message/v1/message.ext.go @@ -0,0 +1,32 @@ +package v1 + +import ( + "strconv" +) + +// This file is for extend proto generated structs methods. + +func (x *StorageMessage) HbaseRowKey() string { + return x.RowKey +} + +func (x *StorageMessage) HbaseValues() map[string]map[string][]byte { + return map[string]map[string][]byte{ + "users": { + "from": []byte(strconv.FormatInt(x.Users.FromID, 10)), + "to": []byte(strconv.FormatInt(x.Users.ToID, 10)), + "sessionId": []byte(x.Users.SessionID), + }, + "content": { + "type": []byte(strconv.Itoa(int(x.Content.ContentType))), + "text": []byte(x.Content.Content), // TODO: use content instead of text + }, + "extra": { + "timestamp": []byte(strconv.FormatInt(x.Extra.CreateTime.Seconds, 10)), + }, + } +} + +func (x *StorageMessage) TableName() string { + return "message_history" +} diff --git a/message/v1/message.pb.go b/message/v1/message.pb.go index b1ba857..ead9050 100644 --- a/message/v1/message.pb.go +++ b/message/v1/message.pb.go @@ -11,6 +11,7 @@ import ( response "github.com/go-goim/api/transport/response" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" + timestamppb "google.golang.org/protobuf/types/known/timestamppb" reflect "reflect" sync "sync" ) @@ -572,114 +573,384 @@ func (x *QueryOfflineMessageResp) GetMessages() []*Message { return nil } +// storage message +type StorageMessage struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + RowKey string `protobuf:"bytes,1,opt,name=rowKey,proto3" json:"rowKey,omitempty"` + Users *StorageMessage_Users `protobuf:"bytes,2,opt,name=users,proto3" json:"users,omitempty"` + Content *StorageMessage_Content `protobuf:"bytes,3,opt,name=content,proto3" json:"content,omitempty"` + Extra *StorageMessage_Extra `protobuf:"bytes,4,opt,name=extra,proto3" json:"extra,omitempty"` +} + +func (x *StorageMessage) Reset() { + *x = StorageMessage{} + if protoimpl.UnsafeEnabled { + mi := &file_message_v1_message_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *StorageMessage) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*StorageMessage) ProtoMessage() {} + +func (x *StorageMessage) ProtoReflect() protoreflect.Message { + mi := &file_message_v1_message_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 StorageMessage.ProtoReflect.Descriptor instead. +func (*StorageMessage) Descriptor() ([]byte, []int) { + return file_message_v1_message_proto_rawDescGZIP(), []int{6} +} + +func (x *StorageMessage) GetRowKey() string { + if x != nil { + return x.RowKey + } + return "" +} + +func (x *StorageMessage) GetUsers() *StorageMessage_Users { + if x != nil { + return x.Users + } + return nil +} + +func (x *StorageMessage) GetContent() *StorageMessage_Content { + if x != nil { + return x.Content + } + return nil +} + +func (x *StorageMessage) GetExtra() *StorageMessage_Extra { + if x != nil { + return x.Extra + } + return nil +} + +type StorageMessage_Users struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + FromID int64 `protobuf:"varint,1,opt,name=fromID,proto3" json:"fromID,omitempty"` + ToID int64 `protobuf:"varint,2,opt,name=toID,proto3" json:"toID,omitempty"` + SessionID string `protobuf:"bytes,3,opt,name=sessionID,proto3" json:"sessionID,omitempty"` +} + +func (x *StorageMessage_Users) Reset() { + *x = StorageMessage_Users{} + if protoimpl.UnsafeEnabled { + mi := &file_message_v1_message_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *StorageMessage_Users) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*StorageMessage_Users) ProtoMessage() {} + +func (x *StorageMessage_Users) ProtoReflect() protoreflect.Message { + mi := &file_message_v1_message_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 StorageMessage_Users.ProtoReflect.Descriptor instead. +func (*StorageMessage_Users) Descriptor() ([]byte, []int) { + return file_message_v1_message_proto_rawDescGZIP(), []int{6, 0} +} + +func (x *StorageMessage_Users) GetFromID() int64 { + if x != nil { + return x.FromID + } + return 0 +} + +func (x *StorageMessage_Users) GetToID() int64 { + if x != nil { + return x.ToID + } + return 0 +} + +func (x *StorageMessage_Users) GetSessionID() string { + if x != nil { + return x.SessionID + } + return "" +} + +type StorageMessage_Content struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + ContentType MessageContentType `protobuf:"varint,1,opt,name=contentType,proto3,enum=api.message.v1.MessageContentType" json:"contentType,omitempty"` + Content string `protobuf:"bytes,2,opt,name=content,proto3" json:"content,omitempty"` +} + +func (x *StorageMessage_Content) Reset() { + *x = StorageMessage_Content{} + if protoimpl.UnsafeEnabled { + mi := &file_message_v1_message_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *StorageMessage_Content) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*StorageMessage_Content) ProtoMessage() {} + +func (x *StorageMessage_Content) ProtoReflect() protoreflect.Message { + mi := &file_message_v1_message_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 StorageMessage_Content.ProtoReflect.Descriptor instead. +func (*StorageMessage_Content) Descriptor() ([]byte, []int) { + return file_message_v1_message_proto_rawDescGZIP(), []int{6, 1} +} + +func (x *StorageMessage_Content) GetContentType() MessageContentType { + if x != nil { + return x.ContentType + } + return MessageContentType_Text +} + +func (x *StorageMessage_Content) GetContent() string { + if x != nil { + return x.Content + } + return "" +} + +type StorageMessage_Extra struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + CreateTime *timestamppb.Timestamp `protobuf:"bytes,1,opt,name=createTime,proto3" json:"createTime,omitempty"` +} + +func (x *StorageMessage_Extra) Reset() { + *x = StorageMessage_Extra{} + if protoimpl.UnsafeEnabled { + mi := &file_message_v1_message_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *StorageMessage_Extra) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*StorageMessage_Extra) ProtoMessage() {} + +func (x *StorageMessage_Extra) ProtoReflect() protoreflect.Message { + mi := &file_message_v1_message_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 StorageMessage_Extra.ProtoReflect.Descriptor instead. +func (*StorageMessage_Extra) Descriptor() ([]byte, []int) { + return file_message_v1_message_proto_rawDescGZIP(), []int{6, 2} +} + +func (x *StorageMessage_Extra) GetCreateTime() *timestamppb.Timestamp { + if x != nil { + return x.CreateTime + } + return nil +} + var File_message_v1_message_proto protoreflect.FileDescriptor var file_message_v1_message_proto_rawDesc = []byte{ 0x0a, 0x18, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x2f, 0x76, 0x31, 0x2f, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0e, 0x61, 0x70, 0x69, 0x2e, - 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x31, 0x1a, 0x21, 0x74, 0x72, 0x61, 0x6e, - 0x73, 0x70, 0x6f, 0x72, 0x74, 0x2f, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2f, 0x72, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x17, 0x76, - 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, - 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xb0, 0x02, 0x0a, 0x0e, 0x53, 0x65, 0x6e, 0x64, 0x4d, - 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x52, 0x65, 0x71, 0x12, 0x1b, 0x0a, 0x04, 0x66, 0x72, 0x6f, - 0x6d, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x22, 0x02, 0x20, 0x00, - 0x52, 0x04, 0x66, 0x72, 0x6f, 0x6d, 0x12, 0x17, 0x0a, 0x02, 0x74, 0x6f, 0x18, 0x02, 0x20, 0x01, - 0x28, 0x03, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x22, 0x02, 0x20, 0x00, 0x52, 0x02, 0x74, 0x6f, 0x12, - 0x3e, 0x0a, 0x0c, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, - 0x03, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1b, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x6d, 0x65, 0x73, 0x73, - 0x61, 0x67, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x54, 0x79, - 0x70, 0x65, 0x52, 0x0b, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x12, - 0x22, 0x0a, 0x0a, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x04, 0x20, - 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x09, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x49, 0x64, - 0x88, 0x01, 0x01, 0x12, 0x4f, 0x0a, 0x0c, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x5f, 0x74, - 0x79, 0x70, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x22, 0x2e, 0x61, 0x70, 0x69, 0x2e, - 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x65, 0x73, 0x73, 0x61, - 0x67, 0x65, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x54, 0x79, 0x70, 0x65, 0x42, 0x08, 0xfa, - 0x42, 0x05, 0x82, 0x01, 0x02, 0x10, 0x01, 0x52, 0x0b, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, - 0x54, 0x79, 0x70, 0x65, 0x12, 0x24, 0x0a, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x18, - 0x06, 0x20, 0x01, 0x28, 0x09, 0x42, 0x0a, 0xfa, 0x42, 0x07, 0x72, 0x05, 0x10, 0x01, 0x18, 0x80, - 0x20, 0x52, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x42, 0x0d, 0x0a, 0x0b, 0x5f, 0x73, - 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x22, 0xa5, 0x02, 0x0a, 0x07, 0x4d, 0x65, - 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x15, 0x0a, 0x06, 0x6d, 0x73, 0x67, 0x5f, 0x69, 0x64, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x6d, 0x73, 0x67, 0x49, 0x64, 0x12, 0x12, 0x0a, 0x04, - 0x66, 0x72, 0x6f, 0x6d, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x04, 0x66, 0x72, 0x6f, 0x6d, - 0x12, 0x0e, 0x0a, 0x02, 0x74, 0x6f, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x02, 0x74, 0x6f, + 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x31, 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, 0x21, 0x74, 0x72, 0x61, + 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x2f, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2f, + 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x17, + 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, + 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xb0, 0x02, 0x0a, 0x0e, 0x53, 0x65, 0x6e, 0x64, + 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x52, 0x65, 0x71, 0x12, 0x1b, 0x0a, 0x04, 0x66, 0x72, + 0x6f, 0x6d, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x22, 0x02, 0x20, + 0x00, 0x52, 0x04, 0x66, 0x72, 0x6f, 0x6d, 0x12, 0x17, 0x0a, 0x02, 0x74, 0x6f, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x03, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x22, 0x02, 0x20, 0x00, 0x52, 0x02, 0x74, 0x6f, 0x12, 0x3e, 0x0a, 0x0c, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x79, 0x70, 0x65, - 0x18, 0x04, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1b, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x6d, 0x65, 0x73, + 0x18, 0x03, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1b, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x52, 0x0b, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x54, 0x79, 0x70, 0x65, - 0x12, 0x1d, 0x0a, 0x0a, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x05, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x12, - 0x45, 0x0a, 0x0c, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, - 0x06, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x22, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x6d, 0x65, 0x73, 0x73, - 0x61, 0x67, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x43, 0x6f, - 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x54, 0x79, 0x70, 0x65, 0x52, 0x0b, 0x63, 0x6f, 0x6e, 0x74, 0x65, - 0x6e, 0x74, 0x54, 0x79, 0x70, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, - 0x74, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, - 0x12, 0x1f, 0x0a, 0x0b, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, - 0x08, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0a, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x54, 0x69, 0x6d, - 0x65, 0x22, 0x5e, 0x0a, 0x0e, 0x50, 0x75, 0x73, 0x68, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, - 0x52, 0x65, 0x71, 0x12, 0x31, 0x0a, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, - 0x67, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x52, 0x07, 0x6d, - 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x19, 0x0a, 0x08, 0x74, 0x6f, 0x5f, 0x75, 0x73, 0x65, - 0x72, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x03, 0x52, 0x07, 0x74, 0x6f, 0x55, 0x73, 0x65, 0x72, - 0x73, 0x22, 0x76, 0x0a, 0x0f, 0x50, 0x75, 0x73, 0x68, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, - 0x52, 0x65, 0x73, 0x70, 0x12, 0x40, 0x0a, 0x08, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x74, 0x72, 0x61, - 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x2e, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, - 0x42, 0x61, 0x73, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x52, 0x08, 0x72, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x21, 0x0a, 0x0c, 0x66, 0x61, 0x69, 0x6c, 0x65, 0x64, - 0x5f, 0x75, 0x73, 0x65, 0x72, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x03, 0x52, 0x0b, 0x66, 0x61, - 0x69, 0x6c, 0x65, 0x64, 0x55, 0x73, 0x65, 0x72, 0x73, 0x22, 0xb6, 0x01, 0x0a, 0x16, 0x51, 0x75, - 0x65, 0x72, 0x79, 0x4f, 0x66, 0x66, 0x6c, 0x69, 0x6e, 0x65, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, - 0x65, 0x52, 0x65, 0x71, 0x12, 0x19, 0x0a, 0x03, 0x75, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x03, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x22, 0x02, 0x20, 0x00, 0x52, 0x03, 0x75, 0x69, 0x64, 0x12, - 0x27, 0x0a, 0x0b, 0x6c, 0x61, 0x73, 0x74, 0x5f, 0x6d, 0x73, 0x67, 0x5f, 0x69, 0x64, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x03, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x22, 0x02, 0x20, 0x00, 0x52, 0x09, 0x6c, - 0x61, 0x73, 0x74, 0x4d, 0x73, 0x67, 0x49, 0x64, 0x12, 0x1c, 0x0a, 0x09, 0x6f, 0x6e, 0x6c, 0x79, - 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x09, 0x6f, 0x6e, 0x6c, - 0x79, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x70, 0x61, 0x67, 0x65, 0x18, 0x04, - 0x20, 0x01, 0x28, 0x05, 0x52, 0x04, 0x70, 0x61, 0x67, 0x65, 0x12, 0x26, 0x0a, 0x09, 0x70, 0x61, - 0x67, 0x65, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x05, 0x42, 0x09, 0xfa, - 0x42, 0x06, 0x1a, 0x04, 0x18, 0x64, 0x28, 0x01, 0x52, 0x08, 0x70, 0x61, 0x67, 0x65, 0x53, 0x69, - 0x7a, 0x65, 0x22, 0xa6, 0x01, 0x0a, 0x17, 0x51, 0x75, 0x65, 0x72, 0x79, 0x4f, 0x66, 0x66, 0x6c, - 0x69, 0x6e, 0x65, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x52, 0x65, 0x73, 0x70, 0x12, 0x40, - 0x0a, 0x08, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x24, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, - 0x2e, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x42, 0x61, 0x73, 0x65, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x52, 0x08, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x12, 0x14, 0x0a, 0x05, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, - 0x05, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x12, 0x33, 0x0a, 0x08, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, - 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x6d, - 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, - 0x65, 0x52, 0x08, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x2a, 0x34, 0x0a, 0x12, 0x4d, - 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x54, 0x79, 0x70, - 0x65, 0x12, 0x08, 0x0a, 0x04, 0x54, 0x65, 0x78, 0x74, 0x10, 0x00, 0x12, 0x09, 0x0a, 0x05, 0x49, - 0x6d, 0x61, 0x67, 0x65, 0x10, 0x01, 0x12, 0x09, 0x0a, 0x05, 0x56, 0x6f, 0x69, 0x63, 0x65, 0x10, - 0x02, 0x2a, 0x48, 0x0a, 0x0b, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x54, 0x79, 0x70, 0x65, - 0x12, 0x0e, 0x0a, 0x0a, 0x53, 0x69, 0x6e, 0x67, 0x6c, 0x65, 0x43, 0x68, 0x61, 0x74, 0x10, 0x00, - 0x12, 0x0d, 0x0a, 0x09, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x43, 0x68, 0x61, 0x74, 0x10, 0x01, 0x12, - 0x0d, 0x0a, 0x09, 0x42, 0x72, 0x6f, 0x61, 0x64, 0x63, 0x61, 0x73, 0x74, 0x10, 0x02, 0x12, 0x0b, - 0x0a, 0x07, 0x43, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x10, 0x03, 0x32, 0x64, 0x0a, 0x12, 0x50, - 0x75, 0x73, 0x68, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, - 0x65, 0x12, 0x4e, 0x0a, 0x0b, 0x50, 0x75, 0x73, 0x68, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, - 0x12, 0x1e, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x2e, 0x76, - 0x31, 0x2e, 0x50, 0x75, 0x73, 0x68, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x52, 0x65, 0x71, - 0x1a, 0x1f, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x2e, 0x76, - 0x31, 0x2e, 0x50, 0x75, 0x73, 0x68, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x52, 0x65, 0x73, - 0x70, 0x32, 0x7f, 0x0a, 0x15, 0x4f, 0x66, 0x66, 0x6c, 0x69, 0x6e, 0x65, 0x4d, 0x65, 0x73, 0x73, - 0x61, 0x67, 0x65, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x66, 0x0a, 0x13, 0x51, 0x75, - 0x65, 0x72, 0x79, 0x4f, 0x66, 0x66, 0x6c, 0x69, 0x6e, 0x65, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, - 0x65, 0x12, 0x26, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x2e, - 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x4f, 0x66, 0x66, 0x6c, 0x69, 0x6e, 0x65, 0x4d, - 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x52, 0x65, 0x71, 0x1a, 0x27, 0x2e, 0x61, 0x70, 0x69, 0x2e, - 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, - 0x4f, 0x66, 0x66, 0x6c, 0x69, 0x6e, 0x65, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x52, 0x65, - 0x73, 0x70, 0x42, 0x23, 0x5a, 0x21, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, - 0x2f, 0x67, 0x6f, 0x2d, 0x67, 0x6f, 0x69, 0x6d, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x6d, 0x65, 0x73, - 0x73, 0x61, 0x67, 0x65, 0x2f, 0x76, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x12, 0x22, 0x0a, 0x0a, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x04, + 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x09, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x49, + 0x64, 0x88, 0x01, 0x01, 0x12, 0x4f, 0x0a, 0x0c, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x5f, + 0x74, 0x79, 0x70, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x22, 0x2e, 0x61, 0x70, 0x69, + 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x65, 0x73, 0x73, + 0x61, 0x67, 0x65, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x54, 0x79, 0x70, 0x65, 0x42, 0x08, + 0xfa, 0x42, 0x05, 0x82, 0x01, 0x02, 0x10, 0x01, 0x52, 0x0b, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, + 0x74, 0x54, 0x79, 0x70, 0x65, 0x12, 0x24, 0x0a, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, + 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x42, 0x0a, 0xfa, 0x42, 0x07, 0x72, 0x05, 0x10, 0x01, 0x18, + 0x80, 0x20, 0x52, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x42, 0x0d, 0x0a, 0x0b, 0x5f, + 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x22, 0xa5, 0x02, 0x0a, 0x07, 0x4d, + 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x15, 0x0a, 0x06, 0x6d, 0x73, 0x67, 0x5f, 0x69, 0x64, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x6d, 0x73, 0x67, 0x49, 0x64, 0x12, 0x12, 0x0a, + 0x04, 0x66, 0x72, 0x6f, 0x6d, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x04, 0x66, 0x72, 0x6f, + 0x6d, 0x12, 0x0e, 0x0a, 0x02, 0x74, 0x6f, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x02, 0x74, + 0x6f, 0x12, 0x3e, 0x0a, 0x0c, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x79, 0x70, + 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1b, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x6d, 0x65, + 0x73, 0x73, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, + 0x54, 0x79, 0x70, 0x65, 0x52, 0x0b, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x54, 0x79, 0x70, + 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x18, + 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x49, 0x64, + 0x12, 0x45, 0x0a, 0x0c, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x5f, 0x74, 0x79, 0x70, 0x65, + 0x18, 0x06, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x22, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x6d, 0x65, 0x73, + 0x73, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x43, + 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x54, 0x79, 0x70, 0x65, 0x52, 0x0b, 0x63, 0x6f, 0x6e, 0x74, + 0x65, 0x6e, 0x74, 0x54, 0x79, 0x70, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, + 0x6e, 0x74, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, + 0x74, 0x12, 0x1f, 0x0a, 0x0b, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x5f, 0x74, 0x69, 0x6d, 0x65, + 0x18, 0x08, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0a, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x54, 0x69, + 0x6d, 0x65, 0x22, 0x5e, 0x0a, 0x0e, 0x50, 0x75, 0x73, 0x68, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, + 0x65, 0x52, 0x65, 0x71, 0x12, 0x31, 0x0a, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x6d, 0x65, 0x73, 0x73, + 0x61, 0x67, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x52, 0x07, + 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x19, 0x0a, 0x08, 0x74, 0x6f, 0x5f, 0x75, 0x73, + 0x65, 0x72, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x03, 0x52, 0x07, 0x74, 0x6f, 0x55, 0x73, 0x65, + 0x72, 0x73, 0x22, 0x76, 0x0a, 0x0f, 0x50, 0x75, 0x73, 0x68, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, + 0x65, 0x52, 0x65, 0x73, 0x70, 0x12, 0x40, 0x0a, 0x08, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x74, 0x72, + 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x2e, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x2e, 0x42, 0x61, 0x73, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x52, 0x08, 0x72, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x21, 0x0a, 0x0c, 0x66, 0x61, 0x69, 0x6c, 0x65, + 0x64, 0x5f, 0x75, 0x73, 0x65, 0x72, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x03, 0x52, 0x0b, 0x66, + 0x61, 0x69, 0x6c, 0x65, 0x64, 0x55, 0x73, 0x65, 0x72, 0x73, 0x22, 0xb6, 0x01, 0x0a, 0x16, 0x51, + 0x75, 0x65, 0x72, 0x79, 0x4f, 0x66, 0x66, 0x6c, 0x69, 0x6e, 0x65, 0x4d, 0x65, 0x73, 0x73, 0x61, + 0x67, 0x65, 0x52, 0x65, 0x71, 0x12, 0x19, 0x0a, 0x03, 0x75, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x03, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x22, 0x02, 0x20, 0x00, 0x52, 0x03, 0x75, 0x69, 0x64, + 0x12, 0x27, 0x0a, 0x0b, 0x6c, 0x61, 0x73, 0x74, 0x5f, 0x6d, 0x73, 0x67, 0x5f, 0x69, 0x64, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x03, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x22, 0x02, 0x20, 0x00, 0x52, 0x09, + 0x6c, 0x61, 0x73, 0x74, 0x4d, 0x73, 0x67, 0x49, 0x64, 0x12, 0x1c, 0x0a, 0x09, 0x6f, 0x6e, 0x6c, + 0x79, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x09, 0x6f, 0x6e, + 0x6c, 0x79, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x70, 0x61, 0x67, 0x65, 0x18, + 0x04, 0x20, 0x01, 0x28, 0x05, 0x52, 0x04, 0x70, 0x61, 0x67, 0x65, 0x12, 0x26, 0x0a, 0x09, 0x70, + 0x61, 0x67, 0x65, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x05, 0x42, 0x09, + 0xfa, 0x42, 0x06, 0x1a, 0x04, 0x18, 0x64, 0x28, 0x01, 0x52, 0x08, 0x70, 0x61, 0x67, 0x65, 0x53, + 0x69, 0x7a, 0x65, 0x22, 0xa6, 0x01, 0x0a, 0x17, 0x51, 0x75, 0x65, 0x72, 0x79, 0x4f, 0x66, 0x66, + 0x6c, 0x69, 0x6e, 0x65, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x52, 0x65, 0x73, 0x70, 0x12, + 0x40, 0x0a, 0x08, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x24, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, + 0x74, 0x2e, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x42, 0x61, 0x73, 0x65, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x52, 0x08, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x12, 0x14, 0x0a, 0x05, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, + 0x52, 0x05, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x12, 0x33, 0x0a, 0x08, 0x6d, 0x65, 0x73, 0x73, 0x61, + 0x67, 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x61, 0x70, 0x69, 0x2e, + 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x65, 0x73, 0x73, 0x61, + 0x67, 0x65, 0x52, 0x08, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x22, 0xe5, 0x03, 0x0a, + 0x0e, 0x53, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, + 0x16, 0x0a, 0x06, 0x72, 0x6f, 0x77, 0x4b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x06, 0x72, 0x6f, 0x77, 0x4b, 0x65, 0x79, 0x12, 0x3a, 0x0a, 0x05, 0x75, 0x73, 0x65, 0x72, 0x73, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x6d, 0x65, 0x73, + 0x73, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x4d, + 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x73, 0x52, 0x05, 0x75, 0x73, + 0x65, 0x72, 0x73, 0x12, 0x40, 0x0a, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x18, 0x03, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, + 0x67, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x4d, 0x65, 0x73, + 0x73, 0x61, 0x67, 0x65, 0x2e, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x52, 0x07, 0x63, 0x6f, + 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x12, 0x3a, 0x0a, 0x05, 0x65, 0x78, 0x74, 0x72, 0x61, 0x18, 0x04, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, + 0x67, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x4d, 0x65, 0x73, + 0x73, 0x61, 0x67, 0x65, 0x2e, 0x45, 0x78, 0x74, 0x72, 0x61, 0x52, 0x05, 0x65, 0x78, 0x74, 0x72, + 0x61, 0x1a, 0x51, 0x0a, 0x05, 0x55, 0x73, 0x65, 0x72, 0x73, 0x12, 0x16, 0x0a, 0x06, 0x66, 0x72, + 0x6f, 0x6d, 0x49, 0x44, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x06, 0x66, 0x72, 0x6f, 0x6d, + 0x49, 0x44, 0x12, 0x12, 0x0a, 0x04, 0x74, 0x6f, 0x49, 0x44, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, + 0x52, 0x04, 0x74, 0x6f, 0x49, 0x44, 0x12, 0x1c, 0x0a, 0x09, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, + 0x6e, 0x49, 0x44, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x73, 0x65, 0x73, 0x73, 0x69, + 0x6f, 0x6e, 0x49, 0x44, 0x1a, 0x69, 0x0a, 0x07, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x12, + 0x44, 0x0a, 0x0b, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x54, 0x79, 0x70, 0x65, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x0e, 0x32, 0x22, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, + 0x67, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x43, 0x6f, 0x6e, + 0x74, 0x65, 0x6e, 0x74, 0x54, 0x79, 0x70, 0x65, 0x52, 0x0b, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, + 0x74, 0x54, 0x79, 0x70, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x1a, + 0x43, 0x0a, 0x05, 0x45, 0x78, 0x74, 0x72, 0x61, 0x12, 0x3a, 0x0a, 0x0a, 0x63, 0x72, 0x65, 0x61, + 0x74, 0x65, 0x54, 0x69, 0x6d, 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, 0x0a, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, + 0x54, 0x69, 0x6d, 0x65, 0x2a, 0x34, 0x0a, 0x12, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x43, + 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x54, 0x79, 0x70, 0x65, 0x12, 0x08, 0x0a, 0x04, 0x54, 0x65, + 0x78, 0x74, 0x10, 0x00, 0x12, 0x09, 0x0a, 0x05, 0x49, 0x6d, 0x61, 0x67, 0x65, 0x10, 0x01, 0x12, + 0x09, 0x0a, 0x05, 0x56, 0x6f, 0x69, 0x63, 0x65, 0x10, 0x02, 0x2a, 0x48, 0x0a, 0x0b, 0x53, 0x65, + 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x12, 0x0e, 0x0a, 0x0a, 0x53, 0x69, 0x6e, + 0x67, 0x6c, 0x65, 0x43, 0x68, 0x61, 0x74, 0x10, 0x00, 0x12, 0x0d, 0x0a, 0x09, 0x47, 0x72, 0x6f, + 0x75, 0x70, 0x43, 0x68, 0x61, 0x74, 0x10, 0x01, 0x12, 0x0d, 0x0a, 0x09, 0x42, 0x72, 0x6f, 0x61, + 0x64, 0x63, 0x61, 0x73, 0x74, 0x10, 0x02, 0x12, 0x0b, 0x0a, 0x07, 0x43, 0x68, 0x61, 0x6e, 0x6e, + 0x65, 0x6c, 0x10, 0x03, 0x32, 0x64, 0x0a, 0x12, 0x50, 0x75, 0x73, 0x68, 0x4d, 0x65, 0x73, 0x73, + 0x61, 0x67, 0x65, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x4e, 0x0a, 0x0b, 0x50, 0x75, + 0x73, 0x68, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x1e, 0x2e, 0x61, 0x70, 0x69, 0x2e, + 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x75, 0x73, 0x68, 0x4d, + 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x52, 0x65, 0x71, 0x1a, 0x1f, 0x2e, 0x61, 0x70, 0x69, 0x2e, + 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x75, 0x73, 0x68, 0x4d, + 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x52, 0x65, 0x73, 0x70, 0x32, 0x7f, 0x0a, 0x15, 0x4f, 0x66, + 0x66, 0x6c, 0x69, 0x6e, 0x65, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x53, 0x65, 0x72, 0x76, + 0x69, 0x63, 0x65, 0x12, 0x66, 0x0a, 0x13, 0x51, 0x75, 0x65, 0x72, 0x79, 0x4f, 0x66, 0x66, 0x6c, + 0x69, 0x6e, 0x65, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x26, 0x2e, 0x61, 0x70, 0x69, + 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, + 0x79, 0x4f, 0x66, 0x66, 0x6c, 0x69, 0x6e, 0x65, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x52, + 0x65, 0x71, 0x1a, 0x27, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, + 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x4f, 0x66, 0x66, 0x6c, 0x69, 0x6e, 0x65, + 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x52, 0x65, 0x73, 0x70, 0x42, 0x23, 0x5a, 0x21, 0x67, + 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x67, 0x6f, 0x2d, 0x67, 0x6f, 0x69, + 0x6d, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x2f, 0x76, 0x31, + 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -695,7 +966,7 @@ func file_message_v1_message_proto_rawDescGZIP() []byte { } var file_message_v1_message_proto_enumTypes = make([]protoimpl.EnumInfo, 2) -var file_message_v1_message_proto_msgTypes = make([]protoimpl.MessageInfo, 6) +var file_message_v1_message_proto_msgTypes = make([]protoimpl.MessageInfo, 10) var file_message_v1_message_proto_goTypes = []interface{}{ (MessageContentType)(0), // 0: api.message.v1.MessageContentType (SessionType)(0), // 1: api.message.v1.SessionType @@ -705,7 +976,12 @@ var file_message_v1_message_proto_goTypes = []interface{}{ (*PushMessageResp)(nil), // 5: api.message.v1.PushMessageResp (*QueryOfflineMessageReq)(nil), // 6: api.message.v1.QueryOfflineMessageReq (*QueryOfflineMessageResp)(nil), // 7: api.message.v1.QueryOfflineMessageResp - (*response.BaseResponse)(nil), // 8: api.transport.response.BaseResponse + (*StorageMessage)(nil), // 8: api.message.v1.StorageMessage + (*StorageMessage_Users)(nil), // 9: api.message.v1.StorageMessage.Users + (*StorageMessage_Content)(nil), // 10: api.message.v1.StorageMessage.Content + (*StorageMessage_Extra)(nil), // 11: api.message.v1.StorageMessage.Extra + (*response.BaseResponse)(nil), // 12: api.transport.response.BaseResponse + (*timestamppb.Timestamp)(nil), // 13: google.protobuf.Timestamp } var file_message_v1_message_proto_depIdxs = []int32{ 1, // 0: api.message.v1.SendMessageReq.session_type:type_name -> api.message.v1.SessionType @@ -713,18 +989,23 @@ var file_message_v1_message_proto_depIdxs = []int32{ 1, // 2: api.message.v1.Message.session_type:type_name -> api.message.v1.SessionType 0, // 3: api.message.v1.Message.content_type:type_name -> api.message.v1.MessageContentType 3, // 4: api.message.v1.PushMessageReq.message:type_name -> api.message.v1.Message - 8, // 5: api.message.v1.PushMessageResp.response:type_name -> api.transport.response.BaseResponse - 8, // 6: api.message.v1.QueryOfflineMessageResp.response:type_name -> api.transport.response.BaseResponse + 12, // 5: api.message.v1.PushMessageResp.response:type_name -> api.transport.response.BaseResponse + 12, // 6: api.message.v1.QueryOfflineMessageResp.response:type_name -> api.transport.response.BaseResponse 3, // 7: api.message.v1.QueryOfflineMessageResp.messages:type_name -> api.message.v1.Message - 4, // 8: api.message.v1.PushMessageService.PushMessage:input_type -> api.message.v1.PushMessageReq - 6, // 9: api.message.v1.OfflineMessageService.QueryOfflineMessage:input_type -> api.message.v1.QueryOfflineMessageReq - 5, // 10: api.message.v1.PushMessageService.PushMessage:output_type -> api.message.v1.PushMessageResp - 7, // 11: api.message.v1.OfflineMessageService.QueryOfflineMessage:output_type -> api.message.v1.QueryOfflineMessageResp - 10, // [10:12] is the sub-list for method output_type - 8, // [8:10] is the sub-list for method input_type - 8, // [8:8] is the sub-list for extension type_name - 8, // [8:8] is the sub-list for extension extendee - 0, // [0:8] is the sub-list for field type_name + 9, // 8: api.message.v1.StorageMessage.users:type_name -> api.message.v1.StorageMessage.Users + 10, // 9: api.message.v1.StorageMessage.content:type_name -> api.message.v1.StorageMessage.Content + 11, // 10: api.message.v1.StorageMessage.extra:type_name -> api.message.v1.StorageMessage.Extra + 0, // 11: api.message.v1.StorageMessage.Content.contentType:type_name -> api.message.v1.MessageContentType + 13, // 12: api.message.v1.StorageMessage.Extra.createTime:type_name -> google.protobuf.Timestamp + 4, // 13: api.message.v1.PushMessageService.PushMessage:input_type -> api.message.v1.PushMessageReq + 6, // 14: api.message.v1.OfflineMessageService.QueryOfflineMessage:input_type -> api.message.v1.QueryOfflineMessageReq + 5, // 15: api.message.v1.PushMessageService.PushMessage:output_type -> api.message.v1.PushMessageResp + 7, // 16: api.message.v1.OfflineMessageService.QueryOfflineMessage:output_type -> api.message.v1.QueryOfflineMessageResp + 15, // [15:17] is the sub-list for method output_type + 13, // [13:15] is the sub-list for method input_type + 13, // [13:13] is the sub-list for extension type_name + 13, // [13:13] is the sub-list for extension extendee + 0, // [0:13] is the sub-list for field type_name } func init() { file_message_v1_message_proto_init() } @@ -805,6 +1086,54 @@ func file_message_v1_message_proto_init() { return nil } } + file_message_v1_message_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*StorageMessage); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_message_v1_message_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*StorageMessage_Users); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_message_v1_message_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*StorageMessage_Content); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_message_v1_message_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*StorageMessage_Extra); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } } file_message_v1_message_proto_msgTypes[0].OneofWrappers = []interface{}{} type x struct{} @@ -813,7 +1142,7 @@ func file_message_v1_message_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_message_v1_message_proto_rawDesc, NumEnums: 2, - NumMessages: 6, + NumMessages: 10, NumExtensions: 0, NumServices: 2, }, diff --git a/message/v1/message.pb.validate.go b/message/v1/message.pb.validate.go index cd56a4d..65fec16 100644 --- a/message/v1/message.pb.validate.go +++ b/message/v1/message.pb.validate.go @@ -862,3 +862,537 @@ var _ interface { Cause() error ErrorName() string } = QueryOfflineMessageRespValidationError{} + +// Validate checks the field values on StorageMessage with the rules defined in +// the proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. +func (m *StorageMessage) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on StorageMessage with the rules defined +// in the proto definition for this message. If any rules are violated, the +// result is a list of violation errors wrapped in StorageMessageMultiError, +// or nil if none found. +func (m *StorageMessage) ValidateAll() error { + return m.validate(true) +} + +func (m *StorageMessage) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + // no validation rules for RowKey + + if all { + switch v := interface{}(m.GetUsers()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, StorageMessageValidationError{ + field: "Users", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, StorageMessageValidationError{ + field: "Users", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetUsers()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return StorageMessageValidationError{ + field: "Users", + reason: "embedded message failed validation", + cause: err, + } + } + } + + if all { + switch v := interface{}(m.GetContent()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, StorageMessageValidationError{ + field: "Content", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, StorageMessageValidationError{ + field: "Content", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetContent()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return StorageMessageValidationError{ + field: "Content", + reason: "embedded message failed validation", + cause: err, + } + } + } + + if all { + switch v := interface{}(m.GetExtra()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, StorageMessageValidationError{ + field: "Extra", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, StorageMessageValidationError{ + field: "Extra", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetExtra()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return StorageMessageValidationError{ + field: "Extra", + reason: "embedded message failed validation", + cause: err, + } + } + } + + if len(errors) > 0 { + return StorageMessageMultiError(errors) + } + + return nil +} + +// StorageMessageMultiError is an error wrapping multiple validation errors +// returned by StorageMessage.ValidateAll() if the designated constraints +// aren't met. +type StorageMessageMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m StorageMessageMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m StorageMessageMultiError) AllErrors() []error { return m } + +// StorageMessageValidationError is the validation error returned by +// StorageMessage.Validate if the designated constraints aren't met. +type StorageMessageValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e StorageMessageValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e StorageMessageValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e StorageMessageValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e StorageMessageValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e StorageMessageValidationError) ErrorName() string { return "StorageMessageValidationError" } + +// Error satisfies the builtin error interface +func (e StorageMessageValidationError) Error() string { + cause := "" + if e.cause != nil { + cause = fmt.Sprintf(" | caused by: %v", e.cause) + } + + key := "" + if e.key { + key = "key for " + } + + return fmt.Sprintf( + "invalid %sStorageMessage.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = StorageMessageValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = StorageMessageValidationError{} + +// Validate checks the field values on StorageMessage_Users with the rules +// defined in the proto definition for this message. If any rules are +// violated, the first error encountered is returned, or nil if there are no violations. +func (m *StorageMessage_Users) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on StorageMessage_Users with the rules +// defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// StorageMessage_UsersMultiError, or nil if none found. +func (m *StorageMessage_Users) ValidateAll() error { + return m.validate(true) +} + +func (m *StorageMessage_Users) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + // no validation rules for FromID + + // no validation rules for ToID + + // no validation rules for SessionID + + if len(errors) > 0 { + return StorageMessage_UsersMultiError(errors) + } + + return nil +} + +// StorageMessage_UsersMultiError is an error wrapping multiple validation +// errors returned by StorageMessage_Users.ValidateAll() if the designated +// constraints aren't met. +type StorageMessage_UsersMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m StorageMessage_UsersMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m StorageMessage_UsersMultiError) AllErrors() []error { return m } + +// StorageMessage_UsersValidationError is the validation error returned by +// StorageMessage_Users.Validate if the designated constraints aren't met. +type StorageMessage_UsersValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e StorageMessage_UsersValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e StorageMessage_UsersValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e StorageMessage_UsersValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e StorageMessage_UsersValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e StorageMessage_UsersValidationError) ErrorName() string { + return "StorageMessage_UsersValidationError" +} + +// Error satisfies the builtin error interface +func (e StorageMessage_UsersValidationError) Error() string { + cause := "" + if e.cause != nil { + cause = fmt.Sprintf(" | caused by: %v", e.cause) + } + + key := "" + if e.key { + key = "key for " + } + + return fmt.Sprintf( + "invalid %sStorageMessage_Users.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = StorageMessage_UsersValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = StorageMessage_UsersValidationError{} + +// Validate checks the field values on StorageMessage_Content with the rules +// defined in the proto definition for this message. If any rules are +// violated, the first error encountered is returned, or nil if there are no violations. +func (m *StorageMessage_Content) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on StorageMessage_Content with the rules +// defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// StorageMessage_ContentMultiError, or nil if none found. +func (m *StorageMessage_Content) ValidateAll() error { + return m.validate(true) +} + +func (m *StorageMessage_Content) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + // no validation rules for ContentType + + // no validation rules for Content + + if len(errors) > 0 { + return StorageMessage_ContentMultiError(errors) + } + + return nil +} + +// StorageMessage_ContentMultiError is an error wrapping multiple validation +// errors returned by StorageMessage_Content.ValidateAll() if the designated +// constraints aren't met. +type StorageMessage_ContentMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m StorageMessage_ContentMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m StorageMessage_ContentMultiError) AllErrors() []error { return m } + +// StorageMessage_ContentValidationError is the validation error returned by +// StorageMessage_Content.Validate if the designated constraints aren't met. +type StorageMessage_ContentValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e StorageMessage_ContentValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e StorageMessage_ContentValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e StorageMessage_ContentValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e StorageMessage_ContentValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e StorageMessage_ContentValidationError) ErrorName() string { + return "StorageMessage_ContentValidationError" +} + +// Error satisfies the builtin error interface +func (e StorageMessage_ContentValidationError) Error() string { + cause := "" + if e.cause != nil { + cause = fmt.Sprintf(" | caused by: %v", e.cause) + } + + key := "" + if e.key { + key = "key for " + } + + return fmt.Sprintf( + "invalid %sStorageMessage_Content.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = StorageMessage_ContentValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = StorageMessage_ContentValidationError{} + +// Validate checks the field values on StorageMessage_Extra with the rules +// defined in the proto definition for this message. If any rules are +// violated, the first error encountered is returned, or nil if there are no violations. +func (m *StorageMessage_Extra) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on StorageMessage_Extra with the rules +// defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// StorageMessage_ExtraMultiError, or nil if none found. +func (m *StorageMessage_Extra) ValidateAll() error { + return m.validate(true) +} + +func (m *StorageMessage_Extra) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + if all { + switch v := interface{}(m.GetCreateTime()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, StorageMessage_ExtraValidationError{ + field: "CreateTime", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, StorageMessage_ExtraValidationError{ + field: "CreateTime", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetCreateTime()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return StorageMessage_ExtraValidationError{ + field: "CreateTime", + reason: "embedded message failed validation", + cause: err, + } + } + } + + if len(errors) > 0 { + return StorageMessage_ExtraMultiError(errors) + } + + return nil +} + +// StorageMessage_ExtraMultiError is an error wrapping multiple validation +// errors returned by StorageMessage_Extra.ValidateAll() if the designated +// constraints aren't met. +type StorageMessage_ExtraMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m StorageMessage_ExtraMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m StorageMessage_ExtraMultiError) AllErrors() []error { return m } + +// StorageMessage_ExtraValidationError is the validation error returned by +// StorageMessage_Extra.Validate if the designated constraints aren't met. +type StorageMessage_ExtraValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e StorageMessage_ExtraValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e StorageMessage_ExtraValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e StorageMessage_ExtraValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e StorageMessage_ExtraValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e StorageMessage_ExtraValidationError) ErrorName() string { + return "StorageMessage_ExtraValidationError" +} + +// Error satisfies the builtin error interface +func (e StorageMessage_ExtraValidationError) Error() string { + cause := "" + if e.cause != nil { + cause = fmt.Sprintf(" | caused by: %v", e.cause) + } + + key := "" + if e.key { + key = "key for " + } + + return fmt.Sprintf( + "invalid %sStorageMessage_Extra.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = StorageMessage_ExtraValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = StorageMessage_ExtraValidationError{} diff --git a/message/v1/message.proto b/message/v1/message.proto index 7413408..b78170e 100644 --- a/message/v1/message.proto +++ b/message/v1/message.proto @@ -2,6 +2,7 @@ syntax = "proto3"; package api.message.v1; +import "google/protobuf/timestamp.proto"; import "transport/response/response.proto"; import "validate/validate.proto"; @@ -85,3 +86,23 @@ message QueryOfflineMessageResp { service OfflineMessageService { rpc QueryOfflineMessage(QueryOfflineMessageReq) returns (QueryOfflineMessageResp); } + +// storage message +message StorageMessage { + string rowKey = 1; + message Users { + int64 fromID = 1; + int64 toID = 2; + string sessionID = 3; + } + Users users = 2; + message Content { + MessageContentType contentType = 1; + string content = 2; + } + Content content = 3; + message Extra { + google.protobuf.Timestamp createTime = 1; + } + Extra extra = 4; +} diff --git a/user/friend/v1/friend.pb.go b/user/friend/v1/friend.pb.go index 67508eb..3b6fbb8 100644 --- a/user/friend/v1/friend.pb.go +++ b/user/friend/v1/friend.pb.go @@ -1163,10 +1163,10 @@ var file_user_friend_v1_friend_proto_rawDesc = []byte{ 0x0a, 0x1b, 0x75, 0x73, 0x65, 0x72, 0x2f, 0x66, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x2f, 0x76, 0x31, 0x2f, 0x66, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x12, 0x61, 0x70, 0x69, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x66, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x2e, 0x76, - 0x31, 0x1a, 0x21, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x2f, 0x72, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2f, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x18, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x2f, 0x76, 0x31, - 0x2f, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x17, + 0x31, 0x1a, 0x18, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x2f, 0x76, 0x31, 0x2f, 0x6d, 0x65, + 0x73, 0x73, 0x61, 0x67, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x21, 0x74, 0x72, 0x61, + 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x2f, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2f, + 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x17, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xf7, 0x01, 0x0a, 0x06, 0x46, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, diff --git a/user/friend/v1/friend.proto b/user/friend/v1/friend.proto index 256f29e..7b563d7 100644 --- a/user/friend/v1/friend.proto +++ b/user/friend/v1/friend.proto @@ -2,8 +2,8 @@ syntax = "proto3"; package api.user.friend.v1; -import "transport/response/response.proto"; import "message/v1/message.proto"; +import "transport/response/response.proto"; import "validate/validate.proto"; option go_package = "github.com/go-goim/api/user/friend/v1"; From fa842f642642729f788ce3cf8ebaaaaa758c326f Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 15 Sep 2022 12:54:13 +0000 Subject: [PATCH 25/35] build(deps): bump github.com/envoyproxy/protoc-gen-validate Bumps [github.com/envoyproxy/protoc-gen-validate](https://github.com/envoyproxy/protoc-gen-validate) from 0.6.7 to 0.6.8. - [Release notes](https://github.com/envoyproxy/protoc-gen-validate/releases) - [Commits](https://github.com/envoyproxy/protoc-gen-validate/compare/v0.6.7...v0.6.8) --- updated-dependencies: - dependency-name: github.com/envoyproxy/protoc-gen-validate dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- go.mod | 10 +- go.sum | 395 +++++++++++++++++++++++++++++++++++++++++++++++++++++---- 2 files changed, 378 insertions(+), 27 deletions(-) diff --git a/go.mod b/go.mod index 663ea99..8d4ba89 100644 --- a/go.mod +++ b/go.mod @@ -3,19 +3,19 @@ module github.com/go-goim/api go 1.18 require ( - github.com/envoyproxy/protoc-gen-validate v0.6.7 + github.com/envoyproxy/protoc-gen-validate v0.6.8 github.com/stretchr/testify v1.8.0 - google.golang.org/protobuf v1.28.1 google.golang.org/grpc v1.49.0 + google.golang.org/protobuf v1.28.1 ) require ( github.com/davecgh/go-spew v1.1.1 // indirect github.com/golang/protobuf v1.5.2 // indirect github.com/pmezard/go-difflib v1.0.0 // indirect - golang.org/x/net v0.0.0-20210813160813-60bc85c4be6d // indirect - golang.org/x/sys v0.0.0-20210816183151-1e6c022a8912 // indirect + golang.org/x/net v0.0.0-20220907135653-1e95f45603a7 // indirect + golang.org/x/sys v0.0.0-20220908150016-7ac13a9a928d // indirect golang.org/x/text v0.3.7 // indirect - google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013 // indirect + google.golang.org/genproto v0.0.0-20210226172003-ab064af71705 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect ) diff --git a/go.sum b/go.sum index c230c98..666c22b 100644 --- a/go.sum +++ b/go.sum @@ -1,113 +1,452 @@ cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= +cloud.google.com/go v0.34.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= +cloud.google.com/go v0.38.0/go.mod h1:990N+gfupTy94rShfmMCWGDn0LpTmnzTp2qbd1dvSRU= +cloud.google.com/go v0.44.1/go.mod h1:iSa0KzasP4Uvy3f1mN/7PiObzGgflwredwwASm/v6AU= +cloud.google.com/go v0.44.2/go.mod h1:60680Gw3Yr4ikxnPRS/oxxkBccT6SA1yMk63TGekxKY= +cloud.google.com/go v0.44.3/go.mod h1:60680Gw3Yr4ikxnPRS/oxxkBccT6SA1yMk63TGekxKY= +cloud.google.com/go v0.45.1/go.mod h1:RpBamKRgapWJb87xiFSdk4g1CME7QZg3uwTez+TSTjc= +cloud.google.com/go v0.46.3/go.mod h1:a6bKKbmY7er1mI7TEI4lsAkts/mkhTSZK8w33B4RAg0= +cloud.google.com/go v0.50.0/go.mod h1:r9sluTvynVuxRIOHXQEHMFffphuXHOMZMycpNR5e6To= +cloud.google.com/go v0.52.0/go.mod h1:pXajvRH/6o3+F9jDHZWQ5PbGhn+o8w9qiu/CffaVdO4= +cloud.google.com/go v0.53.0/go.mod h1:fp/UouUEsRkN6ryDKNW/Upv/JBKnv6WDthjR6+vze6M= +cloud.google.com/go v0.54.0/go.mod h1:1rq2OEkV3YMf6n/9ZvGWI3GWw0VoqH/1x2nd8Is/bPc= +cloud.google.com/go v0.56.0/go.mod h1:jr7tqZxxKOVYizybht9+26Z/gUq7tiRzu+ACVAMbKVk= +cloud.google.com/go v0.57.0/go.mod h1:oXiQ6Rzq3RAkkY7N6t3TcE6jE+CIBBbA36lwQ1JyzZs= +cloud.google.com/go v0.62.0/go.mod h1:jmCYTdRCQuc1PHIIJ/maLInMho30T/Y0M4hTdTShOYc= +cloud.google.com/go v0.65.0/go.mod h1:O5N8zS7uWy9vkA9vayVHs65eM1ubvY4h553ofrNHObY= +cloud.google.com/go v0.72.0/go.mod h1:M+5Vjvlc2wnp6tjzE102Dw08nGShTscUx2nZMufOKPI= +cloud.google.com/go v0.74.0/go.mod h1:VV1xSbzvo+9QJOxLDaJfTjx5e+MePCpCWwvftOeQmWk= +cloud.google.com/go v0.75.0/go.mod h1:VGuuCn7PG0dwsd5XPVm2Mm3wlh3EL55/79EKB6hlPTY= +cloud.google.com/go/bigquery v1.0.1/go.mod h1:i/xbL2UlR5RvWAURpBYZTtm/cXjCha9lbfbpx4poX+o= +cloud.google.com/go/bigquery v1.3.0/go.mod h1:PjpwJnslEMmckchkHFfq+HTD2DmtT67aNFKH1/VBDHE= +cloud.google.com/go/bigquery v1.4.0/go.mod h1:S8dzgnTigyfTmLBfrtrhyYhwRxG72rYxvftPBK2Dvzc= +cloud.google.com/go/bigquery v1.5.0/go.mod h1:snEHRnqQbz117VIFhE8bmtwIDY80NLUZUMb4Nv6dBIg= +cloud.google.com/go/bigquery v1.7.0/go.mod h1://okPTzCYNXSlb24MZs83e2Do+h+VXtc4gLoIoXIAPc= +cloud.google.com/go/bigquery v1.8.0/go.mod h1:J5hqkt3O0uAFnINi6JXValWIb1v0goeZM77hZzJN/fQ= +cloud.google.com/go/datastore v1.0.0/go.mod h1:LXYbyblFSglQ5pkeyhO+Qmw7ukd3C+pD7TKLgZqpHYE= +cloud.google.com/go/datastore v1.1.0/go.mod h1:umbIZjpQpHh4hmRpGhH4tLFup+FVzqBi1b3c64qFpCk= +cloud.google.com/go/pubsub v1.0.1/go.mod h1:R0Gpsv3s54REJCy4fxDixWD93lHJMoZTyQ2kNxGRt3I= +cloud.google.com/go/pubsub v1.1.0/go.mod h1:EwwdRX2sKPjnvnqCa270oGRyludottCI76h+R3AArQw= +cloud.google.com/go/pubsub v1.2.0/go.mod h1:jhfEVHT8odbXTkndysNHCcx0awwzvfOlguIAii9o8iA= +cloud.google.com/go/pubsub v1.3.1/go.mod h1:i+ucay31+CNRpDW4Lu78I4xXG+O1r/MAHgjpRVR+TSU= +cloud.google.com/go/storage v1.0.0/go.mod h1:IhtSnM/ZTZV8YYJWCY8RULGVqBDmpoyjwiyrjsg+URw= +cloud.google.com/go/storage v1.5.0/go.mod h1:tpKbwo567HUNpVclU5sGELwQWBDZ8gh0ZeosJ0Rtdos= +cloud.google.com/go/storage v1.6.0/go.mod h1:N7U0C8pVQ/+NIKOBQyamJIeKQKkZ+mxpohlUTyfDhBk= +cloud.google.com/go/storage v1.8.0/go.mod h1:Wv1Oy7z6Yz3DshWRJFhqM/UCfaWIRTdp0RXyy7KQOVs= +cloud.google.com/go/storage v1.10.0/go.mod h1:FLPqc6j+Ki4BU591ie1oL6qBQGu2Bl/tZ9ullr3+Kg0= +cloud.google.com/go/storage v1.14.0/go.mod h1:GrKmX003DSIwi9o29oFT7YDnHYwZoctc3fOKtUw0Xmo= +dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU= github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= +github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo= github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= +github.com/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWRnGsAI= +github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e/go.mod h1:nSuG5e5PlCu98SY8svDHJxuZscDgtXS6KTTbou5AhLI= +github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1/go.mod h1:Q3SI9o4m/ZMnBNeIyt5eFwwo7qiLfzFZmjNmxjkiQlU= github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= +github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc= +github.com/cncf/udpa/go v0.0.0-20200629203442-efcf912fb354/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk= +github.com/cncf/udpa/go v0.0.0-20201120205902-5459f2c99403/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= +github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1mIlRU8Am5FuJP05cCM98= +github.com/envoyproxy/go-control-plane v0.9.7/go.mod h1:cwu0lG7PUMfa9snN8LXBig5ynNVH9qI8YYLbd1fK2po= +github.com/envoyproxy/go-control-plane v0.9.9-0.20201210154907-fd9021fe5dad/go.mod h1:cXg6YxExXjJnVBQHBLXeUAgxn2UodCpnH306RInaBQk= github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= -github.com/envoyproxy/protoc-gen-validate v0.6.7 h1:qcZcULcd/abmQg6dwigimCNEyi4gg31M/xaciQlDml8= -github.com/envoyproxy/protoc-gen-validate v0.6.7/go.mod h1:dyJXwwfPK2VSqiB9Klm1J6romD608Ba7Hij42vrOBCo= +github.com/envoyproxy/protoc-gen-validate v0.6.8 h1:B2cR/FAaiMtYDHv5BQpaqtkjGuWQIgr2KQZtHQ7f6i8= +github.com/envoyproxy/protoc-gen-validate v0.6.8/go.mod h1:0ZMblUx0cxNoWRswEEXoj9kHBmqX8pxGweMiyIAfR6A= +github.com/go-gl/glfw v0.0.0-20190409004039-e6da0acd62b1/go.mod h1:vR7hzQXu2zJy9AVAgeJqvqgH9Q5CA+iKCZ2gyEVpxRU= +github.com/go-gl/glfw/v3.3/glfw v0.0.0-20191125211704-12ad95a8df72/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= +github.com/go-gl/glfw/v3.3/glfw v0.0.0-20200222043503-6f7a984d4dc4/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= +github.com/golang/groupcache v0.0.0-20190702054246-869f871628b6/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= +github.com/golang/groupcache v0.0.0-20191227052852-215e87163ea7/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= +github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= +github.com/golang/mock v1.2.0/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= +github.com/golang/mock v1.3.1/go.mod h1:sBzyDLLjw3U8JLTeZvSv8jJB+tU5PVekmnlKIyFUx0Y= +github.com/golang/mock v1.4.0/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= +github.com/golang/mock v1.4.1/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= +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/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= +github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= +github.com/golang/protobuf v1.3.3/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw= +github.com/golang/protobuf v1.3.4/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw= +github.com/golang/protobuf v1.3.5/go.mod h1:6O5/vntMXwX2lRkT1hjjk0nAC1IDOTvTlVgjlRvqsdk= github.com/golang/protobuf v1.4.0-rc.1/go.mod h1:ceaxUfeHdC40wWswd/P6IGgMaK3YpKi5j83Wpe3EHw8= github.com/golang/protobuf v1.4.0-rc.1.0.20200221234624-67d41d38c208/go.mod h1:xKAWHe0F5eneWXFV3EuXVDTCmh+JuBKY0li0aMyXATA= github.com/golang/protobuf v1.4.0-rc.2/go.mod h1:LlEzMj4AhA7rCAGe4KMBDvJI+AwstrUpVNzEA03Pprs= github.com/golang/protobuf v1.4.0-rc.4.0.20200313231945-b860323f09d0/go.mod h1:WU3c8KckQ9AFe+yFwt9sWVRKCVIyN9cPHBJSNnbL67w= github.com/golang/protobuf v1.4.0/go.mod h1:jodUvKwWbYaEsadDk5Fwe5c77LiNKVO9IDvqG2KuDX0= github.com/golang/protobuf v1.4.1/go.mod h1:U8fpvMrcmy5pZrNK1lt4xCsGvpyWQ/VVv6QDs8UjoX8= +github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= +github.com/golang/protobuf v1.4.3/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk= github.com/golang/protobuf v1.5.2 h1:ROPKBNFfQgOUMifHyP+KYbvpjbdoFNs+aK7DXlji0Tw= github.com/golang/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= +github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= +github.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M= github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.4.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.2/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.4/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.6 h1:BKbKCqvP6I+rmFHt06ZmyQtvB8xAkWdhFyr0ZUNZcxQ= +github.com/google/martian v2.1.0+incompatible/go.mod h1:9I4somxYTbIHy5NJKHRl3wXiIaQGbYVAs8BPL6v8lEs= +github.com/google/martian/v3 v3.0.0/go.mod h1:y5Zk1BBys9G+gd6Jrk0W3cC1+ELVxBWuIGO+w/tUAp0= +github.com/google/martian/v3 v3.1.0/go.mod h1:y5Zk1BBys9G+gd6Jrk0W3cC1+ELVxBWuIGO+w/tUAp0= +github.com/google/pprof v0.0.0-20181206194817-3ea8567a2e57/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= +github.com/google/pprof v0.0.0-20190515194954-54271f7e092f/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= +github.com/google/pprof v0.0.0-20191218002539-d4f498aebedc/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= +github.com/google/pprof v0.0.0-20200212024743-f11f1df84d12/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= +github.com/google/pprof v0.0.0-20200229191704-1ebb73c60ed3/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= +github.com/google/pprof v0.0.0-20200430221834-fc25d7d30c6d/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= +github.com/google/pprof v0.0.0-20200708004538-1a94d8640e99/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= +github.com/google/pprof v0.0.0-20201023163331-3e6fc7fc9c4c/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= +github.com/google/pprof v0.0.0-20201203190320-1bf35d6f28c2/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= +github.com/google/pprof v0.0.0-20201218002935-b9804c9f04c2/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= +github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI= +github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= +github.com/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+vpHVxEJEs9eg= +github.com/googleapis/gax-go/v2 v2.0.5/go.mod h1:DWXyrwAJ9X0FpwwEdw+IPEYBICEFu5mhpdKc/us6bOk= +github.com/googleapis/google-cloud-go-testing v0.0.0-20200911160855-bcd43fbb19e8/go.mod h1:dvDLG8qkwmyD9a/MJJN3XJcT3xFxOKAvTZGvuZmac9g= +github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= +github.com/hashicorp/golang-lru v0.5.1/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= github.com/iancoleman/strcase v0.2.0/go.mod h1:iwCmte+B7n89clKwxIoIXy/HfoL7AsD47ZCWhYzw7ho= +github.com/ianlancetaylor/demangle v0.0.0-20181102032728-5e5cf60278f6/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= +github.com/ianlancetaylor/demangle v0.0.0-20200824232613-28f6c0f3b639/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= +github.com/jstemmer/go-junit-report v0.0.0-20190106144839-af01ea7f8024/go.mod h1:6v2b51hI/fHJwM22ozAgKL4VKDeJcHhJFhtBdhmNjmU= +github.com/jstemmer/go-junit-report v0.9.1/go.mod h1:Brl9GWCQeLvo8nXZwPNNblvFj/XSXhF0NWZEnDohbsk= +github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= github.com/kr/fs v0.1.0/go.mod h1:FFnZGqtBN9Gxj7eW1uZ42v5BccTP0vu6NEaFoC2HwRg= -github.com/lyft/protoc-gen-star v0.6.0/go.mod h1:TGAoBVkt8w7MPG72TrKIu85MIdXwDuzJYeZuUPFPNwA= +github.com/kr/pretty v0.1.0 h1:L/CwN0zerZDmRFUapSPitk6f+Q3+0za1rQkzVuMiMFI= +github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= +github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= +github.com/kr/text v0.1.0 h1:45sCR5RtlFHMR4UwH9sdQ5TC8v0qDQCHnXt+kaKSTVE= +github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= +github.com/lyft/protoc-gen-star v0.6.1/go.mod h1:TGAoBVkt8w7MPG72TrKIu85MIdXwDuzJYeZuUPFPNwA= github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= +github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/sftp v1.10.1/go.mod h1:lYOWFsE0bwd1+KfKJaKeuokY15vzFx25BLbzYYoAxZI= +github.com/pkg/sftp v1.13.1/go.mod h1:3HaPG6Dq1ILlpPZRO0HVMrsydcdLt6HRDccSgb87qRg= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= +github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= github.com/spf13/afero v1.3.3/go.mod h1:5KUK8ByomD5Ti5Artl0RtHeI5pTF7MIDuXL3yY520V4= -github.com/spf13/afero v1.6.0/go.mod h1:Ai8FlHk4v/PARR026UzYexafAt9roJ7LcLMAmO6Z93I= +github.com/spf13/afero v1.9.2/go.mod h1:iUV7ddyEEZPO5gA3zD4fJt6iStLlL+Lg4m2cihcDf8Y= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw= github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= +github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA= github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= +github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.8.0 h1:pSgiaMZlXftHpm5L7V1+rVB+AZJydKsMxsQBIJw4PKk= github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU= -github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= +github.com/yuin/goldmark v1.1.25/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= +github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= +github.com/yuin/goldmark v1.1.32/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= +github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= +github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY= +go.opencensus.io v0.21.0/go.mod h1:mSImk1erAIZhrmZN+AvHh14ztQfjbGwt4TtuofqLduU= +go.opencensus.io v0.22.0/go.mod h1:+kGneAE2xo2IficOXnaByMWTGM9T73dGwxeWcUqIpI8= +go.opencensus.io v0.22.2/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= +go.opencensus.io v0.22.3/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= +go.opencensus.io v0.22.4/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= +go.opencensus.io v0.22.5/go.mod h1:5pWMHQbX5EPX2/62yrJeAkowc+lfs/XD7Uxpq3pI6kk= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= +golang.org/x/crypto v0.0.0-20190510104115-cbcb75029529/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= +golang.org/x/crypto v0.0.0-20190605123033-f99c8df09eb5/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20190820162420-60c769a6c586/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= +golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= +golang.org/x/crypto v0.0.0-20210421170649-83a5a9bb288b/go.mod h1:T9bdIzuCu7OtxOm1hfPfRQxPLYneinmdGuTeoZ9dtd4= +golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= +golang.org/x/crypto v0.0.0-20211108221036-ceb1ce70b4fa/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= +golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= +golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8= +golang.org/x/exp v0.0.0-20190829153037-c13cbed26979/go.mod h1:86+5VVa7VpoJ4kLfm080zCjGlMRFzhUhsZKEZO7MGek= +golang.org/x/exp v0.0.0-20191030013958-a1ab85dbe136/go.mod h1:JXzH8nQsPlswgeRAPE3MuO9GYsAcnJvJ4vnMwN/5qkY= +golang.org/x/exp v0.0.0-20191129062945-2f5052295587/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= +golang.org/x/exp v0.0.0-20191227195350-da58074b4299/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= +golang.org/x/exp v0.0.0-20200119233911-0405dc783f0a/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= +golang.org/x/exp v0.0.0-20200207192155-f17229e696bd/go.mod h1:J/WKrq2StrnmMY6+EHIKF9dgMWnmCNThgcyBT1FY9mM= +golang.org/x/exp v0.0.0-20200224162631-6cc2880d07d6/go.mod h1:3jZMyOhIsHpP37uCMkUooju7aAi5cS1Q23tOzKc+0MU= +golang.org/x/image v0.0.0-20190227222117-0694c2d4d067/go.mod h1:kZ7UVZpmo3dzQBMxlp+ypCbDeSB+sBbTgSJuh5dn5js= +golang.org/x/image v0.0.0-20190802002840-cff245a6509b/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0= golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvxsM5YxQ5yQlVC4a0KAMCusXpPoU= +golang.org/x/lint v0.0.0-20190301231843-5614ed5bae6f/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= +golang.org/x/lint v0.0.0-20190409202823-959b441ac422/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= +golang.org/x/lint v0.0.0-20190909230951-414d861bb4ac/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= +golang.org/x/lint v0.0.0-20190930215403-16217165b5de/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= +golang.org/x/lint v0.0.0-20191125180803-fdd1cda4f05f/go.mod h1:5qLYkcX4OjUUV8bRuDixDT3tpyyb+LUpUlRWLxfhWrs= +golang.org/x/lint v0.0.0-20200130185559-910be7a94367/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= +golang.org/x/lint v0.0.0-20200302205851-738671d3881b/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= +golang.org/x/lint v0.0.0-20201208152925-83fdc39ff7b5/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= golang.org/x/lint v0.0.0-20210508222113-6edffad5e616/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= +golang.org/x/mobile v0.0.0-20190312151609-d3739f865fa6/go.mod h1:z+o9i4GpDbdi3rU15maQ/Ox0txvL9dWGYEHz965HBQE= +golang.org/x/mobile v0.0.0-20190719004257-d2bd2a29d028/go.mod h1:E/iHnbuqvinMTCcRqshq8CkpyQDoeVncDDYHnLhea+o= +golang.org/x/mod v0.0.0-20190513183733-4bf6d317e70e/go.mod h1:mXi4GBBbnImb6dmsKGUJ2LatrhH/nqhxcFungHvyanc= +golang.org/x/mod v0.1.0/go.mod h1:0QHyrYULN0/3qlju5TqG8bIK38QM8yzMo5ekMj3DlcY= golang.org/x/mod v0.1.1-0.20191105210325-c90efee705ee/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg= -golang.org/x/mod v0.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= -golang.org/x/mod v0.5.0/go.mod h1:5OXOZSfqPIIbmVBIIKWRFfZjPR0E5r58TLhUjH0a2Ro= +golang.org/x/mod v0.1.1-0.20191107180719-034126e5016b/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg= +golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= +golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= +golang.org/x/mod v0.4.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= +golang.org/x/mod v0.4.1/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= +golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4= golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/net v0.0.0-20190501004415-9ce7a6920f09/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/net v0.0.0-20190503192946-f4e77d36d62c/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/net v0.0.0-20190603091049-60506f45cf65/go.mod h1:HSz+uSET+XFnRR8LxR5pz3Of3rY3CfYBVs4xY44aLks= golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4/go.mod h1:p54w0d4576C0XHj96bSt6lcn1PtDYWL6XObtHCRCNQM= -golang.org/x/net v0.0.0-20210813160813-60bc85c4be6d h1:LO7XpTYMwTqxjLcGWPijK3vRXg1aWdlNOVOHRq45d7c= -golang.org/x/net v0.0.0-20210813160813-60bc85c4be6d/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= +golang.org/x/net v0.0.0-20190628185345-da137c7871d7/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20190724013045-ca1201d0de80/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20191209160850-c0dbc17a3553/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20200114155413-6afb5195e5aa/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20200202094626-16171245cfb2/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20200222125558-5a598a2470a0/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20200301022130-244492dfa37a/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20200324143707-d3edc9973b7e/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= +golang.org/x/net v0.0.0-20200501053045-e0ff5e5a1de5/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= +golang.org/x/net v0.0.0-20200506145744-7e3656a0809f/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= +golang.org/x/net v0.0.0-20200513185701-a91f0712d120/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= +golang.org/x/net v0.0.0-20200520182314-0ba52f642ac2/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= +golang.org/x/net v0.0.0-20200625001655-4c5254603344/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= +golang.org/x/net v0.0.0-20200707034311-ab3426394381/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= +golang.org/x/net v0.0.0-20200822124328-c89045814202/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= +golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= +golang.org/x/net v0.0.0-20201031054903-ff519b6c9102/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= +golang.org/x/net v0.0.0-20201209123823-ac852fbbde11/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= +golang.org/x/net v0.0.0-20201224014010-6772e930b67b/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= +golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= +golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= +golang.org/x/net v0.0.0-20220907135653-1e95f45603a7 h1:1WGATo9HAhkWMbfyuVU0tEFP88OIkUvwaHFveQPvzCQ= +golang.org/x/net v0.0.0-20220907135653-1e95f45603a7/go.mod h1:YDH+HFinaLZZlnHAfSS6ZXJJ9M9t4Dl22yv3iI2vPwk= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= +golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= +golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= +golang.org/x/oauth2 v0.0.0-20191202225959-858c2ad4c8b6/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= +golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= +golang.org/x/oauth2 v0.0.0-20200902213428-5d25da1a8d43/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= +golang.org/x/oauth2 v0.0.0-20201109201403-9fd604954f58/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= +golang.org/x/oauth2 v0.0.0-20201208152858-08078c50e5b5/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= +golang.org/x/oauth2 v0.0.0-20210218202405-ba52d332ba99/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20190227155943-e225da77a7e6/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20200317015054-43a5402ce75a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20200625203802-6e8e738ad208/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20201207232520-09787c993a3a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20190312061237-fead79001313/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190502145724-3ef323f4f1fd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190507160741-ecd444e8653b/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190606165138-5da285871e9c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190624142023-c5567b49c5d0/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190726091711-fc99dfbffb4e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191001151750-bb3f8db39f24/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191204072324-ce4227a45e2e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191228213918-04cbcbbfeed8/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200113162924-86b910548bc1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200122134326-e047566fdf82/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200202164722-d101bd2416d5/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200212091648-12a6c2dcc1e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200223170610-d5e6a3e2c0ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200302150141-5c8b2ff67527/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200331124033-c3d80250170d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200501052902-10377860bb8e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200511232937-7e40ca221e25/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200515095857-1151b9dac4a9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200523222454-059865788121/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200803210538-64077c9b5642/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200905004654-be1d3432aa8f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210330210617-4fbd30eecc44/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210510120138-977fb7262007/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20210816183151-1e6c022a8912 h1:uCLL3g5wH2xjxVREVuAbP9JM5PPKjRbXKRa6IBjkzmU= -golang.org/x/sys v0.0.0-20210816183151-1e6c022a8912/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20201201145000-ef89a241ccb3/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210104204734-6f8348627aad/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210119212857-b64e53b001e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210225134936-a50acf3fe073/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210423185535-09eb48e85fd7/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220728004956-3c1f35247d10/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220908150016-7ac13a9a928d h1:RoyzQTK76Rktm3p4xyZslc8T8I1tBz4UEjZCzeh57mM= +golang.org/x/sys v0.0.0-20220908150016-7ac13a9a928d/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= +golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= +golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= +golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= +golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= -golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= +golang.org/x/text v0.3.4/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.7 h1:olpwvP2KacW1ZWvsR7uQhoyTYvKAupfQrRGBFM352Gk= golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= +golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= +golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= +golang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY= golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= +golang.org/x/tools v0.0.0-20190312151545-0bb0c0a6e846/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= +golang.org/x/tools v0.0.0-20190312170243-e65039ee4138/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= +golang.org/x/tools v0.0.0-20190425150028-36563e24a262/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= +golang.org/x/tools v0.0.0-20190506145303-2d16b83fe98c/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= golang.org/x/tools v0.0.0-20190524140312-2c0ae7006135/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= +golang.org/x/tools v0.0.0-20190606124116-d0a3d012864b/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= +golang.org/x/tools v0.0.0-20190621195816-6e04913cbbac/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= +golang.org/x/tools v0.0.0-20190628153133-6cdbf07be9d0/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= +golang.org/x/tools v0.0.0-20190816200558-6889da9d5479/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20190911174233-4f2ddba30aff/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191012152004-8de300cfc20a/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191113191852-77e3bb0ad9e7/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191115202509-3a792d9c32b2/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191125144606-a911d9008d1f/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191130070609-6e064ea0cf2d/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191216173652-a0e659d51361/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20191227053925-7b8e75db28f4/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200117161641-43d50277825c/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200122220014-bf1340f18c4a/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= golang.org/x/tools v0.0.0-20200130002326-2f3ba24bd6e7/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.1.5/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= +golang.org/x/tools v0.0.0-20200204074204-1cc6d1ef6c74/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200207183749-b753a1ba74fa/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200212150539-ea181f53ac56/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200224181240-023911ca70b2/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200227222343-706bc42d1f0d/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200304193943-95d2e580d8eb/go.mod h1:o4KQGtdN14AW+yjsvvwRTJJuXz8XRtIHtEnmAXLyFUw= +golang.org/x/tools v0.0.0-20200312045724-11d5b4c81c7d/go.mod h1:o4KQGtdN14AW+yjsvvwRTJJuXz8XRtIHtEnmAXLyFUw= +golang.org/x/tools v0.0.0-20200331025713-a30bf2db82d4/go.mod h1:Sl4aGygMT6LrqrWclx+PTx3U+LnKx/seiNR+3G19Ar8= +golang.org/x/tools v0.0.0-20200501065659-ab2804fb9c9d/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= +golang.org/x/tools v0.0.0-20200512131952-2bc93b1c0c88/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= +golang.org/x/tools v0.0.0-20200515010526-7d3b6ebf133d/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= +golang.org/x/tools v0.0.0-20200618134242-20370b0cb4b2/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= +golang.org/x/tools v0.0.0-20200729194436-6467de6f59a7/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= +golang.org/x/tools v0.0.0-20200804011535-6c149bb5ef0d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= +golang.org/x/tools v0.0.0-20200825202427-b303f430e36d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= +golang.org/x/tools v0.0.0-20200904185747-39188db58858/go.mod h1:Cj7w3i3Rnn0Xh82ur9kSqwfTHTeVxaDqrfMjpcNT6bE= +golang.org/x/tools v0.0.0-20201110124207-079ba7bd75cd/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= +golang.org/x/tools v0.0.0-20201201161351-ac6f37ff4c2a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= +golang.org/x/tools v0.0.0-20201208233053-a543418bbed2/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= +golang.org/x/tools v0.0.0-20210105154028-b0ab187a4818/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= +golang.org/x/tools v0.0.0-20210108195828-e2f9c7f1fc8e/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= +golang.org/x/tools v0.1.0/go.mod h1:xkSsbof2nBLbhDlRMhhhyNLN/zl3eTqcnHD5viDpcZ0= +golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1 h1:go1bK/D/BFZV2I8cIQd1NKEZ+0owSTG1fDTci4IqFcE= golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +golang.org/x/xerrors v0.0.0-20220907171357-04be3eba64a2 h1:H2TDz8ibqkAF6YGhCdN3jS9O0/s90v0rJh3X/OLHEUk= +golang.org/x/xerrors v0.0.0-20220907171357-04be3eba64a2/go.mod h1:K8+ghG5WaK9qNqU5K3HdILfMLy1f3aNYFI/wnl100a8= +google.golang.org/api v0.4.0/go.mod h1:8k5glujaEP+g9n7WNsDg8QP6cUVNI86fCNMcbazEtwE= +google.golang.org/api v0.7.0/go.mod h1:WtwebWUNSVBH/HAw79HIFXZNqEvBhG+Ra+ax0hx3E3M= +google.golang.org/api v0.8.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg= +google.golang.org/api v0.9.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg= +google.golang.org/api v0.13.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= +google.golang.org/api v0.14.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= +google.golang.org/api v0.15.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= +google.golang.org/api v0.17.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= +google.golang.org/api v0.18.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= +google.golang.org/api v0.19.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= +google.golang.org/api v0.20.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= +google.golang.org/api v0.22.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= +google.golang.org/api v0.24.0/go.mod h1:lIXQywCXRcnZPGlsd8NbLnOjtAoL6em04bJ9+z0MncE= +google.golang.org/api v0.28.0/go.mod h1:lIXQywCXRcnZPGlsd8NbLnOjtAoL6em04bJ9+z0MncE= +google.golang.org/api v0.29.0/go.mod h1:Lcubydp8VUV7KeIHD9z2Bys/sm/vGKnG1UHuDBSrHWM= +google.golang.org/api v0.30.0/go.mod h1:QGmEvQ87FHZNiUVJkT14jQNYJ4ZJjdRF23ZXz5138Fc= +google.golang.org/api v0.35.0/go.mod h1:/XrVsuzM0rZmrsbjJutiuftIzeuTQcEeaYcSk/mQ1dg= +google.golang.org/api v0.36.0/go.mod h1:+z5ficQTmoYpPn8LCUNVpK5I7hwkpjbcgqA7I34qYtE= +google.golang.org/api v0.40.0/go.mod h1:fYKFpnQN0DsDSKRVRcQSDQNtqWPfM9i+zNPxepjRCQ8= google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= +google.golang.org/appengine v1.5.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= +google.golang.org/appengine v1.6.1/go.mod h1:i06prIuMbXzDqacNJfV5OdTW448YApPu5ww/cMBSeb0= +google.golang.org/appengine v1.6.5/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= +google.golang.org/appengine v1.6.6/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= +google.golang.org/appengine v1.6.7/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= +google.golang.org/genproto v0.0.0-20190307195333-5fe7a883aa19/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= +google.golang.org/genproto v0.0.0-20190418145605-e7d98fc518a7/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= +google.golang.org/genproto v0.0.0-20190425155659-357c62f0e4bb/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= +google.golang.org/genproto v0.0.0-20190502173448-54afdca5d873/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= +google.golang.org/genproto v0.0.0-20190801165951-fa694d86fc64/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= -google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013 h1:+kGHl1aib/qcwaRi1CbqBZ1rk19r85MNUf8HaBghugY= +google.golang.org/genproto v0.0.0-20190911173649-1774047e7e51/go.mod h1:IbNlFCBrqXvoKpeg0TB2l7cyZUmoaFKYIwrEpbDKLA8= +google.golang.org/genproto v0.0.0-20191108220845-16a3f7862a1a/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= +google.golang.org/genproto v0.0.0-20191115194625-c23dd37a84c9/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= +google.golang.org/genproto v0.0.0-20191216164720-4f79533eabd1/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= +google.golang.org/genproto v0.0.0-20191230161307-f3c370f40bfb/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= +google.golang.org/genproto v0.0.0-20200115191322-ca5a22157cba/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= +google.golang.org/genproto v0.0.0-20200122232147-0452cf42e150/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= +google.golang.org/genproto v0.0.0-20200204135345-fa8e72b47b90/go.mod h1:GmwEX6Z4W5gMy59cAlVYjN9JhxgbQH6Gn+gFDQe2lzA= +google.golang.org/genproto v0.0.0-20200212174721-66ed5ce911ce/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200224152610-e50cd9704f63/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200228133532-8c2c7df3a383/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200305110556-506484158171/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200312145019-da6875a35672/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200331122359-1ee6d9798940/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200430143042-b979b6f78d84/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200511104702-f5ebc3bea380/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200515170657-fc4c6c6a6587/go.mod h1:YsZOwe1myG/8QRHRsmBRE1LrgQY60beZKjly0O1fX9U= google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013/go.mod h1:NbSheEEYHJ7i3ixzK3sjbqSGDJWnxyFXZblF3eUsNvo= +google.golang.org/genproto v0.0.0-20200618031413-b414f8b61790/go.mod h1:jDfRM7FcilCzHH/e9qn6dsT145K34l5v+OpcnNgKAAA= +google.golang.org/genproto v0.0.0-20200729003335-053ba62fc06f/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20200804131852-c06518451d9c/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20200825200019-8632dd797987/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20200904004341-0bd0a958aa1d/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20201109203340-2640f1f9cdfb/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20201201144952-b05cb90ed32e/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20201210142538-e3217bee35cc/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20201214200347-8c77b98c765d/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20210108203827-ffc7fda8c3d7/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20210226172003-ab064af71705 h1:PYBmACG+YEv8uQPW0r1kJj8tR+gkF0UWq7iFdUezwEw= +google.golang.org/genproto v0.0.0-20210226172003-ab064af71705/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= +google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38= +google.golang.org/grpc v1.21.1/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= +google.golang.org/grpc v1.25.1/go.mod h1:c3i+UQWmh7LiEpx4sFZnkU36qjEYZ0imhYfXVyQciAY= +google.golang.org/grpc v1.26.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= google.golang.org/grpc v1.27.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= +google.golang.org/grpc v1.27.1/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= +google.golang.org/grpc v1.28.0/go.mod h1:rpkK4SK4GF4Ach/+MFLZUBavHOvF2JJB5uozKKal+60= +google.golang.org/grpc v1.29.1/go.mod h1:itym6AZVZYACWQqET3MqgPpjcuV5QH3BxFS3IjizoKk= +google.golang.org/grpc v1.30.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= +google.golang.org/grpc v1.31.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= +google.golang.org/grpc v1.31.1/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= +google.golang.org/grpc v1.33.2/go.mod h1:JMHMWHQWaTccqQQlmk3MJZS+GWXOdAesneDmEnv2fbc= +google.golang.org/grpc v1.34.0/go.mod h1:WotjhfgOW/POjDeRt8vscBtXq+2VjORFy659qA51WJ8= +google.golang.org/grpc v1.35.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= google.golang.org/grpc v1.49.0 h1:WTLtQzmQori5FUH25Pq4WT22oCsv8USpQ+F6rqtsmxw= google.golang.org/grpc v1.49.0/go.mod h1:ZgQEeidpAuNRZ8iRrlBKXZQP1ghovWIVhdJRyCDK+GI= google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= @@ -116,17 +455,29 @@ google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQ google.golang.org/protobuf v1.20.1-0.20200309200217-e05f789c0967/go.mod h1:A+miEFZTKqfCUM6K7xSMQL9OKL/b6hQv+e19PK+JZNE= google.golang.org/protobuf v1.21.0/go.mod h1:47Nbq4nVaFHyn7ilMalzfO3qCViNmqZ2kzikPIcrTAo= google.golang.org/protobuf v1.22.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= +google.golang.org/protobuf v1.23.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= google.golang.org/protobuf v1.23.1-0.20200526195155-81db48ad09cc/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= +google.golang.org/protobuf v1.24.0/go.mod h1:r/3tXBNzIEhYS9I1OUVjXDlt8tc493IdKGjtUeSXeh4= +google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlbajtzgsN7c= google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= -google.golang.org/protobuf v1.27.1/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= google.golang.org/protobuf v1.28.1 h1:d0NfwRgPtno5B1Wa6L2DAG+KivqkdutMf1UhdNx175w= google.golang.org/protobuf v1.28.1/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= -gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127 h1:qIbj1fsPNlZgppZ+VLlY7N33q108Sa+fhmuc+sWQYwY= +gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= +honnef.co/go/tools v0.0.0-20190106161140-3f1c8253044a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= +honnef.co/go/tools v0.0.0-20190418001031-e561f6794a2a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= +honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg= +honnef.co/go/tools v0.0.1-2020.1.3/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= +honnef.co/go/tools v0.0.1-2020.1.4/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= +rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8= +rsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0= +rsc.io/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA= From e5e7e530036ea32b0b4716a4bea60fd46678a3cf Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 28 Sep 2022 12:51:32 +0000 Subject: [PATCH 26/35] build(deps): bump github.com/envoyproxy/protoc-gen-validate Bumps [github.com/envoyproxy/protoc-gen-validate](https://github.com/envoyproxy/protoc-gen-validate) from 0.6.8 to 0.6.11. - [Release notes](https://github.com/envoyproxy/protoc-gen-validate/releases) - [Commits](https://github.com/envoyproxy/protoc-gen-validate/commits) --- updated-dependencies: - dependency-name: github.com/envoyproxy/protoc-gen-validate dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- go.mod | 2 +- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index 8d4ba89..82e832b 100644 --- a/go.mod +++ b/go.mod @@ -3,7 +3,7 @@ module github.com/go-goim/api go 1.18 require ( - github.com/envoyproxy/protoc-gen-validate v0.6.8 + github.com/envoyproxy/protoc-gen-validate v0.6.11 github.com/stretchr/testify v1.8.0 google.golang.org/grpc v1.49.0 google.golang.org/protobuf v1.28.1 diff --git a/go.sum b/go.sum index 666c22b..2a2361f 100644 --- a/go.sum +++ b/go.sum @@ -55,8 +55,8 @@ github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1m github.com/envoyproxy/go-control-plane v0.9.7/go.mod h1:cwu0lG7PUMfa9snN8LXBig5ynNVH9qI8YYLbd1fK2po= github.com/envoyproxy/go-control-plane v0.9.9-0.20201210154907-fd9021fe5dad/go.mod h1:cXg6YxExXjJnVBQHBLXeUAgxn2UodCpnH306RInaBQk= github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= -github.com/envoyproxy/protoc-gen-validate v0.6.8 h1:B2cR/FAaiMtYDHv5BQpaqtkjGuWQIgr2KQZtHQ7f6i8= -github.com/envoyproxy/protoc-gen-validate v0.6.8/go.mod h1:0ZMblUx0cxNoWRswEEXoj9kHBmqX8pxGweMiyIAfR6A= +github.com/envoyproxy/protoc-gen-validate v0.6.11 h1:HNGBeEpNP25KhqhtcvxmIGaRoa74QIG8nBT9GFTOInM= +github.com/envoyproxy/protoc-gen-validate v0.6.11/go.mod h1:0ZMblUx0cxNoWRswEEXoj9kHBmqX8pxGweMiyIAfR6A= github.com/go-gl/glfw v0.0.0-20190409004039-e6da0acd62b1/go.mod h1:vR7hzQXu2zJy9AVAgeJqvqgH9Q5CA+iKCZ2gyEVpxRU= github.com/go-gl/glfw/v3.3/glfw v0.0.0-20191125211704-12ad95a8df72/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= github.com/go-gl/glfw/v3.3/glfw v0.0.0-20200222043503-6f7a984d4dc4/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= From f51ddae7bd7dfb0ce9e605d2b29e467d68e886d5 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 6 Dec 2022 12:07:33 +0000 Subject: [PATCH 27/35] build(deps): bump github.com/envoyproxy/protoc-gen-validate Bumps [github.com/envoyproxy/protoc-gen-validate](https://github.com/envoyproxy/protoc-gen-validate) from 0.6.11 to 0.9.1. - [Release notes](https://github.com/envoyproxy/protoc-gen-validate/releases) - [Changelog](https://github.com/bufbuild/protoc-gen-validate/blob/main/.goreleaser.yaml) - [Commits](https://github.com/envoyproxy/protoc-gen-validate/commits/v0.9.1) --- updated-dependencies: - dependency-name: github.com/envoyproxy/protoc-gen-validate dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- go.mod | 10 +- go.sum | 396 ++------------------------------------------------------- 2 files changed, 14 insertions(+), 392 deletions(-) diff --git a/go.mod b/go.mod index 82e832b..a36dff3 100644 --- a/go.mod +++ b/go.mod @@ -3,7 +3,7 @@ module github.com/go-goim/api go 1.18 require ( - github.com/envoyproxy/protoc-gen-validate v0.6.11 + github.com/envoyproxy/protoc-gen-validate v0.9.1 github.com/stretchr/testify v1.8.0 google.golang.org/grpc v1.49.0 google.golang.org/protobuf v1.28.1 @@ -12,10 +12,12 @@ require ( require ( github.com/davecgh/go-spew v1.1.1 // indirect github.com/golang/protobuf v1.5.2 // indirect + github.com/kr/pretty v0.1.0 // indirect github.com/pmezard/go-difflib v1.0.0 // indirect - golang.org/x/net v0.0.0-20220907135653-1e95f45603a7 // indirect - golang.org/x/sys v0.0.0-20220908150016-7ac13a9a928d // indirect - golang.org/x/text v0.3.7 // indirect + golang.org/x/net v0.2.0 // indirect + golang.org/x/sys v0.2.0 // indirect + golang.org/x/text v0.4.0 // indirect google.golang.org/genproto v0.0.0-20210226172003-ab064af71705 // indirect + gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect ) diff --git a/go.sum b/go.sum index 2a2361f..cb66910 100644 --- a/go.sum +++ b/go.sum @@ -1,452 +1,84 @@ cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= -cloud.google.com/go v0.34.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= -cloud.google.com/go v0.38.0/go.mod h1:990N+gfupTy94rShfmMCWGDn0LpTmnzTp2qbd1dvSRU= -cloud.google.com/go v0.44.1/go.mod h1:iSa0KzasP4Uvy3f1mN/7PiObzGgflwredwwASm/v6AU= -cloud.google.com/go v0.44.2/go.mod h1:60680Gw3Yr4ikxnPRS/oxxkBccT6SA1yMk63TGekxKY= -cloud.google.com/go v0.44.3/go.mod h1:60680Gw3Yr4ikxnPRS/oxxkBccT6SA1yMk63TGekxKY= -cloud.google.com/go v0.45.1/go.mod h1:RpBamKRgapWJb87xiFSdk4g1CME7QZg3uwTez+TSTjc= -cloud.google.com/go v0.46.3/go.mod h1:a6bKKbmY7er1mI7TEI4lsAkts/mkhTSZK8w33B4RAg0= -cloud.google.com/go v0.50.0/go.mod h1:r9sluTvynVuxRIOHXQEHMFffphuXHOMZMycpNR5e6To= -cloud.google.com/go v0.52.0/go.mod h1:pXajvRH/6o3+F9jDHZWQ5PbGhn+o8w9qiu/CffaVdO4= -cloud.google.com/go v0.53.0/go.mod h1:fp/UouUEsRkN6ryDKNW/Upv/JBKnv6WDthjR6+vze6M= -cloud.google.com/go v0.54.0/go.mod h1:1rq2OEkV3YMf6n/9ZvGWI3GWw0VoqH/1x2nd8Is/bPc= -cloud.google.com/go v0.56.0/go.mod h1:jr7tqZxxKOVYizybht9+26Z/gUq7tiRzu+ACVAMbKVk= -cloud.google.com/go v0.57.0/go.mod h1:oXiQ6Rzq3RAkkY7N6t3TcE6jE+CIBBbA36lwQ1JyzZs= -cloud.google.com/go v0.62.0/go.mod h1:jmCYTdRCQuc1PHIIJ/maLInMho30T/Y0M4hTdTShOYc= -cloud.google.com/go v0.65.0/go.mod h1:O5N8zS7uWy9vkA9vayVHs65eM1ubvY4h553ofrNHObY= -cloud.google.com/go v0.72.0/go.mod h1:M+5Vjvlc2wnp6tjzE102Dw08nGShTscUx2nZMufOKPI= -cloud.google.com/go v0.74.0/go.mod h1:VV1xSbzvo+9QJOxLDaJfTjx5e+MePCpCWwvftOeQmWk= -cloud.google.com/go v0.75.0/go.mod h1:VGuuCn7PG0dwsd5XPVm2Mm3wlh3EL55/79EKB6hlPTY= -cloud.google.com/go/bigquery v1.0.1/go.mod h1:i/xbL2UlR5RvWAURpBYZTtm/cXjCha9lbfbpx4poX+o= -cloud.google.com/go/bigquery v1.3.0/go.mod h1:PjpwJnslEMmckchkHFfq+HTD2DmtT67aNFKH1/VBDHE= -cloud.google.com/go/bigquery v1.4.0/go.mod h1:S8dzgnTigyfTmLBfrtrhyYhwRxG72rYxvftPBK2Dvzc= -cloud.google.com/go/bigquery v1.5.0/go.mod h1:snEHRnqQbz117VIFhE8bmtwIDY80NLUZUMb4Nv6dBIg= -cloud.google.com/go/bigquery v1.7.0/go.mod h1://okPTzCYNXSlb24MZs83e2Do+h+VXtc4gLoIoXIAPc= -cloud.google.com/go/bigquery v1.8.0/go.mod h1:J5hqkt3O0uAFnINi6JXValWIb1v0goeZM77hZzJN/fQ= -cloud.google.com/go/datastore v1.0.0/go.mod h1:LXYbyblFSglQ5pkeyhO+Qmw7ukd3C+pD7TKLgZqpHYE= -cloud.google.com/go/datastore v1.1.0/go.mod h1:umbIZjpQpHh4hmRpGhH4tLFup+FVzqBi1b3c64qFpCk= -cloud.google.com/go/pubsub v1.0.1/go.mod h1:R0Gpsv3s54REJCy4fxDixWD93lHJMoZTyQ2kNxGRt3I= -cloud.google.com/go/pubsub v1.1.0/go.mod h1:EwwdRX2sKPjnvnqCa270oGRyludottCI76h+R3AArQw= -cloud.google.com/go/pubsub v1.2.0/go.mod h1:jhfEVHT8odbXTkndysNHCcx0awwzvfOlguIAii9o8iA= -cloud.google.com/go/pubsub v1.3.1/go.mod h1:i+ucay31+CNRpDW4Lu78I4xXG+O1r/MAHgjpRVR+TSU= -cloud.google.com/go/storage v1.0.0/go.mod h1:IhtSnM/ZTZV8YYJWCY8RULGVqBDmpoyjwiyrjsg+URw= -cloud.google.com/go/storage v1.5.0/go.mod h1:tpKbwo567HUNpVclU5sGELwQWBDZ8gh0ZeosJ0Rtdos= -cloud.google.com/go/storage v1.6.0/go.mod h1:N7U0C8pVQ/+NIKOBQyamJIeKQKkZ+mxpohlUTyfDhBk= -cloud.google.com/go/storage v1.8.0/go.mod h1:Wv1Oy7z6Yz3DshWRJFhqM/UCfaWIRTdp0RXyy7KQOVs= -cloud.google.com/go/storage v1.10.0/go.mod h1:FLPqc6j+Ki4BU591ie1oL6qBQGu2Bl/tZ9ullr3+Kg0= -cloud.google.com/go/storage v1.14.0/go.mod h1:GrKmX003DSIwi9o29oFT7YDnHYwZoctc3fOKtUw0Xmo= -dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU= github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= -github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo= github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= -github.com/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWRnGsAI= -github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e/go.mod h1:nSuG5e5PlCu98SY8svDHJxuZscDgtXS6KTTbou5AhLI= -github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1/go.mod h1:Q3SI9o4m/ZMnBNeIyt5eFwwo7qiLfzFZmjNmxjkiQlU= github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= -github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc= -github.com/cncf/udpa/go v0.0.0-20200629203442-efcf912fb354/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk= -github.com/cncf/udpa/go v0.0.0-20201120205902-5459f2c99403/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= -github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1mIlRU8Am5FuJP05cCM98= -github.com/envoyproxy/go-control-plane v0.9.7/go.mod h1:cwu0lG7PUMfa9snN8LXBig5ynNVH9qI8YYLbd1fK2po= -github.com/envoyproxy/go-control-plane v0.9.9-0.20201210154907-fd9021fe5dad/go.mod h1:cXg6YxExXjJnVBQHBLXeUAgxn2UodCpnH306RInaBQk= github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= -github.com/envoyproxy/protoc-gen-validate v0.6.11 h1:HNGBeEpNP25KhqhtcvxmIGaRoa74QIG8nBT9GFTOInM= -github.com/envoyproxy/protoc-gen-validate v0.6.11/go.mod h1:0ZMblUx0cxNoWRswEEXoj9kHBmqX8pxGweMiyIAfR6A= -github.com/go-gl/glfw v0.0.0-20190409004039-e6da0acd62b1/go.mod h1:vR7hzQXu2zJy9AVAgeJqvqgH9Q5CA+iKCZ2gyEVpxRU= -github.com/go-gl/glfw/v3.3/glfw v0.0.0-20191125211704-12ad95a8df72/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= -github.com/go-gl/glfw/v3.3/glfw v0.0.0-20200222043503-6f7a984d4dc4/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= +github.com/envoyproxy/protoc-gen-validate v0.9.1 h1:PS7VIOgmSVhWUEeZwTe7z7zouA22Cr590PzXKbZHOVY= +github.com/envoyproxy/protoc-gen-validate v0.9.1/go.mod h1:OKNgG7TCp5pF4d6XftA0++PMirau2/yoOwVac3AbF2w= github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= -github.com/golang/groupcache v0.0.0-20190702054246-869f871628b6/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= -github.com/golang/groupcache v0.0.0-20191227052852-215e87163ea7/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= -github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= -github.com/golang/mock v1.2.0/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= -github.com/golang/mock v1.3.1/go.mod h1:sBzyDLLjw3U8JLTeZvSv8jJB+tU5PVekmnlKIyFUx0Y= -github.com/golang/mock v1.4.0/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= -github.com/golang/mock v1.4.1/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= -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/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= -github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= -github.com/golang/protobuf v1.3.3/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw= -github.com/golang/protobuf v1.3.4/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw= -github.com/golang/protobuf v1.3.5/go.mod h1:6O5/vntMXwX2lRkT1hjjk0nAC1IDOTvTlVgjlRvqsdk= github.com/golang/protobuf v1.4.0-rc.1/go.mod h1:ceaxUfeHdC40wWswd/P6IGgMaK3YpKi5j83Wpe3EHw8= github.com/golang/protobuf v1.4.0-rc.1.0.20200221234624-67d41d38c208/go.mod h1:xKAWHe0F5eneWXFV3EuXVDTCmh+JuBKY0li0aMyXATA= github.com/golang/protobuf v1.4.0-rc.2/go.mod h1:LlEzMj4AhA7rCAGe4KMBDvJI+AwstrUpVNzEA03Pprs= github.com/golang/protobuf v1.4.0-rc.4.0.20200313231945-b860323f09d0/go.mod h1:WU3c8KckQ9AFe+yFwt9sWVRKCVIyN9cPHBJSNnbL67w= github.com/golang/protobuf v1.4.0/go.mod h1:jodUvKwWbYaEsadDk5Fwe5c77LiNKVO9IDvqG2KuDX0= github.com/golang/protobuf v1.4.1/go.mod h1:U8fpvMrcmy5pZrNK1lt4xCsGvpyWQ/VVv6QDs8UjoX8= -github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= -github.com/golang/protobuf v1.4.3/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk= github.com/golang/protobuf v1.5.2 h1:ROPKBNFfQgOUMifHyP+KYbvpjbdoFNs+aK7DXlji0Tw= github.com/golang/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= -github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= -github.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M= github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.4.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.2/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.4/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.6 h1:BKbKCqvP6I+rmFHt06ZmyQtvB8xAkWdhFyr0ZUNZcxQ= -github.com/google/martian v2.1.0+incompatible/go.mod h1:9I4somxYTbIHy5NJKHRl3wXiIaQGbYVAs8BPL6v8lEs= -github.com/google/martian/v3 v3.0.0/go.mod h1:y5Zk1BBys9G+gd6Jrk0W3cC1+ELVxBWuIGO+w/tUAp0= -github.com/google/martian/v3 v3.1.0/go.mod h1:y5Zk1BBys9G+gd6Jrk0W3cC1+ELVxBWuIGO+w/tUAp0= -github.com/google/pprof v0.0.0-20181206194817-3ea8567a2e57/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= -github.com/google/pprof v0.0.0-20190515194954-54271f7e092f/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= -github.com/google/pprof v0.0.0-20191218002539-d4f498aebedc/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= -github.com/google/pprof v0.0.0-20200212024743-f11f1df84d12/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= -github.com/google/pprof v0.0.0-20200229191704-1ebb73c60ed3/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= -github.com/google/pprof v0.0.0-20200430221834-fc25d7d30c6d/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= -github.com/google/pprof v0.0.0-20200708004538-1a94d8640e99/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= -github.com/google/pprof v0.0.0-20201023163331-3e6fc7fc9c4c/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= -github.com/google/pprof v0.0.0-20201203190320-1bf35d6f28c2/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= -github.com/google/pprof v0.0.0-20201218002935-b9804c9f04c2/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= -github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI= -github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= -github.com/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+vpHVxEJEs9eg= -github.com/googleapis/gax-go/v2 v2.0.5/go.mod h1:DWXyrwAJ9X0FpwwEdw+IPEYBICEFu5mhpdKc/us6bOk= -github.com/googleapis/google-cloud-go-testing v0.0.0-20200911160855-bcd43fbb19e8/go.mod h1:dvDLG8qkwmyD9a/MJJN3XJcT3xFxOKAvTZGvuZmac9g= -github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= -github.com/hashicorp/golang-lru v0.5.1/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= -github.com/iancoleman/strcase v0.2.0/go.mod h1:iwCmte+B7n89clKwxIoIXy/HfoL7AsD47ZCWhYzw7ho= -github.com/ianlancetaylor/demangle v0.0.0-20181102032728-5e5cf60278f6/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= -github.com/ianlancetaylor/demangle v0.0.0-20200824232613-28f6c0f3b639/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= -github.com/jstemmer/go-junit-report v0.0.0-20190106144839-af01ea7f8024/go.mod h1:6v2b51hI/fHJwM22ozAgKL4VKDeJcHhJFhtBdhmNjmU= -github.com/jstemmer/go-junit-report v0.9.1/go.mod h1:Brl9GWCQeLvo8nXZwPNNblvFj/XSXhF0NWZEnDohbsk= -github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= -github.com/kr/fs v0.1.0/go.mod h1:FFnZGqtBN9Gxj7eW1uZ42v5BccTP0vu6NEaFoC2HwRg= github.com/kr/pretty v0.1.0 h1:L/CwN0zerZDmRFUapSPitk6f+Q3+0za1rQkzVuMiMFI= github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= github.com/kr/text v0.1.0 h1:45sCR5RtlFHMR4UwH9sdQ5TC8v0qDQCHnXt+kaKSTVE= github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= -github.com/lyft/protoc-gen-star v0.6.1/go.mod h1:TGAoBVkt8w7MPG72TrKIu85MIdXwDuzJYeZuUPFPNwA= -github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= -github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= -github.com/pkg/sftp v1.10.1/go.mod h1:lYOWFsE0bwd1+KfKJaKeuokY15vzFx25BLbzYYoAxZI= -github.com/pkg/sftp v1.13.1/go.mod h1:3HaPG6Dq1ILlpPZRO0HVMrsydcdLt6HRDccSgb87qRg= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= -github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= -github.com/spf13/afero v1.3.3/go.mod h1:5KUK8ByomD5Ti5Artl0RtHeI5pTF7MIDuXL3yY520V4= -github.com/spf13/afero v1.9.2/go.mod h1:iUV7ddyEEZPO5gA3zD4fJt6iStLlL+Lg4m2cihcDf8Y= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw= -github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= -github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA= -github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= -github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.8.0 h1:pSgiaMZlXftHpm5L7V1+rVB+AZJydKsMxsQBIJw4PKk= github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU= -github.com/yuin/goldmark v1.1.25/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= -github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= -github.com/yuin/goldmark v1.1.32/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= -github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= -github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY= -go.opencensus.io v0.21.0/go.mod h1:mSImk1erAIZhrmZN+AvHh14ztQfjbGwt4TtuofqLduU= -go.opencensus.io v0.22.0/go.mod h1:+kGneAE2xo2IficOXnaByMWTGM9T73dGwxeWcUqIpI8= -go.opencensus.io v0.22.2/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= -go.opencensus.io v0.22.3/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= -go.opencensus.io v0.22.4/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= -go.opencensus.io v0.22.5/go.mod h1:5pWMHQbX5EPX2/62yrJeAkowc+lfs/XD7Uxpq3pI6kk= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= -golang.org/x/crypto v0.0.0-20190510104115-cbcb75029529/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= -golang.org/x/crypto v0.0.0-20190605123033-f99c8df09eb5/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= -golang.org/x/crypto v0.0.0-20190820162420-60c769a6c586/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= -golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= -golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= -golang.org/x/crypto v0.0.0-20210421170649-83a5a9bb288b/go.mod h1:T9bdIzuCu7OtxOm1hfPfRQxPLYneinmdGuTeoZ9dtd4= -golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= -golang.org/x/crypto v0.0.0-20211108221036-ceb1ce70b4fa/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= -golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= -golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8= -golang.org/x/exp v0.0.0-20190829153037-c13cbed26979/go.mod h1:86+5VVa7VpoJ4kLfm080zCjGlMRFzhUhsZKEZO7MGek= -golang.org/x/exp v0.0.0-20191030013958-a1ab85dbe136/go.mod h1:JXzH8nQsPlswgeRAPE3MuO9GYsAcnJvJ4vnMwN/5qkY= -golang.org/x/exp v0.0.0-20191129062945-2f5052295587/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= -golang.org/x/exp v0.0.0-20191227195350-da58074b4299/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= -golang.org/x/exp v0.0.0-20200119233911-0405dc783f0a/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= -golang.org/x/exp v0.0.0-20200207192155-f17229e696bd/go.mod h1:J/WKrq2StrnmMY6+EHIKF9dgMWnmCNThgcyBT1FY9mM= -golang.org/x/exp v0.0.0-20200224162631-6cc2880d07d6/go.mod h1:3jZMyOhIsHpP37uCMkUooju7aAi5cS1Q23tOzKc+0MU= -golang.org/x/image v0.0.0-20190227222117-0694c2d4d067/go.mod h1:kZ7UVZpmo3dzQBMxlp+ypCbDeSB+sBbTgSJuh5dn5js= -golang.org/x/image v0.0.0-20190802002840-cff245a6509b/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0= golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvxsM5YxQ5yQlVC4a0KAMCusXpPoU= -golang.org/x/lint v0.0.0-20190301231843-5614ed5bae6f/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= -golang.org/x/lint v0.0.0-20190409202823-959b441ac422/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= -golang.org/x/lint v0.0.0-20190909230951-414d861bb4ac/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= -golang.org/x/lint v0.0.0-20190930215403-16217165b5de/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= -golang.org/x/lint v0.0.0-20191125180803-fdd1cda4f05f/go.mod h1:5qLYkcX4OjUUV8bRuDixDT3tpyyb+LUpUlRWLxfhWrs= -golang.org/x/lint v0.0.0-20200130185559-910be7a94367/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= -golang.org/x/lint v0.0.0-20200302205851-738671d3881b/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= -golang.org/x/lint v0.0.0-20201208152925-83fdc39ff7b5/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= -golang.org/x/lint v0.0.0-20210508222113-6edffad5e616/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= -golang.org/x/mobile v0.0.0-20190312151609-d3739f865fa6/go.mod h1:z+o9i4GpDbdi3rU15maQ/Ox0txvL9dWGYEHz965HBQE= -golang.org/x/mobile v0.0.0-20190719004257-d2bd2a29d028/go.mod h1:E/iHnbuqvinMTCcRqshq8CkpyQDoeVncDDYHnLhea+o= -golang.org/x/mod v0.0.0-20190513183733-4bf6d317e70e/go.mod h1:mXi4GBBbnImb6dmsKGUJ2LatrhH/nqhxcFungHvyanc= -golang.org/x/mod v0.1.0/go.mod h1:0QHyrYULN0/3qlju5TqG8bIK38QM8yzMo5ekMj3DlcY= -golang.org/x/mod v0.1.1-0.20191105210325-c90efee705ee/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg= -golang.org/x/mod v0.1.1-0.20191107180719-034126e5016b/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg= -golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= -golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= -golang.org/x/mod v0.4.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= -golang.org/x/mod v0.4.1/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= -golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4= golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= -golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= -golang.org/x/net v0.0.0-20190501004415-9ce7a6920f09/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= -golang.org/x/net v0.0.0-20190503192946-f4e77d36d62c/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= -golang.org/x/net v0.0.0-20190603091049-60506f45cf65/go.mod h1:HSz+uSET+XFnRR8LxR5pz3Of3rY3CfYBVs4xY44aLks= -golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20190628185345-da137c7871d7/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20190724013045-ca1201d0de80/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20191209160850-c0dbc17a3553/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20200114155413-6afb5195e5aa/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20200202094626-16171245cfb2/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20200222125558-5a598a2470a0/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20200301022130-244492dfa37a/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20200324143707-d3edc9973b7e/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= -golang.org/x/net v0.0.0-20200501053045-e0ff5e5a1de5/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= -golang.org/x/net v0.0.0-20200506145744-7e3656a0809f/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= -golang.org/x/net v0.0.0-20200513185701-a91f0712d120/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= -golang.org/x/net v0.0.0-20200520182314-0ba52f642ac2/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= -golang.org/x/net v0.0.0-20200625001655-4c5254603344/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= -golang.org/x/net v0.0.0-20200707034311-ab3426394381/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= -golang.org/x/net v0.0.0-20200822124328-c89045814202/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= -golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= -golang.org/x/net v0.0.0-20201031054903-ff519b6c9102/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= -golang.org/x/net v0.0.0-20201209123823-ac852fbbde11/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= -golang.org/x/net v0.0.0-20201224014010-6772e930b67b/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= -golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= -golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= -golang.org/x/net v0.0.0-20220907135653-1e95f45603a7 h1:1WGATo9HAhkWMbfyuVU0tEFP88OIkUvwaHFveQPvzCQ= -golang.org/x/net v0.0.0-20220907135653-1e95f45603a7/go.mod h1:YDH+HFinaLZZlnHAfSS6ZXJJ9M9t4Dl22yv3iI2vPwk= +golang.org/x/net v0.2.0 h1:sZfSu1wtKLGlWI4ZZayP0ck9Y73K1ynO6gqzTdBVdPU= +golang.org/x/net v0.2.0/go.mod h1:KqCZLdyyvdV855qA2rE3GC2aiw5xGR5TEjj8smXukLY= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= -golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= -golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= -golang.org/x/oauth2 v0.0.0-20191202225959-858c2ad4c8b6/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= -golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= -golang.org/x/oauth2 v0.0.0-20200902213428-5d25da1a8d43/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= -golang.org/x/oauth2 v0.0.0-20201109201403-9fd604954f58/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= -golang.org/x/oauth2 v0.0.0-20201208152858-08078c50e5b5/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= -golang.org/x/oauth2 v0.0.0-20210218202405-ba52d332ba99/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20190227155943-e225da77a7e6/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20200317015054-43a5402ce75a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20200625203802-6e8e738ad208/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20201207232520-09787c993a3a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20190312061237-fead79001313/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190502145724-3ef323f4f1fd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190507160741-ecd444e8653b/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190606165138-5da285871e9c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190624142023-c5567b49c5d0/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190726091711-fc99dfbffb4e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20191001151750-bb3f8db39f24/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20191204072324-ce4227a45e2e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20191228213918-04cbcbbfeed8/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200113162924-86b910548bc1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200122134326-e047566fdf82/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200202164722-d101bd2416d5/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200212091648-12a6c2dcc1e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200223170610-d5e6a3e2c0ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200302150141-5c8b2ff67527/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200331124033-c3d80250170d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200501052902-10377860bb8e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200511232937-7e40ca221e25/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200515095857-1151b9dac4a9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200523222454-059865788121/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200803210538-64077c9b5642/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200905004654-be1d3432aa8f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20201201145000-ef89a241ccb3/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210104204734-6f8348627aad/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210119212857-b64e53b001e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210225134936-a50acf3fe073/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210423185535-09eb48e85fd7/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220728004956-3c1f35247d10/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220908150016-7ac13a9a928d h1:RoyzQTK76Rktm3p4xyZslc8T8I1tBz4UEjZCzeh57mM= -golang.org/x/sys v0.0.0-20220908150016-7ac13a9a928d/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= -golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= -golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= +golang.org/x/sys v0.2.0 h1:ljd4t30dBnAvMZaQCevtY0xLLD0A+bRZXbgLMLU1F/A= +golang.org/x/sys v0.2.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= -golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= -golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= -golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= -golang.org/x/text v0.3.4/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= -golang.org/x/text v0.3.7 h1:olpwvP2KacW1ZWvsR7uQhoyTYvKAupfQrRGBFM352Gk= -golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= -golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= -golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= -golang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= -golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/text v0.4.0 h1:BrVqGRd7+k1DiOgtnFvAkoQEWQvBc25ouMJM6429SFg= +golang.org/x/text v0.4.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY= golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= -golang.org/x/tools v0.0.0-20190312151545-0bb0c0a6e846/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= -golang.org/x/tools v0.0.0-20190312170243-e65039ee4138/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= -golang.org/x/tools v0.0.0-20190425150028-36563e24a262/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= -golang.org/x/tools v0.0.0-20190506145303-2d16b83fe98c/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= golang.org/x/tools v0.0.0-20190524140312-2c0ae7006135/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= -golang.org/x/tools v0.0.0-20190606124116-d0a3d012864b/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= -golang.org/x/tools v0.0.0-20190621195816-6e04913cbbac/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= -golang.org/x/tools v0.0.0-20190628153133-6cdbf07be9d0/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= -golang.org/x/tools v0.0.0-20190816200558-6889da9d5479/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20190911174233-4f2ddba30aff/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191012152004-8de300cfc20a/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191113191852-77e3bb0ad9e7/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191115202509-3a792d9c32b2/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191125144606-a911d9008d1f/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191130070609-6e064ea0cf2d/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191216173652-a0e659d51361/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20191227053925-7b8e75db28f4/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200117161641-43d50277825c/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200122220014-bf1340f18c4a/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200130002326-2f3ba24bd6e7/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200204074204-1cc6d1ef6c74/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200207183749-b753a1ba74fa/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200212150539-ea181f53ac56/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200224181240-023911ca70b2/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200227222343-706bc42d1f0d/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200304193943-95d2e580d8eb/go.mod h1:o4KQGtdN14AW+yjsvvwRTJJuXz8XRtIHtEnmAXLyFUw= -golang.org/x/tools v0.0.0-20200312045724-11d5b4c81c7d/go.mod h1:o4KQGtdN14AW+yjsvvwRTJJuXz8XRtIHtEnmAXLyFUw= -golang.org/x/tools v0.0.0-20200331025713-a30bf2db82d4/go.mod h1:Sl4aGygMT6LrqrWclx+PTx3U+LnKx/seiNR+3G19Ar8= -golang.org/x/tools v0.0.0-20200501065659-ab2804fb9c9d/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= -golang.org/x/tools v0.0.0-20200512131952-2bc93b1c0c88/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= -golang.org/x/tools v0.0.0-20200515010526-7d3b6ebf133d/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= -golang.org/x/tools v0.0.0-20200618134242-20370b0cb4b2/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= -golang.org/x/tools v0.0.0-20200729194436-6467de6f59a7/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= -golang.org/x/tools v0.0.0-20200804011535-6c149bb5ef0d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= -golang.org/x/tools v0.0.0-20200825202427-b303f430e36d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= -golang.org/x/tools v0.0.0-20200904185747-39188db58858/go.mod h1:Cj7w3i3Rnn0Xh82ur9kSqwfTHTeVxaDqrfMjpcNT6bE= -golang.org/x/tools v0.0.0-20201110124207-079ba7bd75cd/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= -golang.org/x/tools v0.0.0-20201201161351-ac6f37ff4c2a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= -golang.org/x/tools v0.0.0-20201208233053-a543418bbed2/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= -golang.org/x/tools v0.0.0-20210105154028-b0ab187a4818/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= -golang.org/x/tools v0.0.0-20210108195828-e2f9c7f1fc8e/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= -golang.org/x/tools v0.1.0/go.mod h1:xkSsbof2nBLbhDlRMhhhyNLN/zl3eTqcnHD5viDpcZ0= -golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc= -golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20220907171357-04be3eba64a2 h1:H2TDz8ibqkAF6YGhCdN3jS9O0/s90v0rJh3X/OLHEUk= -golang.org/x/xerrors v0.0.0-20220907171357-04be3eba64a2/go.mod h1:K8+ghG5WaK9qNqU5K3HdILfMLy1f3aNYFI/wnl100a8= -google.golang.org/api v0.4.0/go.mod h1:8k5glujaEP+g9n7WNsDg8QP6cUVNI86fCNMcbazEtwE= -google.golang.org/api v0.7.0/go.mod h1:WtwebWUNSVBH/HAw79HIFXZNqEvBhG+Ra+ax0hx3E3M= -google.golang.org/api v0.8.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg= -google.golang.org/api v0.9.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg= -google.golang.org/api v0.13.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= -google.golang.org/api v0.14.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= -google.golang.org/api v0.15.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= -google.golang.org/api v0.17.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= -google.golang.org/api v0.18.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= -google.golang.org/api v0.19.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= -google.golang.org/api v0.20.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= -google.golang.org/api v0.22.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= -google.golang.org/api v0.24.0/go.mod h1:lIXQywCXRcnZPGlsd8NbLnOjtAoL6em04bJ9+z0MncE= -google.golang.org/api v0.28.0/go.mod h1:lIXQywCXRcnZPGlsd8NbLnOjtAoL6em04bJ9+z0MncE= -google.golang.org/api v0.29.0/go.mod h1:Lcubydp8VUV7KeIHD9z2Bys/sm/vGKnG1UHuDBSrHWM= -google.golang.org/api v0.30.0/go.mod h1:QGmEvQ87FHZNiUVJkT14jQNYJ4ZJjdRF23ZXz5138Fc= -google.golang.org/api v0.35.0/go.mod h1:/XrVsuzM0rZmrsbjJutiuftIzeuTQcEeaYcSk/mQ1dg= -google.golang.org/api v0.36.0/go.mod h1:+z5ficQTmoYpPn8LCUNVpK5I7hwkpjbcgqA7I34qYtE= -google.golang.org/api v0.40.0/go.mod h1:fYKFpnQN0DsDSKRVRcQSDQNtqWPfM9i+zNPxepjRCQ8= google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= -google.golang.org/appengine v1.5.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= -google.golang.org/appengine v1.6.1/go.mod h1:i06prIuMbXzDqacNJfV5OdTW448YApPu5ww/cMBSeb0= -google.golang.org/appengine v1.6.5/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= -google.golang.org/appengine v1.6.6/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= -google.golang.org/appengine v1.6.7/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= -google.golang.org/genproto v0.0.0-20190307195333-5fe7a883aa19/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= -google.golang.org/genproto v0.0.0-20190418145605-e7d98fc518a7/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= -google.golang.org/genproto v0.0.0-20190425155659-357c62f0e4bb/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= -google.golang.org/genproto v0.0.0-20190502173448-54afdca5d873/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= -google.golang.org/genproto v0.0.0-20190801165951-fa694d86fc64/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= -google.golang.org/genproto v0.0.0-20190911173649-1774047e7e51/go.mod h1:IbNlFCBrqXvoKpeg0TB2l7cyZUmoaFKYIwrEpbDKLA8= -google.golang.org/genproto v0.0.0-20191108220845-16a3f7862a1a/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= -google.golang.org/genproto v0.0.0-20191115194625-c23dd37a84c9/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= -google.golang.org/genproto v0.0.0-20191216164720-4f79533eabd1/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= -google.golang.org/genproto v0.0.0-20191230161307-f3c370f40bfb/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= -google.golang.org/genproto v0.0.0-20200115191322-ca5a22157cba/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= -google.golang.org/genproto v0.0.0-20200122232147-0452cf42e150/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= -google.golang.org/genproto v0.0.0-20200204135345-fa8e72b47b90/go.mod h1:GmwEX6Z4W5gMy59cAlVYjN9JhxgbQH6Gn+gFDQe2lzA= -google.golang.org/genproto v0.0.0-20200212174721-66ed5ce911ce/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200224152610-e50cd9704f63/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200228133532-8c2c7df3a383/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200305110556-506484158171/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200312145019-da6875a35672/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200331122359-1ee6d9798940/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200430143042-b979b6f78d84/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200511104702-f5ebc3bea380/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200515170657-fc4c6c6a6587/go.mod h1:YsZOwe1myG/8QRHRsmBRE1LrgQY60beZKjly0O1fX9U= google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013/go.mod h1:NbSheEEYHJ7i3ixzK3sjbqSGDJWnxyFXZblF3eUsNvo= -google.golang.org/genproto v0.0.0-20200618031413-b414f8b61790/go.mod h1:jDfRM7FcilCzHH/e9qn6dsT145K34l5v+OpcnNgKAAA= -google.golang.org/genproto v0.0.0-20200729003335-053ba62fc06f/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20200804131852-c06518451d9c/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20200825200019-8632dd797987/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20200904004341-0bd0a958aa1d/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20201109203340-2640f1f9cdfb/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20201201144952-b05cb90ed32e/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20201210142538-e3217bee35cc/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20201214200347-8c77b98c765d/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20210108203827-ffc7fda8c3d7/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20210226172003-ab064af71705 h1:PYBmACG+YEv8uQPW0r1kJj8tR+gkF0UWq7iFdUezwEw= google.golang.org/genproto v0.0.0-20210226172003-ab064af71705/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= -google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38= -google.golang.org/grpc v1.21.1/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= -google.golang.org/grpc v1.25.1/go.mod h1:c3i+UQWmh7LiEpx4sFZnkU36qjEYZ0imhYfXVyQciAY= -google.golang.org/grpc v1.26.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= google.golang.org/grpc v1.27.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= -google.golang.org/grpc v1.27.1/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= -google.golang.org/grpc v1.28.0/go.mod h1:rpkK4SK4GF4Ach/+MFLZUBavHOvF2JJB5uozKKal+60= -google.golang.org/grpc v1.29.1/go.mod h1:itym6AZVZYACWQqET3MqgPpjcuV5QH3BxFS3IjizoKk= -google.golang.org/grpc v1.30.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= -google.golang.org/grpc v1.31.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= -google.golang.org/grpc v1.31.1/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= -google.golang.org/grpc v1.33.2/go.mod h1:JMHMWHQWaTccqQQlmk3MJZS+GWXOdAesneDmEnv2fbc= -google.golang.org/grpc v1.34.0/go.mod h1:WotjhfgOW/POjDeRt8vscBtXq+2VjORFy659qA51WJ8= -google.golang.org/grpc v1.35.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= google.golang.org/grpc v1.49.0 h1:WTLtQzmQori5FUH25Pq4WT22oCsv8USpQ+F6rqtsmxw= google.golang.org/grpc v1.49.0/go.mod h1:ZgQEeidpAuNRZ8iRrlBKXZQP1ghovWIVhdJRyCDK+GI= google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= @@ -455,10 +87,8 @@ google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQ google.golang.org/protobuf v1.20.1-0.20200309200217-e05f789c0967/go.mod h1:A+miEFZTKqfCUM6K7xSMQL9OKL/b6hQv+e19PK+JZNE= google.golang.org/protobuf v1.21.0/go.mod h1:47Nbq4nVaFHyn7ilMalzfO3qCViNmqZ2kzikPIcrTAo= google.golang.org/protobuf v1.22.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= -google.golang.org/protobuf v1.23.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= google.golang.org/protobuf v1.23.1-0.20200526195155-81db48ad09cc/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= google.golang.org/protobuf v1.24.0/go.mod h1:r/3tXBNzIEhYS9I1OUVjXDlt8tc493IdKGjtUeSXeh4= -google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlbajtzgsN7c= google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= google.golang.org/protobuf v1.28.1 h1:d0NfwRgPtno5B1Wa6L2DAG+KivqkdutMf1UhdNx175w= @@ -466,18 +96,8 @@ google.golang.org/protobuf v1.28.1/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqw gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127 h1:qIbj1fsPNlZgppZ+VLlY7N33q108Sa+fhmuc+sWQYwY= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= -gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= -gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= -honnef.co/go/tools v0.0.0-20190106161140-3f1c8253044a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= -honnef.co/go/tools v0.0.0-20190418001031-e561f6794a2a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= -honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg= -honnef.co/go/tools v0.0.1-2020.1.3/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= -honnef.co/go/tools v0.0.1-2020.1.4/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= -rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8= -rsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0= -rsc.io/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA= From 5d1816415eb29542900de00ae2c2e59d5528d191 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 22 Feb 2023 02:15:10 +0000 Subject: [PATCH 28/35] build(deps): bump golang.org/x/net from 0.2.0 to 0.7.0 Bumps [golang.org/x/net](https://github.com/golang/net) from 0.2.0 to 0.7.0. - [Release notes](https://github.com/golang/net/releases) - [Commits](https://github.com/golang/net/compare/v0.2.0...v0.7.0) --- updated-dependencies: - dependency-name: golang.org/x/net dependency-type: indirect ... Signed-off-by: dependabot[bot] --- go.mod | 6 +++--- go.sum | 12 ++++++------ 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/go.mod b/go.mod index a36dff3..7d2c74f 100644 --- a/go.mod +++ b/go.mod @@ -14,9 +14,9 @@ require ( github.com/golang/protobuf v1.5.2 // indirect github.com/kr/pretty v0.1.0 // indirect github.com/pmezard/go-difflib v1.0.0 // indirect - golang.org/x/net v0.2.0 // indirect - golang.org/x/sys v0.2.0 // indirect - golang.org/x/text v0.4.0 // indirect + golang.org/x/net v0.7.0 // indirect + golang.org/x/sys v0.5.0 // indirect + golang.org/x/text v0.7.0 // indirect google.golang.org/genproto v0.0.0-20210226172003-ab064af71705 // indirect gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect diff --git a/go.sum b/go.sum index cb66910..61458b6 100644 --- a/go.sum +++ b/go.sum @@ -50,19 +50,19 @@ golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73r golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= -golang.org/x/net v0.2.0 h1:sZfSu1wtKLGlWI4ZZayP0ck9Y73K1ynO6gqzTdBVdPU= -golang.org/x/net v0.2.0/go.mod h1:KqCZLdyyvdV855qA2rE3GC2aiw5xGR5TEjj8smXukLY= +golang.org/x/net v0.7.0 h1:rJrUqqhjsgNp7KqAIc25s9pZnjU7TUcSY7HcVZjdn1g= +golang.org/x/net v0.7.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.2.0 h1:ljd4t30dBnAvMZaQCevtY0xLLD0A+bRZXbgLMLU1F/A= -golang.org/x/sys v0.2.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.5.0 h1:MUK/U/4lj1t1oPg0HfuXDN/Z1wv31ZJ/YcPiGccS4DU= +golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= -golang.org/x/text v0.4.0 h1:BrVqGRd7+k1DiOgtnFvAkoQEWQvBc25ouMJM6429SFg= -golang.org/x/text v0.4.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= +golang.org/x/text v0.7.0 h1:4BRB4x83lYWy72KwLD/qYDuTu7q9PjSagHvijDw7cLo= +golang.org/x/text v0.7.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY= golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= From 679818a7f761153a8fadeb05c46e9f5558462b68 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 22 Feb 2023 02:15:30 +0000 Subject: [PATCH 29/35] build(deps): bump github.com/stretchr/testify from 1.8.0 to 1.8.1 Bumps [github.com/stretchr/testify](https://github.com/stretchr/testify) from 1.8.0 to 1.8.1. - [Release notes](https://github.com/stretchr/testify/releases) - [Commits](https://github.com/stretchr/testify/compare/v1.8.0...v1.8.1) --- updated-dependencies: - dependency-name: github.com/stretchr/testify dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- go.mod | 2 +- go.sum | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/go.mod b/go.mod index a36dff3..dd2f091 100644 --- a/go.mod +++ b/go.mod @@ -4,7 +4,7 @@ go 1.18 require ( github.com/envoyproxy/protoc-gen-validate v0.9.1 - github.com/stretchr/testify v1.8.0 + github.com/stretchr/testify v1.8.1 google.golang.org/grpc v1.49.0 google.golang.org/protobuf v1.28.1 ) diff --git a/go.sum b/go.sum index cb66910..9ff5287 100644 --- a/go.sum +++ b/go.sum @@ -38,9 +38,11 @@ github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZN github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw= +github.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpEOglKo= github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= -github.com/stretchr/testify v1.8.0 h1:pSgiaMZlXftHpm5L7V1+rVB+AZJydKsMxsQBIJw4PKk= github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU= +github.com/stretchr/testify v1.8.1 h1:w7B6lhMri9wdJUVmEZPGGhZzrYTPvgJArz7wNPgYKsk= +github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= From aa4e1fde03b4f272525631e9e0229f0a0120ccc2 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 27 Feb 2023 13:09:49 +0000 Subject: [PATCH 30/35] build(deps): bump github.com/stretchr/testify from 1.8.1 to 1.8.2 Bumps [github.com/stretchr/testify](https://github.com/stretchr/testify) from 1.8.1 to 1.8.2. - [Release notes](https://github.com/stretchr/testify/releases) - [Commits](https://github.com/stretchr/testify/compare/v1.8.1...v1.8.2) --- updated-dependencies: - dependency-name: github.com/stretchr/testify dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- go.mod | 2 +- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index a18b7d4..44c552f 100644 --- a/go.mod +++ b/go.mod @@ -4,7 +4,7 @@ go 1.18 require ( github.com/envoyproxy/protoc-gen-validate v0.9.1 - github.com/stretchr/testify v1.8.1 + github.com/stretchr/testify v1.8.2 google.golang.org/grpc v1.49.0 google.golang.org/protobuf v1.28.1 ) diff --git a/go.sum b/go.sum index c2ab0f9..e7925d8 100644 --- a/go.sum +++ b/go.sum @@ -41,8 +41,8 @@ github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSS github.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpEOglKo= github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU= -github.com/stretchr/testify v1.8.1 h1:w7B6lhMri9wdJUVmEZPGGhZzrYTPvgJArz7wNPgYKsk= -github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= +github.com/stretchr/testify v1.8.2 h1:+h33VjcLVPDHtOdpUCuF+7gSuG3yGIftsP1YvFihtJ8= +github.com/stretchr/testify v1.8.2/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= From 17a145e053e3073a89e624d7e91e04db5710e025 Mon Sep 17 00:00:00 2001 From: Yusan Kurban Date: Tue, 28 Feb 2023 09:44:36 +0800 Subject: [PATCH 31/35] Update dependabot.yml --- .github/dependabot.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/dependabot.yml b/.github/dependabot.yml index 45c071d..6494926 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -8,7 +8,7 @@ updates: - package-ecosystem: "gomod" # See documentation for possible values directory: "/" # Location of package manifests schedule: - interval: "daily" + interval: "weekly" reviewers: - "yusank" assignees: From 5e0fd5a9bc5a3f8b15be50e0278cca92109df80b Mon Sep 17 00:00:00 2001 From: yusank Date: Mon, 20 Mar 2023 17:33:19 +0800 Subject: [PATCH 32/35] feat: support history message service Signed-off-by: Yusan Kurban --- message/v1/message.pb.go | 761 ++++++++++++++++++++++---- message/v1/message.pb.validate.go | 869 ++++++++++++++++++++++++++++++ message/v1/message.proto | 53 ++ message/v1/message_grpc.pb.go | 158 ++++++ 4 files changed, 1737 insertions(+), 104 deletions(-) diff --git a/message/v1/message.pb.go b/message/v1/message.pb.go index ead9050..3700602 100644 --- a/message/v1/message.pb.go +++ b/message/v1/message.pb.go @@ -573,6 +573,116 @@ func (x *QueryOfflineMessageResp) GetMessages() []*Message { return nil } +type ConfirmLastMsgIDReq struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Uid int64 `protobuf:"varint,1,opt,name=uid,proto3" json:"uid,omitempty"` + LastMsgId int64 `protobuf:"varint,2,opt,name=last_msg_id,json=lastMsgId,proto3" json:"last_msg_id,omitempty"` +} + +func (x *ConfirmLastMsgIDReq) Reset() { + *x = ConfirmLastMsgIDReq{} + if protoimpl.UnsafeEnabled { + mi := &file_message_v1_message_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ConfirmLastMsgIDReq) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ConfirmLastMsgIDReq) ProtoMessage() {} + +func (x *ConfirmLastMsgIDReq) ProtoReflect() protoreflect.Message { + mi := &file_message_v1_message_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 ConfirmLastMsgIDReq.ProtoReflect.Descriptor instead. +func (*ConfirmLastMsgIDReq) Descriptor() ([]byte, []int) { + return file_message_v1_message_proto_rawDescGZIP(), []int{6} +} + +func (x *ConfirmLastMsgIDReq) GetUid() int64 { + if x != nil { + return x.Uid + } + return 0 +} + +func (x *ConfirmLastMsgIDReq) GetLastMsgId() int64 { + if x != nil { + return x.LastMsgId + } + return 0 +} + +type ConfirmLastMsgIDResp struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Response *response.BaseResponse `protobuf:"bytes,1,opt,name=response,proto3" json:"response,omitempty"` + LastMsgId int64 `protobuf:"varint,2,opt,name=last_msg_id,json=lastMsgId,proto3" json:"last_msg_id,omitempty"` +} + +func (x *ConfirmLastMsgIDResp) Reset() { + *x = ConfirmLastMsgIDResp{} + if protoimpl.UnsafeEnabled { + mi := &file_message_v1_message_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ConfirmLastMsgIDResp) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ConfirmLastMsgIDResp) ProtoMessage() {} + +func (x *ConfirmLastMsgIDResp) ProtoReflect() protoreflect.Message { + mi := &file_message_v1_message_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 ConfirmLastMsgIDResp.ProtoReflect.Descriptor instead. +func (*ConfirmLastMsgIDResp) Descriptor() ([]byte, []int) { + return file_message_v1_message_proto_rawDescGZIP(), []int{7} +} + +func (x *ConfirmLastMsgIDResp) GetResponse() *response.BaseResponse { + if x != nil { + return x.Response + } + return nil +} + +func (x *ConfirmLastMsgIDResp) GetLastMsgId() int64 { + if x != nil { + return x.LastMsgId + } + return 0 +} + // storage message type StorageMessage struct { state protoimpl.MessageState @@ -588,7 +698,7 @@ type StorageMessage struct { func (x *StorageMessage) Reset() { *x = StorageMessage{} if protoimpl.UnsafeEnabled { - mi := &file_message_v1_message_proto_msgTypes[6] + mi := &file_message_v1_message_proto_msgTypes[8] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -601,7 +711,7 @@ func (x *StorageMessage) String() string { func (*StorageMessage) ProtoMessage() {} func (x *StorageMessage) ProtoReflect() protoreflect.Message { - mi := &file_message_v1_message_proto_msgTypes[6] + mi := &file_message_v1_message_proto_msgTypes[8] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -614,7 +724,7 @@ func (x *StorageMessage) ProtoReflect() protoreflect.Message { // Deprecated: Use StorageMessage.ProtoReflect.Descriptor instead. func (*StorageMessage) Descriptor() ([]byte, []int) { - return file_message_v1_message_proto_rawDescGZIP(), []int{6} + return file_message_v1_message_proto_rawDescGZIP(), []int{8} } func (x *StorageMessage) GetRowKey() string { @@ -645,6 +755,282 @@ func (x *StorageMessage) GetExtra() *StorageMessage_Extra { return nil } +type QuerySessionHistoryMessageReq struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Uid int64 `protobuf:"varint,1,opt,name=uid,proto3" json:"uid,omitempty"` + SessionId string `protobuf:"bytes,2,opt,name=session_id,json=sessionId,proto3" json:"session_id,omitempty"` + LastMsgId int64 `protobuf:"varint,3,opt,name=last_msg_id,json=lastMsgId,proto3" json:"last_msg_id,omitempty"` + Page int32 `protobuf:"varint,4,opt,name=page,proto3" json:"page,omitempty"` + PageSize int32 `protobuf:"varint,5,opt,name=page_size,json=pageSize,proto3" json:"page_size,omitempty"` +} + +func (x *QuerySessionHistoryMessageReq) Reset() { + *x = QuerySessionHistoryMessageReq{} + if protoimpl.UnsafeEnabled { + mi := &file_message_v1_message_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *QuerySessionHistoryMessageReq) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*QuerySessionHistoryMessageReq) ProtoMessage() {} + +func (x *QuerySessionHistoryMessageReq) ProtoReflect() protoreflect.Message { + mi := &file_message_v1_message_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 QuerySessionHistoryMessageReq.ProtoReflect.Descriptor instead. +func (*QuerySessionHistoryMessageReq) Descriptor() ([]byte, []int) { + return file_message_v1_message_proto_rawDescGZIP(), []int{9} +} + +func (x *QuerySessionHistoryMessageReq) GetUid() int64 { + if x != nil { + return x.Uid + } + return 0 +} + +func (x *QuerySessionHistoryMessageReq) GetSessionId() string { + if x != nil { + return x.SessionId + } + return "" +} + +func (x *QuerySessionHistoryMessageReq) GetLastMsgId() int64 { + if x != nil { + return x.LastMsgId + } + return 0 +} + +func (x *QuerySessionHistoryMessageReq) GetPage() int32 { + if x != nil { + return x.Page + } + return 0 +} + +func (x *QuerySessionHistoryMessageReq) GetPageSize() int32 { + if x != nil { + return x.PageSize + } + return 0 +} + +type QuerySessionHistoryMessageResp struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Response *response.BaseResponse `protobuf:"bytes,1,opt,name=response,proto3" json:"response,omitempty"` + Total int32 `protobuf:"varint,2,opt,name=total,proto3" json:"total,omitempty"` + Messages []*Message `protobuf:"bytes,3,rep,name=messages,proto3" json:"messages,omitempty"` +} + +func (x *QuerySessionHistoryMessageResp) Reset() { + *x = QuerySessionHistoryMessageResp{} + if protoimpl.UnsafeEnabled { + mi := &file_message_v1_message_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *QuerySessionHistoryMessageResp) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*QuerySessionHistoryMessageResp) ProtoMessage() {} + +func (x *QuerySessionHistoryMessageResp) ProtoReflect() protoreflect.Message { + mi := &file_message_v1_message_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 QuerySessionHistoryMessageResp.ProtoReflect.Descriptor instead. +func (*QuerySessionHistoryMessageResp) Descriptor() ([]byte, []int) { + return file_message_v1_message_proto_rawDescGZIP(), []int{10} +} + +func (x *QuerySessionHistoryMessageResp) GetResponse() *response.BaseResponse { + if x != nil { + return x.Response + } + return nil +} + +func (x *QuerySessionHistoryMessageResp) GetTotal() int32 { + if x != nil { + return x.Total + } + return 0 +} + +func (x *QuerySessionHistoryMessageResp) GetMessages() []*Message { + if x != nil { + return x.Messages + } + return nil +} + +type SyncHistoryMessageReq struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Uid int64 `protobuf:"varint,1,opt,name=uid,proto3" json:"uid,omitempty"` + LastMsgId int64 `protobuf:"varint,2,opt,name=last_msg_id,json=lastMsgId,proto3" json:"last_msg_id,omitempty"` + Page int32 `protobuf:"varint,3,opt,name=page,proto3" json:"page,omitempty"` + PageSize int32 `protobuf:"varint,4,opt,name=page_size,json=pageSize,proto3" json:"page_size,omitempty"` +} + +func (x *SyncHistoryMessageReq) Reset() { + *x = SyncHistoryMessageReq{} + if protoimpl.UnsafeEnabled { + mi := &file_message_v1_message_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *SyncHistoryMessageReq) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SyncHistoryMessageReq) ProtoMessage() {} + +func (x *SyncHistoryMessageReq) ProtoReflect() protoreflect.Message { + mi := &file_message_v1_message_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 SyncHistoryMessageReq.ProtoReflect.Descriptor instead. +func (*SyncHistoryMessageReq) Descriptor() ([]byte, []int) { + return file_message_v1_message_proto_rawDescGZIP(), []int{11} +} + +func (x *SyncHistoryMessageReq) GetUid() int64 { + if x != nil { + return x.Uid + } + return 0 +} + +func (x *SyncHistoryMessageReq) GetLastMsgId() int64 { + if x != nil { + return x.LastMsgId + } + return 0 +} + +func (x *SyncHistoryMessageReq) GetPage() int32 { + if x != nil { + return x.Page + } + return 0 +} + +func (x *SyncHistoryMessageReq) GetPageSize() int32 { + if x != nil { + return x.PageSize + } + return 0 +} + +type SyncHistoryMessageResp struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Response *response.BaseResponse `protobuf:"bytes,1,opt,name=response,proto3" json:"response,omitempty"` + Total int32 `protobuf:"varint,2,opt,name=total,proto3" json:"total,omitempty"` + Messages []*Message `protobuf:"bytes,3,rep,name=messages,proto3" json:"messages,omitempty"` +} + +func (x *SyncHistoryMessageResp) Reset() { + *x = SyncHistoryMessageResp{} + if protoimpl.UnsafeEnabled { + mi := &file_message_v1_message_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *SyncHistoryMessageResp) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SyncHistoryMessageResp) ProtoMessage() {} + +func (x *SyncHistoryMessageResp) ProtoReflect() protoreflect.Message { + mi := &file_message_v1_message_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 SyncHistoryMessageResp.ProtoReflect.Descriptor instead. +func (*SyncHistoryMessageResp) Descriptor() ([]byte, []int) { + return file_message_v1_message_proto_rawDescGZIP(), []int{12} +} + +func (x *SyncHistoryMessageResp) GetResponse() *response.BaseResponse { + if x != nil { + return x.Response + } + return nil +} + +func (x *SyncHistoryMessageResp) GetTotal() int32 { + if x != nil { + return x.Total + } + return 0 +} + +func (x *SyncHistoryMessageResp) GetMessages() []*Message { + if x != nil { + return x.Messages + } + return nil +} + type StorageMessage_Users struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -658,7 +1044,7 @@ type StorageMessage_Users struct { func (x *StorageMessage_Users) Reset() { *x = StorageMessage_Users{} if protoimpl.UnsafeEnabled { - mi := &file_message_v1_message_proto_msgTypes[7] + mi := &file_message_v1_message_proto_msgTypes[13] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -671,7 +1057,7 @@ func (x *StorageMessage_Users) String() string { func (*StorageMessage_Users) ProtoMessage() {} func (x *StorageMessage_Users) ProtoReflect() protoreflect.Message { - mi := &file_message_v1_message_proto_msgTypes[7] + mi := &file_message_v1_message_proto_msgTypes[13] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -684,7 +1070,7 @@ func (x *StorageMessage_Users) ProtoReflect() protoreflect.Message { // Deprecated: Use StorageMessage_Users.ProtoReflect.Descriptor instead. func (*StorageMessage_Users) Descriptor() ([]byte, []int) { - return file_message_v1_message_proto_rawDescGZIP(), []int{6, 0} + return file_message_v1_message_proto_rawDescGZIP(), []int{8, 0} } func (x *StorageMessage_Users) GetFromID() int64 { @@ -720,7 +1106,7 @@ type StorageMessage_Content struct { func (x *StorageMessage_Content) Reset() { *x = StorageMessage_Content{} if protoimpl.UnsafeEnabled { - mi := &file_message_v1_message_proto_msgTypes[8] + mi := &file_message_v1_message_proto_msgTypes[14] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -733,7 +1119,7 @@ func (x *StorageMessage_Content) String() string { func (*StorageMessage_Content) ProtoMessage() {} func (x *StorageMessage_Content) ProtoReflect() protoreflect.Message { - mi := &file_message_v1_message_proto_msgTypes[8] + mi := &file_message_v1_message_proto_msgTypes[14] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -746,7 +1132,7 @@ func (x *StorageMessage_Content) ProtoReflect() protoreflect.Message { // Deprecated: Use StorageMessage_Content.ProtoReflect.Descriptor instead. func (*StorageMessage_Content) Descriptor() ([]byte, []int) { - return file_message_v1_message_proto_rawDescGZIP(), []int{6, 1} + return file_message_v1_message_proto_rawDescGZIP(), []int{8, 1} } func (x *StorageMessage_Content) GetContentType() MessageContentType { @@ -774,7 +1160,7 @@ type StorageMessage_Extra struct { func (x *StorageMessage_Extra) Reset() { *x = StorageMessage_Extra{} if protoimpl.UnsafeEnabled { - mi := &file_message_v1_message_proto_msgTypes[9] + mi := &file_message_v1_message_proto_msgTypes[15] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -787,7 +1173,7 @@ func (x *StorageMessage_Extra) String() string { func (*StorageMessage_Extra) ProtoMessage() {} func (x *StorageMessage_Extra) ProtoReflect() protoreflect.Message { - mi := &file_message_v1_message_proto_msgTypes[9] + mi := &file_message_v1_message_proto_msgTypes[15] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -800,7 +1186,7 @@ func (x *StorageMessage_Extra) ProtoReflect() protoreflect.Message { // Deprecated: Use StorageMessage_Extra.ProtoReflect.Descriptor instead. func (*StorageMessage_Extra) Descriptor() ([]byte, []int) { - return file_message_v1_message_proto_rawDescGZIP(), []int{6, 2} + return file_message_v1_message_proto_rawDescGZIP(), []int{8, 2} } func (x *StorageMessage_Extra) GetCreateTime() *timestamppb.Timestamp { @@ -894,63 +1280,141 @@ var file_message_v1_message_proto_rawDesc = []byte{ 0x52, 0x05, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x12, 0x33, 0x0a, 0x08, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x65, 0x73, 0x73, 0x61, - 0x67, 0x65, 0x52, 0x08, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x22, 0xe5, 0x03, 0x0a, - 0x0e, 0x53, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, - 0x16, 0x0a, 0x06, 0x72, 0x6f, 0x77, 0x4b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x06, 0x72, 0x6f, 0x77, 0x4b, 0x65, 0x79, 0x12, 0x3a, 0x0a, 0x05, 0x75, 0x73, 0x65, 0x72, 0x73, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x6d, 0x65, 0x73, - 0x73, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x4d, - 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x73, 0x52, 0x05, 0x75, 0x73, - 0x65, 0x72, 0x73, 0x12, 0x40, 0x0a, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x18, 0x03, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, - 0x67, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x4d, 0x65, 0x73, - 0x73, 0x61, 0x67, 0x65, 0x2e, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x52, 0x07, 0x63, 0x6f, - 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x12, 0x3a, 0x0a, 0x05, 0x65, 0x78, 0x74, 0x72, 0x61, 0x18, 0x04, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, - 0x67, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x4d, 0x65, 0x73, - 0x73, 0x61, 0x67, 0x65, 0x2e, 0x45, 0x78, 0x74, 0x72, 0x61, 0x52, 0x05, 0x65, 0x78, 0x74, 0x72, - 0x61, 0x1a, 0x51, 0x0a, 0x05, 0x55, 0x73, 0x65, 0x72, 0x73, 0x12, 0x16, 0x0a, 0x06, 0x66, 0x72, - 0x6f, 0x6d, 0x49, 0x44, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x06, 0x66, 0x72, 0x6f, 0x6d, - 0x49, 0x44, 0x12, 0x12, 0x0a, 0x04, 0x74, 0x6f, 0x49, 0x44, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, - 0x52, 0x04, 0x74, 0x6f, 0x49, 0x44, 0x12, 0x1c, 0x0a, 0x09, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, - 0x6e, 0x49, 0x44, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x73, 0x65, 0x73, 0x73, 0x69, - 0x6f, 0x6e, 0x49, 0x44, 0x1a, 0x69, 0x0a, 0x07, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x12, - 0x44, 0x0a, 0x0b, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x54, 0x79, 0x70, 0x65, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x0e, 0x32, 0x22, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, - 0x67, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x43, 0x6f, 0x6e, - 0x74, 0x65, 0x6e, 0x74, 0x54, 0x79, 0x70, 0x65, 0x52, 0x0b, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, - 0x74, 0x54, 0x79, 0x70, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x1a, - 0x43, 0x0a, 0x05, 0x45, 0x78, 0x74, 0x72, 0x61, 0x12, 0x3a, 0x0a, 0x0a, 0x63, 0x72, 0x65, 0x61, - 0x74, 0x65, 0x54, 0x69, 0x6d, 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, 0x0a, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, - 0x54, 0x69, 0x6d, 0x65, 0x2a, 0x34, 0x0a, 0x12, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x43, - 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x54, 0x79, 0x70, 0x65, 0x12, 0x08, 0x0a, 0x04, 0x54, 0x65, - 0x78, 0x74, 0x10, 0x00, 0x12, 0x09, 0x0a, 0x05, 0x49, 0x6d, 0x61, 0x67, 0x65, 0x10, 0x01, 0x12, - 0x09, 0x0a, 0x05, 0x56, 0x6f, 0x69, 0x63, 0x65, 0x10, 0x02, 0x2a, 0x48, 0x0a, 0x0b, 0x53, 0x65, - 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x12, 0x0e, 0x0a, 0x0a, 0x53, 0x69, 0x6e, - 0x67, 0x6c, 0x65, 0x43, 0x68, 0x61, 0x74, 0x10, 0x00, 0x12, 0x0d, 0x0a, 0x09, 0x47, 0x72, 0x6f, - 0x75, 0x70, 0x43, 0x68, 0x61, 0x74, 0x10, 0x01, 0x12, 0x0d, 0x0a, 0x09, 0x42, 0x72, 0x6f, 0x61, - 0x64, 0x63, 0x61, 0x73, 0x74, 0x10, 0x02, 0x12, 0x0b, 0x0a, 0x07, 0x43, 0x68, 0x61, 0x6e, 0x6e, - 0x65, 0x6c, 0x10, 0x03, 0x32, 0x64, 0x0a, 0x12, 0x50, 0x75, 0x73, 0x68, 0x4d, 0x65, 0x73, 0x73, - 0x61, 0x67, 0x65, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x4e, 0x0a, 0x0b, 0x50, 0x75, - 0x73, 0x68, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x1e, 0x2e, 0x61, 0x70, 0x69, 0x2e, - 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x75, 0x73, 0x68, 0x4d, - 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x52, 0x65, 0x71, 0x1a, 0x1f, 0x2e, 0x61, 0x70, 0x69, 0x2e, - 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x75, 0x73, 0x68, 0x4d, - 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x52, 0x65, 0x73, 0x70, 0x32, 0x7f, 0x0a, 0x15, 0x4f, 0x66, - 0x66, 0x6c, 0x69, 0x6e, 0x65, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x53, 0x65, 0x72, 0x76, - 0x69, 0x63, 0x65, 0x12, 0x66, 0x0a, 0x13, 0x51, 0x75, 0x65, 0x72, 0x79, 0x4f, 0x66, 0x66, 0x6c, - 0x69, 0x6e, 0x65, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x26, 0x2e, 0x61, 0x70, 0x69, + 0x67, 0x65, 0x52, 0x08, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x22, 0x59, 0x0a, 0x13, + 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x72, 0x6d, 0x4c, 0x61, 0x73, 0x74, 0x4d, 0x73, 0x67, 0x49, 0x44, + 0x52, 0x65, 0x71, 0x12, 0x19, 0x0a, 0x03, 0x75, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, + 0x42, 0x07, 0xfa, 0x42, 0x04, 0x22, 0x02, 0x20, 0x00, 0x52, 0x03, 0x75, 0x69, 0x64, 0x12, 0x27, + 0x0a, 0x0b, 0x6c, 0x61, 0x73, 0x74, 0x5f, 0x6d, 0x73, 0x67, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x03, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x22, 0x02, 0x20, 0x00, 0x52, 0x09, 0x6c, 0x61, + 0x73, 0x74, 0x4d, 0x73, 0x67, 0x49, 0x64, 0x22, 0x78, 0x0a, 0x14, 0x43, 0x6f, 0x6e, 0x66, 0x69, + 0x72, 0x6d, 0x4c, 0x61, 0x73, 0x74, 0x4d, 0x73, 0x67, 0x49, 0x44, 0x52, 0x65, 0x73, 0x70, 0x12, + 0x40, 0x0a, 0x08, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x24, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, + 0x74, 0x2e, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x42, 0x61, 0x73, 0x65, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x52, 0x08, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x12, 0x1e, 0x0a, 0x0b, 0x6c, 0x61, 0x73, 0x74, 0x5f, 0x6d, 0x73, 0x67, 0x5f, 0x69, 0x64, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x6c, 0x61, 0x73, 0x74, 0x4d, 0x73, 0x67, 0x49, + 0x64, 0x22, 0xe5, 0x03, 0x0a, 0x0e, 0x53, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x4d, 0x65, 0x73, + 0x73, 0x61, 0x67, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x72, 0x6f, 0x77, 0x4b, 0x65, 0x79, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x72, 0x6f, 0x77, 0x4b, 0x65, 0x79, 0x12, 0x3a, 0x0a, 0x05, + 0x75, 0x73, 0x65, 0x72, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x61, 0x70, + 0x69, 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x74, 0x6f, + 0x72, 0x61, 0x67, 0x65, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x2e, 0x55, 0x73, 0x65, 0x72, + 0x73, 0x52, 0x05, 0x75, 0x73, 0x65, 0x72, 0x73, 0x12, 0x40, 0x0a, 0x07, 0x63, 0x6f, 0x6e, 0x74, + 0x65, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x61, 0x70, 0x69, 0x2e, + 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x74, 0x6f, 0x72, 0x61, + 0x67, 0x65, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x2e, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x6e, + 0x74, 0x52, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x12, 0x3a, 0x0a, 0x05, 0x65, 0x78, + 0x74, 0x72, 0x61, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x61, 0x70, 0x69, 0x2e, + 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x74, 0x6f, 0x72, 0x61, + 0x67, 0x65, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x2e, 0x45, 0x78, 0x74, 0x72, 0x61, 0x52, + 0x05, 0x65, 0x78, 0x74, 0x72, 0x61, 0x1a, 0x51, 0x0a, 0x05, 0x55, 0x73, 0x65, 0x72, 0x73, 0x12, + 0x16, 0x0a, 0x06, 0x66, 0x72, 0x6f, 0x6d, 0x49, 0x44, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, + 0x06, 0x66, 0x72, 0x6f, 0x6d, 0x49, 0x44, 0x12, 0x12, 0x0a, 0x04, 0x74, 0x6f, 0x49, 0x44, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x04, 0x74, 0x6f, 0x49, 0x44, 0x12, 0x1c, 0x0a, 0x09, 0x73, + 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x49, 0x44, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, + 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x49, 0x44, 0x1a, 0x69, 0x0a, 0x07, 0x43, 0x6f, 0x6e, + 0x74, 0x65, 0x6e, 0x74, 0x12, 0x44, 0x0a, 0x0b, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x54, + 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x22, 0x2e, 0x61, 0x70, 0x69, 0x2e, + 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x65, 0x73, 0x73, 0x61, + 0x67, 0x65, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x54, 0x79, 0x70, 0x65, 0x52, 0x0b, 0x63, + 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x54, 0x79, 0x70, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x63, 0x6f, + 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x63, 0x6f, 0x6e, + 0x74, 0x65, 0x6e, 0x74, 0x1a, 0x43, 0x0a, 0x05, 0x45, 0x78, 0x74, 0x72, 0x61, 0x12, 0x3a, 0x0a, + 0x0a, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x54, 0x69, 0x6d, 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, 0x0a, 0x63, + 0x72, 0x65, 0x61, 0x74, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x22, 0xbe, 0x01, 0x0a, 0x1d, 0x51, 0x75, + 0x65, 0x72, 0x79, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x48, 0x69, 0x73, 0x74, 0x6f, 0x72, + 0x79, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x52, 0x65, 0x71, 0x12, 0x19, 0x0a, 0x03, 0x75, + 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x22, 0x02, 0x20, + 0x00, 0x52, 0x03, 0x75, 0x69, 0x64, 0x12, 0x1d, 0x0a, 0x0a, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, + 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x73, 0x65, 0x73, 0x73, + 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x12, 0x27, 0x0a, 0x0b, 0x6c, 0x61, 0x73, 0x74, 0x5f, 0x6d, 0x73, + 0x67, 0x5f, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x22, + 0x02, 0x20, 0x00, 0x52, 0x09, 0x6c, 0x61, 0x73, 0x74, 0x4d, 0x73, 0x67, 0x49, 0x64, 0x12, 0x12, + 0x0a, 0x04, 0x70, 0x61, 0x67, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x05, 0x52, 0x04, 0x70, 0x61, + 0x67, 0x65, 0x12, 0x26, 0x0a, 0x09, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x18, + 0x05, 0x20, 0x01, 0x28, 0x05, 0x42, 0x09, 0xfa, 0x42, 0x06, 0x1a, 0x04, 0x18, 0x64, 0x28, 0x01, + 0x52, 0x08, 0x70, 0x61, 0x67, 0x65, 0x53, 0x69, 0x7a, 0x65, 0x22, 0xad, 0x01, 0x0a, 0x1e, 0x51, + 0x75, 0x65, 0x72, 0x79, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x48, 0x69, 0x73, 0x74, 0x6f, + 0x72, 0x79, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x52, 0x65, 0x73, 0x70, 0x12, 0x40, 0x0a, + 0x08, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x24, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x2e, + 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x42, 0x61, 0x73, 0x65, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x52, 0x08, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, + 0x14, 0x0a, 0x05, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, + 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x12, 0x33, 0x0a, 0x08, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, + 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x6d, 0x65, + 0x73, 0x73, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, + 0x52, 0x08, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x22, 0x97, 0x01, 0x0a, 0x15, 0x53, + 0x79, 0x6e, 0x63, 0x48, 0x69, 0x73, 0x74, 0x6f, 0x72, 0x79, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, + 0x65, 0x52, 0x65, 0x71, 0x12, 0x19, 0x0a, 0x03, 0x75, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x03, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x22, 0x02, 0x20, 0x00, 0x52, 0x03, 0x75, 0x69, 0x64, 0x12, + 0x27, 0x0a, 0x0b, 0x6c, 0x61, 0x73, 0x74, 0x5f, 0x6d, 0x73, 0x67, 0x5f, 0x69, 0x64, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x03, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x22, 0x02, 0x20, 0x00, 0x52, 0x09, 0x6c, + 0x61, 0x73, 0x74, 0x4d, 0x73, 0x67, 0x49, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x70, 0x61, 0x67, 0x65, + 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x04, 0x70, 0x61, 0x67, 0x65, 0x12, 0x26, 0x0a, 0x09, + 0x70, 0x61, 0x67, 0x65, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x05, 0x42, + 0x09, 0xfa, 0x42, 0x06, 0x1a, 0x04, 0x18, 0x64, 0x28, 0x01, 0x52, 0x08, 0x70, 0x61, 0x67, 0x65, + 0x53, 0x69, 0x7a, 0x65, 0x22, 0xa5, 0x01, 0x0a, 0x16, 0x53, 0x79, 0x6e, 0x63, 0x48, 0x69, 0x73, + 0x74, 0x6f, 0x72, 0x79, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x52, 0x65, 0x73, 0x70, 0x12, + 0x40, 0x0a, 0x08, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x24, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, + 0x74, 0x2e, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x42, 0x61, 0x73, 0x65, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x52, 0x08, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x12, 0x14, 0x0a, 0x05, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, + 0x52, 0x05, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x12, 0x33, 0x0a, 0x08, 0x6d, 0x65, 0x73, 0x73, 0x61, + 0x67, 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x61, 0x70, 0x69, 0x2e, + 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x65, 0x73, 0x73, 0x61, + 0x67, 0x65, 0x52, 0x08, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x2a, 0x34, 0x0a, 0x12, + 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x54, 0x79, + 0x70, 0x65, 0x12, 0x08, 0x0a, 0x04, 0x54, 0x65, 0x78, 0x74, 0x10, 0x00, 0x12, 0x09, 0x0a, 0x05, + 0x49, 0x6d, 0x61, 0x67, 0x65, 0x10, 0x01, 0x12, 0x09, 0x0a, 0x05, 0x56, 0x6f, 0x69, 0x63, 0x65, + 0x10, 0x02, 0x2a, 0x48, 0x0a, 0x0b, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x54, 0x79, 0x70, + 0x65, 0x12, 0x0e, 0x0a, 0x0a, 0x53, 0x69, 0x6e, 0x67, 0x6c, 0x65, 0x43, 0x68, 0x61, 0x74, 0x10, + 0x00, 0x12, 0x0d, 0x0a, 0x09, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x43, 0x68, 0x61, 0x74, 0x10, 0x01, + 0x12, 0x0d, 0x0a, 0x09, 0x42, 0x72, 0x6f, 0x61, 0x64, 0x63, 0x61, 0x73, 0x74, 0x10, 0x02, 0x12, + 0x0b, 0x0a, 0x07, 0x43, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x10, 0x03, 0x32, 0x64, 0x0a, 0x12, + 0x50, 0x75, 0x73, 0x68, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x53, 0x65, 0x72, 0x76, 0x69, + 0x63, 0x65, 0x12, 0x4e, 0x0a, 0x0b, 0x50, 0x75, 0x73, 0x68, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, + 0x65, 0x12, 0x1e, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x2e, + 0x76, 0x31, 0x2e, 0x50, 0x75, 0x73, 0x68, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x52, 0x65, + 0x71, 0x1a, 0x1f, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x2e, + 0x76, 0x31, 0x2e, 0x50, 0x75, 0x73, 0x68, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x52, 0x65, + 0x73, 0x70, 0x32, 0xde, 0x01, 0x0a, 0x15, 0x4f, 0x66, 0x66, 0x6c, 0x69, 0x6e, 0x65, 0x4d, 0x65, + 0x73, 0x73, 0x61, 0x67, 0x65, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x66, 0x0a, 0x13, + 0x51, 0x75, 0x65, 0x72, 0x79, 0x4f, 0x66, 0x66, 0x6c, 0x69, 0x6e, 0x65, 0x4d, 0x65, 0x73, 0x73, + 0x61, 0x67, 0x65, 0x12, 0x26, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, + 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x4f, 0x66, 0x66, 0x6c, 0x69, 0x6e, + 0x65, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x52, 0x65, 0x71, 0x1a, 0x27, 0x2e, 0x61, 0x70, + 0x69, 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, + 0x72, 0x79, 0x4f, 0x66, 0x66, 0x6c, 0x69, 0x6e, 0x65, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, + 0x52, 0x65, 0x73, 0x70, 0x12, 0x5d, 0x0a, 0x10, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x72, 0x6d, 0x4c, + 0x61, 0x73, 0x74, 0x4d, 0x73, 0x74, 0x49, 0x44, 0x12, 0x23, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x6d, + 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x72, + 0x6d, 0x4c, 0x61, 0x73, 0x74, 0x4d, 0x73, 0x67, 0x49, 0x44, 0x52, 0x65, 0x71, 0x1a, 0x24, 0x2e, + 0x61, 0x70, 0x69, 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x43, + 0x6f, 0x6e, 0x66, 0x69, 0x72, 0x6d, 0x4c, 0x61, 0x73, 0x74, 0x4d, 0x73, 0x67, 0x49, 0x44, 0x52, + 0x65, 0x73, 0x70, 0x32, 0xf9, 0x01, 0x0a, 0x15, 0x48, 0x69, 0x73, 0x74, 0x6f, 0x72, 0x79, 0x4d, + 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x7b, 0x0a, + 0x1a, 0x51, 0x75, 0x65, 0x72, 0x79, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x48, 0x69, 0x73, + 0x74, 0x6f, 0x72, 0x79, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x2d, 0x2e, 0x61, 0x70, + 0x69, 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, + 0x72, 0x79, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x48, 0x69, 0x73, 0x74, 0x6f, 0x72, 0x79, + 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x52, 0x65, 0x71, 0x1a, 0x2e, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, - 0x79, 0x4f, 0x66, 0x66, 0x6c, 0x69, 0x6e, 0x65, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x52, - 0x65, 0x71, 0x1a, 0x27, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, - 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x4f, 0x66, 0x66, 0x6c, 0x69, 0x6e, 0x65, - 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x52, 0x65, 0x73, 0x70, 0x42, 0x23, 0x5a, 0x21, 0x67, - 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x67, 0x6f, 0x2d, 0x67, 0x6f, 0x69, - 0x6d, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x2f, 0x76, 0x31, - 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x79, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x48, 0x69, 0x73, 0x74, 0x6f, 0x72, 0x79, 0x4d, + 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x52, 0x65, 0x73, 0x70, 0x12, 0x63, 0x0a, 0x12, 0x53, 0x79, + 0x6e, 0x63, 0x48, 0x69, 0x73, 0x74, 0x6f, 0x72, 0x79, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, + 0x12, 0x25, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x2e, 0x76, + 0x31, 0x2e, 0x53, 0x79, 0x6e, 0x63, 0x48, 0x69, 0x73, 0x74, 0x6f, 0x72, 0x79, 0x4d, 0x65, 0x73, + 0x73, 0x61, 0x67, 0x65, 0x52, 0x65, 0x71, 0x1a, 0x26, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x6d, 0x65, + 0x73, 0x73, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x79, 0x6e, 0x63, 0x48, 0x69, 0x73, + 0x74, 0x6f, 0x72, 0x79, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x52, 0x65, 0x73, 0x70, 0x42, + 0x23, 0x5a, 0x21, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x67, 0x6f, + 0x2d, 0x67, 0x6f, 0x69, 0x6d, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, + 0x65, 0x2f, 0x76, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -966,22 +1430,28 @@ func file_message_v1_message_proto_rawDescGZIP() []byte { } var file_message_v1_message_proto_enumTypes = make([]protoimpl.EnumInfo, 2) -var file_message_v1_message_proto_msgTypes = make([]protoimpl.MessageInfo, 10) +var file_message_v1_message_proto_msgTypes = make([]protoimpl.MessageInfo, 16) var file_message_v1_message_proto_goTypes = []interface{}{ - (MessageContentType)(0), // 0: api.message.v1.MessageContentType - (SessionType)(0), // 1: api.message.v1.SessionType - (*SendMessageReq)(nil), // 2: api.message.v1.SendMessageReq - (*Message)(nil), // 3: api.message.v1.Message - (*PushMessageReq)(nil), // 4: api.message.v1.PushMessageReq - (*PushMessageResp)(nil), // 5: api.message.v1.PushMessageResp - (*QueryOfflineMessageReq)(nil), // 6: api.message.v1.QueryOfflineMessageReq - (*QueryOfflineMessageResp)(nil), // 7: api.message.v1.QueryOfflineMessageResp - (*StorageMessage)(nil), // 8: api.message.v1.StorageMessage - (*StorageMessage_Users)(nil), // 9: api.message.v1.StorageMessage.Users - (*StorageMessage_Content)(nil), // 10: api.message.v1.StorageMessage.Content - (*StorageMessage_Extra)(nil), // 11: api.message.v1.StorageMessage.Extra - (*response.BaseResponse)(nil), // 12: api.transport.response.BaseResponse - (*timestamppb.Timestamp)(nil), // 13: google.protobuf.Timestamp + (MessageContentType)(0), // 0: api.message.v1.MessageContentType + (SessionType)(0), // 1: api.message.v1.SessionType + (*SendMessageReq)(nil), // 2: api.message.v1.SendMessageReq + (*Message)(nil), // 3: api.message.v1.Message + (*PushMessageReq)(nil), // 4: api.message.v1.PushMessageReq + (*PushMessageResp)(nil), // 5: api.message.v1.PushMessageResp + (*QueryOfflineMessageReq)(nil), // 6: api.message.v1.QueryOfflineMessageReq + (*QueryOfflineMessageResp)(nil), // 7: api.message.v1.QueryOfflineMessageResp + (*ConfirmLastMsgIDReq)(nil), // 8: api.message.v1.ConfirmLastMsgIDReq + (*ConfirmLastMsgIDResp)(nil), // 9: api.message.v1.ConfirmLastMsgIDResp + (*StorageMessage)(nil), // 10: api.message.v1.StorageMessage + (*QuerySessionHistoryMessageReq)(nil), // 11: api.message.v1.QuerySessionHistoryMessageReq + (*QuerySessionHistoryMessageResp)(nil), // 12: api.message.v1.QuerySessionHistoryMessageResp + (*SyncHistoryMessageReq)(nil), // 13: api.message.v1.SyncHistoryMessageReq + (*SyncHistoryMessageResp)(nil), // 14: api.message.v1.SyncHistoryMessageResp + (*StorageMessage_Users)(nil), // 15: api.message.v1.StorageMessage.Users + (*StorageMessage_Content)(nil), // 16: api.message.v1.StorageMessage.Content + (*StorageMessage_Extra)(nil), // 17: api.message.v1.StorageMessage.Extra + (*response.BaseResponse)(nil), // 18: api.transport.response.BaseResponse + (*timestamppb.Timestamp)(nil), // 19: google.protobuf.Timestamp } var file_message_v1_message_proto_depIdxs = []int32{ 1, // 0: api.message.v1.SendMessageReq.session_type:type_name -> api.message.v1.SessionType @@ -989,23 +1459,34 @@ var file_message_v1_message_proto_depIdxs = []int32{ 1, // 2: api.message.v1.Message.session_type:type_name -> api.message.v1.SessionType 0, // 3: api.message.v1.Message.content_type:type_name -> api.message.v1.MessageContentType 3, // 4: api.message.v1.PushMessageReq.message:type_name -> api.message.v1.Message - 12, // 5: api.message.v1.PushMessageResp.response:type_name -> api.transport.response.BaseResponse - 12, // 6: api.message.v1.QueryOfflineMessageResp.response:type_name -> api.transport.response.BaseResponse + 18, // 5: api.message.v1.PushMessageResp.response:type_name -> api.transport.response.BaseResponse + 18, // 6: api.message.v1.QueryOfflineMessageResp.response:type_name -> api.transport.response.BaseResponse 3, // 7: api.message.v1.QueryOfflineMessageResp.messages:type_name -> api.message.v1.Message - 9, // 8: api.message.v1.StorageMessage.users:type_name -> api.message.v1.StorageMessage.Users - 10, // 9: api.message.v1.StorageMessage.content:type_name -> api.message.v1.StorageMessage.Content - 11, // 10: api.message.v1.StorageMessage.extra:type_name -> api.message.v1.StorageMessage.Extra - 0, // 11: api.message.v1.StorageMessage.Content.contentType:type_name -> api.message.v1.MessageContentType - 13, // 12: api.message.v1.StorageMessage.Extra.createTime:type_name -> google.protobuf.Timestamp - 4, // 13: api.message.v1.PushMessageService.PushMessage:input_type -> api.message.v1.PushMessageReq - 6, // 14: api.message.v1.OfflineMessageService.QueryOfflineMessage:input_type -> api.message.v1.QueryOfflineMessageReq - 5, // 15: api.message.v1.PushMessageService.PushMessage:output_type -> api.message.v1.PushMessageResp - 7, // 16: api.message.v1.OfflineMessageService.QueryOfflineMessage:output_type -> api.message.v1.QueryOfflineMessageResp - 15, // [15:17] is the sub-list for method output_type - 13, // [13:15] is the sub-list for method input_type - 13, // [13:13] is the sub-list for extension type_name - 13, // [13:13] is the sub-list for extension extendee - 0, // [0:13] is the sub-list for field type_name + 18, // 8: api.message.v1.ConfirmLastMsgIDResp.response:type_name -> api.transport.response.BaseResponse + 15, // 9: api.message.v1.StorageMessage.users:type_name -> api.message.v1.StorageMessage.Users + 16, // 10: api.message.v1.StorageMessage.content:type_name -> api.message.v1.StorageMessage.Content + 17, // 11: api.message.v1.StorageMessage.extra:type_name -> api.message.v1.StorageMessage.Extra + 18, // 12: api.message.v1.QuerySessionHistoryMessageResp.response:type_name -> api.transport.response.BaseResponse + 3, // 13: api.message.v1.QuerySessionHistoryMessageResp.messages:type_name -> api.message.v1.Message + 18, // 14: api.message.v1.SyncHistoryMessageResp.response:type_name -> api.transport.response.BaseResponse + 3, // 15: api.message.v1.SyncHistoryMessageResp.messages:type_name -> api.message.v1.Message + 0, // 16: api.message.v1.StorageMessage.Content.contentType:type_name -> api.message.v1.MessageContentType + 19, // 17: api.message.v1.StorageMessage.Extra.createTime:type_name -> google.protobuf.Timestamp + 4, // 18: api.message.v1.PushMessageService.PushMessage:input_type -> api.message.v1.PushMessageReq + 6, // 19: api.message.v1.OfflineMessageService.QueryOfflineMessage:input_type -> api.message.v1.QueryOfflineMessageReq + 8, // 20: api.message.v1.OfflineMessageService.ConfirmLastMstID:input_type -> api.message.v1.ConfirmLastMsgIDReq + 11, // 21: api.message.v1.HistoryMessageService.QuerySessionHistoryMessage:input_type -> api.message.v1.QuerySessionHistoryMessageReq + 13, // 22: api.message.v1.HistoryMessageService.SyncHistoryMessage:input_type -> api.message.v1.SyncHistoryMessageReq + 5, // 23: api.message.v1.PushMessageService.PushMessage:output_type -> api.message.v1.PushMessageResp + 7, // 24: api.message.v1.OfflineMessageService.QueryOfflineMessage:output_type -> api.message.v1.QueryOfflineMessageResp + 9, // 25: api.message.v1.OfflineMessageService.ConfirmLastMstID:output_type -> api.message.v1.ConfirmLastMsgIDResp + 12, // 26: api.message.v1.HistoryMessageService.QuerySessionHistoryMessage:output_type -> api.message.v1.QuerySessionHistoryMessageResp + 14, // 27: api.message.v1.HistoryMessageService.SyncHistoryMessage:output_type -> api.message.v1.SyncHistoryMessageResp + 23, // [23:28] is the sub-list for method output_type + 18, // [18:23] is the sub-list for method input_type + 18, // [18:18] is the sub-list for extension type_name + 18, // [18:18] is the sub-list for extension extendee + 0, // [0:18] is the sub-list for field type_name } func init() { file_message_v1_message_proto_init() } @@ -1087,7 +1568,7 @@ func file_message_v1_message_proto_init() { } } file_message_v1_message_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*StorageMessage); i { + switch v := v.(*ConfirmLastMsgIDReq); i { case 0: return &v.state case 1: @@ -1099,7 +1580,7 @@ func file_message_v1_message_proto_init() { } } file_message_v1_message_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*StorageMessage_Users); i { + switch v := v.(*ConfirmLastMsgIDResp); i { case 0: return &v.state case 1: @@ -1111,7 +1592,7 @@ func file_message_v1_message_proto_init() { } } file_message_v1_message_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*StorageMessage_Content); i { + switch v := v.(*StorageMessage); i { case 0: return &v.state case 1: @@ -1123,6 +1604,78 @@ func file_message_v1_message_proto_init() { } } file_message_v1_message_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*QuerySessionHistoryMessageReq); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_message_v1_message_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*QuerySessionHistoryMessageResp); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_message_v1_message_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*SyncHistoryMessageReq); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_message_v1_message_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*SyncHistoryMessageResp); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_message_v1_message_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*StorageMessage_Users); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_message_v1_message_proto_msgTypes[14].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*StorageMessage_Content); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_message_v1_message_proto_msgTypes[15].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*StorageMessage_Extra); i { case 0: return &v.state @@ -1142,9 +1695,9 @@ func file_message_v1_message_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_message_v1_message_proto_rawDesc, NumEnums: 2, - NumMessages: 10, + NumMessages: 16, NumExtensions: 0, - NumServices: 2, + NumServices: 3, }, GoTypes: file_message_v1_message_proto_goTypes, DependencyIndexes: file_message_v1_message_proto_depIdxs, diff --git a/message/v1/message.pb.validate.go b/message/v1/message.pb.validate.go index 65fec16..df347e9 100644 --- a/message/v1/message.pb.validate.go +++ b/message/v1/message.pb.validate.go @@ -863,6 +863,263 @@ var _ interface { ErrorName() string } = QueryOfflineMessageRespValidationError{} +// Validate checks the field values on ConfirmLastMsgIDReq with the rules +// defined in the proto definition for this message. If any rules are +// violated, the first error encountered is returned, or nil if there are no violations. +func (m *ConfirmLastMsgIDReq) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on ConfirmLastMsgIDReq with the rules +// defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// ConfirmLastMsgIDReqMultiError, or nil if none found. +func (m *ConfirmLastMsgIDReq) ValidateAll() error { + return m.validate(true) +} + +func (m *ConfirmLastMsgIDReq) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + if m.GetUid() <= 0 { + err := ConfirmLastMsgIDReqValidationError{ + field: "Uid", + reason: "value must be greater than 0", + } + if !all { + return err + } + errors = append(errors, err) + } + + if m.GetLastMsgId() <= 0 { + err := ConfirmLastMsgIDReqValidationError{ + field: "LastMsgId", + reason: "value must be greater than 0", + } + if !all { + return err + } + errors = append(errors, err) + } + + if len(errors) > 0 { + return ConfirmLastMsgIDReqMultiError(errors) + } + + return nil +} + +// ConfirmLastMsgIDReqMultiError is an error wrapping multiple validation +// errors returned by ConfirmLastMsgIDReq.ValidateAll() if the designated +// constraints aren't met. +type ConfirmLastMsgIDReqMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m ConfirmLastMsgIDReqMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m ConfirmLastMsgIDReqMultiError) AllErrors() []error { return m } + +// ConfirmLastMsgIDReqValidationError is the validation error returned by +// ConfirmLastMsgIDReq.Validate if the designated constraints aren't met. +type ConfirmLastMsgIDReqValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e ConfirmLastMsgIDReqValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e ConfirmLastMsgIDReqValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e ConfirmLastMsgIDReqValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e ConfirmLastMsgIDReqValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e ConfirmLastMsgIDReqValidationError) ErrorName() string { + return "ConfirmLastMsgIDReqValidationError" +} + +// Error satisfies the builtin error interface +func (e ConfirmLastMsgIDReqValidationError) Error() string { + cause := "" + if e.cause != nil { + cause = fmt.Sprintf(" | caused by: %v", e.cause) + } + + key := "" + if e.key { + key = "key for " + } + + return fmt.Sprintf( + "invalid %sConfirmLastMsgIDReq.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = ConfirmLastMsgIDReqValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = ConfirmLastMsgIDReqValidationError{} + +// Validate checks the field values on ConfirmLastMsgIDResp with the rules +// defined in the proto definition for this message. If any rules are +// violated, the first error encountered is returned, or nil if there are no violations. +func (m *ConfirmLastMsgIDResp) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on ConfirmLastMsgIDResp with the rules +// defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// ConfirmLastMsgIDRespMultiError, or nil if none found. +func (m *ConfirmLastMsgIDResp) ValidateAll() error { + return m.validate(true) +} + +func (m *ConfirmLastMsgIDResp) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + if all { + switch v := interface{}(m.GetResponse()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, ConfirmLastMsgIDRespValidationError{ + field: "Response", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, ConfirmLastMsgIDRespValidationError{ + field: "Response", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetResponse()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return ConfirmLastMsgIDRespValidationError{ + field: "Response", + reason: "embedded message failed validation", + cause: err, + } + } + } + + // no validation rules for LastMsgId + + if len(errors) > 0 { + return ConfirmLastMsgIDRespMultiError(errors) + } + + return nil +} + +// ConfirmLastMsgIDRespMultiError is an error wrapping multiple validation +// errors returned by ConfirmLastMsgIDResp.ValidateAll() if the designated +// constraints aren't met. +type ConfirmLastMsgIDRespMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m ConfirmLastMsgIDRespMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m ConfirmLastMsgIDRespMultiError) AllErrors() []error { return m } + +// ConfirmLastMsgIDRespValidationError is the validation error returned by +// ConfirmLastMsgIDResp.Validate if the designated constraints aren't met. +type ConfirmLastMsgIDRespValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e ConfirmLastMsgIDRespValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e ConfirmLastMsgIDRespValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e ConfirmLastMsgIDRespValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e ConfirmLastMsgIDRespValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e ConfirmLastMsgIDRespValidationError) ErrorName() string { + return "ConfirmLastMsgIDRespValidationError" +} + +// Error satisfies the builtin error interface +func (e ConfirmLastMsgIDRespValidationError) Error() string { + cause := "" + if e.cause != nil { + cause = fmt.Sprintf(" | caused by: %v", e.cause) + } + + key := "" + if e.key { + key = "key for " + } + + return fmt.Sprintf( + "invalid %sConfirmLastMsgIDResp.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = ConfirmLastMsgIDRespValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = ConfirmLastMsgIDRespValidationError{} + // Validate checks the field values on StorageMessage with the rules defined in // the proto definition for this message. If any rules are violated, the first // error encountered is returned, or nil if there are no violations. @@ -1052,6 +1309,618 @@ var _ interface { ErrorName() string } = StorageMessageValidationError{} +// Validate checks the field values on QuerySessionHistoryMessageReq with the +// rules defined in the proto definition for this message. If any rules are +// violated, the first error encountered is returned, or nil if there are no violations. +func (m *QuerySessionHistoryMessageReq) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on QuerySessionHistoryMessageReq with +// the rules defined in the proto definition for this message. If any rules +// are violated, the result is a list of violation errors wrapped in +// QuerySessionHistoryMessageReqMultiError, or nil if none found. +func (m *QuerySessionHistoryMessageReq) ValidateAll() error { + return m.validate(true) +} + +func (m *QuerySessionHistoryMessageReq) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + if m.GetUid() <= 0 { + err := QuerySessionHistoryMessageReqValidationError{ + field: "Uid", + reason: "value must be greater than 0", + } + if !all { + return err + } + errors = append(errors, err) + } + + // no validation rules for SessionId + + if m.GetLastMsgId() <= 0 { + err := QuerySessionHistoryMessageReqValidationError{ + field: "LastMsgId", + reason: "value must be greater than 0", + } + if !all { + return err + } + errors = append(errors, err) + } + + // no validation rules for Page + + if val := m.GetPageSize(); val < 1 || val > 100 { + err := QuerySessionHistoryMessageReqValidationError{ + field: "PageSize", + reason: "value must be inside range [1, 100]", + } + if !all { + return err + } + errors = append(errors, err) + } + + if len(errors) > 0 { + return QuerySessionHistoryMessageReqMultiError(errors) + } + + return nil +} + +// QuerySessionHistoryMessageReqMultiError is an error wrapping multiple +// validation errors returned by QuerySessionHistoryMessageReq.ValidateAll() +// if the designated constraints aren't met. +type QuerySessionHistoryMessageReqMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m QuerySessionHistoryMessageReqMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m QuerySessionHistoryMessageReqMultiError) AllErrors() []error { return m } + +// QuerySessionHistoryMessageReqValidationError is the validation error +// returned by QuerySessionHistoryMessageReq.Validate if the designated +// constraints aren't met. +type QuerySessionHistoryMessageReqValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e QuerySessionHistoryMessageReqValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e QuerySessionHistoryMessageReqValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e QuerySessionHistoryMessageReqValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e QuerySessionHistoryMessageReqValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e QuerySessionHistoryMessageReqValidationError) ErrorName() string { + return "QuerySessionHistoryMessageReqValidationError" +} + +// Error satisfies the builtin error interface +func (e QuerySessionHistoryMessageReqValidationError) Error() string { + cause := "" + if e.cause != nil { + cause = fmt.Sprintf(" | caused by: %v", e.cause) + } + + key := "" + if e.key { + key = "key for " + } + + return fmt.Sprintf( + "invalid %sQuerySessionHistoryMessageReq.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = QuerySessionHistoryMessageReqValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = QuerySessionHistoryMessageReqValidationError{} + +// Validate checks the field values on QuerySessionHistoryMessageResp with the +// rules defined in the proto definition for this message. If any rules are +// violated, the first error encountered is returned, or nil if there are no violations. +func (m *QuerySessionHistoryMessageResp) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on QuerySessionHistoryMessageResp with +// the rules defined in the proto definition for this message. If any rules +// are violated, the result is a list of violation errors wrapped in +// QuerySessionHistoryMessageRespMultiError, or nil if none found. +func (m *QuerySessionHistoryMessageResp) ValidateAll() error { + return m.validate(true) +} + +func (m *QuerySessionHistoryMessageResp) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + if all { + switch v := interface{}(m.GetResponse()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, QuerySessionHistoryMessageRespValidationError{ + field: "Response", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, QuerySessionHistoryMessageRespValidationError{ + field: "Response", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetResponse()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return QuerySessionHistoryMessageRespValidationError{ + field: "Response", + reason: "embedded message failed validation", + cause: err, + } + } + } + + // no validation rules for Total + + for idx, item := range m.GetMessages() { + _, _ = idx, item + + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, QuerySessionHistoryMessageRespValidationError{ + field: fmt.Sprintf("Messages[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, QuerySessionHistoryMessageRespValidationError{ + field: fmt.Sprintf("Messages[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return QuerySessionHistoryMessageRespValidationError{ + field: fmt.Sprintf("Messages[%v]", idx), + reason: "embedded message failed validation", + cause: err, + } + } + } + + } + + if len(errors) > 0 { + return QuerySessionHistoryMessageRespMultiError(errors) + } + + return nil +} + +// QuerySessionHistoryMessageRespMultiError is an error wrapping multiple +// validation errors returned by QuerySessionHistoryMessageResp.ValidateAll() +// if the designated constraints aren't met. +type QuerySessionHistoryMessageRespMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m QuerySessionHistoryMessageRespMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m QuerySessionHistoryMessageRespMultiError) AllErrors() []error { return m } + +// QuerySessionHistoryMessageRespValidationError is the validation error +// returned by QuerySessionHistoryMessageResp.Validate if the designated +// constraints aren't met. +type QuerySessionHistoryMessageRespValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e QuerySessionHistoryMessageRespValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e QuerySessionHistoryMessageRespValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e QuerySessionHistoryMessageRespValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e QuerySessionHistoryMessageRespValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e QuerySessionHistoryMessageRespValidationError) ErrorName() string { + return "QuerySessionHistoryMessageRespValidationError" +} + +// Error satisfies the builtin error interface +func (e QuerySessionHistoryMessageRespValidationError) Error() string { + cause := "" + if e.cause != nil { + cause = fmt.Sprintf(" | caused by: %v", e.cause) + } + + key := "" + if e.key { + key = "key for " + } + + return fmt.Sprintf( + "invalid %sQuerySessionHistoryMessageResp.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = QuerySessionHistoryMessageRespValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = QuerySessionHistoryMessageRespValidationError{} + +// Validate checks the field values on SyncHistoryMessageReq with the rules +// defined in the proto definition for this message. If any rules are +// violated, the first error encountered is returned, or nil if there are no violations. +func (m *SyncHistoryMessageReq) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on SyncHistoryMessageReq with the rules +// defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// SyncHistoryMessageReqMultiError, or nil if none found. +func (m *SyncHistoryMessageReq) ValidateAll() error { + return m.validate(true) +} + +func (m *SyncHistoryMessageReq) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + if m.GetUid() <= 0 { + err := SyncHistoryMessageReqValidationError{ + field: "Uid", + reason: "value must be greater than 0", + } + if !all { + return err + } + errors = append(errors, err) + } + + if m.GetLastMsgId() <= 0 { + err := SyncHistoryMessageReqValidationError{ + field: "LastMsgId", + reason: "value must be greater than 0", + } + if !all { + return err + } + errors = append(errors, err) + } + + // no validation rules for Page + + if val := m.GetPageSize(); val < 1 || val > 100 { + err := SyncHistoryMessageReqValidationError{ + field: "PageSize", + reason: "value must be inside range [1, 100]", + } + if !all { + return err + } + errors = append(errors, err) + } + + if len(errors) > 0 { + return SyncHistoryMessageReqMultiError(errors) + } + + return nil +} + +// SyncHistoryMessageReqMultiError is an error wrapping multiple validation +// errors returned by SyncHistoryMessageReq.ValidateAll() if the designated +// constraints aren't met. +type SyncHistoryMessageReqMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m SyncHistoryMessageReqMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m SyncHistoryMessageReqMultiError) AllErrors() []error { return m } + +// SyncHistoryMessageReqValidationError is the validation error returned by +// SyncHistoryMessageReq.Validate if the designated constraints aren't met. +type SyncHistoryMessageReqValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e SyncHistoryMessageReqValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e SyncHistoryMessageReqValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e SyncHistoryMessageReqValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e SyncHistoryMessageReqValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e SyncHistoryMessageReqValidationError) ErrorName() string { + return "SyncHistoryMessageReqValidationError" +} + +// Error satisfies the builtin error interface +func (e SyncHistoryMessageReqValidationError) Error() string { + cause := "" + if e.cause != nil { + cause = fmt.Sprintf(" | caused by: %v", e.cause) + } + + key := "" + if e.key { + key = "key for " + } + + return fmt.Sprintf( + "invalid %sSyncHistoryMessageReq.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = SyncHistoryMessageReqValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = SyncHistoryMessageReqValidationError{} + +// Validate checks the field values on SyncHistoryMessageResp with the rules +// defined in the proto definition for this message. If any rules are +// violated, the first error encountered is returned, or nil if there are no violations. +func (m *SyncHistoryMessageResp) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on SyncHistoryMessageResp with the rules +// defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// SyncHistoryMessageRespMultiError, or nil if none found. +func (m *SyncHistoryMessageResp) ValidateAll() error { + return m.validate(true) +} + +func (m *SyncHistoryMessageResp) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + if all { + switch v := interface{}(m.GetResponse()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, SyncHistoryMessageRespValidationError{ + field: "Response", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, SyncHistoryMessageRespValidationError{ + field: "Response", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetResponse()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return SyncHistoryMessageRespValidationError{ + field: "Response", + reason: "embedded message failed validation", + cause: err, + } + } + } + + // no validation rules for Total + + for idx, item := range m.GetMessages() { + _, _ = idx, item + + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, SyncHistoryMessageRespValidationError{ + field: fmt.Sprintf("Messages[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, SyncHistoryMessageRespValidationError{ + field: fmt.Sprintf("Messages[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return SyncHistoryMessageRespValidationError{ + field: fmt.Sprintf("Messages[%v]", idx), + reason: "embedded message failed validation", + cause: err, + } + } + } + + } + + if len(errors) > 0 { + return SyncHistoryMessageRespMultiError(errors) + } + + return nil +} + +// SyncHistoryMessageRespMultiError is an error wrapping multiple validation +// errors returned by SyncHistoryMessageResp.ValidateAll() if the designated +// constraints aren't met. +type SyncHistoryMessageRespMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m SyncHistoryMessageRespMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m SyncHistoryMessageRespMultiError) AllErrors() []error { return m } + +// SyncHistoryMessageRespValidationError is the validation error returned by +// SyncHistoryMessageResp.Validate if the designated constraints aren't met. +type SyncHistoryMessageRespValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e SyncHistoryMessageRespValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e SyncHistoryMessageRespValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e SyncHistoryMessageRespValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e SyncHistoryMessageRespValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e SyncHistoryMessageRespValidationError) ErrorName() string { + return "SyncHistoryMessageRespValidationError" +} + +// Error satisfies the builtin error interface +func (e SyncHistoryMessageRespValidationError) Error() string { + cause := "" + if e.cause != nil { + cause = fmt.Sprintf(" | caused by: %v", e.cause) + } + + key := "" + if e.key { + key = "key for " + } + + return fmt.Sprintf( + "invalid %sSyncHistoryMessageResp.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = SyncHistoryMessageRespValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = SyncHistoryMessageRespValidationError{} + // Validate checks the field values on StorageMessage_Users with the rules // defined in the proto definition for this message. If any rules are // violated, the first error encountered is returned, or nil if there are no violations. diff --git a/message/v1/message.proto b/message/v1/message.proto index b78170e..9e78c83 100644 --- a/message/v1/message.proto +++ b/message/v1/message.proto @@ -83,8 +83,19 @@ message QueryOfflineMessageResp { repeated Message messages = 3; } +message ConfirmLastMsgIDReq { + int64 uid = 1 [(validate.rules).int64.gt = 0]; + int64 last_msg_id = 2 [(validate.rules).int64.gt = 0]; +} + +message ConfirmLastMsgIDResp { + transport.response.BaseResponse response = 1; + int64 last_msg_id = 2; +} + service OfflineMessageService { rpc QueryOfflineMessage(QueryOfflineMessageReq) returns (QueryOfflineMessageResp); + rpc ConfirmLastMstID(ConfirmLastMsgIDReq) returns (ConfirmLastMsgIDResp); } // storage message @@ -106,3 +117,45 @@ message StorageMessage { } Extra extra = 4; } + +// HistoryMessage + +message QuerySessionHistoryMessageReq { + int64 uid = 1 [(validate.rules).int64.gt = 0]; + string session_id = 2; + int64 last_msg_id = 3 [(validate.rules).int64.gt = 0]; + int32 page = 4; + int32 page_size = 5 [(validate.rules).int32 = { + gte: 1, + lte: 100 + }]; +} + +message QuerySessionHistoryMessageResp { + transport.response.BaseResponse response = 1; + int32 total = 2; + repeated Message messages = 3; +} + + +message SyncHistoryMessageReq { + int64 uid = 1 [(validate.rules).int64.gt = 0]; + int64 last_msg_id = 2 [(validate.rules).int64.gt = 0]; + int32 page = 3; + int32 page_size = 4 [(validate.rules).int32 = { + gte: 1, + lte: 100 + }]; +} + +message SyncHistoryMessageResp { + transport.response.BaseResponse response = 1; + int32 total = 2; + repeated Message messages = 3; +} + + +service HistoryMessageService { + rpc QuerySessionHistoryMessage(QuerySessionHistoryMessageReq) returns (QuerySessionHistoryMessageResp); + rpc SyncHistoryMessage(SyncHistoryMessageReq) returns (SyncHistoryMessageResp); +} diff --git a/message/v1/message_grpc.pb.go b/message/v1/message_grpc.pb.go index 0e87907..6b17b27 100644 --- a/message/v1/message_grpc.pb.go +++ b/message/v1/message_grpc.pb.go @@ -105,6 +105,7 @@ var PushMessageService_ServiceDesc = grpc.ServiceDesc{ // 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 OfflineMessageServiceClient interface { QueryOfflineMessage(ctx context.Context, in *QueryOfflineMessageReq, opts ...grpc.CallOption) (*QueryOfflineMessageResp, error) + ConfirmLastMstID(ctx context.Context, in *ConfirmLastMsgIDReq, opts ...grpc.CallOption) (*ConfirmLastMsgIDResp, error) } type offlineMessageServiceClient struct { @@ -124,11 +125,21 @@ func (c *offlineMessageServiceClient) QueryOfflineMessage(ctx context.Context, i return out, nil } +func (c *offlineMessageServiceClient) ConfirmLastMstID(ctx context.Context, in *ConfirmLastMsgIDReq, opts ...grpc.CallOption) (*ConfirmLastMsgIDResp, error) { + out := new(ConfirmLastMsgIDResp) + err := c.cc.Invoke(ctx, "/api.message.v1.OfflineMessageService/ConfirmLastMstID", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + // OfflineMessageServiceServer is the server API for OfflineMessageService service. // All implementations must embed UnimplementedOfflineMessageServiceServer // for forward compatibility type OfflineMessageServiceServer interface { QueryOfflineMessage(context.Context, *QueryOfflineMessageReq) (*QueryOfflineMessageResp, error) + ConfirmLastMstID(context.Context, *ConfirmLastMsgIDReq) (*ConfirmLastMsgIDResp, error) mustEmbedUnimplementedOfflineMessageServiceServer() } @@ -139,6 +150,9 @@ type UnimplementedOfflineMessageServiceServer struct { func (UnimplementedOfflineMessageServiceServer) QueryOfflineMessage(context.Context, *QueryOfflineMessageReq) (*QueryOfflineMessageResp, error) { return nil, status.Errorf(codes.Unimplemented, "method QueryOfflineMessage not implemented") } +func (UnimplementedOfflineMessageServiceServer) ConfirmLastMstID(context.Context, *ConfirmLastMsgIDReq) (*ConfirmLastMsgIDResp, error) { + return nil, status.Errorf(codes.Unimplemented, "method ConfirmLastMstID not implemented") +} func (UnimplementedOfflineMessageServiceServer) mustEmbedUnimplementedOfflineMessageServiceServer() {} // UnsafeOfflineMessageServiceServer may be embedded to opt out of forward compatibility for this service. @@ -170,6 +184,24 @@ func _OfflineMessageService_QueryOfflineMessage_Handler(srv interface{}, ctx con return interceptor(ctx, in, info, handler) } +func _OfflineMessageService_ConfirmLastMstID_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ConfirmLastMsgIDReq) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(OfflineMessageServiceServer).ConfirmLastMstID(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/api.message.v1.OfflineMessageService/ConfirmLastMstID", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(OfflineMessageServiceServer).ConfirmLastMstID(ctx, req.(*ConfirmLastMsgIDReq)) + } + return interceptor(ctx, in, info, handler) +} + // OfflineMessageService_ServiceDesc is the grpc.ServiceDesc for OfflineMessageService service. // It's only intended for direct use with grpc.RegisterService, // and not to be introspected or modified (even as a copy) @@ -181,6 +213,132 @@ var OfflineMessageService_ServiceDesc = grpc.ServiceDesc{ MethodName: "QueryOfflineMessage", Handler: _OfflineMessageService_QueryOfflineMessage_Handler, }, + { + MethodName: "ConfirmLastMstID", + Handler: _OfflineMessageService_ConfirmLastMstID_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "message/v1/message.proto", +} + +// HistoryMessageServiceClient is the client API for HistoryMessageService 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 HistoryMessageServiceClient interface { + QuerySessionHistoryMessage(ctx context.Context, in *QuerySessionHistoryMessageReq, opts ...grpc.CallOption) (*QuerySessionHistoryMessageResp, error) + SyncHistoryMessage(ctx context.Context, in *SyncHistoryMessageReq, opts ...grpc.CallOption) (*SyncHistoryMessageResp, error) +} + +type historyMessageServiceClient struct { + cc grpc.ClientConnInterface +} + +func NewHistoryMessageServiceClient(cc grpc.ClientConnInterface) HistoryMessageServiceClient { + return &historyMessageServiceClient{cc} +} + +func (c *historyMessageServiceClient) QuerySessionHistoryMessage(ctx context.Context, in *QuerySessionHistoryMessageReq, opts ...grpc.CallOption) (*QuerySessionHistoryMessageResp, error) { + out := new(QuerySessionHistoryMessageResp) + err := c.cc.Invoke(ctx, "/api.message.v1.HistoryMessageService/QuerySessionHistoryMessage", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *historyMessageServiceClient) SyncHistoryMessage(ctx context.Context, in *SyncHistoryMessageReq, opts ...grpc.CallOption) (*SyncHistoryMessageResp, error) { + out := new(SyncHistoryMessageResp) + err := c.cc.Invoke(ctx, "/api.message.v1.HistoryMessageService/SyncHistoryMessage", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// HistoryMessageServiceServer is the server API for HistoryMessageService service. +// All implementations must embed UnimplementedHistoryMessageServiceServer +// for forward compatibility +type HistoryMessageServiceServer interface { + QuerySessionHistoryMessage(context.Context, *QuerySessionHistoryMessageReq) (*QuerySessionHistoryMessageResp, error) + SyncHistoryMessage(context.Context, *SyncHistoryMessageReq) (*SyncHistoryMessageResp, error) + mustEmbedUnimplementedHistoryMessageServiceServer() +} + +// UnimplementedHistoryMessageServiceServer must be embedded to have forward compatible implementations. +type UnimplementedHistoryMessageServiceServer struct { +} + +func (UnimplementedHistoryMessageServiceServer) QuerySessionHistoryMessage(context.Context, *QuerySessionHistoryMessageReq) (*QuerySessionHistoryMessageResp, error) { + return nil, status.Errorf(codes.Unimplemented, "method QuerySessionHistoryMessage not implemented") +} +func (UnimplementedHistoryMessageServiceServer) SyncHistoryMessage(context.Context, *SyncHistoryMessageReq) (*SyncHistoryMessageResp, error) { + return nil, status.Errorf(codes.Unimplemented, "method SyncHistoryMessage not implemented") +} +func (UnimplementedHistoryMessageServiceServer) mustEmbedUnimplementedHistoryMessageServiceServer() {} + +// UnsafeHistoryMessageServiceServer may be embedded to opt out of forward compatibility for this service. +// Use of this interface is not recommended, as added methods to HistoryMessageServiceServer will +// result in compilation errors. +type UnsafeHistoryMessageServiceServer interface { + mustEmbedUnimplementedHistoryMessageServiceServer() +} + +func RegisterHistoryMessageServiceServer(s grpc.ServiceRegistrar, srv HistoryMessageServiceServer) { + s.RegisterService(&HistoryMessageService_ServiceDesc, srv) +} + +func _HistoryMessageService_QuerySessionHistoryMessage_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QuerySessionHistoryMessageReq) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(HistoryMessageServiceServer).QuerySessionHistoryMessage(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/api.message.v1.HistoryMessageService/QuerySessionHistoryMessage", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(HistoryMessageServiceServer).QuerySessionHistoryMessage(ctx, req.(*QuerySessionHistoryMessageReq)) + } + return interceptor(ctx, in, info, handler) +} + +func _HistoryMessageService_SyncHistoryMessage_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(SyncHistoryMessageReq) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(HistoryMessageServiceServer).SyncHistoryMessage(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/api.message.v1.HistoryMessageService/SyncHistoryMessage", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(HistoryMessageServiceServer).SyncHistoryMessage(ctx, req.(*SyncHistoryMessageReq)) + } + return interceptor(ctx, in, info, handler) +} + +// HistoryMessageService_ServiceDesc is the grpc.ServiceDesc for HistoryMessageService service. +// It's only intended for direct use with grpc.RegisterService, +// and not to be introspected or modified (even as a copy) +var HistoryMessageService_ServiceDesc = grpc.ServiceDesc{ + ServiceName: "api.message.v1.HistoryMessageService", + HandlerType: (*HistoryMessageServiceServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "QuerySessionHistoryMessage", + Handler: _HistoryMessageService_QuerySessionHistoryMessage_Handler, + }, + { + MethodName: "SyncHistoryMessage", + Handler: _HistoryMessageService_SyncHistoryMessage_Handler, + }, }, Streams: []grpc.StreamDesc{}, Metadata: "message/v1/message.proto", From 4c242d30c10e7aa848b448148b29c962800f37d1 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 20 Mar 2023 13:00:06 +0000 Subject: [PATCH 33/35] build(deps): bump google.golang.org/protobuf from 1.28.1 to 1.30.0 Bumps [google.golang.org/protobuf](https://github.com/protocolbuffers/protobuf-go) from 1.28.1 to 1.30.0. - [Release notes](https://github.com/protocolbuffers/protobuf-go/releases) - [Changelog](https://github.com/protocolbuffers/protobuf-go/blob/master/release.bash) - [Commits](https://github.com/protocolbuffers/protobuf-go/compare/v1.28.1...v1.30.0) --- updated-dependencies: - dependency-name: google.golang.org/protobuf dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- go.mod | 2 +- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index 44c552f..8576551 100644 --- a/go.mod +++ b/go.mod @@ -6,7 +6,7 @@ require ( github.com/envoyproxy/protoc-gen-validate v0.9.1 github.com/stretchr/testify v1.8.2 google.golang.org/grpc v1.49.0 - google.golang.org/protobuf v1.28.1 + google.golang.org/protobuf v1.30.0 ) require ( diff --git a/go.sum b/go.sum index e7925d8..7630006 100644 --- a/go.sum +++ b/go.sum @@ -93,8 +93,8 @@ google.golang.org/protobuf v1.23.1-0.20200526195155-81db48ad09cc/go.mod h1:EGpAD google.golang.org/protobuf v1.24.0/go.mod h1:r/3tXBNzIEhYS9I1OUVjXDlt8tc493IdKGjtUeSXeh4= google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= -google.golang.org/protobuf v1.28.1 h1:d0NfwRgPtno5B1Wa6L2DAG+KivqkdutMf1UhdNx175w= -google.golang.org/protobuf v1.28.1/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= +google.golang.org/protobuf v1.30.0 h1:kPPoIgf3TsEvrm0PFe15JQ+570QVxYzEvvHqChK+cng= +google.golang.org/protobuf v1.30.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127 h1:qIbj1fsPNlZgppZ+VLlY7N33q108Sa+fhmuc+sWQYwY= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= From f422d8dc11b31537f052bf56ef24a19627fe218b Mon Sep 17 00:00:00 2001 From: yusank Date: Mon, 29 May 2023 15:45:02 +0800 Subject: [PATCH 34/35] refactor: unified error for all 1. add offline and history msg defination 2. refactor transport.response to provide simpler and easy to use error for all Signed-off-by: Yusan Kurban --- errors/errors.ext.go | 94 ++++ errors/errors.pb.go | 299 ++++++++++ errors/errors.pb.validate.go | 140 +++++ .../response.proto => errors/errors.proto | 14 +- message/v1/message.pb.go | 450 ++++++++------- message/v1/message.pb.validate.go | 50 +- message/v1/message.proto | 12 +- transport/response/response.ext.go | 70 --- transport/response/response.pb.go | 301 ---------- transport/response/response.pb.validate.go | 141 ----- user/friend/v1/friend.pb.go | 520 +++++++++--------- user/friend/v1/friend.pb.validate.go | 60 +- user/friend/v1/friend.proto | 20 +- user/friend/v1/friend_grpc.pb.go | 32 +- user/group/v1/group.pb.go | 408 +++++++------- user/group/v1/group.pb.validate.go | 50 +- user/group/v1/group.proto | 14 +- user/group/v1/group_grpc.pb.go | 12 +- user/v1/user.pb.go | 254 +++++---- user/v1/user.pb.validate.go | 10 +- user/v1/user.proto | 4 +- 21 files changed, 1471 insertions(+), 1484 deletions(-) create mode 100644 errors/errors.ext.go create mode 100644 errors/errors.pb.go create mode 100644 errors/errors.pb.validate.go rename transport/response/response.proto => errors/errors.proto (77%) delete mode 100644 transport/response/response.ext.go delete mode 100644 transport/response/response.pb.go delete mode 100644 transport/response/response.pb.validate.go diff --git a/errors/errors.ext.go b/errors/errors.ext.go new file mode 100644 index 0000000..01f3e4c --- /dev/null +++ b/errors/errors.ext.go @@ -0,0 +1,94 @@ +// This file Written Manually. + +package errors + +import ( + "fmt" +) + +/* + * Define BaseResponse + */ + +var _ error = &Error{} + +func NewErrorWithCode(code ErrorCode) *Error { + return &Error{ + ErrorCode: code, + Reason: code.String(), + } +} + +func ErrorOK() *Error { + return NewErrorWithCode(ErrorCode_OK) +} + +func NewErrorWithError(err error) *Error { + // check err is BaseResponse + if br, ok := err.(*Error); ok { + return br + } + + return &Error{ + ErrorCode: ErrorCode_InternalError, + Reason: ErrorCode_InternalError.String(), + Message: err.Error(), + } +} + +// Error is implement of error interface. +func (x *Error) Error() string { + return fmt.Sprintf("ErrorCode: %d, Reason: %s, Message: %s", x.ErrorCode, x.Reason, x.Message) +} + +// Err returns as error. +func (x *Error) Err() error { + if x.ErrorCode == ErrorCode_OK { + return nil + } + + return x +} + +func (x *Error) Success() bool { + return x.ErrorCode == ErrorCode_OK +} + +func (x *Error) WithMessage(msg string) *Error { + x.Message = msg + return x +} + +func (x *Error) WithError(err error) *Error { + x.Message = err.Error() + return x +} + +/* + * ErrorCode As Error. + */ + +func (x ErrorCode) Error() string { + return NewErrorWithCode(x).Error() +} + +func (x ErrorCode) Err() error { + if x == ErrorCode_OK { + return nil + } + + return NewErrorWithCode(x) +} + +// Err2 returns as Error we defined. +func (x ErrorCode) Err2() *Error { + return NewErrorWithCode(x) +} + +func (x ErrorCode) WithMessage(msg string) *Error { + return NewErrorWithCode(x).WithMessage(msg) +} + +func (x ErrorCode) WithError(err error) *Error { + return NewErrorWithCode(x).WithError(err) +} diff --git a/errors/errors.pb.go b/errors/errors.pb.go new file mode 100644 index 0000000..a5895d8 --- /dev/null +++ b/errors/errors.pb.go @@ -0,0 +1,299 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.26.0 +// protoc (unknown) +// source: errors/errors.proto + +package errors + +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 ErrorCode int32 + +const ( + ErrorCode_OK ErrorCode = 0 + // common error codes + ErrorCode_InternalError ErrorCode = 10001 + ErrorCode_InvalidParams ErrorCode = 10002 + ErrorCode_DBError ErrorCode = 10003 + ErrorCode_CacheError ErrorCode = 10004 + // user error codes + ErrorCode_UserNotExist ErrorCode = 20001 + ErrorCode_UserExist ErrorCode = 20002 + ErrorCode_InvalidUsernameOrPassword ErrorCode = 20003 + // relation error codes + ErrorCode_RelationNotExist ErrorCode = 30001 + ErrorCode_RelationExist ErrorCode = 30002 + ErrorCode_InvalidUpdateRelationAction ErrorCode = 30003 + // friend request error codes + ErrorCode_FriendRequestNotExist ErrorCode = 31001 + ErrorCode_FriendRequestStatusError ErrorCode = 31002 + // push server error codes + ErrorCode_UserNotOnline ErrorCode = 40001 + // group error codes + ErrorCode_GroupNotExist ErrorCode = 50001 + ErrorCode_GroupExist ErrorCode = 50002 + ErrorCode_NotGroupMember ErrorCode = 50003 + ErrorCode_NotGroupOwner ErrorCode = 50004 + ErrorCode_GroupLimitExceed ErrorCode = 50005 +) + +// Enum value maps for ErrorCode. +var ( + ErrorCode_name = map[int32]string{ + 0: "OK", + 10001: "InternalError", + 10002: "InvalidParams", + 10003: "DBError", + 10004: "CacheError", + 20001: "UserNotExist", + 20002: "UserExist", + 20003: "InvalidUsernameOrPassword", + 30001: "RelationNotExist", + 30002: "RelationExist", + 30003: "InvalidUpdateRelationAction", + 31001: "FriendRequestNotExist", + 31002: "FriendRequestStatusError", + 40001: "UserNotOnline", + 50001: "GroupNotExist", + 50002: "GroupExist", + 50003: "NotGroupMember", + 50004: "NotGroupOwner", + 50005: "GroupLimitExceed", + } + ErrorCode_value = map[string]int32{ + "OK": 0, + "InternalError": 10001, + "InvalidParams": 10002, + "DBError": 10003, + "CacheError": 10004, + "UserNotExist": 20001, + "UserExist": 20002, + "InvalidUsernameOrPassword": 20003, + "RelationNotExist": 30001, + "RelationExist": 30002, + "InvalidUpdateRelationAction": 30003, + "FriendRequestNotExist": 31001, + "FriendRequestStatusError": 31002, + "UserNotOnline": 40001, + "GroupNotExist": 50001, + "GroupExist": 50002, + "NotGroupMember": 50003, + "NotGroupOwner": 50004, + "GroupLimitExceed": 50005, + } +) + +func (x ErrorCode) Enum() *ErrorCode { + p := new(ErrorCode) + *p = x + return p +} + +func (x ErrorCode) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (ErrorCode) Descriptor() protoreflect.EnumDescriptor { + return file_errors_errors_proto_enumTypes[0].Descriptor() +} + +func (ErrorCode) Type() protoreflect.EnumType { + return &file_errors_errors_proto_enumTypes[0] +} + +func (x ErrorCode) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use ErrorCode.Descriptor instead. +func (ErrorCode) EnumDescriptor() ([]byte, []int) { + return file_errors_errors_proto_rawDescGZIP(), []int{0} +} + +// Error use as define error code and message. +type Error struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + ErrorCode ErrorCode `protobuf:"varint,1,opt,name=error_code,json=errorCode,proto3,enum=api.errors.ErrorCode" json:"error_code,omitempty"` + Reason string `protobuf:"bytes,2,opt,name=reason,proto3" json:"reason,omitempty"` + Message string `protobuf:"bytes,3,opt,name=message,proto3" json:"message,omitempty"` +} + +func (x *Error) Reset() { + *x = Error{} + if protoimpl.UnsafeEnabled { + mi := &file_errors_errors_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Error) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Error) ProtoMessage() {} + +func (x *Error) ProtoReflect() protoreflect.Message { + mi := &file_errors_errors_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 Error.ProtoReflect.Descriptor instead. +func (*Error) Descriptor() ([]byte, []int) { + return file_errors_errors_proto_rawDescGZIP(), []int{0} +} + +func (x *Error) GetErrorCode() ErrorCode { + if x != nil { + return x.ErrorCode + } + return ErrorCode_OK +} + +func (x *Error) GetReason() string { + if x != nil { + return x.Reason + } + return "" +} + +func (x *Error) GetMessage() string { + if x != nil { + return x.Message + } + return "" +} + +var File_errors_errors_proto protoreflect.FileDescriptor + +var file_errors_errors_proto_rawDesc = []byte{ + 0x0a, 0x13, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x73, 0x2f, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x73, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0a, 0x61, 0x70, 0x69, 0x2e, 0x65, 0x72, 0x72, 0x6f, 0x72, + 0x73, 0x22, 0x6f, 0x0a, 0x05, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x12, 0x34, 0x0a, 0x0a, 0x65, 0x72, + 0x72, 0x6f, 0x72, 0x5f, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x15, + 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x73, 0x2e, 0x45, 0x72, 0x72, 0x6f, + 0x72, 0x43, 0x6f, 0x64, 0x65, 0x52, 0x09, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x43, 0x6f, 0x64, 0x65, + 0x12, 0x16, 0x0a, 0x06, 0x72, 0x65, 0x61, 0x73, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x06, 0x72, 0x65, 0x61, 0x73, 0x6f, 0x6e, 0x12, 0x18, 0x0a, 0x07, 0x6d, 0x65, 0x73, 0x73, + 0x61, 0x67, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, + 0x67, 0x65, 0x2a, 0xac, 0x03, 0x0a, 0x09, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x43, 0x6f, 0x64, 0x65, + 0x12, 0x06, 0x0a, 0x02, 0x4f, 0x4b, 0x10, 0x00, 0x12, 0x12, 0x0a, 0x0d, 0x49, 0x6e, 0x74, 0x65, + 0x72, 0x6e, 0x61, 0x6c, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x10, 0x91, 0x4e, 0x12, 0x12, 0x0a, 0x0d, + 0x49, 0x6e, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x10, 0x92, 0x4e, + 0x12, 0x0c, 0x0a, 0x07, 0x44, 0x42, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x10, 0x93, 0x4e, 0x12, 0x0f, + 0x0a, 0x0a, 0x43, 0x61, 0x63, 0x68, 0x65, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x10, 0x94, 0x4e, 0x12, + 0x12, 0x0a, 0x0c, 0x55, 0x73, 0x65, 0x72, 0x4e, 0x6f, 0x74, 0x45, 0x78, 0x69, 0x73, 0x74, 0x10, + 0xa1, 0x9c, 0x01, 0x12, 0x0f, 0x0a, 0x09, 0x55, 0x73, 0x65, 0x72, 0x45, 0x78, 0x69, 0x73, 0x74, + 0x10, 0xa2, 0x9c, 0x01, 0x12, 0x1f, 0x0a, 0x19, 0x49, 0x6e, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x55, + 0x73, 0x65, 0x72, 0x6e, 0x61, 0x6d, 0x65, 0x4f, 0x72, 0x50, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, + 0x64, 0x10, 0xa3, 0x9c, 0x01, 0x12, 0x16, 0x0a, 0x10, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x4e, 0x6f, 0x74, 0x45, 0x78, 0x69, 0x73, 0x74, 0x10, 0xb1, 0xea, 0x01, 0x12, 0x13, 0x0a, + 0x0d, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x45, 0x78, 0x69, 0x73, 0x74, 0x10, 0xb2, + 0xea, 0x01, 0x12, 0x21, 0x0a, 0x1b, 0x49, 0x6e, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x55, 0x70, 0x64, + 0x61, 0x74, 0x65, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x41, 0x63, 0x74, 0x69, 0x6f, + 0x6e, 0x10, 0xb3, 0xea, 0x01, 0x12, 0x1b, 0x0a, 0x15, 0x46, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x4e, 0x6f, 0x74, 0x45, 0x78, 0x69, 0x73, 0x74, 0x10, 0x99, + 0xf2, 0x01, 0x12, 0x1e, 0x0a, 0x18, 0x46, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x10, 0x9a, + 0xf2, 0x01, 0x12, 0x13, 0x0a, 0x0d, 0x55, 0x73, 0x65, 0x72, 0x4e, 0x6f, 0x74, 0x4f, 0x6e, 0x6c, + 0x69, 0x6e, 0x65, 0x10, 0xc1, 0xb8, 0x02, 0x12, 0x13, 0x0a, 0x0d, 0x47, 0x72, 0x6f, 0x75, 0x70, + 0x4e, 0x6f, 0x74, 0x45, 0x78, 0x69, 0x73, 0x74, 0x10, 0xd1, 0x86, 0x03, 0x12, 0x10, 0x0a, 0x0a, + 0x47, 0x72, 0x6f, 0x75, 0x70, 0x45, 0x78, 0x69, 0x73, 0x74, 0x10, 0xd2, 0x86, 0x03, 0x12, 0x14, + 0x0a, 0x0e, 0x4e, 0x6f, 0x74, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, + 0x10, 0xd3, 0x86, 0x03, 0x12, 0x13, 0x0a, 0x0d, 0x4e, 0x6f, 0x74, 0x47, 0x72, 0x6f, 0x75, 0x70, + 0x4f, 0x77, 0x6e, 0x65, 0x72, 0x10, 0xd4, 0x86, 0x03, 0x12, 0x16, 0x0a, 0x10, 0x47, 0x72, 0x6f, + 0x75, 0x70, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x45, 0x78, 0x63, 0x65, 0x65, 0x64, 0x10, 0xd5, 0x86, + 0x03, 0x42, 0x1f, 0x5a, 0x1d, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, + 0x67, 0x6f, 0x2d, 0x67, 0x6f, 0x69, 0x6d, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x65, 0x72, 0x72, 0x6f, + 0x72, 0x73, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_errors_errors_proto_rawDescOnce sync.Once + file_errors_errors_proto_rawDescData = file_errors_errors_proto_rawDesc +) + +func file_errors_errors_proto_rawDescGZIP() []byte { + file_errors_errors_proto_rawDescOnce.Do(func() { + file_errors_errors_proto_rawDescData = protoimpl.X.CompressGZIP(file_errors_errors_proto_rawDescData) + }) + return file_errors_errors_proto_rawDescData +} + +var file_errors_errors_proto_enumTypes = make([]protoimpl.EnumInfo, 1) +var file_errors_errors_proto_msgTypes = make([]protoimpl.MessageInfo, 1) +var file_errors_errors_proto_goTypes = []interface{}{ + (ErrorCode)(0), // 0: api.errors.ErrorCode + (*Error)(nil), // 1: api.errors.Error +} +var file_errors_errors_proto_depIdxs = []int32{ + 0, // 0: api.errors.Error.error_code:type_name -> api.errors.ErrorCode + 1, // [1:1] is the sub-list for method output_type + 1, // [1:1] 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_errors_errors_proto_init() } +func file_errors_errors_proto_init() { + if File_errors_errors_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_errors_errors_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Error); 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_errors_errors_proto_rawDesc, + NumEnums: 1, + NumMessages: 1, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_errors_errors_proto_goTypes, + DependencyIndexes: file_errors_errors_proto_depIdxs, + EnumInfos: file_errors_errors_proto_enumTypes, + MessageInfos: file_errors_errors_proto_msgTypes, + }.Build() + File_errors_errors_proto = out.File + file_errors_errors_proto_rawDesc = nil + file_errors_errors_proto_goTypes = nil + file_errors_errors_proto_depIdxs = nil +} diff --git a/errors/errors.pb.validate.go b/errors/errors.pb.validate.go new file mode 100644 index 0000000..6fc30f9 --- /dev/null +++ b/errors/errors.pb.validate.go @@ -0,0 +1,140 @@ +// Code generated by protoc-gen-validate. DO NOT EDIT. +// source: errors/errors.proto + +package errors + +import ( + "bytes" + "errors" + "fmt" + "net" + "net/mail" + "net/url" + "regexp" + "sort" + "strings" + "time" + "unicode/utf8" + + "google.golang.org/protobuf/types/known/anypb" +) + +// ensure the imports are used +var ( + _ = bytes.MinRead + _ = errors.New("") + _ = fmt.Print + _ = utf8.UTFMax + _ = (*regexp.Regexp)(nil) + _ = (*strings.Reader)(nil) + _ = net.IPv4len + _ = time.Duration(0) + _ = (*url.URL)(nil) + _ = (*mail.Address)(nil) + _ = anypb.Any{} + _ = sort.Sort +) + +// Validate checks the field values on Error with the rules defined in the +// proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. +func (m *Error) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on Error with the rules defined in the +// proto definition for this message. If any rules are violated, the result is +// a list of violation errors wrapped in ErrorMultiError, or nil if none found. +func (m *Error) ValidateAll() error { + return m.validate(true) +} + +func (m *Error) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + // no validation rules for ErrorCode + + // no validation rules for Reason + + // no validation rules for Message + + if len(errors) > 0 { + return ErrorMultiError(errors) + } + + return nil +} + +// ErrorMultiError is an error wrapping multiple validation errors returned by +// Error.ValidateAll() if the designated constraints aren't met. +type ErrorMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m ErrorMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m ErrorMultiError) AllErrors() []error { return m } + +// ErrorValidationError is the validation error returned by Error.Validate if +// the designated constraints aren't met. +type ErrorValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e ErrorValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e ErrorValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e ErrorValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e ErrorValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e ErrorValidationError) ErrorName() string { return "ErrorValidationError" } + +// Error satisfies the builtin error interface +func (e ErrorValidationError) Error() string { + cause := "" + if e.cause != nil { + cause = fmt.Sprintf(" | caused by: %v", e.cause) + } + + key := "" + if e.key { + key = "key for " + } + + return fmt.Sprintf( + "invalid %sError.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = ErrorValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = ErrorValidationError{} diff --git a/transport/response/response.proto b/errors/errors.proto similarity index 77% rename from transport/response/response.proto rename to errors/errors.proto index 65e8078..aabe667 100644 --- a/transport/response/response.proto +++ b/errors/errors.proto @@ -1,10 +1,10 @@ syntax = "proto3"; -package api.transport.response; +package api.errors; -option go_package = "github.com/go-goim/api/transport/response"; +option go_package = "github.com/go-goim/api/errors"; -enum Code { +enum ErrorCode { OK = 0; // common error codes @@ -38,9 +38,9 @@ enum Code { GroupLimitExceed = 50005; } -// BaseResponse use as define response code and message -message BaseResponse { - Code code = 1; +// Error use as define error code and message. +message Error { + ErrorCode error_code = 1; string reason = 2; string message = 3; -} +} \ No newline at end of file diff --git a/message/v1/message.pb.go b/message/v1/message.pb.go index 3700602..19defe1 100644 --- a/message/v1/message.pb.go +++ b/message/v1/message.pb.go @@ -8,7 +8,7 @@ package v1 import ( _ "github.com/envoyproxy/protoc-gen-validate/validate" - response "github.com/go-goim/api/transport/response" + errors "github.com/go-goim/api/errors" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" timestamppb "google.golang.org/protobuf/types/known/timestamppb" @@ -381,8 +381,8 @@ type PushMessageResp struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Response *response.BaseResponse `protobuf:"bytes,1,opt,name=response,proto3" json:"response,omitempty"` - FailedUsers []int64 `protobuf:"varint,2,rep,packed,name=failed_users,json=failedUsers,proto3" json:"failed_users,omitempty"` + Error *errors.Error `protobuf:"bytes,1,opt,name=error,proto3" json:"error,omitempty"` + FailedUsers []int64 `protobuf:"varint,2,rep,packed,name=failed_users,json=failedUsers,proto3" json:"failed_users,omitempty"` } func (x *PushMessageResp) Reset() { @@ -417,9 +417,9 @@ func (*PushMessageResp) Descriptor() ([]byte, []int) { return file_message_v1_message_proto_rawDescGZIP(), []int{3} } -func (x *PushMessageResp) GetResponse() *response.BaseResponse { +func (x *PushMessageResp) GetError() *errors.Error { if x != nil { - return x.Response + return x.Error } return nil } @@ -515,9 +515,9 @@ type QueryOfflineMessageResp struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Response *response.BaseResponse `protobuf:"bytes,1,opt,name=response,proto3" json:"response,omitempty"` - Total int32 `protobuf:"varint,2,opt,name=total,proto3" json:"total,omitempty"` - Messages []*Message `protobuf:"bytes,3,rep,name=messages,proto3" json:"messages,omitempty"` + Error *errors.Error `protobuf:"bytes,1,opt,name=error,proto3" json:"error,omitempty"` + Total int32 `protobuf:"varint,2,opt,name=total,proto3" json:"total,omitempty"` + Messages []*Message `protobuf:"bytes,3,rep,name=messages,proto3" json:"messages,omitempty"` } func (x *QueryOfflineMessageResp) Reset() { @@ -552,9 +552,9 @@ func (*QueryOfflineMessageResp) Descriptor() ([]byte, []int) { return file_message_v1_message_proto_rawDescGZIP(), []int{5} } -func (x *QueryOfflineMessageResp) GetResponse() *response.BaseResponse { +func (x *QueryOfflineMessageResp) GetError() *errors.Error { if x != nil { - return x.Response + return x.Error } return nil } @@ -633,8 +633,8 @@ type ConfirmLastMsgIDResp struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Response *response.BaseResponse `protobuf:"bytes,1,opt,name=response,proto3" json:"response,omitempty"` - LastMsgId int64 `protobuf:"varint,2,opt,name=last_msg_id,json=lastMsgId,proto3" json:"last_msg_id,omitempty"` + Error *errors.Error `protobuf:"bytes,1,opt,name=error,proto3" json:"error,omitempty"` + LastMsgId int64 `protobuf:"varint,2,opt,name=last_msg_id,json=lastMsgId,proto3" json:"last_msg_id,omitempty"` } func (x *ConfirmLastMsgIDResp) Reset() { @@ -669,9 +669,9 @@ func (*ConfirmLastMsgIDResp) Descriptor() ([]byte, []int) { return file_message_v1_message_proto_rawDescGZIP(), []int{7} } -func (x *ConfirmLastMsgIDResp) GetResponse() *response.BaseResponse { +func (x *ConfirmLastMsgIDResp) GetError() *errors.Error { if x != nil { - return x.Response + return x.Error } return nil } @@ -839,9 +839,9 @@ type QuerySessionHistoryMessageResp struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Response *response.BaseResponse `protobuf:"bytes,1,opt,name=response,proto3" json:"response,omitempty"` - Total int32 `protobuf:"varint,2,opt,name=total,proto3" json:"total,omitempty"` - Messages []*Message `protobuf:"bytes,3,rep,name=messages,proto3" json:"messages,omitempty"` + Error *errors.Error `protobuf:"bytes,1,opt,name=error,proto3" json:"error,omitempty"` + Total int32 `protobuf:"varint,2,opt,name=total,proto3" json:"total,omitempty"` + Messages []*Message `protobuf:"bytes,3,rep,name=messages,proto3" json:"messages,omitempty"` } func (x *QuerySessionHistoryMessageResp) Reset() { @@ -876,9 +876,9 @@ func (*QuerySessionHistoryMessageResp) Descriptor() ([]byte, []int) { return file_message_v1_message_proto_rawDescGZIP(), []int{10} } -func (x *QuerySessionHistoryMessageResp) GetResponse() *response.BaseResponse { +func (x *QuerySessionHistoryMessageResp) GetError() *errors.Error { if x != nil { - return x.Response + return x.Error } return nil } @@ -973,9 +973,9 @@ type SyncHistoryMessageResp struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Response *response.BaseResponse `protobuf:"bytes,1,opt,name=response,proto3" json:"response,omitempty"` - Total int32 `protobuf:"varint,2,opt,name=total,proto3" json:"total,omitempty"` - Messages []*Message `protobuf:"bytes,3,rep,name=messages,proto3" json:"messages,omitempty"` + Error *errors.Error `protobuf:"bytes,1,opt,name=error,proto3" json:"error,omitempty"` + Total int32 `protobuf:"varint,2,opt,name=total,proto3" json:"total,omitempty"` + Messages []*Message `protobuf:"bytes,3,rep,name=messages,proto3" json:"messages,omitempty"` } func (x *SyncHistoryMessageResp) Reset() { @@ -1010,9 +1010,9 @@ func (*SyncHistoryMessageResp) Descriptor() ([]byte, []int) { return file_message_v1_message_proto_rawDescGZIP(), []int{12} } -func (x *SyncHistoryMessageResp) GetResponse() *response.BaseResponse { +func (x *SyncHistoryMessageResp) GetError() *errors.Error { if x != nil { - return x.Response + return x.Error } return nil } @@ -1203,80 +1203,76 @@ var file_message_v1_message_proto_rawDesc = []byte{ 0x73, 0x61, 0x67, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0e, 0x61, 0x70, 0x69, 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x31, 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, 0x21, 0x74, 0x72, 0x61, - 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x2f, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2f, - 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x17, - 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, - 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xb0, 0x02, 0x0a, 0x0e, 0x53, 0x65, 0x6e, 0x64, - 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x52, 0x65, 0x71, 0x12, 0x1b, 0x0a, 0x04, 0x66, 0x72, - 0x6f, 0x6d, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x22, 0x02, 0x20, - 0x00, 0x52, 0x04, 0x66, 0x72, 0x6f, 0x6d, 0x12, 0x17, 0x0a, 0x02, 0x74, 0x6f, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x03, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x22, 0x02, 0x20, 0x00, 0x52, 0x02, 0x74, 0x6f, - 0x12, 0x3e, 0x0a, 0x0c, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x79, 0x70, 0x65, - 0x18, 0x03, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1b, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x6d, 0x65, 0x73, - 0x73, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x54, - 0x79, 0x70, 0x65, 0x52, 0x0b, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x54, 0x79, 0x70, 0x65, - 0x12, 0x22, 0x0a, 0x0a, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x04, - 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x09, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x49, - 0x64, 0x88, 0x01, 0x01, 0x12, 0x4f, 0x0a, 0x0c, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x5f, - 0x74, 0x79, 0x70, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x22, 0x2e, 0x61, 0x70, 0x69, - 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x65, 0x73, 0x73, - 0x61, 0x67, 0x65, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x54, 0x79, 0x70, 0x65, 0x42, 0x08, - 0xfa, 0x42, 0x05, 0x82, 0x01, 0x02, 0x10, 0x01, 0x52, 0x0b, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, - 0x74, 0x54, 0x79, 0x70, 0x65, 0x12, 0x24, 0x0a, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, - 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x42, 0x0a, 0xfa, 0x42, 0x07, 0x72, 0x05, 0x10, 0x01, 0x18, - 0x80, 0x20, 0x52, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x42, 0x0d, 0x0a, 0x0b, 0x5f, - 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x22, 0xa5, 0x02, 0x0a, 0x07, 0x4d, - 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x15, 0x0a, 0x06, 0x6d, 0x73, 0x67, 0x5f, 0x69, 0x64, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x6d, 0x73, 0x67, 0x49, 0x64, 0x12, 0x12, 0x0a, - 0x04, 0x66, 0x72, 0x6f, 0x6d, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x04, 0x66, 0x72, 0x6f, - 0x6d, 0x12, 0x0e, 0x0a, 0x02, 0x74, 0x6f, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x02, 0x74, - 0x6f, 0x12, 0x3e, 0x0a, 0x0c, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x79, 0x70, - 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1b, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x6d, 0x65, - 0x73, 0x73, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, - 0x54, 0x79, 0x70, 0x65, 0x52, 0x0b, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x54, 0x79, 0x70, - 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x18, - 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x49, 0x64, - 0x12, 0x45, 0x0a, 0x0c, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x5f, 0x74, 0x79, 0x70, 0x65, - 0x18, 0x06, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x22, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x6d, 0x65, 0x73, - 0x73, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x43, - 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x54, 0x79, 0x70, 0x65, 0x52, 0x0b, 0x63, 0x6f, 0x6e, 0x74, - 0x65, 0x6e, 0x74, 0x54, 0x79, 0x70, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, - 0x6e, 0x74, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, - 0x74, 0x12, 0x1f, 0x0a, 0x0b, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x5f, 0x74, 0x69, 0x6d, 0x65, - 0x18, 0x08, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0a, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x54, 0x69, - 0x6d, 0x65, 0x22, 0x5e, 0x0a, 0x0e, 0x50, 0x75, 0x73, 0x68, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, - 0x65, 0x52, 0x65, 0x71, 0x12, 0x31, 0x0a, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x6d, 0x65, 0x73, 0x73, - 0x61, 0x67, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x52, 0x07, - 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x19, 0x0a, 0x08, 0x74, 0x6f, 0x5f, 0x75, 0x73, - 0x65, 0x72, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x03, 0x52, 0x07, 0x74, 0x6f, 0x55, 0x73, 0x65, - 0x72, 0x73, 0x22, 0x76, 0x0a, 0x0f, 0x50, 0x75, 0x73, 0x68, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, - 0x65, 0x52, 0x65, 0x73, 0x70, 0x12, 0x40, 0x0a, 0x08, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x74, 0x72, - 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x2e, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x2e, 0x42, 0x61, 0x73, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x52, 0x08, 0x72, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x21, 0x0a, 0x0c, 0x66, 0x61, 0x69, 0x6c, 0x65, - 0x64, 0x5f, 0x75, 0x73, 0x65, 0x72, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x03, 0x52, 0x0b, 0x66, - 0x61, 0x69, 0x6c, 0x65, 0x64, 0x55, 0x73, 0x65, 0x72, 0x73, 0x22, 0xb6, 0x01, 0x0a, 0x16, 0x51, - 0x75, 0x65, 0x72, 0x79, 0x4f, 0x66, 0x66, 0x6c, 0x69, 0x6e, 0x65, 0x4d, 0x65, 0x73, 0x73, 0x61, - 0x67, 0x65, 0x52, 0x65, 0x71, 0x12, 0x19, 0x0a, 0x03, 0x75, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x03, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x22, 0x02, 0x20, 0x00, 0x52, 0x03, 0x75, 0x69, 0x64, - 0x12, 0x27, 0x0a, 0x0b, 0x6c, 0x61, 0x73, 0x74, 0x5f, 0x6d, 0x73, 0x67, 0x5f, 0x69, 0x64, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x03, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x22, 0x02, 0x20, 0x00, 0x52, 0x09, - 0x6c, 0x61, 0x73, 0x74, 0x4d, 0x73, 0x67, 0x49, 0x64, 0x12, 0x1c, 0x0a, 0x09, 0x6f, 0x6e, 0x6c, - 0x79, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x09, 0x6f, 0x6e, - 0x6c, 0x79, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x70, 0x61, 0x67, 0x65, 0x18, - 0x04, 0x20, 0x01, 0x28, 0x05, 0x52, 0x04, 0x70, 0x61, 0x67, 0x65, 0x12, 0x26, 0x0a, 0x09, 0x70, - 0x61, 0x67, 0x65, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x05, 0x42, 0x09, - 0xfa, 0x42, 0x06, 0x1a, 0x04, 0x18, 0x64, 0x28, 0x01, 0x52, 0x08, 0x70, 0x61, 0x67, 0x65, 0x53, - 0x69, 0x7a, 0x65, 0x22, 0xa6, 0x01, 0x0a, 0x17, 0x51, 0x75, 0x65, 0x72, 0x79, 0x4f, 0x66, 0x66, - 0x6c, 0x69, 0x6e, 0x65, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x52, 0x65, 0x73, 0x70, 0x12, - 0x40, 0x0a, 0x08, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x24, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, - 0x74, 0x2e, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x42, 0x61, 0x73, 0x65, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x52, 0x08, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x12, 0x14, 0x0a, 0x05, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, + 0x73, 0x74, 0x61, 0x6d, 0x70, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x13, 0x65, 0x72, 0x72, + 0x6f, 0x72, 0x73, 0x2f, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x1a, 0x17, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, + 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xb0, 0x02, 0x0a, 0x0e, 0x53, 0x65, + 0x6e, 0x64, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x52, 0x65, 0x71, 0x12, 0x1b, 0x0a, 0x04, + 0x66, 0x72, 0x6f, 0x6d, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x22, + 0x02, 0x20, 0x00, 0x52, 0x04, 0x66, 0x72, 0x6f, 0x6d, 0x12, 0x17, 0x0a, 0x02, 0x74, 0x6f, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x03, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x22, 0x02, 0x20, 0x00, 0x52, 0x02, + 0x74, 0x6f, 0x12, 0x3e, 0x0a, 0x0c, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x79, + 0x70, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1b, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x6d, + 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, + 0x6e, 0x54, 0x79, 0x70, 0x65, 0x52, 0x0b, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x54, 0x79, + 0x70, 0x65, 0x12, 0x22, 0x0a, 0x0a, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, + 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x09, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, + 0x6e, 0x49, 0x64, 0x88, 0x01, 0x01, 0x12, 0x4f, 0x0a, 0x0c, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, + 0x74, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x22, 0x2e, 0x61, + 0x70, 0x69, 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x65, + 0x73, 0x73, 0x61, 0x67, 0x65, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x54, 0x79, 0x70, 0x65, + 0x42, 0x08, 0xfa, 0x42, 0x05, 0x82, 0x01, 0x02, 0x10, 0x01, 0x52, 0x0b, 0x63, 0x6f, 0x6e, 0x74, + 0x65, 0x6e, 0x74, 0x54, 0x79, 0x70, 0x65, 0x12, 0x24, 0x0a, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, + 0x6e, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x42, 0x0a, 0xfa, 0x42, 0x07, 0x72, 0x05, 0x10, + 0x01, 0x18, 0x80, 0x20, 0x52, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x42, 0x0d, 0x0a, + 0x0b, 0x5f, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x22, 0xa5, 0x02, 0x0a, + 0x07, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x15, 0x0a, 0x06, 0x6d, 0x73, 0x67, 0x5f, + 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x6d, 0x73, 0x67, 0x49, 0x64, 0x12, + 0x12, 0x0a, 0x04, 0x66, 0x72, 0x6f, 0x6d, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x04, 0x66, + 0x72, 0x6f, 0x6d, 0x12, 0x0e, 0x0a, 0x02, 0x74, 0x6f, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, + 0x02, 0x74, 0x6f, 0x12, 0x3e, 0x0a, 0x0c, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x74, + 0x79, 0x70, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1b, 0x2e, 0x61, 0x70, 0x69, 0x2e, + 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x65, 0x73, 0x73, 0x69, + 0x6f, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x52, 0x0b, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x54, + 0x79, 0x70, 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x69, + 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, + 0x49, 0x64, 0x12, 0x45, 0x0a, 0x0c, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x5f, 0x74, 0x79, + 0x70, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x22, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x6d, + 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, + 0x65, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x54, 0x79, 0x70, 0x65, 0x52, 0x0b, 0x63, 0x6f, + 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x54, 0x79, 0x70, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x63, 0x6f, 0x6e, + 0x74, 0x65, 0x6e, 0x74, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x63, 0x6f, 0x6e, 0x74, + 0x65, 0x6e, 0x74, 0x12, 0x1f, 0x0a, 0x0b, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x5f, 0x74, 0x69, + 0x6d, 0x65, 0x18, 0x08, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0a, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, + 0x54, 0x69, 0x6d, 0x65, 0x22, 0x5e, 0x0a, 0x0e, 0x50, 0x75, 0x73, 0x68, 0x4d, 0x65, 0x73, 0x73, + 0x61, 0x67, 0x65, 0x52, 0x65, 0x71, 0x12, 0x31, 0x0a, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, + 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x6d, 0x65, + 0x73, 0x73, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, + 0x52, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x19, 0x0a, 0x08, 0x74, 0x6f, 0x5f, + 0x75, 0x73, 0x65, 0x72, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x03, 0x52, 0x07, 0x74, 0x6f, 0x55, + 0x73, 0x65, 0x72, 0x73, 0x22, 0x5d, 0x0a, 0x0f, 0x50, 0x75, 0x73, 0x68, 0x4d, 0x65, 0x73, 0x73, + 0x61, 0x67, 0x65, 0x52, 0x65, 0x73, 0x70, 0x12, 0x27, 0x0a, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x65, 0x72, 0x72, + 0x6f, 0x72, 0x73, 0x2e, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x52, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, + 0x12, 0x21, 0x0a, 0x0c, 0x66, 0x61, 0x69, 0x6c, 0x65, 0x64, 0x5f, 0x75, 0x73, 0x65, 0x72, 0x73, + 0x18, 0x02, 0x20, 0x03, 0x28, 0x03, 0x52, 0x0b, 0x66, 0x61, 0x69, 0x6c, 0x65, 0x64, 0x55, 0x73, + 0x65, 0x72, 0x73, 0x22, 0xb6, 0x01, 0x0a, 0x16, 0x51, 0x75, 0x65, 0x72, 0x79, 0x4f, 0x66, 0x66, + 0x6c, 0x69, 0x6e, 0x65, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x52, 0x65, 0x71, 0x12, 0x19, + 0x0a, 0x03, 0x75, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x42, 0x07, 0xfa, 0x42, 0x04, + 0x22, 0x02, 0x20, 0x00, 0x52, 0x03, 0x75, 0x69, 0x64, 0x12, 0x27, 0x0a, 0x0b, 0x6c, 0x61, 0x73, + 0x74, 0x5f, 0x6d, 0x73, 0x67, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x42, 0x07, + 0xfa, 0x42, 0x04, 0x22, 0x02, 0x20, 0x00, 0x52, 0x09, 0x6c, 0x61, 0x73, 0x74, 0x4d, 0x73, 0x67, + 0x49, 0x64, 0x12, 0x1c, 0x0a, 0x09, 0x6f, 0x6e, 0x6c, 0x79, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x18, + 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x09, 0x6f, 0x6e, 0x6c, 0x79, 0x43, 0x6f, 0x75, 0x6e, 0x74, + 0x12, 0x12, 0x0a, 0x04, 0x70, 0x61, 0x67, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x05, 0x52, 0x04, + 0x70, 0x61, 0x67, 0x65, 0x12, 0x26, 0x0a, 0x09, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x73, 0x69, 0x7a, + 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x05, 0x42, 0x09, 0xfa, 0x42, 0x06, 0x1a, 0x04, 0x18, 0x64, + 0x28, 0x01, 0x52, 0x08, 0x70, 0x61, 0x67, 0x65, 0x53, 0x69, 0x7a, 0x65, 0x22, 0x8d, 0x01, 0x0a, + 0x17, 0x51, 0x75, 0x65, 0x72, 0x79, 0x4f, 0x66, 0x66, 0x6c, 0x69, 0x6e, 0x65, 0x4d, 0x65, 0x73, + 0x73, 0x61, 0x67, 0x65, 0x52, 0x65, 0x73, 0x70, 0x12, 0x27, 0x0a, 0x05, 0x65, 0x72, 0x72, 0x6f, + 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x65, 0x72, + 0x72, 0x6f, 0x72, 0x73, 0x2e, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x52, 0x05, 0x65, 0x72, 0x72, 0x6f, + 0x72, 0x12, 0x14, 0x0a, 0x05, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x12, 0x33, 0x0a, 0x08, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x65, 0x73, 0x73, 0x61, @@ -1286,135 +1282,131 @@ var file_message_v1_message_proto_rawDesc = []byte{ 0x42, 0x07, 0xfa, 0x42, 0x04, 0x22, 0x02, 0x20, 0x00, 0x52, 0x03, 0x75, 0x69, 0x64, 0x12, 0x27, 0x0a, 0x0b, 0x6c, 0x61, 0x73, 0x74, 0x5f, 0x6d, 0x73, 0x67, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x22, 0x02, 0x20, 0x00, 0x52, 0x09, 0x6c, 0x61, - 0x73, 0x74, 0x4d, 0x73, 0x67, 0x49, 0x64, 0x22, 0x78, 0x0a, 0x14, 0x43, 0x6f, 0x6e, 0x66, 0x69, + 0x73, 0x74, 0x4d, 0x73, 0x67, 0x49, 0x64, 0x22, 0x5f, 0x0a, 0x14, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x72, 0x6d, 0x4c, 0x61, 0x73, 0x74, 0x4d, 0x73, 0x67, 0x49, 0x44, 0x52, 0x65, 0x73, 0x70, 0x12, - 0x40, 0x0a, 0x08, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x24, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, - 0x74, 0x2e, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x42, 0x61, 0x73, 0x65, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x52, 0x08, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x12, 0x1e, 0x0a, 0x0b, 0x6c, 0x61, 0x73, 0x74, 0x5f, 0x6d, 0x73, 0x67, 0x5f, 0x69, 0x64, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x6c, 0x61, 0x73, 0x74, 0x4d, 0x73, 0x67, 0x49, - 0x64, 0x22, 0xe5, 0x03, 0x0a, 0x0e, 0x53, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x4d, 0x65, 0x73, - 0x73, 0x61, 0x67, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x72, 0x6f, 0x77, 0x4b, 0x65, 0x79, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x72, 0x6f, 0x77, 0x4b, 0x65, 0x79, 0x12, 0x3a, 0x0a, 0x05, - 0x75, 0x73, 0x65, 0x72, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x61, 0x70, - 0x69, 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x74, 0x6f, - 0x72, 0x61, 0x67, 0x65, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x2e, 0x55, 0x73, 0x65, 0x72, - 0x73, 0x52, 0x05, 0x75, 0x73, 0x65, 0x72, 0x73, 0x12, 0x40, 0x0a, 0x07, 0x63, 0x6f, 0x6e, 0x74, - 0x65, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x61, 0x70, 0x69, 0x2e, - 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x74, 0x6f, 0x72, 0x61, - 0x67, 0x65, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x2e, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x6e, - 0x74, 0x52, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x12, 0x3a, 0x0a, 0x05, 0x65, 0x78, - 0x74, 0x72, 0x61, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x61, 0x70, 0x69, 0x2e, - 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x74, 0x6f, 0x72, 0x61, - 0x67, 0x65, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x2e, 0x45, 0x78, 0x74, 0x72, 0x61, 0x52, - 0x05, 0x65, 0x78, 0x74, 0x72, 0x61, 0x1a, 0x51, 0x0a, 0x05, 0x55, 0x73, 0x65, 0x72, 0x73, 0x12, - 0x16, 0x0a, 0x06, 0x66, 0x72, 0x6f, 0x6d, 0x49, 0x44, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, - 0x06, 0x66, 0x72, 0x6f, 0x6d, 0x49, 0x44, 0x12, 0x12, 0x0a, 0x04, 0x74, 0x6f, 0x49, 0x44, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x04, 0x74, 0x6f, 0x49, 0x44, 0x12, 0x1c, 0x0a, 0x09, 0x73, - 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x49, 0x44, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, - 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x49, 0x44, 0x1a, 0x69, 0x0a, 0x07, 0x43, 0x6f, 0x6e, - 0x74, 0x65, 0x6e, 0x74, 0x12, 0x44, 0x0a, 0x0b, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x54, - 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x22, 0x2e, 0x61, 0x70, 0x69, 0x2e, - 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x65, 0x73, 0x73, 0x61, - 0x67, 0x65, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x54, 0x79, 0x70, 0x65, 0x52, 0x0b, 0x63, - 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x54, 0x79, 0x70, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x63, 0x6f, - 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x63, 0x6f, 0x6e, - 0x74, 0x65, 0x6e, 0x74, 0x1a, 0x43, 0x0a, 0x05, 0x45, 0x78, 0x74, 0x72, 0x61, 0x12, 0x3a, 0x0a, - 0x0a, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x54, 0x69, 0x6d, 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, 0x0a, 0x63, - 0x72, 0x65, 0x61, 0x74, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x22, 0xbe, 0x01, 0x0a, 0x1d, 0x51, 0x75, - 0x65, 0x72, 0x79, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x48, 0x69, 0x73, 0x74, 0x6f, 0x72, - 0x79, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x52, 0x65, 0x71, 0x12, 0x19, 0x0a, 0x03, 0x75, - 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x22, 0x02, 0x20, - 0x00, 0x52, 0x03, 0x75, 0x69, 0x64, 0x12, 0x1d, 0x0a, 0x0a, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, - 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x73, 0x65, 0x73, 0x73, - 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x12, 0x27, 0x0a, 0x0b, 0x6c, 0x61, 0x73, 0x74, 0x5f, 0x6d, 0x73, - 0x67, 0x5f, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x22, - 0x02, 0x20, 0x00, 0x52, 0x09, 0x6c, 0x61, 0x73, 0x74, 0x4d, 0x73, 0x67, 0x49, 0x64, 0x12, 0x12, - 0x0a, 0x04, 0x70, 0x61, 0x67, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x05, 0x52, 0x04, 0x70, 0x61, - 0x67, 0x65, 0x12, 0x26, 0x0a, 0x09, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x18, - 0x05, 0x20, 0x01, 0x28, 0x05, 0x42, 0x09, 0xfa, 0x42, 0x06, 0x1a, 0x04, 0x18, 0x64, 0x28, 0x01, - 0x52, 0x08, 0x70, 0x61, 0x67, 0x65, 0x53, 0x69, 0x7a, 0x65, 0x22, 0xad, 0x01, 0x0a, 0x1e, 0x51, - 0x75, 0x65, 0x72, 0x79, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x48, 0x69, 0x73, 0x74, 0x6f, - 0x72, 0x79, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x52, 0x65, 0x73, 0x70, 0x12, 0x40, 0x0a, - 0x08, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x24, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x2e, - 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x42, 0x61, 0x73, 0x65, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x52, 0x08, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, - 0x14, 0x0a, 0x05, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, - 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x12, 0x33, 0x0a, 0x08, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, - 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x6d, 0x65, - 0x73, 0x73, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, - 0x52, 0x08, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x22, 0x97, 0x01, 0x0a, 0x15, 0x53, - 0x79, 0x6e, 0x63, 0x48, 0x69, 0x73, 0x74, 0x6f, 0x72, 0x79, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, - 0x65, 0x52, 0x65, 0x71, 0x12, 0x19, 0x0a, 0x03, 0x75, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x03, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x22, 0x02, 0x20, 0x00, 0x52, 0x03, 0x75, 0x69, 0x64, 0x12, - 0x27, 0x0a, 0x0b, 0x6c, 0x61, 0x73, 0x74, 0x5f, 0x6d, 0x73, 0x67, 0x5f, 0x69, 0x64, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x03, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x22, 0x02, 0x20, 0x00, 0x52, 0x09, 0x6c, - 0x61, 0x73, 0x74, 0x4d, 0x73, 0x67, 0x49, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x70, 0x61, 0x67, 0x65, - 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x04, 0x70, 0x61, 0x67, 0x65, 0x12, 0x26, 0x0a, 0x09, - 0x70, 0x61, 0x67, 0x65, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x05, 0x42, - 0x09, 0xfa, 0x42, 0x06, 0x1a, 0x04, 0x18, 0x64, 0x28, 0x01, 0x52, 0x08, 0x70, 0x61, 0x67, 0x65, - 0x53, 0x69, 0x7a, 0x65, 0x22, 0xa5, 0x01, 0x0a, 0x16, 0x53, 0x79, 0x6e, 0x63, 0x48, 0x69, 0x73, - 0x74, 0x6f, 0x72, 0x79, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x52, 0x65, 0x73, 0x70, 0x12, - 0x40, 0x0a, 0x08, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x24, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, - 0x74, 0x2e, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x42, 0x61, 0x73, 0x65, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x52, 0x08, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x12, 0x14, 0x0a, 0x05, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, - 0x52, 0x05, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x12, 0x33, 0x0a, 0x08, 0x6d, 0x65, 0x73, 0x73, 0x61, - 0x67, 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x61, 0x70, 0x69, 0x2e, - 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x65, 0x73, 0x73, 0x61, - 0x67, 0x65, 0x52, 0x08, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x2a, 0x34, 0x0a, 0x12, - 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x54, 0x79, - 0x70, 0x65, 0x12, 0x08, 0x0a, 0x04, 0x54, 0x65, 0x78, 0x74, 0x10, 0x00, 0x12, 0x09, 0x0a, 0x05, - 0x49, 0x6d, 0x61, 0x67, 0x65, 0x10, 0x01, 0x12, 0x09, 0x0a, 0x05, 0x56, 0x6f, 0x69, 0x63, 0x65, - 0x10, 0x02, 0x2a, 0x48, 0x0a, 0x0b, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x54, 0x79, 0x70, - 0x65, 0x12, 0x0e, 0x0a, 0x0a, 0x53, 0x69, 0x6e, 0x67, 0x6c, 0x65, 0x43, 0x68, 0x61, 0x74, 0x10, - 0x00, 0x12, 0x0d, 0x0a, 0x09, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x43, 0x68, 0x61, 0x74, 0x10, 0x01, - 0x12, 0x0d, 0x0a, 0x09, 0x42, 0x72, 0x6f, 0x61, 0x64, 0x63, 0x61, 0x73, 0x74, 0x10, 0x02, 0x12, - 0x0b, 0x0a, 0x07, 0x43, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x10, 0x03, 0x32, 0x64, 0x0a, 0x12, - 0x50, 0x75, 0x73, 0x68, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x53, 0x65, 0x72, 0x76, 0x69, - 0x63, 0x65, 0x12, 0x4e, 0x0a, 0x0b, 0x50, 0x75, 0x73, 0x68, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, - 0x65, 0x12, 0x1e, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x2e, - 0x76, 0x31, 0x2e, 0x50, 0x75, 0x73, 0x68, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x52, 0x65, - 0x71, 0x1a, 0x1f, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x2e, - 0x76, 0x31, 0x2e, 0x50, 0x75, 0x73, 0x68, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x52, 0x65, - 0x73, 0x70, 0x32, 0xde, 0x01, 0x0a, 0x15, 0x4f, 0x66, 0x66, 0x6c, 0x69, 0x6e, 0x65, 0x4d, 0x65, - 0x73, 0x73, 0x61, 0x67, 0x65, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x66, 0x0a, 0x13, - 0x51, 0x75, 0x65, 0x72, 0x79, 0x4f, 0x66, 0x66, 0x6c, 0x69, 0x6e, 0x65, 0x4d, 0x65, 0x73, 0x73, - 0x61, 0x67, 0x65, 0x12, 0x26, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, - 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x4f, 0x66, 0x66, 0x6c, 0x69, 0x6e, - 0x65, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x52, 0x65, 0x71, 0x1a, 0x27, 0x2e, 0x61, 0x70, - 0x69, 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, - 0x72, 0x79, 0x4f, 0x66, 0x66, 0x6c, 0x69, 0x6e, 0x65, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, - 0x52, 0x65, 0x73, 0x70, 0x12, 0x5d, 0x0a, 0x10, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x72, 0x6d, 0x4c, - 0x61, 0x73, 0x74, 0x4d, 0x73, 0x74, 0x49, 0x44, 0x12, 0x23, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x6d, - 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x72, - 0x6d, 0x4c, 0x61, 0x73, 0x74, 0x4d, 0x73, 0x67, 0x49, 0x44, 0x52, 0x65, 0x71, 0x1a, 0x24, 0x2e, + 0x27, 0x0a, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x11, + 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x73, 0x2e, 0x45, 0x72, 0x72, 0x6f, + 0x72, 0x52, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x12, 0x1e, 0x0a, 0x0b, 0x6c, 0x61, 0x73, 0x74, + 0x5f, 0x6d, 0x73, 0x67, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x6c, + 0x61, 0x73, 0x74, 0x4d, 0x73, 0x67, 0x49, 0x64, 0x22, 0xe5, 0x03, 0x0a, 0x0e, 0x53, 0x74, 0x6f, + 0x72, 0x61, 0x67, 0x65, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x72, + 0x6f, 0x77, 0x4b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x72, 0x6f, 0x77, + 0x4b, 0x65, 0x79, 0x12, 0x3a, 0x0a, 0x05, 0x75, 0x73, 0x65, 0x72, 0x73, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, + 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x4d, 0x65, 0x73, 0x73, 0x61, + 0x67, 0x65, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x73, 0x52, 0x05, 0x75, 0x73, 0x65, 0x72, 0x73, 0x12, + 0x40, 0x0a, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x26, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x2e, 0x76, + 0x31, 0x2e, 0x53, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, + 0x2e, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x52, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, + 0x74, 0x12, 0x3a, 0x0a, 0x05, 0x65, 0x78, 0x74, 0x72, 0x61, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x24, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x2e, 0x76, + 0x31, 0x2e, 0x53, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, + 0x2e, 0x45, 0x78, 0x74, 0x72, 0x61, 0x52, 0x05, 0x65, 0x78, 0x74, 0x72, 0x61, 0x1a, 0x51, 0x0a, + 0x05, 0x55, 0x73, 0x65, 0x72, 0x73, 0x12, 0x16, 0x0a, 0x06, 0x66, 0x72, 0x6f, 0x6d, 0x49, 0x44, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x06, 0x66, 0x72, 0x6f, 0x6d, 0x49, 0x44, 0x12, 0x12, + 0x0a, 0x04, 0x74, 0x6f, 0x49, 0x44, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x04, 0x74, 0x6f, + 0x49, 0x44, 0x12, 0x1c, 0x0a, 0x09, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x49, 0x44, 0x18, + 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x49, 0x44, + 0x1a, 0x69, 0x0a, 0x07, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x12, 0x44, 0x0a, 0x0b, 0x63, + 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x54, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, + 0x32, 0x22, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x2e, 0x76, + 0x31, 0x2e, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, + 0x54, 0x79, 0x70, 0x65, 0x52, 0x0b, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x54, 0x79, 0x70, + 0x65, 0x12, 0x18, 0x0a, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x1a, 0x43, 0x0a, 0x05, 0x45, + 0x78, 0x74, 0x72, 0x61, 0x12, 0x3a, 0x0a, 0x0a, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x54, 0x69, + 0x6d, 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, 0x0a, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x54, 0x69, 0x6d, 0x65, + 0x22, 0xbe, 0x01, 0x0a, 0x1d, 0x51, 0x75, 0x65, 0x72, 0x79, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, + 0x6e, 0x48, 0x69, 0x73, 0x74, 0x6f, 0x72, 0x79, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x52, + 0x65, 0x71, 0x12, 0x19, 0x0a, 0x03, 0x75, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x42, + 0x07, 0xfa, 0x42, 0x04, 0x22, 0x02, 0x20, 0x00, 0x52, 0x03, 0x75, 0x69, 0x64, 0x12, 0x1d, 0x0a, + 0x0a, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x09, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x12, 0x27, 0x0a, 0x0b, + 0x6c, 0x61, 0x73, 0x74, 0x5f, 0x6d, 0x73, 0x67, 0x5f, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, + 0x03, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x22, 0x02, 0x20, 0x00, 0x52, 0x09, 0x6c, 0x61, 0x73, 0x74, + 0x4d, 0x73, 0x67, 0x49, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x70, 0x61, 0x67, 0x65, 0x18, 0x04, 0x20, + 0x01, 0x28, 0x05, 0x52, 0x04, 0x70, 0x61, 0x67, 0x65, 0x12, 0x26, 0x0a, 0x09, 0x70, 0x61, 0x67, + 0x65, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x05, 0x42, 0x09, 0xfa, 0x42, + 0x06, 0x1a, 0x04, 0x18, 0x64, 0x28, 0x01, 0x52, 0x08, 0x70, 0x61, 0x67, 0x65, 0x53, 0x69, 0x7a, + 0x65, 0x22, 0x94, 0x01, 0x0a, 0x1e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x53, 0x65, 0x73, 0x73, 0x69, + 0x6f, 0x6e, 0x48, 0x69, 0x73, 0x74, 0x6f, 0x72, 0x79, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, + 0x52, 0x65, 0x73, 0x70, 0x12, 0x27, 0x0a, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x73, + 0x2e, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x52, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x12, 0x14, 0x0a, + 0x05, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x74, 0x6f, + 0x74, 0x61, 0x6c, 0x12, 0x33, 0x0a, 0x08, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x18, + 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x6d, 0x65, 0x73, 0x73, + 0x61, 0x67, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x52, 0x08, + 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x22, 0x97, 0x01, 0x0a, 0x15, 0x53, 0x79, 0x6e, + 0x63, 0x48, 0x69, 0x73, 0x74, 0x6f, 0x72, 0x79, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x52, + 0x65, 0x71, 0x12, 0x19, 0x0a, 0x03, 0x75, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x42, + 0x07, 0xfa, 0x42, 0x04, 0x22, 0x02, 0x20, 0x00, 0x52, 0x03, 0x75, 0x69, 0x64, 0x12, 0x27, 0x0a, + 0x0b, 0x6c, 0x61, 0x73, 0x74, 0x5f, 0x6d, 0x73, 0x67, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x03, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x22, 0x02, 0x20, 0x00, 0x52, 0x09, 0x6c, 0x61, 0x73, + 0x74, 0x4d, 0x73, 0x67, 0x49, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x70, 0x61, 0x67, 0x65, 0x18, 0x03, + 0x20, 0x01, 0x28, 0x05, 0x52, 0x04, 0x70, 0x61, 0x67, 0x65, 0x12, 0x26, 0x0a, 0x09, 0x70, 0x61, + 0x67, 0x65, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x05, 0x42, 0x09, 0xfa, + 0x42, 0x06, 0x1a, 0x04, 0x18, 0x64, 0x28, 0x01, 0x52, 0x08, 0x70, 0x61, 0x67, 0x65, 0x53, 0x69, + 0x7a, 0x65, 0x22, 0x8c, 0x01, 0x0a, 0x16, 0x53, 0x79, 0x6e, 0x63, 0x48, 0x69, 0x73, 0x74, 0x6f, + 0x72, 0x79, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x52, 0x65, 0x73, 0x70, 0x12, 0x27, 0x0a, + 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x61, + 0x70, 0x69, 0x2e, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x73, 0x2e, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x52, + 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x12, 0x14, 0x0a, 0x05, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x12, 0x33, 0x0a, 0x08, + 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x17, + 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x31, 0x2e, + 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x52, 0x08, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, + 0x73, 0x2a, 0x34, 0x0a, 0x12, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x43, 0x6f, 0x6e, 0x74, + 0x65, 0x6e, 0x74, 0x54, 0x79, 0x70, 0x65, 0x12, 0x08, 0x0a, 0x04, 0x54, 0x65, 0x78, 0x74, 0x10, + 0x00, 0x12, 0x09, 0x0a, 0x05, 0x49, 0x6d, 0x61, 0x67, 0x65, 0x10, 0x01, 0x12, 0x09, 0x0a, 0x05, + 0x56, 0x6f, 0x69, 0x63, 0x65, 0x10, 0x02, 0x2a, 0x48, 0x0a, 0x0b, 0x53, 0x65, 0x73, 0x73, 0x69, + 0x6f, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x12, 0x0e, 0x0a, 0x0a, 0x53, 0x69, 0x6e, 0x67, 0x6c, 0x65, + 0x43, 0x68, 0x61, 0x74, 0x10, 0x00, 0x12, 0x0d, 0x0a, 0x09, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x43, + 0x68, 0x61, 0x74, 0x10, 0x01, 0x12, 0x0d, 0x0a, 0x09, 0x42, 0x72, 0x6f, 0x61, 0x64, 0x63, 0x61, + 0x73, 0x74, 0x10, 0x02, 0x12, 0x0b, 0x0a, 0x07, 0x43, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x10, + 0x03, 0x32, 0x64, 0x0a, 0x12, 0x50, 0x75, 0x73, 0x68, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, + 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x4e, 0x0a, 0x0b, 0x50, 0x75, 0x73, 0x68, 0x4d, + 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x1e, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x6d, 0x65, 0x73, + 0x73, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x75, 0x73, 0x68, 0x4d, 0x65, 0x73, 0x73, + 0x61, 0x67, 0x65, 0x52, 0x65, 0x71, 0x1a, 0x1f, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x6d, 0x65, 0x73, + 0x73, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x75, 0x73, 0x68, 0x4d, 0x65, 0x73, 0x73, + 0x61, 0x67, 0x65, 0x52, 0x65, 0x73, 0x70, 0x32, 0xde, 0x01, 0x0a, 0x15, 0x4f, 0x66, 0x66, 0x6c, + 0x69, 0x6e, 0x65, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, + 0x65, 0x12, 0x66, 0x0a, 0x13, 0x51, 0x75, 0x65, 0x72, 0x79, 0x4f, 0x66, 0x66, 0x6c, 0x69, 0x6e, + 0x65, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x26, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x6d, + 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x4f, + 0x66, 0x66, 0x6c, 0x69, 0x6e, 0x65, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x52, 0x65, 0x71, + 0x1a, 0x27, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x2e, 0x76, + 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x4f, 0x66, 0x66, 0x6c, 0x69, 0x6e, 0x65, 0x4d, 0x65, + 0x73, 0x73, 0x61, 0x67, 0x65, 0x52, 0x65, 0x73, 0x70, 0x12, 0x5d, 0x0a, 0x10, 0x43, 0x6f, 0x6e, + 0x66, 0x69, 0x72, 0x6d, 0x4c, 0x61, 0x73, 0x74, 0x4d, 0x73, 0x74, 0x49, 0x44, 0x12, 0x23, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x72, 0x6d, 0x4c, 0x61, 0x73, 0x74, 0x4d, 0x73, 0x67, 0x49, 0x44, 0x52, - 0x65, 0x73, 0x70, 0x32, 0xf9, 0x01, 0x0a, 0x15, 0x48, 0x69, 0x73, 0x74, 0x6f, 0x72, 0x79, 0x4d, - 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x7b, 0x0a, - 0x1a, 0x51, 0x75, 0x65, 0x72, 0x79, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x48, 0x69, 0x73, - 0x74, 0x6f, 0x72, 0x79, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x2d, 0x2e, 0x61, 0x70, - 0x69, 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, - 0x72, 0x79, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x48, 0x69, 0x73, 0x74, 0x6f, 0x72, 0x79, - 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x52, 0x65, 0x71, 0x1a, 0x2e, 0x2e, 0x61, 0x70, 0x69, - 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, - 0x79, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x48, 0x69, 0x73, 0x74, 0x6f, 0x72, 0x79, 0x4d, - 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x52, 0x65, 0x73, 0x70, 0x12, 0x63, 0x0a, 0x12, 0x53, 0x79, + 0x65, 0x71, 0x1a, 0x24, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, + 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x72, 0x6d, 0x4c, 0x61, 0x73, 0x74, 0x4d, + 0x73, 0x67, 0x49, 0x44, 0x52, 0x65, 0x73, 0x70, 0x32, 0xf9, 0x01, 0x0a, 0x15, 0x48, 0x69, 0x73, + 0x74, 0x6f, 0x72, 0x79, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x53, 0x65, 0x72, 0x76, 0x69, + 0x63, 0x65, 0x12, 0x7b, 0x0a, 0x1a, 0x51, 0x75, 0x65, 0x72, 0x79, 0x53, 0x65, 0x73, 0x73, 0x69, + 0x6f, 0x6e, 0x48, 0x69, 0x73, 0x74, 0x6f, 0x72, 0x79, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, + 0x12, 0x2d, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x2e, 0x76, + 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x48, 0x69, + 0x73, 0x74, 0x6f, 0x72, 0x79, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x52, 0x65, 0x71, 0x1a, + 0x2e, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x31, + 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x48, 0x69, 0x73, + 0x74, 0x6f, 0x72, 0x79, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x52, 0x65, 0x73, 0x70, 0x12, + 0x63, 0x0a, 0x12, 0x53, 0x79, 0x6e, 0x63, 0x48, 0x69, 0x73, 0x74, 0x6f, 0x72, 0x79, 0x4d, 0x65, + 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x25, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x6d, 0x65, 0x73, 0x73, + 0x61, 0x67, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x79, 0x6e, 0x63, 0x48, 0x69, 0x73, 0x74, 0x6f, + 0x72, 0x79, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x52, 0x65, 0x71, 0x1a, 0x26, 0x2e, 0x61, + 0x70, 0x69, 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x79, 0x6e, 0x63, 0x48, 0x69, 0x73, 0x74, 0x6f, 0x72, 0x79, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, - 0x12, 0x25, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x2e, 0x76, - 0x31, 0x2e, 0x53, 0x79, 0x6e, 0x63, 0x48, 0x69, 0x73, 0x74, 0x6f, 0x72, 0x79, 0x4d, 0x65, 0x73, - 0x73, 0x61, 0x67, 0x65, 0x52, 0x65, 0x71, 0x1a, 0x26, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x6d, 0x65, - 0x73, 0x73, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x79, 0x6e, 0x63, 0x48, 0x69, 0x73, - 0x74, 0x6f, 0x72, 0x79, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x52, 0x65, 0x73, 0x70, 0x42, - 0x23, 0x5a, 0x21, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x67, 0x6f, - 0x2d, 0x67, 0x6f, 0x69, 0x6d, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, - 0x65, 0x2f, 0x76, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x52, 0x65, 0x73, 0x70, 0x42, 0x23, 0x5a, 0x21, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, + 0x6f, 0x6d, 0x2f, 0x67, 0x6f, 0x2d, 0x67, 0x6f, 0x69, 0x6d, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x6d, + 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x2f, 0x76, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x33, } var ( @@ -1450,7 +1442,7 @@ var file_message_v1_message_proto_goTypes = []interface{}{ (*StorageMessage_Users)(nil), // 15: api.message.v1.StorageMessage.Users (*StorageMessage_Content)(nil), // 16: api.message.v1.StorageMessage.Content (*StorageMessage_Extra)(nil), // 17: api.message.v1.StorageMessage.Extra - (*response.BaseResponse)(nil), // 18: api.transport.response.BaseResponse + (*errors.Error)(nil), // 18: api.errors.Error (*timestamppb.Timestamp)(nil), // 19: google.protobuf.Timestamp } var file_message_v1_message_proto_depIdxs = []int32{ @@ -1459,16 +1451,16 @@ var file_message_v1_message_proto_depIdxs = []int32{ 1, // 2: api.message.v1.Message.session_type:type_name -> api.message.v1.SessionType 0, // 3: api.message.v1.Message.content_type:type_name -> api.message.v1.MessageContentType 3, // 4: api.message.v1.PushMessageReq.message:type_name -> api.message.v1.Message - 18, // 5: api.message.v1.PushMessageResp.response:type_name -> api.transport.response.BaseResponse - 18, // 6: api.message.v1.QueryOfflineMessageResp.response:type_name -> api.transport.response.BaseResponse + 18, // 5: api.message.v1.PushMessageResp.error:type_name -> api.errors.Error + 18, // 6: api.message.v1.QueryOfflineMessageResp.error:type_name -> api.errors.Error 3, // 7: api.message.v1.QueryOfflineMessageResp.messages:type_name -> api.message.v1.Message - 18, // 8: api.message.v1.ConfirmLastMsgIDResp.response:type_name -> api.transport.response.BaseResponse + 18, // 8: api.message.v1.ConfirmLastMsgIDResp.error:type_name -> api.errors.Error 15, // 9: api.message.v1.StorageMessage.users:type_name -> api.message.v1.StorageMessage.Users 16, // 10: api.message.v1.StorageMessage.content:type_name -> api.message.v1.StorageMessage.Content 17, // 11: api.message.v1.StorageMessage.extra:type_name -> api.message.v1.StorageMessage.Extra - 18, // 12: api.message.v1.QuerySessionHistoryMessageResp.response:type_name -> api.transport.response.BaseResponse + 18, // 12: api.message.v1.QuerySessionHistoryMessageResp.error:type_name -> api.errors.Error 3, // 13: api.message.v1.QuerySessionHistoryMessageResp.messages:type_name -> api.message.v1.Message - 18, // 14: api.message.v1.SyncHistoryMessageResp.response:type_name -> api.transport.response.BaseResponse + 18, // 14: api.message.v1.SyncHistoryMessageResp.error:type_name -> api.errors.Error 3, // 15: api.message.v1.SyncHistoryMessageResp.messages:type_name -> api.message.v1.Message 0, // 16: api.message.v1.StorageMessage.Content.contentType:type_name -> api.message.v1.MessageContentType 19, // 17: api.message.v1.StorageMessage.Extra.createTime:type_name -> google.protobuf.Timestamp diff --git a/message/v1/message.pb.validate.go b/message/v1/message.pb.validate.go index df347e9..0082ce8 100644 --- a/message/v1/message.pb.validate.go +++ b/message/v1/message.pb.validate.go @@ -451,11 +451,11 @@ func (m *PushMessageResp) validate(all bool) error { var errors []error if all { - switch v := interface{}(m.GetResponse()).(type) { + switch v := interface{}(m.GetError()).(type) { case interface{ ValidateAll() error }: if err := v.ValidateAll(); err != nil { errors = append(errors, PushMessageRespValidationError{ - field: "Response", + field: "Error", reason: "embedded message failed validation", cause: err, }) @@ -463,16 +463,16 @@ func (m *PushMessageResp) validate(all bool) error { case interface{ Validate() error }: if err := v.Validate(); err != nil { errors = append(errors, PushMessageRespValidationError{ - field: "Response", + field: "Error", reason: "embedded message failed validation", cause: err, }) } } - } else if v, ok := interface{}(m.GetResponse()).(interface{ Validate() error }); ok { + } else if v, ok := interface{}(m.GetError()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return PushMessageRespValidationError{ - field: "Response", + field: "Error", reason: "embedded message failed validation", cause: err, } @@ -719,11 +719,11 @@ func (m *QueryOfflineMessageResp) validate(all bool) error { var errors []error if all { - switch v := interface{}(m.GetResponse()).(type) { + switch v := interface{}(m.GetError()).(type) { case interface{ ValidateAll() error }: if err := v.ValidateAll(); err != nil { errors = append(errors, QueryOfflineMessageRespValidationError{ - field: "Response", + field: "Error", reason: "embedded message failed validation", cause: err, }) @@ -731,16 +731,16 @@ func (m *QueryOfflineMessageResp) validate(all bool) error { case interface{ Validate() error }: if err := v.Validate(); err != nil { errors = append(errors, QueryOfflineMessageRespValidationError{ - field: "Response", + field: "Error", reason: "embedded message failed validation", cause: err, }) } } - } else if v, ok := interface{}(m.GetResponse()).(interface{ Validate() error }); ok { + } else if v, ok := interface{}(m.GetError()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return QueryOfflineMessageRespValidationError{ - field: "Response", + field: "Error", reason: "embedded message failed validation", cause: err, } @@ -1010,11 +1010,11 @@ func (m *ConfirmLastMsgIDResp) validate(all bool) error { var errors []error if all { - switch v := interface{}(m.GetResponse()).(type) { + switch v := interface{}(m.GetError()).(type) { case interface{ ValidateAll() error }: if err := v.ValidateAll(); err != nil { errors = append(errors, ConfirmLastMsgIDRespValidationError{ - field: "Response", + field: "Error", reason: "embedded message failed validation", cause: err, }) @@ -1022,16 +1022,16 @@ func (m *ConfirmLastMsgIDResp) validate(all bool) error { case interface{ Validate() error }: if err := v.Validate(); err != nil { errors = append(errors, ConfirmLastMsgIDRespValidationError{ - field: "Response", + field: "Error", reason: "embedded message failed validation", cause: err, }) } } - } else if v, ok := interface{}(m.GetResponse()).(interface{ Validate() error }); ok { + } else if v, ok := interface{}(m.GetError()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return ConfirmLastMsgIDRespValidationError{ - field: "Response", + field: "Error", reason: "embedded message failed validation", cause: err, } @@ -1472,11 +1472,11 @@ func (m *QuerySessionHistoryMessageResp) validate(all bool) error { var errors []error if all { - switch v := interface{}(m.GetResponse()).(type) { + switch v := interface{}(m.GetError()).(type) { case interface{ ValidateAll() error }: if err := v.ValidateAll(); err != nil { errors = append(errors, QuerySessionHistoryMessageRespValidationError{ - field: "Response", + field: "Error", reason: "embedded message failed validation", cause: err, }) @@ -1484,16 +1484,16 @@ func (m *QuerySessionHistoryMessageResp) validate(all bool) error { case interface{ Validate() error }: if err := v.Validate(); err != nil { errors = append(errors, QuerySessionHistoryMessageRespValidationError{ - field: "Response", + field: "Error", reason: "embedded message failed validation", cause: err, }) } } - } else if v, ok := interface{}(m.GetResponse()).(interface{ Validate() error }); ok { + } else if v, ok := interface{}(m.GetError()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return QuerySessionHistoryMessageRespValidationError{ - field: "Response", + field: "Error", reason: "embedded message failed validation", cause: err, } @@ -1777,11 +1777,11 @@ func (m *SyncHistoryMessageResp) validate(all bool) error { var errors []error if all { - switch v := interface{}(m.GetResponse()).(type) { + switch v := interface{}(m.GetError()).(type) { case interface{ ValidateAll() error }: if err := v.ValidateAll(); err != nil { errors = append(errors, SyncHistoryMessageRespValidationError{ - field: "Response", + field: "Error", reason: "embedded message failed validation", cause: err, }) @@ -1789,16 +1789,16 @@ func (m *SyncHistoryMessageResp) validate(all bool) error { case interface{ Validate() error }: if err := v.Validate(); err != nil { errors = append(errors, SyncHistoryMessageRespValidationError{ - field: "Response", + field: "Error", reason: "embedded message failed validation", cause: err, }) } } - } else if v, ok := interface{}(m.GetResponse()).(interface{ Validate() error }); ok { + } else if v, ok := interface{}(m.GetError()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return SyncHistoryMessageRespValidationError{ - field: "Response", + field: "Error", reason: "embedded message failed validation", cause: err, } diff --git a/message/v1/message.proto b/message/v1/message.proto index 9e78c83..f3a60cd 100644 --- a/message/v1/message.proto +++ b/message/v1/message.proto @@ -3,7 +3,7 @@ syntax = "proto3"; package api.message.v1; import "google/protobuf/timestamp.proto"; -import "transport/response/response.proto"; +import "errors/errors.proto"; import "validate/validate.proto"; option go_package = "github.com/go-goim/api/message/v1"; @@ -58,7 +58,7 @@ message PushMessageReq { } message PushMessageResp { - transport.response.BaseResponse response = 1; + errors.Error error = 1; repeated int64 failed_users = 2; } @@ -78,7 +78,7 @@ message QueryOfflineMessageReq { } message QueryOfflineMessageResp { - transport.response.BaseResponse response = 1; + errors.Error error = 1; int32 total = 2; repeated Message messages = 3; } @@ -89,7 +89,7 @@ message ConfirmLastMsgIDReq { } message ConfirmLastMsgIDResp { - transport.response.BaseResponse response = 1; + errors.Error error = 1; int64 last_msg_id = 2; } @@ -132,7 +132,7 @@ message QuerySessionHistoryMessageReq { } message QuerySessionHistoryMessageResp { - transport.response.BaseResponse response = 1; + errors.Error error = 1; int32 total = 2; repeated Message messages = 3; } @@ -149,7 +149,7 @@ message SyncHistoryMessageReq { } message SyncHistoryMessageResp { - transport.response.BaseResponse response = 1; + errors.Error error = 1; int32 total = 2; repeated Message messages = 3; } diff --git a/transport/response/response.ext.go b/transport/response/response.ext.go deleted file mode 100644 index 71dee21..0000000 --- a/transport/response/response.ext.go +++ /dev/null @@ -1,70 +0,0 @@ -// Code Written Manually - -package response - -import ( - "fmt" -) - -/* - * Define BaseResponse - */ - -var _ error = &BaseResponse{} - -func NewBaseResponse(code Code) *BaseResponse { - return &BaseResponse{ - Code: code, - Reason: code.String(), - } -} - -func NewBaseResponseWithMessage(code Code, msg string) *BaseResponse { - return &BaseResponse{ - Code: code, - Reason: code.String(), - Message: msg, - } -} - -func NewBaseResponseWithError(err error) *BaseResponse { - // check err is BaseResponse - if br, ok := err.(*BaseResponse); ok { - return br - } - - return &BaseResponse{ - Code: Code_InternalError, - Reason: Code_InternalError.String(), - Message: err.Error(), - } -} - -func (x *BaseResponse) Error() string { - return fmt.Sprintf("Code: %d, Reason: %s, Message: %s", x.Code, x.Reason, x.Message) -} - -func (x *BaseResponse) Success() bool { - return x.Code == Code_OK -} - -func (x *BaseResponse) SetMessage(msg string) *BaseResponse { - x.Message = msg - return x -} - -/* - * Code - */ - -func (x Code) BaseResponse() *BaseResponse { - return NewBaseResponse(x) -} - -func (x Code) BaseResponseWithMessage(msg string) *BaseResponse { - return NewBaseResponseWithMessage(x, msg) -} - -func (x Code) BaseResponseWithError(err error) *BaseResponse { - return NewBaseResponseWithMessage(x, err.Error()) -} diff --git a/transport/response/response.pb.go b/transport/response/response.pb.go deleted file mode 100644 index a21b093..0000000 --- a/transport/response/response.pb.go +++ /dev/null @@ -1,301 +0,0 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.26.0 -// protoc (unknown) -// source: transport/response/response.proto - -package response - -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 Code int32 - -const ( - Code_OK Code = 0 - // common error codes - Code_InternalError Code = 10001 - Code_InvalidParams Code = 10002 - Code_DBError Code = 10003 - Code_CacheError Code = 10004 - // user error codes - Code_UserNotExist Code = 20001 - Code_UserExist Code = 20002 - Code_InvalidUsernameOrPassword Code = 20003 - // relation error codes - Code_RelationNotExist Code = 30001 - Code_RelationExist Code = 30002 - Code_InvalidUpdateRelationAction Code = 30003 - // friend request error codes - Code_FriendRequestNotExist Code = 31001 - Code_FriendRequestStatusError Code = 31002 - // push server error codes - Code_UserNotOnline Code = 40001 - // group error codes - Code_GroupNotExist Code = 50001 - Code_GroupExist Code = 50002 - Code_NotGroupMember Code = 50003 - Code_NotGroupOwner Code = 50004 - Code_GroupLimitExceed Code = 50005 -) - -// Enum value maps for Code. -var ( - Code_name = map[int32]string{ - 0: "OK", - 10001: "InternalError", - 10002: "InvalidParams", - 10003: "DBError", - 10004: "CacheError", - 20001: "UserNotExist", - 20002: "UserExist", - 20003: "InvalidUsernameOrPassword", - 30001: "RelationNotExist", - 30002: "RelationExist", - 30003: "InvalidUpdateRelationAction", - 31001: "FriendRequestNotExist", - 31002: "FriendRequestStatusError", - 40001: "UserNotOnline", - 50001: "GroupNotExist", - 50002: "GroupExist", - 50003: "NotGroupMember", - 50004: "NotGroupOwner", - 50005: "GroupLimitExceed", - } - Code_value = map[string]int32{ - "OK": 0, - "InternalError": 10001, - "InvalidParams": 10002, - "DBError": 10003, - "CacheError": 10004, - "UserNotExist": 20001, - "UserExist": 20002, - "InvalidUsernameOrPassword": 20003, - "RelationNotExist": 30001, - "RelationExist": 30002, - "InvalidUpdateRelationAction": 30003, - "FriendRequestNotExist": 31001, - "FriendRequestStatusError": 31002, - "UserNotOnline": 40001, - "GroupNotExist": 50001, - "GroupExist": 50002, - "NotGroupMember": 50003, - "NotGroupOwner": 50004, - "GroupLimitExceed": 50005, - } -) - -func (x Code) Enum() *Code { - p := new(Code) - *p = x - return p -} - -func (x Code) String() string { - return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) -} - -func (Code) Descriptor() protoreflect.EnumDescriptor { - return file_transport_response_response_proto_enumTypes[0].Descriptor() -} - -func (Code) Type() protoreflect.EnumType { - return &file_transport_response_response_proto_enumTypes[0] -} - -func (x Code) Number() protoreflect.EnumNumber { - return protoreflect.EnumNumber(x) -} - -// Deprecated: Use Code.Descriptor instead. -func (Code) EnumDescriptor() ([]byte, []int) { - return file_transport_response_response_proto_rawDescGZIP(), []int{0} -} - -// BaseResponse use as define response code and message -type BaseResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Code Code `protobuf:"varint,1,opt,name=code,proto3,enum=api.transport.response.Code" json:"code,omitempty"` - Reason string `protobuf:"bytes,2,opt,name=reason,proto3" json:"reason,omitempty"` - Message string `protobuf:"bytes,3,opt,name=message,proto3" json:"message,omitempty"` -} - -func (x *BaseResponse) Reset() { - *x = BaseResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_transport_response_response_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *BaseResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*BaseResponse) ProtoMessage() {} - -func (x *BaseResponse) ProtoReflect() protoreflect.Message { - mi := &file_transport_response_response_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 BaseResponse.ProtoReflect.Descriptor instead. -func (*BaseResponse) Descriptor() ([]byte, []int) { - return file_transport_response_response_proto_rawDescGZIP(), []int{0} -} - -func (x *BaseResponse) GetCode() Code { - if x != nil { - return x.Code - } - return Code_OK -} - -func (x *BaseResponse) GetReason() string { - if x != nil { - return x.Reason - } - return "" -} - -func (x *BaseResponse) GetMessage() string { - if x != nil { - return x.Message - } - return "" -} - -var File_transport_response_response_proto protoreflect.FileDescriptor - -var file_transport_response_response_proto_rawDesc = []byte{ - 0x0a, 0x21, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x2f, 0x72, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x2f, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x12, 0x16, 0x61, 0x70, 0x69, 0x2e, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, - 0x72, 0x74, 0x2e, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x72, 0x0a, 0x0c, 0x42, - 0x61, 0x73, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x30, 0x0a, 0x04, 0x63, - 0x6f, 0x64, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1c, 0x2e, 0x61, 0x70, 0x69, 0x2e, - 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x2e, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x2e, 0x43, 0x6f, 0x64, 0x65, 0x52, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x12, 0x16, 0x0a, - 0x06, 0x72, 0x65, 0x61, 0x73, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x72, - 0x65, 0x61, 0x73, 0x6f, 0x6e, 0x12, 0x18, 0x0a, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, - 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x2a, - 0xa7, 0x03, 0x0a, 0x04, 0x43, 0x6f, 0x64, 0x65, 0x12, 0x06, 0x0a, 0x02, 0x4f, 0x4b, 0x10, 0x00, - 0x12, 0x12, 0x0a, 0x0d, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x45, 0x72, 0x72, 0x6f, - 0x72, 0x10, 0x91, 0x4e, 0x12, 0x12, 0x0a, 0x0d, 0x49, 0x6e, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x50, - 0x61, 0x72, 0x61, 0x6d, 0x73, 0x10, 0x92, 0x4e, 0x12, 0x0c, 0x0a, 0x07, 0x44, 0x42, 0x45, 0x72, - 0x72, 0x6f, 0x72, 0x10, 0x93, 0x4e, 0x12, 0x0f, 0x0a, 0x0a, 0x43, 0x61, 0x63, 0x68, 0x65, 0x45, - 0x72, 0x72, 0x6f, 0x72, 0x10, 0x94, 0x4e, 0x12, 0x12, 0x0a, 0x0c, 0x55, 0x73, 0x65, 0x72, 0x4e, - 0x6f, 0x74, 0x45, 0x78, 0x69, 0x73, 0x74, 0x10, 0xa1, 0x9c, 0x01, 0x12, 0x0f, 0x0a, 0x09, 0x55, - 0x73, 0x65, 0x72, 0x45, 0x78, 0x69, 0x73, 0x74, 0x10, 0xa2, 0x9c, 0x01, 0x12, 0x1f, 0x0a, 0x19, - 0x49, 0x6e, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x55, 0x73, 0x65, 0x72, 0x6e, 0x61, 0x6d, 0x65, 0x4f, - 0x72, 0x50, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x10, 0xa3, 0x9c, 0x01, 0x12, 0x16, 0x0a, - 0x10, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4e, 0x6f, 0x74, 0x45, 0x78, 0x69, 0x73, - 0x74, 0x10, 0xb1, 0xea, 0x01, 0x12, 0x13, 0x0a, 0x0d, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x45, 0x78, 0x69, 0x73, 0x74, 0x10, 0xb2, 0xea, 0x01, 0x12, 0x21, 0x0a, 0x1b, 0x49, 0x6e, - 0x76, 0x61, 0x6c, 0x69, 0x64, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x52, 0x65, 0x6c, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x10, 0xb3, 0xea, 0x01, 0x12, 0x1b, 0x0a, - 0x15, 0x46, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x4e, 0x6f, - 0x74, 0x45, 0x78, 0x69, 0x73, 0x74, 0x10, 0x99, 0xf2, 0x01, 0x12, 0x1e, 0x0a, 0x18, 0x46, 0x72, - 0x69, 0x65, 0x6e, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x53, 0x74, 0x61, 0x74, 0x75, - 0x73, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x10, 0x9a, 0xf2, 0x01, 0x12, 0x13, 0x0a, 0x0d, 0x55, 0x73, - 0x65, 0x72, 0x4e, 0x6f, 0x74, 0x4f, 0x6e, 0x6c, 0x69, 0x6e, 0x65, 0x10, 0xc1, 0xb8, 0x02, 0x12, - 0x13, 0x0a, 0x0d, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x4e, 0x6f, 0x74, 0x45, 0x78, 0x69, 0x73, 0x74, - 0x10, 0xd1, 0x86, 0x03, 0x12, 0x10, 0x0a, 0x0a, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x45, 0x78, 0x69, - 0x73, 0x74, 0x10, 0xd2, 0x86, 0x03, 0x12, 0x14, 0x0a, 0x0e, 0x4e, 0x6f, 0x74, 0x47, 0x72, 0x6f, - 0x75, 0x70, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x10, 0xd3, 0x86, 0x03, 0x12, 0x13, 0x0a, 0x0d, - 0x4e, 0x6f, 0x74, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x4f, 0x77, 0x6e, 0x65, 0x72, 0x10, 0xd4, 0x86, - 0x03, 0x12, 0x16, 0x0a, 0x10, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x45, - 0x78, 0x63, 0x65, 0x65, 0x64, 0x10, 0xd5, 0x86, 0x03, 0x42, 0x2b, 0x5a, 0x29, 0x67, 0x69, 0x74, - 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x67, 0x6f, 0x2d, 0x67, 0x6f, 0x69, 0x6d, 0x2f, - 0x61, 0x70, 0x69, 0x2f, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x2f, 0x72, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} - -var ( - file_transport_response_response_proto_rawDescOnce sync.Once - file_transport_response_response_proto_rawDescData = file_transport_response_response_proto_rawDesc -) - -func file_transport_response_response_proto_rawDescGZIP() []byte { - file_transport_response_response_proto_rawDescOnce.Do(func() { - file_transport_response_response_proto_rawDescData = protoimpl.X.CompressGZIP(file_transport_response_response_proto_rawDescData) - }) - return file_transport_response_response_proto_rawDescData -} - -var file_transport_response_response_proto_enumTypes = make([]protoimpl.EnumInfo, 1) -var file_transport_response_response_proto_msgTypes = make([]protoimpl.MessageInfo, 1) -var file_transport_response_response_proto_goTypes = []interface{}{ - (Code)(0), // 0: api.transport.response.Code - (*BaseResponse)(nil), // 1: api.transport.response.BaseResponse -} -var file_transport_response_response_proto_depIdxs = []int32{ - 0, // 0: api.transport.response.BaseResponse.code:type_name -> api.transport.response.Code - 1, // [1:1] is the sub-list for method output_type - 1, // [1:1] 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_transport_response_response_proto_init() } -func file_transport_response_response_proto_init() { - if File_transport_response_response_proto != nil { - return - } - if !protoimpl.UnsafeEnabled { - file_transport_response_response_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*BaseResponse); 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_transport_response_response_proto_rawDesc, - NumEnums: 1, - NumMessages: 1, - NumExtensions: 0, - NumServices: 0, - }, - GoTypes: file_transport_response_response_proto_goTypes, - DependencyIndexes: file_transport_response_response_proto_depIdxs, - EnumInfos: file_transport_response_response_proto_enumTypes, - MessageInfos: file_transport_response_response_proto_msgTypes, - }.Build() - File_transport_response_response_proto = out.File - file_transport_response_response_proto_rawDesc = nil - file_transport_response_response_proto_goTypes = nil - file_transport_response_response_proto_depIdxs = nil -} diff --git a/transport/response/response.pb.validate.go b/transport/response/response.pb.validate.go deleted file mode 100644 index 0810e92..0000000 --- a/transport/response/response.pb.validate.go +++ /dev/null @@ -1,141 +0,0 @@ -// Code generated by protoc-gen-validate. DO NOT EDIT. -// source: transport/response/response.proto - -package response - -import ( - "bytes" - "errors" - "fmt" - "net" - "net/mail" - "net/url" - "regexp" - "sort" - "strings" - "time" - "unicode/utf8" - - "google.golang.org/protobuf/types/known/anypb" -) - -// ensure the imports are used -var ( - _ = bytes.MinRead - _ = errors.New("") - _ = fmt.Print - _ = utf8.UTFMax - _ = (*regexp.Regexp)(nil) - _ = (*strings.Reader)(nil) - _ = net.IPv4len - _ = time.Duration(0) - _ = (*url.URL)(nil) - _ = (*mail.Address)(nil) - _ = anypb.Any{} - _ = sort.Sort -) - -// Validate checks the field values on BaseResponse with the rules defined in -// the proto definition for this message. If any rules are violated, the first -// error encountered is returned, or nil if there are no violations. -func (m *BaseResponse) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on BaseResponse with the rules defined -// in the proto definition for this message. If any rules are violated, the -// result is a list of violation errors wrapped in BaseResponseMultiError, or -// nil if none found. -func (m *BaseResponse) ValidateAll() error { - return m.validate(true) -} - -func (m *BaseResponse) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - // no validation rules for Code - - // no validation rules for Reason - - // no validation rules for Message - - if len(errors) > 0 { - return BaseResponseMultiError(errors) - } - - return nil -} - -// BaseResponseMultiError is an error wrapping multiple validation errors -// returned by BaseResponse.ValidateAll() if the designated constraints aren't met. -type BaseResponseMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m BaseResponseMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m BaseResponseMultiError) AllErrors() []error { return m } - -// BaseResponseValidationError is the validation error returned by -// BaseResponse.Validate if the designated constraints aren't met. -type BaseResponseValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e BaseResponseValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e BaseResponseValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e BaseResponseValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e BaseResponseValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e BaseResponseValidationError) ErrorName() string { return "BaseResponseValidationError" } - -// Error satisfies the builtin error interface -func (e BaseResponseValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sBaseResponse.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = BaseResponseValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = BaseResponseValidationError{} diff --git a/user/friend/v1/friend.pb.go b/user/friend/v1/friend.pb.go index 3b6fbb8..1c3fe2e 100644 --- a/user/friend/v1/friend.pb.go +++ b/user/friend/v1/friend.pb.go @@ -8,8 +8,8 @@ package v1 import ( _ "github.com/envoyproxy/protoc-gen-validate/validate" + errors "github.com/go-goim/api/errors" v1 "github.com/go-goim/api/message/v1" - response "github.com/go-goim/api/transport/response" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" reflect "reflect" @@ -388,8 +388,8 @@ type GetFriendResponse struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Response *response.BaseResponse `protobuf:"bytes,1,opt,name=response,proto3" json:"response,omitempty"` - Friend *Friend `protobuf:"bytes,2,opt,name=friend,proto3" json:"friend,omitempty"` + Error *errors.Error `protobuf:"bytes,1,opt,name=error,proto3" json:"error,omitempty"` + Friend *Friend `protobuf:"bytes,2,opt,name=friend,proto3" json:"friend,omitempty"` } func (x *GetFriendResponse) Reset() { @@ -424,9 +424,9 @@ func (*GetFriendResponse) Descriptor() ([]byte, []int) { return file_user_friend_v1_friend_proto_rawDescGZIP(), []int{2} } -func (x *GetFriendResponse) GetResponse() *response.BaseResponse { +func (x *GetFriendResponse) GetError() *errors.Error { if x != nil { - return x.Response + return x.Error } return nil } @@ -490,8 +490,8 @@ type QueryFriendListResponse struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Response *response.BaseResponse `protobuf:"bytes,1,opt,name=response,proto3" json:"response,omitempty"` - FriendList []*Friend `protobuf:"bytes,2,rep,name=friend_list,json=friendList,proto3" json:"friend_list,omitempty"` + Error *errors.Error `protobuf:"bytes,1,opt,name=error,proto3" json:"error,omitempty"` + FriendList []*Friend `protobuf:"bytes,2,rep,name=friend_list,json=friendList,proto3" json:"friend_list,omitempty"` } func (x *QueryFriendListResponse) Reset() { @@ -526,9 +526,9 @@ func (*QueryFriendListResponse) Descriptor() ([]byte, []int) { return file_user_friend_v1_friend_proto_rawDescGZIP(), []int{4} } -func (x *QueryFriendListResponse) GetResponse() *response.BaseResponse { +func (x *QueryFriendListResponse) GetError() *errors.Error { if x != nil { - return x.Response + return x.Error } return nil } @@ -705,8 +705,8 @@ type AddFriendResponse struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Response *response.BaseResponse `protobuf:"bytes,1,opt,name=response,proto3" json:"response,omitempty"` - Result *AddFriendResult `protobuf:"bytes,2,opt,name=result,proto3" json:"result,omitempty"` + Error *errors.Error `protobuf:"bytes,1,opt,name=error,proto3" json:"error,omitempty"` + Result *AddFriendResult `protobuf:"bytes,2,opt,name=result,proto3" json:"result,omitempty"` } func (x *AddFriendResponse) Reset() { @@ -741,9 +741,9 @@ func (*AddFriendResponse) Descriptor() ([]byte, []int) { return file_user_friend_v1_friend_proto_rawDescGZIP(), []int{7} } -func (x *AddFriendResponse) GetResponse() *response.BaseResponse { +func (x *AddFriendResponse) GetError() *errors.Error { if x != nil { - return x.Response + return x.Error } return nil } @@ -878,8 +878,8 @@ type GetFriendRequestResponse struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Response *response.BaseResponse `protobuf:"bytes,1,opt,name=response,proto3" json:"response,omitempty"` - FriendRequest *FriendRequest `protobuf:"bytes,2,opt,name=friend_request,json=friendRequest,proto3" json:"friend_request,omitempty"` + Error *errors.Error `protobuf:"bytes,1,opt,name=error,proto3" json:"error,omitempty"` + FriendRequest *FriendRequest `protobuf:"bytes,2,opt,name=friend_request,json=friendRequest,proto3" json:"friend_request,omitempty"` } func (x *GetFriendRequestResponse) Reset() { @@ -914,9 +914,9 @@ func (*GetFriendRequestResponse) Descriptor() ([]byte, []int) { return file_user_friend_v1_friend_proto_rawDescGZIP(), []int{10} } -func (x *GetFriendRequestResponse) GetResponse() *response.BaseResponse { +func (x *GetFriendRequestResponse) GetError() *errors.Error { if x != nil { - return x.Response + return x.Error } return nil } @@ -988,8 +988,8 @@ type QueryFriendRequestListResponse struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Response *response.BaseResponse `protobuf:"bytes,1,opt,name=response,proto3" json:"response,omitempty"` - FriendRequestList []*FriendRequest `protobuf:"bytes,2,rep,name=friend_request_list,json=friendRequestList,proto3" json:"friend_request_list,omitempty"` + Error *errors.Error `protobuf:"bytes,1,opt,name=error,proto3" json:"error,omitempty"` + FriendRequestList []*FriendRequest `protobuf:"bytes,2,rep,name=friend_request_list,json=friendRequestList,proto3" json:"friend_request_list,omitempty"` } func (x *QueryFriendRequestListResponse) Reset() { @@ -1024,9 +1024,9 @@ func (*QueryFriendRequestListResponse) Descriptor() ([]byte, []int) { return file_user_friend_v1_friend_proto_rawDescGZIP(), []int{12} } -func (x *QueryFriendRequestListResponse) GetResponse() *response.BaseResponse { +func (x *QueryFriendRequestListResponse) GetError() *errors.Error { if x != nil { - return x.Response + return x.Error } return nil } @@ -1107,8 +1107,8 @@ type CheckSendMessageAbilityResponse struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Response *response.BaseResponse `protobuf:"bytes,1,opt,name=response,proto3" json:"response,omitempty"` - SessionId *string `protobuf:"bytes,2,opt,name=session_id,json=sessionId,proto3,oneof" json:"session_id,omitempty"` + Error *errors.Error `protobuf:"bytes,1,opt,name=error,proto3" json:"error,omitempty"` + SessionId *string `protobuf:"bytes,2,opt,name=session_id,json=sessionId,proto3,oneof" json:"session_id,omitempty"` } func (x *CheckSendMessageAbilityResponse) Reset() { @@ -1143,9 +1143,9 @@ func (*CheckSendMessageAbilityResponse) Descriptor() ([]byte, []int) { return file_user_friend_v1_friend_proto_rawDescGZIP(), []int{14} } -func (x *CheckSendMessageAbilityResponse) GetResponse() *response.BaseResponse { +func (x *CheckSendMessageAbilityResponse) GetError() *errors.Error { if x != nil { - return x.Response + return x.Error } return nil } @@ -1164,247 +1164,233 @@ var file_user_friend_v1_friend_proto_rawDesc = []byte{ 0x2f, 0x66, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x12, 0x61, 0x70, 0x69, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x66, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x2e, 0x76, 0x31, 0x1a, 0x18, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x2f, 0x76, 0x31, 0x2f, 0x6d, 0x65, - 0x73, 0x73, 0x61, 0x67, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x21, 0x74, 0x72, 0x61, - 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x2f, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2f, - 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x17, - 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, - 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xf7, 0x01, 0x0a, 0x06, 0x46, 0x72, 0x69, 0x65, - 0x6e, 0x64, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, - 0x03, 0x75, 0x69, 0x64, 0x12, 0x1d, 0x0a, 0x0a, 0x66, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x5f, 0x75, - 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x66, 0x72, 0x69, 0x65, 0x6e, 0x64, - 0x55, 0x69, 0x64, 0x12, 0x1f, 0x0a, 0x0b, 0x66, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x5f, 0x6e, 0x61, - 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x66, 0x72, 0x69, 0x65, 0x6e, 0x64, - 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x23, 0x0a, 0x0d, 0x66, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x5f, 0x61, - 0x76, 0x61, 0x74, 0x61, 0x72, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x66, 0x72, 0x69, - 0x65, 0x6e, 0x64, 0x41, 0x76, 0x61, 0x74, 0x61, 0x72, 0x12, 0x38, 0x0a, 0x06, 0x73, 0x74, 0x61, - 0x74, 0x75, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x20, 0x2e, 0x61, 0x70, 0x69, 0x2e, - 0x75, 0x73, 0x65, 0x72, 0x2e, 0x66, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x46, - 0x72, 0x69, 0x65, 0x6e, 0x64, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x06, 0x73, 0x74, 0x61, - 0x74, 0x75, 0x73, 0x12, 0x1d, 0x0a, 0x0a, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x61, - 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, - 0x41, 0x74, 0x12, 0x1d, 0x0a, 0x0a, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, - 0x18, 0x07, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x41, - 0x74, 0x22, 0x90, 0x01, 0x0a, 0x19, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x46, 0x72, 0x69, 0x65, - 0x6e, 0x64, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, - 0x39, 0x0a, 0x04, 0x69, 0x6e, 0x66, 0x6f, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x25, 0x2e, - 0x61, 0x70, 0x69, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x66, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x2e, - 0x76, 0x31, 0x2e, 0x42, 0x61, 0x73, 0x65, 0x46, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x52, 0x04, 0x69, 0x6e, 0x66, 0x6f, 0x12, 0x38, 0x0a, 0x06, 0x73, 0x74, - 0x61, 0x74, 0x75, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x20, 0x2e, 0x61, 0x70, 0x69, - 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x66, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x2e, 0x76, 0x31, 0x2e, - 0x46, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x06, 0x73, 0x74, - 0x61, 0x74, 0x75, 0x73, 0x22, 0x89, 0x01, 0x0a, 0x11, 0x47, 0x65, 0x74, 0x46, 0x72, 0x69, 0x65, - 0x6e, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x40, 0x0a, 0x08, 0x72, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x61, - 0x70, 0x69, 0x2e, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x2e, 0x72, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x42, 0x61, 0x73, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x52, 0x08, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x32, 0x0a, 0x06, - 0x66, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x61, + 0x73, 0x73, 0x61, 0x67, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x13, 0x65, 0x72, 0x72, + 0x6f, 0x72, 0x73, 0x2f, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x1a, 0x17, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, + 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xf7, 0x01, 0x0a, 0x06, 0x46, 0x72, + 0x69, 0x65, 0x6e, 0x64, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x03, 0x52, 0x03, 0x75, 0x69, 0x64, 0x12, 0x1d, 0x0a, 0x0a, 0x66, 0x72, 0x69, 0x65, 0x6e, 0x64, + 0x5f, 0x75, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x66, 0x72, 0x69, 0x65, + 0x6e, 0x64, 0x55, 0x69, 0x64, 0x12, 0x1f, 0x0a, 0x0b, 0x66, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x5f, + 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x66, 0x72, 0x69, 0x65, + 0x6e, 0x64, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x23, 0x0a, 0x0d, 0x66, 0x72, 0x69, 0x65, 0x6e, 0x64, + 0x5f, 0x61, 0x76, 0x61, 0x74, 0x61, 0x72, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x66, + 0x72, 0x69, 0x65, 0x6e, 0x64, 0x41, 0x76, 0x61, 0x74, 0x61, 0x72, 0x12, 0x38, 0x0a, 0x06, 0x73, + 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x20, 0x2e, 0x61, 0x70, + 0x69, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x66, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x2e, 0x76, 0x31, + 0x2e, 0x46, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x06, 0x73, + 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x1d, 0x0a, 0x0a, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, + 0x5f, 0x61, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x63, 0x72, 0x65, 0x61, 0x74, + 0x65, 0x64, 0x41, 0x74, 0x12, 0x1d, 0x0a, 0x0a, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x5f, + 0x61, 0x74, 0x18, 0x07, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, + 0x64, 0x41, 0x74, 0x22, 0x90, 0x01, 0x0a, 0x19, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x46, 0x72, + 0x69, 0x65, 0x6e, 0x64, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x12, 0x39, 0x0a, 0x04, 0x69, 0x6e, 0x66, 0x6f, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x25, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x66, 0x72, 0x69, 0x65, 0x6e, + 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x42, 0x61, 0x73, 0x65, 0x46, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x52, 0x04, 0x69, 0x6e, 0x66, 0x6f, 0x12, 0x38, 0x0a, 0x06, + 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x20, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x66, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x2e, 0x76, - 0x31, 0x2e, 0x46, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x52, 0x06, 0x66, 0x72, 0x69, 0x65, 0x6e, 0x64, - 0x22, 0x33, 0x0a, 0x16, 0x51, 0x75, 0x65, 0x72, 0x79, 0x46, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x4c, - 0x69, 0x73, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x19, 0x0a, 0x03, 0x75, 0x69, - 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x22, 0x02, 0x20, 0x00, - 0x52, 0x03, 0x75, 0x69, 0x64, 0x22, 0x98, 0x01, 0x0a, 0x17, 0x51, 0x75, 0x65, 0x72, 0x79, 0x46, - 0x72, 0x69, 0x65, 0x6e, 0x64, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x12, 0x40, 0x0a, 0x08, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, - 0x6f, 0x72, 0x74, 0x2e, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x42, 0x61, 0x73, - 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x52, 0x08, 0x72, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x12, 0x3b, 0x0a, 0x0b, 0x66, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x5f, 0x6c, 0x69, - 0x73, 0x74, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x75, - 0x73, 0x65, 0x72, 0x2e, 0x66, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x46, 0x72, - 0x69, 0x65, 0x6e, 0x64, 0x52, 0x0a, 0x66, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x4c, 0x69, 0x73, 0x74, - 0x22, 0x95, 0x02, 0x0a, 0x0d, 0x46, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x02, - 0x69, 0x64, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, - 0x03, 0x75, 0x69, 0x64, 0x12, 0x1d, 0x0a, 0x0a, 0x66, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x5f, 0x75, - 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x66, 0x72, 0x69, 0x65, 0x6e, 0x64, - 0x55, 0x69, 0x64, 0x12, 0x3f, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x04, 0x20, + 0x31, 0x2e, 0x46, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x06, + 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x22, 0x70, 0x0a, 0x11, 0x47, 0x65, 0x74, 0x46, 0x72, 0x69, + 0x65, 0x6e, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x27, 0x0a, 0x05, 0x65, + 0x72, 0x72, 0x6f, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x61, 0x70, 0x69, + 0x2e, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x73, 0x2e, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x52, 0x05, 0x65, + 0x72, 0x72, 0x6f, 0x72, 0x12, 0x32, 0x0a, 0x06, 0x66, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, + 0x66, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x46, 0x72, 0x69, 0x65, 0x6e, 0x64, + 0x52, 0x06, 0x66, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x22, 0x33, 0x0a, 0x16, 0x51, 0x75, 0x65, 0x72, + 0x79, 0x46, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x12, 0x19, 0x0a, 0x03, 0x75, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x42, + 0x07, 0xfa, 0x42, 0x04, 0x22, 0x02, 0x20, 0x00, 0x52, 0x03, 0x75, 0x69, 0x64, 0x22, 0x7f, 0x0a, + 0x17, 0x51, 0x75, 0x65, 0x72, 0x79, 0x46, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x4c, 0x69, 0x73, 0x74, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x27, 0x0a, 0x05, 0x65, 0x72, 0x72, 0x6f, + 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x65, 0x72, + 0x72, 0x6f, 0x72, 0x73, 0x2e, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x52, 0x05, 0x65, 0x72, 0x72, 0x6f, + 0x72, 0x12, 0x3b, 0x0a, 0x0b, 0x66, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x5f, 0x6c, 0x69, 0x73, 0x74, + 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x75, 0x73, 0x65, + 0x72, 0x2e, 0x66, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x46, 0x72, 0x69, 0x65, + 0x6e, 0x64, 0x52, 0x0a, 0x66, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x4c, 0x69, 0x73, 0x74, 0x22, 0x95, + 0x02, 0x0a, 0x0d, 0x46, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x02, 0x69, 0x64, + 0x12, 0x10, 0x0a, 0x03, 0x75, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x03, 0x75, + 0x69, 0x64, 0x12, 0x1d, 0x0a, 0x0a, 0x66, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x5f, 0x75, 0x69, 0x64, + 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x66, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x55, 0x69, + 0x64, 0x12, 0x3f, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, + 0x0e, 0x32, 0x27, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x66, 0x72, 0x69, + 0x65, 0x6e, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x46, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, + 0x75, 0x73, 0x12, 0x1d, 0x0a, 0x0a, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, + 0x18, 0x05, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x41, + 0x74, 0x12, 0x1d, 0x0a, 0x0a, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, + 0x06, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, + 0x12, 0x1f, 0x0a, 0x0b, 0x66, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, + 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x66, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x4e, 0x61, 0x6d, + 0x65, 0x12, 0x23, 0x0a, 0x0d, 0x66, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x5f, 0x61, 0x76, 0x61, 0x74, + 0x61, 0x72, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x66, 0x72, 0x69, 0x65, 0x6e, 0x64, + 0x41, 0x76, 0x61, 0x74, 0x61, 0x72, 0x22, 0x56, 0x0a, 0x11, 0x42, 0x61, 0x73, 0x65, 0x46, 0x72, + 0x69, 0x65, 0x6e, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x19, 0x0a, 0x03, 0x75, + 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x22, 0x02, 0x20, + 0x00, 0x52, 0x03, 0x75, 0x69, 0x64, 0x12, 0x26, 0x0a, 0x0a, 0x66, 0x72, 0x69, 0x65, 0x6e, 0x64, + 0x5f, 0x75, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x22, + 0x02, 0x20, 0x00, 0x52, 0x09, 0x66, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x55, 0x69, 0x64, 0x22, 0x79, + 0x0a, 0x11, 0x41, 0x64, 0x64, 0x46, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x12, 0x27, 0x0a, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x73, 0x2e, + 0x45, 0x72, 0x72, 0x6f, 0x72, 0x52, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x12, 0x3b, 0x0a, 0x06, + 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x61, + 0x70, 0x69, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x66, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x2e, 0x76, + 0x31, 0x2e, 0x41, 0x64, 0x64, 0x46, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x52, 0x65, 0x73, 0x75, 0x6c, + 0x74, 0x52, 0x06, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x22, 0x98, 0x01, 0x0a, 0x0f, 0x41, 0x64, + 0x64, 0x46, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x12, 0x3b, 0x0a, + 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x23, 0x2e, + 0x61, 0x70, 0x69, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x66, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x2e, + 0x76, 0x31, 0x2e, 0x41, 0x64, 0x64, 0x46, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x53, 0x74, 0x61, 0x74, + 0x75, 0x73, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x48, 0x0a, 0x0e, 0x66, 0x72, + 0x69, 0x65, 0x6e, 0x64, 0x5f, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x66, 0x72, + 0x69, 0x65, 0x6e, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x46, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x52, 0x0d, 0x66, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x22, 0xbf, 0x01, 0x0a, 0x1b, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x72, 0x6d, + 0x46, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x12, 0x19, 0x0a, 0x03, 0x75, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x03, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x22, 0x02, 0x20, 0x00, 0x52, 0x03, 0x75, 0x69, 0x64, 0x12, + 0x33, 0x0a, 0x11, 0x66, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x5f, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x32, + 0x02, 0x20, 0x00, 0x52, 0x0f, 0x66, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x49, 0x64, 0x12, 0x50, 0x0a, 0x06, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03, + 0x20, 0x01, 0x28, 0x0e, 0x32, 0x2e, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, + 0x66, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x72, + 0x6d, 0x46, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x41, 0x63, + 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x82, 0x01, 0x02, 0x10, 0x01, 0x52, 0x06, + 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x8d, 0x01, 0x0a, 0x18, 0x47, 0x65, 0x74, 0x46, 0x72, + 0x69, 0x65, 0x6e, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x12, 0x27, 0x0a, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x73, 0x2e, + 0x45, 0x72, 0x72, 0x6f, 0x72, 0x52, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x12, 0x48, 0x0a, 0x0e, + 0x66, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x5f, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, + 0x66, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x46, 0x72, 0x69, 0x65, 0x6e, 0x64, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x52, 0x0d, 0x66, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x85, 0x01, 0x0a, 0x1d, 0x51, 0x75, 0x65, 0x72, 0x79, + 0x46, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x4c, 0x69, 0x73, + 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x19, 0x0a, 0x03, 0x75, 0x69, 0x64, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x03, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x22, 0x02, 0x20, 0x00, 0x52, 0x03, + 0x75, 0x69, 0x64, 0x12, 0x49, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x27, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x66, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x46, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x06, 0x73, 0x74, - 0x61, 0x74, 0x75, 0x73, 0x12, 0x1d, 0x0a, 0x0a, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x5f, - 0x61, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, - 0x64, 0x41, 0x74, 0x12, 0x1d, 0x0a, 0x0a, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x61, - 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, - 0x41, 0x74, 0x12, 0x1f, 0x0a, 0x0b, 0x66, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x5f, 0x6e, 0x61, 0x6d, - 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x66, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x4e, - 0x61, 0x6d, 0x65, 0x12, 0x23, 0x0a, 0x0d, 0x66, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x5f, 0x61, 0x76, - 0x61, 0x74, 0x61, 0x72, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x66, 0x72, 0x69, 0x65, - 0x6e, 0x64, 0x41, 0x76, 0x61, 0x74, 0x61, 0x72, 0x22, 0x56, 0x0a, 0x11, 0x42, 0x61, 0x73, 0x65, - 0x46, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x19, 0x0a, - 0x03, 0x75, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x22, - 0x02, 0x20, 0x00, 0x52, 0x03, 0x75, 0x69, 0x64, 0x12, 0x26, 0x0a, 0x0a, 0x66, 0x72, 0x69, 0x65, - 0x6e, 0x64, 0x5f, 0x75, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x42, 0x07, 0xfa, 0x42, - 0x04, 0x22, 0x02, 0x20, 0x00, 0x52, 0x09, 0x66, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x55, 0x69, 0x64, - 0x22, 0x92, 0x01, 0x0a, 0x11, 0x41, 0x64, 0x64, 0x46, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x40, 0x0a, 0x08, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x74, - 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x2e, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x2e, 0x42, 0x61, 0x73, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x52, 0x08, - 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3b, 0x0a, 0x06, 0x72, 0x65, 0x73, 0x75, - 0x6c, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x75, - 0x73, 0x65, 0x72, 0x2e, 0x66, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x64, - 0x64, 0x46, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x52, 0x06, 0x72, - 0x65, 0x73, 0x75, 0x6c, 0x74, 0x22, 0x98, 0x01, 0x0a, 0x0f, 0x41, 0x64, 0x64, 0x46, 0x72, 0x69, - 0x65, 0x6e, 0x64, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x12, 0x3b, 0x0a, 0x06, 0x73, 0x74, 0x61, - 0x74, 0x75, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x23, 0x2e, 0x61, 0x70, 0x69, 0x2e, - 0x75, 0x73, 0x65, 0x72, 0x2e, 0x66, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x41, - 0x64, 0x64, 0x46, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x06, - 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x48, 0x0a, 0x0e, 0x66, 0x72, 0x69, 0x65, 0x6e, 0x64, - 0x5f, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x21, - 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x66, 0x72, 0x69, 0x65, 0x6e, 0x64, - 0x2e, 0x76, 0x31, 0x2e, 0x46, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x52, 0x0d, 0x66, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x22, 0xbf, 0x01, 0x0a, 0x1b, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x72, 0x6d, 0x46, 0x72, 0x69, 0x65, - 0x6e, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x12, 0x19, 0x0a, 0x03, 0x75, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x42, 0x07, 0xfa, - 0x42, 0x04, 0x22, 0x02, 0x20, 0x00, 0x52, 0x03, 0x75, 0x69, 0x64, 0x12, 0x33, 0x0a, 0x11, 0x66, - 0x72, 0x69, 0x65, 0x6e, 0x64, 0x5f, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x5f, 0x69, 0x64, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x32, 0x02, 0x20, 0x00, 0x52, - 0x0f, 0x66, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x49, 0x64, - 0x12, 0x50, 0x0a, 0x06, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0e, - 0x32, 0x2e, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x66, 0x72, 0x69, 0x65, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x42, 0x08, 0xfa, 0x42, + 0x05, 0x82, 0x01, 0x02, 0x10, 0x01, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x22, 0x9c, + 0x01, 0x0a, 0x1e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x46, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x12, 0x27, 0x0a, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x11, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x73, 0x2e, 0x45, 0x72, + 0x72, 0x6f, 0x72, 0x52, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x12, 0x51, 0x0a, 0x13, 0x66, 0x72, + 0x69, 0x65, 0x6e, 0x64, 0x5f, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x5f, 0x6c, 0x69, 0x73, + 0x74, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x75, 0x73, + 0x65, 0x72, 0x2e, 0x66, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x46, 0x72, 0x69, + 0x65, 0x6e, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x52, 0x11, 0x66, 0x72, 0x69, 0x65, + 0x6e, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x4c, 0x69, 0x73, 0x74, 0x22, 0xa4, 0x01, + 0x0a, 0x1e, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x53, 0x65, 0x6e, 0x64, 0x4d, 0x65, 0x73, 0x73, 0x61, + 0x67, 0x65, 0x41, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x12, 0x22, 0x0a, 0x08, 0x66, 0x72, 0x6f, 0x6d, 0x5f, 0x75, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x03, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x22, 0x02, 0x20, 0x00, 0x52, 0x07, 0x66, 0x72, 0x6f, + 0x6d, 0x55, 0x69, 0x64, 0x12, 0x1e, 0x0a, 0x06, 0x74, 0x6f, 0x5f, 0x75, 0x69, 0x64, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x03, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x22, 0x02, 0x20, 0x00, 0x52, 0x05, 0x74, + 0x6f, 0x55, 0x69, 0x64, 0x12, 0x3e, 0x0a, 0x0c, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x5f, + 0x74, 0x79, 0x70, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1b, 0x2e, 0x61, 0x70, 0x69, + 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x65, 0x73, 0x73, + 0x69, 0x6f, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x52, 0x0b, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, + 0x54, 0x79, 0x70, 0x65, 0x22, 0x7d, 0x0a, 0x1f, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x53, 0x65, 0x6e, + 0x64, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x41, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x27, 0x0a, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x65, 0x72, 0x72, + 0x6f, 0x72, 0x73, 0x2e, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x52, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, + 0x12, 0x22, 0x0a, 0x0a, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x09, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x49, + 0x64, 0x88, 0x01, 0x01, 0x42, 0x0d, 0x0a, 0x0b, 0x5f, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, + 0x5f, 0x69, 0x64, 0x2a, 0x44, 0x0a, 0x0c, 0x46, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x53, 0x74, 0x61, + 0x74, 0x75, 0x73, 0x12, 0x0a, 0x0a, 0x06, 0x46, 0x52, 0x49, 0x45, 0x4e, 0x44, 0x10, 0x00, 0x12, + 0x0c, 0x0a, 0x08, 0x53, 0x54, 0x52, 0x41, 0x4e, 0x47, 0x45, 0x52, 0x10, 0x01, 0x12, 0x0b, 0x0a, + 0x07, 0x42, 0x4c, 0x4f, 0x43, 0x4b, 0x45, 0x44, 0x10, 0x02, 0x12, 0x0d, 0x0a, 0x09, 0x55, 0x4e, + 0x42, 0x4c, 0x4f, 0x43, 0x4b, 0x45, 0x44, 0x10, 0x03, 0x2a, 0x40, 0x0a, 0x13, 0x46, 0x72, 0x69, + 0x65, 0x6e, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, + 0x12, 0x0d, 0x0a, 0x09, 0x52, 0x45, 0x51, 0x55, 0x45, 0x53, 0x54, 0x45, 0x44, 0x10, 0x00, 0x12, + 0x0c, 0x0a, 0x08, 0x41, 0x43, 0x43, 0x45, 0x50, 0x54, 0x45, 0x44, 0x10, 0x01, 0x12, 0x0c, 0x0a, + 0x08, 0x52, 0x45, 0x4a, 0x45, 0x43, 0x54, 0x45, 0x44, 0x10, 0x02, 0x2a, 0x87, 0x01, 0x0a, 0x0f, + 0x41, 0x64, 0x64, 0x46, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, + 0x18, 0x0a, 0x14, 0x53, 0x45, 0x4e, 0x44, 0x5f, 0x52, 0x45, 0x51, 0x55, 0x45, 0x53, 0x54, 0x5f, + 0x53, 0x55, 0x43, 0x43, 0x45, 0x53, 0x53, 0x10, 0x00, 0x12, 0x18, 0x0a, 0x14, 0x41, 0x4c, 0x52, + 0x45, 0x41, 0x44, 0x59, 0x5f, 0x53, 0x45, 0x4e, 0x54, 0x5f, 0x52, 0x45, 0x51, 0x55, 0x45, 0x53, + 0x54, 0x10, 0x01, 0x12, 0x16, 0x0a, 0x12, 0x41, 0x44, 0x44, 0x5f, 0x46, 0x52, 0x49, 0x45, 0x4e, + 0x44, 0x5f, 0x53, 0x55, 0x43, 0x43, 0x45, 0x53, 0x53, 0x10, 0x02, 0x12, 0x11, 0x0a, 0x0d, 0x42, + 0x4c, 0x4f, 0x43, 0x4b, 0x45, 0x44, 0x5f, 0x42, 0x59, 0x5f, 0x4d, 0x45, 0x10, 0x03, 0x12, 0x15, + 0x0a, 0x11, 0x42, 0x4c, 0x4f, 0x43, 0x4b, 0x45, 0x44, 0x5f, 0x42, 0x59, 0x5f, 0x46, 0x52, 0x49, + 0x45, 0x4e, 0x44, 0x10, 0x04, 0x2a, 0x34, 0x0a, 0x1a, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x72, 0x6d, + 0x46, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x41, 0x63, 0x74, + 0x69, 0x6f, 0x6e, 0x12, 0x0a, 0x0a, 0x06, 0x41, 0x43, 0x43, 0x45, 0x50, 0x54, 0x10, 0x00, 0x12, + 0x0a, 0x0a, 0x06, 0x52, 0x45, 0x4a, 0x45, 0x43, 0x54, 0x10, 0x01, 0x32, 0x9a, 0x07, 0x0a, 0x0d, + 0x46, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x59, 0x0a, + 0x09, 0x41, 0x64, 0x64, 0x46, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x12, 0x25, 0x2e, 0x61, 0x70, 0x69, + 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x66, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x2e, 0x76, 0x31, 0x2e, + 0x42, 0x61, 0x73, 0x65, 0x46, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x1a, 0x25, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x66, 0x72, 0x69, + 0x65, 0x6e, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x64, 0x64, 0x46, 0x72, 0x69, 0x65, 0x6e, 0x64, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x5a, 0x0a, 0x14, 0x43, 0x6f, 0x6e, 0x66, + 0x69, 0x72, 0x6d, 0x46, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x12, 0x2f, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x66, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x72, 0x6d, 0x46, 0x72, 0x69, - 0x65, 0x6e, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, - 0x42, 0x08, 0xfa, 0x42, 0x05, 0x82, 0x01, 0x02, 0x10, 0x01, 0x52, 0x06, 0x61, 0x63, 0x74, 0x69, - 0x6f, 0x6e, 0x22, 0xa6, 0x01, 0x0a, 0x18, 0x47, 0x65, 0x74, 0x46, 0x72, 0x69, 0x65, 0x6e, 0x64, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, - 0x40, 0x0a, 0x08, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x24, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, - 0x74, 0x2e, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x42, 0x61, 0x73, 0x65, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x52, 0x08, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x12, 0x48, 0x0a, 0x0e, 0x66, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x5f, 0x72, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x61, 0x70, 0x69, 0x2e, - 0x75, 0x73, 0x65, 0x72, 0x2e, 0x66, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x46, - 0x72, 0x69, 0x65, 0x6e, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x52, 0x0d, 0x66, 0x72, - 0x69, 0x65, 0x6e, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x85, 0x01, 0x0a, 0x1d, + 0x65, 0x6e, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x1a, 0x11, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x73, 0x2e, 0x45, + 0x72, 0x72, 0x6f, 0x72, 0x12, 0x67, 0x0a, 0x10, 0x47, 0x65, 0x74, 0x46, 0x72, 0x69, 0x65, 0x6e, + 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x25, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x75, + 0x73, 0x65, 0x72, 0x2e, 0x66, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x42, 0x61, + 0x73, 0x65, 0x46, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, + 0x2c, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x66, 0x72, 0x69, 0x65, 0x6e, + 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x46, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x7f, 0x0a, + 0x16, 0x51, 0x75, 0x65, 0x72, 0x79, 0x46, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x31, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x75, 0x73, + 0x65, 0x72, 0x2e, 0x66, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, + 0x72, 0x79, 0x46, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x4c, + 0x69, 0x73, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x32, 0x2e, 0x61, 0x70, 0x69, + 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x66, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x46, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x19, 0x0a, - 0x03, 0x75, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x22, - 0x02, 0x20, 0x00, 0x52, 0x03, 0x75, 0x69, 0x64, 0x12, 0x49, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, - 0x75, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x27, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x75, - 0x73, 0x65, 0x72, 0x2e, 0x66, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x46, 0x72, - 0x69, 0x65, 0x6e, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x53, 0x74, 0x61, 0x74, 0x75, - 0x73, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x82, 0x01, 0x02, 0x10, 0x01, 0x52, 0x06, 0x73, 0x74, 0x61, - 0x74, 0x75, 0x73, 0x22, 0xb5, 0x01, 0x0a, 0x1e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x46, 0x72, 0x69, - 0x65, 0x6e, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x40, 0x0a, 0x08, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x74, - 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x2e, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x2e, 0x42, 0x61, 0x73, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x52, 0x08, - 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x51, 0x0a, 0x13, 0x66, 0x72, 0x69, 0x65, - 0x6e, 0x64, 0x5f, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x5f, 0x6c, 0x69, 0x73, 0x74, 0x18, - 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x75, 0x73, 0x65, 0x72, - 0x2e, 0x66, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x46, 0x72, 0x69, 0x65, 0x6e, - 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x52, 0x11, 0x66, 0x72, 0x69, 0x65, 0x6e, 0x64, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x4c, 0x69, 0x73, 0x74, 0x22, 0xa4, 0x01, 0x0a, 0x1e, - 0x43, 0x68, 0x65, 0x63, 0x6b, 0x53, 0x65, 0x6e, 0x64, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, - 0x41, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x22, - 0x0a, 0x08, 0x66, 0x72, 0x6f, 0x6d, 0x5f, 0x75, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, - 0x42, 0x07, 0xfa, 0x42, 0x04, 0x22, 0x02, 0x20, 0x00, 0x52, 0x07, 0x66, 0x72, 0x6f, 0x6d, 0x55, - 0x69, 0x64, 0x12, 0x1e, 0x0a, 0x06, 0x74, 0x6f, 0x5f, 0x75, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, - 0x28, 0x03, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x22, 0x02, 0x20, 0x00, 0x52, 0x05, 0x74, 0x6f, 0x55, - 0x69, 0x64, 0x12, 0x3e, 0x0a, 0x0c, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x79, - 0x70, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1b, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x6d, - 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, - 0x6e, 0x54, 0x79, 0x70, 0x65, 0x52, 0x0b, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x54, 0x79, - 0x70, 0x65, 0x22, 0x96, 0x01, 0x0a, 0x1f, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x53, 0x65, 0x6e, 0x64, - 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x41, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x40, 0x0a, 0x08, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x74, - 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x2e, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x2e, 0x42, 0x61, 0x73, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x52, 0x08, - 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x22, 0x0a, 0x0a, 0x73, 0x65, 0x73, 0x73, - 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x09, - 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x88, 0x01, 0x01, 0x42, 0x0d, 0x0a, 0x0b, - 0x5f, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x2a, 0x44, 0x0a, 0x0c, 0x46, - 0x72, 0x69, 0x65, 0x6e, 0x64, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x0a, 0x0a, 0x06, 0x46, - 0x52, 0x49, 0x45, 0x4e, 0x44, 0x10, 0x00, 0x12, 0x0c, 0x0a, 0x08, 0x53, 0x54, 0x52, 0x41, 0x4e, - 0x47, 0x45, 0x52, 0x10, 0x01, 0x12, 0x0b, 0x0a, 0x07, 0x42, 0x4c, 0x4f, 0x43, 0x4b, 0x45, 0x44, - 0x10, 0x02, 0x12, 0x0d, 0x0a, 0x09, 0x55, 0x4e, 0x42, 0x4c, 0x4f, 0x43, 0x4b, 0x45, 0x44, 0x10, - 0x03, 0x2a, 0x40, 0x0a, 0x13, 0x46, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x0d, 0x0a, 0x09, 0x52, 0x45, 0x51, 0x55, - 0x45, 0x53, 0x54, 0x45, 0x44, 0x10, 0x00, 0x12, 0x0c, 0x0a, 0x08, 0x41, 0x43, 0x43, 0x45, 0x50, - 0x54, 0x45, 0x44, 0x10, 0x01, 0x12, 0x0c, 0x0a, 0x08, 0x52, 0x45, 0x4a, 0x45, 0x43, 0x54, 0x45, - 0x44, 0x10, 0x02, 0x2a, 0x87, 0x01, 0x0a, 0x0f, 0x41, 0x64, 0x64, 0x46, 0x72, 0x69, 0x65, 0x6e, - 0x64, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x18, 0x0a, 0x14, 0x53, 0x45, 0x4e, 0x44, 0x5f, - 0x52, 0x45, 0x51, 0x55, 0x45, 0x53, 0x54, 0x5f, 0x53, 0x55, 0x43, 0x43, 0x45, 0x53, 0x53, 0x10, - 0x00, 0x12, 0x18, 0x0a, 0x14, 0x41, 0x4c, 0x52, 0x45, 0x41, 0x44, 0x59, 0x5f, 0x53, 0x45, 0x4e, - 0x54, 0x5f, 0x52, 0x45, 0x51, 0x55, 0x45, 0x53, 0x54, 0x10, 0x01, 0x12, 0x16, 0x0a, 0x12, 0x41, - 0x44, 0x44, 0x5f, 0x46, 0x52, 0x49, 0x45, 0x4e, 0x44, 0x5f, 0x53, 0x55, 0x43, 0x43, 0x45, 0x53, - 0x53, 0x10, 0x02, 0x12, 0x11, 0x0a, 0x0d, 0x42, 0x4c, 0x4f, 0x43, 0x4b, 0x45, 0x44, 0x5f, 0x42, - 0x59, 0x5f, 0x4d, 0x45, 0x10, 0x03, 0x12, 0x15, 0x0a, 0x11, 0x42, 0x4c, 0x4f, 0x43, 0x4b, 0x45, - 0x44, 0x5f, 0x42, 0x59, 0x5f, 0x46, 0x52, 0x49, 0x45, 0x4e, 0x44, 0x10, 0x04, 0x2a, 0x34, 0x0a, - 0x1a, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x72, 0x6d, 0x46, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x0a, 0x0a, 0x06, 0x41, - 0x43, 0x43, 0x45, 0x50, 0x54, 0x10, 0x00, 0x12, 0x0a, 0x0a, 0x06, 0x52, 0x45, 0x4a, 0x45, 0x43, - 0x54, 0x10, 0x01, 0x32, 0xd3, 0x07, 0x0a, 0x0d, 0x46, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x53, 0x65, - 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x59, 0x0a, 0x09, 0x41, 0x64, 0x64, 0x46, 0x72, 0x69, 0x65, + 0x73, 0x74, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x56, + 0x0a, 0x12, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x46, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x53, 0x74, + 0x61, 0x74, 0x75, 0x73, 0x12, 0x2d, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, + 0x66, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, + 0x46, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x1a, 0x11, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x73, + 0x2e, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x12, 0x44, 0x0a, 0x08, 0x49, 0x73, 0x46, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x12, 0x25, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x66, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x42, 0x61, 0x73, 0x65, 0x46, 0x72, 0x69, 0x65, - 0x6e, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x25, 0x2e, 0x61, 0x70, 0x69, 0x2e, - 0x75, 0x73, 0x65, 0x72, 0x2e, 0x66, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x41, - 0x64, 0x64, 0x46, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x12, 0x6d, 0x0a, 0x14, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x72, 0x6d, 0x46, 0x72, 0x69, 0x65, 0x6e, - 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x2f, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x75, - 0x73, 0x65, 0x72, 0x2e, 0x66, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x6f, - 0x6e, 0x66, 0x69, 0x72, 0x6d, 0x46, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x24, 0x2e, 0x61, 0x70, 0x69, 0x2e, - 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x2e, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x2e, 0x42, 0x61, 0x73, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, - 0x67, 0x0a, 0x10, 0x47, 0x65, 0x74, 0x46, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x12, 0x25, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x66, - 0x72, 0x69, 0x65, 0x6e, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x42, 0x61, 0x73, 0x65, 0x46, 0x72, 0x69, - 0x65, 0x6e, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2c, 0x2e, 0x61, 0x70, 0x69, - 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x66, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x2e, 0x76, 0x31, 0x2e, - 0x47, 0x65, 0x74, 0x46, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x7f, 0x0a, 0x16, 0x51, 0x75, 0x65, 0x72, - 0x79, 0x46, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x4c, 0x69, - 0x73, 0x74, 0x12, 0x31, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x66, 0x72, - 0x69, 0x65, 0x6e, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x46, 0x72, 0x69, - 0x65, 0x6e, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x32, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x75, 0x73, 0x65, 0x72, - 0x2e, 0x66, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, - 0x46, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x4c, 0x69, 0x73, - 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x69, 0x0a, 0x12, 0x55, 0x70, 0x64, - 0x61, 0x74, 0x65, 0x46, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, - 0x2d, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x66, 0x72, 0x69, 0x65, 0x6e, - 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x46, 0x72, 0x69, 0x65, 0x6e, - 0x64, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x24, - 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x2e, 0x72, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x42, 0x61, 0x73, 0x65, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x57, 0x0a, 0x08, 0x49, 0x73, 0x46, 0x72, 0x69, 0x65, 0x6e, 0x64, - 0x12, 0x25, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x66, 0x72, 0x69, 0x65, - 0x6e, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x42, 0x61, 0x73, 0x65, 0x46, 0x72, 0x69, 0x65, 0x6e, 0x64, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x24, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x74, 0x72, - 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x2e, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x2e, 0x42, 0x61, 0x73, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x59, 0x0a, - 0x09, 0x47, 0x65, 0x74, 0x46, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x12, 0x25, 0x2e, 0x61, 0x70, 0x69, + 0x6e, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x11, 0x2e, 0x61, 0x70, 0x69, 0x2e, + 0x65, 0x72, 0x72, 0x6f, 0x72, 0x73, 0x2e, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x12, 0x59, 0x0a, 0x09, + 0x47, 0x65, 0x74, 0x46, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x12, 0x25, 0x2e, 0x61, 0x70, 0x69, 0x2e, + 0x75, 0x73, 0x65, 0x72, 0x2e, 0x66, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x42, + 0x61, 0x73, 0x65, 0x46, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x1a, 0x25, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x66, 0x72, 0x69, 0x65, + 0x6e, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x46, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x6a, 0x0a, 0x0f, 0x51, 0x75, 0x65, 0x72, 0x79, + 0x46, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x2a, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x66, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x2e, 0x76, 0x31, 0x2e, - 0x42, 0x61, 0x73, 0x65, 0x46, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x1a, 0x25, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x66, 0x72, 0x69, - 0x65, 0x6e, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x46, 0x72, 0x69, 0x65, 0x6e, 0x64, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x6a, 0x0a, 0x0f, 0x51, 0x75, 0x65, 0x72, - 0x79, 0x46, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x2a, 0x2e, 0x61, 0x70, - 0x69, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x66, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x2e, 0x76, 0x31, - 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x46, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x4c, 0x69, 0x73, 0x74, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2b, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x75, 0x73, - 0x65, 0x72, 0x2e, 0x66, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, - 0x72, 0x79, 0x46, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x82, 0x01, 0x0a, 0x17, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x53, 0x65, + 0x51, 0x75, 0x65, 0x72, 0x79, 0x46, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x4c, 0x69, 0x73, 0x74, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2b, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x75, 0x73, 0x65, + 0x72, 0x2e, 0x66, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, + 0x79, 0x46, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x12, 0x82, 0x01, 0x0a, 0x17, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x53, 0x65, 0x6e, + 0x64, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x41, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x12, + 0x32, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x66, 0x72, 0x69, 0x65, 0x6e, + 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x53, 0x65, 0x6e, 0x64, 0x4d, 0x65, + 0x73, 0x73, 0x61, 0x67, 0x65, 0x41, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x1a, 0x33, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x66, + 0x72, 0x69, 0x65, 0x6e, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x53, 0x65, 0x6e, 0x64, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x41, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, - 0x12, 0x32, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x66, 0x72, 0x69, 0x65, - 0x6e, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x53, 0x65, 0x6e, 0x64, 0x4d, - 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x41, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x1a, 0x33, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, - 0x66, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x53, - 0x65, 0x6e, 0x64, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x41, 0x62, 0x69, 0x6c, 0x69, 0x74, - 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0x27, 0x5a, 0x25, 0x67, 0x69, 0x74, - 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x67, 0x6f, 0x2d, 0x67, 0x6f, 0x69, 0x6d, 0x2f, - 0x61, 0x70, 0x69, 0x2f, 0x75, 0x73, 0x65, 0x72, 0x2f, 0x66, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x2f, - 0x76, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0x27, 0x5a, 0x25, 0x67, 0x69, 0x74, 0x68, + 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x67, 0x6f, 0x2d, 0x67, 0x6f, 0x69, 0x6d, 0x2f, 0x61, + 0x70, 0x69, 0x2f, 0x75, 0x73, 0x65, 0x72, 0x2f, 0x66, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x2f, 0x76, + 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -1441,30 +1427,30 @@ var file_user_friend_v1_friend_proto_goTypes = []interface{}{ (*QueryFriendRequestListResponse)(nil), // 16: api.user.friend.v1.QueryFriendRequestListResponse (*CheckSendMessageAbilityRequest)(nil), // 17: api.user.friend.v1.CheckSendMessageAbilityRequest (*CheckSendMessageAbilityResponse)(nil), // 18: api.user.friend.v1.CheckSendMessageAbilityResponse - (*response.BaseResponse)(nil), // 19: api.transport.response.BaseResponse + (*errors.Error)(nil), // 19: api.errors.Error (v1.SessionType)(0), // 20: api.message.v1.SessionType } var file_user_friend_v1_friend_proto_depIdxs = []int32{ 0, // 0: api.user.friend.v1.Friend.status:type_name -> api.user.friend.v1.FriendStatus 10, // 1: api.user.friend.v1.UpdateFriendStatusRequest.info:type_name -> api.user.friend.v1.BaseFriendRequest 0, // 2: api.user.friend.v1.UpdateFriendStatusRequest.status:type_name -> api.user.friend.v1.FriendStatus - 19, // 3: api.user.friend.v1.GetFriendResponse.response:type_name -> api.transport.response.BaseResponse + 19, // 3: api.user.friend.v1.GetFriendResponse.error:type_name -> api.errors.Error 4, // 4: api.user.friend.v1.GetFriendResponse.friend:type_name -> api.user.friend.v1.Friend - 19, // 5: api.user.friend.v1.QueryFriendListResponse.response:type_name -> api.transport.response.BaseResponse + 19, // 5: api.user.friend.v1.QueryFriendListResponse.error:type_name -> api.errors.Error 4, // 6: api.user.friend.v1.QueryFriendListResponse.friend_list:type_name -> api.user.friend.v1.Friend 1, // 7: api.user.friend.v1.FriendRequest.status:type_name -> api.user.friend.v1.FriendRequestStatus - 19, // 8: api.user.friend.v1.AddFriendResponse.response:type_name -> api.transport.response.BaseResponse + 19, // 8: api.user.friend.v1.AddFriendResponse.error:type_name -> api.errors.Error 12, // 9: api.user.friend.v1.AddFriendResponse.result:type_name -> api.user.friend.v1.AddFriendResult 2, // 10: api.user.friend.v1.AddFriendResult.status:type_name -> api.user.friend.v1.AddFriendStatus 9, // 11: api.user.friend.v1.AddFriendResult.friend_request:type_name -> api.user.friend.v1.FriendRequest 3, // 12: api.user.friend.v1.ConfirmFriendRequestRequest.action:type_name -> api.user.friend.v1.ConfirmFriendRequestAction - 19, // 13: api.user.friend.v1.GetFriendRequestResponse.response:type_name -> api.transport.response.BaseResponse + 19, // 13: api.user.friend.v1.GetFriendRequestResponse.error:type_name -> api.errors.Error 9, // 14: api.user.friend.v1.GetFriendRequestResponse.friend_request:type_name -> api.user.friend.v1.FriendRequest 1, // 15: api.user.friend.v1.QueryFriendRequestListRequest.status:type_name -> api.user.friend.v1.FriendRequestStatus - 19, // 16: api.user.friend.v1.QueryFriendRequestListResponse.response:type_name -> api.transport.response.BaseResponse + 19, // 16: api.user.friend.v1.QueryFriendRequestListResponse.error:type_name -> api.errors.Error 9, // 17: api.user.friend.v1.QueryFriendRequestListResponse.friend_request_list:type_name -> api.user.friend.v1.FriendRequest 20, // 18: api.user.friend.v1.CheckSendMessageAbilityRequest.session_type:type_name -> api.message.v1.SessionType - 19, // 19: api.user.friend.v1.CheckSendMessageAbilityResponse.response:type_name -> api.transport.response.BaseResponse + 19, // 19: api.user.friend.v1.CheckSendMessageAbilityResponse.error:type_name -> api.errors.Error 10, // 20: api.user.friend.v1.FriendService.AddFriend:input_type -> api.user.friend.v1.BaseFriendRequest 13, // 21: api.user.friend.v1.FriendService.ConfirmFriendRequest:input_type -> api.user.friend.v1.ConfirmFriendRequestRequest 10, // 22: api.user.friend.v1.FriendService.GetFriendRequest:input_type -> api.user.friend.v1.BaseFriendRequest @@ -1475,11 +1461,11 @@ var file_user_friend_v1_friend_proto_depIdxs = []int32{ 7, // 27: api.user.friend.v1.FriendService.QueryFriendList:input_type -> api.user.friend.v1.QueryFriendListRequest 17, // 28: api.user.friend.v1.FriendService.CheckSendMessageAbility:input_type -> api.user.friend.v1.CheckSendMessageAbilityRequest 11, // 29: api.user.friend.v1.FriendService.AddFriend:output_type -> api.user.friend.v1.AddFriendResponse - 19, // 30: api.user.friend.v1.FriendService.ConfirmFriendRequest:output_type -> api.transport.response.BaseResponse + 19, // 30: api.user.friend.v1.FriendService.ConfirmFriendRequest:output_type -> api.errors.Error 14, // 31: api.user.friend.v1.FriendService.GetFriendRequest:output_type -> api.user.friend.v1.GetFriendRequestResponse 16, // 32: api.user.friend.v1.FriendService.QueryFriendRequestList:output_type -> api.user.friend.v1.QueryFriendRequestListResponse - 19, // 33: api.user.friend.v1.FriendService.UpdateFriendStatus:output_type -> api.transport.response.BaseResponse - 19, // 34: api.user.friend.v1.FriendService.IsFriend:output_type -> api.transport.response.BaseResponse + 19, // 33: api.user.friend.v1.FriendService.UpdateFriendStatus:output_type -> api.errors.Error + 19, // 34: api.user.friend.v1.FriendService.IsFriend:output_type -> api.errors.Error 6, // 35: api.user.friend.v1.FriendService.GetFriend:output_type -> api.user.friend.v1.GetFriendResponse 8, // 36: api.user.friend.v1.FriendService.QueryFriendList:output_type -> api.user.friend.v1.QueryFriendListResponse 18, // 37: api.user.friend.v1.FriendService.CheckSendMessageAbility:output_type -> api.user.friend.v1.CheckSendMessageAbilityResponse diff --git a/user/friend/v1/friend.pb.validate.go b/user/friend/v1/friend.pb.validate.go index 18cda87..1ca214d 100644 --- a/user/friend/v1/friend.pb.validate.go +++ b/user/friend/v1/friend.pb.validate.go @@ -303,11 +303,11 @@ func (m *GetFriendResponse) validate(all bool) error { var errors []error if all { - switch v := interface{}(m.GetResponse()).(type) { + switch v := interface{}(m.GetError()).(type) { case interface{ ValidateAll() error }: if err := v.ValidateAll(); err != nil { errors = append(errors, GetFriendResponseValidationError{ - field: "Response", + field: "Error", reason: "embedded message failed validation", cause: err, }) @@ -315,16 +315,16 @@ func (m *GetFriendResponse) validate(all bool) error { case interface{ Validate() error }: if err := v.Validate(); err != nil { errors = append(errors, GetFriendResponseValidationError{ - field: "Response", + field: "Error", reason: "embedded message failed validation", cause: err, }) } } - } else if v, ok := interface{}(m.GetResponse()).(interface{ Validate() error }); ok { + } else if v, ok := interface{}(m.GetError()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return GetFriendResponseValidationError{ - field: "Response", + field: "Error", reason: "embedded message failed validation", cause: err, } @@ -576,11 +576,11 @@ func (m *QueryFriendListResponse) validate(all bool) error { var errors []error if all { - switch v := interface{}(m.GetResponse()).(type) { + switch v := interface{}(m.GetError()).(type) { case interface{ ValidateAll() error }: if err := v.ValidateAll(); err != nil { errors = append(errors, QueryFriendListResponseValidationError{ - field: "Response", + field: "Error", reason: "embedded message failed validation", cause: err, }) @@ -588,16 +588,16 @@ func (m *QueryFriendListResponse) validate(all bool) error { case interface{ Validate() error }: if err := v.Validate(); err != nil { errors = append(errors, QueryFriendListResponseValidationError{ - field: "Response", + field: "Error", reason: "embedded message failed validation", cause: err, }) } } - } else if v, ok := interface{}(m.GetResponse()).(interface{ Validate() error }); ok { + } else if v, ok := interface{}(m.GetError()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return QueryFriendListResponseValidationError{ - field: "Response", + field: "Error", reason: "embedded message failed validation", cause: err, } @@ -981,11 +981,11 @@ func (m *AddFriendResponse) validate(all bool) error { var errors []error if all { - switch v := interface{}(m.GetResponse()).(type) { + switch v := interface{}(m.GetError()).(type) { case interface{ ValidateAll() error }: if err := v.ValidateAll(); err != nil { errors = append(errors, AddFriendResponseValidationError{ - field: "Response", + field: "Error", reason: "embedded message failed validation", cause: err, }) @@ -993,16 +993,16 @@ func (m *AddFriendResponse) validate(all bool) error { case interface{ Validate() error }: if err := v.Validate(); err != nil { errors = append(errors, AddFriendResponseValidationError{ - field: "Response", + field: "Error", reason: "embedded message failed validation", cause: err, }) } } - } else if v, ok := interface{}(m.GetResponse()).(interface{ Validate() error }); ok { + } else if v, ok := interface{}(m.GetError()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return AddFriendResponseValidationError{ - field: "Response", + field: "Error", reason: "embedded message failed validation", cause: err, } @@ -1408,11 +1408,11 @@ func (m *GetFriendRequestResponse) validate(all bool) error { var errors []error if all { - switch v := interface{}(m.GetResponse()).(type) { + switch v := interface{}(m.GetError()).(type) { case interface{ ValidateAll() error }: if err := v.ValidateAll(); err != nil { errors = append(errors, GetFriendRequestResponseValidationError{ - field: "Response", + field: "Error", reason: "embedded message failed validation", cause: err, }) @@ -1420,16 +1420,16 @@ func (m *GetFriendRequestResponse) validate(all bool) error { case interface{ Validate() error }: if err := v.Validate(); err != nil { errors = append(errors, GetFriendRequestResponseValidationError{ - field: "Response", + field: "Error", reason: "embedded message failed validation", cause: err, }) } } - } else if v, ok := interface{}(m.GetResponse()).(interface{ Validate() error }); ok { + } else if v, ok := interface{}(m.GetError()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return GetFriendRequestResponseValidationError{ - field: "Response", + field: "Error", reason: "embedded message failed validation", cause: err, } @@ -1693,11 +1693,11 @@ func (m *QueryFriendRequestListResponse) validate(all bool) error { var errors []error if all { - switch v := interface{}(m.GetResponse()).(type) { + switch v := interface{}(m.GetError()).(type) { case interface{ ValidateAll() error }: if err := v.ValidateAll(); err != nil { errors = append(errors, QueryFriendRequestListResponseValidationError{ - field: "Response", + field: "Error", reason: "embedded message failed validation", cause: err, }) @@ -1705,16 +1705,16 @@ func (m *QueryFriendRequestListResponse) validate(all bool) error { case interface{ Validate() error }: if err := v.Validate(); err != nil { errors = append(errors, QueryFriendRequestListResponseValidationError{ - field: "Response", + field: "Error", reason: "embedded message failed validation", cause: err, }) } } - } else if v, ok := interface{}(m.GetResponse()).(interface{ Validate() error }); ok { + } else if v, ok := interface{}(m.GetError()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return QueryFriendRequestListResponseValidationError{ - field: "Response", + field: "Error", reason: "embedded message failed validation", cause: err, } @@ -1986,11 +1986,11 @@ func (m *CheckSendMessageAbilityResponse) validate(all bool) error { var errors []error if all { - switch v := interface{}(m.GetResponse()).(type) { + switch v := interface{}(m.GetError()).(type) { case interface{ ValidateAll() error }: if err := v.ValidateAll(); err != nil { errors = append(errors, CheckSendMessageAbilityResponseValidationError{ - field: "Response", + field: "Error", reason: "embedded message failed validation", cause: err, }) @@ -1998,16 +1998,16 @@ func (m *CheckSendMessageAbilityResponse) validate(all bool) error { case interface{ Validate() error }: if err := v.Validate(); err != nil { errors = append(errors, CheckSendMessageAbilityResponseValidationError{ - field: "Response", + field: "Error", reason: "embedded message failed validation", cause: err, }) } } - } else if v, ok := interface{}(m.GetResponse()).(interface{ Validate() error }); ok { + } else if v, ok := interface{}(m.GetError()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return CheckSendMessageAbilityResponseValidationError{ - field: "Response", + field: "Error", reason: "embedded message failed validation", cause: err, } diff --git a/user/friend/v1/friend.proto b/user/friend/v1/friend.proto index 7b563d7..563fc72 100644 --- a/user/friend/v1/friend.proto +++ b/user/friend/v1/friend.proto @@ -3,7 +3,7 @@ syntax = "proto3"; package api.user.friend.v1; import "message/v1/message.proto"; -import "transport/response/response.proto"; +import "errors/errors.proto"; import "validate/validate.proto"; option go_package = "github.com/go-goim/api/user/friend/v1"; @@ -36,7 +36,7 @@ message UpdateFriendStatusRequest { } message GetFriendResponse { - transport.response.BaseResponse response = 1; + errors.Error error = 1; Friend friend = 2; } @@ -47,7 +47,7 @@ message QueryFriendListRequest { } message QueryFriendListResponse { - transport.response.BaseResponse response = 1; + errors.Error error = 1; repeated Friend friend_list = 2; } @@ -87,7 +87,7 @@ message BaseFriendRequest { } message AddFriendResponse { - transport.response.BaseResponse response = 1; + errors.Error error = 1; AddFriendResult result = 2; } @@ -118,7 +118,7 @@ enum ConfirmFriendRequestAction { } message GetFriendRequestResponse { - transport.response.BaseResponse response = 1; + errors.Error error = 1; FriendRequest friend_request = 2; } @@ -130,7 +130,7 @@ message QueryFriendRequestListRequest { } message QueryFriendRequestListResponse { - transport.response.BaseResponse response = 1; + errors.Error error = 1; repeated FriendRequest friend_request_list = 2; } @@ -146,20 +146,20 @@ message CheckSendMessageAbilityRequest { } message CheckSendMessageAbilityResponse { - transport.response.BaseResponse response = 1; + errors.Error error = 1; optional string session_id = 2; } service FriendService { // friend request rpc AddFriend(BaseFriendRequest) returns (AddFriendResponse); - rpc ConfirmFriendRequest(ConfirmFriendRequestRequest) returns (transport.response.BaseResponse); + rpc ConfirmFriendRequest(ConfirmFriendRequestRequest) returns (errors.Error); rpc GetFriendRequest(BaseFriendRequest) returns (GetFriendRequestResponse); rpc QueryFriendRequestList(QueryFriendRequestListRequest) returns (QueryFriendRequestListResponse); // friend - rpc UpdateFriendStatus(UpdateFriendStatusRequest) returns (transport.response.BaseResponse); - rpc IsFriend(BaseFriendRequest) returns (transport.response.BaseResponse); + rpc UpdateFriendStatus(UpdateFriendStatusRequest) returns (errors.Error); + rpc IsFriend(BaseFriendRequest) returns (errors.Error); rpc GetFriend(BaseFriendRequest) returns (GetFriendResponse); rpc QueryFriendList(QueryFriendListRequest) returns (QueryFriendListResponse); // check send message ability diff --git a/user/friend/v1/friend_grpc.pb.go b/user/friend/v1/friend_grpc.pb.go index f811d77..42e0b11 100644 --- a/user/friend/v1/friend_grpc.pb.go +++ b/user/friend/v1/friend_grpc.pb.go @@ -4,7 +4,7 @@ package v1 import ( context "context" - response "github.com/go-goim/api/transport/response" + errors "github.com/go-goim/api/errors" grpc "google.golang.org/grpc" codes "google.golang.org/grpc/codes" status "google.golang.org/grpc/status" @@ -21,12 +21,12 @@ const _ = grpc.SupportPackageIsVersion7 type FriendServiceClient interface { // friend request AddFriend(ctx context.Context, in *BaseFriendRequest, opts ...grpc.CallOption) (*AddFriendResponse, error) - ConfirmFriendRequest(ctx context.Context, in *ConfirmFriendRequestRequest, opts ...grpc.CallOption) (*response.BaseResponse, error) + ConfirmFriendRequest(ctx context.Context, in *ConfirmFriendRequestRequest, opts ...grpc.CallOption) (*errors.Error, error) GetFriendRequest(ctx context.Context, in *BaseFriendRequest, opts ...grpc.CallOption) (*GetFriendRequestResponse, error) QueryFriendRequestList(ctx context.Context, in *QueryFriendRequestListRequest, opts ...grpc.CallOption) (*QueryFriendRequestListResponse, error) // friend - UpdateFriendStatus(ctx context.Context, in *UpdateFriendStatusRequest, opts ...grpc.CallOption) (*response.BaseResponse, error) - IsFriend(ctx context.Context, in *BaseFriendRequest, opts ...grpc.CallOption) (*response.BaseResponse, error) + UpdateFriendStatus(ctx context.Context, in *UpdateFriendStatusRequest, opts ...grpc.CallOption) (*errors.Error, error) + IsFriend(ctx context.Context, in *BaseFriendRequest, opts ...grpc.CallOption) (*errors.Error, error) GetFriend(ctx context.Context, in *BaseFriendRequest, opts ...grpc.CallOption) (*GetFriendResponse, error) QueryFriendList(ctx context.Context, in *QueryFriendListRequest, opts ...grpc.CallOption) (*QueryFriendListResponse, error) // check send message ability @@ -52,8 +52,8 @@ func (c *friendServiceClient) AddFriend(ctx context.Context, in *BaseFriendReque return out, nil } -func (c *friendServiceClient) ConfirmFriendRequest(ctx context.Context, in *ConfirmFriendRequestRequest, opts ...grpc.CallOption) (*response.BaseResponse, error) { - out := new(response.BaseResponse) +func (c *friendServiceClient) ConfirmFriendRequest(ctx context.Context, in *ConfirmFriendRequestRequest, opts ...grpc.CallOption) (*errors.Error, error) { + out := new(errors.Error) err := c.cc.Invoke(ctx, "/api.user.friend.v1.FriendService/ConfirmFriendRequest", in, out, opts...) if err != nil { return nil, err @@ -79,8 +79,8 @@ func (c *friendServiceClient) QueryFriendRequestList(ctx context.Context, in *Qu return out, nil } -func (c *friendServiceClient) UpdateFriendStatus(ctx context.Context, in *UpdateFriendStatusRequest, opts ...grpc.CallOption) (*response.BaseResponse, error) { - out := new(response.BaseResponse) +func (c *friendServiceClient) UpdateFriendStatus(ctx context.Context, in *UpdateFriendStatusRequest, opts ...grpc.CallOption) (*errors.Error, error) { + out := new(errors.Error) err := c.cc.Invoke(ctx, "/api.user.friend.v1.FriendService/UpdateFriendStatus", in, out, opts...) if err != nil { return nil, err @@ -88,8 +88,8 @@ func (c *friendServiceClient) UpdateFriendStatus(ctx context.Context, in *Update return out, nil } -func (c *friendServiceClient) IsFriend(ctx context.Context, in *BaseFriendRequest, opts ...grpc.CallOption) (*response.BaseResponse, error) { - out := new(response.BaseResponse) +func (c *friendServiceClient) IsFriend(ctx context.Context, in *BaseFriendRequest, opts ...grpc.CallOption) (*errors.Error, error) { + out := new(errors.Error) err := c.cc.Invoke(ctx, "/api.user.friend.v1.FriendService/IsFriend", in, out, opts...) if err != nil { return nil, err @@ -130,12 +130,12 @@ func (c *friendServiceClient) CheckSendMessageAbility(ctx context.Context, in *C type FriendServiceServer interface { // friend request AddFriend(context.Context, *BaseFriendRequest) (*AddFriendResponse, error) - ConfirmFriendRequest(context.Context, *ConfirmFriendRequestRequest) (*response.BaseResponse, error) + ConfirmFriendRequest(context.Context, *ConfirmFriendRequestRequest) (*errors.Error, error) GetFriendRequest(context.Context, *BaseFriendRequest) (*GetFriendRequestResponse, error) QueryFriendRequestList(context.Context, *QueryFriendRequestListRequest) (*QueryFriendRequestListResponse, error) // friend - UpdateFriendStatus(context.Context, *UpdateFriendStatusRequest) (*response.BaseResponse, error) - IsFriend(context.Context, *BaseFriendRequest) (*response.BaseResponse, error) + UpdateFriendStatus(context.Context, *UpdateFriendStatusRequest) (*errors.Error, error) + IsFriend(context.Context, *BaseFriendRequest) (*errors.Error, error) GetFriend(context.Context, *BaseFriendRequest) (*GetFriendResponse, error) QueryFriendList(context.Context, *QueryFriendListRequest) (*QueryFriendListResponse, error) // check send message ability @@ -152,7 +152,7 @@ type UnimplementedFriendServiceServer struct { func (UnimplementedFriendServiceServer) AddFriend(context.Context, *BaseFriendRequest) (*AddFriendResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method AddFriend not implemented") } -func (UnimplementedFriendServiceServer) ConfirmFriendRequest(context.Context, *ConfirmFriendRequestRequest) (*response.BaseResponse, error) { +func (UnimplementedFriendServiceServer) ConfirmFriendRequest(context.Context, *ConfirmFriendRequestRequest) (*errors.Error, error) { return nil, status.Errorf(codes.Unimplemented, "method ConfirmFriendRequest not implemented") } func (UnimplementedFriendServiceServer) GetFriendRequest(context.Context, *BaseFriendRequest) (*GetFriendRequestResponse, error) { @@ -161,10 +161,10 @@ func (UnimplementedFriendServiceServer) GetFriendRequest(context.Context, *BaseF func (UnimplementedFriendServiceServer) QueryFriendRequestList(context.Context, *QueryFriendRequestListRequest) (*QueryFriendRequestListResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method QueryFriendRequestList not implemented") } -func (UnimplementedFriendServiceServer) UpdateFriendStatus(context.Context, *UpdateFriendStatusRequest) (*response.BaseResponse, error) { +func (UnimplementedFriendServiceServer) UpdateFriendStatus(context.Context, *UpdateFriendStatusRequest) (*errors.Error, error) { return nil, status.Errorf(codes.Unimplemented, "method UpdateFriendStatus not implemented") } -func (UnimplementedFriendServiceServer) IsFriend(context.Context, *BaseFriendRequest) (*response.BaseResponse, error) { +func (UnimplementedFriendServiceServer) IsFriend(context.Context, *BaseFriendRequest) (*errors.Error, error) { return nil, status.Errorf(codes.Unimplemented, "method IsFriend not implemented") } func (UnimplementedFriendServiceServer) GetFriend(context.Context, *BaseFriendRequest) (*GetFriendResponse, error) { diff --git a/user/group/v1/group.pb.go b/user/group/v1/group.pb.go index 0013e5c..2726cfb 100644 --- a/user/group/v1/group.pb.go +++ b/user/group/v1/group.pb.go @@ -7,7 +7,7 @@ package v1 import ( - response "github.com/go-goim/api/transport/response" + errors "github.com/go-goim/api/errors" v1 "github.com/go-goim/api/user/v1" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" @@ -434,8 +434,8 @@ type GetGroupResponse struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Response *response.BaseResponse `protobuf:"bytes,1,opt,name=response,proto3" json:"response,omitempty"` - Group *Group `protobuf:"bytes,2,opt,name=group,proto3" json:"group,omitempty"` + Error *errors.Error `protobuf:"bytes,1,opt,name=error,proto3" json:"error,omitempty"` + Group *Group `protobuf:"bytes,2,opt,name=group,proto3" json:"group,omitempty"` } func (x *GetGroupResponse) Reset() { @@ -470,9 +470,9 @@ func (*GetGroupResponse) Descriptor() ([]byte, []int) { return file_user_group_v1_group_proto_rawDescGZIP(), []int{3} } -func (x *GetGroupResponse) GetResponse() *response.BaseResponse { +func (x *GetGroupResponse) GetError() *errors.Error { if x != nil { - return x.Response + return x.Error } return nil } @@ -553,8 +553,8 @@ type ListGroupsResponse struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Response *response.BaseResponse `protobuf:"bytes,1,opt,name=response,proto3" json:"response,omitempty"` - Groups []*Group `protobuf:"bytes,2,rep,name=groups,proto3" json:"groups,omitempty"` + Error *errors.Error `protobuf:"bytes,1,opt,name=error,proto3" json:"error,omitempty"` + Groups []*Group `protobuf:"bytes,2,rep,name=groups,proto3" json:"groups,omitempty"` } func (x *ListGroupsResponse) Reset() { @@ -589,9 +589,9 @@ func (*ListGroupsResponse) Descriptor() ([]byte, []int) { return file_user_group_v1_group_proto_rawDescGZIP(), []int{5} } -func (x *ListGroupsResponse) GetResponse() *response.BaseResponse { +func (x *ListGroupsResponse) GetError() *errors.Error { if x != nil { - return x.Response + return x.Error } return nil } @@ -687,8 +687,8 @@ type CreateGroupResponse struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Response *response.BaseResponse `protobuf:"bytes,1,opt,name=response,proto3" json:"response,omitempty"` - Group *Group `protobuf:"bytes,2,opt,name=group,proto3" json:"group,omitempty"` + Error *errors.Error `protobuf:"bytes,1,opt,name=error,proto3" json:"error,omitempty"` + Group *Group `protobuf:"bytes,2,opt,name=group,proto3" json:"group,omitempty"` } func (x *CreateGroupResponse) Reset() { @@ -723,9 +723,9 @@ func (*CreateGroupResponse) Descriptor() ([]byte, []int) { return file_user_group_v1_group_proto_rawDescGZIP(), []int{7} } -func (x *CreateGroupResponse) GetResponse() *response.BaseResponse { +func (x *CreateGroupResponse) GetError() *errors.Error { if x != nil { - return x.Response + return x.Error } return nil } @@ -821,8 +821,8 @@ type UpdateGroupResponse struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Response *response.BaseResponse `protobuf:"bytes,1,opt,name=response,proto3" json:"response,omitempty"` - Group *Group `protobuf:"bytes,2,opt,name=group,proto3" json:"group,omitempty"` + Error *errors.Error `protobuf:"bytes,1,opt,name=error,proto3" json:"error,omitempty"` + Group *Group `protobuf:"bytes,2,opt,name=group,proto3" json:"group,omitempty"` } func (x *UpdateGroupResponse) Reset() { @@ -857,9 +857,9 @@ func (*UpdateGroupResponse) Descriptor() ([]byte, []int) { return file_user_group_v1_group_proto_rawDescGZIP(), []int{9} } -func (x *UpdateGroupResponse) GetResponse() *response.BaseResponse { +func (x *UpdateGroupResponse) GetError() *errors.Error { if x != nil { - return x.Response + return x.Error } return nil } @@ -995,8 +995,8 @@ type ChangeGroupMemberResponse struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Response *response.BaseResponse `protobuf:"bytes,1,opt,name=response,proto3" json:"response,omitempty"` - Count int32 `protobuf:"varint,2,opt,name=count,proto3" json:"count,omitempty"` // count of members changed + Error *errors.Error `protobuf:"bytes,1,opt,name=error,proto3" json:"error,omitempty"` + Count int32 `protobuf:"varint,2,opt,name=count,proto3" json:"count,omitempty"` // count of members changed } func (x *ChangeGroupMemberResponse) Reset() { @@ -1031,9 +1031,9 @@ func (*ChangeGroupMemberResponse) Descriptor() ([]byte, []int) { return file_user_group_v1_group_proto_rawDescGZIP(), []int{12} } -func (x *ChangeGroupMemberResponse) GetResponse() *response.BaseResponse { +func (x *ChangeGroupMemberResponse) GetError() *errors.Error { if x != nil { - return x.Response + return x.Error } return nil } @@ -1050,191 +1050,181 @@ var File_user_group_v1_group_proto protoreflect.FileDescriptor var file_user_group_v1_group_proto_rawDesc = []byte{ 0x0a, 0x19, 0x75, 0x73, 0x65, 0x72, 0x2f, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2f, 0x76, 0x31, 0x2f, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x11, 0x61, 0x70, 0x69, - 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2e, 0x76, 0x31, 0x1a, 0x21, - 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x2f, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x2f, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x1a, 0x12, 0x75, 0x73, 0x65, 0x72, 0x2f, 0x76, 0x31, 0x2f, 0x75, 0x73, 0x65, 0x72, 0x2e, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xff, 0x02, 0x0a, 0x05, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x12, - 0x10, 0x0a, 0x03, 0x67, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x03, 0x67, 0x69, - 0x64, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, - 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, 0x65, 0x73, 0x63, - 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x16, 0x0a, 0x06, 0x61, 0x76, 0x61, 0x74, 0x61, - 0x72, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x61, 0x76, 0x61, 0x74, 0x61, 0x72, 0x12, - 0x1b, 0x0a, 0x09, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x5f, 0x75, 0x69, 0x64, 0x18, 0x06, 0x20, 0x01, - 0x28, 0x03, 0x52, 0x08, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x55, 0x69, 0x64, 0x12, 0x39, 0x0a, 0x05, - 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x61, 0x70, - 0x69, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2e, 0x76, 0x31, 0x2e, - 0x47, 0x72, 0x6f, 0x75, 0x70, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x48, 0x00, 0x52, 0x05, 0x6f, - 0x77, 0x6e, 0x65, 0x72, 0x88, 0x01, 0x01, 0x12, 0x38, 0x0a, 0x07, 0x6d, 0x65, 0x6d, 0x62, 0x65, - 0x72, 0x73, 0x18, 0x08, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x75, - 0x73, 0x65, 0x72, 0x2e, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x72, 0x6f, - 0x75, 0x70, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x52, 0x07, 0x6d, 0x65, 0x6d, 0x62, 0x65, 0x72, - 0x73, 0x12, 0x1f, 0x0a, 0x0b, 0x6d, 0x61, 0x78, 0x5f, 0x6d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x73, - 0x18, 0x09, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0a, 0x6d, 0x61, 0x78, 0x4d, 0x65, 0x6d, 0x62, 0x65, - 0x72, 0x73, 0x12, 0x21, 0x0a, 0x0c, 0x6d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x5f, 0x63, 0x6f, 0x75, - 0x6e, 0x74, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0b, 0x6d, 0x65, 0x6d, 0x62, 0x65, 0x72, - 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x36, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, - 0x0b, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1e, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x75, 0x73, 0x65, 0x72, - 0x2e, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x53, - 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x42, 0x08, 0x0a, - 0x06, 0x5f, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x22, 0xb3, 0x02, 0x0a, 0x0b, 0x47, 0x72, 0x6f, 0x75, - 0x70, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x12, 0x10, 0x0a, 0x03, 0x67, 0x69, 0x64, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x03, 0x52, 0x03, 0x67, 0x69, 0x64, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x69, 0x64, - 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x03, 0x75, 0x69, 0x64, 0x12, 0x2a, 0x0a, 0x04, 0x75, - 0x73, 0x65, 0x72, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x61, 0x70, 0x69, 0x2e, - 0x75, 0x73, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x48, 0x00, 0x52, 0x04, - 0x75, 0x73, 0x65, 0x72, 0x88, 0x01, 0x01, 0x12, 0x3d, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, - 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x25, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x75, 0x73, + 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2e, 0x76, 0x31, 0x1a, 0x13, + 0x65, 0x72, 0x72, 0x6f, 0x72, 0x73, 0x2f, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x73, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x1a, 0x12, 0x75, 0x73, 0x65, 0x72, 0x2f, 0x76, 0x31, 0x2f, 0x75, 0x73, 0x65, + 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xff, 0x02, 0x0a, 0x05, 0x47, 0x72, 0x6f, 0x75, + 0x70, 0x12, 0x10, 0x0a, 0x03, 0x67, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x03, + 0x67, 0x69, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, + 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, 0x65, + 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x16, 0x0a, 0x06, 0x61, 0x76, 0x61, + 0x74, 0x61, 0x72, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x61, 0x76, 0x61, 0x74, 0x61, + 0x72, 0x12, 0x1b, 0x0a, 0x09, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x5f, 0x75, 0x69, 0x64, 0x18, 0x06, + 0x20, 0x01, 0x28, 0x03, 0x52, 0x08, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x55, 0x69, 0x64, 0x12, 0x39, + 0x0a, 0x05, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1e, 0x2e, + 0x61, 0x70, 0x69, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2e, 0x76, + 0x31, 0x2e, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x48, 0x00, 0x52, + 0x05, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x88, 0x01, 0x01, 0x12, 0x38, 0x0a, 0x07, 0x6d, 0x65, 0x6d, + 0x62, 0x65, 0x72, 0x73, 0x18, 0x08, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x61, 0x70, 0x69, + 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2e, 0x76, 0x31, 0x2e, 0x47, + 0x72, 0x6f, 0x75, 0x70, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x52, 0x07, 0x6d, 0x65, 0x6d, 0x62, + 0x65, 0x72, 0x73, 0x12, 0x1f, 0x0a, 0x0b, 0x6d, 0x61, 0x78, 0x5f, 0x6d, 0x65, 0x6d, 0x62, 0x65, + 0x72, 0x73, 0x18, 0x09, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0a, 0x6d, 0x61, 0x78, 0x4d, 0x65, 0x6d, + 0x62, 0x65, 0x72, 0x73, 0x12, 0x21, 0x0a, 0x0c, 0x6d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x5f, 0x63, + 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0b, 0x6d, 0x65, 0x6d, 0x62, + 0x65, 0x72, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x36, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, + 0x73, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1e, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x72, 0x6f, 0x75, - 0x70, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x06, - 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x37, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x06, - 0x20, 0x01, 0x28, 0x0e, 0x32, 0x23, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, - 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x4d, 0x65, - 0x6d, 0x62, 0x65, 0x72, 0x2e, 0x54, 0x79, 0x70, 0x65, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x22, - 0x2c, 0x0a, 0x06, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x10, 0x0a, 0x0c, 0x53, 0x74, 0x61, - 0x74, 0x75, 0x73, 0x41, 0x63, 0x74, 0x69, 0x76, 0x65, 0x10, 0x00, 0x12, 0x10, 0x0a, 0x0c, 0x53, - 0x74, 0x61, 0x74, 0x75, 0x73, 0x53, 0x69, 0x6c, 0x65, 0x6e, 0x74, 0x10, 0x01, 0x22, 0x25, 0x0a, - 0x04, 0x54, 0x79, 0x70, 0x65, 0x12, 0x0d, 0x0a, 0x09, 0x54, 0x79, 0x70, 0x65, 0x4f, 0x77, 0x6e, - 0x65, 0x72, 0x10, 0x00, 0x12, 0x0e, 0x0a, 0x0a, 0x54, 0x79, 0x70, 0x65, 0x4d, 0x65, 0x6d, 0x62, - 0x65, 0x72, 0x10, 0x01, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x75, 0x73, 0x65, 0x72, 0x22, 0x80, 0x01, - 0x0a, 0x0f, 0x47, 0x65, 0x74, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x12, 0x10, 0x0a, 0x03, 0x67, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x03, - 0x67, 0x69, 0x64, 0x12, 0x1b, 0x0a, 0x09, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x5f, 0x75, 0x69, 0x64, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x08, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x55, 0x69, 0x64, - 0x12, 0x21, 0x0a, 0x0c, 0x77, 0x69, 0x74, 0x68, 0x5f, 0x6d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x73, - 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0b, 0x77, 0x69, 0x74, 0x68, 0x4d, 0x65, 0x6d, 0x62, - 0x65, 0x72, 0x73, 0x12, 0x1b, 0x0a, 0x09, 0x77, 0x69, 0x74, 0x68, 0x5f, 0x69, 0x6e, 0x66, 0x6f, - 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, 0x08, 0x77, 0x69, 0x74, 0x68, 0x49, 0x6e, 0x66, 0x6f, - 0x22, 0x84, 0x01, 0x0a, 0x10, 0x47, 0x65, 0x74, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x40, 0x0a, 0x08, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x74, 0x72, - 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x2e, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x2e, 0x42, 0x61, 0x73, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x52, 0x08, 0x72, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x2e, 0x0a, 0x05, 0x67, 0x72, 0x6f, 0x75, 0x70, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x75, 0x73, 0x65, + 0x70, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x42, + 0x08, 0x0a, 0x06, 0x5f, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x22, 0xb3, 0x02, 0x0a, 0x0b, 0x47, 0x72, + 0x6f, 0x75, 0x70, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x12, 0x10, 0x0a, 0x03, 0x67, 0x69, 0x64, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x03, 0x67, 0x69, 0x64, 0x12, 0x10, 0x0a, 0x03, 0x75, + 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x03, 0x75, 0x69, 0x64, 0x12, 0x2a, 0x0a, + 0x04, 0x75, 0x73, 0x65, 0x72, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x61, 0x70, + 0x69, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x48, 0x00, + 0x52, 0x04, 0x75, 0x73, 0x65, 0x72, 0x88, 0x01, 0x01, 0x12, 0x3d, 0x0a, 0x06, 0x73, 0x74, 0x61, + 0x74, 0x75, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x25, 0x2e, 0x61, 0x70, 0x69, 0x2e, + 0x75, 0x73, 0x65, 0x72, 0x2e, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x72, + 0x6f, 0x75, 0x70, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, + 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x37, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, + 0x18, 0x06, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x23, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x72, 0x6f, 0x75, 0x70, - 0x52, 0x05, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x22, 0x56, 0x0a, 0x11, 0x4c, 0x69, 0x73, 0x74, 0x47, - 0x72, 0x6f, 0x75, 0x70, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x10, 0x0a, 0x03, - 0x75, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x03, 0x75, 0x69, 0x64, 0x12, 0x12, - 0x0a, 0x04, 0x70, 0x61, 0x67, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x04, 0x70, 0x61, - 0x67, 0x65, 0x12, 0x1b, 0x0a, 0x09, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x18, - 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x70, 0x61, 0x67, 0x65, 0x53, 0x69, 0x7a, 0x65, 0x22, - 0x88, 0x01, 0x0a, 0x12, 0x4c, 0x69, 0x73, 0x74, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x73, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x40, 0x0a, 0x08, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x74, - 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x2e, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x2e, 0x42, 0x61, 0x73, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x52, 0x08, - 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x30, 0x0a, 0x06, 0x67, 0x72, 0x6f, 0x75, - 0x70, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x75, - 0x73, 0x65, 0x72, 0x2e, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x72, 0x6f, - 0x75, 0x70, 0x52, 0x06, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x73, 0x22, 0xa0, 0x01, 0x0a, 0x12, 0x43, - 0x72, 0x65, 0x61, 0x74, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 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, 0x20, 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, - 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, 0x65, 0x73, 0x63, - 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x16, 0x0a, 0x06, 0x61, 0x76, 0x61, 0x74, 0x61, - 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x61, 0x76, 0x61, 0x74, 0x61, 0x72, 0x12, - 0x1b, 0x0a, 0x09, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x5f, 0x75, 0x69, 0x64, 0x18, 0x04, 0x20, 0x01, - 0x28, 0x03, 0x52, 0x08, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x55, 0x69, 0x64, 0x12, 0x1f, 0x0a, 0x0b, - 0x6d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x73, 0x5f, 0x75, 0x69, 0x64, 0x18, 0x05, 0x20, 0x03, 0x28, - 0x03, 0x52, 0x0a, 0x6d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x73, 0x55, 0x69, 0x64, 0x22, 0x87, 0x01, - 0x0a, 0x13, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x40, 0x0a, 0x08, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x74, 0x72, - 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x2e, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x2e, 0x42, 0x61, 0x73, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x52, 0x08, 0x72, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x2e, 0x0a, 0x05, 0x67, 0x72, 0x6f, 0x75, 0x70, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x75, 0x73, 0x65, + 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x2e, 0x54, 0x79, 0x70, 0x65, 0x52, 0x04, 0x74, 0x79, 0x70, + 0x65, 0x22, 0x2c, 0x0a, 0x06, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x10, 0x0a, 0x0c, 0x53, + 0x74, 0x61, 0x74, 0x75, 0x73, 0x41, 0x63, 0x74, 0x69, 0x76, 0x65, 0x10, 0x00, 0x12, 0x10, 0x0a, + 0x0c, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x53, 0x69, 0x6c, 0x65, 0x6e, 0x74, 0x10, 0x01, 0x22, + 0x25, 0x0a, 0x04, 0x54, 0x79, 0x70, 0x65, 0x12, 0x0d, 0x0a, 0x09, 0x54, 0x79, 0x70, 0x65, 0x4f, + 0x77, 0x6e, 0x65, 0x72, 0x10, 0x00, 0x12, 0x0e, 0x0a, 0x0a, 0x54, 0x79, 0x70, 0x65, 0x4d, 0x65, + 0x6d, 0x62, 0x65, 0x72, 0x10, 0x01, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x75, 0x73, 0x65, 0x72, 0x22, + 0x80, 0x01, 0x0a, 0x0f, 0x47, 0x65, 0x74, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x12, 0x10, 0x0a, 0x03, 0x67, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, + 0x52, 0x03, 0x67, 0x69, 0x64, 0x12, 0x1b, 0x0a, 0x09, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x5f, 0x75, + 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x08, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x55, + 0x69, 0x64, 0x12, 0x21, 0x0a, 0x0c, 0x77, 0x69, 0x74, 0x68, 0x5f, 0x6d, 0x65, 0x6d, 0x62, 0x65, + 0x72, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0b, 0x77, 0x69, 0x74, 0x68, 0x4d, 0x65, + 0x6d, 0x62, 0x65, 0x72, 0x73, 0x12, 0x1b, 0x0a, 0x09, 0x77, 0x69, 0x74, 0x68, 0x5f, 0x69, 0x6e, + 0x66, 0x6f, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, 0x08, 0x77, 0x69, 0x74, 0x68, 0x49, 0x6e, + 0x66, 0x6f, 0x22, 0x6b, 0x0a, 0x10, 0x47, 0x65, 0x74, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x27, 0x0a, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x65, 0x72, 0x72, 0x6f, + 0x72, 0x73, 0x2e, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x52, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x12, + 0x2e, 0x0a, 0x05, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x18, + 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2e, + 0x76, 0x31, 0x2e, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x52, 0x05, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x22, + 0x56, 0x0a, 0x11, 0x4c, 0x69, 0x73, 0x74, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x73, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x03, 0x52, 0x03, 0x75, 0x69, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x70, 0x61, 0x67, 0x65, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x05, 0x52, 0x04, 0x70, 0x61, 0x67, 0x65, 0x12, 0x1b, 0x0a, 0x09, 0x70, 0x61, + 0x67, 0x65, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x70, + 0x61, 0x67, 0x65, 0x53, 0x69, 0x7a, 0x65, 0x22, 0x6f, 0x0a, 0x12, 0x4c, 0x69, 0x73, 0x74, 0x47, + 0x72, 0x6f, 0x75, 0x70, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x27, 0x0a, + 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x61, + 0x70, 0x69, 0x2e, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x73, 0x2e, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x52, + 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x12, 0x30, 0x0a, 0x06, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x73, + 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x72, 0x6f, 0x75, 0x70, - 0x52, 0x05, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x22, 0xc4, 0x01, 0x0a, 0x12, 0x55, 0x70, 0x64, 0x61, - 0x74, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x10, - 0x0a, 0x03, 0x67, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x03, 0x67, 0x69, 0x64, - 0x12, 0x17, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, - 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x88, 0x01, 0x01, 0x12, 0x25, 0x0a, 0x0b, 0x64, 0x65, 0x73, - 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x48, 0x01, - 0x52, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x88, 0x01, 0x01, - 0x12, 0x1b, 0x0a, 0x06, 0x61, 0x76, 0x61, 0x74, 0x61, 0x72, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, - 0x48, 0x02, 0x52, 0x06, 0x61, 0x76, 0x61, 0x74, 0x61, 0x72, 0x88, 0x01, 0x01, 0x12, 0x1b, 0x0a, - 0x09, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x5f, 0x75, 0x69, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x03, - 0x52, 0x08, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x55, 0x69, 0x64, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x6e, - 0x61, 0x6d, 0x65, 0x42, 0x0e, 0x0a, 0x0c, 0x5f, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, - 0x69, 0x6f, 0x6e, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x61, 0x76, 0x61, 0x74, 0x61, 0x72, 0x22, 0x87, - 0x01, 0x0a, 0x13, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x40, 0x0a, 0x08, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x74, - 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x2e, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x2e, 0x42, 0x61, 0x73, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x52, 0x08, - 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x2e, 0x0a, 0x05, 0x67, 0x72, 0x6f, 0x75, - 0x70, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x75, 0x73, - 0x65, 0x72, 0x2e, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x72, 0x6f, 0x75, - 0x70, 0x52, 0x05, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x22, 0x43, 0x0a, 0x12, 0x44, 0x65, 0x6c, 0x65, - 0x74, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x10, - 0x0a, 0x03, 0x67, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x03, 0x67, 0x69, 0x64, - 0x12, 0x1b, 0x0a, 0x09, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x5f, 0x75, 0x69, 0x64, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x03, 0x52, 0x08, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x55, 0x69, 0x64, 0x22, 0x5d, 0x0a, - 0x18, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x4d, 0x65, 0x6d, 0x62, - 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x10, 0x0a, 0x03, 0x67, 0x69, 0x64, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x03, 0x67, 0x69, 0x64, 0x12, 0x1b, 0x0a, 0x09, 0x6f, - 0x77, 0x6e, 0x65, 0x72, 0x5f, 0x75, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x08, - 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x55, 0x69, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x75, 0x69, 0x64, 0x73, - 0x18, 0x03, 0x20, 0x03, 0x28, 0x03, 0x52, 0x04, 0x75, 0x69, 0x64, 0x73, 0x22, 0x73, 0x0a, 0x19, - 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x4d, 0x65, 0x6d, 0x62, 0x65, - 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x40, 0x0a, 0x08, 0x72, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x61, 0x70, - 0x69, 0x2e, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x2e, 0x72, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x42, 0x61, 0x73, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x52, 0x08, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x63, - 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x63, 0x6f, 0x75, 0x6e, - 0x74, 0x2a, 0x25, 0x0a, 0x0b, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, - 0x12, 0x0a, 0x0a, 0x06, 0x41, 0x63, 0x74, 0x69, 0x76, 0x65, 0x10, 0x00, 0x12, 0x0a, 0x0a, 0x06, - 0x53, 0x69, 0x6c, 0x65, 0x6e, 0x74, 0x10, 0x01, 0x32, 0xb3, 0x05, 0x0a, 0x0c, 0x47, 0x72, 0x6f, - 0x75, 0x70, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x53, 0x0a, 0x08, 0x47, 0x65, 0x74, - 0x47, 0x72, 0x6f, 0x75, 0x70, 0x12, 0x22, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x75, 0x73, 0x65, 0x72, - 0x2e, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x47, 0x72, 0x6f, - 0x75, 0x70, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x23, 0x2e, 0x61, 0x70, 0x69, 0x2e, - 0x75, 0x73, 0x65, 0x72, 0x2e, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, - 0x74, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x59, - 0x0a, 0x0a, 0x4c, 0x69, 0x73, 0x74, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x73, 0x12, 0x24, 0x2e, 0x61, - 0x70, 0x69, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2e, 0x76, 0x31, - 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x1a, 0x25, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x67, 0x72, - 0x6f, 0x75, 0x70, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x47, 0x72, 0x6f, 0x75, 0x70, - 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x5c, 0x0a, 0x0b, 0x43, 0x72, 0x65, - 0x61, 0x74, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x12, 0x25, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x75, - 0x73, 0x65, 0x72, 0x2e, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x72, 0x65, - 0x61, 0x74, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, - 0x26, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x67, 0x72, 0x6f, 0x75, 0x70, - 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x5c, 0x0a, 0x0b, 0x55, 0x70, 0x64, 0x61, 0x74, - 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x12, 0x25, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x75, 0x73, 0x65, - 0x72, 0x2e, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, - 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x26, 0x2e, + 0x52, 0x06, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x73, 0x22, 0xa0, 0x01, 0x0a, 0x12, 0x43, 0x72, 0x65, + 0x61, 0x74, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 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, 0x20, 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, + 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, + 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x16, 0x0a, 0x06, 0x61, 0x76, 0x61, 0x74, 0x61, 0x72, 0x18, + 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x61, 0x76, 0x61, 0x74, 0x61, 0x72, 0x12, 0x1b, 0x0a, + 0x09, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x5f, 0x75, 0x69, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, + 0x52, 0x08, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x55, 0x69, 0x64, 0x12, 0x1f, 0x0a, 0x0b, 0x6d, 0x65, + 0x6d, 0x62, 0x65, 0x72, 0x73, 0x5f, 0x75, 0x69, 0x64, 0x18, 0x05, 0x20, 0x03, 0x28, 0x03, 0x52, + 0x0a, 0x6d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x73, 0x55, 0x69, 0x64, 0x22, 0x6e, 0x0a, 0x13, 0x43, + 0x72, 0x65, 0x61, 0x74, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x12, 0x27, 0x0a, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x11, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x73, 0x2e, 0x45, + 0x72, 0x72, 0x6f, 0x72, 0x52, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x12, 0x2e, 0x0a, 0x05, 0x67, + 0x72, 0x6f, 0x75, 0x70, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x61, 0x70, 0x69, + 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2e, 0x76, 0x31, 0x2e, 0x47, + 0x72, 0x6f, 0x75, 0x70, 0x52, 0x05, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x22, 0xc4, 0x01, 0x0a, 0x12, + 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x12, 0x10, 0x0a, 0x03, 0x67, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, + 0x03, 0x67, 0x69, 0x64, 0x12, 0x17, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x09, 0x48, 0x00, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x88, 0x01, 0x01, 0x12, 0x25, 0x0a, + 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, + 0x28, 0x09, 0x48, 0x01, 0x52, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, + 0x6e, 0x88, 0x01, 0x01, 0x12, 0x1b, 0x0a, 0x06, 0x61, 0x76, 0x61, 0x74, 0x61, 0x72, 0x18, 0x04, + 0x20, 0x01, 0x28, 0x09, 0x48, 0x02, 0x52, 0x06, 0x61, 0x76, 0x61, 0x74, 0x61, 0x72, 0x88, 0x01, + 0x01, 0x12, 0x1b, 0x0a, 0x09, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x5f, 0x75, 0x69, 0x64, 0x18, 0x05, + 0x20, 0x01, 0x28, 0x03, 0x52, 0x08, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x55, 0x69, 0x64, 0x42, 0x07, + 0x0a, 0x05, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x42, 0x0e, 0x0a, 0x0c, 0x5f, 0x64, 0x65, 0x73, 0x63, + 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x61, 0x76, 0x61, 0x74, + 0x61, 0x72, 0x22, 0x6e, 0x0a, 0x13, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x47, 0x72, 0x6f, 0x75, + 0x70, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x27, 0x0a, 0x05, 0x65, 0x72, 0x72, + 0x6f, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x65, + 0x72, 0x72, 0x6f, 0x72, 0x73, 0x2e, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x52, 0x05, 0x65, 0x72, 0x72, + 0x6f, 0x72, 0x12, 0x2e, 0x0a, 0x05, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x18, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x67, 0x72, 0x6f, + 0x75, 0x70, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x52, 0x05, 0x67, 0x72, 0x6f, + 0x75, 0x70, 0x22, 0x43, 0x0a, 0x12, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x47, 0x72, 0x6f, 0x75, + 0x70, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x10, 0x0a, 0x03, 0x67, 0x69, 0x64, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x03, 0x67, 0x69, 0x64, 0x12, 0x1b, 0x0a, 0x09, 0x6f, 0x77, + 0x6e, 0x65, 0x72, 0x5f, 0x75, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x08, 0x6f, + 0x77, 0x6e, 0x65, 0x72, 0x55, 0x69, 0x64, 0x22, 0x5d, 0x0a, 0x18, 0x43, 0x68, 0x61, 0x6e, 0x67, + 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x12, 0x10, 0x0a, 0x03, 0x67, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, + 0x52, 0x03, 0x67, 0x69, 0x64, 0x12, 0x1b, 0x0a, 0x09, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x5f, 0x75, + 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x08, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x55, + 0x69, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x75, 0x69, 0x64, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x03, + 0x52, 0x04, 0x75, 0x69, 0x64, 0x73, 0x22, 0x5a, 0x0a, 0x19, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, + 0x47, 0x72, 0x6f, 0x75, 0x70, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x12, 0x27, 0x0a, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x73, 0x2e, + 0x45, 0x72, 0x72, 0x6f, 0x72, 0x52, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x12, 0x14, 0x0a, 0x05, + 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x63, 0x6f, 0x75, + 0x6e, 0x74, 0x2a, 0x25, 0x0a, 0x0b, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x53, 0x74, 0x61, 0x74, 0x75, + 0x73, 0x12, 0x0a, 0x0a, 0x06, 0x41, 0x63, 0x74, 0x69, 0x76, 0x65, 0x10, 0x00, 0x12, 0x0a, 0x0a, + 0x06, 0x53, 0x69, 0x6c, 0x65, 0x6e, 0x74, 0x10, 0x01, 0x32, 0xa0, 0x05, 0x0a, 0x0c, 0x47, 0x72, + 0x6f, 0x75, 0x70, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x53, 0x0a, 0x08, 0x47, 0x65, + 0x74, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x12, 0x22, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x75, 0x73, 0x65, + 0x72, 0x2e, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x47, 0x72, + 0x6f, 0x75, 0x70, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x23, 0x2e, 0x61, 0x70, 0x69, + 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2e, 0x76, 0x31, 0x2e, 0x47, + 0x65, 0x74, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, + 0x59, 0x0a, 0x0a, 0x4c, 0x69, 0x73, 0x74, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x73, 0x12, 0x24, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2e, 0x76, - 0x31, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x5a, 0x0a, 0x0b, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x47, - 0x72, 0x6f, 0x75, 0x70, 0x12, 0x25, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, - 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x47, - 0x72, 0x6f, 0x75, 0x70, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x24, 0x2e, 0x61, 0x70, - 0x69, 0x2e, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x2e, 0x72, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x42, 0x61, 0x73, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x12, 0x6b, 0x0a, 0x0e, 0x41, 0x64, 0x64, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x4d, 0x65, 0x6d, - 0x62, 0x65, 0x72, 0x12, 0x2b, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x67, - 0x72, 0x6f, 0x75, 0x70, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x47, 0x72, - 0x6f, 0x75, 0x70, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x1a, 0x2c, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x67, 0x72, 0x6f, 0x75, - 0x70, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, - 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x6e, - 0x0a, 0x11, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x4d, 0x65, 0x6d, - 0x62, 0x65, 0x72, 0x12, 0x2b, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x67, - 0x72, 0x6f, 0x75, 0x70, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x47, 0x72, - 0x6f, 0x75, 0x70, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x1a, 0x2c, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x67, 0x72, 0x6f, 0x75, - 0x70, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, - 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0x26, - 0x5a, 0x24, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x67, 0x6f, 0x2d, - 0x67, 0x6f, 0x69, 0x6d, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x75, 0x73, 0x65, 0x72, 0x2f, 0x67, 0x72, - 0x6f, 0x75, 0x70, 0x2f, 0x76, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x73, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x1a, 0x25, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x67, + 0x72, 0x6f, 0x75, 0x70, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x47, 0x72, 0x6f, 0x75, + 0x70, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x5c, 0x0a, 0x0b, 0x43, 0x72, + 0x65, 0x61, 0x74, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x12, 0x25, 0x2e, 0x61, 0x70, 0x69, 0x2e, + 0x75, 0x73, 0x65, 0x72, 0x2e, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x72, + 0x65, 0x61, 0x74, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x1a, 0x26, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x67, 0x72, 0x6f, 0x75, + 0x70, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x5c, 0x0a, 0x0b, 0x55, 0x70, 0x64, 0x61, + 0x74, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x12, 0x25, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x75, 0x73, + 0x65, 0x72, 0x2e, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x70, 0x64, 0x61, + 0x74, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x26, + 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2e, + 0x76, 0x31, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x47, 0x0a, 0x0b, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, + 0x47, 0x72, 0x6f, 0x75, 0x70, 0x12, 0x25, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x75, 0x73, 0x65, 0x72, + 0x2e, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, + 0x47, 0x72, 0x6f, 0x75, 0x70, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x11, 0x2e, 0x61, + 0x70, 0x69, 0x2e, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x73, 0x2e, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x12, + 0x6b, 0x0a, 0x0e, 0x41, 0x64, 0x64, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x4d, 0x65, 0x6d, 0x62, 0x65, + 0x72, 0x12, 0x2b, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x67, 0x72, 0x6f, + 0x75, 0x70, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x47, 0x72, 0x6f, 0x75, + 0x70, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2c, + 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2e, + 0x76, 0x31, 0x2e, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x4d, 0x65, + 0x6d, 0x62, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x6e, 0x0a, 0x11, + 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x4d, 0x65, 0x6d, 0x62, 0x65, + 0x72, 0x12, 0x2b, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x67, 0x72, 0x6f, + 0x75, 0x70, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x47, 0x72, 0x6f, 0x75, + 0x70, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2c, + 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2e, + 0x76, 0x31, 0x2e, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x4d, 0x65, + 0x6d, 0x62, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0x26, 0x5a, 0x24, + 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x67, 0x6f, 0x2d, 0x67, 0x6f, + 0x69, 0x6d, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x75, 0x73, 0x65, 0x72, 0x2f, 0x67, 0x72, 0x6f, 0x75, + 0x70, 0x2f, 0x76, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -1269,7 +1259,7 @@ var file_user_group_v1_group_proto_goTypes = []interface{}{ (*ChangeGroupMemberRequest)(nil), // 14: api.user.group.v1.ChangeGroupMemberRequest (*ChangeGroupMemberResponse)(nil), // 15: api.user.group.v1.ChangeGroupMemberResponse (*v1.User)(nil), // 16: api.user.v1.User - (*response.BaseResponse)(nil), // 17: api.transport.response.BaseResponse + (*errors.Error)(nil), // 17: api.errors.Error } var file_user_group_v1_group_proto_depIdxs = []int32{ 4, // 0: api.user.group.v1.Group.owner:type_name -> api.user.group.v1.GroupMember @@ -1278,15 +1268,15 @@ var file_user_group_v1_group_proto_depIdxs = []int32{ 16, // 3: api.user.group.v1.GroupMember.user:type_name -> api.user.v1.User 1, // 4: api.user.group.v1.GroupMember.status:type_name -> api.user.group.v1.GroupMember.Status 2, // 5: api.user.group.v1.GroupMember.type:type_name -> api.user.group.v1.GroupMember.Type - 17, // 6: api.user.group.v1.GetGroupResponse.response:type_name -> api.transport.response.BaseResponse + 17, // 6: api.user.group.v1.GetGroupResponse.error:type_name -> api.errors.Error 3, // 7: api.user.group.v1.GetGroupResponse.group:type_name -> api.user.group.v1.Group - 17, // 8: api.user.group.v1.ListGroupsResponse.response:type_name -> api.transport.response.BaseResponse + 17, // 8: api.user.group.v1.ListGroupsResponse.error:type_name -> api.errors.Error 3, // 9: api.user.group.v1.ListGroupsResponse.groups:type_name -> api.user.group.v1.Group - 17, // 10: api.user.group.v1.CreateGroupResponse.response:type_name -> api.transport.response.BaseResponse + 17, // 10: api.user.group.v1.CreateGroupResponse.error:type_name -> api.errors.Error 3, // 11: api.user.group.v1.CreateGroupResponse.group:type_name -> api.user.group.v1.Group - 17, // 12: api.user.group.v1.UpdateGroupResponse.response:type_name -> api.transport.response.BaseResponse + 17, // 12: api.user.group.v1.UpdateGroupResponse.error:type_name -> api.errors.Error 3, // 13: api.user.group.v1.UpdateGroupResponse.group:type_name -> api.user.group.v1.Group - 17, // 14: api.user.group.v1.ChangeGroupMemberResponse.response:type_name -> api.transport.response.BaseResponse + 17, // 14: api.user.group.v1.ChangeGroupMemberResponse.error:type_name -> api.errors.Error 5, // 15: api.user.group.v1.GroupService.GetGroup:input_type -> api.user.group.v1.GetGroupRequest 7, // 16: api.user.group.v1.GroupService.ListGroups:input_type -> api.user.group.v1.ListGroupsRequest 9, // 17: api.user.group.v1.GroupService.CreateGroup:input_type -> api.user.group.v1.CreateGroupRequest @@ -1298,7 +1288,7 @@ var file_user_group_v1_group_proto_depIdxs = []int32{ 8, // 23: api.user.group.v1.GroupService.ListGroups:output_type -> api.user.group.v1.ListGroupsResponse 10, // 24: api.user.group.v1.GroupService.CreateGroup:output_type -> api.user.group.v1.CreateGroupResponse 12, // 25: api.user.group.v1.GroupService.UpdateGroup:output_type -> api.user.group.v1.UpdateGroupResponse - 17, // 26: api.user.group.v1.GroupService.DeleteGroup:output_type -> api.transport.response.BaseResponse + 17, // 26: api.user.group.v1.GroupService.DeleteGroup:output_type -> api.errors.Error 15, // 27: api.user.group.v1.GroupService.AddGroupMember:output_type -> api.user.group.v1.ChangeGroupMemberResponse 15, // 28: api.user.group.v1.GroupService.RemoveGroupMember:output_type -> api.user.group.v1.ChangeGroupMemberResponse 22, // [22:29] is the sub-list for method output_type diff --git a/user/group/v1/group.pb.validate.go b/user/group/v1/group.pb.validate.go index f199050..a17d46f 100644 --- a/user/group/v1/group.pb.validate.go +++ b/user/group/v1/group.pb.validate.go @@ -487,11 +487,11 @@ func (m *GetGroupResponse) validate(all bool) error { var errors []error if all { - switch v := interface{}(m.GetResponse()).(type) { + switch v := interface{}(m.GetError()).(type) { case interface{ ValidateAll() error }: if err := v.ValidateAll(); err != nil { errors = append(errors, GetGroupResponseValidationError{ - field: "Response", + field: "Error", reason: "embedded message failed validation", cause: err, }) @@ -499,16 +499,16 @@ func (m *GetGroupResponse) validate(all bool) error { case interface{ Validate() error }: if err := v.Validate(); err != nil { errors = append(errors, GetGroupResponseValidationError{ - field: "Response", + field: "Error", reason: "embedded message failed validation", cause: err, }) } } - } else if v, ok := interface{}(m.GetResponse()).(interface{ Validate() error }); ok { + } else if v, ok := interface{}(m.GetError()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return GetGroupResponseValidationError{ - field: "Response", + field: "Error", reason: "embedded message failed validation", cause: err, } @@ -753,11 +753,11 @@ func (m *ListGroupsResponse) validate(all bool) error { var errors []error if all { - switch v := interface{}(m.GetResponse()).(type) { + switch v := interface{}(m.GetError()).(type) { case interface{ ValidateAll() error }: if err := v.ValidateAll(); err != nil { errors = append(errors, ListGroupsResponseValidationError{ - field: "Response", + field: "Error", reason: "embedded message failed validation", cause: err, }) @@ -765,16 +765,16 @@ func (m *ListGroupsResponse) validate(all bool) error { case interface{ Validate() error }: if err := v.Validate(); err != nil { errors = append(errors, ListGroupsResponseValidationError{ - field: "Response", + field: "Error", reason: "embedded message failed validation", cause: err, }) } } - } else if v, ok := interface{}(m.GetResponse()).(interface{ Validate() error }); ok { + } else if v, ok := interface{}(m.GetError()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return ListGroupsResponseValidationError{ - field: "Response", + field: "Error", reason: "embedded message failed validation", cause: err, } @@ -1028,11 +1028,11 @@ func (m *CreateGroupResponse) validate(all bool) error { var errors []error if all { - switch v := interface{}(m.GetResponse()).(type) { + switch v := interface{}(m.GetError()).(type) { case interface{ ValidateAll() error }: if err := v.ValidateAll(); err != nil { errors = append(errors, CreateGroupResponseValidationError{ - field: "Response", + field: "Error", reason: "embedded message failed validation", cause: err, }) @@ -1040,16 +1040,16 @@ func (m *CreateGroupResponse) validate(all bool) error { case interface{ Validate() error }: if err := v.Validate(); err != nil { errors = append(errors, CreateGroupResponseValidationError{ - field: "Response", + field: "Error", reason: "embedded message failed validation", cause: err, }) } } - } else if v, ok := interface{}(m.GetResponse()).(interface{ Validate() error }); ok { + } else if v, ok := interface{}(m.GetError()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return CreateGroupResponseValidationError{ - field: "Response", + field: "Error", reason: "embedded message failed validation", cause: err, } @@ -1306,11 +1306,11 @@ func (m *UpdateGroupResponse) validate(all bool) error { var errors []error if all { - switch v := interface{}(m.GetResponse()).(type) { + switch v := interface{}(m.GetError()).(type) { case interface{ ValidateAll() error }: if err := v.ValidateAll(); err != nil { errors = append(errors, UpdateGroupResponseValidationError{ - field: "Response", + field: "Error", reason: "embedded message failed validation", cause: err, }) @@ -1318,16 +1318,16 @@ func (m *UpdateGroupResponse) validate(all bool) error { case interface{ Validate() error }: if err := v.Validate(); err != nil { errors = append(errors, UpdateGroupResponseValidationError{ - field: "Response", + field: "Error", reason: "embedded message failed validation", cause: err, }) } } - } else if v, ok := interface{}(m.GetResponse()).(interface{ Validate() error }); ok { + } else if v, ok := interface{}(m.GetError()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return UpdateGroupResponseValidationError{ - field: "Response", + field: "Error", reason: "embedded message failed validation", cause: err, } @@ -1678,11 +1678,11 @@ func (m *ChangeGroupMemberResponse) validate(all bool) error { var errors []error if all { - switch v := interface{}(m.GetResponse()).(type) { + switch v := interface{}(m.GetError()).(type) { case interface{ ValidateAll() error }: if err := v.ValidateAll(); err != nil { errors = append(errors, ChangeGroupMemberResponseValidationError{ - field: "Response", + field: "Error", reason: "embedded message failed validation", cause: err, }) @@ -1690,16 +1690,16 @@ func (m *ChangeGroupMemberResponse) validate(all bool) error { case interface{ Validate() error }: if err := v.Validate(); err != nil { errors = append(errors, ChangeGroupMemberResponseValidationError{ - field: "Response", + field: "Error", reason: "embedded message failed validation", cause: err, }) } } - } else if v, ok := interface{}(m.GetResponse()).(interface{ Validate() error }); ok { + } else if v, ok := interface{}(m.GetError()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return ChangeGroupMemberResponseValidationError{ - field: "Response", + field: "Error", reason: "embedded message failed validation", cause: err, } diff --git a/user/group/v1/group.proto b/user/group/v1/group.proto index 2b5d718..79bf5ad 100644 --- a/user/group/v1/group.proto +++ b/user/group/v1/group.proto @@ -2,7 +2,7 @@ syntax = "proto3"; package api.user.group.v1; -import "transport/response/response.proto"; +import "errors/errors.proto"; import "user/v1/user.proto"; option go_package = "github.com/go-goim/api/user/group/v1"; @@ -54,7 +54,7 @@ message GetGroupRequest { } message GetGroupResponse { - transport.response.BaseResponse response = 1; + errors.Error error = 1; Group group = 2; } @@ -68,7 +68,7 @@ message ListGroupsRequest { } message ListGroupsResponse { - transport.response.BaseResponse response = 1; + errors.Error error = 1; repeated Group groups = 2; } @@ -83,7 +83,7 @@ message CreateGroupRequest { } message CreateGroupResponse { - transport.response.BaseResponse response = 1; + errors.Error error = 1; Group group = 2; } @@ -98,7 +98,7 @@ message UpdateGroupRequest { } message UpdateGroupResponse { - transport.response.BaseResponse response = 1; + errors.Error error = 1; Group group = 2; } @@ -117,7 +117,7 @@ message ChangeGroupMemberRequest { } message ChangeGroupMemberResponse { - transport.response.BaseResponse response = 1; + errors.Error error = 1; int32 count = 2; // count of members changed } @@ -126,7 +126,7 @@ service GroupService { rpc ListGroups(ListGroupsRequest) returns (ListGroupsResponse); rpc CreateGroup(CreateGroupRequest) returns (CreateGroupResponse); rpc UpdateGroup(UpdateGroupRequest) returns (UpdateGroupResponse); - rpc DeleteGroup(DeleteGroupRequest) returns (transport.response.BaseResponse); + rpc DeleteGroup(DeleteGroupRequest) returns (errors.Error); rpc AddGroupMember(ChangeGroupMemberRequest) returns (ChangeGroupMemberResponse); rpc RemoveGroupMember(ChangeGroupMemberRequest) returns (ChangeGroupMemberResponse); } diff --git a/user/group/v1/group_grpc.pb.go b/user/group/v1/group_grpc.pb.go index 8643671..2adcbd4 100644 --- a/user/group/v1/group_grpc.pb.go +++ b/user/group/v1/group_grpc.pb.go @@ -4,7 +4,7 @@ package v1 import ( context "context" - response "github.com/go-goim/api/transport/response" + errors "github.com/go-goim/api/errors" grpc "google.golang.org/grpc" codes "google.golang.org/grpc/codes" status "google.golang.org/grpc/status" @@ -23,7 +23,7 @@ type GroupServiceClient interface { ListGroups(ctx context.Context, in *ListGroupsRequest, opts ...grpc.CallOption) (*ListGroupsResponse, error) CreateGroup(ctx context.Context, in *CreateGroupRequest, opts ...grpc.CallOption) (*CreateGroupResponse, error) UpdateGroup(ctx context.Context, in *UpdateGroupRequest, opts ...grpc.CallOption) (*UpdateGroupResponse, error) - DeleteGroup(ctx context.Context, in *DeleteGroupRequest, opts ...grpc.CallOption) (*response.BaseResponse, error) + DeleteGroup(ctx context.Context, in *DeleteGroupRequest, opts ...grpc.CallOption) (*errors.Error, error) AddGroupMember(ctx context.Context, in *ChangeGroupMemberRequest, opts ...grpc.CallOption) (*ChangeGroupMemberResponse, error) RemoveGroupMember(ctx context.Context, in *ChangeGroupMemberRequest, opts ...grpc.CallOption) (*ChangeGroupMemberResponse, error) } @@ -72,8 +72,8 @@ func (c *groupServiceClient) UpdateGroup(ctx context.Context, in *UpdateGroupReq return out, nil } -func (c *groupServiceClient) DeleteGroup(ctx context.Context, in *DeleteGroupRequest, opts ...grpc.CallOption) (*response.BaseResponse, error) { - out := new(response.BaseResponse) +func (c *groupServiceClient) DeleteGroup(ctx context.Context, in *DeleteGroupRequest, opts ...grpc.CallOption) (*errors.Error, error) { + out := new(errors.Error) err := c.cc.Invoke(ctx, "/api.user.group.v1.GroupService/DeleteGroup", in, out, opts...) if err != nil { return nil, err @@ -107,7 +107,7 @@ type GroupServiceServer interface { ListGroups(context.Context, *ListGroupsRequest) (*ListGroupsResponse, error) CreateGroup(context.Context, *CreateGroupRequest) (*CreateGroupResponse, error) UpdateGroup(context.Context, *UpdateGroupRequest) (*UpdateGroupResponse, error) - DeleteGroup(context.Context, *DeleteGroupRequest) (*response.BaseResponse, error) + DeleteGroup(context.Context, *DeleteGroupRequest) (*errors.Error, error) AddGroupMember(context.Context, *ChangeGroupMemberRequest) (*ChangeGroupMemberResponse, error) RemoveGroupMember(context.Context, *ChangeGroupMemberRequest) (*ChangeGroupMemberResponse, error) mustEmbedUnimplementedGroupServiceServer() @@ -129,7 +129,7 @@ func (UnimplementedGroupServiceServer) CreateGroup(context.Context, *CreateGroup func (UnimplementedGroupServiceServer) UpdateGroup(context.Context, *UpdateGroupRequest) (*UpdateGroupResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method UpdateGroup not implemented") } -func (UnimplementedGroupServiceServer) DeleteGroup(context.Context, *DeleteGroupRequest) (*response.BaseResponse, error) { +func (UnimplementedGroupServiceServer) DeleteGroup(context.Context, *DeleteGroupRequest) (*errors.Error, error) { return nil, status.Errorf(codes.Unimplemented, "method DeleteGroup not implemented") } func (UnimplementedGroupServiceServer) AddGroupMember(context.Context, *ChangeGroupMemberRequest) (*ChangeGroupMemberResponse, error) { diff --git a/user/v1/user.pb.go b/user/v1/user.pb.go index a4dcb7f..48ca416 100644 --- a/user/v1/user.pb.go +++ b/user/v1/user.pb.go @@ -8,7 +8,7 @@ package v1 import ( _ "github.com/envoyproxy/protoc-gen-validate/validate" - response "github.com/go-goim/api/transport/response" + errors "github.com/go-goim/api/errors" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" reflect "reflect" @@ -122,8 +122,8 @@ type UserResponse struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Response *response.BaseResponse `protobuf:"bytes,1,opt,name=response,proto3" json:"response,omitempty"` - User *User `protobuf:"bytes,2,opt,name=user,proto3" json:"user,omitempty"` + Error *errors.Error `protobuf:"bytes,1,opt,name=error,proto3" json:"error,omitempty"` + User *User `protobuf:"bytes,2,opt,name=user,proto3" json:"user,omitempty"` } func (x *UserResponse) Reset() { @@ -158,9 +158,9 @@ func (*UserResponse) Descriptor() ([]byte, []int) { return file_user_v1_user_proto_rawDescGZIP(), []int{0} } -func (x *UserResponse) GetResponse() *response.BaseResponse { +func (x *UserResponse) GetError() *errors.Error { if x != nil { - return x.Response + return x.Error } return nil } @@ -754,121 +754,119 @@ var File_user_v1_user_proto protoreflect.FileDescriptor var file_user_v1_user_proto_rawDesc = []byte{ 0x0a, 0x12, 0x75, 0x73, 0x65, 0x72, 0x2f, 0x76, 0x31, 0x2f, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0b, 0x61, 0x70, 0x69, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x76, - 0x31, 0x1a, 0x21, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x2f, 0x72, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2f, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x17, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2f, 0x76, - 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x77, 0x0a, - 0x0c, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x40, 0x0a, - 0x08, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x24, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x2e, - 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x42, 0x61, 0x73, 0x65, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x52, 0x08, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, - 0x25, 0x0a, 0x04, 0x75, 0x73, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x11, 0x2e, - 0x61, 0x70, 0x69, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x73, 0x65, 0x72, - 0x52, 0x04, 0x75, 0x73, 0x65, 0x72, 0x22, 0xe3, 0x02, 0x0a, 0x04, 0x55, 0x73, 0x65, 0x72, 0x12, - 0x10, 0x0a, 0x03, 0x75, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x03, 0x75, 0x69, - 0x64, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x19, 0x0a, 0x05, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x18, 0x03, - 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x05, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x88, 0x01, 0x01, - 0x12, 0x19, 0x0a, 0x05, 0x70, 0x68, 0x6f, 0x6e, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x48, - 0x01, 0x52, 0x05, 0x70, 0x68, 0x6f, 0x6e, 0x65, 0x88, 0x01, 0x01, 0x12, 0x16, 0x0a, 0x06, 0x61, - 0x76, 0x61, 0x74, 0x61, 0x72, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x61, 0x76, 0x61, - 0x74, 0x61, 0x72, 0x12, 0x29, 0x0a, 0x0e, 0x70, 0x75, 0x73, 0x68, 0x5f, 0x73, 0x65, 0x72, 0x76, - 0x65, 0x72, 0x5f, 0x69, 0x70, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x48, 0x02, 0x52, 0x0c, 0x70, - 0x75, 0x73, 0x68, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x49, 0x70, 0x88, 0x01, 0x01, 0x12, 0x1a, - 0x0a, 0x08, 0x70, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x08, 0x70, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x12, 0x3b, 0x0a, 0x0c, 0x6c, 0x6f, - 0x67, 0x69, 0x6e, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0e, - 0x32, 0x18, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x4c, - 0x6f, 0x67, 0x69, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x0b, 0x6c, 0x6f, 0x67, 0x69, - 0x6e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x1d, 0x0a, 0x0a, 0x63, 0x72, 0x65, 0x61, 0x74, - 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x09, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x63, 0x72, 0x65, - 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x12, 0x1d, 0x0a, 0x0a, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, - 0x64, 0x5f, 0x61, 0x74, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x75, 0x70, 0x64, 0x61, - 0x74, 0x65, 0x64, 0x41, 0x74, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x42, - 0x08, 0x0a, 0x06, 0x5f, 0x70, 0x68, 0x6f, 0x6e, 0x65, 0x42, 0x11, 0x0a, 0x0f, 0x5f, 0x70, 0x75, - 0x73, 0x68, 0x5f, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x5f, 0x69, 0x70, 0x22, 0x33, 0x0a, 0x08, - 0x55, 0x73, 0x65, 0x72, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x27, 0x0a, 0x05, 0x75, 0x73, 0x65, 0x72, - 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x75, 0x73, - 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x52, 0x05, 0x75, 0x73, 0x65, 0x72, - 0x73, 0x22, 0x2f, 0x0a, 0x12, 0x47, 0x65, 0x74, 0x55, 0x73, 0x65, 0x72, 0x49, 0x6e, 0x66, 0x6f, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x19, 0x0a, 0x03, 0x75, 0x69, 0x64, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x03, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x22, 0x02, 0x20, 0x00, 0x52, 0x03, 0x75, - 0x69, 0x64, 0x22, 0x6f, 0x0a, 0x10, 0x51, 0x75, 0x65, 0x72, 0x79, 0x55, 0x73, 0x65, 0x72, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1f, 0x0a, 0x05, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x60, 0x01, 0x48, 0x00, - 0x52, 0x05, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x12, 0x2c, 0x0a, 0x05, 0x70, 0x68, 0x6f, 0x6e, 0x65, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x14, 0xfa, 0x42, 0x11, 0x72, 0x0f, 0x32, 0x0d, 0x5e, - 0x31, 0x5b, 0x33, 0x2d, 0x39, 0x5d, 0x5c, 0x64, 0x7b, 0x39, 0x7d, 0x24, 0x48, 0x00, 0x52, 0x05, - 0x70, 0x68, 0x6f, 0x6e, 0x65, 0x42, 0x0c, 0x0a, 0x05, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x12, 0x03, - 0xf8, 0x42, 0x01, 0x22, 0xb6, 0x01, 0x0a, 0x11, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x55, 0x73, - 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1d, 0x0a, 0x04, 0x6e, 0x61, 0x6d, - 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x09, 0xfa, 0x42, 0x06, 0x72, 0x04, 0x10, 0x02, - 0x18, 0x14, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x1f, 0x0a, 0x05, 0x65, 0x6d, 0x61, 0x69, - 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x60, 0x01, - 0x48, 0x00, 0x52, 0x05, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x12, 0x2c, 0x0a, 0x05, 0x70, 0x68, 0x6f, - 0x6e, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x42, 0x14, 0xfa, 0x42, 0x11, 0x72, 0x0f, 0x32, - 0x0d, 0x5e, 0x31, 0x5b, 0x33, 0x2d, 0x39, 0x5d, 0x5c, 0x64, 0x7b, 0x39, 0x7d, 0x24, 0x48, 0x00, - 0x52, 0x05, 0x70, 0x68, 0x6f, 0x6e, 0x65, 0x12, 0x25, 0x0a, 0x08, 0x70, 0x61, 0x73, 0x73, 0x77, - 0x6f, 0x72, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x42, 0x09, 0xfa, 0x42, 0x06, 0x72, 0x04, - 0x10, 0x06, 0x18, 0x14, 0x52, 0x08, 0x70, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x42, 0x0c, - 0x0a, 0x05, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x12, 0x03, 0xf8, 0x42, 0x01, 0x22, 0xf0, 0x01, 0x0a, - 0x11, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x12, 0x19, 0x0a, 0x03, 0x75, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x42, - 0x07, 0xfa, 0x42, 0x04, 0x22, 0x02, 0x20, 0x00, 0x52, 0x03, 0x75, 0x69, 0x64, 0x12, 0x20, 0x0a, - 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x0c, 0xfa, 0x42, 0x09, - 0x72, 0x07, 0x10, 0x02, 0x18, 0x14, 0xd0, 0x01, 0x01, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, - 0x20, 0x0a, 0x05, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x42, 0x0a, - 0xfa, 0x42, 0x07, 0x72, 0x05, 0x60, 0x01, 0xd0, 0x01, 0x01, 0x52, 0x05, 0x65, 0x6d, 0x61, 0x69, - 0x6c, 0x12, 0x2d, 0x0a, 0x05, 0x70, 0x68, 0x6f, 0x6e, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, - 0x42, 0x17, 0xfa, 0x42, 0x14, 0x72, 0x12, 0x32, 0x0d, 0x5e, 0x31, 0x5b, 0x33, 0x2d, 0x39, 0x5d, - 0x5c, 0x64, 0x7b, 0x39, 0x7d, 0x24, 0xd0, 0x01, 0x01, 0x52, 0x05, 0x70, 0x68, 0x6f, 0x6e, 0x65, - 0x12, 0x23, 0x0a, 0x06, 0x61, 0x76, 0x61, 0x74, 0x61, 0x72, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, - 0x42, 0x0b, 0xfa, 0x42, 0x08, 0x72, 0x06, 0x18, 0x80, 0x01, 0xd0, 0x01, 0x01, 0x52, 0x06, 0x61, - 0x76, 0x61, 0x74, 0x61, 0x72, 0x12, 0x28, 0x0a, 0x08, 0x70, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, - 0x64, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x42, 0x0c, 0xfa, 0x42, 0x09, 0x72, 0x07, 0x10, 0x06, - 0x18, 0x14, 0xd0, 0x01, 0x01, 0x52, 0x08, 0x70, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x22, - 0xc2, 0x01, 0x0a, 0x10, 0x55, 0x73, 0x65, 0x72, 0x4c, 0x6f, 0x67, 0x69, 0x6e, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x12, 0x1f, 0x0a, 0x05, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x60, 0x01, 0x48, 0x00, 0x52, 0x05, - 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x12, 0x2c, 0x0a, 0x05, 0x70, 0x68, 0x6f, 0x6e, 0x65, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x09, 0x42, 0x14, 0xfa, 0x42, 0x11, 0x72, 0x0f, 0x32, 0x0d, 0x5e, 0x31, 0x5b, - 0x33, 0x2d, 0x39, 0x5d, 0x5c, 0x64, 0x7b, 0x39, 0x7d, 0x24, 0x48, 0x00, 0x52, 0x05, 0x70, 0x68, - 0x6f, 0x6e, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x70, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x18, - 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x70, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x12, - 0x35, 0x0a, 0x0a, 0x6c, 0x6f, 0x67, 0x69, 0x6e, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x04, 0x20, - 0x01, 0x28, 0x0e, 0x32, 0x16, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x76, - 0x31, 0x2e, 0x4c, 0x6f, 0x67, 0x69, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x52, 0x09, 0x6c, 0x6f, 0x67, - 0x69, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x42, 0x0c, 0x0a, 0x05, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x12, - 0x03, 0xf8, 0x42, 0x01, 0x2a, 0x37, 0x0a, 0x0b, 0x4c, 0x6f, 0x67, 0x69, 0x6e, 0x53, 0x74, 0x61, - 0x74, 0x75, 0x73, 0x12, 0x09, 0x0a, 0x05, 0x4c, 0x4f, 0x47, 0x49, 0x4e, 0x10, 0x00, 0x12, 0x11, - 0x0a, 0x0d, 0x41, 0x4c, 0x52, 0x45, 0x41, 0x44, 0x59, 0x5f, 0x4c, 0x4f, 0x47, 0x49, 0x4e, 0x10, - 0x01, 0x12, 0x0a, 0x0a, 0x06, 0x4c, 0x4f, 0x47, 0x4f, 0x55, 0x54, 0x10, 0x02, 0x2a, 0x35, 0x0a, - 0x09, 0x4c, 0x6f, 0x67, 0x69, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x12, 0x12, 0x0a, 0x0e, 0x4c, 0x4f, - 0x47, 0x49, 0x4e, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x54, 0x52, 0x59, 0x10, 0x00, 0x12, 0x14, - 0x0a, 0x10, 0x4c, 0x4f, 0x47, 0x49, 0x4e, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x46, 0x4f, 0x52, - 0x43, 0x45, 0x10, 0x01, 0x32, 0xad, 0x02, 0x0a, 0x0b, 0x55, 0x73, 0x65, 0x72, 0x53, 0x65, 0x72, - 0x76, 0x69, 0x63, 0x65, 0x12, 0x45, 0x0a, 0x07, 0x47, 0x65, 0x74, 0x55, 0x73, 0x65, 0x72, 0x12, - 0x1f, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, + 0x31, 0x1a, 0x13, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x73, 0x2f, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x73, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x17, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, + 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, + 0x5e, 0x0a, 0x0c, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, + 0x27, 0x0a, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x11, + 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x73, 0x2e, 0x45, 0x72, 0x72, 0x6f, + 0x72, 0x52, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x12, 0x25, 0x0a, 0x04, 0x75, 0x73, 0x65, 0x72, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x75, 0x73, 0x65, + 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x52, 0x04, 0x75, 0x73, 0x65, 0x72, 0x22, + 0xe3, 0x02, 0x0a, 0x04, 0x55, 0x73, 0x65, 0x72, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x69, 0x64, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x03, 0x75, 0x69, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, + 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x19, + 0x0a, 0x05, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, + 0x05, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x88, 0x01, 0x01, 0x12, 0x19, 0x0a, 0x05, 0x70, 0x68, 0x6f, + 0x6e, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x48, 0x01, 0x52, 0x05, 0x70, 0x68, 0x6f, 0x6e, + 0x65, 0x88, 0x01, 0x01, 0x12, 0x16, 0x0a, 0x06, 0x61, 0x76, 0x61, 0x74, 0x61, 0x72, 0x18, 0x05, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x61, 0x76, 0x61, 0x74, 0x61, 0x72, 0x12, 0x29, 0x0a, 0x0e, + 0x70, 0x75, 0x73, 0x68, 0x5f, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x5f, 0x69, 0x70, 0x18, 0x06, + 0x20, 0x01, 0x28, 0x09, 0x48, 0x02, 0x52, 0x0c, 0x70, 0x75, 0x73, 0x68, 0x53, 0x65, 0x72, 0x76, + 0x65, 0x72, 0x49, 0x70, 0x88, 0x01, 0x01, 0x12, 0x1a, 0x0a, 0x08, 0x70, 0x61, 0x73, 0x73, 0x77, + 0x6f, 0x72, 0x64, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x70, 0x61, 0x73, 0x73, 0x77, + 0x6f, 0x72, 0x64, 0x12, 0x3b, 0x0a, 0x0c, 0x6c, 0x6f, 0x67, 0x69, 0x6e, 0x5f, 0x73, 0x74, 0x61, + 0x74, 0x75, 0x73, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x18, 0x2e, 0x61, 0x70, 0x69, 0x2e, + 0x75, 0x73, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x6f, 0x67, 0x69, 0x6e, 0x53, 0x74, 0x61, + 0x74, 0x75, 0x73, 0x52, 0x0b, 0x6c, 0x6f, 0x67, 0x69, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, + 0x12, 0x1d, 0x0a, 0x0a, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x09, + 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x12, + 0x1d, 0x0a, 0x0a, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x0a, 0x20, + 0x01, 0x28, 0x03, 0x52, 0x09, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x42, 0x08, + 0x0a, 0x06, 0x5f, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x70, 0x68, 0x6f, + 0x6e, 0x65, 0x42, 0x11, 0x0a, 0x0f, 0x5f, 0x70, 0x75, 0x73, 0x68, 0x5f, 0x73, 0x65, 0x72, 0x76, + 0x65, 0x72, 0x5f, 0x69, 0x70, 0x22, 0x33, 0x0a, 0x08, 0x55, 0x73, 0x65, 0x72, 0x4c, 0x69, 0x73, + 0x74, 0x12, 0x27, 0x0a, 0x05, 0x75, 0x73, 0x65, 0x72, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, + 0x32, 0x11, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x55, + 0x73, 0x65, 0x72, 0x52, 0x05, 0x75, 0x73, 0x65, 0x72, 0x73, 0x22, 0x2f, 0x0a, 0x12, 0x47, 0x65, 0x74, 0x55, 0x73, 0x65, 0x72, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x12, 0x19, 0x0a, 0x03, 0x75, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x42, 0x07, 0xfa, + 0x42, 0x04, 0x22, 0x02, 0x20, 0x00, 0x52, 0x03, 0x75, 0x69, 0x64, 0x22, 0x6f, 0x0a, 0x10, 0x51, + 0x75, 0x65, 0x72, 0x79, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, + 0x1f, 0x0a, 0x05, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, + 0xfa, 0x42, 0x04, 0x72, 0x02, 0x60, 0x01, 0x48, 0x00, 0x52, 0x05, 0x65, 0x6d, 0x61, 0x69, 0x6c, + 0x12, 0x2c, 0x0a, 0x05, 0x70, 0x68, 0x6f, 0x6e, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, + 0x14, 0xfa, 0x42, 0x11, 0x72, 0x0f, 0x32, 0x0d, 0x5e, 0x31, 0x5b, 0x33, 0x2d, 0x39, 0x5d, 0x5c, + 0x64, 0x7b, 0x39, 0x7d, 0x24, 0x48, 0x00, 0x52, 0x05, 0x70, 0x68, 0x6f, 0x6e, 0x65, 0x42, 0x0c, + 0x0a, 0x05, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x12, 0x03, 0xf8, 0x42, 0x01, 0x22, 0xb6, 0x01, 0x0a, + 0x11, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x12, 0x1d, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, + 0x42, 0x09, 0xfa, 0x42, 0x06, 0x72, 0x04, 0x10, 0x02, 0x18, 0x14, 0x52, 0x04, 0x6e, 0x61, 0x6d, + 0x65, 0x12, 0x1f, 0x0a, 0x05, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, + 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x60, 0x01, 0x48, 0x00, 0x52, 0x05, 0x65, 0x6d, 0x61, + 0x69, 0x6c, 0x12, 0x2c, 0x0a, 0x05, 0x70, 0x68, 0x6f, 0x6e, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, + 0x09, 0x42, 0x14, 0xfa, 0x42, 0x11, 0x72, 0x0f, 0x32, 0x0d, 0x5e, 0x31, 0x5b, 0x33, 0x2d, 0x39, + 0x5d, 0x5c, 0x64, 0x7b, 0x39, 0x7d, 0x24, 0x48, 0x00, 0x52, 0x05, 0x70, 0x68, 0x6f, 0x6e, 0x65, + 0x12, 0x25, 0x0a, 0x08, 0x70, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x18, 0x04, 0x20, 0x01, + 0x28, 0x09, 0x42, 0x09, 0xfa, 0x42, 0x06, 0x72, 0x04, 0x10, 0x06, 0x18, 0x14, 0x52, 0x08, 0x70, + 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x42, 0x0c, 0x0a, 0x05, 0x66, 0x69, 0x65, 0x6c, 0x64, + 0x12, 0x03, 0xf8, 0x42, 0x01, 0x22, 0xf0, 0x01, 0x0a, 0x11, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, + 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x19, 0x0a, 0x03, 0x75, + 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x22, 0x02, 0x20, + 0x00, 0x52, 0x03, 0x75, 0x69, 0x64, 0x12, 0x20, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x09, 0x42, 0x0c, 0xfa, 0x42, 0x09, 0x72, 0x07, 0x10, 0x02, 0x18, 0x14, 0xd0, + 0x01, 0x01, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x20, 0x0a, 0x05, 0x65, 0x6d, 0x61, 0x69, + 0x6c, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x42, 0x0a, 0xfa, 0x42, 0x07, 0x72, 0x05, 0x60, 0x01, + 0xd0, 0x01, 0x01, 0x52, 0x05, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x12, 0x2d, 0x0a, 0x05, 0x70, 0x68, + 0x6f, 0x6e, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x42, 0x17, 0xfa, 0x42, 0x14, 0x72, 0x12, + 0x32, 0x0d, 0x5e, 0x31, 0x5b, 0x33, 0x2d, 0x39, 0x5d, 0x5c, 0x64, 0x7b, 0x39, 0x7d, 0x24, 0xd0, + 0x01, 0x01, 0x52, 0x05, 0x70, 0x68, 0x6f, 0x6e, 0x65, 0x12, 0x23, 0x0a, 0x06, 0x61, 0x76, 0x61, + 0x74, 0x61, 0x72, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x42, 0x0b, 0xfa, 0x42, 0x08, 0x72, 0x06, + 0x18, 0x80, 0x01, 0xd0, 0x01, 0x01, 0x52, 0x06, 0x61, 0x76, 0x61, 0x74, 0x61, 0x72, 0x12, 0x28, + 0x0a, 0x08, 0x70, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, + 0x42, 0x0c, 0xfa, 0x42, 0x09, 0x72, 0x07, 0x10, 0x06, 0x18, 0x14, 0xd0, 0x01, 0x01, 0x52, 0x08, + 0x70, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x22, 0xc2, 0x01, 0x0a, 0x10, 0x55, 0x73, 0x65, + 0x72, 0x4c, 0x6f, 0x67, 0x69, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1f, 0x0a, + 0x05, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, + 0x04, 0x72, 0x02, 0x60, 0x01, 0x48, 0x00, 0x52, 0x05, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x12, 0x2c, + 0x0a, 0x05, 0x70, 0x68, 0x6f, 0x6e, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x14, 0xfa, + 0x42, 0x11, 0x72, 0x0f, 0x32, 0x0d, 0x5e, 0x31, 0x5b, 0x33, 0x2d, 0x39, 0x5d, 0x5c, 0x64, 0x7b, + 0x39, 0x7d, 0x24, 0x48, 0x00, 0x52, 0x05, 0x70, 0x68, 0x6f, 0x6e, 0x65, 0x12, 0x1a, 0x0a, 0x08, + 0x70, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, + 0x70, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x12, 0x35, 0x0a, 0x0a, 0x6c, 0x6f, 0x67, 0x69, + 0x6e, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x16, 0x2e, 0x61, + 0x70, 0x69, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x6f, 0x67, 0x69, 0x6e, + 0x54, 0x79, 0x70, 0x65, 0x52, 0x09, 0x6c, 0x6f, 0x67, 0x69, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x42, + 0x0c, 0x0a, 0x05, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x12, 0x03, 0xf8, 0x42, 0x01, 0x2a, 0x37, 0x0a, + 0x0b, 0x4c, 0x6f, 0x67, 0x69, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x09, 0x0a, 0x05, + 0x4c, 0x4f, 0x47, 0x49, 0x4e, 0x10, 0x00, 0x12, 0x11, 0x0a, 0x0d, 0x41, 0x4c, 0x52, 0x45, 0x41, + 0x44, 0x59, 0x5f, 0x4c, 0x4f, 0x47, 0x49, 0x4e, 0x10, 0x01, 0x12, 0x0a, 0x0a, 0x06, 0x4c, 0x4f, + 0x47, 0x4f, 0x55, 0x54, 0x10, 0x02, 0x2a, 0x35, 0x0a, 0x09, 0x4c, 0x6f, 0x67, 0x69, 0x6e, 0x54, + 0x79, 0x70, 0x65, 0x12, 0x12, 0x0a, 0x0e, 0x4c, 0x4f, 0x47, 0x49, 0x4e, 0x5f, 0x54, 0x59, 0x50, + 0x45, 0x5f, 0x54, 0x52, 0x59, 0x10, 0x00, 0x12, 0x14, 0x0a, 0x10, 0x4c, 0x4f, 0x47, 0x49, 0x4e, + 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x46, 0x4f, 0x52, 0x43, 0x45, 0x10, 0x01, 0x32, 0xad, 0x02, + 0x0a, 0x0b, 0x55, 0x73, 0x65, 0x72, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x45, 0x0a, + 0x07, 0x47, 0x65, 0x74, 0x55, 0x73, 0x65, 0x72, 0x12, 0x1f, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x75, + 0x73, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x55, 0x73, 0x65, 0x72, 0x49, 0x6e, + 0x66, 0x6f, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x19, 0x2e, 0x61, 0x70, 0x69, 0x2e, + 0x75, 0x73, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x45, 0x0a, 0x09, 0x51, 0x75, 0x65, 0x72, 0x79, 0x55, 0x73, 0x65, + 0x72, 0x12, 0x1d, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, + 0x51, 0x75, 0x65, 0x72, 0x79, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x19, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x55, - 0x73, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x45, 0x0a, 0x09, 0x51, - 0x75, 0x65, 0x72, 0x79, 0x55, 0x73, 0x65, 0x72, 0x12, 0x1d, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x75, - 0x73, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x55, 0x73, 0x65, 0x72, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x19, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x75, 0x73, - 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x12, 0x47, 0x0a, 0x0a, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x55, 0x73, 0x65, 0x72, - 0x12, 0x1e, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x43, - 0x72, 0x65, 0x61, 0x74, 0x65, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x1a, 0x19, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x55, - 0x73, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x47, 0x0a, 0x0a, 0x55, - 0x70, 0x64, 0x61, 0x74, 0x65, 0x55, 0x73, 0x65, 0x72, 0x12, 0x1e, 0x2e, 0x61, 0x70, 0x69, 0x2e, - 0x75, 0x73, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x55, 0x73, + 0x73, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x47, 0x0a, 0x0a, 0x43, + 0x72, 0x65, 0x61, 0x74, 0x65, 0x55, 0x73, 0x65, 0x72, 0x12, 0x1e, 0x2e, 0x61, 0x70, 0x69, 0x2e, + 0x75, 0x73, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x19, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x42, 0x20, 0x5a, 0x1e, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, - 0x6f, 0x6d, 0x2f, 0x67, 0x6f, 0x2d, 0x67, 0x6f, 0x69, 0x6d, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x75, - 0x73, 0x65, 0x72, 0x2f, 0x76, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x47, 0x0a, 0x0a, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x55, 0x73, + 0x65, 0x72, 0x12, 0x1e, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x76, 0x31, + 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x1a, 0x19, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x76, 0x31, + 0x2e, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0x20, 0x5a, + 0x1e, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x67, 0x6f, 0x2d, 0x67, + 0x6f, 0x69, 0x6d, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x75, 0x73, 0x65, 0x72, 0x2f, 0x76, 0x31, 0x62, + 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -886,20 +884,20 @@ func file_user_v1_user_proto_rawDescGZIP() []byte { var file_user_v1_user_proto_enumTypes = make([]protoimpl.EnumInfo, 2) var file_user_v1_user_proto_msgTypes = make([]protoimpl.MessageInfo, 8) var file_user_v1_user_proto_goTypes = []interface{}{ - (LoginStatus)(0), // 0: api.user.v1.LoginStatus - (LoginType)(0), // 1: api.user.v1.LoginType - (*UserResponse)(nil), // 2: api.user.v1.UserResponse - (*User)(nil), // 3: api.user.v1.User - (*UserList)(nil), // 4: api.user.v1.UserList - (*GetUserInfoRequest)(nil), // 5: api.user.v1.GetUserInfoRequest - (*QueryUserRequest)(nil), // 6: api.user.v1.QueryUserRequest - (*CreateUserRequest)(nil), // 7: api.user.v1.CreateUserRequest - (*UpdateUserRequest)(nil), // 8: api.user.v1.UpdateUserRequest - (*UserLoginRequest)(nil), // 9: api.user.v1.UserLoginRequest - (*response.BaseResponse)(nil), // 10: api.transport.response.BaseResponse + (LoginStatus)(0), // 0: api.user.v1.LoginStatus + (LoginType)(0), // 1: api.user.v1.LoginType + (*UserResponse)(nil), // 2: api.user.v1.UserResponse + (*User)(nil), // 3: api.user.v1.User + (*UserList)(nil), // 4: api.user.v1.UserList + (*GetUserInfoRequest)(nil), // 5: api.user.v1.GetUserInfoRequest + (*QueryUserRequest)(nil), // 6: api.user.v1.QueryUserRequest + (*CreateUserRequest)(nil), // 7: api.user.v1.CreateUserRequest + (*UpdateUserRequest)(nil), // 8: api.user.v1.UpdateUserRequest + (*UserLoginRequest)(nil), // 9: api.user.v1.UserLoginRequest + (*errors.Error)(nil), // 10: api.errors.Error } var file_user_v1_user_proto_depIdxs = []int32{ - 10, // 0: api.user.v1.UserResponse.response:type_name -> api.transport.response.BaseResponse + 10, // 0: api.user.v1.UserResponse.error:type_name -> api.errors.Error 3, // 1: api.user.v1.UserResponse.user:type_name -> api.user.v1.User 0, // 2: api.user.v1.User.login_status:type_name -> api.user.v1.LoginStatus 3, // 3: api.user.v1.UserList.users:type_name -> api.user.v1.User diff --git a/user/v1/user.pb.validate.go b/user/v1/user.pb.validate.go index 9f88828..3fc355e 100644 --- a/user/v1/user.pb.validate.go +++ b/user/v1/user.pb.validate.go @@ -58,11 +58,11 @@ func (m *UserResponse) validate(all bool) error { var errors []error if all { - switch v := interface{}(m.GetResponse()).(type) { + switch v := interface{}(m.GetError()).(type) { case interface{ ValidateAll() error }: if err := v.ValidateAll(); err != nil { errors = append(errors, UserResponseValidationError{ - field: "Response", + field: "Error", reason: "embedded message failed validation", cause: err, }) @@ -70,16 +70,16 @@ func (m *UserResponse) validate(all bool) error { case interface{ Validate() error }: if err := v.Validate(); err != nil { errors = append(errors, UserResponseValidationError{ - field: "Response", + field: "Error", reason: "embedded message failed validation", cause: err, }) } } - } else if v, ok := interface{}(m.GetResponse()).(interface{ Validate() error }); ok { + } else if v, ok := interface{}(m.GetError()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return UserResponseValidationError{ - field: "Response", + field: "Error", reason: "embedded message failed validation", cause: err, } diff --git a/user/v1/user.proto b/user/v1/user.proto index 220e20f..54b0ea5 100644 --- a/user/v1/user.proto +++ b/user/v1/user.proto @@ -3,7 +3,7 @@ syntax = "proto3"; package api.user.v1; // import api/transport/v1/http.proto; -import "transport/response/response.proto"; +import "errors/errors.proto"; import "validate/validate.proto"; option go_package = "github.com/go-goim/api/user/v1"; @@ -15,7 +15,7 @@ enum LoginStatus { } message UserResponse { - api.transport.response.BaseResponse response = 1; + errors.Error error = 1; User user = 2; } From e3c24605a67c0c1d18dc068eb076464231c71ba2 Mon Sep 17 00:00:00 2001 From: yusank Date: Thu, 23 May 2024 14:48:39 +0100 Subject: [PATCH 35/35] fix: update message defination Signed-off-by: yusank --- config/registry/v1/registry.pb.go | 3 +- config/registry/v1/registry.pb.validate.go | 25 +- config/v1/config.pb.go | 263 +++---- config/v1/config.pb.validate.go | 129 --- config/v1/config.proto | 8 +- errors/errors.pb.go | 2 +- go.mod | 22 +- go.sum | 124 +-- message/v1/message.db.go | 49 ++ message/v1/message.ext.go | 32 - message/v1/message.pb.go | 552 ++++++------- message/v1/message.pb.validate.go | 288 +------ message/v1/message.proto | 25 +- message/v1/message_grpc.pb.go | 38 +- third-party/validate/validate.proto | 862 +++++++++++++++++++++ types/default_node.go | 23 + types/id.go | 275 +++++++ types/id_test.go | 72 ++ types/snowflake/snowflake.go | 113 +++ types/snowflake/snowflake_test.go | 55 ++ user/friend/v1/friend.pb.go | 4 +- user/friend/v1/friend.pb.validate.go | 4 + user/friend/v1/friend_grpc.pb.go | 52 +- user/group/v1/group.pb.go | 2 +- user/group/v1/group_grpc.pb.go | 42 +- user/v1/user.pb.go | 9 +- user/v1/user.pb.validate.go | 90 ++- user/v1/user_grpc.pb.go | 27 +- 28 files changed, 2091 insertions(+), 1099 deletions(-) create mode 100644 message/v1/message.db.go delete mode 100644 message/v1/message.ext.go create mode 100644 third-party/validate/validate.proto create mode 100644 types/default_node.go create mode 100644 types/id.go create mode 100644 types/id_test.go create mode 100644 types/snowflake/snowflake.go create mode 100644 types/snowflake/snowflake_test.go diff --git a/config/registry/v1/registry.pb.go b/config/registry/v1/registry.pb.go index b24b160..d1a290c 100644 --- a/config/registry/v1/registry.pb.go +++ b/config/registry/v1/registry.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.26.0 +// protoc-gen-go v1.34.1 // protoc (unknown) // source: config/registry/v1/registry.proto @@ -175,6 +175,7 @@ type Registry struct { ConfigCenter *ConfigCenterInfo `protobuf:"bytes,1,opt,name=config_center,json=configCenter,proto3" json:"config_center,omitempty"` // Types that are assignable to Reg: + // // *Registry_Consul // *Registry_Etcd Reg isRegistry_Reg `protobuf_oneof:"reg"` diff --git a/config/registry/v1/registry.pb.validate.go b/config/registry/v1/registry.pb.validate.go index 97ecd20..acc2b0a 100644 --- a/config/registry/v1/registry.pb.validate.go +++ b/config/registry/v1/registry.pb.validate.go @@ -461,9 +461,18 @@ func (m *Registry) validate(all bool) error { } } - switch m.Reg.(type) { - + switch v := m.Reg.(type) { case *Registry_Consul: + if v == nil { + err := RegistryValidationError{ + field: "Reg", + reason: "oneof value cannot be a typed-nil", + } + if !all { + return err + } + errors = append(errors, err) + } if all { switch v := interface{}(m.GetConsul()).(type) { @@ -495,6 +504,16 @@ func (m *Registry) validate(all bool) error { } case *Registry_Etcd: + if v == nil { + err := RegistryValidationError{ + field: "Reg", + reason: "oneof value cannot be a typed-nil", + } + if !all { + return err + } + errors = append(errors, err) + } if all { switch v := interface{}(m.GetEtcd()).(type) { @@ -525,6 +544,8 @@ func (m *Registry) validate(all bool) error { } } + default: + _ = v // ensures v is used } if len(errors) > 0 { diff --git a/config/v1/config.pb.go b/config/v1/config.pb.go index 23cda00..75aa51a 100644 --- a/config/v1/config.pb.go +++ b/config/v1/config.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.26.0 +// protoc-gen-go v1.34.1 // protoc (unknown) // source: config/v1/config.proto @@ -162,7 +162,6 @@ type Service struct { Redis *Redis `protobuf:"bytes,7,opt,name=redis,proto3" json:"redis,omitempty"` Mq *MQ `protobuf:"bytes,8,opt,name=mq,proto3" json:"mq,omitempty"` Mysql *MySQL `protobuf:"bytes,9,opt,name=mysql,proto3" json:"mysql,omitempty"` - HBase *HBase `protobuf:"bytes,10,opt,name=hBase,proto3" json:"hBase,omitempty"` // services name GatewayService string `protobuf:"bytes,11,opt,name=gatewayService,proto3" json:"gatewayService,omitempty"` UserService string `protobuf:"bytes,12,opt,name=userService,proto3" json:"userService,omitempty"` @@ -267,13 +266,6 @@ func (x *Service) GetMysql() *MySQL { return nil } -func (x *Service) GetHBase() *HBase { - if x != nil { - return x.HBase - } - return nil -} - func (x *Service) GetGatewayService() string { if x != nil { return x.GatewayService @@ -628,53 +620,6 @@ func (x *MySQL) GetOpenTimeout() *durationpb.Duration { return nil } -type HBase struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Addr string `protobuf:"bytes,1,opt,name=addr,proto3" json:"addr,omitempty"` // add more -} - -func (x *HBase) Reset() { - *x = HBase{} - if protoimpl.UnsafeEnabled { - mi := &file_config_v1_config_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *HBase) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*HBase) ProtoMessage() {} - -func (x *HBase) ProtoReflect() protoreflect.Message { - mi := &file_config_v1_config_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 HBase.ProtoReflect.Descriptor instead. -func (*HBase) Descriptor() ([]byte, []int) { - return file_config_v1_config_proto_rawDescGZIP(), []int{6} -} - -func (x *HBase) GetAddr() string { - if x != nil { - return x.Addr - } - return "" -} - var File_config_v1_config_proto protoreflect.FileDescriptor var file_config_v1_config_proto_rawDesc = []byte{ @@ -694,7 +639,7 @@ var file_config_v1_config_proto_rawDesc = []byte{ 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, 0x42, 0x11, 0xfa, 0x42, 0x0e, 0xaa, 0x01, 0x0b, 0x22, 0x02, 0x08, 0x0a, 0x32, 0x05, 0x10, 0x80, 0xad, 0xe2, 0x04, 0x52, 0x07, 0x74, 0x69, - 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x22, 0x99, 0x06, 0x0a, 0x07, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, + 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x22, 0xed, 0x05, 0x0a, 0x07, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x48, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x34, 0xfa, 0x42, 0x31, 0x72, 0x2f, 0x32, 0x2d, 0x5e, 0x67, 0x6f, 0x69, 0x6d, 0x5c, 0x2e, 0x28, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x7c, 0x77, 0x6f, 0x72, 0x6b, 0x65, 0x72, 0x7c, 0x61, @@ -723,87 +668,83 @@ var file_config_v1_config_proto_rawDesc = []byte{ 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x51, 0x52, 0x02, 0x6d, 0x71, 0x12, 0x2a, 0x0a, 0x05, 0x6d, 0x79, 0x73, 0x71, 0x6c, 0x18, 0x09, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x79, - 0x53, 0x51, 0x4c, 0x52, 0x05, 0x6d, 0x79, 0x73, 0x71, 0x6c, 0x12, 0x2a, 0x0a, 0x05, 0x68, 0x42, - 0x61, 0x73, 0x65, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x61, 0x70, 0x69, 0x2e, - 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x76, 0x31, 0x2e, 0x48, 0x42, 0x61, 0x73, 0x65, 0x52, - 0x05, 0x68, 0x42, 0x61, 0x73, 0x65, 0x12, 0x26, 0x0a, 0x0e, 0x67, 0x61, 0x74, 0x65, 0x77, 0x61, - 0x79, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, - 0x67, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x20, - 0x0a, 0x0b, 0x75, 0x73, 0x65, 0x72, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x18, 0x0c, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x0b, 0x75, 0x73, 0x65, 0x72, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, - 0x12, 0x20, 0x0a, 0x0b, 0x70, 0x75, 0x73, 0x68, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x18, - 0x0d, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x70, 0x75, 0x73, 0x68, 0x53, 0x65, 0x72, 0x76, 0x69, - 0x63, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x57, 0x6f, 0x72, 0x6b, 0x65, - 0x72, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x57, 0x6f, - 0x72, 0x6b, 0x65, 0x72, 0x12, 0x1e, 0x0a, 0x0a, 0x6d, 0x73, 0x67, 0x53, 0x65, 0x72, 0x76, 0x69, - 0x63, 0x65, 0x18, 0x0f, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x6d, 0x73, 0x67, 0x53, 0x65, 0x72, - 0x76, 0x69, 0x63, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x6d, 0x73, 0x67, 0x57, 0x6f, 0x72, 0x6b, 0x65, - 0x72, 0x18, 0x10, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6d, 0x73, 0x67, 0x57, 0x6f, 0x72, 0x6b, - 0x65, 0x72, 0x1a, 0x3b, 0x0a, 0x0d, 0x4d, 0x65, 0x74, 0x61, 0x64, 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, 0x42, - 0x07, 0x0a, 0x05, 0x5f, 0x68, 0x74, 0x74, 0x70, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x67, 0x72, 0x70, - 0x63, 0x22, 0x8f, 0x01, 0x0a, 0x03, 0x4c, 0x6f, 0x67, 0x12, 0x1e, 0x0a, 0x08, 0x6c, 0x6f, 0x67, - 0x5f, 0x70, 0x61, 0x74, 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x07, 0x6c, - 0x6f, 0x67, 0x50, 0x61, 0x74, 0x68, 0x88, 0x01, 0x01, 0x12, 0x34, 0x0a, 0x05, 0x6c, 0x65, 0x76, - 0x65, 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x14, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x63, - 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x65, 0x76, 0x65, 0x6c, 0x42, 0x08, - 0xfa, 0x42, 0x05, 0x82, 0x01, 0x02, 0x10, 0x01, 0x52, 0x05, 0x6c, 0x65, 0x76, 0x65, 0x6c, 0x12, - 0x25, 0x0a, 0x0e, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x63, 0x6f, 0x6e, 0x73, 0x6f, 0x6c, - 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0d, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x43, - 0x6f, 0x6e, 0x73, 0x6f, 0x6c, 0x65, 0x42, 0x0b, 0x0a, 0x09, 0x5f, 0x6c, 0x6f, 0x67, 0x5f, 0x70, - 0x61, 0x74, 0x68, 0x22, 0x9c, 0x02, 0x0a, 0x05, 0x52, 0x65, 0x64, 0x69, 0x73, 0x12, 0x12, 0x0a, - 0x04, 0x61, 0x64, 0x64, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x61, 0x64, 0x64, - 0x72, 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, 0x12, 0x1b, 0x0a, - 0x09, 0x6d, 0x61, 0x78, 0x5f, 0x63, 0x6f, 0x6e, 0x6e, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, - 0x52, 0x08, 0x6d, 0x61, 0x78, 0x43, 0x6f, 0x6e, 0x6e, 0x73, 0x12, 0x24, 0x0a, 0x0e, 0x6d, 0x69, - 0x6e, 0x5f, 0x69, 0x64, 0x6c, 0x65, 0x5f, 0x63, 0x6f, 0x6e, 0x6e, 0x73, 0x18, 0x04, 0x20, 0x01, - 0x28, 0x05, 0x52, 0x0c, 0x6d, 0x69, 0x6e, 0x49, 0x64, 0x6c, 0x65, 0x43, 0x6f, 0x6e, 0x6e, 0x73, - 0x12, 0x4f, 0x0a, 0x0c, 0x64, 0x69, 0x61, 0x6c, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, - 0x18, 0x05, 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, 0x42, 0x11, 0xfa, 0x42, 0x0e, 0xaa, 0x01, 0x0b, 0x22, 0x02, 0x08, 0x0a, 0x32, 0x05, 0x10, - 0x80, 0xad, 0xe2, 0x04, 0x52, 0x0b, 0x64, 0x69, 0x61, 0x6c, 0x54, 0x69, 0x6d, 0x65, 0x6f, 0x75, - 0x74, 0x12, 0x4f, 0x0a, 0x0c, 0x69, 0x64, 0x6c, 0x65, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x6f, 0x75, - 0x74, 0x18, 0x06, 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, 0x42, 0x11, 0xfa, 0x42, 0x0e, 0xaa, 0x01, 0x0b, 0x22, 0x02, 0x08, 0x0a, 0x32, 0x05, - 0x10, 0x80, 0xad, 0xe2, 0x04, 0x52, 0x0b, 0x69, 0x64, 0x6c, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x6f, - 0x75, 0x74, 0x22, 0x35, 0x0a, 0x02, 0x4d, 0x51, 0x12, 0x12, 0x0a, 0x04, 0x61, 0x64, 0x64, 0x72, - 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x04, 0x61, 0x64, 0x64, 0x72, 0x12, 0x1b, 0x0a, 0x09, - 0x6d, 0x61, 0x78, 0x5f, 0x72, 0x65, 0x74, 0x72, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, - 0x08, 0x6d, 0x61, 0x78, 0x52, 0x65, 0x74, 0x72, 0x79, 0x22, 0xc7, 0x02, 0x0a, 0x05, 0x4d, 0x79, - 0x53, 0x51, 0x4c, 0x12, 0x12, 0x0a, 0x04, 0x61, 0x64, 0x64, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x04, 0x61, 0x64, 0x64, 0x72, 0x12, 0x12, 0x0a, 0x04, 0x75, 0x73, 0x65, 0x72, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x75, 0x73, 0x65, 0x72, 0x12, 0x1a, 0x0a, 0x08, 0x70, - 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x70, - 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x12, 0x0e, 0x0a, 0x02, 0x64, 0x62, 0x18, 0x04, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x02, 0x64, 0x62, 0x12, 0x24, 0x0a, 0x0e, 0x6d, 0x61, 0x78, 0x5f, 0x69, - 0x64, 0x6c, 0x65, 0x5f, 0x63, 0x6f, 0x6e, 0x6e, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x05, 0x52, - 0x0c, 0x6d, 0x61, 0x78, 0x49, 0x64, 0x6c, 0x65, 0x43, 0x6f, 0x6e, 0x6e, 0x73, 0x12, 0x24, 0x0a, - 0x0e, 0x6d, 0x61, 0x78, 0x5f, 0x6f, 0x70, 0x65, 0x6e, 0x5f, 0x63, 0x6f, 0x6e, 0x6e, 0x73, 0x18, - 0x06, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0c, 0x6d, 0x61, 0x78, 0x4f, 0x70, 0x65, 0x6e, 0x43, 0x6f, - 0x6e, 0x6e, 0x73, 0x12, 0x4e, 0x0a, 0x0c, 0x69, 0x64, 0x6c, 0x65, 0x5f, 0x74, 0x69, 0x6d, 0x65, - 0x6f, 0x75, 0x74, 0x18, 0x07, 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, 0x42, 0x10, 0xfa, 0x42, 0x0d, 0xaa, 0x01, 0x0a, 0x22, 0x02, 0x08, 0x0a, - 0x32, 0x04, 0x10, 0xc0, 0x84, 0x3d, 0x52, 0x0b, 0x69, 0x64, 0x6c, 0x65, 0x54, 0x69, 0x6d, 0x65, - 0x6f, 0x75, 0x74, 0x12, 0x4e, 0x0a, 0x0c, 0x6f, 0x70, 0x65, 0x6e, 0x5f, 0x74, 0x69, 0x6d, 0x65, - 0x6f, 0x75, 0x74, 0x18, 0x08, 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, 0x42, 0x10, 0xfa, 0x42, 0x0d, 0xaa, 0x01, 0x0a, 0x22, 0x02, 0x08, 0x0a, - 0x32, 0x04, 0x10, 0xc0, 0x84, 0x3d, 0x52, 0x0b, 0x6f, 0x70, 0x65, 0x6e, 0x54, 0x69, 0x6d, 0x65, - 0x6f, 0x75, 0x74, 0x22, 0x1b, 0x0a, 0x05, 0x48, 0x42, 0x61, 0x73, 0x65, 0x12, 0x12, 0x0a, 0x04, - 0x61, 0x64, 0x64, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x61, 0x64, 0x64, 0x72, - 0x2a, 0x3f, 0x0a, 0x05, 0x4c, 0x65, 0x76, 0x65, 0x6c, 0x12, 0x09, 0x0a, 0x05, 0x44, 0x45, 0x42, - 0x55, 0x47, 0x10, 0x00, 0x12, 0x08, 0x0a, 0x04, 0x49, 0x4e, 0x46, 0x4f, 0x10, 0x01, 0x12, 0x0b, - 0x0a, 0x07, 0x57, 0x41, 0x52, 0x4e, 0x49, 0x4e, 0x47, 0x10, 0x02, 0x12, 0x09, 0x0a, 0x05, 0x45, - 0x52, 0x52, 0x4f, 0x52, 0x10, 0x03, 0x12, 0x09, 0x0a, 0x05, 0x46, 0x41, 0x54, 0x41, 0x4c, 0x10, - 0x04, 0x42, 0x22, 0x5a, 0x20, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, - 0x67, 0x6f, 0x2d, 0x67, 0x6f, 0x69, 0x6d, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x63, 0x6f, 0x6e, 0x66, - 0x69, 0x67, 0x2f, 0x76, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x53, 0x51, 0x4c, 0x52, 0x05, 0x6d, 0x79, 0x73, 0x71, 0x6c, 0x12, 0x26, 0x0a, 0x0e, 0x67, 0x61, + 0x74, 0x65, 0x77, 0x61, 0x79, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x18, 0x0b, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x0e, 0x67, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x53, 0x65, 0x72, 0x76, 0x69, + 0x63, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x75, 0x73, 0x65, 0x72, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, + 0x65, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x75, 0x73, 0x65, 0x72, 0x53, 0x65, 0x72, + 0x76, 0x69, 0x63, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x70, 0x75, 0x73, 0x68, 0x53, 0x65, 0x72, 0x76, + 0x69, 0x63, 0x65, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x70, 0x75, 0x73, 0x68, 0x53, + 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x57, + 0x6f, 0x72, 0x6b, 0x65, 0x72, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x73, 0x74, 0x6f, + 0x72, 0x65, 0x57, 0x6f, 0x72, 0x6b, 0x65, 0x72, 0x12, 0x1e, 0x0a, 0x0a, 0x6d, 0x73, 0x67, 0x53, + 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x18, 0x0f, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x6d, 0x73, + 0x67, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x6d, 0x73, 0x67, 0x57, + 0x6f, 0x72, 0x6b, 0x65, 0x72, 0x18, 0x10, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6d, 0x73, 0x67, + 0x57, 0x6f, 0x72, 0x6b, 0x65, 0x72, 0x1a, 0x3b, 0x0a, 0x0d, 0x4d, 0x65, 0x74, 0x61, 0x64, 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, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x68, 0x74, 0x74, 0x70, 0x42, 0x07, 0x0a, 0x05, + 0x5f, 0x67, 0x72, 0x70, 0x63, 0x22, 0x8f, 0x01, 0x0a, 0x03, 0x4c, 0x6f, 0x67, 0x12, 0x1e, 0x0a, + 0x08, 0x6c, 0x6f, 0x67, 0x5f, 0x70, 0x61, 0x74, 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, + 0x00, 0x52, 0x07, 0x6c, 0x6f, 0x67, 0x50, 0x61, 0x74, 0x68, 0x88, 0x01, 0x01, 0x12, 0x34, 0x0a, + 0x05, 0x6c, 0x65, 0x76, 0x65, 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x14, 0x2e, 0x61, + 0x70, 0x69, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x65, 0x76, + 0x65, 0x6c, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x82, 0x01, 0x02, 0x10, 0x01, 0x52, 0x05, 0x6c, 0x65, + 0x76, 0x65, 0x6c, 0x12, 0x25, 0x0a, 0x0e, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x63, 0x6f, + 0x6e, 0x73, 0x6f, 0x6c, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0d, 0x65, 0x6e, 0x61, + 0x62, 0x6c, 0x65, 0x43, 0x6f, 0x6e, 0x73, 0x6f, 0x6c, 0x65, 0x42, 0x0b, 0x0a, 0x09, 0x5f, 0x6c, + 0x6f, 0x67, 0x5f, 0x70, 0x61, 0x74, 0x68, 0x22, 0x9c, 0x02, 0x0a, 0x05, 0x52, 0x65, 0x64, 0x69, + 0x73, 0x12, 0x12, 0x0a, 0x04, 0x61, 0x64, 0x64, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x04, 0x61, 0x64, 0x64, 0x72, 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, 0x12, 0x1b, 0x0a, 0x09, 0x6d, 0x61, 0x78, 0x5f, 0x63, 0x6f, 0x6e, 0x6e, 0x73, 0x18, 0x03, + 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x6d, 0x61, 0x78, 0x43, 0x6f, 0x6e, 0x6e, 0x73, 0x12, 0x24, + 0x0a, 0x0e, 0x6d, 0x69, 0x6e, 0x5f, 0x69, 0x64, 0x6c, 0x65, 0x5f, 0x63, 0x6f, 0x6e, 0x6e, 0x73, + 0x18, 0x04, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0c, 0x6d, 0x69, 0x6e, 0x49, 0x64, 0x6c, 0x65, 0x43, + 0x6f, 0x6e, 0x6e, 0x73, 0x12, 0x4f, 0x0a, 0x0c, 0x64, 0x69, 0x61, 0x6c, 0x5f, 0x74, 0x69, 0x6d, + 0x65, 0x6f, 0x75, 0x74, 0x18, 0x05, 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, 0x42, 0x11, 0xfa, 0x42, 0x0e, 0xaa, 0x01, 0x0b, 0x22, 0x02, 0x08, + 0x0a, 0x32, 0x05, 0x10, 0x80, 0xad, 0xe2, 0x04, 0x52, 0x0b, 0x64, 0x69, 0x61, 0x6c, 0x54, 0x69, + 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x12, 0x4f, 0x0a, 0x0c, 0x69, 0x64, 0x6c, 0x65, 0x5f, 0x74, 0x69, + 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x18, 0x06, 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, 0x42, 0x11, 0xfa, 0x42, 0x0e, 0xaa, 0x01, 0x0b, 0x22, 0x02, + 0x08, 0x0a, 0x32, 0x05, 0x10, 0x80, 0xad, 0xe2, 0x04, 0x52, 0x0b, 0x69, 0x64, 0x6c, 0x65, 0x54, + 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x22, 0x35, 0x0a, 0x02, 0x4d, 0x51, 0x12, 0x12, 0x0a, 0x04, + 0x61, 0x64, 0x64, 0x72, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x04, 0x61, 0x64, 0x64, 0x72, + 0x12, 0x1b, 0x0a, 0x09, 0x6d, 0x61, 0x78, 0x5f, 0x72, 0x65, 0x74, 0x72, 0x79, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x05, 0x52, 0x08, 0x6d, 0x61, 0x78, 0x52, 0x65, 0x74, 0x72, 0x79, 0x22, 0xc7, 0x02, + 0x0a, 0x05, 0x4d, 0x79, 0x53, 0x51, 0x4c, 0x12, 0x12, 0x0a, 0x04, 0x61, 0x64, 0x64, 0x72, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x61, 0x64, 0x64, 0x72, 0x12, 0x12, 0x0a, 0x04, 0x75, + 0x73, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x75, 0x73, 0x65, 0x72, 0x12, + 0x1a, 0x0a, 0x08, 0x70, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x08, 0x70, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x12, 0x0e, 0x0a, 0x02, 0x64, + 0x62, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x64, 0x62, 0x12, 0x24, 0x0a, 0x0e, 0x6d, + 0x61, 0x78, 0x5f, 0x69, 0x64, 0x6c, 0x65, 0x5f, 0x63, 0x6f, 0x6e, 0x6e, 0x73, 0x18, 0x05, 0x20, + 0x01, 0x28, 0x05, 0x52, 0x0c, 0x6d, 0x61, 0x78, 0x49, 0x64, 0x6c, 0x65, 0x43, 0x6f, 0x6e, 0x6e, + 0x73, 0x12, 0x24, 0x0a, 0x0e, 0x6d, 0x61, 0x78, 0x5f, 0x6f, 0x70, 0x65, 0x6e, 0x5f, 0x63, 0x6f, + 0x6e, 0x6e, 0x73, 0x18, 0x06, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0c, 0x6d, 0x61, 0x78, 0x4f, 0x70, + 0x65, 0x6e, 0x43, 0x6f, 0x6e, 0x6e, 0x73, 0x12, 0x4e, 0x0a, 0x0c, 0x69, 0x64, 0x6c, 0x65, 0x5f, + 0x74, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x18, 0x07, 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, 0x42, 0x10, 0xfa, 0x42, 0x0d, 0xaa, 0x01, 0x0a, + 0x22, 0x02, 0x08, 0x0a, 0x32, 0x04, 0x10, 0xc0, 0x84, 0x3d, 0x52, 0x0b, 0x69, 0x64, 0x6c, 0x65, + 0x54, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x12, 0x4e, 0x0a, 0x0c, 0x6f, 0x70, 0x65, 0x6e, 0x5f, + 0x74, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x18, 0x08, 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, 0x42, 0x10, 0xfa, 0x42, 0x0d, 0xaa, 0x01, 0x0a, + 0x22, 0x02, 0x08, 0x0a, 0x32, 0x04, 0x10, 0xc0, 0x84, 0x3d, 0x52, 0x0b, 0x6f, 0x70, 0x65, 0x6e, + 0x54, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x2a, 0x3f, 0x0a, 0x05, 0x4c, 0x65, 0x76, 0x65, 0x6c, + 0x12, 0x09, 0x0a, 0x05, 0x44, 0x45, 0x42, 0x55, 0x47, 0x10, 0x00, 0x12, 0x08, 0x0a, 0x04, 0x49, + 0x4e, 0x46, 0x4f, 0x10, 0x01, 0x12, 0x0b, 0x0a, 0x07, 0x57, 0x41, 0x52, 0x4e, 0x49, 0x4e, 0x47, + 0x10, 0x02, 0x12, 0x09, 0x0a, 0x05, 0x45, 0x52, 0x52, 0x4f, 0x52, 0x10, 0x03, 0x12, 0x09, 0x0a, + 0x05, 0x46, 0x41, 0x54, 0x41, 0x4c, 0x10, 0x04, 0x42, 0x22, 0x5a, 0x20, 0x67, 0x69, 0x74, 0x68, + 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x67, 0x6f, 0x2d, 0x67, 0x6f, 0x69, 0x6d, 0x2f, 0x61, + 0x70, 0x69, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x76, 0x31, 0x62, 0x06, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -819,7 +760,7 @@ func file_config_v1_config_proto_rawDescGZIP() []byte { } var file_config_v1_config_proto_enumTypes = make([]protoimpl.EnumInfo, 1) -var file_config_v1_config_proto_msgTypes = make([]protoimpl.MessageInfo, 8) +var file_config_v1_config_proto_msgTypes = make([]protoimpl.MessageInfo, 7) var file_config_v1_config_proto_goTypes = []interface{}{ (Level)(0), // 0: api.config.v1.Level (*Server)(nil), // 1: api.config.v1.Server @@ -828,30 +769,28 @@ var file_config_v1_config_proto_goTypes = []interface{}{ (*Redis)(nil), // 4: api.config.v1.Redis (*MQ)(nil), // 5: api.config.v1.MQ (*MySQL)(nil), // 6: api.config.v1.MySQL - (*HBase)(nil), // 7: api.config.v1.HBase - nil, // 8: api.config.v1.Service.MetadataEntry - (*durationpb.Duration)(nil), // 9: google.protobuf.Duration + nil, // 7: api.config.v1.Service.MetadataEntry + (*durationpb.Duration)(nil), // 8: google.protobuf.Duration } var file_config_v1_config_proto_depIdxs = []int32{ - 9, // 0: api.config.v1.Server.timeout:type_name -> google.protobuf.Duration + 8, // 0: api.config.v1.Server.timeout:type_name -> google.protobuf.Duration 1, // 1: api.config.v1.Service.http:type_name -> api.config.v1.Server 1, // 2: api.config.v1.Service.grpc:type_name -> api.config.v1.Server 3, // 3: api.config.v1.Service.log:type_name -> api.config.v1.Log - 8, // 4: api.config.v1.Service.metadata:type_name -> api.config.v1.Service.MetadataEntry + 7, // 4: api.config.v1.Service.metadata:type_name -> api.config.v1.Service.MetadataEntry 4, // 5: api.config.v1.Service.redis:type_name -> api.config.v1.Redis 5, // 6: api.config.v1.Service.mq:type_name -> api.config.v1.MQ 6, // 7: api.config.v1.Service.mysql:type_name -> api.config.v1.MySQL - 7, // 8: api.config.v1.Service.hBase:type_name -> api.config.v1.HBase - 0, // 9: api.config.v1.Log.level:type_name -> api.config.v1.Level - 9, // 10: api.config.v1.Redis.dial_timeout:type_name -> google.protobuf.Duration - 9, // 11: api.config.v1.Redis.idle_timeout:type_name -> google.protobuf.Duration - 9, // 12: api.config.v1.MySQL.idle_timeout:type_name -> google.protobuf.Duration - 9, // 13: api.config.v1.MySQL.open_timeout:type_name -> google.protobuf.Duration - 14, // [14:14] is the sub-list for method output_type - 14, // [14:14] is the sub-list for method input_type - 14, // [14:14] is the sub-list for extension type_name - 14, // [14:14] is the sub-list for extension extendee - 0, // [0:14] is the sub-list for field type_name + 0, // 8: api.config.v1.Log.level:type_name -> api.config.v1.Level + 8, // 9: api.config.v1.Redis.dial_timeout:type_name -> google.protobuf.Duration + 8, // 10: api.config.v1.Redis.idle_timeout:type_name -> google.protobuf.Duration + 8, // 11: api.config.v1.MySQL.idle_timeout:type_name -> google.protobuf.Duration + 8, // 12: api.config.v1.MySQL.open_timeout:type_name -> google.protobuf.Duration + 13, // [13:13] is the sub-list for method output_type + 13, // [13:13] is the sub-list for method input_type + 13, // [13:13] is the sub-list for extension type_name + 13, // [13:13] is the sub-list for extension extendee + 0, // [0:13] is the sub-list for field type_name } func init() { file_config_v1_config_proto_init() } @@ -932,18 +871,6 @@ func file_config_v1_config_proto_init() { return nil } } - file_config_v1_config_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*HBase); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } } file_config_v1_config_proto_msgTypes[1].OneofWrappers = []interface{}{} file_config_v1_config_proto_msgTypes[2].OneofWrappers = []interface{}{} @@ -953,7 +880,7 @@ func file_config_v1_config_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_config_v1_config_proto_rawDesc, NumEnums: 1, - NumMessages: 8, + NumMessages: 7, NumExtensions: 0, NumServices: 0, }, diff --git a/config/v1/config.pb.validate.go b/config/v1/config.pb.validate.go index edc8447..faf61f4 100644 --- a/config/v1/config.pb.validate.go +++ b/config/v1/config.pb.validate.go @@ -353,35 +353,6 @@ func (m *Service) validate(all bool) error { } } - if all { - switch v := interface{}(m.GetHBase()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, ServiceValidationError{ - field: "HBase", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, ServiceValidationError{ - field: "HBase", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetHBase()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return ServiceValidationError{ - field: "HBase", - reason: "embedded message failed validation", - cause: err, - } - } - } - // no validation rules for GatewayService // no validation rules for UserService @@ -1095,103 +1066,3 @@ var _ interface { Cause() error ErrorName() string } = MySQLValidationError{} - -// Validate checks the field values on HBase with the rules defined in the -// proto definition for this message. If any rules are violated, the first -// error encountered is returned, or nil if there are no violations. -func (m *HBase) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on HBase with the rules defined in the -// proto definition for this message. If any rules are violated, the result is -// a list of violation errors wrapped in HBaseMultiError, or nil if none found. -func (m *HBase) ValidateAll() error { - return m.validate(true) -} - -func (m *HBase) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - // no validation rules for Addr - - if len(errors) > 0 { - return HBaseMultiError(errors) - } - - return nil -} - -// HBaseMultiError is an error wrapping multiple validation errors returned by -// HBase.ValidateAll() if the designated constraints aren't met. -type HBaseMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m HBaseMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m HBaseMultiError) AllErrors() []error { return m } - -// HBaseValidationError is the validation error returned by HBase.Validate if -// the designated constraints aren't met. -type HBaseValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e HBaseValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e HBaseValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e HBaseValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e HBaseValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e HBaseValidationError) ErrorName() string { return "HBaseValidationError" } - -// Error satisfies the builtin error interface -func (e HBaseValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sHBase.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = HBaseValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = HBaseValidationError{} diff --git a/config/v1/config.proto b/config/v1/config.proto index 9a0e4cd..1413555 100644 --- a/config/v1/config.proto +++ b/config/v1/config.proto @@ -52,7 +52,6 @@ message Service { Redis redis = 7; MQ mq = 8; MySQL mysql = 9; - HBase hBase = 10; // services name string gatewayService = 11; string userService = 12; @@ -135,9 +134,4 @@ message MySQL { seconds: 10 } }]; -} - -message HBase { - string addr = 1; - // add more -} +} \ No newline at end of file diff --git a/errors/errors.pb.go b/errors/errors.pb.go index a5895d8..f7d9624 100644 --- a/errors/errors.pb.go +++ b/errors/errors.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.26.0 +// protoc-gen-go v1.34.1 // protoc (unknown) // source: errors/errors.proto diff --git a/go.mod b/go.mod index 8576551..72dc051 100644 --- a/go.mod +++ b/go.mod @@ -3,21 +3,21 @@ module github.com/go-goim/api go 1.18 require ( - github.com/envoyproxy/protoc-gen-validate v0.9.1 - github.com/stretchr/testify v1.8.2 - google.golang.org/grpc v1.49.0 - google.golang.org/protobuf v1.30.0 + github.com/envoyproxy/protoc-gen-validate v1.0.4 + github.com/stretchr/testify v1.9.0 + google.golang.org/grpc v1.64.0 + google.golang.org/protobuf v1.34.1 ) require ( github.com/davecgh/go-spew v1.1.1 // indirect - github.com/golang/protobuf v1.5.2 // indirect - github.com/kr/pretty v0.1.0 // indirect + github.com/kr/pretty v0.3.0 // indirect github.com/pmezard/go-difflib v1.0.0 // indirect - golang.org/x/net v0.7.0 // indirect - golang.org/x/sys v0.5.0 // indirect - golang.org/x/text v0.7.0 // indirect - google.golang.org/genproto v0.0.0-20210226172003-ab064af71705 // indirect - gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127 // indirect + github.com/rogpeppe/go-internal v1.8.0 // indirect + golang.org/x/net v0.22.0 // indirect + golang.org/x/sys v0.18.0 // indirect + golang.org/x/text v0.14.0 // indirect + google.golang.org/genproto v0.0.0-20230410155749-daa745c078e1 // indirect + gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c // indirect gopkg.in/yaml.v3 v3.0.1 // indirect ) diff --git a/go.sum b/go.sum index 7630006..a58c186 100644 --- a/go.sum +++ b/go.sum @@ -1,105 +1,41 @@ -cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= -github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= -github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= -github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= -github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= -github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= -github.com/envoyproxy/protoc-gen-validate v0.9.1 h1:PS7VIOgmSVhWUEeZwTe7z7zouA22Cr590PzXKbZHOVY= -github.com/envoyproxy/protoc-gen-validate v0.9.1/go.mod h1:OKNgG7TCp5pF4d6XftA0++PMirau2/yoOwVac3AbF2w= -github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= -github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= -github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= -github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= -github.com/golang/protobuf v1.4.0-rc.1/go.mod h1:ceaxUfeHdC40wWswd/P6IGgMaK3YpKi5j83Wpe3EHw8= -github.com/golang/protobuf v1.4.0-rc.1.0.20200221234624-67d41d38c208/go.mod h1:xKAWHe0F5eneWXFV3EuXVDTCmh+JuBKY0li0aMyXATA= -github.com/golang/protobuf v1.4.0-rc.2/go.mod h1:LlEzMj4AhA7rCAGe4KMBDvJI+AwstrUpVNzEA03Pprs= -github.com/golang/protobuf v1.4.0-rc.4.0.20200313231945-b860323f09d0/go.mod h1:WU3c8KckQ9AFe+yFwt9sWVRKCVIyN9cPHBJSNnbL67w= -github.com/golang/protobuf v1.4.0/go.mod h1:jodUvKwWbYaEsadDk5Fwe5c77LiNKVO9IDvqG2KuDX0= -github.com/golang/protobuf v1.4.1/go.mod h1:U8fpvMrcmy5pZrNK1lt4xCsGvpyWQ/VVv6QDs8UjoX8= -github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk= -github.com/golang/protobuf v1.5.2 h1:ROPKBNFfQgOUMifHyP+KYbvpjbdoFNs+aK7DXlji0Tw= -github.com/golang/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= -github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M= -github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= -github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= -github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.6 h1:BKbKCqvP6I+rmFHt06ZmyQtvB8xAkWdhFyr0ZUNZcxQ= -github.com/kr/pretty v0.1.0 h1:L/CwN0zerZDmRFUapSPitk6f+Q3+0za1rQkzVuMiMFI= +github.com/envoyproxy/protoc-gen-validate v1.0.4 h1:gVPz/FMfvh57HdSJQyvBtF00j8JU4zdyUgIUNhlgg0A= +github.com/envoyproxy/protoc-gen-validate v1.0.4/go.mod h1:qys6tmnRsYrQqIhm2bvKZH4Blx/1gTIZ2UKVY1M+Yew= +github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI= github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= +github.com/kr/pretty v0.2.1/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= +github.com/kr/pretty v0.3.0 h1:WgNl7dwNpEZ6jJ9k1snq4pZsg7DOEN8hP9Xw0Tsjwk0= +github.com/kr/pretty v0.3.0/go.mod h1:640gp4NfQd8pI5XOwp5fnNeVWj67G7CFk/SaSQn7NBk= github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= -github.com/kr/text v0.1.0 h1:45sCR5RtlFHMR4UwH9sdQ5TC8v0qDQCHnXt+kaKSTVE= 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/pkg/diff v0.0.0-20210226163009-20ebb0f2a09e/go.mod h1:pJLUxLENpZxwdsKMEsNbx1VGcRFpLqf3715MtcvvzbA= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= -github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= -github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= -github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw= -github.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpEOglKo= -github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= -github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU= -github.com/stretchr/testify v1.8.2 h1:+h33VjcLVPDHtOdpUCuF+7gSuG3yGIftsP1YvFihtJ8= -github.com/stretchr/testify v1.8.2/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= -golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= -golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= -golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= -golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvxsM5YxQ5yQlVC4a0KAMCusXpPoU= -golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= -golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= -golang.org/x/net v0.7.0 h1:rJrUqqhjsgNp7KqAIc25s9pZnjU7TUcSY7HcVZjdn1g= -golang.org/x/net v0.7.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs= -golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= -golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.5.0 h1:MUK/U/4lj1t1oPg0HfuXDN/Z1wv31ZJ/YcPiGccS4DU= -golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= -golang.org/x/text v0.7.0 h1:4BRB4x83lYWy72KwLD/qYDuTu7q9PjSagHvijDw7cLo= -golang.org/x/text v0.7.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= -golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY= -golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= -golang.org/x/tools v0.0.0-20190524140312-2c0ae7006135/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= -golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -golang.org/x/xerrors v0.0.0-20220907171357-04be3eba64a2 h1:H2TDz8ibqkAF6YGhCdN3jS9O0/s90v0rJh3X/OLHEUk= -google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= -google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= -google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= -google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= -google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013/go.mod h1:NbSheEEYHJ7i3ixzK3sjbqSGDJWnxyFXZblF3eUsNvo= -google.golang.org/genproto v0.0.0-20210226172003-ab064af71705 h1:PYBmACG+YEv8uQPW0r1kJj8tR+gkF0UWq7iFdUezwEw= -google.golang.org/genproto v0.0.0-20210226172003-ab064af71705/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= -google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= -google.golang.org/grpc v1.27.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= -google.golang.org/grpc v1.49.0 h1:WTLtQzmQori5FUH25Pq4WT22oCsv8USpQ+F6rqtsmxw= -google.golang.org/grpc v1.49.0/go.mod h1:ZgQEeidpAuNRZ8iRrlBKXZQP1ghovWIVhdJRyCDK+GI= -google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= -google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= -google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM= -google.golang.org/protobuf v1.20.1-0.20200309200217-e05f789c0967/go.mod h1:A+miEFZTKqfCUM6K7xSMQL9OKL/b6hQv+e19PK+JZNE= -google.golang.org/protobuf v1.21.0/go.mod h1:47Nbq4nVaFHyn7ilMalzfO3qCViNmqZ2kzikPIcrTAo= -google.golang.org/protobuf v1.22.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= -google.golang.org/protobuf v1.23.1-0.20200526195155-81db48ad09cc/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= -google.golang.org/protobuf v1.24.0/go.mod h1:r/3tXBNzIEhYS9I1OUVjXDlt8tc493IdKGjtUeSXeh4= -google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= -google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= -google.golang.org/protobuf v1.30.0 h1:kPPoIgf3TsEvrm0PFe15JQ+570QVxYzEvvHqChK+cng= -google.golang.org/protobuf v1.30.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= +github.com/rogpeppe/go-internal v1.6.1/go.mod h1:xXDCJY+GAPziupqXw64V24skbSoqbTEfhy4qGm1nDQc= +github.com/rogpeppe/go-internal v1.8.0 h1:FCbCCtXNOY3UtUuHUYaghJg4y7Fd14rXifAYUAtL9R8= +github.com/rogpeppe/go-internal v1.8.0/go.mod h1:WmiCO8CzOY8rg0OYDC4/i/2WRWAB6poM+XZ2dLUbcbE= +github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg= +github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= +golang.org/x/net v0.22.0 h1:9sGLhx7iRIHEiX0oAJ3MRZMUCElJgy7Br1nO+AMN3Tc= +golang.org/x/net v0.22.0/go.mod h1:JKghWKKOSdJwpW2GEx0Ja7fmaKnMsbu+MWVZTokSYmg= +golang.org/x/sys v0.18.0 h1:DBdB3niSjOA/O0blCZBqDefyWNYveAYMNF1Wum0DYQ4= +golang.org/x/sys v0.18.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/text v0.14.0 h1:ScX5w1eTa3QqT8oi6+ziP7dTV1S2+ALU0bI+0zXKWiQ= +golang.org/x/text v0.14.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU= +google.golang.org/genproto v0.0.0-20230410155749-daa745c078e1 h1:KpwkzHKEF7B9Zxg18WzOa7djJ+Ha5DzthMyZYQfEn2A= +google.golang.org/genproto v0.0.0-20230410155749-daa745c078e1/go.mod h1:nKE/iIaLqn2bQwXBg8f1g2Ylh6r5MN5CmZvuzZCgsCU= +google.golang.org/grpc v1.64.0 h1:KH3VH9y/MgNQg1dE7b3XfVK0GsPSIzJwdF617gUSbvY= +google.golang.org/grpc v1.64.0/go.mod h1:oxjF8E3FBnjp+/gVFYdWacaLDx9na1aqy9oovLpxQYg= +google.golang.org/protobuf v1.34.1 h1:9ddQBjfCyZPOHPUiPxpYESBLc+T8P3E+Vo4IbKZgFWg= +google.golang.org/protobuf v1.34.1/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= -gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127 h1:qIbj1fsPNlZgppZ+VLlY7N33q108Sa+fhmuc+sWQYwY= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= -gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= +gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= +gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= +gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= -honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= -honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= diff --git a/message/v1/message.db.go b/message/v1/message.db.go new file mode 100644 index 0000000..85328c2 --- /dev/null +++ b/message/v1/message.db.go @@ -0,0 +1,49 @@ +package v1 + +import ( + "github.com/go-goim/api/types" + "google.golang.org/protobuf/types/known/timestamppb" + "time" +) + +func (x *StorageMessage) TableName() string { + return "message_history" // TODO: use config +} + +type StorageMessageDBContent struct { + Content string `json:"content"` + ContentType MessageContentType `json:"content_type"` +} + +type StorageMessageDB struct { + MsgID types.ID `gorm:"column:id;primaryKey"` + SessionID string `gorm:"column:session_id"` + SessionType SessionType `gorm:"column:session_type,type:tinyint"` + FromUID types.ID `gorm:"column:from_uid,type:bigint"` + ToUID types.ID `gorm:"column:to_uid,type:bigint"` + Content *StorageMessageDBContent `gorm:"column:content, type:bytes, serializer:json"` + CreateTime int64 `gorm:"column:create_time,type:int"` +} + +func (s *StorageMessageDB) ToProto() *StorageMessage { + return &StorageMessage{ + MsgID: s.MsgID.Int64(), + SessionID: s.SessionID, + SessionType: s.SessionType, + FromID: s.FromUID.Int64(), + ToID: s.ToUID.Int64(), + Content: &StorageMessage_Content{Content: s.Content.Content, ContentType: s.Content.ContentType}, + CreateTime: timestamppb.New(time.UnixMilli(s.CreateTime)), + } +} + +func (s *StorageMessageDB) FromProto(m *StorageMessage) *StorageMessageDB { + s.MsgID = types.ID(m.MsgID) + s.SessionID = m.SessionID + s.SessionType = m.SessionType + s.FromUID = types.ID(m.FromID) + s.ToUID = types.ID(m.ToID) + s.Content = &StorageMessageDBContent{Content: m.Content.Content, ContentType: m.Content.ContentType} + s.CreateTime = m.CreateTime.AsTime().UnixMilli() + return s +} diff --git a/message/v1/message.ext.go b/message/v1/message.ext.go deleted file mode 100644 index 44d9bde..0000000 --- a/message/v1/message.ext.go +++ /dev/null @@ -1,32 +0,0 @@ -package v1 - -import ( - "strconv" -) - -// This file is for extend proto generated structs methods. - -func (x *StorageMessage) HbaseRowKey() string { - return x.RowKey -} - -func (x *StorageMessage) HbaseValues() map[string]map[string][]byte { - return map[string]map[string][]byte{ - "users": { - "from": []byte(strconv.FormatInt(x.Users.FromID, 10)), - "to": []byte(strconv.FormatInt(x.Users.ToID, 10)), - "sessionId": []byte(x.Users.SessionID), - }, - "content": { - "type": []byte(strconv.Itoa(int(x.Content.ContentType))), - "text": []byte(x.Content.Content), // TODO: use content instead of text - }, - "extra": { - "timestamp": []byte(strconv.FormatInt(x.Extra.CreateTime.Seconds, 10)), - }, - } -} - -func (x *StorageMessage) TableName() string { - return "message_history" -} diff --git a/message/v1/message.pb.go b/message/v1/message.pb.go index 19defe1..1f62ef6 100644 --- a/message/v1/message.pb.go +++ b/message/v1/message.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.26.0 +// protoc-gen-go v1.34.1 // protoc (unknown) // source: message/v1/message.proto @@ -127,6 +127,52 @@ func (SessionType) EnumDescriptor() ([]byte, []int) { return file_message_v1_message_proto_rawDescGZIP(), []int{1} } +type MessageStatus int32 + +const ( + MessageStatus_Normal MessageStatus = 0 + MessageStatus_Deleted MessageStatus = 1 +) + +// Enum value maps for MessageStatus. +var ( + MessageStatus_name = map[int32]string{ + 0: "Normal", + 1: "Deleted", + } + MessageStatus_value = map[string]int32{ + "Normal": 0, + "Deleted": 1, + } +) + +func (x MessageStatus) Enum() *MessageStatus { + p := new(MessageStatus) + *p = x + return p +} + +func (x MessageStatus) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (MessageStatus) Descriptor() protoreflect.EnumDescriptor { + return file_message_v1_message_proto_enumTypes[2].Descriptor() +} + +func (MessageStatus) Type() protoreflect.EnumType { + return &file_message_v1_message_proto_enumTypes[2] +} + +func (x MessageStatus) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use MessageStatus.Descriptor instead. +func (MessageStatus) EnumDescriptor() ([]byte, []int) { + return file_message_v1_message_proto_rawDescGZIP(), []int{2} +} + // SendMessageReq receive data from gateway type SendMessageReq struct { state protoimpl.MessageState @@ -689,10 +735,14 @@ type StorageMessage struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - RowKey string `protobuf:"bytes,1,opt,name=rowKey,proto3" json:"rowKey,omitempty"` - Users *StorageMessage_Users `protobuf:"bytes,2,opt,name=users,proto3" json:"users,omitempty"` - Content *StorageMessage_Content `protobuf:"bytes,3,opt,name=content,proto3" json:"content,omitempty"` - Extra *StorageMessage_Extra `protobuf:"bytes,4,opt,name=extra,proto3" json:"extra,omitempty"` + MsgID int64 `protobuf:"varint,1,opt,name=msgID,proto3" json:"msgID,omitempty"` + SessionID string `protobuf:"bytes,2,opt,name=sessionID,proto3" json:"sessionID,omitempty"` + SessionType SessionType `protobuf:"varint,3,opt,name=session_type,json=sessionType,proto3,enum=api.message.v1.SessionType" json:"session_type,omitempty"` + FromID int64 `protobuf:"varint,4,opt,name=fromID,proto3" json:"fromID,omitempty"` + ToID int64 `protobuf:"varint,5,opt,name=toID,proto3" json:"toID,omitempty"` + Content *StorageMessage_Content `protobuf:"bytes,6,opt,name=content,proto3" json:"content,omitempty"` + CreateTime *timestamppb.Timestamp `protobuf:"bytes,7,opt,name=createTime,proto3" json:"createTime,omitempty"` + Status MessageStatus `protobuf:"varint,8,opt,name=status,proto3,enum=api.message.v1.MessageStatus" json:"status,omitempty"` } func (x *StorageMessage) Reset() { @@ -727,18 +777,39 @@ func (*StorageMessage) Descriptor() ([]byte, []int) { return file_message_v1_message_proto_rawDescGZIP(), []int{8} } -func (x *StorageMessage) GetRowKey() string { +func (x *StorageMessage) GetMsgID() int64 { if x != nil { - return x.RowKey + return x.MsgID + } + return 0 +} + +func (x *StorageMessage) GetSessionID() string { + if x != nil { + return x.SessionID } return "" } -func (x *StorageMessage) GetUsers() *StorageMessage_Users { +func (x *StorageMessage) GetSessionType() SessionType { + if x != nil { + return x.SessionType + } + return SessionType_SingleChat +} + +func (x *StorageMessage) GetFromID() int64 { if x != nil { - return x.Users + return x.FromID } - return nil + return 0 +} + +func (x *StorageMessage) GetToID() int64 { + if x != nil { + return x.ToID + } + return 0 } func (x *StorageMessage) GetContent() *StorageMessage_Content { @@ -748,13 +819,20 @@ func (x *StorageMessage) GetContent() *StorageMessage_Content { return nil } -func (x *StorageMessage) GetExtra() *StorageMessage_Extra { +func (x *StorageMessage) GetCreateTime() *timestamppb.Timestamp { if x != nil { - return x.Extra + return x.CreateTime } return nil } +func (x *StorageMessage) GetStatus() MessageStatus { + if x != nil { + return x.Status + } + return MessageStatus_Normal +} + type QuerySessionHistoryMessageReq struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -1031,69 +1109,6 @@ func (x *SyncHistoryMessageResp) GetMessages() []*Message { return nil } -type StorageMessage_Users struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - FromID int64 `protobuf:"varint,1,opt,name=fromID,proto3" json:"fromID,omitempty"` - ToID int64 `protobuf:"varint,2,opt,name=toID,proto3" json:"toID,omitempty"` - SessionID string `protobuf:"bytes,3,opt,name=sessionID,proto3" json:"sessionID,omitempty"` -} - -func (x *StorageMessage_Users) Reset() { - *x = StorageMessage_Users{} - if protoimpl.UnsafeEnabled { - mi := &file_message_v1_message_proto_msgTypes[13] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *StorageMessage_Users) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*StorageMessage_Users) ProtoMessage() {} - -func (x *StorageMessage_Users) ProtoReflect() protoreflect.Message { - mi := &file_message_v1_message_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 StorageMessage_Users.ProtoReflect.Descriptor instead. -func (*StorageMessage_Users) Descriptor() ([]byte, []int) { - return file_message_v1_message_proto_rawDescGZIP(), []int{8, 0} -} - -func (x *StorageMessage_Users) GetFromID() int64 { - if x != nil { - return x.FromID - } - return 0 -} - -func (x *StorageMessage_Users) GetToID() int64 { - if x != nil { - return x.ToID - } - return 0 -} - -func (x *StorageMessage_Users) GetSessionID() string { - if x != nil { - return x.SessionID - } - return "" -} - type StorageMessage_Content struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -1106,7 +1121,7 @@ type StorageMessage_Content struct { func (x *StorageMessage_Content) Reset() { *x = StorageMessage_Content{} if protoimpl.UnsafeEnabled { - mi := &file_message_v1_message_proto_msgTypes[14] + mi := &file_message_v1_message_proto_msgTypes[13] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1119,7 +1134,7 @@ func (x *StorageMessage_Content) String() string { func (*StorageMessage_Content) ProtoMessage() {} func (x *StorageMessage_Content) ProtoReflect() protoreflect.Message { - mi := &file_message_v1_message_proto_msgTypes[14] + mi := &file_message_v1_message_proto_msgTypes[13] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1132,7 +1147,7 @@ func (x *StorageMessage_Content) ProtoReflect() protoreflect.Message { // Deprecated: Use StorageMessage_Content.ProtoReflect.Descriptor instead. func (*StorageMessage_Content) Descriptor() ([]byte, []int) { - return file_message_v1_message_proto_rawDescGZIP(), []int{8, 1} + return file_message_v1_message_proto_rawDescGZIP(), []int{8, 0} } func (x *StorageMessage_Content) GetContentType() MessageContentType { @@ -1149,53 +1164,6 @@ func (x *StorageMessage_Content) GetContent() string { return "" } -type StorageMessage_Extra struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - CreateTime *timestamppb.Timestamp `protobuf:"bytes,1,opt,name=createTime,proto3" json:"createTime,omitempty"` -} - -func (x *StorageMessage_Extra) Reset() { - *x = StorageMessage_Extra{} - if protoimpl.UnsafeEnabled { - mi := &file_message_v1_message_proto_msgTypes[15] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *StorageMessage_Extra) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*StorageMessage_Extra) ProtoMessage() {} - -func (x *StorageMessage_Extra) ProtoReflect() protoreflect.Message { - mi := &file_message_v1_message_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 StorageMessage_Extra.ProtoReflect.Descriptor instead. -func (*StorageMessage_Extra) Descriptor() ([]byte, []int) { - return file_message_v1_message_proto_rawDescGZIP(), []int{8, 2} -} - -func (x *StorageMessage_Extra) GetCreateTime() *timestamppb.Timestamp { - if x != nil { - return x.CreateTime - } - return nil -} - var File_message_v1_message_proto protoreflect.FileDescriptor var file_message_v1_message_proto_rawDesc = []byte{ @@ -1288,125 +1256,126 @@ var file_message_v1_message_proto_rawDesc = []byte{ 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x73, 0x2e, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x52, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x12, 0x1e, 0x0a, 0x0b, 0x6c, 0x61, 0x73, 0x74, 0x5f, 0x6d, 0x73, 0x67, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x6c, - 0x61, 0x73, 0x74, 0x4d, 0x73, 0x67, 0x49, 0x64, 0x22, 0xe5, 0x03, 0x0a, 0x0e, 0x53, 0x74, 0x6f, - 0x72, 0x61, 0x67, 0x65, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x72, - 0x6f, 0x77, 0x4b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x72, 0x6f, 0x77, - 0x4b, 0x65, 0x79, 0x12, 0x3a, 0x0a, 0x05, 0x75, 0x73, 0x65, 0x72, 0x73, 0x18, 0x02, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, - 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x4d, 0x65, 0x73, 0x73, 0x61, - 0x67, 0x65, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x73, 0x52, 0x05, 0x75, 0x73, 0x65, 0x72, 0x73, 0x12, - 0x40, 0x0a, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x26, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x2e, 0x76, - 0x31, 0x2e, 0x53, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, - 0x2e, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x52, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, - 0x74, 0x12, 0x3a, 0x0a, 0x05, 0x65, 0x78, 0x74, 0x72, 0x61, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x24, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x2e, 0x76, - 0x31, 0x2e, 0x53, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, - 0x2e, 0x45, 0x78, 0x74, 0x72, 0x61, 0x52, 0x05, 0x65, 0x78, 0x74, 0x72, 0x61, 0x1a, 0x51, 0x0a, - 0x05, 0x55, 0x73, 0x65, 0x72, 0x73, 0x12, 0x16, 0x0a, 0x06, 0x66, 0x72, 0x6f, 0x6d, 0x49, 0x44, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x06, 0x66, 0x72, 0x6f, 0x6d, 0x49, 0x44, 0x12, 0x12, - 0x0a, 0x04, 0x74, 0x6f, 0x49, 0x44, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x04, 0x74, 0x6f, - 0x49, 0x44, 0x12, 0x1c, 0x0a, 0x09, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x49, 0x44, 0x18, - 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x49, 0x44, + 0x61, 0x73, 0x74, 0x4d, 0x73, 0x67, 0x49, 0x64, 0x22, 0xd0, 0x03, 0x0a, 0x0e, 0x53, 0x74, 0x6f, + 0x72, 0x61, 0x67, 0x65, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x6d, + 0x73, 0x67, 0x49, 0x44, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x6d, 0x73, 0x67, 0x49, + 0x44, 0x12, 0x1c, 0x0a, 0x09, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x49, 0x44, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x49, 0x44, 0x12, + 0x3e, 0x0a, 0x0c, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, + 0x03, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1b, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x6d, 0x65, 0x73, 0x73, + 0x61, 0x67, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x54, 0x79, + 0x70, 0x65, 0x52, 0x0b, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x12, + 0x16, 0x0a, 0x06, 0x66, 0x72, 0x6f, 0x6d, 0x49, 0x44, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x52, + 0x06, 0x66, 0x72, 0x6f, 0x6d, 0x49, 0x44, 0x12, 0x12, 0x0a, 0x04, 0x74, 0x6f, 0x49, 0x44, 0x18, + 0x05, 0x20, 0x01, 0x28, 0x03, 0x52, 0x04, 0x74, 0x6f, 0x49, 0x44, 0x12, 0x40, 0x0a, 0x07, 0x63, + 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x61, + 0x70, 0x69, 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x74, + 0x6f, 0x72, 0x61, 0x67, 0x65, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x2e, 0x43, 0x6f, 0x6e, + 0x74, 0x65, 0x6e, 0x74, 0x52, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x12, 0x3a, 0x0a, + 0x0a, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x18, 0x07, 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, 0x12, 0x35, 0x0a, 0x06, 0x73, 0x74, 0x61, + 0x74, 0x75, 0x73, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1d, 0x2e, 0x61, 0x70, 0x69, 0x2e, + 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x65, 0x73, 0x73, 0x61, + 0x67, 0x65, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x1a, 0x69, 0x0a, 0x07, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x12, 0x44, 0x0a, 0x0b, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x54, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x22, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x54, 0x79, 0x70, 0x65, 0x52, 0x0b, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x54, 0x79, 0x70, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x1a, 0x43, 0x0a, 0x05, 0x45, - 0x78, 0x74, 0x72, 0x61, 0x12, 0x3a, 0x0a, 0x0a, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x54, 0x69, - 0x6d, 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, 0x0a, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x54, 0x69, 0x6d, 0x65, - 0x22, 0xbe, 0x01, 0x0a, 0x1d, 0x51, 0x75, 0x65, 0x72, 0x79, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, - 0x6e, 0x48, 0x69, 0x73, 0x74, 0x6f, 0x72, 0x79, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x52, - 0x65, 0x71, 0x12, 0x19, 0x0a, 0x03, 0x75, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x42, - 0x07, 0xfa, 0x42, 0x04, 0x22, 0x02, 0x20, 0x00, 0x52, 0x03, 0x75, 0x69, 0x64, 0x12, 0x1d, 0x0a, - 0x0a, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x09, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x12, 0x27, 0x0a, 0x0b, - 0x6c, 0x61, 0x73, 0x74, 0x5f, 0x6d, 0x73, 0x67, 0x5f, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, - 0x03, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x22, 0x02, 0x20, 0x00, 0x52, 0x09, 0x6c, 0x61, 0x73, 0x74, - 0x4d, 0x73, 0x67, 0x49, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x70, 0x61, 0x67, 0x65, 0x18, 0x04, 0x20, - 0x01, 0x28, 0x05, 0x52, 0x04, 0x70, 0x61, 0x67, 0x65, 0x12, 0x26, 0x0a, 0x09, 0x70, 0x61, 0x67, - 0x65, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x05, 0x42, 0x09, 0xfa, 0x42, - 0x06, 0x1a, 0x04, 0x18, 0x64, 0x28, 0x01, 0x52, 0x08, 0x70, 0x61, 0x67, 0x65, 0x53, 0x69, 0x7a, - 0x65, 0x22, 0x94, 0x01, 0x0a, 0x1e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x53, 0x65, 0x73, 0x73, 0x69, - 0x6f, 0x6e, 0x48, 0x69, 0x73, 0x74, 0x6f, 0x72, 0x79, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, - 0x52, 0x65, 0x73, 0x70, 0x12, 0x27, 0x0a, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x73, - 0x2e, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x52, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x12, 0x14, 0x0a, - 0x05, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x74, 0x6f, - 0x74, 0x61, 0x6c, 0x12, 0x33, 0x0a, 0x08, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x18, - 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x6d, 0x65, 0x73, 0x73, - 0x61, 0x67, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x52, 0x08, - 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x22, 0x97, 0x01, 0x0a, 0x15, 0x53, 0x79, 0x6e, - 0x63, 0x48, 0x69, 0x73, 0x74, 0x6f, 0x72, 0x79, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x52, - 0x65, 0x71, 0x12, 0x19, 0x0a, 0x03, 0x75, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x42, - 0x07, 0xfa, 0x42, 0x04, 0x22, 0x02, 0x20, 0x00, 0x52, 0x03, 0x75, 0x69, 0x64, 0x12, 0x27, 0x0a, - 0x0b, 0x6c, 0x61, 0x73, 0x74, 0x5f, 0x6d, 0x73, 0x67, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, - 0x28, 0x03, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x22, 0x02, 0x20, 0x00, 0x52, 0x09, 0x6c, 0x61, 0x73, - 0x74, 0x4d, 0x73, 0x67, 0x49, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x70, 0x61, 0x67, 0x65, 0x18, 0x03, - 0x20, 0x01, 0x28, 0x05, 0x52, 0x04, 0x70, 0x61, 0x67, 0x65, 0x12, 0x26, 0x0a, 0x09, 0x70, 0x61, - 0x67, 0x65, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x05, 0x42, 0x09, 0xfa, - 0x42, 0x06, 0x1a, 0x04, 0x18, 0x64, 0x28, 0x01, 0x52, 0x08, 0x70, 0x61, 0x67, 0x65, 0x53, 0x69, - 0x7a, 0x65, 0x22, 0x8c, 0x01, 0x0a, 0x16, 0x53, 0x79, 0x6e, 0x63, 0x48, 0x69, 0x73, 0x74, 0x6f, - 0x72, 0x79, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x52, 0x65, 0x73, 0x70, 0x12, 0x27, 0x0a, - 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x61, - 0x70, 0x69, 0x2e, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x73, 0x2e, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x52, - 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x12, 0x14, 0x0a, 0x05, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x12, 0x33, 0x0a, 0x08, - 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x17, - 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x31, 0x2e, - 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x52, 0x08, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, - 0x73, 0x2a, 0x34, 0x0a, 0x12, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x43, 0x6f, 0x6e, 0x74, - 0x65, 0x6e, 0x74, 0x54, 0x79, 0x70, 0x65, 0x12, 0x08, 0x0a, 0x04, 0x54, 0x65, 0x78, 0x74, 0x10, - 0x00, 0x12, 0x09, 0x0a, 0x05, 0x49, 0x6d, 0x61, 0x67, 0x65, 0x10, 0x01, 0x12, 0x09, 0x0a, 0x05, - 0x56, 0x6f, 0x69, 0x63, 0x65, 0x10, 0x02, 0x2a, 0x48, 0x0a, 0x0b, 0x53, 0x65, 0x73, 0x73, 0x69, - 0x6f, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x12, 0x0e, 0x0a, 0x0a, 0x53, 0x69, 0x6e, 0x67, 0x6c, 0x65, - 0x43, 0x68, 0x61, 0x74, 0x10, 0x00, 0x12, 0x0d, 0x0a, 0x09, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x43, - 0x68, 0x61, 0x74, 0x10, 0x01, 0x12, 0x0d, 0x0a, 0x09, 0x42, 0x72, 0x6f, 0x61, 0x64, 0x63, 0x61, - 0x73, 0x74, 0x10, 0x02, 0x12, 0x0b, 0x0a, 0x07, 0x43, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x10, - 0x03, 0x32, 0x64, 0x0a, 0x12, 0x50, 0x75, 0x73, 0x68, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, - 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x4e, 0x0a, 0x0b, 0x50, 0x75, 0x73, 0x68, 0x4d, - 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x1e, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x6d, 0x65, 0x73, - 0x73, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x75, 0x73, 0x68, 0x4d, 0x65, 0x73, 0x73, - 0x61, 0x67, 0x65, 0x52, 0x65, 0x71, 0x1a, 0x1f, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x6d, 0x65, 0x73, - 0x73, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x75, 0x73, 0x68, 0x4d, 0x65, 0x73, 0x73, - 0x61, 0x67, 0x65, 0x52, 0x65, 0x73, 0x70, 0x32, 0xde, 0x01, 0x0a, 0x15, 0x4f, 0x66, 0x66, 0x6c, - 0x69, 0x6e, 0x65, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, - 0x65, 0x12, 0x66, 0x0a, 0x13, 0x51, 0x75, 0x65, 0x72, 0x79, 0x4f, 0x66, 0x66, 0x6c, 0x69, 0x6e, - 0x65, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x26, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x6d, - 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x4f, - 0x66, 0x66, 0x6c, 0x69, 0x6e, 0x65, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x52, 0x65, 0x71, - 0x1a, 0x27, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x2e, 0x76, - 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x4f, 0x66, 0x66, 0x6c, 0x69, 0x6e, 0x65, 0x4d, 0x65, - 0x73, 0x73, 0x61, 0x67, 0x65, 0x52, 0x65, 0x73, 0x70, 0x12, 0x5d, 0x0a, 0x10, 0x43, 0x6f, 0x6e, - 0x66, 0x69, 0x72, 0x6d, 0x4c, 0x61, 0x73, 0x74, 0x4d, 0x73, 0x74, 0x49, 0x44, 0x12, 0x23, 0x2e, - 0x61, 0x70, 0x69, 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x43, - 0x6f, 0x6e, 0x66, 0x69, 0x72, 0x6d, 0x4c, 0x61, 0x73, 0x74, 0x4d, 0x73, 0x67, 0x49, 0x44, 0x52, - 0x65, 0x71, 0x1a, 0x24, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, + 0x28, 0x09, 0x52, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x22, 0xbe, 0x01, 0x0a, 0x1d, + 0x51, 0x75, 0x65, 0x72, 0x79, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x48, 0x69, 0x73, 0x74, + 0x6f, 0x72, 0x79, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x52, 0x65, 0x71, 0x12, 0x19, 0x0a, + 0x03, 0x75, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x22, + 0x02, 0x20, 0x00, 0x52, 0x03, 0x75, 0x69, 0x64, 0x12, 0x1d, 0x0a, 0x0a, 0x73, 0x65, 0x73, 0x73, + 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x73, 0x65, + 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x12, 0x27, 0x0a, 0x0b, 0x6c, 0x61, 0x73, 0x74, 0x5f, + 0x6d, 0x73, 0x67, 0x5f, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x42, 0x07, 0xfa, 0x42, + 0x04, 0x22, 0x02, 0x20, 0x00, 0x52, 0x09, 0x6c, 0x61, 0x73, 0x74, 0x4d, 0x73, 0x67, 0x49, 0x64, + 0x12, 0x12, 0x0a, 0x04, 0x70, 0x61, 0x67, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x05, 0x52, 0x04, + 0x70, 0x61, 0x67, 0x65, 0x12, 0x26, 0x0a, 0x09, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x73, 0x69, 0x7a, + 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x05, 0x42, 0x09, 0xfa, 0x42, 0x06, 0x1a, 0x04, 0x18, 0x64, + 0x28, 0x01, 0x52, 0x08, 0x70, 0x61, 0x67, 0x65, 0x53, 0x69, 0x7a, 0x65, 0x22, 0x94, 0x01, 0x0a, + 0x1e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x48, 0x69, 0x73, + 0x74, 0x6f, 0x72, 0x79, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x52, 0x65, 0x73, 0x70, 0x12, + 0x27, 0x0a, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x11, + 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x73, 0x2e, 0x45, 0x72, 0x72, 0x6f, + 0x72, 0x52, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x12, 0x14, 0x0a, 0x05, 0x74, 0x6f, 0x74, 0x61, + 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x12, 0x33, + 0x0a, 0x08, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, + 0x32, 0x17, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x2e, 0x76, + 0x31, 0x2e, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x52, 0x08, 0x6d, 0x65, 0x73, 0x73, 0x61, + 0x67, 0x65, 0x73, 0x22, 0x97, 0x01, 0x0a, 0x15, 0x53, 0x79, 0x6e, 0x63, 0x48, 0x69, 0x73, 0x74, + 0x6f, 0x72, 0x79, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x52, 0x65, 0x71, 0x12, 0x19, 0x0a, + 0x03, 0x75, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x22, + 0x02, 0x20, 0x00, 0x52, 0x03, 0x75, 0x69, 0x64, 0x12, 0x27, 0x0a, 0x0b, 0x6c, 0x61, 0x73, 0x74, + 0x5f, 0x6d, 0x73, 0x67, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x42, 0x07, 0xfa, + 0x42, 0x04, 0x22, 0x02, 0x20, 0x00, 0x52, 0x09, 0x6c, 0x61, 0x73, 0x74, 0x4d, 0x73, 0x67, 0x49, + 0x64, 0x12, 0x12, 0x0a, 0x04, 0x70, 0x61, 0x67, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, + 0x04, 0x70, 0x61, 0x67, 0x65, 0x12, 0x26, 0x0a, 0x09, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x73, 0x69, + 0x7a, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x05, 0x42, 0x09, 0xfa, 0x42, 0x06, 0x1a, 0x04, 0x18, + 0x64, 0x28, 0x01, 0x52, 0x08, 0x70, 0x61, 0x67, 0x65, 0x53, 0x69, 0x7a, 0x65, 0x22, 0x8c, 0x01, + 0x0a, 0x16, 0x53, 0x79, 0x6e, 0x63, 0x48, 0x69, 0x73, 0x74, 0x6f, 0x72, 0x79, 0x4d, 0x65, 0x73, + 0x73, 0x61, 0x67, 0x65, 0x52, 0x65, 0x73, 0x70, 0x12, 0x27, 0x0a, 0x05, 0x65, 0x72, 0x72, 0x6f, + 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x65, 0x72, + 0x72, 0x6f, 0x72, 0x73, 0x2e, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x52, 0x05, 0x65, 0x72, 0x72, 0x6f, + 0x72, 0x12, 0x14, 0x0a, 0x05, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, + 0x52, 0x05, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x12, 0x33, 0x0a, 0x08, 0x6d, 0x65, 0x73, 0x73, 0x61, + 0x67, 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x61, 0x70, 0x69, 0x2e, + 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x65, 0x73, 0x73, 0x61, + 0x67, 0x65, 0x52, 0x08, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x2a, 0x34, 0x0a, 0x12, + 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x54, 0x79, + 0x70, 0x65, 0x12, 0x08, 0x0a, 0x04, 0x54, 0x65, 0x78, 0x74, 0x10, 0x00, 0x12, 0x09, 0x0a, 0x05, + 0x49, 0x6d, 0x61, 0x67, 0x65, 0x10, 0x01, 0x12, 0x09, 0x0a, 0x05, 0x56, 0x6f, 0x69, 0x63, 0x65, + 0x10, 0x02, 0x2a, 0x48, 0x0a, 0x0b, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x54, 0x79, 0x70, + 0x65, 0x12, 0x0e, 0x0a, 0x0a, 0x53, 0x69, 0x6e, 0x67, 0x6c, 0x65, 0x43, 0x68, 0x61, 0x74, 0x10, + 0x00, 0x12, 0x0d, 0x0a, 0x09, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x43, 0x68, 0x61, 0x74, 0x10, 0x01, + 0x12, 0x0d, 0x0a, 0x09, 0x42, 0x72, 0x6f, 0x61, 0x64, 0x63, 0x61, 0x73, 0x74, 0x10, 0x02, 0x12, + 0x0b, 0x0a, 0x07, 0x43, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x10, 0x03, 0x2a, 0x28, 0x0a, 0x0d, + 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x0a, 0x0a, + 0x06, 0x4e, 0x6f, 0x72, 0x6d, 0x61, 0x6c, 0x10, 0x00, 0x12, 0x0b, 0x0a, 0x07, 0x44, 0x65, 0x6c, + 0x65, 0x74, 0x65, 0x64, 0x10, 0x01, 0x32, 0x64, 0x0a, 0x12, 0x50, 0x75, 0x73, 0x68, 0x4d, 0x65, + 0x73, 0x73, 0x61, 0x67, 0x65, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x4e, 0x0a, 0x0b, + 0x50, 0x75, 0x73, 0x68, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x1e, 0x2e, 0x61, 0x70, + 0x69, 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x75, 0x73, + 0x68, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x52, 0x65, 0x71, 0x1a, 0x1f, 0x2e, 0x61, 0x70, + 0x69, 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x75, 0x73, + 0x68, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x52, 0x65, 0x73, 0x70, 0x32, 0xde, 0x01, 0x0a, + 0x15, 0x4f, 0x66, 0x66, 0x6c, 0x69, 0x6e, 0x65, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x53, + 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x66, 0x0a, 0x13, 0x51, 0x75, 0x65, 0x72, 0x79, 0x4f, + 0x66, 0x66, 0x6c, 0x69, 0x6e, 0x65, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x26, 0x2e, + 0x61, 0x70, 0x69, 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x51, + 0x75, 0x65, 0x72, 0x79, 0x4f, 0x66, 0x66, 0x6c, 0x69, 0x6e, 0x65, 0x4d, 0x65, 0x73, 0x73, 0x61, + 0x67, 0x65, 0x52, 0x65, 0x71, 0x1a, 0x27, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x6d, 0x65, 0x73, 0x73, + 0x61, 0x67, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x4f, 0x66, 0x66, 0x6c, + 0x69, 0x6e, 0x65, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x52, 0x65, 0x73, 0x70, 0x12, 0x5d, + 0x0a, 0x10, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x72, 0x6d, 0x4c, 0x61, 0x73, 0x74, 0x4d, 0x73, 0x74, + 0x49, 0x44, 0x12, 0x23, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x72, 0x6d, 0x4c, 0x61, 0x73, 0x74, 0x4d, - 0x73, 0x67, 0x49, 0x44, 0x52, 0x65, 0x73, 0x70, 0x32, 0xf9, 0x01, 0x0a, 0x15, 0x48, 0x69, 0x73, - 0x74, 0x6f, 0x72, 0x79, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x53, 0x65, 0x72, 0x76, 0x69, - 0x63, 0x65, 0x12, 0x7b, 0x0a, 0x1a, 0x51, 0x75, 0x65, 0x72, 0x79, 0x53, 0x65, 0x73, 0x73, 0x69, + 0x73, 0x67, 0x49, 0x44, 0x52, 0x65, 0x71, 0x1a, 0x24, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x6d, 0x65, + 0x73, 0x73, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x72, 0x6d, + 0x4c, 0x61, 0x73, 0x74, 0x4d, 0x73, 0x67, 0x49, 0x44, 0x52, 0x65, 0x73, 0x70, 0x32, 0xf9, 0x01, + 0x0a, 0x15, 0x48, 0x69, 0x73, 0x74, 0x6f, 0x72, 0x79, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, + 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x7b, 0x0a, 0x1a, 0x51, 0x75, 0x65, 0x72, 0x79, + 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x48, 0x69, 0x73, 0x74, 0x6f, 0x72, 0x79, 0x4d, 0x65, + 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x2d, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x6d, 0x65, 0x73, 0x73, + 0x61, 0x67, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x53, 0x65, 0x73, 0x73, + 0x69, 0x6f, 0x6e, 0x48, 0x69, 0x73, 0x74, 0x6f, 0x72, 0x79, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, + 0x65, 0x52, 0x65, 0x71, 0x1a, 0x2e, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, + 0x67, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x48, 0x69, 0x73, 0x74, 0x6f, 0x72, 0x79, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, - 0x12, 0x2d, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x2e, 0x76, - 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x48, 0x69, - 0x73, 0x74, 0x6f, 0x72, 0x79, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x52, 0x65, 0x71, 0x1a, - 0x2e, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x31, - 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x48, 0x69, 0x73, - 0x74, 0x6f, 0x72, 0x79, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x52, 0x65, 0x73, 0x70, 0x12, - 0x63, 0x0a, 0x12, 0x53, 0x79, 0x6e, 0x63, 0x48, 0x69, 0x73, 0x74, 0x6f, 0x72, 0x79, 0x4d, 0x65, - 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x25, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x6d, 0x65, 0x73, 0x73, - 0x61, 0x67, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x79, 0x6e, 0x63, 0x48, 0x69, 0x73, 0x74, 0x6f, - 0x72, 0x79, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x52, 0x65, 0x71, 0x1a, 0x26, 0x2e, 0x61, - 0x70, 0x69, 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x79, - 0x6e, 0x63, 0x48, 0x69, 0x73, 0x74, 0x6f, 0x72, 0x79, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, - 0x52, 0x65, 0x73, 0x70, 0x42, 0x23, 0x5a, 0x21, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, - 0x6f, 0x6d, 0x2f, 0x67, 0x6f, 0x2d, 0x67, 0x6f, 0x69, 0x6d, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x6d, - 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x2f, 0x76, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x33, + 0x52, 0x65, 0x73, 0x70, 0x12, 0x63, 0x0a, 0x12, 0x53, 0x79, 0x6e, 0x63, 0x48, 0x69, 0x73, 0x74, + 0x6f, 0x72, 0x79, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x25, 0x2e, 0x61, 0x70, 0x69, + 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x79, 0x6e, 0x63, + 0x48, 0x69, 0x73, 0x74, 0x6f, 0x72, 0x79, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x52, 0x65, + 0x71, 0x1a, 0x26, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x2e, + 0x76, 0x31, 0x2e, 0x53, 0x79, 0x6e, 0x63, 0x48, 0x69, 0x73, 0x74, 0x6f, 0x72, 0x79, 0x4d, 0x65, + 0x73, 0x73, 0x61, 0x67, 0x65, 0x52, 0x65, 0x73, 0x70, 0x42, 0x23, 0x5a, 0x21, 0x67, 0x69, 0x74, + 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x67, 0x6f, 0x2d, 0x67, 0x6f, 0x69, 0x6d, 0x2f, + 0x61, 0x70, 0x69, 0x2f, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x2f, 0x76, 0x31, 0x62, 0x06, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -1421,59 +1390,58 @@ func file_message_v1_message_proto_rawDescGZIP() []byte { return file_message_v1_message_proto_rawDescData } -var file_message_v1_message_proto_enumTypes = make([]protoimpl.EnumInfo, 2) -var file_message_v1_message_proto_msgTypes = make([]protoimpl.MessageInfo, 16) +var file_message_v1_message_proto_enumTypes = make([]protoimpl.EnumInfo, 3) +var file_message_v1_message_proto_msgTypes = make([]protoimpl.MessageInfo, 14) var file_message_v1_message_proto_goTypes = []interface{}{ (MessageContentType)(0), // 0: api.message.v1.MessageContentType (SessionType)(0), // 1: api.message.v1.SessionType - (*SendMessageReq)(nil), // 2: api.message.v1.SendMessageReq - (*Message)(nil), // 3: api.message.v1.Message - (*PushMessageReq)(nil), // 4: api.message.v1.PushMessageReq - (*PushMessageResp)(nil), // 5: api.message.v1.PushMessageResp - (*QueryOfflineMessageReq)(nil), // 6: api.message.v1.QueryOfflineMessageReq - (*QueryOfflineMessageResp)(nil), // 7: api.message.v1.QueryOfflineMessageResp - (*ConfirmLastMsgIDReq)(nil), // 8: api.message.v1.ConfirmLastMsgIDReq - (*ConfirmLastMsgIDResp)(nil), // 9: api.message.v1.ConfirmLastMsgIDResp - (*StorageMessage)(nil), // 10: api.message.v1.StorageMessage - (*QuerySessionHistoryMessageReq)(nil), // 11: api.message.v1.QuerySessionHistoryMessageReq - (*QuerySessionHistoryMessageResp)(nil), // 12: api.message.v1.QuerySessionHistoryMessageResp - (*SyncHistoryMessageReq)(nil), // 13: api.message.v1.SyncHistoryMessageReq - (*SyncHistoryMessageResp)(nil), // 14: api.message.v1.SyncHistoryMessageResp - (*StorageMessage_Users)(nil), // 15: api.message.v1.StorageMessage.Users + (MessageStatus)(0), // 2: api.message.v1.MessageStatus + (*SendMessageReq)(nil), // 3: api.message.v1.SendMessageReq + (*Message)(nil), // 4: api.message.v1.Message + (*PushMessageReq)(nil), // 5: api.message.v1.PushMessageReq + (*PushMessageResp)(nil), // 6: api.message.v1.PushMessageResp + (*QueryOfflineMessageReq)(nil), // 7: api.message.v1.QueryOfflineMessageReq + (*QueryOfflineMessageResp)(nil), // 8: api.message.v1.QueryOfflineMessageResp + (*ConfirmLastMsgIDReq)(nil), // 9: api.message.v1.ConfirmLastMsgIDReq + (*ConfirmLastMsgIDResp)(nil), // 10: api.message.v1.ConfirmLastMsgIDResp + (*StorageMessage)(nil), // 11: api.message.v1.StorageMessage + (*QuerySessionHistoryMessageReq)(nil), // 12: api.message.v1.QuerySessionHistoryMessageReq + (*QuerySessionHistoryMessageResp)(nil), // 13: api.message.v1.QuerySessionHistoryMessageResp + (*SyncHistoryMessageReq)(nil), // 14: api.message.v1.SyncHistoryMessageReq + (*SyncHistoryMessageResp)(nil), // 15: api.message.v1.SyncHistoryMessageResp (*StorageMessage_Content)(nil), // 16: api.message.v1.StorageMessage.Content - (*StorageMessage_Extra)(nil), // 17: api.message.v1.StorageMessage.Extra - (*errors.Error)(nil), // 18: api.errors.Error - (*timestamppb.Timestamp)(nil), // 19: google.protobuf.Timestamp + (*errors.Error)(nil), // 17: api.errors.Error + (*timestamppb.Timestamp)(nil), // 18: google.protobuf.Timestamp } var file_message_v1_message_proto_depIdxs = []int32{ 1, // 0: api.message.v1.SendMessageReq.session_type:type_name -> api.message.v1.SessionType 0, // 1: api.message.v1.SendMessageReq.content_type:type_name -> api.message.v1.MessageContentType 1, // 2: api.message.v1.Message.session_type:type_name -> api.message.v1.SessionType 0, // 3: api.message.v1.Message.content_type:type_name -> api.message.v1.MessageContentType - 3, // 4: api.message.v1.PushMessageReq.message:type_name -> api.message.v1.Message - 18, // 5: api.message.v1.PushMessageResp.error:type_name -> api.errors.Error - 18, // 6: api.message.v1.QueryOfflineMessageResp.error:type_name -> api.errors.Error - 3, // 7: api.message.v1.QueryOfflineMessageResp.messages:type_name -> api.message.v1.Message - 18, // 8: api.message.v1.ConfirmLastMsgIDResp.error:type_name -> api.errors.Error - 15, // 9: api.message.v1.StorageMessage.users:type_name -> api.message.v1.StorageMessage.Users + 4, // 4: api.message.v1.PushMessageReq.message:type_name -> api.message.v1.Message + 17, // 5: api.message.v1.PushMessageResp.error:type_name -> api.errors.Error + 17, // 6: api.message.v1.QueryOfflineMessageResp.error:type_name -> api.errors.Error + 4, // 7: api.message.v1.QueryOfflineMessageResp.messages:type_name -> api.message.v1.Message + 17, // 8: api.message.v1.ConfirmLastMsgIDResp.error:type_name -> api.errors.Error + 1, // 9: api.message.v1.StorageMessage.session_type:type_name -> api.message.v1.SessionType 16, // 10: api.message.v1.StorageMessage.content:type_name -> api.message.v1.StorageMessage.Content - 17, // 11: api.message.v1.StorageMessage.extra:type_name -> api.message.v1.StorageMessage.Extra - 18, // 12: api.message.v1.QuerySessionHistoryMessageResp.error:type_name -> api.errors.Error - 3, // 13: api.message.v1.QuerySessionHistoryMessageResp.messages:type_name -> api.message.v1.Message - 18, // 14: api.message.v1.SyncHistoryMessageResp.error:type_name -> api.errors.Error - 3, // 15: api.message.v1.SyncHistoryMessageResp.messages:type_name -> api.message.v1.Message - 0, // 16: api.message.v1.StorageMessage.Content.contentType:type_name -> api.message.v1.MessageContentType - 19, // 17: api.message.v1.StorageMessage.Extra.createTime:type_name -> google.protobuf.Timestamp - 4, // 18: api.message.v1.PushMessageService.PushMessage:input_type -> api.message.v1.PushMessageReq - 6, // 19: api.message.v1.OfflineMessageService.QueryOfflineMessage:input_type -> api.message.v1.QueryOfflineMessageReq - 8, // 20: api.message.v1.OfflineMessageService.ConfirmLastMstID:input_type -> api.message.v1.ConfirmLastMsgIDReq - 11, // 21: api.message.v1.HistoryMessageService.QuerySessionHistoryMessage:input_type -> api.message.v1.QuerySessionHistoryMessageReq - 13, // 22: api.message.v1.HistoryMessageService.SyncHistoryMessage:input_type -> api.message.v1.SyncHistoryMessageReq - 5, // 23: api.message.v1.PushMessageService.PushMessage:output_type -> api.message.v1.PushMessageResp - 7, // 24: api.message.v1.OfflineMessageService.QueryOfflineMessage:output_type -> api.message.v1.QueryOfflineMessageResp - 9, // 25: api.message.v1.OfflineMessageService.ConfirmLastMstID:output_type -> api.message.v1.ConfirmLastMsgIDResp - 12, // 26: api.message.v1.HistoryMessageService.QuerySessionHistoryMessage:output_type -> api.message.v1.QuerySessionHistoryMessageResp - 14, // 27: api.message.v1.HistoryMessageService.SyncHistoryMessage:output_type -> api.message.v1.SyncHistoryMessageResp + 18, // 11: api.message.v1.StorageMessage.createTime:type_name -> google.protobuf.Timestamp + 2, // 12: api.message.v1.StorageMessage.status:type_name -> api.message.v1.MessageStatus + 17, // 13: api.message.v1.QuerySessionHistoryMessageResp.error:type_name -> api.errors.Error + 4, // 14: api.message.v1.QuerySessionHistoryMessageResp.messages:type_name -> api.message.v1.Message + 17, // 15: api.message.v1.SyncHistoryMessageResp.error:type_name -> api.errors.Error + 4, // 16: api.message.v1.SyncHistoryMessageResp.messages:type_name -> api.message.v1.Message + 0, // 17: api.message.v1.StorageMessage.Content.contentType:type_name -> api.message.v1.MessageContentType + 5, // 18: api.message.v1.PushMessageService.PushMessage:input_type -> api.message.v1.PushMessageReq + 7, // 19: api.message.v1.OfflineMessageService.QueryOfflineMessage:input_type -> api.message.v1.QueryOfflineMessageReq + 9, // 20: api.message.v1.OfflineMessageService.ConfirmLastMstID:input_type -> api.message.v1.ConfirmLastMsgIDReq + 12, // 21: api.message.v1.HistoryMessageService.QuerySessionHistoryMessage:input_type -> api.message.v1.QuerySessionHistoryMessageReq + 14, // 22: api.message.v1.HistoryMessageService.SyncHistoryMessage:input_type -> api.message.v1.SyncHistoryMessageReq + 6, // 23: api.message.v1.PushMessageService.PushMessage:output_type -> api.message.v1.PushMessageResp + 8, // 24: api.message.v1.OfflineMessageService.QueryOfflineMessage:output_type -> api.message.v1.QueryOfflineMessageResp + 10, // 25: api.message.v1.OfflineMessageService.ConfirmLastMstID:output_type -> api.message.v1.ConfirmLastMsgIDResp + 13, // 26: api.message.v1.HistoryMessageService.QuerySessionHistoryMessage:output_type -> api.message.v1.QuerySessionHistoryMessageResp + 15, // 27: api.message.v1.HistoryMessageService.SyncHistoryMessage:output_type -> api.message.v1.SyncHistoryMessageResp 23, // [23:28] is the sub-list for method output_type 18, // [18:23] is the sub-list for method input_type 18, // [18:18] is the sub-list for extension type_name @@ -1644,18 +1612,6 @@ func file_message_v1_message_proto_init() { } } file_message_v1_message_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*StorageMessage_Users); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_message_v1_message_proto_msgTypes[14].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*StorageMessage_Content); i { case 0: return &v.state @@ -1667,18 +1623,6 @@ func file_message_v1_message_proto_init() { return nil } } - file_message_v1_message_proto_msgTypes[15].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*StorageMessage_Extra); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } } file_message_v1_message_proto_msgTypes[0].OneofWrappers = []interface{}{} type x struct{} @@ -1686,8 +1630,8 @@ func file_message_v1_message_proto_init() { File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_message_v1_message_proto_rawDesc, - NumEnums: 2, - NumMessages: 16, + NumEnums: 3, + NumMessages: 14, NumExtensions: 0, NumServices: 3, }, diff --git a/message/v1/message.pb.validate.go b/message/v1/message.pb.validate.go index 0082ce8..88cf198 100644 --- a/message/v1/message.pb.validate.go +++ b/message/v1/message.pb.validate.go @@ -1142,36 +1142,15 @@ func (m *StorageMessage) validate(all bool) error { var errors []error - // no validation rules for RowKey + // no validation rules for MsgID - if all { - switch v := interface{}(m.GetUsers()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, StorageMessageValidationError{ - field: "Users", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, StorageMessageValidationError{ - field: "Users", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetUsers()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return StorageMessageValidationError{ - field: "Users", - reason: "embedded message failed validation", - cause: err, - } - } - } + // no validation rules for SessionID + + // no validation rules for SessionType + + // no validation rules for FromID + + // no validation rules for ToID if all { switch v := interface{}(m.GetContent()).(type) { @@ -1203,11 +1182,11 @@ func (m *StorageMessage) validate(all bool) error { } if all { - switch v := interface{}(m.GetExtra()).(type) { + switch v := interface{}(m.GetCreateTime()).(type) { case interface{ ValidateAll() error }: if err := v.ValidateAll(); err != nil { errors = append(errors, StorageMessageValidationError{ - field: "Extra", + field: "CreateTime", reason: "embedded message failed validation", cause: err, }) @@ -1215,22 +1194,24 @@ func (m *StorageMessage) validate(all bool) error { case interface{ Validate() error }: if err := v.Validate(); err != nil { errors = append(errors, StorageMessageValidationError{ - field: "Extra", + field: "CreateTime", reason: "embedded message failed validation", cause: err, }) } } - } else if v, ok := interface{}(m.GetExtra()).(interface{ Validate() error }); ok { + } else if v, ok := interface{}(m.GetCreateTime()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return StorageMessageValidationError{ - field: "Extra", + field: "CreateTime", reason: "embedded message failed validation", cause: err, } } } + // no validation rules for Status + if len(errors) > 0 { return StorageMessageMultiError(errors) } @@ -1921,114 +1902,6 @@ var _ interface { ErrorName() string } = SyncHistoryMessageRespValidationError{} -// Validate checks the field values on StorageMessage_Users with the rules -// defined in the proto definition for this message. If any rules are -// violated, the first error encountered is returned, or nil if there are no violations. -func (m *StorageMessage_Users) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on StorageMessage_Users with the rules -// defined in the proto definition for this message. If any rules are -// violated, the result is a list of violation errors wrapped in -// StorageMessage_UsersMultiError, or nil if none found. -func (m *StorageMessage_Users) ValidateAll() error { - return m.validate(true) -} - -func (m *StorageMessage_Users) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - // no validation rules for FromID - - // no validation rules for ToID - - // no validation rules for SessionID - - if len(errors) > 0 { - return StorageMessage_UsersMultiError(errors) - } - - return nil -} - -// StorageMessage_UsersMultiError is an error wrapping multiple validation -// errors returned by StorageMessage_Users.ValidateAll() if the designated -// constraints aren't met. -type StorageMessage_UsersMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m StorageMessage_UsersMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m StorageMessage_UsersMultiError) AllErrors() []error { return m } - -// StorageMessage_UsersValidationError is the validation error returned by -// StorageMessage_Users.Validate if the designated constraints aren't met. -type StorageMessage_UsersValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e StorageMessage_UsersValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e StorageMessage_UsersValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e StorageMessage_UsersValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e StorageMessage_UsersValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e StorageMessage_UsersValidationError) ErrorName() string { - return "StorageMessage_UsersValidationError" -} - -// Error satisfies the builtin error interface -func (e StorageMessage_UsersValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sStorageMessage_Users.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = StorageMessage_UsersValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = StorageMessage_UsersValidationError{} - // Validate checks the field values on StorageMessage_Content with the rules // defined in the proto definition for this message. If any rules are // violated, the first error encountered is returned, or nil if there are no violations. @@ -2134,134 +2007,3 @@ var _ interface { Cause() error ErrorName() string } = StorageMessage_ContentValidationError{} - -// Validate checks the field values on StorageMessage_Extra with the rules -// defined in the proto definition for this message. If any rules are -// violated, the first error encountered is returned, or nil if there are no violations. -func (m *StorageMessage_Extra) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on StorageMessage_Extra with the rules -// defined in the proto definition for this message. If any rules are -// violated, the result is a list of violation errors wrapped in -// StorageMessage_ExtraMultiError, or nil if none found. -func (m *StorageMessage_Extra) ValidateAll() error { - return m.validate(true) -} - -func (m *StorageMessage_Extra) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - if all { - switch v := interface{}(m.GetCreateTime()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, StorageMessage_ExtraValidationError{ - field: "CreateTime", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, StorageMessage_ExtraValidationError{ - field: "CreateTime", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetCreateTime()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return StorageMessage_ExtraValidationError{ - field: "CreateTime", - reason: "embedded message failed validation", - cause: err, - } - } - } - - if len(errors) > 0 { - return StorageMessage_ExtraMultiError(errors) - } - - return nil -} - -// StorageMessage_ExtraMultiError is an error wrapping multiple validation -// errors returned by StorageMessage_Extra.ValidateAll() if the designated -// constraints aren't met. -type StorageMessage_ExtraMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m StorageMessage_ExtraMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m StorageMessage_ExtraMultiError) AllErrors() []error { return m } - -// StorageMessage_ExtraValidationError is the validation error returned by -// StorageMessage_Extra.Validate if the designated constraints aren't met. -type StorageMessage_ExtraValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e StorageMessage_ExtraValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e StorageMessage_ExtraValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e StorageMessage_ExtraValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e StorageMessage_ExtraValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e StorageMessage_ExtraValidationError) ErrorName() string { - return "StorageMessage_ExtraValidationError" -} - -// Error satisfies the builtin error interface -func (e StorageMessage_ExtraValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sStorageMessage_Extra.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = StorageMessage_ExtraValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = StorageMessage_ExtraValidationError{} diff --git a/message/v1/message.proto b/message/v1/message.proto index f3a60cd..9294b61 100644 --- a/message/v1/message.proto +++ b/message/v1/message.proto @@ -25,6 +25,11 @@ enum SessionType { // 255 at most } +enum MessageStatus { + Normal = 0; + Deleted = 1; +} + // SendMessageReq receive data from gateway message SendMessageReq { int64 from = 1 [(validate.rules).int64.gt = 0]; @@ -100,22 +105,18 @@ service OfflineMessageService { // storage message message StorageMessage { - string rowKey = 1; - message Users { - int64 fromID = 1; - int64 toID = 2; - string sessionID = 3; - } - Users users = 2; + int64 msgID = 1; + string sessionID = 2; + SessionType session_type = 3; + int64 fromID = 4; + int64 toID = 5; message Content { MessageContentType contentType = 1; string content = 2; } - Content content = 3; - message Extra { - google.protobuf.Timestamp createTime = 1; - } - Extra extra = 4; + Content content = 6; + google.protobuf.Timestamp createTime = 7; + MessageStatus status = 8; } // HistoryMessage diff --git a/message/v1/message_grpc.pb.go b/message/v1/message_grpc.pb.go index 6b17b27..9bbf2f9 100644 --- a/message/v1/message_grpc.pb.go +++ b/message/v1/message_grpc.pb.go @@ -1,4 +1,8 @@ // Code generated by protoc-gen-go-grpc. DO NOT EDIT. +// versions: +// - protoc-gen-go-grpc v1.3.0 +// - protoc (unknown) +// source: message/v1/message.proto package v1 @@ -14,6 +18,10 @@ import ( // Requires gRPC-Go v1.32.0 or later. const _ = grpc.SupportPackageIsVersion7 +const ( + PushMessageService_PushMessage_FullMethodName = "/api.message.v1.PushMessageService/PushMessage" +) + // PushMessageServiceClient is the client API for PushMessageService 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. @@ -31,7 +39,7 @@ func NewPushMessageServiceClient(cc grpc.ClientConnInterface) PushMessageService func (c *pushMessageServiceClient) PushMessage(ctx context.Context, in *PushMessageReq, opts ...grpc.CallOption) (*PushMessageResp, error) { out := new(PushMessageResp) - err := c.cc.Invoke(ctx, "/api.message.v1.PushMessageService/PushMessage", in, out, opts...) + err := c.cc.Invoke(ctx, PushMessageService_PushMessage_FullMethodName, in, out, opts...) if err != nil { return nil, err } @@ -76,7 +84,7 @@ func _PushMessageService_PushMessage_Handler(srv interface{}, ctx context.Contex } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/api.message.v1.PushMessageService/PushMessage", + FullMethod: PushMessageService_PushMessage_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(PushMessageServiceServer).PushMessage(ctx, req.(*PushMessageReq)) @@ -100,6 +108,11 @@ var PushMessageService_ServiceDesc = grpc.ServiceDesc{ Metadata: "message/v1/message.proto", } +const ( + OfflineMessageService_QueryOfflineMessage_FullMethodName = "/api.message.v1.OfflineMessageService/QueryOfflineMessage" + OfflineMessageService_ConfirmLastMstID_FullMethodName = "/api.message.v1.OfflineMessageService/ConfirmLastMstID" +) + // OfflineMessageServiceClient is the client API for OfflineMessageService 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. @@ -118,7 +131,7 @@ func NewOfflineMessageServiceClient(cc grpc.ClientConnInterface) OfflineMessageS func (c *offlineMessageServiceClient) QueryOfflineMessage(ctx context.Context, in *QueryOfflineMessageReq, opts ...grpc.CallOption) (*QueryOfflineMessageResp, error) { out := new(QueryOfflineMessageResp) - err := c.cc.Invoke(ctx, "/api.message.v1.OfflineMessageService/QueryOfflineMessage", in, out, opts...) + err := c.cc.Invoke(ctx, OfflineMessageService_QueryOfflineMessage_FullMethodName, in, out, opts...) if err != nil { return nil, err } @@ -127,7 +140,7 @@ func (c *offlineMessageServiceClient) QueryOfflineMessage(ctx context.Context, i func (c *offlineMessageServiceClient) ConfirmLastMstID(ctx context.Context, in *ConfirmLastMsgIDReq, opts ...grpc.CallOption) (*ConfirmLastMsgIDResp, error) { out := new(ConfirmLastMsgIDResp) - err := c.cc.Invoke(ctx, "/api.message.v1.OfflineMessageService/ConfirmLastMstID", in, out, opts...) + err := c.cc.Invoke(ctx, OfflineMessageService_ConfirmLastMstID_FullMethodName, in, out, opts...) if err != nil { return nil, err } @@ -176,7 +189,7 @@ func _OfflineMessageService_QueryOfflineMessage_Handler(srv interface{}, ctx con } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/api.message.v1.OfflineMessageService/QueryOfflineMessage", + FullMethod: OfflineMessageService_QueryOfflineMessage_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(OfflineMessageServiceServer).QueryOfflineMessage(ctx, req.(*QueryOfflineMessageReq)) @@ -194,7 +207,7 @@ func _OfflineMessageService_ConfirmLastMstID_Handler(srv interface{}, ctx contex } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/api.message.v1.OfflineMessageService/ConfirmLastMstID", + FullMethod: OfflineMessageService_ConfirmLastMstID_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(OfflineMessageServiceServer).ConfirmLastMstID(ctx, req.(*ConfirmLastMsgIDReq)) @@ -222,6 +235,11 @@ var OfflineMessageService_ServiceDesc = grpc.ServiceDesc{ Metadata: "message/v1/message.proto", } +const ( + HistoryMessageService_QuerySessionHistoryMessage_FullMethodName = "/api.message.v1.HistoryMessageService/QuerySessionHistoryMessage" + HistoryMessageService_SyncHistoryMessage_FullMethodName = "/api.message.v1.HistoryMessageService/SyncHistoryMessage" +) + // HistoryMessageServiceClient is the client API for HistoryMessageService 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. @@ -240,7 +258,7 @@ func NewHistoryMessageServiceClient(cc grpc.ClientConnInterface) HistoryMessageS func (c *historyMessageServiceClient) QuerySessionHistoryMessage(ctx context.Context, in *QuerySessionHistoryMessageReq, opts ...grpc.CallOption) (*QuerySessionHistoryMessageResp, error) { out := new(QuerySessionHistoryMessageResp) - err := c.cc.Invoke(ctx, "/api.message.v1.HistoryMessageService/QuerySessionHistoryMessage", in, out, opts...) + err := c.cc.Invoke(ctx, HistoryMessageService_QuerySessionHistoryMessage_FullMethodName, in, out, opts...) if err != nil { return nil, err } @@ -249,7 +267,7 @@ func (c *historyMessageServiceClient) QuerySessionHistoryMessage(ctx context.Con func (c *historyMessageServiceClient) SyncHistoryMessage(ctx context.Context, in *SyncHistoryMessageReq, opts ...grpc.CallOption) (*SyncHistoryMessageResp, error) { out := new(SyncHistoryMessageResp) - err := c.cc.Invoke(ctx, "/api.message.v1.HistoryMessageService/SyncHistoryMessage", in, out, opts...) + err := c.cc.Invoke(ctx, HistoryMessageService_SyncHistoryMessage_FullMethodName, in, out, opts...) if err != nil { return nil, err } @@ -298,7 +316,7 @@ func _HistoryMessageService_QuerySessionHistoryMessage_Handler(srv interface{}, } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/api.message.v1.HistoryMessageService/QuerySessionHistoryMessage", + FullMethod: HistoryMessageService_QuerySessionHistoryMessage_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(HistoryMessageServiceServer).QuerySessionHistoryMessage(ctx, req.(*QuerySessionHistoryMessageReq)) @@ -316,7 +334,7 @@ func _HistoryMessageService_SyncHistoryMessage_Handler(srv interface{}, ctx cont } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/api.message.v1.HistoryMessageService/SyncHistoryMessage", + FullMethod: HistoryMessageService_SyncHistoryMessage_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(HistoryMessageServiceServer).SyncHistoryMessage(ctx, req.(*SyncHistoryMessageReq)) diff --git a/third-party/validate/validate.proto b/third-party/validate/validate.proto new file mode 100644 index 0000000..5aa9653 --- /dev/null +++ b/third-party/validate/validate.proto @@ -0,0 +1,862 @@ +syntax = "proto2"; +package validate; + +option go_package = "github.com/envoyproxy/protoc-gen-validate/validate"; +option java_package = "io.envoyproxy.pgv.validate"; + +import "google/protobuf/descriptor.proto"; +import "google/protobuf/duration.proto"; +import "google/protobuf/timestamp.proto"; + +// Validation rules applied at the message level +extend google.protobuf.MessageOptions { + // Disabled nullifies any validation rules for this message, including any + // message fields associated with it that do support validation. + optional bool disabled = 1071; + // Ignore skips generation of validation methods for this message. + optional bool ignored = 1072; +} + +// Validation rules applied at the oneof level +extend google.protobuf.OneofOptions { + // Required ensures that exactly one the field options in a oneof is set; + // validation fails if no fields in the oneof are set. + optional bool required = 1071; +} + +// Validation rules applied at the field level +extend google.protobuf.FieldOptions { + // Rules specify the validations to be performed on this field. By default, + // no validation is performed against a field. + optional FieldRules rules = 1071; +} + +// FieldRules encapsulates the rules for each type of field. Depending on the +// field, the correct set should be used to ensure proper validations. +message FieldRules { + optional MessageRules message = 17; + oneof type { + // Scalar Field Types + FloatRules float = 1; + DoubleRules double = 2; + Int32Rules int32 = 3; + Int64Rules int64 = 4; + UInt32Rules uint32 = 5; + UInt64Rules uint64 = 6; + SInt32Rules sint32 = 7; + SInt64Rules sint64 = 8; + Fixed32Rules fixed32 = 9; + Fixed64Rules fixed64 = 10; + SFixed32Rules sfixed32 = 11; + SFixed64Rules sfixed64 = 12; + BoolRules bool = 13; + StringRules string = 14; + BytesRules bytes = 15; + + // Complex Field Types + EnumRules enum = 16; + RepeatedRules repeated = 18; + MapRules map = 19; + + // Well-Known Field Types + AnyRules any = 20; + DurationRules duration = 21; + TimestampRules timestamp = 22; + } +} + +// FloatRules describes the constraints applied to `float` values +message FloatRules { + // Const specifies that this field must be exactly the specified value + optional float const = 1; + + // Lt specifies that this field must be less than the specified value, + // exclusive + optional float lt = 2; + + // Lte specifies that this field must be less than or equal to the + // specified value, inclusive + optional float lte = 3; + + // Gt specifies that this field must be greater than the specified value, + // exclusive. If the value of Gt is larger than a specified Lt or Lte, the + // range is reversed. + optional float gt = 4; + + // Gte specifies that this field must be greater than or equal to the + // specified value, inclusive. If the value of Gte is larger than a + // specified Lt or Lte, the range is reversed. + optional float gte = 5; + + // In specifies that this field must be equal to one of the specified + // values + repeated float in = 6; + + // NotIn specifies that this field cannot be equal to one of the specified + // values + repeated float not_in = 7; + + // IgnoreEmpty specifies that the validation rules of this field should be + // evaluated only if the field is not empty + optional bool ignore_empty = 8; +} + +// DoubleRules describes the constraints applied to `double` values +message DoubleRules { + // Const specifies that this field must be exactly the specified value + optional double const = 1; + + // Lt specifies that this field must be less than the specified value, + // exclusive + optional double lt = 2; + + // Lte specifies that this field must be less than or equal to the + // specified value, inclusive + optional double lte = 3; + + // Gt specifies that this field must be greater than the specified value, + // exclusive. If the value of Gt is larger than a specified Lt or Lte, the + // range is reversed. + optional double gt = 4; + + // Gte specifies that this field must be greater than or equal to the + // specified value, inclusive. If the value of Gte is larger than a + // specified Lt or Lte, the range is reversed. + optional double gte = 5; + + // In specifies that this field must be equal to one of the specified + // values + repeated double in = 6; + + // NotIn specifies that this field cannot be equal to one of the specified + // values + repeated double not_in = 7; + + // IgnoreEmpty specifies that the validation rules of this field should be + // evaluated only if the field is not empty + optional bool ignore_empty = 8; +} + +// Int32Rules describes the constraints applied to `int32` values +message Int32Rules { + // Const specifies that this field must be exactly the specified value + optional int32 const = 1; + + // Lt specifies that this field must be less than the specified value, + // exclusive + optional int32 lt = 2; + + // Lte specifies that this field must be less than or equal to the + // specified value, inclusive + optional int32 lte = 3; + + // Gt specifies that this field must be greater than the specified value, + // exclusive. If the value of Gt is larger than a specified Lt or Lte, the + // range is reversed. + optional int32 gt = 4; + + // Gte specifies that this field must be greater than or equal to the + // specified value, inclusive. If the value of Gte is larger than a + // specified Lt or Lte, the range is reversed. + optional int32 gte = 5; + + // In specifies that this field must be equal to one of the specified + // values + repeated int32 in = 6; + + // NotIn specifies that this field cannot be equal to one of the specified + // values + repeated int32 not_in = 7; + + // IgnoreEmpty specifies that the validation rules of this field should be + // evaluated only if the field is not empty + optional bool ignore_empty = 8; +} + +// Int64Rules describes the constraints applied to `int64` values +message Int64Rules { + // Const specifies that this field must be exactly the specified value + optional int64 const = 1; + + // Lt specifies that this field must be less than the specified value, + // exclusive + optional int64 lt = 2; + + // Lte specifies that this field must be less than or equal to the + // specified value, inclusive + optional int64 lte = 3; + + // Gt specifies that this field must be greater than the specified value, + // exclusive. If the value of Gt is larger than a specified Lt or Lte, the + // range is reversed. + optional int64 gt = 4; + + // Gte specifies that this field must be greater than or equal to the + // specified value, inclusive. If the value of Gte is larger than a + // specified Lt or Lte, the range is reversed. + optional int64 gte = 5; + + // In specifies that this field must be equal to one of the specified + // values + repeated int64 in = 6; + + // NotIn specifies that this field cannot be equal to one of the specified + // values + repeated int64 not_in = 7; + + // IgnoreEmpty specifies that the validation rules of this field should be + // evaluated only if the field is not empty + optional bool ignore_empty = 8; +} + +// UInt32Rules describes the constraints applied to `uint32` values +message UInt32Rules { + // Const specifies that this field must be exactly the specified value + optional uint32 const = 1; + + // Lt specifies that this field must be less than the specified value, + // exclusive + optional uint32 lt = 2; + + // Lte specifies that this field must be less than or equal to the + // specified value, inclusive + optional uint32 lte = 3; + + // Gt specifies that this field must be greater than the specified value, + // exclusive. If the value of Gt is larger than a specified Lt or Lte, the + // range is reversed. + optional uint32 gt = 4; + + // Gte specifies that this field must be greater than or equal to the + // specified value, inclusive. If the value of Gte is larger than a + // specified Lt or Lte, the range is reversed. + optional uint32 gte = 5; + + // In specifies that this field must be equal to one of the specified + // values + repeated uint32 in = 6; + + // NotIn specifies that this field cannot be equal to one of the specified + // values + repeated uint32 not_in = 7; + + // IgnoreEmpty specifies that the validation rules of this field should be + // evaluated only if the field is not empty + optional bool ignore_empty = 8; +} + +// UInt64Rules describes the constraints applied to `uint64` values +message UInt64Rules { + // Const specifies that this field must be exactly the specified value + optional uint64 const = 1; + + // Lt specifies that this field must be less than the specified value, + // exclusive + optional uint64 lt = 2; + + // Lte specifies that this field must be less than or equal to the + // specified value, inclusive + optional uint64 lte = 3; + + // Gt specifies that this field must be greater than the specified value, + // exclusive. If the value of Gt is larger than a specified Lt or Lte, the + // range is reversed. + optional uint64 gt = 4; + + // Gte specifies that this field must be greater than or equal to the + // specified value, inclusive. If the value of Gte is larger than a + // specified Lt or Lte, the range is reversed. + optional uint64 gte = 5; + + // In specifies that this field must be equal to one of the specified + // values + repeated uint64 in = 6; + + // NotIn specifies that this field cannot be equal to one of the specified + // values + repeated uint64 not_in = 7; + + // IgnoreEmpty specifies that the validation rules of this field should be + // evaluated only if the field is not empty + optional bool ignore_empty = 8; +} + +// SInt32Rules describes the constraints applied to `sint32` values +message SInt32Rules { + // Const specifies that this field must be exactly the specified value + optional sint32 const = 1; + + // Lt specifies that this field must be less than the specified value, + // exclusive + optional sint32 lt = 2; + + // Lte specifies that this field must be less than or equal to the + // specified value, inclusive + optional sint32 lte = 3; + + // Gt specifies that this field must be greater than the specified value, + // exclusive. If the value of Gt is larger than a specified Lt or Lte, the + // range is reversed. + optional sint32 gt = 4; + + // Gte specifies that this field must be greater than or equal to the + // specified value, inclusive. If the value of Gte is larger than a + // specified Lt or Lte, the range is reversed. + optional sint32 gte = 5; + + // In specifies that this field must be equal to one of the specified + // values + repeated sint32 in = 6; + + // NotIn specifies that this field cannot be equal to one of the specified + // values + repeated sint32 not_in = 7; + + // IgnoreEmpty specifies that the validation rules of this field should be + // evaluated only if the field is not empty + optional bool ignore_empty = 8; +} + +// SInt64Rules describes the constraints applied to `sint64` values +message SInt64Rules { + // Const specifies that this field must be exactly the specified value + optional sint64 const = 1; + + // Lt specifies that this field must be less than the specified value, + // exclusive + optional sint64 lt = 2; + + // Lte specifies that this field must be less than or equal to the + // specified value, inclusive + optional sint64 lte = 3; + + // Gt specifies that this field must be greater than the specified value, + // exclusive. If the value of Gt is larger than a specified Lt or Lte, the + // range is reversed. + optional sint64 gt = 4; + + // Gte specifies that this field must be greater than or equal to the + // specified value, inclusive. If the value of Gte is larger than a + // specified Lt or Lte, the range is reversed. + optional sint64 gte = 5; + + // In specifies that this field must be equal to one of the specified + // values + repeated sint64 in = 6; + + // NotIn specifies that this field cannot be equal to one of the specified + // values + repeated sint64 not_in = 7; + + // IgnoreEmpty specifies that the validation rules of this field should be + // evaluated only if the field is not empty + optional bool ignore_empty = 8; +} + +// Fixed32Rules describes the constraints applied to `fixed32` values +message Fixed32Rules { + // Const specifies that this field must be exactly the specified value + optional fixed32 const = 1; + + // Lt specifies that this field must be less than the specified value, + // exclusive + optional fixed32 lt = 2; + + // Lte specifies that this field must be less than or equal to the + // specified value, inclusive + optional fixed32 lte = 3; + + // Gt specifies that this field must be greater than the specified value, + // exclusive. If the value of Gt is larger than a specified Lt or Lte, the + // range is reversed. + optional fixed32 gt = 4; + + // Gte specifies that this field must be greater than or equal to the + // specified value, inclusive. If the value of Gte is larger than a + // specified Lt or Lte, the range is reversed. + optional fixed32 gte = 5; + + // In specifies that this field must be equal to one of the specified + // values + repeated fixed32 in = 6; + + // NotIn specifies that this field cannot be equal to one of the specified + // values + repeated fixed32 not_in = 7; + + // IgnoreEmpty specifies that the validation rules of this field should be + // evaluated only if the field is not empty + optional bool ignore_empty = 8; +} + +// Fixed64Rules describes the constraints applied to `fixed64` values +message Fixed64Rules { + // Const specifies that this field must be exactly the specified value + optional fixed64 const = 1; + + // Lt specifies that this field must be less than the specified value, + // exclusive + optional fixed64 lt = 2; + + // Lte specifies that this field must be less than or equal to the + // specified value, inclusive + optional fixed64 lte = 3; + + // Gt specifies that this field must be greater than the specified value, + // exclusive. If the value of Gt is larger than a specified Lt or Lte, the + // range is reversed. + optional fixed64 gt = 4; + + // Gte specifies that this field must be greater than or equal to the + // specified value, inclusive. If the value of Gte is larger than a + // specified Lt or Lte, the range is reversed. + optional fixed64 gte = 5; + + // In specifies that this field must be equal to one of the specified + // values + repeated fixed64 in = 6; + + // NotIn specifies that this field cannot be equal to one of the specified + // values + repeated fixed64 not_in = 7; + + // IgnoreEmpty specifies that the validation rules of this field should be + // evaluated only if the field is not empty + optional bool ignore_empty = 8; +} + +// SFixed32Rules describes the constraints applied to `sfixed32` values +message SFixed32Rules { + // Const specifies that this field must be exactly the specified value + optional sfixed32 const = 1; + + // Lt specifies that this field must be less than the specified value, + // exclusive + optional sfixed32 lt = 2; + + // Lte specifies that this field must be less than or equal to the + // specified value, inclusive + optional sfixed32 lte = 3; + + // Gt specifies that this field must be greater than the specified value, + // exclusive. If the value of Gt is larger than a specified Lt or Lte, the + // range is reversed. + optional sfixed32 gt = 4; + + // Gte specifies that this field must be greater than or equal to the + // specified value, inclusive. If the value of Gte is larger than a + // specified Lt or Lte, the range is reversed. + optional sfixed32 gte = 5; + + // In specifies that this field must be equal to one of the specified + // values + repeated sfixed32 in = 6; + + // NotIn specifies that this field cannot be equal to one of the specified + // values + repeated sfixed32 not_in = 7; + + // IgnoreEmpty specifies that the validation rules of this field should be + // evaluated only if the field is not empty + optional bool ignore_empty = 8; +} + +// SFixed64Rules describes the constraints applied to `sfixed64` values +message SFixed64Rules { + // Const specifies that this field must be exactly the specified value + optional sfixed64 const = 1; + + // Lt specifies that this field must be less than the specified value, + // exclusive + optional sfixed64 lt = 2; + + // Lte specifies that this field must be less than or equal to the + // specified value, inclusive + optional sfixed64 lte = 3; + + // Gt specifies that this field must be greater than the specified value, + // exclusive. If the value of Gt is larger than a specified Lt or Lte, the + // range is reversed. + optional sfixed64 gt = 4; + + // Gte specifies that this field must be greater than or equal to the + // specified value, inclusive. If the value of Gte is larger than a + // specified Lt or Lte, the range is reversed. + optional sfixed64 gte = 5; + + // In specifies that this field must be equal to one of the specified + // values + repeated sfixed64 in = 6; + + // NotIn specifies that this field cannot be equal to one of the specified + // values + repeated sfixed64 not_in = 7; + + // IgnoreEmpty specifies that the validation rules of this field should be + // evaluated only if the field is not empty + optional bool ignore_empty = 8; +} + +// BoolRules describes the constraints applied to `bool` values +message BoolRules { + // Const specifies that this field must be exactly the specified value + optional bool const = 1; +} + +// StringRules describe the constraints applied to `string` values +message StringRules { + // Const specifies that this field must be exactly the specified value + optional string const = 1; + + // Len specifies that this field must be the specified number of + // characters (Unicode code points). Note that the number of + // characters may differ from the number of bytes in the string. + optional uint64 len = 19; + + // MinLen specifies that this field must be the specified number of + // characters (Unicode code points) at a minimum. Note that the number of + // characters may differ from the number of bytes in the string. + optional uint64 min_len = 2; + + // MaxLen specifies that this field must be the specified number of + // characters (Unicode code points) at a maximum. Note that the number of + // characters may differ from the number of bytes in the string. + optional uint64 max_len = 3; + + // LenBytes specifies that this field must be the specified number of bytes + optional uint64 len_bytes = 20; + + // MinBytes specifies that this field must be the specified number of bytes + // at a minimum + optional uint64 min_bytes = 4; + + // MaxBytes specifies that this field must be the specified number of bytes + // at a maximum + optional uint64 max_bytes = 5; + + // Pattern specifies that this field must match against the specified + // regular expression (RE2 syntax). The included expression should elide + // any delimiters. + optional string pattern = 6; + + // Prefix specifies that this field must have the specified substring at + // the beginning of the string. + optional string prefix = 7; + + // Suffix specifies that this field must have the specified substring at + // the end of the string. + optional string suffix = 8; + + // Contains specifies that this field must have the specified substring + // anywhere in the string. + optional string contains = 9; + + // NotContains specifies that this field cannot have the specified substring + // anywhere in the string. + optional string not_contains = 23; + + // In specifies that this field must be equal to one of the specified + // values + repeated string in = 10; + + // NotIn specifies that this field cannot be equal to one of the specified + // values + repeated string not_in = 11; + + // WellKnown rules provide advanced constraints against common string + // patterns + oneof well_known { + // Email specifies that the field must be a valid email address as + // defined by RFC 5322 + bool email = 12; + + // Hostname specifies that the field must be a valid hostname as + // defined by RFC 1034. This constraint does not support + // internationalized domain names (IDNs). + bool hostname = 13; + + // Ip specifies that the field must be a valid IP (v4 or v6) address. + // Valid IPv6 addresses should not include surrounding square brackets. + bool ip = 14; + + // Ipv4 specifies that the field must be a valid IPv4 address. + bool ipv4 = 15; + + // Ipv6 specifies that the field must be a valid IPv6 address. Valid + // IPv6 addresses should not include surrounding square brackets. + bool ipv6 = 16; + + // Uri specifies that the field must be a valid, absolute URI as defined + // by RFC 3986 + bool uri = 17; + + // UriRef specifies that the field must be a valid URI as defined by RFC + // 3986 and may be relative or absolute. + bool uri_ref = 18; + + // Address specifies that the field must be either a valid hostname as + // defined by RFC 1034 (which does not support internationalized domain + // names or IDNs), or it can be a valid IP (v4 or v6). + bool address = 21; + + // Uuid specifies that the field must be a valid UUID as defined by + // RFC 4122 + bool uuid = 22; + + // WellKnownRegex specifies a common well known pattern defined as a regex. + KnownRegex well_known_regex = 24; + } + + // This applies to regexes HTTP_HEADER_NAME and HTTP_HEADER_VALUE to enable + // strict header validation. + // By default, this is true, and HTTP header validations are RFC-compliant. + // Setting to false will enable a looser validations that only disallows + // \r\n\0 characters, which can be used to bypass header matching rules. + optional bool strict = 25 [default = true]; + + // IgnoreEmpty specifies that the validation rules of this field should be + // evaluated only if the field is not empty + optional bool ignore_empty = 26; +} + +// WellKnownRegex contain some well-known patterns. +enum KnownRegex { + UNKNOWN = 0; + + // HTTP header name as defined by RFC 7230. + HTTP_HEADER_NAME = 1; + + // HTTP header value as defined by RFC 7230. + HTTP_HEADER_VALUE = 2; +} + +// BytesRules describe the constraints applied to `bytes` values +message BytesRules { + // Const specifies that this field must be exactly the specified value + optional bytes const = 1; + + // Len specifies that this field must be the specified number of bytes + optional uint64 len = 13; + + // MinLen specifies that this field must be the specified number of bytes + // at a minimum + optional uint64 min_len = 2; + + // MaxLen specifies that this field must be the specified number of bytes + // at a maximum + optional uint64 max_len = 3; + + // Pattern specifies that this field must match against the specified + // regular expression (RE2 syntax). The included expression should elide + // any delimiters. + optional string pattern = 4; + + // Prefix specifies that this field must have the specified bytes at the + // beginning of the string. + optional bytes prefix = 5; + + // Suffix specifies that this field must have the specified bytes at the + // end of the string. + optional bytes suffix = 6; + + // Contains specifies that this field must have the specified bytes + // anywhere in the string. + optional bytes contains = 7; + + // In specifies that this field must be equal to one of the specified + // values + repeated bytes in = 8; + + // NotIn specifies that this field cannot be equal to one of the specified + // values + repeated bytes not_in = 9; + + // WellKnown rules provide advanced constraints against common byte + // patterns + oneof well_known { + // Ip specifies that the field must be a valid IP (v4 or v6) address in + // byte format + bool ip = 10; + + // Ipv4 specifies that the field must be a valid IPv4 address in byte + // format + bool ipv4 = 11; + + // Ipv6 specifies that the field must be a valid IPv6 address in byte + // format + bool ipv6 = 12; + } + + // IgnoreEmpty specifies that the validation rules of this field should be + // evaluated only if the field is not empty + optional bool ignore_empty = 14; +} + +// EnumRules describe the constraints applied to enum values +message EnumRules { + // Const specifies that this field must be exactly the specified value + optional int32 const = 1; + + // DefinedOnly specifies that this field must be only one of the defined + // values for this enum, failing on any undefined value. + optional bool defined_only = 2; + + // In specifies that this field must be equal to one of the specified + // values + repeated int32 in = 3; + + // NotIn specifies that this field cannot be equal to one of the specified + // values + repeated int32 not_in = 4; +} + +// MessageRules describe the constraints applied to embedded message values. +// For message-type fields, validation is performed recursively. +message MessageRules { + // Skip specifies that the validation rules of this field should not be + // evaluated + optional bool skip = 1; + + // Required specifies that this field must be set + optional bool required = 2; +} + +// RepeatedRules describe the constraints applied to `repeated` values +message RepeatedRules { + // MinItems specifies that this field must have the specified number of + // items at a minimum + optional uint64 min_items = 1; + + // MaxItems specifies that this field must have the specified number of + // items at a maximum + optional uint64 max_items = 2; + + // Unique specifies that all elements in this field must be unique. This + // constraint is only applicable to scalar and enum types (messages are not + // supported). + optional bool unique = 3; + + // Items specifies the constraints to be applied to each item in the field. + // Repeated message fields will still execute validation against each item + // unless skip is specified here. + optional FieldRules items = 4; + + // IgnoreEmpty specifies that the validation rules of this field should be + // evaluated only if the field is not empty + optional bool ignore_empty = 5; +} + +// MapRules describe the constraints applied to `map` values +message MapRules { + // MinPairs specifies that this field must have the specified number of + // KVs at a minimum + optional uint64 min_pairs = 1; + + // MaxPairs specifies that this field must have the specified number of + // KVs at a maximum + optional uint64 max_pairs = 2; + + // NoSparse specifies values in this field cannot be unset. This only + // applies to map's with message value types. + optional bool no_sparse = 3; + + // Keys specifies the constraints to be applied to each key in the field. + optional FieldRules keys = 4; + + // Values specifies the constraints to be applied to the value of each key + // in the field. Message values will still have their validations evaluated + // unless skip is specified here. + optional FieldRules values = 5; + + // IgnoreEmpty specifies that the validation rules of this field should be + // evaluated only if the field is not empty + optional bool ignore_empty = 6; +} + +// AnyRules describe constraints applied exclusively to the +// `google.protobuf.Any` well-known type +message AnyRules { + // Required specifies that this field must be set + optional bool required = 1; + + // In specifies that this field's `type_url` must be equal to one of the + // specified values. + repeated string in = 2; + + // NotIn specifies that this field's `type_url` must not be equal to any of + // the specified values. + repeated string not_in = 3; +} + +// DurationRules describe the constraints applied exclusively to the +// `google.protobuf.Duration` well-known type +message DurationRules { + // Required specifies that this field must be set + optional bool required = 1; + + // Const specifies that this field must be exactly the specified value + optional google.protobuf.Duration const = 2; + + // Lt specifies that this field must be less than the specified value, + // exclusive + optional google.protobuf.Duration lt = 3; + + // Lt specifies that this field must be less than the specified value, + // inclusive + optional google.protobuf.Duration lte = 4; + + // Gt specifies that this field must be greater than the specified value, + // exclusive + optional google.protobuf.Duration gt = 5; + + // Gte specifies that this field must be greater than the specified value, + // inclusive + optional google.protobuf.Duration gte = 6; + + // In specifies that this field must be equal to one of the specified + // values + repeated google.protobuf.Duration in = 7; + + // NotIn specifies that this field cannot be equal to one of the specified + // values + repeated google.protobuf.Duration not_in = 8; +} + +// TimestampRules describe the constraints applied exclusively to the +// `google.protobuf.Timestamp` well-known type +message TimestampRules { + // Required specifies that this field must be set + optional bool required = 1; + + // Const specifies that this field must be exactly the specified value + optional google.protobuf.Timestamp const = 2; + + // Lt specifies that this field must be less than the specified value, + // exclusive + optional google.protobuf.Timestamp lt = 3; + + // Lte specifies that this field must be less than the specified value, + // inclusive + optional google.protobuf.Timestamp lte = 4; + + // Gt specifies that this field must be greater than the specified value, + // exclusive + optional google.protobuf.Timestamp gt = 5; + + // Gte specifies that this field must be greater than the specified value, + // inclusive + optional google.protobuf.Timestamp gte = 6; + + // LtNow specifies that this must be less than the current time. LtNow + // can only be used with the Within rule. + optional bool lt_now = 7; + + // GtNow specifies that this must be greater than the current time. GtNow + // can only be used with the Within rule. + optional bool gt_now = 8; + + // Within specifies that this field must be within this duration of the + // current time. This constraint can be used alone or with the LtNow and + // GtNow rules. + optional google.protobuf.Duration within = 9; +} diff --git a/types/default_node.go b/types/default_node.go new file mode 100644 index 0000000..2eb35a5 --- /dev/null +++ b/types/default_node.go @@ -0,0 +1,23 @@ +package types + +import ( + "github.com/go-goim/api/types/snowflake" +) + +var ( + defaultNode *snowflake.Node +) + +func SetDefaultNode(nodeBit int64) { + var err error + defaultNode, err = snowflake.NewNode(nodeBit) + if err != nil { + panic(err) + } +} + +func assertDefaultNode() { + if defaultNode == nil { + panic("default node is not set") + } +} diff --git a/types/id.go b/types/id.go new file mode 100644 index 0000000..d60b7a1 --- /dev/null +++ b/types/id.go @@ -0,0 +1,275 @@ +package types + +import ( + "encoding/base64" + "encoding/binary" + "errors" + "fmt" + "strconv" +) + +const encodeBase32Map = "ybndrfg8ejkmcpqxot1uwisza345h769" + +var decodeBase32Map [256]byte + +const encodeBase58Map = "123456789abcdefghijkmnopqrstuvwxyzABCDEFGHJKLMNPQRSTUVWXYZ" + +var decodeBase58Map [256]byte + +// Create maps for decoding Base58/Base32. +// This speeds up the process tremendously. +func init() { + for i := 0; i < len(decodeBase58Map); i++ { + decodeBase58Map[i] = 0xFF + } + + for i := 0; i < len(encodeBase58Map); i++ { + decodeBase58Map[encodeBase58Map[i]] = byte(i) + } + + for i := 0; i < len(decodeBase32Map); i++ { + decodeBase32Map[i] = 0xFF + } + + for i := 0; i < len(encodeBase32Map); i++ { + decodeBase32Map[encodeBase32Map[i]] = byte(i) + } +} + +// A JSONSyntaxError is returned from UnmarshalJSON if an invalid ID is provided. +type JSONSyntaxError struct{ original []byte } + +func (j JSONSyntaxError) Error() string { + return fmt.Sprintf("invalid snowflake ID %q", string(j.original)) +} + +// ErrInvalidBase58 is returned by ParseBase58 when given an invalid []byte +var ErrInvalidBase58 = errors.New("invalid base58") + +// ErrInvalidBase32 is returned by ParseBase32 when given an invalid []byte +var ErrInvalidBase32 = errors.New("invalid base32") + +// ID represents a unique snowflake ID. +type ID int64 + +// NewID returns a new snowflake ID +func NewID() ID { + assertDefaultNode() + return ID(defaultNode.Generate()) +} + +// Note: If you want to get string of base58, use Base58() instead. +// ID.String() returns string(int64) and Base58() returns base58 string. + +// Int64 returns an int64 of the snowflake ID +func (f *ID) Int64() int64 { + return int64(*f) +} + +// ParseInt64 converts an int64 into a snowflake ID +func ParseInt64(id int64) ID { + return ID(id) +} + +// String returns a string of the snowflake ID +func (f *ID) String() string { + return strconv.FormatInt(int64(*f), 10) +} + +// ParseString converts a string into a snowflake ID +func ParseString(id string) (ID, error) { + i, err := strconv.ParseInt(id, 10, 64) + return ID(i), err + +} + +// Base2 returns a string base2 of the snowflake ID +func (f *ID) Base2() string { + return strconv.FormatInt(int64(*f), 2) +} + +// ParseBase2 converts a Base2 string into a snowflake ID +func ParseBase2(id string) (ID, error) { + i, err := strconv.ParseInt(id, 2, 64) + return ID(i), err +} + +// Base8 returns a string base8 of the snowflake ID +func (f *ID) Base8() string { + return strconv.FormatInt(int64(*f), 8) +} + +// ParseBase8 converts a Base8 string into a snowflake ID +func ParseBase8(id string) (ID, error) { + i, err := strconv.ParseInt(id, 8, 64) + return ID(i), err +} + +// Base16 returns a string base16 of the snowflake ID +func (f *ID) Base16() string { + return strconv.FormatInt(int64(*f), 16) +} + +// ParseBase16 converts a Base16 string into a snowflake ID +func ParseBase16(id string) (ID, error) { + i, err := strconv.ParseInt(id, 16, 64) + return ID(i), err +} + +// Base32 uses the z-base-32 character set but encodes and decodes similar +// to base58, allowing it to create an even smaller result string. +// NOTE: There are many base32 implementations so be careful when +// doing any interoperation. +func (f *ID) Base32() string { + id := *f + if id < 32 { + return string(encodeBase32Map[id]) + } + + b := make([]byte, 0, 12) + for id >= 32 { + b = append(b, encodeBase32Map[id%32]) + id /= 32 + } + b = append(b, encodeBase32Map[id]) + + for x, y := 0, len(b)-1; x < y; x, y = x+1, y-1 { + b[x], b[y] = b[y], b[x] + } + + return string(b) +} + +// ParseBase32 parses a base32 []byte into a snowflake ID +// NOTE: There are many base32 implementations so be careful when +// doing any interoperation. +func ParseBase32(b []byte) (ID, error) { + var id int64 + + for i := range b { + if decodeBase32Map[b[i]] == 0xFF { + return -1, ErrInvalidBase32 + } + id = id*32 + int64(decodeBase32Map[b[i]]) + } + + return ID(id), nil +} + +// Base36 returns a base36 string of the snowflake ID +func (f *ID) Base36() string { + return strconv.FormatInt(int64(*f), 36) +} + +// ParseBase36 converts a Base36 string into a snowflake ID +func ParseBase36(id string) (ID, error) { + i, err := strconv.ParseInt(id, 36, 64) + return ID(i), err +} + +// Base58 returns a base58 string of the snowflake ID +func (f *ID) Base58() string { + id := *f + if id < 58 { + return string(encodeBase58Map[id]) + } + + b := make([]byte, 0, 11) + for id >= 58 { + b = append(b, encodeBase58Map[id%58]) + id /= 58 + } + b = append(b, encodeBase58Map[id]) + + for x, y := 0, len(b)-1; x < y; x, y = x+1, y-1 { + b[x], b[y] = b[y], b[x] + } + + return string(b) +} + +// ParseBase58 parses a base58 []byte into a snowflake ID +func ParseBase58(b []byte) (ID, error) { + var id int64 + + for i := range b { + if decodeBase58Map[b[i]] == 0xFF { + return -1, ErrInvalidBase58 + } + id = id*58 + int64(decodeBase58Map[b[i]]) + } + + return ID(id), nil +} + +// Base64 returns a base64 string of the snowflake ID +func (f *ID) Base64() string { + return base64.StdEncoding.EncodeToString(f.Bytes()) +} + +// ParseBase64 converts a base64 string into a snowflake ID +func ParseBase64(id string) (ID, error) { + b, err := base64.StdEncoding.DecodeString(id) + if err != nil { + return -1, err + } + return ParseBytes(b) + +} + +// Bytes returns a byte slice of the snowflake ID +func (f *ID) Bytes() []byte { + return []byte(f.String()) +} + +// ParseBytes converts a byte slice into a snowflake ID +func ParseBytes(id []byte) (ID, error) { + i, err := strconv.ParseInt(string(id), 10, 64) + return ID(i), err +} + +// IntBytes returns an array of bytes of the snowflake ID, encoded as a +// big endian integer. +func (f *ID) IntBytes() [8]byte { + var b [8]byte + binary.BigEndian.PutUint64(b[:], uint64(*f)) + return b +} + +// ParseIntBytes converts an array of bytes encoded as big endian integer as +// a snowflake ID +func ParseIntBytes(id [8]byte) ID { + return ID(int64(binary.BigEndian.Uint64(id[:]))) +} + +// We use int64 in internal services and use base58 for external services(like clients). +// So those marshal/unmarshal methods are converts to/from base58. + +// MarshalJSON returns a json byte array string of the snowflake ID. +// Note: this is not regular MarshalJSON, it converts the ID to a base58 string, +// instead of a regular strconv.FormatInt(id,10). +func (f *ID) MarshalJSON() ([]byte, error) { + b58 := f.Base58() + buff := make([]byte, 0, len(b58)+2) + buff = append(buff, '"') + buff = append(buff, b58...) + buff = append(buff, '"') + return buff, nil +} + +// UnmarshalJSON converts a json byte array of a snowflake ID into an ID type. +// Note: this is not regular UnmarshalJSON, it converts the ID from a base58, +// instead of a regular strconv.ParseInt(id,10). +func (f *ID) UnmarshalJSON(b []byte) error { + if len(b) < 3 || b[0] != '"' || b[len(b)-1] != '"' { + return JSONSyntaxError{b} + } + + id, err := ParseBase58(b[1 : len(b)-1]) + if err != nil { + return err + } + + *f = id + return nil +} diff --git a/types/id_test.go b/types/id_test.go new file mode 100644 index 0000000..9f5cfaa --- /dev/null +++ b/types/id_test.go @@ -0,0 +1,72 @@ +package types + +import ( + "testing" + + "github.com/go-goim/api/types/snowflake" +) + +func TestID_Formats(t *testing.T) { + n, err := snowflake.NewNode(1) + if err != nil { + t.Fatal(err) + } + + id := ID(n.Generate()) + if id == 0 { + t.Fatal("id should not be 0") + } + + t.Log(id.String()) + t.Log(snowflake.TimeFromID(id.Int64())) + t.Log("base2", id.Base2()) + t.Log("base8", id.Base8()) + t.Log("base16", id.Base16()) + t.Log("base32", id.Base32()) + t.Log("base36", id.Base36()) + t.Log("base58", id.Base58()) + t.Log("base64", id.Base64()) + id2, err := ParseBase58([]byte(id.Base58())) + if err != nil { + t.Fatal(err) + } + if id != id2 { + t.Fatal("id should be equal to id2") + } + for i := 0; i < 10; i++ { + t.Log(n.Generate()) + } +} + +func TestID_UnmarshalJSON(t *testing.T) { + type args struct { + b []byte + } + tests := []struct { + name string + f ID + args args + wantID ID + wantErr bool + }{ + { + name: "base58", + f: ID(0), + args: args{ + b: []byte(`"aGgX1UU9Cq"`), + }, + wantErr: false, + wantID: ID(72006666064760832), + }, + } + for _, tt := range tests { + t.Run(tt.name, func(t *testing.T) { + if err := tt.f.UnmarshalJSON(tt.args.b); (err != nil) != tt.wantErr { + t.Errorf("UnmarshalJSON() error = %v, wantErr %v", err, tt.wantErr) + } + if tt.f != tt.wantID { + t.Errorf("UnmarshalJSON() = %v, want %v", tt.f, tt.wantID) + } + }) + } +} diff --git a/types/snowflake/snowflake.go b/types/snowflake/snowflake.go new file mode 100644 index 0000000..50092d2 --- /dev/null +++ b/types/snowflake/snowflake.go @@ -0,0 +1,113 @@ +// Package snowflake provides a very simple Twitter snowflake generator and parser. +package snowflake + +import ( + "errors" + "strconv" + "sync" + "time" +) + +var ( + // Epoch is set to the twitter snowflake epoch of Jan 01 2022 00:00:00 UTC in milliseconds + // You may customize this to set a different epoch for your application. + Epoch int64 = 1640966400000 + + // NodeBits holds the number of bits to use for Node + // Remember, you have a total 22 bits to share between Node/Step + NodeBits uint8 = 10 + + // StepBits holds the number of bits to use for Step + // Remember, you have a total 22 bits to share between Node/Step + StepBits uint8 = 12 + + nodeMax int64 = -1 ^ (-1 << NodeBits) + nodeMask = nodeMax << StepBits + stepMask int64 = -1 ^ (-1 << StepBits) + timeShift = NodeBits + StepBits + nodeShift = StepBits +) + +// A Node struct holds the basic information needed for a snowflake generator +// node +type Node struct { + mu sync.Mutex + epoch time.Time + time int64 + node int64 + step int64 + + nodeMax int64 + nodeMask int64 + stepMask int64 + timeShift uint8 + nodeShift uint8 +} + +// NewNode returns a new snowflake node that can be used to generate snowflake +// IDs +func NewNode(node int64) (*Node, error) { + n := Node{} + n.node = node + n.nodeMax = -1 ^ (-1 << NodeBits) + n.nodeMask = n.nodeMax << StepBits + n.stepMask = -1 ^ (-1 << StepBits) + n.timeShift = NodeBits + StepBits + n.nodeShift = StepBits + + if n.node < 0 || n.node > n.nodeMax { + return nil, errors.New("Node number must be between 0 and " + strconv.FormatInt(n.nodeMax, 10)) + } + + var curTime = time.Now() + // add time.Duration to curTime to make sure we use the monotonic clock if available + n.epoch = curTime.Add(time.Unix(Epoch/1e3, (Epoch%1e3)*1e6).Sub(curTime)) + + return &n, nil +} + +// Generate creates and returns a unique snowflake ID +// To help guarantee uniqueness +// - Make sure your system is keeping accurate system time +// - Make sure you never have multiple nodes running with the same node ID +func (n *Node) Generate() int64 { + n.mu.Lock() + + now := time.Since(n.epoch).Milliseconds() + + if now == n.time { + n.step = (n.step + 1) & n.stepMask + + if n.step == 0 { + for now <= n.time { + now = time.Since(n.epoch).Milliseconds() + } + } + } else { + n.step = 0 + } + + n.time = now + + r := (now)<> timeShift) + Epoch +} + +// NodeFromID returns an int64 of the snowflake ID node number +func NodeFromID(id int64) int64 { + return id & nodeMask >> nodeShift +} + +// StepFromID returns an int64 of the snowflake step (or sequence) number +func StepFromID(id int64) int64 { + return id & stepMask +} diff --git a/types/snowflake/snowflake_test.go b/types/snowflake/snowflake_test.go new file mode 100644 index 0000000..3aea391 --- /dev/null +++ b/types/snowflake/snowflake_test.go @@ -0,0 +1,55 @@ +package snowflake + +import ( + "sync" + "testing" +) + +func BenchmarkGenerate(b *testing.B) { + n, err := NewNode(1) + if err != nil { + b.Fatal(err) + } + + for i := 0; i < b.N; i++ { + n.Generate() + } +} + +func TestIdDuplicate(t *testing.T) { + n, err := NewNode(1) + if err != nil { + t.Fatal(err) + } + + n2, err := NewNode(2) + if err != nil { + t.Fatal(err) + } + var ( + m sync.Map + wg sync.WaitGroup + fail bool + ) + f := func(node *Node) { + defer wg.Done() + for i := 0; i < 500_000; i++ { + id := node.Generate() + if _, ok := m.Load(id); ok { + fail = true + break + } + m.Store(id, id) + } + } + + wg.Add(2) + go f(n) + go f(n2) + wg.Wait() + if fail { + t.Fatal("duplicate id found") + } + + t.Log("ok") +} diff --git a/user/friend/v1/friend.pb.go b/user/friend/v1/friend.pb.go index 1c3fe2e..c681085 100644 --- a/user/friend/v1/friend.pb.go +++ b/user/friend/v1/friend.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.26.0 +// protoc-gen-go v1.34.1 // protoc (unknown) // source: user/friend/v1/friend.proto @@ -1099,7 +1099,7 @@ func (x *CheckSendMessageAbilityRequest) GetSessionType() v1.SessionType { if x != nil { return x.SessionType } - return v1.SessionType_SingleChat + return v1.SessionType(0) } type CheckSendMessageAbilityResponse struct { diff --git a/user/friend/v1/friend.pb.validate.go b/user/friend/v1/friend.pb.validate.go index 1ca214d..8fe18ab 100644 --- a/user/friend/v1/friend.pb.validate.go +++ b/user/friend/v1/friend.pb.validate.go @@ -17,6 +17,8 @@ import ( "unicode/utf8" "google.golang.org/protobuf/types/known/anypb" + + v1 "github.com/go-goim/api/message/v1" ) // ensure the imports are used @@ -33,6 +35,8 @@ var ( _ = (*mail.Address)(nil) _ = anypb.Any{} _ = sort.Sort + + _ = v1.SessionType(0) ) // Validate checks the field values on Friend with the rules defined in the diff --git a/user/friend/v1/friend_grpc.pb.go b/user/friend/v1/friend_grpc.pb.go index 42e0b11..4901f7a 100644 --- a/user/friend/v1/friend_grpc.pb.go +++ b/user/friend/v1/friend_grpc.pb.go @@ -1,4 +1,8 @@ // Code generated by protoc-gen-go-grpc. DO NOT EDIT. +// versions: +// - protoc-gen-go-grpc v1.3.0 +// - protoc (unknown) +// source: user/friend/v1/friend.proto package v1 @@ -15,6 +19,18 @@ import ( // Requires gRPC-Go v1.32.0 or later. const _ = grpc.SupportPackageIsVersion7 +const ( + FriendService_AddFriend_FullMethodName = "/api.user.friend.v1.FriendService/AddFriend" + FriendService_ConfirmFriendRequest_FullMethodName = "/api.user.friend.v1.FriendService/ConfirmFriendRequest" + FriendService_GetFriendRequest_FullMethodName = "/api.user.friend.v1.FriendService/GetFriendRequest" + FriendService_QueryFriendRequestList_FullMethodName = "/api.user.friend.v1.FriendService/QueryFriendRequestList" + FriendService_UpdateFriendStatus_FullMethodName = "/api.user.friend.v1.FriendService/UpdateFriendStatus" + FriendService_IsFriend_FullMethodName = "/api.user.friend.v1.FriendService/IsFriend" + FriendService_GetFriend_FullMethodName = "/api.user.friend.v1.FriendService/GetFriend" + FriendService_QueryFriendList_FullMethodName = "/api.user.friend.v1.FriendService/QueryFriendList" + FriendService_CheckSendMessageAbility_FullMethodName = "/api.user.friend.v1.FriendService/CheckSendMessageAbility" +) + // FriendServiceClient is the client API for FriendService 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. @@ -45,7 +61,7 @@ func NewFriendServiceClient(cc grpc.ClientConnInterface) FriendServiceClient { func (c *friendServiceClient) AddFriend(ctx context.Context, in *BaseFriendRequest, opts ...grpc.CallOption) (*AddFriendResponse, error) { out := new(AddFriendResponse) - err := c.cc.Invoke(ctx, "/api.user.friend.v1.FriendService/AddFriend", in, out, opts...) + err := c.cc.Invoke(ctx, FriendService_AddFriend_FullMethodName, in, out, opts...) if err != nil { return nil, err } @@ -54,7 +70,7 @@ func (c *friendServiceClient) AddFriend(ctx context.Context, in *BaseFriendReque func (c *friendServiceClient) ConfirmFriendRequest(ctx context.Context, in *ConfirmFriendRequestRequest, opts ...grpc.CallOption) (*errors.Error, error) { out := new(errors.Error) - err := c.cc.Invoke(ctx, "/api.user.friend.v1.FriendService/ConfirmFriendRequest", in, out, opts...) + err := c.cc.Invoke(ctx, FriendService_ConfirmFriendRequest_FullMethodName, in, out, opts...) if err != nil { return nil, err } @@ -63,7 +79,7 @@ func (c *friendServiceClient) ConfirmFriendRequest(ctx context.Context, in *Conf func (c *friendServiceClient) GetFriendRequest(ctx context.Context, in *BaseFriendRequest, opts ...grpc.CallOption) (*GetFriendRequestResponse, error) { out := new(GetFriendRequestResponse) - err := c.cc.Invoke(ctx, "/api.user.friend.v1.FriendService/GetFriendRequest", in, out, opts...) + err := c.cc.Invoke(ctx, FriendService_GetFriendRequest_FullMethodName, in, out, opts...) if err != nil { return nil, err } @@ -72,7 +88,7 @@ func (c *friendServiceClient) GetFriendRequest(ctx context.Context, in *BaseFrie func (c *friendServiceClient) QueryFriendRequestList(ctx context.Context, in *QueryFriendRequestListRequest, opts ...grpc.CallOption) (*QueryFriendRequestListResponse, error) { out := new(QueryFriendRequestListResponse) - err := c.cc.Invoke(ctx, "/api.user.friend.v1.FriendService/QueryFriendRequestList", in, out, opts...) + err := c.cc.Invoke(ctx, FriendService_QueryFriendRequestList_FullMethodName, in, out, opts...) if err != nil { return nil, err } @@ -81,7 +97,7 @@ func (c *friendServiceClient) QueryFriendRequestList(ctx context.Context, in *Qu func (c *friendServiceClient) UpdateFriendStatus(ctx context.Context, in *UpdateFriendStatusRequest, opts ...grpc.CallOption) (*errors.Error, error) { out := new(errors.Error) - err := c.cc.Invoke(ctx, "/api.user.friend.v1.FriendService/UpdateFriendStatus", in, out, opts...) + err := c.cc.Invoke(ctx, FriendService_UpdateFriendStatus_FullMethodName, in, out, opts...) if err != nil { return nil, err } @@ -90,7 +106,7 @@ func (c *friendServiceClient) UpdateFriendStatus(ctx context.Context, in *Update func (c *friendServiceClient) IsFriend(ctx context.Context, in *BaseFriendRequest, opts ...grpc.CallOption) (*errors.Error, error) { out := new(errors.Error) - err := c.cc.Invoke(ctx, "/api.user.friend.v1.FriendService/IsFriend", in, out, opts...) + err := c.cc.Invoke(ctx, FriendService_IsFriend_FullMethodName, in, out, opts...) if err != nil { return nil, err } @@ -99,7 +115,7 @@ func (c *friendServiceClient) IsFriend(ctx context.Context, in *BaseFriendReques func (c *friendServiceClient) GetFriend(ctx context.Context, in *BaseFriendRequest, opts ...grpc.CallOption) (*GetFriendResponse, error) { out := new(GetFriendResponse) - err := c.cc.Invoke(ctx, "/api.user.friend.v1.FriendService/GetFriend", in, out, opts...) + err := c.cc.Invoke(ctx, FriendService_GetFriend_FullMethodName, in, out, opts...) if err != nil { return nil, err } @@ -108,7 +124,7 @@ func (c *friendServiceClient) GetFriend(ctx context.Context, in *BaseFriendReque func (c *friendServiceClient) QueryFriendList(ctx context.Context, in *QueryFriendListRequest, opts ...grpc.CallOption) (*QueryFriendListResponse, error) { out := new(QueryFriendListResponse) - err := c.cc.Invoke(ctx, "/api.user.friend.v1.FriendService/QueryFriendList", in, out, opts...) + err := c.cc.Invoke(ctx, FriendService_QueryFriendList_FullMethodName, in, out, opts...) if err != nil { return nil, err } @@ -117,7 +133,7 @@ func (c *friendServiceClient) QueryFriendList(ctx context.Context, in *QueryFrie func (c *friendServiceClient) CheckSendMessageAbility(ctx context.Context, in *CheckSendMessageAbilityRequest, opts ...grpc.CallOption) (*CheckSendMessageAbilityResponse, error) { out := new(CheckSendMessageAbilityResponse) - err := c.cc.Invoke(ctx, "/api.user.friend.v1.FriendService/CheckSendMessageAbility", in, out, opts...) + err := c.cc.Invoke(ctx, FriendService_CheckSendMessageAbility_FullMethodName, in, out, opts...) if err != nil { return nil, err } @@ -199,7 +215,7 @@ func _FriendService_AddFriend_Handler(srv interface{}, ctx context.Context, dec } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/api.user.friend.v1.FriendService/AddFriend", + FullMethod: FriendService_AddFriend_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(FriendServiceServer).AddFriend(ctx, req.(*BaseFriendRequest)) @@ -217,7 +233,7 @@ func _FriendService_ConfirmFriendRequest_Handler(srv interface{}, ctx context.Co } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/api.user.friend.v1.FriendService/ConfirmFriendRequest", + FullMethod: FriendService_ConfirmFriendRequest_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(FriendServiceServer).ConfirmFriendRequest(ctx, req.(*ConfirmFriendRequestRequest)) @@ -235,7 +251,7 @@ func _FriendService_GetFriendRequest_Handler(srv interface{}, ctx context.Contex } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/api.user.friend.v1.FriendService/GetFriendRequest", + FullMethod: FriendService_GetFriendRequest_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(FriendServiceServer).GetFriendRequest(ctx, req.(*BaseFriendRequest)) @@ -253,7 +269,7 @@ func _FriendService_QueryFriendRequestList_Handler(srv interface{}, ctx context. } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/api.user.friend.v1.FriendService/QueryFriendRequestList", + FullMethod: FriendService_QueryFriendRequestList_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(FriendServiceServer).QueryFriendRequestList(ctx, req.(*QueryFriendRequestListRequest)) @@ -271,7 +287,7 @@ func _FriendService_UpdateFriendStatus_Handler(srv interface{}, ctx context.Cont } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/api.user.friend.v1.FriendService/UpdateFriendStatus", + FullMethod: FriendService_UpdateFriendStatus_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(FriendServiceServer).UpdateFriendStatus(ctx, req.(*UpdateFriendStatusRequest)) @@ -289,7 +305,7 @@ func _FriendService_IsFriend_Handler(srv interface{}, ctx context.Context, dec f } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/api.user.friend.v1.FriendService/IsFriend", + FullMethod: FriendService_IsFriend_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(FriendServiceServer).IsFriend(ctx, req.(*BaseFriendRequest)) @@ -307,7 +323,7 @@ func _FriendService_GetFriend_Handler(srv interface{}, ctx context.Context, dec } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/api.user.friend.v1.FriendService/GetFriend", + FullMethod: FriendService_GetFriend_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(FriendServiceServer).GetFriend(ctx, req.(*BaseFriendRequest)) @@ -325,7 +341,7 @@ func _FriendService_QueryFriendList_Handler(srv interface{}, ctx context.Context } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/api.user.friend.v1.FriendService/QueryFriendList", + FullMethod: FriendService_QueryFriendList_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(FriendServiceServer).QueryFriendList(ctx, req.(*QueryFriendListRequest)) @@ -343,7 +359,7 @@ func _FriendService_CheckSendMessageAbility_Handler(srv interface{}, ctx context } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/api.user.friend.v1.FriendService/CheckSendMessageAbility", + FullMethod: FriendService_CheckSendMessageAbility_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(FriendServiceServer).CheckSendMessageAbility(ctx, req.(*CheckSendMessageAbilityRequest)) diff --git a/user/group/v1/group.pb.go b/user/group/v1/group.pb.go index 2726cfb..0fa2d90 100644 --- a/user/group/v1/group.pb.go +++ b/user/group/v1/group.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.26.0 +// protoc-gen-go v1.34.1 // protoc (unknown) // source: user/group/v1/group.proto diff --git a/user/group/v1/group_grpc.pb.go b/user/group/v1/group_grpc.pb.go index 2adcbd4..27e95e9 100644 --- a/user/group/v1/group_grpc.pb.go +++ b/user/group/v1/group_grpc.pb.go @@ -1,4 +1,8 @@ // Code generated by protoc-gen-go-grpc. DO NOT EDIT. +// versions: +// - protoc-gen-go-grpc v1.3.0 +// - protoc (unknown) +// source: user/group/v1/group.proto package v1 @@ -15,6 +19,16 @@ import ( // Requires gRPC-Go v1.32.0 or later. const _ = grpc.SupportPackageIsVersion7 +const ( + GroupService_GetGroup_FullMethodName = "/api.user.group.v1.GroupService/GetGroup" + GroupService_ListGroups_FullMethodName = "/api.user.group.v1.GroupService/ListGroups" + GroupService_CreateGroup_FullMethodName = "/api.user.group.v1.GroupService/CreateGroup" + GroupService_UpdateGroup_FullMethodName = "/api.user.group.v1.GroupService/UpdateGroup" + GroupService_DeleteGroup_FullMethodName = "/api.user.group.v1.GroupService/DeleteGroup" + GroupService_AddGroupMember_FullMethodName = "/api.user.group.v1.GroupService/AddGroupMember" + GroupService_RemoveGroupMember_FullMethodName = "/api.user.group.v1.GroupService/RemoveGroupMember" +) + // GroupServiceClient is the client API for GroupService 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. @@ -38,7 +52,7 @@ func NewGroupServiceClient(cc grpc.ClientConnInterface) GroupServiceClient { func (c *groupServiceClient) GetGroup(ctx context.Context, in *GetGroupRequest, opts ...grpc.CallOption) (*GetGroupResponse, error) { out := new(GetGroupResponse) - err := c.cc.Invoke(ctx, "/api.user.group.v1.GroupService/GetGroup", in, out, opts...) + err := c.cc.Invoke(ctx, GroupService_GetGroup_FullMethodName, in, out, opts...) if err != nil { return nil, err } @@ -47,7 +61,7 @@ func (c *groupServiceClient) GetGroup(ctx context.Context, in *GetGroupRequest, func (c *groupServiceClient) ListGroups(ctx context.Context, in *ListGroupsRequest, opts ...grpc.CallOption) (*ListGroupsResponse, error) { out := new(ListGroupsResponse) - err := c.cc.Invoke(ctx, "/api.user.group.v1.GroupService/ListGroups", in, out, opts...) + err := c.cc.Invoke(ctx, GroupService_ListGroups_FullMethodName, in, out, opts...) if err != nil { return nil, err } @@ -56,7 +70,7 @@ func (c *groupServiceClient) ListGroups(ctx context.Context, in *ListGroupsReque func (c *groupServiceClient) CreateGroup(ctx context.Context, in *CreateGroupRequest, opts ...grpc.CallOption) (*CreateGroupResponse, error) { out := new(CreateGroupResponse) - err := c.cc.Invoke(ctx, "/api.user.group.v1.GroupService/CreateGroup", in, out, opts...) + err := c.cc.Invoke(ctx, GroupService_CreateGroup_FullMethodName, in, out, opts...) if err != nil { return nil, err } @@ -65,7 +79,7 @@ func (c *groupServiceClient) CreateGroup(ctx context.Context, in *CreateGroupReq func (c *groupServiceClient) UpdateGroup(ctx context.Context, in *UpdateGroupRequest, opts ...grpc.CallOption) (*UpdateGroupResponse, error) { out := new(UpdateGroupResponse) - err := c.cc.Invoke(ctx, "/api.user.group.v1.GroupService/UpdateGroup", in, out, opts...) + err := c.cc.Invoke(ctx, GroupService_UpdateGroup_FullMethodName, in, out, opts...) if err != nil { return nil, err } @@ -74,7 +88,7 @@ func (c *groupServiceClient) UpdateGroup(ctx context.Context, in *UpdateGroupReq func (c *groupServiceClient) DeleteGroup(ctx context.Context, in *DeleteGroupRequest, opts ...grpc.CallOption) (*errors.Error, error) { out := new(errors.Error) - err := c.cc.Invoke(ctx, "/api.user.group.v1.GroupService/DeleteGroup", in, out, opts...) + err := c.cc.Invoke(ctx, GroupService_DeleteGroup_FullMethodName, in, out, opts...) if err != nil { return nil, err } @@ -83,7 +97,7 @@ func (c *groupServiceClient) DeleteGroup(ctx context.Context, in *DeleteGroupReq func (c *groupServiceClient) AddGroupMember(ctx context.Context, in *ChangeGroupMemberRequest, opts ...grpc.CallOption) (*ChangeGroupMemberResponse, error) { out := new(ChangeGroupMemberResponse) - err := c.cc.Invoke(ctx, "/api.user.group.v1.GroupService/AddGroupMember", in, out, opts...) + err := c.cc.Invoke(ctx, GroupService_AddGroupMember_FullMethodName, in, out, opts...) if err != nil { return nil, err } @@ -92,7 +106,7 @@ func (c *groupServiceClient) AddGroupMember(ctx context.Context, in *ChangeGroup func (c *groupServiceClient) RemoveGroupMember(ctx context.Context, in *ChangeGroupMemberRequest, opts ...grpc.CallOption) (*ChangeGroupMemberResponse, error) { out := new(ChangeGroupMemberResponse) - err := c.cc.Invoke(ctx, "/api.user.group.v1.GroupService/RemoveGroupMember", in, out, opts...) + err := c.cc.Invoke(ctx, GroupService_RemoveGroupMember_FullMethodName, in, out, opts...) if err != nil { return nil, err } @@ -161,7 +175,7 @@ func _GroupService_GetGroup_Handler(srv interface{}, ctx context.Context, dec fu } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/api.user.group.v1.GroupService/GetGroup", + FullMethod: GroupService_GetGroup_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(GroupServiceServer).GetGroup(ctx, req.(*GetGroupRequest)) @@ -179,7 +193,7 @@ func _GroupService_ListGroups_Handler(srv interface{}, ctx context.Context, dec } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/api.user.group.v1.GroupService/ListGroups", + FullMethod: GroupService_ListGroups_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(GroupServiceServer).ListGroups(ctx, req.(*ListGroupsRequest)) @@ -197,7 +211,7 @@ func _GroupService_CreateGroup_Handler(srv interface{}, ctx context.Context, dec } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/api.user.group.v1.GroupService/CreateGroup", + FullMethod: GroupService_CreateGroup_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(GroupServiceServer).CreateGroup(ctx, req.(*CreateGroupRequest)) @@ -215,7 +229,7 @@ func _GroupService_UpdateGroup_Handler(srv interface{}, ctx context.Context, dec } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/api.user.group.v1.GroupService/UpdateGroup", + FullMethod: GroupService_UpdateGroup_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(GroupServiceServer).UpdateGroup(ctx, req.(*UpdateGroupRequest)) @@ -233,7 +247,7 @@ func _GroupService_DeleteGroup_Handler(srv interface{}, ctx context.Context, dec } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/api.user.group.v1.GroupService/DeleteGroup", + FullMethod: GroupService_DeleteGroup_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(GroupServiceServer).DeleteGroup(ctx, req.(*DeleteGroupRequest)) @@ -251,7 +265,7 @@ func _GroupService_AddGroupMember_Handler(srv interface{}, ctx context.Context, } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/api.user.group.v1.GroupService/AddGroupMember", + FullMethod: GroupService_AddGroupMember_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(GroupServiceServer).AddGroupMember(ctx, req.(*ChangeGroupMemberRequest)) @@ -269,7 +283,7 @@ func _GroupService_RemoveGroupMember_Handler(srv interface{}, ctx context.Contex } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/api.user.group.v1.GroupService/RemoveGroupMember", + FullMethod: GroupService_RemoveGroupMember_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(GroupServiceServer).RemoveGroupMember(ctx, req.(*ChangeGroupMemberRequest)) diff --git a/user/v1/user.pb.go b/user/v1/user.pb.go index 48ca416..cf56068 100644 --- a/user/v1/user.pb.go +++ b/user/v1/user.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.26.0 +// protoc-gen-go v1.34.1 // protoc (unknown) // source: user/v1/user.proto @@ -394,6 +394,7 @@ type QueryUserRequest struct { unknownFields protoimpl.UnknownFields // Types that are assignable to Field: + // // *QueryUserRequest_Email // *QueryUserRequest_Phone Field isQueryUserRequest_Field `protobuf_oneof:"field"` @@ -475,6 +476,7 @@ type CreateUserRequest struct { Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` // Types that are assignable to Field: + // // *CreateUserRequest_Email // *CreateUserRequest_Phone Field isCreateUserRequest_Field `protobuf_oneof:"field"` @@ -657,6 +659,7 @@ type UserLoginRequest struct { unknownFields protoimpl.UnknownFields // Types that are assignable to Field: + // // *UserLoginRequest_Email // *UserLoginRequest_Phone Field isUserLoginRequest_Field `protobuf_oneof:"field"` @@ -816,8 +819,8 @@ var file_user_v1_user_proto_rawDesc = []byte{ 0x00, 0x52, 0x03, 0x75, 0x69, 0x64, 0x12, 0x20, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x0c, 0xfa, 0x42, 0x09, 0x72, 0x07, 0x10, 0x02, 0x18, 0x14, 0xd0, 0x01, 0x01, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x20, 0x0a, 0x05, 0x65, 0x6d, 0x61, 0x69, - 0x6c, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x42, 0x0a, 0xfa, 0x42, 0x07, 0x72, 0x05, 0x60, 0x01, - 0xd0, 0x01, 0x01, 0x52, 0x05, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x12, 0x2d, 0x0a, 0x05, 0x70, 0x68, + 0x6c, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x42, 0x0a, 0xfa, 0x42, 0x07, 0x72, 0x05, 0xd0, 0x01, + 0x01, 0x60, 0x01, 0x52, 0x05, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x12, 0x2d, 0x0a, 0x05, 0x70, 0x68, 0x6f, 0x6e, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x42, 0x17, 0xfa, 0x42, 0x14, 0x72, 0x12, 0x32, 0x0d, 0x5e, 0x31, 0x5b, 0x33, 0x2d, 0x39, 0x5d, 0x5c, 0x64, 0x7b, 0x39, 0x7d, 0x24, 0xd0, 0x01, 0x01, 0x52, 0x05, 0x70, 0x68, 0x6f, 0x6e, 0x65, 0x12, 0x23, 0x0a, 0x06, 0x61, 0x76, 0x61, diff --git a/user/v1/user.pb.validate.go b/user/v1/user.pb.validate.go index 3fc355e..7b35ab1 100644 --- a/user/v1/user.pb.validate.go +++ b/user/v1/user.pb.validate.go @@ -584,9 +584,20 @@ func (m *QueryUserRequest) validate(all bool) error { var errors []error - switch m.Field.(type) { - + oneofFieldPresent := false + switch v := m.Field.(type) { case *QueryUserRequest_Email: + if v == nil { + err := QueryUserRequestValidationError{ + field: "Field", + reason: "oneof value cannot be a typed-nil", + } + if !all { + return err + } + errors = append(errors, err) + } + oneofFieldPresent = true if err := m._validateEmail(m.GetEmail()); err != nil { err = QueryUserRequestValidationError{ @@ -601,6 +612,17 @@ func (m *QueryUserRequest) validate(all bool) error { } case *QueryUserRequest_Phone: + if v == nil { + err := QueryUserRequestValidationError{ + field: "Field", + reason: "oneof value cannot be a typed-nil", + } + if !all { + return err + } + errors = append(errors, err) + } + oneofFieldPresent = true if !_QueryUserRequest_Phone_Pattern.MatchString(m.GetPhone()) { err := QueryUserRequestValidationError{ @@ -614,6 +636,9 @@ func (m *QueryUserRequest) validate(all bool) error { } default: + _ = v // ensures v is used + } + if !oneofFieldPresent { err := QueryUserRequestValidationError{ field: "Field", reason: "value is required", @@ -622,7 +647,6 @@ func (m *QueryUserRequest) validate(all bool) error { return err } errors = append(errors, err) - } if len(errors) > 0 { @@ -799,9 +823,20 @@ func (m *CreateUserRequest) validate(all bool) error { errors = append(errors, err) } - switch m.Field.(type) { - + oneofFieldPresent := false + switch v := m.Field.(type) { case *CreateUserRequest_Email: + if v == nil { + err := CreateUserRequestValidationError{ + field: "Field", + reason: "oneof value cannot be a typed-nil", + } + if !all { + return err + } + errors = append(errors, err) + } + oneofFieldPresent = true if err := m._validateEmail(m.GetEmail()); err != nil { err = CreateUserRequestValidationError{ @@ -816,6 +851,17 @@ func (m *CreateUserRequest) validate(all bool) error { } case *CreateUserRequest_Phone: + if v == nil { + err := CreateUserRequestValidationError{ + field: "Field", + reason: "oneof value cannot be a typed-nil", + } + if !all { + return err + } + errors = append(errors, err) + } + oneofFieldPresent = true if !_CreateUserRequest_Phone_Pattern.MatchString(m.GetPhone()) { err := CreateUserRequestValidationError{ @@ -829,6 +875,9 @@ func (m *CreateUserRequest) validate(all bool) error { } default: + _ = v // ensures v is used + } + if !oneofFieldPresent { err := CreateUserRequestValidationError{ field: "Field", reason: "value is required", @@ -837,7 +886,6 @@ func (m *CreateUserRequest) validate(all bool) error { return err } errors = append(errors, err) - } if len(errors) > 0 { @@ -1239,9 +1287,20 @@ func (m *UserLoginRequest) validate(all bool) error { // no validation rules for LoginType - switch m.Field.(type) { - + oneofFieldPresent := false + switch v := m.Field.(type) { case *UserLoginRequest_Email: + if v == nil { + err := UserLoginRequestValidationError{ + field: "Field", + reason: "oneof value cannot be a typed-nil", + } + if !all { + return err + } + errors = append(errors, err) + } + oneofFieldPresent = true if err := m._validateEmail(m.GetEmail()); err != nil { err = UserLoginRequestValidationError{ @@ -1256,6 +1315,17 @@ func (m *UserLoginRequest) validate(all bool) error { } case *UserLoginRequest_Phone: + if v == nil { + err := UserLoginRequestValidationError{ + field: "Field", + reason: "oneof value cannot be a typed-nil", + } + if !all { + return err + } + errors = append(errors, err) + } + oneofFieldPresent = true if !_UserLoginRequest_Phone_Pattern.MatchString(m.GetPhone()) { err := UserLoginRequestValidationError{ @@ -1269,6 +1339,9 @@ func (m *UserLoginRequest) validate(all bool) error { } default: + _ = v // ensures v is used + } + if !oneofFieldPresent { err := UserLoginRequestValidationError{ field: "Field", reason: "value is required", @@ -1277,7 +1350,6 @@ func (m *UserLoginRequest) validate(all bool) error { return err } errors = append(errors, err) - } if len(errors) > 0 { diff --git a/user/v1/user_grpc.pb.go b/user/v1/user_grpc.pb.go index 23e6729..eabc74d 100644 --- a/user/v1/user_grpc.pb.go +++ b/user/v1/user_grpc.pb.go @@ -1,4 +1,8 @@ // Code generated by protoc-gen-go-grpc. DO NOT EDIT. +// versions: +// - protoc-gen-go-grpc v1.3.0 +// - protoc (unknown) +// source: user/v1/user.proto package v1 @@ -14,6 +18,13 @@ import ( // Requires gRPC-Go v1.32.0 or later. const _ = grpc.SupportPackageIsVersion7 +const ( + UserService_GetUser_FullMethodName = "/api.user.v1.UserService/GetUser" + UserService_QueryUser_FullMethodName = "/api.user.v1.UserService/QueryUser" + UserService_CreateUser_FullMethodName = "/api.user.v1.UserService/CreateUser" + UserService_UpdateUser_FullMethodName = "/api.user.v1.UserService/UpdateUser" +) + // 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. @@ -38,7 +49,7 @@ func NewUserServiceClient(cc grpc.ClientConnInterface) UserServiceClient { func (c *userServiceClient) GetUser(ctx context.Context, in *GetUserInfoRequest, opts ...grpc.CallOption) (*UserResponse, error) { out := new(UserResponse) - err := c.cc.Invoke(ctx, "/api.user.v1.UserService/GetUser", in, out, opts...) + err := c.cc.Invoke(ctx, UserService_GetUser_FullMethodName, in, out, opts...) if err != nil { return nil, err } @@ -47,7 +58,7 @@ func (c *userServiceClient) GetUser(ctx context.Context, in *GetUserInfoRequest, func (c *userServiceClient) QueryUser(ctx context.Context, in *QueryUserRequest, opts ...grpc.CallOption) (*UserResponse, error) { out := new(UserResponse) - err := c.cc.Invoke(ctx, "/api.user.v1.UserService/QueryUser", in, out, opts...) + err := c.cc.Invoke(ctx, UserService_QueryUser_FullMethodName, in, out, opts...) if err != nil { return nil, err } @@ -56,7 +67,7 @@ func (c *userServiceClient) QueryUser(ctx context.Context, in *QueryUserRequest, func (c *userServiceClient) CreateUser(ctx context.Context, in *CreateUserRequest, opts ...grpc.CallOption) (*UserResponse, error) { out := new(UserResponse) - err := c.cc.Invoke(ctx, "/api.user.v1.UserService/CreateUser", in, out, opts...) + err := c.cc.Invoke(ctx, UserService_CreateUser_FullMethodName, in, out, opts...) if err != nil { return nil, err } @@ -65,7 +76,7 @@ func (c *userServiceClient) CreateUser(ctx context.Context, in *CreateUserReques func (c *userServiceClient) UpdateUser(ctx context.Context, in *UpdateUserRequest, opts ...grpc.CallOption) (*UserResponse, error) { out := new(UserResponse) - err := c.cc.Invoke(ctx, "/api.user.v1.UserService/UpdateUser", in, out, opts...) + err := c.cc.Invoke(ctx, UserService_UpdateUser_FullMethodName, in, out, opts...) if err != nil { return nil, err } @@ -126,7 +137,7 @@ func _UserService_GetUser_Handler(srv interface{}, ctx context.Context, dec func } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/api.user.v1.UserService/GetUser", + FullMethod: UserService_GetUser_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(UserServiceServer).GetUser(ctx, req.(*GetUserInfoRequest)) @@ -144,7 +155,7 @@ func _UserService_QueryUser_Handler(srv interface{}, ctx context.Context, dec fu } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/api.user.v1.UserService/QueryUser", + FullMethod: UserService_QueryUser_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(UserServiceServer).QueryUser(ctx, req.(*QueryUserRequest)) @@ -162,7 +173,7 @@ func _UserService_CreateUser_Handler(srv interface{}, ctx context.Context, dec f } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/api.user.v1.UserService/CreateUser", + FullMethod: UserService_CreateUser_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(UserServiceServer).CreateUser(ctx, req.(*CreateUserRequest)) @@ -180,7 +191,7 @@ func _UserService_UpdateUser_Handler(srv interface{}, ctx context.Context, dec f } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/api.user.v1.UserService/UpdateUser", + FullMethod: UserService_UpdateUser_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(UserServiceServer).UpdateUser(ctx, req.(*UpdateUserRequest))