From 08fdac83fc2ddb8973e38b2825c8e9d93dfd924f Mon Sep 17 00:00:00 2001 From: withchao <993506633@qq.com> Date: Mon, 27 Feb 2023 09:53:17 +0800 Subject: [PATCH 01/10] api2rpc --- internal/api/group/group1.go | 14 ++++------- internal/api/group/group1_test.go | 1 + internal/api2rpc/api.go | 2 +- internal/api2rpc/rpc1.go | 40 ++++++++++++++++++------------- 4 files changed, 30 insertions(+), 27 deletions(-) diff --git a/internal/api/group/group1.go b/internal/api/group/group1.go index 07ce95105..3bd76e6d2 100644 --- a/internal/api/group/group1.go +++ b/internal/api/group/group1.go @@ -22,14 +22,10 @@ func (g *Group) getGroupClient() (group.GroupClient, error) { } func (g *Group) KickGroupMember(c *gin.Context) { - api2rpc.Rpc( - &apistruct.KickGroupMemberReq{}, - &apistruct.KickGroupMemberResp{}, - group.GroupClient.KickGroupMember, - ).Must(c, g.getGroupClient).Call() + var fn = group.GroupClient.KickGroupMember + api2rpc.New(&apistruct.KickGroupMemberReq{}, &apistruct.KickGroupMemberResp{}, fn).Call(c, g.getGroupClient) } -//func (g *Group) KickGroupMember1(c *gin.Context) { -// var fn func(client group.GroupClient, ctx context.Context, in *group.KickGroupMemberReq, opts ...grpc.CallOption) (*group.KickGroupMemberResp, error) = group.GroupClient.KickGroupMember -// api2rpc.Rpc(&apistruct.KickGroupMemberReq{}, &apistruct.KickGroupMemberResp{}, fn).Must(c, g.getGroupClient).Call() -//} +func (g *Group) GetGroupMembersInfo(c *gin.Context) { + api2rpc.New(&apistruct.GetGroupMembersInfoReq{}, &apistruct.GetGroupMembersInfoResp{}, group.GroupClient.GetGroupMembersInfo).Call(c, g.getGroupClient) +} diff --git a/internal/api/group/group1_test.go b/internal/api/group/group1_test.go index 38a10af8c..bfa6a8d9d 100644 --- a/internal/api/group/group1_test.go +++ b/internal/api/group/group1_test.go @@ -6,5 +6,6 @@ func TestName(t *testing.T) { var g Group g.KickGroupMember(nil) + g.GetGroupMembersInfo(nil) } diff --git a/internal/api2rpc/api.go b/internal/api2rpc/api.go index 2e6ee02e5..271e722f3 100644 --- a/internal/api2rpc/api.go +++ b/internal/api2rpc/api.go @@ -59,7 +59,7 @@ func rpcString(v interface{}) string { } type baseResp struct { - ErrCode int32 `json:"errCode"` + ErrCode int `json:"errCode"` ErrMsg string `json:"errMsg"` ErrDtl string `json:"errDtl"` Data interface{} `json:"data"` diff --git a/internal/api2rpc/rpc1.go b/internal/api2rpc/rpc1.go index cccdb23f7..8fcb76e56 100644 --- a/internal/api2rpc/rpc1.go +++ b/internal/api2rpc/rpc1.go @@ -1,6 +1,7 @@ package api2rpc import ( + "OpenIM/pkg/errs" "context" "github.com/gin-gonic/gin" "google.golang.org/grpc" @@ -8,7 +9,7 @@ import ( type rpcFunc[E, C, D any] func(client E, ctx context.Context, req *C, options ...grpc.CallOption) (*D, error) -func Rpc[A, B, C, D any, E any](apiReq *A, apiResp *B, rpc func(client E, ctx context.Context, req *C, options ...grpc.CallOption) (*D, error)) RpcCall[A, B, C, D, E] { +func New[A, B, C, D any, E any](apiReq *A, apiResp *B, rpc func(client E, ctx context.Context, req *C, options ...grpc.CallOption) (*D, error)) RpcCall[A, B, C, D, E] { return &rpcCall[A, B, C, D, E]{ apiReq: apiReq, apiResp: apiResp, @@ -19,9 +20,7 @@ func Rpc[A, B, C, D any, E any](apiReq *A, apiResp *B, rpc func(client E, ctx co type rpcCall[A, B, C, D any, E any] struct { apiReq *A apiResp *B - client func() (E, error) rpcFn func(client E, ctx context.Context, req *C, options ...grpc.CallOption) (*D, error) - api Api before func(apiReq *A, rpcReq *C, bind func() error) error after func(rpcResp *D, apiResp *B, bind func() error) error } @@ -36,14 +35,22 @@ func (r *rpcCall[A, B, C, D, E]) After(fn func(rpcResp *D, apiResp *B, bind func return r } -func (r *rpcCall[A, B, C, D, E]) Must(c *gin.Context, client func() (E, error)) RpcCall[A, B, C, D, E] { - r.api = NewGin1(c) - r.client = client - return r -} - -func (r *rpcCall[A, B, C, D, E]) Call() { - r.api.Resp(r.apiResp, r.call()) +func (r *rpcCall[A, B, C, D, E]) Call(c *gin.Context, client func() (E, error)) { + var resp baseResp + err := r.call(c, client) + if err == nil { + resp.Data = r.apiResp + } else { + cerr, ok := err.(errs.Coderr) + if ok { + resp.ErrCode = cerr.Code() + resp.ErrMsg = cerr.Msg() + resp.ErrDtl = cerr.Detail() + } else { + resp.ErrCode = 10000 + resp.ErrMsg = err.Error() + } + } } func (r *rpcCall[A, B, C, D, E]) defaultCopyReq(rpcReq *C) error { @@ -60,8 +67,8 @@ func (r *rpcCall[A, B, C, D, E]) defaultCopyResp(rpcResp *D) error { return nil } -func (r *rpcCall[A, B, C, D, E]) call() error { - if err := r.api.Bind(r.apiReq); err != nil { +func (r *rpcCall[A, B, C, D, E]) call(c *gin.Context, client func() (E, error)) error { + if err := c.BindJSON(r.apiReq); err != nil { return err } var err error @@ -74,11 +81,11 @@ func (r *rpcCall[A, B, C, D, E]) call() error { if err != nil { return err } - client, err := r.client() + cli, err := client() if err != nil { return err } - rpcResp, err := r.rpcFn(client, r.api.Context(), &rpcReq) + rpcResp, err := r.rpcFn(cli, c, &rpcReq) if err != nil { return err } @@ -93,6 +100,5 @@ func (r *rpcCall[A, B, C, D, E]) call() error { type RpcCall[A, B, C, D, E any] interface { Before(fn func(apiReq *A, rpcReq *C, bind func() error) error) RpcCall[A, B, C, D, E] After(fn func(rpcResp *D, apiResp *B, bind func() error) error) RpcCall[A, B, C, D, E] - Must(c *gin.Context, client func() (E, error)) RpcCall[A, B, C, D, E] - Call() + Call(c *gin.Context, client func() (E, error)) } From e513a09e45390247269b295789bdaca88e7e07ce Mon Sep 17 00:00:00 2001 From: withchao <993506633@qq.com> Date: Mon, 27 Feb 2023 10:14:19 +0800 Subject: [PATCH 02/10] api2rpc --- internal/api2rpc/api.go | 2 +- internal/api2rpc/rpc1.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/internal/api2rpc/api.go b/internal/api2rpc/api.go index 271e722f3..2e6ee02e5 100644 --- a/internal/api2rpc/api.go +++ b/internal/api2rpc/api.go @@ -59,7 +59,7 @@ func rpcString(v interface{}) string { } type baseResp struct { - ErrCode int `json:"errCode"` + ErrCode int32 `json:"errCode"` ErrMsg string `json:"errMsg"` ErrDtl string `json:"errDtl"` Data interface{} `json:"data"` diff --git a/internal/api2rpc/rpc1.go b/internal/api2rpc/rpc1.go index 8fcb76e56..c499cf481 100644 --- a/internal/api2rpc/rpc1.go +++ b/internal/api2rpc/rpc1.go @@ -43,7 +43,7 @@ func (r *rpcCall[A, B, C, D, E]) Call(c *gin.Context, client func() (E, error)) } else { cerr, ok := err.(errs.Coderr) if ok { - resp.ErrCode = cerr.Code() + resp.ErrCode = int32(cerr.Code()) resp.ErrMsg = cerr.Msg() resp.ErrDtl = cerr.Detail() } else { From 03ccd0131a0a965f0346a4373a76e8b4e67e166a Mon Sep 17 00:00:00 2001 From: withchao <993506633@qq.com> Date: Mon, 27 Feb 2023 10:27:35 +0800 Subject: [PATCH 03/10] api2rpc --- internal/api/group/group1.go | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/internal/api/group/group1.go b/internal/api/group/group1.go index 3bd76e6d2..5247393ae 100644 --- a/internal/api/group/group1.go +++ b/internal/api/group/group1.go @@ -22,10 +22,17 @@ func (g *Group) getGroupClient() (group.GroupClient, error) { } func (g *Group) KickGroupMember(c *gin.Context) { - var fn = group.GroupClient.KickGroupMember - api2rpc.New(&apistruct.KickGroupMemberReq{}, &apistruct.KickGroupMemberResp{}, fn).Call(c, g.getGroupClient) + api2rpc.New(&apistruct.KickGroupMemberReq{}, &apistruct.KickGroupMemberResp{}, group.GroupClient.KickGroupMember).Call(c, g.getGroupClient) } func (g *Group) GetGroupMembersInfo(c *gin.Context) { api2rpc.New(&apistruct.GetGroupMembersInfoReq{}, &apistruct.GetGroupMembersInfoResp{}, group.GroupClient.GetGroupMembersInfo).Call(c, g.getGroupClient) } + +//func GetGroupMembersInfo(c *gin.Context) { +// api2rpc.New(&apistruct.GetGroupMembersInfoReq{}, &apistruct.GetGroupMembersInfoResp{}, group.GroupClient.GetGroupMembersInfo).Call(c, g.getGroupClient) +//} + +//func New[A, B, C, D any, E any](apiReq *A, apiResp *B, rpc func(client E, ctx context.Context, req *C, options ...grpc.CallOption) (*D, error)) { +// +//} From 0411a5045be7ca26da899039758fa318ad6d421c Mon Sep 17 00:00:00 2001 From: withchao <993506633@qq.com> Date: Mon, 27 Feb 2023 14:44:14 +0800 Subject: [PATCH 04/10] api to rpc --- go.mod | 83 ++++++++++++++++++++- internal/a2r/api2rpc.go | 28 +++++++ internal/api/group/group1.go | 19 ++--- internal/api/route.go | 1 + internal/api2rpc/new1.go | 49 ++++++++++++ internal/api2rpc/rpc1.go | 2 +- pkg/common/config/config.go | 3 +- pkg/discoveryregistry/discovery_register.go | 2 +- pkg/utils/utils_v2_test.go | 2 +- 9 files changed, 173 insertions(+), 16 deletions(-) create mode 100644 internal/a2r/api2rpc.go create mode 100644 internal/api2rpc/new1.go diff --git a/go.mod b/go.mod index 4cd36c1b9..204f153cb 100644 --- a/go.mod +++ b/go.mod @@ -1,6 +1,6 @@ module OpenIM -go 1.16 +go 1.18 require ( firebase.google.com/go v3.13.0+incompatible @@ -53,16 +53,97 @@ require ( require github.com/minio/minio-go v6.0.14+incompatible require ( + cloud.google.com/go v0.105.0 // indirect + cloud.google.com/go/compute v1.13.0 // indirect + cloud.google.com/go/compute/metadata v0.2.1 // indirect + cloud.google.com/go/firestore v1.9.0 // indirect + cloud.google.com/go/iam v0.8.0 // indirect + cloud.google.com/go/longrunning v0.3.0 // indirect + cloud.google.com/go/storage v1.27.0 // indirect + github.com/alibabacloud-go/debug v0.0.0-20190504072949-9472017b5c68 // indirect + github.com/alibabacloud-go/endpoint-util v1.1.0 // indirect + github.com/alibabacloud-go/openapi-util v0.0.9 // indirect + github.com/alibabacloud-go/tea-utils v1.3.9 // indirect + github.com/aliyun/credentials-go v1.1.2 // indirect + github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.12.8 // indirect + github.com/aws/aws-sdk-go-v2/internal/configsources v1.1.14 // indirect + github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.4.8 // indirect + github.com/aws/aws-sdk-go-v2/internal/ini v1.3.15 // indirect + github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.9.8 // indirect + github.com/aws/aws-sdk-go-v2/service/sso v1.11.12 // indirect + github.com/aws/smithy-go v1.12.0 // indirect + github.com/beorn7/perks v1.0.1 // indirect + github.com/cespare/xxhash/v2 v2.1.2 // indirect + github.com/davecgh/go-spew v1.1.1 // indirect + github.com/dgryski/go-rendezvous v0.0.0-20200823014737-9f7001d12a5f // indirect + github.com/dustin/go-humanize v1.0.0 // indirect + github.com/eapache/go-resiliency v1.2.0 // indirect + github.com/eapache/go-xerial-snappy v0.0.0-20180814174437-776d5712da21 // indirect + github.com/eapache/queue v1.1.0 // indirect + github.com/gin-contrib/sse v0.1.0 // indirect github.com/go-ini/ini v1.67.0 // indirect github.com/go-playground/locales v0.14.1 // indirect + github.com/go-playground/universal-translator v0.18.0 // indirect + github.com/go-sql-driver/mysql v1.6.0 // indirect + github.com/go-stack/stack v1.8.0 // indirect + github.com/go-zookeeper/zk v1.0.3 // indirect github.com/goccy/go-json v0.10.0 // indirect + github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e // indirect + github.com/golang/snappy v0.0.3 // indirect + github.com/google/go-cmp v0.5.9 // indirect + github.com/google/uuid v1.3.0 // indirect + github.com/googleapis/enterprise-certificate-proxy v0.2.0 // indirect + github.com/googleapis/gax-go/v2 v2.7.0 // indirect + github.com/hashicorp/go-uuid v1.0.2 // indirect + github.com/jcmturner/aescts/v2 v2.0.0 // indirect + github.com/jcmturner/dnsutils/v2 v2.0.0 // indirect + github.com/jcmturner/gofork v1.0.0 // indirect + github.com/jcmturner/gokrb5/v8 v8.4.2 // indirect + github.com/jcmturner/rpc/v2 v2.0.3 // indirect + github.com/jinzhu/inflection v1.0.0 // indirect + github.com/jinzhu/now v1.1.5 // indirect github.com/jonboulle/clockwork v0.3.0 // indirect + github.com/josharian/intern v1.0.0 // indirect + github.com/json-iterator/go v1.1.12 // indirect + github.com/klauspost/compress v1.13.6 // indirect + github.com/klauspost/cpuid v1.3.1 // indirect + github.com/leodido/go-urn v1.2.1 // indirect github.com/lestrrat-go/strftime v1.0.6 // indirect + github.com/lithammer/shortuuid v3.0.0+incompatible // indirect + github.com/mailru/easyjson v0.7.7 // indirect github.com/mattn/go-isatty v0.0.17 // indirect + github.com/matttproud/golang_protobuf_extensions v1.0.1 // indirect + github.com/minio/md5-simd v1.1.0 // indirect + github.com/minio/sha256-simd v0.1.1 // indirect + github.com/mitchellh/go-homedir v1.1.0 // indirect + github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect + github.com/modern-go/reflect2 v1.0.2 // indirect + github.com/pelletier/go-toml/v2 v2.0.6 // indirect + github.com/pierrec/lz4 v2.6.0+incompatible // indirect + github.com/pmezard/go-difflib v1.0.0 // indirect + github.com/prometheus/client_model v0.2.0 // indirect + github.com/prometheus/common v0.37.0 // indirect + github.com/prometheus/procfs v0.8.0 // indirect + github.com/rcrowley/go-metrics v0.0.0-20201227073835-cf1acfcdf475 // indirect + github.com/rs/xid v1.2.1 // indirect + github.com/tjfoc/gmsm v1.3.2 // indirect github.com/ugorji/go/codec v1.2.8 // indirect + github.com/xdg-go/pbkdf2 v1.0.0 // indirect + github.com/xdg-go/scram v1.0.2 // indirect + github.com/xdg-go/stringprep v1.0.2 // indirect + github.com/youmark/pkcs8 v0.0.0-20181117223130-1be2e3e5546d // indirect + go.opencensus.io v0.24.0 // indirect golang.org/x/crypto v0.5.0 // indirect + golang.org/x/oauth2 v0.0.0-20221014153046-6fdb5e3db783 // indirect + golang.org/x/sync v0.1.0 // indirect + golang.org/x/sys v0.4.0 // indirect + golang.org/x/text v0.6.0 // indirect + golang.org/x/time v0.1.0 // indirect + golang.org/x/xerrors v0.0.0-20220907171357-04be3eba64a2 // indirect + google.golang.org/appengine v1.6.7 // indirect google.golang.org/genproto v0.0.0-20230110181048-76db0878b65f // indirect gopkg.in/ini.v1 v1.66.2 // indirect + gopkg.in/yaml.v2 v2.4.0 // indirect ) replace github.com/Shopify/sarama => github.com/Shopify/sarama v1.29.0 diff --git a/internal/a2r/api2rpc.go b/internal/a2r/api2rpc.go new file mode 100644 index 000000000..62da8c6da --- /dev/null +++ b/internal/a2r/api2rpc.go @@ -0,0 +1,28 @@ +package a2r + +import ( + "context" + "github.com/gin-gonic/gin" + "google.golang.org/grpc" +) + +// Call TEST +func Call[A, B, C, D, E any]( + apiReq *A, + apiResp *B, + rpc func(client E, ctx context.Context, req C, options ...grpc.CallOption) (D, error), + client func() (E, error), + c *gin.Context, + before func(apiReq *A, rpcReq *C, bind func() error) error, + after func(rpcResp *D, apiResp *B, bind func() error) error, +) { + +} + +func Call1[C, D, E any]( + rpc func(client E, ctx context.Context, req C, options ...grpc.CallOption) (D, error), + client func() (E, error), + c *gin.Context, +) { + +} diff --git a/internal/api/group/group1.go b/internal/api/group/group1.go index 5247393ae..58608efc5 100644 --- a/internal/api/group/group1.go +++ b/internal/api/group/group1.go @@ -1,14 +1,19 @@ package group import ( - "OpenIM/internal/api2rpc" + "OpenIM/internal/a2r" "OpenIM/pkg/apistruct" "OpenIM/pkg/common/config" "OpenIM/pkg/proto/group" + "context" "github.com/OpenIMSDK/openKeeper" "github.com/gin-gonic/gin" ) +func _() { + context.Background() +} + type Group struct { zk *openKeeper.ZkClient } @@ -22,17 +27,9 @@ func (g *Group) getGroupClient() (group.GroupClient, error) { } func (g *Group) KickGroupMember(c *gin.Context) { - api2rpc.New(&apistruct.KickGroupMemberReq{}, &apistruct.KickGroupMemberResp{}, group.GroupClient.KickGroupMember).Call(c, g.getGroupClient) + a2r.Call(&apistruct.KickGroupMemberReq{}, &apistruct.KickGroupMemberResp{}, group.GroupClient.KickGroupMember, g.getGroupClient, c, nil, nil) } func (g *Group) GetGroupMembersInfo(c *gin.Context) { - api2rpc.New(&apistruct.GetGroupMembersInfoReq{}, &apistruct.GetGroupMembersInfoResp{}, group.GroupClient.GetGroupMembersInfo).Call(c, g.getGroupClient) + a2r.Call1(group.GroupClient.GetGroupMembersInfo, g.getGroupClient, c) } - -//func GetGroupMembersInfo(c *gin.Context) { -// api2rpc.New(&apistruct.GetGroupMembersInfoReq{}, &apistruct.GetGroupMembersInfoResp{}, group.GroupClient.GetGroupMembersInfo).Call(c, g.getGroupClient) -//} - -//func New[A, B, C, D any, E any](apiReq *A, apiResp *B, rpc func(client E, ctx context.Context, req *C, options ...grpc.CallOption) (*D, error)) { -// -//} diff --git a/internal/api/route.go b/internal/api/route.go index 32f8cafde..f56f55ed9 100644 --- a/internal/api/route.go +++ b/internal/api/route.go @@ -82,6 +82,7 @@ func NewGinRouter() *gin.Engine { c.Next() }) { + groupRouterGroup.POST("/create_group", group.NewCreateGroup) //1 groupRouterGroup.POST("/set_group_info", group.NewSetGroupInfo) //1 groupRouterGroup.POST("/join_group", group.JoinGroup) //1 diff --git a/internal/api2rpc/new1.go b/internal/api2rpc/new1.go new file mode 100644 index 000000000..7f5d1a0b8 --- /dev/null +++ b/internal/api2rpc/new1.go @@ -0,0 +1,49 @@ +package api2rpc + +import ( + "context" + "github.com/gin-gonic/gin" + "google.golang.org/grpc" +) + +type FUNC[E, C, D any] func(client E, ctx context.Context, req *C, options ...grpc.CallOption) (*D, error) + +// Call1 TEST +func Call1[A, B, C, D, E any]( + apiReq *A, + apiResp *B, + rpc FUNC[E, C, D], + //client func() (E, error), + c *gin.Context, + before func(apiReq *A, rpcReq *C, bind func() error) error, + after func(rpcResp *D, apiResp *B, bind func() error) error, +) { + +} + +func Call2[C, D, E any]( + rpc func(client E, ctx context.Context, req *C, options ...grpc.CallOption) (*D, error), + client func() (E, error), + c *gin.Context, +) { + +} + +func Call3[C, D, E any]( + rpc func(client E, ctx context.Context, req *C, options ...grpc.CallOption) (*D, error), + //client func() (E, error), + c *gin.Context, +) { + +} + +func Call4[C, D, E any]( + rpc func(client E, ctx context.Context, req *C, options ...grpc.CallOption) (*D, error), + c *gin.Context, +) { + +} + +func Call10[A, B, C, D, E any](apiReq A, apiResp B, client func() (E, error), call func(client E, rpcReq C) (D, error)) { + +} diff --git a/internal/api2rpc/rpc1.go b/internal/api2rpc/rpc1.go index c499cf481..d1ee6448a 100644 --- a/internal/api2rpc/rpc1.go +++ b/internal/api2rpc/rpc1.go @@ -9,7 +9,7 @@ import ( type rpcFunc[E, C, D any] func(client E, ctx context.Context, req *C, options ...grpc.CallOption) (*D, error) -func New[A, B, C, D any, E any](apiReq *A, apiResp *B, rpc func(client E, ctx context.Context, req *C, options ...grpc.CallOption) (*D, error)) RpcCall[A, B, C, D, E] { +func New[A, B, C, D, E any](apiReq *A, apiResp *B, rpc func(client E, ctx context.Context, req *C, options ...grpc.CallOption) (*D, error)) RpcCall[A, B, C, D, E] { return &rpcCall[A, B, C, D, E]{ apiReq: apiReq, apiResp: apiResp, diff --git a/pkg/common/config/config.go b/pkg/common/config/config.go index c3e71307c..e1a9b61e9 100644 --- a/pkg/common/config/config.go +++ b/pkg/common/config/config.go @@ -526,7 +526,8 @@ func (c *config) initConfig(config interface{}, configName, configPath string) e } func (c *config) Register(registry discoveryregistry.SvcDiscoveryRegistry) error { - registry + //registry + return nil } func InitConfig() error { diff --git a/pkg/discoveryregistry/discovery_register.go b/pkg/discoveryregistry/discovery_register.go index 792c0cefc..65c915b70 100644 --- a/pkg/discoveryregistry/discovery_register.go +++ b/pkg/discoveryregistry/discovery_register.go @@ -9,5 +9,5 @@ type SvcDiscoveryRegistry interface { UnRegister() error GetConns(serviceName string, opts ...grpc.DialOption) ([]*grpc.ClientConn, error) GetConn(serviceName string, opts ...grpc.DialOption) (*grpc.ClientConn, error) - Re + //Re } diff --git a/pkg/utils/utils_v2_test.go b/pkg/utils/utils_v2_test.go index bea4dfdf6..f5aeef538 100644 --- a/pkg/utils/utils_v2_test.go +++ b/pkg/utils/utils_v2_test.go @@ -39,7 +39,7 @@ func TestSliceToMap(t *testing.T) { func TestIndexOf(t *testing.T) { arr := []int{0, 1, 2, 3, 4, 5, 6, 7, 8, 9} - fmt.Println(IndexOf(arr, 3)) + fmt.Println(IndexOf(3, arr...)) } From 586a1139945d3f001d1f61cc70548bb37aab9ad0 Mon Sep 17 00:00:00 2001 From: withchao <993506633@qq.com> Date: Mon, 27 Feb 2023 15:13:39 +0800 Subject: [PATCH 05/10] apitorpc group --- internal/a2r/api2rpc.go | 53 +++++++++++++++++++++++++----------- internal/api/group/group1.go | 11 ++++---- internal/api/route.go | 50 +++++++++++++++++----------------- 3 files changed, 68 insertions(+), 46 deletions(-) diff --git a/internal/a2r/api2rpc.go b/internal/a2r/api2rpc.go index 62da8c6da..b78c644cb 100644 --- a/internal/a2r/api2rpc.go +++ b/internal/a2r/api2rpc.go @@ -6,23 +6,44 @@ import ( "google.golang.org/grpc" ) -// Call TEST -func Call[A, B, C, D, E any]( - apiReq *A, - apiResp *B, - rpc func(client E, ctx context.Context, req C, options ...grpc.CallOption) (D, error), - client func() (E, error), - c *gin.Context, - before func(apiReq *A, rpcReq *C, bind func() error) error, - after func(rpcResp *D, apiResp *B, bind func() error) error, -) { +//// Call TEST +//func Call2[A, B, C, D, E any]( +// apiReq *A, +// apiResp *B, +// rpc func(client E, ctx context.Context, req C, options ...grpc.CallOption) (D, error), +// client func() (E, error), +// c *gin.Context, +// before func(apiReq *A, rpcReq *C, bind func() error) error, +// after func(rpcResp *D, apiResp *B, bind func() error) error, +//) { +// +//} -} - -func Call1[C, D, E any]( - rpc func(client E, ctx context.Context, req C, options ...grpc.CallOption) (D, error), - client func() (E, error), +func Call[A, B, C any]( + rpc func(client C, ctx context.Context, req *A, options ...grpc.CallOption) (*B, error), + client func() (C, error), c *gin.Context, ) { - + var req A + if err := c.BindJSON(&req); err != nil { + // todo 参数错误 + return + } + if check, ok := any(&req).(interface{ Check() error }); ok { + if err := check.Check(); err != nil { + // todo 参数校验失败 + return + } + } + cli, err := client() + if err != nil { + // todo 获取rpc连接失败 + return + } + resp, err := rpc(cli, c, &req) + if err != nil { + // todo rpc请求失败 + return + } + _ = resp } diff --git a/internal/api/group/group1.go b/internal/api/group/group1.go index 58608efc5..0640be943 100644 --- a/internal/api/group/group1.go +++ b/internal/api/group/group1.go @@ -2,7 +2,6 @@ package group import ( "OpenIM/internal/a2r" - "OpenIM/pkg/apistruct" "OpenIM/pkg/common/config" "OpenIM/pkg/proto/group" "context" @@ -10,8 +9,10 @@ import ( "github.com/gin-gonic/gin" ) -func _() { - context.Background() +var _ context.Context = nil // 解决goland编辑器bug + +func NewGroup(zk *openKeeper.ZkClient) *Group { + return &Group{zk: zk} } type Group struct { @@ -27,9 +28,9 @@ func (g *Group) getGroupClient() (group.GroupClient, error) { } func (g *Group) KickGroupMember(c *gin.Context) { - a2r.Call(&apistruct.KickGroupMemberReq{}, &apistruct.KickGroupMemberResp{}, group.GroupClient.KickGroupMember, g.getGroupClient, c, nil, nil) + a2r.Call(group.GroupClient.KickGroupMember, g.getGroupClient, c) } func (g *Group) GetGroupMembersInfo(c *gin.Context) { - a2r.Call1(group.GroupClient.GetGroupMembersInfo, g.getGroupClient, c) + a2r.Call(group.GroupClient.GetGroupMembersInfo, g.getGroupClient, c) } diff --git a/internal/api/route.go b/internal/api/route.go index f56f55ed9..101007080 100644 --- a/internal/api/route.go +++ b/internal/api/route.go @@ -82,31 +82,31 @@ func NewGinRouter() *gin.Engine { c.Next() }) { - - groupRouterGroup.POST("/create_group", group.NewCreateGroup) //1 - groupRouterGroup.POST("/set_group_info", group.NewSetGroupInfo) //1 - groupRouterGroup.POST("/join_group", group.JoinGroup) //1 - groupRouterGroup.POST("/quit_group", group.QuitGroup) //1 - groupRouterGroup.POST("/group_application_response", group.ApplicationGroupResponse) //1 - groupRouterGroup.POST("/transfer_group", group.TransferGroupOwner) //1 - groupRouterGroup.POST("/get_recv_group_applicationList", group.GetRecvGroupApplicationList) //1 - groupRouterGroup.POST("/get_user_req_group_applicationList", group.GetUserReqGroupApplicationList) - groupRouterGroup.POST("/get_groups_info", group.GetGroupsInfo) //1 - groupRouterGroup.POST("/kick_group", group.KickGroupMember) //1 - // groupRouterGroup.POST("/get_group_member_list", group.FindGroupMemberAll) //no use - groupRouterGroup.POST("/get_group_all_member_list", group.GetGroupAllMemberList) //1 - groupRouterGroup.POST("/get_group_members_info", group.GetGroupMembersInfo) //1 - groupRouterGroup.POST("/invite_user_to_group", group.InviteUserToGroup) //1 - groupRouterGroup.POST("/get_joined_group_list", group.GetJoinedGroupList) - groupRouterGroup.POST("/dismiss_group", group.DismissGroup) // - groupRouterGroup.POST("/mute_group_member", group.MuteGroupMember) - groupRouterGroup.POST("/cancel_mute_group_member", group.CancelMuteGroupMember) //MuteGroup - groupRouterGroup.POST("/mute_group", group.MuteGroup) - groupRouterGroup.POST("/cancel_mute_group", group.CancelMuteGroup) - groupRouterGroup.POST("/set_group_member_nickname", group.SetGroupMemberNickname) - groupRouterGroup.POST("/set_group_member_info", group.SetGroupMemberInfo) - groupRouterGroup.POST("/get_group_abstract_info", group.GetGroupAbstractInfo) - //groupRouterGroup.POST("/get_group_all_member_list_by_split", group.GetGroupAllMemberListBySplit) + g := group.NewGroup(nil) + groupRouterGroup.POST("/create_group", g.NewCreateGroup) //1 + groupRouterGroup.POST("/set_group_info", g.NewSetGroupInfo) //1 + groupRouterGroup.POST("/join_group", g.JoinGroup) //1 + groupRouterGroup.POST("/quit_group", g.QuitGroup) //1 + groupRouterGroup.POST("/group_application_response", g.ApplicationGroupResponse) //1 + groupRouterGroup.POST("/transfer_group", g.TransferGroupOwner) //1 + groupRouterGroup.POST("/get_recv_group_applicationList", g.GetRecvGroupApplicationList) //1 + groupRouterGroup.POST("/get_user_req_group_applicationList", g.GetUserReqGroupApplicationList) + groupRouterGroup.POST("/get_groups_info", g.GetGroupsInfo) //1 + groupRouterGroup.POST("/kick_group", g.KickGroupMember) //1 + // groupRouterGroup.POST("/get_group_member_list", g.FindGroupMemberAll) //no use + groupRouterGroup.POST("/get_group_all_member_list", g.GetGroupAllMemberList) //1 + groupRouterGroup.POST("/get_group_members_info", g.GetGroupMembersInfo) //1 + groupRouterGroup.POST("/invite_user_to_group", g.InviteUserToGroup) //1 + groupRouterGroup.POST("/get_joined_group_list", g.GetJoinedGroupList) + groupRouterGroup.POST("/dismiss_group", g.DismissGroup) // + groupRouterGroup.POST("/mute_group_member", g.MuteGroupMember) + groupRouterGroup.POST("/cancel_mute_group_member", g.CancelMuteGroupMember) //MuteGroup + groupRouterGroup.POST("/mute_group", g.MuteGroup) + groupRouterGroup.POST("/cancel_mute_group", g.CancelMuteGroup) + groupRouterGroup.POST("/set_group_member_nickname", g.SetGroupMemberNickname) + groupRouterGroup.POST("/set_group_member_info", g.SetGroupMemberInfo) + groupRouterGroup.POST("/get_group_abstract_info", g.GetGroupAbstractInfo) + //groupRouterGroup.POST("/get_group_all_member_list_by_split", g.GetGroupAllMemberListBySplit) } superGroupRouterGroup := r.Group("/super_group") { From 4cf29ad5656335e6ff49c07833ce3144df6286fa Mon Sep 17 00:00:00 2001 From: withchao <993506633@qq.com> Date: Mon, 27 Feb 2023 18:11:00 +0800 Subject: [PATCH 06/10] group api --- internal/api/group/group.go | 1363 +++-------------------------- internal/api/group/group1.go | 36 - internal/api/group/group1_test.go | 11 - internal/api/group/super_group.go | 89 -- internal/api/route.go | 16 +- internal/api2rpc/api.go | 99 --- internal/api2rpc/api2rpc.go | 23 - internal/api2rpc/api2rpc_test.go | 1 - internal/api2rpc/copy.go | 274 ------ internal/api2rpc/gin.go | 98 --- internal/api2rpc/new1.go | 49 -- internal/api2rpc/rpc.go | 114 --- internal/api2rpc/rpc1.go | 104 --- 13 files changed, 126 insertions(+), 2151 deletions(-) delete mode 100644 internal/api/group/group1.go delete mode 100644 internal/api/group/group1_test.go delete mode 100644 internal/api/group/super_group.go delete mode 100644 internal/api2rpc/api.go delete mode 100644 internal/api2rpc/api2rpc.go delete mode 100644 internal/api2rpc/api2rpc_test.go delete mode 100644 internal/api2rpc/copy.go delete mode 100644 internal/api2rpc/gin.go delete mode 100644 internal/api2rpc/new1.go delete mode 100644 internal/api2rpc/rpc.go delete mode 100644 internal/api2rpc/rpc1.go diff --git a/internal/api/group/group.go b/internal/api/group/group.go index e044b81b2..91d5115b6 100644 --- a/internal/api/group/group.go +++ b/internal/api/group/group.go @@ -1,1249 +1,124 @@ package group -//import ( -// common "OpenIM/internal/api_to_rpc" -// api "OpenIM/pkg/apistruct" -// "OpenIM/pkg/common/config" -// "OpenIM/pkg/common/constant" -// "OpenIM/pkg/common/log" -// "OpenIM/pkg/common/token_verify" -// "OpenIM/pkg/common/tracelog" -// "OpenIM/pkg/getcdv3" -// rpc "OpenIM/pkg/proto/group" -// "OpenIM/pkg/utils" -// "context" -// "github.com/golang/protobuf/ptypes/wrappers" -// "google.golang.org/grpc" -// -// "github.com/gin-gonic/gin" -// -// "net/http" -// "strings" -// -// jsonData "OpenIM/internal/utils" -//) +import ( + "OpenIM/internal/a2r" + "OpenIM/pkg/common/config" + "OpenIM/pkg/proto/group" + "context" + "github.com/OpenIMSDK/openKeeper" + "github.com/gin-gonic/gin" +) -//func KickGroupMember(c *gin.Context) { -// api2rpc.NewRpc(api2rpc.NewGin[apistruct.KickGroupMemberReq, apistruct.KickGroupMemberResp](c), group.NewGroupClient, group.GroupClient.KickGroupMember).Name("group").Call() +var _ context.Context // 解决goland编辑器bug + +func NewGroup(zk *openKeeper.ZkClient) *Group { + return &Group{zk: zk} +} + +type Group struct { + zk *openKeeper.ZkClient +} + +func (g *Group) getGroupClient() (group.GroupClient, error) { + conn, err := g.zk.GetConn(config.Config.RpcRegisterName.OpenImGroupName) + if err != nil { + return nil, err + } + return group.NewGroupClient(conn), nil +} + +func (g *Group) NewCreateGroup(c *gin.Context) { + a2r.Call(group.GroupClient.CreateGroup, g.getGroupClient, c) +} + +func (g *Group) NewSetGroupInfo(c *gin.Context) { + a2r.Call(group.GroupClient.SetGroupInfo, g.getGroupClient, c) +} + +func (g *Group) JoinGroup(c *gin.Context) { + a2r.Call(group.GroupClient.JoinGroup, g.getGroupClient, c) +} + +func (g *Group) QuitGroup(c *gin.Context) { + a2r.Call(group.GroupClient.QuitGroup, g.getGroupClient, c) +} + +func (g *Group) ApplicationGroupResponse(c *gin.Context) { + a2r.Call(group.GroupClient.GroupApplicationResponse, g.getGroupClient, c) +} + +func (g *Group) TransferGroupOwner(c *gin.Context) { + a2r.Call(group.GroupClient.TransferGroupOwner, g.getGroupClient, c) +} + +func (g *Group) GetRecvGroupApplicationList(c *gin.Context) { + a2r.Call(group.GroupClient.GetGroupApplicationList, g.getGroupClient, c) +} + +func (g *Group) GetUserReqGroupApplicationList(c *gin.Context) { + a2r.Call(group.GroupClient.GetUserReqApplicationList, g.getGroupClient, c) +} + +func (g *Group) GetGroupsInfo(c *gin.Context) { + a2r.Call(group.GroupClient.GetGroupsInfo, g.getGroupClient, c) +} + +func (g *Group) KickGroupMember(c *gin.Context) { + a2r.Call(group.GroupClient.KickGroupMember, g.getGroupClient, c) +} + +func (g *Group) GetGroupMembersInfo(c *gin.Context) { + a2r.Call(group.GroupClient.GetGroupMembersInfo, g.getGroupClient, c) +} + +func (g *Group) InviteUserToGroup(c *gin.Context) { + a2r.Call(group.GroupClient.InviteUserToGroup, g.getGroupClient, c) +} + +func (g *Group) GetJoinedGroupList(c *gin.Context) { + a2r.Call(group.GroupClient.GetJoinedGroupList, g.getGroupClient, c) +} + +func (g *Group) DismissGroup(c *gin.Context) { + a2r.Call(group.GroupClient.DismissGroup, g.getGroupClient, c) +} + +func (g *Group) MuteGroupMember(c *gin.Context) { + a2r.Call(group.GroupClient.MuteGroupMember, g.getGroupClient, c) +} + +func (g *Group) CancelMuteGroupMember(c *gin.Context) { + a2r.Call(group.GroupClient.CancelMuteGroupMember, g.getGroupClient, c) +} + +func (g *Group) MuteGroup(c *gin.Context) { + a2r.Call(group.GroupClient.MuteGroup, g.getGroupClient, c) +} + +func (g *Group) CancelMuteGroup(c *gin.Context) { + a2r.Call(group.GroupClient.CancelMuteGroup, g.getGroupClient, c) +} + +func (g *Group) SetGroupMemberInfo(c *gin.Context) { + a2r.Call(group.GroupClient.SetGroupMemberInfo, g.getGroupClient, c) +} + +func (g *Group) GetGroupAbstractInfo(c *gin.Context) { + a2r.Call(group.GroupClient.GetGroupAbstractInfo, g.getGroupClient, c) +} + +//func (g *Group) SetGroupMemberNickname(c *gin.Context) { +// a2r.Call(group.GroupClient.SetGroupMemberNickname, g.getGroupClient, c) +//} +// +//func (g *Group) GetGroupAllMemberList(c *gin.Context) { +// a2r.Call(group.GroupClient.GetGroupAllMember, g.getGroupClient, c) //} -// -//// @Summary 获取群成员信息 -//// @Description 获取群成员信息 -//// @Tags 群组相关 -//// @ID GetGroupMembersInfo -//// @Accept json -//// @Param token header string true "im token" -//// @Param req body api.GetGroupMembersInfoReq true "groupID为要获取的群ID
memberList为要获取群成员的群ID列表" -//// @Produce json -//// @Success 0 {object} api.GetGroupMembersInfoResp{data=[]sdkws.GroupMemberFullInfo} -//// @Failure 500 {object} api.Swagger500Resp "errCode为500 一般为服务器内部错误" -//// @Failure 400 {object} api.Swagger400Resp "errCode为400 一般为参数输入错误, token未带上等" -//// @Router /group/get_group_members_info [post] -//func GetGroupMembersInfo(c *gin.Context) { -// params := api.GetGroupMembersInfoReq{} -// if err := c.BindJSON(¶ms); err != nil { -// log.NewError("0", "BindJSON failed ", err.Error()) -// c.JSON(http.StatusBadRequest, gin.H{"errCode": 400, "errMsg": err.Error()}) -// return -// } -// req := &rpc.GetGroupMembersInfoReq{} -// utils.CopyStructFields(req, params) -// -// var ok bool -// var errInfo string -// ok, req.OpUserID, errInfo = token_verify.GetUserIDFromToken(c.Request.Header.Get("token"), req.OperationID) -// if !ok { -// errMsg := req.OperationID + " " + "GetUserIDFromToken failed " + errInfo + " token:" + c.Request.Header.Get("token") -// log.NewError(req.OperationID, errMsg) -// c.JSON(http.StatusBadRequest, gin.H{"errCode": 500, "errMsg": errMsg}) -// return -// } -// -// log.NewInfo(req.OperationID, "GetGroupMembersInfo args ", req.String()) -// -// etcdConn := rpc.GetDefaultConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImGroupName, req.OperationID) -// if etcdConn == nil { -// errMsg := req.OperationID + "getcdv3.GetDefaultConn == nil" -// log.NewError(req.OperationID, errMsg) -// c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": errMsg}) -// return -// } -// client := rpc.NewGroupClient(etcdConn) -// -// RpcResp, err := client.GetGroupMembersInfo(context.Background(), req) -// if err != nil { -// log.NewError(req.OperationID, "FindGroupMemberAll failed ", err.Error(), req.String()) -// c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": err.Error()}) -// return -// } -// -// memberListResp := api.GetGroupMembersInfoResp{CommResp: api.CommResp{ErrCode: RpcResp.CommonResp.ErrCode, ErrMsg: RpcResp.CommonResp.ErrMsg}, MemberList: RpcResp.MemberList} -// memberListResp.Map = jsonData.JsonDataList(RpcResp.MemberList) -// log.NewInfo(req.OperationID, "GetGroupMembersInfo api return ", memberListResp) -// c.JSON(http.StatusOK, memberListResp) -//} -// -//func GetGroupMemberList(c *gin.Context) { -// params := api.GetGroupMemberListReq{} -// if err := c.BindJSON(¶ms); err != nil { -// log.NewError("0", "BindJSON failed ", err.Error()) -// c.JSON(http.StatusBadRequest, gin.H{"errCode": 400, "errMsg": err.Error()}) -// return -// } -// req := &rpc.GetGroupMemberListReq{} -// utils.CopyStructFields(req, params) -// -// var ok bool -// var errInfo string -// ok, req.OpUserID, errInfo = token_verify.GetUserIDFromToken(c.Request.Header.Get("token"), req.OperationID) -// if !ok { -// errMsg := req.OperationID + " " + "GetUserIDFromToken failed " + errInfo + " token:" + c.Request.Header.Get("token") -// log.NewError(req.OperationID, errMsg) -// c.JSON(http.StatusBadRequest, gin.H{"errCode": 500, "errMsg": errMsg}) -// return -// } -// -// log.NewInfo(req.OperationID, "FindGroupMemberAll args ", req.String()) -// -// etcdConn := rpc.GetDefaultConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImGroupName, req.OperationID) -// if etcdConn == nil { -// errMsg := req.OperationID + "getcdv3.GetDefaultConn == nil" -// log.NewError(req.OperationID, errMsg) -// c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": errMsg}) -// return -// } -// client := rpc.NewGroupClient(etcdConn) -// -// RpcResp, err := client.GetGroupMemberList(context.Background(), req) -// if err != nil { -// log.NewError(req.OperationID, "FindGroupMemberAll failed, ", err.Error(), req.String()) -// c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": err.Error()}) -// return -// } -// -// memberListResp := api.GetGroupMemberListResp{CommResp: api.CommResp{ErrCode: RpcResp.CommonResp.ErrCode, ErrMsg: RpcResp.CommonResp.ErrMsg}, MemberList: RpcResp.MemberList, NextSeq: RpcResp.NextSeq} -// memberListResp.Map = jsonData.JsonDataList(memberListResp.MemberList) -// -// log.NewInfo(req.OperationID, "FindGroupMemberAll api return ", memberListResp) -// c.JSON(http.StatusOK, memberListResp) -//} -// -//// @Summary 获取全部群成员列表 -//// @Description 获取全部群成员列表 -//// @Tags 群组相关 -//// @ID GetGroupAllMemberList -//// @Accept json -//// @Param token header string true "im token" -//// @Param req body api.GetGroupAllMemberReq true "GroupID为要获取群成员的群ID" -//// @Produce json -//// @Success 0 {object} api.GetGroupAllMemberResp{data=[]sdkws.GroupMemberFullInfo} -//// @Failure 500 {object} api.Swagger500Resp "errCode为500 一般为服务器内部错误" -//// @Failure 400 {object} api.Swagger400Resp "errCode为400 一般为参数输入错误, token未带上等" -//// @Router /group/get_group_all_member_list [post] -//func GetGroupAllMemberList(c *gin.Context) { -// params := api.GetGroupAllMemberReq{} -// if err := c.BindJSON(¶ms); err != nil { -// log.NewError("0", "BindJSON failed ", err.Error()) -// c.JSON(http.StatusBadRequest, gin.H{"errCode": 400, "errMsg": err.Error()}) -// return -// } -// req := &rpc.GetGroupAllMemberReq{} -// utils.CopyStructFields(req, ¶ms) -// -// var ok bool -// var errInfo string -// ok, req.OpUserID, errInfo = token_verify.GetUserIDFromToken(c.Request.Header.Get("token"), req.OperationID) -// if !ok { -// errMsg := req.OperationID + " " + "GetUserIDFromToken failed " + errInfo + " token:" + c.Request.Header.Get("token") -// log.NewError(req.OperationID, errMsg) -// c.JSON(http.StatusBadRequest, gin.H{"errCode": 500, "errMsg": errMsg}) -// return -// } -// -// log.NewInfo(req.OperationID, "GetGroupAllMember args ", req.String()) -// -// etcdConn := rpc.GetDefaultConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImGroupName, req.OperationID) -// if etcdConn == nil { -// errMsg := req.OperationID + "getcdv3.GetDefaultConn == nil" -// log.NewError(req.OperationID, errMsg) -// c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": errMsg}) -// return -// } -// maxSizeOption := grpc.MaxCallRecvMsgSize(1024 * 1024 * constant.GroupRPCRecvSize) -// client := rpc.NewGroupClient(etcdConn) -// RpcResp, err := client.GetGroupAllMember(context.Background(), req, maxSizeOption) -// if err != nil { -// log.NewError(req.OperationID, "GetGroupAllMember failed err", err.Error(), req.String()) -// c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": err.Error()}) -// return -// } -// -// memberListResp := api.GetGroupAllMemberResp{CommResp: api.CommResp{ErrCode: RpcResp.CommonResp.ErrCode, ErrMsg: RpcResp.CommonResp.ErrMsg}, MemberList: RpcResp.MemberList} -// memberListResp.Map = jsonData.JsonDataList(memberListResp.MemberList) -// log.NewInfo(req.OperationID, "GetGroupAllMember api return ", len(memberListResp.MemberList)) -// c.JSON(http.StatusOK, memberListResp) -//} -// -//// @Summary 获取用户加入群列表 -//// @Description 获取用户加入群列表 -//// @Tags 群组相关 -//// @ID GetJoinedGroupList -//// @Accept json -//// @Param token header string true "im token" -//// @Param req body api.GetJoinedGroupListReq true "fromUserID为要获取的用户ID" -//// @Produce json -//// @Success 0 {object} api.GetJoinedGroupListResp{data=[]sdkws.GroupInfo} -//// @Failure 500 {object} api.Swagger500Resp "errCode为500 一般为服务器内部错误" -//// @Failure 400 {object} api.Swagger400Resp "errCode为400 一般为参数输入错误, token未带上等" -//// @Router /group/get_joined_group_list [post] -//func GetJoinedGroupList(c *gin.Context) { -// params := api.GetJoinedGroupListReq{} -// if err := c.BindJSON(¶ms); err != nil { -// log.NewError("0", "BindJSON failed ", err.Error()) -// c.JSON(http.StatusBadRequest, gin.H{"errCode": 400, "errMsg": err.Error()}) -// return -// } -// req := &rpc.GetJoinedGroupListReq{} -// utils.CopyStructFields(req, params) -// -// var ok bool -// var errInfo string -// ok, req.OpUserID, errInfo = token_verify.GetUserIDFromToken(c.Request.Header.Get("token"), req.OperationID) -// if !ok { -// errMsg := req.OperationID + " " + "GetUserIDFromToken failed " + errInfo + " token:" + c.Request.Header.Get("token") -// log.NewError(req.OperationID, errMsg) -// c.JSON(http.StatusBadRequest, gin.H{"errCode": 500, "errMsg": errMsg}) -// return -// } -// -// log.NewInfo(req.OperationID, "FindJoinedGroup args ", req.String()) -// -// etcdConn := rpc.GetDefaultConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImGroupName, req.OperationID) -// if etcdConn == nil { -// errMsg := req.OperationID + "getcdv3.GetDefaultConn == nil" -// log.NewError(req.OperationID, errMsg) -// c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": errMsg}) -// return -// } -// client := rpc.NewGroupClient(etcdConn) -// RpcResp, err := client.GetJoinedGroupList(context.Background(), req) -// if err != nil { -// log.NewError(req.OperationID, "FindJoinedGroup failed ", err.Error(), req.String()) -// c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": err.Error()}) -// return -// } -// -// GroupListResp := api.GetJoinedGroupListResp{CommResp: api.CommResp{ErrCode: RpcResp.CommonResp.ErrCode, ErrMsg: RpcResp.CommonResp.ErrMsg}, GroupInfoList: RpcResp.GroupList} -// GroupListResp.Map = jsonData.JsonDataList(GroupListResp.GroupInfoList) -// log.NewInfo(req.OperationID, "FindJoinedGroup api return ", GroupListResp) -// c.JSON(http.StatusOK, GroupListResp) -//} -// -//// @Summary 将用户拉入群组 -//// @Description 将用户拉入群组 -//// @Tags 群组相关 -//// @ID InviteUserToGroup -//// @Accept json -//// @Param token header string true "im token" -//// @Param req body api.InviteUserToGroupReq true "groupID为要拉进的群组ID
invitedUserIDList为要获取群成员的群ID列表
reason为原因" -//// @Produce json -//// @Success 0 {object} api.InviteUserToGroupResp "result为结果码, -1为失败, 0为成功"" -//// @Failure 500 {object} api.Swagger500Resp "errCode为500 一般为服务器内部错误" -//// @Failure 400 {object} api.Swagger400Resp "errCode为400 一般为参数输入错误, token未带上等" -//// @Router /group/invite_user_to_group [post] -//func InviteUserToGroup(c *gin.Context) { -// params := api.InviteUserToGroupReq{} -// if err := c.BindJSON(¶ms); err != nil { -// log.NewError("0", "BindJSON failed ", err.Error()) -// c.JSON(http.StatusBadRequest, gin.H{"errCode": 400, "errMsg": err.Error()}) -// return -// } -// if len(params.InvitedUserIDList) > constant.MaxNotificationNum { -// errMsg := params.OperationID + " too many members " + utils.Int32ToString(int32(len(params.InvitedUserIDList))) -// log.Error(params.OperationID, errMsg) -// c.JSON(http.StatusOK, gin.H{"errCode": 400, "errMsg": errMsg}) -// return -// } -// req := &rpc.InviteUserToGroupReq{} -// utils.CopyStructFields(req, ¶ms) -// -// var ok bool -// var errInfo string -// ok, req.OpUserID, errInfo = token_verify.GetUserIDFromToken(c.Request.Header.Get("token"), req.OperationID) -// if !ok { -// errMsg := req.OperationID + " " + "GetUserIDFromToken failed " + errInfo + " token:" + c.Request.Header.Get("token") -// log.NewError(req.OperationID, errMsg) -// c.JSON(http.StatusBadRequest, gin.H{"errCode": 500, "errMsg": errMsg}) -// return -// } -// -// log.NewInfo(req.OperationID, "InviteUserToGroup args ", req.String()) -// -// etcdConn := rpc.GetDefaultConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImGroupName, req.OperationID) -// if etcdConn == nil { -// errMsg := req.OperationID + "getcdv3.GetDefaultConn == nil" -// log.NewError(req.OperationID, errMsg) -// c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": errMsg}) -// return -// } -// client := rpc.NewGroupClient(etcdConn) -// RpcResp, err := client.InviteUserToGroup(context.Background(), req) -// if err != nil { -// log.NewError(req.OperationID, "InviteUserToGroup failed ", err.Error(), req.String()) -// c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": err.Error()}) -// return -// } -// -// resp := api.InviteUserToGroupResp{CommResp: api.CommResp{ErrCode: RpcResp.CommonResp.ErrCode, ErrMsg: RpcResp.CommonResp.ErrMsg}} -// for _, v := range RpcResp.Id2ResultList { -// resp.UserIDResultList = append(resp.UserIDResultList, &api.UserIDResult{UserID: v.UserID, Result: v.Result}) -// } -// -// if len(resp.UserIDResultList) == 0 { -// resp.UserIDResultList = *new([]*api.UserIDResult) -// } -// -// log.NewInfo(req.OperationID, "InviteUserToGroup api return ", resp) -// c.JSON(http.StatusOK, resp) -//} -// -//// @Summary 创建群组 -//// @Description 创建群组 -//// @Tags 群组相关 -//// @ID CreateGroup -//// @Accept json -//// @Param token header string true "im token" -//// @Param req body api.CreateGroupReq true "groupType这里填0代表普通群
groupName为群名称
introduction为群介绍
notification为群公共
ownerUserID为群主ID
ex为群扩展字段
memberList中对象roleLevel为群员角色,1为普通用户 2为群主 3为管理员" -//// @Produce json -//// @Success 0 {object} api.CreateGroupResp{data=sdkws.GroupInfo} -//// @Failure 500 {object} api.Swagger500Resp "errCode为500 一般为服务器内部错误" -//// @Failure 400 {object} api.Swagger400Resp "errCode为400 一般为参数输入错误, token未带上等" -//// @Router /group/create_group [post] -////func CreateGroup(c *gin.Context) { -//// params := api.CreateGroupReq{} -//// if err := c.BindJSON(¶ms); err != nil { -//// log.NewError("0", "BindJSON failed ", err.Error()) -//// c.JSON(http.StatusBadRequest, gin.H{"errCode": 400, "errMsg": err.Error()}) -//// return -//// } -//// -//// if len(params.MemberList) > constant.MaxNotificationNum { -//// errMsg := params.OperationID + " too many members " + utils.Int32ToString(int32(len(params.MemberList))) -//// log.Error(params.OperationID, errMsg) -//// c.JSON(http.StatusOK, gin.H{"errCode": 400, "errMsg": errMsg}) -//// return -//// } -//// req := &rpc.CreateGroupReq{GroupInfo: &sdkws.GroupInfo{}} -//// utils.CopyStructFields(req.GroupInfo, ¶ms) -//// -//// for _, v := range params.MemberList { -//// req.InitMemberList = append(req.InitMemberList, &rpc.GroupAddMemberInfo{UserID: v.UserID, RoleLevel: v.RoleLevel}) -//// } -//// -//// var ok bool -//// var errInfo string -//// ok, req.OpUserID, errInfo = token_verify.GetUserIDFromToken(c.Request.Header.Get("token"), req.OperationID) -//// if !ok { -//// errMsg := req.OperationID + " " + "GetUserIDFromToken failed " + errInfo + " token:" + c.Request.Header.Get("token") -//// log.NewError(req.OperationID, errMsg) -//// c.JSON(http.StatusBadRequest, gin.H{"errCode": 400, "errMsg": errMsg}) -//// return -//// } -//// -//// req.OwnerUserID = params.OwnerUserID -//// req.OperationID = params.OperationID -//// -//// log.NewInfo(req.OperationID, "CreateGroup args ", req.String()) -//// -//// etcdConn := getcdv3.GetDefaultConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImGroupName, req.OperationID) -//// if etcdConn == nil { -//// errMsg := req.OperationID + "getcdv3.GetDefaultConn == nil" -//// log.NewError(req.OperationID, errMsg) -//// c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": errMsg}) -//// return -//// } -//// client := rpc.NewGroupClient(etcdConn) -//// RpcResp, err := client.CreateGroup(context.Background(), req) -//// if err != nil { -//// log.NewError(req.OperationID, "CreateGroup failed ", err.Error(), req.String()) -//// c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": "call rpc server failed"}) -//// return -//// } -//// -//// resp := api.CreateGroupResp{CommResp: api.CommResp{ErrCode: RpcResp.ErrCode, ErrMsg: RpcResp.ErrMsg}} -//// if RpcResp.ErrCode == 0 { -//// utils.CopyStructFields(&resp.GroupInfo, RpcResp.GroupInfo) -//// resp.Map = jsonData.JsonDataOne(&resp.GroupInfo) -//// } -//// log.NewInfo(req.OperationID, "CreateGroup api return ", resp) -//// c.JSON(http.StatusOK, resp) -////} -// -//func NewCreateGroup(c *gin.Context) { -// common.ApiToRpc(c, &api.CreateGroupReq{}, &api.CreateGroupResp{}, -// config.Config.RpcRegisterName.OpenImGroupName, rpc.NewGroupClient, "CreateGroup") -//} -// -//// @Summary 获取用户收到的加群信息列表 -//// @Description 获取用户收到的加群信息列表 -//// @Tags 群组相关 -//// @ID GetRecvGroupApplicationList -//// @Accept json -//// @Param token header string true "im token" -//// @Param req body api.GetGroupApplicationListReq true "fromUserID为要获取的用户ID" -//// @Produce json -//// @Success 0 {object} api.GetGroupApplicationListResp{data=[]sdkws.GroupRequest} -//// @Failure 500 {object} api.Swagger500Resp "errCode为500 一般为服务器内部错误" -//// @Failure 400 {object} api.Swagger400Resp "errCode为400 一般为参数输入错误, token未带上等" -//// @Router /group/get_recv_group_applicationList [post] -//func GetRecvGroupApplicationList(c *gin.Context) { -// params := api.GetGroupApplicationListReq{} -// if err := c.BindJSON(¶ms); err != nil { -// log.NewError("0", "BindJSON failed ", err.Error()) -// c.JSON(http.StatusBadRequest, gin.H{"errCode": 400, "errMsg": err.Error()}) -// return -// } -// req := &rpc.GetGroupApplicationListReq{} -// utils.CopyStructFields(req, params) -// var ok bool -// var errInfo string -// ok, req.OpUserID, errInfo = token_verify.GetUserIDFromToken(c.Request.Header.Get("token"), req.OperationID) -// if !ok { -// errMsg := req.OperationID + " " + "GetUserIDFromToken failed " + errInfo + " token:" + c.Request.Header.Get("token") -// log.NewError(req.OperationID, errMsg) -// c.JSON(http.StatusBadRequest, gin.H{"errCode": 400, "errMsg": errMsg}) -// return -// } -// log.NewInfo(req.OperationID, "GetGroupApplicationList args ", req.String()) -// -// etcdConn := rpc.GetDefaultConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImGroupName, req.OperationID) -// if etcdConn == nil { -// errMsg := req.OperationID + "getcdv3.GetDefaultConn == nil" -// log.NewError(req.OperationID, errMsg) -// c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": errMsg}) -// return -// } -// client := rpc.NewGroupClient(etcdConn) -// reply, err := client.GetGroupApplicationList(context.Background(), req) -// if err != nil { -// log.NewError(req.OperationID, "GetGroupApplicationList failed ", err.Error(), req.String()) -// c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": err.Error()}) -// return -// } -// -// resp := api.GetGroupApplicationListResp{CommResp: api.CommResp{ErrCode: reply.CommonResp.ErrCode, ErrMsg: reply.CommonResp.ErrMsg}, GroupRequestList: reply.GroupRequestList} -// resp.Map = jsonData.JsonDataList(resp.GroupRequestList) -// log.NewInfo(req.OperationID, "GetGroupApplicationList api return ", resp) -// c.JSON(http.StatusOK, resp) -//} -// -//// @Summary 获取用户加群申请列表 -//// @Description 获取用户加群申请列表 -//// @Tags 群组相关 -//// @ID GetUserReqGroupApplicationList -//// @Accept json -//// @Param token header string true "im token" -//// @Param req body api.GetUserReqGroupApplicationListReq true "userID为要获取的用户ID" -//// @Produce json -//// @Success 0 {object} api.GetGroupApplicationListResp{data=[]sdkws.GroupRequest} -//// @Failure 500 {object} api.Swagger500Resp "errCode为500 一般为服务器内部错误" -//// @Failure 400 {object} api.Swagger400Resp "errCode为400 一般为参数输入错误, token未带上等" -//// @Router /group/get_user_req_group_applicationList [post] -//func GetUserReqGroupApplicationList(c *gin.Context) { -// common.ApiToRpc(c, &api.GetUserReqGroupApplicationListReq{}, &api.GetUserRespGroupApplicationResp{}, -// config.Config.RpcRegisterName.OpenImGroupName, rpc.NewGroupClient, "GetGroupApplicationList") -//} -// -//// @Summary 通过群ID列表获取群信息 -//// @Description 通过群ID列表获取群信息 -//// @Tags 群组相关 -//// @ID GetGroupsInfo -//// @Accept json -//// @Param token header string true "im token" -//// @Param req body api.GetGroupInfoReq true "groupIDList为群ID列表" -//// @Produce json -//// @Success 0 {object} api.GetGroupInfoResp -//// @Failure 500 {object} api.Swagger500Resp "errCode为500 一般为服务器内部错误" -//// @Failure 400 {object} api.Swagger400Resp "errCode为400 一般为参数输入错误, token未带上等" -//// @Router /group/get_groups_info [post] -//func GetGroupsInfo(c *gin.Context) { -// params := api.GetGroupInfoReq{} -// if err := c.BindJSON(¶ms); err != nil { -// log.NewError("0", "BindJSON failed ", err.Error()) -// c.JSON(http.StatusBadRequest, gin.H{"errCode": 400, "errMsg": err.Error()}) -// return -// } -// req := &rpc.GetGroupsInfoReq{} -// utils.CopyStructFields(req, ¶ms) -// -// var ok bool -// var errInfo string -// ok, req.OpUserID, errInfo = token_verify.GetUserIDFromToken(c.Request.Header.Get("token"), req.OperationID) -// if !ok { -// errMsg := req.OperationID + " " + "GetUserIDFromToken failed " + errInfo + " token:" + c.Request.Header.Get("token") -// log.NewError(req.OperationID, errMsg) -// c.JSON(http.StatusBadRequest, gin.H{"errCode": 500, "errMsg": errMsg}) -// return -// } -// -// log.NewInfo(req.OperationID, "GetGroupsInfo args ", req.String()) -// etcdConn := rpc.GetDefaultConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImGroupName, req.OperationID) -// if etcdConn == nil { -// errMsg := req.OperationID + "getcdv3.GetDefaultConn == nil" -// log.NewError(req.OperationID, errMsg) -// c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": errMsg}) -// return -// } -// client := rpc.NewGroupClient(etcdConn) -// RpcResp, err := client.GetGroupsInfo(context.Background(), req) -// if err != nil { -// log.NewError(req.OperationID, "GetGroupsInfo failed ", err.Error(), req.String()) -// c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": "call rpc server failed"}) -// return -// } -// -// resp := api.GetGroupInfoResp{CommResp: api.CommResp{ErrCode: RpcResp.CommonResp.ErrCode, ErrMsg: RpcResp.CommonResp.ErrMsg}, GroupInfoList: RpcResp.GroupInfoList} -// resp.Map = jsonData.JsonDataList(resp.GroupInfoList) -// log.NewInfo(req.OperationID, "GetGroupsInfo api return ", resp) -// c.JSON(http.StatusOK, resp) -//} -// -////func transferGroupInfo(input []*sdkws.GroupInfo) []*api.GroupInfoAlias { -//// var result []*api.GroupInfoAlias -//// for _, v := range input { -//// t := &api.GroupInfoAlias{} -//// utils.CopyStructFields(t, &v) -//// if v.NeedVerification != nil { -//// t.NeedVerification = v.NeedVerification.Value -//// } -//// result = append(result, t) -//// } -//// return result -////} -// -////process application -// -//// @Summary 处理加群消息 -//// @Description 处理加群消息 -//// @Tags 群组相关 -//// @ID ApplicationGroupResponse -//// @Accept json -//// @Param token header string true "im token" -//// @Param req body api.ApplicationGroupResponseReq true "groupID为要处理的群ID
fromUserID为要处理的用户ID
handleMsg为处理结果信息
handleResult为处理结果 1为同意加群 2为拒绝加群" -//// @Produce json -//// @Success 0 {object} api.ApplicationGroupResponseResp -//// @Failure 500 {object} api.Swagger500Resp "errCode为500 一般为服务器内部错误" -//// @Failure 400 {object} api.Swagger400Resp "errCode为400 一般为参数输入错误, token未带上等" -//// @Router /group/group_application_response [post] -//func ApplicationGroupResponse(c *gin.Context) { -// params := api.ApplicationGroupResponseReq{} -// if err := c.BindJSON(¶ms); err != nil { -// log.NewError("0", "BindJSON failed ", err.Error()) -// c.JSON(http.StatusBadRequest, gin.H{"errCode": 400, "errMsg": err.Error()}) -// return -// } -// req := &rpc.GroupApplicationResponseReq{} -// utils.CopyStructFields(req, ¶ms) -// -// var ok bool -// var errInfo string -// ok, req.OpUserID, errInfo = token_verify.GetUserIDFromToken(c.Request.Header.Get("token"), req.OperationID) -// if !ok { -// errMsg := req.OperationID + " " + "GetUserIDFromToken failed " + errInfo + " token:" + c.Request.Header.Get("token") -// log.NewError(req.OperationID, errMsg) -// c.JSON(http.StatusBadRequest, gin.H{"errCode": 500, "errMsg": errMsg}) -// return -// } -// -// log.NewInfo(req.OperationID, "ApplicationGroupResponse args ", req.String()) -// -// etcdConn := rpc.GetDefaultConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImGroupName, req.OperationID) -// if etcdConn == nil { -// errMsg := req.OperationID + "getcdv3.GetDefaultConn == nil" -// log.NewError(req.OperationID, errMsg) -// c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": errMsg}) -// return -// } -// client := rpc.NewGroupClient(etcdConn) -// reply, err := client.GroupApplicationResponse(context.Background(), req) -// if err != nil { -// log.NewError(req.OperationID, "GroupApplicationResponse failed ", req.String()) -// c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": err.Error()}) -// return -// } -// -// resp := api.ApplicationGroupResponseResp{CommResp: api.CommResp{ErrCode: reply.CommonResp.ErrCode, ErrMsg: reply.CommonResp.ErrMsg}} -// log.NewInfo(req.OperationID, "ApplicationGroupResponse api return ", resp) -// c.JSON(http.StatusOK, resp) -//} -// -//// @Summary 加入群聊 -//// @Description 加入群聊 -//// @Tags 群组相关 -//// @ID JoinGroup -//// @Accept json -//// @Param token header string true "im token" -//// @Param req body api.JoinGroupReq true "reqMessage为申请进群信息
groupID为申请的群ID" -//// @Produce json -//// @Success 0 {object} api.JoinGroupResp -//// @Failure 500 {object} api.Swagger500Resp "errCode为500 一般为服务器内部错误" -//// @Failure 400 {object} api.Swagger400Resp "errCode为400 一般为参数输入错误, token未带上等" -//// @Router /group/join_group [post] -//func JoinGroup(c *gin.Context) { -// params := api.JoinGroupReq{} -// if err := c.BindJSON(¶ms); err != nil { -// log.NewError("0", "BindJSON failed ", err.Error()) -// c.JSON(http.StatusBadRequest, gin.H{"errCode": 400, "errMsg": err.Error()}) -// return -// } -// req := &rpc.JoinGroupReq{} -// utils.CopyStructFields(req, params) -// -// var ok bool -// var errInfo string -// ok, req.OpUserID, errInfo = token_verify.GetUserIDFromToken(c.Request.Header.Get("token"), req.OperationID) -// if !ok { -// errMsg := req.OperationID + " " + "GetUserIDFromToken failed " + errInfo + " token:" + c.Request.Header.Get("token") -// log.NewError(req.OperationID, errMsg) -// c.JSON(http.StatusBadRequest, gin.H{"errCode": 500, "errMsg": errMsg}) -// return -// } -// -// log.NewInfo(req.OperationID, "JoinGroup args ", req.String()) -// etcdConn := rpc.GetDefaultConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImGroupName, req.OperationID) -// if etcdConn == nil { -// errMsg := req.OperationID + "getcdv3.GetDefaultConn == nil" -// log.NewError(req.OperationID, errMsg) -// c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": errMsg}) -// return -// } -// client := rpc.NewGroupClient(etcdConn) -// -// RpcResp, err := client.JoinGroup(context.Background(), req) -// if err != nil { -// log.NewError(req.OperationID, "JoinGroup failed ", err.Error(), req.String()) -// c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": "call rpc server failed"}) -// return -// } -// resp := api.CommResp{ErrCode: RpcResp.CommonResp.ErrCode, ErrMsg: RpcResp.CommonResp.ErrMsg} -// log.NewInfo(req.OperationID, "JoinGroup api return", RpcResp.String()) -// c.JSON(http.StatusOK, resp) -//} -// -//// @Summary 当前用户退出群聊 -//// @Description 当前用户退出群聊 -//// @Tags 群组相关 -//// @ID QuitGroup -//// @Accept json -//// @Param token header string true "im token" -//// @Param req body api.QuitGroupReq true "groupID为要退出的群ID" -//// @Produce json -//// @Success 0 {object} api.QuitGroupResp -//// @Failure 500 {object} api.Swagger500Resp "errCode为500 一般为服务器内部错误" -//// @Failure 400 {object} api.Swagger400Resp "errCode为400 一般为参数输入错误, token未带上等" -//// @Router /group/quit_group [post] -//func QuitGroup(c *gin.Context) { -// params := api.QuitGroupReq{} -// if err := c.BindJSON(¶ms); err != nil { -// log.NewError("0", "BindJSON failed ", err.Error()) -// c.JSON(http.StatusBadRequest, gin.H{"errCode": 400, "errMsg": err.Error()}) -// return -// } -// req := &rpc.QuitGroupReq{} -// utils.CopyStructFields(req, ¶ms) -// -// var ok bool -// var errInfo string -// ok, req.OpUserID, errInfo = token_verify.GetUserIDFromToken(c.Request.Header.Get("token"), req.OperationID) -// if !ok { -// errMsg := req.OperationID + " " + "GetUserIDFromToken failed " + errInfo + " token:" + c.Request.Header.Get("token") -// log.NewError(req.OperationID, errMsg) -// c.JSON(http.StatusBadRequest, gin.H{"errCode": 500, "errMsg": errMsg}) -// return -// } -// -// log.NewInfo(req.OperationID, "QuitGroup args ", req.String()) -// -// etcdConn := rpc.GetDefaultConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImGroupName, req.OperationID) -// if etcdConn == nil { -// errMsg := req.OperationID + "getcdv3.GetDefaultConn == nil" -// log.NewError(req.OperationID, errMsg) -// c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": errMsg}) -// return -// } -// client := rpc.NewGroupClient(etcdConn) -// RpcResp, err := client.QuitGroup(context.Background(), req) -// if err != nil { -// log.NewError(req.OperationID, "call quit group rpc server failed,err=%s", err.Error()) -// c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": "call rpc server failed"}) -// return -// } -// resp := api.CommResp{ErrCode: RpcResp.CommonResp.ErrCode, ErrMsg: RpcResp.CommonResp.ErrMsg} -// log.NewInfo(req.OperationID, "QuitGroup api return", RpcResp.String()) -// c.JSON(http.StatusOK, resp) -//} -// -//// @Summary 设置群信息 -//// @Description 设置群信息 -//// @Tags 群组相关 -//// @ID SetGroupInfo -//// @Accept json -//// @Param token header string true "im token" -//// @Param req body api.SetGroupInfoReq true "groupID为要修改的群ID
groupName为新的群名称
notification为群介绍
introduction为群公告
needVerification为加群验证 0为申请需要同意 邀请直接进 1为所有人进群需要验证,除了群主管理员邀请进群 2为直接进群" -//// @Produce json -//// @Success 0 {object} api.SetGroupInfoResp -//// @Failure 500 {object} api.Swagger500Resp "errCode为500 一般为服务器内部错误" -//// @Failure 400 {object} api.Swagger400Resp "errCode为400 一般为参数输入错误, token未带上等" -//// @Router /group/set_group_info [post] -////func SetGroupInfo(c *gin.Context) { -//// params := api.SetGroupInfoReq{} -//// if err := c.BindJSON(¶ms); err != nil { -//// log.NewError("0", "BindJSON failed ", err.Error()) -//// c.JSON(http.StatusBadRequest, gin.H{"errCode": 400, "errMsg": err.Error()}) -//// return -//// } -//// req := &rpc.SetGroupInfoReq{GroupInfoForSet: &sdkws.GroupInfoForSet{}} -//// utils.CopyStructFields(req.GroupInfoForSet, ¶ms) -//// req.OperationID = params.OperationID -//// argsHandle(¶ms, req) -//// var ok bool -//// var errInfo string -//// ok, req.OpUserID, errInfo = token_verify.GetUserIDFromToken(c.Request.Header.Get("token"), req.OperationID) -//// if !ok { -//// errMsg := req.OperationID + " " + "GetUserIDFromToken failed " + errInfo + " token:" + c.Request.Header.Get("token") -//// log.NewError(req.OperationID, errMsg) -//// c.JSON(http.StatusBadRequest, gin.H{"errCode": 500, "errMsg": errMsg}) -//// return -//// } -//// -//// log.NewInfo(req.OperationID, "SetGroupInfo args ", req.String()) -//// -//// etcdConn := getcdv3.GetDefaultConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImGroupName, req.OperationID) -//// if etcdConn == nil { -//// errMsg := req.OperationID + "getcdv3.GetDefaultConn == nil" -//// log.NewError(req.OperationID, errMsg) -//// c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": errMsg}) -//// return -//// } -//// client := rpc.NewGroupClient(etcdConn) -//// RpcResp, err := client.SetGroupInfo(context.Background(), req) -//// if err != nil { -//// log.NewError(req.OperationID, "SetGroupInfo failed ", err.Error(), req.String()) -//// c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": "call rpc server failed"}) -//// return -//// } -//// resp := api.SetGroupInfoResp{CommResp: api.CommResp{ErrCode: RpcResp.CommonResp.ErrCode, ErrMsg: RpcResp.CommonResp.ErrMsg}} -//// c.JSON(http.StatusOK, resp) -//// log.NewInfo(req.OperationID, "SetGroupInfo api return ", resp) -////} -// -//func NewSetGroupInfo(c *gin.Context) { -// common.ApiToRpc(c, &api.SetGroupInfoReq{}, &api.SetGroupInfoResp{}, -// config.Config.RpcRegisterName.OpenImGroupName, rpc.NewGroupClient, "SetGroupInfo") -//} -// -//func argsHandle(params *api.SetGroupInfoReq, req *rpc.SetGroupInfoReq) { -// if params.NeedVerification != nil { -// req.GroupInfoForSet.NeedVerification = &wrappers.Int32Value{Value: *params.NeedVerification} -// log.NewInfo(req.OperationID, "NeedVerification ", req.GroupInfoForSet.NeedVerification) -// } -// if params.LookMemberInfo != nil { -// req.GroupInfoForSet.LookMemberInfo = &wrappers.Int32Value{Value: *params.LookMemberInfo} -// log.NewInfo(req.OperationID, "LookMemberInfo ", req.GroupInfoForSet.LookMemberInfo) -// } -// if params.ApplyMemberFriend != nil { -// req.GroupInfoForSet.ApplyMemberFriend = &wrappers.Int32Value{Value: *params.ApplyMemberFriend} -// log.NewInfo(req.OperationID, "ApplyMemberFriend ", req.GroupInfoForSet.ApplyMemberFriend) -// } -//} -// -//// @Summary 转让群主 -//// @Description 转让群主 -//// @Tags 群组相关 -//// @ID TransferGroupOwner -//// @Accept json -//// @Param token header string true "im token" -//// @Param req body api.TransferGroupOwnerReq true "GroupID为要操作的群ID
oldOwnerUserID为老群主ID
newOwnerUserID为新群主ID" -//// @Produce json -//// @Success 0 {object} api.TransferGroupOwnerResp -//// @Failure 500 {object} api.Swagger500Resp "errCode为500 一般为服务器内部错误" -//// @Failure 400 {object} api.Swagger400Resp "errCode为400 一般为参数输入错误, token未带上等" -//// @Router /group/transfer_group [post] -//func TransferGroupOwner(c *gin.Context) { -// params := api.TransferGroupOwnerReq{} -// if err := c.BindJSON(¶ms); err != nil { -// log.NewError("0", "BindJSON failed ", err.Error()) -// c.JSON(http.StatusBadRequest, gin.H{"errCode": 400, "errMsg": err.Error()}) -// return -// } -// req := &rpc.TransferGroupOwnerReq{} -// utils.CopyStructFields(req, ¶ms) -// -// var ok bool -// var errInfo string -// ok, req.OpUserID, errInfo = token_verify.GetUserIDFromToken(c.Request.Header.Get("token"), req.OperationID) -// if !ok { -// errMsg := req.OperationID + " " + "GetUserIDFromToken failed " + errInfo + " token:" + c.Request.Header.Get("token") -// log.NewError(req.OperationID, errMsg) -// c.JSON(http.StatusBadRequest, gin.H{"errCode": 500, "errMsg": errMsg}) -// return -// } -// -// log.NewInfo(req.OperationID, "TransferGroupOwner args ", req.String()) -// -// etcdConn := rpc.GetDefaultConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImGroupName, req.OperationID) -// if etcdConn == nil { -// errMsg := req.OperationID + "getcdv3.GetDefaultConn == nil" -// log.NewError(req.OperationID, errMsg) -// c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": errMsg}) -// return -// } -// client := rpc.NewGroupClient(etcdConn) -// reply, err := client.TransferGroupOwner(context.Background(), req) -// if err != nil { -// log.NewError(req.OperationID, "TransferGroupOwner failed ", req.String()) -// c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": err.Error()}) -// return -// } -// -// resp := api.TransferGroupOwnerResp{CommResp: api.CommResp{ErrCode: reply.CommonResp.ErrCode, ErrMsg: reply.CommonResp.ErrMsg}} -// log.NewInfo(req.OperationID, "TransferGroupOwner api return ", resp) -// c.JSON(http.StatusOK, resp) -//} -// -//// @Summary 解散群组 -//// @Description 解散群组 -//// @Tags 群组相关 -//// @ID DismissGroup -//// @Accept json -//// @Param token header string true "im token" -//// @Param req body api.DismissGroupReq true "groupID为要解散的群组ID" -//// @Produce json -//// @Success 0 {object} api.DismissGroupResp -//// @Failure 500 {object} api.Swagger500Resp "errCode为500 一般为服务器内部错误" -//// @Failure 400 {object} api.Swagger400Resp "errCode为400 一般为参数输入错误, token未带上等" -//// @Router /group/dismiss_group [post] -//func DismissGroup(c *gin.Context) { -// params := api.DismissGroupReq{} -// if err := c.BindJSON(¶ms); err != nil { -// log.NewError("0", "BindJSON failed ", err.Error()) -// c.JSON(http.StatusBadRequest, gin.H{"errCode": 400, "errMsg": err.Error()}) -// return -// } -// req := &rpc.DismissGroupReq{} -// utils.CopyStructFields(req, ¶ms) -// -// var ok bool -// var errInfo string -// ok, req.OpUserID, errInfo = token_verify.GetUserIDFromToken(c.Request.Header.Get("token"), req.OperationID) -// if !ok { -// errMsg := req.OperationID + " " + "GetUserIDFromToken failed " + errInfo + " token:" + c.Request.Header.Get("token") -// log.NewError(req.OperationID, errMsg) -// c.JSON(http.StatusBadRequest, gin.H{"errCode": 500, "errMsg": errMsg}) -// return -// } -// -// log.NewInfo(req.OperationID, utils.GetSelfFuncName(), " args ", req.String()) -// -// etcdConn := rpc.GetDefaultConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImGroupName, req.OperationID) -// if etcdConn == nil { -// errMsg := req.OperationID + "getcdv3.GetDefaultConn == nil" -// log.NewError(req.OperationID, errMsg) -// c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": errMsg}) -// return -// } -// client := rpc.NewGroupClient(etcdConn) -// reply, err := client.DismissGroup(context.Background(), req) -// if err != nil { -// log.NewError(req.OperationID, utils.GetSelfFuncName(), " failed ", req.String()) -// c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": err.Error()}) -// return -// } -// -// resp := api.DismissGroupResp{CommResp: api.CommResp{ErrCode: reply.CommonResp.ErrCode, ErrMsg: reply.CommonResp.ErrMsg}} -// log.NewInfo(req.OperationID, utils.GetSelfFuncName(), " api return ", resp) -// c.JSON(http.StatusOK, resp) -//} -// -//// @Summary 禁言群成员 -//// @Description 禁言群成员 -//// @Tags 群组相关 -//// @ID MuteGroupMember -//// @Accept json -//// @Param token header string true "im token" -//// @Param req body api.MuteGroupMemberReq true "groupID为群组ID
userID为要禁言的用户ID
mutedSeconds为禁言秒数" -//// @Produce json -//// @Success 0 {object} api.DismissGroupResp -//// @Failure 500 {object} api.Swagger500Resp "errCode为500 一般为服务器内部错误" -//// @Failure 400 {object} api.Swagger400Resp "errCode为400 一般为参数输入错误, token未带上等" -//// @Router /group/mute_group_member [post] -//func MuteGroupMember(c *gin.Context) { -// params := api.MuteGroupMemberReq{} -// if err := c.BindJSON(¶ms); err != nil { -// log.NewError("0", "BindJSON failed ", err.Error()) -// c.JSON(http.StatusBadRequest, gin.H{"errCode": 400, "errMsg": err.Error()}) -// return -// } -// req := &rpc.MuteGroupMemberReq{} -// utils.CopyStructFields(req, ¶ms) -// -// var ok bool -// var errInfo string -// ok, req.OpUserID, errInfo = token_verify.GetUserIDFromToken(c.Request.Header.Get("token"), req.OperationID) -// if !ok { -// errMsg := req.OperationID + " " + "GetUserIDFromToken failed " + errInfo + " token:" + c.Request.Header.Get("token") -// log.NewError(req.OperationID, errMsg) -// c.JSON(http.StatusBadRequest, gin.H{"errCode": 500, "errMsg": errMsg}) -// return -// } -// -// log.NewInfo(req.OperationID, utils.GetSelfFuncName(), " api args ", req.String()) -// -// etcdConn := rpc.GetDefaultConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImGroupName, req.OperationID) -// if etcdConn == nil { -// errMsg := req.OperationID + "getcdv3.GetDefaultConn == nil" -// log.NewError(req.OperationID, errMsg) -// c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": errMsg}) -// return -// } -// client := rpc.NewGroupClient(etcdConn) -// reply, err := client.MuteGroupMember(context.Background(), req) -// if err != nil { -// log.NewError(req.OperationID, utils.GetSelfFuncName(), " failed ", req.String()) -// c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": err.Error()}) -// return -// } -// -// resp := api.MuteGroupMemberResp{CommResp: api.CommResp{ErrCode: reply.CommonResp.ErrCode, ErrMsg: reply.CommonResp.ErrMsg}} -// log.NewInfo(req.OperationID, utils.GetSelfFuncName(), " api return ", resp) -// c.JSON(http.StatusOK, resp) -//} -// -//// @Summary 取消禁言群成员 -//// @Description 取消禁言群成员 -//// @Tags 群组相关 -//// @ID CancelMuteGroupMember -//// @Accept json -//// @Param token header string true "im token" -//// @Param req body api.CancelMuteGroupMemberReq true "groupID为群组ID
userID为要取消禁言的用户ID" -//// @Produce json -//// @Success 0 {object} api.CancelMuteGroupMemberResp -//// @Failure 500 {object} api.Swagger500Resp "errCode为500 一般为服务器内部错误" -//// @Failure 400 {object} api.Swagger400Resp "errCode为400 一般为参数输入错误, token未带上等" -//// @Router /group/cancel_mute_group_member [post] -//func CancelMuteGroupMember(c *gin.Context) { -// nCtx := tracelog.NewCtx(c, utils.GetSelfFuncName()) -// defer log.ShowLog(c) -// -// params := api.CancelMuteGroupMemberReq{} -// if err := c.BindJSON(¶ms); err != nil { -// tracelog.WriteErrorResponse(nCtx, "BindJSON", err) -// return -// } -// tracelog.SetCtxInfo(nCtx, "BindJSON", nil, "params", params) -// req := &rpc.CancelMuteGroupMemberReq{} -// utils.CopyStructFields(req, ¶ms) -// -// //var err error -// //if err, req.OpUserID, _ = token_verify.ParseUserIDFromToken(c.Request.Header.Get("token"), req.OperationID); err != nil { -// // tracelog.WriteErrorResponse(nCtx, "ParseUserIDFromToken", err) -// // return -// //} -// tracelog.SetCtxInfo(nCtx, "ParseUserIDFromToken", nil, "token", c.Request.Header.Get("token"), "OpUserID", req.OpUserID) -// -// etcdConn := rpc.GetDefaultConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImGroupName, req.OperationID) -// -// client := rpc.NewGroupClient(etcdConn) -// reply, err := client.CancelMuteGroupMember(nCtx, req) -// if err != nil { -// tracelog.WriteErrorResponse(nCtx, "CancelMuteGroupMember", err) -// return -// } -// -// tracelog.SetCtxInfo(nCtx, "CancelMuteGroupMember", nil, "req", req.String(), "resp", reply.String()) -// resp := api.CancelMuteGroupMemberResp{CommResp: api.CommResp{ErrCode: reply.CommonResp.ErrCode, ErrMsg: reply.CommonResp.ErrMsg}} -// c.JSON(http.StatusOK, resp) -//} -// -//// @Summary 禁言群组 -//// @Description 禁言群组 -//// @Tags 群组相关 -//// @ID MuteGroup -//// @Accept json -//// @Param token header string true "im token" -//// @Param req body api.MuteGroupReq true "groupID为群组ID" -//// @Produce json -//// @Success 0 {object} api.MuteGroupResp -//// @Failure 500 {object} api.MuteGroupResp "errCode为500 一般为服务器内部错误" -//// @Failure 400 {object} api.MuteGroupResp "errCode为400 一般为参数输入错误, token未带上等" -//// @Router /group/mute_group [post] -//func MuteGroup(c *gin.Context) { -// params := api.MuteGroupReq{} -// if err := c.BindJSON(¶ms); err != nil { -// log.NewError("0", "BindJSON failed ", err.Error()) -// c.JSON(http.StatusBadRequest, gin.H{"errCode": 400, "errMsg": err.Error()}) -// return -// } -// req := &rpc.MuteGroupReq{} -// utils.CopyStructFields(req, ¶ms) -// -// var ok bool -// var errInfo string -// ok, req.OpUserID, errInfo = token_verify.GetUserIDFromToken(c.Request.Header.Get("token"), req.OperationID) -// if !ok { -// errMsg := req.OperationID + " " + "GetUserIDFromToken failed " + errInfo + " token:" + c.Request.Header.Get("token") -// log.NewError(req.OperationID, errMsg) -// c.JSON(http.StatusBadRequest, gin.H{"errCode": 400, "errMsg": errMsg}) -// return -// } -// -// log.NewInfo(req.OperationID, utils.GetSelfFuncName(), " api args ", req.String()) -// -// etcdConn := rpc.GetDefaultConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImGroupName, req.OperationID) -// if etcdConn == nil { -// errMsg := req.OperationID + "getcdv3.GetDefaultConn == nil" -// log.NewError(req.OperationID, errMsg) -// c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": errMsg}) -// return -// } -// client := rpc.NewGroupClient(etcdConn) -// reply, err := client.MuteGroup(context.Background(), req) -// if err != nil { -// log.NewError(req.OperationID, utils.GetSelfFuncName(), " failed ", req.String()) -// c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": err.Error()}) -// return -// } -// -// resp := api.MuteGroupResp{CommResp: api.CommResp{ErrCode: reply.CommonResp.ErrCode, ErrMsg: reply.CommonResp.ErrMsg}} -// log.NewInfo(req.OperationID, utils.GetSelfFuncName(), " api return ", resp) -// c.JSON(http.StatusOK, resp) -//} -// -//// @Summary 取消禁言群组 -//// @Description 取消禁言群组 -//// @Tags 群组相关 -//// @ID CancelMuteGroup -//// @Accept json -//// @Param token header string true "im token" -//// @Param req body api.CancelMuteGroupReq true "groupID为群组ID" -//// @Produce json -//// @Success 0 {object} api.CancelMuteGroupResp -//// @Failure 500 {object} api.Swagger500Resp "errCode为500 一般为服务器内部错误" -//// @Failure 400 {object} api.Swagger400Resp "errCode为400 一般为参数输入错误, token未带上等" -//// @Router /group/cancel_mute_group [post] -//func CancelMuteGroup(c *gin.Context) { -// params := api.CancelMuteGroupReq{} -// if err := c.BindJSON(¶ms); err != nil { -// log.NewError("0", "BindJSON failed ", err.Error()) -// c.JSON(http.StatusBadRequest, gin.H{"errCode": 400, "errMsg": err.Error()}) -// return -// } -// req := &rpc.CancelMuteGroupReq{} -// utils.CopyStructFields(req, ¶ms) -// -// var ok bool -// var errInfo string -// ok, req.OpUserID, errInfo = token_verify.GetUserIDFromToken(c.Request.Header.Get("token"), req.OperationID) -// if !ok { -// errMsg := req.OperationID + " " + "GetUserIDFromToken failed " + errInfo + " token:" + c.Request.Header.Get("token") -// log.NewError(req.OperationID, errMsg) -// c.JSON(http.StatusBadRequest, gin.H{"errCode": 500, "errMsg": errMsg}) -// return -// } -// -// log.NewInfo(req.OperationID, utils.GetSelfFuncName(), " api args ", req.String()) -// -// etcdConn := rpc.GetDefaultConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImGroupName, req.OperationID) -// if etcdConn == nil { -// errMsg := req.OperationID + "getcdv3.GetDefaultConn == nil" -// log.NewError(req.OperationID, errMsg) -// c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": errMsg}) -// return -// } -// client := rpc.NewGroupClient(etcdConn) -// reply, err := client.CancelMuteGroup(context.Background(), req) -// if err != nil { -// log.NewError(req.OperationID, utils.GetSelfFuncName(), " failed ", req.String()) -// c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": err.Error()}) -// return -// } -// -// resp := api.CancelMuteGroupResp{CommResp: api.CommResp{ErrCode: reply.CommonResp.ErrCode, ErrMsg: reply.CommonResp.ErrMsg}} -// log.NewInfo(req.OperationID, utils.GetSelfFuncName(), " api return ", resp) -// c.JSON(http.StatusOK, resp) -//} -// -////SetGroupMemberNickname -// -//func SetGroupMemberNickname(c *gin.Context) { -// params := api.SetGroupMemberNicknameReq{} -// if err := c.BindJSON(¶ms); err != nil { -// log.NewError("0", "BindJSON failed ", err.Error()) -// c.JSON(http.StatusBadRequest, gin.H{"errCode": 400, "errMsg": err.Error()}) -// return -// } -// req := &rpc.SetGroupMemberNicknameReq{} -// utils.CopyStructFields(req, ¶ms) -// -// var ok bool -// var errInfo string -// ok, req.OpUserID, errInfo = token_verify.GetUserIDFromToken(c.Request.Header.Get("token"), req.OperationID) -// if !ok { -// errMsg := req.OperationID + " " + "GetUserIDFromToken failed " + errInfo + " token:" + c.Request.Header.Get("token") -// log.NewError(req.OperationID, errMsg) -// c.JSON(http.StatusBadRequest, gin.H{"errCode": 500, "errMsg": errMsg}) -// return -// } -// -// log.NewInfo(req.OperationID, utils.GetSelfFuncName(), " api args ", req.String()) -// -// etcdConn := rpc.GetDefaultConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImGroupName, req.OperationID) -// if etcdConn == nil { -// errMsg := req.OperationID + "getcdv3.GetDefaultConn == nil" -// log.NewError(req.OperationID, errMsg) -// c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": errMsg}) -// return -// } -// client := rpc.NewGroupClient(etcdConn) -// reply, err := client.SetGroupMemberNickname(context.Background(), req) -// if err != nil { -// log.NewError(req.OperationID, utils.GetSelfFuncName(), " failed ", req.String()) -// c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": err.Error()}) -// return -// } -// -// resp := api.SetGroupMemberNicknameResp{CommResp: api.CommResp{ErrCode: reply.CommonResp.ErrCode, ErrMsg: reply.CommonResp.ErrMsg}} -// log.NewInfo(req.OperationID, utils.GetSelfFuncName(), " api return ", resp) -// c.JSON(http.StatusOK, resp) -//} -// -//// @Summary 修改群成员信息 -//// @Description 修改群成员信息 -//// @Tags 群组相关 -//// @ID SetGroupMemberInfo -//// @Accept json -//// @Param token header string true "im token" -//// @Param req body api.SetGroupMemberInfoReq true "除了operationID, userID, groupID其他参数可选
ex为拓展字段
faceURL为群头像
nickName为群昵称
roleLevel为群员角色,1为普通用户 2为群主 3为管理员" -//// @Produce json -//// @Success 0 {object} api.SetGroupMemberInfoResp -//// @Failure 500 {object} api.Swagger500Resp "errCode为500 一般为服务器内部错误" -//// @Failure 400 {object} api.Swagger400Resp "errCode为400 一般为参数输入错误, token未带上等" -//// @Router /group/set_group_member_info [post] -//func SetGroupMemberInfo(c *gin.Context) { -// var ( -// req api.SetGroupMemberInfoReq -// resp api.SetGroupMemberInfoResp -// ) -// if err := c.BindJSON(&req); err != nil { -// log.NewError("0", "BindJSON failed ", err.Error()) -// c.JSON(http.StatusBadRequest, gin.H{"errCode": 400, "errMsg": err.Error()}) -// return -// } -// log.NewInfo(req.OperationID, utils.GetSelfFuncName(), req) -// var opUserID string -// ok, opUserID, errInfo := token_verify.GetUserIDFromToken(c.Request.Header.Get("token"), req.OperationID) -// if !ok { -// errMsg := req.OperationID + " " + "GetUserIDFromToken failed " + errInfo + " token:" + c.Request.Header.Get("token") -// log.NewError(req.OperationID, errMsg) -// c.JSON(http.StatusBadRequest, gin.H{"errCode": 500, "errMsg": errMsg}) -// return -// } -// -// reqPb := &rpc.SetGroupMemberInfoReq{ -// GroupID: req.GroupID, -// UserID: req.UserID, -// OperationID: req.OperationID, -// OpUserID: opUserID, -// } -// if req.Nickname != nil { -// reqPb.Nickname = &wrappers.StringValue{Value: *req.Nickname} -// } -// if req.FaceURL != nil { -// reqPb.FaceURL = &wrappers.StringValue{Value: *req.FaceURL} -// } -// if req.Ex != nil { -// reqPb.Ex = &wrappers.StringValue{Value: *req.Ex} -// } -// if req.RoleLevel != nil { -// reqPb.RoleLevel = &wrappers.Int32Value{Value: *req.RoleLevel} -// } -// log.NewInfo(req.OperationID, utils.GetSelfFuncName(), " api args ", reqPb.String()) -// etcdConn := rpc.GetDefaultConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImGroupName, req.OperationID) -// if etcdConn == nil { -// errMsg := req.OperationID + "getcdv3.GetDefaultConn == nil" -// log.NewError(req.OperationID, errMsg) -// c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": errMsg}) -// return -// } -// client := rpc.NewGroupClient(etcdConn) -// respPb, err := client.SetGroupMemberInfo(context.Background(), reqPb) -// if err != nil { -// log.NewError(req.OperationID, utils.GetSelfFuncName(), " failed ", err.Error()) -// c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": err.Error()}) -// return -// } -// -// resp.ErrMsg = respPb.CommonResp.ErrMsg -// resp.ErrCode = respPb.CommonResp.ErrCode -// log.NewInfo(req.OperationID, utils.GetSelfFuncName(), " api return ", resp) -// c.JSON(http.StatusOK, resp) -//} -// -//func GetGroupAbstractInfo(c *gin.Context) { -// type GetGroupAbstractInfoReq struct { -// //OperationID string `json:"operationID"` -// GroupID string `json:"groupID"` -// } -// type GetGroupAbstractInfoResp struct { -// GroupMemberNumber int32 `json:"groupMemberNumber"` -// GroupMemberListHash uint64 `json:"groupMemberListHash"` -// } -// //common.ApiToRpc(c, &api.GetGroupAbstractInfoReq{}, &GetGroupAbstractInfoResp{}, config.Config.RpcRegisterName.OpenImGroupName, rpc.NewGroupClient, utils.GetSelfFuncName(), token_verify.ParseUserIDFromToken) -// common.ApiToRpc(c, &api.GetGroupAbstractInfoReq{}, &GetGroupAbstractInfoResp{}, config.Config.RpcRegisterName.OpenImGroupName, rpc.NewGroupClient, utils.GetSelfFuncName()) -// -// //var ( -// //req api.GetGroupAbstractInfoReq -// //resp api.GetGroupAbstractInfoResp -// //) -// //nCtx := tracelog.NewCtx(c, utils.GetSelfFuncName()) -// //if err := c.BindJSON(&req); err != nil { -// // log.NewError("0", "BindJSON failed ", err.Error()) -// // c.JSON(http.StatusBadRequest, gin.H{"errCode": 400, "errMsg": err.Error()}) -// // return -// //} -// //ok, opUserID, errInfo := token_verify.GetUserIDFromToken(c.Request.Header.Get("token"), req.OperationID) -// //if !ok { -// // errMsg := req.OperationID + " " + "GetUserIDFromToken failed " + errInfo + " token:" + c.Request.Header.Get("token") -// // log.NewError(req.OperationID, errMsg) -// // c.JSON(http.StatusBadRequest, gin.H{"errCode": 500, "errMsg": errMsg}) -// // return -// //} -// // -// //etcdConn := getcdv3.GetDefaultConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImGroupName, req.OperationID) -// //if etcdConn == nil { -// // errMsg := req.OperationID + "getcdv3.GetDefaultConn == nil" -// // log.NewError(req.OperationID, errMsg) -// // c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": errMsg}) -// // return -// //} -// //client := rpc.NewGroupClient(etcdConn) -// //md := metadata.Pairs("operationID", req.OperationID, "opUserID", opUserID) -// //respPb, err := client.GetGroupAbstractInfo(metadata.NewOutgoingContext(c, md), &rpc.GetGroupAbstractInfoReq{ -// // GroupID: req.GroupID, -// // OpUserID: opUserID, -// // OperationID: req.OperationID, -// //}) -// //log.NewInfo(req.OperationID, utils.GetSelfFuncName(), " api args ", respPb.String()) -// //if err != nil { -// // //log.NewError(req.OperationID, utils.GetSelfFuncName(), " failed ", err.Error()) -// // //c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": err.Error()}) -// // tracelog.WriteErrorResponse(nCtx, "GetGroupAbstractInfo", utils.Wrap(err, "")) -// // return -// //} -// //resp.GroupMemberNumber = respPb.GroupMemberNumber -// //resp.GroupMemberListHash = respPb.GroupMemberListHash -// //log.NewInfo(req.OperationID, utils.GetSelfFuncName(), " api return ", resp) -// //c.JSON(http.StatusOK, resp) -// //return -//} +func (g *Group) GetJoinedSuperGroupList(c *gin.Context) { + a2r.Call(group.GroupClient.GetJoinedSuperGroupList, g.getGroupClient, c) +} + +func (g *Group) GetSuperGroupsInfo(c *gin.Context) { + a2r.Call(group.GroupClient.GetSuperGroupsInfo, g.getGroupClient, c) +} diff --git a/internal/api/group/group1.go b/internal/api/group/group1.go deleted file mode 100644 index 0640be943..000000000 --- a/internal/api/group/group1.go +++ /dev/null @@ -1,36 +0,0 @@ -package group - -import ( - "OpenIM/internal/a2r" - "OpenIM/pkg/common/config" - "OpenIM/pkg/proto/group" - "context" - "github.com/OpenIMSDK/openKeeper" - "github.com/gin-gonic/gin" -) - -var _ context.Context = nil // 解决goland编辑器bug - -func NewGroup(zk *openKeeper.ZkClient) *Group { - return &Group{zk: zk} -} - -type Group struct { - zk *openKeeper.ZkClient -} - -func (g *Group) getGroupClient() (group.GroupClient, error) { - conn, err := g.zk.GetConn(config.Config.RpcRegisterName.OpenImGroupName) - if err != nil { - return nil, err - } - return group.NewGroupClient(conn), nil -} - -func (g *Group) KickGroupMember(c *gin.Context) { - a2r.Call(group.GroupClient.KickGroupMember, g.getGroupClient, c) -} - -func (g *Group) GetGroupMembersInfo(c *gin.Context) { - a2r.Call(group.GroupClient.GetGroupMembersInfo, g.getGroupClient, c) -} diff --git a/internal/api/group/group1_test.go b/internal/api/group/group1_test.go deleted file mode 100644 index bfa6a8d9d..000000000 --- a/internal/api/group/group1_test.go +++ /dev/null @@ -1,11 +0,0 @@ -package group - -import "testing" - -func TestName(t *testing.T) { - var g Group - - g.KickGroupMember(nil) - g.GetGroupMembersInfo(nil) - -} diff --git a/internal/api/group/super_group.go b/internal/api/group/super_group.go deleted file mode 100644 index 89744452c..000000000 --- a/internal/api/group/super_group.go +++ /dev/null @@ -1,89 +0,0 @@ -package group - -//import ( -// jsonData "OpenIM/internal/utils" -// api "OpenIM/pkg/apistruct" -// "OpenIM/pkg/common/config" -// "OpenIM/pkg/common/log" -// "OpenIM/pkg/common/token_verify" -// "OpenIM/pkg/getcdv3" -// rpc "OpenIM/pkg/proto/group" -// "OpenIM/pkg/utils" -// "context" -// "github.com/gin-gonic/gin" -// "net/http" -// "strings" -//) -// -//func GetJoinedSuperGroupList(c *gin.Context) { -// req := api.GetJoinedSuperGroupListReq{} -// if err := c.BindJSON(&req); err != nil { -// log.NewError("0", "BindJSON failed ", err.Error()) -// c.JSON(http.StatusBadRequest, gin.H{"errCode": 400, "errMsg": err.Error()}) -// return -// } -// log.NewInfo(req.OperationID, utils.GetSelfFuncName(), "req: ", req) -// ok, opUserID, errInfo := token_verify.GetUserIDFromToken(c.Request.Header.Get("token"), req.OperationID) -// if !ok { -// errMsg := req.OperationID + " " + "GetUserIDFromToken failed " + errInfo + " token:" + c.Request.Header.Get("token") -// log.NewError(req.OperationID, errMsg) -// c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": errMsg}) -// return -// } -// reqPb := rpc.GetJoinedSuperGroupListReq{OperationID: req.OperationID, OpUserID: opUserID, UserID: req.FromUserID} -// etcdConn := rpc.GetDefaultConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImGroupName, req.OperationID) -// if etcdConn == nil { -// errMsg := req.OperationID + "getcdv3.GetDefaultConn == nil" -// log.NewError(req.OperationID, errMsg) -// c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": errMsg}) -// return -// } -// client := rpc.NewGroupClient(etcdConn) -// rpcResp, err := client.GetJoinedSuperGroupList(context.Background(), &reqPb) -// if err != nil { -// log.NewError(req.OperationID, "InviteUserToGroup failed ", err.Error(), reqPb.String()) -// c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": err.Error()}) -// return -// } -// GroupListResp := api.GetJoinedSuperGroupListResp{GetJoinedGroupListResp: api.GetJoinedGroupListResp{CommResp: api.CommResp{ErrCode: rpcResp.CommonResp.ErrCode, ErrMsg: rpcResp.CommonResp.ErrMsg}, GroupInfoList: rpcResp.GroupList}} -// GroupListResp.Map = jsonData.JsonDataList(GroupListResp.GroupInfoList) -// log.NewInfo(req.OperationID, "GetJoinedSuperGroupList api return ", GroupListResp) -// c.JSON(http.StatusOK, GroupListResp) -//} -// -//func GetSuperGroupsInfo(c *gin.Context) { -// req := api.GetSuperGroupsInfoReq{} -// if err := c.BindJSON(&req); err != nil { -// log.NewError("0", "BindJSON failed ", err.Error()) -// c.JSON(http.StatusBadRequest, gin.H{"errCode": 400, "errMsg": err.Error()}) -// return -// } -// log.NewInfo(req.OperationID, utils.GetSelfFuncName(), "req: ", req) -// ok, opUserID, errInfo := token_verify.GetUserIDFromToken(c.Request.Header.Get("token"), req.OperationID) -// if !ok { -// errMsg := req.OperationID + " " + "GetUserIDFromToken failed " + errInfo + " token:" + c.Request.Header.Get("token") -// log.NewError(req.OperationID, errMsg) -// c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": errMsg}) -// return -// } -// reqPb := rpc.GetSuperGroupsInfoReq{OperationID: req.OperationID, OpUserID: opUserID, GroupIDList: req.GroupIDList} -// etcdConn := rpc.GetDefaultConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImGroupName, req.OperationID) -// if etcdConn == nil { -// errMsg := req.OperationID + "getcdv3.GetDefaultConn == nil" -// log.NewError(req.OperationID, errMsg) -// c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": errMsg}) -// return -// } -// client := rpc.NewGroupClient(etcdConn) -// rpcResp, err := client.GetSuperGroupsInfo(context.Background(), &reqPb) -// if err != nil { -// log.NewError(req.OperationID, "InviteUserToGroup failed ", err.Error(), reqPb.String()) -// c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": err.Error()}) -// return -// } -// -// resp := api.GetSuperGroupsInfoResp{GetGroupInfoResp: api.GetGroupInfoResp{CommResp: api.CommResp{ErrCode: rpcResp.CommonResp.ErrCode, ErrMsg: rpcResp.CommonResp.ErrMsg}, GroupInfoList: rpcResp.GroupInfoList}} -// resp.Map = jsonData.JsonDataList(resp.GroupInfoList) -// log.NewInfo(req.OperationID, "GetGroupsInfo api return ", resp) -// c.JSON(http.StatusOK, resp) -//} diff --git a/internal/api/route.go b/internal/api/route.go index 101007080..6deb54601 100644 --- a/internal/api/route.go +++ b/internal/api/route.go @@ -81,8 +81,8 @@ func NewGinRouter() *gin.Engine { c.Set("opUserID", userID) c.Next() }) + g := group.NewGroup(nil) { - g := group.NewGroup(nil) groupRouterGroup.POST("/create_group", g.NewCreateGroup) //1 groupRouterGroup.POST("/set_group_info", g.NewSetGroupInfo) //1 groupRouterGroup.POST("/join_group", g.JoinGroup) //1 @@ -93,25 +93,23 @@ func NewGinRouter() *gin.Engine { groupRouterGroup.POST("/get_user_req_group_applicationList", g.GetUserReqGroupApplicationList) groupRouterGroup.POST("/get_groups_info", g.GetGroupsInfo) //1 groupRouterGroup.POST("/kick_group", g.KickGroupMember) //1 - // groupRouterGroup.POST("/get_group_member_list", g.FindGroupMemberAll) //no use - groupRouterGroup.POST("/get_group_all_member_list", g.GetGroupAllMemberList) //1 - groupRouterGroup.POST("/get_group_members_info", g.GetGroupMembersInfo) //1 - groupRouterGroup.POST("/invite_user_to_group", g.InviteUserToGroup) //1 + //groupRouterGroup.POST("/get_group_all_member_list", g.GetGroupAllMemberList) //1 + groupRouterGroup.POST("/get_group_members_info", g.GetGroupMembersInfo) //1 + groupRouterGroup.POST("/invite_user_to_group", g.InviteUserToGroup) //1 groupRouterGroup.POST("/get_joined_group_list", g.GetJoinedGroupList) groupRouterGroup.POST("/dismiss_group", g.DismissGroup) // groupRouterGroup.POST("/mute_group_member", g.MuteGroupMember) groupRouterGroup.POST("/cancel_mute_group_member", g.CancelMuteGroupMember) //MuteGroup groupRouterGroup.POST("/mute_group", g.MuteGroup) groupRouterGroup.POST("/cancel_mute_group", g.CancelMuteGroup) - groupRouterGroup.POST("/set_group_member_nickname", g.SetGroupMemberNickname) + //groupRouterGroup.POST("/set_group_member_nickname", g.SetGroupMemberNickname) groupRouterGroup.POST("/set_group_member_info", g.SetGroupMemberInfo) groupRouterGroup.POST("/get_group_abstract_info", g.GetGroupAbstractInfo) - //groupRouterGroup.POST("/get_group_all_member_list_by_split", g.GetGroupAllMemberListBySplit) } superGroupRouterGroup := r.Group("/super_group") { - superGroupRouterGroup.POST("/get_joined_group_list", group.GetJoinedSuperGroupList) - superGroupRouterGroup.POST("/get_groups_info", group.GetSuperGroupsInfo) + superGroupRouterGroup.POST("/get_joined_group_list", g.GetJoinedSuperGroupList) + superGroupRouterGroup.POST("/get_groups_info", g.GetSuperGroupsInfo) } ////certificate authRouterGroup := r.Group("/auth") diff --git a/internal/api2rpc/api.go b/internal/api2rpc/api.go deleted file mode 100644 index 2e6ee02e5..000000000 --- a/internal/api2rpc/api.go +++ /dev/null @@ -1,99 +0,0 @@ -package api2rpc - -import ( - "OpenIM/pkg/common/constant" - "OpenIM/pkg/common/tracelog" - "context" - "fmt" - "github.com/gin-gonic/gin" - "google.golang.org/grpc/status" - "net/http" - "strings" -) - -//func ApiToRpc(c *gin.Context, apiReq, apiResp interface{}, rpcName string, rpcClientFunc interface{}, rpcFuncName string) { -// if rpcName == "" { -// rpcName = utils2.GetFuncName(1) -// } -// logFuncName := fmt.Sprintf("[ApiToRpc: %s]%s", utils2.GetFuncName(1), rpcFuncName) -// ctx := tracelog.NewCtx(c, rpcFuncName) -// defer log.ShowLog(ctx) -// if err := c.BindJSON(apiReq); err != nil { -// WriteErrorResponse(ctx, "BindJSON", err) -// return -// } -// tracelog.SetCtxInfo(ctx, logFuncName, nil, "apiReq", apiReq) -// etcdConn, err := rpcFn.GetConn(ctx, rpcName) -// if err != nil { -// WriteErrorResponse(ctx, "GetConn", err) -// return -// } -// rpcClient := reflect.ValueOf(rpcClientFunc).Call([]reflect.Value{ -// reflect.ValueOf(etcdConn), -// })[0].MethodByName(rpcFuncName) // rpcClient func -// rpcReqPtr := reflect.New(rpcClient.Type().In(1).Elem()) // *req -// CopyAny(apiReq, rpcReqPtr.Interface()) -// tracelog.SetCtxInfo(ctx, logFuncName, nil, "opUserID", c.GetString("opUserID"), "callRpcReq", rpcString(rpcReqPtr.Elem().Interface())) -// respArr := rpcClient.Call([]reflect.Value{ -// reflect.ValueOf(context.Context(c)), // context.Context (ctx operationID. opUserID) -// rpcReqPtr, // rpcClient apiReq -// }) // respArr => (apiResp, error) -// if !respArr[1].IsNil() { // rpcClient err != nil -// err := respArr[1].Interface().(error) -// WriteErrorResponse(ctx, rpcFuncName, err, "callRpcResp", "error") -// return -// } -// rpcResp := respArr[0].Elem() -// tracelog.SetCtxInfo(ctx, rpcFuncName, nil, "callRpcResp", rpcString(rpcResp.Interface())) -// if apiResp != nil { -// CopyAny(rpcResp.Interface(), apiResp) -// } -// SetSuccess(ctx, rpcFuncName, apiResp) -//} - -func rpcString(v interface{}) string { - if s, ok := v.(interface{ String() string }); ok { - return s.String() - } - return fmt.Sprintf("%+v", v) -} - -type baseResp struct { - ErrCode int32 `json:"errCode"` - ErrMsg string `json:"errMsg"` - ErrDtl string `json:"errDtl"` - Data interface{} `json:"data"` -} - -func WriteErrorResponse(ctx context.Context, funcName string, err error, args ...interface{}) { - tracelog.SetCtxInfo(ctx, funcName, err, args) - e := tracelog.Unwrap(err) - switch t := e.(type) { - case *constant.ErrInfo: - ctx.Value(tracelog.TraceLogKey).(*tracelog.ApiInfo).GinCtx.JSON(http.StatusOK, baseResp{ErrCode: t.ErrCode, ErrMsg: t.ErrMsg, ErrDtl: t.DetailErrMsg}) - //ctx.Value(TraceLogKey).(*ApiInfo).GinCtx.JSON(http.StatusOK, gin.H{"errCode": t.ErrCode, "errMsg": t.ErrMsg, "errDtl": t.DetailErrMsg}) - return - default: - s, ok := status.FromError(e) - if !ok { - ctx.Value(tracelog.TraceLogKey).(*tracelog.ApiInfo).GinCtx.JSON(http.StatusOK, &baseResp{ErrCode: constant.ErrDefaultOther.ErrCode, ErrMsg: err.Error(), ErrDtl: fmt.Sprintf("%+v", err)}) - //ctx.Value(TraceLogKey).(*ApiInfo).GinCtx.JSON(http.StatusOK, gin.H{"errCode": constant.ErrDefaultOther.ErrCode, "errMsg": err.Error(), "errDtl": fmt.Sprintf("%+v", err)}) - return - } - var details []string - if err != e { - details = append(details, fmt.Sprintf("%+v", err)) - } - for _, s := range s.Details() { - details = append(details, fmt.Sprintf("%+v", s)) - } - ctx.Value(tracelog.TraceLogKey).(*tracelog.ApiInfo).GinCtx.JSON(http.StatusOK, &baseResp{ErrCode: int32(s.Code()), ErrMsg: s.Message(), ErrDtl: strings.Join(details, "\n")}) - //ctx.Value(TraceLogKey).(*ApiInfo).GinCtx.JSON(http.StatusOK, gin.H{"errCode": s.Code(), "errMsg": s.Message(), "errDtl": strings.Join(details, "\n")}) - return - } -} - -func SetSuccess(ctx context.Context, funcName string, data interface{}) { - tracelog.SetCtxInfo(ctx, funcName, nil, "data", data) - ctx.Value(tracelog.TraceLogKey).(*tracelog.ApiInfo).GinCtx.JSON(http.StatusOK, gin.H{"errCode": 0, "errMsg": "", "errDtl": "", "data": data}) -} diff --git a/internal/api2rpc/api2rpc.go b/internal/api2rpc/api2rpc.go deleted file mode 100644 index a2589c5fe..000000000 --- a/internal/api2rpc/api2rpc.go +++ /dev/null @@ -1,23 +0,0 @@ -package api2rpc - -import ( - "context" -) - -type Ignore struct{} - -type ApiBind[A, B any] interface { - OperationID() string - OpUserID() (string, error) - Bind(*A) error - Context() context.Context - Resp(resp *B, err error) -} - -type Api interface { - OperationID() string - OpUserID() string - Context() context.Context - Bind(req any) error - Resp(resp any, err error) -} diff --git a/internal/api2rpc/api2rpc_test.go b/internal/api2rpc/api2rpc_test.go deleted file mode 100644 index ec53315b5..000000000 --- a/internal/api2rpc/api2rpc_test.go +++ /dev/null @@ -1 +0,0 @@ -package api2rpc diff --git a/internal/api2rpc/copy.go b/internal/api2rpc/copy.go deleted file mode 100644 index 926646714..000000000 --- a/internal/api2rpc/copy.go +++ /dev/null @@ -1,274 +0,0 @@ -package api2rpc - -import ( - "fmt" - "google.golang.org/protobuf/types/known/wrapperspb" - "reflect" -) - -func CopyAny(from, to interface{}) { - copyAny(reflect.ValueOf(from), reflect.Indirect(reflect.ValueOf(to))) -} - -func copyAny(from, to reflect.Value) { - if !to.CanSet() { - return - } - if isBaseNil(from) { - return - } - if isBaseNil(to) { - to.Set(getBaseZeroValue(to.Type())) - } - btFrom := baseType(from.Type()) - btTo := baseType(to.Type()) - if btTo.Kind() == reflect.Interface || typeEq(btFrom, btTo) { - setBaseValue(from, to) - return - } - if _, ok := wrapType[btTo.String()]; ok { // string -> wrapperspb.StringValue - val := reflect.New(btTo).Elem() - copyAny(from, val.FieldByName("Value")) - setBaseValue(val, to) - return - } - if _, ok := wrapType[btFrom.String()]; ok { // wrapperspb.StringValue -> string - copyAny(baseValue(from).FieldByName("Value"), to) - return - } - if btFrom.Kind() == reflect.Struct && btTo.Kind() == reflect.Struct { - copyStruct(baseValue(from), baseValue(to)) - return - } - if btFrom.Kind() == reflect.Slice && btTo.Kind() == reflect.Slice { - copySlice(baseValue(from), baseValue(to)) - return - } - if btFrom.Kind() == reflect.Map && btTo.Kind() == reflect.Map { - copyMap(baseValue(from), baseValue(to)) - return - } - if btTo.Kind() == reflect.String { - if isBaseNil(to) { - to.Set(getBaseZeroValue(baseType(to.Type()))) - } - setBaseValue(reflect.ValueOf(toString(from)), to) - return - } - if toNumber(from, to) { - return - } - -} - -func setBaseValue(from, to reflect.Value) { - if isBaseNil(from) { - return - } - var l int - t := to.Type() - for t.Kind() == reflect.Ptr { - l++ - t = t.Elem() - } - v := baseValue(from) - for i := 0; i < l; i++ { - t := reflect.New(v.Type()) - t.Elem().Set(v) - v = t - } - to.Set(v) -} - -func getBaseZeroValue(t reflect.Type) reflect.Value { - var l int - for t.Kind() == reflect.Ptr { - l++ - t = t.Elem() - } - v := reflect.New(t) - if l == 0 { - v = v.Elem() - } else { - for i := 1; i < l; i++ { - t := reflect.New(v.Type()) - t.Elem().Set(v) - v = t - } - } - r := reflect.New(v.Type()).Elem() - r.Set(v) - return r -} - -func isBaseNil(v reflect.Value) bool { - for { - switch v.Kind() { - case reflect.Ptr: - v = v.Elem() - case reflect.Invalid: - return true - default: - return isNil(v) - } - } -} - -func baseType(t reflect.Type) reflect.Type { - for t.Kind() == reflect.Ptr { - t = t.Elem() - } - return t -} - -func typeEq(t1, t2 reflect.Type) bool { - return t1.String() == t2.String() -} - -func isNil(value reflect.Value) bool { - switch value.Kind() { - case reflect.Chan, reflect.Func, reflect.Map, reflect.Pointer, reflect.UnsafePointer, reflect.Interface, reflect.Slice: - return value.IsNil() - } - return false -} - -func baseValue(value reflect.Value) reflect.Value { - for value.Kind() == reflect.Ptr { - value = value.Elem() - } - return value -} - -func copyStruct(from, to reflect.Value) { - toType := to.Type() - fromType := from.Type() - n := to.NumField() - for i := 0; i < n; i++ { - toFieldType := toType.Field(i) - if _, found := fromType.FieldByName(toFieldType.Name); !found { - continue - } - copyAny(from.FieldByName(toFieldType.Name), to.Field(i)) - } -} - -func copySlice(from, to reflect.Value) { - size := from.Len() - temp := reflect.MakeSlice(to.Type(), 0, size) - elemTo := to.Type().Elem() - for i := 0; i < size; i++ { - var itemTo reflect.Value - if item := from.Index(i); isBaseNil(item) { - itemTo = reflect.Zero(elemTo) - } else { - itemTo = getBaseZeroValue(elemTo) - copyAny(from.Index(i), itemTo) - } - temp = reflect.Append(temp, itemTo) - } - to.Set(temp) -} - -func copyMap(from, to reflect.Value) { - to.Set(reflect.MakeMap(to.Type())) - toTypeKey := to.Type().Key() - toTypeVal := to.Type().Elem() - for r := from.MapRange(); r.Next(); { - key := getBaseZeroValue(toTypeKey) - copyAny(r.Key(), key) - var val reflect.Value - fVal := r.Value() - if isBaseNil(fVal) { - val = reflect.Zero(toTypeVal) - } else { - val = getBaseZeroValue(toTypeVal) - copyAny(fVal, val) - } - to.SetMapIndex(key, val) - } -} - -func toString(value reflect.Value) string { - if value.Kind() == reflect.Slice { - switch value.Type().String() { - case "[]uint8": // []byte -> []uint8 - return string(value.Interface().([]uint8)) - case "[]int32": // []rune -> []int32 - return string(value.Interface().([]int32)) - } - } - return fmt.Sprint(value.Interface()) -} - -func toNumber(from, to reflect.Value) bool { - initTo := func() { - if isBaseNil(to) { - to.Set(getBaseZeroValue(to.Type())) - } - } - switch baseValue(from).Kind() { - case reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64: - switch baseValue(to).Kind() { - case reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64: - initTo() - baseValue(to).SetInt(baseValue(from).Int()) - return true - case reflect.Uint, reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64: - initTo() - baseValue(to).SetUint(uint64(baseValue(from).Int())) - return true - case reflect.Float64, reflect.Float32: - initTo() - baseValue(to).SetFloat(float64(baseValue(from).Int())) - return true - } - case reflect.Uint, reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64: - switch baseValue(to).Kind() { - case reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64: - initTo() - baseValue(to).SetInt(int64(baseValue(from).Uint())) - return true - case reflect.Uint, reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64: - initTo() - baseValue(to).SetInt(int64(baseValue(from).Uint())) - return true - case reflect.Float64, reflect.Float32: - initTo() - baseValue(to).SetFloat(float64(baseValue(from).Uint())) - return true - } - case reflect.Float64, reflect.Float32: - switch baseValue(to).Kind() { - case reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64: - initTo() - baseValue(to).SetInt(int64(baseValue(from).Float())) - return true - case reflect.Uint, reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64: - initTo() - baseValue(to).SetUint(uint64(baseValue(from).Float())) - return true - case reflect.Float64, reflect.Float32: - initTo() - baseValue(to).SetFloat(baseValue(from).Float()) - return true - } - } - return false -} - -func typeName(v interface{}) string { - return reflect.TypeOf(v).String() -} - -var wrapType = map[string]struct{}{ - typeName(wrapperspb.DoubleValue{}): {}, - typeName(wrapperspb.FloatValue{}): {}, - typeName(wrapperspb.Int64Value{}): {}, - typeName(wrapperspb.UInt64Value{}): {}, - typeName(wrapperspb.Int32Value{}): {}, - typeName(wrapperspb.UInt32Value{}): {}, - typeName(wrapperspb.BoolValue{}): {}, - typeName(wrapperspb.StringValue{}): {}, - typeName(wrapperspb.BytesValue{}): {}, -} diff --git a/internal/api2rpc/gin.go b/internal/api2rpc/gin.go deleted file mode 100644 index 3a66ce355..000000000 --- a/internal/api2rpc/gin.go +++ /dev/null @@ -1,98 +0,0 @@ -package api2rpc - -import ( - "context" - "github.com/gin-gonic/gin" -) - -//func KickGroupMember(c *gin.Context) { -// // 默认 全部自动 -// //var api ApiBind[apistruct.KickGroupMemberReq, apistruct.KickGroupMemberResp] = NewGin[apistruct.KickGroupMemberReq, apistruct.KickGroupMemberResp](c) -// var api ApiBind[apistruct.KickGroupMemberReq, apistruct.KickGroupMemberResp] = nil -// var client func(conn *grpc.ClientConn) group.GroupClient = nil -// var rpcFn func(ctx context.Context, in *group.KickGroupMemberReq, opts ...grpc.CallOption) (*group.KickGroupMemberResp, error) = nil -// //NewRpc(api, client, rpcFn).Name("group").Call() -// NewRpc(api, client, rpcFn).Name("group").Call() -// -// // 可以自定义编辑请求和响应 -// //a := NewRpc(NewGin[apistruct.KickGroupMemberReq, apistruct.KickGroupMemberResp](c), "", group.NewGroupClient, group.GroupClient.KickGroupMember) -// //a.Before(func(apiReq *apistruct.KickGroupMemberReq, rpcReq *group.KickGroupMemberReq, bind func() error) error { -// // return bind() -// //}).After(func(rpcResp *group.KickGroupMemberResp, apiResp *apistruct.KickGroupMemberResp, bind func() error) error { -// // return bind() -// //}).Execute() -//} -// - -func NewGin[A, B any](c *gin.Context) ApiBind[A, B] { - return &ginApiBind[A, B]{ - c: c, - } -} - -type ginApiBind[A, B any] struct { - c *gin.Context -} - -func (g *ginApiBind[A, B]) OperationID() string { - return g.c.GetHeader("operationID") -} - -func (g *ginApiBind[A, B]) OpUserID() (string, error) { - return "", nil -} - -func (g *ginApiBind[A, B]) Bind(a *A) error { - return g.c.BindJSON(a) -} - -func (g *ginApiBind[A, B]) Resp(resp *B, err error) { - if err == nil { - g.Write(resp) - } else { - g.Error(err) - } -} - -func (g *ginApiBind[A, B]) Error(err error) { - //TODO implement me -} - -func (g *ginApiBind[A, B]) Write(b *B) { - //TODO implement me -} - -func (g *ginApiBind[A, B]) Context() context.Context { - return g.c -} - -func NewGin1(c *gin.Context) Api { - return &ginApi{ - c: c, - } -} - -type ginApi struct { - c *gin.Context -} - -func (g *ginApi) OperationID() string { - return g.c.GetHeader("operationID") -} - -func (g *ginApi) OpUserID() string { - return g.c.MustGet("opUserID").(string) -} - -func (g *ginApi) Context() context.Context { - return g.c -} - -func (g *ginApi) Bind(req any) error { - return g.c.BindJSON(req) -} - -func (g *ginApi) Resp(resp any, err error) { - //TODO implement me - panic("implement me") -} diff --git a/internal/api2rpc/new1.go b/internal/api2rpc/new1.go deleted file mode 100644 index 7f5d1a0b8..000000000 --- a/internal/api2rpc/new1.go +++ /dev/null @@ -1,49 +0,0 @@ -package api2rpc - -import ( - "context" - "github.com/gin-gonic/gin" - "google.golang.org/grpc" -) - -type FUNC[E, C, D any] func(client E, ctx context.Context, req *C, options ...grpc.CallOption) (*D, error) - -// Call1 TEST -func Call1[A, B, C, D, E any]( - apiReq *A, - apiResp *B, - rpc FUNC[E, C, D], - //client func() (E, error), - c *gin.Context, - before func(apiReq *A, rpcReq *C, bind func() error) error, - after func(rpcResp *D, apiResp *B, bind func() error) error, -) { - -} - -func Call2[C, D, E any]( - rpc func(client E, ctx context.Context, req *C, options ...grpc.CallOption) (*D, error), - client func() (E, error), - c *gin.Context, -) { - -} - -func Call3[C, D, E any]( - rpc func(client E, ctx context.Context, req *C, options ...grpc.CallOption) (*D, error), - //client func() (E, error), - c *gin.Context, -) { - -} - -func Call4[C, D, E any]( - rpc func(client E, ctx context.Context, req *C, options ...grpc.CallOption) (*D, error), - c *gin.Context, -) { - -} - -func Call10[A, B, C, D, E any](apiReq A, apiResp B, client func() (E, error), call func(client E, rpcReq C) (D, error)) { - -} diff --git a/internal/api2rpc/rpc.go b/internal/api2rpc/rpc.go deleted file mode 100644 index 58a95e3c4..000000000 --- a/internal/api2rpc/rpc.go +++ /dev/null @@ -1,114 +0,0 @@ -package api2rpc - -import ( - "context" - "google.golang.org/grpc" - "reflect" -) - -var nameMap = map[string]string{} - -func getName[T any]() string { - var t T - return reflect.TypeOf(&t).Elem().Name() -} - -// NewRpc A: apiReq B: apiResp C: rpcReq D: rpcResp Z: rpcClient (group.GroupClient) -func NewRpc[A, B any, C, D any, Z any](bind ApiBind[A, B], client func(conn *grpc.ClientConn) Z, rpc func(client Z, ctx context.Context, req *C, options ...grpc.CallOption) (*D, error)) *RpcXXXX[A, B, C, D, Z] { - return &RpcXXXX[A, B, C, D, Z]{ - bind: bind, - client: client, - rpc: rpc, - } -} - -type RpcXXXX[A, B any, C, D any, Z any] struct { - bind ApiBind[A, B] - name string - client func(conn *grpc.ClientConn) Z - rpc func(client Z, ctx context.Context, req *C, options ...grpc.CallOption) (*D, error) - before func(apiReq *A, rpcReq *C, bind func() error) error - after func(rpcResp *D, apiResp *B, bind func() error) error -} - -func (a *RpcXXXX[A, B, C, D, Z]) Name(name string) *RpcXXXX[A, B, C, D, Z] { - a.name = name - return a -} - -func (a *RpcXXXX[A, B, C, D, Z]) Before(fn func(apiReq *A, rpcReq *C, bind func() error) error) *RpcXXXX[A, B, C, D, Z] { - a.before = fn - return a -} - -func (a *RpcXXXX[A, B, C, D, Z]) After(fn func(rpcResp *D, apiResp *B, bind func() error) error) *RpcXXXX[A, B, C, D, Z] { - a.after = fn - return a -} - -func (a *RpcXXXX[A, B, C, D, Z]) defaultCopyReq(apiReq *A, rpcReq *C) error { - CopyAny(apiReq, rpcReq) - return nil -} - -func (a *RpcXXXX[A, B, C, D, Z]) defaultCopyResp(rpcResp *D, apiResp *B) error { - CopyAny(rpcResp, apiResp) - return nil -} - -func (a *RpcXXXX[A, B, C, D, Z]) getZtype() string { - return "" -} - -func (a *RpcXXXX[A, B, C, D, Z]) GetGrpcConn() (*grpc.ClientConn, error) { - if a.name == "" { - a.name = nameMap[getName[Z]()] - } - // todo 获取连接 - - return nil, nil // todo -} - -func (a *RpcXXXX[A, B, C, D, Z]) execute() (*B, error) { - var apiReq A - if err := a.bind.Bind(&apiReq); err != nil { - return nil, err - } - opID := a.bind.OperationID() - userID, err := a.bind.OpUserID() - if err != nil { - return nil, err - } - _, _ = opID, userID - var rpcReq C - if a.before == nil { - err = a.defaultCopyReq(&apiReq, &rpcReq) - } else { - err = a.before(&apiReq, &rpcReq, func() error { return a.defaultCopyReq(&apiReq, &rpcReq) }) - } - if err != nil { - return nil, err - } - conn, err := a.GetGrpcConn() - if err != nil { - return nil, err - } - rpcResp, err := a.rpc(a.client(conn), a.bind.Context(), &rpcReq) - if err != nil { - return nil, err - } - var apiResp B - if a.after == nil { - err = a.defaultCopyResp(rpcResp, &apiResp) - } else { - err = a.after(rpcResp, &apiResp, func() error { return a.defaultCopyResp(rpcResp, &apiResp) }) - } - if err != nil { - return nil, err - } - return &apiResp, nil -} - -func (a *RpcXXXX[A, B, C, D, Z]) Call() { - a.bind.Resp(a.execute()) -} diff --git a/internal/api2rpc/rpc1.go b/internal/api2rpc/rpc1.go deleted file mode 100644 index d1ee6448a..000000000 --- a/internal/api2rpc/rpc1.go +++ /dev/null @@ -1,104 +0,0 @@ -package api2rpc - -import ( - "OpenIM/pkg/errs" - "context" - "github.com/gin-gonic/gin" - "google.golang.org/grpc" -) - -type rpcFunc[E, C, D any] func(client E, ctx context.Context, req *C, options ...grpc.CallOption) (*D, error) - -func New[A, B, C, D, E any](apiReq *A, apiResp *B, rpc func(client E, ctx context.Context, req *C, options ...grpc.CallOption) (*D, error)) RpcCall[A, B, C, D, E] { - return &rpcCall[A, B, C, D, E]{ - apiReq: apiReq, - apiResp: apiResp, - rpcFn: rpc, - } -} - -type rpcCall[A, B, C, D any, E any] struct { - apiReq *A - apiResp *B - rpcFn func(client E, ctx context.Context, req *C, options ...grpc.CallOption) (*D, error) - before func(apiReq *A, rpcReq *C, bind func() error) error - after func(rpcResp *D, apiResp *B, bind func() error) error -} - -func (r *rpcCall[A, B, C, D, E]) Before(fn func(apiReq *A, rpcReq *C, bind func() error) error) RpcCall[A, B, C, D, E] { - r.before = fn - return r -} - -func (r *rpcCall[A, B, C, D, E]) After(fn func(rpcResp *D, apiResp *B, bind func() error) error) RpcCall[A, B, C, D, E] { - r.after = fn - return r -} - -func (r *rpcCall[A, B, C, D, E]) Call(c *gin.Context, client func() (E, error)) { - var resp baseResp - err := r.call(c, client) - if err == nil { - resp.Data = r.apiResp - } else { - cerr, ok := err.(errs.Coderr) - if ok { - resp.ErrCode = int32(cerr.Code()) - resp.ErrMsg = cerr.Msg() - resp.ErrDtl = cerr.Detail() - } else { - resp.ErrCode = 10000 - resp.ErrMsg = err.Error() - } - } -} - -func (r *rpcCall[A, B, C, D, E]) defaultCopyReq(rpcReq *C) error { - if r.apiReq != nil { - CopyAny(r.apiReq, rpcReq) - } - return nil -} - -func (r *rpcCall[A, B, C, D, E]) defaultCopyResp(rpcResp *D) error { - if r.apiResp != nil { - CopyAny(rpcResp, r.apiResp) - } - return nil -} - -func (r *rpcCall[A, B, C, D, E]) call(c *gin.Context, client func() (E, error)) error { - if err := c.BindJSON(r.apiReq); err != nil { - return err - } - var err error - var rpcReq C - if r.before == nil { - err = r.defaultCopyReq(&rpcReq) - } else { - err = r.before(r.apiReq, &rpcReq, func() error { return r.defaultCopyReq(&rpcReq) }) - } - if err != nil { - return err - } - cli, err := client() - if err != nil { - return err - } - rpcResp, err := r.rpcFn(cli, c, &rpcReq) - if err != nil { - return err - } - var apiResp B - if r.after == nil { - return r.defaultCopyResp(rpcResp) - } else { - return r.after(rpcResp, &apiResp, func() error { return r.defaultCopyResp(rpcResp) }) - } -} - -type RpcCall[A, B, C, D, E any] interface { - Before(fn func(apiReq *A, rpcReq *C, bind func() error) error) RpcCall[A, B, C, D, E] - After(fn func(rpcResp *D, apiResp *B, bind func() error) error) RpcCall[A, B, C, D, E] - Call(c *gin.Context, client func() (E, error)) -} From cae6c53b01902e96fff5ba75bf329ee87c3dc51c Mon Sep 17 00:00:00 2001 From: withchao <993506633@qq.com> Date: Mon, 27 Feb 2023 18:21:41 +0800 Subject: [PATCH 07/10] api resp --- internal/a2r/api2rpc.go | 32 +++++++++++++------------------- internal/apiresp/resp.go | 18 ++++++++++++++++++ 2 files changed, 31 insertions(+), 19 deletions(-) create mode 100644 internal/apiresp/resp.go diff --git a/internal/a2r/api2rpc.go b/internal/a2r/api2rpc.go index b78c644cb..92df6161b 100644 --- a/internal/a2r/api2rpc.go +++ b/internal/a2r/api2rpc.go @@ -1,49 +1,43 @@ package a2r import ( + "OpenIM/internal/apiresp" + "OpenIM/pkg/common/constant" "context" "github.com/gin-gonic/gin" "google.golang.org/grpc" + "net/http" ) -//// Call TEST -//func Call2[A, B, C, D, E any]( -// apiReq *A, -// apiResp *B, -// rpc func(client E, ctx context.Context, req C, options ...grpc.CallOption) (D, error), -// client func() (E, error), -// c *gin.Context, -// before func(apiReq *A, rpcReq *C, bind func() error) error, -// after func(rpcResp *D, apiResp *B, bind func() error) error, -//) { -// -//} - func Call[A, B, C any]( rpc func(client C, ctx context.Context, req *A, options ...grpc.CallOption) (*B, error), client func() (C, error), c *gin.Context, ) { + var resp *apiresp.ApiResponse + defer func() { + c.JSON(http.StatusOK, resp) + }() var req A if err := c.BindJSON(&req); err != nil { - // todo 参数错误 + resp = apiresp.Error(constant.ErrArgs.Wrap(err.Error())) // 参数错误 return } if check, ok := any(&req).(interface{ Check() error }); ok { if err := check.Check(); err != nil { - // todo 参数校验失败 + resp = apiresp.Error(constant.ErrArgs.Wrap(err.Error())) // 参数校验失败 return } } cli, err := client() if err != nil { - // todo 获取rpc连接失败 + resp = apiresp.Error(constant.ErrInternalServer.Wrap(err.Error())) // 参数校验失败 return } - resp, err := rpc(cli, c, &req) + data, err := rpc(cli, c, &req) if err != nil { - // todo rpc请求失败 + resp = apiresp.Error(err) // 参数校验失败 return } - _ = resp + resp = apiresp.Success(data) // 成功 } diff --git a/internal/apiresp/resp.go b/internal/apiresp/resp.go new file mode 100644 index 000000000..1ee9d3c76 --- /dev/null +++ b/internal/apiresp/resp.go @@ -0,0 +1,18 @@ +package apiresp + +type ApiResponse struct { + ErrCode int `json:"errCode"` + ErrMsg string `json:"errMsg"` + ErrDlt string `json:"errDlt"` + Data any `json:"data"` +} + +func Success(data any) *ApiResponse { + return &ApiResponse{ + Data: data, + } +} + +func Error(err error) *ApiResponse { + return &ApiResponse{} +} From e30e391756e391fb63cd35eada79595334779c84 Mon Sep 17 00:00:00 2001 From: withchao <993506633@qq.com> Date: Mon, 27 Feb 2023 18:47:11 +0800 Subject: [PATCH 08/10] gen group pb json no omitempty --- pkg/proto/group/group.pb.go | 11679 +++++++++++++++++++++++++++++++--- 1 file changed, 10811 insertions(+), 868 deletions(-) diff --git a/pkg/proto/group/group.pb.go b/pkg/proto/group/group.pb.go index e2af83719..35018c077 100644 --- a/pkg/proto/group/group.pb.go +++ b/pkg/proto/group/group.pb.go @@ -1,17 +1,20 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. +// Code generated by protoc-gen-gogo. DO NOT EDIT. // source: group/group.proto -package group // import "OpenIM/pkg/proto/group" - -import proto "github.com/golang/protobuf/proto" -import fmt "fmt" -import math "math" -import sdkws "OpenIM/pkg/proto/sdkws" -import wrapperspb "google.golang.org/protobuf/types/known/wrapperspb" +package group import ( - context "golang.org/x/net/context" + sdkws "OpenIM/pkg/proto/sdkws" + context "context" + fmt "fmt" + proto "github.com/gogo/protobuf/proto" grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" + wrapperspb "google.golang.org/protobuf/types/known/wrapperspb" + io "io" + math "math" + math_bits "math/bits" ) // Reference imports to suppress errors if they are not otherwise used. @@ -23,35 +26,41 @@ var _ = math.Inf // is compatible with the proto package it is being compiled against. // A compilation error at this line likely means your copy of the // proto package needs to be updated. -const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package +const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package type CreateGroupReq struct { - InitMembers []string `protobuf:"bytes,1,rep,name=initMembers" json:"initMembers,omitempty"` - GroupInfo *sdkws.GroupInfo `protobuf:"bytes,2,opt,name=groupInfo" json:"groupInfo,omitempty"` - AdminUserIDs []string `protobuf:"bytes,3,rep,name=adminUserIDs" json:"adminUserIDs,omitempty"` - OwnerUserID string `protobuf:"bytes,4,opt,name=ownerUserID" json:"ownerUserID,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` + InitMembers []string `protobuf:"bytes,1,rep,name=initMembers,proto3" json:"initMembers"` + GroupInfo *sdkws.GroupInfo `protobuf:"bytes,2,opt,name=groupInfo,proto3" json:"groupInfo"` + AdminUserIDs []string `protobuf:"bytes,3,rep,name=adminUserIDs,proto3" json:"adminUserIDs"` + OwnerUserID string `protobuf:"bytes,4,opt,name=ownerUserID,proto3" json:"ownerUserID"` } func (m *CreateGroupReq) Reset() { *m = CreateGroupReq{} } func (m *CreateGroupReq) String() string { return proto.CompactTextString(m) } func (*CreateGroupReq) ProtoMessage() {} func (*CreateGroupReq) Descriptor() ([]byte, []int) { - return fileDescriptor_group_a9155eb4f624bfe9, []int{0} + return fileDescriptor_6e2b031859d3bcfd, []int{0} } func (m *CreateGroupReq) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_CreateGroupReq.Unmarshal(m, b) + return m.Unmarshal(b) } func (m *CreateGroupReq) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_CreateGroupReq.Marshal(b, m, deterministic) + if deterministic { + return xxx_messageInfo_CreateGroupReq.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } } -func (dst *CreateGroupReq) XXX_Merge(src proto.Message) { - xxx_messageInfo_CreateGroupReq.Merge(dst, src) +func (m *CreateGroupReq) XXX_Merge(src proto.Message) { + xxx_messageInfo_CreateGroupReq.Merge(m, src) } func (m *CreateGroupReq) XXX_Size() int { - return xxx_messageInfo_CreateGroupReq.Size(m) + return m.Size() } func (m *CreateGroupReq) XXX_DiscardUnknown() { xxx_messageInfo_CreateGroupReq.DiscardUnknown(m) @@ -88,29 +97,35 @@ func (m *CreateGroupReq) GetOwnerUserID() string { } type CreateGroupResp struct { - GroupInfo *sdkws.GroupInfo `protobuf:"bytes,1,opt,name=groupInfo" json:"groupInfo,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` + GroupInfo *sdkws.GroupInfo `protobuf:"bytes,1,opt,name=groupInfo,proto3" json:"groupInfo"` } func (m *CreateGroupResp) Reset() { *m = CreateGroupResp{} } func (m *CreateGroupResp) String() string { return proto.CompactTextString(m) } func (*CreateGroupResp) ProtoMessage() {} func (*CreateGroupResp) Descriptor() ([]byte, []int) { - return fileDescriptor_group_a9155eb4f624bfe9, []int{1} + return fileDescriptor_6e2b031859d3bcfd, []int{1} } func (m *CreateGroupResp) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_CreateGroupResp.Unmarshal(m, b) + return m.Unmarshal(b) } func (m *CreateGroupResp) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_CreateGroupResp.Marshal(b, m, deterministic) + if deterministic { + return xxx_messageInfo_CreateGroupResp.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } } -func (dst *CreateGroupResp) XXX_Merge(src proto.Message) { - xxx_messageInfo_CreateGroupResp.Merge(dst, src) +func (m *CreateGroupResp) XXX_Merge(src proto.Message) { + xxx_messageInfo_CreateGroupResp.Merge(m, src) } func (m *CreateGroupResp) XXX_Size() int { - return xxx_messageInfo_CreateGroupResp.Size(m) + return m.Size() } func (m *CreateGroupResp) XXX_DiscardUnknown() { xxx_messageInfo_CreateGroupResp.DiscardUnknown(m) @@ -126,29 +141,35 @@ func (m *CreateGroupResp) GetGroupInfo() *sdkws.GroupInfo { } type GetGroupsInfoReq struct { - GroupIDs []string `protobuf:"bytes,1,rep,name=groupIDs" json:"groupIDs,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` + GroupIDs []string `protobuf:"bytes,1,rep,name=groupIDs,proto3" json:"groupIDs"` } func (m *GetGroupsInfoReq) Reset() { *m = GetGroupsInfoReq{} } func (m *GetGroupsInfoReq) String() string { return proto.CompactTextString(m) } func (*GetGroupsInfoReq) ProtoMessage() {} func (*GetGroupsInfoReq) Descriptor() ([]byte, []int) { - return fileDescriptor_group_a9155eb4f624bfe9, []int{2} + return fileDescriptor_6e2b031859d3bcfd, []int{2} } func (m *GetGroupsInfoReq) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_GetGroupsInfoReq.Unmarshal(m, b) + return m.Unmarshal(b) } func (m *GetGroupsInfoReq) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_GetGroupsInfoReq.Marshal(b, m, deterministic) + if deterministic { + return xxx_messageInfo_GetGroupsInfoReq.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } } -func (dst *GetGroupsInfoReq) XXX_Merge(src proto.Message) { - xxx_messageInfo_GetGroupsInfoReq.Merge(dst, src) +func (m *GetGroupsInfoReq) XXX_Merge(src proto.Message) { + xxx_messageInfo_GetGroupsInfoReq.Merge(m, src) } func (m *GetGroupsInfoReq) XXX_Size() int { - return xxx_messageInfo_GetGroupsInfoReq.Size(m) + return m.Size() } func (m *GetGroupsInfoReq) XXX_DiscardUnknown() { xxx_messageInfo_GetGroupsInfoReq.DiscardUnknown(m) @@ -164,29 +185,35 @@ func (m *GetGroupsInfoReq) GetGroupIDs() []string { } type GetGroupsInfoResp struct { - GroupInfos []*sdkws.GroupInfo `protobuf:"bytes,1,rep,name=groupInfos" json:"groupInfos,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` + GroupInfos []*sdkws.GroupInfo `protobuf:"bytes,1,rep,name=groupInfos,proto3" json:"groupInfos"` } func (m *GetGroupsInfoResp) Reset() { *m = GetGroupsInfoResp{} } func (m *GetGroupsInfoResp) String() string { return proto.CompactTextString(m) } func (*GetGroupsInfoResp) ProtoMessage() {} func (*GetGroupsInfoResp) Descriptor() ([]byte, []int) { - return fileDescriptor_group_a9155eb4f624bfe9, []int{3} + return fileDescriptor_6e2b031859d3bcfd, []int{3} } func (m *GetGroupsInfoResp) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_GetGroupsInfoResp.Unmarshal(m, b) + return m.Unmarshal(b) } func (m *GetGroupsInfoResp) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_GetGroupsInfoResp.Marshal(b, m, deterministic) + if deterministic { + return xxx_messageInfo_GetGroupsInfoResp.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } } -func (dst *GetGroupsInfoResp) XXX_Merge(src proto.Message) { - xxx_messageInfo_GetGroupsInfoResp.Merge(dst, src) +func (m *GetGroupsInfoResp) XXX_Merge(src proto.Message) { + xxx_messageInfo_GetGroupsInfoResp.Merge(m, src) } func (m *GetGroupsInfoResp) XXX_Size() int { - return xxx_messageInfo_GetGroupsInfoResp.Size(m) + return m.Size() } func (m *GetGroupsInfoResp) XXX_DiscardUnknown() { xxx_messageInfo_GetGroupsInfoResp.DiscardUnknown(m) @@ -202,29 +229,35 @@ func (m *GetGroupsInfoResp) GetGroupInfos() []*sdkws.GroupInfo { } type SetGroupInfoReq struct { - GroupInfoForSet *sdkws.GroupInfoForSet `protobuf:"bytes,1,opt,name=groupInfoForSet" json:"groupInfoForSet,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` + GroupInfoForSet *sdkws.GroupInfoForSet `protobuf:"bytes,1,opt,name=groupInfoForSet,proto3" json:"groupInfoForSet"` } func (m *SetGroupInfoReq) Reset() { *m = SetGroupInfoReq{} } func (m *SetGroupInfoReq) String() string { return proto.CompactTextString(m) } func (*SetGroupInfoReq) ProtoMessage() {} func (*SetGroupInfoReq) Descriptor() ([]byte, []int) { - return fileDescriptor_group_a9155eb4f624bfe9, []int{4} + return fileDescriptor_6e2b031859d3bcfd, []int{4} } func (m *SetGroupInfoReq) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_SetGroupInfoReq.Unmarshal(m, b) + return m.Unmarshal(b) } func (m *SetGroupInfoReq) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_SetGroupInfoReq.Marshal(b, m, deterministic) + if deterministic { + return xxx_messageInfo_SetGroupInfoReq.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } } -func (dst *SetGroupInfoReq) XXX_Merge(src proto.Message) { - xxx_messageInfo_SetGroupInfoReq.Merge(dst, src) +func (m *SetGroupInfoReq) XXX_Merge(src proto.Message) { + xxx_messageInfo_SetGroupInfoReq.Merge(m, src) } func (m *SetGroupInfoReq) XXX_Size() int { - return xxx_messageInfo_SetGroupInfoReq.Size(m) + return m.Size() } func (m *SetGroupInfoReq) XXX_DiscardUnknown() { xxx_messageInfo_SetGroupInfoReq.DiscardUnknown(m) @@ -240,28 +273,34 @@ func (m *SetGroupInfoReq) GetGroupInfoForSet() *sdkws.GroupInfoForSet { } type SetGroupInfoResp struct { - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` } func (m *SetGroupInfoResp) Reset() { *m = SetGroupInfoResp{} } func (m *SetGroupInfoResp) String() string { return proto.CompactTextString(m) } func (*SetGroupInfoResp) ProtoMessage() {} func (*SetGroupInfoResp) Descriptor() ([]byte, []int) { - return fileDescriptor_group_a9155eb4f624bfe9, []int{5} + return fileDescriptor_6e2b031859d3bcfd, []int{5} } func (m *SetGroupInfoResp) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_SetGroupInfoResp.Unmarshal(m, b) + return m.Unmarshal(b) } func (m *SetGroupInfoResp) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_SetGroupInfoResp.Marshal(b, m, deterministic) + if deterministic { + return xxx_messageInfo_SetGroupInfoResp.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } } -func (dst *SetGroupInfoResp) XXX_Merge(src proto.Message) { - xxx_messageInfo_SetGroupInfoResp.Merge(dst, src) +func (m *SetGroupInfoResp) XXX_Merge(src proto.Message) { + xxx_messageInfo_SetGroupInfoResp.Merge(m, src) } func (m *SetGroupInfoResp) XXX_Size() int { - return xxx_messageInfo_SetGroupInfoResp.Size(m) + return m.Size() } func (m *SetGroupInfoResp) XXX_DiscardUnknown() { xxx_messageInfo_SetGroupInfoResp.DiscardUnknown(m) @@ -270,30 +309,36 @@ func (m *SetGroupInfoResp) XXX_DiscardUnknown() { var xxx_messageInfo_SetGroupInfoResp proto.InternalMessageInfo type GetGroupApplicationListReq struct { - Pagination *sdkws.RequestPagination `protobuf:"bytes,1,opt,name=pagination" json:"pagination,omitempty"` - FromUserID string `protobuf:"bytes,2,opt,name=fromUserID" json:"fromUserID,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` + Pagination *sdkws.RequestPagination `protobuf:"bytes,1,opt,name=pagination,proto3" json:"pagination"` + FromUserID string `protobuf:"bytes,2,opt,name=fromUserID,proto3" json:"fromUserID"` } func (m *GetGroupApplicationListReq) Reset() { *m = GetGroupApplicationListReq{} } func (m *GetGroupApplicationListReq) String() string { return proto.CompactTextString(m) } func (*GetGroupApplicationListReq) ProtoMessage() {} func (*GetGroupApplicationListReq) Descriptor() ([]byte, []int) { - return fileDescriptor_group_a9155eb4f624bfe9, []int{6} + return fileDescriptor_6e2b031859d3bcfd, []int{6} } func (m *GetGroupApplicationListReq) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_GetGroupApplicationListReq.Unmarshal(m, b) + return m.Unmarshal(b) } func (m *GetGroupApplicationListReq) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_GetGroupApplicationListReq.Marshal(b, m, deterministic) + if deterministic { + return xxx_messageInfo_GetGroupApplicationListReq.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } } -func (dst *GetGroupApplicationListReq) XXX_Merge(src proto.Message) { - xxx_messageInfo_GetGroupApplicationListReq.Merge(dst, src) +func (m *GetGroupApplicationListReq) XXX_Merge(src proto.Message) { + xxx_messageInfo_GetGroupApplicationListReq.Merge(m, src) } func (m *GetGroupApplicationListReq) XXX_Size() int { - return xxx_messageInfo_GetGroupApplicationListReq.Size(m) + return m.Size() } func (m *GetGroupApplicationListReq) XXX_DiscardUnknown() { xxx_messageInfo_GetGroupApplicationListReq.DiscardUnknown(m) @@ -316,30 +361,36 @@ func (m *GetGroupApplicationListReq) GetFromUserID() string { } type GetGroupApplicationListResp struct { - Total uint32 `protobuf:"varint,1,opt,name=total" json:"total,omitempty"` - GroupRequests []*sdkws.GroupRequest `protobuf:"bytes,2,rep,name=groupRequests" json:"groupRequests,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` + Total uint32 `protobuf:"varint,1,opt,name=total,proto3" json:"total"` + GroupRequests []*sdkws.GroupRequest `protobuf:"bytes,2,rep,name=groupRequests,proto3" json:"groupRequests"` } func (m *GetGroupApplicationListResp) Reset() { *m = GetGroupApplicationListResp{} } func (m *GetGroupApplicationListResp) String() string { return proto.CompactTextString(m) } func (*GetGroupApplicationListResp) ProtoMessage() {} func (*GetGroupApplicationListResp) Descriptor() ([]byte, []int) { - return fileDescriptor_group_a9155eb4f624bfe9, []int{7} + return fileDescriptor_6e2b031859d3bcfd, []int{7} } func (m *GetGroupApplicationListResp) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_GetGroupApplicationListResp.Unmarshal(m, b) + return m.Unmarshal(b) } func (m *GetGroupApplicationListResp) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_GetGroupApplicationListResp.Marshal(b, m, deterministic) + if deterministic { + return xxx_messageInfo_GetGroupApplicationListResp.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } } -func (dst *GetGroupApplicationListResp) XXX_Merge(src proto.Message) { - xxx_messageInfo_GetGroupApplicationListResp.Merge(dst, src) +func (m *GetGroupApplicationListResp) XXX_Merge(src proto.Message) { + xxx_messageInfo_GetGroupApplicationListResp.Merge(m, src) } func (m *GetGroupApplicationListResp) XXX_Size() int { - return xxx_messageInfo_GetGroupApplicationListResp.Size(m) + return m.Size() } func (m *GetGroupApplicationListResp) XXX_DiscardUnknown() { xxx_messageInfo_GetGroupApplicationListResp.DiscardUnknown(m) @@ -362,30 +413,36 @@ func (m *GetGroupApplicationListResp) GetGroupRequests() []*sdkws.GroupRequest { } type GetUserReqApplicationListReq struct { - Pagination *sdkws.RequestPagination `protobuf:"bytes,1,opt,name=pagination" json:"pagination,omitempty"` - UserID string `protobuf:"bytes,2,opt,name=userID" json:"userID,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` + Pagination *sdkws.RequestPagination `protobuf:"bytes,1,opt,name=pagination,proto3" json:"pagination"` + UserID string `protobuf:"bytes,2,opt,name=userID,proto3" json:"userID"` } func (m *GetUserReqApplicationListReq) Reset() { *m = GetUserReqApplicationListReq{} } func (m *GetUserReqApplicationListReq) String() string { return proto.CompactTextString(m) } func (*GetUserReqApplicationListReq) ProtoMessage() {} func (*GetUserReqApplicationListReq) Descriptor() ([]byte, []int) { - return fileDescriptor_group_a9155eb4f624bfe9, []int{8} + return fileDescriptor_6e2b031859d3bcfd, []int{8} } func (m *GetUserReqApplicationListReq) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_GetUserReqApplicationListReq.Unmarshal(m, b) + return m.Unmarshal(b) } func (m *GetUserReqApplicationListReq) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_GetUserReqApplicationListReq.Marshal(b, m, deterministic) + if deterministic { + return xxx_messageInfo_GetUserReqApplicationListReq.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } } -func (dst *GetUserReqApplicationListReq) XXX_Merge(src proto.Message) { - xxx_messageInfo_GetUserReqApplicationListReq.Merge(dst, src) +func (m *GetUserReqApplicationListReq) XXX_Merge(src proto.Message) { + xxx_messageInfo_GetUserReqApplicationListReq.Merge(m, src) } func (m *GetUserReqApplicationListReq) XXX_Size() int { - return xxx_messageInfo_GetUserReqApplicationListReq.Size(m) + return m.Size() } func (m *GetUserReqApplicationListReq) XXX_DiscardUnknown() { xxx_messageInfo_GetUserReqApplicationListReq.DiscardUnknown(m) @@ -408,30 +465,36 @@ func (m *GetUserReqApplicationListReq) GetUserID() string { } type GetUserReqApplicationListResp struct { - Total uint32 `protobuf:"varint,1,opt,name=total" json:"total,omitempty"` - GroupRequests []*sdkws.GroupRequest `protobuf:"bytes,2,rep,name=groupRequests" json:"groupRequests,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` + Total uint32 `protobuf:"varint,1,opt,name=total,proto3" json:"total"` + GroupRequests []*sdkws.GroupRequest `protobuf:"bytes,2,rep,name=groupRequests,proto3" json:"groupRequests"` } func (m *GetUserReqApplicationListResp) Reset() { *m = GetUserReqApplicationListResp{} } func (m *GetUserReqApplicationListResp) String() string { return proto.CompactTextString(m) } func (*GetUserReqApplicationListResp) ProtoMessage() {} func (*GetUserReqApplicationListResp) Descriptor() ([]byte, []int) { - return fileDescriptor_group_a9155eb4f624bfe9, []int{9} + return fileDescriptor_6e2b031859d3bcfd, []int{9} } func (m *GetUserReqApplicationListResp) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_GetUserReqApplicationListResp.Unmarshal(m, b) + return m.Unmarshal(b) } func (m *GetUserReqApplicationListResp) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_GetUserReqApplicationListResp.Marshal(b, m, deterministic) + if deterministic { + return xxx_messageInfo_GetUserReqApplicationListResp.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } } -func (dst *GetUserReqApplicationListResp) XXX_Merge(src proto.Message) { - xxx_messageInfo_GetUserReqApplicationListResp.Merge(dst, src) +func (m *GetUserReqApplicationListResp) XXX_Merge(src proto.Message) { + xxx_messageInfo_GetUserReqApplicationListResp.Merge(m, src) } func (m *GetUserReqApplicationListResp) XXX_Size() int { - return xxx_messageInfo_GetUserReqApplicationListResp.Size(m) + return m.Size() } func (m *GetUserReqApplicationListResp) XXX_DiscardUnknown() { xxx_messageInfo_GetUserReqApplicationListResp.DiscardUnknown(m) @@ -454,31 +517,37 @@ func (m *GetUserReqApplicationListResp) GetGroupRequests() []*sdkws.GroupRequest } type TransferGroupOwnerReq struct { - GroupID string `protobuf:"bytes,1,opt,name=groupID" json:"groupID,omitempty"` - OldOwnerUserID string `protobuf:"bytes,2,opt,name=oldOwnerUserID" json:"oldOwnerUserID,omitempty"` - NewOwnerUserID string `protobuf:"bytes,3,opt,name=newOwnerUserID" json:"newOwnerUserID,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` + GroupID string `protobuf:"bytes,1,opt,name=groupID,proto3" json:"groupID"` + OldOwnerUserID string `protobuf:"bytes,2,opt,name=oldOwnerUserID,proto3" json:"oldOwnerUserID"` + NewOwnerUserID string `protobuf:"bytes,3,opt,name=newOwnerUserID,proto3" json:"newOwnerUserID"` } func (m *TransferGroupOwnerReq) Reset() { *m = TransferGroupOwnerReq{} } func (m *TransferGroupOwnerReq) String() string { return proto.CompactTextString(m) } func (*TransferGroupOwnerReq) ProtoMessage() {} func (*TransferGroupOwnerReq) Descriptor() ([]byte, []int) { - return fileDescriptor_group_a9155eb4f624bfe9, []int{10} + return fileDescriptor_6e2b031859d3bcfd, []int{10} } func (m *TransferGroupOwnerReq) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_TransferGroupOwnerReq.Unmarshal(m, b) + return m.Unmarshal(b) } func (m *TransferGroupOwnerReq) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_TransferGroupOwnerReq.Marshal(b, m, deterministic) + if deterministic { + return xxx_messageInfo_TransferGroupOwnerReq.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } } -func (dst *TransferGroupOwnerReq) XXX_Merge(src proto.Message) { - xxx_messageInfo_TransferGroupOwnerReq.Merge(dst, src) +func (m *TransferGroupOwnerReq) XXX_Merge(src proto.Message) { + xxx_messageInfo_TransferGroupOwnerReq.Merge(m, src) } func (m *TransferGroupOwnerReq) XXX_Size() int { - return xxx_messageInfo_TransferGroupOwnerReq.Size(m) + return m.Size() } func (m *TransferGroupOwnerReq) XXX_DiscardUnknown() { xxx_messageInfo_TransferGroupOwnerReq.DiscardUnknown(m) @@ -508,28 +577,34 @@ func (m *TransferGroupOwnerReq) GetNewOwnerUserID() string { } type TransferGroupOwnerResp struct { - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` } func (m *TransferGroupOwnerResp) Reset() { *m = TransferGroupOwnerResp{} } func (m *TransferGroupOwnerResp) String() string { return proto.CompactTextString(m) } func (*TransferGroupOwnerResp) ProtoMessage() {} func (*TransferGroupOwnerResp) Descriptor() ([]byte, []int) { - return fileDescriptor_group_a9155eb4f624bfe9, []int{11} + return fileDescriptor_6e2b031859d3bcfd, []int{11} } func (m *TransferGroupOwnerResp) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_TransferGroupOwnerResp.Unmarshal(m, b) + return m.Unmarshal(b) } func (m *TransferGroupOwnerResp) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_TransferGroupOwnerResp.Marshal(b, m, deterministic) + if deterministic { + return xxx_messageInfo_TransferGroupOwnerResp.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } } -func (dst *TransferGroupOwnerResp) XXX_Merge(src proto.Message) { - xxx_messageInfo_TransferGroupOwnerResp.Merge(dst, src) +func (m *TransferGroupOwnerResp) XXX_Merge(src proto.Message) { + xxx_messageInfo_TransferGroupOwnerResp.Merge(m, src) } func (m *TransferGroupOwnerResp) XXX_Size() int { - return xxx_messageInfo_TransferGroupOwnerResp.Size(m) + return m.Size() } func (m *TransferGroupOwnerResp) XXX_DiscardUnknown() { xxx_messageInfo_TransferGroupOwnerResp.DiscardUnknown(m) @@ -538,32 +613,38 @@ func (m *TransferGroupOwnerResp) XXX_DiscardUnknown() { var xxx_messageInfo_TransferGroupOwnerResp proto.InternalMessageInfo type JoinGroupReq struct { - GroupID string `protobuf:"bytes,1,opt,name=groupID" json:"groupID,omitempty"` - ReqMessage string `protobuf:"bytes,2,opt,name=reqMessage" json:"reqMessage,omitempty"` - JoinSource int32 `protobuf:"varint,3,opt,name=joinSource" json:"joinSource,omitempty"` - InviterUserID string `protobuf:"bytes,4,opt,name=inviterUserID" json:"inviterUserID,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` + GroupID string `protobuf:"bytes,1,opt,name=groupID,proto3" json:"groupID"` + ReqMessage string `protobuf:"bytes,2,opt,name=reqMessage,proto3" json:"reqMessage"` + JoinSource int32 `protobuf:"varint,3,opt,name=joinSource,proto3" json:"joinSource"` + InviterUserID string `protobuf:"bytes,4,opt,name=inviterUserID,proto3" json:"inviterUserID"` } func (m *JoinGroupReq) Reset() { *m = JoinGroupReq{} } func (m *JoinGroupReq) String() string { return proto.CompactTextString(m) } func (*JoinGroupReq) ProtoMessage() {} func (*JoinGroupReq) Descriptor() ([]byte, []int) { - return fileDescriptor_group_a9155eb4f624bfe9, []int{12} + return fileDescriptor_6e2b031859d3bcfd, []int{12} } func (m *JoinGroupReq) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_JoinGroupReq.Unmarshal(m, b) + return m.Unmarshal(b) } func (m *JoinGroupReq) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_JoinGroupReq.Marshal(b, m, deterministic) + if deterministic { + return xxx_messageInfo_JoinGroupReq.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } } -func (dst *JoinGroupReq) XXX_Merge(src proto.Message) { - xxx_messageInfo_JoinGroupReq.Merge(dst, src) +func (m *JoinGroupReq) XXX_Merge(src proto.Message) { + xxx_messageInfo_JoinGroupReq.Merge(m, src) } func (m *JoinGroupReq) XXX_Size() int { - return xxx_messageInfo_JoinGroupReq.Size(m) + return m.Size() } func (m *JoinGroupReq) XXX_DiscardUnknown() { xxx_messageInfo_JoinGroupReq.DiscardUnknown(m) @@ -600,28 +681,34 @@ func (m *JoinGroupReq) GetInviterUserID() string { } type JoinGroupResp struct { - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` } func (m *JoinGroupResp) Reset() { *m = JoinGroupResp{} } func (m *JoinGroupResp) String() string { return proto.CompactTextString(m) } func (*JoinGroupResp) ProtoMessage() {} func (*JoinGroupResp) Descriptor() ([]byte, []int) { - return fileDescriptor_group_a9155eb4f624bfe9, []int{13} + return fileDescriptor_6e2b031859d3bcfd, []int{13} } func (m *JoinGroupResp) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_JoinGroupResp.Unmarshal(m, b) + return m.Unmarshal(b) } func (m *JoinGroupResp) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_JoinGroupResp.Marshal(b, m, deterministic) + if deterministic { + return xxx_messageInfo_JoinGroupResp.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } } -func (dst *JoinGroupResp) XXX_Merge(src proto.Message) { - xxx_messageInfo_JoinGroupResp.Merge(dst, src) +func (m *JoinGroupResp) XXX_Merge(src proto.Message) { + xxx_messageInfo_JoinGroupResp.Merge(m, src) } func (m *JoinGroupResp) XXX_Size() int { - return xxx_messageInfo_JoinGroupResp.Size(m) + return m.Size() } func (m *JoinGroupResp) XXX_DiscardUnknown() { xxx_messageInfo_JoinGroupResp.DiscardUnknown(m) @@ -630,32 +717,38 @@ func (m *JoinGroupResp) XXX_DiscardUnknown() { var xxx_messageInfo_JoinGroupResp proto.InternalMessageInfo type GroupApplicationResponseReq struct { - GroupID string `protobuf:"bytes,1,opt,name=groupID" json:"groupID,omitempty"` - FromUserID string `protobuf:"bytes,2,opt,name=fromUserID" json:"fromUserID,omitempty"` - HandledMsg string `protobuf:"bytes,3,opt,name=handledMsg" json:"handledMsg,omitempty"` - HandleResult int32 `protobuf:"varint,4,opt,name=handleResult" json:"handleResult,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` + GroupID string `protobuf:"bytes,1,opt,name=groupID,proto3" json:"groupID"` + FromUserID string `protobuf:"bytes,2,opt,name=fromUserID,proto3" json:"fromUserID"` + HandledMsg string `protobuf:"bytes,3,opt,name=handledMsg,proto3" json:"handledMsg"` + HandleResult int32 `protobuf:"varint,4,opt,name=handleResult,proto3" json:"handleResult"` } func (m *GroupApplicationResponseReq) Reset() { *m = GroupApplicationResponseReq{} } func (m *GroupApplicationResponseReq) String() string { return proto.CompactTextString(m) } func (*GroupApplicationResponseReq) ProtoMessage() {} func (*GroupApplicationResponseReq) Descriptor() ([]byte, []int) { - return fileDescriptor_group_a9155eb4f624bfe9, []int{14} + return fileDescriptor_6e2b031859d3bcfd, []int{14} } func (m *GroupApplicationResponseReq) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_GroupApplicationResponseReq.Unmarshal(m, b) + return m.Unmarshal(b) } func (m *GroupApplicationResponseReq) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_GroupApplicationResponseReq.Marshal(b, m, deterministic) + if deterministic { + return xxx_messageInfo_GroupApplicationResponseReq.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } } -func (dst *GroupApplicationResponseReq) XXX_Merge(src proto.Message) { - xxx_messageInfo_GroupApplicationResponseReq.Merge(dst, src) +func (m *GroupApplicationResponseReq) XXX_Merge(src proto.Message) { + xxx_messageInfo_GroupApplicationResponseReq.Merge(m, src) } func (m *GroupApplicationResponseReq) XXX_Size() int { - return xxx_messageInfo_GroupApplicationResponseReq.Size(m) + return m.Size() } func (m *GroupApplicationResponseReq) XXX_DiscardUnknown() { xxx_messageInfo_GroupApplicationResponseReq.DiscardUnknown(m) @@ -692,28 +785,34 @@ func (m *GroupApplicationResponseReq) GetHandleResult() int32 { } type GroupApplicationResponseResp struct { - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` } func (m *GroupApplicationResponseResp) Reset() { *m = GroupApplicationResponseResp{} } func (m *GroupApplicationResponseResp) String() string { return proto.CompactTextString(m) } func (*GroupApplicationResponseResp) ProtoMessage() {} func (*GroupApplicationResponseResp) Descriptor() ([]byte, []int) { - return fileDescriptor_group_a9155eb4f624bfe9, []int{15} + return fileDescriptor_6e2b031859d3bcfd, []int{15} } func (m *GroupApplicationResponseResp) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_GroupApplicationResponseResp.Unmarshal(m, b) + return m.Unmarshal(b) } func (m *GroupApplicationResponseResp) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_GroupApplicationResponseResp.Marshal(b, m, deterministic) + if deterministic { + return xxx_messageInfo_GroupApplicationResponseResp.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } } -func (dst *GroupApplicationResponseResp) XXX_Merge(src proto.Message) { - xxx_messageInfo_GroupApplicationResponseResp.Merge(dst, src) +func (m *GroupApplicationResponseResp) XXX_Merge(src proto.Message) { + xxx_messageInfo_GroupApplicationResponseResp.Merge(m, src) } func (m *GroupApplicationResponseResp) XXX_Size() int { - return xxx_messageInfo_GroupApplicationResponseResp.Size(m) + return m.Size() } func (m *GroupApplicationResponseResp) XXX_DiscardUnknown() { xxx_messageInfo_GroupApplicationResponseResp.DiscardUnknown(m) @@ -722,29 +821,35 @@ func (m *GroupApplicationResponseResp) XXX_DiscardUnknown() { var xxx_messageInfo_GroupApplicationResponseResp proto.InternalMessageInfo type QuitGroupReq struct { - GroupID string `protobuf:"bytes,1,opt,name=groupID" json:"groupID,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` + GroupID string `protobuf:"bytes,1,opt,name=groupID,proto3" json:"groupID"` } func (m *QuitGroupReq) Reset() { *m = QuitGroupReq{} } func (m *QuitGroupReq) String() string { return proto.CompactTextString(m) } func (*QuitGroupReq) ProtoMessage() {} func (*QuitGroupReq) Descriptor() ([]byte, []int) { - return fileDescriptor_group_a9155eb4f624bfe9, []int{16} + return fileDescriptor_6e2b031859d3bcfd, []int{16} } func (m *QuitGroupReq) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_QuitGroupReq.Unmarshal(m, b) + return m.Unmarshal(b) } func (m *QuitGroupReq) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_QuitGroupReq.Marshal(b, m, deterministic) + if deterministic { + return xxx_messageInfo_QuitGroupReq.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } } -func (dst *QuitGroupReq) XXX_Merge(src proto.Message) { - xxx_messageInfo_QuitGroupReq.Merge(dst, src) +func (m *QuitGroupReq) XXX_Merge(src proto.Message) { + xxx_messageInfo_QuitGroupReq.Merge(m, src) } func (m *QuitGroupReq) XXX_Size() int { - return xxx_messageInfo_QuitGroupReq.Size(m) + return m.Size() } func (m *QuitGroupReq) XXX_DiscardUnknown() { xxx_messageInfo_QuitGroupReq.DiscardUnknown(m) @@ -760,28 +865,34 @@ func (m *QuitGroupReq) GetGroupID() string { } type QuitGroupResp struct { - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` } func (m *QuitGroupResp) Reset() { *m = QuitGroupResp{} } func (m *QuitGroupResp) String() string { return proto.CompactTextString(m) } func (*QuitGroupResp) ProtoMessage() {} func (*QuitGroupResp) Descriptor() ([]byte, []int) { - return fileDescriptor_group_a9155eb4f624bfe9, []int{17} + return fileDescriptor_6e2b031859d3bcfd, []int{17} } func (m *QuitGroupResp) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_QuitGroupResp.Unmarshal(m, b) + return m.Unmarshal(b) } func (m *QuitGroupResp) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_QuitGroupResp.Marshal(b, m, deterministic) + if deterministic { + return xxx_messageInfo_QuitGroupResp.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } } -func (dst *QuitGroupResp) XXX_Merge(src proto.Message) { - xxx_messageInfo_QuitGroupResp.Merge(dst, src) +func (m *QuitGroupResp) XXX_Merge(src proto.Message) { + xxx_messageInfo_QuitGroupResp.Merge(m, src) } func (m *QuitGroupResp) XXX_Size() int { - return xxx_messageInfo_QuitGroupResp.Size(m) + return m.Size() } func (m *QuitGroupResp) XXX_DiscardUnknown() { xxx_messageInfo_QuitGroupResp.DiscardUnknown(m) @@ -790,31 +901,37 @@ func (m *QuitGroupResp) XXX_DiscardUnknown() { var xxx_messageInfo_QuitGroupResp proto.InternalMessageInfo type GetGroupMemberListReq struct { - Pagination *sdkws.RequestPagination `protobuf:"bytes,1,opt,name=pagination" json:"pagination,omitempty"` - GroupID string `protobuf:"bytes,2,opt,name=groupID" json:"groupID,omitempty"` - Filter int32 `protobuf:"varint,3,opt,name=filter" json:"filter,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` + Pagination *sdkws.RequestPagination `protobuf:"bytes,1,opt,name=pagination,proto3" json:"pagination"` + GroupID string `protobuf:"bytes,2,opt,name=groupID,proto3" json:"groupID"` + Filter int32 `protobuf:"varint,3,opt,name=filter,proto3" json:"filter"` } func (m *GetGroupMemberListReq) Reset() { *m = GetGroupMemberListReq{} } func (m *GetGroupMemberListReq) String() string { return proto.CompactTextString(m) } func (*GetGroupMemberListReq) ProtoMessage() {} func (*GetGroupMemberListReq) Descriptor() ([]byte, []int) { - return fileDescriptor_group_a9155eb4f624bfe9, []int{18} + return fileDescriptor_6e2b031859d3bcfd, []int{18} } func (m *GetGroupMemberListReq) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_GetGroupMemberListReq.Unmarshal(m, b) + return m.Unmarshal(b) } func (m *GetGroupMemberListReq) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_GetGroupMemberListReq.Marshal(b, m, deterministic) + if deterministic { + return xxx_messageInfo_GetGroupMemberListReq.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } } -func (dst *GetGroupMemberListReq) XXX_Merge(src proto.Message) { - xxx_messageInfo_GetGroupMemberListReq.Merge(dst, src) +func (m *GetGroupMemberListReq) XXX_Merge(src proto.Message) { + xxx_messageInfo_GetGroupMemberListReq.Merge(m, src) } func (m *GetGroupMemberListReq) XXX_Size() int { - return xxx_messageInfo_GetGroupMemberListReq.Size(m) + return m.Size() } func (m *GetGroupMemberListReq) XXX_DiscardUnknown() { xxx_messageInfo_GetGroupMemberListReq.DiscardUnknown(m) @@ -844,30 +961,36 @@ func (m *GetGroupMemberListReq) GetFilter() int32 { } type GetGroupMemberListResp struct { - Total uint32 `protobuf:"varint,1,opt,name=total" json:"total,omitempty"` - Members []*sdkws.GroupMemberFullInfo `protobuf:"bytes,2,rep,name=members" json:"members,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` + Total uint32 `protobuf:"varint,1,opt,name=total,proto3" json:"total"` + Members []*sdkws.GroupMemberFullInfo `protobuf:"bytes,2,rep,name=members,proto3" json:"members"` } func (m *GetGroupMemberListResp) Reset() { *m = GetGroupMemberListResp{} } func (m *GetGroupMemberListResp) String() string { return proto.CompactTextString(m) } func (*GetGroupMemberListResp) ProtoMessage() {} func (*GetGroupMemberListResp) Descriptor() ([]byte, []int) { - return fileDescriptor_group_a9155eb4f624bfe9, []int{19} + return fileDescriptor_6e2b031859d3bcfd, []int{19} } func (m *GetGroupMemberListResp) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_GetGroupMemberListResp.Unmarshal(m, b) + return m.Unmarshal(b) } func (m *GetGroupMemberListResp) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_GetGroupMemberListResp.Marshal(b, m, deterministic) + if deterministic { + return xxx_messageInfo_GetGroupMemberListResp.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } } -func (dst *GetGroupMemberListResp) XXX_Merge(src proto.Message) { - xxx_messageInfo_GetGroupMemberListResp.Merge(dst, src) +func (m *GetGroupMemberListResp) XXX_Merge(src proto.Message) { + xxx_messageInfo_GetGroupMemberListResp.Merge(m, src) } func (m *GetGroupMemberListResp) XXX_Size() int { - return xxx_messageInfo_GetGroupMemberListResp.Size(m) + return m.Size() } func (m *GetGroupMemberListResp) XXX_DiscardUnknown() { xxx_messageInfo_GetGroupMemberListResp.DiscardUnknown(m) @@ -890,30 +1013,36 @@ func (m *GetGroupMemberListResp) GetMembers() []*sdkws.GroupMemberFullInfo { } type GetGroupMembersInfoReq struct { - GroupID string `protobuf:"bytes,1,opt,name=groupID" json:"groupID,omitempty"` - Members []string `protobuf:"bytes,2,rep,name=members" json:"members,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` + GroupID string `protobuf:"bytes,1,opt,name=groupID,proto3" json:"groupID"` + Members []string `protobuf:"bytes,2,rep,name=members,proto3" json:"members"` } func (m *GetGroupMembersInfoReq) Reset() { *m = GetGroupMembersInfoReq{} } func (m *GetGroupMembersInfoReq) String() string { return proto.CompactTextString(m) } func (*GetGroupMembersInfoReq) ProtoMessage() {} func (*GetGroupMembersInfoReq) Descriptor() ([]byte, []int) { - return fileDescriptor_group_a9155eb4f624bfe9, []int{20} + return fileDescriptor_6e2b031859d3bcfd, []int{20} } func (m *GetGroupMembersInfoReq) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_GetGroupMembersInfoReq.Unmarshal(m, b) + return m.Unmarshal(b) } func (m *GetGroupMembersInfoReq) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_GetGroupMembersInfoReq.Marshal(b, m, deterministic) + if deterministic { + return xxx_messageInfo_GetGroupMembersInfoReq.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } } -func (dst *GetGroupMembersInfoReq) XXX_Merge(src proto.Message) { - xxx_messageInfo_GetGroupMembersInfoReq.Merge(dst, src) +func (m *GetGroupMembersInfoReq) XXX_Merge(src proto.Message) { + xxx_messageInfo_GetGroupMembersInfoReq.Merge(m, src) } func (m *GetGroupMembersInfoReq) XXX_Size() int { - return xxx_messageInfo_GetGroupMembersInfoReq.Size(m) + return m.Size() } func (m *GetGroupMembersInfoReq) XXX_DiscardUnknown() { xxx_messageInfo_GetGroupMembersInfoReq.DiscardUnknown(m) @@ -936,29 +1065,35 @@ func (m *GetGroupMembersInfoReq) GetMembers() []string { } type GetGroupMembersInfoResp struct { - Members []*sdkws.GroupMemberFullInfo `protobuf:"bytes,1,rep,name=members" json:"members,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` + Members []*sdkws.GroupMemberFullInfo `protobuf:"bytes,1,rep,name=members,proto3" json:"members"` } func (m *GetGroupMembersInfoResp) Reset() { *m = GetGroupMembersInfoResp{} } func (m *GetGroupMembersInfoResp) String() string { return proto.CompactTextString(m) } func (*GetGroupMembersInfoResp) ProtoMessage() {} func (*GetGroupMembersInfoResp) Descriptor() ([]byte, []int) { - return fileDescriptor_group_a9155eb4f624bfe9, []int{21} + return fileDescriptor_6e2b031859d3bcfd, []int{21} } func (m *GetGroupMembersInfoResp) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_GetGroupMembersInfoResp.Unmarshal(m, b) + return m.Unmarshal(b) } func (m *GetGroupMembersInfoResp) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_GetGroupMembersInfoResp.Marshal(b, m, deterministic) + if deterministic { + return xxx_messageInfo_GetGroupMembersInfoResp.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } } -func (dst *GetGroupMembersInfoResp) XXX_Merge(src proto.Message) { - xxx_messageInfo_GetGroupMembersInfoResp.Merge(dst, src) +func (m *GetGroupMembersInfoResp) XXX_Merge(src proto.Message) { + xxx_messageInfo_GetGroupMembersInfoResp.Merge(m, src) } func (m *GetGroupMembersInfoResp) XXX_Size() int { - return xxx_messageInfo_GetGroupMembersInfoResp.Size(m) + return m.Size() } func (m *GetGroupMembersInfoResp) XXX_DiscardUnknown() { xxx_messageInfo_GetGroupMembersInfoResp.DiscardUnknown(m) @@ -974,31 +1109,37 @@ func (m *GetGroupMembersInfoResp) GetMembers() []*sdkws.GroupMemberFullInfo { } type KickGroupMemberReq struct { - GroupID string `protobuf:"bytes,1,opt,name=groupID" json:"groupID,omitempty"` - KickedUserIDs []string `protobuf:"bytes,2,rep,name=kickedUserIDs" json:"kickedUserIDs,omitempty"` - Reason string `protobuf:"bytes,3,opt,name=reason" json:"reason,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` + GroupID string `protobuf:"bytes,1,opt,name=groupID,proto3" json:"groupID"` + KickedUserIDs []string `protobuf:"bytes,2,rep,name=kickedUserIDs,proto3" json:"kickedUserIDs"` + Reason string `protobuf:"bytes,3,opt,name=reason,proto3" json:"reason"` } func (m *KickGroupMemberReq) Reset() { *m = KickGroupMemberReq{} } func (m *KickGroupMemberReq) String() string { return proto.CompactTextString(m) } func (*KickGroupMemberReq) ProtoMessage() {} func (*KickGroupMemberReq) Descriptor() ([]byte, []int) { - return fileDescriptor_group_a9155eb4f624bfe9, []int{22} + return fileDescriptor_6e2b031859d3bcfd, []int{22} } func (m *KickGroupMemberReq) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_KickGroupMemberReq.Unmarshal(m, b) + return m.Unmarshal(b) } func (m *KickGroupMemberReq) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_KickGroupMemberReq.Marshal(b, m, deterministic) + if deterministic { + return xxx_messageInfo_KickGroupMemberReq.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } } -func (dst *KickGroupMemberReq) XXX_Merge(src proto.Message) { - xxx_messageInfo_KickGroupMemberReq.Merge(dst, src) +func (m *KickGroupMemberReq) XXX_Merge(src proto.Message) { + xxx_messageInfo_KickGroupMemberReq.Merge(m, src) } func (m *KickGroupMemberReq) XXX_Size() int { - return xxx_messageInfo_KickGroupMemberReq.Size(m) + return m.Size() } func (m *KickGroupMemberReq) XXX_DiscardUnknown() { xxx_messageInfo_KickGroupMemberReq.DiscardUnknown(m) @@ -1028,28 +1169,34 @@ func (m *KickGroupMemberReq) GetReason() string { } type KickGroupMemberResp struct { - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` } func (m *KickGroupMemberResp) Reset() { *m = KickGroupMemberResp{} } func (m *KickGroupMemberResp) String() string { return proto.CompactTextString(m) } func (*KickGroupMemberResp) ProtoMessage() {} func (*KickGroupMemberResp) Descriptor() ([]byte, []int) { - return fileDescriptor_group_a9155eb4f624bfe9, []int{23} + return fileDescriptor_6e2b031859d3bcfd, []int{23} } func (m *KickGroupMemberResp) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_KickGroupMemberResp.Unmarshal(m, b) + return m.Unmarshal(b) } func (m *KickGroupMemberResp) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_KickGroupMemberResp.Marshal(b, m, deterministic) + if deterministic { + return xxx_messageInfo_KickGroupMemberResp.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } } -func (dst *KickGroupMemberResp) XXX_Merge(src proto.Message) { - xxx_messageInfo_KickGroupMemberResp.Merge(dst, src) +func (m *KickGroupMemberResp) XXX_Merge(src proto.Message) { + xxx_messageInfo_KickGroupMemberResp.Merge(m, src) } func (m *KickGroupMemberResp) XXX_Size() int { - return xxx_messageInfo_KickGroupMemberResp.Size(m) + return m.Size() } func (m *KickGroupMemberResp) XXX_DiscardUnknown() { xxx_messageInfo_KickGroupMemberResp.DiscardUnknown(m) @@ -1058,30 +1205,36 @@ func (m *KickGroupMemberResp) XXX_DiscardUnknown() { var xxx_messageInfo_KickGroupMemberResp proto.InternalMessageInfo type GetJoinedGroupListReq struct { - Pagination *sdkws.RequestPagination `protobuf:"bytes,1,opt,name=pagination" json:"pagination,omitempty"` - FromUserID string `protobuf:"bytes,2,opt,name=fromUserID" json:"fromUserID,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` + Pagination *sdkws.RequestPagination `protobuf:"bytes,1,opt,name=pagination,proto3" json:"pagination"` + FromUserID string `protobuf:"bytes,2,opt,name=fromUserID,proto3" json:"fromUserID"` } func (m *GetJoinedGroupListReq) Reset() { *m = GetJoinedGroupListReq{} } func (m *GetJoinedGroupListReq) String() string { return proto.CompactTextString(m) } func (*GetJoinedGroupListReq) ProtoMessage() {} func (*GetJoinedGroupListReq) Descriptor() ([]byte, []int) { - return fileDescriptor_group_a9155eb4f624bfe9, []int{24} + return fileDescriptor_6e2b031859d3bcfd, []int{24} } func (m *GetJoinedGroupListReq) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_GetJoinedGroupListReq.Unmarshal(m, b) + return m.Unmarshal(b) } func (m *GetJoinedGroupListReq) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_GetJoinedGroupListReq.Marshal(b, m, deterministic) + if deterministic { + return xxx_messageInfo_GetJoinedGroupListReq.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } } -func (dst *GetJoinedGroupListReq) XXX_Merge(src proto.Message) { - xxx_messageInfo_GetJoinedGroupListReq.Merge(dst, src) +func (m *GetJoinedGroupListReq) XXX_Merge(src proto.Message) { + xxx_messageInfo_GetJoinedGroupListReq.Merge(m, src) } func (m *GetJoinedGroupListReq) XXX_Size() int { - return xxx_messageInfo_GetJoinedGroupListReq.Size(m) + return m.Size() } func (m *GetJoinedGroupListReq) XXX_DiscardUnknown() { xxx_messageInfo_GetJoinedGroupListReq.DiscardUnknown(m) @@ -1104,30 +1257,36 @@ func (m *GetJoinedGroupListReq) GetFromUserID() string { } type GetJoinedGroupListResp struct { - Total uint32 `protobuf:"varint,1,opt,name=total" json:"total,omitempty"` - Groups []*sdkws.GroupInfo `protobuf:"bytes,2,rep,name=groups" json:"groups,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` + Total uint32 `protobuf:"varint,1,opt,name=total,proto3" json:"total"` + Groups []*sdkws.GroupInfo `protobuf:"bytes,2,rep,name=groups,proto3" json:"groups"` } func (m *GetJoinedGroupListResp) Reset() { *m = GetJoinedGroupListResp{} } func (m *GetJoinedGroupListResp) String() string { return proto.CompactTextString(m) } func (*GetJoinedGroupListResp) ProtoMessage() {} func (*GetJoinedGroupListResp) Descriptor() ([]byte, []int) { - return fileDescriptor_group_a9155eb4f624bfe9, []int{25} + return fileDescriptor_6e2b031859d3bcfd, []int{25} } func (m *GetJoinedGroupListResp) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_GetJoinedGroupListResp.Unmarshal(m, b) + return m.Unmarshal(b) } func (m *GetJoinedGroupListResp) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_GetJoinedGroupListResp.Marshal(b, m, deterministic) + if deterministic { + return xxx_messageInfo_GetJoinedGroupListResp.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } } -func (dst *GetJoinedGroupListResp) XXX_Merge(src proto.Message) { - xxx_messageInfo_GetJoinedGroupListResp.Merge(dst, src) +func (m *GetJoinedGroupListResp) XXX_Merge(src proto.Message) { + xxx_messageInfo_GetJoinedGroupListResp.Merge(m, src) } func (m *GetJoinedGroupListResp) XXX_Size() int { - return xxx_messageInfo_GetJoinedGroupListResp.Size(m) + return m.Size() } func (m *GetJoinedGroupListResp) XXX_DiscardUnknown() { xxx_messageInfo_GetJoinedGroupListResp.DiscardUnknown(m) @@ -1150,31 +1309,37 @@ func (m *GetJoinedGroupListResp) GetGroups() []*sdkws.GroupInfo { } type InviteUserToGroupReq struct { - GroupID string `protobuf:"bytes,1,opt,name=groupID" json:"groupID,omitempty"` - Reason string `protobuf:"bytes,2,opt,name=reason" json:"reason,omitempty"` - InvitedUserIDs []string `protobuf:"bytes,3,rep,name=invitedUserIDs" json:"invitedUserIDs,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` + GroupID string `protobuf:"bytes,1,opt,name=groupID,proto3" json:"groupID"` + Reason string `protobuf:"bytes,2,opt,name=reason,proto3" json:"reason"` + InvitedUserIDs []string `protobuf:"bytes,3,rep,name=invitedUserIDs,proto3" json:"invitedUserIDs"` } func (m *InviteUserToGroupReq) Reset() { *m = InviteUserToGroupReq{} } func (m *InviteUserToGroupReq) String() string { return proto.CompactTextString(m) } func (*InviteUserToGroupReq) ProtoMessage() {} func (*InviteUserToGroupReq) Descriptor() ([]byte, []int) { - return fileDescriptor_group_a9155eb4f624bfe9, []int{26} + return fileDescriptor_6e2b031859d3bcfd, []int{26} } func (m *InviteUserToGroupReq) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_InviteUserToGroupReq.Unmarshal(m, b) + return m.Unmarshal(b) } func (m *InviteUserToGroupReq) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_InviteUserToGroupReq.Marshal(b, m, deterministic) + if deterministic { + return xxx_messageInfo_InviteUserToGroupReq.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } } -func (dst *InviteUserToGroupReq) XXX_Merge(src proto.Message) { - xxx_messageInfo_InviteUserToGroupReq.Merge(dst, src) +func (m *InviteUserToGroupReq) XXX_Merge(src proto.Message) { + xxx_messageInfo_InviteUserToGroupReq.Merge(m, src) } func (m *InviteUserToGroupReq) XXX_Size() int { - return xxx_messageInfo_InviteUserToGroupReq.Size(m) + return m.Size() } func (m *InviteUserToGroupReq) XXX_DiscardUnknown() { xxx_messageInfo_InviteUserToGroupReq.DiscardUnknown(m) @@ -1204,28 +1369,34 @@ func (m *InviteUserToGroupReq) GetInvitedUserIDs() []string { } type InviteUserToGroupResp struct { - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` } func (m *InviteUserToGroupResp) Reset() { *m = InviteUserToGroupResp{} } func (m *InviteUserToGroupResp) String() string { return proto.CompactTextString(m) } func (*InviteUserToGroupResp) ProtoMessage() {} func (*InviteUserToGroupResp) Descriptor() ([]byte, []int) { - return fileDescriptor_group_a9155eb4f624bfe9, []int{27} + return fileDescriptor_6e2b031859d3bcfd, []int{27} } func (m *InviteUserToGroupResp) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_InviteUserToGroupResp.Unmarshal(m, b) + return m.Unmarshal(b) } func (m *InviteUserToGroupResp) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_InviteUserToGroupResp.Marshal(b, m, deterministic) + if deterministic { + return xxx_messageInfo_InviteUserToGroupResp.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } } -func (dst *InviteUserToGroupResp) XXX_Merge(src proto.Message) { - xxx_messageInfo_InviteUserToGroupResp.Merge(dst, src) +func (m *InviteUserToGroupResp) XXX_Merge(src proto.Message) { + xxx_messageInfo_InviteUserToGroupResp.Merge(m, src) } func (m *InviteUserToGroupResp) XXX_Size() int { - return xxx_messageInfo_InviteUserToGroupResp.Size(m) + return m.Size() } func (m *InviteUserToGroupResp) XXX_DiscardUnknown() { xxx_messageInfo_InviteUserToGroupResp.DiscardUnknown(m) @@ -1234,30 +1405,36 @@ func (m *InviteUserToGroupResp) XXX_DiscardUnknown() { var xxx_messageInfo_InviteUserToGroupResp proto.InternalMessageInfo type GetGroupAllMemberReq struct { - Pagination *sdkws.RequestPagination `protobuf:"bytes,1,opt,name=pagination" json:"pagination,omitempty"` - GroupID string `protobuf:"bytes,2,opt,name=groupID" json:"groupID,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` + Pagination *sdkws.RequestPagination `protobuf:"bytes,1,opt,name=pagination,proto3" json:"pagination"` + GroupID string `protobuf:"bytes,2,opt,name=groupID,proto3" json:"groupID"` } func (m *GetGroupAllMemberReq) Reset() { *m = GetGroupAllMemberReq{} } func (m *GetGroupAllMemberReq) String() string { return proto.CompactTextString(m) } func (*GetGroupAllMemberReq) ProtoMessage() {} func (*GetGroupAllMemberReq) Descriptor() ([]byte, []int) { - return fileDescriptor_group_a9155eb4f624bfe9, []int{28} + return fileDescriptor_6e2b031859d3bcfd, []int{28} } func (m *GetGroupAllMemberReq) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_GetGroupAllMemberReq.Unmarshal(m, b) + return m.Unmarshal(b) } func (m *GetGroupAllMemberReq) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_GetGroupAllMemberReq.Marshal(b, m, deterministic) + if deterministic { + return xxx_messageInfo_GetGroupAllMemberReq.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } } -func (dst *GetGroupAllMemberReq) XXX_Merge(src proto.Message) { - xxx_messageInfo_GetGroupAllMemberReq.Merge(dst, src) +func (m *GetGroupAllMemberReq) XXX_Merge(src proto.Message) { + xxx_messageInfo_GetGroupAllMemberReq.Merge(m, src) } func (m *GetGroupAllMemberReq) XXX_Size() int { - return xxx_messageInfo_GetGroupAllMemberReq.Size(m) + return m.Size() } func (m *GetGroupAllMemberReq) XXX_DiscardUnknown() { xxx_messageInfo_GetGroupAllMemberReq.DiscardUnknown(m) @@ -1280,29 +1457,35 @@ func (m *GetGroupAllMemberReq) GetGroupID() string { } type GetGroupAllMemberResp struct { - Members []*sdkws.GroupMemberFullInfo `protobuf:"bytes,1,rep,name=members" json:"members,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` + Members []*sdkws.GroupMemberFullInfo `protobuf:"bytes,1,rep,name=members,proto3" json:"members"` } func (m *GetGroupAllMemberResp) Reset() { *m = GetGroupAllMemberResp{} } func (m *GetGroupAllMemberResp) String() string { return proto.CompactTextString(m) } func (*GetGroupAllMemberResp) ProtoMessage() {} func (*GetGroupAllMemberResp) Descriptor() ([]byte, []int) { - return fileDescriptor_group_a9155eb4f624bfe9, []int{29} + return fileDescriptor_6e2b031859d3bcfd, []int{29} } func (m *GetGroupAllMemberResp) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_GetGroupAllMemberResp.Unmarshal(m, b) + return m.Unmarshal(b) } func (m *GetGroupAllMemberResp) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_GetGroupAllMemberResp.Marshal(b, m, deterministic) + if deterministic { + return xxx_messageInfo_GetGroupAllMemberResp.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } } -func (dst *GetGroupAllMemberResp) XXX_Merge(src proto.Message) { - xxx_messageInfo_GetGroupAllMemberResp.Merge(dst, src) +func (m *GetGroupAllMemberResp) XXX_Merge(src proto.Message) { + xxx_messageInfo_GetGroupAllMemberResp.Merge(m, src) } func (m *GetGroupAllMemberResp) XXX_Size() int { - return xxx_messageInfo_GetGroupAllMemberResp.Size(m) + return m.Size() } func (m *GetGroupAllMemberResp) XXX_DiscardUnknown() { xxx_messageInfo_GetGroupAllMemberResp.DiscardUnknown(m) @@ -1318,31 +1501,37 @@ func (m *GetGroupAllMemberResp) GetMembers() []*sdkws.GroupMemberFullInfo { } type CMSGroup struct { - GroupInfo *sdkws.GroupInfo `protobuf:"bytes,1,opt,name=groupInfo" json:"groupInfo,omitempty"` - GroupOwnerUserName string `protobuf:"bytes,2,opt,name=groupOwnerUserName" json:"groupOwnerUserName,omitempty"` - GroupOwnerUserID string `protobuf:"bytes,3,opt,name=groupOwnerUserID" json:"groupOwnerUserID,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` + GroupInfo *sdkws.GroupInfo `protobuf:"bytes,1,opt,name=groupInfo,proto3" json:"groupInfo"` + GroupOwnerUserName string `protobuf:"bytes,2,opt,name=groupOwnerUserName,proto3" json:"groupOwnerUserName"` + GroupOwnerUserID string `protobuf:"bytes,3,opt,name=groupOwnerUserID,proto3" json:"groupOwnerUserID"` } func (m *CMSGroup) Reset() { *m = CMSGroup{} } func (m *CMSGroup) String() string { return proto.CompactTextString(m) } func (*CMSGroup) ProtoMessage() {} func (*CMSGroup) Descriptor() ([]byte, []int) { - return fileDescriptor_group_a9155eb4f624bfe9, []int{30} + return fileDescriptor_6e2b031859d3bcfd, []int{30} } func (m *CMSGroup) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_CMSGroup.Unmarshal(m, b) + return m.Unmarshal(b) } func (m *CMSGroup) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_CMSGroup.Marshal(b, m, deterministic) + if deterministic { + return xxx_messageInfo_CMSGroup.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } } -func (dst *CMSGroup) XXX_Merge(src proto.Message) { - xxx_messageInfo_CMSGroup.Merge(dst, src) +func (m *CMSGroup) XXX_Merge(src proto.Message) { + xxx_messageInfo_CMSGroup.Merge(m, src) } func (m *CMSGroup) XXX_Size() int { - return xxx_messageInfo_CMSGroup.Size(m) + return m.Size() } func (m *CMSGroup) XXX_DiscardUnknown() { xxx_messageInfo_CMSGroup.DiscardUnknown(m) @@ -1372,31 +1561,37 @@ func (m *CMSGroup) GetGroupOwnerUserID() string { } type GetGroupsReq struct { - Pagination *sdkws.RequestPagination `protobuf:"bytes,1,opt,name=pagination" json:"pagination,omitempty"` - GroupName string `protobuf:"bytes,2,opt,name=groupName" json:"groupName,omitempty"` - GroupID string `protobuf:"bytes,3,opt,name=groupID" json:"groupID,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` + Pagination *sdkws.RequestPagination `protobuf:"bytes,1,opt,name=pagination,proto3" json:"pagination"` + GroupName string `protobuf:"bytes,2,opt,name=groupName,proto3" json:"groupName"` + GroupID string `protobuf:"bytes,3,opt,name=groupID,proto3" json:"groupID"` } func (m *GetGroupsReq) Reset() { *m = GetGroupsReq{} } func (m *GetGroupsReq) String() string { return proto.CompactTextString(m) } func (*GetGroupsReq) ProtoMessage() {} func (*GetGroupsReq) Descriptor() ([]byte, []int) { - return fileDescriptor_group_a9155eb4f624bfe9, []int{31} + return fileDescriptor_6e2b031859d3bcfd, []int{31} } func (m *GetGroupsReq) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_GetGroupsReq.Unmarshal(m, b) + return m.Unmarshal(b) } func (m *GetGroupsReq) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_GetGroupsReq.Marshal(b, m, deterministic) + if deterministic { + return xxx_messageInfo_GetGroupsReq.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } } -func (dst *GetGroupsReq) XXX_Merge(src proto.Message) { - xxx_messageInfo_GetGroupsReq.Merge(dst, src) +func (m *GetGroupsReq) XXX_Merge(src proto.Message) { + xxx_messageInfo_GetGroupsReq.Merge(m, src) } func (m *GetGroupsReq) XXX_Size() int { - return xxx_messageInfo_GetGroupsReq.Size(m) + return m.Size() } func (m *GetGroupsReq) XXX_DiscardUnknown() { xxx_messageInfo_GetGroupsReq.DiscardUnknown(m) @@ -1426,30 +1621,36 @@ func (m *GetGroupsReq) GetGroupID() string { } type GetGroupsResp struct { - Total uint32 `protobuf:"varint,1,opt,name=total" json:"total,omitempty"` - Groups []*CMSGroup `protobuf:"bytes,2,rep,name=groups" json:"groups,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` + Total uint32 `protobuf:"varint,1,opt,name=total,proto3" json:"total"` + Groups []*CMSGroup `protobuf:"bytes,2,rep,name=groups,proto3" json:"groups"` } func (m *GetGroupsResp) Reset() { *m = GetGroupsResp{} } func (m *GetGroupsResp) String() string { return proto.CompactTextString(m) } func (*GetGroupsResp) ProtoMessage() {} func (*GetGroupsResp) Descriptor() ([]byte, []int) { - return fileDescriptor_group_a9155eb4f624bfe9, []int{32} + return fileDescriptor_6e2b031859d3bcfd, []int{32} } func (m *GetGroupsResp) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_GetGroupsResp.Unmarshal(m, b) + return m.Unmarshal(b) } func (m *GetGroupsResp) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_GetGroupsResp.Marshal(b, m, deterministic) + if deterministic { + return xxx_messageInfo_GetGroupsResp.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } } -func (dst *GetGroupsResp) XXX_Merge(src proto.Message) { - xxx_messageInfo_GetGroupsResp.Merge(dst, src) +func (m *GetGroupsResp) XXX_Merge(src proto.Message) { + xxx_messageInfo_GetGroupsResp.Merge(m, src) } func (m *GetGroupsResp) XXX_Size() int { - return xxx_messageInfo_GetGroupsResp.Size(m) + return m.Size() } func (m *GetGroupsResp) XXX_DiscardUnknown() { xxx_messageInfo_GetGroupsResp.DiscardUnknown(m) @@ -1472,29 +1673,35 @@ func (m *GetGroupsResp) GetGroups() []*CMSGroup { } type GetGroupMemberReq struct { - GroupID string `protobuf:"bytes,1,opt,name=groupID" json:"groupID,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` + GroupID string `protobuf:"bytes,1,opt,name=groupID,proto3" json:"groupID"` } func (m *GetGroupMemberReq) Reset() { *m = GetGroupMemberReq{} } func (m *GetGroupMemberReq) String() string { return proto.CompactTextString(m) } func (*GetGroupMemberReq) ProtoMessage() {} func (*GetGroupMemberReq) Descriptor() ([]byte, []int) { - return fileDescriptor_group_a9155eb4f624bfe9, []int{33} + return fileDescriptor_6e2b031859d3bcfd, []int{33} } func (m *GetGroupMemberReq) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_GetGroupMemberReq.Unmarshal(m, b) + return m.Unmarshal(b) } func (m *GetGroupMemberReq) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_GetGroupMemberReq.Marshal(b, m, deterministic) + if deterministic { + return xxx_messageInfo_GetGroupMemberReq.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } } -func (dst *GetGroupMemberReq) XXX_Merge(src proto.Message) { - xxx_messageInfo_GetGroupMemberReq.Merge(dst, src) +func (m *GetGroupMemberReq) XXX_Merge(src proto.Message) { + xxx_messageInfo_GetGroupMemberReq.Merge(m, src) } func (m *GetGroupMemberReq) XXX_Size() int { - return xxx_messageInfo_GetGroupMemberReq.Size(m) + return m.Size() } func (m *GetGroupMemberReq) XXX_DiscardUnknown() { xxx_messageInfo_GetGroupMemberReq.DiscardUnknown(m) @@ -1510,31 +1717,37 @@ func (m *GetGroupMemberReq) GetGroupID() string { } type GetGroupMembersCMSReq struct { - Pagination *sdkws.RequestPagination `protobuf:"bytes,1,opt,name=pagination" json:"pagination,omitempty"` - GroupID string `protobuf:"bytes,2,opt,name=groupID" json:"groupID,omitempty"` - UserName string `protobuf:"bytes,3,opt,name=userName" json:"userName,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` + Pagination *sdkws.RequestPagination `protobuf:"bytes,1,opt,name=pagination,proto3" json:"pagination"` + GroupID string `protobuf:"bytes,2,opt,name=groupID,proto3" json:"groupID"` + UserName string `protobuf:"bytes,3,opt,name=userName,proto3" json:"userName"` } func (m *GetGroupMembersCMSReq) Reset() { *m = GetGroupMembersCMSReq{} } func (m *GetGroupMembersCMSReq) String() string { return proto.CompactTextString(m) } func (*GetGroupMembersCMSReq) ProtoMessage() {} func (*GetGroupMembersCMSReq) Descriptor() ([]byte, []int) { - return fileDescriptor_group_a9155eb4f624bfe9, []int{34} + return fileDescriptor_6e2b031859d3bcfd, []int{34} } func (m *GetGroupMembersCMSReq) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_GetGroupMembersCMSReq.Unmarshal(m, b) + return m.Unmarshal(b) } func (m *GetGroupMembersCMSReq) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_GetGroupMembersCMSReq.Marshal(b, m, deterministic) + if deterministic { + return xxx_messageInfo_GetGroupMembersCMSReq.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } } -func (dst *GetGroupMembersCMSReq) XXX_Merge(src proto.Message) { - xxx_messageInfo_GetGroupMembersCMSReq.Merge(dst, src) +func (m *GetGroupMembersCMSReq) XXX_Merge(src proto.Message) { + xxx_messageInfo_GetGroupMembersCMSReq.Merge(m, src) } func (m *GetGroupMembersCMSReq) XXX_Size() int { - return xxx_messageInfo_GetGroupMembersCMSReq.Size(m) + return m.Size() } func (m *GetGroupMembersCMSReq) XXX_DiscardUnknown() { xxx_messageInfo_GetGroupMembersCMSReq.DiscardUnknown(m) @@ -1564,30 +1777,36 @@ func (m *GetGroupMembersCMSReq) GetUserName() string { } type GetGroupMembersCMSResp struct { - Total uint32 `protobuf:"varint,1,opt,name=total" json:"total,omitempty"` - Members []*sdkws.GroupMemberFullInfo `protobuf:"bytes,2,rep,name=members" json:"members,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` + Total uint32 `protobuf:"varint,1,opt,name=total,proto3" json:"total"` + Members []*sdkws.GroupMemberFullInfo `protobuf:"bytes,2,rep,name=members,proto3" json:"members"` } func (m *GetGroupMembersCMSResp) Reset() { *m = GetGroupMembersCMSResp{} } func (m *GetGroupMembersCMSResp) String() string { return proto.CompactTextString(m) } func (*GetGroupMembersCMSResp) ProtoMessage() {} func (*GetGroupMembersCMSResp) Descriptor() ([]byte, []int) { - return fileDescriptor_group_a9155eb4f624bfe9, []int{35} + return fileDescriptor_6e2b031859d3bcfd, []int{35} } func (m *GetGroupMembersCMSResp) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_GetGroupMembersCMSResp.Unmarshal(m, b) + return m.Unmarshal(b) } func (m *GetGroupMembersCMSResp) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_GetGroupMembersCMSResp.Marshal(b, m, deterministic) + if deterministic { + return xxx_messageInfo_GetGroupMembersCMSResp.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } } -func (dst *GetGroupMembersCMSResp) XXX_Merge(src proto.Message) { - xxx_messageInfo_GetGroupMembersCMSResp.Merge(dst, src) +func (m *GetGroupMembersCMSResp) XXX_Merge(src proto.Message) { + xxx_messageInfo_GetGroupMembersCMSResp.Merge(m, src) } func (m *GetGroupMembersCMSResp) XXX_Size() int { - return xxx_messageInfo_GetGroupMembersCMSResp.Size(m) + return m.Size() } func (m *GetGroupMembersCMSResp) XXX_DiscardUnknown() { xxx_messageInfo_GetGroupMembersCMSResp.DiscardUnknown(m) @@ -1610,29 +1829,35 @@ func (m *GetGroupMembersCMSResp) GetMembers() []*sdkws.GroupMemberFullInfo { } type DismissGroupReq struct { - GroupID string `protobuf:"bytes,1,opt,name=groupID" json:"groupID,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` + GroupID string `protobuf:"bytes,1,opt,name=groupID,proto3" json:"groupID"` } func (m *DismissGroupReq) Reset() { *m = DismissGroupReq{} } func (m *DismissGroupReq) String() string { return proto.CompactTextString(m) } func (*DismissGroupReq) ProtoMessage() {} func (*DismissGroupReq) Descriptor() ([]byte, []int) { - return fileDescriptor_group_a9155eb4f624bfe9, []int{36} + return fileDescriptor_6e2b031859d3bcfd, []int{36} } func (m *DismissGroupReq) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_DismissGroupReq.Unmarshal(m, b) + return m.Unmarshal(b) } func (m *DismissGroupReq) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_DismissGroupReq.Marshal(b, m, deterministic) + if deterministic { + return xxx_messageInfo_DismissGroupReq.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } } -func (dst *DismissGroupReq) XXX_Merge(src proto.Message) { - xxx_messageInfo_DismissGroupReq.Merge(dst, src) +func (m *DismissGroupReq) XXX_Merge(src proto.Message) { + xxx_messageInfo_DismissGroupReq.Merge(m, src) } func (m *DismissGroupReq) XXX_Size() int { - return xxx_messageInfo_DismissGroupReq.Size(m) + return m.Size() } func (m *DismissGroupReq) XXX_DiscardUnknown() { xxx_messageInfo_DismissGroupReq.DiscardUnknown(m) @@ -1648,28 +1873,34 @@ func (m *DismissGroupReq) GetGroupID() string { } type DismissGroupResp struct { - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` } func (m *DismissGroupResp) Reset() { *m = DismissGroupResp{} } func (m *DismissGroupResp) String() string { return proto.CompactTextString(m) } func (*DismissGroupResp) ProtoMessage() {} func (*DismissGroupResp) Descriptor() ([]byte, []int) { - return fileDescriptor_group_a9155eb4f624bfe9, []int{37} + return fileDescriptor_6e2b031859d3bcfd, []int{37} } func (m *DismissGroupResp) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_DismissGroupResp.Unmarshal(m, b) + return m.Unmarshal(b) } func (m *DismissGroupResp) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_DismissGroupResp.Marshal(b, m, deterministic) + if deterministic { + return xxx_messageInfo_DismissGroupResp.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } } -func (dst *DismissGroupResp) XXX_Merge(src proto.Message) { - xxx_messageInfo_DismissGroupResp.Merge(dst, src) +func (m *DismissGroupResp) XXX_Merge(src proto.Message) { + xxx_messageInfo_DismissGroupResp.Merge(m, src) } func (m *DismissGroupResp) XXX_Size() int { - return xxx_messageInfo_DismissGroupResp.Size(m) + return m.Size() } func (m *DismissGroupResp) XXX_DiscardUnknown() { xxx_messageInfo_DismissGroupResp.DiscardUnknown(m) @@ -1678,31 +1909,37 @@ func (m *DismissGroupResp) XXX_DiscardUnknown() { var xxx_messageInfo_DismissGroupResp proto.InternalMessageInfo type MuteGroupMemberReq struct { - GroupID string `protobuf:"bytes,1,opt,name=groupID" json:"groupID,omitempty"` - UserID string `protobuf:"bytes,2,opt,name=userID" json:"userID,omitempty"` - MutedSeconds uint32 `protobuf:"varint,3,opt,name=mutedSeconds" json:"mutedSeconds,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` + GroupID string `protobuf:"bytes,1,opt,name=groupID,proto3" json:"groupID"` + UserID string `protobuf:"bytes,2,opt,name=userID,proto3" json:"userID"` + MutedSeconds uint32 `protobuf:"varint,3,opt,name=mutedSeconds,proto3" json:"mutedSeconds"` } func (m *MuteGroupMemberReq) Reset() { *m = MuteGroupMemberReq{} } func (m *MuteGroupMemberReq) String() string { return proto.CompactTextString(m) } func (*MuteGroupMemberReq) ProtoMessage() {} func (*MuteGroupMemberReq) Descriptor() ([]byte, []int) { - return fileDescriptor_group_a9155eb4f624bfe9, []int{38} + return fileDescriptor_6e2b031859d3bcfd, []int{38} } func (m *MuteGroupMemberReq) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_MuteGroupMemberReq.Unmarshal(m, b) + return m.Unmarshal(b) } func (m *MuteGroupMemberReq) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_MuteGroupMemberReq.Marshal(b, m, deterministic) + if deterministic { + return xxx_messageInfo_MuteGroupMemberReq.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } } -func (dst *MuteGroupMemberReq) XXX_Merge(src proto.Message) { - xxx_messageInfo_MuteGroupMemberReq.Merge(dst, src) +func (m *MuteGroupMemberReq) XXX_Merge(src proto.Message) { + xxx_messageInfo_MuteGroupMemberReq.Merge(m, src) } func (m *MuteGroupMemberReq) XXX_Size() int { - return xxx_messageInfo_MuteGroupMemberReq.Size(m) + return m.Size() } func (m *MuteGroupMemberReq) XXX_DiscardUnknown() { xxx_messageInfo_MuteGroupMemberReq.DiscardUnknown(m) @@ -1732,28 +1969,34 @@ func (m *MuteGroupMemberReq) GetMutedSeconds() uint32 { } type MuteGroupMemberResp struct { - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` } func (m *MuteGroupMemberResp) Reset() { *m = MuteGroupMemberResp{} } func (m *MuteGroupMemberResp) String() string { return proto.CompactTextString(m) } func (*MuteGroupMemberResp) ProtoMessage() {} func (*MuteGroupMemberResp) Descriptor() ([]byte, []int) { - return fileDescriptor_group_a9155eb4f624bfe9, []int{39} + return fileDescriptor_6e2b031859d3bcfd, []int{39} } func (m *MuteGroupMemberResp) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_MuteGroupMemberResp.Unmarshal(m, b) + return m.Unmarshal(b) } func (m *MuteGroupMemberResp) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_MuteGroupMemberResp.Marshal(b, m, deterministic) + if deterministic { + return xxx_messageInfo_MuteGroupMemberResp.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } } -func (dst *MuteGroupMemberResp) XXX_Merge(src proto.Message) { - xxx_messageInfo_MuteGroupMemberResp.Merge(dst, src) +func (m *MuteGroupMemberResp) XXX_Merge(src proto.Message) { + xxx_messageInfo_MuteGroupMemberResp.Merge(m, src) } func (m *MuteGroupMemberResp) XXX_Size() int { - return xxx_messageInfo_MuteGroupMemberResp.Size(m) + return m.Size() } func (m *MuteGroupMemberResp) XXX_DiscardUnknown() { xxx_messageInfo_MuteGroupMemberResp.DiscardUnknown(m) @@ -1762,30 +2005,36 @@ func (m *MuteGroupMemberResp) XXX_DiscardUnknown() { var xxx_messageInfo_MuteGroupMemberResp proto.InternalMessageInfo type CancelMuteGroupMemberReq struct { - GroupID string `protobuf:"bytes,1,opt,name=groupID" json:"groupID,omitempty"` - UserID string `protobuf:"bytes,2,opt,name=userID" json:"userID,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` + GroupID string `protobuf:"bytes,1,opt,name=groupID,proto3" json:"groupID"` + UserID string `protobuf:"bytes,2,opt,name=userID,proto3" json:"userID"` } func (m *CancelMuteGroupMemberReq) Reset() { *m = CancelMuteGroupMemberReq{} } func (m *CancelMuteGroupMemberReq) String() string { return proto.CompactTextString(m) } func (*CancelMuteGroupMemberReq) ProtoMessage() {} func (*CancelMuteGroupMemberReq) Descriptor() ([]byte, []int) { - return fileDescriptor_group_a9155eb4f624bfe9, []int{40} + return fileDescriptor_6e2b031859d3bcfd, []int{40} } func (m *CancelMuteGroupMemberReq) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_CancelMuteGroupMemberReq.Unmarshal(m, b) + return m.Unmarshal(b) } func (m *CancelMuteGroupMemberReq) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_CancelMuteGroupMemberReq.Marshal(b, m, deterministic) + if deterministic { + return xxx_messageInfo_CancelMuteGroupMemberReq.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } } -func (dst *CancelMuteGroupMemberReq) XXX_Merge(src proto.Message) { - xxx_messageInfo_CancelMuteGroupMemberReq.Merge(dst, src) +func (m *CancelMuteGroupMemberReq) XXX_Merge(src proto.Message) { + xxx_messageInfo_CancelMuteGroupMemberReq.Merge(m, src) } func (m *CancelMuteGroupMemberReq) XXX_Size() int { - return xxx_messageInfo_CancelMuteGroupMemberReq.Size(m) + return m.Size() } func (m *CancelMuteGroupMemberReq) XXX_DiscardUnknown() { xxx_messageInfo_CancelMuteGroupMemberReq.DiscardUnknown(m) @@ -1808,28 +2057,34 @@ func (m *CancelMuteGroupMemberReq) GetUserID() string { } type CancelMuteGroupMemberResp struct { - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` } func (m *CancelMuteGroupMemberResp) Reset() { *m = CancelMuteGroupMemberResp{} } func (m *CancelMuteGroupMemberResp) String() string { return proto.CompactTextString(m) } func (*CancelMuteGroupMemberResp) ProtoMessage() {} func (*CancelMuteGroupMemberResp) Descriptor() ([]byte, []int) { - return fileDescriptor_group_a9155eb4f624bfe9, []int{41} + return fileDescriptor_6e2b031859d3bcfd, []int{41} } func (m *CancelMuteGroupMemberResp) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_CancelMuteGroupMemberResp.Unmarshal(m, b) + return m.Unmarshal(b) } func (m *CancelMuteGroupMemberResp) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_CancelMuteGroupMemberResp.Marshal(b, m, deterministic) + if deterministic { + return xxx_messageInfo_CancelMuteGroupMemberResp.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } } -func (dst *CancelMuteGroupMemberResp) XXX_Merge(src proto.Message) { - xxx_messageInfo_CancelMuteGroupMemberResp.Merge(dst, src) +func (m *CancelMuteGroupMemberResp) XXX_Merge(src proto.Message) { + xxx_messageInfo_CancelMuteGroupMemberResp.Merge(m, src) } func (m *CancelMuteGroupMemberResp) XXX_Size() int { - return xxx_messageInfo_CancelMuteGroupMemberResp.Size(m) + return m.Size() } func (m *CancelMuteGroupMemberResp) XXX_DiscardUnknown() { xxx_messageInfo_CancelMuteGroupMemberResp.DiscardUnknown(m) @@ -1838,29 +2093,35 @@ func (m *CancelMuteGroupMemberResp) XXX_DiscardUnknown() { var xxx_messageInfo_CancelMuteGroupMemberResp proto.InternalMessageInfo type MuteGroupReq struct { - GroupID string `protobuf:"bytes,1,opt,name=groupID" json:"groupID,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` + GroupID string `protobuf:"bytes,1,opt,name=groupID,proto3" json:"groupID"` } func (m *MuteGroupReq) Reset() { *m = MuteGroupReq{} } func (m *MuteGroupReq) String() string { return proto.CompactTextString(m) } func (*MuteGroupReq) ProtoMessage() {} func (*MuteGroupReq) Descriptor() ([]byte, []int) { - return fileDescriptor_group_a9155eb4f624bfe9, []int{42} + return fileDescriptor_6e2b031859d3bcfd, []int{42} } func (m *MuteGroupReq) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_MuteGroupReq.Unmarshal(m, b) + return m.Unmarshal(b) } func (m *MuteGroupReq) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_MuteGroupReq.Marshal(b, m, deterministic) + if deterministic { + return xxx_messageInfo_MuteGroupReq.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } } -func (dst *MuteGroupReq) XXX_Merge(src proto.Message) { - xxx_messageInfo_MuteGroupReq.Merge(dst, src) +func (m *MuteGroupReq) XXX_Merge(src proto.Message) { + xxx_messageInfo_MuteGroupReq.Merge(m, src) } func (m *MuteGroupReq) XXX_Size() int { - return xxx_messageInfo_MuteGroupReq.Size(m) + return m.Size() } func (m *MuteGroupReq) XXX_DiscardUnknown() { xxx_messageInfo_MuteGroupReq.DiscardUnknown(m) @@ -1876,28 +2137,34 @@ func (m *MuteGroupReq) GetGroupID() string { } type MuteGroupResp struct { - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` } func (m *MuteGroupResp) Reset() { *m = MuteGroupResp{} } func (m *MuteGroupResp) String() string { return proto.CompactTextString(m) } func (*MuteGroupResp) ProtoMessage() {} func (*MuteGroupResp) Descriptor() ([]byte, []int) { - return fileDescriptor_group_a9155eb4f624bfe9, []int{43} + return fileDescriptor_6e2b031859d3bcfd, []int{43} } func (m *MuteGroupResp) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_MuteGroupResp.Unmarshal(m, b) + return m.Unmarshal(b) } func (m *MuteGroupResp) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_MuteGroupResp.Marshal(b, m, deterministic) + if deterministic { + return xxx_messageInfo_MuteGroupResp.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } } -func (dst *MuteGroupResp) XXX_Merge(src proto.Message) { - xxx_messageInfo_MuteGroupResp.Merge(dst, src) +func (m *MuteGroupResp) XXX_Merge(src proto.Message) { + xxx_messageInfo_MuteGroupResp.Merge(m, src) } func (m *MuteGroupResp) XXX_Size() int { - return xxx_messageInfo_MuteGroupResp.Size(m) + return m.Size() } func (m *MuteGroupResp) XXX_DiscardUnknown() { xxx_messageInfo_MuteGroupResp.DiscardUnknown(m) @@ -1906,29 +2173,35 @@ func (m *MuteGroupResp) XXX_DiscardUnknown() { var xxx_messageInfo_MuteGroupResp proto.InternalMessageInfo type CancelMuteGroupReq struct { - GroupID string `protobuf:"bytes,1,opt,name=groupID" json:"groupID,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` + GroupID string `protobuf:"bytes,1,opt,name=groupID,proto3" json:"groupID"` } func (m *CancelMuteGroupReq) Reset() { *m = CancelMuteGroupReq{} } func (m *CancelMuteGroupReq) String() string { return proto.CompactTextString(m) } func (*CancelMuteGroupReq) ProtoMessage() {} func (*CancelMuteGroupReq) Descriptor() ([]byte, []int) { - return fileDescriptor_group_a9155eb4f624bfe9, []int{44} + return fileDescriptor_6e2b031859d3bcfd, []int{44} } func (m *CancelMuteGroupReq) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_CancelMuteGroupReq.Unmarshal(m, b) + return m.Unmarshal(b) } func (m *CancelMuteGroupReq) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_CancelMuteGroupReq.Marshal(b, m, deterministic) + if deterministic { + return xxx_messageInfo_CancelMuteGroupReq.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } } -func (dst *CancelMuteGroupReq) XXX_Merge(src proto.Message) { - xxx_messageInfo_CancelMuteGroupReq.Merge(dst, src) +func (m *CancelMuteGroupReq) XXX_Merge(src proto.Message) { + xxx_messageInfo_CancelMuteGroupReq.Merge(m, src) } func (m *CancelMuteGroupReq) XXX_Size() int { - return xxx_messageInfo_CancelMuteGroupReq.Size(m) + return m.Size() } func (m *CancelMuteGroupReq) XXX_DiscardUnknown() { xxx_messageInfo_CancelMuteGroupReq.DiscardUnknown(m) @@ -1944,28 +2217,34 @@ func (m *CancelMuteGroupReq) GetGroupID() string { } type CancelMuteGroupResp struct { - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` } func (m *CancelMuteGroupResp) Reset() { *m = CancelMuteGroupResp{} } func (m *CancelMuteGroupResp) String() string { return proto.CompactTextString(m) } func (*CancelMuteGroupResp) ProtoMessage() {} func (*CancelMuteGroupResp) Descriptor() ([]byte, []int) { - return fileDescriptor_group_a9155eb4f624bfe9, []int{45} + return fileDescriptor_6e2b031859d3bcfd, []int{45} } func (m *CancelMuteGroupResp) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_CancelMuteGroupResp.Unmarshal(m, b) + return m.Unmarshal(b) } func (m *CancelMuteGroupResp) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_CancelMuteGroupResp.Marshal(b, m, deterministic) + if deterministic { + return xxx_messageInfo_CancelMuteGroupResp.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } } -func (dst *CancelMuteGroupResp) XXX_Merge(src proto.Message) { - xxx_messageInfo_CancelMuteGroupResp.Merge(dst, src) +func (m *CancelMuteGroupResp) XXX_Merge(src proto.Message) { + xxx_messageInfo_CancelMuteGroupResp.Merge(m, src) } func (m *CancelMuteGroupResp) XXX_Size() int { - return xxx_messageInfo_CancelMuteGroupResp.Size(m) + return m.Size() } func (m *CancelMuteGroupResp) XXX_DiscardUnknown() { xxx_messageInfo_CancelMuteGroupResp.DiscardUnknown(m) @@ -1974,29 +2253,35 @@ func (m *CancelMuteGroupResp) XXX_DiscardUnknown() { var xxx_messageInfo_CancelMuteGroupResp proto.InternalMessageInfo type GetJoinedSuperGroupListReq struct { - UserID string `protobuf:"bytes,1,opt,name=userID" json:"userID,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` + UserID string `protobuf:"bytes,1,opt,name=userID,proto3" json:"userID"` } func (m *GetJoinedSuperGroupListReq) Reset() { *m = GetJoinedSuperGroupListReq{} } func (m *GetJoinedSuperGroupListReq) String() string { return proto.CompactTextString(m) } func (*GetJoinedSuperGroupListReq) ProtoMessage() {} func (*GetJoinedSuperGroupListReq) Descriptor() ([]byte, []int) { - return fileDescriptor_group_a9155eb4f624bfe9, []int{46} + return fileDescriptor_6e2b031859d3bcfd, []int{46} } func (m *GetJoinedSuperGroupListReq) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_GetJoinedSuperGroupListReq.Unmarshal(m, b) + return m.Unmarshal(b) } func (m *GetJoinedSuperGroupListReq) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_GetJoinedSuperGroupListReq.Marshal(b, m, deterministic) + if deterministic { + return xxx_messageInfo_GetJoinedSuperGroupListReq.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } } -func (dst *GetJoinedSuperGroupListReq) XXX_Merge(src proto.Message) { - xxx_messageInfo_GetJoinedSuperGroupListReq.Merge(dst, src) +func (m *GetJoinedSuperGroupListReq) XXX_Merge(src proto.Message) { + xxx_messageInfo_GetJoinedSuperGroupListReq.Merge(m, src) } func (m *GetJoinedSuperGroupListReq) XXX_Size() int { - return xxx_messageInfo_GetJoinedSuperGroupListReq.Size(m) + return m.Size() } func (m *GetJoinedSuperGroupListReq) XXX_DiscardUnknown() { xxx_messageInfo_GetJoinedSuperGroupListReq.DiscardUnknown(m) @@ -2012,29 +2297,35 @@ func (m *GetJoinedSuperGroupListReq) GetUserID() string { } type GetJoinedSuperGroupListResp struct { - Groups []*sdkws.GroupInfo `protobuf:"bytes,1,rep,name=groups" json:"groups,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` + Groups []*sdkws.GroupInfo `protobuf:"bytes,1,rep,name=groups,proto3" json:"groups"` } func (m *GetJoinedSuperGroupListResp) Reset() { *m = GetJoinedSuperGroupListResp{} } func (m *GetJoinedSuperGroupListResp) String() string { return proto.CompactTextString(m) } func (*GetJoinedSuperGroupListResp) ProtoMessage() {} func (*GetJoinedSuperGroupListResp) Descriptor() ([]byte, []int) { - return fileDescriptor_group_a9155eb4f624bfe9, []int{47} + return fileDescriptor_6e2b031859d3bcfd, []int{47} } func (m *GetJoinedSuperGroupListResp) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_GetJoinedSuperGroupListResp.Unmarshal(m, b) + return m.Unmarshal(b) } func (m *GetJoinedSuperGroupListResp) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_GetJoinedSuperGroupListResp.Marshal(b, m, deterministic) + if deterministic { + return xxx_messageInfo_GetJoinedSuperGroupListResp.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } } -func (dst *GetJoinedSuperGroupListResp) XXX_Merge(src proto.Message) { - xxx_messageInfo_GetJoinedSuperGroupListResp.Merge(dst, src) +func (m *GetJoinedSuperGroupListResp) XXX_Merge(src proto.Message) { + xxx_messageInfo_GetJoinedSuperGroupListResp.Merge(m, src) } func (m *GetJoinedSuperGroupListResp) XXX_Size() int { - return xxx_messageInfo_GetJoinedSuperGroupListResp.Size(m) + return m.Size() } func (m *GetJoinedSuperGroupListResp) XXX_DiscardUnknown() { xxx_messageInfo_GetJoinedSuperGroupListResp.DiscardUnknown(m) @@ -2050,29 +2341,35 @@ func (m *GetJoinedSuperGroupListResp) GetGroups() []*sdkws.GroupInfo { } type GetSuperGroupsInfoReq struct { - GroupIDs []string `protobuf:"bytes,1,rep,name=groupIDs" json:"groupIDs,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` + GroupIDs []string `protobuf:"bytes,1,rep,name=groupIDs,proto3" json:"groupIDs"` } func (m *GetSuperGroupsInfoReq) Reset() { *m = GetSuperGroupsInfoReq{} } func (m *GetSuperGroupsInfoReq) String() string { return proto.CompactTextString(m) } func (*GetSuperGroupsInfoReq) ProtoMessage() {} func (*GetSuperGroupsInfoReq) Descriptor() ([]byte, []int) { - return fileDescriptor_group_a9155eb4f624bfe9, []int{48} + return fileDescriptor_6e2b031859d3bcfd, []int{48} } func (m *GetSuperGroupsInfoReq) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_GetSuperGroupsInfoReq.Unmarshal(m, b) + return m.Unmarshal(b) } func (m *GetSuperGroupsInfoReq) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_GetSuperGroupsInfoReq.Marshal(b, m, deterministic) + if deterministic { + return xxx_messageInfo_GetSuperGroupsInfoReq.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } } -func (dst *GetSuperGroupsInfoReq) XXX_Merge(src proto.Message) { - xxx_messageInfo_GetSuperGroupsInfoReq.Merge(dst, src) +func (m *GetSuperGroupsInfoReq) XXX_Merge(src proto.Message) { + xxx_messageInfo_GetSuperGroupsInfoReq.Merge(m, src) } func (m *GetSuperGroupsInfoReq) XXX_Size() int { - return xxx_messageInfo_GetSuperGroupsInfoReq.Size(m) + return m.Size() } func (m *GetSuperGroupsInfoReq) XXX_DiscardUnknown() { xxx_messageInfo_GetSuperGroupsInfoReq.DiscardUnknown(m) @@ -2088,29 +2385,35 @@ func (m *GetSuperGroupsInfoReq) GetGroupIDs() []string { } type GetSuperGroupsInfoResp struct { - GroupInfos []*sdkws.GroupInfo `protobuf:"bytes,1,rep,name=groupInfos" json:"groupInfos,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` + GroupInfos []*sdkws.GroupInfo `protobuf:"bytes,1,rep,name=groupInfos,proto3" json:"groupInfos"` } func (m *GetSuperGroupsInfoResp) Reset() { *m = GetSuperGroupsInfoResp{} } func (m *GetSuperGroupsInfoResp) String() string { return proto.CompactTextString(m) } func (*GetSuperGroupsInfoResp) ProtoMessage() {} func (*GetSuperGroupsInfoResp) Descriptor() ([]byte, []int) { - return fileDescriptor_group_a9155eb4f624bfe9, []int{49} + return fileDescriptor_6e2b031859d3bcfd, []int{49} } func (m *GetSuperGroupsInfoResp) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_GetSuperGroupsInfoResp.Unmarshal(m, b) + return m.Unmarshal(b) } func (m *GetSuperGroupsInfoResp) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_GetSuperGroupsInfoResp.Marshal(b, m, deterministic) + if deterministic { + return xxx_messageInfo_GetSuperGroupsInfoResp.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } } -func (dst *GetSuperGroupsInfoResp) XXX_Merge(src proto.Message) { - xxx_messageInfo_GetSuperGroupsInfoResp.Merge(dst, src) +func (m *GetSuperGroupsInfoResp) XXX_Merge(src proto.Message) { + xxx_messageInfo_GetSuperGroupsInfoResp.Merge(m, src) } func (m *GetSuperGroupsInfoResp) XXX_Size() int { - return xxx_messageInfo_GetSuperGroupsInfoResp.Size(m) + return m.Size() } func (m *GetSuperGroupsInfoResp) XXX_DiscardUnknown() { xxx_messageInfo_GetSuperGroupsInfoResp.DiscardUnknown(m) @@ -2126,34 +2429,40 @@ func (m *GetSuperGroupsInfoResp) GetGroupInfos() []*sdkws.GroupInfo { } type SetGroupMemberInfo struct { - GroupID string `protobuf:"bytes,1,opt,name=groupID" json:"groupID,omitempty"` - UserID string `protobuf:"bytes,2,opt,name=userID" json:"userID,omitempty"` - Nickname *wrapperspb.StringValue `protobuf:"bytes,3,opt,name=nickname" json:"nickname,omitempty"` - FaceURL *wrapperspb.StringValue `protobuf:"bytes,4,opt,name=faceURL" json:"faceURL,omitempty"` - RoleLevel *wrapperspb.Int32Value `protobuf:"bytes,5,opt,name=roleLevel" json:"roleLevel,omitempty"` - Ex *wrapperspb.StringValue `protobuf:"bytes,6,opt,name=ex" json:"ex,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` + GroupID string `protobuf:"bytes,1,opt,name=groupID,proto3" json:"groupID"` + UserID string `protobuf:"bytes,2,opt,name=userID,proto3" json:"userID"` + Nickname *wrapperspb.StringValue `protobuf:"bytes,3,opt,name=nickname,proto3" json:"nickname"` + FaceURL *wrapperspb.StringValue `protobuf:"bytes,4,opt,name=faceURL,proto3" json:"faceURL"` + RoleLevel *wrapperspb.Int32Value `protobuf:"bytes,5,opt,name=roleLevel,proto3" json:"roleLevel"` + Ex *wrapperspb.StringValue `protobuf:"bytes,6,opt,name=ex,proto3" json:"ex"` } func (m *SetGroupMemberInfo) Reset() { *m = SetGroupMemberInfo{} } func (m *SetGroupMemberInfo) String() string { return proto.CompactTextString(m) } func (*SetGroupMemberInfo) ProtoMessage() {} func (*SetGroupMemberInfo) Descriptor() ([]byte, []int) { - return fileDescriptor_group_a9155eb4f624bfe9, []int{50} + return fileDescriptor_6e2b031859d3bcfd, []int{50} } func (m *SetGroupMemberInfo) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_SetGroupMemberInfo.Unmarshal(m, b) + return m.Unmarshal(b) } func (m *SetGroupMemberInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_SetGroupMemberInfo.Marshal(b, m, deterministic) + if deterministic { + return xxx_messageInfo_SetGroupMemberInfo.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } } -func (dst *SetGroupMemberInfo) XXX_Merge(src proto.Message) { - xxx_messageInfo_SetGroupMemberInfo.Merge(dst, src) +func (m *SetGroupMemberInfo) XXX_Merge(src proto.Message) { + xxx_messageInfo_SetGroupMemberInfo.Merge(m, src) } func (m *SetGroupMemberInfo) XXX_Size() int { - return xxx_messageInfo_SetGroupMemberInfo.Size(m) + return m.Size() } func (m *SetGroupMemberInfo) XXX_DiscardUnknown() { xxx_messageInfo_SetGroupMemberInfo.DiscardUnknown(m) @@ -2204,29 +2513,35 @@ func (m *SetGroupMemberInfo) GetEx() *wrapperspb.StringValue { } type SetGroupMemberInfoReq struct { - Members []*SetGroupMemberInfo `protobuf:"bytes,1,rep,name=members" json:"members,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` + Members []*SetGroupMemberInfo `protobuf:"bytes,1,rep,name=members,proto3" json:"members"` } func (m *SetGroupMemberInfoReq) Reset() { *m = SetGroupMemberInfoReq{} } func (m *SetGroupMemberInfoReq) String() string { return proto.CompactTextString(m) } func (*SetGroupMemberInfoReq) ProtoMessage() {} func (*SetGroupMemberInfoReq) Descriptor() ([]byte, []int) { - return fileDescriptor_group_a9155eb4f624bfe9, []int{51} + return fileDescriptor_6e2b031859d3bcfd, []int{51} } func (m *SetGroupMemberInfoReq) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_SetGroupMemberInfoReq.Unmarshal(m, b) + return m.Unmarshal(b) } func (m *SetGroupMemberInfoReq) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_SetGroupMemberInfoReq.Marshal(b, m, deterministic) + if deterministic { + return xxx_messageInfo_SetGroupMemberInfoReq.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } } -func (dst *SetGroupMemberInfoReq) XXX_Merge(src proto.Message) { - xxx_messageInfo_SetGroupMemberInfoReq.Merge(dst, src) +func (m *SetGroupMemberInfoReq) XXX_Merge(src proto.Message) { + xxx_messageInfo_SetGroupMemberInfoReq.Merge(m, src) } func (m *SetGroupMemberInfoReq) XXX_Size() int { - return xxx_messageInfo_SetGroupMemberInfoReq.Size(m) + return m.Size() } func (m *SetGroupMemberInfoReq) XXX_DiscardUnknown() { xxx_messageInfo_SetGroupMemberInfoReq.DiscardUnknown(m) @@ -2242,28 +2557,34 @@ func (m *SetGroupMemberInfoReq) GetMembers() []*SetGroupMemberInfo { } type SetGroupMemberInfoResp struct { - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` } func (m *SetGroupMemberInfoResp) Reset() { *m = SetGroupMemberInfoResp{} } func (m *SetGroupMemberInfoResp) String() string { return proto.CompactTextString(m) } func (*SetGroupMemberInfoResp) ProtoMessage() {} func (*SetGroupMemberInfoResp) Descriptor() ([]byte, []int) { - return fileDescriptor_group_a9155eb4f624bfe9, []int{52} + return fileDescriptor_6e2b031859d3bcfd, []int{52} } func (m *SetGroupMemberInfoResp) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_SetGroupMemberInfoResp.Unmarshal(m, b) + return m.Unmarshal(b) } func (m *SetGroupMemberInfoResp) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_SetGroupMemberInfoResp.Marshal(b, m, deterministic) + if deterministic { + return xxx_messageInfo_SetGroupMemberInfoResp.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } } -func (dst *SetGroupMemberInfoResp) XXX_Merge(src proto.Message) { - xxx_messageInfo_SetGroupMemberInfoResp.Merge(dst, src) +func (m *SetGroupMemberInfoResp) XXX_Merge(src proto.Message) { + xxx_messageInfo_SetGroupMemberInfoResp.Merge(m, src) } func (m *SetGroupMemberInfoResp) XXX_Size() int { - return xxx_messageInfo_SetGroupMemberInfoResp.Size(m) + return m.Size() } func (m *SetGroupMemberInfoResp) XXX_DiscardUnknown() { xxx_messageInfo_SetGroupMemberInfoResp.DiscardUnknown(m) @@ -2272,29 +2593,35 @@ func (m *SetGroupMemberInfoResp) XXX_DiscardUnknown() { var xxx_messageInfo_SetGroupMemberInfoResp proto.InternalMessageInfo type GetGroupAbstractInfoReq struct { - GroupIDs []string `protobuf:"bytes,1,rep,name=groupIDs" json:"groupIDs,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` + GroupIDs []string `protobuf:"bytes,1,rep,name=groupIDs,proto3" json:"groupIDs"` } func (m *GetGroupAbstractInfoReq) Reset() { *m = GetGroupAbstractInfoReq{} } func (m *GetGroupAbstractInfoReq) String() string { return proto.CompactTextString(m) } func (*GetGroupAbstractInfoReq) ProtoMessage() {} func (*GetGroupAbstractInfoReq) Descriptor() ([]byte, []int) { - return fileDescriptor_group_a9155eb4f624bfe9, []int{53} + return fileDescriptor_6e2b031859d3bcfd, []int{53} } func (m *GetGroupAbstractInfoReq) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_GetGroupAbstractInfoReq.Unmarshal(m, b) + return m.Unmarshal(b) } func (m *GetGroupAbstractInfoReq) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_GetGroupAbstractInfoReq.Marshal(b, m, deterministic) + if deterministic { + return xxx_messageInfo_GetGroupAbstractInfoReq.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } } -func (dst *GetGroupAbstractInfoReq) XXX_Merge(src proto.Message) { - xxx_messageInfo_GetGroupAbstractInfoReq.Merge(dst, src) +func (m *GetGroupAbstractInfoReq) XXX_Merge(src proto.Message) { + xxx_messageInfo_GetGroupAbstractInfoReq.Merge(m, src) } func (m *GetGroupAbstractInfoReq) XXX_Size() int { - return xxx_messageInfo_GetGroupAbstractInfoReq.Size(m) + return m.Size() } func (m *GetGroupAbstractInfoReq) XXX_DiscardUnknown() { xxx_messageInfo_GetGroupAbstractInfoReq.DiscardUnknown(m) @@ -2310,31 +2637,37 @@ func (m *GetGroupAbstractInfoReq) GetGroupIDs() []string { } type GroupAbstractInfo struct { - GroupID string `protobuf:"bytes,1,opt,name=groupID" json:"groupID,omitempty"` - GroupMemberNumber uint32 `protobuf:"varint,2,opt,name=groupMemberNumber" json:"groupMemberNumber,omitempty"` - GroupMemberListHash uint64 `protobuf:"varint,3,opt,name=groupMemberListHash" json:"groupMemberListHash,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` + GroupID string `protobuf:"bytes,1,opt,name=groupID,proto3" json:"groupID"` + GroupMemberNumber uint32 `protobuf:"varint,2,opt,name=groupMemberNumber,proto3" json:"groupMemberNumber"` + GroupMemberListHash uint64 `protobuf:"varint,3,opt,name=groupMemberListHash,proto3" json:"groupMemberListHash"` } func (m *GroupAbstractInfo) Reset() { *m = GroupAbstractInfo{} } func (m *GroupAbstractInfo) String() string { return proto.CompactTextString(m) } func (*GroupAbstractInfo) ProtoMessage() {} func (*GroupAbstractInfo) Descriptor() ([]byte, []int) { - return fileDescriptor_group_a9155eb4f624bfe9, []int{54} + return fileDescriptor_6e2b031859d3bcfd, []int{54} } func (m *GroupAbstractInfo) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_GroupAbstractInfo.Unmarshal(m, b) + return m.Unmarshal(b) } func (m *GroupAbstractInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_GroupAbstractInfo.Marshal(b, m, deterministic) + if deterministic { + return xxx_messageInfo_GroupAbstractInfo.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } } -func (dst *GroupAbstractInfo) XXX_Merge(src proto.Message) { - xxx_messageInfo_GroupAbstractInfo.Merge(dst, src) +func (m *GroupAbstractInfo) XXX_Merge(src proto.Message) { + xxx_messageInfo_GroupAbstractInfo.Merge(m, src) } func (m *GroupAbstractInfo) XXX_Size() int { - return xxx_messageInfo_GroupAbstractInfo.Size(m) + return m.Size() } func (m *GroupAbstractInfo) XXX_DiscardUnknown() { xxx_messageInfo_GroupAbstractInfo.DiscardUnknown(m) @@ -2364,29 +2697,35 @@ func (m *GroupAbstractInfo) GetGroupMemberListHash() uint64 { } type GetGroupAbstractInfoResp struct { - GroupAbstractInfos []*GroupAbstractInfo `protobuf:"bytes,1,rep,name=groupAbstractInfos" json:"groupAbstractInfos,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` + GroupAbstractInfos []*GroupAbstractInfo `protobuf:"bytes,1,rep,name=groupAbstractInfos,proto3" json:"groupAbstractInfos"` } func (m *GetGroupAbstractInfoResp) Reset() { *m = GetGroupAbstractInfoResp{} } func (m *GetGroupAbstractInfoResp) String() string { return proto.CompactTextString(m) } func (*GetGroupAbstractInfoResp) ProtoMessage() {} func (*GetGroupAbstractInfoResp) Descriptor() ([]byte, []int) { - return fileDescriptor_group_a9155eb4f624bfe9, []int{55} + return fileDescriptor_6e2b031859d3bcfd, []int{55} } func (m *GetGroupAbstractInfoResp) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_GetGroupAbstractInfoResp.Unmarshal(m, b) + return m.Unmarshal(b) } func (m *GetGroupAbstractInfoResp) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_GetGroupAbstractInfoResp.Marshal(b, m, deterministic) + if deterministic { + return xxx_messageInfo_GetGroupAbstractInfoResp.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } } -func (dst *GetGroupAbstractInfoResp) XXX_Merge(src proto.Message) { - xxx_messageInfo_GetGroupAbstractInfoResp.Merge(dst, src) +func (m *GetGroupAbstractInfoResp) XXX_Merge(src proto.Message) { + xxx_messageInfo_GetGroupAbstractInfoResp.Merge(m, src) } func (m *GetGroupAbstractInfoResp) XXX_Size() int { - return xxx_messageInfo_GetGroupAbstractInfoResp.Size(m) + return m.Size() } func (m *GetGroupAbstractInfoResp) XXX_DiscardUnknown() { xxx_messageInfo_GetGroupAbstractInfoResp.DiscardUnknown(m) @@ -2402,30 +2741,36 @@ func (m *GetGroupAbstractInfoResp) GetGroupAbstractInfos() []*GroupAbstractInfo } type GetUserInGroupMembersReq struct { - UserID string `protobuf:"bytes,1,opt,name=userID" json:"userID,omitempty"` - GroupIDs []string `protobuf:"bytes,2,rep,name=groupIDs" json:"groupIDs,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` + UserID string `protobuf:"bytes,1,opt,name=userID,proto3" json:"userID"` + GroupIDs []string `protobuf:"bytes,2,rep,name=groupIDs,proto3" json:"groupIDs"` } func (m *GetUserInGroupMembersReq) Reset() { *m = GetUserInGroupMembersReq{} } func (m *GetUserInGroupMembersReq) String() string { return proto.CompactTextString(m) } func (*GetUserInGroupMembersReq) ProtoMessage() {} func (*GetUserInGroupMembersReq) Descriptor() ([]byte, []int) { - return fileDescriptor_group_a9155eb4f624bfe9, []int{56} + return fileDescriptor_6e2b031859d3bcfd, []int{56} } func (m *GetUserInGroupMembersReq) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_GetUserInGroupMembersReq.Unmarshal(m, b) + return m.Unmarshal(b) } func (m *GetUserInGroupMembersReq) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_GetUserInGroupMembersReq.Marshal(b, m, deterministic) + if deterministic { + return xxx_messageInfo_GetUserInGroupMembersReq.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } } -func (dst *GetUserInGroupMembersReq) XXX_Merge(src proto.Message) { - xxx_messageInfo_GetUserInGroupMembersReq.Merge(dst, src) +func (m *GetUserInGroupMembersReq) XXX_Merge(src proto.Message) { + xxx_messageInfo_GetUserInGroupMembersReq.Merge(m, src) } func (m *GetUserInGroupMembersReq) XXX_Size() int { - return xxx_messageInfo_GetUserInGroupMembersReq.Size(m) + return m.Size() } func (m *GetUserInGroupMembersReq) XXX_DiscardUnknown() { xxx_messageInfo_GetUserInGroupMembersReq.DiscardUnknown(m) @@ -2448,29 +2793,35 @@ func (m *GetUserInGroupMembersReq) GetGroupIDs() []string { } type GetUserInGroupMembersResp struct { - Members []*sdkws.GroupMemberFullInfo `protobuf:"bytes,1,rep,name=members" json:"members,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` + Members []*sdkws.GroupMemberFullInfo `protobuf:"bytes,1,rep,name=members,proto3" json:"members"` } func (m *GetUserInGroupMembersResp) Reset() { *m = GetUserInGroupMembersResp{} } func (m *GetUserInGroupMembersResp) String() string { return proto.CompactTextString(m) } func (*GetUserInGroupMembersResp) ProtoMessage() {} func (*GetUserInGroupMembersResp) Descriptor() ([]byte, []int) { - return fileDescriptor_group_a9155eb4f624bfe9, []int{57} + return fileDescriptor_6e2b031859d3bcfd, []int{57} } func (m *GetUserInGroupMembersResp) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_GetUserInGroupMembersResp.Unmarshal(m, b) + return m.Unmarshal(b) } func (m *GetUserInGroupMembersResp) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_GetUserInGroupMembersResp.Marshal(b, m, deterministic) + if deterministic { + return xxx_messageInfo_GetUserInGroupMembersResp.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } } -func (dst *GetUserInGroupMembersResp) XXX_Merge(src proto.Message) { - xxx_messageInfo_GetUserInGroupMembersResp.Merge(dst, src) +func (m *GetUserInGroupMembersResp) XXX_Merge(src proto.Message) { + xxx_messageInfo_GetUserInGroupMembersResp.Merge(m, src) } func (m *GetUserInGroupMembersResp) XXX_Size() int { - return xxx_messageInfo_GetUserInGroupMembersResp.Size(m) + return m.Size() } func (m *GetUserInGroupMembersResp) XXX_DiscardUnknown() { xxx_messageInfo_GetUserInGroupMembersResp.DiscardUnknown(m) @@ -2486,29 +2837,35 @@ func (m *GetUserInGroupMembersResp) GetMembers() []*sdkws.GroupMemberFullInfo { } type GetGroupMemberUserIDReq struct { - GroupID string `protobuf:"bytes,1,opt,name=groupID" json:"groupID,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` + GroupID string `protobuf:"bytes,1,opt,name=groupID,proto3" json:"groupID"` } func (m *GetGroupMemberUserIDReq) Reset() { *m = GetGroupMemberUserIDReq{} } func (m *GetGroupMemberUserIDReq) String() string { return proto.CompactTextString(m) } func (*GetGroupMemberUserIDReq) ProtoMessage() {} func (*GetGroupMemberUserIDReq) Descriptor() ([]byte, []int) { - return fileDescriptor_group_a9155eb4f624bfe9, []int{58} + return fileDescriptor_6e2b031859d3bcfd, []int{58} } func (m *GetGroupMemberUserIDReq) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_GetGroupMemberUserIDReq.Unmarshal(m, b) + return m.Unmarshal(b) } func (m *GetGroupMemberUserIDReq) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_GetGroupMemberUserIDReq.Marshal(b, m, deterministic) + if deterministic { + return xxx_messageInfo_GetGroupMemberUserIDReq.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } } -func (dst *GetGroupMemberUserIDReq) XXX_Merge(src proto.Message) { - xxx_messageInfo_GetGroupMemberUserIDReq.Merge(dst, src) +func (m *GetGroupMemberUserIDReq) XXX_Merge(src proto.Message) { + xxx_messageInfo_GetGroupMemberUserIDReq.Merge(m, src) } func (m *GetGroupMemberUserIDReq) XXX_Size() int { - return xxx_messageInfo_GetGroupMemberUserIDReq.Size(m) + return m.Size() } func (m *GetGroupMemberUserIDReq) XXX_DiscardUnknown() { xxx_messageInfo_GetGroupMemberUserIDReq.DiscardUnknown(m) @@ -2524,29 +2881,35 @@ func (m *GetGroupMemberUserIDReq) GetGroupID() string { } type GetGroupMemberUserIDResp struct { - UserIDs []string `protobuf:"bytes,1,rep,name=userIDs" json:"userIDs,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` + UserIDs []string `protobuf:"bytes,1,rep,name=userIDs,proto3" json:"userIDs"` } func (m *GetGroupMemberUserIDResp) Reset() { *m = GetGroupMemberUserIDResp{} } func (m *GetGroupMemberUserIDResp) String() string { return proto.CompactTextString(m) } func (*GetGroupMemberUserIDResp) ProtoMessage() {} func (*GetGroupMemberUserIDResp) Descriptor() ([]byte, []int) { - return fileDescriptor_group_a9155eb4f624bfe9, []int{59} + return fileDescriptor_6e2b031859d3bcfd, []int{59} } func (m *GetGroupMemberUserIDResp) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_GetGroupMemberUserIDResp.Unmarshal(m, b) + return m.Unmarshal(b) } func (m *GetGroupMemberUserIDResp) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_GetGroupMemberUserIDResp.Marshal(b, m, deterministic) + if deterministic { + return xxx_messageInfo_GetGroupMemberUserIDResp.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } } -func (dst *GetGroupMemberUserIDResp) XXX_Merge(src proto.Message) { - xxx_messageInfo_GetGroupMemberUserIDResp.Merge(dst, src) +func (m *GetGroupMemberUserIDResp) XXX_Merge(src proto.Message) { + xxx_messageInfo_GetGroupMemberUserIDResp.Merge(m, src) } func (m *GetGroupMemberUserIDResp) XXX_Size() int { - return xxx_messageInfo_GetGroupMemberUserIDResp.Size(m) + return m.Size() } func (m *GetGroupMemberUserIDResp) XXX_DiscardUnknown() { xxx_messageInfo_GetGroupMemberUserIDResp.DiscardUnknown(m) @@ -2562,30 +2925,36 @@ func (m *GetGroupMemberUserIDResp) GetUserIDs() []string { } type GetGroupMemberRoleLevelReq struct { - GroupID string `protobuf:"bytes,1,opt,name=groupID" json:"groupID,omitempty"` - RoleLevels []int32 `protobuf:"varint,2,rep,packed,name=roleLevels" json:"roleLevels,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` + GroupID string `protobuf:"bytes,1,opt,name=groupID,proto3" json:"groupID"` + RoleLevels []int32 `protobuf:"varint,2,rep,packed,name=roleLevels,proto3" json:"roleLevels"` } func (m *GetGroupMemberRoleLevelReq) Reset() { *m = GetGroupMemberRoleLevelReq{} } func (m *GetGroupMemberRoleLevelReq) String() string { return proto.CompactTextString(m) } func (*GetGroupMemberRoleLevelReq) ProtoMessage() {} func (*GetGroupMemberRoleLevelReq) Descriptor() ([]byte, []int) { - return fileDescriptor_group_a9155eb4f624bfe9, []int{60} + return fileDescriptor_6e2b031859d3bcfd, []int{60} } func (m *GetGroupMemberRoleLevelReq) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_GetGroupMemberRoleLevelReq.Unmarshal(m, b) + return m.Unmarshal(b) } func (m *GetGroupMemberRoleLevelReq) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_GetGroupMemberRoleLevelReq.Marshal(b, m, deterministic) + if deterministic { + return xxx_messageInfo_GetGroupMemberRoleLevelReq.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } } -func (dst *GetGroupMemberRoleLevelReq) XXX_Merge(src proto.Message) { - xxx_messageInfo_GetGroupMemberRoleLevelReq.Merge(dst, src) +func (m *GetGroupMemberRoleLevelReq) XXX_Merge(src proto.Message) { + xxx_messageInfo_GetGroupMemberRoleLevelReq.Merge(m, src) } func (m *GetGroupMemberRoleLevelReq) XXX_Size() int { - return xxx_messageInfo_GetGroupMemberRoleLevelReq.Size(m) + return m.Size() } func (m *GetGroupMemberRoleLevelReq) XXX_DiscardUnknown() { xxx_messageInfo_GetGroupMemberRoleLevelReq.DiscardUnknown(m) @@ -2608,29 +2977,35 @@ func (m *GetGroupMemberRoleLevelReq) GetRoleLevels() []int32 { } type GetGroupMemberRoleLevelResp struct { - Members []*sdkws.GroupMemberFullInfo `protobuf:"bytes,1,rep,name=members" json:"members,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` + Members []*sdkws.GroupMemberFullInfo `protobuf:"bytes,1,rep,name=members,proto3" json:"members"` } func (m *GetGroupMemberRoleLevelResp) Reset() { *m = GetGroupMemberRoleLevelResp{} } func (m *GetGroupMemberRoleLevelResp) String() string { return proto.CompactTextString(m) } func (*GetGroupMemberRoleLevelResp) ProtoMessage() {} func (*GetGroupMemberRoleLevelResp) Descriptor() ([]byte, []int) { - return fileDescriptor_group_a9155eb4f624bfe9, []int{61} + return fileDescriptor_6e2b031859d3bcfd, []int{61} } func (m *GetGroupMemberRoleLevelResp) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_GetGroupMemberRoleLevelResp.Unmarshal(m, b) + return m.Unmarshal(b) } func (m *GetGroupMemberRoleLevelResp) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_GetGroupMemberRoleLevelResp.Marshal(b, m, deterministic) + if deterministic { + return xxx_messageInfo_GetGroupMemberRoleLevelResp.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } } -func (dst *GetGroupMemberRoleLevelResp) XXX_Merge(src proto.Message) { - xxx_messageInfo_GetGroupMemberRoleLevelResp.Merge(dst, src) +func (m *GetGroupMemberRoleLevelResp) XXX_Merge(src proto.Message) { + xxx_messageInfo_GetGroupMemberRoleLevelResp.Merge(m, src) } func (m *GetGroupMemberRoleLevelResp) XXX_Size() int { - return xxx_messageInfo_GetGroupMemberRoleLevelResp.Size(m) + return m.Size() } func (m *GetGroupMemberRoleLevelResp) XXX_DiscardUnknown() { xxx_messageInfo_GetGroupMemberRoleLevelResp.DiscardUnknown(m) @@ -2710,6 +3085,128 @@ func init() { proto.RegisterType((*GetGroupMemberRoleLevelResp)(nil), "group.GetGroupMemberRoleLevelResp") } +func init() { proto.RegisterFile("group/group.proto", fileDescriptor_6e2b031859d3bcfd) } + +var fileDescriptor_6e2b031859d3bcfd = []byte{ + // 1851 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x59, 0x4f, 0x73, 0xdc, 0xb6, + 0x15, 0x37, 0xd7, 0x91, 0x6c, 0x3d, 0x6b, 0x2d, 0x09, 0xfa, 0x47, 0x53, 0xca, 0x5a, 0x45, 0x3c, + 0xad, 0xa7, 0x4d, 0xd7, 0x19, 0xcb, 0xf5, 0x24, 0xd3, 0xce, 0xa4, 0x8e, 0xdd, 0x28, 0x4a, 0x25, + 0xb9, 0xe6, 0x3a, 0x69, 0x27, 0xa7, 0xd0, 0xbb, 0x10, 0x43, 0x8b, 0x4b, 0x42, 0x04, 0xd7, 0xce, + 0xb1, 0x9d, 0x1e, 0x7a, 0x6a, 0xa7, 0xa7, 0x5e, 0x7a, 0xea, 0xad, 0x9f, 0xa2, 0xe7, 0x1e, 0x73, + 0xec, 0xb1, 0x63, 0x7f, 0x91, 0x0c, 0x01, 0x10, 0x04, 0x09, 0x70, 0x77, 0xe3, 0x3f, 0x97, 0x9d, + 0xe1, 0x7b, 0x0f, 0x78, 0x0f, 0x0f, 0xef, 0x3d, 0xfc, 0xde, 0x5b, 0x58, 0x0b, 0xb3, 0x74, 0x42, + 0x6f, 0xf1, 0xdf, 0x3e, 0xcd, 0xd2, 0x3c, 0x45, 0x0b, 0xfc, 0xc3, 0xbb, 0xca, 0x46, 0x67, 0xcf, + 0xd9, 0xad, 0xe7, 0x4c, 0x90, 0xbd, 0x0d, 0xf9, 0x9d, 0x05, 0x94, 0x92, 0x4c, 0x52, 0xf1, 0xbf, + 0x1d, 0xb8, 0x7a, 0x3f, 0x23, 0x41, 0x4e, 0x0e, 0x8a, 0x55, 0x3e, 0x39, 0x47, 0x7b, 0x70, 0x25, + 0x4a, 0xa2, 0xfc, 0x98, 0x8c, 0x9f, 0x90, 0x8c, 0xb9, 0xce, 0xde, 0xc5, 0x9b, 0x4b, 0xbe, 0x4e, + 0x42, 0x7d, 0x58, 0xe2, 0x3a, 0x0e, 0x93, 0xd3, 0xd4, 0xed, 0xec, 0x39, 0x37, 0xaf, 0xdc, 0x5e, + 0xed, 0xf3, 0xed, 0xfb, 0x07, 0x25, 0xdd, 0xaf, 0x44, 0x10, 0x86, 0xe5, 0x60, 0x34, 0x8e, 0x92, + 0x2f, 0x18, 0xc9, 0x0e, 0x1f, 0x30, 0xf7, 0x22, 0xdf, 0xb2, 0x46, 0x2b, 0xb4, 0xa6, 0xcf, 0x13, + 0x92, 0x89, 0x6f, 0xf7, 0x9d, 0x3d, 0xa7, 0xd0, 0xaa, 0x91, 0xf0, 0x3d, 0x58, 0xa9, 0x59, 0xca, + 0x68, 0xdd, 0x10, 0x67, 0xa6, 0x21, 0xb8, 0x0f, 0xab, 0x07, 0x24, 0xe7, 0x2c, 0xc6, 0x79, 0xe4, + 0x1c, 0x79, 0x70, 0x59, 0x08, 0x3c, 0x28, 0xcf, 0xaa, 0xbe, 0xf1, 0x6f, 0x60, 0xad, 0x21, 0xcf, + 0x28, 0xfa, 0x00, 0x40, 0xed, 0x28, 0x96, 0xd8, 0xb4, 0x6a, 0x32, 0x78, 0x00, 0x2b, 0x03, 0xb9, + 0x4d, 0xa9, 0xf5, 0xd7, 0xb0, 0xa2, 0x04, 0x3e, 0x4d, 0xb3, 0x01, 0xc9, 0xa5, 0xfd, 0x5b, 0xcd, + 0x9d, 0x04, 0xd7, 0x6f, 0x8a, 0x63, 0x04, 0xab, 0xf5, 0x4d, 0x19, 0xc5, 0xcf, 0xc0, 0x2b, 0xed, + 0xbd, 0x47, 0x69, 0x1c, 0x0d, 0x83, 0x3c, 0x4a, 0x93, 0xa3, 0x88, 0xe5, 0x85, 0xce, 0x0f, 0x01, + 0x68, 0x10, 0x46, 0x09, 0x27, 0x4a, 0x75, 0xae, 0x54, 0xe7, 0x93, 0xf3, 0x09, 0x61, 0xf9, 0xef, + 0x14, 0xdf, 0xd7, 0x64, 0x51, 0x0f, 0xe0, 0x34, 0x4b, 0xc7, 0xf2, 0x6e, 0x3a, 0xfc, 0x6e, 0x34, + 0x0a, 0x4e, 0x60, 0xa7, 0x55, 0x2f, 0xa3, 0x68, 0x03, 0x16, 0xf2, 0x34, 0x0f, 0x62, 0xae, 0xb3, + 0xeb, 0x8b, 0x0f, 0xf4, 0x11, 0x74, 0x43, 0x19, 0x73, 0x85, 0x6a, 0xe6, 0x76, 0xb8, 0x2b, 0xd7, + 0x75, 0x07, 0x48, 0x9e, 0x5f, 0x97, 0xc4, 0x14, 0x76, 0x0f, 0x48, 0x5e, 0x28, 0xf7, 0xc9, 0xf9, + 0x1b, 0x3d, 0xe9, 0x16, 0x2c, 0x4e, 0xf4, 0x53, 0xca, 0x2f, 0x4c, 0xe1, 0xdd, 0x29, 0x1a, 0xdf, + 0xc6, 0x19, 0xff, 0xe4, 0xc0, 0xe6, 0xe3, 0x2c, 0x48, 0xd8, 0x29, 0xc9, 0xb8, 0xdc, 0xc3, 0x22, + 0x17, 0x8a, 0xd3, 0xb9, 0x70, 0x49, 0x46, 0x28, 0x57, 0xb6, 0xe4, 0x97, 0x9f, 0xe8, 0xc7, 0x70, + 0x35, 0x8d, 0x47, 0x0f, 0xb5, 0x3c, 0x12, 0xa7, 0x68, 0x50, 0x0b, 0xb9, 0x84, 0x3c, 0xd7, 0xe5, + 0x2e, 0x0a, 0xb9, 0x3a, 0x15, 0xbb, 0xb0, 0x65, 0x33, 0x81, 0x51, 0xfc, 0x37, 0x07, 0x96, 0x3f, + 0x4f, 0xa3, 0x44, 0x55, 0x8d, 0x76, 0xa3, 0x7a, 0x00, 0x19, 0x39, 0x3f, 0x26, 0x8c, 0x05, 0x21, + 0x29, 0x83, 0xa7, 0xa2, 0x14, 0xfc, 0xa7, 0x69, 0x94, 0x0c, 0xd2, 0x49, 0x36, 0x24, 0xdc, 0x90, + 0x05, 0x5f, 0xa3, 0xa0, 0x1b, 0xd0, 0x8d, 0x92, 0x67, 0x51, 0xde, 0xa8, 0x0d, 0x75, 0x22, 0x5e, + 0x81, 0xae, 0x66, 0x0f, 0xa3, 0xf8, 0x9f, 0x0e, 0xec, 0x34, 0x23, 0xb2, 0x60, 0xa4, 0x09, 0x23, + 0x33, 0x0d, 0x9e, 0x16, 0xed, 0x05, 0xff, 0x9b, 0x20, 0x19, 0xc5, 0x64, 0x74, 0xcc, 0x42, 0xe9, + 0x39, 0x8d, 0x52, 0x94, 0x3b, 0xf1, 0xe5, 0x13, 0x36, 0x89, 0x73, 0x6e, 0xef, 0x82, 0x5f, 0xa3, + 0xe1, 0x1e, 0xec, 0xb6, 0x1b, 0xc7, 0x28, 0xbe, 0x09, 0xcb, 0x8f, 0x26, 0x51, 0x3e, 0xdb, 0xbd, + 0xc5, 0xc1, 0x35, 0x49, 0x46, 0xf1, 0x9f, 0x1d, 0xd8, 0x2c, 0xb3, 0x51, 0x54, 0xec, 0xd7, 0x4f, + 0x0b, 0x4d, 0x7d, 0xa7, 0xee, 0xac, 0x2d, 0x58, 0x3c, 0x8d, 0xe2, 0x9c, 0x64, 0xf2, 0xe6, 0xe4, + 0x17, 0x1e, 0xc1, 0x96, 0xcd, 0x88, 0xd6, 0x4c, 0xb9, 0x03, 0x97, 0xc6, 0xf2, 0xc5, 0x11, 0x39, + 0xe2, 0xe9, 0x39, 0x22, 0xb6, 0xf8, 0x74, 0x12, 0xc7, 0xbc, 0xd6, 0x95, 0xa2, 0xf8, 0xa8, 0xa9, + 0x45, 0x95, 0xf5, 0xf6, 0xeb, 0x75, 0xeb, 0x9a, 0x96, 0xaa, 0xdd, 0x1e, 0xc2, 0xb6, 0x75, 0x37, + 0x46, 0x75, 0xf3, 0x9c, 0xf9, 0xcd, 0x8b, 0x01, 0xfd, 0x36, 0x1a, 0x9e, 0x69, 0x32, 0xd3, 0x4d, + 0xbb, 0x01, 0xdd, 0xb3, 0x68, 0x78, 0x46, 0x46, 0xe5, 0x4b, 0x29, 0x0c, 0xac, 0x13, 0x0b, 0x97, + 0x67, 0x24, 0x60, 0x69, 0x22, 0x63, 0x4f, 0x7e, 0xe1, 0x4d, 0x58, 0x37, 0xb4, 0x31, 0x8a, 0xcf, + 0x79, 0x38, 0x14, 0xc9, 0x41, 0x46, 0x9c, 0xf7, 0xf6, 0xdf, 0x83, 0x3f, 0xf0, 0x6b, 0x31, 0x54, + 0xb6, 0x5e, 0xfe, 0x4d, 0x58, 0xe4, 0x2e, 0x28, 0xef, 0xde, 0x7c, 0x4e, 0x25, 0x1f, 0x53, 0xd8, + 0x38, 0xe4, 0x79, 0x5f, 0x68, 0x7a, 0x9c, 0xce, 0x51, 0x7e, 0x2a, 0x6f, 0x75, 0x74, 0x6f, 0x15, + 0x35, 0x50, 0x54, 0x90, 0x51, 0x1d, 0x96, 0x34, 0xa8, 0x78, 0x1b, 0x36, 0x2d, 0x1a, 0x19, 0xc5, + 0x4f, 0x61, 0x43, 0x3d, 0x7a, 0x71, 0x5c, 0x5d, 0xef, 0x5b, 0xc8, 0x32, 0x7c, 0x5c, 0xa5, 0xb4, + 0xa6, 0xeb, 0x95, 0xe3, 0xf2, 0x1f, 0x0e, 0x5c, 0xbe, 0x7f, 0x3c, 0xe0, 0x32, 0x3f, 0x14, 0x44, + 0xa1, 0x3e, 0xa0, 0x50, 0x3d, 0x06, 0x85, 0x53, 0x4e, 0x82, 0x71, 0x59, 0xd7, 0x2d, 0x1c, 0xf4, + 0x53, 0x58, 0xad, 0x53, 0xd5, 0x73, 0x63, 0xd0, 0xf1, 0x1f, 0x1d, 0x58, 0x56, 0x88, 0xeb, 0xf5, + 0x9c, 0xb9, 0x2b, 0x8f, 0xa5, 0x59, 0x57, 0x11, 0x74, 0x57, 0x5f, 0xac, 0xbb, 0xfa, 0x04, 0xba, + 0x9a, 0x05, 0xad, 0x21, 0xfb, 0x93, 0x46, 0xc8, 0xae, 0xf4, 0x05, 0x06, 0x2f, 0xdd, 0xaa, 0x22, + 0xf6, 0xe7, 0x15, 0x86, 0x9c, 0xa3, 0x04, 0xe0, 0xbf, 0x18, 0xd5, 0x9b, 0xdd, 0x3f, 0x1e, 0xbc, + 0xad, 0xea, 0xed, 0xc1, 0xe5, 0x49, 0x79, 0x83, 0xc2, 0x0f, 0xea, 0xdb, 0xac, 0xe0, 0xc2, 0x90, + 0x37, 0x5c, 0xc1, 0x7f, 0x06, 0x2b, 0x0f, 0x22, 0x36, 0x8e, 0x18, 0x9b, 0xe3, 0xad, 0x43, 0xb0, + 0x5a, 0x17, 0xe6, 0x69, 0x88, 0x8e, 0x27, 0xb2, 0x29, 0x98, 0xa7, 0xc6, 0xb6, 0x20, 0xbc, 0xe2, + 0xd5, 0x1e, 0x4f, 0x72, 0x32, 0x1a, 0x90, 0x61, 0x9a, 0x8c, 0x18, 0x77, 0x47, 0xd7, 0xaf, 0xd1, + 0x8a, 0x0a, 0x6b, 0xe8, 0x62, 0x14, 0x1f, 0x81, 0x7b, 0x3f, 0x48, 0x86, 0x24, 0x7e, 0x13, 0x86, + 0xe0, 0x1d, 0xb8, 0xd6, 0xb2, 0x9b, 0xc0, 0x05, 0x8a, 0x3c, 0x13, 0x17, 0x68, 0x92, 0x8c, 0xe2, + 0x3e, 0xa0, 0xc6, 0xbe, 0xd3, 0x37, 0xd8, 0x84, 0x75, 0x43, 0x9e, 0x51, 0x7c, 0x87, 0xf7, 0x18, + 0xa2, 0xb6, 0x0f, 0x26, 0x54, 0x22, 0xc3, 0xf2, 0x4d, 0xa9, 0x0e, 0xe5, 0xd4, 0x0e, 0x75, 0xc0, + 0x3b, 0x04, 0xfb, 0x2a, 0x46, 0xb5, 0x07, 0xc0, 0x99, 0xf1, 0x00, 0xec, 0xf3, 0xf4, 0xa8, 0xb6, + 0x98, 0xab, 0x8f, 0xfb, 0x9c, 0x87, 0xb2, 0xb1, 0xe8, 0x95, 0x9a, 0xb9, 0x7f, 0x75, 0x00, 0x0d, + 0x6a, 0x79, 0xc1, 0xab, 0xe2, 0x0f, 0x0f, 0xb8, 0x0f, 0xe1, 0x72, 0x12, 0x0d, 0xcf, 0x92, 0x32, + 0xf7, 0xae, 0xdc, 0xde, 0xed, 0x87, 0x69, 0x1a, 0xc6, 0x44, 0xf4, 0xe6, 0x4f, 0x26, 0xa7, 0xfd, + 0x41, 0x9e, 0x45, 0x49, 0xf8, 0x65, 0x10, 0x4f, 0x88, 0xaf, 0xa4, 0xd1, 0x5d, 0xb8, 0x74, 0x1a, + 0x0c, 0xc9, 0x17, 0xfe, 0x11, 0xc7, 0x96, 0xb3, 0x16, 0x96, 0xc2, 0xe8, 0x23, 0x58, 0xca, 0xd2, + 0x98, 0x1c, 0x91, 0x67, 0x24, 0x76, 0x17, 0xf8, 0xca, 0x1d, 0x63, 0xe5, 0x61, 0x92, 0xef, 0xdf, + 0x16, 0x0b, 0x2b, 0x69, 0xf4, 0x3e, 0x74, 0xc8, 0xb7, 0xee, 0xe2, 0x1c, 0xda, 0x3a, 0xe4, 0x5b, + 0x7c, 0x04, 0x9b, 0xa6, 0x8b, 0x8a, 0x4b, 0xda, 0x6f, 0x3e, 0x57, 0xd7, 0x64, 0xd9, 0xb4, 0x88, + 0xab, 0x12, 0xe1, 0xc2, 0x96, 0x6d, 0x37, 0x46, 0xf1, 0x2f, 0x2a, 0xc0, 0x76, 0xef, 0x09, 0xcb, + 0xb3, 0x60, 0x98, 0xcf, 0x13, 0x0e, 0x7f, 0x75, 0x60, 0xcd, 0x58, 0x34, 0xe5, 0x06, 0xdf, 0x97, + 0x63, 0x16, 0xa1, 0xfd, 0x64, 0x52, 0xfc, 0xf2, 0xcb, 0xec, 0xfa, 0x26, 0x03, 0x7d, 0x00, 0xeb, + 0x61, 0x1d, 0xf6, 0x7e, 0x16, 0xb0, 0x6f, 0xf8, 0x15, 0xbf, 0xe3, 0xdb, 0x58, 0x78, 0x04, 0xae, + 0xfd, 0x18, 0x8c, 0xa2, 0xcf, 0xe4, 0x6b, 0xab, 0x33, 0x4a, 0xe7, 0xb9, 0xd2, 0x79, 0xe6, 0x4a, + 0xcb, 0x1a, 0x7c, 0xc2, 0xb5, 0xf0, 0x87, 0x36, 0xd1, 0xab, 0xfa, 0x94, 0xb4, 0xad, 0x79, 0xb1, + 0xd3, 0xf0, 0xe2, 0x23, 0xb8, 0xd6, 0xb2, 0xdf, 0x2b, 0xe3, 0x92, 0xfd, 0x26, 0x00, 0x17, 0xb0, + 0x60, 0x7a, 0x9d, 0xba, 0x53, 0x79, 0xaf, 0xbe, 0x88, 0xd1, 0x62, 0xd5, 0x44, 0xa2, 0x3b, 0x11, + 0x04, 0xe5, 0x27, 0xfe, 0xb2, 0x1a, 0x95, 0xc8, 0xf2, 0x5a, 0xc6, 0xfa, 0xec, 0x6e, 0xb6, 0x94, + 0x14, 0x3e, 0x59, 0xf0, 0x35, 0x0a, 0x1e, 0x54, 0xa3, 0x10, 0x63, 0xdf, 0x57, 0xf5, 0xcb, 0xed, + 0xff, 0xac, 0x81, 0x98, 0xea, 0xa1, 0x5f, 0xc1, 0x95, 0x61, 0x35, 0x04, 0x43, 0x9b, 0x25, 0xea, + 0xa8, 0x8d, 0xf0, 0xbc, 0x2d, 0x1b, 0x99, 0x51, 0x74, 0x17, 0x96, 0x9e, 0x96, 0x4d, 0x32, 0x5a, + 0x97, 0x42, 0x7a, 0x1b, 0xef, 0x6d, 0x98, 0x44, 0xb1, 0xee, 0xbc, 0xec, 0x31, 0xd5, 0x3a, 0xbd, + 0x3f, 0x55, 0xeb, 0x6a, 0xad, 0x28, 0xfa, 0x04, 0xba, 0xa1, 0x3e, 0x3f, 0x43, 0xdb, 0x65, 0xc4, + 0x36, 0xa6, 0x70, 0x9e, 0x6b, 0x67, 0x30, 0x8a, 0x3e, 0x86, 0x65, 0xa6, 0xcd, 0xb9, 0xd0, 0x56, + 0xa3, 0x62, 0x94, 0x3b, 0x6c, 0x5b, 0xe9, 0x8c, 0xa2, 0xaf, 0x61, 0x3b, 0xb4, 0x0f, 0xa7, 0xd0, + 0x8f, 0x1a, 0x5a, 0xcd, 0x51, 0x92, 0x87, 0x67, 0x89, 0x30, 0x8a, 0x4e, 0xe1, 0x5a, 0xd8, 0x36, + 0x1c, 0x42, 0xef, 0x55, 0x1b, 0xb4, 0x0e, 0xac, 0xbc, 0x1b, 0xb3, 0x85, 0x18, 0x45, 0x8f, 0x00, + 0xe5, 0xc6, 0x38, 0x06, 0xed, 0xca, 0xb5, 0xd6, 0x61, 0x91, 0xf7, 0xee, 0x14, 0x2e, 0xa3, 0x68, + 0x08, 0x6e, 0xd8, 0x32, 0x87, 0x40, 0xb8, 0x56, 0x5e, 0xac, 0x53, 0x14, 0xef, 0xbd, 0x99, 0x32, + 0xc2, 0xee, 0xd0, 0x98, 0x05, 0x28, 0xbb, 0xad, 0xb3, 0x0a, 0x65, 0x77, 0xcb, 0x10, 0xe1, 0x31, + 0xac, 0x87, 0x66, 0xab, 0x8e, 0xec, 0xab, 0x54, 0x94, 0xf5, 0xa6, 0xb1, 0x79, 0xb1, 0x5d, 0x39, + 0xab, 0x77, 0xd0, 0xa8, 0x7c, 0xa0, 0xcc, 0x3e, 0xde, 0xf3, 0xda, 0x58, 0xea, 0xc8, 0x8d, 0x0e, + 0x58, 0x3f, 0xb2, 0xd9, 0x8f, 0xeb, 0x47, 0xb6, 0xb5, 0xce, 0x27, 0xb0, 0x16, 0x35, 0x1b, 0x51, + 0xb4, 0x23, 0xd7, 0xd8, 0x9a, 0x62, 0x6f, 0xb7, 0x9d, 0x29, 0x92, 0x5a, 0x25, 0xa7, 0x4a, 0x6a, + 0xbd, 0xf9, 0x52, 0x49, 0x5d, 0xef, 0x87, 0x8c, 0xdb, 0x2c, 0xfa, 0x82, 0x96, 0xdb, 0x94, 0xbd, + 0x4b, 0xcb, 0x6d, 0xaa, 0x86, 0xe2, 0x63, 0x58, 0x1e, 0x69, 0xb8, 0x5e, 0xe5, 0x78, 0xa3, 0x33, + 0x50, 0x39, 0xde, 0x6c, 0x02, 0x8a, 0x8b, 0x1b, 0xd7, 0xd1, 0xb2, 0xba, 0x38, 0x13, 0x93, 0xab, + 0x8b, 0xb3, 0x00, 0x6c, 0xf4, 0x15, 0x6c, 0x0e, 0x6d, 0xe8, 0x1b, 0x5d, 0x2f, 0x6b, 0x6a, 0x0b, + 0xd2, 0xf7, 0xf6, 0xa6, 0x0b, 0x08, 0x8f, 0x2b, 0x2b, 0x95, 0xc7, 0x75, 0x34, 0xae, 0x3c, 0x5e, + 0x83, 0xdc, 0xc5, 0xe9, 0x1a, 0x36, 0xa9, 0xd3, 0x99, 0x88, 0x5e, 0x9d, 0xce, 0x02, 0xde, 0x65, + 0x2d, 0xb4, 0xc1, 0x70, 0xbd, 0x16, 0xb6, 0x80, 0x7b, 0xbd, 0x16, 0xb6, 0x22, 0x79, 0x11, 0x1d, + 0x0d, 0xa8, 0xad, 0x47, 0x87, 0x09, 0xdd, 0xf5, 0xe8, 0xb0, 0x61, 0xf4, 0x47, 0x80, 0x98, 0x09, + 0xb8, 0x77, 0xdb, 0x91, 0xa3, 0xb6, 0xa5, 0x1d, 0x38, 0xa2, 0xdf, 0xc3, 0x46, 0x68, 0x41, 0x5c, + 0xa8, 0x59, 0x20, 0x1a, 0xa8, 0xd2, 0xbb, 0x3e, 0x95, 0x2f, 0xc2, 0x27, 0xb4, 0x81, 0x22, 0x74, + 0xbd, 0x5e, 0xe1, 0x0d, 0x08, 0xa6, 0xc2, 0xa7, 0x1d, 0x53, 0x69, 0x46, 0xeb, 0x40, 0x07, 0xd9, + 0xab, 0x9a, 0x82, 0x4e, 0x86, 0xd1, 0x06, 0x4a, 0xfa, 0xba, 0x09, 0xbb, 0x14, 0x66, 0x31, 0x5e, + 0x48, 0x13, 0x2b, 0x19, 0x2f, 0xa4, 0x05, 0xf6, 0x7c, 0x72, 0xf7, 0xbf, 0x2f, 0x7a, 0xce, 0x77, + 0x2f, 0x7a, 0xce, 0xff, 0x5f, 0xf4, 0x9c, 0xbf, 0xbf, 0xec, 0x5d, 0xf8, 0xee, 0x65, 0xef, 0xc2, + 0xff, 0x5e, 0xf6, 0x2e, 0x7c, 0xb5, 0xfb, 0x90, 0x92, 0xe4, 0xf0, 0xf8, 0x16, 0x3d, 0x0b, 0x6f, + 0xf1, 0x7e, 0x42, 0xfc, 0x97, 0xf9, 0x4b, 0xfe, 0xfb, 0x64, 0x91, 0x93, 0xf6, 0xbf, 0x0f, 0x00, + 0x00, 0xff, 0xff, 0x66, 0xea, 0x47, 0x60, 0xe7, 0x1c, 0x00, 0x00, +} + // Reference imports to suppress errors if they are not otherwise used. var _ context.Context var _ grpc.ClientConn @@ -2718,63 +3215,64 @@ var _ grpc.ClientConn // is compatible with the grpc package it is being compiled against. const _ = grpc.SupportPackageIsVersion4 -// Client API for Group service - +// GroupClient is the client API for Group service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. type GroupClient interface { - // 创建群 + //创建群 CreateGroup(ctx context.Context, in *CreateGroupReq, opts ...grpc.CallOption) (*CreateGroupResp, error) - // 申请加群 + //申请加群 JoinGroup(ctx context.Context, in *JoinGroupReq, opts ...grpc.CallOption) (*JoinGroupResp, error) - // 退出群 + //退出群 QuitGroup(ctx context.Context, in *QuitGroupReq, opts ...grpc.CallOption) (*QuitGroupResp, error) - // 获取指定群信息 + //获取指定群信息 GetGroupsInfo(ctx context.Context, in *GetGroupsInfoReq, opts ...grpc.CallOption) (*GetGroupsInfoResp, error) - // 设置群信息 + //设置群信息 SetGroupInfo(ctx context.Context, in *SetGroupInfoReq, opts ...grpc.CallOption) (*SetGroupInfoResp, error) - // (以管理员或群主身份)获取群的加群申请 + //(以管理员或群主身份)获取群的加群申请 GetGroupApplicationList(ctx context.Context, in *GetGroupApplicationListReq, opts ...grpc.CallOption) (*GetGroupApplicationListResp, error) - // 获取用户自己的主动加群申请 + //获取用户自己的主动加群申请 GetUserReqApplicationList(ctx context.Context, in *GetUserReqApplicationListReq, opts ...grpc.CallOption) (*GetUserReqApplicationListResp, error) - // 转让群主 + //转让群主 TransferGroupOwner(ctx context.Context, in *TransferGroupOwnerReq, opts ...grpc.CallOption) (*TransferGroupOwnerResp, error) - // 群主或管理员处理进群申请 + //群主或管理员处理进群申请 GroupApplicationResponse(ctx context.Context, in *GroupApplicationResponseReq, opts ...grpc.CallOption) (*GroupApplicationResponseResp, error) - // 获取某个群的群成员 + //获取某个群的群成员 GetGroupMemberList(ctx context.Context, in *GetGroupMemberListReq, opts ...grpc.CallOption) (*GetGroupMemberListResp, error) - // 获取某个群的指定群成员 + //获取某个群的指定群成员 GetGroupMembersInfo(ctx context.Context, in *GetGroupMembersInfoReq, opts ...grpc.CallOption) (*GetGroupMembersInfoResp, error) - // 踢出群 + //踢出群 KickGroupMember(ctx context.Context, in *KickGroupMemberReq, opts ...grpc.CallOption) (*KickGroupMemberResp, error) - // 获取某个人已加入群 + //获取某个人已加入群 GetJoinedGroupList(ctx context.Context, in *GetJoinedGroupListReq, opts ...grpc.CallOption) (*GetJoinedGroupListResp, error) - // 邀请某些人进群 + //邀请某些人进群 InviteUserToGroup(ctx context.Context, in *InviteUserToGroupReq, opts ...grpc.CallOption) (*InviteUserToGroupResp, error) GetGroups(ctx context.Context, in *GetGroupsReq, opts ...grpc.CallOption) (*GetGroupsResp, error) GetGroupMembersCMS(ctx context.Context, in *GetGroupMembersCMSReq, opts ...grpc.CallOption) (*GetGroupMembersCMSResp, error) - // 解散群 + //解散群 DismissGroup(ctx context.Context, in *DismissGroupReq, opts ...grpc.CallOption) (*DismissGroupResp, error) - // 对某个群成员禁言 + //对某个群成员禁言 MuteGroupMember(ctx context.Context, in *MuteGroupMemberReq, opts ...grpc.CallOption) (*MuteGroupMemberResp, error) - // 对某个群成员取消禁言 + //对某个群成员取消禁言 CancelMuteGroupMember(ctx context.Context, in *CancelMuteGroupMemberReq, opts ...grpc.CallOption) (*CancelMuteGroupMemberResp, error) - // 对某个群禁言 + //对某个群禁言 MuteGroup(ctx context.Context, in *MuteGroupReq, opts ...grpc.CallOption) (*MuteGroupResp, error) - // 对某个群取消禁言 + //对某个群取消禁言 CancelMuteGroup(ctx context.Context, in *CancelMuteGroupReq, opts ...grpc.CallOption) (*CancelMuteGroupResp, error) - // 获取某个用户加入的超级群 + //获取某个用户加入的超级群 GetJoinedSuperGroupList(ctx context.Context, in *GetJoinedSuperGroupListReq, opts ...grpc.CallOption) (*GetJoinedSuperGroupListResp, error) - // 获取指定的超级群信息 + //获取指定的超级群信息 GetSuperGroupsInfo(ctx context.Context, in *GetSuperGroupsInfoReq, opts ...grpc.CallOption) (*GetSuperGroupsInfoResp, error) - // 设置群成员昵称 - // 设置群成员信息 + //设置群成员昵称 + //设置群成员信息 SetGroupMemberInfo(ctx context.Context, in *SetGroupMemberInfoReq, opts ...grpc.CallOption) (*SetGroupMemberInfoResp, error) - // 获取群信息hash值 + //获取群信息hash值 GetGroupAbstractInfo(ctx context.Context, in *GetGroupAbstractInfoReq, opts ...grpc.CallOption) (*GetGroupAbstractInfoResp, error) - // 获取某个用户在指定群中的信息 + //获取某个用户在指定群中的信息 GetUserInGroupMembers(ctx context.Context, in *GetUserInGroupMembersReq, opts ...grpc.CallOption) (*GetUserInGroupMembersResp, error) - // 获取群成员用户ID + //获取群成员用户ID GetGroupMemberUserID(ctx context.Context, in *GetGroupMemberUserIDReq, opts ...grpc.CallOption) (*GetGroupMemberUserIDResp, error) - // 查询群组中对应级别的成员 + //查询群组中对应级别的成员 GetGroupMemberRoleLevel(ctx context.Context, in *GetGroupMemberRoleLevelReq, opts ...grpc.CallOption) (*GetGroupMemberRoleLevelResp, error) } @@ -2788,7 +3286,7 @@ func NewGroupClient(cc *grpc.ClientConn) GroupClient { func (c *groupClient) CreateGroup(ctx context.Context, in *CreateGroupReq, opts ...grpc.CallOption) (*CreateGroupResp, error) { out := new(CreateGroupResp) - err := grpc.Invoke(ctx, "/group.group/createGroup", in, out, c.cc, opts...) + err := c.cc.Invoke(ctx, "/group.group/createGroup", in, out, opts...) if err != nil { return nil, err } @@ -2797,7 +3295,7 @@ func (c *groupClient) CreateGroup(ctx context.Context, in *CreateGroupReq, opts func (c *groupClient) JoinGroup(ctx context.Context, in *JoinGroupReq, opts ...grpc.CallOption) (*JoinGroupResp, error) { out := new(JoinGroupResp) - err := grpc.Invoke(ctx, "/group.group/joinGroup", in, out, c.cc, opts...) + err := c.cc.Invoke(ctx, "/group.group/joinGroup", in, out, opts...) if err != nil { return nil, err } @@ -2806,7 +3304,7 @@ func (c *groupClient) JoinGroup(ctx context.Context, in *JoinGroupReq, opts ...g func (c *groupClient) QuitGroup(ctx context.Context, in *QuitGroupReq, opts ...grpc.CallOption) (*QuitGroupResp, error) { out := new(QuitGroupResp) - err := grpc.Invoke(ctx, "/group.group/quitGroup", in, out, c.cc, opts...) + err := c.cc.Invoke(ctx, "/group.group/quitGroup", in, out, opts...) if err != nil { return nil, err } @@ -2815,7 +3313,7 @@ func (c *groupClient) QuitGroup(ctx context.Context, in *QuitGroupReq, opts ...g func (c *groupClient) GetGroupsInfo(ctx context.Context, in *GetGroupsInfoReq, opts ...grpc.CallOption) (*GetGroupsInfoResp, error) { out := new(GetGroupsInfoResp) - err := grpc.Invoke(ctx, "/group.group/getGroupsInfo", in, out, c.cc, opts...) + err := c.cc.Invoke(ctx, "/group.group/getGroupsInfo", in, out, opts...) if err != nil { return nil, err } @@ -2824,7 +3322,7 @@ func (c *groupClient) GetGroupsInfo(ctx context.Context, in *GetGroupsInfoReq, o func (c *groupClient) SetGroupInfo(ctx context.Context, in *SetGroupInfoReq, opts ...grpc.CallOption) (*SetGroupInfoResp, error) { out := new(SetGroupInfoResp) - err := grpc.Invoke(ctx, "/group.group/setGroupInfo", in, out, c.cc, opts...) + err := c.cc.Invoke(ctx, "/group.group/setGroupInfo", in, out, opts...) if err != nil { return nil, err } @@ -2833,7 +3331,7 @@ func (c *groupClient) SetGroupInfo(ctx context.Context, in *SetGroupInfoReq, opt func (c *groupClient) GetGroupApplicationList(ctx context.Context, in *GetGroupApplicationListReq, opts ...grpc.CallOption) (*GetGroupApplicationListResp, error) { out := new(GetGroupApplicationListResp) - err := grpc.Invoke(ctx, "/group.group/getGroupApplicationList", in, out, c.cc, opts...) + err := c.cc.Invoke(ctx, "/group.group/getGroupApplicationList", in, out, opts...) if err != nil { return nil, err } @@ -2842,7 +3340,7 @@ func (c *groupClient) GetGroupApplicationList(ctx context.Context, in *GetGroupA func (c *groupClient) GetUserReqApplicationList(ctx context.Context, in *GetUserReqApplicationListReq, opts ...grpc.CallOption) (*GetUserReqApplicationListResp, error) { out := new(GetUserReqApplicationListResp) - err := grpc.Invoke(ctx, "/group.group/getUserReqApplicationList", in, out, c.cc, opts...) + err := c.cc.Invoke(ctx, "/group.group/getUserReqApplicationList", in, out, opts...) if err != nil { return nil, err } @@ -2851,7 +3349,7 @@ func (c *groupClient) GetUserReqApplicationList(ctx context.Context, in *GetUser func (c *groupClient) TransferGroupOwner(ctx context.Context, in *TransferGroupOwnerReq, opts ...grpc.CallOption) (*TransferGroupOwnerResp, error) { out := new(TransferGroupOwnerResp) - err := grpc.Invoke(ctx, "/group.group/transferGroupOwner", in, out, c.cc, opts...) + err := c.cc.Invoke(ctx, "/group.group/transferGroupOwner", in, out, opts...) if err != nil { return nil, err } @@ -2860,7 +3358,7 @@ func (c *groupClient) TransferGroupOwner(ctx context.Context, in *TransferGroupO func (c *groupClient) GroupApplicationResponse(ctx context.Context, in *GroupApplicationResponseReq, opts ...grpc.CallOption) (*GroupApplicationResponseResp, error) { out := new(GroupApplicationResponseResp) - err := grpc.Invoke(ctx, "/group.group/groupApplicationResponse", in, out, c.cc, opts...) + err := c.cc.Invoke(ctx, "/group.group/groupApplicationResponse", in, out, opts...) if err != nil { return nil, err } @@ -2869,7 +3367,7 @@ func (c *groupClient) GroupApplicationResponse(ctx context.Context, in *GroupApp func (c *groupClient) GetGroupMemberList(ctx context.Context, in *GetGroupMemberListReq, opts ...grpc.CallOption) (*GetGroupMemberListResp, error) { out := new(GetGroupMemberListResp) - err := grpc.Invoke(ctx, "/group.group/getGroupMemberList", in, out, c.cc, opts...) + err := c.cc.Invoke(ctx, "/group.group/getGroupMemberList", in, out, opts...) if err != nil { return nil, err } @@ -2878,7 +3376,7 @@ func (c *groupClient) GetGroupMemberList(ctx context.Context, in *GetGroupMember func (c *groupClient) GetGroupMembersInfo(ctx context.Context, in *GetGroupMembersInfoReq, opts ...grpc.CallOption) (*GetGroupMembersInfoResp, error) { out := new(GetGroupMembersInfoResp) - err := grpc.Invoke(ctx, "/group.group/getGroupMembersInfo", in, out, c.cc, opts...) + err := c.cc.Invoke(ctx, "/group.group/getGroupMembersInfo", in, out, opts...) if err != nil { return nil, err } @@ -2887,7 +3385,7 @@ func (c *groupClient) GetGroupMembersInfo(ctx context.Context, in *GetGroupMembe func (c *groupClient) KickGroupMember(ctx context.Context, in *KickGroupMemberReq, opts ...grpc.CallOption) (*KickGroupMemberResp, error) { out := new(KickGroupMemberResp) - err := grpc.Invoke(ctx, "/group.group/kickGroupMember", in, out, c.cc, opts...) + err := c.cc.Invoke(ctx, "/group.group/kickGroupMember", in, out, opts...) if err != nil { return nil, err } @@ -2896,7 +3394,7 @@ func (c *groupClient) KickGroupMember(ctx context.Context, in *KickGroupMemberRe func (c *groupClient) GetJoinedGroupList(ctx context.Context, in *GetJoinedGroupListReq, opts ...grpc.CallOption) (*GetJoinedGroupListResp, error) { out := new(GetJoinedGroupListResp) - err := grpc.Invoke(ctx, "/group.group/getJoinedGroupList", in, out, c.cc, opts...) + err := c.cc.Invoke(ctx, "/group.group/getJoinedGroupList", in, out, opts...) if err != nil { return nil, err } @@ -2905,7 +3403,7 @@ func (c *groupClient) GetJoinedGroupList(ctx context.Context, in *GetJoinedGroup func (c *groupClient) InviteUserToGroup(ctx context.Context, in *InviteUserToGroupReq, opts ...grpc.CallOption) (*InviteUserToGroupResp, error) { out := new(InviteUserToGroupResp) - err := grpc.Invoke(ctx, "/group.group/inviteUserToGroup", in, out, c.cc, opts...) + err := c.cc.Invoke(ctx, "/group.group/inviteUserToGroup", in, out, opts...) if err != nil { return nil, err } @@ -2914,7 +3412,7 @@ func (c *groupClient) InviteUserToGroup(ctx context.Context, in *InviteUserToGro func (c *groupClient) GetGroups(ctx context.Context, in *GetGroupsReq, opts ...grpc.CallOption) (*GetGroupsResp, error) { out := new(GetGroupsResp) - err := grpc.Invoke(ctx, "/group.group/getGroups", in, out, c.cc, opts...) + err := c.cc.Invoke(ctx, "/group.group/getGroups", in, out, opts...) if err != nil { return nil, err } @@ -2923,7 +3421,7 @@ func (c *groupClient) GetGroups(ctx context.Context, in *GetGroupsReq, opts ...g func (c *groupClient) GetGroupMembersCMS(ctx context.Context, in *GetGroupMembersCMSReq, opts ...grpc.CallOption) (*GetGroupMembersCMSResp, error) { out := new(GetGroupMembersCMSResp) - err := grpc.Invoke(ctx, "/group.group/getGroupMembersCMS", in, out, c.cc, opts...) + err := c.cc.Invoke(ctx, "/group.group/getGroupMembersCMS", in, out, opts...) if err != nil { return nil, err } @@ -2932,7 +3430,7 @@ func (c *groupClient) GetGroupMembersCMS(ctx context.Context, in *GetGroupMember func (c *groupClient) DismissGroup(ctx context.Context, in *DismissGroupReq, opts ...grpc.CallOption) (*DismissGroupResp, error) { out := new(DismissGroupResp) - err := grpc.Invoke(ctx, "/group.group/dismissGroup", in, out, c.cc, opts...) + err := c.cc.Invoke(ctx, "/group.group/dismissGroup", in, out, opts...) if err != nil { return nil, err } @@ -2941,7 +3439,7 @@ func (c *groupClient) DismissGroup(ctx context.Context, in *DismissGroupReq, opt func (c *groupClient) MuteGroupMember(ctx context.Context, in *MuteGroupMemberReq, opts ...grpc.CallOption) (*MuteGroupMemberResp, error) { out := new(MuteGroupMemberResp) - err := grpc.Invoke(ctx, "/group.group/muteGroupMember", in, out, c.cc, opts...) + err := c.cc.Invoke(ctx, "/group.group/muteGroupMember", in, out, opts...) if err != nil { return nil, err } @@ -2950,7 +3448,7 @@ func (c *groupClient) MuteGroupMember(ctx context.Context, in *MuteGroupMemberRe func (c *groupClient) CancelMuteGroupMember(ctx context.Context, in *CancelMuteGroupMemberReq, opts ...grpc.CallOption) (*CancelMuteGroupMemberResp, error) { out := new(CancelMuteGroupMemberResp) - err := grpc.Invoke(ctx, "/group.group/cancelMuteGroupMember", in, out, c.cc, opts...) + err := c.cc.Invoke(ctx, "/group.group/cancelMuteGroupMember", in, out, opts...) if err != nil { return nil, err } @@ -2959,7 +3457,7 @@ func (c *groupClient) CancelMuteGroupMember(ctx context.Context, in *CancelMuteG func (c *groupClient) MuteGroup(ctx context.Context, in *MuteGroupReq, opts ...grpc.CallOption) (*MuteGroupResp, error) { out := new(MuteGroupResp) - err := grpc.Invoke(ctx, "/group.group/muteGroup", in, out, c.cc, opts...) + err := c.cc.Invoke(ctx, "/group.group/muteGroup", in, out, opts...) if err != nil { return nil, err } @@ -2968,7 +3466,7 @@ func (c *groupClient) MuteGroup(ctx context.Context, in *MuteGroupReq, opts ...g func (c *groupClient) CancelMuteGroup(ctx context.Context, in *CancelMuteGroupReq, opts ...grpc.CallOption) (*CancelMuteGroupResp, error) { out := new(CancelMuteGroupResp) - err := grpc.Invoke(ctx, "/group.group/cancelMuteGroup", in, out, c.cc, opts...) + err := c.cc.Invoke(ctx, "/group.group/cancelMuteGroup", in, out, opts...) if err != nil { return nil, err } @@ -2977,7 +3475,7 @@ func (c *groupClient) CancelMuteGroup(ctx context.Context, in *CancelMuteGroupRe func (c *groupClient) GetJoinedSuperGroupList(ctx context.Context, in *GetJoinedSuperGroupListReq, opts ...grpc.CallOption) (*GetJoinedSuperGroupListResp, error) { out := new(GetJoinedSuperGroupListResp) - err := grpc.Invoke(ctx, "/group.group/getJoinedSuperGroupList", in, out, c.cc, opts...) + err := c.cc.Invoke(ctx, "/group.group/getJoinedSuperGroupList", in, out, opts...) if err != nil { return nil, err } @@ -2986,7 +3484,7 @@ func (c *groupClient) GetJoinedSuperGroupList(ctx context.Context, in *GetJoined func (c *groupClient) GetSuperGroupsInfo(ctx context.Context, in *GetSuperGroupsInfoReq, opts ...grpc.CallOption) (*GetSuperGroupsInfoResp, error) { out := new(GetSuperGroupsInfoResp) - err := grpc.Invoke(ctx, "/group.group/getSuperGroupsInfo", in, out, c.cc, opts...) + err := c.cc.Invoke(ctx, "/group.group/getSuperGroupsInfo", in, out, opts...) if err != nil { return nil, err } @@ -2995,7 +3493,7 @@ func (c *groupClient) GetSuperGroupsInfo(ctx context.Context, in *GetSuperGroups func (c *groupClient) SetGroupMemberInfo(ctx context.Context, in *SetGroupMemberInfoReq, opts ...grpc.CallOption) (*SetGroupMemberInfoResp, error) { out := new(SetGroupMemberInfoResp) - err := grpc.Invoke(ctx, "/group.group/setGroupMemberInfo", in, out, c.cc, opts...) + err := c.cc.Invoke(ctx, "/group.group/setGroupMemberInfo", in, out, opts...) if err != nil { return nil, err } @@ -3004,7 +3502,7 @@ func (c *groupClient) SetGroupMemberInfo(ctx context.Context, in *SetGroupMember func (c *groupClient) GetGroupAbstractInfo(ctx context.Context, in *GetGroupAbstractInfoReq, opts ...grpc.CallOption) (*GetGroupAbstractInfoResp, error) { out := new(GetGroupAbstractInfoResp) - err := grpc.Invoke(ctx, "/group.group/getGroupAbstractInfo", in, out, c.cc, opts...) + err := c.cc.Invoke(ctx, "/group.group/getGroupAbstractInfo", in, out, opts...) if err != nil { return nil, err } @@ -3013,7 +3511,7 @@ func (c *groupClient) GetGroupAbstractInfo(ctx context.Context, in *GetGroupAbst func (c *groupClient) GetUserInGroupMembers(ctx context.Context, in *GetUserInGroupMembersReq, opts ...grpc.CallOption) (*GetUserInGroupMembersResp, error) { out := new(GetUserInGroupMembersResp) - err := grpc.Invoke(ctx, "/group.group/getUserInGroupMembers", in, out, c.cc, opts...) + err := c.cc.Invoke(ctx, "/group.group/getUserInGroupMembers", in, out, opts...) if err != nil { return nil, err } @@ -3022,7 +3520,7 @@ func (c *groupClient) GetUserInGroupMembers(ctx context.Context, in *GetUserInGr func (c *groupClient) GetGroupMemberUserID(ctx context.Context, in *GetGroupMemberUserIDReq, opts ...grpc.CallOption) (*GetGroupMemberUserIDResp, error) { out := new(GetGroupMemberUserIDResp) - err := grpc.Invoke(ctx, "/group.group/getGroupMemberUserID", in, out, c.cc, opts...) + err := c.cc.Invoke(ctx, "/group.group/getGroupMemberUserID", in, out, opts...) if err != nil { return nil, err } @@ -3031,73 +3529,161 @@ func (c *groupClient) GetGroupMemberUserID(ctx context.Context, in *GetGroupMemb func (c *groupClient) GetGroupMemberRoleLevel(ctx context.Context, in *GetGroupMemberRoleLevelReq, opts ...grpc.CallOption) (*GetGroupMemberRoleLevelResp, error) { out := new(GetGroupMemberRoleLevelResp) - err := grpc.Invoke(ctx, "/group.group/GetGroupMemberRoleLevel", in, out, c.cc, opts...) + err := c.cc.Invoke(ctx, "/group.group/GetGroupMemberRoleLevel", in, out, opts...) if err != nil { return nil, err } return out, nil } -// Server API for Group service - +// GroupServer is the server API for Group service. type GroupServer interface { - // 创建群 + //创建群 CreateGroup(context.Context, *CreateGroupReq) (*CreateGroupResp, error) - // 申请加群 + //申请加群 JoinGroup(context.Context, *JoinGroupReq) (*JoinGroupResp, error) - // 退出群 + //退出群 QuitGroup(context.Context, *QuitGroupReq) (*QuitGroupResp, error) - // 获取指定群信息 + //获取指定群信息 GetGroupsInfo(context.Context, *GetGroupsInfoReq) (*GetGroupsInfoResp, error) - // 设置群信息 + //设置群信息 SetGroupInfo(context.Context, *SetGroupInfoReq) (*SetGroupInfoResp, error) - // (以管理员或群主身份)获取群的加群申请 + //(以管理员或群主身份)获取群的加群申请 GetGroupApplicationList(context.Context, *GetGroupApplicationListReq) (*GetGroupApplicationListResp, error) - // 获取用户自己的主动加群申请 + //获取用户自己的主动加群申请 GetUserReqApplicationList(context.Context, *GetUserReqApplicationListReq) (*GetUserReqApplicationListResp, error) - // 转让群主 + //转让群主 TransferGroupOwner(context.Context, *TransferGroupOwnerReq) (*TransferGroupOwnerResp, error) - // 群主或管理员处理进群申请 + //群主或管理员处理进群申请 GroupApplicationResponse(context.Context, *GroupApplicationResponseReq) (*GroupApplicationResponseResp, error) - // 获取某个群的群成员 + //获取某个群的群成员 GetGroupMemberList(context.Context, *GetGroupMemberListReq) (*GetGroupMemberListResp, error) - // 获取某个群的指定群成员 + //获取某个群的指定群成员 GetGroupMembersInfo(context.Context, *GetGroupMembersInfoReq) (*GetGroupMembersInfoResp, error) - // 踢出群 + //踢出群 KickGroupMember(context.Context, *KickGroupMemberReq) (*KickGroupMemberResp, error) - // 获取某个人已加入群 + //获取某个人已加入群 GetJoinedGroupList(context.Context, *GetJoinedGroupListReq) (*GetJoinedGroupListResp, error) - // 邀请某些人进群 + //邀请某些人进群 InviteUserToGroup(context.Context, *InviteUserToGroupReq) (*InviteUserToGroupResp, error) GetGroups(context.Context, *GetGroupsReq) (*GetGroupsResp, error) GetGroupMembersCMS(context.Context, *GetGroupMembersCMSReq) (*GetGroupMembersCMSResp, error) - // 解散群 + //解散群 DismissGroup(context.Context, *DismissGroupReq) (*DismissGroupResp, error) - // 对某个群成员禁言 + //对某个群成员禁言 MuteGroupMember(context.Context, *MuteGroupMemberReq) (*MuteGroupMemberResp, error) - // 对某个群成员取消禁言 + //对某个群成员取消禁言 CancelMuteGroupMember(context.Context, *CancelMuteGroupMemberReq) (*CancelMuteGroupMemberResp, error) - // 对某个群禁言 + //对某个群禁言 MuteGroup(context.Context, *MuteGroupReq) (*MuteGroupResp, error) - // 对某个群取消禁言 + //对某个群取消禁言 CancelMuteGroup(context.Context, *CancelMuteGroupReq) (*CancelMuteGroupResp, error) - // 获取某个用户加入的超级群 + //获取某个用户加入的超级群 GetJoinedSuperGroupList(context.Context, *GetJoinedSuperGroupListReq) (*GetJoinedSuperGroupListResp, error) - // 获取指定的超级群信息 + //获取指定的超级群信息 GetSuperGroupsInfo(context.Context, *GetSuperGroupsInfoReq) (*GetSuperGroupsInfoResp, error) - // 设置群成员昵称 - // 设置群成员信息 + //设置群成员昵称 + //设置群成员信息 SetGroupMemberInfo(context.Context, *SetGroupMemberInfoReq) (*SetGroupMemberInfoResp, error) - // 获取群信息hash值 + //获取群信息hash值 GetGroupAbstractInfo(context.Context, *GetGroupAbstractInfoReq) (*GetGroupAbstractInfoResp, error) - // 获取某个用户在指定群中的信息 + //获取某个用户在指定群中的信息 GetUserInGroupMembers(context.Context, *GetUserInGroupMembersReq) (*GetUserInGroupMembersResp, error) - // 获取群成员用户ID + //获取群成员用户ID GetGroupMemberUserID(context.Context, *GetGroupMemberUserIDReq) (*GetGroupMemberUserIDResp, error) - // 查询群组中对应级别的成员 + //查询群组中对应级别的成员 GetGroupMemberRoleLevel(context.Context, *GetGroupMemberRoleLevelReq) (*GetGroupMemberRoleLevelResp, error) } +// UnimplementedGroupServer can be embedded to have forward compatible implementations. +type UnimplementedGroupServer struct { +} + +func (*UnimplementedGroupServer) CreateGroup(ctx context.Context, req *CreateGroupReq) (*CreateGroupResp, error) { + return nil, status.Errorf(codes.Unimplemented, "method CreateGroup not implemented") +} +func (*UnimplementedGroupServer) JoinGroup(ctx context.Context, req *JoinGroupReq) (*JoinGroupResp, error) { + return nil, status.Errorf(codes.Unimplemented, "method JoinGroup not implemented") +} +func (*UnimplementedGroupServer) QuitGroup(ctx context.Context, req *QuitGroupReq) (*QuitGroupResp, error) { + return nil, status.Errorf(codes.Unimplemented, "method QuitGroup not implemented") +} +func (*UnimplementedGroupServer) GetGroupsInfo(ctx context.Context, req *GetGroupsInfoReq) (*GetGroupsInfoResp, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetGroupsInfo not implemented") +} +func (*UnimplementedGroupServer) SetGroupInfo(ctx context.Context, req *SetGroupInfoReq) (*SetGroupInfoResp, error) { + return nil, status.Errorf(codes.Unimplemented, "method SetGroupInfo not implemented") +} +func (*UnimplementedGroupServer) GetGroupApplicationList(ctx context.Context, req *GetGroupApplicationListReq) (*GetGroupApplicationListResp, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetGroupApplicationList not implemented") +} +func (*UnimplementedGroupServer) GetUserReqApplicationList(ctx context.Context, req *GetUserReqApplicationListReq) (*GetUserReqApplicationListResp, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetUserReqApplicationList not implemented") +} +func (*UnimplementedGroupServer) TransferGroupOwner(ctx context.Context, req *TransferGroupOwnerReq) (*TransferGroupOwnerResp, error) { + return nil, status.Errorf(codes.Unimplemented, "method TransferGroupOwner not implemented") +} +func (*UnimplementedGroupServer) GroupApplicationResponse(ctx context.Context, req *GroupApplicationResponseReq) (*GroupApplicationResponseResp, error) { + return nil, status.Errorf(codes.Unimplemented, "method GroupApplicationResponse not implemented") +} +func (*UnimplementedGroupServer) GetGroupMemberList(ctx context.Context, req *GetGroupMemberListReq) (*GetGroupMemberListResp, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetGroupMemberList not implemented") +} +func (*UnimplementedGroupServer) GetGroupMembersInfo(ctx context.Context, req *GetGroupMembersInfoReq) (*GetGroupMembersInfoResp, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetGroupMembersInfo not implemented") +} +func (*UnimplementedGroupServer) KickGroupMember(ctx context.Context, req *KickGroupMemberReq) (*KickGroupMemberResp, error) { + return nil, status.Errorf(codes.Unimplemented, "method KickGroupMember not implemented") +} +func (*UnimplementedGroupServer) GetJoinedGroupList(ctx context.Context, req *GetJoinedGroupListReq) (*GetJoinedGroupListResp, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetJoinedGroupList not implemented") +} +func (*UnimplementedGroupServer) InviteUserToGroup(ctx context.Context, req *InviteUserToGroupReq) (*InviteUserToGroupResp, error) { + return nil, status.Errorf(codes.Unimplemented, "method InviteUserToGroup not implemented") +} +func (*UnimplementedGroupServer) GetGroups(ctx context.Context, req *GetGroupsReq) (*GetGroupsResp, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetGroups not implemented") +} +func (*UnimplementedGroupServer) GetGroupMembersCMS(ctx context.Context, req *GetGroupMembersCMSReq) (*GetGroupMembersCMSResp, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetGroupMembersCMS not implemented") +} +func (*UnimplementedGroupServer) DismissGroup(ctx context.Context, req *DismissGroupReq) (*DismissGroupResp, error) { + return nil, status.Errorf(codes.Unimplemented, "method DismissGroup not implemented") +} +func (*UnimplementedGroupServer) MuteGroupMember(ctx context.Context, req *MuteGroupMemberReq) (*MuteGroupMemberResp, error) { + return nil, status.Errorf(codes.Unimplemented, "method MuteGroupMember not implemented") +} +func (*UnimplementedGroupServer) CancelMuteGroupMember(ctx context.Context, req *CancelMuteGroupMemberReq) (*CancelMuteGroupMemberResp, error) { + return nil, status.Errorf(codes.Unimplemented, "method CancelMuteGroupMember not implemented") +} +func (*UnimplementedGroupServer) MuteGroup(ctx context.Context, req *MuteGroupReq) (*MuteGroupResp, error) { + return nil, status.Errorf(codes.Unimplemented, "method MuteGroup not implemented") +} +func (*UnimplementedGroupServer) CancelMuteGroup(ctx context.Context, req *CancelMuteGroupReq) (*CancelMuteGroupResp, error) { + return nil, status.Errorf(codes.Unimplemented, "method CancelMuteGroup not implemented") +} +func (*UnimplementedGroupServer) GetJoinedSuperGroupList(ctx context.Context, req *GetJoinedSuperGroupListReq) (*GetJoinedSuperGroupListResp, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetJoinedSuperGroupList not implemented") +} +func (*UnimplementedGroupServer) GetSuperGroupsInfo(ctx context.Context, req *GetSuperGroupsInfoReq) (*GetSuperGroupsInfoResp, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetSuperGroupsInfo not implemented") +} +func (*UnimplementedGroupServer) SetGroupMemberInfo(ctx context.Context, req *SetGroupMemberInfoReq) (*SetGroupMemberInfoResp, error) { + return nil, status.Errorf(codes.Unimplemented, "method SetGroupMemberInfo not implemented") +} +func (*UnimplementedGroupServer) GetGroupAbstractInfo(ctx context.Context, req *GetGroupAbstractInfoReq) (*GetGroupAbstractInfoResp, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetGroupAbstractInfo not implemented") +} +func (*UnimplementedGroupServer) GetUserInGroupMembers(ctx context.Context, req *GetUserInGroupMembersReq) (*GetUserInGroupMembersResp, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetUserInGroupMembers not implemented") +} +func (*UnimplementedGroupServer) GetGroupMemberUserID(ctx context.Context, req *GetGroupMemberUserIDReq) (*GetGroupMemberUserIDResp, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetGroupMemberUserID not implemented") +} +func (*UnimplementedGroupServer) GetGroupMemberRoleLevel(ctx context.Context, req *GetGroupMemberRoleLevelReq) (*GetGroupMemberRoleLevelResp, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetGroupMemberRoleLevel not implemented") +} + func RegisterGroupServer(s *grpc.Server, srv GroupServer) { s.RegisterService(&_Group_serviceDesc, srv) } @@ -3727,123 +4313,9480 @@ var _Group_serviceDesc = grpc.ServiceDesc{ Metadata: "group/group.proto", } -func init() { proto.RegisterFile("group/group.proto", fileDescriptor_group_a9155eb4f624bfe9) } - -var fileDescriptor_group_a9155eb4f624bfe9 = []byte{ - // 1833 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x59, 0x51, 0x53, 0xe4, 0xc6, - 0x11, 0xae, 0xdd, 0x33, 0xdc, 0xd1, 0xc7, 0x1a, 0x18, 0xd8, 0x45, 0x27, 0xb8, 0x83, 0x8c, 0xaf, - 0x62, 0x2a, 0x31, 0x8b, 0x0b, 0x2e, 0x2e, 0xbb, 0x92, 0x2a, 0xe7, 0xcc, 0xc5, 0x18, 0x87, 0x85, - 0xa0, 0x3d, 0x3b, 0x29, 0xbf, 0xc4, 0x62, 0x77, 0x90, 0x75, 0x68, 0xa5, 0x41, 0xa3, 0x05, 0x3f, - 0x26, 0x95, 0x87, 0x3c, 0x25, 0x8f, 0x79, 0xc9, 0x53, 0xde, 0xf2, 0x2b, 0xf2, 0xdb, 0x52, 0x9a, - 0x91, 0x46, 0x23, 0xcd, 0x68, 0x77, 0xcd, 0x1d, 0x2f, 0x5b, 0xa5, 0xee, 0x9e, 0xe9, 0x9e, 0x9e, - 0xee, 0x9e, 0xaf, 0x7b, 0x61, 0xc5, 0x8b, 0xa3, 0x31, 0xdd, 0xe3, 0xbf, 0x5d, 0x1a, 0x47, 0x49, - 0x84, 0xe6, 0xf8, 0x87, 0xfd, 0xe1, 0x19, 0x25, 0xe1, 0xee, 0x71, 0x6f, 0xb7, 0x4f, 0xe2, 0x1b, - 0x12, 0xef, 0xd1, 0x2b, 0x6f, 0x8f, 0x0b, 0xec, 0xb1, 0xe1, 0xd5, 0x2d, 0xdb, 0xbb, 0x65, 0x42, - 0xde, 0xde, 0x9d, 0x26, 0x18, 0xbb, 0x94, 0x92, 0x38, 0x13, 0xc7, 0xff, 0x6d, 0xc0, 0xfb, 0x87, - 0x31, 0x71, 0x13, 0x72, 0x94, 0xea, 0x71, 0xc8, 0x35, 0xda, 0x86, 0xc7, 0x7e, 0xe8, 0x27, 0x3d, - 0x32, 0xba, 0x20, 0x31, 0xb3, 0x1a, 0xdb, 0x0f, 0x76, 0x16, 0x1c, 0x95, 0x84, 0xba, 0xb0, 0xc0, - 0xad, 0x3a, 0x0e, 0x2f, 0x23, 0xab, 0xb9, 0xdd, 0xd8, 0x79, 0xbc, 0xbf, 0xdc, 0xe5, 0xdb, 0x77, - 0x8f, 0x72, 0xba, 0x53, 0x88, 0x20, 0x0c, 0x8b, 0xee, 0x70, 0xe4, 0x87, 0xdf, 0x30, 0x12, 0x1f, - 0xbf, 0x62, 0xd6, 0x03, 0xbe, 0x65, 0x89, 0x96, 0x6a, 0x8d, 0x6e, 0x43, 0x12, 0x8b, 0x6f, 0xeb, - 0xbd, 0xed, 0x46, 0xaa, 0x55, 0x21, 0xe1, 0x97, 0xb0, 0x54, 0xb2, 0x94, 0xd1, 0xb2, 0x21, 0x8d, - 0xa9, 0x86, 0xe0, 0x2e, 0x2c, 0x1f, 0x91, 0x84, 0xb3, 0x18, 0xe7, 0x91, 0x6b, 0x64, 0xc3, 0x23, - 0x21, 0xf0, 0x2a, 0x3f, 0xab, 0xfc, 0xc6, 0xbf, 0x83, 0x95, 0x8a, 0x3c, 0xa3, 0xe8, 0x63, 0x00, - 0xb9, 0xa3, 0x58, 0x62, 0xd2, 0xaa, 0xc8, 0xe0, 0x3e, 0x2c, 0xf5, 0xb3, 0x6d, 0x72, 0xad, 0xbf, - 0x85, 0x25, 0x29, 0xf0, 0x65, 0x14, 0xf7, 0x49, 0x92, 0xd9, 0xdf, 0xa9, 0xee, 0x24, 0xb8, 0x4e, - 0x55, 0x1c, 0x23, 0x58, 0x2e, 0x6f, 0xca, 0x28, 0xbe, 0x01, 0x3b, 0xb7, 0xf7, 0x25, 0xa5, 0x81, - 0x3f, 0x70, 0x13, 0x3f, 0x0a, 0x4f, 0x7c, 0x96, 0xa4, 0x3a, 0x3f, 0x05, 0xa0, 0xae, 0xe7, 0x87, - 0x9c, 0x98, 0xa9, 0xb3, 0x32, 0x75, 0x0e, 0xb9, 0x1e, 0x13, 0x96, 0xfc, 0x41, 0xf2, 0x1d, 0x45, - 0x16, 0x3d, 0x03, 0xb8, 0x8c, 0xa3, 0x51, 0x76, 0x37, 0x4d, 0x7e, 0x37, 0x0a, 0x05, 0x87, 0xb0, - 0x51, 0xab, 0x97, 0x51, 0xb4, 0x06, 0x73, 0x49, 0x94, 0xb8, 0x01, 0xd7, 0xd9, 0x72, 0xc4, 0x07, - 0xfa, 0x0c, 0x5a, 0x5e, 0x16, 0x73, 0xa9, 0x6a, 0x66, 0x35, 0xb9, 0x2b, 0x57, 0x55, 0x07, 0x64, - 0x3c, 0xa7, 0x2c, 0x89, 0x29, 0x6c, 0x1e, 0x91, 0x24, 0x55, 0xee, 0x90, 0xeb, 0x77, 0x7a, 0xd2, - 0x0e, 0xcc, 0x8f, 0xd5, 0x53, 0x66, 0x5f, 0x98, 0xc2, 0xd3, 0x09, 0x1a, 0xef, 0xe3, 0x8c, 0x7f, - 0x6d, 0x40, 0xfb, 0x75, 0xec, 0x86, 0xec, 0x92, 0xc4, 0x5c, 0xee, 0x2c, 0xcd, 0x85, 0xf4, 0x74, - 0x16, 0x3c, 0xcc, 0x22, 0x94, 0x2b, 0x5b, 0x70, 0xf2, 0x4f, 0xf4, 0x73, 0x78, 0x3f, 0x0a, 0x86, - 0x67, 0x4a, 0x1e, 0x89, 0x53, 0x54, 0xa8, 0xa9, 0x5c, 0x48, 0x6e, 0x55, 0xb9, 0x07, 0x42, 0xae, - 0x4c, 0xc5, 0x16, 0x74, 0x4c, 0x26, 0x30, 0x8a, 0xff, 0xd9, 0x80, 0xc5, 0xaf, 0x23, 0x3f, 0x94, - 0x55, 0xa3, 0xde, 0xa8, 0x67, 0x00, 0x31, 0xb9, 0xee, 0x11, 0xc6, 0x5c, 0x8f, 0xe4, 0xc1, 0x53, - 0x50, 0x52, 0xfe, 0x9b, 0xc8, 0x0f, 0xfb, 0xd1, 0x38, 0x1e, 0x10, 0x6e, 0xc8, 0x9c, 0xa3, 0x50, - 0xd0, 0x73, 0x68, 0xf9, 0xe1, 0x8d, 0x9f, 0x54, 0x6a, 0x43, 0x99, 0x88, 0x97, 0xa0, 0xa5, 0xd8, - 0xc3, 0x28, 0xfe, 0x77, 0x03, 0x36, 0xaa, 0x11, 0x99, 0x32, 0xa2, 0x90, 0x91, 0xa9, 0x06, 0x4f, - 0x8a, 0xf6, 0x94, 0xff, 0x83, 0x1b, 0x0e, 0x03, 0x32, 0xec, 0x31, 0x2f, 0xf3, 0x9c, 0x42, 0x49, - 0xcb, 0x9d, 0xf8, 0x72, 0x08, 0x1b, 0x07, 0x09, 0xb7, 0x77, 0xce, 0x29, 0xd1, 0xf0, 0x33, 0xd8, - 0xac, 0x37, 0x8e, 0x51, 0xbc, 0x03, 0x8b, 0xe7, 0x63, 0x3f, 0x99, 0xee, 0xde, 0xf4, 0xe0, 0x8a, - 0x24, 0xa3, 0xf8, 0x6f, 0x0d, 0x68, 0xe7, 0xd9, 0x28, 0x2a, 0xf6, 0xdb, 0xa7, 0x85, 0xa2, 0xbe, - 0x59, 0x76, 0x56, 0x07, 0xe6, 0x2f, 0xfd, 0x20, 0x21, 0x71, 0x76, 0x73, 0xd9, 0x17, 0x1e, 0x42, - 0xc7, 0x64, 0x44, 0x6d, 0xa6, 0xbc, 0x80, 0x87, 0xa3, 0xec, 0xc5, 0x11, 0x39, 0x62, 0xab, 0x39, - 0x22, 0xb6, 0xf8, 0x72, 0x1c, 0x04, 0xbc, 0xd6, 0xe5, 0xa2, 0xf8, 0xa4, 0xaa, 0x45, 0x96, 0xf5, - 0xfa, 0xeb, 0xb5, 0xca, 0x9a, 0x16, 0x8a, 0xdd, 0xce, 0x60, 0xdd, 0xb8, 0x1b, 0xa3, 0xaa, 0x79, - 0x8d, 0xd9, 0xcd, 0x0b, 0x00, 0xfd, 0xde, 0x1f, 0x5c, 0x29, 0x32, 0x93, 0x4d, 0x7b, 0x0e, 0xad, - 0x2b, 0x7f, 0x70, 0x45, 0x86, 0xf9, 0x4b, 0x29, 0x0c, 0x2c, 0x13, 0x53, 0x97, 0xc7, 0xc4, 0x65, - 0x51, 0x98, 0xc5, 0x5e, 0xf6, 0x85, 0xdb, 0xb0, 0xaa, 0x69, 0x63, 0x14, 0x5f, 0xf3, 0x70, 0x48, - 0x93, 0x83, 0x0c, 0x39, 0xef, 0xfe, 0xdf, 0x83, 0x3f, 0xf1, 0x6b, 0xd1, 0x54, 0xd6, 0x5e, 0xfe, - 0x0e, 0xcc, 0x73, 0x17, 0xe4, 0x77, 0xaf, 0x3f, 0xa7, 0x19, 0x1f, 0x53, 0x58, 0x3b, 0xe6, 0x79, - 0x9f, 0x6a, 0x7a, 0x1d, 0xcd, 0x50, 0x7e, 0x0a, 0x6f, 0x35, 0x55, 0x6f, 0xa5, 0x35, 0x50, 0x54, - 0x90, 0x61, 0x19, 0x96, 0x54, 0xa8, 0x78, 0x1d, 0xda, 0x06, 0x8d, 0x8c, 0xe2, 0x37, 0xb0, 0x26, - 0x1f, 0xbd, 0x20, 0x28, 0xae, 0xf7, 0x1e, 0xb2, 0x0c, 0xf7, 0x8a, 0x94, 0x56, 0x74, 0xdd, 0x39, - 0x2e, 0xff, 0xd5, 0x80, 0x47, 0x87, 0xbd, 0x3e, 0x97, 0xf9, 0xa9, 0x20, 0x0a, 0x75, 0x01, 0x79, - 0xf2, 0x31, 0x48, 0x9d, 0x72, 0xea, 0x8e, 0xf2, 0xba, 0x6e, 0xe0, 0xa0, 0x5f, 0xc0, 0x72, 0x99, - 0x2a, 0x9f, 0x1b, 0x8d, 0x8e, 0xff, 0xd2, 0x80, 0x45, 0x89, 0xb8, 0xde, 0xce, 0x99, 0x9b, 0xd9, - 0xb1, 0x14, 0xeb, 0x0a, 0x82, 0xea, 0xea, 0x07, 0x65, 0x57, 0x9f, 0x42, 0x4b, 0xb1, 0xa0, 0x36, - 0x64, 0x3f, 0xac, 0x84, 0xec, 0x52, 0x57, 0xa0, 0xf6, 0xdc, 0xad, 0x32, 0x62, 0x77, 0x0b, 0x0c, - 0x39, 0x43, 0x09, 0xc0, 0x7f, 0xd7, 0xaa, 0x37, 0x3b, 0xec, 0xf5, 0xef, 0xab, 0x7a, 0xdb, 0xf0, - 0x68, 0x9c, 0xdf, 0xa0, 0xf0, 0x83, 0xfc, 0xd6, 0x2b, 0xb8, 0x30, 0xe4, 0x1d, 0x57, 0xf0, 0x5f, - 0xc2, 0xd2, 0x2b, 0x9f, 0x8d, 0x7c, 0xc6, 0x66, 0x78, 0xeb, 0x10, 0x2c, 0x97, 0x85, 0x79, 0x1a, - 0xa2, 0xde, 0x38, 0x6b, 0x0a, 0x66, 0xa9, 0xb1, 0x35, 0x08, 0x2f, 0x7d, 0xb5, 0x47, 0xe3, 0x84, - 0x0c, 0xfb, 0x64, 0x10, 0x85, 0x43, 0xc6, 0xdd, 0xd1, 0x72, 0x4a, 0xb4, 0xb4, 0xc2, 0x6a, 0xba, - 0x18, 0xc5, 0x27, 0x60, 0x1d, 0xba, 0xe1, 0x80, 0x04, 0xef, 0xc2, 0x10, 0xbc, 0x01, 0x4f, 0x6a, - 0x76, 0x13, 0xb8, 0x40, 0x92, 0xa7, 0xe2, 0x02, 0x45, 0x92, 0x51, 0xdc, 0x05, 0x54, 0xd9, 0x77, - 0xf2, 0x06, 0x6d, 0x58, 0xd5, 0xe4, 0x19, 0xc5, 0x2f, 0x78, 0x8f, 0x21, 0x6a, 0x7b, 0x7f, 0x4c, - 0x33, 0x64, 0x98, 0xbf, 0x29, 0xc5, 0xa1, 0x1a, 0xa5, 0x43, 0x1d, 0xf1, 0x0e, 0xc1, 0xbc, 0x8a, - 0x51, 0xe5, 0x01, 0x68, 0x4c, 0x79, 0x00, 0x0e, 0x78, 0x7a, 0x14, 0x5b, 0xcc, 0xd4, 0xc7, 0x7d, - 0xcd, 0x43, 0x59, 0x5b, 0x74, 0xa7, 0x66, 0xee, 0x3f, 0x4d, 0x40, 0xfd, 0x52, 0x5e, 0xf0, 0xaa, - 0xf8, 0xd3, 0x03, 0xee, 0x53, 0x78, 0x14, 0xfa, 0x83, 0xab, 0x30, 0xcf, 0xbd, 0xc7, 0xfb, 0x9b, - 0x5d, 0x2f, 0x8a, 0xbc, 0x80, 0x88, 0xde, 0xfc, 0x62, 0x7c, 0xd9, 0xed, 0x27, 0xb1, 0x1f, 0x7a, - 0xdf, 0xba, 0xc1, 0x98, 0x38, 0x52, 0x1a, 0x7d, 0x02, 0x0f, 0x2f, 0xdd, 0x01, 0xf9, 0xc6, 0x39, - 0xe1, 0xd8, 0x72, 0xda, 0xc2, 0x5c, 0x18, 0x7d, 0x06, 0x0b, 0x71, 0x14, 0x90, 0x13, 0x72, 0x43, - 0x02, 0x6b, 0x8e, 0xaf, 0xdc, 0xd0, 0x56, 0x1e, 0x87, 0xc9, 0xc1, 0xbe, 0x58, 0x58, 0x48, 0xa3, - 0x8f, 0xa0, 0x49, 0x7e, 0xb4, 0xe6, 0x67, 0xd0, 0xd6, 0x24, 0x3f, 0xe2, 0x13, 0x68, 0xeb, 0x2e, - 0x4a, 0x2f, 0xe9, 0xa0, 0xfa, 0x5c, 0x3d, 0xc9, 0xca, 0xa6, 0x41, 0x5c, 0x96, 0x08, 0x0b, 0x3a, - 0xa6, 0xdd, 0x18, 0xc5, 0xbf, 0x2a, 0x00, 0xdb, 0xcb, 0x0b, 0x96, 0xc4, 0xee, 0x20, 0x99, 0x25, - 0x1c, 0xfe, 0xd1, 0x80, 0x15, 0x6d, 0xd1, 0x84, 0x1b, 0xfc, 0x28, 0x1b, 0xcc, 0x08, 0xed, 0xa7, - 0xe3, 0xf4, 0x97, 0x5f, 0x66, 0xcb, 0xd1, 0x19, 0xe8, 0x63, 0x58, 0xf5, 0xca, 0xb0, 0xf7, 0x2b, - 0x97, 0xfd, 0xc0, 0xaf, 0xf8, 0x3d, 0xc7, 0xc4, 0xc2, 0x43, 0xb0, 0xcc, 0xc7, 0x60, 0x14, 0x7d, - 0x95, 0xbd, 0xb6, 0x2a, 0x23, 0x77, 0x9e, 0x95, 0x39, 0x4f, 0x5f, 0x69, 0x58, 0x83, 0x4f, 0xb9, - 0x16, 0xfe, 0xd0, 0x86, 0x6a, 0x55, 0x9f, 0x90, 0xb6, 0x25, 0x2f, 0x36, 0x2b, 0x5e, 0x3c, 0x87, - 0x27, 0x35, 0xfb, 0xdd, 0x19, 0x97, 0x1c, 0x54, 0x01, 0xb8, 0x80, 0x05, 0x93, 0xeb, 0xd4, 0x8b, - 0xc2, 0x7b, 0xe5, 0x45, 0x8c, 0xa6, 0xab, 0xc6, 0x19, 0xba, 0x13, 0x41, 0x90, 0x7f, 0xe2, 0x6f, - 0x8b, 0x51, 0x49, 0x56, 0x5e, 0xf3, 0x58, 0x9f, 0xde, 0xcd, 0xe6, 0x92, 0xc2, 0x27, 0x73, 0x8e, - 0x42, 0xc1, 0xfd, 0x62, 0x14, 0xa2, 0xed, 0x7b, 0x57, 0xbf, 0xec, 0xff, 0x6f, 0x05, 0xc4, 0x1c, - 0x10, 0xfd, 0x06, 0x1e, 0x0f, 0x8a, 0x21, 0x18, 0x6a, 0xe7, 0xa8, 0xa3, 0x34, 0xc2, 0xb3, 0x3b, - 0x26, 0x32, 0xa3, 0xe8, 0x13, 0x58, 0x78, 0x93, 0x37, 0xc9, 0x68, 0x35, 0x13, 0x52, 0xdb, 0x78, - 0x7b, 0x4d, 0x27, 0x8a, 0x75, 0xd7, 0x79, 0x8f, 0x29, 0xd7, 0xa9, 0xfd, 0xa9, 0x5c, 0x57, 0x6a, - 0x45, 0xd1, 0x17, 0xd0, 0xf2, 0xd4, 0xf9, 0x19, 0x5a, 0xcf, 0x23, 0xb6, 0x32, 0x85, 0xb3, 0x2d, - 0x33, 0x83, 0x51, 0xf4, 0x39, 0x2c, 0x32, 0x65, 0xce, 0x85, 0x3a, 0x95, 0x8a, 0x91, 0xef, 0xb0, - 0x6e, 0xa4, 0x33, 0x8a, 0xbe, 0x87, 0x75, 0xcf, 0x3c, 0x9c, 0x42, 0x3f, 0xab, 0x68, 0xd5, 0x47, - 0x49, 0x36, 0x9e, 0x26, 0xc2, 0x28, 0xba, 0x84, 0x27, 0x5e, 0xdd, 0x70, 0x08, 0x7d, 0x50, 0x6c, - 0x50, 0x3b, 0xb0, 0xb2, 0x9f, 0x4f, 0x17, 0x62, 0x14, 0x9d, 0x03, 0x4a, 0xb4, 0x71, 0x0c, 0xda, - 0xcc, 0xd6, 0x1a, 0x87, 0x45, 0xf6, 0xd3, 0x09, 0x5c, 0x46, 0xd1, 0x00, 0x2c, 0xaf, 0x66, 0x0e, - 0x81, 0x70, 0xa9, 0xbc, 0x18, 0xa7, 0x28, 0xf6, 0x07, 0x53, 0x65, 0x84, 0xdd, 0x9e, 0x36, 0x0b, - 0x90, 0x76, 0x1b, 0x67, 0x15, 0xd2, 0xee, 0x9a, 0x21, 0xc2, 0x6b, 0x58, 0xf5, 0xf4, 0x56, 0x1d, - 0x99, 0x57, 0xc9, 0x28, 0x7b, 0x36, 0x89, 0xcd, 0x8b, 0xed, 0xd2, 0x55, 0xb9, 0x83, 0x46, 0xf9, - 0x03, 0xa5, 0xf7, 0xf1, 0xb6, 0x5d, 0xc7, 0x92, 0x47, 0xae, 0x74, 0xc0, 0xea, 0x91, 0xf5, 0x7e, - 0x5c, 0x3d, 0xb2, 0xa9, 0x75, 0x3e, 0x85, 0x15, 0xbf, 0xda, 0x88, 0xa2, 0x8d, 0x6c, 0x8d, 0xa9, - 0x29, 0xb6, 0x37, 0xeb, 0x99, 0x22, 0xa9, 0x65, 0x72, 0xca, 0xa4, 0x56, 0x9b, 0x2f, 0x99, 0xd4, - 0xe5, 0x7e, 0x48, 0xbb, 0xcd, 0xb4, 0x2f, 0xa8, 0xb9, 0xcd, 0xac, 0x77, 0xa9, 0xb9, 0x4d, 0xd9, - 0x50, 0x7c, 0x0e, 0x8b, 0x43, 0x05, 0xd7, 0xcb, 0x1c, 0xaf, 0x74, 0x06, 0x32, 0xc7, 0xab, 0x4d, - 0x40, 0x7a, 0x71, 0xa3, 0x32, 0x5a, 0x96, 0x17, 0xa7, 0x63, 0x72, 0x79, 0x71, 0x06, 0x80, 0x8d, - 0xbe, 0x83, 0xf6, 0xc0, 0x84, 0xbe, 0xd1, 0x56, 0x5e, 0x53, 0x6b, 0x90, 0xbe, 0xbd, 0x3d, 0x59, - 0x40, 0x78, 0x5c, 0x5a, 0x29, 0x3d, 0xae, 0xa2, 0x71, 0xe9, 0xf1, 0x12, 0xe4, 0x4e, 0x4f, 0x57, - 0xb1, 0x49, 0x9e, 0x4e, 0x47, 0xf4, 0xf2, 0x74, 0x06, 0xf0, 0x9e, 0xd5, 0x42, 0x13, 0x0c, 0x57, - 0x6b, 0x61, 0x0d, 0xb8, 0x57, 0x6b, 0x61, 0x2d, 0x92, 0x17, 0xd1, 0x51, 0x81, 0xda, 0x6a, 0x74, - 0xe8, 0xd0, 0x5d, 0x8d, 0x0e, 0x13, 0x46, 0x3f, 0x07, 0xc4, 0x74, 0xc0, 0xbd, 0x59, 0x8f, 0x1c, - 0x95, 0x2d, 0xcd, 0xc0, 0x11, 0xfd, 0x11, 0xd6, 0x3c, 0x03, 0xe2, 0x42, 0xd5, 0x02, 0x51, 0x41, - 0x95, 0xf6, 0xd6, 0x44, 0xbe, 0x08, 0x1f, 0xcf, 0x04, 0x8a, 0xd0, 0x56, 0xb9, 0xc2, 0x6b, 0x10, - 0x4c, 0x86, 0x4f, 0x3d, 0xa6, 0x52, 0x8c, 0x56, 0x81, 0x0e, 0x32, 0x57, 0x35, 0x09, 0x9d, 0x34, - 0xa3, 0x35, 0x94, 0xf4, 0x7d, 0x15, 0x76, 0x49, 0xcc, 0xa2, 0xbd, 0x90, 0x3a, 0x56, 0xd2, 0x5e, - 0x48, 0x03, 0xec, 0xf9, 0x62, 0xeb, 0xbb, 0xa7, 0x67, 0x94, 0x84, 0x7f, 0x3e, 0xee, 0x29, 0x7f, - 0x48, 0xf2, 0x65, 0xbf, 0xe6, 0xbf, 0x17, 0xf3, 0x9c, 0x74, 0xf0, 0xff, 0x00, 0x00, 0x00, 0xff, - 0xff, 0x9c, 0xc0, 0xab, 0xba, 0x02, 0x1d, 0x00, 0x00, +func (m *CreateGroupReq) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil } + +func (m *CreateGroupReq) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *CreateGroupReq) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.OwnerUserID) > 0 { + i -= len(m.OwnerUserID) + copy(dAtA[i:], m.OwnerUserID) + i = encodeVarintGroup(dAtA, i, uint64(len(m.OwnerUserID))) + i-- + dAtA[i] = 0x22 + } + if len(m.AdminUserIDs) > 0 { + for iNdEx := len(m.AdminUserIDs) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.AdminUserIDs[iNdEx]) + copy(dAtA[i:], m.AdminUserIDs[iNdEx]) + i = encodeVarintGroup(dAtA, i, uint64(len(m.AdminUserIDs[iNdEx]))) + i-- + dAtA[i] = 0x1a + } + } + if m.GroupInfo != nil { + { + size, err := m.GroupInfo.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGroup(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + if len(m.InitMembers) > 0 { + for iNdEx := len(m.InitMembers) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.InitMembers[iNdEx]) + copy(dAtA[i:], m.InitMembers[iNdEx]) + i = encodeVarintGroup(dAtA, i, uint64(len(m.InitMembers[iNdEx]))) + i-- + dAtA[i] = 0xa + } + } + return len(dAtA) - i, nil +} + +func (m *CreateGroupResp) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *CreateGroupResp) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *CreateGroupResp) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.GroupInfo != nil { + { + size, err := m.GroupInfo.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGroup(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *GetGroupsInfoReq) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *GetGroupsInfoReq) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *GetGroupsInfoReq) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.GroupIDs) > 0 { + for iNdEx := len(m.GroupIDs) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.GroupIDs[iNdEx]) + copy(dAtA[i:], m.GroupIDs[iNdEx]) + i = encodeVarintGroup(dAtA, i, uint64(len(m.GroupIDs[iNdEx]))) + i-- + dAtA[i] = 0xa + } + } + return len(dAtA) - i, nil +} + +func (m *GetGroupsInfoResp) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *GetGroupsInfoResp) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *GetGroupsInfoResp) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.GroupInfos) > 0 { + for iNdEx := len(m.GroupInfos) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.GroupInfos[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGroup(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + } + return len(dAtA) - i, nil +} + +func (m *SetGroupInfoReq) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *SetGroupInfoReq) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *SetGroupInfoReq) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.GroupInfoForSet != nil { + { + size, err := m.GroupInfoForSet.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGroup(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *SetGroupInfoResp) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *SetGroupInfoResp) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *SetGroupInfoResp) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + return len(dAtA) - i, nil +} + +func (m *GetGroupApplicationListReq) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *GetGroupApplicationListReq) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *GetGroupApplicationListReq) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.FromUserID) > 0 { + i -= len(m.FromUserID) + copy(dAtA[i:], m.FromUserID) + i = encodeVarintGroup(dAtA, i, uint64(len(m.FromUserID))) + i-- + dAtA[i] = 0x12 + } + if m.Pagination != nil { + { + size, err := m.Pagination.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGroup(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *GetGroupApplicationListResp) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *GetGroupApplicationListResp) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *GetGroupApplicationListResp) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.GroupRequests) > 0 { + for iNdEx := len(m.GroupRequests) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.GroupRequests[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGroup(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + } + if m.Total != 0 { + i = encodeVarintGroup(dAtA, i, uint64(m.Total)) + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil +} + +func (m *GetUserReqApplicationListReq) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *GetUserReqApplicationListReq) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *GetUserReqApplicationListReq) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.UserID) > 0 { + i -= len(m.UserID) + copy(dAtA[i:], m.UserID) + i = encodeVarintGroup(dAtA, i, uint64(len(m.UserID))) + i-- + dAtA[i] = 0x12 + } + if m.Pagination != nil { + { + size, err := m.Pagination.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGroup(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *GetUserReqApplicationListResp) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *GetUserReqApplicationListResp) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *GetUserReqApplicationListResp) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.GroupRequests) > 0 { + for iNdEx := len(m.GroupRequests) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.GroupRequests[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGroup(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + } + if m.Total != 0 { + i = encodeVarintGroup(dAtA, i, uint64(m.Total)) + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil +} + +func (m *TransferGroupOwnerReq) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *TransferGroupOwnerReq) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *TransferGroupOwnerReq) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.NewOwnerUserID) > 0 { + i -= len(m.NewOwnerUserID) + copy(dAtA[i:], m.NewOwnerUserID) + i = encodeVarintGroup(dAtA, i, uint64(len(m.NewOwnerUserID))) + i-- + dAtA[i] = 0x1a + } + if len(m.OldOwnerUserID) > 0 { + i -= len(m.OldOwnerUserID) + copy(dAtA[i:], m.OldOwnerUserID) + i = encodeVarintGroup(dAtA, i, uint64(len(m.OldOwnerUserID))) + i-- + dAtA[i] = 0x12 + } + if len(m.GroupID) > 0 { + i -= len(m.GroupID) + copy(dAtA[i:], m.GroupID) + i = encodeVarintGroup(dAtA, i, uint64(len(m.GroupID))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *TransferGroupOwnerResp) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *TransferGroupOwnerResp) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *TransferGroupOwnerResp) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + return len(dAtA) - i, nil +} + +func (m *JoinGroupReq) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *JoinGroupReq) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *JoinGroupReq) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.InviterUserID) > 0 { + i -= len(m.InviterUserID) + copy(dAtA[i:], m.InviterUserID) + i = encodeVarintGroup(dAtA, i, uint64(len(m.InviterUserID))) + i-- + dAtA[i] = 0x22 + } + if m.JoinSource != 0 { + i = encodeVarintGroup(dAtA, i, uint64(m.JoinSource)) + i-- + dAtA[i] = 0x18 + } + if len(m.ReqMessage) > 0 { + i -= len(m.ReqMessage) + copy(dAtA[i:], m.ReqMessage) + i = encodeVarintGroup(dAtA, i, uint64(len(m.ReqMessage))) + i-- + dAtA[i] = 0x12 + } + if len(m.GroupID) > 0 { + i -= len(m.GroupID) + copy(dAtA[i:], m.GroupID) + i = encodeVarintGroup(dAtA, i, uint64(len(m.GroupID))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *JoinGroupResp) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *JoinGroupResp) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *JoinGroupResp) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + return len(dAtA) - i, nil +} + +func (m *GroupApplicationResponseReq) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *GroupApplicationResponseReq) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *GroupApplicationResponseReq) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.HandleResult != 0 { + i = encodeVarintGroup(dAtA, i, uint64(m.HandleResult)) + i-- + dAtA[i] = 0x20 + } + if len(m.HandledMsg) > 0 { + i -= len(m.HandledMsg) + copy(dAtA[i:], m.HandledMsg) + i = encodeVarintGroup(dAtA, i, uint64(len(m.HandledMsg))) + i-- + dAtA[i] = 0x1a + } + if len(m.FromUserID) > 0 { + i -= len(m.FromUserID) + copy(dAtA[i:], m.FromUserID) + i = encodeVarintGroup(dAtA, i, uint64(len(m.FromUserID))) + i-- + dAtA[i] = 0x12 + } + if len(m.GroupID) > 0 { + i -= len(m.GroupID) + copy(dAtA[i:], m.GroupID) + i = encodeVarintGroup(dAtA, i, uint64(len(m.GroupID))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *GroupApplicationResponseResp) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *GroupApplicationResponseResp) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *GroupApplicationResponseResp) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + return len(dAtA) - i, nil +} + +func (m *QuitGroupReq) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *QuitGroupReq) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QuitGroupReq) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.GroupID) > 0 { + i -= len(m.GroupID) + copy(dAtA[i:], m.GroupID) + i = encodeVarintGroup(dAtA, i, uint64(len(m.GroupID))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *QuitGroupResp) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *QuitGroupResp) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QuitGroupResp) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + return len(dAtA) - i, nil +} + +func (m *GetGroupMemberListReq) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *GetGroupMemberListReq) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *GetGroupMemberListReq) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.Filter != 0 { + i = encodeVarintGroup(dAtA, i, uint64(m.Filter)) + i-- + dAtA[i] = 0x18 + } + if len(m.GroupID) > 0 { + i -= len(m.GroupID) + copy(dAtA[i:], m.GroupID) + i = encodeVarintGroup(dAtA, i, uint64(len(m.GroupID))) + i-- + dAtA[i] = 0x12 + } + if m.Pagination != nil { + { + size, err := m.Pagination.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGroup(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *GetGroupMemberListResp) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *GetGroupMemberListResp) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *GetGroupMemberListResp) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Members) > 0 { + for iNdEx := len(m.Members) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Members[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGroup(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + } + if m.Total != 0 { + i = encodeVarintGroup(dAtA, i, uint64(m.Total)) + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil +} + +func (m *GetGroupMembersInfoReq) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *GetGroupMembersInfoReq) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *GetGroupMembersInfoReq) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Members) > 0 { + for iNdEx := len(m.Members) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.Members[iNdEx]) + copy(dAtA[i:], m.Members[iNdEx]) + i = encodeVarintGroup(dAtA, i, uint64(len(m.Members[iNdEx]))) + i-- + dAtA[i] = 0x12 + } + } + if len(m.GroupID) > 0 { + i -= len(m.GroupID) + copy(dAtA[i:], m.GroupID) + i = encodeVarintGroup(dAtA, i, uint64(len(m.GroupID))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *GetGroupMembersInfoResp) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *GetGroupMembersInfoResp) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *GetGroupMembersInfoResp) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Members) > 0 { + for iNdEx := len(m.Members) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Members[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGroup(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + } + return len(dAtA) - i, nil +} + +func (m *KickGroupMemberReq) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *KickGroupMemberReq) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *KickGroupMemberReq) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Reason) > 0 { + i -= len(m.Reason) + copy(dAtA[i:], m.Reason) + i = encodeVarintGroup(dAtA, i, uint64(len(m.Reason))) + i-- + dAtA[i] = 0x1a + } + if len(m.KickedUserIDs) > 0 { + for iNdEx := len(m.KickedUserIDs) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.KickedUserIDs[iNdEx]) + copy(dAtA[i:], m.KickedUserIDs[iNdEx]) + i = encodeVarintGroup(dAtA, i, uint64(len(m.KickedUserIDs[iNdEx]))) + i-- + dAtA[i] = 0x12 + } + } + if len(m.GroupID) > 0 { + i -= len(m.GroupID) + copy(dAtA[i:], m.GroupID) + i = encodeVarintGroup(dAtA, i, uint64(len(m.GroupID))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *KickGroupMemberResp) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *KickGroupMemberResp) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *KickGroupMemberResp) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + return len(dAtA) - i, nil +} + +func (m *GetJoinedGroupListReq) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *GetJoinedGroupListReq) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *GetJoinedGroupListReq) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.FromUserID) > 0 { + i -= len(m.FromUserID) + copy(dAtA[i:], m.FromUserID) + i = encodeVarintGroup(dAtA, i, uint64(len(m.FromUserID))) + i-- + dAtA[i] = 0x12 + } + if m.Pagination != nil { + { + size, err := m.Pagination.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGroup(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *GetJoinedGroupListResp) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *GetJoinedGroupListResp) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *GetJoinedGroupListResp) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Groups) > 0 { + for iNdEx := len(m.Groups) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Groups[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGroup(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + } + if m.Total != 0 { + i = encodeVarintGroup(dAtA, i, uint64(m.Total)) + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil +} + +func (m *InviteUserToGroupReq) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *InviteUserToGroupReq) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *InviteUserToGroupReq) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.InvitedUserIDs) > 0 { + for iNdEx := len(m.InvitedUserIDs) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.InvitedUserIDs[iNdEx]) + copy(dAtA[i:], m.InvitedUserIDs[iNdEx]) + i = encodeVarintGroup(dAtA, i, uint64(len(m.InvitedUserIDs[iNdEx]))) + i-- + dAtA[i] = 0x1a + } + } + if len(m.Reason) > 0 { + i -= len(m.Reason) + copy(dAtA[i:], m.Reason) + i = encodeVarintGroup(dAtA, i, uint64(len(m.Reason))) + i-- + dAtA[i] = 0x12 + } + if len(m.GroupID) > 0 { + i -= len(m.GroupID) + copy(dAtA[i:], m.GroupID) + i = encodeVarintGroup(dAtA, i, uint64(len(m.GroupID))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *InviteUserToGroupResp) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *InviteUserToGroupResp) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *InviteUserToGroupResp) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + return len(dAtA) - i, nil +} + +func (m *GetGroupAllMemberReq) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *GetGroupAllMemberReq) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *GetGroupAllMemberReq) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.GroupID) > 0 { + i -= len(m.GroupID) + copy(dAtA[i:], m.GroupID) + i = encodeVarintGroup(dAtA, i, uint64(len(m.GroupID))) + i-- + dAtA[i] = 0x12 + } + if m.Pagination != nil { + { + size, err := m.Pagination.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGroup(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *GetGroupAllMemberResp) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *GetGroupAllMemberResp) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *GetGroupAllMemberResp) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Members) > 0 { + for iNdEx := len(m.Members) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Members[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGroup(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + } + return len(dAtA) - i, nil +} + +func (m *CMSGroup) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *CMSGroup) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *CMSGroup) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.GroupOwnerUserID) > 0 { + i -= len(m.GroupOwnerUserID) + copy(dAtA[i:], m.GroupOwnerUserID) + i = encodeVarintGroup(dAtA, i, uint64(len(m.GroupOwnerUserID))) + i-- + dAtA[i] = 0x1a + } + if len(m.GroupOwnerUserName) > 0 { + i -= len(m.GroupOwnerUserName) + copy(dAtA[i:], m.GroupOwnerUserName) + i = encodeVarintGroup(dAtA, i, uint64(len(m.GroupOwnerUserName))) + i-- + dAtA[i] = 0x12 + } + if m.GroupInfo != nil { + { + size, err := m.GroupInfo.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGroup(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *GetGroupsReq) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *GetGroupsReq) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *GetGroupsReq) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.GroupID) > 0 { + i -= len(m.GroupID) + copy(dAtA[i:], m.GroupID) + i = encodeVarintGroup(dAtA, i, uint64(len(m.GroupID))) + i-- + dAtA[i] = 0x1a + } + if len(m.GroupName) > 0 { + i -= len(m.GroupName) + copy(dAtA[i:], m.GroupName) + i = encodeVarintGroup(dAtA, i, uint64(len(m.GroupName))) + i-- + dAtA[i] = 0x12 + } + if m.Pagination != nil { + { + size, err := m.Pagination.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGroup(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *GetGroupsResp) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *GetGroupsResp) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *GetGroupsResp) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Groups) > 0 { + for iNdEx := len(m.Groups) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Groups[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGroup(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + } + if m.Total != 0 { + i = encodeVarintGroup(dAtA, i, uint64(m.Total)) + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil +} + +func (m *GetGroupMemberReq) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *GetGroupMemberReq) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *GetGroupMemberReq) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.GroupID) > 0 { + i -= len(m.GroupID) + copy(dAtA[i:], m.GroupID) + i = encodeVarintGroup(dAtA, i, uint64(len(m.GroupID))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *GetGroupMembersCMSReq) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *GetGroupMembersCMSReq) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *GetGroupMembersCMSReq) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.UserName) > 0 { + i -= len(m.UserName) + copy(dAtA[i:], m.UserName) + i = encodeVarintGroup(dAtA, i, uint64(len(m.UserName))) + i-- + dAtA[i] = 0x1a + } + if len(m.GroupID) > 0 { + i -= len(m.GroupID) + copy(dAtA[i:], m.GroupID) + i = encodeVarintGroup(dAtA, i, uint64(len(m.GroupID))) + i-- + dAtA[i] = 0x12 + } + if m.Pagination != nil { + { + size, err := m.Pagination.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGroup(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *GetGroupMembersCMSResp) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *GetGroupMembersCMSResp) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *GetGroupMembersCMSResp) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Members) > 0 { + for iNdEx := len(m.Members) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Members[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGroup(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + } + if m.Total != 0 { + i = encodeVarintGroup(dAtA, i, uint64(m.Total)) + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil +} + +func (m *DismissGroupReq) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *DismissGroupReq) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *DismissGroupReq) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.GroupID) > 0 { + i -= len(m.GroupID) + copy(dAtA[i:], m.GroupID) + i = encodeVarintGroup(dAtA, i, uint64(len(m.GroupID))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *DismissGroupResp) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *DismissGroupResp) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *DismissGroupResp) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + return len(dAtA) - i, nil +} + +func (m *MuteGroupMemberReq) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *MuteGroupMemberReq) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MuteGroupMemberReq) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.MutedSeconds != 0 { + i = encodeVarintGroup(dAtA, i, uint64(m.MutedSeconds)) + i-- + dAtA[i] = 0x18 + } + if len(m.UserID) > 0 { + i -= len(m.UserID) + copy(dAtA[i:], m.UserID) + i = encodeVarintGroup(dAtA, i, uint64(len(m.UserID))) + i-- + dAtA[i] = 0x12 + } + if len(m.GroupID) > 0 { + i -= len(m.GroupID) + copy(dAtA[i:], m.GroupID) + i = encodeVarintGroup(dAtA, i, uint64(len(m.GroupID))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *MuteGroupMemberResp) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *MuteGroupMemberResp) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MuteGroupMemberResp) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + return len(dAtA) - i, nil +} + +func (m *CancelMuteGroupMemberReq) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *CancelMuteGroupMemberReq) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *CancelMuteGroupMemberReq) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.UserID) > 0 { + i -= len(m.UserID) + copy(dAtA[i:], m.UserID) + i = encodeVarintGroup(dAtA, i, uint64(len(m.UserID))) + i-- + dAtA[i] = 0x12 + } + if len(m.GroupID) > 0 { + i -= len(m.GroupID) + copy(dAtA[i:], m.GroupID) + i = encodeVarintGroup(dAtA, i, uint64(len(m.GroupID))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *CancelMuteGroupMemberResp) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *CancelMuteGroupMemberResp) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *CancelMuteGroupMemberResp) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + return len(dAtA) - i, nil +} + +func (m *MuteGroupReq) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *MuteGroupReq) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MuteGroupReq) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.GroupID) > 0 { + i -= len(m.GroupID) + copy(dAtA[i:], m.GroupID) + i = encodeVarintGroup(dAtA, i, uint64(len(m.GroupID))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *MuteGroupResp) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *MuteGroupResp) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MuteGroupResp) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + return len(dAtA) - i, nil +} + +func (m *CancelMuteGroupReq) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *CancelMuteGroupReq) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *CancelMuteGroupReq) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.GroupID) > 0 { + i -= len(m.GroupID) + copy(dAtA[i:], m.GroupID) + i = encodeVarintGroup(dAtA, i, uint64(len(m.GroupID))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *CancelMuteGroupResp) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *CancelMuteGroupResp) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *CancelMuteGroupResp) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + return len(dAtA) - i, nil +} + +func (m *GetJoinedSuperGroupListReq) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *GetJoinedSuperGroupListReq) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *GetJoinedSuperGroupListReq) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.UserID) > 0 { + i -= len(m.UserID) + copy(dAtA[i:], m.UserID) + i = encodeVarintGroup(dAtA, i, uint64(len(m.UserID))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *GetJoinedSuperGroupListResp) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *GetJoinedSuperGroupListResp) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *GetJoinedSuperGroupListResp) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Groups) > 0 { + for iNdEx := len(m.Groups) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Groups[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGroup(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + } + return len(dAtA) - i, nil +} + +func (m *GetSuperGroupsInfoReq) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *GetSuperGroupsInfoReq) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *GetSuperGroupsInfoReq) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.GroupIDs) > 0 { + for iNdEx := len(m.GroupIDs) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.GroupIDs[iNdEx]) + copy(dAtA[i:], m.GroupIDs[iNdEx]) + i = encodeVarintGroup(dAtA, i, uint64(len(m.GroupIDs[iNdEx]))) + i-- + dAtA[i] = 0xa + } + } + return len(dAtA) - i, nil +} + +func (m *GetSuperGroupsInfoResp) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *GetSuperGroupsInfoResp) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *GetSuperGroupsInfoResp) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.GroupInfos) > 0 { + for iNdEx := len(m.GroupInfos) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.GroupInfos[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGroup(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + } + return len(dAtA) - i, nil +} + +func (m *SetGroupMemberInfo) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *SetGroupMemberInfo) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *SetGroupMemberInfo) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.Ex != nil { + { + size, err := m.Ex.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGroup(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x32 + } + if m.RoleLevel != nil { + { + size, err := m.RoleLevel.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGroup(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x2a + } + if m.FaceURL != nil { + { + size, err := m.FaceURL.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGroup(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x22 + } + if m.Nickname != nil { + { + size, err := m.Nickname.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGroup(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1a + } + if len(m.UserID) > 0 { + i -= len(m.UserID) + copy(dAtA[i:], m.UserID) + i = encodeVarintGroup(dAtA, i, uint64(len(m.UserID))) + i-- + dAtA[i] = 0x12 + } + if len(m.GroupID) > 0 { + i -= len(m.GroupID) + copy(dAtA[i:], m.GroupID) + i = encodeVarintGroup(dAtA, i, uint64(len(m.GroupID))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *SetGroupMemberInfoReq) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *SetGroupMemberInfoReq) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *SetGroupMemberInfoReq) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Members) > 0 { + for iNdEx := len(m.Members) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Members[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGroup(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + } + return len(dAtA) - i, nil +} + +func (m *SetGroupMemberInfoResp) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *SetGroupMemberInfoResp) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *SetGroupMemberInfoResp) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + return len(dAtA) - i, nil +} + +func (m *GetGroupAbstractInfoReq) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *GetGroupAbstractInfoReq) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *GetGroupAbstractInfoReq) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.GroupIDs) > 0 { + for iNdEx := len(m.GroupIDs) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.GroupIDs[iNdEx]) + copy(dAtA[i:], m.GroupIDs[iNdEx]) + i = encodeVarintGroup(dAtA, i, uint64(len(m.GroupIDs[iNdEx]))) + i-- + dAtA[i] = 0xa + } + } + return len(dAtA) - i, nil +} + +func (m *GroupAbstractInfo) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *GroupAbstractInfo) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *GroupAbstractInfo) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.GroupMemberListHash != 0 { + i = encodeVarintGroup(dAtA, i, uint64(m.GroupMemberListHash)) + i-- + dAtA[i] = 0x18 + } + if m.GroupMemberNumber != 0 { + i = encodeVarintGroup(dAtA, i, uint64(m.GroupMemberNumber)) + i-- + dAtA[i] = 0x10 + } + if len(m.GroupID) > 0 { + i -= len(m.GroupID) + copy(dAtA[i:], m.GroupID) + i = encodeVarintGroup(dAtA, i, uint64(len(m.GroupID))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *GetGroupAbstractInfoResp) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *GetGroupAbstractInfoResp) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *GetGroupAbstractInfoResp) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.GroupAbstractInfos) > 0 { + for iNdEx := len(m.GroupAbstractInfos) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.GroupAbstractInfos[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGroup(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + } + return len(dAtA) - i, nil +} + +func (m *GetUserInGroupMembersReq) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *GetUserInGroupMembersReq) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *GetUserInGroupMembersReq) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.GroupIDs) > 0 { + for iNdEx := len(m.GroupIDs) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.GroupIDs[iNdEx]) + copy(dAtA[i:], m.GroupIDs[iNdEx]) + i = encodeVarintGroup(dAtA, i, uint64(len(m.GroupIDs[iNdEx]))) + i-- + dAtA[i] = 0x12 + } + } + if len(m.UserID) > 0 { + i -= len(m.UserID) + copy(dAtA[i:], m.UserID) + i = encodeVarintGroup(dAtA, i, uint64(len(m.UserID))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *GetUserInGroupMembersResp) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *GetUserInGroupMembersResp) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *GetUserInGroupMembersResp) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Members) > 0 { + for iNdEx := len(m.Members) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Members[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGroup(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + } + return len(dAtA) - i, nil +} + +func (m *GetGroupMemberUserIDReq) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *GetGroupMemberUserIDReq) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *GetGroupMemberUserIDReq) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.GroupID) > 0 { + i -= len(m.GroupID) + copy(dAtA[i:], m.GroupID) + i = encodeVarintGroup(dAtA, i, uint64(len(m.GroupID))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *GetGroupMemberUserIDResp) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *GetGroupMemberUserIDResp) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *GetGroupMemberUserIDResp) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.UserIDs) > 0 { + for iNdEx := len(m.UserIDs) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.UserIDs[iNdEx]) + copy(dAtA[i:], m.UserIDs[iNdEx]) + i = encodeVarintGroup(dAtA, i, uint64(len(m.UserIDs[iNdEx]))) + i-- + dAtA[i] = 0xa + } + } + return len(dAtA) - i, nil +} + +func (m *GetGroupMemberRoleLevelReq) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *GetGroupMemberRoleLevelReq) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *GetGroupMemberRoleLevelReq) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.RoleLevels) > 0 { + dAtA17 := make([]byte, len(m.RoleLevels)*10) + var j16 int + for _, num1 := range m.RoleLevels { + num := uint64(num1) + for num >= 1<<7 { + dAtA17[j16] = uint8(uint64(num)&0x7f | 0x80) + num >>= 7 + j16++ + } + dAtA17[j16] = uint8(num) + j16++ + } + i -= j16 + copy(dAtA[i:], dAtA17[:j16]) + i = encodeVarintGroup(dAtA, i, uint64(j16)) + i-- + dAtA[i] = 0x12 + } + if len(m.GroupID) > 0 { + i -= len(m.GroupID) + copy(dAtA[i:], m.GroupID) + i = encodeVarintGroup(dAtA, i, uint64(len(m.GroupID))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *GetGroupMemberRoleLevelResp) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *GetGroupMemberRoleLevelResp) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *GetGroupMemberRoleLevelResp) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Members) > 0 { + for iNdEx := len(m.Members) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Members[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGroup(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + } + return len(dAtA) - i, nil +} + +func encodeVarintGroup(dAtA []byte, offset int, v uint64) int { + offset -= sovGroup(v) + base := offset + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + dAtA[offset] = uint8(v) + return base +} +func (m *CreateGroupReq) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.InitMembers) > 0 { + for _, s := range m.InitMembers { + l = len(s) + n += 1 + l + sovGroup(uint64(l)) + } + } + if m.GroupInfo != nil { + l = m.GroupInfo.Size() + n += 1 + l + sovGroup(uint64(l)) + } + if len(m.AdminUserIDs) > 0 { + for _, s := range m.AdminUserIDs { + l = len(s) + n += 1 + l + sovGroup(uint64(l)) + } + } + l = len(m.OwnerUserID) + if l > 0 { + n += 1 + l + sovGroup(uint64(l)) + } + return n +} + +func (m *CreateGroupResp) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.GroupInfo != nil { + l = m.GroupInfo.Size() + n += 1 + l + sovGroup(uint64(l)) + } + return n +} + +func (m *GetGroupsInfoReq) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.GroupIDs) > 0 { + for _, s := range m.GroupIDs { + l = len(s) + n += 1 + l + sovGroup(uint64(l)) + } + } + return n +} + +func (m *GetGroupsInfoResp) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.GroupInfos) > 0 { + for _, e := range m.GroupInfos { + l = e.Size() + n += 1 + l + sovGroup(uint64(l)) + } + } + return n +} + +func (m *SetGroupInfoReq) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.GroupInfoForSet != nil { + l = m.GroupInfoForSet.Size() + n += 1 + l + sovGroup(uint64(l)) + } + return n +} + +func (m *SetGroupInfoResp) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + +func (m *GetGroupApplicationListReq) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Pagination != nil { + l = m.Pagination.Size() + n += 1 + l + sovGroup(uint64(l)) + } + l = len(m.FromUserID) + if l > 0 { + n += 1 + l + sovGroup(uint64(l)) + } + return n +} + +func (m *GetGroupApplicationListResp) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Total != 0 { + n += 1 + sovGroup(uint64(m.Total)) + } + if len(m.GroupRequests) > 0 { + for _, e := range m.GroupRequests { + l = e.Size() + n += 1 + l + sovGroup(uint64(l)) + } + } + return n +} + +func (m *GetUserReqApplicationListReq) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Pagination != nil { + l = m.Pagination.Size() + n += 1 + l + sovGroup(uint64(l)) + } + l = len(m.UserID) + if l > 0 { + n += 1 + l + sovGroup(uint64(l)) + } + return n +} + +func (m *GetUserReqApplicationListResp) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Total != 0 { + n += 1 + sovGroup(uint64(m.Total)) + } + if len(m.GroupRequests) > 0 { + for _, e := range m.GroupRequests { + l = e.Size() + n += 1 + l + sovGroup(uint64(l)) + } + } + return n +} + +func (m *TransferGroupOwnerReq) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.GroupID) + if l > 0 { + n += 1 + l + sovGroup(uint64(l)) + } + l = len(m.OldOwnerUserID) + if l > 0 { + n += 1 + l + sovGroup(uint64(l)) + } + l = len(m.NewOwnerUserID) + if l > 0 { + n += 1 + l + sovGroup(uint64(l)) + } + return n +} + +func (m *TransferGroupOwnerResp) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + +func (m *JoinGroupReq) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.GroupID) + if l > 0 { + n += 1 + l + sovGroup(uint64(l)) + } + l = len(m.ReqMessage) + if l > 0 { + n += 1 + l + sovGroup(uint64(l)) + } + if m.JoinSource != 0 { + n += 1 + sovGroup(uint64(m.JoinSource)) + } + l = len(m.InviterUserID) + if l > 0 { + n += 1 + l + sovGroup(uint64(l)) + } + return n +} + +func (m *JoinGroupResp) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + +func (m *GroupApplicationResponseReq) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.GroupID) + if l > 0 { + n += 1 + l + sovGroup(uint64(l)) + } + l = len(m.FromUserID) + if l > 0 { + n += 1 + l + sovGroup(uint64(l)) + } + l = len(m.HandledMsg) + if l > 0 { + n += 1 + l + sovGroup(uint64(l)) + } + if m.HandleResult != 0 { + n += 1 + sovGroup(uint64(m.HandleResult)) + } + return n +} + +func (m *GroupApplicationResponseResp) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + +func (m *QuitGroupReq) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.GroupID) + if l > 0 { + n += 1 + l + sovGroup(uint64(l)) + } + return n +} + +func (m *QuitGroupResp) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + +func (m *GetGroupMemberListReq) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Pagination != nil { + l = m.Pagination.Size() + n += 1 + l + sovGroup(uint64(l)) + } + l = len(m.GroupID) + if l > 0 { + n += 1 + l + sovGroup(uint64(l)) + } + if m.Filter != 0 { + n += 1 + sovGroup(uint64(m.Filter)) + } + return n +} + +func (m *GetGroupMemberListResp) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Total != 0 { + n += 1 + sovGroup(uint64(m.Total)) + } + if len(m.Members) > 0 { + for _, e := range m.Members { + l = e.Size() + n += 1 + l + sovGroup(uint64(l)) + } + } + return n +} + +func (m *GetGroupMembersInfoReq) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.GroupID) + if l > 0 { + n += 1 + l + sovGroup(uint64(l)) + } + if len(m.Members) > 0 { + for _, s := range m.Members { + l = len(s) + n += 1 + l + sovGroup(uint64(l)) + } + } + return n +} + +func (m *GetGroupMembersInfoResp) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.Members) > 0 { + for _, e := range m.Members { + l = e.Size() + n += 1 + l + sovGroup(uint64(l)) + } + } + return n +} + +func (m *KickGroupMemberReq) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.GroupID) + if l > 0 { + n += 1 + l + sovGroup(uint64(l)) + } + if len(m.KickedUserIDs) > 0 { + for _, s := range m.KickedUserIDs { + l = len(s) + n += 1 + l + sovGroup(uint64(l)) + } + } + l = len(m.Reason) + if l > 0 { + n += 1 + l + sovGroup(uint64(l)) + } + return n +} + +func (m *KickGroupMemberResp) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + +func (m *GetJoinedGroupListReq) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Pagination != nil { + l = m.Pagination.Size() + n += 1 + l + sovGroup(uint64(l)) + } + l = len(m.FromUserID) + if l > 0 { + n += 1 + l + sovGroup(uint64(l)) + } + return n +} + +func (m *GetJoinedGroupListResp) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Total != 0 { + n += 1 + sovGroup(uint64(m.Total)) + } + if len(m.Groups) > 0 { + for _, e := range m.Groups { + l = e.Size() + n += 1 + l + sovGroup(uint64(l)) + } + } + return n +} + +func (m *InviteUserToGroupReq) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.GroupID) + if l > 0 { + n += 1 + l + sovGroup(uint64(l)) + } + l = len(m.Reason) + if l > 0 { + n += 1 + l + sovGroup(uint64(l)) + } + if len(m.InvitedUserIDs) > 0 { + for _, s := range m.InvitedUserIDs { + l = len(s) + n += 1 + l + sovGroup(uint64(l)) + } + } + return n +} + +func (m *InviteUserToGroupResp) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + +func (m *GetGroupAllMemberReq) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Pagination != nil { + l = m.Pagination.Size() + n += 1 + l + sovGroup(uint64(l)) + } + l = len(m.GroupID) + if l > 0 { + n += 1 + l + sovGroup(uint64(l)) + } + return n +} + +func (m *GetGroupAllMemberResp) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.Members) > 0 { + for _, e := range m.Members { + l = e.Size() + n += 1 + l + sovGroup(uint64(l)) + } + } + return n +} + +func (m *CMSGroup) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.GroupInfo != nil { + l = m.GroupInfo.Size() + n += 1 + l + sovGroup(uint64(l)) + } + l = len(m.GroupOwnerUserName) + if l > 0 { + n += 1 + l + sovGroup(uint64(l)) + } + l = len(m.GroupOwnerUserID) + if l > 0 { + n += 1 + l + sovGroup(uint64(l)) + } + return n +} + +func (m *GetGroupsReq) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Pagination != nil { + l = m.Pagination.Size() + n += 1 + l + sovGroup(uint64(l)) + } + l = len(m.GroupName) + if l > 0 { + n += 1 + l + sovGroup(uint64(l)) + } + l = len(m.GroupID) + if l > 0 { + n += 1 + l + sovGroup(uint64(l)) + } + return n +} + +func (m *GetGroupsResp) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Total != 0 { + n += 1 + sovGroup(uint64(m.Total)) + } + if len(m.Groups) > 0 { + for _, e := range m.Groups { + l = e.Size() + n += 1 + l + sovGroup(uint64(l)) + } + } + return n +} + +func (m *GetGroupMemberReq) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.GroupID) + if l > 0 { + n += 1 + l + sovGroup(uint64(l)) + } + return n +} + +func (m *GetGroupMembersCMSReq) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Pagination != nil { + l = m.Pagination.Size() + n += 1 + l + sovGroup(uint64(l)) + } + l = len(m.GroupID) + if l > 0 { + n += 1 + l + sovGroup(uint64(l)) + } + l = len(m.UserName) + if l > 0 { + n += 1 + l + sovGroup(uint64(l)) + } + return n +} + +func (m *GetGroupMembersCMSResp) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Total != 0 { + n += 1 + sovGroup(uint64(m.Total)) + } + if len(m.Members) > 0 { + for _, e := range m.Members { + l = e.Size() + n += 1 + l + sovGroup(uint64(l)) + } + } + return n +} + +func (m *DismissGroupReq) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.GroupID) + if l > 0 { + n += 1 + l + sovGroup(uint64(l)) + } + return n +} + +func (m *DismissGroupResp) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + +func (m *MuteGroupMemberReq) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.GroupID) + if l > 0 { + n += 1 + l + sovGroup(uint64(l)) + } + l = len(m.UserID) + if l > 0 { + n += 1 + l + sovGroup(uint64(l)) + } + if m.MutedSeconds != 0 { + n += 1 + sovGroup(uint64(m.MutedSeconds)) + } + return n +} + +func (m *MuteGroupMemberResp) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + +func (m *CancelMuteGroupMemberReq) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.GroupID) + if l > 0 { + n += 1 + l + sovGroup(uint64(l)) + } + l = len(m.UserID) + if l > 0 { + n += 1 + l + sovGroup(uint64(l)) + } + return n +} + +func (m *CancelMuteGroupMemberResp) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + +func (m *MuteGroupReq) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.GroupID) + if l > 0 { + n += 1 + l + sovGroup(uint64(l)) + } + return n +} + +func (m *MuteGroupResp) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + +func (m *CancelMuteGroupReq) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.GroupID) + if l > 0 { + n += 1 + l + sovGroup(uint64(l)) + } + return n +} + +func (m *CancelMuteGroupResp) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + +func (m *GetJoinedSuperGroupListReq) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.UserID) + if l > 0 { + n += 1 + l + sovGroup(uint64(l)) + } + return n +} + +func (m *GetJoinedSuperGroupListResp) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.Groups) > 0 { + for _, e := range m.Groups { + l = e.Size() + n += 1 + l + sovGroup(uint64(l)) + } + } + return n +} + +func (m *GetSuperGroupsInfoReq) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.GroupIDs) > 0 { + for _, s := range m.GroupIDs { + l = len(s) + n += 1 + l + sovGroup(uint64(l)) + } + } + return n +} + +func (m *GetSuperGroupsInfoResp) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.GroupInfos) > 0 { + for _, e := range m.GroupInfos { + l = e.Size() + n += 1 + l + sovGroup(uint64(l)) + } + } + return n +} + +func (m *SetGroupMemberInfo) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.GroupID) + if l > 0 { + n += 1 + l + sovGroup(uint64(l)) + } + l = len(m.UserID) + if l > 0 { + n += 1 + l + sovGroup(uint64(l)) + } + if m.Nickname != nil { + l = m.Nickname.Size() + n += 1 + l + sovGroup(uint64(l)) + } + if m.FaceURL != nil { + l = m.FaceURL.Size() + n += 1 + l + sovGroup(uint64(l)) + } + if m.RoleLevel != nil { + l = m.RoleLevel.Size() + n += 1 + l + sovGroup(uint64(l)) + } + if m.Ex != nil { + l = m.Ex.Size() + n += 1 + l + sovGroup(uint64(l)) + } + return n +} + +func (m *SetGroupMemberInfoReq) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.Members) > 0 { + for _, e := range m.Members { + l = e.Size() + n += 1 + l + sovGroup(uint64(l)) + } + } + return n +} + +func (m *SetGroupMemberInfoResp) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + +func (m *GetGroupAbstractInfoReq) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.GroupIDs) > 0 { + for _, s := range m.GroupIDs { + l = len(s) + n += 1 + l + sovGroup(uint64(l)) + } + } + return n +} + +func (m *GroupAbstractInfo) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.GroupID) + if l > 0 { + n += 1 + l + sovGroup(uint64(l)) + } + if m.GroupMemberNumber != 0 { + n += 1 + sovGroup(uint64(m.GroupMemberNumber)) + } + if m.GroupMemberListHash != 0 { + n += 1 + sovGroup(uint64(m.GroupMemberListHash)) + } + return n +} + +func (m *GetGroupAbstractInfoResp) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.GroupAbstractInfos) > 0 { + for _, e := range m.GroupAbstractInfos { + l = e.Size() + n += 1 + l + sovGroup(uint64(l)) + } + } + return n +} + +func (m *GetUserInGroupMembersReq) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.UserID) + if l > 0 { + n += 1 + l + sovGroup(uint64(l)) + } + if len(m.GroupIDs) > 0 { + for _, s := range m.GroupIDs { + l = len(s) + n += 1 + l + sovGroup(uint64(l)) + } + } + return n +} + +func (m *GetUserInGroupMembersResp) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.Members) > 0 { + for _, e := range m.Members { + l = e.Size() + n += 1 + l + sovGroup(uint64(l)) + } + } + return n +} + +func (m *GetGroupMemberUserIDReq) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.GroupID) + if l > 0 { + n += 1 + l + sovGroup(uint64(l)) + } + return n +} + +func (m *GetGroupMemberUserIDResp) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.UserIDs) > 0 { + for _, s := range m.UserIDs { + l = len(s) + n += 1 + l + sovGroup(uint64(l)) + } + } + return n +} + +func (m *GetGroupMemberRoleLevelReq) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.GroupID) + if l > 0 { + n += 1 + l + sovGroup(uint64(l)) + } + if len(m.RoleLevels) > 0 { + l = 0 + for _, e := range m.RoleLevels { + l += sovGroup(uint64(e)) + } + n += 1 + sovGroup(uint64(l)) + l + } + return n +} + +func (m *GetGroupMemberRoleLevelResp) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.Members) > 0 { + for _, e := range m.Members { + l = e.Size() + n += 1 + l + sovGroup(uint64(l)) + } + } + return n +} + +func sovGroup(x uint64) (n int) { + return (math_bits.Len64(x|1) + 6) / 7 +} +func sozGroup(x uint64) (n int) { + return sovGroup(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (m *CreateGroupReq) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGroup + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: CreateGroupReq: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: CreateGroupReq: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field InitMembers", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGroup + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGroup + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGroup + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.InitMembers = append(m.InitMembers, string(dAtA[iNdEx:postIndex])) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field GroupInfo", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGroup + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGroup + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGroup + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.GroupInfo == nil { + m.GroupInfo = &sdkws.GroupInfo{} + } + if err := m.GroupInfo.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field AdminUserIDs", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGroup + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGroup + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGroup + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.AdminUserIDs = append(m.AdminUserIDs, string(dAtA[iNdEx:postIndex])) + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field OwnerUserID", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGroup + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGroup + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGroup + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.OwnerUserID = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipGroup(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthGroup + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *CreateGroupResp) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGroup + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: CreateGroupResp: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: CreateGroupResp: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field GroupInfo", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGroup + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGroup + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGroup + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.GroupInfo == nil { + m.GroupInfo = &sdkws.GroupInfo{} + } + if err := m.GroupInfo.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipGroup(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthGroup + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *GetGroupsInfoReq) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGroup + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: GetGroupsInfoReq: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: GetGroupsInfoReq: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field GroupIDs", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGroup + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGroup + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGroup + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.GroupIDs = append(m.GroupIDs, string(dAtA[iNdEx:postIndex])) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipGroup(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthGroup + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *GetGroupsInfoResp) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGroup + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: GetGroupsInfoResp: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: GetGroupsInfoResp: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field GroupInfos", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGroup + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGroup + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGroup + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.GroupInfos = append(m.GroupInfos, &sdkws.GroupInfo{}) + if err := m.GroupInfos[len(m.GroupInfos)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipGroup(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthGroup + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *SetGroupInfoReq) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGroup + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: SetGroupInfoReq: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: SetGroupInfoReq: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field GroupInfoForSet", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGroup + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGroup + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGroup + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.GroupInfoForSet == nil { + m.GroupInfoForSet = &sdkws.GroupInfoForSet{} + } + if err := m.GroupInfoForSet.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipGroup(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthGroup + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *SetGroupInfoResp) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGroup + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: SetGroupInfoResp: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: SetGroupInfoResp: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := skipGroup(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthGroup + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *GetGroupApplicationListReq) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGroup + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: GetGroupApplicationListReq: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: GetGroupApplicationListReq: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Pagination", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGroup + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGroup + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGroup + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Pagination == nil { + m.Pagination = &sdkws.RequestPagination{} + } + if err := m.Pagination.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field FromUserID", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGroup + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGroup + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGroup + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.FromUserID = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipGroup(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthGroup + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *GetGroupApplicationListResp) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGroup + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: GetGroupApplicationListResp: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: GetGroupApplicationListResp: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Total", wireType) + } + m.Total = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGroup + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Total |= uint32(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field GroupRequests", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGroup + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGroup + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGroup + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.GroupRequests = append(m.GroupRequests, &sdkws.GroupRequest{}) + if err := m.GroupRequests[len(m.GroupRequests)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipGroup(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthGroup + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *GetUserReqApplicationListReq) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGroup + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: GetUserReqApplicationListReq: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: GetUserReqApplicationListReq: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Pagination", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGroup + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGroup + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGroup + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Pagination == nil { + m.Pagination = &sdkws.RequestPagination{} + } + if err := m.Pagination.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field UserID", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGroup + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGroup + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGroup + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.UserID = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipGroup(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthGroup + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *GetUserReqApplicationListResp) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGroup + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: GetUserReqApplicationListResp: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: GetUserReqApplicationListResp: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Total", wireType) + } + m.Total = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGroup + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Total |= uint32(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field GroupRequests", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGroup + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGroup + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGroup + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.GroupRequests = append(m.GroupRequests, &sdkws.GroupRequest{}) + if err := m.GroupRequests[len(m.GroupRequests)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipGroup(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthGroup + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *TransferGroupOwnerReq) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGroup + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: TransferGroupOwnerReq: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: TransferGroupOwnerReq: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field GroupID", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGroup + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGroup + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGroup + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.GroupID = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field OldOwnerUserID", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGroup + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGroup + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGroup + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.OldOwnerUserID = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field NewOwnerUserID", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGroup + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGroup + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGroup + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.NewOwnerUserID = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipGroup(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthGroup + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *TransferGroupOwnerResp) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGroup + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: TransferGroupOwnerResp: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: TransferGroupOwnerResp: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := skipGroup(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthGroup + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *JoinGroupReq) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGroup + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: JoinGroupReq: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: JoinGroupReq: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field GroupID", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGroup + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGroup + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGroup + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.GroupID = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ReqMessage", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGroup + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGroup + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGroup + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ReqMessage = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field JoinSource", wireType) + } + m.JoinSource = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGroup + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.JoinSource |= int32(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field InviterUserID", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGroup + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGroup + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGroup + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.InviterUserID = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipGroup(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthGroup + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *JoinGroupResp) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGroup + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: JoinGroupResp: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: JoinGroupResp: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := skipGroup(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthGroup + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *GroupApplicationResponseReq) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGroup + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: GroupApplicationResponseReq: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: GroupApplicationResponseReq: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field GroupID", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGroup + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGroup + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGroup + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.GroupID = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field FromUserID", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGroup + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGroup + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGroup + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.FromUserID = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field HandledMsg", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGroup + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGroup + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGroup + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.HandledMsg = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 4: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field HandleResult", wireType) + } + m.HandleResult = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGroup + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.HandleResult |= int32(b&0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := skipGroup(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthGroup + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *GroupApplicationResponseResp) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGroup + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: GroupApplicationResponseResp: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: GroupApplicationResponseResp: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := skipGroup(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthGroup + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *QuitGroupReq) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGroup + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: QuitGroupReq: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QuitGroupReq: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field GroupID", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGroup + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGroup + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGroup + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.GroupID = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipGroup(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthGroup + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *QuitGroupResp) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGroup + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: QuitGroupResp: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QuitGroupResp: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := skipGroup(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthGroup + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *GetGroupMemberListReq) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGroup + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: GetGroupMemberListReq: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: GetGroupMemberListReq: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Pagination", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGroup + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGroup + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGroup + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Pagination == nil { + m.Pagination = &sdkws.RequestPagination{} + } + if err := m.Pagination.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field GroupID", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGroup + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGroup + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGroup + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.GroupID = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Filter", wireType) + } + m.Filter = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGroup + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Filter |= int32(b&0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := skipGroup(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthGroup + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *GetGroupMemberListResp) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGroup + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: GetGroupMemberListResp: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: GetGroupMemberListResp: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Total", wireType) + } + m.Total = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGroup + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Total |= uint32(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Members", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGroup + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGroup + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGroup + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Members = append(m.Members, &sdkws.GroupMemberFullInfo{}) + if err := m.Members[len(m.Members)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipGroup(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthGroup + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *GetGroupMembersInfoReq) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGroup + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: GetGroupMembersInfoReq: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: GetGroupMembersInfoReq: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field GroupID", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGroup + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGroup + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGroup + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.GroupID = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Members", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGroup + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGroup + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGroup + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Members = append(m.Members, string(dAtA[iNdEx:postIndex])) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipGroup(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthGroup + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *GetGroupMembersInfoResp) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGroup + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: GetGroupMembersInfoResp: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: GetGroupMembersInfoResp: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Members", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGroup + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGroup + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGroup + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Members = append(m.Members, &sdkws.GroupMemberFullInfo{}) + if err := m.Members[len(m.Members)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipGroup(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthGroup + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *KickGroupMemberReq) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGroup + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: KickGroupMemberReq: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: KickGroupMemberReq: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field GroupID", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGroup + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGroup + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGroup + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.GroupID = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field KickedUserIDs", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGroup + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGroup + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGroup + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.KickedUserIDs = append(m.KickedUserIDs, string(dAtA[iNdEx:postIndex])) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Reason", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGroup + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGroup + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGroup + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Reason = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipGroup(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthGroup + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *KickGroupMemberResp) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGroup + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: KickGroupMemberResp: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: KickGroupMemberResp: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := skipGroup(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthGroup + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *GetJoinedGroupListReq) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGroup + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: GetJoinedGroupListReq: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: GetJoinedGroupListReq: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Pagination", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGroup + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGroup + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGroup + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Pagination == nil { + m.Pagination = &sdkws.RequestPagination{} + } + if err := m.Pagination.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field FromUserID", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGroup + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGroup + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGroup + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.FromUserID = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipGroup(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthGroup + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *GetJoinedGroupListResp) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGroup + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: GetJoinedGroupListResp: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: GetJoinedGroupListResp: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Total", wireType) + } + m.Total = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGroup + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Total |= uint32(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Groups", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGroup + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGroup + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGroup + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Groups = append(m.Groups, &sdkws.GroupInfo{}) + if err := m.Groups[len(m.Groups)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipGroup(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthGroup + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *InviteUserToGroupReq) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGroup + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: InviteUserToGroupReq: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: InviteUserToGroupReq: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field GroupID", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGroup + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGroup + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGroup + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.GroupID = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Reason", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGroup + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGroup + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGroup + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Reason = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field InvitedUserIDs", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGroup + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGroup + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGroup + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.InvitedUserIDs = append(m.InvitedUserIDs, string(dAtA[iNdEx:postIndex])) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipGroup(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthGroup + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *InviteUserToGroupResp) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGroup + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: InviteUserToGroupResp: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: InviteUserToGroupResp: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := skipGroup(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthGroup + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *GetGroupAllMemberReq) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGroup + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: GetGroupAllMemberReq: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: GetGroupAllMemberReq: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Pagination", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGroup + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGroup + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGroup + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Pagination == nil { + m.Pagination = &sdkws.RequestPagination{} + } + if err := m.Pagination.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field GroupID", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGroup + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGroup + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGroup + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.GroupID = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipGroup(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthGroup + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *GetGroupAllMemberResp) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGroup + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: GetGroupAllMemberResp: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: GetGroupAllMemberResp: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Members", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGroup + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGroup + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGroup + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Members = append(m.Members, &sdkws.GroupMemberFullInfo{}) + if err := m.Members[len(m.Members)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipGroup(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthGroup + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *CMSGroup) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGroup + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: CMSGroup: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: CMSGroup: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field GroupInfo", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGroup + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGroup + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGroup + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.GroupInfo == nil { + m.GroupInfo = &sdkws.GroupInfo{} + } + if err := m.GroupInfo.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field GroupOwnerUserName", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGroup + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGroup + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGroup + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.GroupOwnerUserName = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field GroupOwnerUserID", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGroup + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGroup + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGroup + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.GroupOwnerUserID = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipGroup(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthGroup + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *GetGroupsReq) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGroup + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: GetGroupsReq: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: GetGroupsReq: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Pagination", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGroup + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGroup + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGroup + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Pagination == nil { + m.Pagination = &sdkws.RequestPagination{} + } + if err := m.Pagination.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field GroupName", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGroup + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGroup + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGroup + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.GroupName = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field GroupID", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGroup + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGroup + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGroup + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.GroupID = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipGroup(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthGroup + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *GetGroupsResp) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGroup + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: GetGroupsResp: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: GetGroupsResp: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Total", wireType) + } + m.Total = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGroup + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Total |= uint32(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Groups", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGroup + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGroup + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGroup + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Groups = append(m.Groups, &CMSGroup{}) + if err := m.Groups[len(m.Groups)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipGroup(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthGroup + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *GetGroupMemberReq) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGroup + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: GetGroupMemberReq: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: GetGroupMemberReq: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field GroupID", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGroup + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGroup + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGroup + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.GroupID = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipGroup(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthGroup + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *GetGroupMembersCMSReq) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGroup + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: GetGroupMembersCMSReq: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: GetGroupMembersCMSReq: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Pagination", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGroup + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGroup + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGroup + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Pagination == nil { + m.Pagination = &sdkws.RequestPagination{} + } + if err := m.Pagination.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field GroupID", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGroup + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGroup + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGroup + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.GroupID = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field UserName", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGroup + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGroup + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGroup + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.UserName = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipGroup(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthGroup + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *GetGroupMembersCMSResp) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGroup + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: GetGroupMembersCMSResp: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: GetGroupMembersCMSResp: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Total", wireType) + } + m.Total = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGroup + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Total |= uint32(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Members", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGroup + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGroup + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGroup + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Members = append(m.Members, &sdkws.GroupMemberFullInfo{}) + if err := m.Members[len(m.Members)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipGroup(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthGroup + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *DismissGroupReq) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGroup + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: DismissGroupReq: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: DismissGroupReq: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field GroupID", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGroup + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGroup + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGroup + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.GroupID = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipGroup(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthGroup + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *DismissGroupResp) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGroup + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: DismissGroupResp: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: DismissGroupResp: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := skipGroup(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthGroup + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MuteGroupMemberReq) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGroup + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: MuteGroupMemberReq: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MuteGroupMemberReq: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field GroupID", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGroup + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGroup + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGroup + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.GroupID = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field UserID", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGroup + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGroup + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGroup + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.UserID = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field MutedSeconds", wireType) + } + m.MutedSeconds = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGroup + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.MutedSeconds |= uint32(b&0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := skipGroup(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthGroup + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MuteGroupMemberResp) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGroup + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: MuteGroupMemberResp: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MuteGroupMemberResp: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := skipGroup(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthGroup + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *CancelMuteGroupMemberReq) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGroup + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: CancelMuteGroupMemberReq: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: CancelMuteGroupMemberReq: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field GroupID", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGroup + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGroup + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGroup + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.GroupID = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field UserID", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGroup + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGroup + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGroup + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.UserID = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipGroup(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthGroup + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *CancelMuteGroupMemberResp) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGroup + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: CancelMuteGroupMemberResp: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: CancelMuteGroupMemberResp: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := skipGroup(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthGroup + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MuteGroupReq) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGroup + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: MuteGroupReq: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MuteGroupReq: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field GroupID", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGroup + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGroup + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGroup + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.GroupID = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipGroup(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthGroup + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MuteGroupResp) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGroup + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: MuteGroupResp: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MuteGroupResp: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := skipGroup(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthGroup + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *CancelMuteGroupReq) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGroup + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: CancelMuteGroupReq: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: CancelMuteGroupReq: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field GroupID", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGroup + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGroup + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGroup + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.GroupID = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipGroup(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthGroup + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *CancelMuteGroupResp) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGroup + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: CancelMuteGroupResp: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: CancelMuteGroupResp: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := skipGroup(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthGroup + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *GetJoinedSuperGroupListReq) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGroup + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: GetJoinedSuperGroupListReq: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: GetJoinedSuperGroupListReq: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field UserID", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGroup + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGroup + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGroup + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.UserID = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipGroup(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthGroup + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *GetJoinedSuperGroupListResp) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGroup + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: GetJoinedSuperGroupListResp: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: GetJoinedSuperGroupListResp: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Groups", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGroup + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGroup + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGroup + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Groups = append(m.Groups, &sdkws.GroupInfo{}) + if err := m.Groups[len(m.Groups)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipGroup(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthGroup + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *GetSuperGroupsInfoReq) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGroup + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: GetSuperGroupsInfoReq: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: GetSuperGroupsInfoReq: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field GroupIDs", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGroup + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGroup + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGroup + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.GroupIDs = append(m.GroupIDs, string(dAtA[iNdEx:postIndex])) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipGroup(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthGroup + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *GetSuperGroupsInfoResp) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGroup + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: GetSuperGroupsInfoResp: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: GetSuperGroupsInfoResp: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field GroupInfos", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGroup + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGroup + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGroup + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.GroupInfos = append(m.GroupInfos, &sdkws.GroupInfo{}) + if err := m.GroupInfos[len(m.GroupInfos)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipGroup(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthGroup + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *SetGroupMemberInfo) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGroup + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: SetGroupMemberInfo: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: SetGroupMemberInfo: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field GroupID", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGroup + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGroup + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGroup + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.GroupID = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field UserID", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGroup + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGroup + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGroup + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.UserID = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Nickname", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGroup + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGroup + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGroup + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Nickname == nil { + m.Nickname = &wrapperspb.StringValue{} + } + if err := m.Nickname.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field FaceURL", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGroup + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGroup + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGroup + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.FaceURL == nil { + m.FaceURL = &wrapperspb.StringValue{} + } + if err := m.FaceURL.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field RoleLevel", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGroup + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGroup + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGroup + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.RoleLevel == nil { + m.RoleLevel = &wrapperspb.Int32Value{} + } + if err := m.RoleLevel.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 6: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Ex", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGroup + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGroup + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGroup + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Ex == nil { + m.Ex = &wrapperspb.StringValue{} + } + if err := m.Ex.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipGroup(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthGroup + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *SetGroupMemberInfoReq) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGroup + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: SetGroupMemberInfoReq: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: SetGroupMemberInfoReq: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Members", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGroup + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGroup + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGroup + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Members = append(m.Members, &SetGroupMemberInfo{}) + if err := m.Members[len(m.Members)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipGroup(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthGroup + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *SetGroupMemberInfoResp) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGroup + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: SetGroupMemberInfoResp: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: SetGroupMemberInfoResp: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := skipGroup(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthGroup + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *GetGroupAbstractInfoReq) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGroup + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: GetGroupAbstractInfoReq: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: GetGroupAbstractInfoReq: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field GroupIDs", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGroup + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGroup + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGroup + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.GroupIDs = append(m.GroupIDs, string(dAtA[iNdEx:postIndex])) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipGroup(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthGroup + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *GroupAbstractInfo) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGroup + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: GroupAbstractInfo: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: GroupAbstractInfo: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field GroupID", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGroup + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGroup + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGroup + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.GroupID = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field GroupMemberNumber", wireType) + } + m.GroupMemberNumber = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGroup + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.GroupMemberNumber |= uint32(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field GroupMemberListHash", wireType) + } + m.GroupMemberListHash = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGroup + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.GroupMemberListHash |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := skipGroup(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthGroup + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *GetGroupAbstractInfoResp) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGroup + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: GetGroupAbstractInfoResp: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: GetGroupAbstractInfoResp: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field GroupAbstractInfos", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGroup + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGroup + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGroup + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.GroupAbstractInfos = append(m.GroupAbstractInfos, &GroupAbstractInfo{}) + if err := m.GroupAbstractInfos[len(m.GroupAbstractInfos)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipGroup(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthGroup + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *GetUserInGroupMembersReq) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGroup + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: GetUserInGroupMembersReq: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: GetUserInGroupMembersReq: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field UserID", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGroup + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGroup + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGroup + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.UserID = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field GroupIDs", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGroup + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGroup + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGroup + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.GroupIDs = append(m.GroupIDs, string(dAtA[iNdEx:postIndex])) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipGroup(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthGroup + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *GetUserInGroupMembersResp) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGroup + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: GetUserInGroupMembersResp: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: GetUserInGroupMembersResp: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Members", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGroup + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGroup + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGroup + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Members = append(m.Members, &sdkws.GroupMemberFullInfo{}) + if err := m.Members[len(m.Members)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipGroup(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthGroup + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *GetGroupMemberUserIDReq) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGroup + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: GetGroupMemberUserIDReq: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: GetGroupMemberUserIDReq: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field GroupID", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGroup + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGroup + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGroup + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.GroupID = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipGroup(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthGroup + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *GetGroupMemberUserIDResp) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGroup + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: GetGroupMemberUserIDResp: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: GetGroupMemberUserIDResp: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field UserIDs", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGroup + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGroup + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGroup + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.UserIDs = append(m.UserIDs, string(dAtA[iNdEx:postIndex])) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipGroup(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthGroup + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *GetGroupMemberRoleLevelReq) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGroup + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: GetGroupMemberRoleLevelReq: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: GetGroupMemberRoleLevelReq: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field GroupID", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGroup + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGroup + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGroup + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.GroupID = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType == 0 { + var v int32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGroup + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int32(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.RoleLevels = append(m.RoleLevels, v) + } else if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGroup + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + packedLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthGroup + } + postIndex := iNdEx + packedLen + if postIndex < 0 { + return ErrInvalidLengthGroup + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + var elementCount int + var count int + for _, integer := range dAtA[iNdEx:postIndex] { + if integer < 128 { + count++ + } + } + elementCount = count + if elementCount != 0 && len(m.RoleLevels) == 0 { + m.RoleLevels = make([]int32, 0, elementCount) + } + for iNdEx < postIndex { + var v int32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGroup + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int32(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.RoleLevels = append(m.RoleLevels, v) + } + } else { + return fmt.Errorf("proto: wrong wireType = %d for field RoleLevels", wireType) + } + default: + iNdEx = preIndex + skippy, err := skipGroup(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthGroup + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *GetGroupMemberRoleLevelResp) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGroup + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: GetGroupMemberRoleLevelResp: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: GetGroupMemberRoleLevelResp: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Members", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGroup + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGroup + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGroup + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Members = append(m.Members, &sdkws.GroupMemberFullInfo{}) + if err := m.Members[len(m.Members)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipGroup(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthGroup + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipGroup(dAtA []byte) (n int, err error) { + l := len(dAtA) + iNdEx := 0 + depth := 0 + for iNdEx < l { + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowGroup + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + wireType := int(wire & 0x7) + switch wireType { + case 0: + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowGroup + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + iNdEx++ + if dAtA[iNdEx-1] < 0x80 { + break + } + } + case 1: + iNdEx += 8 + case 2: + var length int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowGroup + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + length |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if length < 0 { + return 0, ErrInvalidLengthGroup + } + iNdEx += length + case 3: + depth++ + case 4: + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupGroup + } + depth-- + case 5: + iNdEx += 4 + default: + return 0, fmt.Errorf("proto: illegal wireType %d", wireType) + } + if iNdEx < 0 { + return 0, ErrInvalidLengthGroup + } + if depth == 0 { + return iNdEx, nil + } + } + return 0, io.ErrUnexpectedEOF +} + +var ( + ErrInvalidLengthGroup = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowGroup = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupGroup = fmt.Errorf("proto: unexpected end of group") +) From 15389170894224557659fb9456d30f5fc960cb0e Mon Sep 17 00:00:00 2001 From: withchao <993506633@qq.com> Date: Tue, 28 Feb 2023 11:38:05 +0800 Subject: [PATCH 09/10] api --- internal/api/auth/auth.go | 239 ++--------- internal/api/friend/friend.go | 750 ++++----------------------------- internal/api/friend/friend1.go | 57 --- internal/api/route.go | 73 ++-- internal/api/user/user.go | 531 ++--------------------- 5 files changed, 175 insertions(+), 1475 deletions(-) delete mode 100644 internal/api/friend/friend1.go diff --git a/internal/api/auth/auth.go b/internal/api/auth/auth.go index cbc67fcde..557299458 100644 --- a/internal/api/auth/auth.go +++ b/internal/api/auth/auth.go @@ -1,233 +1,44 @@ package apiAuth import ( - api "OpenIM/pkg/apistruct" + "OpenIM/internal/a2r" "OpenIM/pkg/common/config" - "OpenIM/pkg/common/constant" - "OpenIM/pkg/common/log" - "OpenIM/pkg/common/tokenverify" - rpc "OpenIM/pkg/proto/auth" - sdkws "OpenIM/pkg/proto/sdkws" - "OpenIM/pkg/utils" + auth "OpenIM/pkg/proto/auth" "context" - "net/http" - "strings" - - "github.com/fatih/structs" + "github.com/OpenIMSDK/openKeeper" "github.com/gin-gonic/gin" ) -// @Summary 用户注册 -// @Description 用户注册 -// @Tags 鉴权认证 -// @ID UserRegister -// @Accept json -// @Param req body api.UserRegisterReq true "secret为openIM密钥, 详细见服务端config.yaml secret字段
platform为平台ID
ex为拓展字段
gender为性别, 0为女, 1为男" -// @Produce json -// @Success 0 {object} api.UserRegisterResp -// @Failure 500 {object} api.Swagger500Resp "errCode为500 一般为服务器内部错误" -// @Failure 400 {object} api.Swagger400Resp "errCode为400 一般为参数输入错误, token未带上等" -// @Router /auth/user_register [post] -func UserRegister(c *gin.Context) { - params := api.UserRegisterReq{} - if err := c.BindJSON(¶ms); err != nil { - errMsg := " BindJSON failed " + err.Error() - log.NewError("0", errMsg) - c.JSON(http.StatusBadRequest, gin.H{"errCode": 400, "errMsg": errMsg}) - return - } - - if params.Secret != config.Config.Secret { - errMsg := " params.Secret != config.Config.Secret " - log.NewError(params.OperationID, errMsg, params.Secret, config.Config.Secret) - c.JSON(http.StatusBadRequest, gin.H{"errCode": 401, "errMsg": errMsg}) - return - } - req := &rpc.UserRegisterReq{UserInfo: &sdkws.UserInfo{}} - utils.CopyStructFields(req.UserInfo, ¶ms) - //copier.Copy(req.UserInfo, ¶ms) - req.OperationID = params.OperationID - log.NewInfo(req.OperationID, "UserRegister args ", req.String()) - etcdConn := rpc.GetDefaultConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImAuthName, req.OperationID) - if etcdConn == nil { - errMsg := req.OperationID + " getcdv3.GetDefaultConn == nil" - log.NewError(req.OperationID, errMsg) - c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": errMsg}) - return - } - client := rpc.NewAuthClient(etcdConn) - reply, err := client.UserRegister(context.Background(), req) - if err != nil { - errMsg := req.OperationID + " " + "UserRegister failed " + err.Error() + req.String() - log.NewError(req.OperationID, errMsg) - c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": errMsg}) - return - } - if reply.CommonResp.ErrCode != 0 { - errMsg := req.OperationID + " " + " UserRegister failed " + reply.CommonResp.ErrMsg + req.String() - log.NewError(req.OperationID, errMsg) - if reply.CommonResp.ErrCode == constant.RegisterLimit { - c.JSON(http.StatusOK, gin.H{"errCode": constant.RegisterLimit, "errMsg": "用户注册被限制"}) - } else if reply.CommonResp.ErrCode == constant.InvitationError { - c.JSON(http.StatusOK, gin.H{"errCode": constant.InvitationError, "errMsg": "邀请码错误"}) - } else { - c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": errMsg}) - } - return - } - - pbDataToken := &rpc.UserTokenReq{Platform: params.Platform, FromUserID: params.UserID, OperationID: params.OperationID} - replyToken, err := client.UserToken(context.Background(), pbDataToken) - if err != nil { - errMsg := req.OperationID + " " + " client.UserToken failed " + err.Error() + pbDataToken.String() - log.NewError(req.OperationID, errMsg) - c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": errMsg}) - return - } - resp := api.UserRegisterResp{CommResp: api.CommResp{ErrCode: replyToken.CommonResp.ErrCode, ErrMsg: replyToken.CommonResp.ErrMsg}, - UserToken: api.UserTokenInfo{UserID: req.UserInfo.UserID, Token: replyToken.Token, ExpiredTime: replyToken.ExpiredTime}} - log.NewInfo(req.OperationID, "UserRegister return ", resp) - c.JSON(http.StatusOK, resp) +var _ context.Context // 解决goland编辑器bug +func NewAuth(zk *openKeeper.ZkClient) *Auth { + return &Auth{zk: zk} } -// @Summary 用户登录 -// @Description 获取用户的token -// @Tags 鉴权认证 -// @ID UserToken -// @Accept json -// @Param req body api.UserTokenReq true "secret为openIM密钥, 详细见服务端config.yaml secret字段
platform为平台ID" -// @Produce json -// @Success 0 {object} api.UserTokenResp -// @Failure 500 {object} api.Swagger500Resp "errCode为500 一般为服务器内部错误" -// @Failure 400 {object} api.Swagger400Resp "errCode为400 一般为参数输入错误, token未带上等" -// @Router /auth/user_token [post] -func UserToken(c *gin.Context) { - params := api.UserTokenReq{} - if err := c.BindJSON(¶ms); err != nil { - errMsg := " BindJSON failed " + err.Error() - log.NewError(params.OperationID, errMsg) - c.JSON(http.StatusBadRequest, gin.H{"errCode": 400, "errMsg": errMsg}) - return - } +type Auth struct { + zk *openKeeper.ZkClient +} - if params.Secret != config.Config.Secret { - errMsg := params.OperationID + " params.Secret != config.Config.Secret " - log.NewError(params.OperationID, "params.Secret != config.Config.Secret", params.Secret, config.Config.Secret) - c.JSON(http.StatusBadRequest, gin.H{"errCode": 401, "errMsg": errMsg}) - return - } - req := &rpc.UserTokenReq{Platform: params.Platform, FromUserID: params.UserID, OperationID: params.OperationID, LoginIp: params.LoginIp} - log.NewInfo(req.OperationID, "UserToken args ", req.String()) - etcdConn := rpc.GetDefaultConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImAuthName, req.OperationID) - if etcdConn == nil { - errMsg := req.OperationID + " getcdv3.GetDefaultConn == nil" - log.NewError(req.OperationID, errMsg) - c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": errMsg}) - return - } - client := rpc.NewAuthClient(etcdConn) - reply, err := client.UserToken(context.Background(), req) +func (a *Auth) getGroupClient() (auth.AuthClient, error) { + conn, err := a.zk.GetConn(config.Config.RpcRegisterName.OpenImGroupName) if err != nil { - errMsg := req.OperationID + " UserToken failed " + err.Error() + " req: " + req.String() - log.NewError(req.OperationID, errMsg) - c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": errMsg}) - return + return nil, err } - resp := api.UserTokenResp{CommResp: api.CommResp{ErrCode: reply.CommonResp.ErrCode, ErrMsg: reply.CommonResp.ErrMsg}, - UserToken: api.UserTokenInfo{UserID: req.FromUserID, Token: reply.Token, ExpiredTime: reply.ExpiredTime}} - log.NewInfo(req.OperationID, "UserToken return ", resp) - c.JSON(http.StatusOK, resp) + return auth.NewAuthClient(conn), nil } -// @Summary 解析当前用户token -// @Description 解析当前用户token(token在请求头中传入) -// @Tags 鉴权认证 -// @ID ParseToken -// @Accept json -// @Param token header string true "im token" -// @Param req body api.ParseTokenReq true "secret为openIM密钥, 详细见服务端config.yaml secret字段
platform为平台ID" -// @Produce json -// @Success 0 {object} api.ParseTokenResp{Map=api.ExpireTime} -// @Failure 500 {object} api.Swagger500Resp "errCode为500 一般为服务器内部错误" -// @Failure 400 {object} api.Swagger400Resp "errCode为400 一般为参数输入错误, token未带上等" -// @Router /auth/parse_token [post] -func ParseToken(c *gin.Context) { - params := api.ParseTokenReq{} - if err := c.BindJSON(¶ms); err != nil { - errMsg := " BindJSON failed " + err.Error() - log.NewError("0", errMsg) - c.JSON(http.StatusOK, gin.H{"errCode": 1001, "errMsg": errMsg}) - return - } - - var ok bool - var errInfo string - var expireTime int64 - ok, _, errInfo, expireTime = tokenverify.GetUserIDFromTokenExpireTime(c.Request.Header.Get("token"), params.OperationID) - if !ok { - errMsg := params.OperationID + " " + "GetUserIDFromTokenExpireTime failed " + errInfo - log.NewError(params.OperationID, errMsg) - c.JSON(http.StatusOK, gin.H{"errCode": 1001, "errMsg": errMsg}) - return - } - - resp := api.ParseTokenResp{CommResp: api.CommResp{ErrCode: 0, ErrMsg: ""}, ExpireTime: api.ExpireTime{ExpireTimeSeconds: uint32(expireTime)}} - resp.Data = structs.Map(&resp.ExpireTime) - log.NewInfo(params.OperationID, "ParseToken return ", resp) - c.JSON(http.StatusOK, resp) +func (a *Auth) UserRegister(c *gin.Context) { + a2r.Call(auth.AuthClient.UserRegister, a.getGroupClient, c) } -// @Summary 强制登出 -// @Description 对应的平台强制登出 -// @Tags 鉴权认证 -// @ID ForceLogout -// @Accept json -// @Param token header string true "im token" -// @Param req body api.ForceLogoutReq true "platform为平台ID
fromUserID为要执行强制登出的用户ID" -// @Produce json -// @Success 0 {object} api.ForceLogoutResp -// @Failure 500 {object} api.Swagger500Resp "errCode为500 一般为服务器内部错误" -// @Failure 400 {object} api.Swagger400Resp "errCode为400 一般为参数输入错误, token未带上等" -// @Router /auth/force_logout [post] -func ForceLogout(c *gin.Context) { - params := api.ForceLogoutReq{} - if err := c.BindJSON(¶ms); err != nil { - errMsg := " BindJSON failed " + err.Error() - log.NewError("0", errMsg) - c.JSON(http.StatusBadRequest, gin.H{"errCode": 400, "errMsg": errMsg}) - return - } - req := &rpc.ForceLogoutReq{} - utils.CopyStructFields(req, ¶ms) - - var ok bool - var errInfo string - ok, req.OpUserID, errInfo = tokenverify.GetUserIDFromToken(c.Request.Header.Get("token"), req.OperationID) - if !ok { - errMsg := req.OperationID + " " + "GetUserIDFromToken failed " + errInfo + " token:" + c.Request.Header.Get("token") - log.NewError(req.OperationID, errMsg) - c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": errMsg}) - return - } - - log.NewInfo(req.OperationID, "ForceLogout args ", req.String()) - etcdConn := rpc.GetDefaultConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImAuthName, req.OperationID) - if etcdConn == nil { - errMsg := req.OperationID + " getcdv3.GetDefaultConn == nil" - log.NewError(req.OperationID, errMsg) - c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": errMsg}) - return - } - client := rpc.NewAuthClient(etcdConn) - reply, err := client.ForceLogout(context.Background(), req) - if err != nil { - errMsg := req.OperationID + " UserToken failed " + err.Error() + req.String() - log.NewError(req.OperationID, errMsg) - c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": errMsg}) - return - } - resp := api.ForceLogoutResp{CommResp: api.CommResp{ErrCode: reply.CommonResp.ErrCode, ErrMsg: reply.CommonResp.ErrMsg}} - log.NewInfo(params.OperationID, utils.GetSelfFuncName(), " return ", resp) - c.JSON(http.StatusOK, resp) +func (a *Auth) UserToken(c *gin.Context) { + a2r.Call(auth.AuthClient.UserToken, a.getGroupClient, c) +} + +func (a *Auth) ParseToken(c *gin.Context) { + a2r.Call(auth.AuthClient.ParseToken, a.getGroupClient, c) +} + +func (a *Auth) ForceLogout(c *gin.Context) { + a2r.Call(auth.AuthClient.ForceLogout, a.getGroupClient, c) } diff --git a/internal/api/friend/friend.go b/internal/api/friend/friend.go index 977c8eeb5..6d0e630b6 100644 --- a/internal/api/friend/friend.go +++ b/internal/api/friend/friend.go @@ -1,678 +1,76 @@ package friend -//import ( -// jsonData "OpenIM/internal/utils" -// api "OpenIM/pkg/apistruct" -// "OpenIM/pkg/common/config" -// "OpenIM/pkg/common/log" -// "OpenIM/pkg/common/tokenverify" -// "OpenIM/pkg/getcdv3" -// rpc "OpenIM/pkg/proto/friend" -// sdkws "OpenIM/pkg/proto/sdkws" -// "OpenIM/pkg/utils" -// "context" -// "github.com/gin-gonic/gin" -// "net/http" -// "strings" -//) -// -//// @Summary 添加黑名单 -//// @Description 添加黑名单 -//// @Tags 好友相关 -//// @ID AddBlack -//// @Accept json -//// @Param token header string true "im token" -//// @Param req body api.AddBlacklistReq true "fromUserID为设置的用户
toUserID为被设置的用户" -//// @Produce json -//// @Success 0 {object} api.AddBlacklistResp -//// @Failure 500 {object} api.Swagger500Resp "errCode为500 一般为服务器内部错误" -//// @Failure 400 {object} api.Swagger400Resp "errCode为400 一般为参数输入错误, token未带上等" -//// @Router /friend/add_black [post] -//func AddBlack(c *gin.Context) { -// params := api.AddBlacklistReq{} -// if err := c.BindJSON(¶ms); err != nil { -// log.NewError("0", "BindJSON failed ", err.Error()) -// c.JSON(http.StatusBadRequest, gin.H{"errCode": 400, "errMsg": err.Error()}) -// return -// } -// req := &rpc.AddBlacklistReq{CommID: &rpc.CommID{}} -// utils.CopyStructFields(req.CommID, ¶ms) -// var ok bool -// var errInfo string -// ok, req.CommID.OpUserID, errInfo = tokenverify.GetUserIDFromToken(c.Request.Header.Get("token"), req.CommID.OperationID) -// if !ok { -// errMsg := req.CommID.OperationID + " " + "GetUserIDFromToken failed " + errInfo + " token:" + c.Request.Header.Get("token") -// log.NewError(req.CommID.OperationID, errMsg) -// c.JSON(http.StatusBadRequest, gin.H{"errCode": 500, "errMsg": errMsg}) -// return -// } -// log.NewInfo(params.OperationID, "AddBlacklist args ", req.String()) -// -// etcdConn := getcdv3.GetDefaultConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImFriendName, req.CommID.OperationID) -// client := rpc.NewFriendClient(etcdConn) -// RpcResp, err := client.AddBlacklist(context.Background(), req) -// if err != nil { -// log.NewError(req.CommID.OperationID, "AddBlacklist failed ", err.Error()) -// c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": "call add blacklist rpc server failed"}) -// return -// } -// resp := api.AddBlacklistResp{CommResp: api.CommResp{ErrCode: RpcResp.CommonResp.ErrCode, ErrMsg: RpcResp.CommonResp.ErrMsg}} -// log.NewInfo(req.CommID.OperationID, "AddBlacklist api return ", resp) -// c.JSON(http.StatusOK, resp) -//} -// -//// @Summary 批量加好友 -//// @Description 批量加好友 -//// @Tags 好友相关 -//// @ID ImportFriend -//// @Accept json -//// @Param token header string true "im token" -//// @Param req body api.ImportFriendReq true "fromUserID批量加好友的用户ID
friendUserIDList为" -//// @Produce json -//// @Success 0 {object} api.ImportFriendResp "data列表中对象的result-1为添加该用户失败
0为成功" -//// @Failure 500 {object} api.Swagger500Resp "errCode为500 一般为服务器内部错误" -//// @Failure 400 {object} api.Swagger400Resp "errCode为400 一般为参数输入错误, token未带上等" -//// @Router /friend/import_friend [post] -//func ImportFriend(c *gin.Context) { -// params := api.ImportFriendReq{} -// if err := c.BindJSON(¶ms); err != nil { -// log.NewError("0", "BindJSON failed ", err.Error()) -// c.JSON(http.StatusBadRequest, gin.H{"errCode": 400, "errMsg": err.Error()}) -// return -// } -// req := &rpc.ImportFriendReq{} -// utils.CopyStructFields(req, ¶ms) -// var ok bool -// var errInfo string -// ok, req.OpUserID, errInfo = tokenverify.GetUserIDFromToken(c.Request.Header.Get("token"), req.OperationID) -// if !ok { -// errMsg := req.OperationID + " " + "GetUserIDFromToken failed " + errInfo + " token:" + c.Request.Header.Get("token") -// log.NewError(req.OperationID, errMsg) -// c.JSON(http.StatusBadRequest, gin.H{"errCode": 500, "errMsg": errMsg}) -// return -// } -// -// log.NewInfo(req.OperationID, "ImportFriend args ", req.String()) -// etcdConn := getcdv3.GetDefaultConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImFriendName, req.OperationID) -// if etcdConn == nil { -// errMsg := req.OperationID + "getcdv3.GetDefaultConn == nil" -// log.NewError(req.OperationID, errMsg) -// c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": errMsg}) -// return -// } -// -// client := rpc.NewFriendClient(etcdConn) -// RpcResp, err := client.ImportFriend(context.Background(), req) -// if err != nil { -// log.NewError(req.OperationID, "ImportFriend failed ", err.Error(), req.String()) -// c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": "ImportFriend failed "}) -// return -// } -// resp := api.ImportFriendResp{CommResp: api.CommResp{ErrCode: RpcResp.CommonResp.ErrCode, ErrMsg: RpcResp.CommonResp.ErrMsg}} -// if resp.ErrCode == 0 { -// for _, v := range RpcResp.UserIDResultList { -// resp.UserIDResultList = append(resp.UserIDResultList, api.UserIDResult{UserID: v.UserID, Result: v.Result}) -// } -// } -// if len(resp.UserIDResultList) == 0 { -// resp.UserIDResultList = []api.UserIDResult{} -// } -// log.NewInfo(req.OperationID, "ImportFriend api return ", resp) -// c.JSON(http.StatusOK, resp) -//} -// -//// @Summary 添加好友 -//// @Description 添加好友 -//// @Tags 好友相关 -//// @ID AddFriend -//// @Accept json -//// @Param token header string true "im token" -//// @Param req body api.AddFriendReq true "reqMsg为申请信息
fromUserID为申请用户
toUserID为被添加用户" -//// @Produce json -//// @Success 0 {object} api.AddFriendResp -//// @Failure 500 {object} api.Swagger500Resp "errCode为500 一般为服务器内部错误" -//// @Failure 400 {object} api.Swagger400Resp "errCode为400 一般为参数输入错误, token未带上等" -//// @Router /friend/add_friend [post] -//func AddFriend(c *gin.Context) { -// params := api.AddFriendReq{} -// if err := c.BindJSON(¶ms); err != nil { -// log.NewError("0", "BindJSON failed ", err.Error()) -// c.JSON(http.StatusBadRequest, gin.H{"errCode": 400, "errMsg": err.Error()}) -// return -// } -// req := &rpc.AddFriendReq{CommID: &rpc.CommID{}} -// utils.CopyStructFields(req.CommID, ¶ms.ParamsCommFriend) -// req.ReqMsg = params.ReqMsg -// -// var ok bool -// var errInfo string -// ok, req.CommID.OpUserID, errInfo = tokenverify.GetUserIDFromToken(c.Request.Header.Get("token"), req.CommID.OperationID) -// if !ok { -// errMsg := req.CommID.OperationID + " " + "GetUserIDFromToken failed " + errInfo + " token:" + c.Request.Header.Get("token") -// log.NewError(req.CommID.OperationID, errMsg) -// c.JSON(http.StatusBadRequest, gin.H{"errCode": 400, "errMsg": errMsg}) -// return -// } -// -// log.NewInfo(req.CommID.OperationID, "AddFriend args ", req.String()) -// -// etcdConn := getcdv3.GetDefaultConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImFriendName, req.CommID.OperationID) -// if etcdConn == nil { -// errMsg := req.CommID.OperationID + "getcdv3.GetDefaultConn == nil" -// log.NewError(req.CommID.OperationID, errMsg) -// c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": errMsg}) -// return -// } -// client := rpc.NewFriendClient(etcdConn) -// RpcResp, err := client.AddFriend(context.Background(), req) -// if err != nil { -// log.NewError(req.CommID.OperationID, "AddFriend failed ", err.Error(), req.String()) -// c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": "call AddFriend rpc server failed"}) -// return -// } -// -// resp := api.AddFriendResp{CommResp: api.CommResp{ErrCode: RpcResp.CommonResp.ErrCode, ErrMsg: RpcResp.CommonResp.ErrMsg}} -// log.NewInfo(req.CommID.OperationID, "AddFriend api return ", resp) -// c.JSON(http.StatusOK, resp) -//} -// -//// @Summary 同意/拒绝好友请求 -//// @Description 同意/拒绝好友请求 -//// @Tags 好友相关 -//// @ID AddFriendResponse -//// @Accept json -//// @Param token header string true "im token" -//// @Param req body api.AddFriendResponseReq true "fromUserID同意/拒绝的用户ID
toUserID为申请用户D
handleMsg为处理信息
flag为具体操作, 1为同意, 2为拒绝" -//// @Produce json -//// @Success 0 {object} api.AddFriendResponseResp -//// @Failure 500 {object} api.Swagger500Resp "errCode为500 一般为服务器内部错误" -//// @Failure 400 {object} api.Swagger400Resp "errCode为400 一般为参数输入错误, token未带上等" -//// @Router /friend/add_friend_response [post] -//func AddFriendResponse(c *gin.Context) { -// params := api.AddFriendResponseReq{} -// if err := c.BindJSON(¶ms); err != nil { -// log.NewError("0", "BindJSON failed ", err.Error()) -// c.JSON(http.StatusBadRequest, gin.H{"errCode": 400, "errMsg": err.Error()}) -// return -// } -// req := &rpc.AddFriendResponseReq{CommID: &rpc.CommID{}} -// utils.CopyStructFields(req.CommID, ¶ms.ParamsCommFriend) -// req.HandleMsg = params.HandleMsg -// req.HandleResult = params.Flag -// -// var ok bool -// var errInfo string -// ok, req.CommID.OpUserID, errInfo = tokenverify.GetUserIDFromToken(c.Request.Header.Get("token"), req.CommID.OperationID) -// if !ok { -// errMsg := req.CommID.OperationID + " " + "GetUserIDFromToken failed " + errInfo + " token:" + c.Request.Header.Get("token") -// log.NewError(req.CommID.OperationID, errMsg) -// c.JSON(http.StatusBadRequest, gin.H{"errCode": 400, "errMsg": errMsg}) -// return -// } -// -// utils.CopyStructFields(req, ¶ms) -// log.NewInfo(req.CommID.OperationID, "AddFriendResponse args ", req.String()) -// -// etcdConn := getcdv3.GetDefaultConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImFriendName, req.CommID.OperationID) -// if etcdConn == nil { -// errMsg := req.CommID.OperationID + "getcdv3.GetDefaultConn == nil" -// log.NewError(req.CommID.OperationID, errMsg) -// c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": errMsg}) -// return -// } -// -// client := rpc.NewFriendClient(etcdConn) -// RpcResp, err := client.AddFriendResponse(context.Background(), req) -// if err != nil { -// log.NewError(req.CommID.OperationID, "AddFriendResponse failed ", err.Error(), req.String()) -// c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": "call add_friend_response rpc server failed"}) -// return -// } -// -// resp := api.AddFriendResponseResp{CommResp: api.CommResp{ErrCode: RpcResp.CommonResp.ErrCode, ErrMsg: RpcResp.CommonResp.ErrMsg}} -// log.NewInfo(req.CommID.OperationID, "AddFriendResponse api return ", resp) -// c.JSON(http.StatusOK, resp) -//} -// -//// @Summary 删除好友 -//// @Description 删除好友 -//// @Tags 好友相关 -//// @ID DeleteFriend -//// @Accept json -//// @Param token header string true "im token" -//// @Param req body api.DeleteFriendReq true "fromUserID为操作用户
toUserID为被删除用户" -//// @Produce json -//// @Success 0 {object} api.DeleteFriendResp -//// @Failure 500 {object} api.Swagger500Resp "errCode为500 一般为服务器内部错误" -//// @Failure 400 {object} api.Swagger400Resp "errCode为400 一般为参数输入错误, token未带上等" -//// @Router /friend/delete_friend [post] -//func DeleteFriend(c *gin.Context) { -// params := api.DeleteFriendReq{} -// if err := c.BindJSON(¶ms); err != nil { -// log.NewError("0", "BindJSON failed ", err.Error()) -// c.JSON(http.StatusBadRequest, gin.H{"errCode": 400, "errMsg": err.Error()}) -// return -// } -// req := &rpc.DeleteFriendReq{CommID: &rpc.CommID{}} -// utils.CopyStructFields(req.CommID, ¶ms.ParamsCommFriend) -// -// var ok bool -// var errInfo string -// ok, req.CommID.OpUserID, errInfo = tokenverify.GetUserIDFromToken(c.Request.Header.Get("token"), req.CommID.OperationID) -// if !ok { -// errMsg := req.CommID.OperationID + " " + "GetUserIDFromToken failed " + errInfo + " token:" + c.Request.Header.Get("token") -// log.NewError(req.CommID.OperationID, errMsg) -// c.JSON(http.StatusBadRequest, gin.H{"errCode": 500, "errMsg": errMsg}) -// return -// } -// -// log.NewInfo(req.CommID.OperationID, "DeleteFriend args ", req.String()) -// -// etcdConn := getcdv3.GetDefaultConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImFriendName, req.CommID.OperationID) -// if etcdConn == nil { -// errMsg := req.CommID.OperationID + "getcdv3.GetDefaultConn == nil" -// log.NewError(req.CommID.OperationID, errMsg) -// c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": errMsg}) -// return -// } -// client := rpc.NewFriendClient(etcdConn) -// RpcResp, err := client.DeleteFriend(context.Background(), req) -// if err != nil { -// log.NewError(req.CommID.OperationID, "DeleteFriend failed ", err, req.String()) -// c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": "call delete_friend rpc server failed"}) -// return -// } -// -// resp := api.DeleteFriendResp{CommResp: api.CommResp{ErrCode: RpcResp.CommonResp.ErrCode, ErrMsg: RpcResp.CommonResp.ErrMsg}} -// log.NewInfo(req.CommID.OperationID, "DeleteFriend api return ", resp) -// c.JSON(http.StatusOK, resp) -//} -// -//// @Summary 获取黑名单列表 -//// @Description 获取黑名单列表 -//// @Tags 好友相关 -//// @ID GetBlacklist -//// @Accept json -//// @Param token header string true "im token" -//// @Param req body api.GetBlackListReq true "fromUserID要获取黑名单的用户" -//// @Produce json -//// @Success 0 {object} api.GetBlackListResp{data=[]sdkws.PublicUserInfo} -//// @Failure 500 {object} api.Swagger400Resp "errCode为500 一般为服务器内部错误" -//// @Failure 400 {object} api.Swagger500Resp "errCode为400 一般为参数输入错误, token未带上等" -//// @Router /friend/get_black_list [post] -//func GetBlacklist(c *gin.Context) { -// params := api.GetBlackListReq{} -// if err := c.BindJSON(¶ms); err != nil { -// log.NewError("0", "BindJSON failed ", err.Error()) -// c.JSON(http.StatusBadRequest, gin.H{"errCode": 400, "errMsg": err.Error()}) -// return -// } -// req := &rpc.GetBlacklistReq{CommID: &rpc.CommID{}} -// utils.CopyStructFields(req.CommID, ¶ms) -// -// var ok bool -// var errInfo string -// ok, req.CommID.OpUserID, errInfo = tokenverify.GetUserIDFromToken(c.Request.Header.Get("token"), req.CommID.OperationID) -// if !ok { -// errMsg := req.CommID.OperationID + " " + "GetUserIDFromToken failed " + errInfo + " token:" + c.Request.Header.Get("token") -// log.NewError(req.CommID.OperationID, errMsg) -// c.JSON(http.StatusBadRequest, gin.H{"errCode": 500, "errMsg": errMsg}) -// return -// } -// -// log.NewInfo(req.CommID.OperationID, "GetBlacklist args ", req.String()) -// -// etcdConn := getcdv3.GetDefaultConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImFriendName, req.CommID.OperationID) -// if etcdConn == nil { -// errMsg := req.CommID.OperationID + "getcdv3.GetDefaultConn == nil" -// log.NewError(req.CommID.OperationID, errMsg) -// c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": errMsg}) -// return -// } -// client := rpc.NewFriendClient(etcdConn) -// RpcResp, err := client.GetBlacklist(context.Background(), req) -// if err != nil { -// log.NewError(req.CommID.OperationID, "GetBlacklist failed ", err.Error(), req.String()) -// c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": "call get blacklist rpc server failed"}) -// return -// } -// -// resp := api.GetBlackListResp{CommResp: api.CommResp{ErrCode: RpcResp.CommonResp.ErrCode, ErrMsg: RpcResp.CommonResp.ErrMsg}} -// for _, v := range RpcResp.BlackUserInfoList { -// black := sdkws.PublicUserInfo{} -// utils.CopyStructFields(&black, v) -// resp.BlackUserInfoList = append(resp.BlackUserInfoList, &black) -// } -// resp.Map = jsonData.JsonDataList(resp.BlackUserInfoList) -// log.NewInfo(req.CommID.OperationID, "GetBlacklist api return ", resp) -// c.JSON(http.StatusOK, resp) -//} -// -//// @Summary 设置好友备注 -//// @Description 设置好友备注 -//// @Tags 好友相关 -//// @ID SetFriendRemark -//// @Accept json -//// @Param token header string true "im token" -//// @Param req body api.SetFriendRemarkReq true "fromUserID为设置的用户
toUserID为被设置的用户
remark为好友备注" -//// @Produce json -//// @Success 0 {object} api.SetFriendRemarkResp -//// @Failure 500 {object} api.Swagger500Resp "errCode为500 一般为服务器内部错误" -//// @Failure 400 {object} api.Swagger400Resp "errCode为400 一般为参数输入错误, token未带上等" -//// @Router /friend/set_friend_remark [post] -//func SetFriendRemark(c *gin.Context) { -// params := api.SetFriendRemarkReq{} -// if err := c.BindJSON(¶ms); err != nil { -// log.NewError("0", "BindJSON failed ", err.Error()) -// c.JSON(http.StatusBadRequest, gin.H{"errCode": 400, "errMsg": err.Error()}) -// return -// } -// req := &rpc.SetFriendRemarkReq{CommID: &rpc.CommID{}} -// utils.CopyStructFields(req.CommID, ¶ms.ParamsCommFriend) -// req.Remark = params.Remark -// -// var ok bool -// var errInfo string -// ok, req.CommID.OpUserID, errInfo = tokenverify.GetUserIDFromToken(c.Request.Header.Get("token"), req.CommID.OperationID) -// if !ok { -// errMsg := req.CommID.OperationID + " " + "GetUserIDFromToken failed " + errInfo + " token:" + c.Request.Header.Get("token") -// log.NewError(req.CommID.OperationID, errMsg) -// c.JSON(http.StatusBadRequest, gin.H{"errCode": 500, "errMsg": errMsg}) -// return -// } -// -// log.NewInfo(req.CommID.OperationID, "SetFriendComment args ", req.String()) -// -// etcdConn := getcdv3.GetDefaultConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImFriendName, req.CommID.OperationID) -// if etcdConn == nil { -// errMsg := req.CommID.OperationID + "getcdv3.GetDefaultConn == nil" -// log.NewError(req.CommID.OperationID, errMsg) -// c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": errMsg}) -// return -// } -// client := rpc.NewFriendClient(etcdConn) -// RpcResp, err := client.SetFriendRemark(context.Background(), req) -// if err != nil { -// log.NewError(req.CommID.OperationID, "SetFriendComment failed ", err.Error(), req.String()) -// c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": "call set friend comment rpc server failed"}) -// return -// } -// resp := api.SetFriendRemarkResp{CommResp: api.CommResp{ErrCode: RpcResp.CommonResp.ErrCode, ErrMsg: RpcResp.CommonResp.ErrMsg}} -// -// log.NewInfo(req.CommID.OperationID, "SetFriendComment api return ", resp) -// c.JSON(http.StatusOK, resp) -//} -// -//// @Summary 把用户移除黑名单 -//// @Description 把用户移除黑名单 -//// @Tags 好友相关 -//// @ID RemoveBlacklist -//// @Accept json -//// @Param token header string true "im token" -//// @Param req body api.RemoveBlackListReq true "fromUserID要获取黑名单的用户" -//// @Produce json -//// @Success 0 {object} api.RemoveBlackListResp -//// @Failure 500 {object} api.Swagger500Resp "errCode为500 一般为服务器内部错误" -//// @Failure 400 {object} api.Swagger400Resp "errCode为400 一般为参数输入错误, token未带上等" -//// @Router /friend/remove_black [post] -//func RemoveBlacklist(c *gin.Context) { -// params := api.RemoveBlackListReq{} -// if err := c.BindJSON(¶ms); err != nil { -// log.NewError("0", "BindJSON failed ", err.Error()) -// c.JSON(http.StatusBadRequest, gin.H{"errCode": 400, "errMsg": err.Error()}) -// return -// } -// req := &rpc.RemoveBlacklistReq{CommID: &rpc.CommID{}} -// utils.CopyStructFields(req.CommID, ¶ms.ParamsCommFriend) -// -// var ok bool -// var errInfo string -// ok, req.CommID.OpUserID, errInfo = tokenverify.GetUserIDFromToken(c.Request.Header.Get("token"), req.CommID.OperationID) -// if !ok { -// errMsg := req.CommID.OperationID + " " + "GetUserIDFromToken failed " + errInfo + " token:" + c.Request.Header.Get("token") -// log.NewError(req.CommID.OperationID, errMsg) -// c.JSON(http.StatusBadRequest, gin.H{"errCode": 500, "errMsg": errMsg}) -// return -// } -// -// log.NewInfo(req.CommID.OperationID, "RemoveBlacklist args ", req.String()) -// etcdConn := getcdv3.GetDefaultConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImFriendName, req.CommID.OperationID) -// if etcdConn == nil { -// errMsg := req.CommID.OperationID + "getcdv3.GetDefaultConn == nil" -// log.NewError(req.CommID.OperationID, errMsg) -// c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": errMsg}) -// return -// } -// -// client := rpc.NewFriendClient(etcdConn) -// RpcResp, err := client.RemoveBlacklist(context.Background(), req) -// if err != nil { -// log.NewError(req.CommID.OperationID, "RemoveBlacklist failed ", err.Error(), req.String()) -// c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": "call remove blacklist rpc server failed"}) -// return -// } -// resp := api.RemoveBlackListResp{CommResp: api.CommResp{ErrCode: RpcResp.CommonResp.ErrCode, ErrMsg: RpcResp.CommonResp.ErrMsg}} -// log.NewInfo(req.CommID.OperationID, "RemoveBlacklist api return ", resp) -// c.JSON(http.StatusOK, resp) -//} -// -//// @Summary 检查用户之间是否为好友 -//// @Description 检查用户之间是否为好友 -//// @Tags 好友相关 -//// @ID IsFriend -//// @Accept json -//// @Param token header string true "im token" -//// @Param req body api.IsFriendReq true "fromUserID为请求用户
toUserID为要检查的用户" -//// @Produce json -//// @Success 0 {object} api.IsFriendResp -//// @Failure 500 {object} api.Swagger500Resp "errCode为500 一般为服务器内部错误" -//// @Failure 400 {object} api.Swagger400Resp "errCode为400 一般为参数输入错误, token未带上等" -//// @Router /friend/is_friend [post] -//func IsFriend(c *gin.Context) { -// params := api.IsFriendReq{} -// if err := c.BindJSON(¶ms); err != nil { -// log.NewError("0", "BindJSON failed ", err.Error()) -// c.JSON(http.StatusBadRequest, gin.H{"errCode": 400, "errMsg": err.Error()}) -// return -// } -// req := &rpc.IsFriendReq{CommID: &rpc.CommID{}} -// utils.CopyStructFields(req.CommID, ¶ms.ParamsCommFriend) -// -// var ok bool -// var errInfo string -// ok, req.CommID.OpUserID, errInfo = tokenverify.GetUserIDFromToken(c.Request.Header.Get("token"), req.CommID.OperationID) -// if !ok { -// errMsg := req.CommID.OperationID + " " + "GetUserIDFromToken failed " + errInfo + " token:" + c.Request.Header.Get("token") -// log.NewError(req.CommID.OperationID, errMsg) -// c.JSON(http.StatusBadRequest, gin.H{"errCode": 400, "errMsg": errMsg}) -// return -// } -// -// log.NewInfo(req.CommID.OperationID, "IsFriend args ", req.String()) -// -// etcdConn := getcdv3.GetDefaultConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImFriendName, req.CommID.OperationID) -// if etcdConn == nil { -// errMsg := req.CommID.OperationID + "getcdv3.GetDefaultConn == nil" -// log.NewError(req.CommID.OperationID, errMsg) -// c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": errMsg}) -// return -// } -// client := rpc.NewFriendClient(etcdConn) -// RpcResp, err := client.IsFriend(context.Background(), req) -// if err != nil { -// log.NewError(req.CommID.OperationID, "IsFriend failed ", err.Error(), req.String()) -// c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": "call add friend rpc server failed"}) -// return -// } -// resp := api.IsFriendResp{CommResp: api.CommResp{ErrCode: RpcResp.CommonResp.ErrCode, ErrMsg: RpcResp.CommonResp.ErrMsg}} -// resp.Response.Friend = RpcResp.Response -// -// log.NewInfo(req.CommID.OperationID, "IsFriend api return ", resp) -// c.JSON(http.StatusOK, resp) -//} -// -//// @Summary 获取用户的好友列表 -//// @Description 获取用户的好友列表 -//// @Tags 好友相关 -//// @ID GetFriendList -//// @Accept json -//// @Param token header string true "im token" -//// @Param req body api.GetFriendListReq true "fromUserID为要获取好友列表的用户ID" -//// @Produce json -//// @Success 0 {object} api.GetFriendListResp{data=[]sdkws.FriendInfo} -//// @Failure 500 {object} api.Swagger500Resp "errCode为500 一般为服务器内部错误" -//// @Failure 400 {object} api.Swagger400Resp "errCode为400 一般为参数输入错误, token未带上等" -//// @Router /friend/get_friend_list [post] -//func GetFriendList(c *gin.Context) { -// params := api.GetFriendListReq{} -// if err := c.BindJSON(¶ms); err != nil { -// log.NewError("0", "BindJSON failed ", err.Error()) -// c.JSON(http.StatusBadRequest, gin.H{"errCode": 400, "errMsg": err.Error()}) -// return -// } -// req := &rpc.GetFriendListReq{CommID: &rpc.CommID{}} -// utils.CopyStructFields(req.CommID, ¶ms) -// -// var ok bool -// var errInfo string -// ok, req.CommID.OpUserID, errInfo = tokenverify.GetUserIDFromToken(c.Request.Header.Get("token"), req.CommID.OperationID) -// if !ok { -// errMsg := req.CommID.OperationID + " " + "GetUserIDFromToken failed " + errInfo + " token:" + c.Request.Header.Get("token") -// log.NewError(req.CommID.OperationID, errMsg) -// c.JSON(http.StatusBadRequest, gin.H{"errCode": 500, "errMsg": errMsg}) -// return -// } -// -// log.NewInfo(req.CommID.OperationID, "GetFriendList args ", req.String()) -// -// etcdConn := getcdv3.GetDefaultConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImFriendName, req.CommID.OperationID) -// if etcdConn == nil { -// errMsg := req.CommID.OperationID + "getcdv3.GetDefaultConn == nil" -// log.NewError(req.CommID.OperationID, errMsg) -// c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": errMsg}) -// return -// } -// client := rpc.NewFriendClient(etcdConn) -// RpcResp, err := client.GetFriendList(context.Background(), req) -// if err != nil { -// log.NewError(req.CommID.OperationID, "GetFriendList failed ", err.Error(), req.String()) -// c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": "call get friend list rpc server failed"}) -// return -// } -// -// resp := api.GetFriendListResp{CommResp: api.CommResp{ErrCode: RpcResp.CommonResp.ErrCode, ErrMsg: RpcResp.CommonResp.ErrMsg}, FriendInfoList: RpcResp.FriendInfoList} -// resp.Map = jsonData.JsonDataList(resp.FriendInfoList) -// log.NewInfo(req.CommID.OperationID, "GetFriendList api return ", resp) -// c.JSON(http.StatusOK, resp) -// //c.JSON(http.StatusOK, resp) -//} -// -//// @Summary 获取好友申请列表 -//// @Description 删除好友 -//// @Tags 好友相关 -//// @ID GetFriendApplyList -//// @Accept json -//// @Param token header string true "im token" -//// @Param req body api.GetFriendApplyListReq true "fromUserID为要获取申请列表的用户ID" -//// @Produce json -//// @Success 0 {object} api.GetFriendApplyListResp{data=[]sdkws.FriendRequest} -//// @Failure 500 {object} api.Swagger400Resp "errCode为500 一般为服务器内部错误" -//// @Failure 400 {object} api.Swagger400Resp "errCode为400 一般为参数输入错误, token未带上等" -//// @Router /friend/get_friend_apply_list [post] -//func GetFriendApplyList(c *gin.Context) { -// params := api.GetFriendApplyListReq{} -// if err := c.BindJSON(¶ms); err != nil { -// log.NewError("0", "BindJSON failed ", err.Error()) -// c.JSON(http.StatusBadRequest, gin.H{"errCode": 400, "errMsg": err.Error()}) -// return -// } -// req := &rpc.GetFriendApplyListReq{CommID: &rpc.CommID{}} -// utils.CopyStructFields(req.CommID, ¶ms) -// -// var ok bool -// var errInfo string -// ok, req.CommID.OpUserID, errInfo = tokenverify.GetUserIDFromToken(c.Request.Header.Get("token"), req.CommID.OperationID) -// if !ok { -// errMsg := req.CommID.OperationID + " " + "GetUserIDFromToken failed " + errInfo + " token:" + c.Request.Header.Get("token") -// log.NewError(req.CommID.OperationID, errMsg) -// c.JSON(http.StatusBadRequest, gin.H{"errCode": 500, "errMsg": errMsg}) -// return -// } -// -// log.NewInfo(req.CommID.OperationID, "GetFriendApplyList args ", req.String()) -// -// etcdConn := getcdv3.GetDefaultConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImFriendName, req.CommID.OperationID) -// if etcdConn == nil { -// errMsg := req.CommID.OperationID + "getcdv3.GetDefaultConn == nil" -// log.NewError(req.CommID.OperationID, errMsg) -// c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": errMsg}) -// return -// } -// client := rpc.NewFriendClient(etcdConn) -// -// RpcResp, err := client.GetFriendApplyList(context.Background(), req) -// if err != nil { -// log.NewError(req.CommID.OperationID, "GetFriendApplyList failed ", err.Error(), req.String()) -// c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": "call get friend apply list rpc server failed"}) -// return -// } -// -// resp := api.GetFriendApplyListResp{CommResp: api.CommResp{ErrCode: RpcResp.CommonResp.ErrCode, ErrMsg: RpcResp.CommonResp.ErrMsg}, FriendRequestList: RpcResp.FriendRequestList} -// resp.Map = jsonData.JsonDataList(resp.FriendRequestList) -// log.NewInfo(req.CommID.OperationID, "GetFriendApplyList api return ", resp) -// c.JSON(http.StatusOK, resp) -//} -// -//// @Summary 获取自己的好友申请列表 -//// @Description 获取自己的好友申请列表 -//// @Tags 好友相关 -//// @ID GetSelfApplyList -//// @Accept json -//// @Param token header string true "im token" -//// @Param req body api.GetSelfApplyListReq true "fromUserID为自己的用户ID" -//// @Produce json -//// @Success 0 {object} api.GetSelfApplyListResp{data=[]sdkws.FriendRequest} -//// @Failure 500 {object} api.Swagger500Resp "errCode为500 一般为服务器内部错误" -//// @Failure 400 {object} api.Swagger400Resp "errCode为400 一般为参数输入错误, token未带上等" -//// @Router /friend/get_self_friend_apply_list [post] -//func GetSelfApplyList(c *gin.Context) { -// params := api.GetSelfApplyListReq{} -// if err := c.BindJSON(¶ms); err != nil { -// log.NewError("0", "BindJSON failed ", err.Error()) -// c.JSON(http.StatusBadRequest, gin.H{"errCode": 400, "errMsg": err.Error()}) -// return -// } -// req := &rpc.GetSelfApplyListReq{CommID: &rpc.CommID{}} -// utils.CopyStructFields(req.CommID, ¶ms) -// -// var ok bool -// var errInfo string -// ok, req.CommID.OpUserID, errInfo = tokenverify.GetUserIDFromToken(c.Request.Header.Get("token"), req.CommID.OperationID) -// if !ok { -// errMsg := req.CommID.OperationID + " " + "GetUserIDFromToken failed " + errInfo + " token:" + c.Request.Header.Get("token") -// log.NewError(req.CommID.OperationID, errMsg) -// c.JSON(http.StatusBadRequest, gin.H{"errCode": 500, "errMsg": errMsg}) -// return -// } -// -// log.NewInfo(req.CommID.OperationID, "GetSelfApplyList args ", req.String()) -// -// etcdConn := getcdv3.GetDefaultConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImFriendName, req.CommID.OperationID) -// if etcdConn == nil { -// errMsg := req.CommID.OperationID + "getcdv3.GetDefaultConn == nil" -// log.NewError(req.CommID.OperationID, errMsg) -// c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": errMsg}) -// return -// } -// client := rpc.NewFriendClient(etcdConn) -// RpcResp, err := client.GetSelfApplyList(context.Background(), req) -// if err != nil { -// log.NewError(req.CommID.OperationID, "GetSelfApplyList failed ", err.Error(), req.String()) -// c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": "call get self apply list rpc server failed"}) -// return -// } -// resp := api.GetSelfApplyListResp{CommResp: api.CommResp{ErrCode: RpcResp.CommonResp.ErrCode, ErrMsg: RpcResp.CommonResp.ErrMsg}, FriendRequestList: RpcResp.FriendRequestList} -// resp.Map = jsonData.JsonDataList(resp.FriendRequestList) -// log.NewInfo(req.CommID.OperationID, "GetSelfApplyList api return ", resp) -// c.JSON(http.StatusOK, resp) -//} +import ( + "OpenIM/internal/a2r" + "OpenIM/pkg/common/config" + "OpenIM/pkg/proto/friend" + "context" + "github.com/OpenIMSDK/openKeeper" + "github.com/gin-gonic/gin" +) + +var _ context.Context // 解决goland编辑器bug + +func NewFriend(zk *openKeeper.ZkClient) *Friend { + return &Friend{zk: zk} +} + +type Friend struct { + zk *openKeeper.ZkClient +} + +func (f *Friend) getGroupClient() (friend.FriendClient, error) { + conn, err := f.zk.GetConn(config.Config.RpcRegisterName.OpenImGroupName) + if err != nil { + return nil, err + } + return friend.NewFriendClient(conn), nil +} + +func (f *Friend) AddFriend(c *gin.Context) { + a2r.Call(friend.FriendClient.AddFriend, f.getGroupClient, c) +} + +func (f *Friend) DeleteFriend(c *gin.Context) { + a2r.Call(friend.FriendClient.DeleteFriend, f.getGroupClient, c) +} + +func (f *Friend) GetFriendApplyList(c *gin.Context) { + a2r.Call(friend.FriendClient.GetFriendApplyList, f.getGroupClient, c) +} + +func (f *Friend) GetSelfApplyList(c *gin.Context) { + a2r.Call(friend.FriendClient.GetSelfApplyList, f.getGroupClient, c) +} + +func (f *Friend) GetFriendList(c *gin.Context) { + a2r.Call(friend.FriendClient.GetFriendList, f.getGroupClient, c) +} + +func (f *Friend) AddFriendResponse(c *gin.Context) { + a2r.Call(friend.FriendClient.AddFriendResponse, f.getGroupClient, c) +} + +func (f *Friend) SetFriendRemark(c *gin.Context) { + a2r.Call(friend.FriendClient.SetFriendRemark, f.getGroupClient, c) +} + +func (f *Friend) AddBlack(c *gin.Context) { + a2r.Call(friend.FriendClient.AddBlack, f.getGroupClient, c) +} + +func (f *Friend) GetBlacklist(c *gin.Context) { + a2r.Call(friend.FriendClient.GetBlacklist, f.getGroupClient, c) +} + +func (f *Friend) RemoveBlacklist(c *gin.Context) { + a2r.Call(friend.FriendClient.RemoveBlacklist, f.getGroupClient, c) +} + +func (f *Friend) ImportFriend(c *gin.Context) { + a2r.Call(friend.FriendClient.ImportFriend, f.getGroupClient, c) +} + +func (f *Friend) IsFriend(c *gin.Context) { + a2r.Call(friend.FriendClient.IsFriend, f.getGroupClient, c) +} diff --git a/internal/api/friend/friend1.go b/internal/api/friend/friend1.go deleted file mode 100644 index abdabb44d..000000000 --- a/internal/api/friend/friend1.go +++ /dev/null @@ -1,57 +0,0 @@ -package friend - -import ( - common "OpenIM/internal/api2rpc" - api "OpenIM/pkg/apistruct" - "OpenIM/pkg/common/config" - rpc "OpenIM/pkg/proto/friend" - "github.com/gin-gonic/gin" -) - -func AddBlack(c *gin.Context) { - common.ApiToRpc(c, &api.AddBlacklistReq{}, &api.AddBlacklistResp{}, config.Config.RpcRegisterName.OpenImFriendName, rpc.NewFriendClient, "") -} - -func ImportFriend(c *gin.Context) { - common.ApiToRpc(c, &api.ImportFriendReq{}, &api.ImportFriendResp{}, config.Config.RpcRegisterName.OpenImFriendName, rpc.NewFriendClient, "") -} - -func AddFriend(c *gin.Context) { - common.ApiToRpc(c, &api.AddFriendReq{}, &api.AddFriendResp{}, config.Config.RpcRegisterName.OpenImFriendName, rpc.NewFriendClient, "") -} - -func AddFriendResponse(c *gin.Context) { - common.ApiToRpc(c, &api.AddFriendResponseReq{}, &api.AddFriendResponseResp{}, config.Config.RpcRegisterName.OpenImFriendName, rpc.NewFriendClient, "") -} - -func DeleteFriend(c *gin.Context) { - common.ApiToRpc(c, &api.DeleteFriendReq{}, &api.DeleteFriendResp{}, config.Config.RpcRegisterName.OpenImFriendName, rpc.NewFriendClient, "") -} - -func GetBlacklist(c *gin.Context) { - common.ApiToRpc(c, &api.GetBlackListReq{}, &api.GetBlackListResp{}, config.Config.RpcRegisterName.OpenImFriendName, rpc.NewFriendClient, "") -} - -func SetFriendRemark(c *gin.Context) { - common.ApiToRpc(c, &api.SetFriendRemarkReq{}, &api.SetFriendRemarkResp{}, config.Config.RpcRegisterName.OpenImFriendName, rpc.NewFriendClient, "") -} - -func RemoveBlacklist(c *gin.Context) { - common.ApiToRpc(c, &api.RemoveBlacklistReq{}, &api.RemoveBlacklistResp{}, config.Config.RpcRegisterName.OpenImFriendName, rpc.NewFriendClient, "") -} - -func IsFriend(c *gin.Context) { - common.ApiToRpc(c, &api.IsFriendReq{}, &api.IsFriendResp{}, config.Config.RpcRegisterName.OpenImFriendName, rpc.NewFriendClient, "") -} - -func GetFriendList(c *gin.Context) { - common.ApiToRpc(c, &api.GetFriendListReq{}, &api.GetFriendListResp{}, config.Config.RpcRegisterName.OpenImFriendName, rpc.NewFriendClient, "") -} - -func GetFriendApplyList(c *gin.Context) { - common.ApiToRpc(c, &api.GetFriendApplyListReq{}, &api.GetFriendApplyListResp{}, config.Config.RpcRegisterName.OpenImFriendName, rpc.NewFriendClient, "") -} - -func GetSelfApplyList(c *gin.Context) { - common.ApiToRpc(c, &api.GetSelfApplyListReq{}, &api.GetSelfApplyListResp{}, config.Config.RpcRegisterName.OpenImFriendName, rpc.NewFriendClient, "") -} diff --git a/internal/api/route.go b/internal/api/route.go index 6deb54601..48c5fd5db 100644 --- a/internal/api/route.go +++ b/internal/api/route.go @@ -13,7 +13,6 @@ import ( "OpenIM/pkg/common/log" "OpenIM/pkg/common/middleware" "OpenIM/pkg/common/prome" - "OpenIM/pkg/common/tokenverify" "github.com/gin-gonic/gin" "io" "os" @@ -35,52 +34,41 @@ func NewGinRouter() *gin.Engine { r.Use(prome.PrometheusMiddleware) r.GET("/metrics", prome.PrometheusHandler()) } + userRouterGroup := r.Group("/user") { - userRouterGroup.POST("/update_user_info", user.UpdateUserInfo) //1 - userRouterGroup.POST("/set_global_msg_recv_opt", user.SetGlobalRecvMessageOpt) - userRouterGroup.POST("/get_users_info", user.GetUsersPublicInfo) //1 - userRouterGroup.POST("/get_self_user_info", user.GetSelfUserInfo) //1 - userRouterGroup.POST("/get_users_online_status", user.GetUsersOnlineStatus) //1 - userRouterGroup.POST("/get_users_info_from_cache", user.GetUsersInfoFromCache) - userRouterGroup.POST("/get_user_friend_from_cache", user.GetFriendIDListFromCache) - userRouterGroup.POST("/get_black_list_from_cache", user.GetBlackIDListFromCache) - userRouterGroup.POST("/get_all_users_uid", manage.GetAllUsersUid) //1 - userRouterGroup.POST("/account_check", manage.AccountCheck) //1 - // userRouterGroup.POST("/get_users_online_status", manage.GetUsersOnlineStatus) //1 - userRouterGroup.POST("/get_users", user.GetUsers) + u := user.NewUser(nil) + userRouterGroup.POST("/update_user_info", u.UpdateUserInfo) //1 + userRouterGroup.POST("/set_global_msg_recv_opt", u.SetGlobalRecvMessageOpt) + userRouterGroup.POST("/get_users_info", u.GetUsersPublicInfo) //1 + userRouterGroup.POST("/get_self_user_info", u.GetSelfUserInfo) //1 + userRouterGroup.POST("/get_users_online_status", u.GetUsersOnlineStatus) //1 + userRouterGroup.POST("/get_users_info_from_cache", u.GetUsersInfoFromCache) + userRouterGroup.POST("/get_user_friend_from_cache", u.GetFriendIDListFromCache) + userRouterGroup.POST("/get_black_list_from_cache", u.GetBlackIDListFromCache) + //userRouterGroup.POST("/get_all_users_uid", manage.GetAllUsersUid) // todo + //userRouterGroup.POST("/account_check", manage.AccountCheck) // todo + userRouterGroup.POST("/get_users", u.GetUsers) } ////friend routing group friendRouterGroup := r.Group("/friend") { - // friendRouterGroup.POST("/get_friends_info", friend.GetFriendsInfo) - friendRouterGroup.POST("/add_friend", friend.AddFriend) //1 - friendRouterGroup.POST("/delete_friend", friend.DeleteFriend) //1 - friendRouterGroup.POST("/get_friend_apply_list", friend.GetFriendApplyList) //1 - friendRouterGroup.POST("/get_self_friend_apply_list", friend.GetSelfApplyList) //1 - friendRouterGroup.POST("/get_friend_list", friend.GetFriendList) //1 - friendRouterGroup.POST("/add_friend_response", friend.AddFriendResponse) //1 - friendRouterGroup.POST("/set_friend_remark", friend.SetFriendRemark) //1 + f := friend.NewFriend(nil) + friendRouterGroup.POST("/add_friend", f.AddFriend) //1 + friendRouterGroup.POST("/delete_friend", f.DeleteFriend) //1 + friendRouterGroup.POST("/get_friend_apply_list", f.GetFriendApplyList) //1 + friendRouterGroup.POST("/get_self_friend_apply_list", f.GetSelfApplyList) //1 + friendRouterGroup.POST("/get_friend_list", f.GetFriendList) //1 + friendRouterGroup.POST("/add_friend_response", f.AddFriendResponse) //1 + friendRouterGroup.POST("/set_friend_remark", f.SetFriendRemark) //1 + friendRouterGroup.POST("/add_black", f.AddBlack) //1 + friendRouterGroup.POST("/get_black_list", f.GetBlacklist) //1 + friendRouterGroup.POST("/remove_black", f.RemoveBlacklist) //1 + friendRouterGroup.POST("/import_friend", f.ImportFriend) //1 + friendRouterGroup.POST("/is_friend", f.IsFriend) //1 - friendRouterGroup.POST("/add_black", friend.AddBlack) //1 - friendRouterGroup.POST("/get_black_list", friend.GetBlacklist) //1 - friendRouterGroup.POST("/remove_black", friend.RemoveBlacklist) //1 - - friendRouterGroup.POST("/import_friend", friend.ImportFriend) //1 - friendRouterGroup.POST("/is_friend", friend.IsFriend) //1 } - //group related routing group groupRouterGroup := r.Group("/group") - groupRouterGroup.Use(func(c *gin.Context) { - userID, err := tokenverify.ParseUserIDFromToken(c.GetHeader("token"), c.GetString("operationID")) - if err != nil { - c.String(400, err.Error()) - c.Abort() - return - } - c.Set("opUserID", userID) - c.Next() - }) g := group.NewGroup(nil) { groupRouterGroup.POST("/create_group", g.NewCreateGroup) //1 @@ -114,10 +102,11 @@ func NewGinRouter() *gin.Engine { ////certificate authRouterGroup := r.Group("/auth") { - authRouterGroup.POST("/user_register", apiAuth.UserRegister) //1 - authRouterGroup.POST("/user_token", apiAuth.UserToken) //1 - authRouterGroup.POST("/parse_token", apiAuth.ParseToken) //1 - authRouterGroup.POST("/force_logout", apiAuth.ForceLogout) //1 + a := apiAuth.NewAuth(nil) + authRouterGroup.POST("/user_register", a.UserRegister) //1 + authRouterGroup.POST("/user_token", a.UserToken) //1 + authRouterGroup.POST("/parse_token", a.ParseToken) //1 + authRouterGroup.POST("/force_logout", a.ForceLogout) //1 } ////Third service thirdGroup := r.Group("/third") diff --git a/internal/api/user/user.go b/internal/api/user/user.go index 22c464612..ce5b47b75 100644 --- a/internal/api/user/user.go +++ b/internal/api/user/user.go @@ -1,513 +1,72 @@ package user import ( - api "OpenIM/pkg/apistruct" + "OpenIM/internal/a2r" "OpenIM/pkg/common/config" - "OpenIM/pkg/common/constant" - "OpenIM/pkg/common/log" - "OpenIM/pkg/common/tokenverify" - pbRelay "OpenIM/pkg/proto/relay" - sdkws "OpenIM/pkg/proto/sdkws" - rpc "OpenIM/pkg/proto/user" - "OpenIM/pkg/utils" - jsonData "OpenIM/pkg/utils" + "OpenIM/pkg/proto/user" "context" - "net/http" - "strings" - + "github.com/OpenIMSDK/openKeeper" "github.com/gin-gonic/gin" ) -func GetUsersInfoFromCache(c *gin.Context) { - params := api.GetUsersInfoReq{} - if err := c.BindJSON(¶ms); err != nil { - log.NewError("0", "BindJSON failed ", err.Error()) - c.JSON(http.StatusBadRequest, gin.H{"errCode": http.StatusBadRequest, "errMsg": err.Error()}) - return - } - log.NewInfo(params.OperationID, "GetUsersInfoFromCache req: ", params) - req := &rpc.GetUserInfoReq{} - utils.CopyStructFields(req, ¶ms) - var ok bool - var errInfo string - ok, req.OpUserID, errInfo = tokenverify.GetUserIDFromToken(c.Request.Header.Get("token"), req.OperationID) - if !ok { - errMsg := "GetUserIDFromToken failed " + errInfo + " token:" + c.Request.Header.Get("token") - log.NewError(req.OperationID, errMsg) - c.JSON(http.StatusBadRequest, gin.H{"errCode": 500, "errMsg": errMsg}) - return - } - etcdConn := rpc.GetDefaultConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImUserName, req.OperationID) - if etcdConn == nil { - errMsg := req.OperationID + "getcdv3.GetDefaultConn == nil" - log.NewError(req.OperationID, errMsg) - c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": errMsg}) - return - } - client := rpc.NewUserClient(etcdConn) - RpcResp, err := client.GetUserInfo(context.Background(), req) +var _ context.Context // 解决goland编辑器bug + +func NewUser(zk *openKeeper.ZkClient) *User { + return &User{zk: zk} +} + +type User struct { + zk *openKeeper.ZkClient +} + +func (u *User) getGroupClient() (user.UserClient, error) { + conn, err := u.zk.GetConn(config.Config.RpcRegisterName.OpenImGroupName) if err != nil { - log.NewError(req.OperationID, "GetUserInfo failed ", err.Error(), req.String()) - c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": "call rpc server failed"}) - return + return nil, err } - var publicUserInfoList []*sdkws.PublicUserInfo - for _, v := range RpcResp.UserInfoList { - publicUserInfoList = append(publicUserInfoList, - &sdkws.PublicUserInfo{UserID: v.UserID, Nickname: v.Nickname, FaceURL: v.FaceURL, Gender: v.Gender, Ex: v.Ex}) - } - resp := api.GetUsersInfoResp{CommResp: api.CommResp{ErrCode: RpcResp.CommonResp.ErrCode, ErrMsg: RpcResp.CommonResp.ErrMsg}, UserInfoList: publicUserInfoList} - resp.Data = jsonData.JsonDataList(resp.UserInfoList) - log.NewInfo(req.OperationID, "GetUserInfo api return ", resp) - c.JSON(http.StatusOK, resp) + return user.NewUserClient(conn), nil } -func GetFriendIDListFromCache(c *gin.Context) { - var ( - req api.GetFriendIDListFromCacheReq - resp api.GetFriendIDListFromCacheResp - reqPb cacheRpc.GetFriendIDListFromCacheReq - respPb *cacheRpc.GetFriendIDListFromCacheResp - ) - if err := c.BindJSON(&req); err != nil { - log.NewError(req.OperationID, "BindJSON failed ", err.Error()) - c.JSON(http.StatusBadRequest, gin.H{"errCode": http.StatusBadRequest, "errMsg": err.Error()}) - return - } - log.NewInfo(req.OperationID, utils.GetSelfFuncName(), req) - reqPb.OperationID = req.OperationID - var ok bool - var errInfo string - ok, reqPb.UserID, errInfo = tokenverify.GetUserIDFromToken(c.Request.Header.Get("token"), req.OperationID) - if !ok { - errMsg := "GetUserIDFromToken failed " + errInfo + " token:" + c.Request.Header.Get("token") - log.NewError(req.OperationID, errMsg) - c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": errMsg}) - return - } - etcdConn := rpc.GetDefaultConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImCacheName, req.OperationID) - if etcdConn == nil { - errMsg := req.OperationID + "getcdv3.GetDefaultConn == nil" - log.NewError(req.OperationID, errMsg) - c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": errMsg}) - return - } - client := cacheRpc.NewCacheClient(etcdConn) - respPb, err := client.GetFriendIDListFromCache(context.Background(), &reqPb) - if err != nil { - log.NewError(req.OperationID, utils.GetSelfFuncName(), "GetFriendIDListFromCache", err.Error()) - c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": "call rpc server failed:" + err.Error()}) - return - } - resp.UserIDList = respPb.UserIDList - resp.CommResp = api.CommResp{ErrMsg: respPb.CommonResp.ErrMsg, ErrCode: respPb.CommonResp.ErrCode} - c.JSON(http.StatusOK, resp) +func (u *User) UpdateUserInfo(c *gin.Context) { + a2r.Call(user.UserClient.UpdateUserInfo, u.getGroupClient, c) } -func GetBlackIDListFromCache(c *gin.Context) { - var ( - req api.GetBlackIDListFromCacheReq - resp api.GetBlackIDListFromCacheResp - reqPb cacheRpc.GetBlackIDListFromCacheReq - respPb *cacheRpc.GetBlackIDListFromCacheResp - ) - if err := c.BindJSON(&req); err != nil { - log.NewError(req.OperationID, "BindJSON failed ", err.Error()) - c.JSON(http.StatusBadRequest, gin.H{"errCode": http.StatusBadRequest, "errMsg": err.Error()}) - return - } - log.NewInfo(req.OperationID, utils.GetSelfFuncName(), "req: ", req) - reqPb.OperationID = req.OperationID - var ok bool - var errInfo string - ok, reqPb.UserID, errInfo = tokenverify.GetUserIDFromToken(c.Request.Header.Get("token"), req.OperationID) - if !ok { - errMsg := req.OperationID + " " + "GetUserIDFromToken failed " + errInfo + " token:" + c.Request.Header.Get("token") - log.NewError(req.OperationID, errMsg) - c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": errMsg}) - return - } - etcdConn := rpc.GetDefaultConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImCacheName, req.OperationID) - if etcdConn == nil { - errMsg := req.OperationID + "getcdv3.GetDefaultConn == nil" - log.NewError(req.OperationID, errMsg) - c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": errMsg}) - return - } - client := cacheRpc.NewCacheClient(etcdConn) - respPb, err := client.GetBlackIDListFromCache(context.Background(), &reqPb) - if err != nil { - log.NewError(req.OperationID, utils.GetSelfFuncName(), "GetFriendIDListFromCache", err.Error()) - c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": "call rpc server failed:" + err.Error()}) - return - } - resp.UserIDList = respPb.UserIDList - resp.CommResp = api.CommResp{ErrMsg: respPb.CommonResp.ErrMsg, ErrCode: respPb.CommonResp.ErrCode} - c.JSON(http.StatusOK, resp) +func (u *User) SetGlobalRecvMessageOpt(c *gin.Context) { + a2r.Call(user.UserClient.SetGlobalRecvMessageOpt, u.getGroupClient, c) } -// @Summary 获取用户信息 -// @Description 根据用户列表批量获取用户信息 -// @Tags 用户相关 -// @ID GetUsersInfo -// @Accept json -// @Param token header string true "im token" -// @Param req body api.GetUsersInfoReq true "请求体" -// @Produce json -// @Success 0 {object} api.GetUsersInfoResp{Map=[]sdkws.PublicUserInfo} -// @Failure 500 {object} api.Swagger500Resp "errCode为500 一般为服务器内部错误" -// @Failure 400 {object} api.Swagger400Resp "errCode为400 一般为参数输入错误, token未带上等" -// @Router /user/get_users_info [post] -func GetUsersPublicInfo(c *gin.Context) { - params := api.GetUsersInfoReq{} - if err := c.BindJSON(¶ms); err != nil { - log.NewError("0", "BindJSON failed ", err.Error()) - c.JSON(http.StatusOK, gin.H{"errCode": http.StatusBadRequest, "errMsg": err.Error()}) - return - } - req := &rpc.GetUserInfoReq{} - utils.CopyStructFields(req, ¶ms) - - var ok bool - var errInfo string - ok, req.OpUserID, errInfo = tokenverify.GetUserIDFromToken(c.Request.Header.Get("token"), req.OperationID) - if !ok { - errMsg := req.OperationID + " " + "GetUserIDFromToken failed " + errInfo + " token:" + c.Request.Header.Get("token") - log.NewError(req.OperationID, errMsg) - c.JSON(http.StatusOK, gin.H{"errCode": 500, "errMsg": errMsg}) - return - } - - log.NewInfo(params.OperationID, "GetUserInfo args ", req.String()) - - etcdConn := rpc.GetDefaultConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImUserName, req.OperationID) - if etcdConn == nil { - errMsg := req.OperationID + "getcdv3.GetDefaultConn == nil" - log.NewError(req.OperationID, errMsg) - c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": errMsg}) - return - } - client := rpc.NewUserClient(etcdConn) - RpcResp, err := client.GetUserInfo(context.Background(), req) - if err != nil { - log.NewError(req.OperationID, "GetUserInfo failed ", err.Error(), req.String()) - c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": "call rpc server failed"}) - return - } - var publicUserInfoList []*sdkws.PublicUserInfo - for _, v := range RpcResp.UserInfoList { - publicUserInfoList = append(publicUserInfoList, - &sdkws.PublicUserInfo{UserID: v.UserID, Nickname: v.Nickname, FaceURL: v.FaceURL, Gender: v.Gender, Ex: v.Ex}) - } - - resp := api.GetUsersInfoResp{CommResp: api.CommResp{ErrCode: RpcResp.CommonResp.ErrCode, ErrMsg: RpcResp.CommonResp.ErrMsg}, UserInfoList: publicUserInfoList} - resp.Data = jsonData.JsonDataList(resp.UserInfoList) - log.NewInfo(req.OperationID, "GetUserInfo api return ", resp) - c.JSON(http.StatusOK, resp) +func (u *User) GetUsersPublicInfo(c *gin.Context) { + a2r.Call(user.UserClient.GetDesignateUsers, u.getGroupClient, c) } -// @Summary 修改用户信息 -// @Description 修改用户信息 userID faceURL等 -// @Tags 用户相关 -// @ID UpdateUserInfo -// @Accept json -// @Param token header string true "im token" -// @Param req body api.UpdateSelfUserInfoReq true "请求体" -// @Produce json -// @Success 0 {object} api.UpdateUserInfoResp -// @Failure 500 {object} api.Swagger500Resp "errCode为500 一般为服务器内部错误" -// @Failure 400 {object} api.Swagger400Resp "errCode为400 一般为参数输入错误, token未带上等" -// @Router /user/update_user_info [post] -func UpdateUserInfo(c *gin.Context) { - params := api.UpdateSelfUserInfoReq{} - if err := c.BindJSON(¶ms); err != nil { - log.NewError("0", "BindJSON failed ", err.Error()) - c.JSON(http.StatusBadRequest, gin.H{"errCode": 400, "errMsg": err.Error()}) - return - } - req := &rpc.UpdateUserInfoReq{UserInfo: &sdkws.UserInfo{}} - utils.CopyStructFields(req.UserInfo, ¶ms) - req.OperationID = params.OperationID - var ok bool - var errInfo string - ok, req.OpUserID, errInfo = tokenverify.GetUserIDFromToken(c.Request.Header.Get("token"), req.OperationID) - if !ok { - errMsg := req.OperationID + " " + "GetUserIDFromToken failed " + errInfo + " token:" + c.Request.Header.Get("token") - log.NewError(req.OperationID, errMsg) - c.JSON(http.StatusBadRequest, gin.H{"errCode": 500, "errMsg": errMsg}) - return - } - log.NewInfo(params.OperationID, "UpdateUserInfo args ", req.String()) - etcdConn := rpc.GetDefaultConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImUserName, req.OperationID) - if etcdConn == nil { - errMsg := req.OperationID + "getcdv3.GetDefaultConn == nil" - log.NewError(req.OperationID, errMsg) - c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": errMsg}) - return - } - client := rpc.NewUserClient(etcdConn) - RpcResp, err := client.UpdateUserInfo(context.Background(), req) - if err != nil { - log.NewError(req.OperationID, "UpdateUserInfo failed ", err.Error(), req.String()) - c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": "call rpc server failed"}) - return - } - resp := api.UpdateUserInfoResp{CommResp: api.CommResp{ErrCode: RpcResp.CommonResp.ErrCode, ErrMsg: RpcResp.CommonResp.ErrMsg}} - log.NewInfo(req.OperationID, "UpdateUserInfo api return ", resp) - c.JSON(http.StatusOK, resp) +func (u *User) GetSelfUserInfo(c *gin.Context) { + a2r.Call(user.UserClient.GetSelfUserInfo, u.getGroupClient, c) } -// @Summary 设置全局免打扰 -// @Description 设置全局免打扰 -// @Tags 用户相关 -// @ID SetGlobalRecvMessageOpt -// @Accept json -// @Param token header string true "im token" -// @Param req body api.SetGlobalRecvMessageOptReq true "globalRecvMsgOpt为全局免打扰设置0为关闭 1为开启" -// @Produce json -// @Success 0 {object} api.SetGlobalRecvMessageOptResp -// @Failure 500 {object} api.Swagger500Resp "errCode为500 一般为服务器内部错误" -// @Failure 400 {object} api.Swagger400Resp "errCode为400 一般为参数输入错误, token未带上等" -// @Router /user/set_global_msg_recv_opt [post] -func SetGlobalRecvMessageOpt(c *gin.Context) { - params := api.SetGlobalRecvMessageOptReq{} - if err := c.BindJSON(¶ms); err != nil { - log.NewError("0", "BindJSON failed ", err.Error()) - c.JSON(http.StatusBadRequest, gin.H{"errCode": 400, "errMsg": err.Error()}) - return - } - req := &rpc.SetGlobalRecvMessageOptReq{} - utils.CopyStructFields(req, ¶ms) - req.OperationID = params.OperationID - var ok bool - var errInfo string - ok, req.UserID, errInfo = tokenverify.GetUserIDFromToken(c.Request.Header.Get("token"), req.OperationID) - if !ok { - errMsg := req.OperationID + " " + "GetUserIDFromToken failed " + errInfo + " token:" + c.Request.Header.Get("token") - log.NewError(req.OperationID, errMsg) - c.JSON(http.StatusBadRequest, gin.H{"errCode": 500, "errMsg": errMsg}) - return - } - log.NewInfo(params.OperationID, "SetGlobalRecvMessageOpt args ", req.String()) - etcdConn := rpc.GetDefaultConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImUserName, req.OperationID) - if etcdConn == nil { - errMsg := req.OperationID + "getcdv3.GetDefaultConn == nil" - log.NewError(req.OperationID, errMsg) - c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": errMsg}) - return - } - client := rpc.NewUserClient(etcdConn) - RpcResp, err := client.SetGlobalRecvMessageOpt(context.Background(), req) - if err != nil { - log.NewError(req.OperationID, "SetGlobalRecvMessageOpt failed ", err.Error(), req.String()) - c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": "call rpc server failed"}) - return - } - resp := api.UpdateUserInfoResp{CommResp: api.CommResp{ErrCode: RpcResp.CommonResp.ErrCode, ErrMsg: RpcResp.CommonResp.ErrMsg}} - log.NewInfo(req.OperationID, "SetGlobalRecvMessageOpt api return ", resp) - c.JSON(http.StatusOK, resp) +func (u *User) GetUsersOnlineStatus(c *gin.Context) { + a2r.Call(user.UserClient.GetUsersOnlineStatus, u.getGroupClient, c) } -// @Summary 获取自己的信息 -// @Description 传入ID获取自己的信息 -// @Tags 用户相关 -// @ID GetSelfUserInfo -// @Accept json -// @Param token header string true "im token" -// @Param req body api.GetSelfUserInfoReq true "请求体" -// @Produce json -// @Success 0 {object} api.GetSelfUserInfoResp{data=sdkws.UserInfo} -// @Failure 500 {object} api.Swagger500Resp "errCode为500 一般为服务器内部错误" -// @Failure 400 {object} api.Swagger400Resp "errCode为400 一般为参数输入错误, token未带上等" -// @Router /user/get_self_user_info [post] -func GetSelfUserInfo(c *gin.Context) { - params := api.GetSelfUserInfoReq{} - if err := c.BindJSON(¶ms); err != nil { - errMsg := " BindJSON failed " + err.Error() - log.NewError("0", errMsg) - c.JSON(http.StatusOK, gin.H{"errCode": 1001, "errMsg": errMsg}) - return - } - req := &rpc.GetUserInfoReq{} - - utils.CopyStructFields(req, ¶ms) - - var ok bool - var errInfo string - ok, req.OpUserID, errInfo = tokenverify.GetUserIDFromToken(c.Request.Header.Get("token"), req.OperationID) - if !ok { - errMsg := req.OperationID + " " + "GetUserIDFromToken failed " + errInfo + " token:" + c.Request.Header.Get("token") - log.NewError(params.OperationID, errMsg) - c.JSON(http.StatusOK, gin.H{"errCode": 1001, "errMsg": errMsg}) - return - } - - req.UserIDList = append(req.UserIDList, params.UserID) - log.NewInfo(params.OperationID, "GetUserInfo args ", req.String()) - - etcdConn := rpc.GetDefaultConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImUserName, req.OperationID) - if etcdConn == nil { - errMsg := req.OperationID + "getcdv3.GetDefaultConn == nil" - log.NewError(req.OperationID, errMsg) - c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": errMsg}) - return - } - client := rpc.NewUserClient(etcdConn) - RpcResp, err := client.GetUserInfo(context.Background(), req) - if err != nil { - log.NewError(req.OperationID, "GetUserInfo failed ", err.Error(), req.String()) - c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": "call rpc server failed"}) - return - } - if len(RpcResp.UserInfoList) == 1 { - resp := api.GetSelfUserInfoResp{CommResp: api.CommResp{ErrCode: RpcResp.CommonResp.ErrCode, ErrMsg: RpcResp.CommonResp.ErrMsg}, UserInfo: RpcResp.UserInfoList[0]} - resp.Data = jsonData.JsonDataOne(resp.UserInfo) - log.NewInfo(req.OperationID, "GetUserInfo api return ", resp) - c.JSON(http.StatusOK, resp) - } else { - resp := api.GetSelfUserInfoResp{CommResp: api.CommResp{ErrCode: constant.ErrDB.ErrCode, ErrMsg: constant.ErrDB.ErrMsg}} - log.NewInfo(req.OperationID, "GetUserInfo api return ", resp) - c.JSON(http.StatusOK, resp) - } +func (u *User) GetUsersInfoFromCache(c *gin.Context) { + a2r.Call(user.UserClient.GetUsersInfoFromCache, u.getGroupClient, c) } -// @Summary 获取用户在线状态 -// @Description 获取用户在线状态 -// @Tags 用户相关 -// @ID GetUsersOnlineStatus -// @Accept json -// @Param token header string true "im token" -// @Param req body api.GetUsersOnlineStatusReq true "请求体" -// @Produce json -// @Success 0 {object} api.GetUsersOnlineStatusResp -// @Failure 500 {object} api.Swagger500Resp "errCode为500 一般为服务器内部错误" -// @Failure 400 {object} api.Swagger400Resp "errCode为400 一般为参数输入错误, token未带上等" -// @Router /user/get_users_online_status [post] -func GetUsersOnlineStatus(c *gin.Context) { - params := api.GetUsersOnlineStatusReq{} - if err := c.BindJSON(¶ms); err != nil { - - c.JSON(http.StatusOK, gin.H{"errCode": 400, "errMsg": err.Error()}) - return - } - req := &pbRelay.GetUsersOnlineStatusReq{} - utils.CopyStructFields(req, ¶ms) - - var ok bool - var errInfo string - ok, req.OpUserID, errInfo = tokenverify.GetUserIDFromToken(c.Request.Header.Get("token"), req.OperationID) - if !ok { - errMsg := req.OperationID + " " + "GetUserIDFromToken failed " + errInfo + " token:" + c.Request.Header.Get("token") - log.NewError(req.OperationID, errMsg) - c.JSON(http.StatusOK, gin.H{"errCode": 500, "errMsg": errMsg}) - return - } - - if len(config.Config.Manager.AppManagerUid) == 0 { - log.NewError(req.OperationID, "Manager == 0") - c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": "Manager == 0"}) - return - } - req.OpUserID = config.Config.Manager.AppManagerUid[0] - - log.NewInfo(params.OperationID, "GetUsersOnlineStatus args ", req.String()) - var wsResult []*pbRelay.GetUsersOnlineStatusResp_SuccessResult - var respResult []*pbRelay.GetUsersOnlineStatusResp_SuccessResult - flag := false - grpcCons := rpc.GetDefaultGatewayConn4Unique(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), params.OperationID) - for _, v := range grpcCons { - log.Debug(params.OperationID, "get node ", *v, v.Target()) - client := pbRelay.NewRelayClient(v) - reply, err := client.GetUsersOnlineStatus(context.Background(), req) - if err != nil { - log.NewError(params.OperationID, "GetUsersOnlineStatus rpc err", req.String(), err.Error()) - continue - } else { - if reply.ErrCode == 0 { - wsResult = append(wsResult, reply.SuccessResult...) - } - } - } - log.NewInfo(params.OperationID, "call GetUsersOnlineStatus rpc server is success", wsResult) - //Online data merge of each node - for _, v1 := range params.UserIDList { - flag = false - temp := new(pbRelay.GetUsersOnlineStatusResp_SuccessResult) - for _, v2 := range wsResult { - if v2.UserID == v1 { - flag = true - temp.UserID = v1 - temp.Status = constant.OnlineStatus - temp.DetailPlatformStatus = append(temp.DetailPlatformStatus, v2.DetailPlatformStatus...) - } - - } - if !flag { - temp.UserID = v1 - temp.Status = constant.OfflineStatus - } - respResult = append(respResult, temp) - } - resp := api.GetUsersOnlineStatusResp{CommResp: api.CommResp{ErrCode: 0, ErrMsg: ""}, SuccessResult: respResult} - if len(respResult) == 0 { - resp.SuccessResult = []*pbRelay.GetUsersOnlineStatusResp_SuccessResult{} - } - log.NewInfo(req.OperationID, "GetUsersOnlineStatus api return", resp) - c.JSON(http.StatusOK, resp) +func (u *User) GetFriendIDListFromCache(c *gin.Context) { + a2r.Call(user.UserClient.GetFriendIDListFromCache, u.getGroupClient, c) } -func GetUsers(c *gin.Context) { - var ( - req api.GetUsersReq - resp api.GetUsersResp - reqPb rpc.GetUsersReq - ) - if err := c.BindJSON(&req); err != nil { - log.NewError(req.OperationID, "Bind failed ", err.Error(), req) - c.JSON(http.StatusBadRequest, gin.H{"errCode": 400, "errMsg": err.Error()}) - return - } - var ok bool - var errInfo string - ok, _, errInfo = tokenverify.GetUserIDFromToken(c.Request.Header.Get("token"), req.OperationID) - if !ok { - errMsg := req.OperationID + " " + "GetUserIDFromToken failed " + errInfo + " token:" + c.Request.Header.Get("token") - log.NewError(req.OperationID, errMsg) - c.JSON(http.StatusBadRequest, gin.H{"errCode": 500, "errMsg": errMsg}) - return - } - log.NewInfo(reqPb.OperationID, utils.GetSelfFuncName(), "req: ", req) - reqPb.OperationID = req.OperationID - reqPb.UserID = req.UserID - reqPb.UserName = req.UserName - reqPb.Content = req.Content - reqPb.Pagination = &sdkws.RequestPagination{ShowNumber: req.ShowNumber, PageNumber: req.PageNumber} - etcdConn := rpc.GetDefaultConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImUserName, reqPb.OperationID) - if etcdConn == nil { - errMsg := reqPb.OperationID + "getcdv3.GetDefaultConn == nil" - log.NewError(reqPb.OperationID, errMsg) - c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": errMsg}) - return - } - client := rpc.NewUserClient(etcdConn) - respPb, err := client.GetUsers(context.Background(), &reqPb) - if err != nil { - log.NewError(req.OperationID, utils.GetSelfFuncName(), err.Error(), reqPb.String()) - c.JSON(http.StatusBadRequest, gin.H{"errCode": 500, "errMsg": err.Error()}) - return - } - for _, v := range respPb.UserList { - user := api.CMSUser{} - utils.CopyStructFields(&user, v.User) - user.IsBlock = v.IsBlock - resp.Data.UserList = append(resp.Data.UserList, &user) - } - resp.CommResp.ErrCode = respPb.CommonResp.ErrCode - resp.CommResp.ErrMsg = respPb.CommonResp.ErrMsg - resp.Data.TotalNum = respPb.TotalNums - resp.Data.CurrentPage = respPb.Pagination.CurrentPage - resp.Data.ShowNumber = respPb.Pagination.ShowNumber - log.NewInfo(req.OperationID, utils.GetSelfFuncName(), resp) - c.JSON(http.StatusOK, resp) - return +func (u *User) GetBlackIDListFromCache(c *gin.Context) { + a2r.Call(user.UserClient.GetBlackIDListFromCache, u.getGroupClient, c) +} + +//func (u *User) GetAllUsersUid(c *gin.Context) { +// a2r.Call(user.UserClient.GetAllUsersUid, u.getGroupClient, c) +//} +// +//func (u *User) AccountCheck(c *gin.Context) { +// a2r.Call(user.UserClient.AccountCheck, u.getGroupClient, c) +//} + +func (u *User) GetUsers(c *gin.Context) { + a2r.Call(user.UserClient.GetPaginationUsers, u.getGroupClient, c) } From 886818e54c01dd3a82e86c79bcf16597b60bd79c Mon Sep 17 00:00:00 2001 From: withchao <993506633@qq.com> Date: Tue, 28 Feb 2023 14:20:26 +0800 Subject: [PATCH 10/10] api pack move --- internal/{ => api}/a2r/api2rpc.go | 0 internal/api/{auth => }/auth.go | 4 ++-- internal/api/{friend => }/friend.go | 4 ++-- internal/api/{group => }/group.go | 4 ++-- internal/api/route.go | 12 ++++-------- internal/api/{user => }/user.go | 4 ++-- 6 files changed, 12 insertions(+), 16 deletions(-) rename internal/{ => api}/a2r/api2rpc.go (100%) rename internal/api/{auth => }/auth.go (96%) rename internal/api/{friend => }/friend.go (98%) rename internal/api/{group => }/group.go (98%) rename internal/api/{user => }/user.go (97%) diff --git a/internal/a2r/api2rpc.go b/internal/api/a2r/api2rpc.go similarity index 100% rename from internal/a2r/api2rpc.go rename to internal/api/a2r/api2rpc.go diff --git a/internal/api/auth/auth.go b/internal/api/auth.go similarity index 96% rename from internal/api/auth/auth.go rename to internal/api/auth.go index 557299458..da67f62ce 100644 --- a/internal/api/auth/auth.go +++ b/internal/api/auth.go @@ -1,7 +1,7 @@ -package apiAuth +package api import ( - "OpenIM/internal/a2r" + "OpenIM/internal/api/a2r" "OpenIM/pkg/common/config" auth "OpenIM/pkg/proto/auth" "context" diff --git a/internal/api/friend/friend.go b/internal/api/friend.go similarity index 98% rename from internal/api/friend/friend.go rename to internal/api/friend.go index 6d0e630b6..09b1db166 100644 --- a/internal/api/friend/friend.go +++ b/internal/api/friend.go @@ -1,7 +1,7 @@ -package friend +package api import ( - "OpenIM/internal/a2r" + "OpenIM/internal/api/a2r" "OpenIM/pkg/common/config" "OpenIM/pkg/proto/friend" "context" diff --git a/internal/api/group/group.go b/internal/api/group.go similarity index 98% rename from internal/api/group/group.go rename to internal/api/group.go index 91d5115b6..d7e481262 100644 --- a/internal/api/group/group.go +++ b/internal/api/group.go @@ -1,7 +1,7 @@ -package group +package api import ( - "OpenIM/internal/a2r" + "OpenIM/internal/api/a2r" "OpenIM/pkg/common/config" "OpenIM/pkg/proto/group" "context" diff --git a/internal/api/route.go b/internal/api/route.go index 48c5fd5db..b2df5cdbb 100644 --- a/internal/api/route.go +++ b/internal/api/route.go @@ -1,14 +1,10 @@ package api import ( - "OpenIM/internal/api/auth" "OpenIM/internal/api/conversation" - "OpenIM/internal/api/friend" - "OpenIM/internal/api/group" "OpenIM/internal/api/manage" "OpenIM/internal/api/msg" "OpenIM/internal/api/third" - "OpenIM/internal/api/user" "OpenIM/pkg/common/config" "OpenIM/pkg/common/log" "OpenIM/pkg/common/middleware" @@ -37,7 +33,7 @@ func NewGinRouter() *gin.Engine { userRouterGroup := r.Group("/user") { - u := user.NewUser(nil) + u := NewUser(nil) userRouterGroup.POST("/update_user_info", u.UpdateUserInfo) //1 userRouterGroup.POST("/set_global_msg_recv_opt", u.SetGlobalRecvMessageOpt) userRouterGroup.POST("/get_users_info", u.GetUsersPublicInfo) //1 @@ -53,7 +49,7 @@ func NewGinRouter() *gin.Engine { ////friend routing group friendRouterGroup := r.Group("/friend") { - f := friend.NewFriend(nil) + f := NewFriend(nil) friendRouterGroup.POST("/add_friend", f.AddFriend) //1 friendRouterGroup.POST("/delete_friend", f.DeleteFriend) //1 friendRouterGroup.POST("/get_friend_apply_list", f.GetFriendApplyList) //1 @@ -69,7 +65,7 @@ func NewGinRouter() *gin.Engine { } groupRouterGroup := r.Group("/group") - g := group.NewGroup(nil) + g := NewGroup(nil) { groupRouterGroup.POST("/create_group", g.NewCreateGroup) //1 groupRouterGroup.POST("/set_group_info", g.NewSetGroupInfo) //1 @@ -102,7 +98,7 @@ func NewGinRouter() *gin.Engine { ////certificate authRouterGroup := r.Group("/auth") { - a := apiAuth.NewAuth(nil) + a := NewAuth(nil) authRouterGroup.POST("/user_register", a.UserRegister) //1 authRouterGroup.POST("/user_token", a.UserToken) //1 authRouterGroup.POST("/parse_token", a.ParseToken) //1 diff --git a/internal/api/user/user.go b/internal/api/user.go similarity index 97% rename from internal/api/user/user.go rename to internal/api/user.go index ce5b47b75..9b3f4a043 100644 --- a/internal/api/user/user.go +++ b/internal/api/user.go @@ -1,7 +1,7 @@ -package user +package api import ( - "OpenIM/internal/a2r" + "OpenIM/internal/api/a2r" "OpenIM/pkg/common/config" "OpenIM/pkg/proto/user" "context"