From da3b2da37d5ac19f2a404d00e7082914a7727348 Mon Sep 17 00:00:00 2001 From: piupuer Date: Tue, 15 Oct 2024 10:10:49 +0800 Subject: [PATCH 1/4] [fix]bug --- configs/gen.yml | 24 ++++++++++++------------ internal/biz/action.go | 6 ------ internal/biz/user.go | 6 +++--- internal/data/hotspot.go | 2 +- 4 files changed, 16 insertions(+), 22 deletions(-) diff --git a/configs/gen.yml b/configs/gen.yml index 37d43cc..7c4f9b6 100644 --- a/configs/gen.yml +++ b/configs/gen.yml @@ -3,18 +3,18 @@ gen: dsn: 'root:passwd@tcp(127.0.0.1:3306)/auth?charset=utf8mb4&collation=utf8mb4_general_ci&parseTime=True&loc=Local&timeout=10000ms' tables: - - user - - action - - role - - user_group - - user_user_group_relation - - whitelist + - user + - action + - role + - user_group + - user_user_group_relation + - whitelist exclude: - - schema_migrations + - schema_migrations association: - - 'user_group|user|Users|many_to_many|many2many:user_user_group_relation' - - 'user|role|Role|has_one|foreignKey:RoleID' + - 'user_group|user|Users|many_to_many|many2many:user_user_group_relation' + - 'user|role|Role|has_one|foreignKey:RoleID' field-with-string-tag: - - 'user|role_id' - - 'user_group|lock_expire|wrong' - - 'user_user_group_relation|user_id|user_group_id' \ No newline at end of file + - 'user|role_id' + - 'user_group|lock_expire|wrong' + - 'user_user_group_relation|user_id|user_group_id' \ No newline at end of file diff --git a/internal/biz/action.go b/internal/biz/action.go index 7976056..7dd8eab 100644 --- a/internal/biz/action.go +++ b/internal/biz/action.go @@ -120,9 +120,3 @@ func (uc *ActionUseCase) Delete(ctx context.Context, ids ...uint64) error { }) }) } - -func (uc *ActionUseCase) FlushCache(ctx context.Context) { - uc.cache.Flush(ctx, func(ctx context.Context) (err error) { - return - }) -} diff --git a/internal/biz/user.go b/internal/biz/user.go index 3106530..a803ce6 100644 --- a/internal/biz/user.go +++ b/internal/biz/user.go @@ -13,7 +13,7 @@ import ( "github.com/go-cinch/common/utils" "github.com/golang-module/carbon/v2" "github.com/pkg/errors" - "github.com/thoas/go-funk" + "github.com/samber/lo" "golang.org/x/crypto/bcrypt" ) @@ -173,7 +173,7 @@ func (uc *UserUseCase) Delete(ctx context.Context, ids ...uint64) error { return uc.tx.Tx(ctx, func(ctx context.Context) error { return uc.cache.Flush(ctx, func(ctx context.Context) (err error) { info := uc.InfoFromCtx(ctx) - if funk.ContainsUInt64(ids, info.Id) { + if lo.Contains(ids, info.Id) { err = ErrDeleteYourself(ctx) return } @@ -403,7 +403,7 @@ func (uc *UserUseCase) comparePwd(ctx context.Context, action string, condition } func (uc *UserUseCase) FlushCache(ctx context.Context) { - uc.cache.Flush(ctx, func(ctx context.Context) (err error) { + _ = uc.cache.Flush(ctx, func(ctx context.Context) (err error) { return }) } diff --git a/internal/data/hotspot.go b/internal/data/hotspot.go index 17d78a4..0820afc 100644 --- a/internal/data/hotspot.go +++ b/internal/data/hotspot.go @@ -576,7 +576,7 @@ func (ro hotspotRepo) refreshUser(ctx context.Context, pipe redis.Pipeliner) { utils.CamelCase(p.Wrong.ColumnName().String()), strconv.FormatUint(item.Wrong, 10), utils.CamelCase(p.Locked.ColumnName().String()), item.Locked, ) - pipe.Expire(ctx, codeKey, ro.randomExpire()) + pipe.Expire(ctx, usernameKey, ro.randomExpire()) } return } From ce8a9ddf2bf4fc05f894947dad65b3ba45397a42 Mon Sep 17 00:00:00 2001 From: piupuer Date: Tue, 15 Oct 2024 10:11:30 +0800 Subject: [PATCH 2/4] [feat]change permission and idempotent middleware --- go.mod | 1 - go.sum | 4 - .../db/migrations/2023060210-whitelist.sql | 2 +- .../db/migrations/2023060217-default-data.sql | 7 +- internal/pkg/idempotent/idempotent.go | 21 +--- internal/server/grpc.go | 7 +- internal/server/http.go | 10 +- internal/server/middleware/header.go | 17 ++- internal/server/middleware/idempotent.go | 38 +++--- internal/server/middleware/jwt.go | 115 ----------------- internal/server/middleware/whitelist.go | 116 ------------------ internal/service/service.go | 2 +- 12 files changed, 39 insertions(+), 301 deletions(-) delete mode 100644 internal/server/middleware/jwt.go delete mode 100644 internal/server/middleware/whitelist.go diff --git a/go.mod b/go.mod index a5c2feb..aa04e4b 100644 --- a/go.mod +++ b/go.mod @@ -34,7 +34,6 @@ require ( github.com/pkg/errors v0.9.1 github.com/redis/go-redis/v9 v9.2.1 github.com/samber/lo v1.47.0 - github.com/thoas/go-funk v0.9.3 go.opentelemetry.io/otel v1.30.0 go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.30.0 go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.30.0 diff --git a/go.sum b/go.sum index a228e4c..0033cae 100644 --- a/go.sum +++ b/go.sum @@ -228,7 +228,6 @@ github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSS github.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpEOglKo= github.com/stretchr/objx v0.5.2/go.mod h1:FRsXN1f5AsAjCGJKqEizvkpNtU+EGNCLh3NxZ/8L+MA= github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= -github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= @@ -236,8 +235,6 @@ github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg= github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= -github.com/thoas/go-funk v0.9.3 h1:7+nAEx3kn5ZJcnDm2Bh23N2yOtweO14bi//dvRtgLpw= -github.com/thoas/go-funk v0.9.3/go.mod h1:+IWnUfUmFO1+WVYQWQtIJHeRRdaIyyYglZN7xzUPe4Q= github.com/tklauser/go-sysconf v0.3.11 h1:89WgdJhk5SNwJfu+GKyYveZ4IaJ7xAkecBo+KdJV0CM= github.com/tklauser/go-sysconf v0.3.11/go.mod h1:GqXfhXY3kiPa0nAXPDIQIWzJbMCB7AmcWpGR8lSZfqI= github.com/tklauser/numcpus v0.6.0/go.mod h1:FEZLMke0lhOUG6w2JadTzp0a+Nl8PF/GFkQ5UVIcaL4= @@ -379,7 +376,6 @@ gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8 gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= -gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.3.0/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY= gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ= diff --git a/internal/db/migrations/2023060210-whitelist.sql b/internal/db/migrations/2023060210-whitelist.sql index 0a05e40..2e1ff84 100644 --- a/internal/db/migrations/2023060210-whitelist.sql +++ b/internal/db/migrations/2023060210-whitelist.sql @@ -2,7 +2,7 @@ CREATE TABLE `whitelist` ( `id` BIGINT UNSIGNED AUTO_INCREMENT COMMENT 'auto increment id' PRIMARY KEY, - `category` SMALLINT UNSIGNED NOT NULL COMMENT 'category(0:permission, 1:jwt, 2:idempotent)', + `category` SMALLINT UNSIGNED NOT NULL COMMENT 'category(0:permission, 1:jwt)', `resource` LONGTEXT NOT NULL COMMENT 'resource array, split by break line str, example: GET|/user+\n+PUT,PATCH|/role/*+\n+GET|/action' ) ENGINE = InnoDB DEFAULT CHARSET = utf8mb4 diff --git a/internal/db/migrations/2023060217-default-data.sql b/internal/db/migrations/2023060217-default-data.sql index 8b98252..469b23b 100644 --- a/internal/db/migrations/2023060217-default-data.sql +++ b/internal/db/migrations/2023060217-default-data.sql @@ -2,7 +2,7 @@ -- SQL in section 'Up' is executed when this migration is applied INSERT INTO `action` (`id`, `name`, `code`, `word`, `resource`, `menu`, `btn`) VALUES (8926844486248562689,'全部权限','SN2837AY','*','*','*','*'), -(8926844486248579238,'默认权限','KHXK5JVL','default','POST|/auth/pwd|/auth.v1.Auth/Pwd\nGET|/auth/idempotent|/auth.v1.Auth/Idempotent\n/auth.v1.Auth/CheckIdempotent','/dashboard/base\n/user/index',''), +(8926844486248579238,'默认权限','KHXK5JVL','default','POST|/auth/logout|/auth.v1.Auth/Logout\nGET|/auth/info|/auth.v1.Auth/Info\nPOST|/auth/pwd|/auth.v1.Auth/Pwd\nGET|/auth/idempotent|/auth.v1.Auth/Idempotent\n/auth.v1.Auth/CheckIdempotent','/dashboard/base\n/user/index',''), (8929298412088590337,'首页','2QKHTYEE','dashboard','','/dashboard/base',''), (8929306305215070209,'用户查询','GRNA3NPV','user.read','GET|/auth/user|/auth.v1.Auth/FindUser','/system/user','system.user.read'), (8929306391416406017,'用户新增','2LV9MDWB','user.create','POST|/auth/register|/auth.v1.Auth/Register','/system/user','system.user.create'), @@ -47,9 +47,8 @@ INSERT INTO `user_user_group_relation` (`user_id`, `user_group_id`) VALUES (8929717570412478465,8929717758803836929); INSERT INTO `whitelist` (`id`, `category`, `resource`) VALUES -(8946576552976449537, 0, 'POST|/auth/logout|/auth.v1.Auth/Logout\nGET|/auth/info|/auth.v1.Auth/Info\n/grpc.health.v1.Health/Check\n/grpc.health.v1.Health/Watch'), -(8946576560039657473, 1, 'POST|/auth/login|/auth.v1.Auth/Login\n/auth.v1.Auth/GetUserByCode\n/auth.v1.Auth/CheckIdempotent\n/grpc.health.v1.Health/Check\n/grpc.health.v1.Health/Watch'), -(8946576567690067969, 2, 'POST|/auth/action|/auth.v1.Auth/CreateAction\nPOST|/auth/role|/auth.v1.Auth/CreateRole\nPOST|/auth/user/group|/auth.v1.Auth/CreateUserGroup'); +(8946576552976449537, 0, '/grpc.health.v1.Health/Check\n/grpc.health.v1.Health/Watch'), +(8946576560039657473, 1, '/grpc.health.v1.Health/Check\n/grpc.health.v1.Health/Watch'); -- +migrate Down TRUNCATE TABLE `action`; diff --git a/internal/pkg/idempotent/idempotent.go b/internal/pkg/idempotent/idempotent.go index f04ccc4..1544429 100644 --- a/internal/pkg/idempotent/idempotent.go +++ b/internal/pkg/idempotent/idempotent.go @@ -1,8 +1,6 @@ package idempotent import ( - "context" - "auth/internal/conf" "github.com/go-cinch/common/idempotent" "github.com/go-cinch/common/log" @@ -12,27 +10,12 @@ import ( var ProviderSet = wire.NewSet(New) -type Idempotent struct { - idempotent *idempotent.Idempotent -} - -func (idt Idempotent) Token(ctx context.Context) string { - return idt.idempotent.Token(ctx) -} - -func (idt Idempotent) Check(ctx context.Context, token string) bool { - return idt.idempotent.Check(ctx, token) -} - // New is initialize idempotent from config -func New(c *conf.Bootstrap, redis redis.UniversalClient) (idt *Idempotent, err error) { - ins := idempotent.New( +func New(c *conf.Bootstrap, redis redis.UniversalClient) (idt *idempotent.Idempotent, err error) { + idt = idempotent.New( idempotent.WithPrefix(c.Name), idempotent.WithRedis(redis), ) - idt = &Idempotent{ - idempotent: ins, - } log.Info("initialize idempotent success") return } diff --git a/internal/server/grpc.go b/internal/server/grpc.go index 9cdb355..c297b09 100644 --- a/internal/server/grpc.go +++ b/internal/server/grpc.go @@ -4,10 +4,10 @@ import ( "auth/api/auth" "auth/internal/biz" "auth/internal/conf" - "auth/internal/pkg/idempotent" localMiddleware "auth/internal/server/middleware" "auth/internal/service" "github.com/go-cinch/common/i18n" + "github.com/go-cinch/common/idempotent" i18nMiddleware "github.com/go-cinch/common/middleware/i18n" "github.com/go-cinch/common/middleware/logging" tenantMiddleware "github.com/go-cinch/common/middleware/tenant" @@ -44,13 +44,12 @@ func NewGRPCServer( logging.Server(), i18nMiddleware.Translator(i18n.WithLanguage(language.Make(c.Server.Language)), i18n.WithFs(locales)), metadata.Server(), - localMiddleware.Whitelist(whitelist), ) if c.Server.Jwt.Enable { - middlewares = append(middlewares, localMiddleware.Jwt(c, client, whitelist)) + middlewares = append(middlewares, localMiddleware.Permission(c, client, whitelist)) } if c.Server.Idempotent { - middlewares = append(middlewares, localMiddleware.Idempotent(idt, whitelist)) + middlewares = append(middlewares, localMiddleware.Idempotent(idt)) } if c.Server.Validate { middlewares = append(middlewares, validate.Validator()) diff --git a/internal/server/http.go b/internal/server/http.go index cfc7a70..1c69cce 100644 --- a/internal/server/http.go +++ b/internal/server/http.go @@ -4,16 +4,17 @@ import ( "auth/api/auth" "auth/internal/biz" "auth/internal/conf" - "auth/internal/pkg/idempotent" localMiddleware "auth/internal/server/middleware" "auth/internal/service" "github.com/go-cinch/common/i18n" + "github.com/go-cinch/common/idempotent" i18nMiddleware "github.com/go-cinch/common/middleware/i18n" "github.com/go-cinch/common/middleware/logging" tenantMiddleware "github.com/go-cinch/common/middleware/tenant" traceMiddleware "github.com/go-cinch/common/middleware/trace" "github.com/go-kratos/kratos/v2/middleware" "github.com/go-kratos/kratos/v2/middleware/metadata" + "github.com/go-kratos/kratos/v2/middleware/ratelimit" "github.com/go-kratos/kratos/v2/middleware/recovery" "github.com/go-kratos/kratos/v2/middleware/tracing" "github.com/go-kratos/kratos/v2/middleware/validate" @@ -39,18 +40,17 @@ func NewHTTPServer( middlewares, recovery.Recovery(), tenantMiddleware.Tenant(), - // ratelimit.Server(), + ratelimit.Server(), localMiddleware.Header(), logging.Server(), i18nMiddleware.Translator(i18n.WithLanguage(language.Make(c.Server.Language)), i18n.WithFs(locales)), metadata.Server(), - localMiddleware.Whitelist(whitelist), ) if c.Server.Jwt.Enable { - middlewares = append(middlewares, localMiddleware.Jwt(c, client, whitelist)) + middlewares = append(middlewares, localMiddleware.Permission(c, client, whitelist)) } if c.Server.Idempotent { - middlewares = append(middlewares, localMiddleware.Idempotent(idt, whitelist)) + middlewares = append(middlewares, localMiddleware.Idempotent(idt)) } if c.Server.Validate { middlewares = append(middlewares, validate.Validator()) diff --git a/internal/server/middleware/header.go b/internal/server/middleware/header.go index b29b62d..b29f63f 100644 --- a/internal/server/middleware/header.go +++ b/internal/server/middleware/header.go @@ -10,15 +10,14 @@ import ( func Header() middleware.Middleware { return func(handler middleware.Handler) middleware.Handler { return func(ctx context.Context, req interface{}) (rp interface{}, err error) { - if tr, ok := transport.FromServerContext(ctx); ok { - switch tr.Kind() { - case transport.KindHTTP: - if tr.ReplyHeader() != nil { - tr.ReplyHeader().Set("x-content-type-options", "nosniff") - tr.ReplyHeader().Set("x-xss-protection", "1; mode=block") - tr.ReplyHeader().Set("x-frame-options", "deny") - tr.ReplyHeader().Set("cache-control", "private") - } + tr, _ := transport.FromServerContext(ctx) + switch tr.Kind() { + case transport.KindHTTP: + if tr.ReplyHeader() != nil { + tr.ReplyHeader().Set("x-content-type-options", "nosniff") + tr.ReplyHeader().Set("x-xss-protection", "1; mode=block") + tr.ReplyHeader().Set("x-frame-options", "deny") + tr.ReplyHeader().Set("cache-control", "private") } } return handler(ctx, req) diff --git a/internal/server/middleware/idempotent.go b/internal/server/middleware/idempotent.go index 0e01f2e..d3987df 100644 --- a/internal/server/middleware/idempotent.go +++ b/internal/server/middleware/idempotent.go @@ -3,33 +3,27 @@ package middleware import ( "context" + "auth/api/auth" "auth/internal/biz" - "auth/internal/pkg/idempotent" + "github.com/go-cinch/common/idempotent" "github.com/go-kratos/kratos/v2/middleware" - "github.com/go-kratos/kratos/v2/middleware/selector" "github.com/go-kratos/kratos/v2/transport" ) -func Idempotent(idt *idempotent.Idempotent, whitelist *biz.WhitelistUseCase) middleware.Middleware { - return selector.Server( - func(handler middleware.Handler) middleware.Handler { - return func(ctx context.Context, req interface{}) (rp interface{}, err error) { - tr, ok := transport.FromServerContext(ctx) - if !ok { - err = biz.ErrIdempotentMissingToken(ctx) - return - } - token := tr.RequestHeader().Get("x-idempotent") - if token == "" { - err = biz.ErrIdempotentMissingToken(ctx) - return - } - if !idt.Check(ctx, token) { - err = biz.ErrIdempotentTokenExpired(ctx) - return - } +func Idempotent(idt *idempotent.Idempotent) middleware.Middleware { + return func(handler middleware.Handler) middleware.Handler { + return func(ctx context.Context, req interface{}) (rp interface{}, err error) { + tr, _ := transport.FromServerContext(ctx) + token := tr.RequestHeader().Get("x-idempotent") + if token == "" || tr.Operation() == auth.OperationAuthPermission { + // not have token, no need check return handler(ctx, req) } - }, - ).Match(idempotentBlacklist(whitelist)).Build() + if !idt.Check(ctx, token) { + err = biz.ErrIdempotentTokenExpired(ctx) + return + } + return handler(ctx, req) + } + } } diff --git a/internal/server/middleware/jwt.go b/internal/server/middleware/jwt.go deleted file mode 100644 index 00fa386..0000000 --- a/internal/server/middleware/jwt.go +++ /dev/null @@ -1,115 +0,0 @@ -package middleware - -import ( - "context" - "errors" - "strings" - "time" - - "auth/internal/biz" - "auth/internal/conf" - jwtLocal "github.com/go-cinch/common/jwt" - "github.com/go-cinch/common/utils" - "github.com/go-kratos/kratos/v2/middleware" - "github.com/go-kratos/kratos/v2/middleware/selector" - "github.com/go-kratos/kratos/v2/transport" - kratosHttp "github.com/go-kratos/kratos/v2/transport/http" - jwtV4 "github.com/golang-jwt/jwt/v4" - "github.com/redis/go-redis/v9" -) - -func Jwt(c *conf.Bootstrap, client redis.UniversalClient, whitelist *biz.WhitelistUseCase) middleware.Middleware { - return selector.Server( - jwtHandler(c, client), - ).Match(jwtWhitelist(whitelist)).Build() -} - -const jwtTokenUserKey = "jwt_token_" - -func jwtHandler(c *conf.Bootstrap, client redis.UniversalClient) func(handler middleware.Handler) middleware.Handler { - return func(handler middleware.Handler) middleware.Handler { - return func(ctx context.Context, req interface{}) (rp interface{}, err error) { - tr, ok := transport.FromServerContext(ctx) - if !ok { - err = biz.ErrJwtMissingToken(ctx) - return - } - var path string - switch tr.Kind() { - case transport.KindHTTP: - if ht, ok3 := tr.(kratosHttp.Transporter); ok3 { - path = ht.Request().URL.Path - } - case transport.KindGRPC: - // grpc api for internal no need check - return handler(ctx, req) - } - // public api no need check - if strings.Contains(path, "/pub/") { - return handler(ctx, req) - } - user := jwtLocal.FromServerContext(ctx) - if user.Token == "" && user.Code == "" { - err = biz.ErrJwtMissingToken(ctx) - return - } - if user.Code != "" { - return handler(ctx, req) - } - token := user.Token - if token != "" { - key := strings.Join([]string{jwtTokenUserKey, utils.StructMd5(token)}, "") - // read user info from cache - res, e := client.Get(ctx, key).Result() - if e == nil { - utils.Json2Struct(user, res) - } else { - // parse Authorization jwt token to get user info - var info *jwtV4.Token - info, err = parseToken(ctx, c.Server.Jwt.Key, token) - if err != nil { - return - } - ctx = jwtLocal.NewServerContext(ctx, info.Claims) - user = jwtLocal.FromServerContext(ctx) - client.Set(ctx, key, utils.Struct2Json(user), time.Hour) - } - } - ctx = jwtLocal.NewServerContextByUser(ctx, *user) - return handler(ctx, req) - } - } -} - -func parseToken(ctx context.Context, key, jwtToken string) (info *jwtV4.Token, err error) { - info, err = jwtV4.Parse(jwtToken, func(token *jwtV4.Token) (rp interface{}, err error) { - rp = []byte(key) - return - }) - if err != nil { - var ve *jwtV4.ValidationError - ok := errors.As(err, &ve) - if !ok { - return - } - if ve.Errors&jwtV4.ValidationErrorMalformed != 0 { - err = biz.ErrJwtTokenInvalid(ctx) - return - } - if ve.Errors&(jwtV4.ValidationErrorExpired|jwtV4.ValidationErrorNotValidYet) != 0 { - err = biz.ErrJwtTokenExpired(ctx) - return - } - err = biz.ErrJwtTokenParseFail(ctx) - return - } - if !info.Valid { - err = biz.ErrJwtTokenParseFail(ctx) - return - } - if info.Method != jwtV4.SigningMethodHS512 { - err = biz.ErrJwtUnSupportSigningMethod(ctx) - return - } - return -} diff --git a/internal/server/middleware/whitelist.go b/internal/server/middleware/whitelist.go deleted file mode 100644 index 8b82c71..0000000 --- a/internal/server/middleware/whitelist.go +++ /dev/null @@ -1,116 +0,0 @@ -package middleware - -import ( - "context" - "net/http" - "strings" - - "auth/api/auth" - "auth/internal/biz" - "github.com/go-cinch/common/log" - "github.com/go-kratos/kratos/v2/middleware" - "github.com/go-kratos/kratos/v2/middleware/selector" - "github.com/go-kratos/kratos/v2/transport" - "google.golang.org/protobuf/types/known/emptypb" -) - -func Whitelist(whitelist *biz.WhitelistUseCase) middleware.Middleware { - return func(handler middleware.Handler) middleware.Handler { - return func(ctx context.Context, req interface{}) (rp interface{}, err error) { - tr, ok := transport.FromServerContext(ctx) - if !ok { - err = biz.ErrNoPermission(ctx) - return - } - var pass bool - operation := tr.Operation() - if operation == auth.OperationAuthPermission { - // nginx auth_request - v, ok2 := req.(*auth.PermissionRequest) - if !ok2 { - err = biz.ErrNoPermission(ctx) - return - } - // get from header if exist - method := tr.RequestHeader().Get("x-original-method") - uri := tr.RequestHeader().Get("x-permission-uri") - if v.Method == nil && method != "" { - v.Method = &method - } - if v.Uri == nil && uri != "" { - v.Uri = &uri - } - // public api no need check - if v.Uri != nil && strings.Contains(*v.Uri, "/pub/") { - rp = &emptypb.Empty{} - return - } - // check whitelist - pass, err = hasPermissionWhitelist(ctx, whitelist, v) - if err != nil { - return - } - if pass { - rp = &emptypb.Empty{} - return - } - } - // not in whitelist or not auth.OperationAuthPermission - return handler(ctx, req) - } - } -} - -func hasPermissionWhitelist(ctx context.Context, whitelist *biz.WhitelistUseCase, req *auth.PermissionRequest) (ok bool, err error) { - var r biz.CheckPermission - if req.Method != nil { - r.Method = *req.Method - } - if req.Uri != nil { - r.URI = *req.Uri - } - if req.Uri != nil { - r.URI = *req.Uri - } - if req.Resource != nil { - r.Resource = *req.Resource - } - log.WithContext(ctx).Info("method: %s, uri: %s, resource: %s", r.Method, r.URI, r.Resource) - // skip options - if r.Method == http.MethodOptions { - ok = true - return - } - // check if it is on the whitelist - ok = whitelist.Has(ctx, &biz.HasWhitelist{ - Category: biz.WhitelistPermissionCategory, - Permission: r, - }) - return -} - -func jwtWhitelist(whitelist *biz.WhitelistUseCase) selector.MatchFunc { - return func(ctx context.Context, operation string) bool { - pass := whitelist.Has(ctx, &biz.HasWhitelist{ - Category: biz.WhitelistJwtCategory, - Permission: biz.CheckPermission{ - Resource: operation, - }, - }) - // has data means no need check jwt - return !pass - } -} - -func idempotentBlacklist(whitelist *biz.WhitelistUseCase) selector.MatchFunc { - return func(ctx context.Context, operation string) bool { - pass := whitelist.Has(ctx, &biz.HasWhitelist{ - Category: biz.WhitelistIdempotentCategory, - Permission: biz.CheckPermission{ - Resource: operation, - }, - }) - // has data means need check idempotent - return pass - } -} diff --git a/internal/service/service.go b/internal/service/service.go index 084fa70..3f0ed1b 100644 --- a/internal/service/service.go +++ b/internal/service/service.go @@ -4,7 +4,7 @@ import ( "auth/api/auth" "auth/internal/biz" "auth/internal/conf" - "auth/internal/pkg/idempotent" + "github.com/go-cinch/common/idempotent" "github.com/go-cinch/common/worker" "github.com/google/wire" ) From 7c9f827c289d0798fb8eff980f2cf9318fc00ff6 Mon Sep 17 00:00:00 2001 From: piupuer Date: Tue, 15 Oct 2024 10:56:34 +0800 Subject: [PATCH 3/4] [fix]change api path and remove some api not use --- api/auth/auth.pb.go | 1236 ++++------- api/auth/auth.pb.validate.go | 1970 ++++++----------- api/auth/auth_grpc.pb.go | 111 - api/auth/auth_http.pb.go | 137 +- docs/auth-proto/auth.openapi.yaml | 401 ++-- internal/biz/user.go | 4 - .../db/migrations/2023060217-default-data.sql | 40 +- internal/service/idempotent.go | 18 - internal/service/user.go | 11 - internal/service/whitelist.go | 12 - 10 files changed, 1277 insertions(+), 2663 deletions(-) diff --git a/api/auth/auth.pb.go b/api/auth/auth.pb.go index d427e36..e45baa8 100644 --- a/api/auth/auth.pb.go +++ b/api/auth/auth.pb.go @@ -1097,53 +1097,6 @@ func (x *InfoReply) GetPermission() *Permission { return nil } -type CheckIdempotentRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Token string `protobuf:"bytes,1,opt,name=token,proto3" json:"token,omitempty"` -} - -func (x *CheckIdempotentRequest) Reset() { - *x = CheckIdempotentRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_auth_proto_auth_proto_msgTypes[15] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *CheckIdempotentRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*CheckIdempotentRequest) ProtoMessage() {} - -func (x *CheckIdempotentRequest) ProtoReflect() protoreflect.Message { - mi := &file_auth_proto_auth_proto_msgTypes[15] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use CheckIdempotentRequest.ProtoReflect.Descriptor instead. -func (*CheckIdempotentRequest) Descriptor() ([]byte, []int) { - return file_auth_proto_auth_proto_rawDescGZIP(), []int{15} -} - -func (x *CheckIdempotentRequest) GetToken() string { - if x != nil { - return x.Token - } - return "" -} - type IdempotentReply struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -1155,7 +1108,7 @@ type IdempotentReply struct { func (x *IdempotentReply) Reset() { *x = IdempotentReply{} if protoimpl.UnsafeEnabled { - mi := &file_auth_proto_auth_proto_msgTypes[16] + mi := &file_auth_proto_auth_proto_msgTypes[15] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1168,7 +1121,7 @@ func (x *IdempotentReply) String() string { func (*IdempotentReply) ProtoMessage() {} func (x *IdempotentReply) ProtoReflect() protoreflect.Message { - mi := &file_auth_proto_auth_proto_msgTypes[16] + mi := &file_auth_proto_auth_proto_msgTypes[15] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1181,7 +1134,7 @@ func (x *IdempotentReply) ProtoReflect() protoreflect.Message { // Deprecated: Use IdempotentReply.ProtoReflect.Descriptor instead. func (*IdempotentReply) Descriptor() ([]byte, []int) { - return file_auth_proto_auth_proto_rawDescGZIP(), []int{16} + return file_auth_proto_auth_proto_rawDescGZIP(), []int{15} } func (x *IdempotentReply) GetToken() string { @@ -1204,7 +1157,7 @@ type Permission struct { func (x *Permission) Reset() { *x = Permission{} if protoimpl.UnsafeEnabled { - mi := &file_auth_proto_auth_proto_msgTypes[17] + mi := &file_auth_proto_auth_proto_msgTypes[16] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1217,7 +1170,7 @@ func (x *Permission) String() string { func (*Permission) ProtoMessage() {} func (x *Permission) ProtoReflect() protoreflect.Message { - mi := &file_auth_proto_auth_proto_msgTypes[17] + mi := &file_auth_proto_auth_proto_msgTypes[16] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1230,7 +1183,7 @@ func (x *Permission) ProtoReflect() protoreflect.Message { // Deprecated: Use Permission.ProtoReflect.Descriptor instead. func (*Permission) Descriptor() ([]byte, []int) { - return file_auth_proto_auth_proto_rawDescGZIP(), []int{17} + return file_auth_proto_auth_proto_rawDescGZIP(), []int{16} } func (x *Permission) GetResources() []string { @@ -1254,100 +1207,6 @@ func (x *Permission) GetBtns() []string { return nil } -type GetUserByCodeRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Code string `protobuf:"bytes,1,opt,name=code,proto3" json:"code,omitempty"` -} - -func (x *GetUserByCodeRequest) Reset() { - *x = GetUserByCodeRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_auth_proto_auth_proto_msgTypes[18] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *GetUserByCodeRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GetUserByCodeRequest) ProtoMessage() {} - -func (x *GetUserByCodeRequest) ProtoReflect() protoreflect.Message { - mi := &file_auth_proto_auth_proto_msgTypes[18] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use GetUserByCodeRequest.ProtoReflect.Descriptor instead. -func (*GetUserByCodeRequest) Descriptor() ([]byte, []int) { - return file_auth_proto_auth_proto_rawDescGZIP(), []int{18} -} - -func (x *GetUserByCodeRequest) GetCode() string { - if x != nil { - return x.Code - } - return "" -} - -type GetUserByCodeReply struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - User *User `protobuf:"bytes,1,opt,name=user,proto3" json:"user,omitempty"` -} - -func (x *GetUserByCodeReply) Reset() { - *x = GetUserByCodeReply{} - if protoimpl.UnsafeEnabled { - mi := &file_auth_proto_auth_proto_msgTypes[19] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *GetUserByCodeReply) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GetUserByCodeReply) ProtoMessage() {} - -func (x *GetUserByCodeReply) ProtoReflect() protoreflect.Message { - mi := &file_auth_proto_auth_proto_msgTypes[19] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use GetUserByCodeReply.ProtoReflect.Descriptor instead. -func (*GetUserByCodeReply) Descriptor() ([]byte, []int) { - return file_auth_proto_auth_proto_rawDescGZIP(), []int{19} -} - -func (x *GetUserByCodeReply) GetUser() *User { - if x != nil { - return x.User - } - return nil -} - type FindUserRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -1367,7 +1226,7 @@ type FindUserRequest struct { func (x *FindUserRequest) Reset() { *x = FindUserRequest{} if protoimpl.UnsafeEnabled { - mi := &file_auth_proto_auth_proto_msgTypes[20] + mi := &file_auth_proto_auth_proto_msgTypes[17] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1380,7 +1239,7 @@ func (x *FindUserRequest) String() string { func (*FindUserRequest) ProtoMessage() {} func (x *FindUserRequest) ProtoReflect() protoreflect.Message { - mi := &file_auth_proto_auth_proto_msgTypes[20] + mi := &file_auth_proto_auth_proto_msgTypes[17] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1393,7 +1252,7 @@ func (x *FindUserRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use FindUserRequest.ProtoReflect.Descriptor instead. func (*FindUserRequest) Descriptor() ([]byte, []int) { - return file_auth_proto_auth_proto_rawDescGZIP(), []int{20} + return file_auth_proto_auth_proto_rawDescGZIP(), []int{17} } func (x *FindUserRequest) GetPage() *params.Page { @@ -1471,7 +1330,7 @@ type FindUserReply struct { func (x *FindUserReply) Reset() { *x = FindUserReply{} if protoimpl.UnsafeEnabled { - mi := &file_auth_proto_auth_proto_msgTypes[21] + mi := &file_auth_proto_auth_proto_msgTypes[18] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1484,7 +1343,7 @@ func (x *FindUserReply) String() string { func (*FindUserReply) ProtoMessage() {} func (x *FindUserReply) ProtoReflect() protoreflect.Message { - mi := &file_auth_proto_auth_proto_msgTypes[21] + mi := &file_auth_proto_auth_proto_msgTypes[18] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1497,7 +1356,7 @@ func (x *FindUserReply) ProtoReflect() protoreflect.Message { // Deprecated: Use FindUserReply.ProtoReflect.Descriptor instead. func (*FindUserReply) Descriptor() ([]byte, []int) { - return file_auth_proto_auth_proto_rawDescGZIP(), []int{21} + return file_auth_proto_auth_proto_rawDescGZIP(), []int{18} } func (x *FindUserReply) GetPage() *params.Page { @@ -1532,7 +1391,7 @@ type UpdateUserRequest struct { func (x *UpdateUserRequest) Reset() { *x = UpdateUserRequest{} if protoimpl.UnsafeEnabled { - mi := &file_auth_proto_auth_proto_msgTypes[22] + mi := &file_auth_proto_auth_proto_msgTypes[19] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1545,7 +1404,7 @@ func (x *UpdateUserRequest) String() string { func (*UpdateUserRequest) ProtoMessage() {} func (x *UpdateUserRequest) ProtoReflect() protoreflect.Message { - mi := &file_auth_proto_auth_proto_msgTypes[22] + mi := &file_auth_proto_auth_proto_msgTypes[19] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1558,7 +1417,7 @@ func (x *UpdateUserRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use UpdateUserRequest.ProtoReflect.Descriptor instead. func (*UpdateUserRequest) Descriptor() ([]byte, []int) { - return file_auth_proto_auth_proto_rawDescGZIP(), []int{22} + return file_auth_proto_auth_proto_rawDescGZIP(), []int{19} } func (x *UpdateUserRequest) GetId() uint64 { @@ -1630,7 +1489,7 @@ type PermissionRequest struct { func (x *PermissionRequest) Reset() { *x = PermissionRequest{} if protoimpl.UnsafeEnabled { - mi := &file_auth_proto_auth_proto_msgTypes[23] + mi := &file_auth_proto_auth_proto_msgTypes[20] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1643,7 +1502,7 @@ func (x *PermissionRequest) String() string { func (*PermissionRequest) ProtoMessage() {} func (x *PermissionRequest) ProtoReflect() protoreflect.Message { - mi := &file_auth_proto_auth_proto_msgTypes[23] + mi := &file_auth_proto_auth_proto_msgTypes[20] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1656,7 +1515,7 @@ func (x *PermissionRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use PermissionRequest.ProtoReflect.Descriptor instead. func (*PermissionRequest) Descriptor() ([]byte, []int) { - return file_auth_proto_auth_proto_rawDescGZIP(), []int{23} + return file_auth_proto_auth_proto_rawDescGZIP(), []int{20} } func (x *PermissionRequest) GetResource() string { @@ -1695,7 +1554,7 @@ type CreateActionRequest struct { func (x *CreateActionRequest) Reset() { *x = CreateActionRequest{} if protoimpl.UnsafeEnabled { - mi := &file_auth_proto_auth_proto_msgTypes[24] + mi := &file_auth_proto_auth_proto_msgTypes[21] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1708,7 +1567,7 @@ func (x *CreateActionRequest) String() string { func (*CreateActionRequest) ProtoMessage() {} func (x *CreateActionRequest) ProtoReflect() protoreflect.Message { - mi := &file_auth_proto_auth_proto_msgTypes[24] + mi := &file_auth_proto_auth_proto_msgTypes[21] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1721,7 +1580,7 @@ func (x *CreateActionRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use CreateActionRequest.ProtoReflect.Descriptor instead. func (*CreateActionRequest) Descriptor() ([]byte, []int) { - return file_auth_proto_auth_proto_rawDescGZIP(), []int{24} + return file_auth_proto_auth_proto_rawDescGZIP(), []int{21} } func (x *CreateActionRequest) GetName() string { @@ -1774,7 +1633,7 @@ type FindActionRequest struct { func (x *FindActionRequest) Reset() { *x = FindActionRequest{} if protoimpl.UnsafeEnabled { - mi := &file_auth_proto_auth_proto_msgTypes[25] + mi := &file_auth_proto_auth_proto_msgTypes[22] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1787,7 +1646,7 @@ func (x *FindActionRequest) String() string { func (*FindActionRequest) ProtoMessage() {} func (x *FindActionRequest) ProtoReflect() protoreflect.Message { - mi := &file_auth_proto_auth_proto_msgTypes[25] + mi := &file_auth_proto_auth_proto_msgTypes[22] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1800,7 +1659,7 @@ func (x *FindActionRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use FindActionRequest.ProtoReflect.Descriptor instead. func (*FindActionRequest) Descriptor() ([]byte, []int) { - return file_auth_proto_auth_proto_rawDescGZIP(), []int{25} + return file_auth_proto_auth_proto_rawDescGZIP(), []int{22} } func (x *FindActionRequest) GetPage() *params.Page { @@ -1850,7 +1709,7 @@ type FindActionReply struct { func (x *FindActionReply) Reset() { *x = FindActionReply{} if protoimpl.UnsafeEnabled { - mi := &file_auth_proto_auth_proto_msgTypes[26] + mi := &file_auth_proto_auth_proto_msgTypes[23] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1863,7 +1722,7 @@ func (x *FindActionReply) String() string { func (*FindActionReply) ProtoMessage() {} func (x *FindActionReply) ProtoReflect() protoreflect.Message { - mi := &file_auth_proto_auth_proto_msgTypes[26] + mi := &file_auth_proto_auth_proto_msgTypes[23] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1876,7 +1735,7 @@ func (x *FindActionReply) ProtoReflect() protoreflect.Message { // Deprecated: Use FindActionReply.ProtoReflect.Descriptor instead. func (*FindActionReply) Descriptor() ([]byte, []int) { - return file_auth_proto_auth_proto_rawDescGZIP(), []int{26} + return file_auth_proto_auth_proto_rawDescGZIP(), []int{23} } func (x *FindActionReply) GetPage() *params.Page { @@ -1909,7 +1768,7 @@ type UpdateActionRequest struct { func (x *UpdateActionRequest) Reset() { *x = UpdateActionRequest{} if protoimpl.UnsafeEnabled { - mi := &file_auth_proto_auth_proto_msgTypes[27] + mi := &file_auth_proto_auth_proto_msgTypes[24] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1922,7 +1781,7 @@ func (x *UpdateActionRequest) String() string { func (*UpdateActionRequest) ProtoMessage() {} func (x *UpdateActionRequest) ProtoReflect() protoreflect.Message { - mi := &file_auth_proto_auth_proto_msgTypes[27] + mi := &file_auth_proto_auth_proto_msgTypes[24] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1935,7 +1794,7 @@ func (x *UpdateActionRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use UpdateActionRequest.ProtoReflect.Descriptor instead. func (*UpdateActionRequest) Descriptor() ([]byte, []int) { - return file_auth_proto_auth_proto_rawDescGZIP(), []int{27} + return file_auth_proto_auth_proto_rawDescGZIP(), []int{24} } func (x *UpdateActionRequest) GetId() uint64 { @@ -1993,7 +1852,7 @@ type CreateRoleRequest struct { func (x *CreateRoleRequest) Reset() { *x = CreateRoleRequest{} if protoimpl.UnsafeEnabled { - mi := &file_auth_proto_auth_proto_msgTypes[28] + mi := &file_auth_proto_auth_proto_msgTypes[25] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2006,7 +1865,7 @@ func (x *CreateRoleRequest) String() string { func (*CreateRoleRequest) ProtoMessage() {} func (x *CreateRoleRequest) ProtoReflect() protoreflect.Message { - mi := &file_auth_proto_auth_proto_msgTypes[28] + mi := &file_auth_proto_auth_proto_msgTypes[25] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2019,7 +1878,7 @@ func (x *CreateRoleRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use CreateRoleRequest.ProtoReflect.Descriptor instead. func (*CreateRoleRequest) Descriptor() ([]byte, []int) { - return file_auth_proto_auth_proto_rawDescGZIP(), []int{28} + return file_auth_proto_auth_proto_rawDescGZIP(), []int{25} } func (x *CreateRoleRequest) GetName() string { @@ -2057,7 +1916,7 @@ type FindRoleRequest struct { func (x *FindRoleRequest) Reset() { *x = FindRoleRequest{} if protoimpl.UnsafeEnabled { - mi := &file_auth_proto_auth_proto_msgTypes[29] + mi := &file_auth_proto_auth_proto_msgTypes[26] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2070,7 +1929,7 @@ func (x *FindRoleRequest) String() string { func (*FindRoleRequest) ProtoMessage() {} func (x *FindRoleRequest) ProtoReflect() protoreflect.Message { - mi := &file_auth_proto_auth_proto_msgTypes[29] + mi := &file_auth_proto_auth_proto_msgTypes[26] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2083,7 +1942,7 @@ func (x *FindRoleRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use FindRoleRequest.ProtoReflect.Descriptor instead. func (*FindRoleRequest) Descriptor() ([]byte, []int) { - return file_auth_proto_auth_proto_rawDescGZIP(), []int{29} + return file_auth_proto_auth_proto_rawDescGZIP(), []int{26} } func (x *FindRoleRequest) GetPage() *params.Page { @@ -2126,7 +1985,7 @@ type FindRoleReply struct { func (x *FindRoleReply) Reset() { *x = FindRoleReply{} if protoimpl.UnsafeEnabled { - mi := &file_auth_proto_auth_proto_msgTypes[30] + mi := &file_auth_proto_auth_proto_msgTypes[27] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2139,7 +1998,7 @@ func (x *FindRoleReply) String() string { func (*FindRoleReply) ProtoMessage() {} func (x *FindRoleReply) ProtoReflect() protoreflect.Message { - mi := &file_auth_proto_auth_proto_msgTypes[30] + mi := &file_auth_proto_auth_proto_msgTypes[27] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2152,7 +2011,7 @@ func (x *FindRoleReply) ProtoReflect() protoreflect.Message { // Deprecated: Use FindRoleReply.ProtoReflect.Descriptor instead. func (*FindRoleReply) Descriptor() ([]byte, []int) { - return file_auth_proto_auth_proto_rawDescGZIP(), []int{30} + return file_auth_proto_auth_proto_rawDescGZIP(), []int{27} } func (x *FindRoleReply) GetPage() *params.Page { @@ -2183,7 +2042,7 @@ type UpdateRoleRequest struct { func (x *UpdateRoleRequest) Reset() { *x = UpdateRoleRequest{} if protoimpl.UnsafeEnabled { - mi := &file_auth_proto_auth_proto_msgTypes[31] + mi := &file_auth_proto_auth_proto_msgTypes[28] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2196,7 +2055,7 @@ func (x *UpdateRoleRequest) String() string { func (*UpdateRoleRequest) ProtoMessage() {} func (x *UpdateRoleRequest) ProtoReflect() protoreflect.Message { - mi := &file_auth_proto_auth_proto_msgTypes[31] + mi := &file_auth_proto_auth_proto_msgTypes[28] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2209,7 +2068,7 @@ func (x *UpdateRoleRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use UpdateRoleRequest.ProtoReflect.Descriptor instead. func (*UpdateRoleRequest) Descriptor() ([]byte, []int) { - return file_auth_proto_auth_proto_rawDescGZIP(), []int{31} + return file_auth_proto_auth_proto_rawDescGZIP(), []int{28} } func (x *UpdateRoleRequest) GetId() uint64 { @@ -2254,7 +2113,7 @@ type CreateUserGroupRequest struct { func (x *CreateUserGroupRequest) Reset() { *x = CreateUserGroupRequest{} if protoimpl.UnsafeEnabled { - mi := &file_auth_proto_auth_proto_msgTypes[32] + mi := &file_auth_proto_auth_proto_msgTypes[29] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2267,7 +2126,7 @@ func (x *CreateUserGroupRequest) String() string { func (*CreateUserGroupRequest) ProtoMessage() {} func (x *CreateUserGroupRequest) ProtoReflect() protoreflect.Message { - mi := &file_auth_proto_auth_proto_msgTypes[32] + mi := &file_auth_proto_auth_proto_msgTypes[29] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2280,7 +2139,7 @@ func (x *CreateUserGroupRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use CreateUserGroupRequest.ProtoReflect.Descriptor instead. func (*CreateUserGroupRequest) Descriptor() ([]byte, []int) { - return file_auth_proto_auth_proto_rawDescGZIP(), []int{32} + return file_auth_proto_auth_proto_rawDescGZIP(), []int{29} } func (x *CreateUserGroupRequest) GetUsers() []uint64 { @@ -2325,7 +2184,7 @@ type FindUserGroupRequest struct { func (x *FindUserGroupRequest) Reset() { *x = FindUserGroupRequest{} if protoimpl.UnsafeEnabled { - mi := &file_auth_proto_auth_proto_msgTypes[33] + mi := &file_auth_proto_auth_proto_msgTypes[30] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2338,7 +2197,7 @@ func (x *FindUserGroupRequest) String() string { func (*FindUserGroupRequest) ProtoMessage() {} func (x *FindUserGroupRequest) ProtoReflect() protoreflect.Message { - mi := &file_auth_proto_auth_proto_msgTypes[33] + mi := &file_auth_proto_auth_proto_msgTypes[30] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2351,7 +2210,7 @@ func (x *FindUserGroupRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use FindUserGroupRequest.ProtoReflect.Descriptor instead. func (*FindUserGroupRequest) Descriptor() ([]byte, []int) { - return file_auth_proto_auth_proto_rawDescGZIP(), []int{33} + return file_auth_proto_auth_proto_rawDescGZIP(), []int{30} } func (x *FindUserGroupRequest) GetPage() *params.Page { @@ -2394,7 +2253,7 @@ type FindUserGroupReply struct { func (x *FindUserGroupReply) Reset() { *x = FindUserGroupReply{} if protoimpl.UnsafeEnabled { - mi := &file_auth_proto_auth_proto_msgTypes[34] + mi := &file_auth_proto_auth_proto_msgTypes[31] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2407,7 +2266,7 @@ func (x *FindUserGroupReply) String() string { func (*FindUserGroupReply) ProtoMessage() {} func (x *FindUserGroupReply) ProtoReflect() protoreflect.Message { - mi := &file_auth_proto_auth_proto_msgTypes[34] + mi := &file_auth_proto_auth_proto_msgTypes[31] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2420,7 +2279,7 @@ func (x *FindUserGroupReply) ProtoReflect() protoreflect.Message { // Deprecated: Use FindUserGroupReply.ProtoReflect.Descriptor instead. func (*FindUserGroupReply) Descriptor() ([]byte, []int) { - return file_auth_proto_auth_proto_rawDescGZIP(), []int{34} + return file_auth_proto_auth_proto_rawDescGZIP(), []int{31} } func (x *FindUserGroupReply) GetPage() *params.Page { @@ -2452,7 +2311,7 @@ type UpdateUserGroupRequest struct { func (x *UpdateUserGroupRequest) Reset() { *x = UpdateUserGroupRequest{} if protoimpl.UnsafeEnabled { - mi := &file_auth_proto_auth_proto_msgTypes[35] + mi := &file_auth_proto_auth_proto_msgTypes[32] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2465,7 +2324,7 @@ func (x *UpdateUserGroupRequest) String() string { func (*UpdateUserGroupRequest) ProtoMessage() {} func (x *UpdateUserGroupRequest) ProtoReflect() protoreflect.Message { - mi := &file_auth_proto_auth_proto_msgTypes[35] + mi := &file_auth_proto_auth_proto_msgTypes[32] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2478,7 +2337,7 @@ func (x *UpdateUserGroupRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use UpdateUserGroupRequest.ProtoReflect.Descriptor instead. func (*UpdateUserGroupRequest) Descriptor() ([]byte, []int) { - return file_auth_proto_auth_proto_rawDescGZIP(), []int{35} + return file_auth_proto_auth_proto_rawDescGZIP(), []int{32} } func (x *UpdateUserGroupRequest) GetId() uint64 { @@ -2528,7 +2387,7 @@ type CreateWhitelistRequest struct { func (x *CreateWhitelistRequest) Reset() { *x = CreateWhitelistRequest{} if protoimpl.UnsafeEnabled { - mi := &file_auth_proto_auth_proto_msgTypes[36] + mi := &file_auth_proto_auth_proto_msgTypes[33] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2541,7 +2400,7 @@ func (x *CreateWhitelistRequest) String() string { func (*CreateWhitelistRequest) ProtoMessage() {} func (x *CreateWhitelistRequest) ProtoReflect() protoreflect.Message { - mi := &file_auth_proto_auth_proto_msgTypes[36] + mi := &file_auth_proto_auth_proto_msgTypes[33] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2554,7 +2413,7 @@ func (x *CreateWhitelistRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use CreateWhitelistRequest.ProtoReflect.Descriptor instead. func (*CreateWhitelistRequest) Descriptor() ([]byte, []int) { - return file_auth_proto_auth_proto_rawDescGZIP(), []int{36} + return file_auth_proto_auth_proto_rawDescGZIP(), []int{33} } func (x *CreateWhitelistRequest) GetCategory() uint32 { @@ -2571,108 +2430,6 @@ func (x *CreateWhitelistRequest) GetResource() string { return "" } -type HasWhitelistRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Category uint32 `protobuf:"varint,1,opt,name=category,proto3" json:"category,omitempty"` - Permission *HasWhitelistRequest_CheckPermission `protobuf:"bytes,2,opt,name=permission,proto3" json:"permission,omitempty"` -} - -func (x *HasWhitelistRequest) Reset() { - *x = HasWhitelistRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_auth_proto_auth_proto_msgTypes[37] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *HasWhitelistRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*HasWhitelistRequest) ProtoMessage() {} - -func (x *HasWhitelistRequest) ProtoReflect() protoreflect.Message { - mi := &file_auth_proto_auth_proto_msgTypes[37] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use HasWhitelistRequest.ProtoReflect.Descriptor instead. -func (*HasWhitelistRequest) Descriptor() ([]byte, []int) { - return file_auth_proto_auth_proto_rawDescGZIP(), []int{37} -} - -func (x *HasWhitelistRequest) GetCategory() uint32 { - if x != nil { - return x.Category - } - return 0 -} - -func (x *HasWhitelistRequest) GetPermission() *HasWhitelistRequest_CheckPermission { - if x != nil { - return x.Permission - } - return nil -} - -type HasWhitelistReply struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Ok bool `protobuf:"varint,1,opt,name=ok,proto3" json:"ok,omitempty"` -} - -func (x *HasWhitelistReply) Reset() { - *x = HasWhitelistReply{} - if protoimpl.UnsafeEnabled { - mi := &file_auth_proto_auth_proto_msgTypes[38] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *HasWhitelistReply) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*HasWhitelistReply) ProtoMessage() {} - -func (x *HasWhitelistReply) ProtoReflect() protoreflect.Message { - mi := &file_auth_proto_auth_proto_msgTypes[38] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use HasWhitelistReply.ProtoReflect.Descriptor instead. -func (*HasWhitelistReply) Descriptor() ([]byte, []int) { - return file_auth_proto_auth_proto_rawDescGZIP(), []int{38} -} - -func (x *HasWhitelistReply) GetOk() bool { - if x != nil { - return x.Ok - } - return false -} - type FindWhitelistRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -2686,7 +2443,7 @@ type FindWhitelistRequest struct { func (x *FindWhitelistRequest) Reset() { *x = FindWhitelistRequest{} if protoimpl.UnsafeEnabled { - mi := &file_auth_proto_auth_proto_msgTypes[39] + mi := &file_auth_proto_auth_proto_msgTypes[34] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2699,7 +2456,7 @@ func (x *FindWhitelistRequest) String() string { func (*FindWhitelistRequest) ProtoMessage() {} func (x *FindWhitelistRequest) ProtoReflect() protoreflect.Message { - mi := &file_auth_proto_auth_proto_msgTypes[39] + mi := &file_auth_proto_auth_proto_msgTypes[34] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2712,7 +2469,7 @@ func (x *FindWhitelistRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use FindWhitelistRequest.ProtoReflect.Descriptor instead. func (*FindWhitelistRequest) Descriptor() ([]byte, []int) { - return file_auth_proto_auth_proto_rawDescGZIP(), []int{39} + return file_auth_proto_auth_proto_rawDescGZIP(), []int{34} } func (x *FindWhitelistRequest) GetPage() *params.Page { @@ -2748,7 +2505,7 @@ type FindWhitelistReply struct { func (x *FindWhitelistReply) Reset() { *x = FindWhitelistReply{} if protoimpl.UnsafeEnabled { - mi := &file_auth_proto_auth_proto_msgTypes[40] + mi := &file_auth_proto_auth_proto_msgTypes[35] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2761,7 +2518,7 @@ func (x *FindWhitelistReply) String() string { func (*FindWhitelistReply) ProtoMessage() {} func (x *FindWhitelistReply) ProtoReflect() protoreflect.Message { - mi := &file_auth_proto_auth_proto_msgTypes[40] + mi := &file_auth_proto_auth_proto_msgTypes[35] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2774,7 +2531,7 @@ func (x *FindWhitelistReply) ProtoReflect() protoreflect.Message { // Deprecated: Use FindWhitelistReply.ProtoReflect.Descriptor instead. func (*FindWhitelistReply) Descriptor() ([]byte, []int) { - return file_auth_proto_auth_proto_rawDescGZIP(), []int{40} + return file_auth_proto_auth_proto_rawDescGZIP(), []int{35} } func (x *FindWhitelistReply) GetPage() *params.Page { @@ -2804,7 +2561,7 @@ type UpdateWhitelistRequest struct { func (x *UpdateWhitelistRequest) Reset() { *x = UpdateWhitelistRequest{} if protoimpl.UnsafeEnabled { - mi := &file_auth_proto_auth_proto_msgTypes[41] + mi := &file_auth_proto_auth_proto_msgTypes[36] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2817,7 +2574,7 @@ func (x *UpdateWhitelistRequest) String() string { func (*UpdateWhitelistRequest) ProtoMessage() {} func (x *UpdateWhitelistRequest) ProtoReflect() protoreflect.Message { - mi := &file_auth_proto_auth_proto_msgTypes[41] + mi := &file_auth_proto_auth_proto_msgTypes[36] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2830,7 +2587,7 @@ func (x *UpdateWhitelistRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use UpdateWhitelistRequest.ProtoReflect.Descriptor instead. func (*UpdateWhitelistRequest) Descriptor() ([]byte, []int) { - return file_auth_proto_auth_proto_rawDescGZIP(), []int{41} + return file_auth_proto_auth_proto_rawDescGZIP(), []int{36} } func (x *UpdateWhitelistRequest) GetId() uint64 { @@ -2854,69 +2611,6 @@ func (x *UpdateWhitelistRequest) GetResource() string { return "" } -type HasWhitelistRequest_CheckPermission struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Resource string `protobuf:"bytes,1,opt,name=resource,proto3" json:"resource,omitempty"` - Method string `protobuf:"bytes,2,opt,name=method,proto3" json:"method,omitempty"` - Uri string `protobuf:"bytes,3,opt,name=uri,proto3" json:"uri,omitempty"` -} - -func (x *HasWhitelistRequest_CheckPermission) Reset() { - *x = HasWhitelistRequest_CheckPermission{} - if protoimpl.UnsafeEnabled { - mi := &file_auth_proto_auth_proto_msgTypes[42] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *HasWhitelistRequest_CheckPermission) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*HasWhitelistRequest_CheckPermission) ProtoMessage() {} - -func (x *HasWhitelistRequest_CheckPermission) ProtoReflect() protoreflect.Message { - mi := &file_auth_proto_auth_proto_msgTypes[42] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use HasWhitelistRequest_CheckPermission.ProtoReflect.Descriptor instead. -func (*HasWhitelistRequest_CheckPermission) Descriptor() ([]byte, []int) { - return file_auth_proto_auth_proto_rawDescGZIP(), []int{37, 0} -} - -func (x *HasWhitelistRequest_CheckPermission) GetResource() string { - if x != nil { - return x.Resource - } - return "" -} - -func (x *HasWhitelistRequest_CheckPermission) GetMethod() string { - if x != nil { - return x.Method - } - return "" -} - -func (x *HasWhitelistRequest_CheckPermission) GetUri() string { - if x != nil { - return x.Uri - } - return "" -} - var File_auth_proto_auth_proto protoreflect.FileDescriptor var file_auth_proto_auth_proto_rawDesc = []byte{ @@ -3027,51 +2721,41 @@ var file_auth_proto_auth_proto_rawDesc = []byte{ 0x12, 0x14, 0x0a, 0x05, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x12, 0x18, 0x0a, 0x07, 0x65, 0x78, 0x70, 0x69, 0x72, 0x65, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x65, 0x78, 0x70, 0x69, 0x72, 0x65, 0x73, - 0x22, 0x36, 0x0a, 0x0d, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x12, 0x25, 0x0a, 0x08, 0x75, 0x73, 0x65, 0x72, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x09, 0x42, 0x09, 0xfa, 0x42, 0x06, 0x72, 0x04, 0x10, 0x05, 0x18, 0x32, 0x52, 0x08, - 0x75, 0x73, 0x65, 0x72, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0x72, 0x0a, 0x0b, 0x53, 0x74, 0x61, 0x74, - 0x75, 0x73, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x12, 0x2a, 0x0a, 0x07, 0x63, 0x61, 0x70, 0x74, 0x63, - 0x68, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x2e, - 0x76, 0x31, 0x2e, 0x43, 0x61, 0x70, 0x74, 0x63, 0x68, 0x61, 0x52, 0x07, 0x63, 0x61, 0x70, 0x74, - 0x63, 0x68, 0x61, 0x12, 0x16, 0x0a, 0x06, 0x6c, 0x6f, 0x63, 0x6b, 0x65, 0x64, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x08, 0x52, 0x06, 0x6c, 0x6f, 0x63, 0x6b, 0x65, 0x64, 0x12, 0x1f, 0x0a, 0x0b, 0x6c, - 0x6f, 0x63, 0x6b, 0x5f, 0x65, 0x78, 0x70, 0x69, 0x72, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, - 0x52, 0x0a, 0x6c, 0x6f, 0x63, 0x6b, 0x45, 0x78, 0x70, 0x69, 0x72, 0x65, 0x22, 0x3a, 0x0a, 0x0c, - 0x43, 0x61, 0x70, 0x74, 0x63, 0x68, 0x61, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x12, 0x2a, 0x0a, 0x07, + 0x22, 0x2b, 0x0a, 0x0d, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x75, 0x73, 0x65, 0x72, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x08, 0x75, 0x73, 0x65, 0x72, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0x72, 0x0a, + 0x0b, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x12, 0x2a, 0x0a, 0x07, 0x63, 0x61, 0x70, 0x74, 0x63, 0x68, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x61, 0x70, 0x74, 0x63, 0x68, 0x61, 0x52, - 0x07, 0x63, 0x61, 0x70, 0x74, 0x63, 0x68, 0x61, 0x22, 0x26, 0x0a, 0x0e, 0x52, 0x65, 0x66, 0x72, - 0x65, 0x73, 0x68, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x74, 0x6f, - 0x6b, 0x65, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x74, 0x6f, 0x6b, 0x65, 0x6e, - 0x22, 0x9c, 0x01, 0x0a, 0x09, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x12, 0x0e, - 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x02, 0x69, 0x64, 0x12, 0x1a, - 0x0a, 0x08, 0x75, 0x73, 0x65, 0x72, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x08, 0x75, 0x73, 0x65, 0x72, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x63, 0x6f, - 0x64, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x12, 0x1a, - 0x0a, 0x08, 0x70, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x08, 0x70, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x12, 0x33, 0x0a, 0x0a, 0x70, 0x65, - 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x13, - 0x2e, 0x61, 0x75, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, - 0x69, 0x6f, 0x6e, 0x52, 0x0a, 0x70, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x22, - 0x2e, 0x0a, 0x16, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x49, 0x64, 0x65, 0x6d, 0x70, 0x6f, 0x74, 0x65, - 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x74, 0x6f, 0x6b, - 0x65, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x22, - 0x27, 0x0a, 0x0f, 0x49, 0x64, 0x65, 0x6d, 0x70, 0x6f, 0x74, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x70, - 0x6c, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x05, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x22, 0x54, 0x0a, 0x0a, 0x50, 0x65, 0x72, 0x6d, - 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x1c, 0x0a, 0x09, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, - 0x63, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x09, 0x72, 0x65, 0x73, 0x6f, 0x75, - 0x72, 0x63, 0x65, 0x73, 0x12, 0x14, 0x0a, 0x05, 0x6d, 0x65, 0x6e, 0x75, 0x73, 0x18, 0x02, 0x20, - 0x03, 0x28, 0x09, 0x52, 0x05, 0x6d, 0x65, 0x6e, 0x75, 0x73, 0x12, 0x12, 0x0a, 0x04, 0x62, 0x74, - 0x6e, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x09, 0x52, 0x04, 0x62, 0x74, 0x6e, 0x73, 0x22, 0x2a, - 0x0a, 0x14, 0x47, 0x65, 0x74, 0x55, 0x73, 0x65, 0x72, 0x42, 0x79, 0x43, 0x6f, 0x64, 0x65, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x22, 0x37, 0x0a, 0x12, 0x47, 0x65, - 0x74, 0x55, 0x73, 0x65, 0x72, 0x42, 0x79, 0x43, 0x6f, 0x64, 0x65, 0x52, 0x65, 0x70, 0x6c, 0x79, - 0x12, 0x21, 0x0a, 0x04, 0x75, 0x73, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0d, - 0x2e, 0x61, 0x75, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x52, 0x04, 0x75, - 0x73, 0x65, 0x72, 0x22, 0xdd, 0x03, 0x0a, 0x0f, 0x46, 0x69, 0x6e, 0x64, 0x55, 0x73, 0x65, 0x72, + 0x07, 0x63, 0x61, 0x70, 0x74, 0x63, 0x68, 0x61, 0x12, 0x16, 0x0a, 0x06, 0x6c, 0x6f, 0x63, 0x6b, + 0x65, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x06, 0x6c, 0x6f, 0x63, 0x6b, 0x65, 0x64, + 0x12, 0x1f, 0x0a, 0x0b, 0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x65, 0x78, 0x70, 0x69, 0x72, 0x65, 0x18, + 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0a, 0x6c, 0x6f, 0x63, 0x6b, 0x45, 0x78, 0x70, 0x69, 0x72, + 0x65, 0x22, 0x3a, 0x0a, 0x0c, 0x43, 0x61, 0x70, 0x74, 0x63, 0x68, 0x61, 0x52, 0x65, 0x70, 0x6c, + 0x79, 0x12, 0x2a, 0x0a, 0x07, 0x63, 0x61, 0x70, 0x74, 0x63, 0x68, 0x61, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x61, 0x70, + 0x74, 0x63, 0x68, 0x61, 0x52, 0x07, 0x63, 0x61, 0x70, 0x74, 0x63, 0x68, 0x61, 0x22, 0x26, 0x0a, + 0x0e, 0x52, 0x65, 0x66, 0x72, 0x65, 0x73, 0x68, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, + 0x14, 0x0a, 0x05, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, + 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x22, 0x9c, 0x01, 0x0a, 0x09, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, + 0x70, 0x6c, 0x79, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, + 0x02, 0x69, 0x64, 0x12, 0x1a, 0x0a, 0x08, 0x75, 0x73, 0x65, 0x72, 0x6e, 0x61, 0x6d, 0x65, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x75, 0x73, 0x65, 0x72, 0x6e, 0x61, 0x6d, 0x65, 0x12, + 0x12, 0x0a, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x63, + 0x6f, 0x64, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x70, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x18, + 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x70, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x12, + 0x33, 0x0a, 0x0a, 0x70, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x05, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x65, + 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x0a, 0x70, 0x65, 0x72, 0x6d, 0x69, 0x73, + 0x73, 0x69, 0x6f, 0x6e, 0x22, 0x27, 0x0a, 0x0f, 0x49, 0x64, 0x65, 0x6d, 0x70, 0x6f, 0x74, 0x65, + 0x6e, 0x74, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x74, 0x6f, 0x6b, 0x65, 0x6e, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x22, 0x54, 0x0a, + 0x0a, 0x50, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x1c, 0x0a, 0x09, 0x72, + 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x09, + 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x12, 0x14, 0x0a, 0x05, 0x6d, 0x65, 0x6e, + 0x75, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x05, 0x6d, 0x65, 0x6e, 0x75, 0x73, 0x12, + 0x12, 0x0a, 0x04, 0x62, 0x74, 0x6e, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x09, 0x52, 0x04, 0x62, + 0x74, 0x6e, 0x73, 0x22, 0xdd, 0x03, 0x0a, 0x0f, 0x46, 0x69, 0x6e, 0x64, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x20, 0x0a, 0x04, 0x70, 0x61, 0x67, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0c, 0x2e, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x2e, 0x50, 0x61, 0x67, 0x65, 0x52, 0x04, 0x70, 0x61, 0x67, 0x65, 0x12, 0x2d, 0x0a, 0x10, 0x73, 0x74, 0x61, @@ -3253,23 +2937,7 @@ var file_auth_proto_auth_proto_rawDesc = []byte{ 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x63, 0x61, 0x74, 0x65, 0x67, 0x6f, 0x72, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x08, 0x63, 0x61, 0x74, 0x65, 0x67, 0x6f, 0x72, 0x79, 0x12, 0x1a, 0x0a, 0x08, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x22, 0xd8, - 0x01, 0x0a, 0x13, 0x48, 0x61, 0x73, 0x57, 0x68, 0x69, 0x74, 0x65, 0x6c, 0x69, 0x73, 0x74, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x63, 0x61, 0x74, 0x65, 0x67, 0x6f, - 0x72, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x08, 0x63, 0x61, 0x74, 0x65, 0x67, 0x6f, - 0x72, 0x79, 0x12, 0x4c, 0x0a, 0x0a, 0x70, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2c, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x2e, 0x76, 0x31, - 0x2e, 0x48, 0x61, 0x73, 0x57, 0x68, 0x69, 0x74, 0x65, 0x6c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x2e, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x50, 0x65, 0x72, 0x6d, 0x69, 0x73, - 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x0a, 0x70, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, - 0x1a, 0x57, 0x0a, 0x0f, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x50, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, - 0x69, 0x6f, 0x6e, 0x12, 0x1a, 0x0a, 0x08, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, - 0x16, 0x0a, 0x06, 0x6d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x06, 0x6d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x72, 0x69, 0x18, 0x03, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x72, 0x69, 0x22, 0x23, 0x0a, 0x11, 0x48, 0x61, 0x73, - 0x57, 0x68, 0x69, 0x74, 0x65, 0x6c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x12, 0x0e, - 0x0a, 0x02, 0x6f, 0x6b, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x02, 0x6f, 0x6b, 0x22, 0x94, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x22, 0x94, 0x01, 0x0a, 0x14, 0x46, 0x69, 0x6e, 0x64, 0x57, 0x68, 0x69, 0x74, 0x65, 0x6c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x20, 0x0a, 0x04, 0x70, 0x61, 0x67, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0c, 0x2e, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x2e, 0x50, @@ -3293,188 +2961,178 @@ var file_auth_proto_auth_proto_rawDesc = []byte{ 0x01, 0x12, 0x1f, 0x0a, 0x08, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x48, 0x01, 0x52, 0x08, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x88, 0x01, 0x01, 0x42, 0x0b, 0x0a, 0x09, 0x5f, 0x63, 0x61, 0x74, 0x65, 0x67, 0x6f, 0x72, 0x79, 0x42, - 0x0b, 0x0a, 0x09, 0x5f, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x32, 0x8f, 0x16, 0x0a, + 0x0b, 0x0a, 0x09, 0x5f, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x32, 0xfd, 0x14, 0x0a, 0x04, 0x41, 0x75, 0x74, 0x68, 0x12, 0x56, 0x0a, 0x08, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x12, 0x18, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x18, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x12, 0x3a, 0x01, 0x2a, 0x22, 0x0d, - 0x2f, 0x70, 0x75, 0x62, 0x2f, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x12, 0x43, 0x0a, + 0x2f, 0x70, 0x75, 0x62, 0x2f, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x12, 0x4a, 0x0a, 0x03, 0x50, 0x77, 0x64, 0x12, 0x13, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x77, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, - 0x79, 0x22, 0x0f, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x09, 0x3a, 0x01, 0x2a, 0x22, 0x04, 0x2f, 0x70, - 0x77, 0x64, 0x12, 0x4a, 0x0a, 0x05, 0x4c, 0x6f, 0x67, 0x69, 0x6e, 0x12, 0x15, 0x2e, 0x61, 0x75, - 0x74, 0x68, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x6f, 0x67, 0x69, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x1a, 0x13, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x6f, 0x67, - 0x69, 0x6e, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x22, 0x15, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x0f, 0x3a, - 0x01, 0x2a, 0x22, 0x0a, 0x2f, 0x70, 0x75, 0x62, 0x2f, 0x6c, 0x6f, 0x67, 0x69, 0x6e, 0x12, 0x4b, - 0x0a, 0x06, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x16, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x2e, - 0x76, 0x31, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x1a, 0x14, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x75, - 0x73, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x22, 0x13, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x0d, 0x12, 0x0b, - 0x2f, 0x70, 0x75, 0x62, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x4e, 0x0a, 0x07, 0x43, - 0x61, 0x70, 0x74, 0x63, 0x68, 0x61, 0x12, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x1a, 0x15, - 0x2e, 0x61, 0x75, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x61, 0x70, 0x74, 0x63, 0x68, 0x61, - 0x52, 0x65, 0x70, 0x6c, 0x79, 0x22, 0x14, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x0e, 0x12, 0x0c, 0x2f, - 0x70, 0x75, 0x62, 0x2f, 0x63, 0x61, 0x70, 0x74, 0x63, 0x68, 0x61, 0x12, 0x4c, 0x0a, 0x07, 0x52, - 0x65, 0x66, 0x72, 0x65, 0x73, 0x68, 0x12, 0x17, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x2e, 0x76, 0x31, - 0x2e, 0x52, 0x65, 0x66, 0x72, 0x65, 0x73, 0x68, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, - 0x13, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x6f, 0x67, 0x69, 0x6e, 0x52, - 0x65, 0x70, 0x6c, 0x79, 0x22, 0x13, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x0d, 0x3a, 0x01, 0x2a, 0x22, - 0x08, 0x2f, 0x72, 0x65, 0x66, 0x72, 0x65, 0x73, 0x68, 0x12, 0x4c, 0x0a, 0x06, 0x4c, 0x6f, 0x67, - 0x6f, 0x75, 0x74, 0x12, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x1a, 0x16, 0x2e, 0x67, 0x6f, - 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, - 0x70, 0x74, 0x79, 0x22, 0x12, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x0c, 0x3a, 0x01, 0x2a, 0x22, 0x07, - 0x2f, 0x6c, 0x6f, 0x67, 0x6f, 0x75, 0x74, 0x12, 0x41, 0x0a, 0x04, 0x49, 0x6e, 0x66, 0x6f, 0x12, + 0x79, 0x22, 0x16, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x10, 0x3a, 0x01, 0x2a, 0x32, 0x0b, 0x2f, 0x70, + 0x77, 0x64, 0x2f, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x12, 0x4a, 0x0a, 0x05, 0x4c, 0x6f, 0x67, + 0x69, 0x6e, 0x12, 0x15, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x6f, 0x67, + 0x69, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x13, 0x2e, 0x61, 0x75, 0x74, 0x68, + 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x6f, 0x67, 0x69, 0x6e, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x22, 0x15, + 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x0f, 0x3a, 0x01, 0x2a, 0x22, 0x0a, 0x2f, 0x70, 0x75, 0x62, 0x2f, + 0x6c, 0x6f, 0x67, 0x69, 0x6e, 0x12, 0x4b, 0x0a, 0x06, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, + 0x16, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x14, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x2e, 0x76, + 0x31, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x22, 0x13, 0x82, + 0xd3, 0xe4, 0x93, 0x02, 0x0d, 0x12, 0x0b, 0x2f, 0x70, 0x75, 0x62, 0x2f, 0x73, 0x74, 0x61, 0x74, + 0x75, 0x73, 0x12, 0x4e, 0x0a, 0x07, 0x43, 0x61, 0x70, 0x74, 0x63, 0x68, 0x61, 0x12, 0x16, 0x2e, + 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, + 0x45, 0x6d, 0x70, 0x74, 0x79, 0x1a, 0x15, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x2e, + 0x43, 0x61, 0x70, 0x74, 0x63, 0x68, 0x61, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x22, 0x14, 0x82, 0xd3, + 0xe4, 0x93, 0x02, 0x0e, 0x12, 0x0c, 0x2f, 0x70, 0x75, 0x62, 0x2f, 0x63, 0x61, 0x70, 0x74, 0x63, + 0x68, 0x61, 0x12, 0x4c, 0x0a, 0x07, 0x52, 0x65, 0x66, 0x72, 0x65, 0x73, 0x68, 0x12, 0x17, 0x2e, + 0x61, 0x75, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x66, 0x72, 0x65, 0x73, 0x68, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x13, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x2e, 0x76, 0x31, + 0x2e, 0x4c, 0x6f, 0x67, 0x69, 0x6e, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x22, 0x13, 0x82, 0xd3, 0xe4, + 0x93, 0x02, 0x0d, 0x3a, 0x01, 0x2a, 0x22, 0x08, 0x2f, 0x72, 0x65, 0x66, 0x72, 0x65, 0x73, 0x68, + 0x12, 0x4c, 0x0a, 0x06, 0x4c, 0x6f, 0x67, 0x6f, 0x75, 0x74, 0x12, 0x16, 0x2e, 0x67, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, + 0x74, 0x79, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x12, 0x82, 0xd3, 0xe4, 0x93, + 0x02, 0x0c, 0x3a, 0x01, 0x2a, 0x22, 0x07, 0x2f, 0x6c, 0x6f, 0x67, 0x6f, 0x75, 0x74, 0x12, 0x41, + 0x0a, 0x04, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x1a, 0x12, + 0x2e, 0x61, 0x75, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x2e, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x70, + 0x6c, 0x79, 0x22, 0x0d, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x07, 0x12, 0x05, 0x2f, 0x69, 0x6e, 0x66, + 0x6f, 0x12, 0x53, 0x0a, 0x0a, 0x49, 0x64, 0x65, 0x6d, 0x70, 0x6f, 0x74, 0x65, 0x6e, 0x74, 0x12, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, - 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x1a, 0x12, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x2e, 0x76, - 0x31, 0x2e, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x22, 0x0d, 0x82, 0xd3, 0xe4, - 0x93, 0x02, 0x07, 0x12, 0x05, 0x2f, 0x69, 0x6e, 0x66, 0x6f, 0x12, 0x53, 0x0a, 0x0a, 0x49, 0x64, - 0x65, 0x6d, 0x70, 0x6f, 0x74, 0x65, 0x6e, 0x74, 0x12, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x1a, 0x18, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x2e, 0x76, + 0x31, 0x2e, 0x49, 0x64, 0x65, 0x6d, 0x70, 0x6f, 0x74, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x70, 0x6c, + 0x79, 0x22, 0x13, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x0d, 0x12, 0x0b, 0x2f, 0x69, 0x64, 0x65, 0x6d, + 0x70, 0x6f, 0x74, 0x65, 0x6e, 0x74, 0x12, 0x50, 0x0a, 0x08, 0x46, 0x69, 0x6e, 0x64, 0x55, 0x73, + 0x65, 0x72, 0x12, 0x18, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x2e, 0x46, 0x69, 0x6e, + 0x64, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x61, + 0x75, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x2e, 0x46, 0x69, 0x6e, 0x64, 0x55, 0x73, 0x65, 0x72, 0x52, + 0x65, 0x70, 0x6c, 0x79, 0x22, 0x12, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x0c, 0x12, 0x0a, 0x2f, 0x75, + 0x73, 0x65, 0x72, 0x2f, 0x6c, 0x69, 0x73, 0x74, 0x12, 0x6c, 0x0a, 0x0a, 0x55, 0x70, 0x64, 0x61, + 0x74, 0x65, 0x55, 0x73, 0x65, 0x72, 0x12, 0x1a, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x2e, 0x76, 0x31, + 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x2a, 0x82, 0xd3, 0xe4, 0x93, + 0x02, 0x24, 0x3a, 0x01, 0x2a, 0x5a, 0x11, 0x3a, 0x01, 0x2a, 0x32, 0x0c, 0x2f, 0x75, 0x73, 0x65, + 0x72, 0x2f, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x1a, 0x0c, 0x2f, 0x75, 0x73, 0x65, 0x72, 0x2f, + 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x12, 0x4e, 0x0a, 0x0a, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, + 0x55, 0x73, 0x65, 0x72, 0x12, 0x12, 0x2e, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x2e, 0x49, 0x64, + 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, - 0x1a, 0x18, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x2e, 0x49, 0x64, 0x65, 0x6d, 0x70, - 0x6f, 0x74, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x22, 0x13, 0x82, 0xd3, 0xe4, 0x93, - 0x02, 0x0d, 0x12, 0x0b, 0x2f, 0x69, 0x64, 0x65, 0x6d, 0x70, 0x6f, 0x74, 0x65, 0x6e, 0x74, 0x12, - 0x4c, 0x0a, 0x0f, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x49, 0x64, 0x65, 0x6d, 0x70, 0x6f, 0x74, 0x65, - 0x6e, 0x74, 0x12, 0x1f, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x68, 0x65, - 0x63, 0x6b, 0x49, 0x64, 0x65, 0x6d, 0x70, 0x6f, 0x74, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x00, 0x12, 0x4d, 0x0a, - 0x0d, 0x47, 0x65, 0x74, 0x55, 0x73, 0x65, 0x72, 0x42, 0x79, 0x43, 0x6f, 0x64, 0x65, 0x12, 0x1d, - 0x2e, 0x61, 0x75, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x55, 0x73, 0x65, 0x72, - 0x42, 0x79, 0x43, 0x6f, 0x64, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1b, 0x2e, - 0x61, 0x75, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x55, 0x73, 0x65, 0x72, 0x42, - 0x79, 0x43, 0x6f, 0x64, 0x65, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x22, 0x00, 0x12, 0x4b, 0x0a, 0x08, - 0x46, 0x69, 0x6e, 0x64, 0x55, 0x73, 0x65, 0x72, 0x12, 0x18, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x2e, - 0x76, 0x31, 0x2e, 0x46, 0x69, 0x6e, 0x64, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x2e, 0x46, 0x69, 0x6e, - 0x64, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x22, 0x0d, 0x82, 0xd3, 0xe4, 0x93, - 0x02, 0x07, 0x12, 0x05, 0x2f, 0x75, 0x73, 0x65, 0x72, 0x12, 0x68, 0x0a, 0x0a, 0x55, 0x70, 0x64, - 0x61, 0x74, 0x65, 0x55, 0x73, 0x65, 0x72, 0x12, 0x1a, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x2e, 0x76, - 0x31, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x26, 0x82, 0xd3, 0xe4, - 0x93, 0x02, 0x20, 0x3a, 0x01, 0x2a, 0x5a, 0x0f, 0x3a, 0x01, 0x2a, 0x32, 0x0a, 0x2f, 0x75, 0x73, - 0x65, 0x72, 0x2f, 0x7b, 0x69, 0x64, 0x7d, 0x1a, 0x0a, 0x2f, 0x75, 0x73, 0x65, 0x72, 0x2f, 0x7b, - 0x69, 0x64, 0x7d, 0x12, 0x4d, 0x0a, 0x0a, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x55, 0x73, 0x65, - 0x72, 0x12, 0x12, 0x2e, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x2e, 0x49, 0x64, 0x73, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x13, 0x82, - 0xd3, 0xe4, 0x93, 0x02, 0x0d, 0x2a, 0x0b, 0x2f, 0x75, 0x73, 0x65, 0x72, 0x2f, 0x7b, 0x69, 0x64, - 0x73, 0x7d, 0x12, 0x55, 0x0a, 0x0a, 0x50, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, - 0x12, 0x1a, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x65, 0x72, 0x6d, 0x69, - 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x67, - 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, - 0x6d, 0x70, 0x74, 0x79, 0x22, 0x13, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x0d, 0x12, 0x0b, 0x2f, 0x70, - 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x58, 0x0a, 0x0c, 0x43, 0x72, 0x65, - 0x61, 0x74, 0x65, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x1c, 0x2e, 0x61, 0x75, 0x74, 0x68, - 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, - 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, - 0x12, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x0c, 0x3a, 0x01, 0x2a, 0x22, 0x07, 0x2f, 0x61, 0x63, 0x74, - 0x69, 0x6f, 0x6e, 0x12, 0x53, 0x0a, 0x0a, 0x46, 0x69, 0x6e, 0x64, 0x41, 0x63, 0x74, 0x69, 0x6f, - 0x6e, 0x12, 0x1a, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x2e, 0x46, 0x69, 0x6e, 0x64, - 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x18, 0x2e, - 0x61, 0x75, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x2e, 0x46, 0x69, 0x6e, 0x64, 0x41, 0x63, 0x74, 0x69, - 0x6f, 0x6e, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x22, 0x0f, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x09, 0x12, - 0x07, 0x2f, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x70, 0x0a, 0x0c, 0x55, 0x70, 0x64, 0x61, + 0x22, 0x14, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x0e, 0x2a, 0x0c, 0x2f, 0x75, 0x73, 0x65, 0x72, 0x2f, + 0x64, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x12, 0x55, 0x0a, 0x0a, 0x50, 0x65, 0x72, 0x6d, 0x69, 0x73, + 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x1a, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x2e, 0x50, + 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, + 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x13, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x0d, + 0x12, 0x0b, 0x2f, 0x70, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x5f, 0x0a, + 0x0c, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x1c, 0x2e, + 0x61, 0x75, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x41, 0x63, + 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x67, 0x6f, + 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, + 0x70, 0x74, 0x79, 0x22, 0x19, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x13, 0x3a, 0x01, 0x2a, 0x22, 0x0e, + 0x2f, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x12, 0x58, + 0x0a, 0x0a, 0x46, 0x69, 0x6e, 0x64, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x1a, 0x2e, 0x61, + 0x75, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x2e, 0x46, 0x69, 0x6e, 0x64, 0x41, 0x63, 0x74, 0x69, 0x6f, + 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x18, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x2e, + 0x76, 0x31, 0x2e, 0x46, 0x69, 0x6e, 0x64, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x70, + 0x6c, 0x79, 0x22, 0x14, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x0e, 0x12, 0x0c, 0x2f, 0x61, 0x63, 0x74, + 0x69, 0x6f, 0x6e, 0x2f, 0x6c, 0x69, 0x73, 0x74, 0x12, 0x74, 0x0a, 0x0c, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x1c, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x2a, - 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x24, 0x3a, 0x01, 0x2a, 0x5a, 0x11, 0x3a, 0x01, 0x2a, 0x32, 0x0c, - 0x2f, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x7b, 0x69, 0x64, 0x7d, 0x1a, 0x0c, 0x2f, 0x61, - 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x7b, 0x69, 0x64, 0x7d, 0x12, 0x51, 0x0a, 0x0c, 0x44, 0x65, - 0x6c, 0x65, 0x74, 0x65, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x12, 0x2e, 0x70, 0x61, 0x72, - 0x61, 0x6d, 0x73, 0x2e, 0x49, 0x64, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, - 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, - 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x15, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x0f, 0x2a, 0x0d, - 0x2f, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x7b, 0x69, 0x64, 0x73, 0x7d, 0x12, 0x52, 0x0a, - 0x0a, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x52, 0x6f, 0x6c, 0x65, 0x12, 0x1a, 0x2e, 0x61, 0x75, - 0x74, 0x68, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x52, 0x6f, 0x6c, 0x65, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, - 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, - 0x10, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x0a, 0x3a, 0x01, 0x2a, 0x22, 0x05, 0x2f, 0x72, 0x6f, 0x6c, - 0x65, 0x12, 0x4b, 0x0a, 0x08, 0x46, 0x69, 0x6e, 0x64, 0x52, 0x6f, 0x6c, 0x65, 0x12, 0x18, 0x2e, - 0x61, 0x75, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x2e, 0x46, 0x69, 0x6e, 0x64, 0x52, 0x6f, 0x6c, 0x65, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x2e, 0x76, - 0x31, 0x2e, 0x46, 0x69, 0x6e, 0x64, 0x52, 0x6f, 0x6c, 0x65, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x22, - 0x0d, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x07, 0x12, 0x05, 0x2f, 0x72, 0x6f, 0x6c, 0x65, 0x12, 0x68, - 0x0a, 0x0a, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x52, 0x6f, 0x6c, 0x65, 0x12, 0x1a, 0x2e, 0x61, - 0x75, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x52, 0x6f, 0x6c, - 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, - 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, - 0x22, 0x26, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x20, 0x3a, 0x01, 0x2a, 0x5a, 0x0f, 0x3a, 0x01, 0x2a, - 0x32, 0x0a, 0x2f, 0x72, 0x6f, 0x6c, 0x65, 0x2f, 0x7b, 0x69, 0x64, 0x7d, 0x1a, 0x0a, 0x2f, 0x72, - 0x6f, 0x6c, 0x65, 0x2f, 0x7b, 0x69, 0x64, 0x7d, 0x12, 0x4d, 0x0a, 0x0a, 0x44, 0x65, 0x6c, 0x65, - 0x74, 0x65, 0x52, 0x6f, 0x6c, 0x65, 0x12, 0x12, 0x2e, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x2e, - 0x49, 0x64, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, - 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, - 0x74, 0x79, 0x22, 0x13, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x0d, 0x2a, 0x0b, 0x2f, 0x72, 0x6f, 0x6c, - 0x65, 0x2f, 0x7b, 0x69, 0x64, 0x73, 0x7d, 0x12, 0x62, 0x0a, 0x0f, 0x43, 0x72, 0x65, 0x61, 0x74, - 0x65, 0x55, 0x73, 0x65, 0x72, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x12, 0x1f, 0x2e, 0x61, 0x75, 0x74, - 0x68, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x55, 0x73, 0x65, 0x72, 0x47, - 0x72, 0x6f, 0x75, 0x70, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x67, 0x6f, - 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, - 0x70, 0x74, 0x79, 0x22, 0x16, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x10, 0x3a, 0x01, 0x2a, 0x22, 0x0b, - 0x2f, 0x75, 0x73, 0x65, 0x72, 0x2f, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x12, 0x60, 0x0a, 0x0d, 0x46, - 0x69, 0x6e, 0x64, 0x55, 0x73, 0x65, 0x72, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x12, 0x1d, 0x2e, 0x61, - 0x75, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x2e, 0x46, 0x69, 0x6e, 0x64, 0x55, 0x73, 0x65, 0x72, 0x47, - 0x72, 0x6f, 0x75, 0x70, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1b, 0x2e, 0x61, 0x75, - 0x74, 0x68, 0x2e, 0x76, 0x31, 0x2e, 0x46, 0x69, 0x6e, 0x64, 0x55, 0x73, 0x65, 0x72, 0x47, 0x72, - 0x6f, 0x75, 0x70, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x22, 0x13, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x0d, - 0x12, 0x0b, 0x2f, 0x75, 0x73, 0x65, 0x72, 0x2f, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x12, 0x7e, 0x0a, - 0x0f, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x55, 0x73, 0x65, 0x72, 0x47, 0x72, 0x6f, 0x75, 0x70, - 0x12, 0x1f, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x2e, + 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x28, 0x3a, 0x01, 0x2a, 0x5a, 0x13, 0x3a, 0x01, 0x2a, 0x32, 0x0e, + 0x2f, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x1a, 0x0e, + 0x2f, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x12, 0x52, + 0x0a, 0x0c, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x12, + 0x2e, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x2e, 0x49, 0x64, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x16, 0x82, 0xd3, 0xe4, 0x93, + 0x02, 0x10, 0x2a, 0x0e, 0x2f, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x64, 0x65, 0x6c, 0x65, + 0x74, 0x65, 0x12, 0x59, 0x0a, 0x0a, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x52, 0x6f, 0x6c, 0x65, + 0x12, 0x1a, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, + 0x65, 0x52, 0x6f, 0x6c, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x67, + 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, + 0x6d, 0x70, 0x74, 0x79, 0x22, 0x17, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x11, 0x3a, 0x01, 0x2a, 0x22, + 0x0c, 0x2f, 0x72, 0x6f, 0x6c, 0x65, 0x2f, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x12, 0x50, 0x0a, + 0x08, 0x46, 0x69, 0x6e, 0x64, 0x52, 0x6f, 0x6c, 0x65, 0x12, 0x18, 0x2e, 0x61, 0x75, 0x74, 0x68, + 0x2e, 0x76, 0x31, 0x2e, 0x46, 0x69, 0x6e, 0x64, 0x52, 0x6f, 0x6c, 0x65, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x2e, 0x46, 0x69, + 0x6e, 0x64, 0x52, 0x6f, 0x6c, 0x65, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x22, 0x12, 0x82, 0xd3, 0xe4, + 0x93, 0x02, 0x0c, 0x12, 0x0a, 0x2f, 0x72, 0x6f, 0x6c, 0x65, 0x2f, 0x6c, 0x69, 0x73, 0x74, 0x12, + 0x6c, 0x0a, 0x0a, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x52, 0x6f, 0x6c, 0x65, 0x12, 0x1a, 0x2e, + 0x61, 0x75, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x52, 0x6f, + 0x6c, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, + 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, + 0x79, 0x22, 0x2a, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x24, 0x3a, 0x01, 0x2a, 0x5a, 0x11, 0x3a, 0x01, + 0x2a, 0x32, 0x0c, 0x2f, 0x72, 0x6f, 0x6c, 0x65, 0x2f, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x1a, + 0x0c, 0x2f, 0x72, 0x6f, 0x6c, 0x65, 0x2f, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x12, 0x4e, 0x0a, + 0x0a, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x52, 0x6f, 0x6c, 0x65, 0x12, 0x12, 0x2e, 0x70, 0x61, + 0x72, 0x61, 0x6d, 0x73, 0x2e, 0x49, 0x64, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, + 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, + 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x14, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x0e, 0x2a, + 0x0c, 0x2f, 0x72, 0x6f, 0x6c, 0x65, 0x2f, 0x64, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x12, 0x69, 0x0a, + 0x0f, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x55, 0x73, 0x65, 0x72, 0x47, 0x72, 0x6f, 0x75, 0x70, + 0x12, 0x1f, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x55, 0x73, 0x65, 0x72, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x32, 0x82, 0xd3, 0xe4, 0x93, 0x02, - 0x2c, 0x3a, 0x01, 0x2a, 0x5a, 0x15, 0x3a, 0x01, 0x2a, 0x32, 0x10, 0x2f, 0x75, 0x73, 0x65, 0x72, - 0x2f, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2f, 0x7b, 0x69, 0x64, 0x7d, 0x1a, 0x10, 0x2f, 0x75, 0x73, - 0x65, 0x72, 0x2f, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2f, 0x7b, 0x69, 0x64, 0x7d, 0x12, 0x58, 0x0a, - 0x0f, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x55, 0x73, 0x65, 0x72, 0x47, 0x72, 0x6f, 0x75, 0x70, - 0x12, 0x12, 0x2e, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x2e, 0x49, 0x64, 0x73, 0x52, 0x65, 0x71, + 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x1d, 0x82, 0xd3, 0xe4, 0x93, 0x02, + 0x17, 0x3a, 0x01, 0x2a, 0x22, 0x12, 0x2f, 0x75, 0x73, 0x65, 0x72, 0x2f, 0x67, 0x72, 0x6f, 0x75, + 0x70, 0x2f, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x12, 0x65, 0x0a, 0x0d, 0x46, 0x69, 0x6e, 0x64, + 0x55, 0x73, 0x65, 0x72, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x12, 0x1d, 0x2e, 0x61, 0x75, 0x74, 0x68, + 0x2e, 0x76, 0x31, 0x2e, 0x46, 0x69, 0x6e, 0x64, 0x55, 0x73, 0x65, 0x72, 0x47, 0x72, 0x6f, 0x75, + 0x70, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1b, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x2e, + 0x76, 0x31, 0x2e, 0x46, 0x69, 0x6e, 0x64, 0x55, 0x73, 0x65, 0x72, 0x47, 0x72, 0x6f, 0x75, 0x70, + 0x52, 0x65, 0x70, 0x6c, 0x79, 0x22, 0x18, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x12, 0x12, 0x10, 0x2f, + 0x75, 0x73, 0x65, 0x72, 0x2f, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2f, 0x6c, 0x69, 0x73, 0x74, 0x12, + 0x82, 0x01, 0x0a, 0x0f, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x55, 0x73, 0x65, 0x72, 0x47, 0x72, + 0x6f, 0x75, 0x70, 0x12, 0x1f, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x70, + 0x64, 0x61, 0x74, 0x65, 0x55, 0x73, 0x65, 0x72, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x19, 0x82, 0xd3, - 0xe4, 0x93, 0x02, 0x13, 0x2a, 0x11, 0x2f, 0x75, 0x73, 0x65, 0x72, 0x2f, 0x67, 0x72, 0x6f, 0x75, - 0x70, 0x2f, 0x7b, 0x69, 0x64, 0x73, 0x7d, 0x12, 0x61, 0x0a, 0x0f, 0x43, 0x72, 0x65, 0x61, 0x74, - 0x65, 0x57, 0x68, 0x69, 0x74, 0x65, 0x6c, 0x69, 0x73, 0x74, 0x12, 0x1f, 0x2e, 0x61, 0x75, 0x74, - 0x68, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x57, 0x68, 0x69, 0x74, 0x65, - 0x6c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x67, 0x6f, - 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, - 0x70, 0x74, 0x79, 0x22, 0x15, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x0f, 0x3a, 0x01, 0x2a, 0x22, 0x0a, - 0x2f, 0x77, 0x68, 0x69, 0x74, 0x65, 0x6c, 0x69, 0x73, 0x74, 0x12, 0x4a, 0x0a, 0x0c, 0x48, 0x61, - 0x73, 0x57, 0x68, 0x69, 0x74, 0x65, 0x6c, 0x69, 0x73, 0x74, 0x12, 0x1c, 0x2e, 0x61, 0x75, 0x74, - 0x68, 0x2e, 0x76, 0x31, 0x2e, 0x48, 0x61, 0x73, 0x57, 0x68, 0x69, 0x74, 0x65, 0x6c, 0x69, 0x73, - 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1a, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x2e, - 0x76, 0x31, 0x2e, 0x48, 0x61, 0x73, 0x57, 0x68, 0x69, 0x74, 0x65, 0x6c, 0x69, 0x73, 0x74, 0x52, - 0x65, 0x70, 0x6c, 0x79, 0x22, 0x00, 0x12, 0x5f, 0x0a, 0x0d, 0x46, 0x69, 0x6e, 0x64, 0x57, 0x68, - 0x69, 0x74, 0x65, 0x6c, 0x69, 0x73, 0x74, 0x12, 0x1d, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x2e, 0x76, - 0x31, 0x2e, 0x46, 0x69, 0x6e, 0x64, 0x57, 0x68, 0x69, 0x74, 0x65, 0x6c, 0x69, 0x73, 0x74, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1b, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x2e, 0x76, 0x31, - 0x2e, 0x46, 0x69, 0x6e, 0x64, 0x57, 0x68, 0x69, 0x74, 0x65, 0x6c, 0x69, 0x73, 0x74, 0x52, 0x65, - 0x70, 0x6c, 0x79, 0x22, 0x12, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x0c, 0x12, 0x0a, 0x2f, 0x77, 0x68, - 0x69, 0x74, 0x65, 0x6c, 0x69, 0x73, 0x74, 0x12, 0x7c, 0x0a, 0x0f, 0x55, 0x70, 0x64, 0x61, 0x74, - 0x65, 0x57, 0x68, 0x69, 0x74, 0x65, 0x6c, 0x69, 0x73, 0x74, 0x12, 0x1f, 0x2e, 0x61, 0x75, 0x74, - 0x68, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x57, 0x68, 0x69, 0x74, 0x65, - 0x6c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x67, 0x6f, + 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x36, 0x82, 0xd3, + 0xe4, 0x93, 0x02, 0x30, 0x3a, 0x01, 0x2a, 0x5a, 0x17, 0x3a, 0x01, 0x2a, 0x32, 0x12, 0x2f, 0x75, + 0x73, 0x65, 0x72, 0x2f, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2f, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, + 0x1a, 0x12, 0x2f, 0x75, 0x73, 0x65, 0x72, 0x2f, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2f, 0x75, 0x70, + 0x64, 0x61, 0x74, 0x65, 0x12, 0x59, 0x0a, 0x0f, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x55, 0x73, + 0x65, 0x72, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x12, 0x12, 0x2e, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, + 0x2e, 0x49, 0x64, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, - 0x70, 0x74, 0x79, 0x22, 0x30, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x2a, 0x3a, 0x01, 0x2a, 0x5a, 0x14, - 0x3a, 0x01, 0x2a, 0x32, 0x0f, 0x2f, 0x77, 0x68, 0x69, 0x74, 0x65, 0x6c, 0x69, 0x73, 0x74, 0x2f, - 0x7b, 0x69, 0x64, 0x7d, 0x1a, 0x0f, 0x2f, 0x77, 0x68, 0x69, 0x74, 0x65, 0x6c, 0x69, 0x73, 0x74, - 0x2f, 0x7b, 0x69, 0x64, 0x7d, 0x12, 0x57, 0x0a, 0x0f, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x57, - 0x68, 0x69, 0x74, 0x65, 0x6c, 0x69, 0x73, 0x74, 0x12, 0x12, 0x2e, 0x70, 0x61, 0x72, 0x61, 0x6d, - 0x73, 0x2e, 0x49, 0x64, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x67, - 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, - 0x6d, 0x70, 0x74, 0x79, 0x22, 0x18, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x12, 0x2a, 0x10, 0x2f, 0x77, - 0x68, 0x69, 0x74, 0x65, 0x6c, 0x69, 0x73, 0x74, 0x2f, 0x7b, 0x69, 0x64, 0x73, 0x7d, 0x42, 0x29, - 0x0a, 0x07, 0x61, 0x75, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x42, 0x0b, 0x41, 0x75, 0x74, 0x68, 0x50, - 0x72, 0x6f, 0x74, 0x6f, 0x56, 0x31, 0x50, 0x01, 0x5a, 0x0f, 0x2e, 0x2f, 0x61, 0x70, 0x69, 0x2f, - 0x61, 0x75, 0x74, 0x68, 0x3b, 0x61, 0x75, 0x74, 0x68, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x33, + 0x70, 0x74, 0x79, 0x22, 0x1a, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x14, 0x2a, 0x12, 0x2f, 0x75, 0x73, + 0x65, 0x72, 0x2f, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2f, 0x64, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x12, + 0x68, 0x0a, 0x0f, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x57, 0x68, 0x69, 0x74, 0x65, 0x6c, 0x69, + 0x73, 0x74, 0x12, 0x1f, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x72, 0x65, + 0x61, 0x74, 0x65, 0x57, 0x68, 0x69, 0x74, 0x65, 0x6c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x1c, 0x82, 0xd3, 0xe4, + 0x93, 0x02, 0x16, 0x3a, 0x01, 0x2a, 0x22, 0x11, 0x2f, 0x77, 0x68, 0x69, 0x74, 0x65, 0x6c, 0x69, + 0x73, 0x74, 0x2f, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x12, 0x64, 0x0a, 0x0d, 0x46, 0x69, 0x6e, + 0x64, 0x57, 0x68, 0x69, 0x74, 0x65, 0x6c, 0x69, 0x73, 0x74, 0x12, 0x1d, 0x2e, 0x61, 0x75, 0x74, + 0x68, 0x2e, 0x76, 0x31, 0x2e, 0x46, 0x69, 0x6e, 0x64, 0x57, 0x68, 0x69, 0x74, 0x65, 0x6c, 0x69, + 0x73, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1b, 0x2e, 0x61, 0x75, 0x74, 0x68, + 0x2e, 0x76, 0x31, 0x2e, 0x46, 0x69, 0x6e, 0x64, 0x57, 0x68, 0x69, 0x74, 0x65, 0x6c, 0x69, 0x73, + 0x74, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x22, 0x17, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x11, 0x12, 0x0f, + 0x2f, 0x77, 0x68, 0x69, 0x74, 0x65, 0x6c, 0x69, 0x73, 0x74, 0x2f, 0x6c, 0x69, 0x73, 0x74, 0x12, + 0x80, 0x01, 0x0a, 0x0f, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x57, 0x68, 0x69, 0x74, 0x65, 0x6c, + 0x69, 0x73, 0x74, 0x12, 0x1f, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x70, + 0x64, 0x61, 0x74, 0x65, 0x57, 0x68, 0x69, 0x74, 0x65, 0x6c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x34, 0x82, 0xd3, + 0xe4, 0x93, 0x02, 0x2e, 0x3a, 0x01, 0x2a, 0x5a, 0x16, 0x3a, 0x01, 0x2a, 0x32, 0x11, 0x2f, 0x77, + 0x68, 0x69, 0x74, 0x65, 0x6c, 0x69, 0x73, 0x74, 0x2f, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x1a, + 0x11, 0x2f, 0x77, 0x68, 0x69, 0x74, 0x65, 0x6c, 0x69, 0x73, 0x74, 0x2f, 0x75, 0x70, 0x64, 0x61, + 0x74, 0x65, 0x12, 0x58, 0x0a, 0x0f, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x57, 0x68, 0x69, 0x74, + 0x65, 0x6c, 0x69, 0x73, 0x74, 0x12, 0x12, 0x2e, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x2e, 0x49, + 0x64, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, + 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, + 0x79, 0x22, 0x19, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x13, 0x2a, 0x11, 0x2f, 0x77, 0x68, 0x69, 0x74, + 0x65, 0x6c, 0x69, 0x73, 0x74, 0x2f, 0x64, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x42, 0x29, 0x0a, 0x07, + 0x61, 0x75, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x42, 0x0b, 0x41, 0x75, 0x74, 0x68, 0x50, 0x72, 0x6f, + 0x74, 0x6f, 0x56, 0x31, 0x50, 0x01, 0x5a, 0x0f, 0x2e, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x61, 0x75, + 0x74, 0x68, 0x3b, 0x61, 0x75, 0x74, 0x68, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -3489,54 +3147,48 @@ func file_auth_proto_auth_proto_rawDescGZIP() []byte { return file_auth_proto_auth_proto_rawDescData } -var file_auth_proto_auth_proto_msgTypes = make([]protoimpl.MessageInfo, 43) +var file_auth_proto_auth_proto_msgTypes = make([]protoimpl.MessageInfo, 37) var file_auth_proto_auth_proto_goTypes = []interface{}{ - (*Captcha)(nil), // 0: auth.v1.Captcha - (*Action)(nil), // 1: auth.v1.Action - (*User)(nil), // 2: auth.v1.User - (*UserGroup)(nil), // 3: auth.v1.UserGroup - (*Role)(nil), // 4: auth.v1.Role - (*Whitelist)(nil), // 5: auth.v1.Whitelist - (*RegisterRequest)(nil), // 6: auth.v1.RegisterRequest - (*PwdRequest)(nil), // 7: auth.v1.PwdRequest - (*LoginRequest)(nil), // 8: auth.v1.LoginRequest - (*LoginReply)(nil), // 9: auth.v1.LoginReply - (*StatusRequest)(nil), // 10: auth.v1.StatusRequest - (*StatusReply)(nil), // 11: auth.v1.StatusReply - (*CaptchaReply)(nil), // 12: auth.v1.CaptchaReply - (*RefreshRequest)(nil), // 13: auth.v1.RefreshRequest - (*InfoReply)(nil), // 14: auth.v1.InfoReply - (*CheckIdempotentRequest)(nil), // 15: auth.v1.CheckIdempotentRequest - (*IdempotentReply)(nil), // 16: auth.v1.IdempotentReply - (*Permission)(nil), // 17: auth.v1.Permission - (*GetUserByCodeRequest)(nil), // 18: auth.v1.GetUserByCodeRequest - (*GetUserByCodeReply)(nil), // 19: auth.v1.GetUserByCodeReply - (*FindUserRequest)(nil), // 20: auth.v1.FindUserRequest - (*FindUserReply)(nil), // 21: auth.v1.FindUserReply - (*UpdateUserRequest)(nil), // 22: auth.v1.UpdateUserRequest - (*PermissionRequest)(nil), // 23: auth.v1.PermissionRequest - (*CreateActionRequest)(nil), // 24: auth.v1.CreateActionRequest - (*FindActionRequest)(nil), // 25: auth.v1.FindActionRequest - (*FindActionReply)(nil), // 26: auth.v1.FindActionReply - (*UpdateActionRequest)(nil), // 27: auth.v1.UpdateActionRequest - (*CreateRoleRequest)(nil), // 28: auth.v1.CreateRoleRequest - (*FindRoleRequest)(nil), // 29: auth.v1.FindRoleRequest - (*FindRoleReply)(nil), // 30: auth.v1.FindRoleReply - (*UpdateRoleRequest)(nil), // 31: auth.v1.UpdateRoleRequest - (*CreateUserGroupRequest)(nil), // 32: auth.v1.CreateUserGroupRequest - (*FindUserGroupRequest)(nil), // 33: auth.v1.FindUserGroupRequest - (*FindUserGroupReply)(nil), // 34: auth.v1.FindUserGroupReply - (*UpdateUserGroupRequest)(nil), // 35: auth.v1.UpdateUserGroupRequest - (*CreateWhitelistRequest)(nil), // 36: auth.v1.CreateWhitelistRequest - (*HasWhitelistRequest)(nil), // 37: auth.v1.HasWhitelistRequest - (*HasWhitelistReply)(nil), // 38: auth.v1.HasWhitelistReply - (*FindWhitelistRequest)(nil), // 39: auth.v1.FindWhitelistRequest - (*FindWhitelistReply)(nil), // 40: auth.v1.FindWhitelistReply - (*UpdateWhitelistRequest)(nil), // 41: auth.v1.UpdateWhitelistRequest - (*HasWhitelistRequest_CheckPermission)(nil), // 42: auth.v1.HasWhitelistRequest.CheckPermission - (*params.Page)(nil), // 43: params.Page - (*emptypb.Empty)(nil), // 44: google.protobuf.Empty - (*params.IdsRequest)(nil), // 45: params.IdsRequest + (*Captcha)(nil), // 0: auth.v1.Captcha + (*Action)(nil), // 1: auth.v1.Action + (*User)(nil), // 2: auth.v1.User + (*UserGroup)(nil), // 3: auth.v1.UserGroup + (*Role)(nil), // 4: auth.v1.Role + (*Whitelist)(nil), // 5: auth.v1.Whitelist + (*RegisterRequest)(nil), // 6: auth.v1.RegisterRequest + (*PwdRequest)(nil), // 7: auth.v1.PwdRequest + (*LoginRequest)(nil), // 8: auth.v1.LoginRequest + (*LoginReply)(nil), // 9: auth.v1.LoginReply + (*StatusRequest)(nil), // 10: auth.v1.StatusRequest + (*StatusReply)(nil), // 11: auth.v1.StatusReply + (*CaptchaReply)(nil), // 12: auth.v1.CaptchaReply + (*RefreshRequest)(nil), // 13: auth.v1.RefreshRequest + (*InfoReply)(nil), // 14: auth.v1.InfoReply + (*IdempotentReply)(nil), // 15: auth.v1.IdempotentReply + (*Permission)(nil), // 16: auth.v1.Permission + (*FindUserRequest)(nil), // 17: auth.v1.FindUserRequest + (*FindUserReply)(nil), // 18: auth.v1.FindUserReply + (*UpdateUserRequest)(nil), // 19: auth.v1.UpdateUserRequest + (*PermissionRequest)(nil), // 20: auth.v1.PermissionRequest + (*CreateActionRequest)(nil), // 21: auth.v1.CreateActionRequest + (*FindActionRequest)(nil), // 22: auth.v1.FindActionRequest + (*FindActionReply)(nil), // 23: auth.v1.FindActionReply + (*UpdateActionRequest)(nil), // 24: auth.v1.UpdateActionRequest + (*CreateRoleRequest)(nil), // 25: auth.v1.CreateRoleRequest + (*FindRoleRequest)(nil), // 26: auth.v1.FindRoleRequest + (*FindRoleReply)(nil), // 27: auth.v1.FindRoleReply + (*UpdateRoleRequest)(nil), // 28: auth.v1.UpdateRoleRequest + (*CreateUserGroupRequest)(nil), // 29: auth.v1.CreateUserGroupRequest + (*FindUserGroupRequest)(nil), // 30: auth.v1.FindUserGroupRequest + (*FindUserGroupReply)(nil), // 31: auth.v1.FindUserGroupReply + (*UpdateUserGroupRequest)(nil), // 32: auth.v1.UpdateUserGroupRequest + (*CreateWhitelistRequest)(nil), // 33: auth.v1.CreateWhitelistRequest + (*FindWhitelistRequest)(nil), // 34: auth.v1.FindWhitelistRequest + (*FindWhitelistReply)(nil), // 35: auth.v1.FindWhitelistReply + (*UpdateWhitelistRequest)(nil), // 36: auth.v1.UpdateWhitelistRequest + (*params.Page)(nil), // 37: params.Page + (*emptypb.Empty)(nil), // 38: google.protobuf.Empty + (*params.IdsRequest)(nil), // 39: params.IdsRequest } var file_auth_proto_auth_proto_depIdxs = []int32{ 1, // 0: auth.v1.User.actions:type_name -> auth.v1.Action @@ -3546,93 +3198,85 @@ var file_auth_proto_auth_proto_depIdxs = []int32{ 1, // 4: auth.v1.Role.actions:type_name -> auth.v1.Action 0, // 5: auth.v1.StatusReply.captcha:type_name -> auth.v1.Captcha 0, // 6: auth.v1.CaptchaReply.captcha:type_name -> auth.v1.Captcha - 17, // 7: auth.v1.InfoReply.permission:type_name -> auth.v1.Permission - 2, // 8: auth.v1.GetUserByCodeReply.user:type_name -> auth.v1.User - 43, // 9: auth.v1.FindUserRequest.page:type_name -> params.Page - 43, // 10: auth.v1.FindUserReply.page:type_name -> params.Page - 2, // 11: auth.v1.FindUserReply.list:type_name -> auth.v1.User - 43, // 12: auth.v1.FindActionRequest.page:type_name -> params.Page - 43, // 13: auth.v1.FindActionReply.page:type_name -> params.Page - 1, // 14: auth.v1.FindActionReply.list:type_name -> auth.v1.Action - 43, // 15: auth.v1.FindRoleRequest.page:type_name -> params.Page - 43, // 16: auth.v1.FindRoleReply.page:type_name -> params.Page - 4, // 17: auth.v1.FindRoleReply.list:type_name -> auth.v1.Role - 43, // 18: auth.v1.FindUserGroupRequest.page:type_name -> params.Page - 43, // 19: auth.v1.FindUserGroupReply.page:type_name -> params.Page - 3, // 20: auth.v1.FindUserGroupReply.list:type_name -> auth.v1.UserGroup - 42, // 21: auth.v1.HasWhitelistRequest.permission:type_name -> auth.v1.HasWhitelistRequest.CheckPermission - 43, // 22: auth.v1.FindWhitelistRequest.page:type_name -> params.Page - 43, // 23: auth.v1.FindWhitelistReply.page:type_name -> params.Page - 5, // 24: auth.v1.FindWhitelistReply.list:type_name -> auth.v1.Whitelist - 6, // 25: auth.v1.Auth.Register:input_type -> auth.v1.RegisterRequest - 7, // 26: auth.v1.Auth.Pwd:input_type -> auth.v1.PwdRequest - 8, // 27: auth.v1.Auth.Login:input_type -> auth.v1.LoginRequest - 10, // 28: auth.v1.Auth.Status:input_type -> auth.v1.StatusRequest - 44, // 29: auth.v1.Auth.Captcha:input_type -> google.protobuf.Empty - 13, // 30: auth.v1.Auth.Refresh:input_type -> auth.v1.RefreshRequest - 44, // 31: auth.v1.Auth.Logout:input_type -> google.protobuf.Empty - 44, // 32: auth.v1.Auth.Info:input_type -> google.protobuf.Empty - 44, // 33: auth.v1.Auth.Idempotent:input_type -> google.protobuf.Empty - 15, // 34: auth.v1.Auth.CheckIdempotent:input_type -> auth.v1.CheckIdempotentRequest - 18, // 35: auth.v1.Auth.GetUserByCode:input_type -> auth.v1.GetUserByCodeRequest - 20, // 36: auth.v1.Auth.FindUser:input_type -> auth.v1.FindUserRequest - 22, // 37: auth.v1.Auth.UpdateUser:input_type -> auth.v1.UpdateUserRequest - 45, // 38: auth.v1.Auth.DeleteUser:input_type -> params.IdsRequest - 23, // 39: auth.v1.Auth.Permission:input_type -> auth.v1.PermissionRequest - 24, // 40: auth.v1.Auth.CreateAction:input_type -> auth.v1.CreateActionRequest - 25, // 41: auth.v1.Auth.FindAction:input_type -> auth.v1.FindActionRequest - 27, // 42: auth.v1.Auth.UpdateAction:input_type -> auth.v1.UpdateActionRequest - 45, // 43: auth.v1.Auth.DeleteAction:input_type -> params.IdsRequest - 28, // 44: auth.v1.Auth.CreateRole:input_type -> auth.v1.CreateRoleRequest - 29, // 45: auth.v1.Auth.FindRole:input_type -> auth.v1.FindRoleRequest - 31, // 46: auth.v1.Auth.UpdateRole:input_type -> auth.v1.UpdateRoleRequest - 45, // 47: auth.v1.Auth.DeleteRole:input_type -> params.IdsRequest - 32, // 48: auth.v1.Auth.CreateUserGroup:input_type -> auth.v1.CreateUserGroupRequest - 33, // 49: auth.v1.Auth.FindUserGroup:input_type -> auth.v1.FindUserGroupRequest - 35, // 50: auth.v1.Auth.UpdateUserGroup:input_type -> auth.v1.UpdateUserGroupRequest - 45, // 51: auth.v1.Auth.DeleteUserGroup:input_type -> params.IdsRequest - 36, // 52: auth.v1.Auth.CreateWhitelist:input_type -> auth.v1.CreateWhitelistRequest - 37, // 53: auth.v1.Auth.HasWhitelist:input_type -> auth.v1.HasWhitelistRequest - 39, // 54: auth.v1.Auth.FindWhitelist:input_type -> auth.v1.FindWhitelistRequest - 41, // 55: auth.v1.Auth.UpdateWhitelist:input_type -> auth.v1.UpdateWhitelistRequest - 45, // 56: auth.v1.Auth.DeleteWhitelist:input_type -> params.IdsRequest - 44, // 57: auth.v1.Auth.Register:output_type -> google.protobuf.Empty - 44, // 58: auth.v1.Auth.Pwd:output_type -> google.protobuf.Empty - 9, // 59: auth.v1.Auth.Login:output_type -> auth.v1.LoginReply - 11, // 60: auth.v1.Auth.Status:output_type -> auth.v1.StatusReply - 12, // 61: auth.v1.Auth.Captcha:output_type -> auth.v1.CaptchaReply - 9, // 62: auth.v1.Auth.Refresh:output_type -> auth.v1.LoginReply - 44, // 63: auth.v1.Auth.Logout:output_type -> google.protobuf.Empty - 14, // 64: auth.v1.Auth.Info:output_type -> auth.v1.InfoReply - 16, // 65: auth.v1.Auth.Idempotent:output_type -> auth.v1.IdempotentReply - 44, // 66: auth.v1.Auth.CheckIdempotent:output_type -> google.protobuf.Empty - 19, // 67: auth.v1.Auth.GetUserByCode:output_type -> auth.v1.GetUserByCodeReply - 21, // 68: auth.v1.Auth.FindUser:output_type -> auth.v1.FindUserReply - 44, // 69: auth.v1.Auth.UpdateUser:output_type -> google.protobuf.Empty - 44, // 70: auth.v1.Auth.DeleteUser:output_type -> google.protobuf.Empty - 44, // 71: auth.v1.Auth.Permission:output_type -> google.protobuf.Empty - 44, // 72: auth.v1.Auth.CreateAction:output_type -> google.protobuf.Empty - 26, // 73: auth.v1.Auth.FindAction:output_type -> auth.v1.FindActionReply - 44, // 74: auth.v1.Auth.UpdateAction:output_type -> google.protobuf.Empty - 44, // 75: auth.v1.Auth.DeleteAction:output_type -> google.protobuf.Empty - 44, // 76: auth.v1.Auth.CreateRole:output_type -> google.protobuf.Empty - 30, // 77: auth.v1.Auth.FindRole:output_type -> auth.v1.FindRoleReply - 44, // 78: auth.v1.Auth.UpdateRole:output_type -> google.protobuf.Empty - 44, // 79: auth.v1.Auth.DeleteRole:output_type -> google.protobuf.Empty - 44, // 80: auth.v1.Auth.CreateUserGroup:output_type -> google.protobuf.Empty - 34, // 81: auth.v1.Auth.FindUserGroup:output_type -> auth.v1.FindUserGroupReply - 44, // 82: auth.v1.Auth.UpdateUserGroup:output_type -> google.protobuf.Empty - 44, // 83: auth.v1.Auth.DeleteUserGroup:output_type -> google.protobuf.Empty - 44, // 84: auth.v1.Auth.CreateWhitelist:output_type -> google.protobuf.Empty - 38, // 85: auth.v1.Auth.HasWhitelist:output_type -> auth.v1.HasWhitelistReply - 40, // 86: auth.v1.Auth.FindWhitelist:output_type -> auth.v1.FindWhitelistReply - 44, // 87: auth.v1.Auth.UpdateWhitelist:output_type -> google.protobuf.Empty - 44, // 88: auth.v1.Auth.DeleteWhitelist:output_type -> google.protobuf.Empty - 57, // [57:89] is the sub-list for method output_type - 25, // [25:57] is the sub-list for method input_type - 25, // [25:25] is the sub-list for extension type_name - 25, // [25:25] is the sub-list for extension extendee - 0, // [0:25] is the sub-list for field type_name + 16, // 7: auth.v1.InfoReply.permission:type_name -> auth.v1.Permission + 37, // 8: auth.v1.FindUserRequest.page:type_name -> params.Page + 37, // 9: auth.v1.FindUserReply.page:type_name -> params.Page + 2, // 10: auth.v1.FindUserReply.list:type_name -> auth.v1.User + 37, // 11: auth.v1.FindActionRequest.page:type_name -> params.Page + 37, // 12: auth.v1.FindActionReply.page:type_name -> params.Page + 1, // 13: auth.v1.FindActionReply.list:type_name -> auth.v1.Action + 37, // 14: auth.v1.FindRoleRequest.page:type_name -> params.Page + 37, // 15: auth.v1.FindRoleReply.page:type_name -> params.Page + 4, // 16: auth.v1.FindRoleReply.list:type_name -> auth.v1.Role + 37, // 17: auth.v1.FindUserGroupRequest.page:type_name -> params.Page + 37, // 18: auth.v1.FindUserGroupReply.page:type_name -> params.Page + 3, // 19: auth.v1.FindUserGroupReply.list:type_name -> auth.v1.UserGroup + 37, // 20: auth.v1.FindWhitelistRequest.page:type_name -> params.Page + 37, // 21: auth.v1.FindWhitelistReply.page:type_name -> params.Page + 5, // 22: auth.v1.FindWhitelistReply.list:type_name -> auth.v1.Whitelist + 6, // 23: auth.v1.Auth.Register:input_type -> auth.v1.RegisterRequest + 7, // 24: auth.v1.Auth.Pwd:input_type -> auth.v1.PwdRequest + 8, // 25: auth.v1.Auth.Login:input_type -> auth.v1.LoginRequest + 10, // 26: auth.v1.Auth.Status:input_type -> auth.v1.StatusRequest + 38, // 27: auth.v1.Auth.Captcha:input_type -> google.protobuf.Empty + 13, // 28: auth.v1.Auth.Refresh:input_type -> auth.v1.RefreshRequest + 38, // 29: auth.v1.Auth.Logout:input_type -> google.protobuf.Empty + 38, // 30: auth.v1.Auth.Info:input_type -> google.protobuf.Empty + 38, // 31: auth.v1.Auth.Idempotent:input_type -> google.protobuf.Empty + 17, // 32: auth.v1.Auth.FindUser:input_type -> auth.v1.FindUserRequest + 19, // 33: auth.v1.Auth.UpdateUser:input_type -> auth.v1.UpdateUserRequest + 39, // 34: auth.v1.Auth.DeleteUser:input_type -> params.IdsRequest + 20, // 35: auth.v1.Auth.Permission:input_type -> auth.v1.PermissionRequest + 21, // 36: auth.v1.Auth.CreateAction:input_type -> auth.v1.CreateActionRequest + 22, // 37: auth.v1.Auth.FindAction:input_type -> auth.v1.FindActionRequest + 24, // 38: auth.v1.Auth.UpdateAction:input_type -> auth.v1.UpdateActionRequest + 39, // 39: auth.v1.Auth.DeleteAction:input_type -> params.IdsRequest + 25, // 40: auth.v1.Auth.CreateRole:input_type -> auth.v1.CreateRoleRequest + 26, // 41: auth.v1.Auth.FindRole:input_type -> auth.v1.FindRoleRequest + 28, // 42: auth.v1.Auth.UpdateRole:input_type -> auth.v1.UpdateRoleRequest + 39, // 43: auth.v1.Auth.DeleteRole:input_type -> params.IdsRequest + 29, // 44: auth.v1.Auth.CreateUserGroup:input_type -> auth.v1.CreateUserGroupRequest + 30, // 45: auth.v1.Auth.FindUserGroup:input_type -> auth.v1.FindUserGroupRequest + 32, // 46: auth.v1.Auth.UpdateUserGroup:input_type -> auth.v1.UpdateUserGroupRequest + 39, // 47: auth.v1.Auth.DeleteUserGroup:input_type -> params.IdsRequest + 33, // 48: auth.v1.Auth.CreateWhitelist:input_type -> auth.v1.CreateWhitelistRequest + 34, // 49: auth.v1.Auth.FindWhitelist:input_type -> auth.v1.FindWhitelistRequest + 36, // 50: auth.v1.Auth.UpdateWhitelist:input_type -> auth.v1.UpdateWhitelistRequest + 39, // 51: auth.v1.Auth.DeleteWhitelist:input_type -> params.IdsRequest + 38, // 52: auth.v1.Auth.Register:output_type -> google.protobuf.Empty + 38, // 53: auth.v1.Auth.Pwd:output_type -> google.protobuf.Empty + 9, // 54: auth.v1.Auth.Login:output_type -> auth.v1.LoginReply + 11, // 55: auth.v1.Auth.Status:output_type -> auth.v1.StatusReply + 12, // 56: auth.v1.Auth.Captcha:output_type -> auth.v1.CaptchaReply + 9, // 57: auth.v1.Auth.Refresh:output_type -> auth.v1.LoginReply + 38, // 58: auth.v1.Auth.Logout:output_type -> google.protobuf.Empty + 14, // 59: auth.v1.Auth.Info:output_type -> auth.v1.InfoReply + 15, // 60: auth.v1.Auth.Idempotent:output_type -> auth.v1.IdempotentReply + 18, // 61: auth.v1.Auth.FindUser:output_type -> auth.v1.FindUserReply + 38, // 62: auth.v1.Auth.UpdateUser:output_type -> google.protobuf.Empty + 38, // 63: auth.v1.Auth.DeleteUser:output_type -> google.protobuf.Empty + 38, // 64: auth.v1.Auth.Permission:output_type -> google.protobuf.Empty + 38, // 65: auth.v1.Auth.CreateAction:output_type -> google.protobuf.Empty + 23, // 66: auth.v1.Auth.FindAction:output_type -> auth.v1.FindActionReply + 38, // 67: auth.v1.Auth.UpdateAction:output_type -> google.protobuf.Empty + 38, // 68: auth.v1.Auth.DeleteAction:output_type -> google.protobuf.Empty + 38, // 69: auth.v1.Auth.CreateRole:output_type -> google.protobuf.Empty + 27, // 70: auth.v1.Auth.FindRole:output_type -> auth.v1.FindRoleReply + 38, // 71: auth.v1.Auth.UpdateRole:output_type -> google.protobuf.Empty + 38, // 72: auth.v1.Auth.DeleteRole:output_type -> google.protobuf.Empty + 38, // 73: auth.v1.Auth.CreateUserGroup:output_type -> google.protobuf.Empty + 31, // 74: auth.v1.Auth.FindUserGroup:output_type -> auth.v1.FindUserGroupReply + 38, // 75: auth.v1.Auth.UpdateUserGroup:output_type -> google.protobuf.Empty + 38, // 76: auth.v1.Auth.DeleteUserGroup:output_type -> google.protobuf.Empty + 38, // 77: auth.v1.Auth.CreateWhitelist:output_type -> google.protobuf.Empty + 35, // 78: auth.v1.Auth.FindWhitelist:output_type -> auth.v1.FindWhitelistReply + 38, // 79: auth.v1.Auth.UpdateWhitelist:output_type -> google.protobuf.Empty + 38, // 80: auth.v1.Auth.DeleteWhitelist:output_type -> google.protobuf.Empty + 52, // [52:81] is the sub-list for method output_type + 23, // [23:52] is the sub-list for method input_type + 23, // [23:23] is the sub-list for extension type_name + 23, // [23:23] is the sub-list for extension extendee + 0, // [0:23] is the sub-list for field type_name } func init() { file_auth_proto_auth_proto_init() } @@ -3822,18 +3466,6 @@ func file_auth_proto_auth_proto_init() { } } file_auth_proto_auth_proto_msgTypes[15].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*CheckIdempotentRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_auth_proto_auth_proto_msgTypes[16].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*IdempotentReply); i { case 0: return &v.state @@ -3845,7 +3477,7 @@ func file_auth_proto_auth_proto_init() { return nil } } - file_auth_proto_auth_proto_msgTypes[17].Exporter = func(v interface{}, i int) interface{} { + file_auth_proto_auth_proto_msgTypes[16].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*Permission); i { case 0: return &v.state @@ -3857,31 +3489,7 @@ func file_auth_proto_auth_proto_init() { return nil } } - file_auth_proto_auth_proto_msgTypes[18].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetUserByCodeRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_auth_proto_auth_proto_msgTypes[19].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetUserByCodeReply); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_auth_proto_auth_proto_msgTypes[20].Exporter = func(v interface{}, i int) interface{} { + file_auth_proto_auth_proto_msgTypes[17].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*FindUserRequest); i { case 0: return &v.state @@ -3893,7 +3501,7 @@ func file_auth_proto_auth_proto_init() { return nil } } - file_auth_proto_auth_proto_msgTypes[21].Exporter = func(v interface{}, i int) interface{} { + file_auth_proto_auth_proto_msgTypes[18].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*FindUserReply); i { case 0: return &v.state @@ -3905,7 +3513,7 @@ func file_auth_proto_auth_proto_init() { return nil } } - file_auth_proto_auth_proto_msgTypes[22].Exporter = func(v interface{}, i int) interface{} { + file_auth_proto_auth_proto_msgTypes[19].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*UpdateUserRequest); i { case 0: return &v.state @@ -3917,7 +3525,7 @@ func file_auth_proto_auth_proto_init() { return nil } } - file_auth_proto_auth_proto_msgTypes[23].Exporter = func(v interface{}, i int) interface{} { + file_auth_proto_auth_proto_msgTypes[20].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PermissionRequest); i { case 0: return &v.state @@ -3929,7 +3537,7 @@ func file_auth_proto_auth_proto_init() { return nil } } - file_auth_proto_auth_proto_msgTypes[24].Exporter = func(v interface{}, i int) interface{} { + file_auth_proto_auth_proto_msgTypes[21].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*CreateActionRequest); i { case 0: return &v.state @@ -3941,7 +3549,7 @@ func file_auth_proto_auth_proto_init() { return nil } } - file_auth_proto_auth_proto_msgTypes[25].Exporter = func(v interface{}, i int) interface{} { + file_auth_proto_auth_proto_msgTypes[22].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*FindActionRequest); i { case 0: return &v.state @@ -3953,7 +3561,7 @@ func file_auth_proto_auth_proto_init() { return nil } } - file_auth_proto_auth_proto_msgTypes[26].Exporter = func(v interface{}, i int) interface{} { + file_auth_proto_auth_proto_msgTypes[23].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*FindActionReply); i { case 0: return &v.state @@ -3965,7 +3573,7 @@ func file_auth_proto_auth_proto_init() { return nil } } - file_auth_proto_auth_proto_msgTypes[27].Exporter = func(v interface{}, i int) interface{} { + file_auth_proto_auth_proto_msgTypes[24].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*UpdateActionRequest); i { case 0: return &v.state @@ -3977,7 +3585,7 @@ func file_auth_proto_auth_proto_init() { return nil } } - file_auth_proto_auth_proto_msgTypes[28].Exporter = func(v interface{}, i int) interface{} { + file_auth_proto_auth_proto_msgTypes[25].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*CreateRoleRequest); i { case 0: return &v.state @@ -3989,7 +3597,7 @@ func file_auth_proto_auth_proto_init() { return nil } } - file_auth_proto_auth_proto_msgTypes[29].Exporter = func(v interface{}, i int) interface{} { + file_auth_proto_auth_proto_msgTypes[26].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*FindRoleRequest); i { case 0: return &v.state @@ -4001,7 +3609,7 @@ func file_auth_proto_auth_proto_init() { return nil } } - file_auth_proto_auth_proto_msgTypes[30].Exporter = func(v interface{}, i int) interface{} { + file_auth_proto_auth_proto_msgTypes[27].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*FindRoleReply); i { case 0: return &v.state @@ -4013,7 +3621,7 @@ func file_auth_proto_auth_proto_init() { return nil } } - file_auth_proto_auth_proto_msgTypes[31].Exporter = func(v interface{}, i int) interface{} { + file_auth_proto_auth_proto_msgTypes[28].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*UpdateRoleRequest); i { case 0: return &v.state @@ -4025,7 +3633,7 @@ func file_auth_proto_auth_proto_init() { return nil } } - file_auth_proto_auth_proto_msgTypes[32].Exporter = func(v interface{}, i int) interface{} { + file_auth_proto_auth_proto_msgTypes[29].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*CreateUserGroupRequest); i { case 0: return &v.state @@ -4037,7 +3645,7 @@ func file_auth_proto_auth_proto_init() { return nil } } - file_auth_proto_auth_proto_msgTypes[33].Exporter = func(v interface{}, i int) interface{} { + file_auth_proto_auth_proto_msgTypes[30].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*FindUserGroupRequest); i { case 0: return &v.state @@ -4049,7 +3657,7 @@ func file_auth_proto_auth_proto_init() { return nil } } - file_auth_proto_auth_proto_msgTypes[34].Exporter = func(v interface{}, i int) interface{} { + file_auth_proto_auth_proto_msgTypes[31].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*FindUserGroupReply); i { case 0: return &v.state @@ -4061,7 +3669,7 @@ func file_auth_proto_auth_proto_init() { return nil } } - file_auth_proto_auth_proto_msgTypes[35].Exporter = func(v interface{}, i int) interface{} { + file_auth_proto_auth_proto_msgTypes[32].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*UpdateUserGroupRequest); i { case 0: return &v.state @@ -4073,7 +3681,7 @@ func file_auth_proto_auth_proto_init() { return nil } } - file_auth_proto_auth_proto_msgTypes[36].Exporter = func(v interface{}, i int) interface{} { + file_auth_proto_auth_proto_msgTypes[33].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*CreateWhitelistRequest); i { case 0: return &v.state @@ -4085,31 +3693,7 @@ func file_auth_proto_auth_proto_init() { return nil } } - file_auth_proto_auth_proto_msgTypes[37].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*HasWhitelistRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_auth_proto_auth_proto_msgTypes[38].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*HasWhitelistReply); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_auth_proto_auth_proto_msgTypes[39].Exporter = func(v interface{}, i int) interface{} { + file_auth_proto_auth_proto_msgTypes[34].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*FindWhitelistRequest); i { case 0: return &v.state @@ -4121,7 +3705,7 @@ func file_auth_proto_auth_proto_init() { return nil } } - file_auth_proto_auth_proto_msgTypes[40].Exporter = func(v interface{}, i int) interface{} { + file_auth_proto_auth_proto_msgTypes[35].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*FindWhitelistReply); i { case 0: return &v.state @@ -4133,7 +3717,7 @@ func file_auth_proto_auth_proto_init() { return nil } } - file_auth_proto_auth_proto_msgTypes[41].Exporter = func(v interface{}, i int) interface{} { + file_auth_proto_auth_proto_msgTypes[36].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*UpdateWhitelistRequest); i { case 0: return &v.state @@ -4145,40 +3729,28 @@ func file_auth_proto_auth_proto_init() { return nil } } - file_auth_proto_auth_proto_msgTypes[42].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*HasWhitelistRequest_CheckPermission); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } } file_auth_proto_auth_proto_msgTypes[8].OneofWrappers = []interface{}{} + file_auth_proto_auth_proto_msgTypes[17].OneofWrappers = []interface{}{} + file_auth_proto_auth_proto_msgTypes[19].OneofWrappers = []interface{}{} file_auth_proto_auth_proto_msgTypes[20].OneofWrappers = []interface{}{} file_auth_proto_auth_proto_msgTypes[22].OneofWrappers = []interface{}{} - file_auth_proto_auth_proto_msgTypes[23].OneofWrappers = []interface{}{} + file_auth_proto_auth_proto_msgTypes[24].OneofWrappers = []interface{}{} file_auth_proto_auth_proto_msgTypes[25].OneofWrappers = []interface{}{} - file_auth_proto_auth_proto_msgTypes[27].OneofWrappers = []interface{}{} + file_auth_proto_auth_proto_msgTypes[26].OneofWrappers = []interface{}{} file_auth_proto_auth_proto_msgTypes[28].OneofWrappers = []interface{}{} file_auth_proto_auth_proto_msgTypes[29].OneofWrappers = []interface{}{} - file_auth_proto_auth_proto_msgTypes[31].OneofWrappers = []interface{}{} + file_auth_proto_auth_proto_msgTypes[30].OneofWrappers = []interface{}{} file_auth_proto_auth_proto_msgTypes[32].OneofWrappers = []interface{}{} - file_auth_proto_auth_proto_msgTypes[33].OneofWrappers = []interface{}{} - file_auth_proto_auth_proto_msgTypes[35].OneofWrappers = []interface{}{} - file_auth_proto_auth_proto_msgTypes[39].OneofWrappers = []interface{}{} - file_auth_proto_auth_proto_msgTypes[41].OneofWrappers = []interface{}{} + file_auth_proto_auth_proto_msgTypes[34].OneofWrappers = []interface{}{} + file_auth_proto_auth_proto_msgTypes[36].OneofWrappers = []interface{}{} type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_auth_proto_auth_proto_rawDesc, NumEnums: 0, - NumMessages: 43, + NumMessages: 37, NumExtensions: 0, NumServices: 1, }, diff --git a/api/auth/auth.pb.validate.go b/api/auth/auth.pb.validate.go index 4f45d0d..5869fff 100644 --- a/api/auth/auth.pb.validate.go +++ b/api/auth/auth.pb.validate.go @@ -1341,16 +1341,7 @@ func (m *StatusRequest) validate(all bool) error { var errors []error - if l := utf8.RuneCountInString(m.GetUsername()); l < 5 || l > 50 { - err := StatusRequestValidationError{ - field: "Username", - reason: "value length must be between 5 and 50 runes, inclusive", - } - if !all { - return err - } - errors = append(errors, err) - } + // no validation rules for Username if len(errors) > 0 { return StatusRequestMultiError(errors) @@ -1928,110 +1919,6 @@ var _ interface { ErrorName() string } = InfoReplyValidationError{} -// Validate checks the field values on CheckIdempotentRequest with the rules -// defined in the proto definition for this message. If any rules are -// violated, the first error encountered is returned, or nil if there are no violations. -func (m *CheckIdempotentRequest) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on CheckIdempotentRequest with the rules -// defined in the proto definition for this message. If any rules are -// violated, the result is a list of violation errors wrapped in -// CheckIdempotentRequestMultiError, or nil if none found. -func (m *CheckIdempotentRequest) ValidateAll() error { - return m.validate(true) -} - -func (m *CheckIdempotentRequest) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - // no validation rules for Token - - if len(errors) > 0 { - return CheckIdempotentRequestMultiError(errors) - } - - return nil -} - -// CheckIdempotentRequestMultiError is an error wrapping multiple validation -// errors returned by CheckIdempotentRequest.ValidateAll() if the designated -// constraints aren't met. -type CheckIdempotentRequestMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m CheckIdempotentRequestMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m CheckIdempotentRequestMultiError) AllErrors() []error { return m } - -// CheckIdempotentRequestValidationError is the validation error returned by -// CheckIdempotentRequest.Validate if the designated constraints aren't met. -type CheckIdempotentRequestValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e CheckIdempotentRequestValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e CheckIdempotentRequestValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e CheckIdempotentRequestValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e CheckIdempotentRequestValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e CheckIdempotentRequestValidationError) ErrorName() string { - return "CheckIdempotentRequestValidationError" -} - -// Error satisfies the builtin error interface -func (e CheckIdempotentRequestValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sCheckIdempotentRequest.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = CheckIdempotentRequestValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = CheckIdempotentRequestValidationError{} - // Validate checks the field values on IdempotentReply with the rules defined // in the proto definition for this message. If any rules are violated, the // first error encountered is returned, or nil if there are no violations. @@ -2233,44 +2120,103 @@ var _ interface { ErrorName() string } = PermissionValidationError{} -// Validate checks the field values on GetUserByCodeRequest with the rules -// defined in the proto definition for this message. If any rules are -// violated, the first error encountered is returned, or nil if there are no violations. -func (m *GetUserByCodeRequest) Validate() error { +// Validate checks the field values on FindUserRequest with the rules defined +// in the proto definition for this message. If any rules are violated, the +// first error encountered is returned, or nil if there are no violations. +func (m *FindUserRequest) Validate() error { return m.validate(false) } -// ValidateAll checks the field values on GetUserByCodeRequest with the rules +// ValidateAll checks the field values on FindUserRequest with the rules // defined in the proto definition for this message. If any rules are // violated, the result is a list of violation errors wrapped in -// GetUserByCodeRequestMultiError, or nil if none found. -func (m *GetUserByCodeRequest) ValidateAll() error { +// FindUserRequestMultiError, or nil if none found. +func (m *FindUserRequest) ValidateAll() error { return m.validate(true) } -func (m *GetUserByCodeRequest) validate(all bool) error { +func (m *FindUserRequest) validate(all bool) error { if m == nil { return nil } var errors []error - // no validation rules for Code + if all { + switch v := interface{}(m.GetPage()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, FindUserRequestValidationError{ + field: "Page", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, FindUserRequestValidationError{ + field: "Page", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetPage()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return FindUserRequestValidationError{ + field: "Page", + reason: "embedded message failed validation", + cause: err, + } + } + } + + if m.StartCreatedAt != nil { + // no validation rules for StartCreatedAt + } + + if m.EndCreatedAt != nil { + // no validation rules for EndCreatedAt + } + + if m.StartUpdatedAt != nil { + // no validation rules for StartUpdatedAt + } + + if m.EndUpdatedAt != nil { + // no validation rules for EndUpdatedAt + } + + if m.Username != nil { + // no validation rules for Username + } + + if m.Code != nil { + // no validation rules for Code + } + + if m.Platform != nil { + // no validation rules for Platform + } + + if m.Locked != nil { + // no validation rules for Locked + } if len(errors) > 0 { - return GetUserByCodeRequestMultiError(errors) + return FindUserRequestMultiError(errors) } return nil } -// GetUserByCodeRequestMultiError is an error wrapping multiple validation -// errors returned by GetUserByCodeRequest.ValidateAll() if the designated -// constraints aren't met. -type GetUserByCodeRequestMultiError []error +// FindUserRequestMultiError is an error wrapping multiple validation errors +// returned by FindUserRequest.ValidateAll() if the designated constraints +// aren't met. +type FindUserRequestMultiError []error // Error returns a concatenation of all the error messages it wraps. -func (m GetUserByCodeRequestMultiError) Error() string { +func (m FindUserRequestMultiError) Error() string { var msgs []string for _, err := range m { msgs = append(msgs, err.Error()) @@ -2279,11 +2225,11 @@ func (m GetUserByCodeRequestMultiError) Error() string { } // AllErrors returns a list of validation violation errors. -func (m GetUserByCodeRequestMultiError) AllErrors() []error { return m } +func (m FindUserRequestMultiError) AllErrors() []error { return m } -// GetUserByCodeRequestValidationError is the validation error returned by -// GetUserByCodeRequest.Validate if the designated constraints aren't met. -type GetUserByCodeRequestValidationError struct { +// FindUserRequestValidationError is the validation error returned by +// FindUserRequest.Validate if the designated constraints aren't met. +type FindUserRequestValidationError struct { field string reason string cause error @@ -2291,24 +2237,22 @@ type GetUserByCodeRequestValidationError struct { } // Field function returns field value. -func (e GetUserByCodeRequestValidationError) Field() string { return e.field } +func (e FindUserRequestValidationError) Field() string { return e.field } // Reason function returns reason value. -func (e GetUserByCodeRequestValidationError) Reason() string { return e.reason } +func (e FindUserRequestValidationError) Reason() string { return e.reason } // Cause function returns cause value. -func (e GetUserByCodeRequestValidationError) Cause() error { return e.cause } +func (e FindUserRequestValidationError) Cause() error { return e.cause } // Key function returns key value. -func (e GetUserByCodeRequestValidationError) Key() bool { return e.key } +func (e FindUserRequestValidationError) Key() bool { return e.key } // ErrorName returns error name. -func (e GetUserByCodeRequestValidationError) ErrorName() string { - return "GetUserByCodeRequestValidationError" -} +func (e FindUserRequestValidationError) ErrorName() string { return "FindUserRequestValidationError" } // Error satisfies the builtin error interface -func (e GetUserByCodeRequestValidationError) Error() string { +func (e FindUserRequestValidationError) Error() string { cause := "" if e.cause != nil { cause = fmt.Sprintf(" | caused by: %v", e.cause) @@ -2320,14 +2264,14 @@ func (e GetUserByCodeRequestValidationError) Error() string { } return fmt.Sprintf( - "invalid %sGetUserByCodeRequest.%s: %s%s", + "invalid %sFindUserRequest.%s: %s%s", key, e.field, e.reason, cause) } -var _ error = GetUserByCodeRequestValidationError{} +var _ error = FindUserRequestValidationError{} var _ interface { Field() string @@ -2335,24 +2279,24 @@ var _ interface { Key() bool Cause() error ErrorName() string -} = GetUserByCodeRequestValidationError{} +} = FindUserRequestValidationError{} -// Validate checks the field values on GetUserByCodeReply with the rules -// defined in the proto definition for this message. If any rules are -// violated, the first error encountered is returned, or nil if there are no violations. -func (m *GetUserByCodeReply) Validate() error { +// Validate checks the field values on FindUserReply with the rules defined in +// the proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. +func (m *FindUserReply) Validate() error { return m.validate(false) } -// ValidateAll checks the field values on GetUserByCodeReply with the rules -// defined in the proto definition for this message. If any rules are -// violated, the result is a list of violation errors wrapped in -// GetUserByCodeReplyMultiError, or nil if none found. -func (m *GetUserByCodeReply) ValidateAll() error { +// ValidateAll checks the field values on FindUserReply with the rules defined +// in the proto definition for this message. If any rules are violated, the +// result is a list of violation errors wrapped in FindUserReplyMultiError, or +// nil if none found. +func (m *FindUserReply) ValidateAll() error { return m.validate(true) } -func (m *GetUserByCodeReply) validate(all bool) error { +func (m *FindUserReply) validate(all bool) error { if m == nil { return nil } @@ -2360,48 +2304,82 @@ func (m *GetUserByCodeReply) validate(all bool) error { var errors []error if all { - switch v := interface{}(m.GetUser()).(type) { + switch v := interface{}(m.GetPage()).(type) { case interface{ ValidateAll() error }: if err := v.ValidateAll(); err != nil { - errors = append(errors, GetUserByCodeReplyValidationError{ - field: "User", + errors = append(errors, FindUserReplyValidationError{ + field: "Page", reason: "embedded message failed validation", cause: err, }) } case interface{ Validate() error }: if err := v.Validate(); err != nil { - errors = append(errors, GetUserByCodeReplyValidationError{ - field: "User", + errors = append(errors, FindUserReplyValidationError{ + field: "Page", reason: "embedded message failed validation", cause: err, }) } } - } else if v, ok := interface{}(m.GetUser()).(interface{ Validate() error }); ok { + } else if v, ok := interface{}(m.GetPage()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { - return GetUserByCodeReplyValidationError{ - field: "User", + return FindUserReplyValidationError{ + field: "Page", reason: "embedded message failed validation", cause: err, } } } + for idx, item := range m.GetList() { + _, _ = idx, item + + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, FindUserReplyValidationError{ + field: fmt.Sprintf("List[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, FindUserReplyValidationError{ + field: fmt.Sprintf("List[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return FindUserReplyValidationError{ + field: fmt.Sprintf("List[%v]", idx), + reason: "embedded message failed validation", + cause: err, + } + } + } + + } + if len(errors) > 0 { - return GetUserByCodeReplyMultiError(errors) + return FindUserReplyMultiError(errors) } return nil } -// GetUserByCodeReplyMultiError is an error wrapping multiple validation errors -// returned by GetUserByCodeReply.ValidateAll() if the designated constraints +// FindUserReplyMultiError is an error wrapping multiple validation errors +// returned by FindUserReply.ValidateAll() if the designated constraints // aren't met. -type GetUserByCodeReplyMultiError []error +type FindUserReplyMultiError []error // Error returns a concatenation of all the error messages it wraps. -func (m GetUserByCodeReplyMultiError) Error() string { +func (m FindUserReplyMultiError) Error() string { var msgs []string for _, err := range m { msgs = append(msgs, err.Error()) @@ -2410,11 +2388,11 @@ func (m GetUserByCodeReplyMultiError) Error() string { } // AllErrors returns a list of validation violation errors. -func (m GetUserByCodeReplyMultiError) AllErrors() []error { return m } +func (m FindUserReplyMultiError) AllErrors() []error { return m } -// GetUserByCodeReplyValidationError is the validation error returned by -// GetUserByCodeReply.Validate if the designated constraints aren't met. -type GetUserByCodeReplyValidationError struct { +// FindUserReplyValidationError is the validation error returned by +// FindUserReply.Validate if the designated constraints aren't met. +type FindUserReplyValidationError struct { field string reason string cause error @@ -2422,24 +2400,22 @@ type GetUserByCodeReplyValidationError struct { } // Field function returns field value. -func (e GetUserByCodeReplyValidationError) Field() string { return e.field } +func (e FindUserReplyValidationError) Field() string { return e.field } // Reason function returns reason value. -func (e GetUserByCodeReplyValidationError) Reason() string { return e.reason } +func (e FindUserReplyValidationError) Reason() string { return e.reason } // Cause function returns cause value. -func (e GetUserByCodeReplyValidationError) Cause() error { return e.cause } +func (e FindUserReplyValidationError) Cause() error { return e.cause } // Key function returns key value. -func (e GetUserByCodeReplyValidationError) Key() bool { return e.key } +func (e FindUserReplyValidationError) Key() bool { return e.key } // ErrorName returns error name. -func (e GetUserByCodeReplyValidationError) ErrorName() string { - return "GetUserByCodeReplyValidationError" -} +func (e FindUserReplyValidationError) ErrorName() string { return "FindUserReplyValidationError" } // Error satisfies the builtin error interface -func (e GetUserByCodeReplyValidationError) Error() string { +func (e FindUserReplyValidationError) Error() string { cause := "" if e.cause != nil { cause = fmt.Sprintf(" | caused by: %v", e.cause) @@ -2451,14 +2427,14 @@ func (e GetUserByCodeReplyValidationError) Error() string { } return fmt.Sprintf( - "invalid %sGetUserByCodeReply.%s: %s%s", + "invalid %sFindUserReply.%s: %s%s", key, e.field, e.reason, cause) } -var _ error = GetUserByCodeReplyValidationError{} +var _ error = FindUserReplyValidationError{} var _ interface { Field() string @@ -2466,81 +2442,38 @@ var _ interface { Key() bool Cause() error ErrorName() string -} = GetUserByCodeReplyValidationError{} +} = FindUserReplyValidationError{} -// Validate checks the field values on FindUserRequest with the rules defined +// Validate checks the field values on UpdateUserRequest with the rules defined // in the proto definition for this message. If any rules are violated, the // first error encountered is returned, or nil if there are no violations. -func (m *FindUserRequest) Validate() error { +func (m *UpdateUserRequest) Validate() error { return m.validate(false) } -// ValidateAll checks the field values on FindUserRequest with the rules +// ValidateAll checks the field values on UpdateUserRequest with the rules // defined in the proto definition for this message. If any rules are // violated, the result is a list of violation errors wrapped in -// FindUserRequestMultiError, or nil if none found. -func (m *FindUserRequest) ValidateAll() error { +// UpdateUserRequestMultiError, or nil if none found. +func (m *UpdateUserRequest) ValidateAll() error { return m.validate(true) } -func (m *FindUserRequest) validate(all bool) error { +func (m *UpdateUserRequest) validate(all bool) error { if m == nil { return nil } var errors []error - if all { - switch v := interface{}(m.GetPage()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, FindUserRequestValidationError{ - field: "Page", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, FindUserRequestValidationError{ - field: "Page", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetPage()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return FindUserRequestValidationError{ - field: "Page", - reason: "embedded message failed validation", - cause: err, - } - } - } - - if m.StartCreatedAt != nil { - // no validation rules for StartCreatedAt - } - - if m.EndCreatedAt != nil { - // no validation rules for EndCreatedAt - } - - if m.StartUpdatedAt != nil { - // no validation rules for StartUpdatedAt - } - - if m.EndUpdatedAt != nil { - // no validation rules for EndUpdatedAt - } + // no validation rules for Id if m.Username != nil { // no validation rules for Username } - if m.Code != nil { - // no validation rules for Code + if m.Password != nil { + // no validation rules for Password } if m.Platform != nil { @@ -2551,20 +2484,32 @@ func (m *FindUserRequest) validate(all bool) error { // no validation rules for Locked } + if m.LockExpireTime != nil { + // no validation rules for LockExpireTime + } + + if m.Action != nil { + // no validation rules for Action + } + + if m.RoleId != nil { + // no validation rules for RoleId + } + if len(errors) > 0 { - return FindUserRequestMultiError(errors) + return UpdateUserRequestMultiError(errors) } return nil } -// FindUserRequestMultiError is an error wrapping multiple validation errors -// returned by FindUserRequest.ValidateAll() if the designated constraints +// UpdateUserRequestMultiError is an error wrapping multiple validation errors +// returned by UpdateUserRequest.ValidateAll() if the designated constraints // aren't met. -type FindUserRequestMultiError []error +type UpdateUserRequestMultiError []error // Error returns a concatenation of all the error messages it wraps. -func (m FindUserRequestMultiError) Error() string { +func (m UpdateUserRequestMultiError) Error() string { var msgs []string for _, err := range m { msgs = append(msgs, err.Error()) @@ -2573,11 +2518,11 @@ func (m FindUserRequestMultiError) Error() string { } // AllErrors returns a list of validation violation errors. -func (m FindUserRequestMultiError) AllErrors() []error { return m } +func (m UpdateUserRequestMultiError) AllErrors() []error { return m } -// FindUserRequestValidationError is the validation error returned by -// FindUserRequest.Validate if the designated constraints aren't met. -type FindUserRequestValidationError struct { +// UpdateUserRequestValidationError is the validation error returned by +// UpdateUserRequest.Validate if the designated constraints aren't met. +type UpdateUserRequestValidationError struct { field string reason string cause error @@ -2585,22 +2530,24 @@ type FindUserRequestValidationError struct { } // Field function returns field value. -func (e FindUserRequestValidationError) Field() string { return e.field } +func (e UpdateUserRequestValidationError) Field() string { return e.field } // Reason function returns reason value. -func (e FindUserRequestValidationError) Reason() string { return e.reason } +func (e UpdateUserRequestValidationError) Reason() string { return e.reason } // Cause function returns cause value. -func (e FindUserRequestValidationError) Cause() error { return e.cause } +func (e UpdateUserRequestValidationError) Cause() error { return e.cause } // Key function returns key value. -func (e FindUserRequestValidationError) Key() bool { return e.key } +func (e UpdateUserRequestValidationError) Key() bool { return e.key } // ErrorName returns error name. -func (e FindUserRequestValidationError) ErrorName() string { return "FindUserRequestValidationError" } +func (e UpdateUserRequestValidationError) ErrorName() string { + return "UpdateUserRequestValidationError" +} // Error satisfies the builtin error interface -func (e FindUserRequestValidationError) Error() string { +func (e UpdateUserRequestValidationError) Error() string { cause := "" if e.cause != nil { cause = fmt.Sprintf(" | caused by: %v", e.cause) @@ -2612,14 +2559,14 @@ func (e FindUserRequestValidationError) Error() string { } return fmt.Sprintf( - "invalid %sFindUserRequest.%s: %s%s", + "invalid %sUpdateUserRequest.%s: %s%s", key, e.field, e.reason, cause) } -var _ error = FindUserRequestValidationError{} +var _ error = UpdateUserRequestValidationError{} var _ interface { Field() string @@ -2627,107 +2574,56 @@ var _ interface { Key() bool Cause() error ErrorName() string -} = FindUserRequestValidationError{} +} = UpdateUserRequestValidationError{} -// Validate checks the field values on FindUserReply with the rules defined in -// the proto definition for this message. If any rules are violated, the first -// error encountered is returned, or nil if there are no violations. -func (m *FindUserReply) Validate() error { +// Validate checks the field values on PermissionRequest with the rules defined +// in the proto definition for this message. If any rules are violated, the +// first error encountered is returned, or nil if there are no violations. +func (m *PermissionRequest) Validate() error { return m.validate(false) } -// ValidateAll checks the field values on FindUserReply with the rules defined -// in the proto definition for this message. If any rules are violated, the -// result is a list of violation errors wrapped in FindUserReplyMultiError, or -// nil if none found. -func (m *FindUserReply) ValidateAll() error { +// ValidateAll checks the field values on PermissionRequest with the rules +// defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// PermissionRequestMultiError, or nil if none found. +func (m *PermissionRequest) ValidateAll() error { return m.validate(true) } -func (m *FindUserReply) validate(all bool) error { +func (m *PermissionRequest) validate(all bool) error { if m == nil { return nil } var errors []error - if all { - switch v := interface{}(m.GetPage()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, FindUserReplyValidationError{ - field: "Page", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, FindUserReplyValidationError{ - field: "Page", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetPage()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return FindUserReplyValidationError{ - field: "Page", - reason: "embedded message failed validation", - cause: err, - } - } + if m.Resource != nil { + // no validation rules for Resource } - for idx, item := range m.GetList() { - _, _ = idx, item - - if all { - switch v := interface{}(item).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, FindUserReplyValidationError{ - field: fmt.Sprintf("List[%v]", idx), - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, FindUserReplyValidationError{ - field: fmt.Sprintf("List[%v]", idx), - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return FindUserReplyValidationError{ - field: fmt.Sprintf("List[%v]", idx), - reason: "embedded message failed validation", - cause: err, - } - } - } + if m.Method != nil { + // no validation rules for Method + } + if m.Uri != nil { + // no validation rules for Uri } if len(errors) > 0 { - return FindUserReplyMultiError(errors) + return PermissionRequestMultiError(errors) } return nil } -// FindUserReplyMultiError is an error wrapping multiple validation errors -// returned by FindUserReply.ValidateAll() if the designated constraints +// PermissionRequestMultiError is an error wrapping multiple validation errors +// returned by PermissionRequest.ValidateAll() if the designated constraints // aren't met. -type FindUserReplyMultiError []error +type PermissionRequestMultiError []error // Error returns a concatenation of all the error messages it wraps. -func (m FindUserReplyMultiError) Error() string { +func (m PermissionRequestMultiError) Error() string { var msgs []string for _, err := range m { msgs = append(msgs, err.Error()) @@ -2736,11 +2632,11 @@ func (m FindUserReplyMultiError) Error() string { } // AllErrors returns a list of validation violation errors. -func (m FindUserReplyMultiError) AllErrors() []error { return m } +func (m PermissionRequestMultiError) AllErrors() []error { return m } -// FindUserReplyValidationError is the validation error returned by -// FindUserReply.Validate if the designated constraints aren't met. -type FindUserReplyValidationError struct { +// PermissionRequestValidationError is the validation error returned by +// PermissionRequest.Validate if the designated constraints aren't met. +type PermissionRequestValidationError struct { field string reason string cause error @@ -2748,22 +2644,24 @@ type FindUserReplyValidationError struct { } // Field function returns field value. -func (e FindUserReplyValidationError) Field() string { return e.field } +func (e PermissionRequestValidationError) Field() string { return e.field } // Reason function returns reason value. -func (e FindUserReplyValidationError) Reason() string { return e.reason } +func (e PermissionRequestValidationError) Reason() string { return e.reason } // Cause function returns cause value. -func (e FindUserReplyValidationError) Cause() error { return e.cause } +func (e PermissionRequestValidationError) Cause() error { return e.cause } // Key function returns key value. -func (e FindUserReplyValidationError) Key() bool { return e.key } +func (e PermissionRequestValidationError) Key() bool { return e.key } // ErrorName returns error name. -func (e FindUserReplyValidationError) ErrorName() string { return "FindUserReplyValidationError" } +func (e PermissionRequestValidationError) ErrorName() string { + return "PermissionRequestValidationError" +} // Error satisfies the builtin error interface -func (e FindUserReplyValidationError) Error() string { +func (e PermissionRequestValidationError) Error() string { cause := "" if e.cause != nil { cause = fmt.Sprintf(" | caused by: %v", e.cause) @@ -2775,14 +2673,14 @@ func (e FindUserReplyValidationError) Error() string { } return fmt.Sprintf( - "invalid %sFindUserReply.%s: %s%s", + "invalid %sPermissionRequest.%s: %s%s", key, e.field, e.reason, cause) } -var _ error = FindUserReplyValidationError{} +var _ error = PermissionRequestValidationError{} var _ interface { Field() string @@ -2790,270 +2688,24 @@ var _ interface { Key() bool Cause() error ErrorName() string -} = FindUserReplyValidationError{} +} = PermissionRequestValidationError{} -// Validate checks the field values on UpdateUserRequest with the rules defined -// in the proto definition for this message. If any rules are violated, the -// first error encountered is returned, or nil if there are no violations. -func (m *UpdateUserRequest) Validate() error { +// Validate checks the field values on CreateActionRequest with the rules +// defined in the proto definition for this message. If any rules are +// violated, the first error encountered is returned, or nil if there are no violations. +func (m *CreateActionRequest) Validate() error { return m.validate(false) } -// ValidateAll checks the field values on UpdateUserRequest with the rules +// ValidateAll checks the field values on CreateActionRequest with the rules // defined in the proto definition for this message. If any rules are // violated, the result is a list of violation errors wrapped in -// UpdateUserRequestMultiError, or nil if none found. -func (m *UpdateUserRequest) ValidateAll() error { +// CreateActionRequestMultiError, or nil if none found. +func (m *CreateActionRequest) ValidateAll() error { return m.validate(true) } -func (m *UpdateUserRequest) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - // no validation rules for Id - - if m.Username != nil { - // no validation rules for Username - } - - if m.Password != nil { - // no validation rules for Password - } - - if m.Platform != nil { - // no validation rules for Platform - } - - if m.Locked != nil { - // no validation rules for Locked - } - - if m.LockExpireTime != nil { - // no validation rules for LockExpireTime - } - - if m.Action != nil { - // no validation rules for Action - } - - if m.RoleId != nil { - // no validation rules for RoleId - } - - if len(errors) > 0 { - return UpdateUserRequestMultiError(errors) - } - - return nil -} - -// UpdateUserRequestMultiError is an error wrapping multiple validation errors -// returned by UpdateUserRequest.ValidateAll() if the designated constraints -// aren't met. -type UpdateUserRequestMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m UpdateUserRequestMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m UpdateUserRequestMultiError) AllErrors() []error { return m } - -// UpdateUserRequestValidationError is the validation error returned by -// UpdateUserRequest.Validate if the designated constraints aren't met. -type UpdateUserRequestValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e UpdateUserRequestValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e UpdateUserRequestValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e UpdateUserRequestValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e UpdateUserRequestValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e UpdateUserRequestValidationError) ErrorName() string { - return "UpdateUserRequestValidationError" -} - -// Error satisfies the builtin error interface -func (e UpdateUserRequestValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sUpdateUserRequest.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = UpdateUserRequestValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = UpdateUserRequestValidationError{} - -// Validate checks the field values on PermissionRequest with the rules defined -// in the proto definition for this message. If any rules are violated, the -// first error encountered is returned, or nil if there are no violations. -func (m *PermissionRequest) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on PermissionRequest with the rules -// defined in the proto definition for this message. If any rules are -// violated, the result is a list of violation errors wrapped in -// PermissionRequestMultiError, or nil if none found. -func (m *PermissionRequest) ValidateAll() error { - return m.validate(true) -} - -func (m *PermissionRequest) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - if m.Resource != nil { - // no validation rules for Resource - } - - if m.Method != nil { - // no validation rules for Method - } - - if m.Uri != nil { - // no validation rules for Uri - } - - if len(errors) > 0 { - return PermissionRequestMultiError(errors) - } - - return nil -} - -// PermissionRequestMultiError is an error wrapping multiple validation errors -// returned by PermissionRequest.ValidateAll() if the designated constraints -// aren't met. -type PermissionRequestMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m PermissionRequestMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m PermissionRequestMultiError) AllErrors() []error { return m } - -// PermissionRequestValidationError is the validation error returned by -// PermissionRequest.Validate if the designated constraints aren't met. -type PermissionRequestValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e PermissionRequestValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e PermissionRequestValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e PermissionRequestValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e PermissionRequestValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e PermissionRequestValidationError) ErrorName() string { - return "PermissionRequestValidationError" -} - -// Error satisfies the builtin error interface -func (e PermissionRequestValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sPermissionRequest.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = PermissionRequestValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = PermissionRequestValidationError{} - -// Validate checks the field values on CreateActionRequest with the rules -// defined in the proto definition for this message. If any rules are -// violated, the first error encountered is returned, or nil if there are no violations. -func (m *CreateActionRequest) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on CreateActionRequest with the rules -// defined in the proto definition for this message. If any rules are -// violated, the result is a list of violation errors wrapped in -// CreateActionRequestMultiError, or nil if none found. -func (m *CreateActionRequest) ValidateAll() error { - return m.validate(true) -} - -func (m *CreateActionRequest) validate(all bool) error { +func (m *CreateActionRequest) validate(all bool) error { if m == nil { return nil } @@ -3773,291 +3425,14 @@ func (m *FindRoleRequest) validate(all bool) error { } } else if v, ok := interface{}(m.GetPage()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { - return FindRoleRequestValidationError{ - field: "Page", - reason: "embedded message failed validation", - cause: err, - } - } - } - - if m.Name != nil { - // no validation rules for Name - } - - if m.Word != nil { - // no validation rules for Word - } - - if m.Action != nil { - // no validation rules for Action - } - - if len(errors) > 0 { - return FindRoleRequestMultiError(errors) - } - - return nil -} - -// FindRoleRequestMultiError is an error wrapping multiple validation errors -// returned by FindRoleRequest.ValidateAll() if the designated constraints -// aren't met. -type FindRoleRequestMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m FindRoleRequestMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m FindRoleRequestMultiError) AllErrors() []error { return m } - -// FindRoleRequestValidationError is the validation error returned by -// FindRoleRequest.Validate if the designated constraints aren't met. -type FindRoleRequestValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e FindRoleRequestValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e FindRoleRequestValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e FindRoleRequestValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e FindRoleRequestValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e FindRoleRequestValidationError) ErrorName() string { return "FindRoleRequestValidationError" } - -// Error satisfies the builtin error interface -func (e FindRoleRequestValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sFindRoleRequest.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = FindRoleRequestValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = FindRoleRequestValidationError{} - -// Validate checks the field values on FindRoleReply with the rules defined in -// the proto definition for this message. If any rules are violated, the first -// error encountered is returned, or nil if there are no violations. -func (m *FindRoleReply) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on FindRoleReply with the rules defined -// in the proto definition for this message. If any rules are violated, the -// result is a list of violation errors wrapped in FindRoleReplyMultiError, or -// nil if none found. -func (m *FindRoleReply) ValidateAll() error { - return m.validate(true) -} - -func (m *FindRoleReply) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - if all { - switch v := interface{}(m.GetPage()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, FindRoleReplyValidationError{ - field: "Page", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, FindRoleReplyValidationError{ - field: "Page", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetPage()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return FindRoleReplyValidationError{ - field: "Page", - reason: "embedded message failed validation", - cause: err, - } - } - } - - for idx, item := range m.GetList() { - _, _ = idx, item - - if all { - switch v := interface{}(item).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, FindRoleReplyValidationError{ - field: fmt.Sprintf("List[%v]", idx), - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, FindRoleReplyValidationError{ - field: fmt.Sprintf("List[%v]", idx), - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return FindRoleReplyValidationError{ - field: fmt.Sprintf("List[%v]", idx), - reason: "embedded message failed validation", - cause: err, - } - } - } - - } - - if len(errors) > 0 { - return FindRoleReplyMultiError(errors) - } - - return nil -} - -// FindRoleReplyMultiError is an error wrapping multiple validation errors -// returned by FindRoleReply.ValidateAll() if the designated constraints -// aren't met. -type FindRoleReplyMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m FindRoleReplyMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m FindRoleReplyMultiError) AllErrors() []error { return m } - -// FindRoleReplyValidationError is the validation error returned by -// FindRoleReply.Validate if the designated constraints aren't met. -type FindRoleReplyValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e FindRoleReplyValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e FindRoleReplyValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e FindRoleReplyValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e FindRoleReplyValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e FindRoleReplyValidationError) ErrorName() string { return "FindRoleReplyValidationError" } - -// Error satisfies the builtin error interface -func (e FindRoleReplyValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sFindRoleReply.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = FindRoleReplyValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = FindRoleReplyValidationError{} - -// Validate checks the field values on UpdateRoleRequest with the rules defined -// in the proto definition for this message. If any rules are violated, the -// first error encountered is returned, or nil if there are no violations. -func (m *UpdateRoleRequest) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on UpdateRoleRequest with the rules -// defined in the proto definition for this message. If any rules are -// violated, the result is a list of violation errors wrapped in -// UpdateRoleRequestMultiError, or nil if none found. -func (m *UpdateRoleRequest) ValidateAll() error { - return m.validate(true) -} - -func (m *UpdateRoleRequest) validate(all bool) error { - if m == nil { - return nil + return FindRoleRequestValidationError{ + field: "Page", + reason: "embedded message failed validation", + cause: err, + } + } } - var errors []error - - // no validation rules for Id - if m.Name != nil { // no validation rules for Name } @@ -4071,19 +3446,19 @@ func (m *UpdateRoleRequest) validate(all bool) error { } if len(errors) > 0 { - return UpdateRoleRequestMultiError(errors) + return FindRoleRequestMultiError(errors) } return nil } -// UpdateRoleRequestMultiError is an error wrapping multiple validation errors -// returned by UpdateRoleRequest.ValidateAll() if the designated constraints +// FindRoleRequestMultiError is an error wrapping multiple validation errors +// returned by FindRoleRequest.ValidateAll() if the designated constraints // aren't met. -type UpdateRoleRequestMultiError []error +type FindRoleRequestMultiError []error // Error returns a concatenation of all the error messages it wraps. -func (m UpdateRoleRequestMultiError) Error() string { +func (m FindRoleRequestMultiError) Error() string { var msgs []string for _, err := range m { msgs = append(msgs, err.Error()) @@ -4092,11 +3467,11 @@ func (m UpdateRoleRequestMultiError) Error() string { } // AllErrors returns a list of validation violation errors. -func (m UpdateRoleRequestMultiError) AllErrors() []error { return m } +func (m FindRoleRequestMultiError) AllErrors() []error { return m } -// UpdateRoleRequestValidationError is the validation error returned by -// UpdateRoleRequest.Validate if the designated constraints aren't met. -type UpdateRoleRequestValidationError struct { +// FindRoleRequestValidationError is the validation error returned by +// FindRoleRequest.Validate if the designated constraints aren't met. +type FindRoleRequestValidationError struct { field string reason string cause error @@ -4104,24 +3479,22 @@ type UpdateRoleRequestValidationError struct { } // Field function returns field value. -func (e UpdateRoleRequestValidationError) Field() string { return e.field } +func (e FindRoleRequestValidationError) Field() string { return e.field } // Reason function returns reason value. -func (e UpdateRoleRequestValidationError) Reason() string { return e.reason } +func (e FindRoleRequestValidationError) Reason() string { return e.reason } // Cause function returns cause value. -func (e UpdateRoleRequestValidationError) Cause() error { return e.cause } +func (e FindRoleRequestValidationError) Cause() error { return e.cause } // Key function returns key value. -func (e UpdateRoleRequestValidationError) Key() bool { return e.key } +func (e FindRoleRequestValidationError) Key() bool { return e.key } // ErrorName returns error name. -func (e UpdateRoleRequestValidationError) ErrorName() string { - return "UpdateRoleRequestValidationError" -} +func (e FindRoleRequestValidationError) ErrorName() string { return "FindRoleRequestValidationError" } // Error satisfies the builtin error interface -func (e UpdateRoleRequestValidationError) Error() string { +func (e FindRoleRequestValidationError) Error() string { cause := "" if e.cause != nil { cause = fmt.Sprintf(" | caused by: %v", e.cause) @@ -4133,14 +3506,14 @@ func (e UpdateRoleRequestValidationError) Error() string { } return fmt.Sprintf( - "invalid %sUpdateRoleRequest.%s: %s%s", + "invalid %sFindRoleRequest.%s: %s%s", key, e.field, e.reason, cause) } -var _ error = UpdateRoleRequestValidationError{} +var _ error = FindRoleRequestValidationError{} var _ interface { Field() string @@ -4148,70 +3521,107 @@ var _ interface { Key() bool Cause() error ErrorName() string -} = UpdateRoleRequestValidationError{} +} = FindRoleRequestValidationError{} -// Validate checks the field values on CreateUserGroupRequest with the rules -// defined in the proto definition for this message. If any rules are -// violated, the first error encountered is returned, or nil if there are no violations. -func (m *CreateUserGroupRequest) Validate() error { +// Validate checks the field values on FindRoleReply with the rules defined in +// the proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. +func (m *FindRoleReply) Validate() error { return m.validate(false) } -// ValidateAll checks the field values on CreateUserGroupRequest with the rules -// defined in the proto definition for this message. If any rules are -// violated, the result is a list of violation errors wrapped in -// CreateUserGroupRequestMultiError, or nil if none found. -func (m *CreateUserGroupRequest) ValidateAll() error { +// ValidateAll checks the field values on FindRoleReply with the rules defined +// in the proto definition for this message. If any rules are violated, the +// result is a list of violation errors wrapped in FindRoleReplyMultiError, or +// nil if none found. +func (m *FindRoleReply) ValidateAll() error { return m.validate(true) } -func (m *CreateUserGroupRequest) validate(all bool) error { +func (m *FindRoleReply) validate(all bool) error { if m == nil { return nil } var errors []error - if utf8.RuneCountInString(m.GetName()) > 50 { - err := CreateUserGroupRequestValidationError{ - field: "Name", - reason: "value length must be at most 50 runes", + if all { + switch v := interface{}(m.GetPage()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, FindRoleReplyValidationError{ + field: "Page", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, FindRoleReplyValidationError{ + field: "Page", + reason: "embedded message failed validation", + cause: err, + }) + } } - if !all { - return err + } else if v, ok := interface{}(m.GetPage()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return FindRoleReplyValidationError{ + field: "Page", + reason: "embedded message failed validation", + cause: err, + } } - errors = append(errors, err) } - if utf8.RuneCountInString(m.GetWord()) > 50 { - err := CreateUserGroupRequestValidationError{ - field: "Word", - reason: "value length must be at most 50 runes", - } - if !all { - return err + for idx, item := range m.GetList() { + _, _ = idx, item + + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, FindRoleReplyValidationError{ + field: fmt.Sprintf("List[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, FindRoleReplyValidationError{ + field: fmt.Sprintf("List[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return FindRoleReplyValidationError{ + field: fmt.Sprintf("List[%v]", idx), + reason: "embedded message failed validation", + cause: err, + } + } } - errors = append(errors, err) - } - if m.Action != nil { - // no validation rules for Action } if len(errors) > 0 { - return CreateUserGroupRequestMultiError(errors) + return FindRoleReplyMultiError(errors) } return nil } -// CreateUserGroupRequestMultiError is an error wrapping multiple validation -// errors returned by CreateUserGroupRequest.ValidateAll() if the designated -// constraints aren't met. -type CreateUserGroupRequestMultiError []error +// FindRoleReplyMultiError is an error wrapping multiple validation errors +// returned by FindRoleReply.ValidateAll() if the designated constraints +// aren't met. +type FindRoleReplyMultiError []error // Error returns a concatenation of all the error messages it wraps. -func (m CreateUserGroupRequestMultiError) Error() string { +func (m FindRoleReplyMultiError) Error() string { var msgs []string for _, err := range m { msgs = append(msgs, err.Error()) @@ -4220,11 +3630,11 @@ func (m CreateUserGroupRequestMultiError) Error() string { } // AllErrors returns a list of validation violation errors. -func (m CreateUserGroupRequestMultiError) AllErrors() []error { return m } +func (m FindRoleReplyMultiError) AllErrors() []error { return m } -// CreateUserGroupRequestValidationError is the validation error returned by -// CreateUserGroupRequest.Validate if the designated constraints aren't met. -type CreateUserGroupRequestValidationError struct { +// FindRoleReplyValidationError is the validation error returned by +// FindRoleReply.Validate if the designated constraints aren't met. +type FindRoleReplyValidationError struct { field string reason string cause error @@ -4232,24 +3642,22 @@ type CreateUserGroupRequestValidationError struct { } // Field function returns field value. -func (e CreateUserGroupRequestValidationError) Field() string { return e.field } +func (e FindRoleReplyValidationError) Field() string { return e.field } // Reason function returns reason value. -func (e CreateUserGroupRequestValidationError) Reason() string { return e.reason } +func (e FindRoleReplyValidationError) Reason() string { return e.reason } // Cause function returns cause value. -func (e CreateUserGroupRequestValidationError) Cause() error { return e.cause } +func (e FindRoleReplyValidationError) Cause() error { return e.cause } // Key function returns key value. -func (e CreateUserGroupRequestValidationError) Key() bool { return e.key } +func (e FindRoleReplyValidationError) Key() bool { return e.key } // ErrorName returns error name. -func (e CreateUserGroupRequestValidationError) ErrorName() string { - return "CreateUserGroupRequestValidationError" -} +func (e FindRoleReplyValidationError) ErrorName() string { return "FindRoleReplyValidationError" } // Error satisfies the builtin error interface -func (e CreateUserGroupRequestValidationError) Error() string { +func (e FindRoleReplyValidationError) Error() string { cause := "" if e.cause != nil { cause = fmt.Sprintf(" | caused by: %v", e.cause) @@ -4261,14 +3669,14 @@ func (e CreateUserGroupRequestValidationError) Error() string { } return fmt.Sprintf( - "invalid %sCreateUserGroupRequest.%s: %s%s", + "invalid %sFindRoleReply.%s: %s%s", key, e.field, e.reason, cause) } -var _ error = CreateUserGroupRequestValidationError{} +var _ error = FindRoleReplyValidationError{} var _ interface { Field() string @@ -4276,58 +3684,31 @@ var _ interface { Key() bool Cause() error ErrorName() string -} = CreateUserGroupRequestValidationError{} +} = FindRoleReplyValidationError{} -// Validate checks the field values on FindUserGroupRequest with the rules -// defined in the proto definition for this message. If any rules are -// violated, the first error encountered is returned, or nil if there are no violations. -func (m *FindUserGroupRequest) Validate() error { +// Validate checks the field values on UpdateRoleRequest with the rules defined +// in the proto definition for this message. If any rules are violated, the +// first error encountered is returned, or nil if there are no violations. +func (m *UpdateRoleRequest) Validate() error { return m.validate(false) } -// ValidateAll checks the field values on FindUserGroupRequest with the rules +// ValidateAll checks the field values on UpdateRoleRequest with the rules // defined in the proto definition for this message. If any rules are // violated, the result is a list of violation errors wrapped in -// FindUserGroupRequestMultiError, or nil if none found. -func (m *FindUserGroupRequest) ValidateAll() error { +// UpdateRoleRequestMultiError, or nil if none found. +func (m *UpdateRoleRequest) ValidateAll() error { return m.validate(true) } -func (m *FindUserGroupRequest) validate(all bool) error { +func (m *UpdateRoleRequest) validate(all bool) error { if m == nil { return nil } var errors []error - if all { - switch v := interface{}(m.GetPage()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, FindUserGroupRequestValidationError{ - field: "Page", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, FindUserGroupRequestValidationError{ - field: "Page", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetPage()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return FindUserGroupRequestValidationError{ - field: "Page", - reason: "embedded message failed validation", - cause: err, - } - } - } + // no validation rules for Id if m.Name != nil { // no validation rules for Name @@ -4342,19 +3723,19 @@ func (m *FindUserGroupRequest) validate(all bool) error { } if len(errors) > 0 { - return FindUserGroupRequestMultiError(errors) + return UpdateRoleRequestMultiError(errors) } return nil } -// FindUserGroupRequestMultiError is an error wrapping multiple validation -// errors returned by FindUserGroupRequest.ValidateAll() if the designated -// constraints aren't met. -type FindUserGroupRequestMultiError []error +// UpdateRoleRequestMultiError is an error wrapping multiple validation errors +// returned by UpdateRoleRequest.ValidateAll() if the designated constraints +// aren't met. +type UpdateRoleRequestMultiError []error // Error returns a concatenation of all the error messages it wraps. -func (m FindUserGroupRequestMultiError) Error() string { +func (m UpdateRoleRequestMultiError) Error() string { var msgs []string for _, err := range m { msgs = append(msgs, err.Error()) @@ -4363,11 +3744,11 @@ func (m FindUserGroupRequestMultiError) Error() string { } // AllErrors returns a list of validation violation errors. -func (m FindUserGroupRequestMultiError) AllErrors() []error { return m } +func (m UpdateRoleRequestMultiError) AllErrors() []error { return m } -// FindUserGroupRequestValidationError is the validation error returned by -// FindUserGroupRequest.Validate if the designated constraints aren't met. -type FindUserGroupRequestValidationError struct { +// UpdateRoleRequestValidationError is the validation error returned by +// UpdateRoleRequest.Validate if the designated constraints aren't met. +type UpdateRoleRequestValidationError struct { field string reason string cause error @@ -4375,24 +3756,24 @@ type FindUserGroupRequestValidationError struct { } // Field function returns field value. -func (e FindUserGroupRequestValidationError) Field() string { return e.field } +func (e UpdateRoleRequestValidationError) Field() string { return e.field } // Reason function returns reason value. -func (e FindUserGroupRequestValidationError) Reason() string { return e.reason } +func (e UpdateRoleRequestValidationError) Reason() string { return e.reason } // Cause function returns cause value. -func (e FindUserGroupRequestValidationError) Cause() error { return e.cause } +func (e UpdateRoleRequestValidationError) Cause() error { return e.cause } // Key function returns key value. -func (e FindUserGroupRequestValidationError) Key() bool { return e.key } +func (e UpdateRoleRequestValidationError) Key() bool { return e.key } // ErrorName returns error name. -func (e FindUserGroupRequestValidationError) ErrorName() string { - return "FindUserGroupRequestValidationError" +func (e UpdateRoleRequestValidationError) ErrorName() string { + return "UpdateRoleRequestValidationError" } // Error satisfies the builtin error interface -func (e FindUserGroupRequestValidationError) Error() string { +func (e UpdateRoleRequestValidationError) Error() string { cause := "" if e.cause != nil { cause = fmt.Sprintf(" | caused by: %v", e.cause) @@ -4404,14 +3785,14 @@ func (e FindUserGroupRequestValidationError) Error() string { } return fmt.Sprintf( - "invalid %sFindUserGroupRequest.%s: %s%s", + "invalid %sUpdateRoleRequest.%s: %s%s", key, e.field, e.reason, cause) } -var _ error = FindUserGroupRequestValidationError{} +var _ error = UpdateRoleRequestValidationError{} var _ interface { Field() string @@ -4419,107 +3800,70 @@ var _ interface { Key() bool Cause() error ErrorName() string -} = FindUserGroupRequestValidationError{} +} = UpdateRoleRequestValidationError{} -// Validate checks the field values on FindUserGroupReply with the rules +// Validate checks the field values on CreateUserGroupRequest with the rules // defined in the proto definition for this message. If any rules are // violated, the first error encountered is returned, or nil if there are no violations. -func (m *FindUserGroupReply) Validate() error { +func (m *CreateUserGroupRequest) Validate() error { return m.validate(false) } -// ValidateAll checks the field values on FindUserGroupReply with the rules +// ValidateAll checks the field values on CreateUserGroupRequest with the rules // defined in the proto definition for this message. If any rules are // violated, the result is a list of violation errors wrapped in -// FindUserGroupReplyMultiError, or nil if none found. -func (m *FindUserGroupReply) ValidateAll() error { +// CreateUserGroupRequestMultiError, or nil if none found. +func (m *CreateUserGroupRequest) ValidateAll() error { return m.validate(true) } -func (m *FindUserGroupReply) validate(all bool) error { +func (m *CreateUserGroupRequest) validate(all bool) error { if m == nil { return nil } var errors []error - if all { - switch v := interface{}(m.GetPage()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, FindUserGroupReplyValidationError{ - field: "Page", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, FindUserGroupReplyValidationError{ - field: "Page", - reason: "embedded message failed validation", - cause: err, - }) - } + if utf8.RuneCountInString(m.GetName()) > 50 { + err := CreateUserGroupRequestValidationError{ + field: "Name", + reason: "value length must be at most 50 runes", } - } else if v, ok := interface{}(m.GetPage()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return FindUserGroupReplyValidationError{ - field: "Page", - reason: "embedded message failed validation", - cause: err, - } + if !all { + return err } + errors = append(errors, err) } - for idx, item := range m.GetList() { - _, _ = idx, item - - if all { - switch v := interface{}(item).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, FindUserGroupReplyValidationError{ - field: fmt.Sprintf("List[%v]", idx), - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, FindUserGroupReplyValidationError{ - field: fmt.Sprintf("List[%v]", idx), - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return FindUserGroupReplyValidationError{ - field: fmt.Sprintf("List[%v]", idx), - reason: "embedded message failed validation", - cause: err, - } - } + if utf8.RuneCountInString(m.GetWord()) > 50 { + err := CreateUserGroupRequestValidationError{ + field: "Word", + reason: "value length must be at most 50 runes", } + if !all { + return err + } + errors = append(errors, err) + } + if m.Action != nil { + // no validation rules for Action } if len(errors) > 0 { - return FindUserGroupReplyMultiError(errors) + return CreateUserGroupRequestMultiError(errors) } return nil } -// FindUserGroupReplyMultiError is an error wrapping multiple validation errors -// returned by FindUserGroupReply.ValidateAll() if the designated constraints -// aren't met. -type FindUserGroupReplyMultiError []error +// CreateUserGroupRequestMultiError is an error wrapping multiple validation +// errors returned by CreateUserGroupRequest.ValidateAll() if the designated +// constraints aren't met. +type CreateUserGroupRequestMultiError []error // Error returns a concatenation of all the error messages it wraps. -func (m FindUserGroupReplyMultiError) Error() string { +func (m CreateUserGroupRequestMultiError) Error() string { var msgs []string for _, err := range m { msgs = append(msgs, err.Error()) @@ -4528,11 +3872,11 @@ func (m FindUserGroupReplyMultiError) Error() string { } // AllErrors returns a list of validation violation errors. -func (m FindUserGroupReplyMultiError) AllErrors() []error { return m } +func (m CreateUserGroupRequestMultiError) AllErrors() []error { return m } -// FindUserGroupReplyValidationError is the validation error returned by -// FindUserGroupReply.Validate if the designated constraints aren't met. -type FindUserGroupReplyValidationError struct { +// CreateUserGroupRequestValidationError is the validation error returned by +// CreateUserGroupRequest.Validate if the designated constraints aren't met. +type CreateUserGroupRequestValidationError struct { field string reason string cause error @@ -4540,24 +3884,24 @@ type FindUserGroupReplyValidationError struct { } // Field function returns field value. -func (e FindUserGroupReplyValidationError) Field() string { return e.field } +func (e CreateUserGroupRequestValidationError) Field() string { return e.field } // Reason function returns reason value. -func (e FindUserGroupReplyValidationError) Reason() string { return e.reason } +func (e CreateUserGroupRequestValidationError) Reason() string { return e.reason } // Cause function returns cause value. -func (e FindUserGroupReplyValidationError) Cause() error { return e.cause } +func (e CreateUserGroupRequestValidationError) Cause() error { return e.cause } // Key function returns key value. -func (e FindUserGroupReplyValidationError) Key() bool { return e.key } +func (e CreateUserGroupRequestValidationError) Key() bool { return e.key } // ErrorName returns error name. -func (e FindUserGroupReplyValidationError) ErrorName() string { - return "FindUserGroupReplyValidationError" +func (e CreateUserGroupRequestValidationError) ErrorName() string { + return "CreateUserGroupRequestValidationError" } // Error satisfies the builtin error interface -func (e FindUserGroupReplyValidationError) Error() string { +func (e CreateUserGroupRequestValidationError) Error() string { cause := "" if e.cause != nil { cause = fmt.Sprintf(" | caused by: %v", e.cause) @@ -4569,14 +3913,14 @@ func (e FindUserGroupReplyValidationError) Error() string { } return fmt.Sprintf( - "invalid %sFindUserGroupReply.%s: %s%s", + "invalid %sCreateUserGroupRequest.%s: %s%s", key, e.field, e.reason, cause) } -var _ error = FindUserGroupReplyValidationError{} +var _ error = CreateUserGroupRequestValidationError{} var _ interface { Field() string @@ -4584,31 +3928,58 @@ var _ interface { Key() bool Cause() error ErrorName() string -} = FindUserGroupReplyValidationError{} +} = CreateUserGroupRequestValidationError{} -// Validate checks the field values on UpdateUserGroupRequest with the rules +// Validate checks the field values on FindUserGroupRequest with the rules // defined in the proto definition for this message. If any rules are // violated, the first error encountered is returned, or nil if there are no violations. -func (m *UpdateUserGroupRequest) Validate() error { +func (m *FindUserGroupRequest) Validate() error { return m.validate(false) } -// ValidateAll checks the field values on UpdateUserGroupRequest with the rules +// ValidateAll checks the field values on FindUserGroupRequest with the rules // defined in the proto definition for this message. If any rules are // violated, the result is a list of violation errors wrapped in -// UpdateUserGroupRequestMultiError, or nil if none found. -func (m *UpdateUserGroupRequest) ValidateAll() error { +// FindUserGroupRequestMultiError, or nil if none found. +func (m *FindUserGroupRequest) ValidateAll() error { return m.validate(true) } -func (m *UpdateUserGroupRequest) validate(all bool) error { +func (m *FindUserGroupRequest) validate(all bool) error { if m == nil { return nil } var errors []error - // no validation rules for Id + if all { + switch v := interface{}(m.GetPage()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, FindUserGroupRequestValidationError{ + field: "Page", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, FindUserGroupRequestValidationError{ + field: "Page", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetPage()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return FindUserGroupRequestValidationError{ + field: "Page", + reason: "embedded message failed validation", + cause: err, + } + } + } if m.Name != nil { // no validation rules for Name @@ -4622,24 +3993,20 @@ func (m *UpdateUserGroupRequest) validate(all bool) error { // no validation rules for Action } - if m.Users != nil { - // no validation rules for Users - } - if len(errors) > 0 { - return UpdateUserGroupRequestMultiError(errors) + return FindUserGroupRequestMultiError(errors) } return nil } -// UpdateUserGroupRequestMultiError is an error wrapping multiple validation -// errors returned by UpdateUserGroupRequest.ValidateAll() if the designated +// FindUserGroupRequestMultiError is an error wrapping multiple validation +// errors returned by FindUserGroupRequest.ValidateAll() if the designated // constraints aren't met. -type UpdateUserGroupRequestMultiError []error +type FindUserGroupRequestMultiError []error // Error returns a concatenation of all the error messages it wraps. -func (m UpdateUserGroupRequestMultiError) Error() string { +func (m FindUserGroupRequestMultiError) Error() string { var msgs []string for _, err := range m { msgs = append(msgs, err.Error()) @@ -4648,11 +4015,11 @@ func (m UpdateUserGroupRequestMultiError) Error() string { } // AllErrors returns a list of validation violation errors. -func (m UpdateUserGroupRequestMultiError) AllErrors() []error { return m } +func (m FindUserGroupRequestMultiError) AllErrors() []error { return m } -// UpdateUserGroupRequestValidationError is the validation error returned by -// UpdateUserGroupRequest.Validate if the designated constraints aren't met. -type UpdateUserGroupRequestValidationError struct { +// FindUserGroupRequestValidationError is the validation error returned by +// FindUserGroupRequest.Validate if the designated constraints aren't met. +type FindUserGroupRequestValidationError struct { field string reason string cause error @@ -4660,24 +4027,24 @@ type UpdateUserGroupRequestValidationError struct { } // Field function returns field value. -func (e UpdateUserGroupRequestValidationError) Field() string { return e.field } +func (e FindUserGroupRequestValidationError) Field() string { return e.field } // Reason function returns reason value. -func (e UpdateUserGroupRequestValidationError) Reason() string { return e.reason } +func (e FindUserGroupRequestValidationError) Reason() string { return e.reason } // Cause function returns cause value. -func (e UpdateUserGroupRequestValidationError) Cause() error { return e.cause } +func (e FindUserGroupRequestValidationError) Cause() error { return e.cause } // Key function returns key value. -func (e UpdateUserGroupRequestValidationError) Key() bool { return e.key } +func (e FindUserGroupRequestValidationError) Key() bool { return e.key } // ErrorName returns error name. -func (e UpdateUserGroupRequestValidationError) ErrorName() string { - return "UpdateUserGroupRequestValidationError" +func (e FindUserGroupRequestValidationError) ErrorName() string { + return "FindUserGroupRequestValidationError" } // Error satisfies the builtin error interface -func (e UpdateUserGroupRequestValidationError) Error() string { +func (e FindUserGroupRequestValidationError) Error() string { cause := "" if e.cause != nil { cause = fmt.Sprintf(" | caused by: %v", e.cause) @@ -4689,14 +4056,14 @@ func (e UpdateUserGroupRequestValidationError) Error() string { } return fmt.Sprintf( - "invalid %sUpdateUserGroupRequest.%s: %s%s", + "invalid %sFindUserGroupRequest.%s: %s%s", key, e.field, e.reason, cause) } -var _ error = UpdateUserGroupRequestValidationError{} +var _ error = FindUserGroupRequestValidationError{} var _ interface { Field() string @@ -4704,48 +4071,107 @@ var _ interface { Key() bool Cause() error ErrorName() string -} = UpdateUserGroupRequestValidationError{} +} = FindUserGroupRequestValidationError{} -// Validate checks the field values on CreateWhitelistRequest with the rules +// Validate checks the field values on FindUserGroupReply with the rules // defined in the proto definition for this message. If any rules are // violated, the first error encountered is returned, or nil if there are no violations. -func (m *CreateWhitelistRequest) Validate() error { +func (m *FindUserGroupReply) Validate() error { return m.validate(false) } -// ValidateAll checks the field values on CreateWhitelistRequest with the rules +// ValidateAll checks the field values on FindUserGroupReply with the rules // defined in the proto definition for this message. If any rules are // violated, the result is a list of violation errors wrapped in -// CreateWhitelistRequestMultiError, or nil if none found. -func (m *CreateWhitelistRequest) ValidateAll() error { +// FindUserGroupReplyMultiError, or nil if none found. +func (m *FindUserGroupReply) ValidateAll() error { return m.validate(true) } -func (m *CreateWhitelistRequest) validate(all bool) error { +func (m *FindUserGroupReply) validate(all bool) error { if m == nil { return nil } - var errors []error + var errors []error + + if all { + switch v := interface{}(m.GetPage()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, FindUserGroupReplyValidationError{ + field: "Page", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, FindUserGroupReplyValidationError{ + field: "Page", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetPage()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return FindUserGroupReplyValidationError{ + field: "Page", + reason: "embedded message failed validation", + cause: err, + } + } + } + + for idx, item := range m.GetList() { + _, _ = idx, item - // no validation rules for Category + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, FindUserGroupReplyValidationError{ + field: fmt.Sprintf("List[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, FindUserGroupReplyValidationError{ + field: fmt.Sprintf("List[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return FindUserGroupReplyValidationError{ + field: fmt.Sprintf("List[%v]", idx), + reason: "embedded message failed validation", + cause: err, + } + } + } - // no validation rules for Resource + } if len(errors) > 0 { - return CreateWhitelistRequestMultiError(errors) + return FindUserGroupReplyMultiError(errors) } return nil } -// CreateWhitelistRequestMultiError is an error wrapping multiple validation -// errors returned by CreateWhitelistRequest.ValidateAll() if the designated -// constraints aren't met. -type CreateWhitelistRequestMultiError []error +// FindUserGroupReplyMultiError is an error wrapping multiple validation errors +// returned by FindUserGroupReply.ValidateAll() if the designated constraints +// aren't met. +type FindUserGroupReplyMultiError []error // Error returns a concatenation of all the error messages it wraps. -func (m CreateWhitelistRequestMultiError) Error() string { +func (m FindUserGroupReplyMultiError) Error() string { var msgs []string for _, err := range m { msgs = append(msgs, err.Error()) @@ -4754,11 +4180,11 @@ func (m CreateWhitelistRequestMultiError) Error() string { } // AllErrors returns a list of validation violation errors. -func (m CreateWhitelistRequestMultiError) AllErrors() []error { return m } +func (m FindUserGroupReplyMultiError) AllErrors() []error { return m } -// CreateWhitelistRequestValidationError is the validation error returned by -// CreateWhitelistRequest.Validate if the designated constraints aren't met. -type CreateWhitelistRequestValidationError struct { +// FindUserGroupReplyValidationError is the validation error returned by +// FindUserGroupReply.Validate if the designated constraints aren't met. +type FindUserGroupReplyValidationError struct { field string reason string cause error @@ -4766,24 +4192,24 @@ type CreateWhitelistRequestValidationError struct { } // Field function returns field value. -func (e CreateWhitelistRequestValidationError) Field() string { return e.field } +func (e FindUserGroupReplyValidationError) Field() string { return e.field } // Reason function returns reason value. -func (e CreateWhitelistRequestValidationError) Reason() string { return e.reason } +func (e FindUserGroupReplyValidationError) Reason() string { return e.reason } // Cause function returns cause value. -func (e CreateWhitelistRequestValidationError) Cause() error { return e.cause } +func (e FindUserGroupReplyValidationError) Cause() error { return e.cause } // Key function returns key value. -func (e CreateWhitelistRequestValidationError) Key() bool { return e.key } +func (e FindUserGroupReplyValidationError) Key() bool { return e.key } // ErrorName returns error name. -func (e CreateWhitelistRequestValidationError) ErrorName() string { - return "CreateWhitelistRequestValidationError" +func (e FindUserGroupReplyValidationError) ErrorName() string { + return "FindUserGroupReplyValidationError" } // Error satisfies the builtin error interface -func (e CreateWhitelistRequestValidationError) Error() string { +func (e FindUserGroupReplyValidationError) Error() string { cause := "" if e.cause != nil { cause = fmt.Sprintf(" | caused by: %v", e.cause) @@ -4795,14 +4221,14 @@ func (e CreateWhitelistRequestValidationError) Error() string { } return fmt.Sprintf( - "invalid %sCreateWhitelistRequest.%s: %s%s", + "invalid %sFindUserGroupReply.%s: %s%s", key, e.field, e.reason, cause) } -var _ error = CreateWhitelistRequestValidationError{} +var _ error = FindUserGroupReplyValidationError{} var _ interface { Field() string @@ -4810,75 +4236,62 @@ var _ interface { Key() bool Cause() error ErrorName() string -} = CreateWhitelistRequestValidationError{} +} = FindUserGroupReplyValidationError{} -// Validate checks the field values on HasWhitelistRequest with the rules +// Validate checks the field values on UpdateUserGroupRequest with the rules // defined in the proto definition for this message. If any rules are // violated, the first error encountered is returned, or nil if there are no violations. -func (m *HasWhitelistRequest) Validate() error { +func (m *UpdateUserGroupRequest) Validate() error { return m.validate(false) } -// ValidateAll checks the field values on HasWhitelistRequest with the rules +// ValidateAll checks the field values on UpdateUserGroupRequest with the rules // defined in the proto definition for this message. If any rules are // violated, the result is a list of violation errors wrapped in -// HasWhitelistRequestMultiError, or nil if none found. -func (m *HasWhitelistRequest) ValidateAll() error { +// UpdateUserGroupRequestMultiError, or nil if none found. +func (m *UpdateUserGroupRequest) ValidateAll() error { return m.validate(true) } -func (m *HasWhitelistRequest) validate(all bool) error { +func (m *UpdateUserGroupRequest) validate(all bool) error { if m == nil { return nil } var errors []error - // no validation rules for Category + // no validation rules for Id - if all { - switch v := interface{}(m.GetPermission()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, HasWhitelistRequestValidationError{ - field: "Permission", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, HasWhitelistRequestValidationError{ - field: "Permission", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetPermission()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return HasWhitelistRequestValidationError{ - field: "Permission", - reason: "embedded message failed validation", - cause: err, - } - } + if m.Name != nil { + // no validation rules for Name + } + + if m.Word != nil { + // no validation rules for Word + } + + if m.Action != nil { + // no validation rules for Action + } + + if m.Users != nil { + // no validation rules for Users } if len(errors) > 0 { - return HasWhitelistRequestMultiError(errors) + return UpdateUserGroupRequestMultiError(errors) } return nil } -// HasWhitelistRequestMultiError is an error wrapping multiple validation -// errors returned by HasWhitelistRequest.ValidateAll() if the designated +// UpdateUserGroupRequestMultiError is an error wrapping multiple validation +// errors returned by UpdateUserGroupRequest.ValidateAll() if the designated // constraints aren't met. -type HasWhitelistRequestMultiError []error +type UpdateUserGroupRequestMultiError []error // Error returns a concatenation of all the error messages it wraps. -func (m HasWhitelistRequestMultiError) Error() string { +func (m UpdateUserGroupRequestMultiError) Error() string { var msgs []string for _, err := range m { msgs = append(msgs, err.Error()) @@ -4887,11 +4300,11 @@ func (m HasWhitelistRequestMultiError) Error() string { } // AllErrors returns a list of validation violation errors. -func (m HasWhitelistRequestMultiError) AllErrors() []error { return m } +func (m UpdateUserGroupRequestMultiError) AllErrors() []error { return m } -// HasWhitelistRequestValidationError is the validation error returned by -// HasWhitelistRequest.Validate if the designated constraints aren't met. -type HasWhitelistRequestValidationError struct { +// UpdateUserGroupRequestValidationError is the validation error returned by +// UpdateUserGroupRequest.Validate if the designated constraints aren't met. +type UpdateUserGroupRequestValidationError struct { field string reason string cause error @@ -4899,24 +4312,24 @@ type HasWhitelistRequestValidationError struct { } // Field function returns field value. -func (e HasWhitelistRequestValidationError) Field() string { return e.field } +func (e UpdateUserGroupRequestValidationError) Field() string { return e.field } // Reason function returns reason value. -func (e HasWhitelistRequestValidationError) Reason() string { return e.reason } +func (e UpdateUserGroupRequestValidationError) Reason() string { return e.reason } // Cause function returns cause value. -func (e HasWhitelistRequestValidationError) Cause() error { return e.cause } +func (e UpdateUserGroupRequestValidationError) Cause() error { return e.cause } // Key function returns key value. -func (e HasWhitelistRequestValidationError) Key() bool { return e.key } +func (e UpdateUserGroupRequestValidationError) Key() bool { return e.key } // ErrorName returns error name. -func (e HasWhitelistRequestValidationError) ErrorName() string { - return "HasWhitelistRequestValidationError" +func (e UpdateUserGroupRequestValidationError) ErrorName() string { + return "UpdateUserGroupRequestValidationError" } // Error satisfies the builtin error interface -func (e HasWhitelistRequestValidationError) Error() string { +func (e UpdateUserGroupRequestValidationError) Error() string { cause := "" if e.cause != nil { cause = fmt.Sprintf(" | caused by: %v", e.cause) @@ -4928,14 +4341,14 @@ func (e HasWhitelistRequestValidationError) Error() string { } return fmt.Sprintf( - "invalid %sHasWhitelistRequest.%s: %s%s", + "invalid %sUpdateUserGroupRequest.%s: %s%s", key, e.field, e.reason, cause) } -var _ error = HasWhitelistRequestValidationError{} +var _ error = UpdateUserGroupRequestValidationError{} var _ interface { Field() string @@ -4943,46 +4356,48 @@ var _ interface { Key() bool Cause() error ErrorName() string -} = HasWhitelistRequestValidationError{} +} = UpdateUserGroupRequestValidationError{} -// Validate checks the field values on HasWhitelistReply with the rules defined -// in the proto definition for this message. If any rules are violated, the -// first error encountered is returned, or nil if there are no violations. -func (m *HasWhitelistReply) Validate() error { +// Validate checks the field values on CreateWhitelistRequest with the rules +// defined in the proto definition for this message. If any rules are +// violated, the first error encountered is returned, or nil if there are no violations. +func (m *CreateWhitelistRequest) Validate() error { return m.validate(false) } -// ValidateAll checks the field values on HasWhitelistReply with the rules +// ValidateAll checks the field values on CreateWhitelistRequest with the rules // defined in the proto definition for this message. If any rules are // violated, the result is a list of violation errors wrapped in -// HasWhitelistReplyMultiError, or nil if none found. -func (m *HasWhitelistReply) ValidateAll() error { +// CreateWhitelistRequestMultiError, or nil if none found. +func (m *CreateWhitelistRequest) ValidateAll() error { return m.validate(true) } -func (m *HasWhitelistReply) validate(all bool) error { +func (m *CreateWhitelistRequest) validate(all bool) error { if m == nil { return nil } var errors []error - // no validation rules for Ok + // no validation rules for Category + + // no validation rules for Resource if len(errors) > 0 { - return HasWhitelistReplyMultiError(errors) + return CreateWhitelistRequestMultiError(errors) } return nil } -// HasWhitelistReplyMultiError is an error wrapping multiple validation errors -// returned by HasWhitelistReply.ValidateAll() if the designated constraints -// aren't met. -type HasWhitelistReplyMultiError []error +// CreateWhitelistRequestMultiError is an error wrapping multiple validation +// errors returned by CreateWhitelistRequest.ValidateAll() if the designated +// constraints aren't met. +type CreateWhitelistRequestMultiError []error // Error returns a concatenation of all the error messages it wraps. -func (m HasWhitelistReplyMultiError) Error() string { +func (m CreateWhitelistRequestMultiError) Error() string { var msgs []string for _, err := range m { msgs = append(msgs, err.Error()) @@ -4991,11 +4406,11 @@ func (m HasWhitelistReplyMultiError) Error() string { } // AllErrors returns a list of validation violation errors. -func (m HasWhitelistReplyMultiError) AllErrors() []error { return m } +func (m CreateWhitelistRequestMultiError) AllErrors() []error { return m } -// HasWhitelistReplyValidationError is the validation error returned by -// HasWhitelistReply.Validate if the designated constraints aren't met. -type HasWhitelistReplyValidationError struct { +// CreateWhitelistRequestValidationError is the validation error returned by +// CreateWhitelistRequest.Validate if the designated constraints aren't met. +type CreateWhitelistRequestValidationError struct { field string reason string cause error @@ -5003,24 +4418,24 @@ type HasWhitelistReplyValidationError struct { } // Field function returns field value. -func (e HasWhitelistReplyValidationError) Field() string { return e.field } +func (e CreateWhitelistRequestValidationError) Field() string { return e.field } // Reason function returns reason value. -func (e HasWhitelistReplyValidationError) Reason() string { return e.reason } +func (e CreateWhitelistRequestValidationError) Reason() string { return e.reason } // Cause function returns cause value. -func (e HasWhitelistReplyValidationError) Cause() error { return e.cause } +func (e CreateWhitelistRequestValidationError) Cause() error { return e.cause } // Key function returns key value. -func (e HasWhitelistReplyValidationError) Key() bool { return e.key } +func (e CreateWhitelistRequestValidationError) Key() bool { return e.key } // ErrorName returns error name. -func (e HasWhitelistReplyValidationError) ErrorName() string { - return "HasWhitelistReplyValidationError" +func (e CreateWhitelistRequestValidationError) ErrorName() string { + return "CreateWhitelistRequestValidationError" } // Error satisfies the builtin error interface -func (e HasWhitelistReplyValidationError) Error() string { +func (e CreateWhitelistRequestValidationError) Error() string { cause := "" if e.cause != nil { cause = fmt.Sprintf(" | caused by: %v", e.cause) @@ -5032,14 +4447,14 @@ func (e HasWhitelistReplyValidationError) Error() string { } return fmt.Sprintf( - "invalid %sHasWhitelistReply.%s: %s%s", + "invalid %sCreateWhitelistRequest.%s: %s%s", key, e.field, e.reason, cause) } -var _ error = HasWhitelistReplyValidationError{} +var _ error = CreateWhitelistRequestValidationError{} var _ interface { Field() string @@ -5047,7 +4462,7 @@ var _ interface { Key() bool Cause() error ErrorName() string -} = HasWhitelistReplyValidationError{} +} = CreateWhitelistRequestValidationError{} // Validate checks the field values on FindWhitelistRequest with the rules // defined in the proto definition for this message. If any rules are @@ -5464,114 +4879,3 @@ var _ interface { Cause() error ErrorName() string } = UpdateWhitelistRequestValidationError{} - -// Validate checks the field values on HasWhitelistRequest_CheckPermission with -// the rules defined in the proto definition for this message. If any rules -// are violated, the first error encountered is returned, or nil if there are -// no violations. -func (m *HasWhitelistRequest_CheckPermission) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on HasWhitelistRequest_CheckPermission -// with the rules defined in the proto definition for this message. If any -// rules are violated, the result is a list of violation errors wrapped in -// HasWhitelistRequest_CheckPermissionMultiError, or nil if none found. -func (m *HasWhitelistRequest_CheckPermission) ValidateAll() error { - return m.validate(true) -} - -func (m *HasWhitelistRequest_CheckPermission) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - // no validation rules for Resource - - // no validation rules for Method - - // no validation rules for Uri - - if len(errors) > 0 { - return HasWhitelistRequest_CheckPermissionMultiError(errors) - } - - return nil -} - -// HasWhitelistRequest_CheckPermissionMultiError is an error wrapping multiple -// validation errors returned by -// HasWhitelistRequest_CheckPermission.ValidateAll() if the designated -// constraints aren't met. -type HasWhitelistRequest_CheckPermissionMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m HasWhitelistRequest_CheckPermissionMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m HasWhitelistRequest_CheckPermissionMultiError) AllErrors() []error { return m } - -// HasWhitelistRequest_CheckPermissionValidationError is the validation error -// returned by HasWhitelistRequest_CheckPermission.Validate if the designated -// constraints aren't met. -type HasWhitelistRequest_CheckPermissionValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e HasWhitelistRequest_CheckPermissionValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e HasWhitelistRequest_CheckPermissionValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e HasWhitelistRequest_CheckPermissionValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e HasWhitelistRequest_CheckPermissionValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e HasWhitelistRequest_CheckPermissionValidationError) ErrorName() string { - return "HasWhitelistRequest_CheckPermissionValidationError" -} - -// Error satisfies the builtin error interface -func (e HasWhitelistRequest_CheckPermissionValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sHasWhitelistRequest_CheckPermission.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = HasWhitelistRequest_CheckPermissionValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = HasWhitelistRequest_CheckPermissionValidationError{} diff --git a/api/auth/auth_grpc.pb.go b/api/auth/auth_grpc.pb.go index 1e722c4..e30a244 100644 --- a/api/auth/auth_grpc.pb.go +++ b/api/auth/auth_grpc.pb.go @@ -30,8 +30,6 @@ const ( Auth_Logout_FullMethodName = "/auth.v1.Auth/Logout" Auth_Info_FullMethodName = "/auth.v1.Auth/Info" Auth_Idempotent_FullMethodName = "/auth.v1.Auth/Idempotent" - Auth_CheckIdempotent_FullMethodName = "/auth.v1.Auth/CheckIdempotent" - Auth_GetUserByCode_FullMethodName = "/auth.v1.Auth/GetUserByCode" Auth_FindUser_FullMethodName = "/auth.v1.Auth/FindUser" Auth_UpdateUser_FullMethodName = "/auth.v1.Auth/UpdateUser" Auth_DeleteUser_FullMethodName = "/auth.v1.Auth/DeleteUser" @@ -49,7 +47,6 @@ const ( Auth_UpdateUserGroup_FullMethodName = "/auth.v1.Auth/UpdateUserGroup" Auth_DeleteUserGroup_FullMethodName = "/auth.v1.Auth/DeleteUserGroup" Auth_CreateWhitelist_FullMethodName = "/auth.v1.Auth/CreateWhitelist" - Auth_HasWhitelist_FullMethodName = "/auth.v1.Auth/HasWhitelist" Auth_FindWhitelist_FullMethodName = "/auth.v1.Auth/FindWhitelist" Auth_UpdateWhitelist_FullMethodName = "/auth.v1.Auth/UpdateWhitelist" Auth_DeleteWhitelist_FullMethodName = "/auth.v1.Auth/DeleteWhitelist" @@ -68,8 +65,6 @@ type AuthClient interface { Logout(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*emptypb.Empty, error) Info(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*InfoReply, error) Idempotent(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*IdempotentReply, error) - CheckIdempotent(ctx context.Context, in *CheckIdempotentRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) - GetUserByCode(ctx context.Context, in *GetUserByCodeRequest, opts ...grpc.CallOption) (*GetUserByCodeReply, error) FindUser(ctx context.Context, in *FindUserRequest, opts ...grpc.CallOption) (*FindUserReply, error) UpdateUser(ctx context.Context, in *UpdateUserRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) DeleteUser(ctx context.Context, in *params.IdsRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) @@ -87,7 +82,6 @@ type AuthClient interface { UpdateUserGroup(ctx context.Context, in *UpdateUserGroupRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) DeleteUserGroup(ctx context.Context, in *params.IdsRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) CreateWhitelist(ctx context.Context, in *CreateWhitelistRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) - HasWhitelist(ctx context.Context, in *HasWhitelistRequest, opts ...grpc.CallOption) (*HasWhitelistReply, error) FindWhitelist(ctx context.Context, in *FindWhitelistRequest, opts ...grpc.CallOption) (*FindWhitelistReply, error) UpdateWhitelist(ctx context.Context, in *UpdateWhitelistRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) DeleteWhitelist(ctx context.Context, in *params.IdsRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) @@ -182,24 +176,6 @@ func (c *authClient) Idempotent(ctx context.Context, in *emptypb.Empty, opts ... return out, nil } -func (c *authClient) CheckIdempotent(ctx context.Context, in *CheckIdempotentRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) { - out := new(emptypb.Empty) - err := c.cc.Invoke(ctx, Auth_CheckIdempotent_FullMethodName, in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *authClient) GetUserByCode(ctx context.Context, in *GetUserByCodeRequest, opts ...grpc.CallOption) (*GetUserByCodeReply, error) { - out := new(GetUserByCodeReply) - err := c.cc.Invoke(ctx, Auth_GetUserByCode_FullMethodName, in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - func (c *authClient) FindUser(ctx context.Context, in *FindUserRequest, opts ...grpc.CallOption) (*FindUserReply, error) { out := new(FindUserReply) err := c.cc.Invoke(ctx, Auth_FindUser_FullMethodName, in, out, opts...) @@ -353,15 +329,6 @@ func (c *authClient) CreateWhitelist(ctx context.Context, in *CreateWhitelistReq return out, nil } -func (c *authClient) HasWhitelist(ctx context.Context, in *HasWhitelistRequest, opts ...grpc.CallOption) (*HasWhitelistReply, error) { - out := new(HasWhitelistReply) - err := c.cc.Invoke(ctx, Auth_HasWhitelist_FullMethodName, in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - func (c *authClient) FindWhitelist(ctx context.Context, in *FindWhitelistRequest, opts ...grpc.CallOption) (*FindWhitelistReply, error) { out := new(FindWhitelistReply) err := c.cc.Invoke(ctx, Auth_FindWhitelist_FullMethodName, in, out, opts...) @@ -402,8 +369,6 @@ type AuthServer interface { Logout(context.Context, *emptypb.Empty) (*emptypb.Empty, error) Info(context.Context, *emptypb.Empty) (*InfoReply, error) Idempotent(context.Context, *emptypb.Empty) (*IdempotentReply, error) - CheckIdempotent(context.Context, *CheckIdempotentRequest) (*emptypb.Empty, error) - GetUserByCode(context.Context, *GetUserByCodeRequest) (*GetUserByCodeReply, error) FindUser(context.Context, *FindUserRequest) (*FindUserReply, error) UpdateUser(context.Context, *UpdateUserRequest) (*emptypb.Empty, error) DeleteUser(context.Context, *params.IdsRequest) (*emptypb.Empty, error) @@ -421,7 +386,6 @@ type AuthServer interface { UpdateUserGroup(context.Context, *UpdateUserGroupRequest) (*emptypb.Empty, error) DeleteUserGroup(context.Context, *params.IdsRequest) (*emptypb.Empty, error) CreateWhitelist(context.Context, *CreateWhitelistRequest) (*emptypb.Empty, error) - HasWhitelist(context.Context, *HasWhitelistRequest) (*HasWhitelistReply, error) FindWhitelist(context.Context, *FindWhitelistRequest) (*FindWhitelistReply, error) UpdateWhitelist(context.Context, *UpdateWhitelistRequest) (*emptypb.Empty, error) DeleteWhitelist(context.Context, *params.IdsRequest) (*emptypb.Empty, error) @@ -459,12 +423,6 @@ func (UnimplementedAuthServer) Info(context.Context, *emptypb.Empty) (*InfoReply func (UnimplementedAuthServer) Idempotent(context.Context, *emptypb.Empty) (*IdempotentReply, error) { return nil, status.Errorf(codes.Unimplemented, "method Idempotent not implemented") } -func (UnimplementedAuthServer) CheckIdempotent(context.Context, *CheckIdempotentRequest) (*emptypb.Empty, error) { - return nil, status.Errorf(codes.Unimplemented, "method CheckIdempotent not implemented") -} -func (UnimplementedAuthServer) GetUserByCode(context.Context, *GetUserByCodeRequest) (*GetUserByCodeReply, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetUserByCode not implemented") -} func (UnimplementedAuthServer) FindUser(context.Context, *FindUserRequest) (*FindUserReply, error) { return nil, status.Errorf(codes.Unimplemented, "method FindUser not implemented") } @@ -516,9 +474,6 @@ func (UnimplementedAuthServer) DeleteUserGroup(context.Context, *params.IdsReque func (UnimplementedAuthServer) CreateWhitelist(context.Context, *CreateWhitelistRequest) (*emptypb.Empty, error) { return nil, status.Errorf(codes.Unimplemented, "method CreateWhitelist not implemented") } -func (UnimplementedAuthServer) HasWhitelist(context.Context, *HasWhitelistRequest) (*HasWhitelistReply, error) { - return nil, status.Errorf(codes.Unimplemented, "method HasWhitelist not implemented") -} func (UnimplementedAuthServer) FindWhitelist(context.Context, *FindWhitelistRequest) (*FindWhitelistReply, error) { return nil, status.Errorf(codes.Unimplemented, "method FindWhitelist not implemented") } @@ -703,42 +658,6 @@ func _Auth_Idempotent_Handler(srv interface{}, ctx context.Context, dec func(int return interceptor(ctx, in, info, handler) } -func _Auth_CheckIdempotent_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(CheckIdempotentRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(AuthServer).CheckIdempotent(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: Auth_CheckIdempotent_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(AuthServer).CheckIdempotent(ctx, req.(*CheckIdempotentRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _Auth_GetUserByCode_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(GetUserByCodeRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(AuthServer).GetUserByCode(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: Auth_GetUserByCode_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(AuthServer).GetUserByCode(ctx, req.(*GetUserByCodeRequest)) - } - return interceptor(ctx, in, info, handler) -} - func _Auth_FindUser_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(FindUserRequest) if err := dec(in); err != nil { @@ -1045,24 +964,6 @@ func _Auth_CreateWhitelist_Handler(srv interface{}, ctx context.Context, dec fun return interceptor(ctx, in, info, handler) } -func _Auth_HasWhitelist_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(HasWhitelistRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(AuthServer).HasWhitelist(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: Auth_HasWhitelist_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(AuthServer).HasWhitelist(ctx, req.(*HasWhitelistRequest)) - } - return interceptor(ctx, in, info, handler) -} - func _Auth_FindWhitelist_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(FindWhitelistRequest) if err := dec(in); err != nil { @@ -1160,14 +1061,6 @@ var Auth_ServiceDesc = grpc.ServiceDesc{ MethodName: "Idempotent", Handler: _Auth_Idempotent_Handler, }, - { - MethodName: "CheckIdempotent", - Handler: _Auth_CheckIdempotent_Handler, - }, - { - MethodName: "GetUserByCode", - Handler: _Auth_GetUserByCode_Handler, - }, { MethodName: "FindUser", Handler: _Auth_FindUser_Handler, @@ -1236,10 +1129,6 @@ var Auth_ServiceDesc = grpc.ServiceDesc{ MethodName: "CreateWhitelist", Handler: _Auth_CreateWhitelist_Handler, }, - { - MethodName: "HasWhitelist", - Handler: _Auth_HasWhitelist_Handler, - }, { MethodName: "FindWhitelist", Handler: _Auth_FindWhitelist_Handler, diff --git a/api/auth/auth_http.pb.go b/api/auth/auth_http.pb.go index ea59660..f2d9b60 100644 --- a/api/auth/auth_http.pb.go +++ b/api/auth/auth_http.pb.go @@ -86,7 +86,7 @@ type AuthHTTPServer interface { func RegisterAuthHTTPServer(s *http.Server, srv AuthHTTPServer) { r := s.Route("/") r.POST("/pub/register", _Auth_Register0_HTTP_Handler(srv)) - r.POST("/pwd", _Auth_Pwd0_HTTP_Handler(srv)) + r.PATCH("/pwd/update", _Auth_Pwd0_HTTP_Handler(srv)) r.POST("/pub/login", _Auth_Login0_HTTP_Handler(srv)) r.GET("/pub/status", _Auth_Status0_HTTP_Handler(srv)) r.GET("/pub/captcha", _Auth_Captcha0_HTTP_Handler(srv)) @@ -94,31 +94,31 @@ func RegisterAuthHTTPServer(s *http.Server, srv AuthHTTPServer) { r.POST("/logout", _Auth_Logout0_HTTP_Handler(srv)) r.GET("/info", _Auth_Info0_HTTP_Handler(srv)) r.GET("/idempotent", _Auth_Idempotent0_HTTP_Handler(srv)) - r.GET("/user", _Auth_FindUser0_HTTP_Handler(srv)) - r.PATCH("/user/{id}", _Auth_UpdateUser0_HTTP_Handler(srv)) - r.PUT("/user/{id}", _Auth_UpdateUser1_HTTP_Handler(srv)) - r.DELETE("/user/{ids}", _Auth_DeleteUser0_HTTP_Handler(srv)) + r.GET("/user/list", _Auth_FindUser0_HTTP_Handler(srv)) + r.PATCH("/user/update", _Auth_UpdateUser0_HTTP_Handler(srv)) + r.PUT("/user/update", _Auth_UpdateUser1_HTTP_Handler(srv)) + r.DELETE("/user/delete", _Auth_DeleteUser0_HTTP_Handler(srv)) r.GET("/permission", _Auth_Permission0_HTTP_Handler(srv)) - r.POST("/action", _Auth_CreateAction0_HTTP_Handler(srv)) - r.GET("/action", _Auth_FindAction0_HTTP_Handler(srv)) - r.PATCH("/action/{id}", _Auth_UpdateAction0_HTTP_Handler(srv)) - r.PUT("/action/{id}", _Auth_UpdateAction1_HTTP_Handler(srv)) - r.DELETE("/action/{ids}", _Auth_DeleteAction0_HTTP_Handler(srv)) - r.POST("/role", _Auth_CreateRole0_HTTP_Handler(srv)) - r.GET("/role", _Auth_FindRole0_HTTP_Handler(srv)) - r.PATCH("/role/{id}", _Auth_UpdateRole0_HTTP_Handler(srv)) - r.PUT("/role/{id}", _Auth_UpdateRole1_HTTP_Handler(srv)) - r.DELETE("/role/{ids}", _Auth_DeleteRole0_HTTP_Handler(srv)) - r.POST("/user/group", _Auth_CreateUserGroup0_HTTP_Handler(srv)) - r.GET("/user/group", _Auth_FindUserGroup0_HTTP_Handler(srv)) - r.PATCH("/user/group/{id}", _Auth_UpdateUserGroup0_HTTP_Handler(srv)) - r.PUT("/user/group/{id}", _Auth_UpdateUserGroup1_HTTP_Handler(srv)) - r.DELETE("/user/group/{ids}", _Auth_DeleteUserGroup0_HTTP_Handler(srv)) - r.POST("/whitelist", _Auth_CreateWhitelist0_HTTP_Handler(srv)) - r.GET("/whitelist", _Auth_FindWhitelist0_HTTP_Handler(srv)) - r.PATCH("/whitelist/{id}", _Auth_UpdateWhitelist0_HTTP_Handler(srv)) - r.PUT("/whitelist/{id}", _Auth_UpdateWhitelist1_HTTP_Handler(srv)) - r.DELETE("/whitelist/{ids}", _Auth_DeleteWhitelist0_HTTP_Handler(srv)) + r.POST("/action/create", _Auth_CreateAction0_HTTP_Handler(srv)) + r.GET("/action/list", _Auth_FindAction0_HTTP_Handler(srv)) + r.PATCH("/action/update", _Auth_UpdateAction0_HTTP_Handler(srv)) + r.PUT("/action/update", _Auth_UpdateAction1_HTTP_Handler(srv)) + r.DELETE("/action/delete", _Auth_DeleteAction0_HTTP_Handler(srv)) + r.POST("/role/create", _Auth_CreateRole0_HTTP_Handler(srv)) + r.GET("/role/list", _Auth_FindRole0_HTTP_Handler(srv)) + r.PATCH("/role/update", _Auth_UpdateRole0_HTTP_Handler(srv)) + r.PUT("/role/update", _Auth_UpdateRole1_HTTP_Handler(srv)) + r.DELETE("/role/delete", _Auth_DeleteRole0_HTTP_Handler(srv)) + r.POST("/user/group/create", _Auth_CreateUserGroup0_HTTP_Handler(srv)) + r.GET("/user/group/list", _Auth_FindUserGroup0_HTTP_Handler(srv)) + r.PATCH("/user/group/update", _Auth_UpdateUserGroup0_HTTP_Handler(srv)) + r.PUT("/user/group/update", _Auth_UpdateUserGroup1_HTTP_Handler(srv)) + r.DELETE("/user/group/delete", _Auth_DeleteUserGroup0_HTTP_Handler(srv)) + r.POST("/whitelist/create", _Auth_CreateWhitelist0_HTTP_Handler(srv)) + r.GET("/whitelist/list", _Auth_FindWhitelist0_HTTP_Handler(srv)) + r.PATCH("/whitelist/update", _Auth_UpdateWhitelist0_HTTP_Handler(srv)) + r.PUT("/whitelist/update", _Auth_UpdateWhitelist1_HTTP_Handler(srv)) + r.DELETE("/whitelist/delete", _Auth_DeleteWhitelist0_HTTP_Handler(srv)) } func _Auth_Register0_HTTP_Handler(srv AuthHTTPServer) func(ctx http.Context) error { @@ -335,9 +335,6 @@ func _Auth_UpdateUser0_HTTP_Handler(srv AuthHTTPServer) func(ctx http.Context) e if err := ctx.BindQuery(&in); err != nil { return err } - if err := ctx.BindVars(&in); err != nil { - return err - } http.SetOperation(ctx, OperationAuthUpdateUser) h := ctx.Middleware(func(ctx context.Context, req interface{}) (interface{}, error) { return srv.UpdateUser(ctx, req.(*UpdateUserRequest)) @@ -360,9 +357,6 @@ func _Auth_UpdateUser1_HTTP_Handler(srv AuthHTTPServer) func(ctx http.Context) e if err := ctx.BindQuery(&in); err != nil { return err } - if err := ctx.BindVars(&in); err != nil { - return err - } http.SetOperation(ctx, OperationAuthUpdateUser) h := ctx.Middleware(func(ctx context.Context, req interface{}) (interface{}, error) { return srv.UpdateUser(ctx, req.(*UpdateUserRequest)) @@ -382,9 +376,6 @@ func _Auth_DeleteUser0_HTTP_Handler(srv AuthHTTPServer) func(ctx http.Context) e if err := ctx.BindQuery(&in); err != nil { return err } - if err := ctx.BindVars(&in); err != nil { - return err - } http.SetOperation(ctx, OperationAuthDeleteUser) h := ctx.Middleware(func(ctx context.Context, req interface{}) (interface{}, error) { return srv.DeleteUser(ctx, req.(*params.IdsRequest)) @@ -467,9 +458,6 @@ func _Auth_UpdateAction0_HTTP_Handler(srv AuthHTTPServer) func(ctx http.Context) if err := ctx.BindQuery(&in); err != nil { return err } - if err := ctx.BindVars(&in); err != nil { - return err - } http.SetOperation(ctx, OperationAuthUpdateAction) h := ctx.Middleware(func(ctx context.Context, req interface{}) (interface{}, error) { return srv.UpdateAction(ctx, req.(*UpdateActionRequest)) @@ -492,9 +480,6 @@ func _Auth_UpdateAction1_HTTP_Handler(srv AuthHTTPServer) func(ctx http.Context) if err := ctx.BindQuery(&in); err != nil { return err } - if err := ctx.BindVars(&in); err != nil { - return err - } http.SetOperation(ctx, OperationAuthUpdateAction) h := ctx.Middleware(func(ctx context.Context, req interface{}) (interface{}, error) { return srv.UpdateAction(ctx, req.(*UpdateActionRequest)) @@ -514,9 +499,6 @@ func _Auth_DeleteAction0_HTTP_Handler(srv AuthHTTPServer) func(ctx http.Context) if err := ctx.BindQuery(&in); err != nil { return err } - if err := ctx.BindVars(&in); err != nil { - return err - } http.SetOperation(ctx, OperationAuthDeleteAction) h := ctx.Middleware(func(ctx context.Context, req interface{}) (interface{}, error) { return srv.DeleteAction(ctx, req.(*params.IdsRequest)) @@ -580,9 +562,6 @@ func _Auth_UpdateRole0_HTTP_Handler(srv AuthHTTPServer) func(ctx http.Context) e if err := ctx.BindQuery(&in); err != nil { return err } - if err := ctx.BindVars(&in); err != nil { - return err - } http.SetOperation(ctx, OperationAuthUpdateRole) h := ctx.Middleware(func(ctx context.Context, req interface{}) (interface{}, error) { return srv.UpdateRole(ctx, req.(*UpdateRoleRequest)) @@ -605,9 +584,6 @@ func _Auth_UpdateRole1_HTTP_Handler(srv AuthHTTPServer) func(ctx http.Context) e if err := ctx.BindQuery(&in); err != nil { return err } - if err := ctx.BindVars(&in); err != nil { - return err - } http.SetOperation(ctx, OperationAuthUpdateRole) h := ctx.Middleware(func(ctx context.Context, req interface{}) (interface{}, error) { return srv.UpdateRole(ctx, req.(*UpdateRoleRequest)) @@ -627,9 +603,6 @@ func _Auth_DeleteRole0_HTTP_Handler(srv AuthHTTPServer) func(ctx http.Context) e if err := ctx.BindQuery(&in); err != nil { return err } - if err := ctx.BindVars(&in); err != nil { - return err - } http.SetOperation(ctx, OperationAuthDeleteRole) h := ctx.Middleware(func(ctx context.Context, req interface{}) (interface{}, error) { return srv.DeleteRole(ctx, req.(*params.IdsRequest)) @@ -693,9 +666,6 @@ func _Auth_UpdateUserGroup0_HTTP_Handler(srv AuthHTTPServer) func(ctx http.Conte if err := ctx.BindQuery(&in); err != nil { return err } - if err := ctx.BindVars(&in); err != nil { - return err - } http.SetOperation(ctx, OperationAuthUpdateUserGroup) h := ctx.Middleware(func(ctx context.Context, req interface{}) (interface{}, error) { return srv.UpdateUserGroup(ctx, req.(*UpdateUserGroupRequest)) @@ -718,9 +688,6 @@ func _Auth_UpdateUserGroup1_HTTP_Handler(srv AuthHTTPServer) func(ctx http.Conte if err := ctx.BindQuery(&in); err != nil { return err } - if err := ctx.BindVars(&in); err != nil { - return err - } http.SetOperation(ctx, OperationAuthUpdateUserGroup) h := ctx.Middleware(func(ctx context.Context, req interface{}) (interface{}, error) { return srv.UpdateUserGroup(ctx, req.(*UpdateUserGroupRequest)) @@ -740,9 +707,6 @@ func _Auth_DeleteUserGroup0_HTTP_Handler(srv AuthHTTPServer) func(ctx http.Conte if err := ctx.BindQuery(&in); err != nil { return err } - if err := ctx.BindVars(&in); err != nil { - return err - } http.SetOperation(ctx, OperationAuthDeleteUserGroup) h := ctx.Middleware(func(ctx context.Context, req interface{}) (interface{}, error) { return srv.DeleteUserGroup(ctx, req.(*params.IdsRequest)) @@ -806,9 +770,6 @@ func _Auth_UpdateWhitelist0_HTTP_Handler(srv AuthHTTPServer) func(ctx http.Conte if err := ctx.BindQuery(&in); err != nil { return err } - if err := ctx.BindVars(&in); err != nil { - return err - } http.SetOperation(ctx, OperationAuthUpdateWhitelist) h := ctx.Middleware(func(ctx context.Context, req interface{}) (interface{}, error) { return srv.UpdateWhitelist(ctx, req.(*UpdateWhitelistRequest)) @@ -831,9 +792,6 @@ func _Auth_UpdateWhitelist1_HTTP_Handler(srv AuthHTTPServer) func(ctx http.Conte if err := ctx.BindQuery(&in); err != nil { return err } - if err := ctx.BindVars(&in); err != nil { - return err - } http.SetOperation(ctx, OperationAuthUpdateWhitelist) h := ctx.Middleware(func(ctx context.Context, req interface{}) (interface{}, error) { return srv.UpdateWhitelist(ctx, req.(*UpdateWhitelistRequest)) @@ -853,9 +811,6 @@ func _Auth_DeleteWhitelist0_HTTP_Handler(srv AuthHTTPServer) func(ctx http.Conte if err := ctx.BindQuery(&in); err != nil { return err } - if err := ctx.BindVars(&in); err != nil { - return err - } http.SetOperation(ctx, OperationAuthDeleteWhitelist) h := ctx.Middleware(func(ctx context.Context, req interface{}) (interface{}, error) { return srv.DeleteWhitelist(ctx, req.(*params.IdsRequest)) @@ -924,7 +879,7 @@ func (c *AuthHTTPClientImpl) Captcha(ctx context.Context, in *emptypb.Empty, opt func (c *AuthHTTPClientImpl) CreateAction(ctx context.Context, in *CreateActionRequest, opts ...http.CallOption) (*emptypb.Empty, error) { var out emptypb.Empty - pattern := "/action" + pattern := "/action/create" path := binding.EncodeURL(pattern, in, false) opts = append(opts, http.Operation(OperationAuthCreateAction)) opts = append(opts, http.PathTemplate(pattern)) @@ -937,7 +892,7 @@ func (c *AuthHTTPClientImpl) CreateAction(ctx context.Context, in *CreateActionR func (c *AuthHTTPClientImpl) CreateRole(ctx context.Context, in *CreateRoleRequest, opts ...http.CallOption) (*emptypb.Empty, error) { var out emptypb.Empty - pattern := "/role" + pattern := "/role/create" path := binding.EncodeURL(pattern, in, false) opts = append(opts, http.Operation(OperationAuthCreateRole)) opts = append(opts, http.PathTemplate(pattern)) @@ -950,7 +905,7 @@ func (c *AuthHTTPClientImpl) CreateRole(ctx context.Context, in *CreateRoleReque func (c *AuthHTTPClientImpl) CreateUserGroup(ctx context.Context, in *CreateUserGroupRequest, opts ...http.CallOption) (*emptypb.Empty, error) { var out emptypb.Empty - pattern := "/user/group" + pattern := "/user/group/create" path := binding.EncodeURL(pattern, in, false) opts = append(opts, http.Operation(OperationAuthCreateUserGroup)) opts = append(opts, http.PathTemplate(pattern)) @@ -963,7 +918,7 @@ func (c *AuthHTTPClientImpl) CreateUserGroup(ctx context.Context, in *CreateUser func (c *AuthHTTPClientImpl) CreateWhitelist(ctx context.Context, in *CreateWhitelistRequest, opts ...http.CallOption) (*emptypb.Empty, error) { var out emptypb.Empty - pattern := "/whitelist" + pattern := "/whitelist/create" path := binding.EncodeURL(pattern, in, false) opts = append(opts, http.Operation(OperationAuthCreateWhitelist)) opts = append(opts, http.PathTemplate(pattern)) @@ -976,7 +931,7 @@ func (c *AuthHTTPClientImpl) CreateWhitelist(ctx context.Context, in *CreateWhit func (c *AuthHTTPClientImpl) DeleteAction(ctx context.Context, in *params.IdsRequest, opts ...http.CallOption) (*emptypb.Empty, error) { var out emptypb.Empty - pattern := "/action/{ids}" + pattern := "/action/delete" path := binding.EncodeURL(pattern, in, true) opts = append(opts, http.Operation(OperationAuthDeleteAction)) opts = append(opts, http.PathTemplate(pattern)) @@ -989,7 +944,7 @@ func (c *AuthHTTPClientImpl) DeleteAction(ctx context.Context, in *params.IdsReq func (c *AuthHTTPClientImpl) DeleteRole(ctx context.Context, in *params.IdsRequest, opts ...http.CallOption) (*emptypb.Empty, error) { var out emptypb.Empty - pattern := "/role/{ids}" + pattern := "/role/delete" path := binding.EncodeURL(pattern, in, true) opts = append(opts, http.Operation(OperationAuthDeleteRole)) opts = append(opts, http.PathTemplate(pattern)) @@ -1002,7 +957,7 @@ func (c *AuthHTTPClientImpl) DeleteRole(ctx context.Context, in *params.IdsReque func (c *AuthHTTPClientImpl) DeleteUser(ctx context.Context, in *params.IdsRequest, opts ...http.CallOption) (*emptypb.Empty, error) { var out emptypb.Empty - pattern := "/user/{ids}" + pattern := "/user/delete" path := binding.EncodeURL(pattern, in, true) opts = append(opts, http.Operation(OperationAuthDeleteUser)) opts = append(opts, http.PathTemplate(pattern)) @@ -1015,7 +970,7 @@ func (c *AuthHTTPClientImpl) DeleteUser(ctx context.Context, in *params.IdsReque func (c *AuthHTTPClientImpl) DeleteUserGroup(ctx context.Context, in *params.IdsRequest, opts ...http.CallOption) (*emptypb.Empty, error) { var out emptypb.Empty - pattern := "/user/group/{ids}" + pattern := "/user/group/delete" path := binding.EncodeURL(pattern, in, true) opts = append(opts, http.Operation(OperationAuthDeleteUserGroup)) opts = append(opts, http.PathTemplate(pattern)) @@ -1028,7 +983,7 @@ func (c *AuthHTTPClientImpl) DeleteUserGroup(ctx context.Context, in *params.Ids func (c *AuthHTTPClientImpl) DeleteWhitelist(ctx context.Context, in *params.IdsRequest, opts ...http.CallOption) (*emptypb.Empty, error) { var out emptypb.Empty - pattern := "/whitelist/{ids}" + pattern := "/whitelist/delete" path := binding.EncodeURL(pattern, in, true) opts = append(opts, http.Operation(OperationAuthDeleteWhitelist)) opts = append(opts, http.PathTemplate(pattern)) @@ -1041,7 +996,7 @@ func (c *AuthHTTPClientImpl) DeleteWhitelist(ctx context.Context, in *params.Ids func (c *AuthHTTPClientImpl) FindAction(ctx context.Context, in *FindActionRequest, opts ...http.CallOption) (*FindActionReply, error) { var out FindActionReply - pattern := "/action" + pattern := "/action/list" path := binding.EncodeURL(pattern, in, true) opts = append(opts, http.Operation(OperationAuthFindAction)) opts = append(opts, http.PathTemplate(pattern)) @@ -1054,7 +1009,7 @@ func (c *AuthHTTPClientImpl) FindAction(ctx context.Context, in *FindActionReque func (c *AuthHTTPClientImpl) FindRole(ctx context.Context, in *FindRoleRequest, opts ...http.CallOption) (*FindRoleReply, error) { var out FindRoleReply - pattern := "/role" + pattern := "/role/list" path := binding.EncodeURL(pattern, in, true) opts = append(opts, http.Operation(OperationAuthFindRole)) opts = append(opts, http.PathTemplate(pattern)) @@ -1067,7 +1022,7 @@ func (c *AuthHTTPClientImpl) FindRole(ctx context.Context, in *FindRoleRequest, func (c *AuthHTTPClientImpl) FindUser(ctx context.Context, in *FindUserRequest, opts ...http.CallOption) (*FindUserReply, error) { var out FindUserReply - pattern := "/user" + pattern := "/user/list" path := binding.EncodeURL(pattern, in, true) opts = append(opts, http.Operation(OperationAuthFindUser)) opts = append(opts, http.PathTemplate(pattern)) @@ -1080,7 +1035,7 @@ func (c *AuthHTTPClientImpl) FindUser(ctx context.Context, in *FindUserRequest, func (c *AuthHTTPClientImpl) FindUserGroup(ctx context.Context, in *FindUserGroupRequest, opts ...http.CallOption) (*FindUserGroupReply, error) { var out FindUserGroupReply - pattern := "/user/group" + pattern := "/user/group/list" path := binding.EncodeURL(pattern, in, true) opts = append(opts, http.Operation(OperationAuthFindUserGroup)) opts = append(opts, http.PathTemplate(pattern)) @@ -1093,7 +1048,7 @@ func (c *AuthHTTPClientImpl) FindUserGroup(ctx context.Context, in *FindUserGrou func (c *AuthHTTPClientImpl) FindWhitelist(ctx context.Context, in *FindWhitelistRequest, opts ...http.CallOption) (*FindWhitelistReply, error) { var out FindWhitelistReply - pattern := "/whitelist" + pattern := "/whitelist/list" path := binding.EncodeURL(pattern, in, true) opts = append(opts, http.Operation(OperationAuthFindWhitelist)) opts = append(opts, http.PathTemplate(pattern)) @@ -1171,11 +1126,11 @@ func (c *AuthHTTPClientImpl) Permission(ctx context.Context, in *PermissionReque func (c *AuthHTTPClientImpl) Pwd(ctx context.Context, in *PwdRequest, opts ...http.CallOption) (*emptypb.Empty, error) { var out emptypb.Empty - pattern := "/pwd" + pattern := "/pwd/update" path := binding.EncodeURL(pattern, in, false) opts = append(opts, http.Operation(OperationAuthPwd)) opts = append(opts, http.PathTemplate(pattern)) - err := c.cc.Invoke(ctx, "POST", path, in, &out, opts...) + err := c.cc.Invoke(ctx, "PATCH", path, in, &out, opts...) if err != nil { return nil, err } @@ -1223,7 +1178,7 @@ func (c *AuthHTTPClientImpl) Status(ctx context.Context, in *StatusRequest, opts func (c *AuthHTTPClientImpl) UpdateAction(ctx context.Context, in *UpdateActionRequest, opts ...http.CallOption) (*emptypb.Empty, error) { var out emptypb.Empty - pattern := "/action/{id}" + pattern := "/action/update" path := binding.EncodeURL(pattern, in, false) opts = append(opts, http.Operation(OperationAuthUpdateAction)) opts = append(opts, http.PathTemplate(pattern)) @@ -1236,7 +1191,7 @@ func (c *AuthHTTPClientImpl) UpdateAction(ctx context.Context, in *UpdateActionR func (c *AuthHTTPClientImpl) UpdateRole(ctx context.Context, in *UpdateRoleRequest, opts ...http.CallOption) (*emptypb.Empty, error) { var out emptypb.Empty - pattern := "/role/{id}" + pattern := "/role/update" path := binding.EncodeURL(pattern, in, false) opts = append(opts, http.Operation(OperationAuthUpdateRole)) opts = append(opts, http.PathTemplate(pattern)) @@ -1249,7 +1204,7 @@ func (c *AuthHTTPClientImpl) UpdateRole(ctx context.Context, in *UpdateRoleReque func (c *AuthHTTPClientImpl) UpdateUser(ctx context.Context, in *UpdateUserRequest, opts ...http.CallOption) (*emptypb.Empty, error) { var out emptypb.Empty - pattern := "/user/{id}" + pattern := "/user/update" path := binding.EncodeURL(pattern, in, false) opts = append(opts, http.Operation(OperationAuthUpdateUser)) opts = append(opts, http.PathTemplate(pattern)) @@ -1262,7 +1217,7 @@ func (c *AuthHTTPClientImpl) UpdateUser(ctx context.Context, in *UpdateUserReque func (c *AuthHTTPClientImpl) UpdateUserGroup(ctx context.Context, in *UpdateUserGroupRequest, opts ...http.CallOption) (*emptypb.Empty, error) { var out emptypb.Empty - pattern := "/user/group/{id}" + pattern := "/user/group/update" path := binding.EncodeURL(pattern, in, false) opts = append(opts, http.Operation(OperationAuthUpdateUserGroup)) opts = append(opts, http.PathTemplate(pattern)) @@ -1275,7 +1230,7 @@ func (c *AuthHTTPClientImpl) UpdateUserGroup(ctx context.Context, in *UpdateUser func (c *AuthHTTPClientImpl) UpdateWhitelist(ctx context.Context, in *UpdateWhitelistRequest, opts ...http.CallOption) (*emptypb.Empty, error) { var out emptypb.Empty - pattern := "/whitelist/{id}" + pattern := "/whitelist/update" path := binding.EncodeURL(pattern, in, false) opts = append(opts, http.Operation(OperationAuthUpdateWhitelist)) opts = append(opts, http.PathTemplate(pattern)) diff --git a/docs/auth-proto/auth.openapi.yaml b/docs/auth-proto/auth.openapi.yaml index 89e93c6..946dcd5 100644 --- a/docs/auth-proto/auth.openapi.yaml +++ b/docs/auth-proto/auth.openapi.yaml @@ -7,7 +7,36 @@ info: description: The auth service definition. version: 0.0.1 paths: - /action: + /action/create: + post: + tags: + - Auth + operationId: Auth_CreateAction + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/auth.v1.CreateActionRequest' + required: true + responses: + "200": + description: OK + content: {} + /action/delete: + delete: + tags: + - Auth + operationId: Auth_DeleteAction + parameters: + - name: ids + in: query + schema: + type: string + responses: + "200": + description: OK + content: {} + /action/list: get: tags: - Auth @@ -52,46 +81,11 @@ paths: application/json: schema: $ref: '#/components/schemas/auth.v1.FindActionReply' - post: - tags: - - Auth - operationId: Auth_CreateAction - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/auth.v1.CreateActionRequest' - required: true - responses: - "200": - description: OK - content: {} - /action/{ids}: - delete: - tags: - - Auth - operationId: Auth_DeleteAction - parameters: - - name: ids - in: path - required: true - schema: - type: string - responses: - "200": - description: OK - content: {} - /action/{id}: + /action/update: put: tags: - Auth operationId: Auth_UpdateAction - parameters: - - name: id - in: path - required: true - schema: - type: string requestBody: content: application/json: @@ -106,12 +100,6 @@ paths: tags: - Auth operationId: Auth_UpdateAction - parameters: - - name: id - in: path - required: true - schema: - type: string requestBody: content: application/json: @@ -243,8 +231,8 @@ paths: application/json: schema: $ref: '#/components/schemas/auth.v1.StatusReply' - /pwd: - post: + /pwd/update: + patch: tags: - Auth operationId: Auth_Pwd @@ -276,7 +264,36 @@ paths: application/json: schema: $ref: '#/components/schemas/auth.v1.LoginReply' - /role: + /role/create: + post: + tags: + - Auth + operationId: Auth_CreateRole + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/auth.v1.CreateRoleRequest' + required: true + responses: + "200": + description: OK + content: {} + /role/delete: + delete: + tags: + - Auth + operationId: Auth_DeleteRole + parameters: + - name: ids + in: query + schema: + type: string + responses: + "200": + description: OK + content: {} + /role/list: get: tags: - Auth @@ -317,81 +334,83 @@ paths: application/json: schema: $ref: '#/components/schemas/auth.v1.FindRoleReply' - post: + /role/update: + put: tags: - Auth - operationId: Auth_CreateRole + operationId: Auth_UpdateRole requestBody: content: application/json: schema: - $ref: '#/components/schemas/auth.v1.CreateRoleRequest' + $ref: '#/components/schemas/auth.v1.UpdateRoleRequest' required: true responses: "200": description: OK content: {} - /role/{ids}: + patch: + tags: + - Auth + operationId: Auth_UpdateRole + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/auth.v1.UpdateRoleRequest' + required: true + responses: + "200": + description: OK + content: {} + /user/delete: delete: tags: - Auth - operationId: Auth_DeleteRole + operationId: Auth_DeleteUser parameters: - name: ids - in: path - required: true + in: query schema: type: string responses: "200": description: OK content: {} - /role/{id}: - put: + /user/group/create: + post: tags: - Auth - operationId: Auth_UpdateRole - parameters: - - name: id - in: path - required: true - schema: - type: string + operationId: Auth_CreateUserGroup requestBody: content: application/json: schema: - $ref: '#/components/schemas/auth.v1.UpdateRoleRequest' + $ref: '#/components/schemas/auth.v1.CreateUserGroupRequest' required: true responses: "200": description: OK content: {} - patch: + /user/group/delete: + delete: tags: - Auth - operationId: Auth_UpdateRole + operationId: Auth_DeleteUserGroup parameters: - - name: id - in: path - required: true + - name: ids + in: query schema: type: string - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/auth.v1.UpdateRoleRequest' - required: true responses: "200": description: OK content: {} - /user: + /user/group/list: get: tags: - Auth - operationId: Auth_FindUser + operationId: Auth_FindUserGroup parameters: - name: page.num in: query @@ -409,50 +428,59 @@ paths: in: query schema: type: boolean - - name: startCreatedAt - in: query - schema: - type: string - - name: endCreatedAt - in: query - schema: - type: string - - name: startUpdatedAt - in: query - schema: - type: string - - name: endUpdatedAt - in: query - schema: - type: string - - name: username + - name: name in: query schema: type: string - - name: code + - name: word in: query schema: type: string - - name: platform + - name: action in: query schema: type: string - - name: locked - in: query - schema: - type: boolean responses: "200": description: OK content: application/json: schema: - $ref: '#/components/schemas/auth.v1.FindUserReply' - /user/group: + $ref: '#/components/schemas/auth.v1.FindUserGroupReply' + /user/group/update: + put: + tags: + - Auth + operationId: Auth_UpdateUserGroup + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/auth.v1.UpdateUserGroupRequest' + required: true + responses: + "200": + description: OK + content: {} + patch: + tags: + - Auth + operationId: Auth_UpdateUserGroup + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/auth.v1.UpdateUserGroupRequest' + required: true + responses: + "200": + description: OK + content: {} + /user/list: get: tags: - Auth - operationId: Auth_FindUserGroup + operationId: Auth_FindUser parameters: - name: page.num in: query @@ -470,70 +498,55 @@ paths: in: query schema: type: boolean - - name: name + - name: startCreatedAt in: query schema: type: string - - name: word + - name: endCreatedAt in: query schema: type: string - - name: action + - name: startUpdatedAt + in: query + schema: + type: string + - name: endUpdatedAt in: query schema: type: string + - name: username + in: query + schema: + type: string + - name: code + in: query + schema: + type: string + - name: platform + in: query + schema: + type: string + - name: locked + in: query + schema: + type: boolean responses: "200": description: OK content: application/json: schema: - $ref: '#/components/schemas/auth.v1.FindUserGroupReply' - post: - tags: - - Auth - operationId: Auth_CreateUserGroup - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/auth.v1.CreateUserGroupRequest' - required: true - responses: - "200": - description: OK - content: {} - /user/group/{ids}: - delete: - tags: - - Auth - operationId: Auth_DeleteUserGroup - parameters: - - name: ids - in: path - required: true - schema: - type: string - responses: - "200": - description: OK - content: {} - /user/group/{id}: + $ref: '#/components/schemas/auth.v1.FindUserReply' + /user/update: put: tags: - Auth - operationId: Auth_UpdateUserGroup - parameters: - - name: id - in: path - required: true - schema: - type: string + operationId: Auth_UpdateUser requestBody: content: application/json: schema: - $ref: '#/components/schemas/auth.v1.UpdateUserGroupRequest' + $ref: '#/components/schemas/auth.v1.UpdateUserRequest' required: true responses: "200": @@ -542,80 +555,47 @@ paths: patch: tags: - Auth - operationId: Auth_UpdateUserGroup - parameters: - - name: id - in: path - required: true - schema: - type: string + operationId: Auth_UpdateUser requestBody: content: application/json: schema: - $ref: '#/components/schemas/auth.v1.UpdateUserGroupRequest' + $ref: '#/components/schemas/auth.v1.UpdateUserRequest' required: true responses: "200": description: OK content: {} - /user/{ids}: - delete: - tags: - - Auth - operationId: Auth_DeleteUser - parameters: - - name: ids - in: path - required: true - schema: - type: string - responses: - "200": - description: OK - content: {} - /user/{id}: - put: + /whitelist/create: + post: tags: - Auth - operationId: Auth_UpdateUser - parameters: - - name: id - in: path - required: true - schema: - type: string + operationId: Auth_CreateWhitelist requestBody: content: application/json: schema: - $ref: '#/components/schemas/auth.v1.UpdateUserRequest' + $ref: '#/components/schemas/auth.v1.CreateWhitelistRequest' required: true responses: "200": description: OK content: {} - patch: + /whitelist/delete: + delete: tags: - Auth - operationId: Auth_UpdateUser + operationId: Auth_DeleteWhitelist parameters: - - name: id - in: path - required: true + - name: ids + in: query schema: type: string - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/auth.v1.UpdateUserRequest' - required: true responses: "200": description: OK content: {} - /whitelist: + /whitelist/list: get: tags: - Auth @@ -653,46 +633,11 @@ paths: application/json: schema: $ref: '#/components/schemas/auth.v1.FindWhitelistReply' - post: - tags: - - Auth - operationId: Auth_CreateWhitelist - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/auth.v1.CreateWhitelistRequest' - required: true - responses: - "200": - description: OK - content: {} - /whitelist/{ids}: - delete: - tags: - - Auth - operationId: Auth_DeleteWhitelist - parameters: - - name: ids - in: path - required: true - schema: - type: string - responses: - "200": - description: OK - content: {} - /whitelist/{id}: + /whitelist/update: put: tags: - Auth operationId: Auth_UpdateWhitelist - parameters: - - name: id - in: path - required: true - schema: - type: string requestBody: content: application/json: @@ -707,12 +652,6 @@ paths: tags: - Auth operationId: Auth_UpdateWhitelist - parameters: - - name: id - in: path - required: true - schema: - type: string requestBody: content: application/json: diff --git a/internal/biz/user.go b/internal/biz/user.go index a803ce6..e4e0ea9 100644 --- a/internal/biz/user.go +++ b/internal/biz/user.go @@ -183,10 +183,6 @@ func (uc *UserUseCase) Delete(ctx context.Context, ids ...uint64) error { }) } -func (uc *UserUseCase) GetUserByCode(ctx context.Context, code string) (rp *User) { - return uc.hotspot.GetUserByCode(ctx, code) -} - func (uc *UserUseCase) Find(ctx context.Context, condition *FindUser) (rp []User, err error) { action := strings.Join([]string{"find", utils.StructMd5(condition)}, "_") str, err := uc.cache.Get(ctx, action, func(ctx context.Context) (string, error) { diff --git a/internal/db/migrations/2023060217-default-data.sql b/internal/db/migrations/2023060217-default-data.sql index 469b23b..b66fdb7 100644 --- a/internal/db/migrations/2023060217-default-data.sql +++ b/internal/db/migrations/2023060217-default-data.sql @@ -2,28 +2,28 @@ -- SQL in section 'Up' is executed when this migration is applied INSERT INTO `action` (`id`, `name`, `code`, `word`, `resource`, `menu`, `btn`) VALUES (8926844486248562689,'全部权限','SN2837AY','*','*','*','*'), -(8926844486248579238,'默认权限','KHXK5JVL','default','POST|/auth/logout|/auth.v1.Auth/Logout\nGET|/auth/info|/auth.v1.Auth/Info\nPOST|/auth/pwd|/auth.v1.Auth/Pwd\nGET|/auth/idempotent|/auth.v1.Auth/Idempotent\n/auth.v1.Auth/CheckIdempotent','/dashboard/base\n/user/index',''), +(8926844486248579238,'默认权限','KHXK5JVL','default','POST|/auth/logout|/auth.v1.Auth/Logout\nGET|/auth/info|/auth.v1.Auth/Info\nPOST|/auth/pwd|/auth.v1.Auth/Pwd\nGET|/auth/idempotent|/auth.v1.Auth/Idempotent','/dashboard/base\n/user/index',''), (8929298412088590337,'首页','2QKHTYEE','dashboard','','/dashboard/base',''), -(8929306305215070209,'用户查询','GRNA3NPV','user.read','GET|/auth/user|/auth.v1.Auth/FindUser','/system/user','system.user.read'), +(8929306305215070209,'用户查询','GRNA3NPV','user.read','GET|/auth/user/list|/auth.v1.Auth/FindUser','/system/user','system.user.read'), (8929306391416406017,'用户新增','2LV9MDWB','user.create','POST|/auth/register|/auth.v1.Auth/Register','/system/user','system.user.create'), -(8929306434114420737,'用户修改','NME3CT5H','user.update','PUT,PATCH|/auth/user/*|/auth.v1.Auth/UpdateUser\nGET|/auth/action|/auth.v1.Auth/FindAction','/system/user','system.user.update'), -(8929306468524490753,'用户删除','EQH37R9C','user.delete','DELETE|/auth/user/*|/auth.v1.Auth/DeleteUser','/system/user','system.user.delete'), -(8929306872301748225,'用户组查询','V2HRXGW9','user.group.read','GET|/auth/user/group|/auth.v1.Auth/FindUserGroup','/system/group','system.user.group.read'), -(8929306977897545729,'用户组新增','GGKPXAL6','user.group.create','POST|/auth/user/group|/auth.v1.Auth/CreateUserGroup','/system/group','system.user.group.create'), -(8929307003835121665,'用户组修改','JM3TT968','user.group.update','PUT,PATCH|/auth/user/group/*|/auth.v1.Auth/UpdateUserGroup\nGET|/auth/user|/auth.v1.Auth/FindUser\nGET|/auth/action|/auth.v1.Auth/FindAction','/system/group','system.user.group.update'), -(8929307052153503745,'用户组删除','JE45TMPQ','user.group.delete','DELETE|/auth/user/group|/auth.v1.Auth/DeleteUserGroup','/system/group','system.user.group.delete'), -(8929716482426798081,'角色查询','AS2V9HND','role.read','GET|/auth/role|/auth.v1.Auth/FindRole','/system/role','system.role.read'), -(8929716516635541505,'角色创建','88BA22VF','role.create','POST|/auth/role|/auth.v1.Auth/CreateRole','/system/role','system.role.create'), -(8929716548663246849,'角色修改','GE5YBVDN','role.update','PUT,PATCH|/auth/role/*|/auth.v1.Auth/UpdateRole','/system/role','system.role.update'), -(8929716593156423681,'角色删除','AY6QE7QG','role.delete','DELETE|/auth/role/*|/auth.v1.Auth/DeleteRole','/system/role','system.role.delete'), -(8929717994339172353,'行为查询','42TMWNP3','action.read','GET|/auth/action|/auth.v1.Auth/FindAction','/system/action','system.action.read'), -(8929718040577179649,'行为新增','SXPYFM3K','action.create','POST|/auth/action|/auth.v1.Auth/CreateAction','/system/action','system.action.create'), -(8929718085473009665,'行为修改','8VCXMSCW','action.update','PUT,PATCH|/auth/action/*|/auth.v1.Auth/UpdateAction','/system/action','system.action.update'), -(8929718119446872065,'行为删除','86QSDSRL','action.delete','DELETE|/auth/action/*|/auth.v1.Auth/DeleteAction','/system/action','system.action.delete'), -(8946576676020551681,'白名单查询','ALX2LHB2','whitelist.read','GET|/auth/whitelist|/auth.v1.Auth/FindWhitelist','/system/whitelist','system.whitelist.read'), -(8946576685583564801,'白名单新增','ALCARRQ8','whitelist.create','POST|/auth/whitelist|/auth.v1.Auth/CreateWhitelist','/system/whitelist','system.whitelist.create'), -(8946576696086102017,'白名单修改','28FN73B3','whitelist.update','PUT,PATCH|/auth/whitelist/*|/auth.v1.Auth/UpdateWhitelist','/system/whitelist','system.whitelist.update'), -(8946576704491487233,'白名单删除','E8SN4T9K','whitelist.delete','DELETE|/auth/whitelist/*|/auth.v1.Auth/DeleteWhitelist','/system/whitelist','system.whitelist.delete'); +(8929306434114420737,'用户修改','NME3CT5H','user.update','PUT,PATCH|/auth/user/update|/auth.v1.Auth/UpdateUser\nGET|/auth/action|/auth.v1.Auth/FindAction','/system/user','system.user.update'), +(8929306468524490753,'用户删除','EQH37R9C','user.delete','DELETE|/auth/user/delete|/auth.v1.Auth/DeleteUser','/system/user','system.user.delete'), +(8929306872301748225,'用户组查询','V2HRXGW9','user.group.read','GET|/auth/user/group/list|/auth.v1.Auth/FindUserGroup','/system/group','system.user.group.read'), +(8929306977897545729,'用户组新增','GGKPXAL6','user.group.create','POST|/auth/user/group/create|/auth.v1.Auth/CreateUserGroup','/system/group','system.user.group.create'), +(8929307003835121665,'用户组修改','JM3TT968','user.group.update','PUT,PATCH|/auth/user/group/update|/auth.v1.Auth/UpdateUserGroup\nGET|/auth/user/list|/auth.v1.Auth/FindUser\nGET|/auth/action/list|/auth.v1.Auth/FindAction','/system/group','system.user.group.update'), +(8929307052153503745,'用户组删除','JE45TMPQ','user.group.delete','DELETE|/auth/user/group/delete|/auth.v1.Auth/DeleteUserGroup','/system/group','system.user.group.delete'), +(8929716482426798081,'角色查询','AS2V9HND','role.read','GET|/auth/role/list|/auth.v1.Auth/FindRole','/system/role','system.role.read'), +(8929716516635541505,'角色创建','88BA22VF','role.create','POST|/auth/role/create|/auth.v1.Auth/CreateRole','/system/role','system.role.create'), +(8929716548663246849,'角色修改','GE5YBVDN','role.update','PUT,PATCH|/auth/role/update|/auth.v1.Auth/UpdateRole','/system/role','system.role.update'), +(8929716593156423681,'角色删除','AY6QE7QG','role.delete','DELETE|/auth/role/delete|/auth.v1.Auth/DeleteRole','/system/role','system.role.delete'), +(8929717994339172353,'行为查询','42TMWNP3','action.read','GET|/auth/action/list|/auth.v1.Auth/FindAction','/system/action','system.action.read'), +(8929718040577179649,'行为新增','SXPYFM3K','action.create','POST|/auth/action/create|/auth.v1.Auth/CreateAction','/system/action','system.action.create'), +(8929718085473009665,'行为修改','8VCXMSCW','action.update','PUT,PATCH|/auth/action/update|/auth.v1.Auth/UpdateAction','/system/action','system.action.update'), +(8929718119446872065,'行为删除','86QSDSRL','action.delete','DELETE|/auth/action/delete|/auth.v1.Auth/DeleteAction','/system/action','system.action.delete'), +(8946576676020551681,'白名单查询','ALX2LHB2','whitelist.read','GET|/auth/whitelist/list|/auth.v1.Auth/FindWhitelist','/system/whitelist','system.whitelist.read'), +(8946576685583564801,'白名单新增','ALCARRQ8','whitelist.create','POST|/auth/whitelist/create|/auth.v1.Auth/CreateWhitelist','/system/whitelist','system.whitelist.create'), +(8946576696086102017,'白名单修改','28FN73B3','whitelist.update','PUT,PATCH|/auth/whitelist/update|/auth.v1.Auth/UpdateWhitelist','/system/whitelist','system.whitelist.update'), +(8946576704491487233,'白名单删除','E8SN4T9K','whitelist.delete','DELETE|/auth/whitelist/delete|/auth.v1.Auth/DeleteWhitelist','/system/whitelist','system.whitelist.delete'); INSERT INTO `role` (`id`, `name`, `word`, `action`) VALUES (8929718176338411521,'管理员','admin','SN2837AY'), diff --git a/internal/service/idempotent.go b/internal/service/idempotent.go index f2ffc06..f54f5f4 100644 --- a/internal/service/idempotent.go +++ b/internal/service/idempotent.go @@ -4,7 +4,6 @@ import ( "context" "auth/api/auth" - "auth/internal/biz" "go.opentelemetry.io/otel" "google.golang.org/protobuf/types/known/emptypb" ) @@ -17,20 +16,3 @@ func (s *AuthService) Idempotent(ctx context.Context, _ *emptypb.Empty) (rp *aut rp.Token = s.idempotent.Token(ctx) return } - -func (s *AuthService) CheckIdempotent(ctx context.Context, req *auth.CheckIdempotentRequest) (rp *emptypb.Empty, err error) { - tr := otel.Tracer("api") - ctx, span := tr.Start(ctx, "CheckIdempotent") - defer span.End() - rp = &emptypb.Empty{} - if req.Token == "" { - err = biz.ErrIdempotentMissingToken(ctx) - return - } - pass := s.idempotent.Check(ctx, req.Token) - if !pass { - err = biz.ErrIdempotentTokenExpired(ctx) - return - } - return -} diff --git a/internal/service/user.go b/internal/service/user.go index 4201e5e..a7422ad 100644 --- a/internal/service/user.go +++ b/internal/service/user.go @@ -14,17 +14,6 @@ import ( "google.golang.org/protobuf/types/known/emptypb" ) -func (s *AuthService) GetUserByCode(ctx context.Context, req *auth.GetUserByCodeRequest) (rp *auth.GetUserByCodeReply, err error) { - tr := otel.Tracer("api") - ctx, span := tr.Start(ctx, "GetUserByCode") - defer span.End() - rp = &auth.GetUserByCodeReply{} - user := s.user.GetUserByCode(ctx, req.Code) - rp.User = &auth.User{} - copierx.Copy(&rp.User, user) - return -} - func (s *AuthService) FindUser(ctx context.Context, req *auth.FindUserRequest) (rp *auth.FindUserReply, err error) { tr := otel.Tracer("api") ctx, span := tr.Start(ctx, "FindUser") diff --git a/internal/service/whitelist.go b/internal/service/whitelist.go index b1e21a9..0b10aa9 100644 --- a/internal/service/whitelist.go +++ b/internal/service/whitelist.go @@ -25,18 +25,6 @@ func (s *AuthService) CreateWhitelist(ctx context.Context, req *auth.CreateWhite return } -func (s *AuthService) HasWhitelist(ctx context.Context, req *auth.HasWhitelistRequest) (rp *auth.HasWhitelistReply, err error) { - tr := otel.Tracer("api") - ctx, span := tr.Start(ctx, "HasWhitelist") - defer span.End() - rp = &auth.HasWhitelistReply{} - r := &biz.HasWhitelist{} - copierx.Copy(&r, req) - res := s.whitelist.Has(ctx, r) - rp.Ok = res - return -} - func (s *AuthService) FindWhitelist(ctx context.Context, req *auth.FindWhitelistRequest) (rp *auth.FindWhitelistReply, err error) { tr := otel.Tracer("api") ctx, span := tr.Start(ctx, "FindWhitelist") From 8a6445350f695bb00b5c8db26a0bb8978b166515 Mon Sep 17 00:00:00 2001 From: piupuer Date: Tue, 15 Oct 2024 11:57:15 +0800 Subject: [PATCH 4/4] [feat]clear cache before set --- internal/data/hotspot.go | 89 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 89 insertions(+) diff --git a/internal/data/hotspot.go b/internal/data/hotspot.go index 0820afc..a5e38a7 100644 --- a/internal/data/hotspot.go +++ b/internal/data/hotspot.go @@ -285,6 +285,16 @@ func (ro hotspotRepo) refreshUserGroup(ctx context.Context, pipe redis.Pipeliner db := p.WithContext(ctx) name := p.TableName() list, _ := db.Find() + matchKey := strings.Join([]string{ + ro.c.Name, + ro.c.Hotspot.Name, + name, + "*", + }, ".") + matches := scanKeys(ctx, ro.data.redis, matchKey) + for _, key := range matches { + pipe.Del(ctx, key) + } for _, item := range list { idKey := strings.Join([]string{ ro.c.Name, @@ -293,6 +303,7 @@ func (ro hotspotRepo) refreshUserGroup(ctx context.Context, pipe redis.Pipeliner p.ID.ColumnName().String(), strconv.FormatUint(item.ID, 10), }, ".") + pipe.Del(ctx, idKey) pipe.HSet( ctx, idKey, utils.CamelCase(p.ID.ColumnName().String()), item.ID, @@ -308,6 +319,7 @@ func (ro hotspotRepo) refreshUserGroup(ctx context.Context, pipe redis.Pipeliner p.Word.ColumnName().String(), item.Word, }, ".") + pipe.Del(ctx, wordKey) pipe.HSet( ctx, wordKey, utils.CamelCase(p.ID.ColumnName().String()), item.ID, @@ -325,6 +337,16 @@ func (ro hotspotRepo) refreshUserUserGroupRelation(ctx context.Context, pipe red db := p.WithContext(ctx) name := p.TableName() list, _ := db.Find() + matchKey := strings.Join([]string{ + ro.c.Name, + ro.c.Hotspot.Name, + name, + "*", + }, ".") + matches := scanKeys(ctx, ro.data.redis, matchKey) + for _, key := range matches { + pipe.Del(ctx, key) + } // group id by user id groupIDMap := lo.MapValues( lo.GroupBy(list, func(item *model.UserUserGroupRelation) uint64 { @@ -360,6 +382,16 @@ func (ro hotspotRepo) refreshRole(ctx context.Context, pipe redis.Pipeliner) { db := p.WithContext(ctx) name := p.TableName() list, _ := db.Find() + matchKey := strings.Join([]string{ + ro.c.Name, + ro.c.Hotspot.Name, + name, + "*", + }, ".") + matches := scanKeys(ctx, ro.data.redis, matchKey) + for _, key := range matches { + pipe.Del(ctx, key) + } for _, item := range list { idKey := strings.Join([]string{ ro.c.Name, @@ -368,6 +400,7 @@ func (ro hotspotRepo) refreshRole(ctx context.Context, pipe redis.Pipeliner) { p.ID.ColumnName().String(), strconv.FormatUint(item.ID, 10), }, ".") + pipe.Del(ctx, idKey) pipe.HSet( ctx, idKey, utils.CamelCase(p.ID.ColumnName().String()), item.ID, @@ -383,6 +416,7 @@ func (ro hotspotRepo) refreshRole(ctx context.Context, pipe redis.Pipeliner) { p.Word.ColumnName().String(), item.Word, }, ".") + pipe.Del(ctx, wordKey) pipe.HSet( ctx, wordKey, utils.CamelCase(p.ID.ColumnName().String()), item.ID, @@ -400,6 +434,16 @@ func (ro hotspotRepo) refreshAction(ctx context.Context, pipe redis.Pipeliner) { db := p.WithContext(ctx) name := p.TableName() list, _ := db.Find() + matchKey := strings.Join([]string{ + ro.c.Name, + ro.c.Hotspot.Name, + name, + "*", + }, ".") + matches := scanKeys(ctx, ro.data.redis, matchKey) + for _, key := range matches { + pipe.Del(ctx, key) + } for _, item := range list { idKey := strings.Join([]string{ ro.c.Name, @@ -408,6 +452,7 @@ func (ro hotspotRepo) refreshAction(ctx context.Context, pipe redis.Pipeliner) { p.ID.ColumnName().String(), strconv.FormatUint(item.ID, 10), }, ".") + pipe.Del(ctx, idKey) pipe.HSet( ctx, idKey, utils.CamelCase(p.ID.ColumnName().String()), item.ID, @@ -426,6 +471,7 @@ func (ro hotspotRepo) refreshAction(ctx context.Context, pipe redis.Pipeliner) { p.Code.ColumnName().String(), item.Code, }, ".") + pipe.Del(ctx, codeKey) pipe.HSet( ctx, codeKey, utils.CamelCase(p.ID.ColumnName().String()), item.ID, @@ -444,6 +490,7 @@ func (ro hotspotRepo) refreshAction(ctx context.Context, pipe redis.Pipeliner) { p.Word.ColumnName().String(), item.Word, }, ".") + pipe.Del(ctx, wordKey) pipe.HSet( ctx, wordKey, utils.CamelCase(p.ID.ColumnName().String()), item.ID, @@ -464,6 +511,16 @@ func (ro hotspotRepo) refreshWhitelist(ctx context.Context, pipe redis.Pipeliner db := p.WithContext(ctx) name := p.TableName() list, _ := db.Find() + matchKey := strings.Join([]string{ + ro.c.Name, + ro.c.Hotspot.Name, + name, + "*", + }, ".") + matches := scanKeys(ctx, ro.data.redis, matchKey) + for _, key := range matches { + pipe.Del(ctx, key) + } for _, item := range list { idKey := strings.Join([]string{ ro.c.Name, @@ -472,6 +529,7 @@ func (ro hotspotRepo) refreshWhitelist(ctx context.Context, pipe redis.Pipeliner p.ID.ColumnName().String(), strconv.FormatUint(item.ID, 10), }, ".") + pipe.Del(ctx, idKey) pipe.HSet( ctx, idKey, utils.CamelCase(p.ID.ColumnName().String()), item.ID, @@ -516,6 +574,16 @@ func (ro hotspotRepo) refreshUser(ctx context.Context, pipe redis.Pipeliner) { db := p.WithContext(ctx) name := p.TableName() list, _ := db.Find() + matchKey := strings.Join([]string{ + ro.c.Name, + ro.c.Hotspot.Name, + name, + "*", + }, ".") + matches := scanKeys(ctx, ro.data.redis, matchKey) + for _, key := range matches { + pipe.Del(ctx, key) + } for _, item := range list { idKey := strings.Join([]string{ ro.c.Name, @@ -524,6 +592,7 @@ func (ro hotspotRepo) refreshUser(ctx context.Context, pipe redis.Pipeliner) { p.ID.ColumnName().String(), strconv.FormatUint(item.ID, 10), }, ".") + pipe.Del(ctx, idKey) pipe.HSet( ctx, idKey, utils.CamelCase(p.ID.ColumnName().String()), item.ID, @@ -544,6 +613,7 @@ func (ro hotspotRepo) refreshUser(ctx context.Context, pipe redis.Pipeliner) { p.Code.ColumnName().String(), item.Code, }, ".") + pipe.Del(ctx, codeKey) pipe.HSet( ctx, codeKey, utils.CamelCase(p.ID.ColumnName().String()), item.ID, @@ -564,6 +634,7 @@ func (ro hotspotRepo) refreshUser(ctx context.Context, pipe redis.Pipeliner) { p.Username.ColumnName().String(), item.Username, }, ".") + pipe.Del(ctx, usernameKey) pipe.HSet( ctx, usernameKey, utils.CamelCase(p.ID.ColumnName().String()), item.ID, @@ -581,6 +652,24 @@ func (ro hotspotRepo) refreshUser(ctx context.Context, pipe redis.Pipeliner) { return } +func scanKeys(ctx context.Context, rds redis.UniversalClient, pattern string) (list []string) { + var cursor uint64 + for { + keys, cursorNew, err := rds.Scan(ctx, cursor, pattern, 100).Result() + if err != nil { + return + } + + list = append(list, keys...) + cursor = cursorNew + + if cursor == 0 { + break + } + } + return +} + func (ro hotspotRepo) randomExpire() time.Duration { expire := ro.c.Hotspot.Expire.AsDuration() seconds := rand.New(rand.NewSource(time.Now().Unix())).Int63n(3600)