From 88551d36787cea046930973f4ef6962d3e044f2b Mon Sep 17 00:00:00 2001 From: Abin Simon Date: Wed, 29 Dec 2021 12:59:52 +0530 Subject: [PATCH 01/28] Add types for user management proto files --- components/usermgmt/buf.gen.yaml | 23 +++++++++ components/usermgmt/buf.lock | 24 +++++++++ components/usermgmt/buf.yaml | 12 +++++ components/usermgmt/go.mod | 3 ++ components/usermgmt/main.go | 2 + .../proto/types/userpb/v3/group.proto | 35 +++++++++++++ .../usermgmt/proto/types/userpb/v3/role.proto | 32 ++++++++++++ .../types/userpb/v3/rolepermission.proto | 31 ++++++++++++ .../usermgmt/proto/types/userpb/v3/user.proto | 49 +++++++++++++++++++ components/usermgmt/readme | 11 +++++ 10 files changed, 222 insertions(+) create mode 100644 components/usermgmt/buf.gen.yaml create mode 100644 components/usermgmt/buf.lock create mode 100644 components/usermgmt/buf.yaml create mode 100644 components/usermgmt/go.mod create mode 100644 components/usermgmt/main.go create mode 100644 components/usermgmt/proto/types/userpb/v3/group.proto create mode 100644 components/usermgmt/proto/types/userpb/v3/role.proto create mode 100644 components/usermgmt/proto/types/userpb/v3/rolepermission.proto create mode 100644 components/usermgmt/proto/types/userpb/v3/user.proto create mode 100644 components/usermgmt/readme diff --git a/components/usermgmt/buf.gen.yaml b/components/usermgmt/buf.gen.yaml new file mode 100644 index 0000000..9324567 --- /dev/null +++ b/components/usermgmt/buf.gen.yaml @@ -0,0 +1,23 @@ +version: v1 +managed: + enabled: true + go_package_prefix: + default: github.com/RafaySystems/rcloud-base/components/usermgmt + except: + - buf.build/googleapis/googleapis + - buf.build/grpc-ecosystem/grpc-gateway + - buf.build/gogo/protobuf +plugins: + - name: go + out: . + opt: paths=source_relative + - name: go-grpc + out: . + opt: + - paths=source_relative + - require_unimplemented_servers=false + - name: grpc-gateway + out: . + opt: paths=source_relative + - name: openapiv2 + out: gen/openapi diff --git a/components/usermgmt/buf.lock b/components/usermgmt/buf.lock new file mode 100644 index 0000000..ee65047 --- /dev/null +++ b/components/usermgmt/buf.lock @@ -0,0 +1,24 @@ +# Generated by buf. DO NOT EDIT. +version: v1 +deps: + - remote: buf.build + owner: gogo + repository: protobuf + branch: main + commit: 4df00b267f944190a229ce3695781e99 + digest: b1-sjLgsg7CzrkOrIjBDh3s-l0aMjE6oqTj85-OsoopKAw= + create_time: 2021-08-10T00:14:28.345069Z + - remote: buf.build + owner: googleapis + repository: googleapis + branch: main + commit: 9088184d3ed04821b7e990024ff05656 + digest: b1---R9Xre3yvH8peoJPQ0dsUYp37KzdlBlx5fjPsYekyI= + create_time: 2021-12-23T15:04:49.66847Z + - remote: buf.build + owner: grpc-ecosystem + repository: grpc-gateway + branch: main + commit: ff83506eb9cc4cf8972f49ce87e6ed3e + digest: b1-iLPHgLaoeWWinMiXXqPnxqE4BThtY3eSbswVGh9GOGI= + create_time: 2021-10-23T16:26:52.283938Z diff --git a/components/usermgmt/buf.yaml b/components/usermgmt/buf.yaml new file mode 100644 index 0000000..9b120ea --- /dev/null +++ b/components/usermgmt/buf.yaml @@ -0,0 +1,12 @@ +version: v1 +name: buf.build/meain/usermgmt +deps: + # - buf.build/googleapis/googleapis + - buf.build/grpc-ecosystem/grpc-gateway + - buf.build/gogo/protobuf +breaking: + use: + - FILE +lint: + use: + - DEFAULT diff --git a/components/usermgmt/go.mod b/components/usermgmt/go.mod new file mode 100644 index 0000000..67bf315 --- /dev/null +++ b/components/usermgmt/go.mod @@ -0,0 +1,3 @@ +module github.com/RafaySystems/rcloud-base/components/usermgmt + +go 1.16 diff --git a/components/usermgmt/main.go b/components/usermgmt/main.go new file mode 100644 index 0000000..faf017a --- /dev/null +++ b/components/usermgmt/main.go @@ -0,0 +1,2 @@ +package usermgmt + diff --git a/components/usermgmt/proto/types/userpb/v3/group.proto b/components/usermgmt/proto/types/userpb/v3/group.proto new file mode 100644 index 0000000..9dd545f --- /dev/null +++ b/components/usermgmt/proto/types/userpb/v3/group.proto @@ -0,0 +1,35 @@ +syntax = "proto3"; +package rafay.dev.types.user.v3; + +import "proto/types/commonpb/v3/common.proto"; +import "proto/types/systempb/v3/project.proto"; +import "protoc-gen-openapiv2/options/annotations.proto"; +// import "google/api/field_behavior.proto"; + +message Group { + option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_schema) = { + json_schema : { + title : "Group" + description : "Group" + required : [ "apiVersion", "kind", "metadata", "spec" ] + } + }; + string apiVersion = 1; // usermgmt.k8smgmt.io/v3 + string kind = 2; // default : "Group" + rafay.dev.types.common.v3.Metadata metadata = 3; + GroupSpec spec = 4; + rafay.dev.types.common.v3.Status status = 5; +} + +message GroupSpec { + repeated rafay.dev.types.system.v3.Project projects = 1; + repeated string users = 2; + string type = 3; +} + +message GroupList { + string apiVersion = 1; + string kind = 2; + rafay.dev.types.common.v3.ListMetadata metadata = 3; + repeated Group items = 4; +} diff --git a/components/usermgmt/proto/types/userpb/v3/role.proto b/components/usermgmt/proto/types/userpb/v3/role.proto new file mode 100644 index 0000000..15afa5f --- /dev/null +++ b/components/usermgmt/proto/types/userpb/v3/role.proto @@ -0,0 +1,32 @@ +syntax = "proto3"; +package rafay.dev.types.user.v3; + +import "proto/types/commonpb/v3/common.proto"; +import "proto/types/userpb/v3/rolepermission.proto"; +import "protoc-gen-openapiv2/options/annotations.proto"; +// import "google/api/field_behavior.proto"; + +message Role { + option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_schema) = { + json_schema : { + title : "Role" + description : "Role" + required : [ "apiVersion", "kind", "metadata", "spec" ] + } + }; + + string apiVersion = 1; // default : "usermgmt.k8smgmt.io/v3" + string kind = 2; // default : "Role" + rafay.dev.types.common.v3.Metadata metadata = 3; + RoleSpec spec = 4; + rafay.dev.types.common.v3.Status status = 5; +} + +message RoleSpec { repeated rafay.dev.types.user.v3.RolePermission rolepermissions = 1; } + +message RoleList { + string apiVersion = 1; + string kind = 2; + rafay.dev.types.common.v3.ListMetadata metadata = 3; + repeated Role items = 4; +} diff --git a/components/usermgmt/proto/types/userpb/v3/rolepermission.proto b/components/usermgmt/proto/types/userpb/v3/rolepermission.proto new file mode 100644 index 0000000..4bc7f14 --- /dev/null +++ b/components/usermgmt/proto/types/userpb/v3/rolepermission.proto @@ -0,0 +1,31 @@ +syntax = "proto3"; +package rafay.dev.types.user.v3; + +import "proto/types/commonpb/v3/common.proto"; +import "protoc-gen-openapiv2/options/annotations.proto"; +// import "google/api/field_behavior.proto"; + +message RolePermission { + option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_schema) = { + json_schema : { + title : "RolePermission" + description : "Role Permission" + required : [ "apiVersion", "kind", "metadata", "spec" ] + } + }; + + string apiVersion = 1; // default : "usermgmt.k8smgmt.io/v3" + string kind = 2; // default : "RolePermission" + rafay.dev.types.common.v3.Metadata metadata = 3; + RolePermissionSpec spec = 4; + rafay.dev.types.common.v3.Status status = 5; +} + +message RolePermissionSpec { repeated string permissions = 1; } + +message RolePermissionList { + string apiVersion = 1; + string kind = 2; + rafay.dev.types.common.v3.ListMetadata metadata = 3; + repeated RolePermission items = 4; +} diff --git a/components/usermgmt/proto/types/userpb/v3/user.proto b/components/usermgmt/proto/types/userpb/v3/user.proto new file mode 100644 index 0000000..1e9c701 --- /dev/null +++ b/components/usermgmt/proto/types/userpb/v3/user.proto @@ -0,0 +1,49 @@ +syntax = "proto3"; +package rafay.dev.types.user.v3; + +import "proto/types/commonpb/v3/common.proto"; +import "proto/types/userpb/v3/role.proto"; +import "proto/types/userpb/v3/rolepermission.proto"; +import "proto/types/userpb/v3/group.proto"; +import "proto/types/systempb/v3/project.proto"; +import "protoc-gen-openapiv2/options/annotations.proto"; +// import "google/api/field_behavior.proto"; + +message User { + option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_schema) = { + json_schema : { + title : "User" + description : "User" + required : [ "apiVersion", "kind", "metadata", "spec" ] + } + }; + + string apiVersion = 1; // default : "usermgmt.k8smgmt.io/v3" + string kind = 2; // default : "User" + rafay.dev.types.common.v3.Metadata metadata = 3; + UserSpec spec = 4; + rafay.dev.types.common.v3.Status status = 5; +} + +message UserSpec { + string firstName = 1; + string lastName = 2; + string username = 3; + string phone = 4; + string password = 5; + string totpRequired = 6; + string totpSecret = 7; + repeated rafay.dev.types.user.v3.Role roles = 8; + repeated rafay.dev.types.user.v3.Group group = 9; + repeated rafay.dev.types.system.v3.Project project = 10; + bool emailVerified = 11; + bool phoneVerified = 12; + bool totpVerified = 13; +} + +message UserList { + string apiVersion = 1; + string kind = 2; + rafay.dev.types.common.v3.ListMetadata metadata = 3; + repeated User items = 4; +} diff --git a/components/usermgmt/readme b/components/usermgmt/readme new file mode 100644 index 0000000..688f79a --- /dev/null +++ b/components/usermgmt/readme @@ -0,0 +1,11 @@ +User management for rcloud + +Dependencies: +- ory/kratos + +Components: +- Glue between frontend and kratos +- Auth validation for use in other modules + +TBD: +- Will casbin be integrated in same module or separate api call? (Probably separate api call) \ No newline at end of file From 424a778d69a87e6268f28fdd69dea8f3ccd4d69e Mon Sep 17 00:00:00 2001 From: Abin Simon Date: Fri, 31 Dec 2021 10:15:04 +0530 Subject: [PATCH 02/28] Add rpc definitions for usermgmt --- components/usermgmt/proto/rpc/v3/group.proto | 129 ++++++++++++++ components/usermgmt/proto/rpc/v3/role.proto | 120 +++++++++++++ .../proto/rpc/v3/rolepermission.proto | 99 +++++++++++ components/usermgmt/proto/rpc/v3/user.proto | 121 ++++++++++++++ .../proto/types/userpb/v3/group.proto | 113 +++++++++++-- .../usermgmt/proto/types/userpb/v3/role.proto | 82 +++++++-- .../types/userpb/v3/rolepermission.proto | 82 +++++++-- .../usermgmt/proto/types/userpb/v3/user.proto | 158 +++++++++++++++--- 8 files changed, 850 insertions(+), 54 deletions(-) create mode 100644 components/usermgmt/proto/rpc/v3/group.proto create mode 100644 components/usermgmt/proto/rpc/v3/role.proto create mode 100644 components/usermgmt/proto/rpc/v3/rolepermission.proto create mode 100644 components/usermgmt/proto/rpc/v3/user.proto diff --git a/components/usermgmt/proto/rpc/v3/group.proto b/components/usermgmt/proto/rpc/v3/group.proto new file mode 100644 index 0000000..5173477 --- /dev/null +++ b/components/usermgmt/proto/rpc/v3/group.proto @@ -0,0 +1,129 @@ +syntax = "proto3"; +package rafay.dev.rpc.v3; + +import "google/api/annotations.proto"; +import "gogoproto/gogo.proto"; +import "protoc-gen-openapiv2/options/annotations.proto"; +import "proto/types/userpb/v3/group.proto"; + +// Enable custom Marshal method. +option (gogoproto.marshaler_all) = true; +// Enable custom Unmarshal method. +option (gogoproto.unmarshaler_all) = true; +// Enable custom Size method (Required by Marshal and Unmarshal). +option (gogoproto.sizer_all) = true; +// Enable registration with golang/protobuf for the grpc-gateway. +option (gogoproto.goproto_registration) = true; +// Enable generation of XXX_MessageName methods for grpc-go/status. +option (gogoproto.messagename_all) = true; + +option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_swagger) = { + info : { + title : "Group management Service" + version : "2.0" + contact : {name : "Rafay Dev"} + } + schemes : HTTPS + consumes : "application/json" + consumes : "application/yaml" + produces : "application/json" + produces : "application/yaml" + security_definitions : { + security : { + key : "BasicAuth" + value : {type : TYPE_BASIC} + } + security : { + key : "ApiKeyAuth" + value : {type : TYPE_API_KEY in : IN_HEADER name : "X-RAFAY-API-KEYID"} + } + } + security : { + security_requirement : { + key : "BasicAuth" + value : {} + } + security_requirement : { + key : "ApiKeyAuth" + value : {} + } + } + responses : { + key : "403" + value : { + description : "Returned when the group does not have permission to " + "access " + "the resource." + } + } + responses : { + key : "404" + value : { + description : "Returned when the resource does not exist." + schema : {json_schema : {type : STRING}} + } + } +}; + +// Add filtering with org as well +message GetGroupsRequest { + string project = 1 + [ (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { + title : "Project", + description : "Project of user to filter by" + read_only : true + } ]; +} +message GetGroupRequest { string id = 1; } +message DeleteGroupRequest { string id = 1; } +message PutGroupRequest { + string id = 1; + rafay.dev.types.user.v3.Group group = 2; +} +message GetGroupsResponse { repeated rafay.dev.types.user.v3.Group group = 1; } +message GroupResponse { + string status = 1; + string message = 2; +} + +service Group { + rpc CreateGroup(rafay.dev.types.user.v3.Group) + returns (rafay.dev.types.user.v3.Group) { + option (google.api.http) = { + post : "/auth/v3/groups" + body : "*" + }; + + option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation) = { + responses : { + key : "201" + value : {description : "Returned when group is created successfully."} + } + }; + }; + + rpc GetGroups(GetGroupsRequest) returns (GetGroupsResponse) { + option (google.api.http) = { + get : "/auth/v3/groups" + }; + }; + + rpc GetGroup(GetGroupRequest) returns (rafay.dev.types.user.v3.Group) { + option (google.api.http) = { + get : "/auth/v3/group/{id}" + }; + }; + + rpc UpdateGroup(PutGroupRequest) returns (GroupResponse) { + option (google.api.http) = { + put : "/auth/v3/group/{id}" + body : "group" + }; + }; + + rpc DeleteGroup(DeleteGroupRequest) returns (GroupResponse) { + option (google.api.http) = { + delete : "/auth/v3/group/{id}" + }; + }; +} \ No newline at end of file diff --git a/components/usermgmt/proto/rpc/v3/role.proto b/components/usermgmt/proto/rpc/v3/role.proto new file mode 100644 index 0000000..27063ed --- /dev/null +++ b/components/usermgmt/proto/rpc/v3/role.proto @@ -0,0 +1,120 @@ +syntax = "proto3"; +package rafay.dev.rpc.v3; + +import "google/api/annotations.proto"; +import "gogoproto/gogo.proto"; +import "protoc-gen-openapiv2/options/annotations.proto"; +import "proto/types/userpb/v3/role.proto"; + +// Enable custom Marshal method. +option (gogoproto.marshaler_all) = true; +// Enable custom Unmarshal method. +option (gogoproto.unmarshaler_all) = true; +// Enable custom Size method (Required by Marshal and Unmarshal). +option (gogoproto.sizer_all) = true; +// Enable registration with golang/protobuf for the grpc-gateway. +option (gogoproto.goproto_registration) = true; +// Enable generation of XXX_MessageName methods for grpc-go/status. +option (gogoproto.messagename_all) = true; + +option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_swagger) = { + info : { + title : "Role management Service" + version : "2.0" + contact : {name : "Rafay Dev"} + } + schemes : HTTPS + consumes : "application/json" + consumes : "application/yaml" + produces : "application/json" + produces : "application/yaml" + security_definitions : { + security : { + key : "BasicAuth" + value : {type : TYPE_BASIC} + } + security : { + key : "ApiKeyAuth" + value : {type : TYPE_API_KEY in : IN_HEADER name : "X-RAFAY-API-KEYID"} + } + } + security : { + security_requirement : { + key : "BasicAuth" + value : {} + } + security_requirement : { + key : "ApiKeyAuth" + value : {} + } + } + responses : { + key : "403" + value : { + description : "Returned when the role does not have permission to access " + "the resource." + } + } + responses : { + key : "404" + value : { + description : "Returned when the resource does not exist." + schema : {json_schema : {type : STRING}} + } + } +}; + +message GetRolesRequest {} +message GetRoleRequest { string id = 1; } +message DeleteRoleRequest { string id = 1; } +message PutRoleRequest { + string id = 1; + rafay.dev.types.user.v3.Role role = 2; +} +message GetRolesResponse { repeated rafay.dev.types.user.v3.Role role = 1; } +message RoleResponse { + string status = 1; + string message = 2; +} + +service Role { + rpc CreateRole(rafay.dev.types.user.v3.Role) + returns (rafay.dev.types.user.v3.Role) { + option (google.api.http) = { + post : "/auth/v3/roles" + body : "*" + }; + + option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation) = { + responses : { + key : "201" + value : {description : "Returned when role is created successfully."} + } + }; + }; + + rpc GetRoles(GetRolesRequest) returns (GetRolesResponse) { + option (google.api.http) = { + get : "/auth/v3/roles" + }; + }; + + rpc GetRole(GetRoleRequest) returns (rafay.dev.types.user.v3.Role) { + option (google.api.http) = { + get : "/auth/v3/role/{id}" + }; + }; + + rpc UpdateRole(PutRoleRequest) returns (RoleResponse) { + option (google.api.http) = { + put : "/auth/v3/role/{id}" + body : "role" + }; + }; + + rpc DeleteRole(DeleteRoleRequest) returns (RoleResponse) { + option (google.api.http) = { + delete : "/auth/v3/role/{id}" + }; + }; +} \ No newline at end of file diff --git a/components/usermgmt/proto/rpc/v3/rolepermission.proto b/components/usermgmt/proto/rpc/v3/rolepermission.proto new file mode 100644 index 0000000..9c9ca4f --- /dev/null +++ b/components/usermgmt/proto/rpc/v3/rolepermission.proto @@ -0,0 +1,99 @@ +syntax = "proto3"; +package rafay.dev.rpc.v3; + +import "google/api/annotations.proto"; +import "gogoproto/gogo.proto"; +import "protoc-gen-openapiv2/options/annotations.proto"; +import "proto/types/userpb/v3/rolepermission.proto"; + +// Enable custom Marshal method. +option (gogoproto.marshaler_all) = true; +// Enable custom Unmarshal method. +option (gogoproto.unmarshaler_all) = true; +// Enable custom Size method (Required by Marshal and Unmarshal). +option (gogoproto.sizer_all) = true; +// Enable registration with golang/protobuf for the grpc-gateway. +option (gogoproto.goproto_registration) = true; +// Enable generation of XXX_MessageName methods for grpc-go/status. +option (gogoproto.messagename_all) = true; + +option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_swagger) = { + info : { + title : "Rolepermission management Service" + version : "2.0" + contact : {name : "Rafay Dev"} + } + schemes : HTTPS + consumes : "application/json" + consumes : "application/yaml" + produces : "application/json" + produces : "application/yaml" + security_definitions : { + security : { + key : "BasicAuth" + value : {type : TYPE_BASIC} + } + security : { + key : "ApiKeyAuth" + value : {type : TYPE_API_KEY in : IN_HEADER name : "X-RAFAY-API-KEYID"} + } + } + security : { + security_requirement : { + key : "BasicAuth" + value : {} + } + security_requirement : { + key : "ApiKeyAuth" + value : {} + } + } + responses : { + key : "403" + value : { + description : "Returned when the rolepermission does not have permission " + "to access " + "the resource." + } + } + responses : { + key : "404" + value : { + description : "Returned when the resource does not exist." + schema : {json_schema : {type : STRING}} + } + } +}; + +message GetRolepermissionsRequest {} +message GetRolepermissionRequest { + string id = 1 + [ (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { + title : "Id", + description : "Id of the rolepermission resource" + } ]; +} +message GetRolepermissionsResponse { + repeated rafay.dev.types.user.v3.RolePermission rolepermissions = 1 + [ (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { + title : "RolePermissions", + description : "List of the rolepermission resources" + } ]; + +} + +service Rolepermission { + rpc GetRolepermissions(GetRolepermissionsRequest) + returns (GetRolepermissionsResponse) { + option (google.api.http) = { + get : "/auth/v3/rolepermissions" + }; + }; + + rpc GetRolepermission(GetRolepermissionRequest) + returns (rafay.dev.types.user.v3.RolePermission) { + option (google.api.http) = { + get : "/auth/v3/rolepermission/{id}" + }; + }; +} \ No newline at end of file diff --git a/components/usermgmt/proto/rpc/v3/user.proto b/components/usermgmt/proto/rpc/v3/user.proto new file mode 100644 index 0000000..f181039 --- /dev/null +++ b/components/usermgmt/proto/rpc/v3/user.proto @@ -0,0 +1,121 @@ +syntax = "proto3"; +package rafay.dev.rpc.v3; + +import "google/api/annotations.proto"; +import "gogoproto/gogo.proto"; +import "protoc-gen-openapiv2/options/annotations.proto"; +import "proto/types/userpb/v3/user.proto"; + +// Enable custom Marshal method. +option (gogoproto.marshaler_all) = true; +// Enable custom Unmarshal method. +option (gogoproto.unmarshaler_all) = true; +// Enable custom Size method (Required by Marshal and Unmarshal). +option (gogoproto.sizer_all) = true; +// Enable registration with golang/protobuf for the grpc-gateway. +option (gogoproto.goproto_registration) = true; +// Enable generation of XXX_MessageName methods for grpc-go/status. +option (gogoproto.messagename_all) = true; + +option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_swagger) = { + info : { + title : "User management Service" + version : "2.0" + contact : {name : "Rafay Dev"} + } + schemes : HTTPS + consumes : "application/json" + consumes : "application/yaml" + produces : "application/json" + produces : "application/yaml" + security_definitions : { + security : { + key : "BasicAuth" + value : {type : TYPE_BASIC} + } + security : { + key : "ApiKeyAuth" + value : {type : TYPE_API_KEY in : IN_HEADER name : "X-RAFAY-API-KEYID"} + } + } + security : { + security_requirement : { + key : "BasicAuth" + value : {} + } + security_requirement : { + key : "ApiKeyAuth" + value : {} + } + } + responses : { + key : "403" + value : { + description : "Returned when the user does not have permission to access " + "the resource." + } + } + responses : { + key : "404" + value : { + description : "Returned when the resource does not exist." + schema : {json_schema : {type : STRING}} + } + } +}; + +// Add option to filter by more org and group +message GetUsersRequest { string project = 1; } +message GetUserRequest { string userid = 1; } +message DeleteUserRequest { string userid = 1; } +message PutUserRequest { + string userid = 1; + rafay.dev.types.user.v3.User user = 2; +} +message GetUsersResponse { repeated rafay.dev.types.user.v3.User user = 1; } +message UserResponse { + string status = 1; + string message = 2; +} + +service User { + rpc CreateUser(rafay.dev.types.user.v3.User) + returns (rafay.dev.types.user.v3.User) { + option (google.api.http) = { + post : "/auth/v3/users" + body : "*" + }; + + option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation) = { + responses : { + key : "201" + value : {description : "Returned when user is created successfully."} + } + }; + }; + + rpc GetUsers(GetUsersRequest) returns (GetUsersResponse) { + option (google.api.http) = { + get : "/auth/v3/users" + }; + }; + + rpc GetUser(GetUserRequest) returns (rafay.dev.types.user.v3.User) { + option (google.api.http) = { + get : "/auth/v3/user/{userid}" + }; + }; + + rpc UpdateUser(PutUserRequest) returns (UserResponse) { + option (google.api.http) = { + put : "/auth/v3/user/{userid}" + body : "user" + }; + }; + + rpc DeleteUser(DeleteUserRequest) returns (UserResponse) { + option (google.api.http) = { + delete : "/auth/v3/user/{userid}" + }; + }; +} \ No newline at end of file diff --git a/components/usermgmt/proto/types/userpb/v3/group.proto b/components/usermgmt/proto/types/userpb/v3/group.proto index 9dd545f..041e675 100644 --- a/components/usermgmt/proto/types/userpb/v3/group.proto +++ b/components/usermgmt/proto/types/userpb/v3/group.proto @@ -3,6 +3,7 @@ package rafay.dev.types.user.v3; import "proto/types/commonpb/v3/common.proto"; import "proto/types/systempb/v3/project.proto"; +import "proto/types/userpb/v3/role.proto"; import "protoc-gen-openapiv2/options/annotations.proto"; // import "google/api/field_behavior.proto"; @@ -14,22 +15,110 @@ message Group { required : [ "apiVersion", "kind", "metadata", "spec" ] } }; - string apiVersion = 1; // usermgmt.k8smgmt.io/v3 - string kind = 2; // default : "Group" - rafay.dev.types.common.v3.Metadata metadata = 3; - GroupSpec spec = 4; - rafay.dev.types.common.v3.Status status = 5; + string apiVersion = 1 + [ (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { + title : "API Version", + description : "API Version of the group resource" + default : "usermgmt.k8smgmt.io/v3" + } ]; + string kind = 2 + [ (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { + title : "Kind", + description : "Kind of the group resource" + default : "Pipeline" + } ]; + rafay.dev.types.common.v3.Metadata metadata = 3 + [ (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { + title : "Metadata", + description : "Metadata of the group resource" + } ]; + GroupSpec spec = 4 + [ (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { + title : "Metadata", + description : "Metadata of the group resource" + } ]; + rafay.dev.types.common.v3.Status status = 5 + [ (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { + title : "Status", + description : "Status of the resource" + read_only : true + } ]; +} + +message ProjectRole { + option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_schema) = { + json_schema : { + title : "ProjectRole" + description : "Project and role pairing for permission" + } + }; + rafay.dev.types.system.v3.Project project = 1 + [ (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { + title : "Project" + description : "Project" + } ]; + rafay.dev.types.user.v3.Role role = 2 + [ (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { + title : "Role" + description : "Role" + } ]; } message GroupSpec { - repeated rafay.dev.types.system.v3.Project projects = 1; - repeated string users = 2; - string type = 3; + option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_schema) = { + json_schema : { + title : "Group Specification" + description : "Group specification" + } + }; + repeated ProjectRole projectroles = 1 + [ (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { + title : "ProjectRoles" + description : "ProjectRole groups for permission" + } ]; + repeated string users = 2 + [ (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { + title : "Users" + description : "List of users for group" + } ]; + string type = 3 + [ (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { + title : "Type" + description : "Type of group" + } ]; } message GroupList { - string apiVersion = 1; - string kind = 2; - rafay.dev.types.common.v3.ListMetadata metadata = 3; - repeated Group items = 4; + option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_schema) = { + json_schema : { + title : "GroupList" + description : "Group list" + read_only : true + } + }; + + string apiVersion = 1 + [ (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { + title : "API Version", + description : "API Version of the group list resource" + read_only : true + } ]; + string kind = 2 + [ (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { + title : "Kind", + description : "Kind of the group list resource" + read_only : true + } ]; + rafay.dev.types.common.v3.ListMetadata metadata = 3 + [ (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { + title : "Metadata", + description : "Metadata of the group list resource" + read_only : true + } ]; + repeated Group items = 4 + [ (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { + title : "Items", + description : "List of the group resources" + read_only : true + } ]; } diff --git a/components/usermgmt/proto/types/userpb/v3/role.proto b/components/usermgmt/proto/types/userpb/v3/role.proto index 15afa5f..2e08031 100644 --- a/components/usermgmt/proto/types/userpb/v3/role.proto +++ b/components/usermgmt/proto/types/userpb/v3/role.proto @@ -15,18 +15,80 @@ message Role { } }; - string apiVersion = 1; // default : "usermgmt.k8smgmt.io/v3" - string kind = 2; // default : "Role" - rafay.dev.types.common.v3.Metadata metadata = 3; - RoleSpec spec = 4; - rafay.dev.types.common.v3.Status status = 5; + string apiVersion = 1 + [ (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { + title : "API Version", + description : "API Version of the Role resource" + default : "usermgmt.k8smgmt.io/v3" + } ]; + string kind = 2 + [ (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { + title : "Kind", + description : "Kind of the role resource" + default : "Role" + } ]; + rafay.dev.types.common.v3.Metadata metadata = 3 + [ (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { + title : "Metadata", + description : "Metadata of the role resource" + } ]; + RoleSpec spec = 4 + [ (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { + title : "Spec", + description : "Spec of the role resource" + } ]; + rafay.dev.types.common.v3.Status status = 5 + [ (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { + title : "Status", + description : "Status of the resource" + read_only : true + } ]; } -message RoleSpec { repeated rafay.dev.types.user.v3.RolePermission rolepermissions = 1; } +message RoleSpec { + option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_schema) = { + json_schema : { + title : "Role Specification" + description : "Role specification" + } + }; + repeated rafay.dev.types.user.v3.RolePermission rolepermissions = 1 + [ (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { + title : "RolePermissions" + description : "Permissions for the role" + } ]; +} message RoleList { - string apiVersion = 1; - string kind = 2; - rafay.dev.types.common.v3.ListMetadata metadata = 3; - repeated Role items = 4; + option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_schema) = { + json_schema : { + title : "RoleList" + description : "Role list" + read_only : true + } + }; + string apiVersion = 1 + [ (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { + title : "API Version", + description : "API Version of the role list resource" + read_only : true + } ]; + string kind = 2 + [ (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { + title : "Kind", + description : "Kind of the role list resource" + read_only : true + } ]; + rafay.dev.types.common.v3.ListMetadata metadata = 3 + [ (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { + title : "Metadata", + description : "Metadata of the role list resource" + read_only : true + } ]; + repeated Role items = 4 + [ (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { + title : "Items", + description : "List of role resources" + read_only : true + } ]; } diff --git a/components/usermgmt/proto/types/userpb/v3/rolepermission.proto b/components/usermgmt/proto/types/userpb/v3/rolepermission.proto index 4bc7f14..a993684 100644 --- a/components/usermgmt/proto/types/userpb/v3/rolepermission.proto +++ b/components/usermgmt/proto/types/userpb/v3/rolepermission.proto @@ -14,18 +14,80 @@ message RolePermission { } }; - string apiVersion = 1; // default : "usermgmt.k8smgmt.io/v3" - string kind = 2; // default : "RolePermission" - rafay.dev.types.common.v3.Metadata metadata = 3; - RolePermissionSpec spec = 4; - rafay.dev.types.common.v3.Status status = 5; + string apiVersion = 1 + [ (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { + title : "API Version", + description : "API Version of the role permission resource" + default : "usermgmt.k8smgmt.io/v3" + } ]; + string kind = 2 + [ (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { + title : "Kind", + description : "Kind of the role permission resource" + default : "RolePermission" + } ]; + rafay.dev.types.common.v3.Metadata metadata = 3 + [ (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { + title : "Metadata", + description : "Metadata of the role permission resource" + } ]; + RolePermissionSpec spec = 4 + [ (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { + title : "Metadata", + description : "Metadata of the role permission resource" + } ]; + rafay.dev.types.common.v3.Status status = 5 + [ (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { + title : "Status", + description : "Status of the resource" + read_only : true + } ]; } -message RolePermissionSpec { repeated string permissions = 1; } +message RolePermissionSpec { + option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_schema) = { + json_schema : { + title : "RolePermission Specification" + description : "RolePermisson specification" + } + }; + repeated string permissions = 1 + [ (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { + title : "Permissions" + description : "List of permisions for role" + } ]; +} message RolePermissionList { - string apiVersion = 1; - string kind = 2; - rafay.dev.types.common.v3.ListMetadata metadata = 3; - repeated RolePermission items = 4; + option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_schema) = { + json_schema : { + title : "RolePermissionList" + description : "RolePeList list" + read_only : true + } + }; + string apiVersion = 1 + [ (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { + title : "API Version", + description : "API Version of the role permission list resource" + read_only : true + } ]; + string kind = 2 + [ (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { + title : "Kind", + description : "Kind of the role permission list resource" + read_only : true + } ]; + rafay.dev.types.common.v3.ListMetadata metadata = 3 + [ (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { + title : "Metadata", + description : "Metadata of the role permission list resource" + read_only : true + } ]; + repeated RolePermission items = 4 + [ (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { + title : "Items", + description : "List of the role permission resources" + read_only : true + } ]; } diff --git a/components/usermgmt/proto/types/userpb/v3/user.proto b/components/usermgmt/proto/types/userpb/v3/user.proto index 1e9c701..b5d354a 100644 --- a/components/usermgmt/proto/types/userpb/v3/user.proto +++ b/components/usermgmt/proto/types/userpb/v3/user.proto @@ -18,32 +18,146 @@ message User { } }; - string apiVersion = 1; // default : "usermgmt.k8smgmt.io/v3" - string kind = 2; // default : "User" - rafay.dev.types.common.v3.Metadata metadata = 3; - UserSpec spec = 4; - rafay.dev.types.common.v3.Status status = 5; + string apiVersion = 1 + [ (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { + title : "API Version", + description : "API Version of the user resource" + default : "usermgmt.k8smgmt.io/v3" + } ]; + string kind = 2 + [ (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { + title : "Kind", + description : "Kind of the user resource" + default : "User" + } ]; + rafay.dev.types.common.v3.Metadata metadata = 3 + [ (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { + title : "Metadata", + description : "Metadata of the user resource" + } ]; + UserSpec spec = 4 + [ (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { + title : "Spec", + description : "Spec of the user resource" + } ]; + + rafay.dev.types.common.v3.Status status = 5 + [ (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { + title : "Status", + description : "Status of the resource" + read_only : true + } ]; } message UserSpec { - string firstName = 1; - string lastName = 2; - string username = 3; - string phone = 4; - string password = 5; - string totpRequired = 6; - string totpSecret = 7; - repeated rafay.dev.types.user.v3.Role roles = 8; - repeated rafay.dev.types.user.v3.Group group = 9; - repeated rafay.dev.types.system.v3.Project project = 10; - bool emailVerified = 11; - bool phoneVerified = 12; - bool totpVerified = 13; + option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_schema) = { + json_schema : { + title : "User Specification" + description : "User specification" + } + }; + string firstName = 1 + [ (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { + title : "FirstName" + description : "First name of the user" + } ]; + string lastName = 2 + [ (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { + title : "LastName" + description : "Last name of the user" + } ]; + string username = 3 + [ (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { + title : "Username" + description : "Username of the user" + } ]; + string phone = 4 + [ (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { + title : "Phone" + description : "Phone number of the user" + } ]; + string password = 5 + [ (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { + title : "Password" + description : "Password of the user" + } ]; + string totpRequired = 6 + [ (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { + title : "TotpRequired" + description : "Flag to specify if TOTP is required" + } ]; + string totpSecret = 7 + [ (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { + title : "TotpSecret" + description : "Secret for TOTP" + } ]; + repeated rafay.dev.types.user.v3.Role roles = 8 + [ (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { + title : "Roles" + description : "Roles of the user" + } ]; + repeated rafay.dev.types.user.v3.Group groups = 9 + [ (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { + title : "Group" + description : "Groups of the user" + } ]; + repeated rafay.dev.types.system.v3.Project projects = 10 + [ (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { + title : "Projects" + description : "Projects of the user" + } ]; + bool emailVerified = 11 + [ (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { + title : "EmailVerified" + description : "Flag to show if the email of the user was verified" + read_only : true + } ]; + bool phoneVerified = 12 + [ (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { + title : "PhoneVerified" + description : "Flag to show if phone number of the user was verified" + read_only : true + } ]; + bool totpVerified = 13 + [ (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { + title : "TotpVerified" + description : "Flag to show if the TOTP of the user was verified" + read_only : true + } ]; } message UserList { - string apiVersion = 1; - string kind = 2; - rafay.dev.types.common.v3.ListMetadata metadata = 3; - repeated User items = 4; + option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_schema) = { + json_schema : { + title : "UserList" + description : "User list" + read_only : true + } + }; + string apiVersion = 1 + [ (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { + title : "API Version", + description : "API Version of the user list resource" + default : "usermgmt.k8smgmt.io/v3" + read_only : true + } ]; + string kind = 2 + [ (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { + title : "Kind", + description : "Kind of the user list resource" + default : "UserList" + read_only : true + } ]; + rafay.dev.types.common.v3.ListMetadata metadata = 3 + [ (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { + title : "Metadata", + description : "Metadata of the user list resource" + read_only : true + } ]; + repeated User items = 4 + [ (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { + title : "Items", + description : "List of the user resources" + read_only : true + } ]; } From 080ca3485997f5bd5e8e6455feeeb51a37e6bff1 Mon Sep 17 00:00:00 2001 From: Abin Simon Date: Fri, 31 Dec 2021 10:16:18 +0530 Subject: [PATCH 03/28] Add proto generated files --- .../openapi/proto/rpc/v3/group.swagger.json | 670 +++++++++++++++ .../openapi/proto/rpc/v3/role.swagger.json | 522 ++++++++++++ .../proto/rpc/v3/rolepermission.swagger.json | 327 ++++++++ .../openapi/proto/rpc/v3/user.swagger.json | 794 ++++++++++++++++++ .../proto/types/userpb/v3/group.swagger.json | 43 + .../proto/types/userpb/v3/role.swagger.json | 43 + .../userpb/v3/rolepermission.swagger.json | 43 + .../proto/types/userpb/v3/user.swagger.json | 43 + .../usermgmt/proto/proto/rpc/v3/group.pb.go | 583 +++++++++++++ .../proto/proto/rpc/v3/group.pb.gw.go | 564 +++++++++++++ .../usermgmt/proto/proto/rpc/v3/group.proto | 129 +++ .../proto/proto/rpc/v3/group_grpc.pb.go | 248 ++++++ .../usermgmt/proto/proto/rpc/v3/role.pb.go | 566 +++++++++++++ .../usermgmt/proto/proto/rpc/v3/role.pb.gw.go | 546 ++++++++++++ .../usermgmt/proto/proto/rpc/v3/role.proto | 120 +++ .../proto/proto/rpc/v3/role_grpc.pb.go | 248 ++++++ .../proto/proto/rpc/v3/rolepermission.pb.go | 347 ++++++++ .../proto/rpc/v3/rolepermission.pb.gw.go | 250 ++++++ .../proto/proto/rpc/v3/rolepermission.proto | 99 +++ .../proto/rpc/v3/rolepermission_grpc.pb.go | 140 +++ .../usermgmt/proto/proto/rpc/v3/user.pb.go | 580 +++++++++++++ .../usermgmt/proto/proto/rpc/v3/user.pb.gw.go | 564 +++++++++++++ .../usermgmt/proto/proto/rpc/v3/user.proto | 121 +++ .../proto/proto/rpc/v3/user_grpc.pb.go | 248 ++++++ .../proto/proto/types/userpb/v3/group.pb.go | 538 ++++++++++++ .../proto/proto/types/userpb/v3/group.proto | 124 +++ .../proto/proto/types/userpb/v3/role.pb.go | 425 ++++++++++ .../proto/proto/types/userpb/v3/role.proto | 94 +++ .../types/userpb/v3/rolepermission.pb.go | 431 ++++++++++ .../types/userpb/v3/rolepermission.proto | 93 ++ .../proto/proto/types/userpb/v3/user.pb.go | 598 +++++++++++++ .../proto/proto/types/userpb/v3/user.proto | 163 ++++ 32 files changed, 10304 insertions(+) create mode 100644 components/usermgmt/gen/openapi/proto/rpc/v3/group.swagger.json create mode 100644 components/usermgmt/gen/openapi/proto/rpc/v3/role.swagger.json create mode 100644 components/usermgmt/gen/openapi/proto/rpc/v3/rolepermission.swagger.json create mode 100644 components/usermgmt/gen/openapi/proto/rpc/v3/user.swagger.json create mode 100644 components/usermgmt/gen/openapi/proto/types/userpb/v3/group.swagger.json create mode 100644 components/usermgmt/gen/openapi/proto/types/userpb/v3/role.swagger.json create mode 100644 components/usermgmt/gen/openapi/proto/types/userpb/v3/rolepermission.swagger.json create mode 100644 components/usermgmt/gen/openapi/proto/types/userpb/v3/user.swagger.json create mode 100644 components/usermgmt/proto/proto/rpc/v3/group.pb.go create mode 100644 components/usermgmt/proto/proto/rpc/v3/group.pb.gw.go create mode 100644 components/usermgmt/proto/proto/rpc/v3/group.proto create mode 100644 components/usermgmt/proto/proto/rpc/v3/group_grpc.pb.go create mode 100644 components/usermgmt/proto/proto/rpc/v3/role.pb.go create mode 100644 components/usermgmt/proto/proto/rpc/v3/role.pb.gw.go create mode 100644 components/usermgmt/proto/proto/rpc/v3/role.proto create mode 100644 components/usermgmt/proto/proto/rpc/v3/role_grpc.pb.go create mode 100644 components/usermgmt/proto/proto/rpc/v3/rolepermission.pb.go create mode 100644 components/usermgmt/proto/proto/rpc/v3/rolepermission.pb.gw.go create mode 100644 components/usermgmt/proto/proto/rpc/v3/rolepermission.proto create mode 100644 components/usermgmt/proto/proto/rpc/v3/rolepermission_grpc.pb.go create mode 100644 components/usermgmt/proto/proto/rpc/v3/user.pb.go create mode 100644 components/usermgmt/proto/proto/rpc/v3/user.pb.gw.go create mode 100644 components/usermgmt/proto/proto/rpc/v3/user.proto create mode 100644 components/usermgmt/proto/proto/rpc/v3/user_grpc.pb.go create mode 100644 components/usermgmt/proto/proto/types/userpb/v3/group.pb.go create mode 100644 components/usermgmt/proto/proto/types/userpb/v3/group.proto create mode 100644 components/usermgmt/proto/proto/types/userpb/v3/role.pb.go create mode 100644 components/usermgmt/proto/proto/types/userpb/v3/role.proto create mode 100644 components/usermgmt/proto/proto/types/userpb/v3/rolepermission.pb.go create mode 100644 components/usermgmt/proto/proto/types/userpb/v3/rolepermission.proto create mode 100644 components/usermgmt/proto/proto/types/userpb/v3/user.pb.go create mode 100644 components/usermgmt/proto/proto/types/userpb/v3/user.proto diff --git a/components/usermgmt/gen/openapi/proto/rpc/v3/group.swagger.json b/components/usermgmt/gen/openapi/proto/rpc/v3/group.swagger.json new file mode 100644 index 0000000..fcbc69a --- /dev/null +++ b/components/usermgmt/gen/openapi/proto/rpc/v3/group.swagger.json @@ -0,0 +1,670 @@ +{ + "swagger": "2.0", + "info": { + "title": "Group management Service", + "version": "2.0", + "contact": { + "name": "Rafay Dev" + } + }, + "tags": [ + { + "name": "Group" + } + ], + "schemes": [ + "https" + ], + "consumes": [ + "application/json", + "application/yaml" + ], + "produces": [ + "application/json", + "application/yaml" + ], + "paths": { + "/auth/v3/group/{id}": { + "get": { + "operationId": "Group_GetGroup", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/v3Group" + } + }, + "403": { + "description": "Returned when the group does not have permission to access the resource.", + "schema": {} + }, + "404": { + "description": "Returned when the resource does not exist.", + "schema": { + "type": "string", + "format": "string" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/googlerpcStatus" + } + } + }, + "parameters": [ + { + "name": "id", + "in": "path", + "required": true, + "type": "string" + } + ], + "tags": [ + "Group" + ] + }, + "delete": { + "operationId": "Group_DeleteGroup", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/v3GroupResponse" + } + }, + "403": { + "description": "Returned when the group does not have permission to access the resource.", + "schema": {} + }, + "404": { + "description": "Returned when the resource does not exist.", + "schema": { + "type": "string", + "format": "string" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/googlerpcStatus" + } + } + }, + "parameters": [ + { + "name": "id", + "in": "path", + "required": true, + "type": "string" + } + ], + "tags": [ + "Group" + ] + }, + "put": { + "operationId": "Group_UpdateGroup", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/v3GroupResponse" + } + }, + "403": { + "description": "Returned when the group does not have permission to access the resource.", + "schema": {} + }, + "404": { + "description": "Returned when the resource does not exist.", + "schema": { + "type": "string", + "format": "string" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/googlerpcStatus" + } + } + }, + "parameters": [ + { + "name": "id", + "in": "path", + "required": true, + "type": "string" + }, + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/v3Group" + } + } + ], + "tags": [ + "Group" + ] + } + }, + "/auth/v3/groups": { + "get": { + "operationId": "Group_GetGroups", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/v3GetGroupsResponse" + } + }, + "403": { + "description": "Returned when the group does not have permission to access the resource.", + "schema": {} + }, + "404": { + "description": "Returned when the resource does not exist.", + "schema": { + "type": "string", + "format": "string" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/googlerpcStatus" + } + } + }, + "parameters": [ + { + "name": "project", + "description": "Project. Project of user to filter by", + "in": "query", + "required": false, + "type": "string" + } + ], + "tags": [ + "Group" + ] + }, + "post": { + "operationId": "Group_CreateGroup", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/v3Group" + } + }, + "201": { + "description": "Returned when group is created successfully.", + "schema": {} + }, + "403": { + "description": "Returned when the group does not have permission to access the resource.", + "schema": {} + }, + "404": { + "description": "Returned when the resource does not exist.", + "schema": { + "type": "string", + "format": "string" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/googlerpcStatus" + } + } + }, + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/v3Group" + } + } + ], + "tags": [ + "Group" + ] + } + } + }, + "definitions": { + "commonv3Status": { + "type": "object", + "properties": { + "conditionType": { + "type": "string", + "description": "type of the status condition", + "title": "Condition Type", + "readOnly": true + }, + "conditionStatus": { + "$ref": "#/definitions/v3ConditionStatus", + "enum": [ + "StatusNotSet", + "StatusSubmitted", + "StatusOK", + "StatusFailed" + ], + "description": "status of the condition", + "title": "Condition Status", + "readOnly": true + }, + "lastUpdated": { + "type": "string", + "format": "date-time", + "description": "when the condition status is last updated", + "title": "Last Updated", + "readOnly": true + }, + "reason": { + "type": "string", + "description": "reason of the last condition status", + "title": "Reason", + "readOnly": true + } + }, + "description": "status of a resource", + "title": "Status", + "readOnly": true + }, + "googlerpcStatus": { + "type": "object", + "properties": { + "code": { + "type": "integer", + "format": "int32" + }, + "message": { + "type": "string" + }, + "details": { + "type": "array", + "items": { + "$ref": "#/definitions/protobufAny" + } + } + } + }, + "protobufAny": { + "type": "object", + "properties": { + "@type": { + "type": "string" + } + }, + "additionalProperties": {} + }, + "v3ConditionStatus": { + "type": "string", + "enum": [ + "StatusNotSet", + "StatusSubmitted", + "StatusOK", + "StatusFailed" + ], + "default": "StatusNotSet", + "title": "$title: ConditionStatus\n$description: status of a condition for a resource" + }, + "v3GetGroupsResponse": { + "type": "object", + "properties": { + "group": { + "type": "array", + "items": { + "$ref": "#/definitions/v3Group" + } + } + } + }, + "v3Group": { + "type": "object", + "properties": { + "apiVersion": { + "type": "string", + "default": "usermgmt.k8smgmt.io/v3", + "description": "API Version of the group resource", + "title": "API Version" + }, + "kind": { + "type": "string", + "default": "Pipeline", + "description": "Kind of the group resource", + "title": "Kind" + }, + "metadata": { + "$ref": "#/definitions/v3Metadata", + "description": "Metadata of the group resource", + "title": "Metadata" + }, + "spec": { + "$ref": "#/definitions/v3GroupSpec", + "description": "Metadata of the group resource", + "title": "Metadata" + }, + "status": { + "$ref": "#/definitions/commonv3Status", + "description": "Status of the resource", + "title": "Status", + "readOnly": true + } + }, + "description": "Group", + "title": "Group", + "required": [ + "apiVersion", + "kind", + "metadata", + "spec" + ] + }, + "v3GroupResponse": { + "type": "object", + "properties": { + "status": { + "type": "string" + }, + "message": { + "type": "string" + } + } + }, + "v3GroupSpec": { + "type": "object", + "properties": { + "projectroles": { + "type": "array", + "items": { + "$ref": "#/definitions/v3ProjectRole" + }, + "description": "ProjectRole groups for permission", + "title": "ProjectRoles" + }, + "users": { + "type": "array", + "items": { + "type": "string" + }, + "description": "List of users for group", + "title": "Users" + }, + "type": { + "type": "string", + "description": "Type of group", + "title": "Type" + } + }, + "description": "Group specification", + "title": "Group Specification" + }, + "v3Metadata": { + "type": "object", + "example": { + "name": "some-name", + "project": "defaultproject" + }, + "properties": { + "name": { + "type": "string", + "description": "name of the resource", + "title": "Name" + }, + "description": { + "type": "string", + "description": "description of the resource", + "title": "Description" + }, + "labels": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "labels of the resource", + "title": "Lables" + }, + "annotations": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "annotations of the resource", + "title": "Annotations" + }, + "project": { + "type": "string", + "description": "Project of the resource", + "title": "Project" + }, + "partner": { + "type": "string", + "description": "Project of the resource", + "title": "Project" + }, + "id": { + "type": "string", + "readOnly": true + }, + "modifiedAt": { + "type": "string", + "format": "date-time", + "readOnly": true + } + }, + "description": "metadata of the resource", + "title": "Metadata", + "required": [ + "name", + "project" + ] + }, + "v3Project": { + "type": "object", + "properties": { + "apiVersion": { + "type": "string", + "default": "system.k8smgmt.io/v3", + "description": "API Version of the project resource", + "title": "API Version" + }, + "kind": { + "type": "string", + "default": "Pipeline", + "description": "Kind of the project resource", + "title": "Kind" + }, + "metadata": { + "$ref": "#/definitions/v3Metadata", + "description": "Metadata of the project resource", + "title": "Metadata" + }, + "spec": { + "$ref": "#/definitions/v3ProjectSpec", + "description": "Metadata of the project resource", + "title": "Metadata" + }, + "status": { + "$ref": "#/definitions/commonv3Status", + "description": "Status of the resource", + "title": "Status", + "readOnly": true + } + }, + "description": "Project", + "title": "Project", + "required": [ + "apiVersion", + "kind", + "metadata", + "spec" + ] + }, + "v3ProjectRole": { + "type": "object", + "properties": { + "project": { + "$ref": "#/definitions/v3Project", + "description": "Project", + "title": "Project" + }, + "role": { + "$ref": "#/definitions/v3Role", + "description": "Role", + "title": "Role" + } + }, + "description": "Project and role pairing for permission", + "title": "ProjectRole" + }, + "v3ProjectSpec": { + "type": "object", + "properties": { + "default": { + "type": "boolean", + "description": "flag to indicate if this is the default project in the organization", + "title": "Default" + } + }, + "description": "project specification", + "title": "Project Specification" + }, + "v3Role": { + "type": "object", + "properties": { + "apiVersion": { + "type": "string", + "default": "usermgmt.k8smgmt.io/v3", + "description": "API Version of the Role resource", + "title": "API Version" + }, + "kind": { + "type": "string", + "default": "Role", + "description": "Kind of the role resource", + "title": "Kind" + }, + "metadata": { + "$ref": "#/definitions/v3Metadata", + "description": "Metadata of the role resource", + "title": "Metadata" + }, + "spec": { + "$ref": "#/definitions/v3RoleSpec", + "description": "Spec of the role resource", + "title": "Spec" + }, + "status": { + "$ref": "#/definitions/commonv3Status", + "description": "Status of the resource", + "title": "Status", + "readOnly": true + } + }, + "description": "Role", + "title": "Role", + "required": [ + "apiVersion", + "kind", + "metadata", + "spec" + ] + }, + "v3RolePermission": { + "type": "object", + "properties": { + "apiVersion": { + "type": "string", + "default": "usermgmt.k8smgmt.io/v3", + "description": "API Version of the role permission resource", + "title": "API Version" + }, + "kind": { + "type": "string", + "default": "RolePermission", + "description": "Kind of the role permission resource", + "title": "Kind" + }, + "metadata": { + "$ref": "#/definitions/v3Metadata", + "description": "Metadata of the role permission resource", + "title": "Metadata" + }, + "spec": { + "$ref": "#/definitions/v3RolePermissionSpec", + "description": "Metadata of the role permission resource", + "title": "Metadata" + }, + "status": { + "$ref": "#/definitions/commonv3Status", + "description": "Status of the resource", + "title": "Status", + "readOnly": true + } + }, + "description": "Role Permission", + "title": "RolePermission", + "required": [ + "apiVersion", + "kind", + "metadata", + "spec" + ] + }, + "v3RolePermissionSpec": { + "type": "object", + "properties": { + "permissions": { + "type": "array", + "items": { + "type": "string" + }, + "description": "List of permisions for role", + "title": "Permissions" + } + }, + "description": "RolePermisson specification", + "title": "RolePermission Specification" + }, + "v3RoleSpec": { + "type": "object", + "properties": { + "rolepermissions": { + "type": "array", + "items": { + "$ref": "#/definitions/v3RolePermission" + }, + "description": "Permissions for the role", + "title": "RolePermissions" + } + }, + "description": "Role specification", + "title": "Role Specification" + } + }, + "securityDefinitions": { + "ApiKeyAuth": { + "type": "apiKey", + "name": "X-RAFAY-API-KEYID", + "in": "header" + }, + "BasicAuth": { + "type": "basic" + } + }, + "security": [ + { + "ApiKeyAuth": [], + "BasicAuth": [] + } + ] +} diff --git a/components/usermgmt/gen/openapi/proto/rpc/v3/role.swagger.json b/components/usermgmt/gen/openapi/proto/rpc/v3/role.swagger.json new file mode 100644 index 0000000..8a6b50e --- /dev/null +++ b/components/usermgmt/gen/openapi/proto/rpc/v3/role.swagger.json @@ -0,0 +1,522 @@ +{ + "swagger": "2.0", + "info": { + "title": "Role management Service", + "version": "2.0", + "contact": { + "name": "Rafay Dev" + } + }, + "tags": [ + { + "name": "Role" + } + ], + "schemes": [ + "https" + ], + "consumes": [ + "application/json", + "application/yaml" + ], + "produces": [ + "application/json", + "application/yaml" + ], + "paths": { + "/auth/v3/role/{id}": { + "get": { + "operationId": "Role_GetRole", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/v3Role" + } + }, + "403": { + "description": "Returned when the role does not have permission to access the resource.", + "schema": {} + }, + "404": { + "description": "Returned when the resource does not exist.", + "schema": { + "type": "string", + "format": "string" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/googlerpcStatus" + } + } + }, + "parameters": [ + { + "name": "id", + "in": "path", + "required": true, + "type": "string" + } + ], + "tags": [ + "Role" + ] + }, + "delete": { + "operationId": "Role_DeleteRole", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/v3RoleResponse" + } + }, + "403": { + "description": "Returned when the role does not have permission to access the resource.", + "schema": {} + }, + "404": { + "description": "Returned when the resource does not exist.", + "schema": { + "type": "string", + "format": "string" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/googlerpcStatus" + } + } + }, + "parameters": [ + { + "name": "id", + "in": "path", + "required": true, + "type": "string" + } + ], + "tags": [ + "Role" + ] + }, + "put": { + "operationId": "Role_UpdateRole", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/v3RoleResponse" + } + }, + "403": { + "description": "Returned when the role does not have permission to access the resource.", + "schema": {} + }, + "404": { + "description": "Returned when the resource does not exist.", + "schema": { + "type": "string", + "format": "string" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/googlerpcStatus" + } + } + }, + "parameters": [ + { + "name": "id", + "in": "path", + "required": true, + "type": "string" + }, + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/v3Role" + } + } + ], + "tags": [ + "Role" + ] + } + }, + "/auth/v3/roles": { + "get": { + "operationId": "Role_GetRoles", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/v3GetRolesResponse" + } + }, + "403": { + "description": "Returned when the role does not have permission to access the resource.", + "schema": {} + }, + "404": { + "description": "Returned when the resource does not exist.", + "schema": { + "type": "string", + "format": "string" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/googlerpcStatus" + } + } + }, + "tags": [ + "Role" + ] + }, + "post": { + "operationId": "Role_CreateRole", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/v3Role" + } + }, + "201": { + "description": "Returned when role is created successfully.", + "schema": {} + }, + "403": { + "description": "Returned when the role does not have permission to access the resource.", + "schema": {} + }, + "404": { + "description": "Returned when the resource does not exist.", + "schema": { + "type": "string", + "format": "string" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/googlerpcStatus" + } + } + }, + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/v3Role" + } + } + ], + "tags": [ + "Role" + ] + } + } + }, + "definitions": { + "commonv3Status": { + "type": "object", + "properties": { + "conditionType": { + "type": "string", + "description": "type of the status condition", + "title": "Condition Type", + "readOnly": true + }, + "conditionStatus": { + "$ref": "#/definitions/v3ConditionStatus", + "enum": [ + "StatusNotSet", + "StatusSubmitted", + "StatusOK", + "StatusFailed" + ], + "description": "status of the condition", + "title": "Condition Status", + "readOnly": true + }, + "lastUpdated": { + "type": "string", + "format": "date-time", + "description": "when the condition status is last updated", + "title": "Last Updated", + "readOnly": true + }, + "reason": { + "type": "string", + "description": "reason of the last condition status", + "title": "Reason", + "readOnly": true + } + }, + "description": "status of a resource", + "title": "Status", + "readOnly": true + }, + "googlerpcStatus": { + "type": "object", + "properties": { + "code": { + "type": "integer", + "format": "int32" + }, + "message": { + "type": "string" + }, + "details": { + "type": "array", + "items": { + "$ref": "#/definitions/protobufAny" + } + } + } + }, + "protobufAny": { + "type": "object", + "properties": { + "@type": { + "type": "string" + } + }, + "additionalProperties": {} + }, + "v3ConditionStatus": { + "type": "string", + "enum": [ + "StatusNotSet", + "StatusSubmitted", + "StatusOK", + "StatusFailed" + ], + "default": "StatusNotSet", + "title": "$title: ConditionStatus\n$description: status of a condition for a resource" + }, + "v3GetRolesResponse": { + "type": "object", + "properties": { + "role": { + "type": "array", + "items": { + "$ref": "#/definitions/v3Role" + } + } + } + }, + "v3Metadata": { + "type": "object", + "example": { + "name": "some-name", + "project": "defaultproject" + }, + "properties": { + "name": { + "type": "string", + "description": "name of the resource", + "title": "Name" + }, + "description": { + "type": "string", + "description": "description of the resource", + "title": "Description" + }, + "labels": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "labels of the resource", + "title": "Lables" + }, + "annotations": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "annotations of the resource", + "title": "Annotations" + }, + "project": { + "type": "string", + "description": "Project of the resource", + "title": "Project" + }, + "partner": { + "type": "string", + "description": "Project of the resource", + "title": "Project" + }, + "id": { + "type": "string", + "readOnly": true + }, + "modifiedAt": { + "type": "string", + "format": "date-time", + "readOnly": true + } + }, + "description": "metadata of the resource", + "title": "Metadata", + "required": [ + "name", + "project" + ] + }, + "v3Role": { + "type": "object", + "properties": { + "apiVersion": { + "type": "string", + "default": "usermgmt.k8smgmt.io/v3", + "description": "API Version of the Role resource", + "title": "API Version" + }, + "kind": { + "type": "string", + "default": "Role", + "description": "Kind of the role resource", + "title": "Kind" + }, + "metadata": { + "$ref": "#/definitions/v3Metadata", + "description": "Metadata of the role resource", + "title": "Metadata" + }, + "spec": { + "$ref": "#/definitions/v3RoleSpec", + "description": "Spec of the role resource", + "title": "Spec" + }, + "status": { + "$ref": "#/definitions/commonv3Status", + "description": "Status of the resource", + "title": "Status", + "readOnly": true + } + }, + "description": "Role", + "title": "Role", + "required": [ + "apiVersion", + "kind", + "metadata", + "spec" + ] + }, + "v3RolePermission": { + "type": "object", + "properties": { + "apiVersion": { + "type": "string", + "default": "usermgmt.k8smgmt.io/v3", + "description": "API Version of the role permission resource", + "title": "API Version" + }, + "kind": { + "type": "string", + "default": "RolePermission", + "description": "Kind of the role permission resource", + "title": "Kind" + }, + "metadata": { + "$ref": "#/definitions/v3Metadata", + "description": "Metadata of the role permission resource", + "title": "Metadata" + }, + "spec": { + "$ref": "#/definitions/v3RolePermissionSpec", + "description": "Metadata of the role permission resource", + "title": "Metadata" + }, + "status": { + "$ref": "#/definitions/commonv3Status", + "description": "Status of the resource", + "title": "Status", + "readOnly": true + } + }, + "description": "Role Permission", + "title": "RolePermission", + "required": [ + "apiVersion", + "kind", + "metadata", + "spec" + ] + }, + "v3RolePermissionSpec": { + "type": "object", + "properties": { + "permissions": { + "type": "array", + "items": { + "type": "string" + }, + "description": "List of permisions for role", + "title": "Permissions" + } + }, + "description": "RolePermisson specification", + "title": "RolePermission Specification" + }, + "v3RoleResponse": { + "type": "object", + "properties": { + "status": { + "type": "string" + }, + "message": { + "type": "string" + } + } + }, + "v3RoleSpec": { + "type": "object", + "properties": { + "rolepermissions": { + "type": "array", + "items": { + "$ref": "#/definitions/v3RolePermission" + }, + "description": "Permissions for the role", + "title": "RolePermissions" + } + }, + "description": "Role specification", + "title": "Role Specification" + } + }, + "securityDefinitions": { + "ApiKeyAuth": { + "type": "apiKey", + "name": "X-RAFAY-API-KEYID", + "in": "header" + }, + "BasicAuth": { + "type": "basic" + } + }, + "security": [ + { + "ApiKeyAuth": [], + "BasicAuth": [] + } + ] +} diff --git a/components/usermgmt/gen/openapi/proto/rpc/v3/rolepermission.swagger.json b/components/usermgmt/gen/openapi/proto/rpc/v3/rolepermission.swagger.json new file mode 100644 index 0000000..733db45 --- /dev/null +++ b/components/usermgmt/gen/openapi/proto/rpc/v3/rolepermission.swagger.json @@ -0,0 +1,327 @@ +{ + "swagger": "2.0", + "info": { + "title": "Rolepermission management Service", + "version": "2.0", + "contact": { + "name": "Rafay Dev" + } + }, + "tags": [ + { + "name": "Rolepermission" + } + ], + "schemes": [ + "https" + ], + "consumes": [ + "application/json", + "application/yaml" + ], + "produces": [ + "application/json", + "application/yaml" + ], + "paths": { + "/auth/v3/rolepermission/{id}": { + "get": { + "operationId": "Rolepermission_GetRolepermission", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/v3RolePermission" + } + }, + "403": { + "description": "Returned when the rolepermission does not have permission to access the resource.", + "schema": {} + }, + "404": { + "description": "Returned when the resource does not exist.", + "schema": { + "type": "string", + "format": "string" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/googlerpcStatus" + } + } + }, + "parameters": [ + { + "name": "id", + "description": "Id of the rolepermission resource", + "in": "path", + "required": true, + "type": "string" + } + ], + "tags": [ + "Rolepermission" + ] + } + }, + "/auth/v3/rolepermissions": { + "get": { + "operationId": "Rolepermission_GetRolepermissions", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/v3GetRolepermissionsResponse" + } + }, + "403": { + "description": "Returned when the rolepermission does not have permission to access the resource.", + "schema": {} + }, + "404": { + "description": "Returned when the resource does not exist.", + "schema": { + "type": "string", + "format": "string" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/googlerpcStatus" + } + } + }, + "tags": [ + "Rolepermission" + ] + } + } + }, + "definitions": { + "commonv3Status": { + "type": "object", + "properties": { + "conditionType": { + "type": "string", + "description": "type of the status condition", + "title": "Condition Type", + "readOnly": true + }, + "conditionStatus": { + "$ref": "#/definitions/v3ConditionStatus", + "enum": [ + "StatusNotSet", + "StatusSubmitted", + "StatusOK", + "StatusFailed" + ], + "description": "status of the condition", + "title": "Condition Status", + "readOnly": true + }, + "lastUpdated": { + "type": "string", + "format": "date-time", + "description": "when the condition status is last updated", + "title": "Last Updated", + "readOnly": true + }, + "reason": { + "type": "string", + "description": "reason of the last condition status", + "title": "Reason", + "readOnly": true + } + }, + "description": "status of a resource", + "title": "Status", + "readOnly": true + }, + "googlerpcStatus": { + "type": "object", + "properties": { + "code": { + "type": "integer", + "format": "int32" + }, + "message": { + "type": "string" + }, + "details": { + "type": "array", + "items": { + "$ref": "#/definitions/protobufAny" + } + } + } + }, + "protobufAny": { + "type": "object", + "properties": { + "@type": { + "type": "string" + } + }, + "additionalProperties": {} + }, + "v3ConditionStatus": { + "type": "string", + "enum": [ + "StatusNotSet", + "StatusSubmitted", + "StatusOK", + "StatusFailed" + ], + "default": "StatusNotSet", + "title": "$title: ConditionStatus\n$description: status of a condition for a resource" + }, + "v3GetRolepermissionsResponse": { + "type": "object", + "properties": { + "rolepermissions": { + "type": "array", + "items": { + "$ref": "#/definitions/v3RolePermission" + }, + "description": "List of the rolepermission resources", + "title": "RolePermissions" + } + } + }, + "v3Metadata": { + "type": "object", + "example": { + "name": "some-name", + "project": "defaultproject" + }, + "properties": { + "name": { + "type": "string", + "description": "name of the resource", + "title": "Name" + }, + "description": { + "type": "string", + "description": "description of the resource", + "title": "Description" + }, + "labels": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "labels of the resource", + "title": "Lables" + }, + "annotations": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "annotations of the resource", + "title": "Annotations" + }, + "project": { + "type": "string", + "description": "Project of the resource", + "title": "Project" + }, + "partner": { + "type": "string", + "description": "Project of the resource", + "title": "Project" + }, + "id": { + "type": "string", + "readOnly": true + }, + "modifiedAt": { + "type": "string", + "format": "date-time", + "readOnly": true + } + }, + "description": "metadata of the resource", + "title": "Metadata", + "required": [ + "name", + "project" + ] + }, + "v3RolePermission": { + "type": "object", + "properties": { + "apiVersion": { + "type": "string", + "default": "usermgmt.k8smgmt.io/v3", + "description": "API Version of the role permission resource", + "title": "API Version" + }, + "kind": { + "type": "string", + "default": "RolePermission", + "description": "Kind of the role permission resource", + "title": "Kind" + }, + "metadata": { + "$ref": "#/definitions/v3Metadata", + "description": "Metadata of the role permission resource", + "title": "Metadata" + }, + "spec": { + "$ref": "#/definitions/v3RolePermissionSpec", + "description": "Metadata of the role permission resource", + "title": "Metadata" + }, + "status": { + "$ref": "#/definitions/commonv3Status", + "description": "Status of the resource", + "title": "Status", + "readOnly": true + } + }, + "description": "Role Permission", + "title": "RolePermission", + "required": [ + "apiVersion", + "kind", + "metadata", + "spec" + ] + }, + "v3RolePermissionSpec": { + "type": "object", + "properties": { + "permissions": { + "type": "array", + "items": { + "type": "string" + }, + "description": "List of permisions for role", + "title": "Permissions" + } + }, + "description": "RolePermisson specification", + "title": "RolePermission Specification" + } + }, + "securityDefinitions": { + "ApiKeyAuth": { + "type": "apiKey", + "name": "X-RAFAY-API-KEYID", + "in": "header" + }, + "BasicAuth": { + "type": "basic" + } + }, + "security": [ + { + "ApiKeyAuth": [], + "BasicAuth": [] + } + ] +} diff --git a/components/usermgmt/gen/openapi/proto/rpc/v3/user.swagger.json b/components/usermgmt/gen/openapi/proto/rpc/v3/user.swagger.json new file mode 100644 index 0000000..eca0fd7 --- /dev/null +++ b/components/usermgmt/gen/openapi/proto/rpc/v3/user.swagger.json @@ -0,0 +1,794 @@ +{ + "swagger": "2.0", + "info": { + "title": "User management Service", + "version": "2.0", + "contact": { + "name": "Rafay Dev" + } + }, + "tags": [ + { + "name": "User" + } + ], + "schemes": [ + "https" + ], + "consumes": [ + "application/json", + "application/yaml" + ], + "produces": [ + "application/json", + "application/yaml" + ], + "paths": { + "/auth/v3/user/{userid}": { + "get": { + "operationId": "User_GetUser", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/v3User" + } + }, + "403": { + "description": "Returned when the user does not have permission to access the resource.", + "schema": {} + }, + "404": { + "description": "Returned when the resource does not exist.", + "schema": { + "type": "string", + "format": "string" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/googlerpcStatus" + } + } + }, + "parameters": [ + { + "name": "userid", + "in": "path", + "required": true, + "type": "string" + } + ], + "tags": [ + "User" + ] + }, + "delete": { + "operationId": "User_DeleteUser", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/v3UserResponse" + } + }, + "403": { + "description": "Returned when the user does not have permission to access the resource.", + "schema": {} + }, + "404": { + "description": "Returned when the resource does not exist.", + "schema": { + "type": "string", + "format": "string" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/googlerpcStatus" + } + } + }, + "parameters": [ + { + "name": "userid", + "in": "path", + "required": true, + "type": "string" + } + ], + "tags": [ + "User" + ] + }, + "put": { + "operationId": "User_UpdateUser", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/v3UserResponse" + } + }, + "403": { + "description": "Returned when the user does not have permission to access the resource.", + "schema": {} + }, + "404": { + "description": "Returned when the resource does not exist.", + "schema": { + "type": "string", + "format": "string" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/googlerpcStatus" + } + } + }, + "parameters": [ + { + "name": "userid", + "in": "path", + "required": true, + "type": "string" + }, + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/v3User" + } + } + ], + "tags": [ + "User" + ] + } + }, + "/auth/v3/users": { + "get": { + "operationId": "User_GetUsers", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/v3GetUsersResponse" + } + }, + "403": { + "description": "Returned when the user does not have permission to access the resource.", + "schema": {} + }, + "404": { + "description": "Returned when the resource does not exist.", + "schema": { + "type": "string", + "format": "string" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/googlerpcStatus" + } + } + }, + "parameters": [ + { + "name": "project", + "in": "query", + "required": false, + "type": "string" + } + ], + "tags": [ + "User" + ] + }, + "post": { + "operationId": "User_CreateUser", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/v3User" + } + }, + "201": { + "description": "Returned when user is created successfully.", + "schema": {} + }, + "403": { + "description": "Returned when the user does not have permission to access the resource.", + "schema": {} + }, + "404": { + "description": "Returned when the resource does not exist.", + "schema": { + "type": "string", + "format": "string" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/googlerpcStatus" + } + } + }, + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/v3User" + } + } + ], + "tags": [ + "User" + ] + } + } + }, + "definitions": { + "commonv3Status": { + "type": "object", + "properties": { + "conditionType": { + "type": "string", + "description": "type of the status condition", + "title": "Condition Type", + "readOnly": true + }, + "conditionStatus": { + "$ref": "#/definitions/v3ConditionStatus", + "enum": [ + "StatusNotSet", + "StatusSubmitted", + "StatusOK", + "StatusFailed" + ], + "description": "status of the condition", + "title": "Condition Status", + "readOnly": true + }, + "lastUpdated": { + "type": "string", + "format": "date-time", + "description": "when the condition status is last updated", + "title": "Last Updated", + "readOnly": true + }, + "reason": { + "type": "string", + "description": "reason of the last condition status", + "title": "Reason", + "readOnly": true + } + }, + "description": "status of a resource", + "title": "Status", + "readOnly": true + }, + "googlerpcStatus": { + "type": "object", + "properties": { + "code": { + "type": "integer", + "format": "int32" + }, + "message": { + "type": "string" + }, + "details": { + "type": "array", + "items": { + "$ref": "#/definitions/protobufAny" + } + } + } + }, + "protobufAny": { + "type": "object", + "properties": { + "@type": { + "type": "string" + } + }, + "additionalProperties": {} + }, + "v3ConditionStatus": { + "type": "string", + "enum": [ + "StatusNotSet", + "StatusSubmitted", + "StatusOK", + "StatusFailed" + ], + "default": "StatusNotSet", + "title": "$title: ConditionStatus\n$description: status of a condition for a resource" + }, + "v3GetUsersResponse": { + "type": "object", + "properties": { + "user": { + "type": "array", + "items": { + "$ref": "#/definitions/v3User" + } + } + } + }, + "v3Group": { + "type": "object", + "properties": { + "apiVersion": { + "type": "string", + "default": "usermgmt.k8smgmt.io/v3", + "description": "API Version of the group resource", + "title": "API Version" + }, + "kind": { + "type": "string", + "default": "Pipeline", + "description": "Kind of the group resource", + "title": "Kind" + }, + "metadata": { + "$ref": "#/definitions/v3Metadata", + "description": "Metadata of the group resource", + "title": "Metadata" + }, + "spec": { + "$ref": "#/definitions/v3GroupSpec", + "description": "Metadata of the group resource", + "title": "Metadata" + }, + "status": { + "$ref": "#/definitions/commonv3Status", + "description": "Status of the resource", + "title": "Status", + "readOnly": true + } + }, + "description": "Group", + "title": "Group", + "required": [ + "apiVersion", + "kind", + "metadata", + "spec" + ] + }, + "v3GroupSpec": { + "type": "object", + "properties": { + "projectroles": { + "type": "array", + "items": { + "$ref": "#/definitions/v3ProjectRole" + }, + "description": "ProjectRole groups for permission", + "title": "ProjectRoles" + }, + "users": { + "type": "array", + "items": { + "type": "string" + }, + "description": "List of users for group", + "title": "Users" + }, + "type": { + "type": "string", + "description": "Type of group", + "title": "Type" + } + }, + "description": "Group specification", + "title": "Group Specification" + }, + "v3Metadata": { + "type": "object", + "example": { + "name": "some-name", + "project": "defaultproject" + }, + "properties": { + "name": { + "type": "string", + "description": "name of the resource", + "title": "Name" + }, + "description": { + "type": "string", + "description": "description of the resource", + "title": "Description" + }, + "labels": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "labels of the resource", + "title": "Lables" + }, + "annotations": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "annotations of the resource", + "title": "Annotations" + }, + "project": { + "type": "string", + "description": "Project of the resource", + "title": "Project" + }, + "partner": { + "type": "string", + "description": "Project of the resource", + "title": "Project" + }, + "id": { + "type": "string", + "readOnly": true + }, + "modifiedAt": { + "type": "string", + "format": "date-time", + "readOnly": true + } + }, + "description": "metadata of the resource", + "title": "Metadata", + "required": [ + "name", + "project" + ] + }, + "v3Project": { + "type": "object", + "properties": { + "apiVersion": { + "type": "string", + "default": "system.k8smgmt.io/v3", + "description": "API Version of the project resource", + "title": "API Version" + }, + "kind": { + "type": "string", + "default": "Pipeline", + "description": "Kind of the project resource", + "title": "Kind" + }, + "metadata": { + "$ref": "#/definitions/v3Metadata", + "description": "Metadata of the project resource", + "title": "Metadata" + }, + "spec": { + "$ref": "#/definitions/v3ProjectSpec", + "description": "Metadata of the project resource", + "title": "Metadata" + }, + "status": { + "$ref": "#/definitions/commonv3Status", + "description": "Status of the resource", + "title": "Status", + "readOnly": true + } + }, + "description": "Project", + "title": "Project", + "required": [ + "apiVersion", + "kind", + "metadata", + "spec" + ] + }, + "v3ProjectRole": { + "type": "object", + "properties": { + "project": { + "$ref": "#/definitions/v3Project", + "description": "Project", + "title": "Project" + }, + "role": { + "$ref": "#/definitions/v3Role", + "description": "Role", + "title": "Role" + } + }, + "description": "Project and role pairing for permission", + "title": "ProjectRole" + }, + "v3ProjectSpec": { + "type": "object", + "properties": { + "default": { + "type": "boolean", + "description": "flag to indicate if this is the default project in the organization", + "title": "Default" + } + }, + "description": "project specification", + "title": "Project Specification" + }, + "v3Role": { + "type": "object", + "properties": { + "apiVersion": { + "type": "string", + "default": "usermgmt.k8smgmt.io/v3", + "description": "API Version of the Role resource", + "title": "API Version" + }, + "kind": { + "type": "string", + "default": "Role", + "description": "Kind of the role resource", + "title": "Kind" + }, + "metadata": { + "$ref": "#/definitions/v3Metadata", + "description": "Metadata of the role resource", + "title": "Metadata" + }, + "spec": { + "$ref": "#/definitions/v3RoleSpec", + "description": "Spec of the role resource", + "title": "Spec" + }, + "status": { + "$ref": "#/definitions/commonv3Status", + "description": "Status of the resource", + "title": "Status", + "readOnly": true + } + }, + "description": "Role", + "title": "Role", + "required": [ + "apiVersion", + "kind", + "metadata", + "spec" + ] + }, + "v3RolePermission": { + "type": "object", + "properties": { + "apiVersion": { + "type": "string", + "default": "usermgmt.k8smgmt.io/v3", + "description": "API Version of the role permission resource", + "title": "API Version" + }, + "kind": { + "type": "string", + "default": "RolePermission", + "description": "Kind of the role permission resource", + "title": "Kind" + }, + "metadata": { + "$ref": "#/definitions/v3Metadata", + "description": "Metadata of the role permission resource", + "title": "Metadata" + }, + "spec": { + "$ref": "#/definitions/v3RolePermissionSpec", + "description": "Metadata of the role permission resource", + "title": "Metadata" + }, + "status": { + "$ref": "#/definitions/commonv3Status", + "description": "Status of the resource", + "title": "Status", + "readOnly": true + } + }, + "description": "Role Permission", + "title": "RolePermission", + "required": [ + "apiVersion", + "kind", + "metadata", + "spec" + ] + }, + "v3RolePermissionSpec": { + "type": "object", + "properties": { + "permissions": { + "type": "array", + "items": { + "type": "string" + }, + "description": "List of permisions for role", + "title": "Permissions" + } + }, + "description": "RolePermisson specification", + "title": "RolePermission Specification" + }, + "v3RoleSpec": { + "type": "object", + "properties": { + "rolepermissions": { + "type": "array", + "items": { + "$ref": "#/definitions/v3RolePermission" + }, + "description": "Permissions for the role", + "title": "RolePermissions" + } + }, + "description": "Role specification", + "title": "Role Specification" + }, + "v3User": { + "type": "object", + "properties": { + "apiVersion": { + "type": "string", + "default": "usermgmt.k8smgmt.io/v3", + "description": "API Version of the user resource", + "title": "API Version" + }, + "kind": { + "type": "string", + "default": "User", + "description": "Kind of the user resource", + "title": "Kind" + }, + "metadata": { + "$ref": "#/definitions/v3Metadata", + "description": "Metadata of the user resource", + "title": "Metadata" + }, + "spec": { + "$ref": "#/definitions/v3UserSpec", + "description": "Spec of the user resource", + "title": "Spec" + }, + "status": { + "$ref": "#/definitions/commonv3Status", + "description": "Status of the resource", + "title": "Status", + "readOnly": true + } + }, + "description": "User", + "title": "User", + "required": [ + "apiVersion", + "kind", + "metadata", + "spec" + ] + }, + "v3UserResponse": { + "type": "object", + "properties": { + "status": { + "type": "string" + }, + "message": { + "type": "string" + } + } + }, + "v3UserSpec": { + "type": "object", + "properties": { + "firstName": { + "type": "string", + "description": "First name of the user", + "title": "FirstName" + }, + "lastName": { + "type": "string", + "description": "Last name of the user", + "title": "LastName" + }, + "username": { + "type": "string", + "description": "Username of the user", + "title": "Username" + }, + "phone": { + "type": "string", + "description": "Phone number of the user", + "title": "Phone" + }, + "password": { + "type": "string", + "description": "Password of the user", + "title": "Password" + }, + "totpRequired": { + "type": "string", + "description": "Flag to specify if TOTP is required", + "title": "TotpRequired" + }, + "totpSecret": { + "type": "string", + "description": "Secret for TOTP", + "title": "TotpSecret" + }, + "roles": { + "type": "array", + "items": { + "$ref": "#/definitions/v3Role" + }, + "description": "Roles of the user", + "title": "Roles" + }, + "groups": { + "type": "array", + "items": { + "$ref": "#/definitions/v3Group" + }, + "description": "Groups of the user", + "title": "Group" + }, + "projects": { + "type": "array", + "items": { + "$ref": "#/definitions/v3Project" + }, + "description": "Projects of the user", + "title": "Projects" + }, + "emailVerified": { + "type": "boolean", + "description": "Flag to show if the email of the user was verified", + "title": "EmailVerified", + "readOnly": true + }, + "phoneVerified": { + "type": "boolean", + "description": "Flag to show if phone number of the user was verified", + "title": "PhoneVerified", + "readOnly": true + }, + "totpVerified": { + "type": "boolean", + "description": "Flag to show if the TOTP of the user was verified", + "title": "TotpVerified", + "readOnly": true + } + }, + "description": "User specification", + "title": "User Specification" + } + }, + "securityDefinitions": { + "ApiKeyAuth": { + "type": "apiKey", + "name": "X-RAFAY-API-KEYID", + "in": "header" + }, + "BasicAuth": { + "type": "basic" + } + }, + "security": [ + { + "ApiKeyAuth": [], + "BasicAuth": [] + } + ] +} diff --git a/components/usermgmt/gen/openapi/proto/types/userpb/v3/group.swagger.json b/components/usermgmt/gen/openapi/proto/types/userpb/v3/group.swagger.json new file mode 100644 index 0000000..721eeb3 --- /dev/null +++ b/components/usermgmt/gen/openapi/proto/types/userpb/v3/group.swagger.json @@ -0,0 +1,43 @@ +{ + "swagger": "2.0", + "info": { + "title": "proto/types/userpb/v3/group.proto", + "version": "version not set" + }, + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "paths": {}, + "definitions": { + "googlerpcStatus": { + "type": "object", + "properties": { + "code": { + "type": "integer", + "format": "int32" + }, + "message": { + "type": "string" + }, + "details": { + "type": "array", + "items": { + "$ref": "#/definitions/protobufAny" + } + } + } + }, + "protobufAny": { + "type": "object", + "properties": { + "@type": { + "type": "string" + } + }, + "additionalProperties": {} + } + } +} diff --git a/components/usermgmt/gen/openapi/proto/types/userpb/v3/role.swagger.json b/components/usermgmt/gen/openapi/proto/types/userpb/v3/role.swagger.json new file mode 100644 index 0000000..d1312b8 --- /dev/null +++ b/components/usermgmt/gen/openapi/proto/types/userpb/v3/role.swagger.json @@ -0,0 +1,43 @@ +{ + "swagger": "2.0", + "info": { + "title": "proto/types/userpb/v3/role.proto", + "version": "version not set" + }, + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "paths": {}, + "definitions": { + "googlerpcStatus": { + "type": "object", + "properties": { + "code": { + "type": "integer", + "format": "int32" + }, + "message": { + "type": "string" + }, + "details": { + "type": "array", + "items": { + "$ref": "#/definitions/protobufAny" + } + } + } + }, + "protobufAny": { + "type": "object", + "properties": { + "@type": { + "type": "string" + } + }, + "additionalProperties": {} + } + } +} diff --git a/components/usermgmt/gen/openapi/proto/types/userpb/v3/rolepermission.swagger.json b/components/usermgmt/gen/openapi/proto/types/userpb/v3/rolepermission.swagger.json new file mode 100644 index 0000000..a1c2702 --- /dev/null +++ b/components/usermgmt/gen/openapi/proto/types/userpb/v3/rolepermission.swagger.json @@ -0,0 +1,43 @@ +{ + "swagger": "2.0", + "info": { + "title": "proto/types/userpb/v3/rolepermission.proto", + "version": "version not set" + }, + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "paths": {}, + "definitions": { + "googlerpcStatus": { + "type": "object", + "properties": { + "code": { + "type": "integer", + "format": "int32" + }, + "message": { + "type": "string" + }, + "details": { + "type": "array", + "items": { + "$ref": "#/definitions/protobufAny" + } + } + } + }, + "protobufAny": { + "type": "object", + "properties": { + "@type": { + "type": "string" + } + }, + "additionalProperties": {} + } + } +} diff --git a/components/usermgmt/gen/openapi/proto/types/userpb/v3/user.swagger.json b/components/usermgmt/gen/openapi/proto/types/userpb/v3/user.swagger.json new file mode 100644 index 0000000..57e48e6 --- /dev/null +++ b/components/usermgmt/gen/openapi/proto/types/userpb/v3/user.swagger.json @@ -0,0 +1,43 @@ +{ + "swagger": "2.0", + "info": { + "title": "proto/types/userpb/v3/user.proto", + "version": "version not set" + }, + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "paths": {}, + "definitions": { + "googlerpcStatus": { + "type": "object", + "properties": { + "code": { + "type": "integer", + "format": "int32" + }, + "message": { + "type": "string" + }, + "details": { + "type": "array", + "items": { + "$ref": "#/definitions/protobufAny" + } + } + } + }, + "protobufAny": { + "type": "object", + "properties": { + "@type": { + "type": "string" + } + }, + "additionalProperties": {} + } + } +} diff --git a/components/usermgmt/proto/proto/rpc/v3/group.pb.go b/components/usermgmt/proto/proto/rpc/v3/group.pb.go new file mode 100644 index 0000000..9621987 --- /dev/null +++ b/components/usermgmt/proto/proto/rpc/v3/group.pb.go @@ -0,0 +1,583 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.27.1 +// protoc v3.19.1 +// source: proto/rpc/v3/group.proto + +package rpcv3 + +import ( + v3 "github.com/RafaySystems/rcloud-base/components/usermgmt/proto/types/userpb/v3" + _ "github.com/gogo/protobuf/gogoproto" + _ "github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-openapiv2/options" + _ "google.golang.org/genproto/googleapis/api/annotations" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// Add filtering with org as well +type GetGroupsRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Project string `protobuf:"bytes,1,opt,name=project,proto3" json:"project,omitempty"` +} + +func (x *GetGroupsRequest) Reset() { + *x = GetGroupsRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_proto_rpc_v3_group_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetGroupsRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetGroupsRequest) ProtoMessage() {} + +func (x *GetGroupsRequest) ProtoReflect() protoreflect.Message { + mi := &file_proto_rpc_v3_group_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetGroupsRequest.ProtoReflect.Descriptor instead. +func (*GetGroupsRequest) Descriptor() ([]byte, []int) { + return file_proto_rpc_v3_group_proto_rawDescGZIP(), []int{0} +} + +func (x *GetGroupsRequest) GetProject() string { + if x != nil { + return x.Project + } + return "" +} + +type GetGroupRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` +} + +func (x *GetGroupRequest) Reset() { + *x = GetGroupRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_proto_rpc_v3_group_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetGroupRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetGroupRequest) ProtoMessage() {} + +func (x *GetGroupRequest) ProtoReflect() protoreflect.Message { + mi := &file_proto_rpc_v3_group_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetGroupRequest.ProtoReflect.Descriptor instead. +func (*GetGroupRequest) Descriptor() ([]byte, []int) { + return file_proto_rpc_v3_group_proto_rawDescGZIP(), []int{1} +} + +func (x *GetGroupRequest) GetId() string { + if x != nil { + return x.Id + } + return "" +} + +type DeleteGroupRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` +} + +func (x *DeleteGroupRequest) Reset() { + *x = DeleteGroupRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_proto_rpc_v3_group_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *DeleteGroupRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DeleteGroupRequest) ProtoMessage() {} + +func (x *DeleteGroupRequest) ProtoReflect() protoreflect.Message { + mi := &file_proto_rpc_v3_group_proto_msgTypes[2] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use DeleteGroupRequest.ProtoReflect.Descriptor instead. +func (*DeleteGroupRequest) Descriptor() ([]byte, []int) { + return file_proto_rpc_v3_group_proto_rawDescGZIP(), []int{2} +} + +func (x *DeleteGroupRequest) GetId() string { + if x != nil { + return x.Id + } + return "" +} + +type PutGroupRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + Group *v3.Group `protobuf:"bytes,2,opt,name=group,proto3" json:"group,omitempty"` +} + +func (x *PutGroupRequest) Reset() { + *x = PutGroupRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_proto_rpc_v3_group_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *PutGroupRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PutGroupRequest) ProtoMessage() {} + +func (x *PutGroupRequest) ProtoReflect() protoreflect.Message { + mi := &file_proto_rpc_v3_group_proto_msgTypes[3] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PutGroupRequest.ProtoReflect.Descriptor instead. +func (*PutGroupRequest) Descriptor() ([]byte, []int) { + return file_proto_rpc_v3_group_proto_rawDescGZIP(), []int{3} +} + +func (x *PutGroupRequest) GetId() string { + if x != nil { + return x.Id + } + return "" +} + +func (x *PutGroupRequest) GetGroup() *v3.Group { + if x != nil { + return x.Group + } + return nil +} + +type GetGroupsResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Group []*v3.Group `protobuf:"bytes,1,rep,name=group,proto3" json:"group,omitempty"` +} + +func (x *GetGroupsResponse) Reset() { + *x = GetGroupsResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_proto_rpc_v3_group_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetGroupsResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetGroupsResponse) ProtoMessage() {} + +func (x *GetGroupsResponse) ProtoReflect() protoreflect.Message { + mi := &file_proto_rpc_v3_group_proto_msgTypes[4] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetGroupsResponse.ProtoReflect.Descriptor instead. +func (*GetGroupsResponse) Descriptor() ([]byte, []int) { + return file_proto_rpc_v3_group_proto_rawDescGZIP(), []int{4} +} + +func (x *GetGroupsResponse) GetGroup() []*v3.Group { + if x != nil { + return x.Group + } + return nil +} + +type GroupResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Status string `protobuf:"bytes,1,opt,name=status,proto3" json:"status,omitempty"` + Message string `protobuf:"bytes,2,opt,name=message,proto3" json:"message,omitempty"` +} + +func (x *GroupResponse) Reset() { + *x = GroupResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_proto_rpc_v3_group_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GroupResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GroupResponse) ProtoMessage() {} + +func (x *GroupResponse) ProtoReflect() protoreflect.Message { + mi := &file_proto_rpc_v3_group_proto_msgTypes[5] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GroupResponse.ProtoReflect.Descriptor instead. +func (*GroupResponse) Descriptor() ([]byte, []int) { + return file_proto_rpc_v3_group_proto_rawDescGZIP(), []int{5} +} + +func (x *GroupResponse) GetStatus() string { + if x != nil { + return x.Status + } + return "" +} + +func (x *GroupResponse) GetMessage() string { + if x != nil { + return x.Message + } + return "" +} + +var File_proto_rpc_v3_group_proto protoreflect.FileDescriptor + +var file_proto_rpc_v3_group_proto_rawDesc = []byte{ + 0x0a, 0x18, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x72, 0x70, 0x63, 0x2f, 0x76, 0x33, 0x2f, 0x67, + 0x72, 0x6f, 0x75, 0x70, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x10, 0x72, 0x61, 0x66, 0x61, + 0x79, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x72, 0x70, 0x63, 0x2e, 0x76, 0x33, 0x1a, 0x1c, 0x67, 0x6f, + 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x14, 0x67, 0x6f, 0x67, 0x6f, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x6f, 0x67, 0x6f, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x1a, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x2d, 0x67, 0x65, 0x6e, 0x2d, 0x6f, 0x70, 0x65, + 0x6e, 0x61, 0x70, 0x69, 0x76, 0x32, 0x2f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x61, + 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x1a, 0x21, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2f, 0x75, 0x73, + 0x65, 0x72, 0x70, 0x62, 0x2f, 0x76, 0x33, 0x2f, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x22, 0x5a, 0x0a, 0x10, 0x47, 0x65, 0x74, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x73, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x46, 0x0a, 0x07, 0x70, 0x72, 0x6f, 0x6a, 0x65, + 0x63, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x2c, 0x92, 0x41, 0x29, 0x2a, 0x07, 0x50, + 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x32, 0x1c, 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x20, + 0x6f, 0x66, 0x20, 0x75, 0x73, 0x65, 0x72, 0x20, 0x74, 0x6f, 0x20, 0x66, 0x69, 0x6c, 0x74, 0x65, + 0x72, 0x20, 0x62, 0x79, 0x40, 0x01, 0x52, 0x07, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x22, + 0x21, 0x0a, 0x0f, 0x47, 0x65, 0x74, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, + 0x69, 0x64, 0x22, 0x24, 0x0a, 0x12, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x47, 0x72, 0x6f, 0x75, + 0x70, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x22, 0x57, 0x0a, 0x0f, 0x50, 0x75, 0x74, 0x47, + 0x72, 0x6f, 0x75, 0x70, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, + 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x34, 0x0a, 0x05, 0x67, + 0x72, 0x6f, 0x75, 0x70, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x72, 0x61, 0x66, + 0x61, 0x79, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x75, 0x73, 0x65, + 0x72, 0x2e, 0x76, 0x33, 0x2e, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x52, 0x05, 0x67, 0x72, 0x6f, 0x75, + 0x70, 0x22, 0x49, 0x0a, 0x11, 0x47, 0x65, 0x74, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x73, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x34, 0x0a, 0x05, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x18, + 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x72, 0x61, 0x66, 0x61, 0x79, 0x2e, 0x64, 0x65, + 0x76, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x2e, + 0x47, 0x72, 0x6f, 0x75, 0x70, 0x52, 0x05, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x22, 0x41, 0x0a, 0x0d, + 0x47, 0x72, 0x6f, 0x75, 0x70, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x16, 0x0a, + 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x73, + 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x18, 0x0a, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x32, + 0xf2, 0x04, 0x0a, 0x05, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x12, 0xa3, 0x01, 0x0a, 0x0b, 0x43, 0x72, + 0x65, 0x61, 0x74, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x12, 0x1e, 0x2e, 0x72, 0x61, 0x66, 0x61, + 0x79, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x75, 0x73, 0x65, 0x72, + 0x2e, 0x76, 0x33, 0x2e, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x1a, 0x1e, 0x2e, 0x72, 0x61, 0x66, 0x61, + 0x79, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x75, 0x73, 0x65, 0x72, + 0x2e, 0x76, 0x33, 0x2e, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x22, 0x54, 0x92, 0x41, 0x37, 0x4a, 0x35, + 0x0a, 0x03, 0x32, 0x30, 0x31, 0x12, 0x2e, 0x0a, 0x2c, 0x52, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x65, + 0x64, 0x20, 0x77, 0x68, 0x65, 0x6e, 0x20, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x20, 0x69, 0x73, 0x20, + 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x20, 0x73, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x66, + 0x75, 0x6c, 0x6c, 0x79, 0x2e, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x14, 0x22, 0x0f, 0x2f, 0x61, 0x75, + 0x74, 0x68, 0x2f, 0x76, 0x33, 0x2f, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x73, 0x3a, 0x01, 0x2a, 0x12, + 0x6d, 0x0a, 0x09, 0x47, 0x65, 0x74, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x73, 0x12, 0x22, 0x2e, 0x72, + 0x61, 0x66, 0x61, 0x79, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x72, 0x70, 0x63, 0x2e, 0x76, 0x33, 0x2e, + 0x47, 0x65, 0x74, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x1a, 0x23, 0x2e, 0x72, 0x61, 0x66, 0x61, 0x79, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x72, 0x70, 0x63, + 0x2e, 0x76, 0x33, 0x2e, 0x47, 0x65, 0x74, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x73, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x17, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x11, 0x12, 0x0f, 0x2f, + 0x61, 0x75, 0x74, 0x68, 0x2f, 0x76, 0x33, 0x2f, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x73, 0x12, 0x6a, + 0x0a, 0x08, 0x47, 0x65, 0x74, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x12, 0x21, 0x2e, 0x72, 0x61, 0x66, + 0x61, 0x79, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x72, 0x70, 0x63, 0x2e, 0x76, 0x33, 0x2e, 0x47, 0x65, + 0x74, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1e, 0x2e, + 0x72, 0x61, 0x66, 0x61, 0x79, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, + 0x75, 0x73, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x2e, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x22, 0x1b, 0x82, + 0xd3, 0xe4, 0x93, 0x02, 0x15, 0x12, 0x13, 0x2f, 0x61, 0x75, 0x74, 0x68, 0x2f, 0x76, 0x33, 0x2f, + 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2f, 0x7b, 0x69, 0x64, 0x7d, 0x12, 0x75, 0x0a, 0x0b, 0x55, 0x70, + 0x64, 0x61, 0x74, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x12, 0x21, 0x2e, 0x72, 0x61, 0x66, 0x61, + 0x79, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x72, 0x70, 0x63, 0x2e, 0x76, 0x33, 0x2e, 0x50, 0x75, 0x74, + 0x47, 0x72, 0x6f, 0x75, 0x70, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1f, 0x2e, 0x72, + 0x61, 0x66, 0x61, 0x79, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x72, 0x70, 0x63, 0x2e, 0x76, 0x33, 0x2e, + 0x47, 0x72, 0x6f, 0x75, 0x70, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x22, 0x82, + 0xd3, 0xe4, 0x93, 0x02, 0x1c, 0x1a, 0x13, 0x2f, 0x61, 0x75, 0x74, 0x68, 0x2f, 0x76, 0x33, 0x2f, + 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2f, 0x7b, 0x69, 0x64, 0x7d, 0x3a, 0x05, 0x67, 0x72, 0x6f, 0x75, + 0x70, 0x12, 0x71, 0x0a, 0x0b, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, + 0x12, 0x24, 0x2e, 0x72, 0x61, 0x66, 0x61, 0x79, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x72, 0x70, 0x63, + 0x2e, 0x76, 0x33, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1f, 0x2e, 0x72, 0x61, 0x66, 0x61, 0x79, 0x2e, 0x64, + 0x65, 0x76, 0x2e, 0x72, 0x70, 0x63, 0x2e, 0x76, 0x33, 0x2e, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x1b, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x15, 0x2a, + 0x13, 0x2f, 0x61, 0x75, 0x74, 0x68, 0x2f, 0x76, 0x33, 0x2f, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2f, + 0x7b, 0x69, 0x64, 0x7d, 0x42, 0xcd, 0x04, 0x0a, 0x14, 0x63, 0x6f, 0x6d, 0x2e, 0x72, 0x61, 0x66, + 0x61, 0x79, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x72, 0x70, 0x63, 0x2e, 0x76, 0x33, 0x42, 0x0a, 0x47, + 0x72, 0x6f, 0x75, 0x70, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x4a, 0x67, 0x69, 0x74, + 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x52, 0x61, 0x66, 0x61, 0x79, 0x53, 0x79, 0x73, + 0x74, 0x65, 0x6d, 0x73, 0x2f, 0x72, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2d, 0x62, 0x61, 0x73, 0x65, + 0x2f, 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x73, 0x2f, 0x75, 0x73, 0x65, 0x72, + 0x6d, 0x67, 0x6d, 0x74, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x72, 0x70, 0x63, 0x2f, 0x76, + 0x33, 0x3b, 0x72, 0x70, 0x63, 0x76, 0x33, 0xa2, 0x02, 0x03, 0x52, 0x44, 0x52, 0xaa, 0x02, 0x10, + 0x52, 0x61, 0x66, 0x61, 0x79, 0x2e, 0x44, 0x65, 0x76, 0x2e, 0x52, 0x70, 0x63, 0x2e, 0x56, 0x33, + 0xca, 0x02, 0x10, 0x52, 0x61, 0x66, 0x61, 0x79, 0x5c, 0x44, 0x65, 0x76, 0x5c, 0x52, 0x70, 0x63, + 0x5c, 0x56, 0x33, 0xe2, 0x02, 0x1c, 0x52, 0x61, 0x66, 0x61, 0x79, 0x5c, 0x44, 0x65, 0x76, 0x5c, + 0x52, 0x70, 0x63, 0x5c, 0x56, 0x33, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, + 0x74, 0x61, 0xea, 0x02, 0x13, 0x52, 0x61, 0x66, 0x61, 0x79, 0x3a, 0x3a, 0x44, 0x65, 0x76, 0x3a, + 0x3a, 0x52, 0x70, 0x63, 0x3a, 0x3a, 0x56, 0x33, 0x92, 0x41, 0xe4, 0x02, 0x12, 0x2c, 0x0a, 0x18, + 0x47, 0x72, 0x6f, 0x75, 0x70, 0x20, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, + 0x20, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x22, 0x0b, 0x0a, 0x09, 0x52, 0x61, 0x66, 0x61, + 0x79, 0x20, 0x44, 0x65, 0x76, 0x32, 0x03, 0x32, 0x2e, 0x30, 0x2a, 0x01, 0x02, 0x32, 0x10, 0x61, + 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x6a, 0x73, 0x6f, 0x6e, 0x32, + 0x10, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x79, 0x61, 0x6d, + 0x6c, 0x3a, 0x10, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x6a, + 0x73, 0x6f, 0x6e, 0x3a, 0x10, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x2f, 0x79, 0x61, 0x6d, 0x6c, 0x52, 0x51, 0x0a, 0x03, 0x34, 0x30, 0x33, 0x12, 0x4a, 0x0a, 0x48, + 0x52, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x65, 0x64, 0x20, 0x77, 0x68, 0x65, 0x6e, 0x20, 0x74, 0x68, + 0x65, 0x20, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x20, 0x64, 0x6f, 0x65, 0x73, 0x20, 0x6e, 0x6f, 0x74, + 0x20, 0x68, 0x61, 0x76, 0x65, 0x20, 0x70, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, + 0x20, 0x74, 0x6f, 0x20, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x20, 0x74, 0x68, 0x65, 0x20, 0x72, + 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x2e, 0x52, 0x3b, 0x0a, 0x03, 0x34, 0x30, 0x34, 0x12, + 0x34, 0x0a, 0x2a, 0x52, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x65, 0x64, 0x20, 0x77, 0x68, 0x65, 0x6e, + 0x20, 0x74, 0x68, 0x65, 0x20, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x20, 0x64, 0x6f, + 0x65, 0x73, 0x20, 0x6e, 0x6f, 0x74, 0x20, 0x65, 0x78, 0x69, 0x73, 0x74, 0x2e, 0x12, 0x06, 0x0a, + 0x04, 0x9a, 0x02, 0x01, 0x07, 0x5a, 0x38, 0x0a, 0x25, 0x0a, 0x0a, 0x41, 0x70, 0x69, 0x4b, 0x65, + 0x79, 0x41, 0x75, 0x74, 0x68, 0x12, 0x17, 0x08, 0x02, 0x1a, 0x11, 0x58, 0x2d, 0x52, 0x41, 0x46, + 0x41, 0x59, 0x2d, 0x41, 0x50, 0x49, 0x2d, 0x4b, 0x45, 0x59, 0x49, 0x44, 0x20, 0x02, 0x0a, 0x0f, + 0x0a, 0x09, 0x42, 0x61, 0x73, 0x69, 0x63, 0x41, 0x75, 0x74, 0x68, 0x12, 0x02, 0x08, 0x01, 0x62, + 0x1f, 0x0a, 0x0e, 0x0a, 0x0a, 0x41, 0x70, 0x69, 0x4b, 0x65, 0x79, 0x41, 0x75, 0x74, 0x68, 0x12, + 0x00, 0x0a, 0x0d, 0x0a, 0x09, 0x42, 0x61, 0x73, 0x69, 0x63, 0x41, 0x75, 0x74, 0x68, 0x12, 0x00, + 0xc8, 0xe2, 0x1e, 0x01, 0xd0, 0xe2, 0x1e, 0x01, 0xe0, 0xe2, 0x1e, 0x01, 0xc0, 0xe3, 0x1e, 0x01, + 0xc8, 0xe3, 0x1e, 0x01, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_proto_rpc_v3_group_proto_rawDescOnce sync.Once + file_proto_rpc_v3_group_proto_rawDescData = file_proto_rpc_v3_group_proto_rawDesc +) + +func file_proto_rpc_v3_group_proto_rawDescGZIP() []byte { + file_proto_rpc_v3_group_proto_rawDescOnce.Do(func() { + file_proto_rpc_v3_group_proto_rawDescData = protoimpl.X.CompressGZIP(file_proto_rpc_v3_group_proto_rawDescData) + }) + return file_proto_rpc_v3_group_proto_rawDescData +} + +var file_proto_rpc_v3_group_proto_msgTypes = make([]protoimpl.MessageInfo, 6) +var file_proto_rpc_v3_group_proto_goTypes = []interface{}{ + (*GetGroupsRequest)(nil), // 0: rafay.dev.rpc.v3.GetGroupsRequest + (*GetGroupRequest)(nil), // 1: rafay.dev.rpc.v3.GetGroupRequest + (*DeleteGroupRequest)(nil), // 2: rafay.dev.rpc.v3.DeleteGroupRequest + (*PutGroupRequest)(nil), // 3: rafay.dev.rpc.v3.PutGroupRequest + (*GetGroupsResponse)(nil), // 4: rafay.dev.rpc.v3.GetGroupsResponse + (*GroupResponse)(nil), // 5: rafay.dev.rpc.v3.GroupResponse + (*v3.Group)(nil), // 6: rafay.dev.types.user.v3.Group +} +var file_proto_rpc_v3_group_proto_depIdxs = []int32{ + 6, // 0: rafay.dev.rpc.v3.PutGroupRequest.group:type_name -> rafay.dev.types.user.v3.Group + 6, // 1: rafay.dev.rpc.v3.GetGroupsResponse.group:type_name -> rafay.dev.types.user.v3.Group + 6, // 2: rafay.dev.rpc.v3.Group.CreateGroup:input_type -> rafay.dev.types.user.v3.Group + 0, // 3: rafay.dev.rpc.v3.Group.GetGroups:input_type -> rafay.dev.rpc.v3.GetGroupsRequest + 1, // 4: rafay.dev.rpc.v3.Group.GetGroup:input_type -> rafay.dev.rpc.v3.GetGroupRequest + 3, // 5: rafay.dev.rpc.v3.Group.UpdateGroup:input_type -> rafay.dev.rpc.v3.PutGroupRequest + 2, // 6: rafay.dev.rpc.v3.Group.DeleteGroup:input_type -> rafay.dev.rpc.v3.DeleteGroupRequest + 6, // 7: rafay.dev.rpc.v3.Group.CreateGroup:output_type -> rafay.dev.types.user.v3.Group + 4, // 8: rafay.dev.rpc.v3.Group.GetGroups:output_type -> rafay.dev.rpc.v3.GetGroupsResponse + 6, // 9: rafay.dev.rpc.v3.Group.GetGroup:output_type -> rafay.dev.types.user.v3.Group + 5, // 10: rafay.dev.rpc.v3.Group.UpdateGroup:output_type -> rafay.dev.rpc.v3.GroupResponse + 5, // 11: rafay.dev.rpc.v3.Group.DeleteGroup:output_type -> rafay.dev.rpc.v3.GroupResponse + 7, // [7:12] is the sub-list for method output_type + 2, // [2:7] is the sub-list for method input_type + 2, // [2:2] is the sub-list for extension type_name + 2, // [2:2] is the sub-list for extension extendee + 0, // [0:2] is the sub-list for field type_name +} + +func init() { file_proto_rpc_v3_group_proto_init() } +func file_proto_rpc_v3_group_proto_init() { + if File_proto_rpc_v3_group_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_proto_rpc_v3_group_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetGroupsRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_rpc_v3_group_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetGroupRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_rpc_v3_group_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*DeleteGroupRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_rpc_v3_group_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*PutGroupRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_rpc_v3_group_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetGroupsResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_rpc_v3_group_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GroupResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_proto_rpc_v3_group_proto_rawDesc, + NumEnums: 0, + NumMessages: 6, + NumExtensions: 0, + NumServices: 1, + }, + GoTypes: file_proto_rpc_v3_group_proto_goTypes, + DependencyIndexes: file_proto_rpc_v3_group_proto_depIdxs, + MessageInfos: file_proto_rpc_v3_group_proto_msgTypes, + }.Build() + File_proto_rpc_v3_group_proto = out.File + file_proto_rpc_v3_group_proto_rawDesc = nil + file_proto_rpc_v3_group_proto_goTypes = nil + file_proto_rpc_v3_group_proto_depIdxs = nil +} diff --git a/components/usermgmt/proto/proto/rpc/v3/group.pb.gw.go b/components/usermgmt/proto/proto/rpc/v3/group.pb.gw.go new file mode 100644 index 0000000..cd214b2 --- /dev/null +++ b/components/usermgmt/proto/proto/rpc/v3/group.pb.gw.go @@ -0,0 +1,564 @@ +// Code generated by protoc-gen-grpc-gateway. DO NOT EDIT. +// source: proto/rpc/v3/group.proto + +/* +Package rpcv3 is a reverse proxy. + +It translates gRPC into RESTful JSON APIs. +*/ +package rpcv3 + +import ( + "context" + "io" + "net/http" + + "github.com/RafaySystems/rcloud-base/components/usermgmt/proto/types/userpb/v3" + "github.com/grpc-ecosystem/grpc-gateway/v2/runtime" + "github.com/grpc-ecosystem/grpc-gateway/v2/utilities" + "google.golang.org/grpc" + "google.golang.org/grpc/codes" + "google.golang.org/grpc/grpclog" + "google.golang.org/grpc/metadata" + "google.golang.org/grpc/status" + "google.golang.org/protobuf/proto" +) + +// Suppress "imported and not used" errors +var _ codes.Code +var _ io.Reader +var _ status.Status +var _ = runtime.String +var _ = utilities.NewDoubleArray +var _ = metadata.Join + +func request_Group_CreateGroup_0(ctx context.Context, marshaler runtime.Marshaler, client GroupClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq userv3.Group + var metadata runtime.ServerMetadata + + newReader, berr := utilities.IOReaderFactory(req.Body) + if berr != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) + } + if err := marshaler.NewDecoder(newReader()).Decode(&protoReq); err != nil && err != io.EOF { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := client.CreateGroup(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_Group_CreateGroup_0(ctx context.Context, marshaler runtime.Marshaler, server GroupServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq userv3.Group + var metadata runtime.ServerMetadata + + newReader, berr := utilities.IOReaderFactory(req.Body) + if berr != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) + } + if err := marshaler.NewDecoder(newReader()).Decode(&protoReq); err != nil && err != io.EOF { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := server.CreateGroup(ctx, &protoReq) + return msg, metadata, err + +} + +var ( + filter_Group_GetGroups_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} +) + +func request_Group_GetGroups_0(ctx context.Context, marshaler runtime.Marshaler, client GroupClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq GetGroupsRequest + var metadata runtime.ServerMetadata + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Group_GetGroups_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := client.GetGroups(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_Group_GetGroups_0(ctx context.Context, marshaler runtime.Marshaler, server GroupServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq GetGroupsRequest + var metadata runtime.ServerMetadata + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Group_GetGroups_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := server.GetGroups(ctx, &protoReq) + return msg, metadata, err + +} + +func request_Group_GetGroup_0(ctx context.Context, marshaler runtime.Marshaler, client GroupClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq GetGroupRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["id"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "id") + } + + protoReq.Id, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "id", err) + } + + msg, err := client.GetGroup(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_Group_GetGroup_0(ctx context.Context, marshaler runtime.Marshaler, server GroupServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq GetGroupRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["id"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "id") + } + + protoReq.Id, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "id", err) + } + + msg, err := server.GetGroup(ctx, &protoReq) + return msg, metadata, err + +} + +func request_Group_UpdateGroup_0(ctx context.Context, marshaler runtime.Marshaler, client GroupClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq PutGroupRequest + var metadata runtime.ServerMetadata + + newReader, berr := utilities.IOReaderFactory(req.Body) + if berr != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) + } + if err := marshaler.NewDecoder(newReader()).Decode(&protoReq.Group); err != nil && err != io.EOF { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["id"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "id") + } + + protoReq.Id, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "id", err) + } + + msg, err := client.UpdateGroup(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_Group_UpdateGroup_0(ctx context.Context, marshaler runtime.Marshaler, server GroupServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq PutGroupRequest + var metadata runtime.ServerMetadata + + newReader, berr := utilities.IOReaderFactory(req.Body) + if berr != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) + } + if err := marshaler.NewDecoder(newReader()).Decode(&protoReq.Group); err != nil && err != io.EOF { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["id"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "id") + } + + protoReq.Id, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "id", err) + } + + msg, err := server.UpdateGroup(ctx, &protoReq) + return msg, metadata, err + +} + +func request_Group_DeleteGroup_0(ctx context.Context, marshaler runtime.Marshaler, client GroupClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq DeleteGroupRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["id"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "id") + } + + protoReq.Id, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "id", err) + } + + msg, err := client.DeleteGroup(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_Group_DeleteGroup_0(ctx context.Context, marshaler runtime.Marshaler, server GroupServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq DeleteGroupRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["id"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "id") + } + + protoReq.Id, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "id", err) + } + + msg, err := server.DeleteGroup(ctx, &protoReq) + return msg, metadata, err + +} + +// RegisterGroupHandlerServer registers the http handlers for service Group to "mux". +// UnaryRPC :call GroupServer directly. +// StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. +// Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterGroupHandlerFromEndpoint instead. +func RegisterGroupHandlerServer(ctx context.Context, mux *runtime.ServeMux, server GroupServer) error { + + mux.Handle("POST", pattern_Group_CreateGroup_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/rafay.dev.rpc.v3.Group/CreateGroup", runtime.WithHTTPPathPattern("/auth/v3/groups")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_Group_CreateGroup_0(rctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Group_CreateGroup_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_Group_GetGroups_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/rafay.dev.rpc.v3.Group/GetGroups", runtime.WithHTTPPathPattern("/auth/v3/groups")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_Group_GetGroups_0(rctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Group_GetGroups_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_Group_GetGroup_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/rafay.dev.rpc.v3.Group/GetGroup", runtime.WithHTTPPathPattern("/auth/v3/group/{id}")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_Group_GetGroup_0(rctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Group_GetGroup_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("PUT", pattern_Group_UpdateGroup_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/rafay.dev.rpc.v3.Group/UpdateGroup", runtime.WithHTTPPathPattern("/auth/v3/group/{id}")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_Group_UpdateGroup_0(rctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Group_UpdateGroup_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("DELETE", pattern_Group_DeleteGroup_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/rafay.dev.rpc.v3.Group/DeleteGroup", runtime.WithHTTPPathPattern("/auth/v3/group/{id}")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_Group_DeleteGroup_0(rctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Group_DeleteGroup_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + return nil +} + +// RegisterGroupHandlerFromEndpoint is same as RegisterGroupHandler but +// automatically dials to "endpoint" and closes the connection when "ctx" gets done. +func RegisterGroupHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error) { + conn, err := grpc.Dial(endpoint, opts...) + if err != nil { + return err + } + defer func() { + if err != nil { + if cerr := conn.Close(); cerr != nil { + grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr) + } + return + } + go func() { + <-ctx.Done() + if cerr := conn.Close(); cerr != nil { + grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr) + } + }() + }() + + return RegisterGroupHandler(ctx, mux, conn) +} + +// RegisterGroupHandler registers the http handlers for service Group to "mux". +// The handlers forward requests to the grpc endpoint over "conn". +func RegisterGroupHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error { + return RegisterGroupHandlerClient(ctx, mux, NewGroupClient(conn)) +} + +// RegisterGroupHandlerClient registers the http handlers for service Group +// to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "GroupClient". +// Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "GroupClient" +// doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in +// "GroupClient" to call the correct interceptors. +func RegisterGroupHandlerClient(ctx context.Context, mux *runtime.ServeMux, client GroupClient) error { + + mux.Handle("POST", pattern_Group_CreateGroup_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateContext(ctx, mux, req, "/rafay.dev.rpc.v3.Group/CreateGroup", runtime.WithHTTPPathPattern("/auth/v3/groups")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_Group_CreateGroup_0(rctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Group_CreateGroup_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_Group_GetGroups_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateContext(ctx, mux, req, "/rafay.dev.rpc.v3.Group/GetGroups", runtime.WithHTTPPathPattern("/auth/v3/groups")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_Group_GetGroups_0(rctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Group_GetGroups_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_Group_GetGroup_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateContext(ctx, mux, req, "/rafay.dev.rpc.v3.Group/GetGroup", runtime.WithHTTPPathPattern("/auth/v3/group/{id}")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_Group_GetGroup_0(rctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Group_GetGroup_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("PUT", pattern_Group_UpdateGroup_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateContext(ctx, mux, req, "/rafay.dev.rpc.v3.Group/UpdateGroup", runtime.WithHTTPPathPattern("/auth/v3/group/{id}")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_Group_UpdateGroup_0(rctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Group_UpdateGroup_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("DELETE", pattern_Group_DeleteGroup_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateContext(ctx, mux, req, "/rafay.dev.rpc.v3.Group/DeleteGroup", runtime.WithHTTPPathPattern("/auth/v3/group/{id}")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_Group_DeleteGroup_0(rctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Group_DeleteGroup_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + return nil +} + +var ( + pattern_Group_CreateGroup_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"auth", "v3", "groups"}, "")) + + pattern_Group_GetGroups_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"auth", "v3", "groups"}, "")) + + pattern_Group_GetGroup_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3}, []string{"auth", "v3", "group", "id"}, "")) + + pattern_Group_UpdateGroup_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3}, []string{"auth", "v3", "group", "id"}, "")) + + pattern_Group_DeleteGroup_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3}, []string{"auth", "v3", "group", "id"}, "")) +) + +var ( + forward_Group_CreateGroup_0 = runtime.ForwardResponseMessage + + forward_Group_GetGroups_0 = runtime.ForwardResponseMessage + + forward_Group_GetGroup_0 = runtime.ForwardResponseMessage + + forward_Group_UpdateGroup_0 = runtime.ForwardResponseMessage + + forward_Group_DeleteGroup_0 = runtime.ForwardResponseMessage +) diff --git a/components/usermgmt/proto/proto/rpc/v3/group.proto b/components/usermgmt/proto/proto/rpc/v3/group.proto new file mode 100644 index 0000000..5173477 --- /dev/null +++ b/components/usermgmt/proto/proto/rpc/v3/group.proto @@ -0,0 +1,129 @@ +syntax = "proto3"; +package rafay.dev.rpc.v3; + +import "google/api/annotations.proto"; +import "gogoproto/gogo.proto"; +import "protoc-gen-openapiv2/options/annotations.proto"; +import "proto/types/userpb/v3/group.proto"; + +// Enable custom Marshal method. +option (gogoproto.marshaler_all) = true; +// Enable custom Unmarshal method. +option (gogoproto.unmarshaler_all) = true; +// Enable custom Size method (Required by Marshal and Unmarshal). +option (gogoproto.sizer_all) = true; +// Enable registration with golang/protobuf for the grpc-gateway. +option (gogoproto.goproto_registration) = true; +// Enable generation of XXX_MessageName methods for grpc-go/status. +option (gogoproto.messagename_all) = true; + +option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_swagger) = { + info : { + title : "Group management Service" + version : "2.0" + contact : {name : "Rafay Dev"} + } + schemes : HTTPS + consumes : "application/json" + consumes : "application/yaml" + produces : "application/json" + produces : "application/yaml" + security_definitions : { + security : { + key : "BasicAuth" + value : {type : TYPE_BASIC} + } + security : { + key : "ApiKeyAuth" + value : {type : TYPE_API_KEY in : IN_HEADER name : "X-RAFAY-API-KEYID"} + } + } + security : { + security_requirement : { + key : "BasicAuth" + value : {} + } + security_requirement : { + key : "ApiKeyAuth" + value : {} + } + } + responses : { + key : "403" + value : { + description : "Returned when the group does not have permission to " + "access " + "the resource." + } + } + responses : { + key : "404" + value : { + description : "Returned when the resource does not exist." + schema : {json_schema : {type : STRING}} + } + } +}; + +// Add filtering with org as well +message GetGroupsRequest { + string project = 1 + [ (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { + title : "Project", + description : "Project of user to filter by" + read_only : true + } ]; +} +message GetGroupRequest { string id = 1; } +message DeleteGroupRequest { string id = 1; } +message PutGroupRequest { + string id = 1; + rafay.dev.types.user.v3.Group group = 2; +} +message GetGroupsResponse { repeated rafay.dev.types.user.v3.Group group = 1; } +message GroupResponse { + string status = 1; + string message = 2; +} + +service Group { + rpc CreateGroup(rafay.dev.types.user.v3.Group) + returns (rafay.dev.types.user.v3.Group) { + option (google.api.http) = { + post : "/auth/v3/groups" + body : "*" + }; + + option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation) = { + responses : { + key : "201" + value : {description : "Returned when group is created successfully."} + } + }; + }; + + rpc GetGroups(GetGroupsRequest) returns (GetGroupsResponse) { + option (google.api.http) = { + get : "/auth/v3/groups" + }; + }; + + rpc GetGroup(GetGroupRequest) returns (rafay.dev.types.user.v3.Group) { + option (google.api.http) = { + get : "/auth/v3/group/{id}" + }; + }; + + rpc UpdateGroup(PutGroupRequest) returns (GroupResponse) { + option (google.api.http) = { + put : "/auth/v3/group/{id}" + body : "group" + }; + }; + + rpc DeleteGroup(DeleteGroupRequest) returns (GroupResponse) { + option (google.api.http) = { + delete : "/auth/v3/group/{id}" + }; + }; +} \ No newline at end of file diff --git a/components/usermgmt/proto/proto/rpc/v3/group_grpc.pb.go b/components/usermgmt/proto/proto/rpc/v3/group_grpc.pb.go new file mode 100644 index 0000000..866bc5d --- /dev/null +++ b/components/usermgmt/proto/proto/rpc/v3/group_grpc.pb.go @@ -0,0 +1,248 @@ +// Code generated by protoc-gen-go-grpc. DO NOT EDIT. +// versions: +// - protoc-gen-go-grpc v1.2.0 +// - protoc v3.19.1 +// source: proto/rpc/v3/group.proto + +package rpcv3 + +import ( + context "context" + v3 "github.com/RafaySystems/rcloud-base/components/usermgmt/proto/types/userpb/v3" + grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" +) + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +// Requires gRPC-Go v1.32.0 or later. +const _ = grpc.SupportPackageIsVersion7 + +// GroupClient is the client API for Group service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. +type GroupClient interface { + CreateGroup(ctx context.Context, in *v3.Group, opts ...grpc.CallOption) (*v3.Group, error) + GetGroups(ctx context.Context, in *GetGroupsRequest, opts ...grpc.CallOption) (*GetGroupsResponse, error) + GetGroup(ctx context.Context, in *GetGroupRequest, opts ...grpc.CallOption) (*v3.Group, error) + UpdateGroup(ctx context.Context, in *PutGroupRequest, opts ...grpc.CallOption) (*GroupResponse, error) + DeleteGroup(ctx context.Context, in *DeleteGroupRequest, opts ...grpc.CallOption) (*GroupResponse, error) +} + +type groupClient struct { + cc grpc.ClientConnInterface +} + +func NewGroupClient(cc grpc.ClientConnInterface) GroupClient { + return &groupClient{cc} +} + +func (c *groupClient) CreateGroup(ctx context.Context, in *v3.Group, opts ...grpc.CallOption) (*v3.Group, error) { + out := new(v3.Group) + err := c.cc.Invoke(ctx, "/rafay.dev.rpc.v3.Group/CreateGroup", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *groupClient) GetGroups(ctx context.Context, in *GetGroupsRequest, opts ...grpc.CallOption) (*GetGroupsResponse, error) { + out := new(GetGroupsResponse) + err := c.cc.Invoke(ctx, "/rafay.dev.rpc.v3.Group/GetGroups", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *groupClient) GetGroup(ctx context.Context, in *GetGroupRequest, opts ...grpc.CallOption) (*v3.Group, error) { + out := new(v3.Group) + err := c.cc.Invoke(ctx, "/rafay.dev.rpc.v3.Group/GetGroup", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *groupClient) UpdateGroup(ctx context.Context, in *PutGroupRequest, opts ...grpc.CallOption) (*GroupResponse, error) { + out := new(GroupResponse) + err := c.cc.Invoke(ctx, "/rafay.dev.rpc.v3.Group/UpdateGroup", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *groupClient) DeleteGroup(ctx context.Context, in *DeleteGroupRequest, opts ...grpc.CallOption) (*GroupResponse, error) { + out := new(GroupResponse) + err := c.cc.Invoke(ctx, "/rafay.dev.rpc.v3.Group/DeleteGroup", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// GroupServer is the server API for Group service. +// All implementations should embed UnimplementedGroupServer +// for forward compatibility +type GroupServer interface { + CreateGroup(context.Context, *v3.Group) (*v3.Group, error) + GetGroups(context.Context, *GetGroupsRequest) (*GetGroupsResponse, error) + GetGroup(context.Context, *GetGroupRequest) (*v3.Group, error) + UpdateGroup(context.Context, *PutGroupRequest) (*GroupResponse, error) + DeleteGroup(context.Context, *DeleteGroupRequest) (*GroupResponse, error) +} + +// UnimplementedGroupServer should be embedded to have forward compatible implementations. +type UnimplementedGroupServer struct { +} + +func (UnimplementedGroupServer) CreateGroup(context.Context, *v3.Group) (*v3.Group, error) { + return nil, status.Errorf(codes.Unimplemented, "method CreateGroup not implemented") +} +func (UnimplementedGroupServer) GetGroups(context.Context, *GetGroupsRequest) (*GetGroupsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetGroups not implemented") +} +func (UnimplementedGroupServer) GetGroup(context.Context, *GetGroupRequest) (*v3.Group, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetGroup not implemented") +} +func (UnimplementedGroupServer) UpdateGroup(context.Context, *PutGroupRequest) (*GroupResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method UpdateGroup not implemented") +} +func (UnimplementedGroupServer) DeleteGroup(context.Context, *DeleteGroupRequest) (*GroupResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method DeleteGroup not implemented") +} + +// UnsafeGroupServer may be embedded to opt out of forward compatibility for this service. +// Use of this interface is not recommended, as added methods to GroupServer will +// result in compilation errors. +type UnsafeGroupServer interface { + mustEmbedUnimplementedGroupServer() +} + +func RegisterGroupServer(s grpc.ServiceRegistrar, srv GroupServer) { + s.RegisterService(&Group_ServiceDesc, srv) +} + +func _Group_CreateGroup_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(v3.Group) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(GroupServer).CreateGroup(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/rafay.dev.rpc.v3.Group/CreateGroup", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(GroupServer).CreateGroup(ctx, req.(*v3.Group)) + } + return interceptor(ctx, in, info, handler) +} + +func _Group_GetGroups_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetGroupsRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(GroupServer).GetGroups(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/rafay.dev.rpc.v3.Group/GetGroups", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(GroupServer).GetGroups(ctx, req.(*GetGroupsRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Group_GetGroup_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetGroupRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(GroupServer).GetGroup(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/rafay.dev.rpc.v3.Group/GetGroup", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(GroupServer).GetGroup(ctx, req.(*GetGroupRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Group_UpdateGroup_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(PutGroupRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(GroupServer).UpdateGroup(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/rafay.dev.rpc.v3.Group/UpdateGroup", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(GroupServer).UpdateGroup(ctx, req.(*PutGroupRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Group_DeleteGroup_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(DeleteGroupRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(GroupServer).DeleteGroup(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/rafay.dev.rpc.v3.Group/DeleteGroup", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(GroupServer).DeleteGroup(ctx, req.(*DeleteGroupRequest)) + } + return interceptor(ctx, in, info, handler) +} + +// Group_ServiceDesc is the grpc.ServiceDesc for Group service. +// It's only intended for direct use with grpc.RegisterService, +// and not to be introspected or modified (even as a copy) +var Group_ServiceDesc = grpc.ServiceDesc{ + ServiceName: "rafay.dev.rpc.v3.Group", + HandlerType: (*GroupServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "CreateGroup", + Handler: _Group_CreateGroup_Handler, + }, + { + MethodName: "GetGroups", + Handler: _Group_GetGroups_Handler, + }, + { + MethodName: "GetGroup", + Handler: _Group_GetGroup_Handler, + }, + { + MethodName: "UpdateGroup", + Handler: _Group_UpdateGroup_Handler, + }, + { + MethodName: "DeleteGroup", + Handler: _Group_DeleteGroup_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "proto/rpc/v3/group.proto", +} diff --git a/components/usermgmt/proto/proto/rpc/v3/role.pb.go b/components/usermgmt/proto/proto/rpc/v3/role.pb.go new file mode 100644 index 0000000..6dc2be6 --- /dev/null +++ b/components/usermgmt/proto/proto/rpc/v3/role.pb.go @@ -0,0 +1,566 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.27.1 +// protoc v3.19.1 +// source: proto/rpc/v3/role.proto + +package rpcv3 + +import ( + v3 "github.com/RafaySystems/rcloud-base/components/usermgmt/proto/types/userpb/v3" + _ "github.com/gogo/protobuf/gogoproto" + _ "github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-openapiv2/options" + _ "google.golang.org/genproto/googleapis/api/annotations" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +type GetRolesRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *GetRolesRequest) Reset() { + *x = GetRolesRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_proto_rpc_v3_role_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetRolesRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetRolesRequest) ProtoMessage() {} + +func (x *GetRolesRequest) ProtoReflect() protoreflect.Message { + mi := &file_proto_rpc_v3_role_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetRolesRequest.ProtoReflect.Descriptor instead. +func (*GetRolesRequest) Descriptor() ([]byte, []int) { + return file_proto_rpc_v3_role_proto_rawDescGZIP(), []int{0} +} + +type GetRoleRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` +} + +func (x *GetRoleRequest) Reset() { + *x = GetRoleRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_proto_rpc_v3_role_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetRoleRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetRoleRequest) ProtoMessage() {} + +func (x *GetRoleRequest) ProtoReflect() protoreflect.Message { + mi := &file_proto_rpc_v3_role_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetRoleRequest.ProtoReflect.Descriptor instead. +func (*GetRoleRequest) Descriptor() ([]byte, []int) { + return file_proto_rpc_v3_role_proto_rawDescGZIP(), []int{1} +} + +func (x *GetRoleRequest) GetId() string { + if x != nil { + return x.Id + } + return "" +} + +type DeleteRoleRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` +} + +func (x *DeleteRoleRequest) Reset() { + *x = DeleteRoleRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_proto_rpc_v3_role_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *DeleteRoleRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DeleteRoleRequest) ProtoMessage() {} + +func (x *DeleteRoleRequest) ProtoReflect() protoreflect.Message { + mi := &file_proto_rpc_v3_role_proto_msgTypes[2] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use DeleteRoleRequest.ProtoReflect.Descriptor instead. +func (*DeleteRoleRequest) Descriptor() ([]byte, []int) { + return file_proto_rpc_v3_role_proto_rawDescGZIP(), []int{2} +} + +func (x *DeleteRoleRequest) GetId() string { + if x != nil { + return x.Id + } + return "" +} + +type PutRoleRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + Role *v3.Role `protobuf:"bytes,2,opt,name=role,proto3" json:"role,omitempty"` +} + +func (x *PutRoleRequest) Reset() { + *x = PutRoleRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_proto_rpc_v3_role_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *PutRoleRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PutRoleRequest) ProtoMessage() {} + +func (x *PutRoleRequest) ProtoReflect() protoreflect.Message { + mi := &file_proto_rpc_v3_role_proto_msgTypes[3] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PutRoleRequest.ProtoReflect.Descriptor instead. +func (*PutRoleRequest) Descriptor() ([]byte, []int) { + return file_proto_rpc_v3_role_proto_rawDescGZIP(), []int{3} +} + +func (x *PutRoleRequest) GetId() string { + if x != nil { + return x.Id + } + return "" +} + +func (x *PutRoleRequest) GetRole() *v3.Role { + if x != nil { + return x.Role + } + return nil +} + +type GetRolesResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Role []*v3.Role `protobuf:"bytes,1,rep,name=role,proto3" json:"role,omitempty"` +} + +func (x *GetRolesResponse) Reset() { + *x = GetRolesResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_proto_rpc_v3_role_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetRolesResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetRolesResponse) ProtoMessage() {} + +func (x *GetRolesResponse) ProtoReflect() protoreflect.Message { + mi := &file_proto_rpc_v3_role_proto_msgTypes[4] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetRolesResponse.ProtoReflect.Descriptor instead. +func (*GetRolesResponse) Descriptor() ([]byte, []int) { + return file_proto_rpc_v3_role_proto_rawDescGZIP(), []int{4} +} + +func (x *GetRolesResponse) GetRole() []*v3.Role { + if x != nil { + return x.Role + } + return nil +} + +type RoleResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Status string `protobuf:"bytes,1,opt,name=status,proto3" json:"status,omitempty"` + Message string `protobuf:"bytes,2,opt,name=message,proto3" json:"message,omitempty"` +} + +func (x *RoleResponse) Reset() { + *x = RoleResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_proto_rpc_v3_role_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *RoleResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*RoleResponse) ProtoMessage() {} + +func (x *RoleResponse) ProtoReflect() protoreflect.Message { + mi := &file_proto_rpc_v3_role_proto_msgTypes[5] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use RoleResponse.ProtoReflect.Descriptor instead. +func (*RoleResponse) Descriptor() ([]byte, []int) { + return file_proto_rpc_v3_role_proto_rawDescGZIP(), []int{5} +} + +func (x *RoleResponse) GetStatus() string { + if x != nil { + return x.Status + } + return "" +} + +func (x *RoleResponse) GetMessage() string { + if x != nil { + return x.Message + } + return "" +} + +var File_proto_rpc_v3_role_proto protoreflect.FileDescriptor + +var file_proto_rpc_v3_role_proto_rawDesc = []byte{ + 0x0a, 0x17, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x72, 0x70, 0x63, 0x2f, 0x76, 0x33, 0x2f, 0x72, + 0x6f, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x10, 0x72, 0x61, 0x66, 0x61, 0x79, + 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x72, 0x70, 0x63, 0x2e, 0x76, 0x33, 0x1a, 0x1c, 0x67, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x14, 0x67, 0x6f, 0x67, 0x6f, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x6f, 0x67, 0x6f, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x2d, 0x67, 0x65, 0x6e, 0x2d, 0x6f, 0x70, 0x65, 0x6e, + 0x61, 0x70, 0x69, 0x76, 0x32, 0x2f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x61, 0x6e, + 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, + 0x20, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2f, 0x75, 0x73, 0x65, + 0x72, 0x70, 0x62, 0x2f, 0x76, 0x33, 0x2f, 0x72, 0x6f, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x22, 0x11, 0x0a, 0x0f, 0x47, 0x65, 0x74, 0x52, 0x6f, 0x6c, 0x65, 0x73, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x22, 0x20, 0x0a, 0x0e, 0x47, 0x65, 0x74, 0x52, 0x6f, 0x6c, 0x65, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x22, 0x23, 0x0a, 0x11, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, + 0x52, 0x6f, 0x6c, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, + 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x22, 0x53, 0x0a, 0x0e, 0x50, + 0x75, 0x74, 0x52, 0x6f, 0x6c, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x0e, 0x0a, + 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x31, 0x0a, + 0x04, 0x72, 0x6f, 0x6c, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x72, 0x61, + 0x66, 0x61, 0x79, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x75, 0x73, + 0x65, 0x72, 0x2e, 0x76, 0x33, 0x2e, 0x52, 0x6f, 0x6c, 0x65, 0x52, 0x04, 0x72, 0x6f, 0x6c, 0x65, + 0x22, 0x45, 0x0a, 0x10, 0x47, 0x65, 0x74, 0x52, 0x6f, 0x6c, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x31, 0x0a, 0x04, 0x72, 0x6f, 0x6c, 0x65, 0x18, 0x01, 0x20, 0x03, + 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x72, 0x61, 0x66, 0x61, 0x79, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x74, + 0x79, 0x70, 0x65, 0x73, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x2e, 0x52, 0x6f, 0x6c, + 0x65, 0x52, 0x04, 0x72, 0x6f, 0x6c, 0x65, 0x22, 0x40, 0x0a, 0x0c, 0x52, 0x6f, 0x6c, 0x65, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, + 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, + 0x18, 0x0a, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x32, 0xdb, 0x04, 0x0a, 0x04, 0x52, 0x6f, + 0x6c, 0x65, 0x12, 0x9e, 0x01, 0x0a, 0x0a, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x52, 0x6f, 0x6c, + 0x65, 0x12, 0x1d, 0x2e, 0x72, 0x61, 0x66, 0x61, 0x79, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x74, 0x79, + 0x70, 0x65, 0x73, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x2e, 0x52, 0x6f, 0x6c, 0x65, + 0x1a, 0x1d, 0x2e, 0x72, 0x61, 0x66, 0x61, 0x79, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x74, 0x79, 0x70, + 0x65, 0x73, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x2e, 0x52, 0x6f, 0x6c, 0x65, 0x22, + 0x52, 0x92, 0x41, 0x36, 0x4a, 0x34, 0x0a, 0x03, 0x32, 0x30, 0x31, 0x12, 0x2d, 0x0a, 0x2b, 0x52, + 0x65, 0x74, 0x75, 0x72, 0x6e, 0x65, 0x64, 0x20, 0x77, 0x68, 0x65, 0x6e, 0x20, 0x72, 0x6f, 0x6c, + 0x65, 0x20, 0x69, 0x73, 0x20, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x20, 0x73, 0x75, 0x63, + 0x63, 0x65, 0x73, 0x73, 0x66, 0x75, 0x6c, 0x6c, 0x79, 0x2e, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x13, + 0x22, 0x0e, 0x2f, 0x61, 0x75, 0x74, 0x68, 0x2f, 0x76, 0x33, 0x2f, 0x72, 0x6f, 0x6c, 0x65, 0x73, + 0x3a, 0x01, 0x2a, 0x12, 0x69, 0x0a, 0x08, 0x47, 0x65, 0x74, 0x52, 0x6f, 0x6c, 0x65, 0x73, 0x12, + 0x21, 0x2e, 0x72, 0x61, 0x66, 0x61, 0x79, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x72, 0x70, 0x63, 0x2e, + 0x76, 0x33, 0x2e, 0x47, 0x65, 0x74, 0x52, 0x6f, 0x6c, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x1a, 0x22, 0x2e, 0x72, 0x61, 0x66, 0x61, 0x79, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x72, + 0x70, 0x63, 0x2e, 0x76, 0x33, 0x2e, 0x47, 0x65, 0x74, 0x52, 0x6f, 0x6c, 0x65, 0x73, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x16, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x10, 0x12, 0x0e, + 0x2f, 0x61, 0x75, 0x74, 0x68, 0x2f, 0x76, 0x33, 0x2f, 0x72, 0x6f, 0x6c, 0x65, 0x73, 0x12, 0x66, + 0x0a, 0x07, 0x47, 0x65, 0x74, 0x52, 0x6f, 0x6c, 0x65, 0x12, 0x20, 0x2e, 0x72, 0x61, 0x66, 0x61, + 0x79, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x72, 0x70, 0x63, 0x2e, 0x76, 0x33, 0x2e, 0x47, 0x65, 0x74, + 0x52, 0x6f, 0x6c, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1d, 0x2e, 0x72, 0x61, + 0x66, 0x61, 0x79, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x75, 0x73, + 0x65, 0x72, 0x2e, 0x76, 0x33, 0x2e, 0x52, 0x6f, 0x6c, 0x65, 0x22, 0x1a, 0x82, 0xd3, 0xe4, 0x93, + 0x02, 0x14, 0x12, 0x12, 0x2f, 0x61, 0x75, 0x74, 0x68, 0x2f, 0x76, 0x33, 0x2f, 0x72, 0x6f, 0x6c, + 0x65, 0x2f, 0x7b, 0x69, 0x64, 0x7d, 0x12, 0x70, 0x0a, 0x0a, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, + 0x52, 0x6f, 0x6c, 0x65, 0x12, 0x20, 0x2e, 0x72, 0x61, 0x66, 0x61, 0x79, 0x2e, 0x64, 0x65, 0x76, + 0x2e, 0x72, 0x70, 0x63, 0x2e, 0x76, 0x33, 0x2e, 0x50, 0x75, 0x74, 0x52, 0x6f, 0x6c, 0x65, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1e, 0x2e, 0x72, 0x61, 0x66, 0x61, 0x79, 0x2e, 0x64, + 0x65, 0x76, 0x2e, 0x72, 0x70, 0x63, 0x2e, 0x76, 0x33, 0x2e, 0x52, 0x6f, 0x6c, 0x65, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x20, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1a, 0x1a, 0x12, + 0x2f, 0x61, 0x75, 0x74, 0x68, 0x2f, 0x76, 0x33, 0x2f, 0x72, 0x6f, 0x6c, 0x65, 0x2f, 0x7b, 0x69, + 0x64, 0x7d, 0x3a, 0x04, 0x72, 0x6f, 0x6c, 0x65, 0x12, 0x6d, 0x0a, 0x0a, 0x44, 0x65, 0x6c, 0x65, + 0x74, 0x65, 0x52, 0x6f, 0x6c, 0x65, 0x12, 0x23, 0x2e, 0x72, 0x61, 0x66, 0x61, 0x79, 0x2e, 0x64, + 0x65, 0x76, 0x2e, 0x72, 0x70, 0x63, 0x2e, 0x76, 0x33, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, + 0x52, 0x6f, 0x6c, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1e, 0x2e, 0x72, 0x61, + 0x66, 0x61, 0x79, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x72, 0x70, 0x63, 0x2e, 0x76, 0x33, 0x2e, 0x52, + 0x6f, 0x6c, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x1a, 0x82, 0xd3, 0xe4, + 0x93, 0x02, 0x14, 0x2a, 0x12, 0x2f, 0x61, 0x75, 0x74, 0x68, 0x2f, 0x76, 0x33, 0x2f, 0x72, 0x6f, + 0x6c, 0x65, 0x2f, 0x7b, 0x69, 0x64, 0x7d, 0x42, 0xca, 0x04, 0x0a, 0x14, 0x63, 0x6f, 0x6d, 0x2e, + 0x72, 0x61, 0x66, 0x61, 0x79, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x72, 0x70, 0x63, 0x2e, 0x76, 0x33, + 0x42, 0x09, 0x52, 0x6f, 0x6c, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x4a, 0x67, + 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x52, 0x61, 0x66, 0x61, 0x79, 0x53, + 0x79, 0x73, 0x74, 0x65, 0x6d, 0x73, 0x2f, 0x72, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2d, 0x62, 0x61, + 0x73, 0x65, 0x2f, 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x73, 0x2f, 0x75, 0x73, + 0x65, 0x72, 0x6d, 0x67, 0x6d, 0x74, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x72, 0x70, 0x63, + 0x2f, 0x76, 0x33, 0x3b, 0x72, 0x70, 0x63, 0x76, 0x33, 0xa2, 0x02, 0x03, 0x52, 0x44, 0x52, 0xaa, + 0x02, 0x10, 0x52, 0x61, 0x66, 0x61, 0x79, 0x2e, 0x44, 0x65, 0x76, 0x2e, 0x52, 0x70, 0x63, 0x2e, + 0x56, 0x33, 0xca, 0x02, 0x10, 0x52, 0x61, 0x66, 0x61, 0x79, 0x5c, 0x44, 0x65, 0x76, 0x5c, 0x52, + 0x70, 0x63, 0x5c, 0x56, 0x33, 0xe2, 0x02, 0x1c, 0x52, 0x61, 0x66, 0x61, 0x79, 0x5c, 0x44, 0x65, + 0x76, 0x5c, 0x52, 0x70, 0x63, 0x5c, 0x56, 0x33, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, + 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x13, 0x52, 0x61, 0x66, 0x61, 0x79, 0x3a, 0x3a, 0x44, 0x65, + 0x76, 0x3a, 0x3a, 0x52, 0x70, 0x63, 0x3a, 0x3a, 0x56, 0x33, 0x92, 0x41, 0xe2, 0x02, 0x12, 0x2b, + 0x0a, 0x17, 0x52, 0x6f, 0x6c, 0x65, 0x20, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x6d, 0x65, 0x6e, + 0x74, 0x20, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x22, 0x0b, 0x0a, 0x09, 0x52, 0x61, 0x66, + 0x61, 0x79, 0x20, 0x44, 0x65, 0x76, 0x32, 0x03, 0x32, 0x2e, 0x30, 0x2a, 0x01, 0x02, 0x32, 0x10, + 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x6a, 0x73, 0x6f, 0x6e, + 0x32, 0x10, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x79, 0x61, + 0x6d, 0x6c, 0x3a, 0x10, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, + 0x6a, 0x73, 0x6f, 0x6e, 0x3a, 0x10, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x2f, 0x79, 0x61, 0x6d, 0x6c, 0x52, 0x50, 0x0a, 0x03, 0x34, 0x30, 0x33, 0x12, 0x49, 0x0a, + 0x47, 0x52, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x65, 0x64, 0x20, 0x77, 0x68, 0x65, 0x6e, 0x20, 0x74, + 0x68, 0x65, 0x20, 0x72, 0x6f, 0x6c, 0x65, 0x20, 0x64, 0x6f, 0x65, 0x73, 0x20, 0x6e, 0x6f, 0x74, + 0x20, 0x68, 0x61, 0x76, 0x65, 0x20, 0x70, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, + 0x20, 0x74, 0x6f, 0x20, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x20, 0x74, 0x68, 0x65, 0x20, 0x72, + 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x2e, 0x52, 0x3b, 0x0a, 0x03, 0x34, 0x30, 0x34, 0x12, + 0x34, 0x0a, 0x2a, 0x52, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x65, 0x64, 0x20, 0x77, 0x68, 0x65, 0x6e, + 0x20, 0x74, 0x68, 0x65, 0x20, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x20, 0x64, 0x6f, + 0x65, 0x73, 0x20, 0x6e, 0x6f, 0x74, 0x20, 0x65, 0x78, 0x69, 0x73, 0x74, 0x2e, 0x12, 0x06, 0x0a, + 0x04, 0x9a, 0x02, 0x01, 0x07, 0x5a, 0x38, 0x0a, 0x25, 0x0a, 0x0a, 0x41, 0x70, 0x69, 0x4b, 0x65, + 0x79, 0x41, 0x75, 0x74, 0x68, 0x12, 0x17, 0x08, 0x02, 0x1a, 0x11, 0x58, 0x2d, 0x52, 0x41, 0x46, + 0x41, 0x59, 0x2d, 0x41, 0x50, 0x49, 0x2d, 0x4b, 0x45, 0x59, 0x49, 0x44, 0x20, 0x02, 0x0a, 0x0f, + 0x0a, 0x09, 0x42, 0x61, 0x73, 0x69, 0x63, 0x41, 0x75, 0x74, 0x68, 0x12, 0x02, 0x08, 0x01, 0x62, + 0x1f, 0x0a, 0x0e, 0x0a, 0x0a, 0x41, 0x70, 0x69, 0x4b, 0x65, 0x79, 0x41, 0x75, 0x74, 0x68, 0x12, + 0x00, 0x0a, 0x0d, 0x0a, 0x09, 0x42, 0x61, 0x73, 0x69, 0x63, 0x41, 0x75, 0x74, 0x68, 0x12, 0x00, + 0xc8, 0xe2, 0x1e, 0x01, 0xd0, 0xe2, 0x1e, 0x01, 0xe0, 0xe2, 0x1e, 0x01, 0xc0, 0xe3, 0x1e, 0x01, + 0xc8, 0xe3, 0x1e, 0x01, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_proto_rpc_v3_role_proto_rawDescOnce sync.Once + file_proto_rpc_v3_role_proto_rawDescData = file_proto_rpc_v3_role_proto_rawDesc +) + +func file_proto_rpc_v3_role_proto_rawDescGZIP() []byte { + file_proto_rpc_v3_role_proto_rawDescOnce.Do(func() { + file_proto_rpc_v3_role_proto_rawDescData = protoimpl.X.CompressGZIP(file_proto_rpc_v3_role_proto_rawDescData) + }) + return file_proto_rpc_v3_role_proto_rawDescData +} + +var file_proto_rpc_v3_role_proto_msgTypes = make([]protoimpl.MessageInfo, 6) +var file_proto_rpc_v3_role_proto_goTypes = []interface{}{ + (*GetRolesRequest)(nil), // 0: rafay.dev.rpc.v3.GetRolesRequest + (*GetRoleRequest)(nil), // 1: rafay.dev.rpc.v3.GetRoleRequest + (*DeleteRoleRequest)(nil), // 2: rafay.dev.rpc.v3.DeleteRoleRequest + (*PutRoleRequest)(nil), // 3: rafay.dev.rpc.v3.PutRoleRequest + (*GetRolesResponse)(nil), // 4: rafay.dev.rpc.v3.GetRolesResponse + (*RoleResponse)(nil), // 5: rafay.dev.rpc.v3.RoleResponse + (*v3.Role)(nil), // 6: rafay.dev.types.user.v3.Role +} +var file_proto_rpc_v3_role_proto_depIdxs = []int32{ + 6, // 0: rafay.dev.rpc.v3.PutRoleRequest.role:type_name -> rafay.dev.types.user.v3.Role + 6, // 1: rafay.dev.rpc.v3.GetRolesResponse.role:type_name -> rafay.dev.types.user.v3.Role + 6, // 2: rafay.dev.rpc.v3.Role.CreateRole:input_type -> rafay.dev.types.user.v3.Role + 0, // 3: rafay.dev.rpc.v3.Role.GetRoles:input_type -> rafay.dev.rpc.v3.GetRolesRequest + 1, // 4: rafay.dev.rpc.v3.Role.GetRole:input_type -> rafay.dev.rpc.v3.GetRoleRequest + 3, // 5: rafay.dev.rpc.v3.Role.UpdateRole:input_type -> rafay.dev.rpc.v3.PutRoleRequest + 2, // 6: rafay.dev.rpc.v3.Role.DeleteRole:input_type -> rafay.dev.rpc.v3.DeleteRoleRequest + 6, // 7: rafay.dev.rpc.v3.Role.CreateRole:output_type -> rafay.dev.types.user.v3.Role + 4, // 8: rafay.dev.rpc.v3.Role.GetRoles:output_type -> rafay.dev.rpc.v3.GetRolesResponse + 6, // 9: rafay.dev.rpc.v3.Role.GetRole:output_type -> rafay.dev.types.user.v3.Role + 5, // 10: rafay.dev.rpc.v3.Role.UpdateRole:output_type -> rafay.dev.rpc.v3.RoleResponse + 5, // 11: rafay.dev.rpc.v3.Role.DeleteRole:output_type -> rafay.dev.rpc.v3.RoleResponse + 7, // [7:12] is the sub-list for method output_type + 2, // [2:7] is the sub-list for method input_type + 2, // [2:2] is the sub-list for extension type_name + 2, // [2:2] is the sub-list for extension extendee + 0, // [0:2] is the sub-list for field type_name +} + +func init() { file_proto_rpc_v3_role_proto_init() } +func file_proto_rpc_v3_role_proto_init() { + if File_proto_rpc_v3_role_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_proto_rpc_v3_role_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetRolesRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_rpc_v3_role_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetRoleRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_rpc_v3_role_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*DeleteRoleRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_rpc_v3_role_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*PutRoleRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_rpc_v3_role_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetRolesResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_rpc_v3_role_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*RoleResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_proto_rpc_v3_role_proto_rawDesc, + NumEnums: 0, + NumMessages: 6, + NumExtensions: 0, + NumServices: 1, + }, + GoTypes: file_proto_rpc_v3_role_proto_goTypes, + DependencyIndexes: file_proto_rpc_v3_role_proto_depIdxs, + MessageInfos: file_proto_rpc_v3_role_proto_msgTypes, + }.Build() + File_proto_rpc_v3_role_proto = out.File + file_proto_rpc_v3_role_proto_rawDesc = nil + file_proto_rpc_v3_role_proto_goTypes = nil + file_proto_rpc_v3_role_proto_depIdxs = nil +} diff --git a/components/usermgmt/proto/proto/rpc/v3/role.pb.gw.go b/components/usermgmt/proto/proto/rpc/v3/role.pb.gw.go new file mode 100644 index 0000000..1542881 --- /dev/null +++ b/components/usermgmt/proto/proto/rpc/v3/role.pb.gw.go @@ -0,0 +1,546 @@ +// Code generated by protoc-gen-grpc-gateway. DO NOT EDIT. +// source: proto/rpc/v3/role.proto + +/* +Package rpcv3 is a reverse proxy. + +It translates gRPC into RESTful JSON APIs. +*/ +package rpcv3 + +import ( + "context" + "io" + "net/http" + + "github.com/RafaySystems/rcloud-base/components/usermgmt/proto/types/userpb/v3" + "github.com/grpc-ecosystem/grpc-gateway/v2/runtime" + "github.com/grpc-ecosystem/grpc-gateway/v2/utilities" + "google.golang.org/grpc" + "google.golang.org/grpc/codes" + "google.golang.org/grpc/grpclog" + "google.golang.org/grpc/metadata" + "google.golang.org/grpc/status" + "google.golang.org/protobuf/proto" +) + +// Suppress "imported and not used" errors +var _ codes.Code +var _ io.Reader +var _ status.Status +var _ = runtime.String +var _ = utilities.NewDoubleArray +var _ = metadata.Join + +func request_Role_CreateRole_0(ctx context.Context, marshaler runtime.Marshaler, client RoleClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq userv3.Role + var metadata runtime.ServerMetadata + + newReader, berr := utilities.IOReaderFactory(req.Body) + if berr != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) + } + if err := marshaler.NewDecoder(newReader()).Decode(&protoReq); err != nil && err != io.EOF { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := client.CreateRole(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_Role_CreateRole_0(ctx context.Context, marshaler runtime.Marshaler, server RoleServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq userv3.Role + var metadata runtime.ServerMetadata + + newReader, berr := utilities.IOReaderFactory(req.Body) + if berr != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) + } + if err := marshaler.NewDecoder(newReader()).Decode(&protoReq); err != nil && err != io.EOF { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := server.CreateRole(ctx, &protoReq) + return msg, metadata, err + +} + +func request_Role_GetRoles_0(ctx context.Context, marshaler runtime.Marshaler, client RoleClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq GetRolesRequest + var metadata runtime.ServerMetadata + + msg, err := client.GetRoles(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_Role_GetRoles_0(ctx context.Context, marshaler runtime.Marshaler, server RoleServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq GetRolesRequest + var metadata runtime.ServerMetadata + + msg, err := server.GetRoles(ctx, &protoReq) + return msg, metadata, err + +} + +func request_Role_GetRole_0(ctx context.Context, marshaler runtime.Marshaler, client RoleClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq GetRoleRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["id"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "id") + } + + protoReq.Id, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "id", err) + } + + msg, err := client.GetRole(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_Role_GetRole_0(ctx context.Context, marshaler runtime.Marshaler, server RoleServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq GetRoleRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["id"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "id") + } + + protoReq.Id, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "id", err) + } + + msg, err := server.GetRole(ctx, &protoReq) + return msg, metadata, err + +} + +func request_Role_UpdateRole_0(ctx context.Context, marshaler runtime.Marshaler, client RoleClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq PutRoleRequest + var metadata runtime.ServerMetadata + + newReader, berr := utilities.IOReaderFactory(req.Body) + if berr != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) + } + if err := marshaler.NewDecoder(newReader()).Decode(&protoReq.Role); err != nil && err != io.EOF { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["id"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "id") + } + + protoReq.Id, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "id", err) + } + + msg, err := client.UpdateRole(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_Role_UpdateRole_0(ctx context.Context, marshaler runtime.Marshaler, server RoleServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq PutRoleRequest + var metadata runtime.ServerMetadata + + newReader, berr := utilities.IOReaderFactory(req.Body) + if berr != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) + } + if err := marshaler.NewDecoder(newReader()).Decode(&protoReq.Role); err != nil && err != io.EOF { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["id"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "id") + } + + protoReq.Id, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "id", err) + } + + msg, err := server.UpdateRole(ctx, &protoReq) + return msg, metadata, err + +} + +func request_Role_DeleteRole_0(ctx context.Context, marshaler runtime.Marshaler, client RoleClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq DeleteRoleRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["id"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "id") + } + + protoReq.Id, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "id", err) + } + + msg, err := client.DeleteRole(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_Role_DeleteRole_0(ctx context.Context, marshaler runtime.Marshaler, server RoleServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq DeleteRoleRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["id"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "id") + } + + protoReq.Id, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "id", err) + } + + msg, err := server.DeleteRole(ctx, &protoReq) + return msg, metadata, err + +} + +// RegisterRoleHandlerServer registers the http handlers for service Role to "mux". +// UnaryRPC :call RoleServer directly. +// StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. +// Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterRoleHandlerFromEndpoint instead. +func RegisterRoleHandlerServer(ctx context.Context, mux *runtime.ServeMux, server RoleServer) error { + + mux.Handle("POST", pattern_Role_CreateRole_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/rafay.dev.rpc.v3.Role/CreateRole", runtime.WithHTTPPathPattern("/auth/v3/roles")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_Role_CreateRole_0(rctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Role_CreateRole_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_Role_GetRoles_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/rafay.dev.rpc.v3.Role/GetRoles", runtime.WithHTTPPathPattern("/auth/v3/roles")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_Role_GetRoles_0(rctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Role_GetRoles_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_Role_GetRole_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/rafay.dev.rpc.v3.Role/GetRole", runtime.WithHTTPPathPattern("/auth/v3/role/{id}")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_Role_GetRole_0(rctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Role_GetRole_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("PUT", pattern_Role_UpdateRole_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/rafay.dev.rpc.v3.Role/UpdateRole", runtime.WithHTTPPathPattern("/auth/v3/role/{id}")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_Role_UpdateRole_0(rctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Role_UpdateRole_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("DELETE", pattern_Role_DeleteRole_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/rafay.dev.rpc.v3.Role/DeleteRole", runtime.WithHTTPPathPattern("/auth/v3/role/{id}")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_Role_DeleteRole_0(rctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Role_DeleteRole_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + return nil +} + +// RegisterRoleHandlerFromEndpoint is same as RegisterRoleHandler but +// automatically dials to "endpoint" and closes the connection when "ctx" gets done. +func RegisterRoleHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error) { + conn, err := grpc.Dial(endpoint, opts...) + if err != nil { + return err + } + defer func() { + if err != nil { + if cerr := conn.Close(); cerr != nil { + grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr) + } + return + } + go func() { + <-ctx.Done() + if cerr := conn.Close(); cerr != nil { + grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr) + } + }() + }() + + return RegisterRoleHandler(ctx, mux, conn) +} + +// RegisterRoleHandler registers the http handlers for service Role to "mux". +// The handlers forward requests to the grpc endpoint over "conn". +func RegisterRoleHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error { + return RegisterRoleHandlerClient(ctx, mux, NewRoleClient(conn)) +} + +// RegisterRoleHandlerClient registers the http handlers for service Role +// to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "RoleClient". +// Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "RoleClient" +// doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in +// "RoleClient" to call the correct interceptors. +func RegisterRoleHandlerClient(ctx context.Context, mux *runtime.ServeMux, client RoleClient) error { + + mux.Handle("POST", pattern_Role_CreateRole_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateContext(ctx, mux, req, "/rafay.dev.rpc.v3.Role/CreateRole", runtime.WithHTTPPathPattern("/auth/v3/roles")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_Role_CreateRole_0(rctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Role_CreateRole_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_Role_GetRoles_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateContext(ctx, mux, req, "/rafay.dev.rpc.v3.Role/GetRoles", runtime.WithHTTPPathPattern("/auth/v3/roles")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_Role_GetRoles_0(rctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Role_GetRoles_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_Role_GetRole_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateContext(ctx, mux, req, "/rafay.dev.rpc.v3.Role/GetRole", runtime.WithHTTPPathPattern("/auth/v3/role/{id}")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_Role_GetRole_0(rctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Role_GetRole_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("PUT", pattern_Role_UpdateRole_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateContext(ctx, mux, req, "/rafay.dev.rpc.v3.Role/UpdateRole", runtime.WithHTTPPathPattern("/auth/v3/role/{id}")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_Role_UpdateRole_0(rctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Role_UpdateRole_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("DELETE", pattern_Role_DeleteRole_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateContext(ctx, mux, req, "/rafay.dev.rpc.v3.Role/DeleteRole", runtime.WithHTTPPathPattern("/auth/v3/role/{id}")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_Role_DeleteRole_0(rctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Role_DeleteRole_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + return nil +} + +var ( + pattern_Role_CreateRole_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"auth", "v3", "roles"}, "")) + + pattern_Role_GetRoles_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"auth", "v3", "roles"}, "")) + + pattern_Role_GetRole_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3}, []string{"auth", "v3", "role", "id"}, "")) + + pattern_Role_UpdateRole_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3}, []string{"auth", "v3", "role", "id"}, "")) + + pattern_Role_DeleteRole_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3}, []string{"auth", "v3", "role", "id"}, "")) +) + +var ( + forward_Role_CreateRole_0 = runtime.ForwardResponseMessage + + forward_Role_GetRoles_0 = runtime.ForwardResponseMessage + + forward_Role_GetRole_0 = runtime.ForwardResponseMessage + + forward_Role_UpdateRole_0 = runtime.ForwardResponseMessage + + forward_Role_DeleteRole_0 = runtime.ForwardResponseMessage +) diff --git a/components/usermgmt/proto/proto/rpc/v3/role.proto b/components/usermgmt/proto/proto/rpc/v3/role.proto new file mode 100644 index 0000000..27063ed --- /dev/null +++ b/components/usermgmt/proto/proto/rpc/v3/role.proto @@ -0,0 +1,120 @@ +syntax = "proto3"; +package rafay.dev.rpc.v3; + +import "google/api/annotations.proto"; +import "gogoproto/gogo.proto"; +import "protoc-gen-openapiv2/options/annotations.proto"; +import "proto/types/userpb/v3/role.proto"; + +// Enable custom Marshal method. +option (gogoproto.marshaler_all) = true; +// Enable custom Unmarshal method. +option (gogoproto.unmarshaler_all) = true; +// Enable custom Size method (Required by Marshal and Unmarshal). +option (gogoproto.sizer_all) = true; +// Enable registration with golang/protobuf for the grpc-gateway. +option (gogoproto.goproto_registration) = true; +// Enable generation of XXX_MessageName methods for grpc-go/status. +option (gogoproto.messagename_all) = true; + +option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_swagger) = { + info : { + title : "Role management Service" + version : "2.0" + contact : {name : "Rafay Dev"} + } + schemes : HTTPS + consumes : "application/json" + consumes : "application/yaml" + produces : "application/json" + produces : "application/yaml" + security_definitions : { + security : { + key : "BasicAuth" + value : {type : TYPE_BASIC} + } + security : { + key : "ApiKeyAuth" + value : {type : TYPE_API_KEY in : IN_HEADER name : "X-RAFAY-API-KEYID"} + } + } + security : { + security_requirement : { + key : "BasicAuth" + value : {} + } + security_requirement : { + key : "ApiKeyAuth" + value : {} + } + } + responses : { + key : "403" + value : { + description : "Returned when the role does not have permission to access " + "the resource." + } + } + responses : { + key : "404" + value : { + description : "Returned when the resource does not exist." + schema : {json_schema : {type : STRING}} + } + } +}; + +message GetRolesRequest {} +message GetRoleRequest { string id = 1; } +message DeleteRoleRequest { string id = 1; } +message PutRoleRequest { + string id = 1; + rafay.dev.types.user.v3.Role role = 2; +} +message GetRolesResponse { repeated rafay.dev.types.user.v3.Role role = 1; } +message RoleResponse { + string status = 1; + string message = 2; +} + +service Role { + rpc CreateRole(rafay.dev.types.user.v3.Role) + returns (rafay.dev.types.user.v3.Role) { + option (google.api.http) = { + post : "/auth/v3/roles" + body : "*" + }; + + option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation) = { + responses : { + key : "201" + value : {description : "Returned when role is created successfully."} + } + }; + }; + + rpc GetRoles(GetRolesRequest) returns (GetRolesResponse) { + option (google.api.http) = { + get : "/auth/v3/roles" + }; + }; + + rpc GetRole(GetRoleRequest) returns (rafay.dev.types.user.v3.Role) { + option (google.api.http) = { + get : "/auth/v3/role/{id}" + }; + }; + + rpc UpdateRole(PutRoleRequest) returns (RoleResponse) { + option (google.api.http) = { + put : "/auth/v3/role/{id}" + body : "role" + }; + }; + + rpc DeleteRole(DeleteRoleRequest) returns (RoleResponse) { + option (google.api.http) = { + delete : "/auth/v3/role/{id}" + }; + }; +} \ No newline at end of file diff --git a/components/usermgmt/proto/proto/rpc/v3/role_grpc.pb.go b/components/usermgmt/proto/proto/rpc/v3/role_grpc.pb.go new file mode 100644 index 0000000..470f2e0 --- /dev/null +++ b/components/usermgmt/proto/proto/rpc/v3/role_grpc.pb.go @@ -0,0 +1,248 @@ +// Code generated by protoc-gen-go-grpc. DO NOT EDIT. +// versions: +// - protoc-gen-go-grpc v1.2.0 +// - protoc v3.19.1 +// source: proto/rpc/v3/role.proto + +package rpcv3 + +import ( + context "context" + v3 "github.com/RafaySystems/rcloud-base/components/usermgmt/proto/types/userpb/v3" + grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" +) + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +// Requires gRPC-Go v1.32.0 or later. +const _ = grpc.SupportPackageIsVersion7 + +// RoleClient is the client API for Role service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. +type RoleClient interface { + CreateRole(ctx context.Context, in *v3.Role, opts ...grpc.CallOption) (*v3.Role, error) + GetRoles(ctx context.Context, in *GetRolesRequest, opts ...grpc.CallOption) (*GetRolesResponse, error) + GetRole(ctx context.Context, in *GetRoleRequest, opts ...grpc.CallOption) (*v3.Role, error) + UpdateRole(ctx context.Context, in *PutRoleRequest, opts ...grpc.CallOption) (*RoleResponse, error) + DeleteRole(ctx context.Context, in *DeleteRoleRequest, opts ...grpc.CallOption) (*RoleResponse, error) +} + +type roleClient struct { + cc grpc.ClientConnInterface +} + +func NewRoleClient(cc grpc.ClientConnInterface) RoleClient { + return &roleClient{cc} +} + +func (c *roleClient) CreateRole(ctx context.Context, in *v3.Role, opts ...grpc.CallOption) (*v3.Role, error) { + out := new(v3.Role) + err := c.cc.Invoke(ctx, "/rafay.dev.rpc.v3.Role/CreateRole", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *roleClient) GetRoles(ctx context.Context, in *GetRolesRequest, opts ...grpc.CallOption) (*GetRolesResponse, error) { + out := new(GetRolesResponse) + err := c.cc.Invoke(ctx, "/rafay.dev.rpc.v3.Role/GetRoles", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *roleClient) GetRole(ctx context.Context, in *GetRoleRequest, opts ...grpc.CallOption) (*v3.Role, error) { + out := new(v3.Role) + err := c.cc.Invoke(ctx, "/rafay.dev.rpc.v3.Role/GetRole", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *roleClient) UpdateRole(ctx context.Context, in *PutRoleRequest, opts ...grpc.CallOption) (*RoleResponse, error) { + out := new(RoleResponse) + err := c.cc.Invoke(ctx, "/rafay.dev.rpc.v3.Role/UpdateRole", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *roleClient) DeleteRole(ctx context.Context, in *DeleteRoleRequest, opts ...grpc.CallOption) (*RoleResponse, error) { + out := new(RoleResponse) + err := c.cc.Invoke(ctx, "/rafay.dev.rpc.v3.Role/DeleteRole", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// RoleServer is the server API for Role service. +// All implementations should embed UnimplementedRoleServer +// for forward compatibility +type RoleServer interface { + CreateRole(context.Context, *v3.Role) (*v3.Role, error) + GetRoles(context.Context, *GetRolesRequest) (*GetRolesResponse, error) + GetRole(context.Context, *GetRoleRequest) (*v3.Role, error) + UpdateRole(context.Context, *PutRoleRequest) (*RoleResponse, error) + DeleteRole(context.Context, *DeleteRoleRequest) (*RoleResponse, error) +} + +// UnimplementedRoleServer should be embedded to have forward compatible implementations. +type UnimplementedRoleServer struct { +} + +func (UnimplementedRoleServer) CreateRole(context.Context, *v3.Role) (*v3.Role, error) { + return nil, status.Errorf(codes.Unimplemented, "method CreateRole not implemented") +} +func (UnimplementedRoleServer) GetRoles(context.Context, *GetRolesRequest) (*GetRolesResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetRoles not implemented") +} +func (UnimplementedRoleServer) GetRole(context.Context, *GetRoleRequest) (*v3.Role, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetRole not implemented") +} +func (UnimplementedRoleServer) UpdateRole(context.Context, *PutRoleRequest) (*RoleResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method UpdateRole not implemented") +} +func (UnimplementedRoleServer) DeleteRole(context.Context, *DeleteRoleRequest) (*RoleResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method DeleteRole not implemented") +} + +// UnsafeRoleServer may be embedded to opt out of forward compatibility for this service. +// Use of this interface is not recommended, as added methods to RoleServer will +// result in compilation errors. +type UnsafeRoleServer interface { + mustEmbedUnimplementedRoleServer() +} + +func RegisterRoleServer(s grpc.ServiceRegistrar, srv RoleServer) { + s.RegisterService(&Role_ServiceDesc, srv) +} + +func _Role_CreateRole_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(v3.Role) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(RoleServer).CreateRole(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/rafay.dev.rpc.v3.Role/CreateRole", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(RoleServer).CreateRole(ctx, req.(*v3.Role)) + } + return interceptor(ctx, in, info, handler) +} + +func _Role_GetRoles_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetRolesRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(RoleServer).GetRoles(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/rafay.dev.rpc.v3.Role/GetRoles", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(RoleServer).GetRoles(ctx, req.(*GetRolesRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Role_GetRole_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetRoleRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(RoleServer).GetRole(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/rafay.dev.rpc.v3.Role/GetRole", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(RoleServer).GetRole(ctx, req.(*GetRoleRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Role_UpdateRole_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(PutRoleRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(RoleServer).UpdateRole(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/rafay.dev.rpc.v3.Role/UpdateRole", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(RoleServer).UpdateRole(ctx, req.(*PutRoleRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Role_DeleteRole_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(DeleteRoleRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(RoleServer).DeleteRole(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/rafay.dev.rpc.v3.Role/DeleteRole", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(RoleServer).DeleteRole(ctx, req.(*DeleteRoleRequest)) + } + return interceptor(ctx, in, info, handler) +} + +// Role_ServiceDesc is the grpc.ServiceDesc for Role service. +// It's only intended for direct use with grpc.RegisterService, +// and not to be introspected or modified (even as a copy) +var Role_ServiceDesc = grpc.ServiceDesc{ + ServiceName: "rafay.dev.rpc.v3.Role", + HandlerType: (*RoleServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "CreateRole", + Handler: _Role_CreateRole_Handler, + }, + { + MethodName: "GetRoles", + Handler: _Role_GetRoles_Handler, + }, + { + MethodName: "GetRole", + Handler: _Role_GetRole_Handler, + }, + { + MethodName: "UpdateRole", + Handler: _Role_UpdateRole_Handler, + }, + { + MethodName: "DeleteRole", + Handler: _Role_DeleteRole_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "proto/rpc/v3/role.proto", +} diff --git a/components/usermgmt/proto/proto/rpc/v3/rolepermission.pb.go b/components/usermgmt/proto/proto/rpc/v3/rolepermission.pb.go new file mode 100644 index 0000000..185f9d7 --- /dev/null +++ b/components/usermgmt/proto/proto/rpc/v3/rolepermission.pb.go @@ -0,0 +1,347 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.27.1 +// protoc v3.19.1 +// source: proto/rpc/v3/rolepermission.proto + +package rpcv3 + +import ( + v3 "github.com/RafaySystems/rcloud-base/components/usermgmt/proto/types/userpb/v3" + _ "github.com/gogo/protobuf/gogoproto" + _ "github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-openapiv2/options" + _ "google.golang.org/genproto/googleapis/api/annotations" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +type GetRolepermissionsRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *GetRolepermissionsRequest) Reset() { + *x = GetRolepermissionsRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_proto_rpc_v3_rolepermission_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetRolepermissionsRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetRolepermissionsRequest) ProtoMessage() {} + +func (x *GetRolepermissionsRequest) ProtoReflect() protoreflect.Message { + mi := &file_proto_rpc_v3_rolepermission_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetRolepermissionsRequest.ProtoReflect.Descriptor instead. +func (*GetRolepermissionsRequest) Descriptor() ([]byte, []int) { + return file_proto_rpc_v3_rolepermission_proto_rawDescGZIP(), []int{0} +} + +type GetRolepermissionRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` +} + +func (x *GetRolepermissionRequest) Reset() { + *x = GetRolepermissionRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_proto_rpc_v3_rolepermission_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetRolepermissionRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetRolepermissionRequest) ProtoMessage() {} + +func (x *GetRolepermissionRequest) ProtoReflect() protoreflect.Message { + mi := &file_proto_rpc_v3_rolepermission_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetRolepermissionRequest.ProtoReflect.Descriptor instead. +func (*GetRolepermissionRequest) Descriptor() ([]byte, []int) { + return file_proto_rpc_v3_rolepermission_proto_rawDescGZIP(), []int{1} +} + +func (x *GetRolepermissionRequest) GetId() string { + if x != nil { + return x.Id + } + return "" +} + +type GetRolepermissionsResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Rolepermissions []*v3.RolePermission `protobuf:"bytes,1,rep,name=rolepermissions,proto3" json:"rolepermissions,omitempty"` +} + +func (x *GetRolepermissionsResponse) Reset() { + *x = GetRolepermissionsResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_proto_rpc_v3_rolepermission_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetRolepermissionsResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetRolepermissionsResponse) ProtoMessage() {} + +func (x *GetRolepermissionsResponse) ProtoReflect() protoreflect.Message { + mi := &file_proto_rpc_v3_rolepermission_proto_msgTypes[2] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetRolepermissionsResponse.ProtoReflect.Descriptor instead. +func (*GetRolepermissionsResponse) Descriptor() ([]byte, []int) { + return file_proto_rpc_v3_rolepermission_proto_rawDescGZIP(), []int{2} +} + +func (x *GetRolepermissionsResponse) GetRolepermissions() []*v3.RolePermission { + if x != nil { + return x.Rolepermissions + } + return nil +} + +var File_proto_rpc_v3_rolepermission_proto protoreflect.FileDescriptor + +var file_proto_rpc_v3_rolepermission_proto_rawDesc = []byte{ + 0x0a, 0x21, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x72, 0x70, 0x63, 0x2f, 0x76, 0x33, 0x2f, 0x72, + 0x6f, 0x6c, 0x65, 0x70, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x12, 0x10, 0x72, 0x61, 0x66, 0x61, 0x79, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x72, + 0x70, 0x63, 0x2e, 0x76, 0x33, 0x1a, 0x1c, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, + 0x69, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x1a, 0x14, 0x67, 0x6f, 0x67, 0x6f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, + 0x6f, 0x67, 0x6f, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x63, 0x2d, 0x67, 0x65, 0x6e, 0x2d, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x76, 0x32, 0x2f, + 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x2a, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2f, 0x75, 0x73, 0x65, 0x72, 0x70, 0x62, 0x2f, 0x76, 0x33, + 0x2f, 0x72, 0x6f, 0x6c, 0x65, 0x70, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x1b, 0x0a, 0x19, 0x47, 0x65, 0x74, 0x52, 0x6f, 0x6c, 0x65, + 0x70, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x22, 0x56, 0x0a, 0x18, 0x47, 0x65, 0x74, 0x52, 0x6f, 0x6c, 0x65, 0x70, 0x65, 0x72, + 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x3a, + 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x2a, 0x92, 0x41, 0x27, 0x2a, + 0x02, 0x49, 0x64, 0x32, 0x21, 0x49, 0x64, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, 0x20, 0x72, + 0x6f, 0x6c, 0x65, 0x70, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x20, 0x72, 0x65, + 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x02, 0x69, 0x64, 0x22, 0xac, 0x01, 0x0a, 0x1a, 0x47, + 0x65, 0x74, 0x52, 0x6f, 0x6c, 0x65, 0x70, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, + 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x8d, 0x01, 0x0a, 0x0f, 0x72, 0x6f, + 0x6c, 0x65, 0x70, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x01, 0x20, + 0x03, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x72, 0x61, 0x66, 0x61, 0x79, 0x2e, 0x64, 0x65, 0x76, 0x2e, + 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x2e, 0x52, 0x6f, + 0x6c, 0x65, 0x50, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x42, 0x3a, 0x92, 0x41, + 0x37, 0x2a, 0x0f, 0x52, 0x6f, 0x6c, 0x65, 0x50, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, + 0x6e, 0x73, 0x32, 0x24, 0x4c, 0x69, 0x73, 0x74, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, 0x20, + 0x72, 0x6f, 0x6c, 0x65, 0x70, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x20, 0x72, + 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x52, 0x0f, 0x72, 0x6f, 0x6c, 0x65, 0x70, 0x65, + 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x32, 0xb5, 0x02, 0x0a, 0x0e, 0x52, 0x6f, + 0x6c, 0x65, 0x70, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x91, 0x01, 0x0a, + 0x12, 0x47, 0x65, 0x74, 0x52, 0x6f, 0x6c, 0x65, 0x70, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, + 0x6f, 0x6e, 0x73, 0x12, 0x2b, 0x2e, 0x72, 0x61, 0x66, 0x61, 0x79, 0x2e, 0x64, 0x65, 0x76, 0x2e, + 0x72, 0x70, 0x63, 0x2e, 0x76, 0x33, 0x2e, 0x47, 0x65, 0x74, 0x52, 0x6f, 0x6c, 0x65, 0x70, 0x65, + 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x1a, 0x2c, 0x2e, 0x72, 0x61, 0x66, 0x61, 0x79, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x72, 0x70, 0x63, + 0x2e, 0x76, 0x33, 0x2e, 0x47, 0x65, 0x74, 0x52, 0x6f, 0x6c, 0x65, 0x70, 0x65, 0x72, 0x6d, 0x69, + 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x20, + 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1a, 0x12, 0x18, 0x2f, 0x61, 0x75, 0x74, 0x68, 0x2f, 0x76, 0x33, + 0x2f, 0x72, 0x6f, 0x6c, 0x65, 0x70, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, + 0x12, 0x8e, 0x01, 0x0a, 0x11, 0x47, 0x65, 0x74, 0x52, 0x6f, 0x6c, 0x65, 0x70, 0x65, 0x72, 0x6d, + 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x2a, 0x2e, 0x72, 0x61, 0x66, 0x61, 0x79, 0x2e, 0x64, + 0x65, 0x76, 0x2e, 0x72, 0x70, 0x63, 0x2e, 0x76, 0x33, 0x2e, 0x47, 0x65, 0x74, 0x52, 0x6f, 0x6c, + 0x65, 0x70, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x1a, 0x27, 0x2e, 0x72, 0x61, 0x66, 0x61, 0x79, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x74, + 0x79, 0x70, 0x65, 0x73, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x2e, 0x52, 0x6f, 0x6c, + 0x65, 0x50, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x22, 0x24, 0x82, 0xd3, 0xe4, + 0x93, 0x02, 0x1e, 0x12, 0x1c, 0x2f, 0x61, 0x75, 0x74, 0x68, 0x2f, 0x76, 0x33, 0x2f, 0x72, 0x6f, + 0x6c, 0x65, 0x70, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x2f, 0x7b, 0x69, 0x64, + 0x7d, 0x42, 0xe8, 0x04, 0x0a, 0x14, 0x63, 0x6f, 0x6d, 0x2e, 0x72, 0x61, 0x66, 0x61, 0x79, 0x2e, + 0x64, 0x65, 0x76, 0x2e, 0x72, 0x70, 0x63, 0x2e, 0x76, 0x33, 0x42, 0x13, 0x52, 0x6f, 0x6c, 0x65, + 0x70, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, + 0x01, 0x5a, 0x4a, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x52, 0x61, + 0x66, 0x61, 0x79, 0x53, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x73, 0x2f, 0x72, 0x63, 0x6c, 0x6f, 0x75, + 0x64, 0x2d, 0x62, 0x61, 0x73, 0x65, 0x2f, 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, + 0x73, 0x2f, 0x75, 0x73, 0x65, 0x72, 0x6d, 0x67, 0x6d, 0x74, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x2f, 0x72, 0x70, 0x63, 0x2f, 0x76, 0x33, 0x3b, 0x72, 0x70, 0x63, 0x76, 0x33, 0xa2, 0x02, 0x03, + 0x52, 0x44, 0x52, 0xaa, 0x02, 0x10, 0x52, 0x61, 0x66, 0x61, 0x79, 0x2e, 0x44, 0x65, 0x76, 0x2e, + 0x52, 0x70, 0x63, 0x2e, 0x56, 0x33, 0xca, 0x02, 0x10, 0x52, 0x61, 0x66, 0x61, 0x79, 0x5c, 0x44, + 0x65, 0x76, 0x5c, 0x52, 0x70, 0x63, 0x5c, 0x56, 0x33, 0xe2, 0x02, 0x1c, 0x52, 0x61, 0x66, 0x61, + 0x79, 0x5c, 0x44, 0x65, 0x76, 0x5c, 0x52, 0x70, 0x63, 0x5c, 0x56, 0x33, 0x5c, 0x47, 0x50, 0x42, + 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x13, 0x52, 0x61, 0x66, 0x61, 0x79, + 0x3a, 0x3a, 0x44, 0x65, 0x76, 0x3a, 0x3a, 0x52, 0x70, 0x63, 0x3a, 0x3a, 0x56, 0x33, 0x92, 0x41, + 0xf6, 0x02, 0x12, 0x35, 0x0a, 0x21, 0x52, 0x6f, 0x6c, 0x65, 0x70, 0x65, 0x72, 0x6d, 0x69, 0x73, + 0x73, 0x69, 0x6f, 0x6e, 0x20, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x20, + 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x22, 0x0b, 0x0a, 0x09, 0x52, 0x61, 0x66, 0x61, 0x79, + 0x20, 0x44, 0x65, 0x76, 0x32, 0x03, 0x32, 0x2e, 0x30, 0x2a, 0x01, 0x02, 0x32, 0x10, 0x61, 0x70, + 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x6a, 0x73, 0x6f, 0x6e, 0x32, 0x10, + 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x79, 0x61, 0x6d, 0x6c, + 0x3a, 0x10, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x6a, 0x73, + 0x6f, 0x6e, 0x3a, 0x10, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, + 0x79, 0x61, 0x6d, 0x6c, 0x52, 0x5a, 0x0a, 0x03, 0x34, 0x30, 0x33, 0x12, 0x53, 0x0a, 0x51, 0x52, + 0x65, 0x74, 0x75, 0x72, 0x6e, 0x65, 0x64, 0x20, 0x77, 0x68, 0x65, 0x6e, 0x20, 0x74, 0x68, 0x65, + 0x20, 0x72, 0x6f, 0x6c, 0x65, 0x70, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x20, + 0x64, 0x6f, 0x65, 0x73, 0x20, 0x6e, 0x6f, 0x74, 0x20, 0x68, 0x61, 0x76, 0x65, 0x20, 0x70, 0x65, + 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x20, 0x74, 0x6f, 0x20, 0x61, 0x63, 0x63, 0x65, + 0x73, 0x73, 0x20, 0x74, 0x68, 0x65, 0x20, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x2e, + 0x52, 0x3b, 0x0a, 0x03, 0x34, 0x30, 0x34, 0x12, 0x34, 0x0a, 0x2a, 0x52, 0x65, 0x74, 0x75, 0x72, + 0x6e, 0x65, 0x64, 0x20, 0x77, 0x68, 0x65, 0x6e, 0x20, 0x74, 0x68, 0x65, 0x20, 0x72, 0x65, 0x73, + 0x6f, 0x75, 0x72, 0x63, 0x65, 0x20, 0x64, 0x6f, 0x65, 0x73, 0x20, 0x6e, 0x6f, 0x74, 0x20, 0x65, + 0x78, 0x69, 0x73, 0x74, 0x2e, 0x12, 0x06, 0x0a, 0x04, 0x9a, 0x02, 0x01, 0x07, 0x5a, 0x38, 0x0a, + 0x25, 0x0a, 0x0a, 0x41, 0x70, 0x69, 0x4b, 0x65, 0x79, 0x41, 0x75, 0x74, 0x68, 0x12, 0x17, 0x08, + 0x02, 0x1a, 0x11, 0x58, 0x2d, 0x52, 0x41, 0x46, 0x41, 0x59, 0x2d, 0x41, 0x50, 0x49, 0x2d, 0x4b, + 0x45, 0x59, 0x49, 0x44, 0x20, 0x02, 0x0a, 0x0f, 0x0a, 0x09, 0x42, 0x61, 0x73, 0x69, 0x63, 0x41, + 0x75, 0x74, 0x68, 0x12, 0x02, 0x08, 0x01, 0x62, 0x1f, 0x0a, 0x0e, 0x0a, 0x0a, 0x41, 0x70, 0x69, + 0x4b, 0x65, 0x79, 0x41, 0x75, 0x74, 0x68, 0x12, 0x00, 0x0a, 0x0d, 0x0a, 0x09, 0x42, 0x61, 0x73, + 0x69, 0x63, 0x41, 0x75, 0x74, 0x68, 0x12, 0x00, 0xc8, 0xe2, 0x1e, 0x01, 0xd0, 0xe2, 0x1e, 0x01, + 0xe0, 0xe2, 0x1e, 0x01, 0xc0, 0xe3, 0x1e, 0x01, 0xc8, 0xe3, 0x1e, 0x01, 0x62, 0x06, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_proto_rpc_v3_rolepermission_proto_rawDescOnce sync.Once + file_proto_rpc_v3_rolepermission_proto_rawDescData = file_proto_rpc_v3_rolepermission_proto_rawDesc +) + +func file_proto_rpc_v3_rolepermission_proto_rawDescGZIP() []byte { + file_proto_rpc_v3_rolepermission_proto_rawDescOnce.Do(func() { + file_proto_rpc_v3_rolepermission_proto_rawDescData = protoimpl.X.CompressGZIP(file_proto_rpc_v3_rolepermission_proto_rawDescData) + }) + return file_proto_rpc_v3_rolepermission_proto_rawDescData +} + +var file_proto_rpc_v3_rolepermission_proto_msgTypes = make([]protoimpl.MessageInfo, 3) +var file_proto_rpc_v3_rolepermission_proto_goTypes = []interface{}{ + (*GetRolepermissionsRequest)(nil), // 0: rafay.dev.rpc.v3.GetRolepermissionsRequest + (*GetRolepermissionRequest)(nil), // 1: rafay.dev.rpc.v3.GetRolepermissionRequest + (*GetRolepermissionsResponse)(nil), // 2: rafay.dev.rpc.v3.GetRolepermissionsResponse + (*v3.RolePermission)(nil), // 3: rafay.dev.types.user.v3.RolePermission +} +var file_proto_rpc_v3_rolepermission_proto_depIdxs = []int32{ + 3, // 0: rafay.dev.rpc.v3.GetRolepermissionsResponse.rolepermissions:type_name -> rafay.dev.types.user.v3.RolePermission + 0, // 1: rafay.dev.rpc.v3.Rolepermission.GetRolepermissions:input_type -> rafay.dev.rpc.v3.GetRolepermissionsRequest + 1, // 2: rafay.dev.rpc.v3.Rolepermission.GetRolepermission:input_type -> rafay.dev.rpc.v3.GetRolepermissionRequest + 2, // 3: rafay.dev.rpc.v3.Rolepermission.GetRolepermissions:output_type -> rafay.dev.rpc.v3.GetRolepermissionsResponse + 3, // 4: rafay.dev.rpc.v3.Rolepermission.GetRolepermission:output_type -> rafay.dev.types.user.v3.RolePermission + 3, // [3:5] is the sub-list for method output_type + 1, // [1:3] is the sub-list for method input_type + 1, // [1:1] is the sub-list for extension type_name + 1, // [1:1] is the sub-list for extension extendee + 0, // [0:1] is the sub-list for field type_name +} + +func init() { file_proto_rpc_v3_rolepermission_proto_init() } +func file_proto_rpc_v3_rolepermission_proto_init() { + if File_proto_rpc_v3_rolepermission_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_proto_rpc_v3_rolepermission_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetRolepermissionsRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_rpc_v3_rolepermission_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetRolepermissionRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_rpc_v3_rolepermission_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetRolepermissionsResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_proto_rpc_v3_rolepermission_proto_rawDesc, + NumEnums: 0, + NumMessages: 3, + NumExtensions: 0, + NumServices: 1, + }, + GoTypes: file_proto_rpc_v3_rolepermission_proto_goTypes, + DependencyIndexes: file_proto_rpc_v3_rolepermission_proto_depIdxs, + MessageInfos: file_proto_rpc_v3_rolepermission_proto_msgTypes, + }.Build() + File_proto_rpc_v3_rolepermission_proto = out.File + file_proto_rpc_v3_rolepermission_proto_rawDesc = nil + file_proto_rpc_v3_rolepermission_proto_goTypes = nil + file_proto_rpc_v3_rolepermission_proto_depIdxs = nil +} diff --git a/components/usermgmt/proto/proto/rpc/v3/rolepermission.pb.gw.go b/components/usermgmt/proto/proto/rpc/v3/rolepermission.pb.gw.go new file mode 100644 index 0000000..12b8274 --- /dev/null +++ b/components/usermgmt/proto/proto/rpc/v3/rolepermission.pb.gw.go @@ -0,0 +1,250 @@ +// Code generated by protoc-gen-grpc-gateway. DO NOT EDIT. +// source: proto/rpc/v3/rolepermission.proto + +/* +Package rpcv3 is a reverse proxy. + +It translates gRPC into RESTful JSON APIs. +*/ +package rpcv3 + +import ( + "context" + "io" + "net/http" + + "github.com/grpc-ecosystem/grpc-gateway/v2/runtime" + "github.com/grpc-ecosystem/grpc-gateway/v2/utilities" + "google.golang.org/grpc" + "google.golang.org/grpc/codes" + "google.golang.org/grpc/grpclog" + "google.golang.org/grpc/metadata" + "google.golang.org/grpc/status" + "google.golang.org/protobuf/proto" +) + +// Suppress "imported and not used" errors +var _ codes.Code +var _ io.Reader +var _ status.Status +var _ = runtime.String +var _ = utilities.NewDoubleArray +var _ = metadata.Join + +func request_Rolepermission_GetRolepermissions_0(ctx context.Context, marshaler runtime.Marshaler, client RolepermissionClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq GetRolepermissionsRequest + var metadata runtime.ServerMetadata + + msg, err := client.GetRolepermissions(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_Rolepermission_GetRolepermissions_0(ctx context.Context, marshaler runtime.Marshaler, server RolepermissionServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq GetRolepermissionsRequest + var metadata runtime.ServerMetadata + + msg, err := server.GetRolepermissions(ctx, &protoReq) + return msg, metadata, err + +} + +func request_Rolepermission_GetRolepermission_0(ctx context.Context, marshaler runtime.Marshaler, client RolepermissionClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq GetRolepermissionRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["id"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "id") + } + + protoReq.Id, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "id", err) + } + + msg, err := client.GetRolepermission(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_Rolepermission_GetRolepermission_0(ctx context.Context, marshaler runtime.Marshaler, server RolepermissionServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq GetRolepermissionRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["id"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "id") + } + + protoReq.Id, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "id", err) + } + + msg, err := server.GetRolepermission(ctx, &protoReq) + return msg, metadata, err + +} + +// RegisterRolepermissionHandlerServer registers the http handlers for service Rolepermission to "mux". +// UnaryRPC :call RolepermissionServer directly. +// StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. +// Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterRolepermissionHandlerFromEndpoint instead. +func RegisterRolepermissionHandlerServer(ctx context.Context, mux *runtime.ServeMux, server RolepermissionServer) error { + + mux.Handle("GET", pattern_Rolepermission_GetRolepermissions_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/rafay.dev.rpc.v3.Rolepermission/GetRolepermissions", runtime.WithHTTPPathPattern("/auth/v3/rolepermissions")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_Rolepermission_GetRolepermissions_0(rctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Rolepermission_GetRolepermissions_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_Rolepermission_GetRolepermission_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/rafay.dev.rpc.v3.Rolepermission/GetRolepermission", runtime.WithHTTPPathPattern("/auth/v3/rolepermission/{id}")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_Rolepermission_GetRolepermission_0(rctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Rolepermission_GetRolepermission_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + return nil +} + +// RegisterRolepermissionHandlerFromEndpoint is same as RegisterRolepermissionHandler but +// automatically dials to "endpoint" and closes the connection when "ctx" gets done. +func RegisterRolepermissionHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error) { + conn, err := grpc.Dial(endpoint, opts...) + if err != nil { + return err + } + defer func() { + if err != nil { + if cerr := conn.Close(); cerr != nil { + grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr) + } + return + } + go func() { + <-ctx.Done() + if cerr := conn.Close(); cerr != nil { + grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr) + } + }() + }() + + return RegisterRolepermissionHandler(ctx, mux, conn) +} + +// RegisterRolepermissionHandler registers the http handlers for service Rolepermission to "mux". +// The handlers forward requests to the grpc endpoint over "conn". +func RegisterRolepermissionHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error { + return RegisterRolepermissionHandlerClient(ctx, mux, NewRolepermissionClient(conn)) +} + +// RegisterRolepermissionHandlerClient registers the http handlers for service Rolepermission +// to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "RolepermissionClient". +// Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "RolepermissionClient" +// doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in +// "RolepermissionClient" to call the correct interceptors. +func RegisterRolepermissionHandlerClient(ctx context.Context, mux *runtime.ServeMux, client RolepermissionClient) error { + + mux.Handle("GET", pattern_Rolepermission_GetRolepermissions_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateContext(ctx, mux, req, "/rafay.dev.rpc.v3.Rolepermission/GetRolepermissions", runtime.WithHTTPPathPattern("/auth/v3/rolepermissions")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_Rolepermission_GetRolepermissions_0(rctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Rolepermission_GetRolepermissions_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_Rolepermission_GetRolepermission_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateContext(ctx, mux, req, "/rafay.dev.rpc.v3.Rolepermission/GetRolepermission", runtime.WithHTTPPathPattern("/auth/v3/rolepermission/{id}")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_Rolepermission_GetRolepermission_0(rctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Rolepermission_GetRolepermission_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + return nil +} + +var ( + pattern_Rolepermission_GetRolepermissions_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"auth", "v3", "rolepermissions"}, "")) + + pattern_Rolepermission_GetRolepermission_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3}, []string{"auth", "v3", "rolepermission", "id"}, "")) +) + +var ( + forward_Rolepermission_GetRolepermissions_0 = runtime.ForwardResponseMessage + + forward_Rolepermission_GetRolepermission_0 = runtime.ForwardResponseMessage +) diff --git a/components/usermgmt/proto/proto/rpc/v3/rolepermission.proto b/components/usermgmt/proto/proto/rpc/v3/rolepermission.proto new file mode 100644 index 0000000..9c9ca4f --- /dev/null +++ b/components/usermgmt/proto/proto/rpc/v3/rolepermission.proto @@ -0,0 +1,99 @@ +syntax = "proto3"; +package rafay.dev.rpc.v3; + +import "google/api/annotations.proto"; +import "gogoproto/gogo.proto"; +import "protoc-gen-openapiv2/options/annotations.proto"; +import "proto/types/userpb/v3/rolepermission.proto"; + +// Enable custom Marshal method. +option (gogoproto.marshaler_all) = true; +// Enable custom Unmarshal method. +option (gogoproto.unmarshaler_all) = true; +// Enable custom Size method (Required by Marshal and Unmarshal). +option (gogoproto.sizer_all) = true; +// Enable registration with golang/protobuf for the grpc-gateway. +option (gogoproto.goproto_registration) = true; +// Enable generation of XXX_MessageName methods for grpc-go/status. +option (gogoproto.messagename_all) = true; + +option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_swagger) = { + info : { + title : "Rolepermission management Service" + version : "2.0" + contact : {name : "Rafay Dev"} + } + schemes : HTTPS + consumes : "application/json" + consumes : "application/yaml" + produces : "application/json" + produces : "application/yaml" + security_definitions : { + security : { + key : "BasicAuth" + value : {type : TYPE_BASIC} + } + security : { + key : "ApiKeyAuth" + value : {type : TYPE_API_KEY in : IN_HEADER name : "X-RAFAY-API-KEYID"} + } + } + security : { + security_requirement : { + key : "BasicAuth" + value : {} + } + security_requirement : { + key : "ApiKeyAuth" + value : {} + } + } + responses : { + key : "403" + value : { + description : "Returned when the rolepermission does not have permission " + "to access " + "the resource." + } + } + responses : { + key : "404" + value : { + description : "Returned when the resource does not exist." + schema : {json_schema : {type : STRING}} + } + } +}; + +message GetRolepermissionsRequest {} +message GetRolepermissionRequest { + string id = 1 + [ (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { + title : "Id", + description : "Id of the rolepermission resource" + } ]; +} +message GetRolepermissionsResponse { + repeated rafay.dev.types.user.v3.RolePermission rolepermissions = 1 + [ (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { + title : "RolePermissions", + description : "List of the rolepermission resources" + } ]; + +} + +service Rolepermission { + rpc GetRolepermissions(GetRolepermissionsRequest) + returns (GetRolepermissionsResponse) { + option (google.api.http) = { + get : "/auth/v3/rolepermissions" + }; + }; + + rpc GetRolepermission(GetRolepermissionRequest) + returns (rafay.dev.types.user.v3.RolePermission) { + option (google.api.http) = { + get : "/auth/v3/rolepermission/{id}" + }; + }; +} \ No newline at end of file diff --git a/components/usermgmt/proto/proto/rpc/v3/rolepermission_grpc.pb.go b/components/usermgmt/proto/proto/rpc/v3/rolepermission_grpc.pb.go new file mode 100644 index 0000000..0f6b37d --- /dev/null +++ b/components/usermgmt/proto/proto/rpc/v3/rolepermission_grpc.pb.go @@ -0,0 +1,140 @@ +// Code generated by protoc-gen-go-grpc. DO NOT EDIT. +// versions: +// - protoc-gen-go-grpc v1.2.0 +// - protoc v3.19.1 +// source: proto/rpc/v3/rolepermission.proto + +package rpcv3 + +import ( + context "context" + v3 "github.com/RafaySystems/rcloud-base/components/usermgmt/proto/types/userpb/v3" + grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" +) + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +// Requires gRPC-Go v1.32.0 or later. +const _ = grpc.SupportPackageIsVersion7 + +// RolepermissionClient is the client API for Rolepermission service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. +type RolepermissionClient interface { + GetRolepermissions(ctx context.Context, in *GetRolepermissionsRequest, opts ...grpc.CallOption) (*GetRolepermissionsResponse, error) + GetRolepermission(ctx context.Context, in *GetRolepermissionRequest, opts ...grpc.CallOption) (*v3.RolePermission, error) +} + +type rolepermissionClient struct { + cc grpc.ClientConnInterface +} + +func NewRolepermissionClient(cc grpc.ClientConnInterface) RolepermissionClient { + return &rolepermissionClient{cc} +} + +func (c *rolepermissionClient) GetRolepermissions(ctx context.Context, in *GetRolepermissionsRequest, opts ...grpc.CallOption) (*GetRolepermissionsResponse, error) { + out := new(GetRolepermissionsResponse) + err := c.cc.Invoke(ctx, "/rafay.dev.rpc.v3.Rolepermission/GetRolepermissions", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *rolepermissionClient) GetRolepermission(ctx context.Context, in *GetRolepermissionRequest, opts ...grpc.CallOption) (*v3.RolePermission, error) { + out := new(v3.RolePermission) + err := c.cc.Invoke(ctx, "/rafay.dev.rpc.v3.Rolepermission/GetRolepermission", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// RolepermissionServer is the server API for Rolepermission service. +// All implementations should embed UnimplementedRolepermissionServer +// for forward compatibility +type RolepermissionServer interface { + GetRolepermissions(context.Context, *GetRolepermissionsRequest) (*GetRolepermissionsResponse, error) + GetRolepermission(context.Context, *GetRolepermissionRequest) (*v3.RolePermission, error) +} + +// UnimplementedRolepermissionServer should be embedded to have forward compatible implementations. +type UnimplementedRolepermissionServer struct { +} + +func (UnimplementedRolepermissionServer) GetRolepermissions(context.Context, *GetRolepermissionsRequest) (*GetRolepermissionsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetRolepermissions not implemented") +} +func (UnimplementedRolepermissionServer) GetRolepermission(context.Context, *GetRolepermissionRequest) (*v3.RolePermission, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetRolepermission not implemented") +} + +// UnsafeRolepermissionServer may be embedded to opt out of forward compatibility for this service. +// Use of this interface is not recommended, as added methods to RolepermissionServer will +// result in compilation errors. +type UnsafeRolepermissionServer interface { + mustEmbedUnimplementedRolepermissionServer() +} + +func RegisterRolepermissionServer(s grpc.ServiceRegistrar, srv RolepermissionServer) { + s.RegisterService(&Rolepermission_ServiceDesc, srv) +} + +func _Rolepermission_GetRolepermissions_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetRolepermissionsRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(RolepermissionServer).GetRolepermissions(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/rafay.dev.rpc.v3.Rolepermission/GetRolepermissions", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(RolepermissionServer).GetRolepermissions(ctx, req.(*GetRolepermissionsRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Rolepermission_GetRolepermission_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetRolepermissionRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(RolepermissionServer).GetRolepermission(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/rafay.dev.rpc.v3.Rolepermission/GetRolepermission", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(RolepermissionServer).GetRolepermission(ctx, req.(*GetRolepermissionRequest)) + } + return interceptor(ctx, in, info, handler) +} + +// Rolepermission_ServiceDesc is the grpc.ServiceDesc for Rolepermission service. +// It's only intended for direct use with grpc.RegisterService, +// and not to be introspected or modified (even as a copy) +var Rolepermission_ServiceDesc = grpc.ServiceDesc{ + ServiceName: "rafay.dev.rpc.v3.Rolepermission", + HandlerType: (*RolepermissionServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "GetRolepermissions", + Handler: _Rolepermission_GetRolepermissions_Handler, + }, + { + MethodName: "GetRolepermission", + Handler: _Rolepermission_GetRolepermission_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "proto/rpc/v3/rolepermission.proto", +} diff --git a/components/usermgmt/proto/proto/rpc/v3/user.pb.go b/components/usermgmt/proto/proto/rpc/v3/user.pb.go new file mode 100644 index 0000000..3ebf946 --- /dev/null +++ b/components/usermgmt/proto/proto/rpc/v3/user.pb.go @@ -0,0 +1,580 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.27.1 +// protoc v3.19.1 +// source: proto/rpc/v3/user.proto + +package rpcv3 + +import ( + v3 "github.com/RafaySystems/rcloud-base/components/usermgmt/proto/types/userpb/v3" + _ "github.com/gogo/protobuf/gogoproto" + _ "github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-openapiv2/options" + _ "google.golang.org/genproto/googleapis/api/annotations" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// Add option to filter by more org and group +type GetUsersRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Project string `protobuf:"bytes,1,opt,name=project,proto3" json:"project,omitempty"` +} + +func (x *GetUsersRequest) Reset() { + *x = GetUsersRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_proto_rpc_v3_user_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetUsersRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetUsersRequest) ProtoMessage() {} + +func (x *GetUsersRequest) ProtoReflect() protoreflect.Message { + mi := &file_proto_rpc_v3_user_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetUsersRequest.ProtoReflect.Descriptor instead. +func (*GetUsersRequest) Descriptor() ([]byte, []int) { + return file_proto_rpc_v3_user_proto_rawDescGZIP(), []int{0} +} + +func (x *GetUsersRequest) GetProject() string { + if x != nil { + return x.Project + } + return "" +} + +type GetUserRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Userid string `protobuf:"bytes,1,opt,name=userid,proto3" json:"userid,omitempty"` +} + +func (x *GetUserRequest) Reset() { + *x = GetUserRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_proto_rpc_v3_user_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetUserRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetUserRequest) ProtoMessage() {} + +func (x *GetUserRequest) ProtoReflect() protoreflect.Message { + mi := &file_proto_rpc_v3_user_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetUserRequest.ProtoReflect.Descriptor instead. +func (*GetUserRequest) Descriptor() ([]byte, []int) { + return file_proto_rpc_v3_user_proto_rawDescGZIP(), []int{1} +} + +func (x *GetUserRequest) GetUserid() string { + if x != nil { + return x.Userid + } + return "" +} + +type DeleteUserRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Userid string `protobuf:"bytes,1,opt,name=userid,proto3" json:"userid,omitempty"` +} + +func (x *DeleteUserRequest) Reset() { + *x = DeleteUserRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_proto_rpc_v3_user_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *DeleteUserRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DeleteUserRequest) ProtoMessage() {} + +func (x *DeleteUserRequest) ProtoReflect() protoreflect.Message { + mi := &file_proto_rpc_v3_user_proto_msgTypes[2] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use DeleteUserRequest.ProtoReflect.Descriptor instead. +func (*DeleteUserRequest) Descriptor() ([]byte, []int) { + return file_proto_rpc_v3_user_proto_rawDescGZIP(), []int{2} +} + +func (x *DeleteUserRequest) GetUserid() string { + if x != nil { + return x.Userid + } + return "" +} + +type PutUserRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Userid string `protobuf:"bytes,1,opt,name=userid,proto3" json:"userid,omitempty"` + User *v3.User `protobuf:"bytes,2,opt,name=user,proto3" json:"user,omitempty"` +} + +func (x *PutUserRequest) Reset() { + *x = PutUserRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_proto_rpc_v3_user_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *PutUserRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PutUserRequest) ProtoMessage() {} + +func (x *PutUserRequest) ProtoReflect() protoreflect.Message { + mi := &file_proto_rpc_v3_user_proto_msgTypes[3] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PutUserRequest.ProtoReflect.Descriptor instead. +func (*PutUserRequest) Descriptor() ([]byte, []int) { + return file_proto_rpc_v3_user_proto_rawDescGZIP(), []int{3} +} + +func (x *PutUserRequest) GetUserid() string { + if x != nil { + return x.Userid + } + return "" +} + +func (x *PutUserRequest) GetUser() *v3.User { + if x != nil { + return x.User + } + return nil +} + +type GetUsersResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + User []*v3.User `protobuf:"bytes,1,rep,name=user,proto3" json:"user,omitempty"` +} + +func (x *GetUsersResponse) Reset() { + *x = GetUsersResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_proto_rpc_v3_user_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetUsersResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetUsersResponse) ProtoMessage() {} + +func (x *GetUsersResponse) ProtoReflect() protoreflect.Message { + mi := &file_proto_rpc_v3_user_proto_msgTypes[4] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetUsersResponse.ProtoReflect.Descriptor instead. +func (*GetUsersResponse) Descriptor() ([]byte, []int) { + return file_proto_rpc_v3_user_proto_rawDescGZIP(), []int{4} +} + +func (x *GetUsersResponse) GetUser() []*v3.User { + if x != nil { + return x.User + } + return nil +} + +type UserResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Status string `protobuf:"bytes,1,opt,name=status,proto3" json:"status,omitempty"` + Message string `protobuf:"bytes,2,opt,name=message,proto3" json:"message,omitempty"` +} + +func (x *UserResponse) Reset() { + *x = UserResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_proto_rpc_v3_user_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *UserResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*UserResponse) ProtoMessage() {} + +func (x *UserResponse) ProtoReflect() protoreflect.Message { + mi := &file_proto_rpc_v3_user_proto_msgTypes[5] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use UserResponse.ProtoReflect.Descriptor instead. +func (*UserResponse) Descriptor() ([]byte, []int) { + return file_proto_rpc_v3_user_proto_rawDescGZIP(), []int{5} +} + +func (x *UserResponse) GetStatus() string { + if x != nil { + return x.Status + } + return "" +} + +func (x *UserResponse) GetMessage() string { + if x != nil { + return x.Message + } + return "" +} + +var File_proto_rpc_v3_user_proto protoreflect.FileDescriptor + +var file_proto_rpc_v3_user_proto_rawDesc = []byte{ + 0x0a, 0x17, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x72, 0x70, 0x63, 0x2f, 0x76, 0x33, 0x2f, 0x75, + 0x73, 0x65, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x10, 0x72, 0x61, 0x66, 0x61, 0x79, + 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x72, 0x70, 0x63, 0x2e, 0x76, 0x33, 0x1a, 0x1c, 0x67, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x14, 0x67, 0x6f, 0x67, 0x6f, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x6f, 0x67, 0x6f, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x2d, 0x67, 0x65, 0x6e, 0x2d, 0x6f, 0x70, 0x65, 0x6e, + 0x61, 0x70, 0x69, 0x76, 0x32, 0x2f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x61, 0x6e, + 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, + 0x20, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2f, 0x75, 0x73, 0x65, + 0x72, 0x70, 0x62, 0x2f, 0x76, 0x33, 0x2f, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x22, 0x2b, 0x0a, 0x0f, 0x47, 0x65, 0x74, 0x55, 0x73, 0x65, 0x72, 0x73, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x12, 0x18, 0x0a, 0x07, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x22, 0x28, + 0x0a, 0x0e, 0x47, 0x65, 0x74, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x12, 0x16, 0x0a, 0x06, 0x75, 0x73, 0x65, 0x72, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x06, 0x75, 0x73, 0x65, 0x72, 0x69, 0x64, 0x22, 0x2b, 0x0a, 0x11, 0x44, 0x65, 0x6c, 0x65, + 0x74, 0x65, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x16, 0x0a, + 0x06, 0x75, 0x73, 0x65, 0x72, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x75, + 0x73, 0x65, 0x72, 0x69, 0x64, 0x22, 0x5b, 0x0a, 0x0e, 0x50, 0x75, 0x74, 0x55, 0x73, 0x65, 0x72, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x75, 0x73, 0x65, 0x72, 0x69, + 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x75, 0x73, 0x65, 0x72, 0x69, 0x64, 0x12, + 0x31, 0x0a, 0x04, 0x75, 0x73, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1d, 0x2e, + 0x72, 0x61, 0x66, 0x61, 0x79, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, + 0x75, 0x73, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x52, 0x04, 0x75, 0x73, + 0x65, 0x72, 0x22, 0x45, 0x0a, 0x10, 0x47, 0x65, 0x74, 0x55, 0x73, 0x65, 0x72, 0x73, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x31, 0x0a, 0x04, 0x75, 0x73, 0x65, 0x72, 0x18, 0x01, + 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x72, 0x61, 0x66, 0x61, 0x79, 0x2e, 0x64, 0x65, 0x76, + 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x2e, 0x55, + 0x73, 0x65, 0x72, 0x52, 0x04, 0x75, 0x73, 0x65, 0x72, 0x22, 0x40, 0x0a, 0x0c, 0x55, 0x73, 0x65, + 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x74, 0x61, + 0x74, 0x75, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, + 0x73, 0x12, 0x18, 0x0a, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x32, 0xe7, 0x04, 0x0a, 0x04, + 0x55, 0x73, 0x65, 0x72, 0x12, 0x9e, 0x01, 0x0a, 0x0a, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x55, + 0x73, 0x65, 0x72, 0x12, 0x1d, 0x2e, 0x72, 0x61, 0x66, 0x61, 0x79, 0x2e, 0x64, 0x65, 0x76, 0x2e, + 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x2e, 0x55, 0x73, + 0x65, 0x72, 0x1a, 0x1d, 0x2e, 0x72, 0x61, 0x66, 0x61, 0x79, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x74, + 0x79, 0x70, 0x65, 0x73, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x2e, 0x55, 0x73, 0x65, + 0x72, 0x22, 0x52, 0x92, 0x41, 0x36, 0x4a, 0x34, 0x0a, 0x03, 0x32, 0x30, 0x31, 0x12, 0x2d, 0x0a, + 0x2b, 0x52, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x65, 0x64, 0x20, 0x77, 0x68, 0x65, 0x6e, 0x20, 0x75, + 0x73, 0x65, 0x72, 0x20, 0x69, 0x73, 0x20, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x20, 0x73, + 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x66, 0x75, 0x6c, 0x6c, 0x79, 0x2e, 0x82, 0xd3, 0xe4, 0x93, + 0x02, 0x13, 0x22, 0x0e, 0x2f, 0x61, 0x75, 0x74, 0x68, 0x2f, 0x76, 0x33, 0x2f, 0x75, 0x73, 0x65, + 0x72, 0x73, 0x3a, 0x01, 0x2a, 0x12, 0x69, 0x0a, 0x08, 0x47, 0x65, 0x74, 0x55, 0x73, 0x65, 0x72, + 0x73, 0x12, 0x21, 0x2e, 0x72, 0x61, 0x66, 0x61, 0x79, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x72, 0x70, + 0x63, 0x2e, 0x76, 0x33, 0x2e, 0x47, 0x65, 0x74, 0x55, 0x73, 0x65, 0x72, 0x73, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x1a, 0x22, 0x2e, 0x72, 0x61, 0x66, 0x61, 0x79, 0x2e, 0x64, 0x65, 0x76, + 0x2e, 0x72, 0x70, 0x63, 0x2e, 0x76, 0x33, 0x2e, 0x47, 0x65, 0x74, 0x55, 0x73, 0x65, 0x72, 0x73, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x16, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x10, + 0x12, 0x0e, 0x2f, 0x61, 0x75, 0x74, 0x68, 0x2f, 0x76, 0x33, 0x2f, 0x75, 0x73, 0x65, 0x72, 0x73, + 0x12, 0x6a, 0x0a, 0x07, 0x47, 0x65, 0x74, 0x55, 0x73, 0x65, 0x72, 0x12, 0x20, 0x2e, 0x72, 0x61, + 0x66, 0x61, 0x79, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x72, 0x70, 0x63, 0x2e, 0x76, 0x33, 0x2e, 0x47, + 0x65, 0x74, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1d, 0x2e, + 0x72, 0x61, 0x66, 0x61, 0x79, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, + 0x75, 0x73, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x22, 0x1e, 0x82, 0xd3, + 0xe4, 0x93, 0x02, 0x18, 0x12, 0x16, 0x2f, 0x61, 0x75, 0x74, 0x68, 0x2f, 0x76, 0x33, 0x2f, 0x75, + 0x73, 0x65, 0x72, 0x2f, 0x7b, 0x75, 0x73, 0x65, 0x72, 0x69, 0x64, 0x7d, 0x12, 0x74, 0x0a, 0x0a, + 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x55, 0x73, 0x65, 0x72, 0x12, 0x20, 0x2e, 0x72, 0x61, 0x66, + 0x61, 0x79, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x72, 0x70, 0x63, 0x2e, 0x76, 0x33, 0x2e, 0x50, 0x75, + 0x74, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1e, 0x2e, 0x72, + 0x61, 0x66, 0x61, 0x79, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x72, 0x70, 0x63, 0x2e, 0x76, 0x33, 0x2e, + 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x24, 0x82, 0xd3, + 0xe4, 0x93, 0x02, 0x1e, 0x1a, 0x16, 0x2f, 0x61, 0x75, 0x74, 0x68, 0x2f, 0x76, 0x33, 0x2f, 0x75, + 0x73, 0x65, 0x72, 0x2f, 0x7b, 0x75, 0x73, 0x65, 0x72, 0x69, 0x64, 0x7d, 0x3a, 0x04, 0x75, 0x73, + 0x65, 0x72, 0x12, 0x71, 0x0a, 0x0a, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x55, 0x73, 0x65, 0x72, + 0x12, 0x23, 0x2e, 0x72, 0x61, 0x66, 0x61, 0x79, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x72, 0x70, 0x63, + 0x2e, 0x76, 0x33, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1e, 0x2e, 0x72, 0x61, 0x66, 0x61, 0x79, 0x2e, 0x64, 0x65, + 0x76, 0x2e, 0x72, 0x70, 0x63, 0x2e, 0x76, 0x33, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x1e, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x18, 0x2a, 0x16, 0x2f, + 0x61, 0x75, 0x74, 0x68, 0x2f, 0x76, 0x33, 0x2f, 0x75, 0x73, 0x65, 0x72, 0x2f, 0x7b, 0x75, 0x73, + 0x65, 0x72, 0x69, 0x64, 0x7d, 0x42, 0xca, 0x04, 0x0a, 0x14, 0x63, 0x6f, 0x6d, 0x2e, 0x72, 0x61, + 0x66, 0x61, 0x79, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x72, 0x70, 0x63, 0x2e, 0x76, 0x33, 0x42, 0x09, + 0x55, 0x73, 0x65, 0x72, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x4a, 0x67, 0x69, 0x74, + 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x52, 0x61, 0x66, 0x61, 0x79, 0x53, 0x79, 0x73, + 0x74, 0x65, 0x6d, 0x73, 0x2f, 0x72, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2d, 0x62, 0x61, 0x73, 0x65, + 0x2f, 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x73, 0x2f, 0x75, 0x73, 0x65, 0x72, + 0x6d, 0x67, 0x6d, 0x74, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x72, 0x70, 0x63, 0x2f, 0x76, + 0x33, 0x3b, 0x72, 0x70, 0x63, 0x76, 0x33, 0xa2, 0x02, 0x03, 0x52, 0x44, 0x52, 0xaa, 0x02, 0x10, + 0x52, 0x61, 0x66, 0x61, 0x79, 0x2e, 0x44, 0x65, 0x76, 0x2e, 0x52, 0x70, 0x63, 0x2e, 0x56, 0x33, + 0xca, 0x02, 0x10, 0x52, 0x61, 0x66, 0x61, 0x79, 0x5c, 0x44, 0x65, 0x76, 0x5c, 0x52, 0x70, 0x63, + 0x5c, 0x56, 0x33, 0xe2, 0x02, 0x1c, 0x52, 0x61, 0x66, 0x61, 0x79, 0x5c, 0x44, 0x65, 0x76, 0x5c, + 0x52, 0x70, 0x63, 0x5c, 0x56, 0x33, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, + 0x74, 0x61, 0xea, 0x02, 0x13, 0x52, 0x61, 0x66, 0x61, 0x79, 0x3a, 0x3a, 0x44, 0x65, 0x76, 0x3a, + 0x3a, 0x52, 0x70, 0x63, 0x3a, 0x3a, 0x56, 0x33, 0x92, 0x41, 0xe2, 0x02, 0x12, 0x2b, 0x0a, 0x17, + 0x55, 0x73, 0x65, 0x72, 0x20, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x20, + 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x22, 0x0b, 0x0a, 0x09, 0x52, 0x61, 0x66, 0x61, 0x79, + 0x20, 0x44, 0x65, 0x76, 0x32, 0x03, 0x32, 0x2e, 0x30, 0x2a, 0x01, 0x02, 0x32, 0x10, 0x61, 0x70, + 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x6a, 0x73, 0x6f, 0x6e, 0x32, 0x10, + 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x79, 0x61, 0x6d, 0x6c, + 0x3a, 0x10, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x6a, 0x73, + 0x6f, 0x6e, 0x3a, 0x10, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, + 0x79, 0x61, 0x6d, 0x6c, 0x52, 0x50, 0x0a, 0x03, 0x34, 0x30, 0x33, 0x12, 0x49, 0x0a, 0x47, 0x52, + 0x65, 0x74, 0x75, 0x72, 0x6e, 0x65, 0x64, 0x20, 0x77, 0x68, 0x65, 0x6e, 0x20, 0x74, 0x68, 0x65, + 0x20, 0x75, 0x73, 0x65, 0x72, 0x20, 0x64, 0x6f, 0x65, 0x73, 0x20, 0x6e, 0x6f, 0x74, 0x20, 0x68, + 0x61, 0x76, 0x65, 0x20, 0x70, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x20, 0x74, + 0x6f, 0x20, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x20, 0x74, 0x68, 0x65, 0x20, 0x72, 0x65, 0x73, + 0x6f, 0x75, 0x72, 0x63, 0x65, 0x2e, 0x52, 0x3b, 0x0a, 0x03, 0x34, 0x30, 0x34, 0x12, 0x34, 0x0a, + 0x2a, 0x52, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x65, 0x64, 0x20, 0x77, 0x68, 0x65, 0x6e, 0x20, 0x74, + 0x68, 0x65, 0x20, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x20, 0x64, 0x6f, 0x65, 0x73, + 0x20, 0x6e, 0x6f, 0x74, 0x20, 0x65, 0x78, 0x69, 0x73, 0x74, 0x2e, 0x12, 0x06, 0x0a, 0x04, 0x9a, + 0x02, 0x01, 0x07, 0x5a, 0x38, 0x0a, 0x25, 0x0a, 0x0a, 0x41, 0x70, 0x69, 0x4b, 0x65, 0x79, 0x41, + 0x75, 0x74, 0x68, 0x12, 0x17, 0x08, 0x02, 0x1a, 0x11, 0x58, 0x2d, 0x52, 0x41, 0x46, 0x41, 0x59, + 0x2d, 0x41, 0x50, 0x49, 0x2d, 0x4b, 0x45, 0x59, 0x49, 0x44, 0x20, 0x02, 0x0a, 0x0f, 0x0a, 0x09, + 0x42, 0x61, 0x73, 0x69, 0x63, 0x41, 0x75, 0x74, 0x68, 0x12, 0x02, 0x08, 0x01, 0x62, 0x1f, 0x0a, + 0x0e, 0x0a, 0x0a, 0x41, 0x70, 0x69, 0x4b, 0x65, 0x79, 0x41, 0x75, 0x74, 0x68, 0x12, 0x00, 0x0a, + 0x0d, 0x0a, 0x09, 0x42, 0x61, 0x73, 0x69, 0x63, 0x41, 0x75, 0x74, 0x68, 0x12, 0x00, 0xc8, 0xe2, + 0x1e, 0x01, 0xd0, 0xe2, 0x1e, 0x01, 0xe0, 0xe2, 0x1e, 0x01, 0xc0, 0xe3, 0x1e, 0x01, 0xc8, 0xe3, + 0x1e, 0x01, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_proto_rpc_v3_user_proto_rawDescOnce sync.Once + file_proto_rpc_v3_user_proto_rawDescData = file_proto_rpc_v3_user_proto_rawDesc +) + +func file_proto_rpc_v3_user_proto_rawDescGZIP() []byte { + file_proto_rpc_v3_user_proto_rawDescOnce.Do(func() { + file_proto_rpc_v3_user_proto_rawDescData = protoimpl.X.CompressGZIP(file_proto_rpc_v3_user_proto_rawDescData) + }) + return file_proto_rpc_v3_user_proto_rawDescData +} + +var file_proto_rpc_v3_user_proto_msgTypes = make([]protoimpl.MessageInfo, 6) +var file_proto_rpc_v3_user_proto_goTypes = []interface{}{ + (*GetUsersRequest)(nil), // 0: rafay.dev.rpc.v3.GetUsersRequest + (*GetUserRequest)(nil), // 1: rafay.dev.rpc.v3.GetUserRequest + (*DeleteUserRequest)(nil), // 2: rafay.dev.rpc.v3.DeleteUserRequest + (*PutUserRequest)(nil), // 3: rafay.dev.rpc.v3.PutUserRequest + (*GetUsersResponse)(nil), // 4: rafay.dev.rpc.v3.GetUsersResponse + (*UserResponse)(nil), // 5: rafay.dev.rpc.v3.UserResponse + (*v3.User)(nil), // 6: rafay.dev.types.user.v3.User +} +var file_proto_rpc_v3_user_proto_depIdxs = []int32{ + 6, // 0: rafay.dev.rpc.v3.PutUserRequest.user:type_name -> rafay.dev.types.user.v3.User + 6, // 1: rafay.dev.rpc.v3.GetUsersResponse.user:type_name -> rafay.dev.types.user.v3.User + 6, // 2: rafay.dev.rpc.v3.User.CreateUser:input_type -> rafay.dev.types.user.v3.User + 0, // 3: rafay.dev.rpc.v3.User.GetUsers:input_type -> rafay.dev.rpc.v3.GetUsersRequest + 1, // 4: rafay.dev.rpc.v3.User.GetUser:input_type -> rafay.dev.rpc.v3.GetUserRequest + 3, // 5: rafay.dev.rpc.v3.User.UpdateUser:input_type -> rafay.dev.rpc.v3.PutUserRequest + 2, // 6: rafay.dev.rpc.v3.User.DeleteUser:input_type -> rafay.dev.rpc.v3.DeleteUserRequest + 6, // 7: rafay.dev.rpc.v3.User.CreateUser:output_type -> rafay.dev.types.user.v3.User + 4, // 8: rafay.dev.rpc.v3.User.GetUsers:output_type -> rafay.dev.rpc.v3.GetUsersResponse + 6, // 9: rafay.dev.rpc.v3.User.GetUser:output_type -> rafay.dev.types.user.v3.User + 5, // 10: rafay.dev.rpc.v3.User.UpdateUser:output_type -> rafay.dev.rpc.v3.UserResponse + 5, // 11: rafay.dev.rpc.v3.User.DeleteUser:output_type -> rafay.dev.rpc.v3.UserResponse + 7, // [7:12] is the sub-list for method output_type + 2, // [2:7] is the sub-list for method input_type + 2, // [2:2] is the sub-list for extension type_name + 2, // [2:2] is the sub-list for extension extendee + 0, // [0:2] is the sub-list for field type_name +} + +func init() { file_proto_rpc_v3_user_proto_init() } +func file_proto_rpc_v3_user_proto_init() { + if File_proto_rpc_v3_user_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_proto_rpc_v3_user_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetUsersRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_rpc_v3_user_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetUserRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_rpc_v3_user_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*DeleteUserRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_rpc_v3_user_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*PutUserRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_rpc_v3_user_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetUsersResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_rpc_v3_user_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*UserResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_proto_rpc_v3_user_proto_rawDesc, + NumEnums: 0, + NumMessages: 6, + NumExtensions: 0, + NumServices: 1, + }, + GoTypes: file_proto_rpc_v3_user_proto_goTypes, + DependencyIndexes: file_proto_rpc_v3_user_proto_depIdxs, + MessageInfos: file_proto_rpc_v3_user_proto_msgTypes, + }.Build() + File_proto_rpc_v3_user_proto = out.File + file_proto_rpc_v3_user_proto_rawDesc = nil + file_proto_rpc_v3_user_proto_goTypes = nil + file_proto_rpc_v3_user_proto_depIdxs = nil +} diff --git a/components/usermgmt/proto/proto/rpc/v3/user.pb.gw.go b/components/usermgmt/proto/proto/rpc/v3/user.pb.gw.go new file mode 100644 index 0000000..9985fea --- /dev/null +++ b/components/usermgmt/proto/proto/rpc/v3/user.pb.gw.go @@ -0,0 +1,564 @@ +// Code generated by protoc-gen-grpc-gateway. DO NOT EDIT. +// source: proto/rpc/v3/user.proto + +/* +Package rpcv3 is a reverse proxy. + +It translates gRPC into RESTful JSON APIs. +*/ +package rpcv3 + +import ( + "context" + "io" + "net/http" + + "github.com/RafaySystems/rcloud-base/components/usermgmt/proto/types/userpb/v3" + "github.com/grpc-ecosystem/grpc-gateway/v2/runtime" + "github.com/grpc-ecosystem/grpc-gateway/v2/utilities" + "google.golang.org/grpc" + "google.golang.org/grpc/codes" + "google.golang.org/grpc/grpclog" + "google.golang.org/grpc/metadata" + "google.golang.org/grpc/status" + "google.golang.org/protobuf/proto" +) + +// Suppress "imported and not used" errors +var _ codes.Code +var _ io.Reader +var _ status.Status +var _ = runtime.String +var _ = utilities.NewDoubleArray +var _ = metadata.Join + +func request_User_CreateUser_0(ctx context.Context, marshaler runtime.Marshaler, client UserClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq userv3.User + var metadata runtime.ServerMetadata + + newReader, berr := utilities.IOReaderFactory(req.Body) + if berr != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) + } + if err := marshaler.NewDecoder(newReader()).Decode(&protoReq); err != nil && err != io.EOF { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := client.CreateUser(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_User_CreateUser_0(ctx context.Context, marshaler runtime.Marshaler, server UserServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq userv3.User + var metadata runtime.ServerMetadata + + newReader, berr := utilities.IOReaderFactory(req.Body) + if berr != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) + } + if err := marshaler.NewDecoder(newReader()).Decode(&protoReq); err != nil && err != io.EOF { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := server.CreateUser(ctx, &protoReq) + return msg, metadata, err + +} + +var ( + filter_User_GetUsers_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} +) + +func request_User_GetUsers_0(ctx context.Context, marshaler runtime.Marshaler, client UserClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq GetUsersRequest + var metadata runtime.ServerMetadata + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_User_GetUsers_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := client.GetUsers(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_User_GetUsers_0(ctx context.Context, marshaler runtime.Marshaler, server UserServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq GetUsersRequest + var metadata runtime.ServerMetadata + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_User_GetUsers_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := server.GetUsers(ctx, &protoReq) + return msg, metadata, err + +} + +func request_User_GetUser_0(ctx context.Context, marshaler runtime.Marshaler, client UserClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq GetUserRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["userid"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "userid") + } + + protoReq.Userid, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "userid", err) + } + + msg, err := client.GetUser(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_User_GetUser_0(ctx context.Context, marshaler runtime.Marshaler, server UserServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq GetUserRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["userid"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "userid") + } + + protoReq.Userid, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "userid", err) + } + + msg, err := server.GetUser(ctx, &protoReq) + return msg, metadata, err + +} + +func request_User_UpdateUser_0(ctx context.Context, marshaler runtime.Marshaler, client UserClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq PutUserRequest + var metadata runtime.ServerMetadata + + newReader, berr := utilities.IOReaderFactory(req.Body) + if berr != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) + } + if err := marshaler.NewDecoder(newReader()).Decode(&protoReq.User); err != nil && err != io.EOF { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["userid"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "userid") + } + + protoReq.Userid, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "userid", err) + } + + msg, err := client.UpdateUser(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_User_UpdateUser_0(ctx context.Context, marshaler runtime.Marshaler, server UserServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq PutUserRequest + var metadata runtime.ServerMetadata + + newReader, berr := utilities.IOReaderFactory(req.Body) + if berr != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) + } + if err := marshaler.NewDecoder(newReader()).Decode(&protoReq.User); err != nil && err != io.EOF { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["userid"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "userid") + } + + protoReq.Userid, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "userid", err) + } + + msg, err := server.UpdateUser(ctx, &protoReq) + return msg, metadata, err + +} + +func request_User_DeleteUser_0(ctx context.Context, marshaler runtime.Marshaler, client UserClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq DeleteUserRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["userid"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "userid") + } + + protoReq.Userid, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "userid", err) + } + + msg, err := client.DeleteUser(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_User_DeleteUser_0(ctx context.Context, marshaler runtime.Marshaler, server UserServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq DeleteUserRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["userid"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "userid") + } + + protoReq.Userid, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "userid", err) + } + + msg, err := server.DeleteUser(ctx, &protoReq) + return msg, metadata, err + +} + +// RegisterUserHandlerServer registers the http handlers for service User to "mux". +// UnaryRPC :call UserServer directly. +// StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. +// Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterUserHandlerFromEndpoint instead. +func RegisterUserHandlerServer(ctx context.Context, mux *runtime.ServeMux, server UserServer) error { + + mux.Handle("POST", pattern_User_CreateUser_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/rafay.dev.rpc.v3.User/CreateUser", runtime.WithHTTPPathPattern("/auth/v3/users")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_User_CreateUser_0(rctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_User_CreateUser_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_User_GetUsers_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/rafay.dev.rpc.v3.User/GetUsers", runtime.WithHTTPPathPattern("/auth/v3/users")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_User_GetUsers_0(rctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_User_GetUsers_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_User_GetUser_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/rafay.dev.rpc.v3.User/GetUser", runtime.WithHTTPPathPattern("/auth/v3/user/{userid}")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_User_GetUser_0(rctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_User_GetUser_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("PUT", pattern_User_UpdateUser_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/rafay.dev.rpc.v3.User/UpdateUser", runtime.WithHTTPPathPattern("/auth/v3/user/{userid}")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_User_UpdateUser_0(rctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_User_UpdateUser_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("DELETE", pattern_User_DeleteUser_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/rafay.dev.rpc.v3.User/DeleteUser", runtime.WithHTTPPathPattern("/auth/v3/user/{userid}")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_User_DeleteUser_0(rctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_User_DeleteUser_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + return nil +} + +// RegisterUserHandlerFromEndpoint is same as RegisterUserHandler but +// automatically dials to "endpoint" and closes the connection when "ctx" gets done. +func RegisterUserHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error) { + conn, err := grpc.Dial(endpoint, opts...) + if err != nil { + return err + } + defer func() { + if err != nil { + if cerr := conn.Close(); cerr != nil { + grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr) + } + return + } + go func() { + <-ctx.Done() + if cerr := conn.Close(); cerr != nil { + grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr) + } + }() + }() + + return RegisterUserHandler(ctx, mux, conn) +} + +// RegisterUserHandler registers the http handlers for service User to "mux". +// The handlers forward requests to the grpc endpoint over "conn". +func RegisterUserHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error { + return RegisterUserHandlerClient(ctx, mux, NewUserClient(conn)) +} + +// RegisterUserHandlerClient registers the http handlers for service User +// to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "UserClient". +// Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "UserClient" +// doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in +// "UserClient" to call the correct interceptors. +func RegisterUserHandlerClient(ctx context.Context, mux *runtime.ServeMux, client UserClient) error { + + mux.Handle("POST", pattern_User_CreateUser_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateContext(ctx, mux, req, "/rafay.dev.rpc.v3.User/CreateUser", runtime.WithHTTPPathPattern("/auth/v3/users")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_User_CreateUser_0(rctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_User_CreateUser_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_User_GetUsers_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateContext(ctx, mux, req, "/rafay.dev.rpc.v3.User/GetUsers", runtime.WithHTTPPathPattern("/auth/v3/users")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_User_GetUsers_0(rctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_User_GetUsers_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_User_GetUser_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateContext(ctx, mux, req, "/rafay.dev.rpc.v3.User/GetUser", runtime.WithHTTPPathPattern("/auth/v3/user/{userid}")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_User_GetUser_0(rctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_User_GetUser_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("PUT", pattern_User_UpdateUser_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateContext(ctx, mux, req, "/rafay.dev.rpc.v3.User/UpdateUser", runtime.WithHTTPPathPattern("/auth/v3/user/{userid}")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_User_UpdateUser_0(rctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_User_UpdateUser_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("DELETE", pattern_User_DeleteUser_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateContext(ctx, mux, req, "/rafay.dev.rpc.v3.User/DeleteUser", runtime.WithHTTPPathPattern("/auth/v3/user/{userid}")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_User_DeleteUser_0(rctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_User_DeleteUser_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + return nil +} + +var ( + pattern_User_CreateUser_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"auth", "v3", "users"}, "")) + + pattern_User_GetUsers_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"auth", "v3", "users"}, "")) + + pattern_User_GetUser_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3}, []string{"auth", "v3", "user", "userid"}, "")) + + pattern_User_UpdateUser_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3}, []string{"auth", "v3", "user", "userid"}, "")) + + pattern_User_DeleteUser_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3}, []string{"auth", "v3", "user", "userid"}, "")) +) + +var ( + forward_User_CreateUser_0 = runtime.ForwardResponseMessage + + forward_User_GetUsers_0 = runtime.ForwardResponseMessage + + forward_User_GetUser_0 = runtime.ForwardResponseMessage + + forward_User_UpdateUser_0 = runtime.ForwardResponseMessage + + forward_User_DeleteUser_0 = runtime.ForwardResponseMessage +) diff --git a/components/usermgmt/proto/proto/rpc/v3/user.proto b/components/usermgmt/proto/proto/rpc/v3/user.proto new file mode 100644 index 0000000..f181039 --- /dev/null +++ b/components/usermgmt/proto/proto/rpc/v3/user.proto @@ -0,0 +1,121 @@ +syntax = "proto3"; +package rafay.dev.rpc.v3; + +import "google/api/annotations.proto"; +import "gogoproto/gogo.proto"; +import "protoc-gen-openapiv2/options/annotations.proto"; +import "proto/types/userpb/v3/user.proto"; + +// Enable custom Marshal method. +option (gogoproto.marshaler_all) = true; +// Enable custom Unmarshal method. +option (gogoproto.unmarshaler_all) = true; +// Enable custom Size method (Required by Marshal and Unmarshal). +option (gogoproto.sizer_all) = true; +// Enable registration with golang/protobuf for the grpc-gateway. +option (gogoproto.goproto_registration) = true; +// Enable generation of XXX_MessageName methods for grpc-go/status. +option (gogoproto.messagename_all) = true; + +option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_swagger) = { + info : { + title : "User management Service" + version : "2.0" + contact : {name : "Rafay Dev"} + } + schemes : HTTPS + consumes : "application/json" + consumes : "application/yaml" + produces : "application/json" + produces : "application/yaml" + security_definitions : { + security : { + key : "BasicAuth" + value : {type : TYPE_BASIC} + } + security : { + key : "ApiKeyAuth" + value : {type : TYPE_API_KEY in : IN_HEADER name : "X-RAFAY-API-KEYID"} + } + } + security : { + security_requirement : { + key : "BasicAuth" + value : {} + } + security_requirement : { + key : "ApiKeyAuth" + value : {} + } + } + responses : { + key : "403" + value : { + description : "Returned when the user does not have permission to access " + "the resource." + } + } + responses : { + key : "404" + value : { + description : "Returned when the resource does not exist." + schema : {json_schema : {type : STRING}} + } + } +}; + +// Add option to filter by more org and group +message GetUsersRequest { string project = 1; } +message GetUserRequest { string userid = 1; } +message DeleteUserRequest { string userid = 1; } +message PutUserRequest { + string userid = 1; + rafay.dev.types.user.v3.User user = 2; +} +message GetUsersResponse { repeated rafay.dev.types.user.v3.User user = 1; } +message UserResponse { + string status = 1; + string message = 2; +} + +service User { + rpc CreateUser(rafay.dev.types.user.v3.User) + returns (rafay.dev.types.user.v3.User) { + option (google.api.http) = { + post : "/auth/v3/users" + body : "*" + }; + + option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation) = { + responses : { + key : "201" + value : {description : "Returned when user is created successfully."} + } + }; + }; + + rpc GetUsers(GetUsersRequest) returns (GetUsersResponse) { + option (google.api.http) = { + get : "/auth/v3/users" + }; + }; + + rpc GetUser(GetUserRequest) returns (rafay.dev.types.user.v3.User) { + option (google.api.http) = { + get : "/auth/v3/user/{userid}" + }; + }; + + rpc UpdateUser(PutUserRequest) returns (UserResponse) { + option (google.api.http) = { + put : "/auth/v3/user/{userid}" + body : "user" + }; + }; + + rpc DeleteUser(DeleteUserRequest) returns (UserResponse) { + option (google.api.http) = { + delete : "/auth/v3/user/{userid}" + }; + }; +} \ No newline at end of file diff --git a/components/usermgmt/proto/proto/rpc/v3/user_grpc.pb.go b/components/usermgmt/proto/proto/rpc/v3/user_grpc.pb.go new file mode 100644 index 0000000..5fd6ffb --- /dev/null +++ b/components/usermgmt/proto/proto/rpc/v3/user_grpc.pb.go @@ -0,0 +1,248 @@ +// Code generated by protoc-gen-go-grpc. DO NOT EDIT. +// versions: +// - protoc-gen-go-grpc v1.2.0 +// - protoc v3.19.1 +// source: proto/rpc/v3/user.proto + +package rpcv3 + +import ( + context "context" + v3 "github.com/RafaySystems/rcloud-base/components/usermgmt/proto/types/userpb/v3" + grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" +) + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +// Requires gRPC-Go v1.32.0 or later. +const _ = grpc.SupportPackageIsVersion7 + +// UserClient is the client API for User service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. +type UserClient interface { + CreateUser(ctx context.Context, in *v3.User, opts ...grpc.CallOption) (*v3.User, error) + GetUsers(ctx context.Context, in *GetUsersRequest, opts ...grpc.CallOption) (*GetUsersResponse, error) + GetUser(ctx context.Context, in *GetUserRequest, opts ...grpc.CallOption) (*v3.User, error) + UpdateUser(ctx context.Context, in *PutUserRequest, opts ...grpc.CallOption) (*UserResponse, error) + DeleteUser(ctx context.Context, in *DeleteUserRequest, opts ...grpc.CallOption) (*UserResponse, error) +} + +type userClient struct { + cc grpc.ClientConnInterface +} + +func NewUserClient(cc grpc.ClientConnInterface) UserClient { + return &userClient{cc} +} + +func (c *userClient) CreateUser(ctx context.Context, in *v3.User, opts ...grpc.CallOption) (*v3.User, error) { + out := new(v3.User) + err := c.cc.Invoke(ctx, "/rafay.dev.rpc.v3.User/CreateUser", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *userClient) GetUsers(ctx context.Context, in *GetUsersRequest, opts ...grpc.CallOption) (*GetUsersResponse, error) { + out := new(GetUsersResponse) + err := c.cc.Invoke(ctx, "/rafay.dev.rpc.v3.User/GetUsers", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *userClient) GetUser(ctx context.Context, in *GetUserRequest, opts ...grpc.CallOption) (*v3.User, error) { + out := new(v3.User) + err := c.cc.Invoke(ctx, "/rafay.dev.rpc.v3.User/GetUser", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *userClient) UpdateUser(ctx context.Context, in *PutUserRequest, opts ...grpc.CallOption) (*UserResponse, error) { + out := new(UserResponse) + err := c.cc.Invoke(ctx, "/rafay.dev.rpc.v3.User/UpdateUser", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *userClient) DeleteUser(ctx context.Context, in *DeleteUserRequest, opts ...grpc.CallOption) (*UserResponse, error) { + out := new(UserResponse) + err := c.cc.Invoke(ctx, "/rafay.dev.rpc.v3.User/DeleteUser", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// UserServer is the server API for User service. +// All implementations should embed UnimplementedUserServer +// for forward compatibility +type UserServer interface { + CreateUser(context.Context, *v3.User) (*v3.User, error) + GetUsers(context.Context, *GetUsersRequest) (*GetUsersResponse, error) + GetUser(context.Context, *GetUserRequest) (*v3.User, error) + UpdateUser(context.Context, *PutUserRequest) (*UserResponse, error) + DeleteUser(context.Context, *DeleteUserRequest) (*UserResponse, error) +} + +// UnimplementedUserServer should be embedded to have forward compatible implementations. +type UnimplementedUserServer struct { +} + +func (UnimplementedUserServer) CreateUser(context.Context, *v3.User) (*v3.User, error) { + return nil, status.Errorf(codes.Unimplemented, "method CreateUser not implemented") +} +func (UnimplementedUserServer) GetUsers(context.Context, *GetUsersRequest) (*GetUsersResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetUsers not implemented") +} +func (UnimplementedUserServer) GetUser(context.Context, *GetUserRequest) (*v3.User, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetUser not implemented") +} +func (UnimplementedUserServer) UpdateUser(context.Context, *PutUserRequest) (*UserResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method UpdateUser not implemented") +} +func (UnimplementedUserServer) DeleteUser(context.Context, *DeleteUserRequest) (*UserResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method DeleteUser not implemented") +} + +// UnsafeUserServer may be embedded to opt out of forward compatibility for this service. +// Use of this interface is not recommended, as added methods to UserServer will +// result in compilation errors. +type UnsafeUserServer interface { + mustEmbedUnimplementedUserServer() +} + +func RegisterUserServer(s grpc.ServiceRegistrar, srv UserServer) { + s.RegisterService(&User_ServiceDesc, srv) +} + +func _User_CreateUser_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(v3.User) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(UserServer).CreateUser(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/rafay.dev.rpc.v3.User/CreateUser", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(UserServer).CreateUser(ctx, req.(*v3.User)) + } + return interceptor(ctx, in, info, handler) +} + +func _User_GetUsers_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetUsersRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(UserServer).GetUsers(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/rafay.dev.rpc.v3.User/GetUsers", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(UserServer).GetUsers(ctx, req.(*GetUsersRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _User_GetUser_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetUserRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(UserServer).GetUser(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/rafay.dev.rpc.v3.User/GetUser", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(UserServer).GetUser(ctx, req.(*GetUserRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _User_UpdateUser_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(PutUserRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(UserServer).UpdateUser(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/rafay.dev.rpc.v3.User/UpdateUser", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(UserServer).UpdateUser(ctx, req.(*PutUserRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _User_DeleteUser_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(DeleteUserRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(UserServer).DeleteUser(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/rafay.dev.rpc.v3.User/DeleteUser", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(UserServer).DeleteUser(ctx, req.(*DeleteUserRequest)) + } + return interceptor(ctx, in, info, handler) +} + +// User_ServiceDesc is the grpc.ServiceDesc for User service. +// It's only intended for direct use with grpc.RegisterService, +// and not to be introspected or modified (even as a copy) +var User_ServiceDesc = grpc.ServiceDesc{ + ServiceName: "rafay.dev.rpc.v3.User", + HandlerType: (*UserServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "CreateUser", + Handler: _User_CreateUser_Handler, + }, + { + MethodName: "GetUsers", + Handler: _User_GetUsers_Handler, + }, + { + MethodName: "GetUser", + Handler: _User_GetUser_Handler, + }, + { + MethodName: "UpdateUser", + Handler: _User_UpdateUser_Handler, + }, + { + MethodName: "DeleteUser", + Handler: _User_DeleteUser_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "proto/rpc/v3/user.proto", +} diff --git a/components/usermgmt/proto/proto/types/userpb/v3/group.pb.go b/components/usermgmt/proto/proto/types/userpb/v3/group.pb.go new file mode 100644 index 0000000..decddce --- /dev/null +++ b/components/usermgmt/proto/proto/types/userpb/v3/group.pb.go @@ -0,0 +1,538 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.27.1 +// protoc v3.19.1 +// source: proto/types/userpb/v3/group.proto + +package userv3 + +import ( + v3 "github.com/RafaySystems/rcloud-base/components/usermgmt/proto/types/commonpb/v3" + v31 "github.com/RafaySystems/rcloud-base/components/usermgmt/proto/types/systempb/v3" + _ "github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-openapiv2/options" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +type Group struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + ApiVersion string `protobuf:"bytes,1,opt,name=apiVersion,proto3" json:"apiVersion,omitempty"` + Kind string `protobuf:"bytes,2,opt,name=kind,proto3" json:"kind,omitempty"` + Metadata *v3.Metadata `protobuf:"bytes,3,opt,name=metadata,proto3" json:"metadata,omitempty"` + Spec *GroupSpec `protobuf:"bytes,4,opt,name=spec,proto3" json:"spec,omitempty"` + Status *v3.Status `protobuf:"bytes,5,opt,name=status,proto3" json:"status,omitempty"` +} + +func (x *Group) Reset() { + *x = Group{} + if protoimpl.UnsafeEnabled { + mi := &file_proto_types_userpb_v3_group_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Group) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Group) ProtoMessage() {} + +func (x *Group) ProtoReflect() protoreflect.Message { + mi := &file_proto_types_userpb_v3_group_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Group.ProtoReflect.Descriptor instead. +func (*Group) Descriptor() ([]byte, []int) { + return file_proto_types_userpb_v3_group_proto_rawDescGZIP(), []int{0} +} + +func (x *Group) GetApiVersion() string { + if x != nil { + return x.ApiVersion + } + return "" +} + +func (x *Group) GetKind() string { + if x != nil { + return x.Kind + } + return "" +} + +func (x *Group) GetMetadata() *v3.Metadata { + if x != nil { + return x.Metadata + } + return nil +} + +func (x *Group) GetSpec() *GroupSpec { + if x != nil { + return x.Spec + } + return nil +} + +func (x *Group) GetStatus() *v3.Status { + if x != nil { + return x.Status + } + return nil +} + +type ProjectRole struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Project *v31.Project `protobuf:"bytes,1,opt,name=project,proto3" json:"project,omitempty"` + Role *Role `protobuf:"bytes,2,opt,name=role,proto3" json:"role,omitempty"` +} + +func (x *ProjectRole) Reset() { + *x = ProjectRole{} + if protoimpl.UnsafeEnabled { + mi := &file_proto_types_userpb_v3_group_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ProjectRole) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ProjectRole) ProtoMessage() {} + +func (x *ProjectRole) ProtoReflect() protoreflect.Message { + mi := &file_proto_types_userpb_v3_group_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ProjectRole.ProtoReflect.Descriptor instead. +func (*ProjectRole) Descriptor() ([]byte, []int) { + return file_proto_types_userpb_v3_group_proto_rawDescGZIP(), []int{1} +} + +func (x *ProjectRole) GetProject() *v31.Project { + if x != nil { + return x.Project + } + return nil +} + +func (x *ProjectRole) GetRole() *Role { + if x != nil { + return x.Role + } + return nil +} + +type GroupSpec struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Projectroles []*ProjectRole `protobuf:"bytes,1,rep,name=projectroles,proto3" json:"projectroles,omitempty"` + Users []string `protobuf:"bytes,2,rep,name=users,proto3" json:"users,omitempty"` + Type string `protobuf:"bytes,3,opt,name=type,proto3" json:"type,omitempty"` +} + +func (x *GroupSpec) Reset() { + *x = GroupSpec{} + if protoimpl.UnsafeEnabled { + mi := &file_proto_types_userpb_v3_group_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GroupSpec) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GroupSpec) ProtoMessage() {} + +func (x *GroupSpec) ProtoReflect() protoreflect.Message { + mi := &file_proto_types_userpb_v3_group_proto_msgTypes[2] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GroupSpec.ProtoReflect.Descriptor instead. +func (*GroupSpec) Descriptor() ([]byte, []int) { + return file_proto_types_userpb_v3_group_proto_rawDescGZIP(), []int{2} +} + +func (x *GroupSpec) GetProjectroles() []*ProjectRole { + if x != nil { + return x.Projectroles + } + return nil +} + +func (x *GroupSpec) GetUsers() []string { + if x != nil { + return x.Users + } + return nil +} + +func (x *GroupSpec) GetType() string { + if x != nil { + return x.Type + } + return "" +} + +type GroupList struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + ApiVersion string `protobuf:"bytes,1,opt,name=apiVersion,proto3" json:"apiVersion,omitempty"` + Kind string `protobuf:"bytes,2,opt,name=kind,proto3" json:"kind,omitempty"` + Metadata *v3.ListMetadata `protobuf:"bytes,3,opt,name=metadata,proto3" json:"metadata,omitempty"` + Items []*Group `protobuf:"bytes,4,rep,name=items,proto3" json:"items,omitempty"` +} + +func (x *GroupList) Reset() { + *x = GroupList{} + if protoimpl.UnsafeEnabled { + mi := &file_proto_types_userpb_v3_group_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GroupList) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GroupList) ProtoMessage() {} + +func (x *GroupList) ProtoReflect() protoreflect.Message { + mi := &file_proto_types_userpb_v3_group_proto_msgTypes[3] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GroupList.ProtoReflect.Descriptor instead. +func (*GroupList) Descriptor() ([]byte, []int) { + return file_proto_types_userpb_v3_group_proto_rawDescGZIP(), []int{3} +} + +func (x *GroupList) GetApiVersion() string { + if x != nil { + return x.ApiVersion + } + return "" +} + +func (x *GroupList) GetKind() string { + if x != nil { + return x.Kind + } + return "" +} + +func (x *GroupList) GetMetadata() *v3.ListMetadata { + if x != nil { + return x.Metadata + } + return nil +} + +func (x *GroupList) GetItems() []*Group { + if x != nil { + return x.Items + } + return nil +} + +var File_proto_types_userpb_v3_group_proto protoreflect.FileDescriptor + +var file_proto_types_userpb_v3_group_proto_rawDesc = []byte{ + 0x0a, 0x21, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2f, 0x75, 0x73, + 0x65, 0x72, 0x70, 0x62, 0x2f, 0x76, 0x33, 0x2f, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x12, 0x17, 0x72, 0x61, 0x66, 0x61, 0x79, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x74, + 0x79, 0x70, 0x65, 0x73, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x1a, 0x24, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, + 0x70, 0x62, 0x2f, 0x76, 0x33, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x1a, 0x25, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2f, + 0x73, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x70, 0x62, 0x2f, 0x76, 0x33, 0x2f, 0x70, 0x72, 0x6f, 0x6a, + 0x65, 0x63, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x20, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2f, 0x75, 0x73, 0x65, 0x72, 0x70, 0x62, 0x2f, 0x76, 0x33, + 0x2f, 0x72, 0x6f, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x63, 0x2d, 0x67, 0x65, 0x6e, 0x2d, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x76, + 0x32, 0x2f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xad, 0x04, 0x0a, 0x05, + 0x47, 0x72, 0x6f, 0x75, 0x70, 0x12, 0x6b, 0x0a, 0x0a, 0x61, 0x70, 0x69, 0x56, 0x65, 0x72, 0x73, + 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x4b, 0x92, 0x41, 0x48, 0x2a, 0x0b, + 0x41, 0x50, 0x49, 0x20, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x32, 0x21, 0x41, 0x50, 0x49, + 0x20, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, 0x20, + 0x67, 0x72, 0x6f, 0x75, 0x70, 0x20, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x3a, 0x16, + 0x75, 0x73, 0x65, 0x72, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x6b, 0x38, 0x73, 0x6d, 0x67, 0x6d, 0x74, + 0x2e, 0x69, 0x6f, 0x2f, 0x76, 0x33, 0x52, 0x0a, 0x61, 0x70, 0x69, 0x56, 0x65, 0x72, 0x73, 0x69, + 0x6f, 0x6e, 0x12, 0x43, 0x0a, 0x04, 0x6b, 0x69, 0x6e, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, + 0x42, 0x2f, 0x92, 0x41, 0x2c, 0x2a, 0x04, 0x4b, 0x69, 0x6e, 0x64, 0x32, 0x1a, 0x4b, 0x69, 0x6e, + 0x64, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, 0x20, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x20, 0x72, + 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x3a, 0x08, 0x50, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, + 0x65, 0x52, 0x04, 0x6b, 0x69, 0x6e, 0x64, 0x12, 0x6e, 0x0a, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, + 0x61, 0x74, 0x61, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x72, 0x61, 0x66, 0x61, + 0x79, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, + 0x6f, 0x6e, 0x2e, 0x76, 0x33, 0x2e, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x42, 0x2d, + 0x92, 0x41, 0x2a, 0x2a, 0x08, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x32, 0x1e, 0x4d, + 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, 0x20, 0x67, + 0x72, 0x6f, 0x75, 0x70, 0x20, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x08, 0x6d, + 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x65, 0x0a, 0x04, 0x73, 0x70, 0x65, 0x63, 0x18, + 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x72, 0x61, 0x66, 0x61, 0x79, 0x2e, 0x64, 0x65, + 0x76, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x2e, + 0x47, 0x72, 0x6f, 0x75, 0x70, 0x53, 0x70, 0x65, 0x63, 0x42, 0x2d, 0x92, 0x41, 0x2a, 0x2a, 0x08, + 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x32, 0x1e, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, + 0x74, 0x61, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, 0x20, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x20, + 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x04, 0x73, 0x70, 0x65, 0x63, 0x12, 0x60, + 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x21, + 0x2e, 0x72, 0x61, 0x66, 0x61, 0x79, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, + 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x33, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x75, + 0x73, 0x42, 0x25, 0x92, 0x41, 0x22, 0x2a, 0x06, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x32, 0x16, + 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, 0x20, 0x72, 0x65, + 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x40, 0x01, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, + 0x3a, 0x39, 0x92, 0x41, 0x36, 0x0a, 0x34, 0x2a, 0x05, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x32, 0x05, + 0x47, 0x72, 0x6f, 0x75, 0x70, 0xd2, 0x01, 0x0a, 0x61, 0x70, 0x69, 0x56, 0x65, 0x72, 0x73, 0x69, + 0x6f, 0x6e, 0xd2, 0x01, 0x04, 0x6b, 0x69, 0x6e, 0x64, 0xd2, 0x01, 0x08, 0x6d, 0x65, 0x74, 0x61, + 0x64, 0x61, 0x74, 0x61, 0xd2, 0x01, 0x04, 0x73, 0x70, 0x65, 0x63, 0x22, 0xe3, 0x01, 0x0a, 0x0b, + 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x6f, 0x6c, 0x65, 0x12, 0x53, 0x0a, 0x07, 0x70, + 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x72, + 0x61, 0x66, 0x61, 0x79, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x73, + 0x79, 0x73, 0x74, 0x65, 0x6d, 0x2e, 0x76, 0x33, 0x2e, 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, + 0x42, 0x15, 0x92, 0x41, 0x12, 0x2a, 0x07, 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x32, 0x07, + 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x07, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, + 0x12, 0x42, 0x0a, 0x04, 0x72, 0x6f, 0x6c, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1d, + 0x2e, 0x72, 0x61, 0x66, 0x61, 0x79, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, + 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x2e, 0x52, 0x6f, 0x6c, 0x65, 0x42, 0x0f, 0x92, + 0x41, 0x0c, 0x2a, 0x04, 0x52, 0x6f, 0x6c, 0x65, 0x32, 0x04, 0x52, 0x6f, 0x6c, 0x65, 0x52, 0x04, + 0x72, 0x6f, 0x6c, 0x65, 0x3a, 0x3b, 0x92, 0x41, 0x38, 0x0a, 0x36, 0x2a, 0x0b, 0x50, 0x72, 0x6f, + 0x6a, 0x65, 0x63, 0x74, 0x52, 0x6f, 0x6c, 0x65, 0x32, 0x27, 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63, + 0x74, 0x20, 0x61, 0x6e, 0x64, 0x20, 0x72, 0x6f, 0x6c, 0x65, 0x20, 0x70, 0x61, 0x69, 0x72, 0x69, + 0x6e, 0x67, 0x20, 0x66, 0x6f, 0x72, 0x20, 0x70, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, + 0x6e, 0x22, 0xa5, 0x02, 0x0a, 0x09, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x53, 0x70, 0x65, 0x63, 0x12, + 0x7e, 0x0a, 0x0c, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x72, 0x6f, 0x6c, 0x65, 0x73, 0x18, + 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x72, 0x61, 0x66, 0x61, 0x79, 0x2e, 0x64, 0x65, + 0x76, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x2e, + 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x6f, 0x6c, 0x65, 0x42, 0x34, 0x92, 0x41, 0x31, + 0x2a, 0x0c, 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x6f, 0x6c, 0x65, 0x73, 0x32, 0x21, + 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x6f, 0x6c, 0x65, 0x20, 0x67, 0x72, 0x6f, 0x75, + 0x70, 0x73, 0x20, 0x66, 0x6f, 0x72, 0x20, 0x70, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, + 0x6e, 0x52, 0x0c, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x72, 0x6f, 0x6c, 0x65, 0x73, 0x12, + 0x39, 0x0a, 0x05, 0x75, 0x73, 0x65, 0x72, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x42, 0x23, + 0x92, 0x41, 0x20, 0x2a, 0x05, 0x55, 0x73, 0x65, 0x72, 0x73, 0x32, 0x17, 0x4c, 0x69, 0x73, 0x74, + 0x20, 0x6f, 0x66, 0x20, 0x75, 0x73, 0x65, 0x72, 0x73, 0x20, 0x66, 0x6f, 0x72, 0x20, 0x67, 0x72, + 0x6f, 0x75, 0x70, 0x52, 0x05, 0x75, 0x73, 0x65, 0x72, 0x73, 0x12, 0x2c, 0x0a, 0x04, 0x74, 0x79, + 0x70, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x42, 0x18, 0x92, 0x41, 0x15, 0x2a, 0x04, 0x54, + 0x79, 0x70, 0x65, 0x32, 0x0d, 0x54, 0x79, 0x70, 0x65, 0x20, 0x6f, 0x66, 0x20, 0x67, 0x72, 0x6f, + 0x75, 0x70, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x3a, 0x2f, 0x92, 0x41, 0x2c, 0x0a, 0x2a, 0x2a, + 0x13, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x20, 0x53, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x63, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x32, 0x13, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x20, 0x73, 0x70, 0x65, 0x63, + 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0xa5, 0x03, 0x0a, 0x09, 0x47, 0x72, + 0x6f, 0x75, 0x70, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x5a, 0x0a, 0x0a, 0x61, 0x70, 0x69, 0x56, 0x65, + 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x3a, 0x92, 0x41, 0x37, + 0x2a, 0x0b, 0x41, 0x50, 0x49, 0x20, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x32, 0x26, 0x41, + 0x50, 0x49, 0x20, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, + 0x65, 0x20, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x20, 0x6c, 0x69, 0x73, 0x74, 0x20, 0x72, 0x65, 0x73, + 0x6f, 0x75, 0x72, 0x63, 0x65, 0x40, 0x01, 0x52, 0x0a, 0x61, 0x70, 0x69, 0x56, 0x65, 0x72, 0x73, + 0x69, 0x6f, 0x6e, 0x12, 0x40, 0x0a, 0x04, 0x6b, 0x69, 0x6e, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x09, 0x42, 0x2c, 0x92, 0x41, 0x29, 0x2a, 0x04, 0x4b, 0x69, 0x6e, 0x64, 0x32, 0x1f, 0x4b, 0x69, + 0x6e, 0x64, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, 0x20, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x20, + 0x6c, 0x69, 0x73, 0x74, 0x20, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x40, 0x01, 0x52, + 0x04, 0x6b, 0x69, 0x6e, 0x64, 0x12, 0x79, 0x0a, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, + 0x61, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x72, 0x61, 0x66, 0x61, 0x79, 0x2e, + 0x64, 0x65, 0x76, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, + 0x2e, 0x76, 0x33, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, + 0x42, 0x34, 0x92, 0x41, 0x31, 0x2a, 0x08, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x32, + 0x23, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, + 0x20, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x20, 0x6c, 0x69, 0x73, 0x74, 0x20, 0x72, 0x65, 0x73, 0x6f, + 0x75, 0x72, 0x63, 0x65, 0x40, 0x01, 0x52, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, + 0x12, 0x5f, 0x0a, 0x05, 0x69, 0x74, 0x65, 0x6d, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, + 0x1e, 0x2e, 0x72, 0x61, 0x66, 0x61, 0x79, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x74, 0x79, 0x70, 0x65, + 0x73, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x2e, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x42, + 0x29, 0x92, 0x41, 0x26, 0x2a, 0x05, 0x49, 0x74, 0x65, 0x6d, 0x73, 0x32, 0x1b, 0x4c, 0x69, 0x73, + 0x74, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, 0x20, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x20, 0x72, + 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x40, 0x01, 0x52, 0x05, 0x69, 0x74, 0x65, 0x6d, + 0x73, 0x3a, 0x1e, 0x92, 0x41, 0x1b, 0x0a, 0x19, 0x2a, 0x09, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x4c, + 0x69, 0x73, 0x74, 0x32, 0x0a, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x20, 0x6c, 0x69, 0x73, 0x74, 0x40, + 0x01, 0x42, 0x80, 0x02, 0x0a, 0x1b, 0x63, 0x6f, 0x6d, 0x2e, 0x72, 0x61, 0x66, 0x61, 0x79, 0x2e, + 0x64, 0x65, 0x76, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x76, + 0x33, 0x42, 0x0a, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, + 0x54, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x52, 0x61, 0x66, 0x61, + 0x79, 0x53, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x73, 0x2f, 0x72, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2d, + 0x62, 0x61, 0x73, 0x65, 0x2f, 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x73, 0x2f, + 0x75, 0x73, 0x65, 0x72, 0x6d, 0x67, 0x6d, 0x74, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x74, + 0x79, 0x70, 0x65, 0x73, 0x2f, 0x75, 0x73, 0x65, 0x72, 0x70, 0x62, 0x2f, 0x76, 0x33, 0x3b, 0x75, + 0x73, 0x65, 0x72, 0x76, 0x33, 0xa2, 0x02, 0x04, 0x52, 0x44, 0x54, 0x55, 0xaa, 0x02, 0x17, 0x52, + 0x61, 0x66, 0x61, 0x79, 0x2e, 0x44, 0x65, 0x76, 0x2e, 0x54, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x55, + 0x73, 0x65, 0x72, 0x2e, 0x56, 0x33, 0xca, 0x02, 0x17, 0x52, 0x61, 0x66, 0x61, 0x79, 0x5c, 0x44, + 0x65, 0x76, 0x5c, 0x54, 0x79, 0x70, 0x65, 0x73, 0x5c, 0x55, 0x73, 0x65, 0x72, 0x5c, 0x56, 0x33, + 0xe2, 0x02, 0x23, 0x52, 0x61, 0x66, 0x61, 0x79, 0x5c, 0x44, 0x65, 0x76, 0x5c, 0x54, 0x79, 0x70, + 0x65, 0x73, 0x5c, 0x55, 0x73, 0x65, 0x72, 0x5c, 0x56, 0x33, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, + 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x1b, 0x52, 0x61, 0x66, 0x61, 0x79, 0x3a, 0x3a, + 0x44, 0x65, 0x76, 0x3a, 0x3a, 0x54, 0x79, 0x70, 0x65, 0x73, 0x3a, 0x3a, 0x55, 0x73, 0x65, 0x72, + 0x3a, 0x3a, 0x56, 0x33, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_proto_types_userpb_v3_group_proto_rawDescOnce sync.Once + file_proto_types_userpb_v3_group_proto_rawDescData = file_proto_types_userpb_v3_group_proto_rawDesc +) + +func file_proto_types_userpb_v3_group_proto_rawDescGZIP() []byte { + file_proto_types_userpb_v3_group_proto_rawDescOnce.Do(func() { + file_proto_types_userpb_v3_group_proto_rawDescData = protoimpl.X.CompressGZIP(file_proto_types_userpb_v3_group_proto_rawDescData) + }) + return file_proto_types_userpb_v3_group_proto_rawDescData +} + +var file_proto_types_userpb_v3_group_proto_msgTypes = make([]protoimpl.MessageInfo, 4) +var file_proto_types_userpb_v3_group_proto_goTypes = []interface{}{ + (*Group)(nil), // 0: rafay.dev.types.user.v3.Group + (*ProjectRole)(nil), // 1: rafay.dev.types.user.v3.ProjectRole + (*GroupSpec)(nil), // 2: rafay.dev.types.user.v3.GroupSpec + (*GroupList)(nil), // 3: rafay.dev.types.user.v3.GroupList + (*v3.Metadata)(nil), // 4: rafay.dev.types.common.v3.Metadata + (*v3.Status)(nil), // 5: rafay.dev.types.common.v3.Status + (*v31.Project)(nil), // 6: rafay.dev.types.system.v3.Project + (*Role)(nil), // 7: rafay.dev.types.user.v3.Role + (*v3.ListMetadata)(nil), // 8: rafay.dev.types.common.v3.ListMetadata +} +var file_proto_types_userpb_v3_group_proto_depIdxs = []int32{ + 4, // 0: rafay.dev.types.user.v3.Group.metadata:type_name -> rafay.dev.types.common.v3.Metadata + 2, // 1: rafay.dev.types.user.v3.Group.spec:type_name -> rafay.dev.types.user.v3.GroupSpec + 5, // 2: rafay.dev.types.user.v3.Group.status:type_name -> rafay.dev.types.common.v3.Status + 6, // 3: rafay.dev.types.user.v3.ProjectRole.project:type_name -> rafay.dev.types.system.v3.Project + 7, // 4: rafay.dev.types.user.v3.ProjectRole.role:type_name -> rafay.dev.types.user.v3.Role + 1, // 5: rafay.dev.types.user.v3.GroupSpec.projectroles:type_name -> rafay.dev.types.user.v3.ProjectRole + 8, // 6: rafay.dev.types.user.v3.GroupList.metadata:type_name -> rafay.dev.types.common.v3.ListMetadata + 0, // 7: rafay.dev.types.user.v3.GroupList.items:type_name -> rafay.dev.types.user.v3.Group + 8, // [8:8] is the sub-list for method output_type + 8, // [8:8] is the sub-list for method input_type + 8, // [8:8] is the sub-list for extension type_name + 8, // [8:8] is the sub-list for extension extendee + 0, // [0:8] is the sub-list for field type_name +} + +func init() { file_proto_types_userpb_v3_group_proto_init() } +func file_proto_types_userpb_v3_group_proto_init() { + if File_proto_types_userpb_v3_group_proto != nil { + return + } + file_proto_types_userpb_v3_role_proto_init() + if !protoimpl.UnsafeEnabled { + file_proto_types_userpb_v3_group_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Group); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_types_userpb_v3_group_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ProjectRole); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_types_userpb_v3_group_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GroupSpec); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_types_userpb_v3_group_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GroupList); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_proto_types_userpb_v3_group_proto_rawDesc, + NumEnums: 0, + NumMessages: 4, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_proto_types_userpb_v3_group_proto_goTypes, + DependencyIndexes: file_proto_types_userpb_v3_group_proto_depIdxs, + MessageInfos: file_proto_types_userpb_v3_group_proto_msgTypes, + }.Build() + File_proto_types_userpb_v3_group_proto = out.File + file_proto_types_userpb_v3_group_proto_rawDesc = nil + file_proto_types_userpb_v3_group_proto_goTypes = nil + file_proto_types_userpb_v3_group_proto_depIdxs = nil +} diff --git a/components/usermgmt/proto/proto/types/userpb/v3/group.proto b/components/usermgmt/proto/proto/types/userpb/v3/group.proto new file mode 100644 index 0000000..041e675 --- /dev/null +++ b/components/usermgmt/proto/proto/types/userpb/v3/group.proto @@ -0,0 +1,124 @@ +syntax = "proto3"; +package rafay.dev.types.user.v3; + +import "proto/types/commonpb/v3/common.proto"; +import "proto/types/systempb/v3/project.proto"; +import "proto/types/userpb/v3/role.proto"; +import "protoc-gen-openapiv2/options/annotations.proto"; +// import "google/api/field_behavior.proto"; + +message Group { + option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_schema) = { + json_schema : { + title : "Group" + description : "Group" + required : [ "apiVersion", "kind", "metadata", "spec" ] + } + }; + string apiVersion = 1 + [ (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { + title : "API Version", + description : "API Version of the group resource" + default : "usermgmt.k8smgmt.io/v3" + } ]; + string kind = 2 + [ (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { + title : "Kind", + description : "Kind of the group resource" + default : "Pipeline" + } ]; + rafay.dev.types.common.v3.Metadata metadata = 3 + [ (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { + title : "Metadata", + description : "Metadata of the group resource" + } ]; + GroupSpec spec = 4 + [ (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { + title : "Metadata", + description : "Metadata of the group resource" + } ]; + rafay.dev.types.common.v3.Status status = 5 + [ (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { + title : "Status", + description : "Status of the resource" + read_only : true + } ]; +} + +message ProjectRole { + option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_schema) = { + json_schema : { + title : "ProjectRole" + description : "Project and role pairing for permission" + } + }; + rafay.dev.types.system.v3.Project project = 1 + [ (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { + title : "Project" + description : "Project" + } ]; + rafay.dev.types.user.v3.Role role = 2 + [ (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { + title : "Role" + description : "Role" + } ]; +} + +message GroupSpec { + option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_schema) = { + json_schema : { + title : "Group Specification" + description : "Group specification" + } + }; + repeated ProjectRole projectroles = 1 + [ (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { + title : "ProjectRoles" + description : "ProjectRole groups for permission" + } ]; + repeated string users = 2 + [ (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { + title : "Users" + description : "List of users for group" + } ]; + string type = 3 + [ (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { + title : "Type" + description : "Type of group" + } ]; +} + +message GroupList { + option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_schema) = { + json_schema : { + title : "GroupList" + description : "Group list" + read_only : true + } + }; + + string apiVersion = 1 + [ (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { + title : "API Version", + description : "API Version of the group list resource" + read_only : true + } ]; + string kind = 2 + [ (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { + title : "Kind", + description : "Kind of the group list resource" + read_only : true + } ]; + rafay.dev.types.common.v3.ListMetadata metadata = 3 + [ (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { + title : "Metadata", + description : "Metadata of the group list resource" + read_only : true + } ]; + repeated Group items = 4 + [ (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { + title : "Items", + description : "List of the group resources" + read_only : true + } ]; +} diff --git a/components/usermgmt/proto/proto/types/userpb/v3/role.pb.go b/components/usermgmt/proto/proto/types/userpb/v3/role.pb.go new file mode 100644 index 0000000..e3f506a --- /dev/null +++ b/components/usermgmt/proto/proto/types/userpb/v3/role.pb.go @@ -0,0 +1,425 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.27.1 +// protoc v3.19.1 +// source: proto/types/userpb/v3/role.proto + +package userv3 + +import ( + v3 "github.com/RafaySystems/rcloud-base/components/usermgmt/proto/types/commonpb/v3" + _ "github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-openapiv2/options" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +type Role struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + ApiVersion string `protobuf:"bytes,1,opt,name=apiVersion,proto3" json:"apiVersion,omitempty"` + Kind string `protobuf:"bytes,2,opt,name=kind,proto3" json:"kind,omitempty"` + Metadata *v3.Metadata `protobuf:"bytes,3,opt,name=metadata,proto3" json:"metadata,omitempty"` + Spec *RoleSpec `protobuf:"bytes,4,opt,name=spec,proto3" json:"spec,omitempty"` + Status *v3.Status `protobuf:"bytes,5,opt,name=status,proto3" json:"status,omitempty"` +} + +func (x *Role) Reset() { + *x = Role{} + if protoimpl.UnsafeEnabled { + mi := &file_proto_types_userpb_v3_role_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Role) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Role) ProtoMessage() {} + +func (x *Role) ProtoReflect() protoreflect.Message { + mi := &file_proto_types_userpb_v3_role_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Role.ProtoReflect.Descriptor instead. +func (*Role) Descriptor() ([]byte, []int) { + return file_proto_types_userpb_v3_role_proto_rawDescGZIP(), []int{0} +} + +func (x *Role) GetApiVersion() string { + if x != nil { + return x.ApiVersion + } + return "" +} + +func (x *Role) GetKind() string { + if x != nil { + return x.Kind + } + return "" +} + +func (x *Role) GetMetadata() *v3.Metadata { + if x != nil { + return x.Metadata + } + return nil +} + +func (x *Role) GetSpec() *RoleSpec { + if x != nil { + return x.Spec + } + return nil +} + +func (x *Role) GetStatus() *v3.Status { + if x != nil { + return x.Status + } + return nil +} + +type RoleSpec struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Rolepermissions []*RolePermission `protobuf:"bytes,1,rep,name=rolepermissions,proto3" json:"rolepermissions,omitempty"` +} + +func (x *RoleSpec) Reset() { + *x = RoleSpec{} + if protoimpl.UnsafeEnabled { + mi := &file_proto_types_userpb_v3_role_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *RoleSpec) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*RoleSpec) ProtoMessage() {} + +func (x *RoleSpec) ProtoReflect() protoreflect.Message { + mi := &file_proto_types_userpb_v3_role_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use RoleSpec.ProtoReflect.Descriptor instead. +func (*RoleSpec) Descriptor() ([]byte, []int) { + return file_proto_types_userpb_v3_role_proto_rawDescGZIP(), []int{1} +} + +func (x *RoleSpec) GetRolepermissions() []*RolePermission { + if x != nil { + return x.Rolepermissions + } + return nil +} + +type RoleList struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + ApiVersion string `protobuf:"bytes,1,opt,name=apiVersion,proto3" json:"apiVersion,omitempty"` + Kind string `protobuf:"bytes,2,opt,name=kind,proto3" json:"kind,omitempty"` + Metadata *v3.ListMetadata `protobuf:"bytes,3,opt,name=metadata,proto3" json:"metadata,omitempty"` + Items []*Role `protobuf:"bytes,4,rep,name=items,proto3" json:"items,omitempty"` +} + +func (x *RoleList) Reset() { + *x = RoleList{} + if protoimpl.UnsafeEnabled { + mi := &file_proto_types_userpb_v3_role_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *RoleList) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*RoleList) ProtoMessage() {} + +func (x *RoleList) ProtoReflect() protoreflect.Message { + mi := &file_proto_types_userpb_v3_role_proto_msgTypes[2] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use RoleList.ProtoReflect.Descriptor instead. +func (*RoleList) Descriptor() ([]byte, []int) { + return file_proto_types_userpb_v3_role_proto_rawDescGZIP(), []int{2} +} + +func (x *RoleList) GetApiVersion() string { + if x != nil { + return x.ApiVersion + } + return "" +} + +func (x *RoleList) GetKind() string { + if x != nil { + return x.Kind + } + return "" +} + +func (x *RoleList) GetMetadata() *v3.ListMetadata { + if x != nil { + return x.Metadata + } + return nil +} + +func (x *RoleList) GetItems() []*Role { + if x != nil { + return x.Items + } + return nil +} + +var File_proto_types_userpb_v3_role_proto protoreflect.FileDescriptor + +var file_proto_types_userpb_v3_role_proto_rawDesc = []byte{ + 0x0a, 0x20, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2f, 0x75, 0x73, + 0x65, 0x72, 0x70, 0x62, 0x2f, 0x76, 0x33, 0x2f, 0x72, 0x6f, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x12, 0x17, 0x72, 0x61, 0x66, 0x61, 0x79, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x74, 0x79, + 0x70, 0x65, 0x73, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x1a, 0x24, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x70, + 0x62, 0x2f, 0x76, 0x33, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x1a, 0x2a, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2f, 0x75, + 0x73, 0x65, 0x72, 0x70, 0x62, 0x2f, 0x76, 0x33, 0x2f, 0x72, 0x6f, 0x6c, 0x65, 0x70, 0x65, 0x72, + 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x2d, 0x67, 0x65, 0x6e, 0x2d, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, + 0x69, 0x76, 0x32, 0x2f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, + 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x99, 0x04, + 0x0a, 0x04, 0x52, 0x6f, 0x6c, 0x65, 0x12, 0x6a, 0x0a, 0x0a, 0x61, 0x70, 0x69, 0x56, 0x65, 0x72, + 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x4a, 0x92, 0x41, 0x47, 0x2a, + 0x0b, 0x41, 0x50, 0x49, 0x20, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x32, 0x20, 0x41, 0x50, + 0x49, 0x20, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, + 0x20, 0x52, 0x6f, 0x6c, 0x65, 0x20, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x3a, 0x16, + 0x75, 0x73, 0x65, 0x72, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x6b, 0x38, 0x73, 0x6d, 0x67, 0x6d, 0x74, + 0x2e, 0x69, 0x6f, 0x2f, 0x76, 0x33, 0x52, 0x0a, 0x61, 0x70, 0x69, 0x56, 0x65, 0x72, 0x73, 0x69, + 0x6f, 0x6e, 0x12, 0x3e, 0x0a, 0x04, 0x6b, 0x69, 0x6e, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, + 0x42, 0x2a, 0x92, 0x41, 0x27, 0x2a, 0x04, 0x4b, 0x69, 0x6e, 0x64, 0x32, 0x19, 0x4b, 0x69, 0x6e, + 0x64, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, 0x20, 0x72, 0x6f, 0x6c, 0x65, 0x20, 0x72, 0x65, + 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x3a, 0x04, 0x52, 0x6f, 0x6c, 0x65, 0x52, 0x04, 0x6b, 0x69, + 0x6e, 0x64, 0x12, 0x6d, 0x0a, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, 0x03, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x72, 0x61, 0x66, 0x61, 0x79, 0x2e, 0x64, 0x65, 0x76, + 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x33, + 0x2e, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x42, 0x2c, 0x92, 0x41, 0x29, 0x2a, 0x08, + 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x32, 0x1d, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, + 0x74, 0x61, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, 0x20, 0x72, 0x6f, 0x6c, 0x65, 0x20, 0x72, + 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, + 0x61, 0x12, 0x5b, 0x0a, 0x04, 0x73, 0x70, 0x65, 0x63, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x21, 0x2e, 0x72, 0x61, 0x66, 0x61, 0x79, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x74, 0x79, 0x70, 0x65, + 0x73, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x2e, 0x52, 0x6f, 0x6c, 0x65, 0x53, 0x70, + 0x65, 0x63, 0x42, 0x24, 0x92, 0x41, 0x21, 0x2a, 0x04, 0x53, 0x70, 0x65, 0x63, 0x32, 0x19, 0x53, + 0x70, 0x65, 0x63, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, 0x20, 0x72, 0x6f, 0x6c, 0x65, 0x20, + 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x04, 0x73, 0x70, 0x65, 0x63, 0x12, 0x60, + 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x21, + 0x2e, 0x72, 0x61, 0x66, 0x61, 0x79, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, + 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x33, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x75, + 0x73, 0x42, 0x25, 0x92, 0x41, 0x22, 0x2a, 0x06, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x32, 0x16, + 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, 0x20, 0x72, 0x65, + 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x40, 0x01, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, + 0x3a, 0x37, 0x92, 0x41, 0x34, 0x0a, 0x32, 0x2a, 0x04, 0x52, 0x6f, 0x6c, 0x65, 0x32, 0x04, 0x52, + 0x6f, 0x6c, 0x65, 0xd2, 0x01, 0x0a, 0x61, 0x70, 0x69, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, + 0xd2, 0x01, 0x04, 0x6b, 0x69, 0x6e, 0x64, 0xd2, 0x01, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, + 0x74, 0x61, 0xd2, 0x01, 0x04, 0x73, 0x70, 0x65, 0x63, 0x22, 0xbd, 0x01, 0x0a, 0x08, 0x52, 0x6f, + 0x6c, 0x65, 0x53, 0x70, 0x65, 0x63, 0x12, 0x81, 0x01, 0x0a, 0x0f, 0x72, 0x6f, 0x6c, 0x65, 0x70, + 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, + 0x32, 0x27, 0x2e, 0x72, 0x61, 0x66, 0x61, 0x79, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x74, 0x79, 0x70, + 0x65, 0x73, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x2e, 0x52, 0x6f, 0x6c, 0x65, 0x50, + 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x42, 0x2e, 0x92, 0x41, 0x2b, 0x2a, 0x0f, + 0x52, 0x6f, 0x6c, 0x65, 0x50, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x32, + 0x18, 0x50, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x20, 0x66, 0x6f, 0x72, + 0x20, 0x74, 0x68, 0x65, 0x20, 0x72, 0x6f, 0x6c, 0x65, 0x52, 0x0f, 0x72, 0x6f, 0x6c, 0x65, 0x70, + 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x3a, 0x2d, 0x92, 0x41, 0x2a, 0x0a, + 0x28, 0x2a, 0x12, 0x52, 0x6f, 0x6c, 0x65, 0x20, 0x53, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x63, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x32, 0x12, 0x52, 0x6f, 0x6c, 0x65, 0x20, 0x73, 0x70, 0x65, 0x63, + 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x99, 0x03, 0x0a, 0x08, 0x52, 0x6f, + 0x6c, 0x65, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x59, 0x0a, 0x0a, 0x61, 0x70, 0x69, 0x56, 0x65, 0x72, + 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x39, 0x92, 0x41, 0x36, 0x2a, + 0x0b, 0x41, 0x50, 0x49, 0x20, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x32, 0x25, 0x41, 0x50, + 0x49, 0x20, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, + 0x20, 0x72, 0x6f, 0x6c, 0x65, 0x20, 0x6c, 0x69, 0x73, 0x74, 0x20, 0x72, 0x65, 0x73, 0x6f, 0x75, + 0x72, 0x63, 0x65, 0x40, 0x01, 0x52, 0x0a, 0x61, 0x70, 0x69, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, + 0x6e, 0x12, 0x3f, 0x0a, 0x04, 0x6b, 0x69, 0x6e, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, + 0x2b, 0x92, 0x41, 0x28, 0x2a, 0x04, 0x4b, 0x69, 0x6e, 0x64, 0x32, 0x1e, 0x4b, 0x69, 0x6e, 0x64, + 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, 0x20, 0x72, 0x6f, 0x6c, 0x65, 0x20, 0x6c, 0x69, 0x73, + 0x74, 0x20, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x40, 0x01, 0x52, 0x04, 0x6b, 0x69, + 0x6e, 0x64, 0x12, 0x78, 0x0a, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, 0x03, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x72, 0x61, 0x66, 0x61, 0x79, 0x2e, 0x64, 0x65, 0x76, + 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x33, + 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x42, 0x33, 0x92, + 0x41, 0x30, 0x2a, 0x08, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x32, 0x22, 0x4d, 0x65, + 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, 0x20, 0x72, 0x6f, + 0x6c, 0x65, 0x20, 0x6c, 0x69, 0x73, 0x74, 0x20, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, + 0x40, 0x01, 0x52, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x59, 0x0a, 0x05, + 0x69, 0x74, 0x65, 0x6d, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x72, 0x61, + 0x66, 0x61, 0x79, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x75, 0x73, + 0x65, 0x72, 0x2e, 0x76, 0x33, 0x2e, 0x52, 0x6f, 0x6c, 0x65, 0x42, 0x24, 0x92, 0x41, 0x21, 0x2a, + 0x05, 0x49, 0x74, 0x65, 0x6d, 0x73, 0x32, 0x16, 0x4c, 0x69, 0x73, 0x74, 0x20, 0x6f, 0x66, 0x20, + 0x72, 0x6f, 0x6c, 0x65, 0x20, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x40, 0x01, + 0x52, 0x05, 0x69, 0x74, 0x65, 0x6d, 0x73, 0x3a, 0x1c, 0x92, 0x41, 0x19, 0x0a, 0x17, 0x2a, 0x08, + 0x52, 0x6f, 0x6c, 0x65, 0x4c, 0x69, 0x73, 0x74, 0x32, 0x09, 0x52, 0x6f, 0x6c, 0x65, 0x20, 0x6c, + 0x69, 0x73, 0x74, 0x40, 0x01, 0x42, 0xff, 0x01, 0x0a, 0x1b, 0x63, 0x6f, 0x6d, 0x2e, 0x72, 0x61, + 0x66, 0x61, 0x79, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x75, 0x73, + 0x65, 0x72, 0x2e, 0x76, 0x33, 0x42, 0x09, 0x52, 0x6f, 0x6c, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, + 0x50, 0x01, 0x5a, 0x54, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x52, + 0x61, 0x66, 0x61, 0x79, 0x53, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x73, 0x2f, 0x72, 0x63, 0x6c, 0x6f, + 0x75, 0x64, 0x2d, 0x62, 0x61, 0x73, 0x65, 0x2f, 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, + 0x74, 0x73, 0x2f, 0x75, 0x73, 0x65, 0x72, 0x6d, 0x67, 0x6d, 0x74, 0x2f, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2f, 0x75, 0x73, 0x65, 0x72, 0x70, 0x62, 0x2f, 0x76, + 0x33, 0x3b, 0x75, 0x73, 0x65, 0x72, 0x76, 0x33, 0xa2, 0x02, 0x04, 0x52, 0x44, 0x54, 0x55, 0xaa, + 0x02, 0x17, 0x52, 0x61, 0x66, 0x61, 0x79, 0x2e, 0x44, 0x65, 0x76, 0x2e, 0x54, 0x79, 0x70, 0x65, + 0x73, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x2e, 0x56, 0x33, 0xca, 0x02, 0x17, 0x52, 0x61, 0x66, 0x61, + 0x79, 0x5c, 0x44, 0x65, 0x76, 0x5c, 0x54, 0x79, 0x70, 0x65, 0x73, 0x5c, 0x55, 0x73, 0x65, 0x72, + 0x5c, 0x56, 0x33, 0xe2, 0x02, 0x23, 0x52, 0x61, 0x66, 0x61, 0x79, 0x5c, 0x44, 0x65, 0x76, 0x5c, + 0x54, 0x79, 0x70, 0x65, 0x73, 0x5c, 0x55, 0x73, 0x65, 0x72, 0x5c, 0x56, 0x33, 0x5c, 0x47, 0x50, + 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x1b, 0x52, 0x61, 0x66, 0x61, + 0x79, 0x3a, 0x3a, 0x44, 0x65, 0x76, 0x3a, 0x3a, 0x54, 0x79, 0x70, 0x65, 0x73, 0x3a, 0x3a, 0x55, + 0x73, 0x65, 0x72, 0x3a, 0x3a, 0x56, 0x33, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_proto_types_userpb_v3_role_proto_rawDescOnce sync.Once + file_proto_types_userpb_v3_role_proto_rawDescData = file_proto_types_userpb_v3_role_proto_rawDesc +) + +func file_proto_types_userpb_v3_role_proto_rawDescGZIP() []byte { + file_proto_types_userpb_v3_role_proto_rawDescOnce.Do(func() { + file_proto_types_userpb_v3_role_proto_rawDescData = protoimpl.X.CompressGZIP(file_proto_types_userpb_v3_role_proto_rawDescData) + }) + return file_proto_types_userpb_v3_role_proto_rawDescData +} + +var file_proto_types_userpb_v3_role_proto_msgTypes = make([]protoimpl.MessageInfo, 3) +var file_proto_types_userpb_v3_role_proto_goTypes = []interface{}{ + (*Role)(nil), // 0: rafay.dev.types.user.v3.Role + (*RoleSpec)(nil), // 1: rafay.dev.types.user.v3.RoleSpec + (*RoleList)(nil), // 2: rafay.dev.types.user.v3.RoleList + (*v3.Metadata)(nil), // 3: rafay.dev.types.common.v3.Metadata + (*v3.Status)(nil), // 4: rafay.dev.types.common.v3.Status + (*RolePermission)(nil), // 5: rafay.dev.types.user.v3.RolePermission + (*v3.ListMetadata)(nil), // 6: rafay.dev.types.common.v3.ListMetadata +} +var file_proto_types_userpb_v3_role_proto_depIdxs = []int32{ + 3, // 0: rafay.dev.types.user.v3.Role.metadata:type_name -> rafay.dev.types.common.v3.Metadata + 1, // 1: rafay.dev.types.user.v3.Role.spec:type_name -> rafay.dev.types.user.v3.RoleSpec + 4, // 2: rafay.dev.types.user.v3.Role.status:type_name -> rafay.dev.types.common.v3.Status + 5, // 3: rafay.dev.types.user.v3.RoleSpec.rolepermissions:type_name -> rafay.dev.types.user.v3.RolePermission + 6, // 4: rafay.dev.types.user.v3.RoleList.metadata:type_name -> rafay.dev.types.common.v3.ListMetadata + 0, // 5: rafay.dev.types.user.v3.RoleList.items:type_name -> rafay.dev.types.user.v3.Role + 6, // [6:6] is the sub-list for method output_type + 6, // [6:6] is the sub-list for method input_type + 6, // [6:6] is the sub-list for extension type_name + 6, // [6:6] is the sub-list for extension extendee + 0, // [0:6] is the sub-list for field type_name +} + +func init() { file_proto_types_userpb_v3_role_proto_init() } +func file_proto_types_userpb_v3_role_proto_init() { + if File_proto_types_userpb_v3_role_proto != nil { + return + } + file_proto_types_userpb_v3_rolepermission_proto_init() + if !protoimpl.UnsafeEnabled { + file_proto_types_userpb_v3_role_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Role); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_types_userpb_v3_role_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*RoleSpec); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_types_userpb_v3_role_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*RoleList); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_proto_types_userpb_v3_role_proto_rawDesc, + NumEnums: 0, + NumMessages: 3, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_proto_types_userpb_v3_role_proto_goTypes, + DependencyIndexes: file_proto_types_userpb_v3_role_proto_depIdxs, + MessageInfos: file_proto_types_userpb_v3_role_proto_msgTypes, + }.Build() + File_proto_types_userpb_v3_role_proto = out.File + file_proto_types_userpb_v3_role_proto_rawDesc = nil + file_proto_types_userpb_v3_role_proto_goTypes = nil + file_proto_types_userpb_v3_role_proto_depIdxs = nil +} diff --git a/components/usermgmt/proto/proto/types/userpb/v3/role.proto b/components/usermgmt/proto/proto/types/userpb/v3/role.proto new file mode 100644 index 0000000..2e08031 --- /dev/null +++ b/components/usermgmt/proto/proto/types/userpb/v3/role.proto @@ -0,0 +1,94 @@ +syntax = "proto3"; +package rafay.dev.types.user.v3; + +import "proto/types/commonpb/v3/common.proto"; +import "proto/types/userpb/v3/rolepermission.proto"; +import "protoc-gen-openapiv2/options/annotations.proto"; +// import "google/api/field_behavior.proto"; + +message Role { + option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_schema) = { + json_schema : { + title : "Role" + description : "Role" + required : [ "apiVersion", "kind", "metadata", "spec" ] + } + }; + + string apiVersion = 1 + [ (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { + title : "API Version", + description : "API Version of the Role resource" + default : "usermgmt.k8smgmt.io/v3" + } ]; + string kind = 2 + [ (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { + title : "Kind", + description : "Kind of the role resource" + default : "Role" + } ]; + rafay.dev.types.common.v3.Metadata metadata = 3 + [ (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { + title : "Metadata", + description : "Metadata of the role resource" + } ]; + RoleSpec spec = 4 + [ (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { + title : "Spec", + description : "Spec of the role resource" + } ]; + rafay.dev.types.common.v3.Status status = 5 + [ (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { + title : "Status", + description : "Status of the resource" + read_only : true + } ]; +} + +message RoleSpec { + option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_schema) = { + json_schema : { + title : "Role Specification" + description : "Role specification" + } + }; + repeated rafay.dev.types.user.v3.RolePermission rolepermissions = 1 + [ (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { + title : "RolePermissions" + description : "Permissions for the role" + } ]; +} + +message RoleList { + option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_schema) = { + json_schema : { + title : "RoleList" + description : "Role list" + read_only : true + } + }; + string apiVersion = 1 + [ (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { + title : "API Version", + description : "API Version of the role list resource" + read_only : true + } ]; + string kind = 2 + [ (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { + title : "Kind", + description : "Kind of the role list resource" + read_only : true + } ]; + rafay.dev.types.common.v3.ListMetadata metadata = 3 + [ (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { + title : "Metadata", + description : "Metadata of the role list resource" + read_only : true + } ]; + repeated Role items = 4 + [ (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { + title : "Items", + description : "List of role resources" + read_only : true + } ]; +} diff --git a/components/usermgmt/proto/proto/types/userpb/v3/rolepermission.pb.go b/components/usermgmt/proto/proto/types/userpb/v3/rolepermission.pb.go new file mode 100644 index 0000000..2af147b --- /dev/null +++ b/components/usermgmt/proto/proto/types/userpb/v3/rolepermission.pb.go @@ -0,0 +1,431 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.27.1 +// protoc v3.19.1 +// source: proto/types/userpb/v3/rolepermission.proto + +package userv3 + +import ( + v3 "github.com/RafaySystems/rcloud-base/components/usermgmt/proto/types/commonpb/v3" + _ "github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-openapiv2/options" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +type RolePermission struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + ApiVersion string `protobuf:"bytes,1,opt,name=apiVersion,proto3" json:"apiVersion,omitempty"` + Kind string `protobuf:"bytes,2,opt,name=kind,proto3" json:"kind,omitempty"` + Metadata *v3.Metadata `protobuf:"bytes,3,opt,name=metadata,proto3" json:"metadata,omitempty"` + Spec *RolePermissionSpec `protobuf:"bytes,4,opt,name=spec,proto3" json:"spec,omitempty"` + Status *v3.Status `protobuf:"bytes,5,opt,name=status,proto3" json:"status,omitempty"` +} + +func (x *RolePermission) Reset() { + *x = RolePermission{} + if protoimpl.UnsafeEnabled { + mi := &file_proto_types_userpb_v3_rolepermission_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *RolePermission) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*RolePermission) ProtoMessage() {} + +func (x *RolePermission) ProtoReflect() protoreflect.Message { + mi := &file_proto_types_userpb_v3_rolepermission_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use RolePermission.ProtoReflect.Descriptor instead. +func (*RolePermission) Descriptor() ([]byte, []int) { + return file_proto_types_userpb_v3_rolepermission_proto_rawDescGZIP(), []int{0} +} + +func (x *RolePermission) GetApiVersion() string { + if x != nil { + return x.ApiVersion + } + return "" +} + +func (x *RolePermission) GetKind() string { + if x != nil { + return x.Kind + } + return "" +} + +func (x *RolePermission) GetMetadata() *v3.Metadata { + if x != nil { + return x.Metadata + } + return nil +} + +func (x *RolePermission) GetSpec() *RolePermissionSpec { + if x != nil { + return x.Spec + } + return nil +} + +func (x *RolePermission) GetStatus() *v3.Status { + if x != nil { + return x.Status + } + return nil +} + +type RolePermissionSpec struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Permissions []string `protobuf:"bytes,1,rep,name=permissions,proto3" json:"permissions,omitempty"` +} + +func (x *RolePermissionSpec) Reset() { + *x = RolePermissionSpec{} + if protoimpl.UnsafeEnabled { + mi := &file_proto_types_userpb_v3_rolepermission_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *RolePermissionSpec) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*RolePermissionSpec) ProtoMessage() {} + +func (x *RolePermissionSpec) ProtoReflect() protoreflect.Message { + mi := &file_proto_types_userpb_v3_rolepermission_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use RolePermissionSpec.ProtoReflect.Descriptor instead. +func (*RolePermissionSpec) Descriptor() ([]byte, []int) { + return file_proto_types_userpb_v3_rolepermission_proto_rawDescGZIP(), []int{1} +} + +func (x *RolePermissionSpec) GetPermissions() []string { + if x != nil { + return x.Permissions + } + return nil +} + +type RolePermissionList struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + ApiVersion string `protobuf:"bytes,1,opt,name=apiVersion,proto3" json:"apiVersion,omitempty"` + Kind string `protobuf:"bytes,2,opt,name=kind,proto3" json:"kind,omitempty"` + Metadata *v3.ListMetadata `protobuf:"bytes,3,opt,name=metadata,proto3" json:"metadata,omitempty"` + Items []*RolePermission `protobuf:"bytes,4,rep,name=items,proto3" json:"items,omitempty"` +} + +func (x *RolePermissionList) Reset() { + *x = RolePermissionList{} + if protoimpl.UnsafeEnabled { + mi := &file_proto_types_userpb_v3_rolepermission_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *RolePermissionList) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*RolePermissionList) ProtoMessage() {} + +func (x *RolePermissionList) ProtoReflect() protoreflect.Message { + mi := &file_proto_types_userpb_v3_rolepermission_proto_msgTypes[2] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use RolePermissionList.ProtoReflect.Descriptor instead. +func (*RolePermissionList) Descriptor() ([]byte, []int) { + return file_proto_types_userpb_v3_rolepermission_proto_rawDescGZIP(), []int{2} +} + +func (x *RolePermissionList) GetApiVersion() string { + if x != nil { + return x.ApiVersion + } + return "" +} + +func (x *RolePermissionList) GetKind() string { + if x != nil { + return x.Kind + } + return "" +} + +func (x *RolePermissionList) GetMetadata() *v3.ListMetadata { + if x != nil { + return x.Metadata + } + return nil +} + +func (x *RolePermissionList) GetItems() []*RolePermission { + if x != nil { + return x.Items + } + return nil +} + +var File_proto_types_userpb_v3_rolepermission_proto protoreflect.FileDescriptor + +var file_proto_types_userpb_v3_rolepermission_proto_rawDesc = []byte{ + 0x0a, 0x2a, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2f, 0x75, 0x73, + 0x65, 0x72, 0x70, 0x62, 0x2f, 0x76, 0x33, 0x2f, 0x72, 0x6f, 0x6c, 0x65, 0x70, 0x65, 0x72, 0x6d, + 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x17, 0x72, 0x61, + 0x66, 0x61, 0x79, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x75, 0x73, + 0x65, 0x72, 0x2e, 0x76, 0x33, 0x1a, 0x24, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x74, 0x79, 0x70, + 0x65, 0x73, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x70, 0x62, 0x2f, 0x76, 0x33, 0x2f, 0x63, + 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x63, 0x2d, 0x67, 0x65, 0x6e, 0x2d, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x76, + 0x32, 0x2f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x80, 0x05, 0x0a, 0x0e, + 0x52, 0x6f, 0x6c, 0x65, 0x50, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x75, + 0x0a, 0x0a, 0x61, 0x70, 0x69, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x09, 0x42, 0x55, 0x92, 0x41, 0x52, 0x2a, 0x0b, 0x41, 0x50, 0x49, 0x20, 0x56, 0x65, 0x72, + 0x73, 0x69, 0x6f, 0x6e, 0x32, 0x2b, 0x41, 0x50, 0x49, 0x20, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, + 0x6e, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, 0x20, 0x72, 0x6f, 0x6c, 0x65, 0x20, 0x70, 0x65, + 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x20, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, + 0x65, 0x3a, 0x16, 0x75, 0x73, 0x65, 0x72, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x6b, 0x38, 0x73, 0x6d, + 0x67, 0x6d, 0x74, 0x2e, 0x69, 0x6f, 0x2f, 0x76, 0x33, 0x52, 0x0a, 0x61, 0x70, 0x69, 0x56, 0x65, + 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x53, 0x0a, 0x04, 0x6b, 0x69, 0x6e, 0x64, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x09, 0x42, 0x3f, 0x92, 0x41, 0x3c, 0x2a, 0x04, 0x4b, 0x69, 0x6e, 0x64, 0x32, 0x24, + 0x4b, 0x69, 0x6e, 0x64, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, 0x20, 0x72, 0x6f, 0x6c, 0x65, + 0x20, 0x70, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x20, 0x72, 0x65, 0x73, 0x6f, + 0x75, 0x72, 0x63, 0x65, 0x3a, 0x0e, 0x52, 0x6f, 0x6c, 0x65, 0x50, 0x65, 0x72, 0x6d, 0x69, 0x73, + 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x04, 0x6b, 0x69, 0x6e, 0x64, 0x12, 0x78, 0x0a, 0x08, 0x6d, 0x65, + 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x72, + 0x61, 0x66, 0x61, 0x79, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x63, + 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x33, 0x2e, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, + 0x61, 0x42, 0x37, 0x92, 0x41, 0x34, 0x2a, 0x08, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, + 0x32, 0x28, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, + 0x65, 0x20, 0x72, 0x6f, 0x6c, 0x65, 0x20, 0x70, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, + 0x6e, 0x20, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x08, 0x6d, 0x65, 0x74, 0x61, + 0x64, 0x61, 0x74, 0x61, 0x12, 0x78, 0x0a, 0x04, 0x73, 0x70, 0x65, 0x63, 0x18, 0x04, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x2b, 0x2e, 0x72, 0x61, 0x66, 0x61, 0x79, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x74, + 0x79, 0x70, 0x65, 0x73, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x2e, 0x52, 0x6f, 0x6c, + 0x65, 0x50, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x53, 0x70, 0x65, 0x63, 0x42, + 0x37, 0x92, 0x41, 0x34, 0x2a, 0x08, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x32, 0x28, + 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, 0x20, + 0x72, 0x6f, 0x6c, 0x65, 0x20, 0x70, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x20, + 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x04, 0x73, 0x70, 0x65, 0x63, 0x12, 0x60, + 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x21, + 0x2e, 0x72, 0x61, 0x66, 0x61, 0x79, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, + 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x33, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x75, + 0x73, 0x42, 0x25, 0x92, 0x41, 0x22, 0x2a, 0x06, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x32, 0x16, + 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, 0x20, 0x72, 0x65, + 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x40, 0x01, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, + 0x3a, 0x4c, 0x92, 0x41, 0x49, 0x0a, 0x47, 0x2a, 0x0e, 0x52, 0x6f, 0x6c, 0x65, 0x50, 0x65, 0x72, + 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x32, 0x0f, 0x52, 0x6f, 0x6c, 0x65, 0x20, 0x50, 0x65, + 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0xd2, 0x01, 0x0a, 0x61, 0x70, 0x69, 0x56, 0x65, + 0x72, 0x73, 0x69, 0x6f, 0x6e, 0xd2, 0x01, 0x04, 0x6b, 0x69, 0x6e, 0x64, 0xd2, 0x01, 0x08, 0x6d, + 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xd2, 0x01, 0x04, 0x73, 0x70, 0x65, 0x63, 0x22, 0xa7, + 0x01, 0x0a, 0x12, 0x52, 0x6f, 0x6c, 0x65, 0x50, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, + 0x6e, 0x53, 0x70, 0x65, 0x63, 0x12, 0x4f, 0x0a, 0x0b, 0x70, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, + 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x42, 0x2d, 0x92, 0x41, 0x2a, 0x2a, + 0x0b, 0x50, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x32, 0x1b, 0x4c, 0x69, + 0x73, 0x74, 0x20, 0x6f, 0x66, 0x20, 0x70, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x73, + 0x20, 0x66, 0x6f, 0x72, 0x20, 0x72, 0x6f, 0x6c, 0x65, 0x52, 0x0b, 0x70, 0x65, 0x72, 0x6d, 0x69, + 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x3a, 0x40, 0x92, 0x41, 0x3d, 0x0a, 0x3b, 0x2a, 0x1c, 0x52, + 0x6f, 0x6c, 0x65, 0x50, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x20, 0x53, 0x70, + 0x65, 0x63, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x32, 0x1b, 0x52, 0x6f, 0x6c, + 0x65, 0x50, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x6f, 0x6e, 0x20, 0x73, 0x70, 0x65, 0x63, 0x69, + 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0xee, 0x03, 0x0a, 0x12, 0x52, 0x6f, 0x6c, + 0x65, 0x50, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x4c, 0x69, 0x73, 0x74, 0x12, + 0x64, 0x0a, 0x0a, 0x61, 0x70, 0x69, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x09, 0x42, 0x44, 0x92, 0x41, 0x41, 0x2a, 0x0b, 0x41, 0x50, 0x49, 0x20, 0x56, 0x65, + 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x32, 0x30, 0x41, 0x50, 0x49, 0x20, 0x56, 0x65, 0x72, 0x73, 0x69, + 0x6f, 0x6e, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, 0x20, 0x72, 0x6f, 0x6c, 0x65, 0x20, 0x70, + 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x20, 0x6c, 0x69, 0x73, 0x74, 0x20, 0x72, + 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x40, 0x01, 0x52, 0x0a, 0x61, 0x70, 0x69, 0x56, 0x65, + 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x4a, 0x0a, 0x04, 0x6b, 0x69, 0x6e, 0x64, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x09, 0x42, 0x36, 0x92, 0x41, 0x33, 0x2a, 0x04, 0x4b, 0x69, 0x6e, 0x64, 0x32, 0x29, + 0x4b, 0x69, 0x6e, 0x64, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, 0x20, 0x72, 0x6f, 0x6c, 0x65, + 0x20, 0x70, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x20, 0x6c, 0x69, 0x73, 0x74, + 0x20, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x40, 0x01, 0x52, 0x04, 0x6b, 0x69, 0x6e, + 0x64, 0x12, 0x83, 0x01, 0x0a, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, 0x03, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x72, 0x61, 0x66, 0x61, 0x79, 0x2e, 0x64, 0x65, 0x76, + 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x33, + 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x42, 0x3e, 0x92, + 0x41, 0x3b, 0x2a, 0x08, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x32, 0x2d, 0x4d, 0x65, + 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, 0x20, 0x72, 0x6f, + 0x6c, 0x65, 0x20, 0x70, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x20, 0x6c, 0x69, + 0x73, 0x74, 0x20, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x40, 0x01, 0x52, 0x08, 0x6d, + 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x72, 0x0a, 0x05, 0x69, 0x74, 0x65, 0x6d, 0x73, + 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x72, 0x61, 0x66, 0x61, 0x79, 0x2e, 0x64, + 0x65, 0x76, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x76, 0x33, + 0x2e, 0x52, 0x6f, 0x6c, 0x65, 0x50, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x42, + 0x33, 0x92, 0x41, 0x30, 0x2a, 0x05, 0x49, 0x74, 0x65, 0x6d, 0x73, 0x32, 0x25, 0x4c, 0x69, 0x73, + 0x74, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, 0x20, 0x72, 0x6f, 0x6c, 0x65, 0x20, 0x70, 0x65, + 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x20, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, + 0x65, 0x73, 0x40, 0x01, 0x52, 0x05, 0x69, 0x74, 0x65, 0x6d, 0x73, 0x3a, 0x2c, 0x92, 0x41, 0x29, + 0x0a, 0x27, 0x2a, 0x12, 0x52, 0x6f, 0x6c, 0x65, 0x50, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, + 0x6f, 0x6e, 0x4c, 0x69, 0x73, 0x74, 0x32, 0x0f, 0x52, 0x6f, 0x6c, 0x65, 0x50, 0x65, 0x4c, 0x69, + 0x73, 0x74, 0x20, 0x6c, 0x69, 0x73, 0x74, 0x40, 0x01, 0x42, 0x89, 0x02, 0x0a, 0x1b, 0x63, 0x6f, + 0x6d, 0x2e, 0x72, 0x61, 0x66, 0x61, 0x79, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x74, 0x79, 0x70, 0x65, + 0x73, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x42, 0x13, 0x52, 0x6f, 0x6c, 0x65, 0x70, + 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, + 0x5a, 0x54, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x52, 0x61, 0x66, + 0x61, 0x79, 0x53, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x73, 0x2f, 0x72, 0x63, 0x6c, 0x6f, 0x75, 0x64, + 0x2d, 0x62, 0x61, 0x73, 0x65, 0x2f, 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x73, + 0x2f, 0x75, 0x73, 0x65, 0x72, 0x6d, 0x67, 0x6d, 0x74, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, + 0x74, 0x79, 0x70, 0x65, 0x73, 0x2f, 0x75, 0x73, 0x65, 0x72, 0x70, 0x62, 0x2f, 0x76, 0x33, 0x3b, + 0x75, 0x73, 0x65, 0x72, 0x76, 0x33, 0xa2, 0x02, 0x04, 0x52, 0x44, 0x54, 0x55, 0xaa, 0x02, 0x17, + 0x52, 0x61, 0x66, 0x61, 0x79, 0x2e, 0x44, 0x65, 0x76, 0x2e, 0x54, 0x79, 0x70, 0x65, 0x73, 0x2e, + 0x55, 0x73, 0x65, 0x72, 0x2e, 0x56, 0x33, 0xca, 0x02, 0x17, 0x52, 0x61, 0x66, 0x61, 0x79, 0x5c, + 0x44, 0x65, 0x76, 0x5c, 0x54, 0x79, 0x70, 0x65, 0x73, 0x5c, 0x55, 0x73, 0x65, 0x72, 0x5c, 0x56, + 0x33, 0xe2, 0x02, 0x23, 0x52, 0x61, 0x66, 0x61, 0x79, 0x5c, 0x44, 0x65, 0x76, 0x5c, 0x54, 0x79, + 0x70, 0x65, 0x73, 0x5c, 0x55, 0x73, 0x65, 0x72, 0x5c, 0x56, 0x33, 0x5c, 0x47, 0x50, 0x42, 0x4d, + 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x1b, 0x52, 0x61, 0x66, 0x61, 0x79, 0x3a, + 0x3a, 0x44, 0x65, 0x76, 0x3a, 0x3a, 0x54, 0x79, 0x70, 0x65, 0x73, 0x3a, 0x3a, 0x55, 0x73, 0x65, + 0x72, 0x3a, 0x3a, 0x56, 0x33, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_proto_types_userpb_v3_rolepermission_proto_rawDescOnce sync.Once + file_proto_types_userpb_v3_rolepermission_proto_rawDescData = file_proto_types_userpb_v3_rolepermission_proto_rawDesc +) + +func file_proto_types_userpb_v3_rolepermission_proto_rawDescGZIP() []byte { + file_proto_types_userpb_v3_rolepermission_proto_rawDescOnce.Do(func() { + file_proto_types_userpb_v3_rolepermission_proto_rawDescData = protoimpl.X.CompressGZIP(file_proto_types_userpb_v3_rolepermission_proto_rawDescData) + }) + return file_proto_types_userpb_v3_rolepermission_proto_rawDescData +} + +var file_proto_types_userpb_v3_rolepermission_proto_msgTypes = make([]protoimpl.MessageInfo, 3) +var file_proto_types_userpb_v3_rolepermission_proto_goTypes = []interface{}{ + (*RolePermission)(nil), // 0: rafay.dev.types.user.v3.RolePermission + (*RolePermissionSpec)(nil), // 1: rafay.dev.types.user.v3.RolePermissionSpec + (*RolePermissionList)(nil), // 2: rafay.dev.types.user.v3.RolePermissionList + (*v3.Metadata)(nil), // 3: rafay.dev.types.common.v3.Metadata + (*v3.Status)(nil), // 4: rafay.dev.types.common.v3.Status + (*v3.ListMetadata)(nil), // 5: rafay.dev.types.common.v3.ListMetadata +} +var file_proto_types_userpb_v3_rolepermission_proto_depIdxs = []int32{ + 3, // 0: rafay.dev.types.user.v3.RolePermission.metadata:type_name -> rafay.dev.types.common.v3.Metadata + 1, // 1: rafay.dev.types.user.v3.RolePermission.spec:type_name -> rafay.dev.types.user.v3.RolePermissionSpec + 4, // 2: rafay.dev.types.user.v3.RolePermission.status:type_name -> rafay.dev.types.common.v3.Status + 5, // 3: rafay.dev.types.user.v3.RolePermissionList.metadata:type_name -> rafay.dev.types.common.v3.ListMetadata + 0, // 4: rafay.dev.types.user.v3.RolePermissionList.items:type_name -> rafay.dev.types.user.v3.RolePermission + 5, // [5:5] is the sub-list for method output_type + 5, // [5:5] is the sub-list for method input_type + 5, // [5:5] is the sub-list for extension type_name + 5, // [5:5] is the sub-list for extension extendee + 0, // [0:5] is the sub-list for field type_name +} + +func init() { file_proto_types_userpb_v3_rolepermission_proto_init() } +func file_proto_types_userpb_v3_rolepermission_proto_init() { + if File_proto_types_userpb_v3_rolepermission_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_proto_types_userpb_v3_rolepermission_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*RolePermission); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_types_userpb_v3_rolepermission_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*RolePermissionSpec); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_types_userpb_v3_rolepermission_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*RolePermissionList); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_proto_types_userpb_v3_rolepermission_proto_rawDesc, + NumEnums: 0, + NumMessages: 3, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_proto_types_userpb_v3_rolepermission_proto_goTypes, + DependencyIndexes: file_proto_types_userpb_v3_rolepermission_proto_depIdxs, + MessageInfos: file_proto_types_userpb_v3_rolepermission_proto_msgTypes, + }.Build() + File_proto_types_userpb_v3_rolepermission_proto = out.File + file_proto_types_userpb_v3_rolepermission_proto_rawDesc = nil + file_proto_types_userpb_v3_rolepermission_proto_goTypes = nil + file_proto_types_userpb_v3_rolepermission_proto_depIdxs = nil +} diff --git a/components/usermgmt/proto/proto/types/userpb/v3/rolepermission.proto b/components/usermgmt/proto/proto/types/userpb/v3/rolepermission.proto new file mode 100644 index 0000000..a993684 --- /dev/null +++ b/components/usermgmt/proto/proto/types/userpb/v3/rolepermission.proto @@ -0,0 +1,93 @@ +syntax = "proto3"; +package rafay.dev.types.user.v3; + +import "proto/types/commonpb/v3/common.proto"; +import "protoc-gen-openapiv2/options/annotations.proto"; +// import "google/api/field_behavior.proto"; + +message RolePermission { + option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_schema) = { + json_schema : { + title : "RolePermission" + description : "Role Permission" + required : [ "apiVersion", "kind", "metadata", "spec" ] + } + }; + + string apiVersion = 1 + [ (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { + title : "API Version", + description : "API Version of the role permission resource" + default : "usermgmt.k8smgmt.io/v3" + } ]; + string kind = 2 + [ (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { + title : "Kind", + description : "Kind of the role permission resource" + default : "RolePermission" + } ]; + rafay.dev.types.common.v3.Metadata metadata = 3 + [ (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { + title : "Metadata", + description : "Metadata of the role permission resource" + } ]; + RolePermissionSpec spec = 4 + [ (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { + title : "Metadata", + description : "Metadata of the role permission resource" + } ]; + rafay.dev.types.common.v3.Status status = 5 + [ (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { + title : "Status", + description : "Status of the resource" + read_only : true + } ]; +} + +message RolePermissionSpec { + option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_schema) = { + json_schema : { + title : "RolePermission Specification" + description : "RolePermisson specification" + } + }; + repeated string permissions = 1 + [ (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { + title : "Permissions" + description : "List of permisions for role" + } ]; +} + +message RolePermissionList { + option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_schema) = { + json_schema : { + title : "RolePermissionList" + description : "RolePeList list" + read_only : true + } + }; + string apiVersion = 1 + [ (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { + title : "API Version", + description : "API Version of the role permission list resource" + read_only : true + } ]; + string kind = 2 + [ (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { + title : "Kind", + description : "Kind of the role permission list resource" + read_only : true + } ]; + rafay.dev.types.common.v3.ListMetadata metadata = 3 + [ (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { + title : "Metadata", + description : "Metadata of the role permission list resource" + read_only : true + } ]; + repeated RolePermission items = 4 + [ (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { + title : "Items", + description : "List of the role permission resources" + read_only : true + } ]; +} diff --git a/components/usermgmt/proto/proto/types/userpb/v3/user.pb.go b/components/usermgmt/proto/proto/types/userpb/v3/user.pb.go new file mode 100644 index 0000000..8d96686 --- /dev/null +++ b/components/usermgmt/proto/proto/types/userpb/v3/user.pb.go @@ -0,0 +1,598 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.27.1 +// protoc v3.19.1 +// source: proto/types/userpb/v3/user.proto + +package userv3 + +import ( + v3 "github.com/RafaySystems/rcloud-base/components/usermgmt/proto/types/commonpb/v3" + v31 "github.com/RafaySystems/rcloud-base/components/usermgmt/proto/types/systempb/v3" + _ "github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-openapiv2/options" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +type User struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + ApiVersion string `protobuf:"bytes,1,opt,name=apiVersion,proto3" json:"apiVersion,omitempty"` + Kind string `protobuf:"bytes,2,opt,name=kind,proto3" json:"kind,omitempty"` + Metadata *v3.Metadata `protobuf:"bytes,3,opt,name=metadata,proto3" json:"metadata,omitempty"` + Spec *UserSpec `protobuf:"bytes,4,opt,name=spec,proto3" json:"spec,omitempty"` + Status *v3.Status `protobuf:"bytes,5,opt,name=status,proto3" json:"status,omitempty"` +} + +func (x *User) Reset() { + *x = User{} + if protoimpl.UnsafeEnabled { + mi := &file_proto_types_userpb_v3_user_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *User) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*User) ProtoMessage() {} + +func (x *User) ProtoReflect() protoreflect.Message { + mi := &file_proto_types_userpb_v3_user_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use User.ProtoReflect.Descriptor instead. +func (*User) Descriptor() ([]byte, []int) { + return file_proto_types_userpb_v3_user_proto_rawDescGZIP(), []int{0} +} + +func (x *User) GetApiVersion() string { + if x != nil { + return x.ApiVersion + } + return "" +} + +func (x *User) GetKind() string { + if x != nil { + return x.Kind + } + return "" +} + +func (x *User) GetMetadata() *v3.Metadata { + if x != nil { + return x.Metadata + } + return nil +} + +func (x *User) GetSpec() *UserSpec { + if x != nil { + return x.Spec + } + return nil +} + +func (x *User) GetStatus() *v3.Status { + if x != nil { + return x.Status + } + return nil +} + +type UserSpec struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + FirstName string `protobuf:"bytes,1,opt,name=firstName,proto3" json:"firstName,omitempty"` + LastName string `protobuf:"bytes,2,opt,name=lastName,proto3" json:"lastName,omitempty"` + Username string `protobuf:"bytes,3,opt,name=username,proto3" json:"username,omitempty"` + Phone string `protobuf:"bytes,4,opt,name=phone,proto3" json:"phone,omitempty"` + Password string `protobuf:"bytes,5,opt,name=password,proto3" json:"password,omitempty"` + TotpRequired string `protobuf:"bytes,6,opt,name=totpRequired,proto3" json:"totpRequired,omitempty"` + TotpSecret string `protobuf:"bytes,7,opt,name=totpSecret,proto3" json:"totpSecret,omitempty"` + Roles []*Role `protobuf:"bytes,8,rep,name=roles,proto3" json:"roles,omitempty"` + Groups []*Group `protobuf:"bytes,9,rep,name=groups,proto3" json:"groups,omitempty"` + Projects []*v31.Project `protobuf:"bytes,10,rep,name=projects,proto3" json:"projects,omitempty"` + EmailVerified bool `protobuf:"varint,11,opt,name=emailVerified,proto3" json:"emailVerified,omitempty"` + PhoneVerified bool `protobuf:"varint,12,opt,name=phoneVerified,proto3" json:"phoneVerified,omitempty"` + TotpVerified bool `protobuf:"varint,13,opt,name=totpVerified,proto3" json:"totpVerified,omitempty"` +} + +func (x *UserSpec) Reset() { + *x = UserSpec{} + if protoimpl.UnsafeEnabled { + mi := &file_proto_types_userpb_v3_user_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *UserSpec) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*UserSpec) ProtoMessage() {} + +func (x *UserSpec) ProtoReflect() protoreflect.Message { + mi := &file_proto_types_userpb_v3_user_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use UserSpec.ProtoReflect.Descriptor instead. +func (*UserSpec) Descriptor() ([]byte, []int) { + return file_proto_types_userpb_v3_user_proto_rawDescGZIP(), []int{1} +} + +func (x *UserSpec) GetFirstName() string { + if x != nil { + return x.FirstName + } + return "" +} + +func (x *UserSpec) GetLastName() string { + if x != nil { + return x.LastName + } + return "" +} + +func (x *UserSpec) GetUsername() string { + if x != nil { + return x.Username + } + return "" +} + +func (x *UserSpec) GetPhone() string { + if x != nil { + return x.Phone + } + return "" +} + +func (x *UserSpec) GetPassword() string { + if x != nil { + return x.Password + } + return "" +} + +func (x *UserSpec) GetTotpRequired() string { + if x != nil { + return x.TotpRequired + } + return "" +} + +func (x *UserSpec) GetTotpSecret() string { + if x != nil { + return x.TotpSecret + } + return "" +} + +func (x *UserSpec) GetRoles() []*Role { + if x != nil { + return x.Roles + } + return nil +} + +func (x *UserSpec) GetGroups() []*Group { + if x != nil { + return x.Groups + } + return nil +} + +func (x *UserSpec) GetProjects() []*v31.Project { + if x != nil { + return x.Projects + } + return nil +} + +func (x *UserSpec) GetEmailVerified() bool { + if x != nil { + return x.EmailVerified + } + return false +} + +func (x *UserSpec) GetPhoneVerified() bool { + if x != nil { + return x.PhoneVerified + } + return false +} + +func (x *UserSpec) GetTotpVerified() bool { + if x != nil { + return x.TotpVerified + } + return false +} + +type UserList struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + ApiVersion string `protobuf:"bytes,1,opt,name=apiVersion,proto3" json:"apiVersion,omitempty"` + Kind string `protobuf:"bytes,2,opt,name=kind,proto3" json:"kind,omitempty"` + Metadata *v3.ListMetadata `protobuf:"bytes,3,opt,name=metadata,proto3" json:"metadata,omitempty"` + Items []*User `protobuf:"bytes,4,rep,name=items,proto3" json:"items,omitempty"` +} + +func (x *UserList) Reset() { + *x = UserList{} + if protoimpl.UnsafeEnabled { + mi := &file_proto_types_userpb_v3_user_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *UserList) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*UserList) ProtoMessage() {} + +func (x *UserList) ProtoReflect() protoreflect.Message { + mi := &file_proto_types_userpb_v3_user_proto_msgTypes[2] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use UserList.ProtoReflect.Descriptor instead. +func (*UserList) Descriptor() ([]byte, []int) { + return file_proto_types_userpb_v3_user_proto_rawDescGZIP(), []int{2} +} + +func (x *UserList) GetApiVersion() string { + if x != nil { + return x.ApiVersion + } + return "" +} + +func (x *UserList) GetKind() string { + if x != nil { + return x.Kind + } + return "" +} + +func (x *UserList) GetMetadata() *v3.ListMetadata { + if x != nil { + return x.Metadata + } + return nil +} + +func (x *UserList) GetItems() []*User { + if x != nil { + return x.Items + } + return nil +} + +var File_proto_types_userpb_v3_user_proto protoreflect.FileDescriptor + +var file_proto_types_userpb_v3_user_proto_rawDesc = []byte{ + 0x0a, 0x20, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2f, 0x75, 0x73, + 0x65, 0x72, 0x70, 0x62, 0x2f, 0x76, 0x33, 0x2f, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x12, 0x17, 0x72, 0x61, 0x66, 0x61, 0x79, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x74, 0x79, + 0x70, 0x65, 0x73, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x1a, 0x24, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x70, + 0x62, 0x2f, 0x76, 0x33, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x1a, 0x20, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2f, 0x75, + 0x73, 0x65, 0x72, 0x70, 0x62, 0x2f, 0x76, 0x33, 0x2f, 0x72, 0x6f, 0x6c, 0x65, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x1a, 0x2a, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, + 0x2f, 0x75, 0x73, 0x65, 0x72, 0x70, 0x62, 0x2f, 0x76, 0x33, 0x2f, 0x72, 0x6f, 0x6c, 0x65, 0x70, + 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, + 0x21, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2f, 0x75, 0x73, 0x65, + 0x72, 0x70, 0x62, 0x2f, 0x76, 0x33, 0x2f, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x1a, 0x25, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2f, + 0x73, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x70, 0x62, 0x2f, 0x76, 0x33, 0x2f, 0x70, 0x72, 0x6f, 0x6a, + 0x65, 0x63, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x63, 0x2d, 0x67, 0x65, 0x6e, 0x2d, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x76, 0x32, 0x2f, + 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x99, 0x04, 0x0a, 0x04, 0x55, 0x73, + 0x65, 0x72, 0x12, 0x6a, 0x0a, 0x0a, 0x61, 0x70, 0x69, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x4a, 0x92, 0x41, 0x47, 0x2a, 0x0b, 0x41, 0x50, 0x49, + 0x20, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x32, 0x20, 0x41, 0x50, 0x49, 0x20, 0x56, 0x65, + 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, 0x20, 0x75, 0x73, 0x65, + 0x72, 0x20, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x3a, 0x16, 0x75, 0x73, 0x65, 0x72, + 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x6b, 0x38, 0x73, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x69, 0x6f, 0x2f, + 0x76, 0x33, 0x52, 0x0a, 0x61, 0x70, 0x69, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x3e, + 0x0a, 0x04, 0x6b, 0x69, 0x6e, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x2a, 0x92, 0x41, + 0x27, 0x2a, 0x04, 0x4b, 0x69, 0x6e, 0x64, 0x32, 0x19, 0x4b, 0x69, 0x6e, 0x64, 0x20, 0x6f, 0x66, + 0x20, 0x74, 0x68, 0x65, 0x20, 0x75, 0x73, 0x65, 0x72, 0x20, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, + 0x63, 0x65, 0x3a, 0x04, 0x55, 0x73, 0x65, 0x72, 0x52, 0x04, 0x6b, 0x69, 0x6e, 0x64, 0x12, 0x6d, + 0x0a, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x23, 0x2e, 0x72, 0x61, 0x66, 0x61, 0x79, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x74, 0x79, 0x70, + 0x65, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x33, 0x2e, 0x4d, 0x65, 0x74, + 0x61, 0x64, 0x61, 0x74, 0x61, 0x42, 0x2c, 0x92, 0x41, 0x29, 0x2a, 0x08, 0x4d, 0x65, 0x74, 0x61, + 0x64, 0x61, 0x74, 0x61, 0x32, 0x1d, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x20, 0x6f, + 0x66, 0x20, 0x74, 0x68, 0x65, 0x20, 0x75, 0x73, 0x65, 0x72, 0x20, 0x72, 0x65, 0x73, 0x6f, 0x75, + 0x72, 0x63, 0x65, 0x52, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x5b, 0x0a, + 0x04, 0x73, 0x70, 0x65, 0x63, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x72, 0x61, + 0x66, 0x61, 0x79, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x75, 0x73, + 0x65, 0x72, 0x2e, 0x76, 0x33, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x53, 0x70, 0x65, 0x63, 0x42, 0x24, + 0x92, 0x41, 0x21, 0x2a, 0x04, 0x53, 0x70, 0x65, 0x63, 0x32, 0x19, 0x53, 0x70, 0x65, 0x63, 0x20, + 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, 0x20, 0x75, 0x73, 0x65, 0x72, 0x20, 0x72, 0x65, 0x73, 0x6f, + 0x75, 0x72, 0x63, 0x65, 0x52, 0x04, 0x73, 0x70, 0x65, 0x63, 0x12, 0x60, 0x0a, 0x06, 0x73, 0x74, + 0x61, 0x74, 0x75, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x72, 0x61, 0x66, + 0x61, 0x79, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x63, 0x6f, 0x6d, + 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x33, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x42, 0x25, 0x92, + 0x41, 0x22, 0x2a, 0x06, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x32, 0x16, 0x53, 0x74, 0x61, 0x74, + 0x75, 0x73, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, 0x20, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, + 0x63, 0x65, 0x40, 0x01, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x3a, 0x37, 0x92, 0x41, + 0x34, 0x0a, 0x32, 0x2a, 0x04, 0x55, 0x73, 0x65, 0x72, 0x32, 0x04, 0x55, 0x73, 0x65, 0x72, 0xd2, + 0x01, 0x0a, 0x61, 0x70, 0x69, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0xd2, 0x01, 0x04, 0x6b, + 0x69, 0x6e, 0x64, 0xd2, 0x01, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xd2, 0x01, + 0x04, 0x73, 0x70, 0x65, 0x63, 0x22, 0xfd, 0x08, 0x0a, 0x08, 0x55, 0x73, 0x65, 0x72, 0x53, 0x70, + 0x65, 0x63, 0x12, 0x44, 0x0a, 0x09, 0x66, 0x69, 0x72, 0x73, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x26, 0x92, 0x41, 0x23, 0x2a, 0x09, 0x46, 0x69, 0x72, 0x73, + 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x32, 0x16, 0x46, 0x69, 0x72, 0x73, 0x74, 0x20, 0x6e, 0x61, 0x6d, + 0x65, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, 0x20, 0x75, 0x73, 0x65, 0x72, 0x52, 0x09, 0x66, + 0x69, 0x72, 0x73, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x40, 0x0a, 0x08, 0x6c, 0x61, 0x73, 0x74, + 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x24, 0x92, 0x41, 0x21, 0x2a, + 0x08, 0x4c, 0x61, 0x73, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x32, 0x15, 0x4c, 0x61, 0x73, 0x74, 0x20, + 0x6e, 0x61, 0x6d, 0x65, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, 0x20, 0x75, 0x73, 0x65, 0x72, + 0x52, 0x08, 0x6c, 0x61, 0x73, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x3f, 0x0a, 0x08, 0x75, 0x73, + 0x65, 0x72, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x42, 0x23, 0x92, 0x41, + 0x20, 0x2a, 0x08, 0x55, 0x73, 0x65, 0x72, 0x6e, 0x61, 0x6d, 0x65, 0x32, 0x14, 0x55, 0x73, 0x65, + 0x72, 0x6e, 0x61, 0x6d, 0x65, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, 0x20, 0x75, 0x73, 0x65, + 0x72, 0x52, 0x08, 0x75, 0x73, 0x65, 0x72, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x3a, 0x0a, 0x05, 0x70, + 0x68, 0x6f, 0x6e, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x42, 0x24, 0x92, 0x41, 0x21, 0x2a, + 0x05, 0x50, 0x68, 0x6f, 0x6e, 0x65, 0x32, 0x18, 0x50, 0x68, 0x6f, 0x6e, 0x65, 0x20, 0x6e, 0x75, + 0x6d, 0x62, 0x65, 0x72, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, 0x20, 0x75, 0x73, 0x65, 0x72, + 0x52, 0x05, 0x70, 0x68, 0x6f, 0x6e, 0x65, 0x12, 0x3f, 0x0a, 0x08, 0x70, 0x61, 0x73, 0x73, 0x77, + 0x6f, 0x72, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x42, 0x23, 0x92, 0x41, 0x20, 0x2a, 0x08, + 0x50, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x32, 0x14, 0x50, 0x61, 0x73, 0x73, 0x77, 0x6f, + 0x72, 0x64, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, 0x20, 0x75, 0x73, 0x65, 0x72, 0x52, 0x08, + 0x70, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x12, 0x5a, 0x0a, 0x0c, 0x74, 0x6f, 0x74, 0x70, + 0x52, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x64, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x42, 0x36, + 0x92, 0x41, 0x33, 0x2a, 0x0c, 0x54, 0x6f, 0x74, 0x70, 0x52, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, + 0x64, 0x32, 0x23, 0x46, 0x6c, 0x61, 0x67, 0x20, 0x74, 0x6f, 0x20, 0x73, 0x70, 0x65, 0x63, 0x69, + 0x66, 0x79, 0x20, 0x69, 0x66, 0x20, 0x54, 0x4f, 0x54, 0x50, 0x20, 0x69, 0x73, 0x20, 0x72, 0x65, + 0x71, 0x75, 0x69, 0x72, 0x65, 0x64, 0x52, 0x0c, 0x74, 0x6f, 0x74, 0x70, 0x52, 0x65, 0x71, 0x75, + 0x69, 0x72, 0x65, 0x64, 0x12, 0x40, 0x0a, 0x0a, 0x74, 0x6f, 0x74, 0x70, 0x53, 0x65, 0x63, 0x72, + 0x65, 0x74, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x42, 0x20, 0x92, 0x41, 0x1d, 0x2a, 0x0a, 0x54, + 0x6f, 0x74, 0x70, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x32, 0x0f, 0x53, 0x65, 0x63, 0x72, 0x65, + 0x74, 0x20, 0x66, 0x6f, 0x72, 0x20, 0x54, 0x4f, 0x54, 0x50, 0x52, 0x0a, 0x74, 0x6f, 0x74, 0x70, + 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x12, 0x52, 0x0a, 0x05, 0x72, 0x6f, 0x6c, 0x65, 0x73, 0x18, + 0x08, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x72, 0x61, 0x66, 0x61, 0x79, 0x2e, 0x64, 0x65, + 0x76, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x2e, + 0x52, 0x6f, 0x6c, 0x65, 0x42, 0x1d, 0x92, 0x41, 0x1a, 0x2a, 0x05, 0x52, 0x6f, 0x6c, 0x65, 0x73, + 0x32, 0x11, 0x52, 0x6f, 0x6c, 0x65, 0x73, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, 0x20, 0x75, + 0x73, 0x65, 0x72, 0x52, 0x05, 0x72, 0x6f, 0x6c, 0x65, 0x73, 0x12, 0x56, 0x0a, 0x06, 0x67, 0x72, + 0x6f, 0x75, 0x70, 0x73, 0x18, 0x09, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x72, 0x61, 0x66, + 0x61, 0x79, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x75, 0x73, 0x65, + 0x72, 0x2e, 0x76, 0x33, 0x2e, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x42, 0x1e, 0x92, 0x41, 0x1b, 0x2a, + 0x05, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x32, 0x12, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x73, 0x20, 0x6f, + 0x66, 0x20, 0x74, 0x68, 0x65, 0x20, 0x75, 0x73, 0x65, 0x72, 0x52, 0x06, 0x67, 0x72, 0x6f, 0x75, + 0x70, 0x73, 0x12, 0x63, 0x0a, 0x08, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x18, 0x0a, + 0x20, 0x03, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x72, 0x61, 0x66, 0x61, 0x79, 0x2e, 0x64, 0x65, 0x76, + 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x73, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x2e, 0x76, 0x33, + 0x2e, 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x42, 0x23, 0x92, 0x41, 0x20, 0x2a, 0x08, 0x50, + 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x32, 0x14, 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, + 0x73, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, 0x20, 0x75, 0x73, 0x65, 0x72, 0x52, 0x08, 0x70, + 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x12, 0x6e, 0x0a, 0x0d, 0x65, 0x6d, 0x61, 0x69, 0x6c, + 0x56, 0x65, 0x72, 0x69, 0x66, 0x69, 0x65, 0x64, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x08, 0x42, 0x48, + 0x92, 0x41, 0x45, 0x2a, 0x0d, 0x45, 0x6d, 0x61, 0x69, 0x6c, 0x56, 0x65, 0x72, 0x69, 0x66, 0x69, + 0x65, 0x64, 0x32, 0x32, 0x46, 0x6c, 0x61, 0x67, 0x20, 0x74, 0x6f, 0x20, 0x73, 0x68, 0x6f, 0x77, + 0x20, 0x69, 0x66, 0x20, 0x74, 0x68, 0x65, 0x20, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x20, 0x6f, 0x66, + 0x20, 0x74, 0x68, 0x65, 0x20, 0x75, 0x73, 0x65, 0x72, 0x20, 0x77, 0x61, 0x73, 0x20, 0x76, 0x65, + 0x72, 0x69, 0x66, 0x69, 0x65, 0x64, 0x40, 0x01, 0x52, 0x0d, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x56, + 0x65, 0x72, 0x69, 0x66, 0x69, 0x65, 0x64, 0x12, 0x71, 0x0a, 0x0d, 0x70, 0x68, 0x6f, 0x6e, 0x65, + 0x56, 0x65, 0x72, 0x69, 0x66, 0x69, 0x65, 0x64, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x08, 0x42, 0x4b, + 0x92, 0x41, 0x48, 0x2a, 0x0d, 0x50, 0x68, 0x6f, 0x6e, 0x65, 0x56, 0x65, 0x72, 0x69, 0x66, 0x69, + 0x65, 0x64, 0x32, 0x35, 0x46, 0x6c, 0x61, 0x67, 0x20, 0x74, 0x6f, 0x20, 0x73, 0x68, 0x6f, 0x77, + 0x20, 0x69, 0x66, 0x20, 0x70, 0x68, 0x6f, 0x6e, 0x65, 0x20, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, + 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, 0x20, 0x75, 0x73, 0x65, 0x72, 0x20, 0x77, 0x61, 0x73, + 0x20, 0x76, 0x65, 0x72, 0x69, 0x66, 0x69, 0x65, 0x64, 0x40, 0x01, 0x52, 0x0d, 0x70, 0x68, 0x6f, + 0x6e, 0x65, 0x56, 0x65, 0x72, 0x69, 0x66, 0x69, 0x65, 0x64, 0x12, 0x6a, 0x0a, 0x0c, 0x74, 0x6f, + 0x74, 0x70, 0x56, 0x65, 0x72, 0x69, 0x66, 0x69, 0x65, 0x64, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x08, + 0x42, 0x46, 0x92, 0x41, 0x43, 0x2a, 0x0c, 0x54, 0x6f, 0x74, 0x70, 0x56, 0x65, 0x72, 0x69, 0x66, + 0x69, 0x65, 0x64, 0x32, 0x31, 0x46, 0x6c, 0x61, 0x67, 0x20, 0x74, 0x6f, 0x20, 0x73, 0x68, 0x6f, + 0x77, 0x20, 0x69, 0x66, 0x20, 0x74, 0x68, 0x65, 0x20, 0x54, 0x4f, 0x54, 0x50, 0x20, 0x6f, 0x66, + 0x20, 0x74, 0x68, 0x65, 0x20, 0x75, 0x73, 0x65, 0x72, 0x20, 0x77, 0x61, 0x73, 0x20, 0x76, 0x65, + 0x72, 0x69, 0x66, 0x69, 0x65, 0x64, 0x40, 0x01, 0x52, 0x0c, 0x74, 0x6f, 0x74, 0x70, 0x56, 0x65, + 0x72, 0x69, 0x66, 0x69, 0x65, 0x64, 0x3a, 0x2d, 0x92, 0x41, 0x2a, 0x0a, 0x28, 0x2a, 0x12, 0x55, + 0x73, 0x65, 0x72, 0x20, 0x53, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x32, 0x12, 0x55, 0x73, 0x65, 0x72, 0x20, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x63, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0xbf, 0x03, 0x0a, 0x08, 0x55, 0x73, 0x65, 0x72, 0x4c, 0x69, + 0x73, 0x74, 0x12, 0x71, 0x0a, 0x0a, 0x61, 0x70, 0x69, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x51, 0x92, 0x41, 0x4e, 0x2a, 0x0b, 0x41, 0x50, 0x49, + 0x20, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x32, 0x25, 0x41, 0x50, 0x49, 0x20, 0x56, 0x65, + 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, 0x20, 0x75, 0x73, 0x65, + 0x72, 0x20, 0x6c, 0x69, 0x73, 0x74, 0x20, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x3a, + 0x16, 0x75, 0x73, 0x65, 0x72, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x6b, 0x38, 0x73, 0x6d, 0x67, 0x6d, + 0x74, 0x2e, 0x69, 0x6f, 0x2f, 0x76, 0x33, 0x40, 0x01, 0x52, 0x0a, 0x61, 0x70, 0x69, 0x56, 0x65, + 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x49, 0x0a, 0x04, 0x6b, 0x69, 0x6e, 0x64, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x09, 0x42, 0x35, 0x92, 0x41, 0x32, 0x2a, 0x04, 0x4b, 0x69, 0x6e, 0x64, 0x32, 0x1e, + 0x4b, 0x69, 0x6e, 0x64, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, 0x20, 0x75, 0x73, 0x65, 0x72, + 0x20, 0x6c, 0x69, 0x73, 0x74, 0x20, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x3a, 0x08, + 0x55, 0x73, 0x65, 0x72, 0x4c, 0x69, 0x73, 0x74, 0x40, 0x01, 0x52, 0x04, 0x6b, 0x69, 0x6e, 0x64, + 0x12, 0x78, 0x0a, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, 0x03, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x72, 0x61, 0x66, 0x61, 0x79, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x74, + 0x79, 0x70, 0x65, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x33, 0x2e, 0x4c, + 0x69, 0x73, 0x74, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x42, 0x33, 0x92, 0x41, 0x30, + 0x2a, 0x08, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x32, 0x22, 0x4d, 0x65, 0x74, 0x61, + 0x64, 0x61, 0x74, 0x61, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, 0x20, 0x75, 0x73, 0x65, 0x72, + 0x20, 0x6c, 0x69, 0x73, 0x74, 0x20, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x40, 0x01, + 0x52, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x5d, 0x0a, 0x05, 0x69, 0x74, + 0x65, 0x6d, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x72, 0x61, 0x66, 0x61, + 0x79, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x75, 0x73, 0x65, 0x72, + 0x2e, 0x76, 0x33, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x42, 0x28, 0x92, 0x41, 0x25, 0x2a, 0x05, 0x49, + 0x74, 0x65, 0x6d, 0x73, 0x32, 0x1a, 0x4c, 0x69, 0x73, 0x74, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, + 0x65, 0x20, 0x75, 0x73, 0x65, 0x72, 0x20, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, + 0x40, 0x01, 0x52, 0x05, 0x69, 0x74, 0x65, 0x6d, 0x73, 0x3a, 0x1c, 0x92, 0x41, 0x19, 0x0a, 0x17, + 0x2a, 0x08, 0x55, 0x73, 0x65, 0x72, 0x4c, 0x69, 0x73, 0x74, 0x32, 0x09, 0x55, 0x73, 0x65, 0x72, + 0x20, 0x6c, 0x69, 0x73, 0x74, 0x40, 0x01, 0x42, 0xff, 0x01, 0x0a, 0x1b, 0x63, 0x6f, 0x6d, 0x2e, + 0x72, 0x61, 0x66, 0x61, 0x79, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, + 0x75, 0x73, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x42, 0x09, 0x55, 0x73, 0x65, 0x72, 0x50, 0x72, 0x6f, + 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x54, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, + 0x2f, 0x52, 0x61, 0x66, 0x61, 0x79, 0x53, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x73, 0x2f, 0x72, 0x63, + 0x6c, 0x6f, 0x75, 0x64, 0x2d, 0x62, 0x61, 0x73, 0x65, 0x2f, 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, + 0x65, 0x6e, 0x74, 0x73, 0x2f, 0x75, 0x73, 0x65, 0x72, 0x6d, 0x67, 0x6d, 0x74, 0x2f, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2f, 0x75, 0x73, 0x65, 0x72, 0x70, 0x62, + 0x2f, 0x76, 0x33, 0x3b, 0x75, 0x73, 0x65, 0x72, 0x76, 0x33, 0xa2, 0x02, 0x04, 0x52, 0x44, 0x54, + 0x55, 0xaa, 0x02, 0x17, 0x52, 0x61, 0x66, 0x61, 0x79, 0x2e, 0x44, 0x65, 0x76, 0x2e, 0x54, 0x79, + 0x70, 0x65, 0x73, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x2e, 0x56, 0x33, 0xca, 0x02, 0x17, 0x52, 0x61, + 0x66, 0x61, 0x79, 0x5c, 0x44, 0x65, 0x76, 0x5c, 0x54, 0x79, 0x70, 0x65, 0x73, 0x5c, 0x55, 0x73, + 0x65, 0x72, 0x5c, 0x56, 0x33, 0xe2, 0x02, 0x23, 0x52, 0x61, 0x66, 0x61, 0x79, 0x5c, 0x44, 0x65, + 0x76, 0x5c, 0x54, 0x79, 0x70, 0x65, 0x73, 0x5c, 0x55, 0x73, 0x65, 0x72, 0x5c, 0x56, 0x33, 0x5c, + 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x1b, 0x52, 0x61, + 0x66, 0x61, 0x79, 0x3a, 0x3a, 0x44, 0x65, 0x76, 0x3a, 0x3a, 0x54, 0x79, 0x70, 0x65, 0x73, 0x3a, + 0x3a, 0x55, 0x73, 0x65, 0x72, 0x3a, 0x3a, 0x56, 0x33, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x33, +} + +var ( + file_proto_types_userpb_v3_user_proto_rawDescOnce sync.Once + file_proto_types_userpb_v3_user_proto_rawDescData = file_proto_types_userpb_v3_user_proto_rawDesc +) + +func file_proto_types_userpb_v3_user_proto_rawDescGZIP() []byte { + file_proto_types_userpb_v3_user_proto_rawDescOnce.Do(func() { + file_proto_types_userpb_v3_user_proto_rawDescData = protoimpl.X.CompressGZIP(file_proto_types_userpb_v3_user_proto_rawDescData) + }) + return file_proto_types_userpb_v3_user_proto_rawDescData +} + +var file_proto_types_userpb_v3_user_proto_msgTypes = make([]protoimpl.MessageInfo, 3) +var file_proto_types_userpb_v3_user_proto_goTypes = []interface{}{ + (*User)(nil), // 0: rafay.dev.types.user.v3.User + (*UserSpec)(nil), // 1: rafay.dev.types.user.v3.UserSpec + (*UserList)(nil), // 2: rafay.dev.types.user.v3.UserList + (*v3.Metadata)(nil), // 3: rafay.dev.types.common.v3.Metadata + (*v3.Status)(nil), // 4: rafay.dev.types.common.v3.Status + (*Role)(nil), // 5: rafay.dev.types.user.v3.Role + (*Group)(nil), // 6: rafay.dev.types.user.v3.Group + (*v31.Project)(nil), // 7: rafay.dev.types.system.v3.Project + (*v3.ListMetadata)(nil), // 8: rafay.dev.types.common.v3.ListMetadata +} +var file_proto_types_userpb_v3_user_proto_depIdxs = []int32{ + 3, // 0: rafay.dev.types.user.v3.User.metadata:type_name -> rafay.dev.types.common.v3.Metadata + 1, // 1: rafay.dev.types.user.v3.User.spec:type_name -> rafay.dev.types.user.v3.UserSpec + 4, // 2: rafay.dev.types.user.v3.User.status:type_name -> rafay.dev.types.common.v3.Status + 5, // 3: rafay.dev.types.user.v3.UserSpec.roles:type_name -> rafay.dev.types.user.v3.Role + 6, // 4: rafay.dev.types.user.v3.UserSpec.groups:type_name -> rafay.dev.types.user.v3.Group + 7, // 5: rafay.dev.types.user.v3.UserSpec.projects:type_name -> rafay.dev.types.system.v3.Project + 8, // 6: rafay.dev.types.user.v3.UserList.metadata:type_name -> rafay.dev.types.common.v3.ListMetadata + 0, // 7: rafay.dev.types.user.v3.UserList.items:type_name -> rafay.dev.types.user.v3.User + 8, // [8:8] is the sub-list for method output_type + 8, // [8:8] is the sub-list for method input_type + 8, // [8:8] is the sub-list for extension type_name + 8, // [8:8] is the sub-list for extension extendee + 0, // [0:8] is the sub-list for field type_name +} + +func init() { file_proto_types_userpb_v3_user_proto_init() } +func file_proto_types_userpb_v3_user_proto_init() { + if File_proto_types_userpb_v3_user_proto != nil { + return + } + file_proto_types_userpb_v3_role_proto_init() + file_proto_types_userpb_v3_rolepermission_proto_init() + file_proto_types_userpb_v3_group_proto_init() + if !protoimpl.UnsafeEnabled { + file_proto_types_userpb_v3_user_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*User); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_types_userpb_v3_user_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*UserSpec); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_types_userpb_v3_user_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*UserList); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_proto_types_userpb_v3_user_proto_rawDesc, + NumEnums: 0, + NumMessages: 3, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_proto_types_userpb_v3_user_proto_goTypes, + DependencyIndexes: file_proto_types_userpb_v3_user_proto_depIdxs, + MessageInfos: file_proto_types_userpb_v3_user_proto_msgTypes, + }.Build() + File_proto_types_userpb_v3_user_proto = out.File + file_proto_types_userpb_v3_user_proto_rawDesc = nil + file_proto_types_userpb_v3_user_proto_goTypes = nil + file_proto_types_userpb_v3_user_proto_depIdxs = nil +} diff --git a/components/usermgmt/proto/proto/types/userpb/v3/user.proto b/components/usermgmt/proto/proto/types/userpb/v3/user.proto new file mode 100644 index 0000000..b5d354a --- /dev/null +++ b/components/usermgmt/proto/proto/types/userpb/v3/user.proto @@ -0,0 +1,163 @@ +syntax = "proto3"; +package rafay.dev.types.user.v3; + +import "proto/types/commonpb/v3/common.proto"; +import "proto/types/userpb/v3/role.proto"; +import "proto/types/userpb/v3/rolepermission.proto"; +import "proto/types/userpb/v3/group.proto"; +import "proto/types/systempb/v3/project.proto"; +import "protoc-gen-openapiv2/options/annotations.proto"; +// import "google/api/field_behavior.proto"; + +message User { + option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_schema) = { + json_schema : { + title : "User" + description : "User" + required : [ "apiVersion", "kind", "metadata", "spec" ] + } + }; + + string apiVersion = 1 + [ (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { + title : "API Version", + description : "API Version of the user resource" + default : "usermgmt.k8smgmt.io/v3" + } ]; + string kind = 2 + [ (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { + title : "Kind", + description : "Kind of the user resource" + default : "User" + } ]; + rafay.dev.types.common.v3.Metadata metadata = 3 + [ (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { + title : "Metadata", + description : "Metadata of the user resource" + } ]; + UserSpec spec = 4 + [ (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { + title : "Spec", + description : "Spec of the user resource" + } ]; + + rafay.dev.types.common.v3.Status status = 5 + [ (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { + title : "Status", + description : "Status of the resource" + read_only : true + } ]; +} + +message UserSpec { + option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_schema) = { + json_schema : { + title : "User Specification" + description : "User specification" + } + }; + string firstName = 1 + [ (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { + title : "FirstName" + description : "First name of the user" + } ]; + string lastName = 2 + [ (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { + title : "LastName" + description : "Last name of the user" + } ]; + string username = 3 + [ (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { + title : "Username" + description : "Username of the user" + } ]; + string phone = 4 + [ (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { + title : "Phone" + description : "Phone number of the user" + } ]; + string password = 5 + [ (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { + title : "Password" + description : "Password of the user" + } ]; + string totpRequired = 6 + [ (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { + title : "TotpRequired" + description : "Flag to specify if TOTP is required" + } ]; + string totpSecret = 7 + [ (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { + title : "TotpSecret" + description : "Secret for TOTP" + } ]; + repeated rafay.dev.types.user.v3.Role roles = 8 + [ (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { + title : "Roles" + description : "Roles of the user" + } ]; + repeated rafay.dev.types.user.v3.Group groups = 9 + [ (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { + title : "Group" + description : "Groups of the user" + } ]; + repeated rafay.dev.types.system.v3.Project projects = 10 + [ (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { + title : "Projects" + description : "Projects of the user" + } ]; + bool emailVerified = 11 + [ (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { + title : "EmailVerified" + description : "Flag to show if the email of the user was verified" + read_only : true + } ]; + bool phoneVerified = 12 + [ (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { + title : "PhoneVerified" + description : "Flag to show if phone number of the user was verified" + read_only : true + } ]; + bool totpVerified = 13 + [ (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { + title : "TotpVerified" + description : "Flag to show if the TOTP of the user was verified" + read_only : true + } ]; +} + +message UserList { + option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_schema) = { + json_schema : { + title : "UserList" + description : "User list" + read_only : true + } + }; + string apiVersion = 1 + [ (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { + title : "API Version", + description : "API Version of the user list resource" + default : "usermgmt.k8smgmt.io/v3" + read_only : true + } ]; + string kind = 2 + [ (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { + title : "Kind", + description : "Kind of the user list resource" + default : "UserList" + read_only : true + } ]; + rafay.dev.types.common.v3.ListMetadata metadata = 3 + [ (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { + title : "Metadata", + description : "Metadata of the user list resource" + read_only : true + } ]; + repeated User items = 4 + [ (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { + title : "Items", + description : "List of the user resources" + read_only : true + } ]; +} From fc372512c2b657e0fa56b1eaf01679de8bb79c96 Mon Sep 17 00:00:00 2001 From: Abin Simon Date: Sat, 1 Jan 2022 17:29:43 +0530 Subject: [PATCH 04/28] Update proto files for usermgmt --- components/adminsrv/go.mod | 2 +- components/usermgmt/go.mod | 19 + components/usermgmt/go.sum | 1104 +++++++++++++++++ components/usermgmt/main.go | 126 +- .../usermgmt/proto/proto/rpc/v3/group.proto | 129 -- .../usermgmt/proto/proto/rpc/v3/role.proto | 120 -- .../proto/proto/rpc/v3/rolepermission.proto | 99 -- .../usermgmt/proto/proto/rpc/v3/user.proto | 121 -- .../proto/proto/types/userpb/v3/group.proto | 124 -- .../proto/proto/types/userpb/v3/role.proto | 94 -- .../types/userpb/v3/rolepermission.proto | 93 -- .../proto/proto/types/userpb/v3/user.proto | 163 --- .../proto/{proto => }/rpc/v3/group.pb.go | 0 .../proto/{proto => }/rpc/v3/group.pb.gw.go | 0 .../proto/{proto => }/rpc/v3/group_grpc.pb.go | 0 .../proto/{proto => }/rpc/v3/role.pb.go | 0 .../proto/{proto => }/rpc/v3/role.pb.gw.go | 0 .../proto/{proto => }/rpc/v3/role_grpc.pb.go | 0 .../{proto => }/rpc/v3/rolepermission.pb.go | 0 .../rpc/v3/rolepermission.pb.gw.go | 0 .../rpc/v3/rolepermission_grpc.pb.go | 0 .../proto/{proto => }/rpc/v3/user.pb.go | 0 .../proto/{proto => }/rpc/v3/user.pb.gw.go | 0 .../proto/{proto => }/rpc/v3/user_grpc.pb.go | 0 .../{proto => }/types/userpb/v3/group.pb.go | 4 +- .../{proto => }/types/userpb/v3/role.pb.go | 2 +- .../types/userpb/v3/rolepermission.pb.go | 2 +- .../{proto => }/types/userpb/v3/user.pb.go | 4 +- 28 files changed, 1255 insertions(+), 951 deletions(-) create mode 100644 components/usermgmt/go.sum delete mode 100644 components/usermgmt/proto/proto/rpc/v3/group.proto delete mode 100644 components/usermgmt/proto/proto/rpc/v3/role.proto delete mode 100644 components/usermgmt/proto/proto/rpc/v3/rolepermission.proto delete mode 100644 components/usermgmt/proto/proto/rpc/v3/user.proto delete mode 100644 components/usermgmt/proto/proto/types/userpb/v3/group.proto delete mode 100644 components/usermgmt/proto/proto/types/userpb/v3/role.proto delete mode 100644 components/usermgmt/proto/proto/types/userpb/v3/rolepermission.proto delete mode 100644 components/usermgmt/proto/proto/types/userpb/v3/user.proto rename components/usermgmt/proto/{proto => }/rpc/v3/group.pb.go (100%) rename components/usermgmt/proto/{proto => }/rpc/v3/group.pb.gw.go (100%) rename components/usermgmt/proto/{proto => }/rpc/v3/group_grpc.pb.go (100%) rename components/usermgmt/proto/{proto => }/rpc/v3/role.pb.go (100%) rename components/usermgmt/proto/{proto => }/rpc/v3/role.pb.gw.go (100%) rename components/usermgmt/proto/{proto => }/rpc/v3/role_grpc.pb.go (100%) rename components/usermgmt/proto/{proto => }/rpc/v3/rolepermission.pb.go (100%) rename components/usermgmt/proto/{proto => }/rpc/v3/rolepermission.pb.gw.go (100%) rename components/usermgmt/proto/{proto => }/rpc/v3/rolepermission_grpc.pb.go (100%) rename components/usermgmt/proto/{proto => }/rpc/v3/user.pb.go (100%) rename components/usermgmt/proto/{proto => }/rpc/v3/user.pb.gw.go (100%) rename components/usermgmt/proto/{proto => }/rpc/v3/user_grpc.pb.go (100%) rename components/usermgmt/proto/{proto => }/types/userpb/v3/group.pb.go (99%) rename components/usermgmt/proto/{proto => }/types/userpb/v3/role.pb.go (99%) rename components/usermgmt/proto/{proto => }/types/userpb/v3/rolepermission.pb.go (99%) rename components/usermgmt/proto/{proto => }/types/userpb/v3/user.pb.go (99%) diff --git a/components/adminsrv/go.mod b/components/adminsrv/go.mod index 1809fe0..c9f6ae6 100644 --- a/components/adminsrv/go.mod +++ b/components/adminsrv/go.mod @@ -1,6 +1,6 @@ module github.com/RafaySystems/rcloud-base/components/adminsrv -go 1.17 +go 1.16 require ( github.com/RafaySystems/rcloud-base/components/common v0.0.0-unpublished diff --git a/components/usermgmt/go.mod b/components/usermgmt/go.mod index 67bf315..977b8b1 100644 --- a/components/usermgmt/go.mod +++ b/components/usermgmt/go.mod @@ -1,3 +1,22 @@ module github.com/RafaySystems/rcloud-base/components/usermgmt go 1.16 + +require ( + github.com/RafaySystems/rcloud-base/components/adminsrv v0.0.0-unpublished + github.com/RafaySystems/rcloud-base/components/common v0.0.0-unpublished + github.com/gogo/protobuf v1.3.2 + github.com/grpc-ecosystem/grpc-gateway v1.16.0 + github.com/grpc-ecosystem/grpc-gateway/v2 v2.7.2 + github.com/spf13/viper v1.10.1 + google.golang.org/genproto v0.0.0-20211208223120-3a66f561d7aa + google.golang.org/grpc v1.43.0 + google.golang.org/protobuf v1.27.1 + sigs.k8s.io/controller-runtime v0.11.0 +) + +replace ( + github.com/RafaySystems/rcloud-base/components/adminsrv v0.0.0-unpublished => ../adminsrv/ + github.com/RafaySystems/rcloud-base/components/common v0.0.0-unpublished => ../common/ +// github.com/RafaySystems/rcloud-base/components/usermgmt v0.0.0-unpublished => ../usermgmt +) diff --git a/components/usermgmt/go.sum b/components/usermgmt/go.sum new file mode 100644 index 0000000..5ec7f80 --- /dev/null +++ b/components/usermgmt/go.sum @@ -0,0 +1,1104 @@ +cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= +cloud.google.com/go v0.34.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= +cloud.google.com/go v0.38.0/go.mod h1:990N+gfupTy94rShfmMCWGDn0LpTmnzTp2qbd1dvSRU= +cloud.google.com/go v0.44.1/go.mod h1:iSa0KzasP4Uvy3f1mN/7PiObzGgflwredwwASm/v6AU= +cloud.google.com/go v0.44.2/go.mod h1:60680Gw3Yr4ikxnPRS/oxxkBccT6SA1yMk63TGekxKY= +cloud.google.com/go v0.45.1/go.mod h1:RpBamKRgapWJb87xiFSdk4g1CME7QZg3uwTez+TSTjc= +cloud.google.com/go v0.46.3/go.mod h1:a6bKKbmY7er1mI7TEI4lsAkts/mkhTSZK8w33B4RAg0= +cloud.google.com/go v0.50.0/go.mod h1:r9sluTvynVuxRIOHXQEHMFffphuXHOMZMycpNR5e6To= +cloud.google.com/go v0.52.0/go.mod h1:pXajvRH/6o3+F9jDHZWQ5PbGhn+o8w9qiu/CffaVdO4= +cloud.google.com/go v0.53.0/go.mod h1:fp/UouUEsRkN6ryDKNW/Upv/JBKnv6WDthjR6+vze6M= +cloud.google.com/go v0.54.0/go.mod h1:1rq2OEkV3YMf6n/9ZvGWI3GWw0VoqH/1x2nd8Is/bPc= +cloud.google.com/go v0.56.0/go.mod h1:jr7tqZxxKOVYizybht9+26Z/gUq7tiRzu+ACVAMbKVk= +cloud.google.com/go v0.57.0/go.mod h1:oXiQ6Rzq3RAkkY7N6t3TcE6jE+CIBBbA36lwQ1JyzZs= +cloud.google.com/go v0.62.0/go.mod h1:jmCYTdRCQuc1PHIIJ/maLInMho30T/Y0M4hTdTShOYc= +cloud.google.com/go v0.65.0/go.mod h1:O5N8zS7uWy9vkA9vayVHs65eM1ubvY4h553ofrNHObY= +cloud.google.com/go v0.72.0/go.mod h1:M+5Vjvlc2wnp6tjzE102Dw08nGShTscUx2nZMufOKPI= +cloud.google.com/go v0.74.0/go.mod h1:VV1xSbzvo+9QJOxLDaJfTjx5e+MePCpCWwvftOeQmWk= +cloud.google.com/go v0.78.0/go.mod h1:QjdrLG0uq+YwhjoVOLsS1t7TW8fs36kLs4XO5R5ECHg= +cloud.google.com/go v0.79.0/go.mod h1:3bzgcEeQlzbuEAYu4mrWhKqWjmpprinYgKJLgKHnbb8= +cloud.google.com/go v0.81.0/go.mod h1:mk/AM35KwGk/Nm2YSeZbxXdrNK3KZOYHmLkOqC2V6E0= +cloud.google.com/go v0.83.0/go.mod h1:Z7MJUsANfY0pYPdw0lbnivPx4/vhy/e2FEkSkF7vAVY= +cloud.google.com/go v0.84.0/go.mod h1:RazrYuxIK6Kb7YrzzhPoLmCVzl7Sup4NrbKPg8KHSUM= +cloud.google.com/go v0.87.0/go.mod h1:TpDYlFy7vuLzZMMZ+B6iRiELaY7z/gJPaqbMx6mlWcY= +cloud.google.com/go v0.90.0/go.mod h1:kRX0mNRHe0e2rC6oNakvwQqzyDmg57xJ+SZU1eT2aDQ= +cloud.google.com/go v0.93.3/go.mod h1:8utlLll2EF5XMAV15woO4lSbWQlk8rer9aLOfLh7+YI= +cloud.google.com/go v0.94.1/go.mod h1:qAlAugsXlC+JWO+Bke5vCtc9ONxjQT3drlTTnAplMW4= +cloud.google.com/go v0.97.0/go.mod h1:GF7l59pYBVlXQIBLx3a761cZ41F9bBH3JUlihCt2Udc= +cloud.google.com/go v0.99.0/go.mod h1:w0Xx2nLzqWJPuozYQX+hFfCSI8WioryfRDzkoI/Y2ZA= +cloud.google.com/go/bigquery v1.0.1/go.mod h1:i/xbL2UlR5RvWAURpBYZTtm/cXjCha9lbfbpx4poX+o= +cloud.google.com/go/bigquery v1.3.0/go.mod h1:PjpwJnslEMmckchkHFfq+HTD2DmtT67aNFKH1/VBDHE= +cloud.google.com/go/bigquery v1.4.0/go.mod h1:S8dzgnTigyfTmLBfrtrhyYhwRxG72rYxvftPBK2Dvzc= +cloud.google.com/go/bigquery v1.5.0/go.mod h1:snEHRnqQbz117VIFhE8bmtwIDY80NLUZUMb4Nv6dBIg= +cloud.google.com/go/bigquery v1.7.0/go.mod h1://okPTzCYNXSlb24MZs83e2Do+h+VXtc4gLoIoXIAPc= +cloud.google.com/go/bigquery v1.8.0/go.mod h1:J5hqkt3O0uAFnINi6JXValWIb1v0goeZM77hZzJN/fQ= +cloud.google.com/go/datastore v1.0.0/go.mod h1:LXYbyblFSglQ5pkeyhO+Qmw7ukd3C+pD7TKLgZqpHYE= +cloud.google.com/go/datastore v1.1.0/go.mod h1:umbIZjpQpHh4hmRpGhH4tLFup+FVzqBi1b3c64qFpCk= +cloud.google.com/go/firestore v1.1.0/go.mod h1:ulACoGHTpvq5r8rxGJ4ddJZBZqakUQqClKRT5SZwBmk= +cloud.google.com/go/firestore v1.6.1/go.mod h1:asNXNOzBdyVQmEU+ggO8UPodTkEVFW5Qx+rwHnAz+EY= +cloud.google.com/go/pubsub v1.0.1/go.mod h1:R0Gpsv3s54REJCy4fxDixWD93lHJMoZTyQ2kNxGRt3I= +cloud.google.com/go/pubsub v1.1.0/go.mod h1:EwwdRX2sKPjnvnqCa270oGRyludottCI76h+R3AArQw= +cloud.google.com/go/pubsub v1.2.0/go.mod h1:jhfEVHT8odbXTkndysNHCcx0awwzvfOlguIAii9o8iA= +cloud.google.com/go/pubsub v1.3.1/go.mod h1:i+ucay31+CNRpDW4Lu78I4xXG+O1r/MAHgjpRVR+TSU= +cloud.google.com/go/storage v1.0.0/go.mod h1:IhtSnM/ZTZV8YYJWCY8RULGVqBDmpoyjwiyrjsg+URw= +cloud.google.com/go/storage v1.5.0/go.mod h1:tpKbwo567HUNpVclU5sGELwQWBDZ8gh0ZeosJ0Rtdos= +cloud.google.com/go/storage v1.6.0/go.mod h1:N7U0C8pVQ/+NIKOBQyamJIeKQKkZ+mxpohlUTyfDhBk= +cloud.google.com/go/storage v1.8.0/go.mod h1:Wv1Oy7z6Yz3DshWRJFhqM/UCfaWIRTdp0RXyy7KQOVs= +cloud.google.com/go/storage v1.10.0/go.mod h1:FLPqc6j+Ki4BU591ie1oL6qBQGu2Bl/tZ9ullr3+Kg0= +dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU= +github.com/Azure/go-ansiterm v0.0.0-20210608223527-2377c96fe795/go.mod h1:LmzpDX56iTiv29bbRTIsUNlaFfuhWRQBWjQdVyAevI8= +github.com/Azure/go-ansiterm v0.0.0-20210617225240-d185dfc1b5a1/go.mod h1:xomTg63KZ2rFqZQzSB4Vz2SUXa1BpHTVz9L5PTmPC4E= +github.com/Azure/go-autorest v14.2.0+incompatible/go.mod h1:r+4oMnoxhatjLLJ6zxSWATqVooLgysK6ZNox3g/xq24= +github.com/Azure/go-autorest/autorest v0.11.18/go.mod h1:dSiJPy22c3u0OtOKDNttNgqpNFY/GeWa7GH/Pz56QRA= +github.com/Azure/go-autorest/autorest/adal v0.9.13/go.mod h1:W/MM4U6nLxnIskrw4UwWzlHfGjwUS50aOsc/I3yuU8M= +github.com/Azure/go-autorest/autorest/date v0.3.0/go.mod h1:BI0uouVdmngYNUzGWeSYnokU+TrmwEsOqdt8Y6sso74= +github.com/Azure/go-autorest/autorest/mocks v0.4.1/go.mod h1:LTp+uSrOhSkaKrUy935gNZuuIPPVsHlr9DSOxSayd+k= +github.com/Azure/go-autorest/logger v0.2.1/go.mod h1:T9E3cAhj2VqvPOtCYAvby9aBXkZmbF5NWuPV8+WeEW8= +github.com/Azure/go-autorest/tracing v0.6.0/go.mod h1:+vhtPC754Xsa23ID7GlGsrdKBpUA79WCAKPPZVC2DeU= +github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= +github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo= +github.com/DataDog/datadog-go v3.2.0+incompatible/go.mod h1:LButxg5PwREeZtORoXG3tL4fMGNddJ+vMq1mwgfaqoQ= +github.com/NYTimes/gziphandler v0.0.0-20170623195520-56545f4a5d46/go.mod h1:3wb06e3pkSAbeQ52E9H9iFoQsEEwGN64994WTCIhntQ= +github.com/NYTimes/gziphandler v1.1.1/go.mod h1:n/CVRwUEOgIxrgPvAQhUUr9oeUtvrhMomdKFjzJNB0c= +github.com/OneOfOne/xxhash v1.2.2/go.mod h1:HSdplMjZKSmBqAxg5vPj2TmRDmfkzw+cTzAElWljhcU= +github.com/PuerkitoBio/purell v1.1.1/go.mod h1:c11w/QuzBsJSee3cPx9rAFu61PvFxuPbtSwDGJws/X0= +github.com/PuerkitoBio/urlesc v0.0.0-20170810143723-de5bf2ad4578/go.mod h1:uGdkoq3SwY9Y+13GIhn11/XLaGBb4BfwItxLd5jeuXE= +github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= +github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= +github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= +github.com/alecthomas/units v0.0.0-20190717042225-c3de453c63f4/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= +github.com/alecthomas/units v0.0.0-20190924025748-f65c72e2690d/go.mod h1:rBZYJk541a8SKzHPHnH3zbiI+7dagKZ0cgpgrD7Fyho= +github.com/antihax/optional v1.0.0/go.mod h1:uupD/76wgC+ih3iEmQUL+0Ugr19nfwCT1kdvxnR2qWY= +github.com/antlr/antlr4/runtime/Go/antlr v0.0.0-20210826220005-b48c857c3a0e/go.mod h1:F7bn7fEU90QkQ3tnmaTx3LTKLEDqnwWODIYppRQ5hnY= +github.com/armon/circbuf v0.0.0-20150827004946-bbbad097214e/go.mod h1:3U/XgcO3hCbHZ8TKRvWD2dDTCfh9M9ya+I9JpbB7O8o= +github.com/armon/go-metrics v0.0.0-20180917152333-f0300d1749da/go.mod h1:Q73ZrmVTwzkszR9V5SSuryQ31EELlFMUz1kKyl939pY= +github.com/armon/go-metrics v0.3.10/go.mod h1:4O98XIr/9W0sxpJ8UaYkvjk10Iff7SnFrb4QAOwNTFc= +github.com/armon/go-radix v0.0.0-20180808171621-7fddfc383310/go.mod h1:ufUuZ+zHj4x4TnLV4JWEpy2hxWSpsRywHrMgIH9cCH8= +github.com/armon/go-radix v1.0.0/go.mod h1:ufUuZ+zHj4x4TnLV4JWEpy2hxWSpsRywHrMgIH9cCH8= +github.com/asaskevich/govalidator v0.0.0-20190424111038-f61b66f89f4a/go.mod h1:lB+ZfQJz7igIIfQNfa7Ml4HSf2uFQQRzpGGRXenZAgY= +github.com/benbjohnson/clock v1.0.3/go.mod h1:bGMdMPoPVvcYyt1gHDf4J2KE153Yf9BuiUKYMaxlTDM= +github.com/benbjohnson/clock v1.1.0 h1:Q92kusRqC1XV2MjkWETPvjJVqKetz1OzxZB7mHJLju8= +github.com/benbjohnson/clock v1.1.0/go.mod h1:J11/hYXuz8f4ySSvYwY0FKfm+ezbsZBKZxNJlLklBHA= +github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q= +github.com/beorn7/perks v1.0.0/go.mod h1:KWe93zE9D1o94FZ5RNwFwVgaQK1VOXiVxmqh+CedLV8= +github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw= +github.com/bgentry/speakeasy v0.1.0/go.mod h1:+zsyZBPWlz7T6j88CTgSN5bM796AkVf0kBD4zp0CCIs= +github.com/bketelsen/crypt v0.0.3-0.20200106085610-5cbc8cc4026c/go.mod h1:MKsuJmJgSg28kpZDP6UIiPt0e0Oz0kqKNGyRaWEPv84= +github.com/bketelsen/crypt v0.0.4/go.mod h1:aI6NrJ0pMGgvZKL1iVgXLnfIFJtfV+bKCoqOes/6LfM= +github.com/blang/semver v3.5.1+incompatible/go.mod h1:kRBLl5iJ+tD4TcOOxsy/0fnwebNt5EWlYSAyrTnjyyk= +github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= +github.com/census-instrumentation/opencensus-proto v0.3.0/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= +github.com/certifi/gocertifi v0.0.0-20191021191039-0944d244cd40/go.mod h1:sGbDF6GwGcLpkNXPUTkMRoywsNa/ol15pxFe6ERfguA= +github.com/certifi/gocertifi v0.0.0-20200922220541-2c3bb06c6054/go.mod h1:sGbDF6GwGcLpkNXPUTkMRoywsNa/ol15pxFe6ERfguA= +github.com/cespare/xxhash v1.1.0/go.mod h1:XrSqR1VqqWfGrhpAt58auRo0WTKS1nRRg3ghfAqPWnc= +github.com/cespare/xxhash/v2 v2.1.1/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= +github.com/cespare/xxhash/v2 v2.1.2/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= +github.com/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWRnGsAI= +github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e/go.mod h1:nSuG5e5PlCu98SY8svDHJxuZscDgtXS6KTTbou5AhLI= +github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1/go.mod h1:Q3SI9o4m/ZMnBNeIyt5eFwwo7qiLfzFZmjNmxjkiQlU= +github.com/circonus-labs/circonus-gometrics v2.3.1+incompatible/go.mod h1:nmEj6Dob7S7YxXgwXpfOuvO54S+tGdZdw9fuRZt25Ag= +github.com/circonus-labs/circonusllhist v0.1.3/go.mod h1:kMXHVDlOchFAehlya5ePtbp5jckzBHf4XRpQvBOLI+I= +github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= +github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc= +github.com/cncf/udpa/go v0.0.0-20200629203442-efcf912fb354/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk= +github.com/cncf/udpa/go v0.0.0-20201120205902-5459f2c99403/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk= +github.com/cncf/udpa/go v0.0.0-20210930031921-04548b0d99d4/go.mod h1:6pvJx4me5XPnfI9Z40ddWsdw2W/uZgQLFXToKeRcDiI= +github.com/cncf/xds/go v0.0.0-20210312221358-fbca930ec8ed/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= +github.com/cncf/xds/go v0.0.0-20210805033703-aa0b78936158/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= +github.com/cncf/xds/go v0.0.0-20210922020428-25de7278fc84/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= +github.com/cncf/xds/go v0.0.0-20211001041855-01bcc9b48dfe/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= +github.com/cncf/xds/go v0.0.0-20211011173535-cb28da3451f1/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= +github.com/cncf/xds/go v0.0.0-20211130200136-a8f946100490/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= +github.com/cockroachdb/datadriven v0.0.0-20200714090401-bf6692d28da5/go.mod h1:h6jFvWxBdQXxjopDMZyH2UVceIRfR84bdzbkoKrsWNo= +github.com/cockroachdb/errors v1.2.4/go.mod h1:rQD95gz6FARkaKkQXUksEje/d9a6wBJoCr5oaCLELYA= +github.com/cockroachdb/logtags v0.0.0-20190617123548-eb05cc24525f/go.mod h1:i/u985jwjWRlyHXQbwatDASoW0RMlZ/3i9yJHE2xLkI= +github.com/coreos/bbolt v1.3.2/go.mod h1:iRUV2dpdMOn7Bo10OQBFzIJO9kkE559Wcmn+qkEiiKk= +github.com/coreos/etcd v3.3.13+incompatible/go.mod h1:uF7uidLiAD3TWHmW31ZFd/JWoc32PjwdhPthX9715RE= +github.com/coreos/go-oidc v2.1.0+incompatible/go.mod h1:CgnwVTmzoESiwO9qyAFEMiHoZ1nMCKZlZ9V6mm3/LKc= +github.com/coreos/go-semver v0.3.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk= +github.com/coreos/go-systemd v0.0.0-20190321100706-95778dfbb74e/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4= +github.com/coreos/go-systemd/v22 v22.3.2/go.mod h1:Y58oyj3AT4RCenI/lSvhwexgC+NSVTIJ3seZv2GcEnc= +github.com/coreos/pkg v0.0.0-20180928190104-399ea9e2e55f/go.mod h1:E3G3o1h8I7cfcXa63jLwjI0eiQQMgzzUDFVpN/nH/eA= +github.com/cpuguy83/go-md2man/v2 v2.0.0/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU= +github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= +github.com/creack/pty v1.1.11/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= +github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= +github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/dgrijalva/jwt-go v3.2.0+incompatible/go.mod h1:E3ru+11k8xSBh+hMPgOLZmtrrCbhqsmaPHjLKYnJCaQ= +github.com/dgryski/go-sip13 v0.0.0-20181026042036-e10d5fee7954/go.mod h1:vAd38F8PWV+bWy6jNmig1y/TA+kYO4g3RSRF0IAv0no= +github.com/docopt/docopt-go v0.0.0-20180111231733-ee0de3bc6815/go.mod h1:WwZ+bS3ebgob9U8Nd0kOddGdZWjyMGR8Wziv+TBNwSE= +github.com/dustin/go-humanize v1.0.0/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk= +github.com/elazarl/goproxy v0.0.0-20180725130230-947c36da3153/go.mod h1:/Zj4wYkgs4iZTTu3o/KG3Itv/qCCa8VVMlb3i9OVuzc= +github.com/emicklei/go-restful v0.0.0-20170410110728-ff4f55a20633/go.mod h1:otzb+WCGbkyDHkqmQmT5YD2WR4BBwUdeQoFo8l/7tVs= +github.com/emicklei/go-restful v2.9.5+incompatible/go.mod h1:otzb+WCGbkyDHkqmQmT5YD2WR4BBwUdeQoFo8l/7tVs= +github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= +github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= +github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1mIlRU8Am5FuJP05cCM98= +github.com/envoyproxy/go-control-plane v0.9.7/go.mod h1:cwu0lG7PUMfa9snN8LXBig5ynNVH9qI8YYLbd1fK2po= +github.com/envoyproxy/go-control-plane v0.9.9-0.20201210154907-fd9021fe5dad/go.mod h1:cXg6YxExXjJnVBQHBLXeUAgxn2UodCpnH306RInaBQk= +github.com/envoyproxy/go-control-plane v0.9.9-0.20210217033140-668b12f5399d/go.mod h1:cXg6YxExXjJnVBQHBLXeUAgxn2UodCpnH306RInaBQk= +github.com/envoyproxy/go-control-plane v0.9.9-0.20210512163311-63b5d3c536b0/go.mod h1:hliV/p42l8fGbc6Y9bQ70uLwIvmJyVE5k4iMKlh8wCQ= +github.com/envoyproxy/go-control-plane v0.9.10-0.20210907150352-cf90f659a021/go.mod h1:AFq3mo9L8Lqqiid3OhADV3RfLJnjiw63cSpi+fDTRC0= +github.com/envoyproxy/go-control-plane v0.10.1/go.mod h1:AY7fTTXNdv/aJ2O5jwpxAPOWUZ7hQAEvzN5Pf27BkQQ= +github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= +github.com/envoyproxy/protoc-gen-validate v0.6.2/go.mod h1:2t7qjJNvHPx8IjnBOzl9E9/baC+qXE/TeeyBRzgJDws= +github.com/evanphx/json-patch v0.5.2/go.mod h1:ZWS5hhDbVDyob71nXKNL0+PWn6ToqBHMikGIFbs31qQ= +github.com/evanphx/json-patch v4.12.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk= +github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4= +github.com/fatih/color v1.9.0/go.mod h1:eQcE1qtQxscV5RaZvpXrrb8Drkc3/DdQ+uUYCNjL+zU= +github.com/fatih/color v1.13.0/go.mod h1:kLAiJbzzSOZDVNGyDpeOxJ47H46qBXwg5ILebYFFOfk= +github.com/felixge/httpsnoop v1.0.1/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSwevea8zH2U= +github.com/form3tech-oss/jwt-go v3.2.2+incompatible/go.mod h1:pbq4aXjuKjdthFRnoDwaVPLA+WlJuPGy+QneDUgJi2k= +github.com/form3tech-oss/jwt-go v3.2.3+incompatible/go.mod h1:pbq4aXjuKjdthFRnoDwaVPLA+WlJuPGy+QneDUgJi2k= +github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo= +github.com/fsnotify/fsnotify v1.4.9/go.mod h1:znqG4EE+3YCdAaPaxE2ZRY/06pZUdp0tY4IgpuI1SZQ= +github.com/fsnotify/fsnotify v1.5.1 h1:mZcQUHVQUQWoPXXtuf9yuEXKudkV2sx1E06UadKWpgI= +github.com/fsnotify/fsnotify v1.5.1/go.mod h1:T3375wBYaZdLLcVNkcVbzGHY7f1l/uK5T5Ai1i3InKU= +github.com/getkin/kin-openapi v0.76.0/go.mod h1:660oXbgy5JFMKreazJaQTw7o+X00qeSyhcnluiMv+Xg= +github.com/getsentry/raven-go v0.2.0/go.mod h1:KungGk8q33+aIAZUIVWZDr2OfAEBsO49PX4NzFV5kcQ= +github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= +github.com/go-gl/glfw v0.0.0-20190409004039-e6da0acd62b1/go.mod h1:vR7hzQXu2zJy9AVAgeJqvqgH9Q5CA+iKCZ2gyEVpxRU= +github.com/go-gl/glfw/v3.3/glfw v0.0.0-20191125211704-12ad95a8df72/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= +github.com/go-gl/glfw/v3.3/glfw v0.0.0-20200222043503-6f7a984d4dc4/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= +github.com/go-kit/kit v0.8.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= +github.com/go-kit/kit v0.9.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= +github.com/go-kit/log v0.1.0/go.mod h1:zbhenjAZHb184qTLMA9ZjW7ThYL0H2mk7Q6pNt4vbaY= +github.com/go-logfmt/logfmt v0.3.0/go.mod h1:Qt1PoO58o5twSAckw1HlFXLmHsOX5/0LbT9GBnD5lWE= +github.com/go-logfmt/logfmt v0.4.0/go.mod h1:3RMwSq7FuexP4Kalkev3ejPJsZTpXXBr9+V4qmtdjCk= +github.com/go-logfmt/logfmt v0.5.0/go.mod h1:wCYkCAKZfumFQihp8CzCvQ3paCTfi41vtzG1KdI/P7A= +github.com/go-logr/logr v0.1.0/go.mod h1:ixOQHD9gLJUVQQ2ZOR7zLEifBX6tGkNJF4QyIY7sIas= +github.com/go-logr/logr v0.2.0/go.mod h1:z6/tIYblkpsD+a4lm/fGIIU9mZ+XfAiaFtq7xTgseGU= +github.com/go-logr/logr v1.2.0/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= +github.com/go-logr/zapr v1.2.0/go.mod h1:Qa4Bsj2Vb+FAVeAKsLD8RLQ+YRJB8YDmOAKxaBQf7Ro= +github.com/go-openapi/jsonpointer v0.19.3/go.mod h1:Pl9vOtqEWErmShwVjC8pYs9cog34VGT37dQOVbmoatg= +github.com/go-openapi/jsonpointer v0.19.5/go.mod h1:Pl9vOtqEWErmShwVjC8pYs9cog34VGT37dQOVbmoatg= +github.com/go-openapi/jsonreference v0.19.3/go.mod h1:rjx6GuL8TTa9VaixXglHmQmIL98+wF9xc8zWvFonSJ8= +github.com/go-openapi/jsonreference v0.19.5/go.mod h1:RdybgQwPxbL4UEjuAruzK1x3nE69AqPYEJeo/TWfEeg= +github.com/go-openapi/swag v0.19.5/go.mod h1:POnQmlKehdgb5mhVOsnJFsivZCEZ/vjK9gh66Z9tfKk= +github.com/go-openapi/swag v0.19.14/go.mod h1:QYRuS/SOXUCsnplDa677K7+DxSOj6IPNl/eQntq43wQ= +github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY= +github.com/go-task/slim-sprig v0.0.0-20210107165309-348f09dbbbc0/go.mod h1:fyg7847qk6SyHyPtNmDHnmrv/HOrqktSC+C9fM+CJOE= +github.com/godbus/dbus/v5 v5.0.4/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA= +github.com/gogo/protobuf v1.1.1/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= +github.com/gogo/protobuf v1.2.1/go.mod h1:hp+jE20tsWTFYpLwKvXlhS1hjn+gTNwPg2I6zVXpSg4= +github.com/gogo/protobuf v1.3.1/go.mod h1:SlYgWuQ5SjCEi6WLHjHCa1yvBfUnHcTbrrZtXPKa29o= +github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q= +github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q= +github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= +github.com/golang/glog v1.0.0 h1:nfP3RFugxnNRyKgeWd4oI1nYvXpxrx8ck8ZrcizshdQ= +github.com/golang/glog v1.0.0/go.mod h1:EWib/APOK0SL3dFbYqvxE3UYd8E6s1ouQ7iEp/0LWV4= +github.com/golang/groupcache v0.0.0-20190129154638-5b532d6fd5ef/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= +github.com/golang/groupcache v0.0.0-20190702054246-869f871628b6/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= +github.com/golang/groupcache v0.0.0-20191227052852-215e87163ea7/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= +github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= +github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= +github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= +github.com/golang/mock v1.2.0/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= +github.com/golang/mock v1.3.1/go.mod h1:sBzyDLLjw3U8JLTeZvSv8jJB+tU5PVekmnlKIyFUx0Y= +github.com/golang/mock v1.4.0/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= +github.com/golang/mock v1.4.1/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= +github.com/golang/mock v1.4.3/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= +github.com/golang/mock v1.4.4/go.mod h1:l3mdAwkq5BuhzHwde/uurv3sEJeZMXNpwsxVWU71h+4= +github.com/golang/mock v1.5.0/go.mod h1:CWnOUgYIOo4TcNZ0wHX3YZCqsaM1I1Jvs6v3mP3KVu8= +github.com/golang/mock v1.6.0/go.mod h1:p6yTPP+5HYm5mzsMV8JkE6ZKdX+/wYM6Hr+LicevLPs= +github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= +github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= +github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= +github.com/golang/protobuf v1.3.3/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw= +github.com/golang/protobuf v1.3.4/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw= +github.com/golang/protobuf v1.3.5/go.mod h1:6O5/vntMXwX2lRkT1hjjk0nAC1IDOTvTlVgjlRvqsdk= +github.com/golang/protobuf v1.4.0-rc.1/go.mod h1:ceaxUfeHdC40wWswd/P6IGgMaK3YpKi5j83Wpe3EHw8= +github.com/golang/protobuf v1.4.0-rc.1.0.20200221234624-67d41d38c208/go.mod h1:xKAWHe0F5eneWXFV3EuXVDTCmh+JuBKY0li0aMyXATA= +github.com/golang/protobuf v1.4.0-rc.2/go.mod h1:LlEzMj4AhA7rCAGe4KMBDvJI+AwstrUpVNzEA03Pprs= +github.com/golang/protobuf v1.4.0-rc.4.0.20200313231945-b860323f09d0/go.mod h1:WU3c8KckQ9AFe+yFwt9sWVRKCVIyN9cPHBJSNnbL67w= +github.com/golang/protobuf v1.4.0/go.mod h1:jodUvKwWbYaEsadDk5Fwe5c77LiNKVO9IDvqG2KuDX0= +github.com/golang/protobuf v1.4.1/go.mod h1:U8fpvMrcmy5pZrNK1lt4xCsGvpyWQ/VVv6QDs8UjoX8= +github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= +github.com/golang/protobuf v1.4.3/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= +github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk= +github.com/golang/protobuf v1.5.1/go.mod h1:DopwsBzvsk0Fs44TXzsVbJyPhcCPeIwnvohx4u74HPM= +github.com/golang/protobuf v1.5.2 h1:ROPKBNFfQgOUMifHyP+KYbvpjbdoFNs+aK7DXlji0Tw= +github.com/golang/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= +github.com/golang/snappy v0.0.3/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= +github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= +github.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= +github.com/google/btree v1.0.1/go.mod h1:xXMiIv4Fb/0kKde4SpL7qlzvu5cMJDRkFDxJfI9uaxA= +github.com/google/cel-go v0.9.0/go.mod h1:U7ayypeSkw23szu4GaQTPJGx66c20mx8JklMSxrmI1w= +github.com/google/cel-spec v0.6.0/go.mod h1:Nwjgxy5CbjlPrtCWjeDjUyKMl8w41YBYGjsyDdqk0xA= +github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M= +github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= +github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= +github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.4.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.2/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.3/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.4/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.6 h1:BKbKCqvP6I+rmFHt06ZmyQtvB8xAkWdhFyr0ZUNZcxQ= +github.com/google/go-cmp v0.5.6/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= +github.com/google/gofuzz v1.1.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= +github.com/google/martian v2.1.0+incompatible/go.mod h1:9I4somxYTbIHy5NJKHRl3wXiIaQGbYVAs8BPL6v8lEs= +github.com/google/martian/v3 v3.0.0/go.mod h1:y5Zk1BBys9G+gd6Jrk0W3cC1+ELVxBWuIGO+w/tUAp0= +github.com/google/martian/v3 v3.1.0/go.mod h1:y5Zk1BBys9G+gd6Jrk0W3cC1+ELVxBWuIGO+w/tUAp0= +github.com/google/martian/v3 v3.2.1/go.mod h1:oBOf6HBosgwRXnUGWUB05QECsc6uvmMiJ3+6W4l/CUk= +github.com/google/pprof v0.0.0-20181206194817-3ea8567a2e57/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= +github.com/google/pprof v0.0.0-20190515194954-54271f7e092f/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= +github.com/google/pprof v0.0.0-20191218002539-d4f498aebedc/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= +github.com/google/pprof v0.0.0-20200212024743-f11f1df84d12/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= +github.com/google/pprof v0.0.0-20200229191704-1ebb73c60ed3/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= +github.com/google/pprof v0.0.0-20200430221834-fc25d7d30c6d/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= +github.com/google/pprof v0.0.0-20200708004538-1a94d8640e99/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= +github.com/google/pprof v0.0.0-20201023163331-3e6fc7fc9c4c/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= +github.com/google/pprof v0.0.0-20201203190320-1bf35d6f28c2/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= +github.com/google/pprof v0.0.0-20210122040257-d980be63207e/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= +github.com/google/pprof v0.0.0-20210226084205-cbba55b83ad5/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= +github.com/google/pprof v0.0.0-20210601050228-01bbb1931b22/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= +github.com/google/pprof v0.0.0-20210609004039-a478d1d731e9/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= +github.com/google/pprof v0.0.0-20210720184732-4bb14d4b1be1/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= +github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI= +github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= +github.com/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+vpHVxEJEs9eg= +github.com/googleapis/gax-go/v2 v2.0.5/go.mod h1:DWXyrwAJ9X0FpwwEdw+IPEYBICEFu5mhpdKc/us6bOk= +github.com/googleapis/gax-go/v2 v2.1.0/go.mod h1:Q3nei7sK6ybPYH7twZdmQpAd1MKb7pfu6SK+H1/DsU0= +github.com/googleapis/gax-go/v2 v2.1.1/go.mod h1:hddJymUZASv3XPyGkUpKj8pPO47Rmb0eJc8R6ouapiM= +github.com/googleapis/gnostic v0.5.1/go.mod h1:6U4PtQXGIEt/Z3h5MAT7FNofLnw9vXk2cUuW7uA/OeU= +github.com/googleapis/gnostic v0.5.5/go.mod h1:7+EbHbldMins07ALC74bsA81Ovc97DwqyJO1AENw9kA= +github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY= +github.com/gorilla/mux v1.8.0/go.mod h1:DVbg23sWSpFRCP0SfiEN6jmj59UnW/n46BH5rLB71So= +github.com/gorilla/websocket v1.4.2/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= +github.com/gregjones/httpcache v0.0.0-20180305231024-9cad4c3443a7/go.mod h1:FecbI9+v66THATjSRHfNgh1IVFe/9kFxbXtjV0ctIMA= +github.com/grpc-ecosystem/go-grpc-middleware v1.0.0/go.mod h1:FiyG127CGDf3tlThmgyCl78X/SZQqEOJBCDaAfeWzPs= +github.com/grpc-ecosystem/go-grpc-middleware v1.3.0/go.mod h1:z0ButlSOZa5vEBq9m2m2hlwIgKw+rp3sdCBRoJY+30Y= +github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0/go.mod h1:8NvIoxWQoOIhqOTXgfV/d3M/q6VIi02HzZEHgUlZvzk= +github.com/grpc-ecosystem/grpc-gateway v1.9.0/go.mod h1:vNeuVxBJEsws4ogUvrchl83t/GYV9WGTSLVdBhOQFDY= +github.com/grpc-ecosystem/grpc-gateway v1.16.0 h1:gmcG1KaJ57LophUzW0Hy8NmPhnMZb4M0+kPpLofRdBo= +github.com/grpc-ecosystem/grpc-gateway v1.16.0/go.mod h1:BDjrQk3hbvj6Nolgz8mAMFbcEtjT1g+wF4CSlocrBnw= +github.com/grpc-ecosystem/grpc-gateway/v2 v2.7.2 h1:I/pwhnUln5wbMnTyRbzswA0/JxpK8sZj0aUfI3TV1So= +github.com/grpc-ecosystem/grpc-gateway/v2 v2.7.2/go.mod h1:lsuH8kb4GlMdSlI4alNIBBSAt5CHJtg3i+0WuN9J5YM= +github.com/hashicorp/consul/api v1.1.0/go.mod h1:VmuI/Lkw1nC05EYQWNKwWGbkg+FbDBtguAZLlVdkD9Q= +github.com/hashicorp/consul/api v1.12.0/go.mod h1:6pVBMo0ebnYdt2S3H87XhekM/HHrUoTD2XXb/VrZVy0= +github.com/hashicorp/consul/sdk v0.1.1/go.mod h1:VKf9jXwCTEY1QZP2MOLRhb5i/I/ssyNV1vwHyQBF0x8= +github.com/hashicorp/consul/sdk v0.8.0/go.mod h1:GBvyrGALthsZObzUGsfgHZQDXjg4lOjagTIwIR1vPms= +github.com/hashicorp/errwrap v1.0.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4= +github.com/hashicorp/go-cleanhttp v0.5.0/go.mod h1:JpRdi6/HCYpAwUzNwuwqhbovhLtngrth3wmdIIUrZ80= +github.com/hashicorp/go-cleanhttp v0.5.1/go.mod h1:JpRdi6/HCYpAwUzNwuwqhbovhLtngrth3wmdIIUrZ80= +github.com/hashicorp/go-cleanhttp v0.5.2/go.mod h1:kO/YDlP8L1346E6Sodw+PrpBSV4/SoxCXGY6BqNFT48= +github.com/hashicorp/go-hclog v0.12.0/go.mod h1:whpDNt7SSdeAju8AWKIWsul05p54N/39EeqMAyrmvFQ= +github.com/hashicorp/go-hclog v1.0.0/go.mod h1:whpDNt7SSdeAju8AWKIWsul05p54N/39EeqMAyrmvFQ= +github.com/hashicorp/go-immutable-radix v1.0.0/go.mod h1:0y9vanUI8NX6FsYoO3zeMjhV/C5i9g4Q3DwcSNZ4P60= +github.com/hashicorp/go-immutable-radix v1.3.1/go.mod h1:0y9vanUI8NX6FsYoO3zeMjhV/C5i9g4Q3DwcSNZ4P60= +github.com/hashicorp/go-msgpack v0.5.3/go.mod h1:ahLV/dePpqEmjfWmKiqvPkv/twdG7iPBM1vqhUKIvfM= +github.com/hashicorp/go-multierror v1.0.0/go.mod h1:dHtQlpGsu+cZNNAkkCN/P3hoUDHhCYQXV3UM06sGGrk= +github.com/hashicorp/go-multierror v1.1.0/go.mod h1:spPvp8C1qA32ftKqdAHm4hHTbPw+vmowP0z+KUhOZdA= +github.com/hashicorp/go-retryablehttp v0.5.3/go.mod h1:9B5zBasrRhHXnJnui7y6sL7es7NDiJgTc6Er0maI1Xs= +github.com/hashicorp/go-rootcerts v1.0.0/go.mod h1:K6zTfqpRlCUIjkwsN4Z+hiSfzSTQa6eBIzfwKfwNnHU= +github.com/hashicorp/go-rootcerts v1.0.2/go.mod h1:pqUvnprVnM5bf7AOirdbb01K4ccR319Vf4pU3K5EGc8= +github.com/hashicorp/go-sockaddr v1.0.0/go.mod h1:7Xibr9yA9JjQq1JpNB2Vw7kxv8xerXegt+ozgdvDeDU= +github.com/hashicorp/go-syslog v1.0.0/go.mod h1:qPfqrKkXGihmCqbJM2mZgkZGvKG1dFdvsLplgctolz4= +github.com/hashicorp/go-uuid v1.0.0/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= +github.com/hashicorp/go-uuid v1.0.1/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= +github.com/hashicorp/go.net v0.0.1/go.mod h1:hjKkEWcCURg++eb33jQU7oqQcI9XDCnUzHA0oac0k90= +github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= +github.com/hashicorp/golang-lru v0.5.1/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= +github.com/hashicorp/golang-lru v0.5.4/go.mod h1:iADmTwqILo4mZ8BN3D2Q6+9jd8WM5uGBxy+E8yxSoD4= +github.com/hashicorp/hcl v1.0.0 h1:0Anlzjpi4vEasTeNFn2mLJgTSwt0+6sfsiTG8qcWGx4= +github.com/hashicorp/hcl v1.0.0/go.mod h1:E5yfLk+7swimpb2L/Alb/PJmXilQ/rhwaUYs4T20WEQ= +github.com/hashicorp/logutils v1.0.0/go.mod h1:QIAnNjmIWmVIIkWDTG1z5v++HQmx9WQRO+LraFDTW64= +github.com/hashicorp/mdns v1.0.0/go.mod h1:tL+uN++7HEJ6SQLQ2/p+z2pH24WQKWjBPkE0mNTz8vQ= +github.com/hashicorp/mdns v1.0.4/go.mod h1:mtBihi+LeNXGtG8L9dX59gAEa12BDtBQSp4v/YAJqrc= +github.com/hashicorp/memberlist v0.1.3/go.mod h1:ajVTdAv/9Im8oMAAj5G31PhhMCZJV2pPBoIllUwCN7I= +github.com/hashicorp/memberlist v0.3.0/go.mod h1:MS2lj3INKhZjWNqd3N0m3J+Jxf3DAOnAH9VT3Sh9MUE= +github.com/hashicorp/serf v0.8.2/go.mod h1:6hOLApaqBFA1NXqRQAsxw9QxuDEvNxSQRwA/JwenrHc= +github.com/hashicorp/serf v0.9.6/go.mod h1:TXZNMjZQijwlDvp+r0b63xZ45H7JmCmgg4gpTwn9UV4= +github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU= +github.com/iancoleman/strcase v0.2.0/go.mod h1:iwCmte+B7n89clKwxIoIXy/HfoL7AsD47ZCWhYzw7ho= +github.com/ianlancetaylor/demangle v0.0.0-20181102032728-5e5cf60278f6/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= +github.com/ianlancetaylor/demangle v0.0.0-20200824232613-28f6c0f3b639/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= +github.com/imdario/mergo v0.3.5/go.mod h1:2EnlNZ0deacrJVfApfmtdGgDfMuh/nq6Ok1EcJh5FfA= +github.com/imdario/mergo v0.3.12/go.mod h1:jmQim1M+e3UYxmgPu/WyfjB3N3VflVyUjjjwH0dnCYA= +github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8= +github.com/jessevdk/go-flags v1.4.0/go.mod h1:4FA24M0QyGHXBuZZK/XkWh8h0e1EYbRYJSGM75WSRxI= +github.com/jinzhu/inflection v1.0.0/go.mod h1:h+uFLlag+Qp1Va5pdKtLDYj+kHp5pxUVkryuEj+Srlc= +github.com/jonboulle/clockwork v0.1.0/go.mod h1:Ii8DK3G1RaLaWxj9trq07+26W01tbo22gdxWY5EU2bo= +github.com/jonboulle/clockwork v0.2.2/go.mod h1:Pkfl5aHPm1nk2H9h0bjmnJD/BcgbGXUBGnn1kMkgxc8= +github.com/josharian/intern v1.0.0/go.mod h1:5DoeVV0s6jJacbCEi61lwdGj/aVlrQvzHFFd8Hwg//Y= +github.com/jpillora/backoff v1.0.0/go.mod h1:J/6gKK9jxlEcS3zixgDgUAsiuZ7yrSoa/FX5e0EB2j4= +github.com/json-iterator/go v1.1.6/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU= +github.com/json-iterator/go v1.1.9/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= +github.com/json-iterator/go v1.1.10/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= +github.com/json-iterator/go v1.1.11/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= +github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHmT4TnhNGBo= +github.com/jstemmer/go-junit-report v0.0.0-20190106144839-af01ea7f8024/go.mod h1:6v2b51hI/fHJwM22ozAgKL4VKDeJcHhJFhtBdhmNjmU= +github.com/jstemmer/go-junit-report v0.9.1/go.mod h1:Brl9GWCQeLvo8nXZwPNNblvFj/XSXhF0NWZEnDohbsk= +github.com/jtolds/gls v4.20.0+incompatible/go.mod h1:QJZ7F/aHp+rZTRtaJ1ow/lLfFfVYBRgL+9YlvaHOwJU= +github.com/julienschmidt/httprouter v1.2.0/go.mod h1:SYymIcj16QtmaHHD7aYtjjsJG7VTCxuUUipMqKk8s4w= +github.com/julienschmidt/httprouter v1.3.0/go.mod h1:JR6WtHb+2LUe8TCKY3cZOxFyyO8IZAc4RVcycCCAKdM= +github.com/kisielk/errcheck v1.1.0/go.mod h1:EZBBE59ingxPouuu3KfxchcWSUPOHkagtvWXihfKN4Q= +github.com/kisielk/errcheck v1.2.0/go.mod h1:/BMXB+zMLi60iA8Vv6Ksmxu/1UDYcXs4uQLJ+jE2L00= +github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8= +github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= +github.com/klauspost/cpuid/v2 v2.0.6 h1:dQ5ueTiftKxp0gyjKSx5+8BtPWkyQbd95m8Gys/RarI= +github.com/klauspost/cpuid/v2 v2.0.6/go.mod h1:FInQzS24/EEf25PyTYn52gqo7WaD8xa0213Md/qVLRg= +github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= +github.com/konsorten/go-windows-terminal-sequences v1.0.3/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= +github.com/kr/fs v0.1.0/go.mod h1:FFnZGqtBN9Gxj7eW1uZ42v5BccTP0vu6NEaFoC2HwRg= +github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515/go.mod h1:+0opPa2QZZtGFBFZlji/RkVcI2GknAs/DXo4wKdlNEc= +github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= +github.com/kr/pretty v0.2.0/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= +github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= +github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= +github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= +github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= +github.com/lyft/protoc-gen-star v0.5.3/go.mod h1:V0xaHgaf5oCCqmcxYcWiDfTiKsZsRc87/1qhoTACD8w= +github.com/magiconair/properties v1.8.1/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ= +github.com/magiconair/properties v1.8.5 h1:b6kJs+EmPFMYGkow9GiUyCyOvIwYetYJ3fSaWak/Gls= +github.com/magiconair/properties v1.8.5/go.mod h1:y3VJvCyxH9uVvJTWEGAELF3aiYNyPKd5NZ3oSwXrF60= +github.com/mailru/easyjson v0.0.0-20190614124828-94de47d64c63/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= +github.com/mailru/easyjson v0.0.0-20190626092158-b2ccc519800e/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= +github.com/mailru/easyjson v0.7.6/go.mod h1:xzfreul335JAWq5oZzymOObrkdz5UnU4kGfJJLY9Nlc= +github.com/mattn/go-colorable v0.0.9/go.mod h1:9vuHe8Xs5qXnSaW/c/ABM9alt+Vo+STaOChaDxuIBZU= +github.com/mattn/go-colorable v0.1.4/go.mod h1:U0ppj6V5qS13XJ6of8GYAs25YV2eR4EVcfRqFIhoBtE= +github.com/mattn/go-colorable v0.1.6/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc= +github.com/mattn/go-colorable v0.1.9/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc= +github.com/mattn/go-colorable v0.1.12/go.mod h1:u5H1YNBxpqRaxsYJYSkiCWKzEfiAb1Gb520KVy5xxl4= +github.com/mattn/go-isatty v0.0.3/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4= +github.com/mattn/go-isatty v0.0.8/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hdxcsrc5s= +github.com/mattn/go-isatty v0.0.10/go.mod h1:qgIWMr58cqv1PHHyhnkY9lrL7etaEgOFcMEpPG5Rm84= +github.com/mattn/go-isatty v0.0.11/go.mod h1:PhnuNfih5lzO57/f3n+odYbM4JtupLOxQOAqxQCu2WE= +github.com/mattn/go-isatty v0.0.12/go.mod h1:cbi8OIDigv2wuxKPP5vlRcQ1OAZbq2CE4Kysco4FUpU= +github.com/mattn/go-isatty v0.0.14/go.mod h1:7GGIvUiUoEMVVmxf/4nioHXj79iQHKdU27kJ6hsGG94= +github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0= +github.com/matttproud/golang_protobuf_extensions v1.0.2-0.20181231171920-c182affec369/go.mod h1:BSXmuO+STAnVfrANrmjBb36TMTDstsz7MSK+HVaYKv4= +github.com/miekg/dns v1.0.14/go.mod h1:W1PPwlIAgtquWBMBEV9nkV9Cazfe8ScdGz/Lj7v3Nrg= +github.com/miekg/dns v1.1.26/go.mod h1:bPDLeHnStXmXAq1m/Ch/hvfNHr14JKNPMBo3VZKjuso= +github.com/miekg/dns v1.1.41/go.mod h1:p6aan82bvRIyn+zDIv9xYNUpwa73JcSh9BKwknJysuI= +github.com/mitchellh/cli v1.0.0/go.mod h1:hNIlj7HEI86fIcpObd7a0FcrxTWetlwJDGcceTlRvqc= +github.com/mitchellh/cli v1.1.0/go.mod h1:xcISNoH86gajksDmfB23e/pu+B+GeFRMYmoHXxx3xhI= +github.com/mitchellh/go-homedir v1.0.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0= +github.com/mitchellh/go-homedir v1.1.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0= +github.com/mitchellh/go-testing-interface v1.0.0/go.mod h1:kRemZodwjscx+RGhAo8eIhFbs2+BFgRtFPeD/KE+zxI= +github.com/mitchellh/gox v0.4.0/go.mod h1:Sd9lOJ0+aimLBi73mGofS1ycjY8lL3uZM3JPS42BGNg= +github.com/mitchellh/iochan v1.0.0/go.mod h1:JwYml1nuB7xOzsp52dPpHFffvOCDupsG0QubkSMEySY= +github.com/mitchellh/mapstructure v0.0.0-20160808181253-ca63d7c062ee/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= +github.com/mitchellh/mapstructure v1.1.2/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= +github.com/mitchellh/mapstructure v1.4.1/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= +github.com/mitchellh/mapstructure v1.4.3 h1:OVowDSCllw/YjdLkam3/sm7wEtOy59d8ndGgCcyj8cs= +github.com/mitchellh/mapstructure v1.4.3/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= +github.com/moby/spdystream v0.2.0/go.mod h1:f7i0iNDQJ059oMTcWxx8MA/zKFIuD/lY+0GqbN2Wy8c= +github.com/moby/term v0.0.0-20210610120745-9d4ed1856297/go.mod h1:vgPCkQMyxTZ7IDy8SXRufE172gr8+K/JE/7hHFxHW3A= +github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= +github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= +github.com/modern-go/reflect2 v0.0.0-20180701023420-4b7aa43c6742/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= +github.com/modern-go/reflect2 v1.0.1/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= +github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk= +github.com/munnerz/goautoneg v0.0.0-20120707110453-a547fc61f48d/go.mod h1:+n7T8mK8HuQTcFwEeznm/DIxMOiR9yIdICNftLE1DvQ= +github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822/go.mod h1:+n7T8mK8HuQTcFwEeznm/DIxMOiR9yIdICNftLE1DvQ= +github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= +github.com/mwitkow/go-conntrack v0.0.0-20190716064945-2f068394615f/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= +github.com/mxk/go-flowrate v0.0.0-20140419014527-cca7078d478f/go.mod h1:ZdcZmHo+o7JKHSa8/e818NopupXU1YMK5fe1lsApnBw= +github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e h1:fD57ERR4JtEqsWbfPhv4DMiApHyliiK5xCTNVSPiaAs= +github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e/go.mod h1:zD1mROLANZcx1PVRCS0qkT7pwLkGfwJo4zjcN/Tysno= +github.com/nxadm/tail v1.4.4/go.mod h1:kenIhsEOeOJmVchQTgglprH7qJGnHDVpk1VPCcaMI8A= +github.com/nxadm/tail v1.4.8 h1:nPr65rt6Y5JFSKQO7qToXr7pePgD6Gwiw05lkbyAQTE= +github.com/nxadm/tail v1.4.8/go.mod h1:+ncqLTQzXmGhMZNUePPaPqPvBxHAIsmXswZKocGu+AU= +github.com/oklog/ulid v1.3.1/go.mod h1:CirwcVhetQ6Lv90oh/F+FBtV6XMibvdAFo93nm5qn4U= +github.com/onsi/ginkgo v0.0.0-20170829012221-11459a886d9c/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= +github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= +github.com/onsi/ginkgo v1.12.1/go.mod h1:zj2OWP4+oCPe1qIXoGWkgMRwljMUYCdkwsT2108oapk= +github.com/onsi/ginkgo v1.14.0/go.mod h1:iSB4RoI2tjJc9BBv4NKIKWKya62Rps+oPG/Lv9klQyY= +github.com/onsi/ginkgo v1.16.4/go.mod h1:dX+/inL/fNMqNlz0e9LfyB9TswhZpCVdJM/Z6Vvnwo0= +github.com/onsi/ginkgo v1.16.5 h1:8xi0RTUf59SOSfEtZMvwTvXYMzG4gV23XVHOZiXNtnE= +github.com/onsi/ginkgo v1.16.5/go.mod h1:+E8gABHa3K6zRBolWtd+ROzc/U5bkGt0FwiG042wbpU= +github.com/onsi/gomega v0.0.0-20170829124025-dcabb60a477c/go.mod h1:C1qb7wdrVGGVU+Z6iS04AVkA3Q65CEZX59MT0QO5uiA= +github.com/onsi/gomega v1.7.1/go.mod h1:XdKZgCCFLUoM/7CFJVPcG8C1xQ1AJ0vpAezJrB7JYyY= +github.com/onsi/gomega v1.10.1/go.mod h1:iN09h71vgCQne3DLsj+A5owkum+a2tYe+TOCB1ybHNo= +github.com/onsi/gomega v1.17.0 h1:9Luw4uT5HTjHTN8+aNcSThgH1vdXnmdJ8xIfZ4wyTRE= +github.com/onsi/gomega v1.17.0/go.mod h1:HnhC7FXeEQY45zxNK3PPoIUhzk/80Xly9PcubAlGdZY= +github.com/opentracing/opentracing-go v1.1.0/go.mod h1:UkNAQd3GIcIGf0SeVgPpRdFStlNbqXla1AfSYxPUl2o= +github.com/pascaldekloe/goe v0.0.0-20180627143212-57f6aae5913c/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144TG7ZOy1lc= +github.com/pascaldekloe/goe v0.1.0/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144TG7ZOy1lc= +github.com/pelletier/go-toml v1.2.0/go.mod h1:5z9KED0ma1S8pY6P1sdut58dfprrGBbd/94hg7ilaic= +github.com/pelletier/go-toml v1.9.3/go.mod h1:u1nR/EPcESfeI/szUZKdtJ0xRNbUoANCkoOuaOx1Y+c= +github.com/pelletier/go-toml v1.9.4 h1:tjENF6MfZAg8e4ZmZTeWaWiT2vXtsoO6+iuOjFhECwM= +github.com/pelletier/go-toml v1.9.4/go.mod h1:u1nR/EPcESfeI/szUZKdtJ0xRNbUoANCkoOuaOx1Y+c= +github.com/peterbourgon/diskv v2.0.1+incompatible/go.mod h1:uqqh8zWWbv1HBMNONnaR/tNboyR3/BZd58JJSHlUSCU= +github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= +github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= +github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= +github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= +github.com/pkg/sftp v1.10.1/go.mod h1:lYOWFsE0bwd1+KfKJaKeuokY15vzFx25BLbzYYoAxZI= +github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= +github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= +github.com/posener/complete v1.1.1/go.mod h1:em0nMJCgc9GFtwrmVmEMR/ZL6WyhyjMBndrE9hABlRI= +github.com/posener/complete v1.2.3/go.mod h1:WZIdtGGp+qx0sLrYKtIRAruyNpv6hFCicSgv7Sy7s/s= +github.com/pquerna/cachecontrol v0.0.0-20171018203845-0dec1b30a021/go.mod h1:prYjPmNq4d1NPVmpShWobRqXY3q7Vp+80DqgxxUrUIA= +github.com/processout/grpc-go-pool v1.2.1 h1:hbp1BOA02CIxEAoRLHGpUhhPFv77nwfBLBeO3Ya9P7I= +github.com/processout/grpc-go-pool v1.2.1/go.mod h1:F4hiNj96O6VQ87jv4rdz8R9tkHdelQQJ/J2B1a5VSt4= +github.com/prometheus/client_golang v0.9.1/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw= +github.com/prometheus/client_golang v0.9.3/go.mod h1:/TN21ttK/J9q6uSwhBd54HahCDft0ttaMvbicHlPoso= +github.com/prometheus/client_golang v1.0.0/go.mod h1:db9x61etRT2tGnBNRi70OPL5FsnadC4Ky3P0J6CfImo= +github.com/prometheus/client_golang v1.4.0/go.mod h1:e9GMxYsXl05ICDXkRhurwBS4Q3OK1iX/F2sw+iXX5zU= +github.com/prometheus/client_golang v1.7.1/go.mod h1:PY5Wy2awLA44sXw4AOSfFBetzPP4j5+D6mVACh+pe2M= +github.com/prometheus/client_golang v1.11.0/go.mod h1:Z6t4BnS23TR94PD6BsDNk8yVqroYurpAkEiz0P2BEV0= +github.com/prometheus/client_model v0.0.0-20180712105110-5c3871d89910/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= +github.com/prometheus/client_model v0.0.0-20190129233127-fd36f4220a90/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= +github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= +github.com/prometheus/client_model v0.2.0/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= +github.com/prometheus/common v0.0.0-20181113130724-41aa239b4cce/go.mod h1:daVV7qP5qjZbuso7PdcryaAu0sAZbrN9i7WWcTMWvro= +github.com/prometheus/common v0.4.0/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= +github.com/prometheus/common v0.4.1/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= +github.com/prometheus/common v0.9.1/go.mod h1:yhUN8i9wzaXS3w1O07YhxHEBxD+W35wd8bs7vj7HSQ4= +github.com/prometheus/common v0.10.0/go.mod h1:Tlit/dnDKsSWFlCLTWaA1cyBgKHSMdTB80sz/V91rCo= +github.com/prometheus/common v0.26.0/go.mod h1:M7rCNAaPfAosfx8veZJCuw84e35h3Cfd9VFqTh1DIvc= +github.com/prometheus/common v0.28.0/go.mod h1:vu+V0TpY+O6vW9J44gczi3Ap/oXXR10b+M/gUGO4Hls= +github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= +github.com/prometheus/procfs v0.0.0-20190507164030-5867b95ac084/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= +github.com/prometheus/procfs v0.0.2/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= +github.com/prometheus/procfs v0.0.8/go.mod h1:7Qr8sr6344vo1JqZ6HhLceV9o3AJ1Ff+GxbHq6oeK9A= +github.com/prometheus/procfs v0.1.3/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4OA4YeYWdaU= +github.com/prometheus/procfs v0.6.0/go.mod h1:cz+aTbrPOrUb4q7XlbU9ygM+/jj0fzG6c1xBZuNvfVA= +github.com/prometheus/tsdb v0.7.1/go.mod h1:qhTCs0VvXwvX/y3TZrWD7rabWM+ijKTux40TwIPHuXU= +github.com/rogpeppe/fastuuid v0.0.0-20150106093220-6724a57986af/go.mod h1:XWv6SoW27p1b0cqNHllgS5HIMJraePCO15w5zCzIWYg= +github.com/rogpeppe/fastuuid v1.2.0/go.mod h1:jVj6XXZzXRy/MSR5jhDC/2q6DgLz+nrA6LYCDYWNEvQ= +github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= +github.com/russross/blackfriday/v2 v2.0.1/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= +github.com/ryanuber/columnize v0.0.0-20160712163229-9b3edd62028f/go.mod h1:sm1tb6uqfes/u+d4ooFouqFdy9/2g9QGwK3SQygK0Ts= +github.com/sagikazarmark/crypt v0.4.0/go.mod h1:ALv2SRj7GxYV4HO9elxH9nS6M9gW+xDNxqmyJ6RfDFM= +github.com/sean-/seed v0.0.0-20170313163322-e2103e2c3529/go.mod h1:DxrIzT+xaE7yg65j358z/aeFdxmN0P9QXhEzd20vsDc= +github.com/segmentio/asm v1.1.0 h1:fkVr8k5J4sKoFjTGVD6r1yKvDKqmvrEh3K7iyVxgBs8= +github.com/segmentio/asm v1.1.0/go.mod h1:4EUJGaKsB8ImLUwOGORVsNd9vTRDeh44JGsY4aKp5I4= +github.com/segmentio/encoding v0.3.2 h1:gkXXteOfNaPPlrXTEf/e5tWvaQGVJWnvT3LqMzUeH7U= +github.com/segmentio/encoding v0.3.2/go.mod h1:waft2p6XI4z2pk07M0YzZV4wEiqaRvsBSyWNHxVx4gU= +github.com/shurcooL/sanitized_anchor_name v1.0.0/go.mod h1:1NzhyTcUVG4SuEtjjoZeVRXNmyL/1OwPU0+IJeTBvfc= +github.com/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo= +github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE= +github.com/sirupsen/logrus v1.6.0/go.mod h1:7uNnSEd1DgxDLC74fIahvMZmmYsHGZGEOFrfsX/uA88= +github.com/sirupsen/logrus v1.7.0/go.mod h1:yWOB1SBYBC5VeMP7gHvWumXLIWorT60ONWic61uBYv0= +github.com/sirupsen/logrus v1.8.1/go.mod h1:yWOB1SBYBC5VeMP7gHvWumXLIWorT60ONWic61uBYv0= +github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d/go.mod h1:OnSkiWE9lh6wB0YB77sQom3nweQdgAjqCqsofrRNTgc= +github.com/smartystreets/goconvey v1.6.4/go.mod h1:syvi0/a8iFYH4r/RixwvyeAJjdLS9QV7WQ/tjFTllLA= +github.com/soheilhy/cmux v0.1.4/go.mod h1:IM3LyeVVIOuxMH7sFAkER9+bJ4dT7Ms6E4xg4kGIyLM= +github.com/soheilhy/cmux v0.1.5/go.mod h1:T7TcVDs9LWfQgPlPsdngu6I6QIoyIFZDDC6sNE1GqG0= +github.com/spaolacci/murmur3 v0.0.0-20180118202830-f09979ecbc72/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA= +github.com/speps/go-hashids v2.0.0+incompatible/go.mod h1:P7hqPzMdnZOfyIk+xrlG1QaSMw+gCBdHKsBDnhpaZvc= +github.com/spf13/afero v1.1.2/go.mod h1:j4pytiNVoe2o6bmDsKpLACNPDBIoEAkihy7loJ1B0CQ= +github.com/spf13/afero v1.2.2/go.mod h1:9ZxEEn6pIJ8Rxe320qSDBk6AsU0r9pR7Q4OcevTdifk= +github.com/spf13/afero v1.3.3/go.mod h1:5KUK8ByomD5Ti5Artl0RtHeI5pTF7MIDuXL3yY520V4= +github.com/spf13/afero v1.6.0 h1:xoax2sJ2DT8S8xA2paPFjDCScCNeWsg75VG0DLRreiY= +github.com/spf13/afero v1.6.0/go.mod h1:Ai8FlHk4v/PARR026UzYexafAt9roJ7LcLMAmO6Z93I= +github.com/spf13/cast v1.3.0/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE= +github.com/spf13/cast v1.3.1/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE= +github.com/spf13/cast v1.4.1 h1:s0hze+J0196ZfEMTs80N7UlFt0BDuQ7Q+JDnHiMWKdA= +github.com/spf13/cast v1.4.1/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE= +github.com/spf13/cobra v1.1.3/go.mod h1:pGADOWyqRD/YMrPZigI/zbliZ2wVD/23d+is3pSWzOo= +github.com/spf13/cobra v1.2.1/go.mod h1:ExllRjgxM/piMAM+3tAZvg8fsklGAf3tPfi+i8t68Nk= +github.com/spf13/jwalterweatherman v1.0.0/go.mod h1:cQK4TGJAtQXfYWX+Ddv3mKDzgVb68N+wFjFa4jdeBTo= +github.com/spf13/jwalterweatherman v1.1.0 h1:ue6voC5bR5F8YxI5S67j9i582FU4Qvo2bmqnqMYADFk= +github.com/spf13/jwalterweatherman v1.1.0/go.mod h1:aNWZUN0dPAAO/Ljvb5BEdw96iTZ0EXowPYD95IqWIGo= +github.com/spf13/pflag v1.0.3/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= +github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA= +github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= +github.com/spf13/viper v1.7.0/go.mod h1:8WkrPz2fc9jxqZNCJI/76HCieCp4Q8HaLFoCha5qpdg= +github.com/spf13/viper v1.8.1/go.mod h1:o0Pch8wJ9BVSWGQMbra6iw0oQ5oktSIBaujf1rJH9Ns= +github.com/spf13/viper v1.10.1 h1:nuJZuYpG7gTj/XqiUwg8bA0cp1+M2mC3J4g5luUYBKk= +github.com/spf13/viper v1.10.1/go.mod h1:IGlFPqhNAPKRxohIzWpI5QEy4kuI7tcl5WvR+8qy1rU= +github.com/stoewer/go-strcase v1.2.0/go.mod h1:IBiWB2sKIp3wVVQ3Y035++gc+knqhUQag1KpM8ahLw8= +github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= +github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= +github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= +github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= +github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= +github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA= +github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= +github.com/stretchr/testify v1.7.0 h1:nwc3DEeHmmLAfoZucVR881uASk0Mfjw8xYJ99tb5CcY= +github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= +github.com/subosito/gotenv v1.2.0 h1:Slr1R9HxAlEKefgq5jn9U+DnETlIUa6HfgEzj0g5d7s= +github.com/subosito/gotenv v1.2.0/go.mod h1:N0PQaV/YGNqwC0u51sEeR/aUtSLEXKX9iv69rRypqCw= +github.com/tmc/grpc-websocket-proxy v0.0.0-20190109142713-0ad062ec5ee5/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= +github.com/tmc/grpc-websocket-proxy v0.0.0-20201229170055-e5319fda7802/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= +github.com/tmthrgd/go-hex v0.0.0-20190904060850-447a3041c3bc/go.mod h1:bciPuU6GHm1iF1pBvUfxfsH0Wmnc2VbpgvbI9ZWuIRs= +github.com/tv42/httpunix v0.0.0-20150427012821-b75d8614f926/go.mod h1:9ESjWnEqriFuLhtthL60Sar/7RFoluCcXsuvEwTV5KM= +github.com/uptrace/bun v1.0.20/go.mod h1:Uv7z0z+7dXnUS9P5hMF0hdiM/4M+xOUHQCrZpyDrpRc= +github.com/uptrace/bun/dialect/pgdialect v1.0.20/go.mod h1:Z2UoOgTKHXgFOuInXsJKkNQJiFIaPkCvsj0EayOI2yk= +github.com/uptrace/bun/driver/pgdriver v1.0.20/go.mod h1:KAONvCIiI4A6HdMTZ8zCdGxh7P6+23Todz+bL8HRzV4= +github.com/uptrace/bun/extra/bundebug v1.0.20/go.mod h1:tDoi/zmjHkumthaCujwfI2+mni0G41HfJD4HC2oMdpk= +github.com/vmihailenco/msgpack/v5 v5.3.5/go.mod h1:7xyJ9e+0+9SaZT0Wt1RGleJXzli6Q/V5KbhBonMG9jc= +github.com/vmihailenco/tagparser/v2 v2.0.0/go.mod h1:Wri+At7QHww0WTrCBeu4J6bNtoV6mEfg5OIWRZA9qds= +github.com/xiang90/probing v0.0.0-20190116061207-43a291ad63a2/go.mod h1:UETIi67q53MR2AWcXfiuqkDkRtnGDLqkBTpCHuJHxtU= +github.com/yuin/goldmark v1.1.25/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= +github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= +github.com/yuin/goldmark v1.1.32/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= +github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= +github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= +github.com/yuin/goldmark v1.4.0/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= +go.etcd.io/bbolt v1.3.2/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU= +go.etcd.io/bbolt v1.3.6/go.mod h1:qXsaaIqmgQH0T+OPdb99Bf+PKfBBQVAdyD6TY9G8XM4= +go.etcd.io/etcd/api/v3 v3.5.0/go.mod h1:cbVKeC6lCfl7j/8jBhAK6aIYO9XOjdptoxU/nLQcPvs= +go.etcd.io/etcd/api/v3 v3.5.1/go.mod h1:cbVKeC6lCfl7j/8jBhAK6aIYO9XOjdptoxU/nLQcPvs= +go.etcd.io/etcd/client/pkg/v3 v3.5.0/go.mod h1:IJHfcCEKxYu1Os13ZdwCwIUTUVGYTSAM3YSwc9/Ac1g= +go.etcd.io/etcd/client/pkg/v3 v3.5.1/go.mod h1:IJHfcCEKxYu1Os13ZdwCwIUTUVGYTSAM3YSwc9/Ac1g= +go.etcd.io/etcd/client/v2 v2.305.0/go.mod h1:h9puh54ZTgAKtEbut2oe9P4L/oqKCVB6xsXlzd7alYQ= +go.etcd.io/etcd/client/v2 v2.305.1/go.mod h1:pMEacxZW7o8pg4CrFE7pquyCJJzZvkvdD2RibOCCCGs= +go.etcd.io/etcd/client/v3 v3.5.0/go.mod h1:AIKXXVX/DQXtfTEqBryiLTUXwON+GuvO6Z7lLS/oTh0= +go.etcd.io/etcd/pkg/v3 v3.5.0/go.mod h1:UzJGatBQ1lXChBkQF0AuAtkRQMYnHubxAEYIrC3MSsE= +go.etcd.io/etcd/raft/v3 v3.5.0/go.mod h1:UFOHSIvO/nKwd4lhkwabrTD3cqW5yVyYYf/KlD00Szc= +go.etcd.io/etcd/server/v3 v3.5.0/go.mod h1:3Ah5ruV+M+7RZr0+Y/5mNLwC+eQlni+mQmOVdCRJoS4= +go.opencensus.io v0.21.0/go.mod h1:mSImk1erAIZhrmZN+AvHh14ztQfjbGwt4TtuofqLduU= +go.opencensus.io v0.22.0/go.mod h1:+kGneAE2xo2IficOXnaByMWTGM9T73dGwxeWcUqIpI8= +go.opencensus.io v0.22.2/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= +go.opencensus.io v0.22.3/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= +go.opencensus.io v0.22.4/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= +go.opencensus.io v0.22.5/go.mod h1:5pWMHQbX5EPX2/62yrJeAkowc+lfs/XD7Uxpq3pI6kk= +go.opencensus.io v0.23.0/go.mod h1:XItmlyltB5F7CS4xOC1DcqMoFqwtC6OG2xF7mCv7P7E= +go.opentelemetry.io/contrib v0.20.0/go.mod h1:G/EtFaa6qaN7+LxqfIAT3GiZa7Wv5DTBUzl5H4LY0Kc= +go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.20.0/go.mod h1:oVGt1LRbBOBq1A5BQLlUg9UaU/54aiHw8cgjV3aWZ/E= +go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.20.0/go.mod h1:2AboqHi0CiIZU0qwhtUfCYD1GeUzvvIXWNkhDt7ZMG4= +go.opentelemetry.io/otel v0.20.0/go.mod h1:Y3ugLH2oa81t5QO+Lty+zXf8zC9L26ax4Nzoxm/dooo= +go.opentelemetry.io/otel/exporters/otlp v0.20.0/go.mod h1:YIieizyaN77rtLJra0buKiNBOm9XQfkPEKBeuhoMwAM= +go.opentelemetry.io/otel/metric v0.20.0/go.mod h1:598I5tYlH1vzBjn+BTuhzTCSb/9debfNp6R3s7Pr1eU= +go.opentelemetry.io/otel/oteltest v0.20.0/go.mod h1:L7bgKf9ZB7qCwT9Up7i9/pn0PWIa9FqQ2IQ8LoxiGnw= +go.opentelemetry.io/otel/sdk v0.20.0/go.mod h1:g/IcepuwNsoiX5Byy2nNV0ySUF1em498m7hBWC279Yc= +go.opentelemetry.io/otel/sdk/export/metric v0.20.0/go.mod h1:h7RBNMsDJ5pmI1zExLi+bJK+Dr8NQCh0qGhm1KDnNlE= +go.opentelemetry.io/otel/sdk/metric v0.20.0/go.mod h1:knxiS8Xd4E/N+ZqKmUPf3gTTZ4/0TjTXukfxjzSTpHE= +go.opentelemetry.io/otel/trace v0.20.0/go.mod h1:6GjCW8zgDjwGHGa6GkyeB8+/5vjT16gUEi0Nf1iBdgw= +go.opentelemetry.io/proto/otlp v0.7.0/go.mod h1:PqfVotwruBrMGOCsRd/89rSnXhoiJIqeYNgFYFoEGnI= +go.uber.org/atomic v1.4.0/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= +go.uber.org/atomic v1.7.0 h1:ADUqmZGgLDDfbSL9ZmPxKTybcoEYHgpYfELNoN+7hsw= +go.uber.org/atomic v1.7.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc= +go.uber.org/goleak v1.1.10/go.mod h1:8a7PlsEVH3e/a/GLqe5IIrQx6GzcnRmZEufDUTk4A7A= +go.uber.org/goleak v1.1.11-0.20210813005559-691160354723/go.mod h1:cwTWslyiVhfpKIDGSZEM2HlOvcqm+tG4zioyIeLoqMQ= +go.uber.org/goleak v1.1.12 h1:gZAh5/EyT/HQwlpkCy6wTpqfH9H8Lz8zbm3dZh+OyzA= +go.uber.org/goleak v1.1.12/go.mod h1:cwTWslyiVhfpKIDGSZEM2HlOvcqm+tG4zioyIeLoqMQ= +go.uber.org/multierr v1.1.0/go.mod h1:wR5kodmAFQ0UK8QlbwjlSNy0Z68gJhDJUG5sjR94q/0= +go.uber.org/multierr v1.6.0 h1:y6IPFStTAIT5Ytl7/XYmHvzXQ7S3g/IeZW9hyZ5thw4= +go.uber.org/multierr v1.6.0/go.mod h1:cdWPpRnG4AhwMwsgIHip0KRBQjJy5kYEpYjJxpXp9iU= +go.uber.org/zap v1.10.0/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q= +go.uber.org/zap v1.17.0/go.mod h1:MXVU+bhUf/A7Xi2HNOnopQOrmycQ5Ih87HtOu4q5SSo= +go.uber.org/zap v1.19.0/go.mod h1:xg/QME4nWcxGxrpdeYfq7UvYrLh66cuVKdrbD1XF/NI= +go.uber.org/zap v1.19.1 h1:ue41HOKd1vGURxrmeKIgELGb3jPW9DMUDGtsinblHwI= +go.uber.org/zap v1.19.1/go.mod h1:j3DNczoxDZroyBnOT1L/Q79cfUMGZxlv/9dzN7SM1rI= +golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= +golang.org/x/crypto v0.0.0-20180910181607-0e37d006457b/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= +golang.org/x/crypto v0.0.0-20181029021203-45a5f77698d3/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= +golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= +golang.org/x/crypto v0.0.0-20190510104115-cbcb75029529/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= +golang.org/x/crypto v0.0.0-20190605123033-f99c8df09eb5/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= +golang.org/x/crypto v0.0.0-20190820162420-60c769a6c586/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= +golang.org/x/crypto v0.0.0-20190923035154-9ee001bba392/go.mod h1:/lpIB1dKB+9EgE3H3cr1v9wB50oz8l4C4h62xy7jSTY= +golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= +golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= +golang.org/x/crypto v0.0.0-20201002170205-7f63de1d35b0/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= +golang.org/x/crypto v0.0.0-20210817164053-32db794688a5/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= +golang.org/x/crypto v0.0.0-20211215153901-e495a2d5b3d3/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= +golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= +golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= +golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8= +golang.org/x/exp v0.0.0-20190829153037-c13cbed26979/go.mod h1:86+5VVa7VpoJ4kLfm080zCjGlMRFzhUhsZKEZO7MGek= +golang.org/x/exp v0.0.0-20191030013958-a1ab85dbe136/go.mod h1:JXzH8nQsPlswgeRAPE3MuO9GYsAcnJvJ4vnMwN/5qkY= +golang.org/x/exp v0.0.0-20191129062945-2f5052295587/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= +golang.org/x/exp v0.0.0-20191227195350-da58074b4299/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= +golang.org/x/exp v0.0.0-20200119233911-0405dc783f0a/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= +golang.org/x/exp v0.0.0-20200207192155-f17229e696bd/go.mod h1:J/WKrq2StrnmMY6+EHIKF9dgMWnmCNThgcyBT1FY9mM= +golang.org/x/exp v0.0.0-20200224162631-6cc2880d07d6/go.mod h1:3jZMyOhIsHpP37uCMkUooju7aAi5cS1Q23tOzKc+0MU= +golang.org/x/image v0.0.0-20190227222117-0694c2d4d067/go.mod h1:kZ7UVZpmo3dzQBMxlp+ypCbDeSB+sBbTgSJuh5dn5js= +golang.org/x/image v0.0.0-20190802002840-cff245a6509b/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0= +golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= +golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvxsM5YxQ5yQlVC4a0KAMCusXpPoU= +golang.org/x/lint v0.0.0-20190301231843-5614ed5bae6f/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= +golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= +golang.org/x/lint v0.0.0-20190409202823-959b441ac422/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= +golang.org/x/lint v0.0.0-20190909230951-414d861bb4ac/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= +golang.org/x/lint v0.0.0-20190930215403-16217165b5de/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= +golang.org/x/lint v0.0.0-20191125180803-fdd1cda4f05f/go.mod h1:5qLYkcX4OjUUV8bRuDixDT3tpyyb+LUpUlRWLxfhWrs= +golang.org/x/lint v0.0.0-20200130185559-910be7a94367/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= +golang.org/x/lint v0.0.0-20200302205851-738671d3881b/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= +golang.org/x/lint v0.0.0-20201208152925-83fdc39ff7b5/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= +golang.org/x/lint v0.0.0-20210508222113-6edffad5e616/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= +golang.org/x/mobile v0.0.0-20190312151609-d3739f865fa6/go.mod h1:z+o9i4GpDbdi3rU15maQ/Ox0txvL9dWGYEHz965HBQE= +golang.org/x/mobile v0.0.0-20190719004257-d2bd2a29d028/go.mod h1:E/iHnbuqvinMTCcRqshq8CkpyQDoeVncDDYHnLhea+o= +golang.org/x/mod v0.0.0-20190513183733-4bf6d317e70e/go.mod h1:mXi4GBBbnImb6dmsKGUJ2LatrhH/nqhxcFungHvyanc= +golang.org/x/mod v0.1.0/go.mod h1:0QHyrYULN0/3qlju5TqG8bIK38QM8yzMo5ekMj3DlcY= +golang.org/x/mod v0.1.1-0.20191105210325-c90efee705ee/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg= +golang.org/x/mod v0.1.1-0.20191107180719-034126e5016b/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg= +golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= +golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= +golang.org/x/mod v0.4.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= +golang.org/x/mod v0.4.1/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= +golang.org/x/mod v0.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= +golang.org/x/mod v0.5.0/go.mod h1:5OXOZSfqPIIbmVBIIKWRFfZjPR0E5r58TLhUjH0a2Ro= +golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20181023162649-9b4f9f5ad519/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20181114220301-adae6a3d119a/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20181201002055-351d144fa1fc/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20181220203305-927f97764cc3/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/net v0.0.0-20190501004415-9ce7a6920f09/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/net v0.0.0-20190503192946-f4e77d36d62c/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/net v0.0.0-20190603091049-60506f45cf65/go.mod h1:HSz+uSET+XFnRR8LxR5pz3Of3rY3CfYBVs4xY44aLks= +golang.org/x/net v0.0.0-20190613194153-d28f0bde5980/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20190628185345-da137c7871d7/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20190724013045-ca1201d0de80/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20190827160401-ba9fcec4b297/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20190923162816-aa69164e4478/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20191209160850-c0dbc17a3553/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20200114155413-6afb5195e5aa/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20200202094626-16171245cfb2/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20200222125558-5a598a2470a0/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20200301022130-244492dfa37a/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20200324143707-d3edc9973b7e/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= +golang.org/x/net v0.0.0-20200501053045-e0ff5e5a1de5/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= +golang.org/x/net v0.0.0-20200506145744-7e3656a0809f/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= +golang.org/x/net v0.0.0-20200513185701-a91f0712d120/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= +golang.org/x/net v0.0.0-20200520004742-59133d7f0dd7/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= +golang.org/x/net v0.0.0-20200520182314-0ba52f642ac2/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= +golang.org/x/net v0.0.0-20200625001655-4c5254603344/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= +golang.org/x/net v0.0.0-20200707034311-ab3426394381/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= +golang.org/x/net v0.0.0-20200822124328-c89045814202/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= +golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= +golang.org/x/net v0.0.0-20201031054903-ff519b6c9102/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= +golang.org/x/net v0.0.0-20201110031124-69a78807bb2b/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= +golang.org/x/net v0.0.0-20201202161906-c7110b5ffcbb/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= +golang.org/x/net v0.0.0-20201209123823-ac852fbbde11/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= +golang.org/x/net v0.0.0-20210119194325-5f4716e94777/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= +golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= +golang.org/x/net v0.0.0-20210316092652-d523dce5a7f4/go.mod h1:RBQZq4jEuRlivfhVLdyRGr576XBO4/greRjx4P4O3yc= +golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4/go.mod h1:p54w0d4576C0XHj96bSt6lcn1PtDYWL6XObtHCRCNQM= +golang.org/x/net v0.0.0-20210410081132-afb366fc7cd1/go.mod h1:9tjilg8BloeKEkVJvy7fQ90B1CfIiPueXVOjqfkSzI8= +golang.org/x/net v0.0.0-20210428140749-89ef3d95e781/go.mod h1:OJAsFXCWl8Ukc7SiCT/9KSuxbyM7479/AVlXFRxuMCk= +golang.org/x/net v0.0.0-20210503060351-7fd8e65b6420/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= +golang.org/x/net v0.0.0-20210525063256-abc453219eb5/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= +golang.org/x/net v0.0.0-20210805182204-aaa1db679c0d/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= +golang.org/x/net v0.0.0-20210813160813-60bc85c4be6d/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= +golang.org/x/net v0.0.0-20210825183410-e898025ed96a/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= +golang.org/x/net v0.0.0-20210916014120-12bc252f5db8/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= +golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2 h1:CIJ76btIcR3eFI5EgSo6k1qKw9KJexJuRLI9G7Hp5wE= +golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= +golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= +golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= +golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= +golang.org/x/oauth2 v0.0.0-20191202225959-858c2ad4c8b6/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= +golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= +golang.org/x/oauth2 v0.0.0-20200902213428-5d25da1a8d43/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= +golang.org/x/oauth2 v0.0.0-20201109201403-9fd604954f58/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= +golang.org/x/oauth2 v0.0.0-20201208152858-08078c50e5b5/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= +golang.org/x/oauth2 v0.0.0-20210218202405-ba52d332ba99/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= +golang.org/x/oauth2 v0.0.0-20210220000619-9bb904979d93/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= +golang.org/x/oauth2 v0.0.0-20210313182246-cd4f82c27b84/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= +golang.org/x/oauth2 v0.0.0-20210402161424-2e8d93401602/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= +golang.org/x/oauth2 v0.0.0-20210514164344-f6687ab2804c/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= +golang.org/x/oauth2 v0.0.0-20210628180205-a41e5a781914/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= +golang.org/x/oauth2 v0.0.0-20210805134026-6f1e6394065a/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= +golang.org/x/oauth2 v0.0.0-20210819190943-2bc19b11175f/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= +golang.org/x/oauth2 v0.0.0-20211005180243-6b3c2da341f1/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= +golang.org/x/oauth2 v0.0.0-20211104180415-d3ed0bb246c8/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= +golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20190227155943-e225da77a7e6/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20200317015054-43a5402ce75a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20200625203802-6e8e738ad208/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20201207232520-09787c993a3a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sys v0.0.0-20180823144017-11551d06cbcc/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20181026203630-95b1ffbd15a5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20181107165924-66b7b1311ac8/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20181116152217-5ac8a444bdc5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20190222072716-a9d3bda3a223/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20190312061237-fead79001313/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190422165155-953cdadca894/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190502145724-3ef323f4f1fd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190507160741-ecd444e8653b/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190606165138-5da285871e9c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190624142023-c5567b49c5d0/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190726091711-fc99dfbffb4e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190904154756-749cb33beabd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190922100055-0a153f010e69/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190924154521-2837fb4f24fe/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191001151750-bb3f8db39f24/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191005200804-aed5e4c7ecf9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191008105621-543471e840be/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191026070338-33540a1f6037/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191120155948-bd437916bb0e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191204072324-ce4227a45e2e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191228213918-04cbcbbfeed8/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200106162015-b016eb3dc98e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200113162924-86b910548bc1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200116001909-b77594299b42/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200122134326-e047566fdf82/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200124204421-9fbb57f87de9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200202164722-d101bd2416d5/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200212091648-12a6c2dcc1e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200223170610-d5e6a3e2c0ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200302150141-5c8b2ff67527/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200331124033-c3d80250170d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200501052902-10377860bb8e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200511232937-7e40ca221e25/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200515095857-1151b9dac4a9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200519105757-fe76b779f299/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200523222454-059865788121/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200615200032-f1bc736245b1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200625212154-ddb9806d33ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200803210538-64077c9b5642/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200831180312-196b9ba8737a/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200905004654-be1d3432aa8f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200923182605-d9f96fdee20d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20201201145000-ef89a241ccb3/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210104204734-6f8348627aad/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210112080510-489259a85091/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210119212857-b64e53b001e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210124154548-22da62e12c0c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210220050731-9a76102bfb43/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210303074136-134d130e1a04/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210305230114-8fe3ee5dd75b/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210315160823-c6e025ad8005/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210320140829-1e4c9ba3b0c4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210330210617-4fbd30eecc44/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210403161142-5e06dd20ab57/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210510120138-977fb7262007/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20210514084401-e8d321eab015/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20210603081109-ebe580a85c40/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20210603125802-9665404d3644/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20210616094352-59db8d763f22/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20210806184541-e5e7981a1069/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20210809222454-d867a43fc93e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20210816183151-1e6c022a8912/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20210823070655-63515b42dcdf/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20210831042530-f4d43177bf5e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20210908233432-aa78b53d3365/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20210927094055-39ccf1dd6fa6/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20211007075335-d3039528d8ac/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20211029165221-6e7872819dc8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20211123173158-ef496fb156ab/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20211124211545-fe61309f8881/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20211210111614-af8b64212486/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20211216021012-1d35b9e2eb4e h1:fLOSk5Q00efkSvAm+4xcoXD+RRmLmmulPn5I3Y9F2EM= +golang.org/x/sys v0.0.0-20211216021012-1d35b9e2eb4e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= +golang.org/x/term v0.0.0-20210615171337-6886f2dfbf5b/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= +golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= +golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= +golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= +golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= +golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= +golang.org/x/text v0.3.4/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= +golang.org/x/text v0.3.5/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= +golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= +golang.org/x/text v0.3.7 h1:olpwvP2KacW1ZWvsR7uQhoyTYvKAupfQrRGBFM352Gk= +golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= +golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= +golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= +golang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= +golang.org/x/time v0.0.0-20210220033141-f8bda1e9f3ba/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= +golang.org/x/time v0.0.0-20210723032227-1f47c861a9ac/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= +golang.org/x/tools v0.0.0-20180221164845-07fd8470d635/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/tools v0.0.0-20181030221726-6c7e314b6563/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY= +golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= +golang.org/x/tools v0.0.0-20190312151545-0bb0c0a6e846/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= +golang.org/x/tools v0.0.0-20190312170243-e65039ee4138/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= +golang.org/x/tools v0.0.0-20190328211700-ab21143f2384/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= +golang.org/x/tools v0.0.0-20190425150028-36563e24a262/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= +golang.org/x/tools v0.0.0-20190506145303-2d16b83fe98c/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= +golang.org/x/tools v0.0.0-20190524140312-2c0ae7006135/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= +golang.org/x/tools v0.0.0-20190606124116-d0a3d012864b/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= +golang.org/x/tools v0.0.0-20190621195816-6e04913cbbac/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= +golang.org/x/tools v0.0.0-20190624222133-a101b041ded4/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= +golang.org/x/tools v0.0.0-20190628153133-6cdbf07be9d0/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= +golang.org/x/tools v0.0.0-20190816200558-6889da9d5479/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20190907020128-2ca718005c18/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20190911174233-4f2ddba30aff/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191012152004-8de300cfc20a/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191108193012-7d206e10da11/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191112195655-aa38f8e97acc/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191113191852-77e3bb0ad9e7/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191115202509-3a792d9c32b2/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191125144606-a911d9008d1f/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191130070609-6e064ea0cf2d/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191216173652-a0e659d51361/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20191227053925-7b8e75db28f4/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200117161641-43d50277825c/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200122220014-bf1340f18c4a/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200130002326-2f3ba24bd6e7/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200204074204-1cc6d1ef6c74/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200207183749-b753a1ba74fa/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200212150539-ea181f53ac56/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200224181240-023911ca70b2/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200227222343-706bc42d1f0d/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200304193943-95d2e580d8eb/go.mod h1:o4KQGtdN14AW+yjsvvwRTJJuXz8XRtIHtEnmAXLyFUw= +golang.org/x/tools v0.0.0-20200312045724-11d5b4c81c7d/go.mod h1:o4KQGtdN14AW+yjsvvwRTJJuXz8XRtIHtEnmAXLyFUw= +golang.org/x/tools v0.0.0-20200331025713-a30bf2db82d4/go.mod h1:Sl4aGygMT6LrqrWclx+PTx3U+LnKx/seiNR+3G19Ar8= +golang.org/x/tools v0.0.0-20200501065659-ab2804fb9c9d/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= +golang.org/x/tools v0.0.0-20200505023115-26f46d2f7ef8/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= +golang.org/x/tools v0.0.0-20200512131952-2bc93b1c0c88/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= +golang.org/x/tools v0.0.0-20200515010526-7d3b6ebf133d/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= +golang.org/x/tools v0.0.0-20200618134242-20370b0cb4b2/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= +golang.org/x/tools v0.0.0-20200619180055-7c47624df98f/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= +golang.org/x/tools v0.0.0-20200729194436-6467de6f59a7/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= +golang.org/x/tools v0.0.0-20200804011535-6c149bb5ef0d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= +golang.org/x/tools v0.0.0-20200825202427-b303f430e36d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= +golang.org/x/tools v0.0.0-20200904185747-39188db58858/go.mod h1:Cj7w3i3Rnn0Xh82ur9kSqwfTHTeVxaDqrfMjpcNT6bE= +golang.org/x/tools v0.0.0-20201110124207-079ba7bd75cd/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= +golang.org/x/tools v0.0.0-20201201161351-ac6f37ff4c2a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= +golang.org/x/tools v0.0.0-20201208233053-a543418bbed2/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= +golang.org/x/tools v0.0.0-20201224043029-2b0845dc783e/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= +golang.org/x/tools v0.0.0-20210105154028-b0ab187a4818/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= +golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= +golang.org/x/tools v0.1.0/go.mod h1:xkSsbof2nBLbhDlRMhhhyNLN/zl3eTqcnHD5viDpcZ0= +golang.org/x/tools v0.1.1/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= +golang.org/x/tools v0.1.2/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= +golang.org/x/tools v0.1.3/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= +golang.org/x/tools v0.1.4/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= +golang.org/x/tools v0.1.5/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= +golang.org/x/tools v0.1.6-0.20210820212750-d4cc65f0b2ff/go.mod h1:YD9qOF0M9xpSpdWTBbzEl5e/RnCefISl8E5Noe10jFM= +golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1 h1:go1bK/D/BFZV2I8cIQd1NKEZ+0owSTG1fDTci4IqFcE= +golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +gomodules.xyz/jsonpatch/v2 v2.2.0/go.mod h1:WXp+iVDkoLQqPudfQ9GBlwB2eZ5DKOnjQZCYdOS8GPY= +google.golang.org/api v0.4.0/go.mod h1:8k5glujaEP+g9n7WNsDg8QP6cUVNI86fCNMcbazEtwE= +google.golang.org/api v0.7.0/go.mod h1:WtwebWUNSVBH/HAw79HIFXZNqEvBhG+Ra+ax0hx3E3M= +google.golang.org/api v0.8.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg= +google.golang.org/api v0.9.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg= +google.golang.org/api v0.13.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= +google.golang.org/api v0.14.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= +google.golang.org/api v0.15.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= +google.golang.org/api v0.17.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= +google.golang.org/api v0.18.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= +google.golang.org/api v0.19.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= +google.golang.org/api v0.20.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= +google.golang.org/api v0.22.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= +google.golang.org/api v0.24.0/go.mod h1:lIXQywCXRcnZPGlsd8NbLnOjtAoL6em04bJ9+z0MncE= +google.golang.org/api v0.28.0/go.mod h1:lIXQywCXRcnZPGlsd8NbLnOjtAoL6em04bJ9+z0MncE= +google.golang.org/api v0.29.0/go.mod h1:Lcubydp8VUV7KeIHD9z2Bys/sm/vGKnG1UHuDBSrHWM= +google.golang.org/api v0.30.0/go.mod h1:QGmEvQ87FHZNiUVJkT14jQNYJ4ZJjdRF23ZXz5138Fc= +google.golang.org/api v0.35.0/go.mod h1:/XrVsuzM0rZmrsbjJutiuftIzeuTQcEeaYcSk/mQ1dg= +google.golang.org/api v0.36.0/go.mod h1:+z5ficQTmoYpPn8LCUNVpK5I7hwkpjbcgqA7I34qYtE= +google.golang.org/api v0.40.0/go.mod h1:fYKFpnQN0DsDSKRVRcQSDQNtqWPfM9i+zNPxepjRCQ8= +google.golang.org/api v0.41.0/go.mod h1:RkxM5lITDfTzmyKFPt+wGrCJbVfniCr2ool8kTBzRTU= +google.golang.org/api v0.43.0/go.mod h1:nQsDGjRXMo4lvh5hP0TKqF244gqhGcr/YSIykhUk/94= +google.golang.org/api v0.44.0/go.mod h1:EBOGZqzyhtvMDoxwS97ctnh0zUmYY6CxqXsc1AvkYD8= +google.golang.org/api v0.47.0/go.mod h1:Wbvgpq1HddcWVtzsVLyfLp8lDg6AA241LmgIL59tHXo= +google.golang.org/api v0.48.0/go.mod h1:71Pr1vy+TAZRPkPs/xlCf5SsU8WjuAWv1Pfjbtukyy4= +google.golang.org/api v0.50.0/go.mod h1:4bNT5pAuq5ji4SRZm+5QIkjny9JAyVD/3gaSihNefaw= +google.golang.org/api v0.51.0/go.mod h1:t4HdrdoNgyN5cbEfm7Lum0lcLDLiise1F8qDKX00sOU= +google.golang.org/api v0.54.0/go.mod h1:7C4bFFOvVDGXjfDTAsgGwDgAxRDeQ4X8NvUedIt6z3k= +google.golang.org/api v0.55.0/go.mod h1:38yMfeP1kfjsl8isn0tliTjIb1rJXcQi4UXlbqivdVE= +google.golang.org/api v0.56.0/go.mod h1:38yMfeP1kfjsl8isn0tliTjIb1rJXcQi4UXlbqivdVE= +google.golang.org/api v0.57.0/go.mod h1:dVPlbZyBo2/OjBpmvNdpn2GRm6rPy75jyU7bmhdrMgI= +google.golang.org/api v0.59.0/go.mod h1:sT2boj7M9YJxZzgeZqXogmhfmRWDtPzT31xkieUbuZU= +google.golang.org/api v0.61.0/go.mod h1:xQRti5UdCmoCEqFxcz93fTl338AVqDgyaDRuOZ3hg9I= +google.golang.org/api v0.63.0/go.mod h1:gs4ij2ffTRXwuzzgJl/56BdwJaA194ijkfn++9tDuPo= +google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= +google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= +google.golang.org/appengine v1.5.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= +google.golang.org/appengine v1.6.1/go.mod h1:i06prIuMbXzDqacNJfV5OdTW448YApPu5ww/cMBSeb0= +google.golang.org/appengine v1.6.5/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= +google.golang.org/appengine v1.6.6/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= +google.golang.org/appengine v1.6.7/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= +google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= +google.golang.org/genproto v0.0.0-20190307195333-5fe7a883aa19/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= +google.golang.org/genproto v0.0.0-20190418145605-e7d98fc518a7/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= +google.golang.org/genproto v0.0.0-20190425155659-357c62f0e4bb/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= +google.golang.org/genproto v0.0.0-20190502173448-54afdca5d873/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= +google.golang.org/genproto v0.0.0-20190801165951-fa694d86fc64/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= +google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= +google.golang.org/genproto v0.0.0-20190911173649-1774047e7e51/go.mod h1:IbNlFCBrqXvoKpeg0TB2l7cyZUmoaFKYIwrEpbDKLA8= +google.golang.org/genproto v0.0.0-20191108220845-16a3f7862a1a/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= +google.golang.org/genproto v0.0.0-20191115194625-c23dd37a84c9/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= +google.golang.org/genproto v0.0.0-20191216164720-4f79533eabd1/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= +google.golang.org/genproto v0.0.0-20191230161307-f3c370f40bfb/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= +google.golang.org/genproto v0.0.0-20200115191322-ca5a22157cba/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= +google.golang.org/genproto v0.0.0-20200122232147-0452cf42e150/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= +google.golang.org/genproto v0.0.0-20200204135345-fa8e72b47b90/go.mod h1:GmwEX6Z4W5gMy59cAlVYjN9JhxgbQH6Gn+gFDQe2lzA= +google.golang.org/genproto v0.0.0-20200212174721-66ed5ce911ce/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200224152610-e50cd9704f63/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200228133532-8c2c7df3a383/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200305110556-506484158171/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200312145019-da6875a35672/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200331122359-1ee6d9798940/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200423170343-7949de9c1215/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200430143042-b979b6f78d84/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200511104702-f5ebc3bea380/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200513103714-09dca8ec2884/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200515170657-fc4c6c6a6587/go.mod h1:YsZOwe1myG/8QRHRsmBRE1LrgQY60beZKjly0O1fX9U= +google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013/go.mod h1:NbSheEEYHJ7i3ixzK3sjbqSGDJWnxyFXZblF3eUsNvo= +google.golang.org/genproto v0.0.0-20200618031413-b414f8b61790/go.mod h1:jDfRM7FcilCzHH/e9qn6dsT145K34l5v+OpcnNgKAAA= +google.golang.org/genproto v0.0.0-20200729003335-053ba62fc06f/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20200804131852-c06518451d9c/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20200825200019-8632dd797987/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20200904004341-0bd0a958aa1d/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20201019141844-1ed22bb0c154/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20201102152239-715cce707fb0/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20201109203340-2640f1f9cdfb/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20201201144952-b05cb90ed32e/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20201210142538-e3217bee35cc/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20201214200347-8c77b98c765d/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20210222152913-aa3ee6e6a81c/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20210303154014-9728d6b83eeb/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20210310155132-4ce2db91004e/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20210319143718-93e7006c17a6/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20210402141018-6c239bbf2bb1/go.mod h1:9lPAdzaEmUacj36I+k7YKbEc5CXzPIeORRgDAUOu28A= +google.golang.org/genproto v0.0.0-20210513213006-bf773b8c8384/go.mod h1:P3QM42oQyzQSnHPnZ/vqoCdDmzH28fzWByN9asMeM8A= +google.golang.org/genproto v0.0.0-20210602131652-f16073e35f0c/go.mod h1:UODoCrxHCcBojKKwX1terBiRUaqAsFqJiF615XL43r0= +google.golang.org/genproto v0.0.0-20210604141403-392c879c8b08/go.mod h1:UODoCrxHCcBojKKwX1terBiRUaqAsFqJiF615XL43r0= +google.golang.org/genproto v0.0.0-20210608205507-b6d2f5bf0d7d/go.mod h1:UODoCrxHCcBojKKwX1terBiRUaqAsFqJiF615XL43r0= +google.golang.org/genproto v0.0.0-20210624195500-8bfb893ecb84/go.mod h1:SzzZ/N+nwJDaO1kznhnlzqS8ocJICar6hYhVyhi++24= +google.golang.org/genproto v0.0.0-20210713002101-d411969a0d9a/go.mod h1:AxrInvYm1dci+enl5hChSFPOmmUF1+uAa/UsgNRWd7k= +google.golang.org/genproto v0.0.0-20210716133855-ce7ef5c701ea/go.mod h1:AxrInvYm1dci+enl5hChSFPOmmUF1+uAa/UsgNRWd7k= +google.golang.org/genproto v0.0.0-20210728212813-7823e685a01f/go.mod h1:ob2IJxKrgPT52GcgX759i1sleT07tiKowYBGbczaW48= +google.golang.org/genproto v0.0.0-20210805201207-89edb61ffb67/go.mod h1:ob2IJxKrgPT52GcgX759i1sleT07tiKowYBGbczaW48= +google.golang.org/genproto v0.0.0-20210813162853-db860fec028c/go.mod h1:cFeNkxwySK631ADgubI+/XFU/xp8FD5KIVV4rj8UC5w= +google.golang.org/genproto v0.0.0-20210821163610-241b8fcbd6c8/go.mod h1:eFjDcFEctNawg4eG61bRv87N7iHBWyVhJu7u1kqDUXY= +google.golang.org/genproto v0.0.0-20210828152312-66f60bf46e71/go.mod h1:eFjDcFEctNawg4eG61bRv87N7iHBWyVhJu7u1kqDUXY= +google.golang.org/genproto v0.0.0-20210831024726-fe130286e0e2/go.mod h1:eFjDcFEctNawg4eG61bRv87N7iHBWyVhJu7u1kqDUXY= +google.golang.org/genproto v0.0.0-20210903162649-d08c68adba83/go.mod h1:eFjDcFEctNawg4eG61bRv87N7iHBWyVhJu7u1kqDUXY= +google.golang.org/genproto v0.0.0-20210909211513-a8c4777a87af/go.mod h1:eFjDcFEctNawg4eG61bRv87N7iHBWyVhJu7u1kqDUXY= +google.golang.org/genproto v0.0.0-20210924002016-3dee208752a0/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= +google.golang.org/genproto v0.0.0-20211008145708-270636b82663/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= +google.golang.org/genproto v0.0.0-20211028162531-8db9c33dc351/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= +google.golang.org/genproto v0.0.0-20211118181313-81c1377c94b1/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= +google.golang.org/genproto v0.0.0-20211206160659-862468c7d6e0/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= +google.golang.org/genproto v0.0.0-20211208223120-3a66f561d7aa h1:I0YcKz0I7OAhddo7ya8kMnvprhcWM045PmkBdMO9zN0= +google.golang.org/genproto v0.0.0-20211208223120-3a66f561d7aa/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= +google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= +google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38= +google.golang.org/grpc v1.21.1/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= +google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= +google.golang.org/grpc v1.25.1/go.mod h1:c3i+UQWmh7LiEpx4sFZnkU36qjEYZ0imhYfXVyQciAY= +google.golang.org/grpc v1.26.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= +google.golang.org/grpc v1.27.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= +google.golang.org/grpc v1.27.1/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= +google.golang.org/grpc v1.28.0/go.mod h1:rpkK4SK4GF4Ach/+MFLZUBavHOvF2JJB5uozKKal+60= +google.golang.org/grpc v1.29.1/go.mod h1:itym6AZVZYACWQqET3MqgPpjcuV5QH3BxFS3IjizoKk= +google.golang.org/grpc v1.30.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= +google.golang.org/grpc v1.31.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= +google.golang.org/grpc v1.31.1/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= +google.golang.org/grpc v1.33.1/go.mod h1:fr5YgcSWrqhRRxogOsw7RzIpsmvOZ6IcH4kBYTpR3n0= +google.golang.org/grpc v1.33.2/go.mod h1:JMHMWHQWaTccqQQlmk3MJZS+GWXOdAesneDmEnv2fbc= +google.golang.org/grpc v1.34.0/go.mod h1:WotjhfgOW/POjDeRt8vscBtXq+2VjORFy659qA51WJ8= +google.golang.org/grpc v1.35.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= +google.golang.org/grpc v1.36.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= +google.golang.org/grpc v1.36.1/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= +google.golang.org/grpc v1.37.0/go.mod h1:NREThFqKR1f3iQ6oBuvc5LadQuXVGo9rkm5ZGrQdJfM= +google.golang.org/grpc v1.37.1/go.mod h1:NREThFqKR1f3iQ6oBuvc5LadQuXVGo9rkm5ZGrQdJfM= +google.golang.org/grpc v1.38.0/go.mod h1:NREThFqKR1f3iQ6oBuvc5LadQuXVGo9rkm5ZGrQdJfM= +google.golang.org/grpc v1.39.0/go.mod h1:PImNr+rS9TWYb2O4/emRugxiyHZ5JyHW5F+RPnDzfrE= +google.golang.org/grpc v1.39.1/go.mod h1:PImNr+rS9TWYb2O4/emRugxiyHZ5JyHW5F+RPnDzfrE= +google.golang.org/grpc v1.40.0/go.mod h1:ogyxbiOoUXAkP+4+xa6PZSE9DZgIHtSpzjDTB9KAK34= +google.golang.org/grpc v1.40.1/go.mod h1:ogyxbiOoUXAkP+4+xa6PZSE9DZgIHtSpzjDTB9KAK34= +google.golang.org/grpc v1.43.0 h1:Eeu7bZtDZ2DpRCsLhUlcrLnvYaMK1Gz86a+hMVvELmM= +google.golang.org/grpc v1.43.0/go.mod h1:k+4IHHFw41K8+bbowsex27ge2rCb65oeWqe4jJ590SU= +google.golang.org/grpc/cmd/protoc-gen-go-grpc v1.1.0/go.mod h1:6Kw0yEErY5E/yWrBtf03jp27GLLJujG4z/JK95pnjjw= +google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= +google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= +google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM= +google.golang.org/protobuf v1.20.1-0.20200309200217-e05f789c0967/go.mod h1:A+miEFZTKqfCUM6K7xSMQL9OKL/b6hQv+e19PK+JZNE= +google.golang.org/protobuf v1.21.0/go.mod h1:47Nbq4nVaFHyn7ilMalzfO3qCViNmqZ2kzikPIcrTAo= +google.golang.org/protobuf v1.22.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= +google.golang.org/protobuf v1.23.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= +google.golang.org/protobuf v1.23.1-0.20200526195155-81db48ad09cc/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= +google.golang.org/protobuf v1.24.0/go.mod h1:r/3tXBNzIEhYS9I1OUVjXDlt8tc493IdKGjtUeSXeh4= +google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlbajtzgsN7c= +google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= +google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= +google.golang.org/protobuf v1.27.1 h1:SnqbnDw1V7RiZcXPx5MEeqPv2s79L9i7BJUlG/+RurQ= +google.golang.org/protobuf v1.27.1/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= +gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw= +gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/check.v1 v1.0.0-20200227125254-8fa46927fb4f h1:BLraFXnmrev5lT+xlilqcH8XK9/i0At2xKjWk4p6zsU= +gopkg.in/check.v1 v1.0.0-20200227125254-8fa46927fb4f/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= +gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys= +gopkg.in/inf.v0 v0.9.1/go.mod h1:cWUDdTG/fYaXco+Dcufb5Vnc6Gp2YChqWtbxRZE0mXw= +gopkg.in/ini.v1 v1.51.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= +gopkg.in/ini.v1 v1.62.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= +gopkg.in/ini.v1 v1.66.2 h1:XfR1dOYubytKy4Shzc2LHrrGhU0lDCfDGG1yLPmpgsI= +gopkg.in/ini.v1 v1.66.2/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= +gopkg.in/natefinch/lumberjack.v2 v2.0.0/go.mod h1:l0ndWWf7gzL7RNwBG7wST/UCcT4T24xpD6X8LsfU/+k= +gopkg.in/resty.v1 v1.12.0/go.mod h1:mDo4pnntr5jdWRML875a/NmxYqAlA73dVijT2AXvQQo= +gopkg.in/square/go-jose.v2 v2.2.2/go.mod h1:M9dMgbHiYLoDGQrXy7OpJDJWiKiU//h+vD76mk0e1AI= +gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 h1:uRGJdciOHaEIrze2W8Q3AKkepLTh2hOroT7a+7czfdQ= +gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWDmTeBkI65Dw0HsyUHuEVlX15mw= +gopkg.in/yaml.v2 v2.0.0-20170812160011-eb3733d160e7/go.mod h1:JAlM8MvJe8wmxCU4Bli9HhUf9+ttbYbLASfIpnQbh74= +gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.2.3/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.2.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.2.5/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.3.0/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY= +gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ= +gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= +gopkg.in/yaml.v3 v3.0.0-20200615113413-eeeca48fe776/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= +gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b h1:h8qDotaEPuJATrMmW04NCwg7v22aHH28wwpauUhK9Oo= +gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= +gotest.tools/v3 v3.0.2/go.mod h1:3SzNCllyD9/Y+b5r9JIKQ474KzkZyqLqEfYqMsX94Bk= +gotest.tools/v3 v3.0.3/go.mod h1:Z7Lb0S5l+klDB31fvDQX8ss/FlKDxtlFlw3Oa8Ymbl8= +honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= +honnef.co/go/tools v0.0.0-20190106161140-3f1c8253044a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= +honnef.co/go/tools v0.0.0-20190418001031-e561f6794a2a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= +honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= +honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg= +honnef.co/go/tools v0.0.1-2020.1.3/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= +honnef.co/go/tools v0.0.1-2020.1.4/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= +k8s.io/api v0.23.0/go.mod h1:8wmDdLBHBNxtOIytwLstXt5E9PddnZb0GaMcqsvDBpg= +k8s.io/apiextensions-apiserver v0.23.0/go.mod h1:xIFAEEDlAZgpVBl/1VSjGDmLoXAWRG40+GsWhKhAxY4= +k8s.io/apimachinery v0.23.0 h1:mIfWRMjBuMdolAWJ3Fd+aPTMv3X9z+waiARMpvvb0HQ= +k8s.io/apimachinery v0.23.0/go.mod h1:fFCTTBKvKcwTPFzjlcxp91uPFZr+JA0FubU4fLzzFYc= +k8s.io/apiserver v0.23.0/go.mod h1:Cec35u/9zAepDPPFyT+UMrgqOCjgJ5qtfVJDxjZYmt4= +k8s.io/client-go v0.23.0/go.mod h1:hrDnpnK1mSr65lHHcUuIZIXDgEbzc7/683c6hyG4jTA= +k8s.io/code-generator v0.23.0/go.mod h1:vQvOhDXhuzqiVfM/YHp+dmg10WDZCchJVObc9MvowsE= +k8s.io/component-base v0.23.0/go.mod h1:DHH5uiFvLC1edCpvcTDV++NKULdYYU6pR9Tt3HIKMKI= +k8s.io/gengo v0.0.0-20210813121822-485abfe95c7c/go.mod h1:FiNAH4ZV3gBg2Kwh89tzAEV2be7d5xI0vBa/VySYy3E= +k8s.io/klog/v2 v2.0.0/go.mod h1:PBfzABfn139FHAV07az/IF9Wp1bkk3vpT2XSJ76fSDE= +k8s.io/klog/v2 v2.2.0/go.mod h1:Od+F08eJP+W3HUb4pSrPpgp9DGU4GzlpG/TmITuYh/Y= +k8s.io/klog/v2 v2.30.0/go.mod h1:y1WjHnz7Dj687irZUWR/WLkLc5N1YHtjLdmgWjndZn0= +k8s.io/kube-openapi v0.0.0-20211115234752-e816edb12b65/go.mod h1:sX9MT8g7NVZM5lVL/j8QyCCJe8YSMW30QvGZWaCIDIk= +k8s.io/utils v0.0.0-20210802155522-efc7438f0176/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA= +k8s.io/utils v0.0.0-20210930125809-cb0fa318a74b/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA= +mellium.im/sasl v0.2.1/go.mod h1:ROaEDLQNuf9vjKqE1SrAfnsobm2YKXT1gnN1uDp1PjQ= +rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8= +rsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0= +rsc.io/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA= +sigs.k8s.io/apiserver-network-proxy/konnectivity-client v0.0.25/go.mod h1:Mlj9PNLmG9bZ6BHFwFKDo5afkpWyUISkb9Me0GnK66I= +sigs.k8s.io/controller-runtime v0.11.0 h1:DqO+c8mywcZLFJWILq4iktoECTyn30Bkj0CwgqMpZWQ= +sigs.k8s.io/controller-runtime v0.11.0/go.mod h1:KKwLiTooNGu+JmLZGn9Sl3Gjmfj66eMbCQznLP5zcqA= +sigs.k8s.io/json v0.0.0-20211020170558-c049b76a60c6/go.mod h1:p4QtZmO4uMYipTQNzagwnNoseA6OxSUutVw05NhYDRs= +sigs.k8s.io/structured-merge-diff/v4 v4.0.2/go.mod h1:bJZC9H9iH24zzfZ/41RGcq60oK1F7G282QMXDPYydCw= +sigs.k8s.io/structured-merge-diff/v4 v4.1.2/go.mod h1:j/nl6xW8vLS49O8YvXW1ocPhZawJtm+Yrr7PPRQ0Vg4= +sigs.k8s.io/structured-merge-diff/v4 v4.2.0/go.mod h1:j/nl6xW8vLS49O8YvXW1ocPhZawJtm+Yrr7PPRQ0Vg4= +sigs.k8s.io/yaml v1.2.0/go.mod h1:yfXDCHCao9+ENCvLSE62v9VSji2MKu5jeNfTrofGhJc= +sigs.k8s.io/yaml v1.3.0 h1:a2VclLzOGrwOHDiV8EfBGhvjHvP46CtW5j6POvhYGGo= +sigs.k8s.io/yaml v1.3.0/go.mod h1:GeOyir5tyXNByN85N/dRIT9es5UQNerPYEKK56eTBm8= diff --git a/components/usermgmt/main.go b/components/usermgmt/main.go index faf017a..72e1fb1 100644 --- a/components/usermgmt/main.go +++ b/components/usermgmt/main.go @@ -1,2 +1,126 @@ -package usermgmt +package main +import ( + "context" + "fmt" + "net/http" + "sync" + + "github.com/grpc-ecosystem/grpc-gateway/v2/runtime" + "github.com/spf13/viper" + "sigs.k8s.io/controller-runtime/pkg/manager/signals" + + authv3 "github.com/RafaySystems/rcloud-base/components/common/pkg/auth/v3" + "github.com/RafaySystems/rcloud-base/components/common/pkg/gateway" + logv2 "github.com/RafaySystems/rcloud-base/components/common/pkg/log/v2" + configrpc "github.com/RafaySystems/rcloud-base/components/common/proto/rpc/config" + pbrpcv3 "github.com/RafaySystems/rcloud-base/components/usermgmt/proto/rpc/v3" +) + +const ( + rpcPortEnv = "RPC_PORT" + apiPortEnv = "API_PORT" + debugPortEnv = "DEBUG_PORT" + kratosAddrEnv = "KRATOS_ADDR" + devEnv = "DEV" + configAddrENV = "CONFIG_ADDR" +) + +var ( + rpcPort int + apiPort int + debugPort int + rpcRelayPeeringPort int + kratosAddr string + dev bool + // ps service.PartnerService + _log = logv2.GetLogger() + authPool authv3.AuthPool + configPool configrpc.ConfigPool + configAddr string +) + +func setup() { + viper.SetDefault(rpcPortEnv, 10000) + viper.SetDefault(apiPortEnv, 11000) + viper.SetDefault(debugPortEnv, 12000) + viper.SetDefault(kratosAddr, "localhost:5443") + viper.SetDefault(devEnv, true) + viper.SetDefault(configAddrENV, "localhost:7000") + + viper.BindEnv(rpcPortEnv) + viper.BindEnv(apiPortEnv) + viper.BindEnv(debugPortEnv) + viper.BindEnv(kratosAddrEnv) + viper.BindEnv(devEnv) + viper.BindEnv(configAddrENV) + + rpcPort = viper.GetInt(rpcPortEnv) + apiPort = viper.GetInt(apiPortEnv) + debugPort = viper.GetInt(debugPortEnv) + kratosAddr = viper.GetString(kratosAddrEnv) + dev = viper.GetBool(devEnv) + configAddr = viper.GetString(configAddrENV) + + rpcRelayPeeringPort = rpcPort + 1 + + _log.Infow("usrmgmt setup") + + // ps = service.NewPartnerService(db) +} + +func run() { + + ctx := signals.SetupSignalHandler() + + var wg sync.WaitGroup + + wg.Add(1) + + go runAPI(&wg, ctx) + // go runRPC(&wg, ctx) + // go runDebug(&wg, ctx) + + <-ctx.Done() + wg.Wait() +} + +func runAPI(wg *sync.WaitGroup, ctx context.Context) { + defer wg.Done() + ctx, cancel := context.WithCancel(ctx) + defer cancel() + mux := http.NewServeMux() + + gwHandler, err := gateway.NewGateway( + ctx, + fmt.Sprintf(":%d", rpcPort), + make([]runtime.ServeMuxOption, 0), + pbrpcv3.RegisterUserHandlerFromEndpoint, + ) + if err != nil { + _log.Fatalw("unable to create gateway", "error", err) + } + + mux.Handle("/", gwHandler) + + s := http.Server{ + Addr: fmt.Sprintf(":%d", apiPort), + Handler: mux, + } + go func() { + defer s.Shutdown(context.TODO()) + <-ctx.Done() + }() + + _log.Infow("starting gateway server", "port", apiPort) + + err = s.ListenAndServe() + if err != nil { + _log.Fatalw("unable to start gateway", "error", err) + } +} + +func main() { + setup() + run() +} diff --git a/components/usermgmt/proto/proto/rpc/v3/group.proto b/components/usermgmt/proto/proto/rpc/v3/group.proto deleted file mode 100644 index 5173477..0000000 --- a/components/usermgmt/proto/proto/rpc/v3/group.proto +++ /dev/null @@ -1,129 +0,0 @@ -syntax = "proto3"; -package rafay.dev.rpc.v3; - -import "google/api/annotations.proto"; -import "gogoproto/gogo.proto"; -import "protoc-gen-openapiv2/options/annotations.proto"; -import "proto/types/userpb/v3/group.proto"; - -// Enable custom Marshal method. -option (gogoproto.marshaler_all) = true; -// Enable custom Unmarshal method. -option (gogoproto.unmarshaler_all) = true; -// Enable custom Size method (Required by Marshal and Unmarshal). -option (gogoproto.sizer_all) = true; -// Enable registration with golang/protobuf for the grpc-gateway. -option (gogoproto.goproto_registration) = true; -// Enable generation of XXX_MessageName methods for grpc-go/status. -option (gogoproto.messagename_all) = true; - -option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_swagger) = { - info : { - title : "Group management Service" - version : "2.0" - contact : {name : "Rafay Dev"} - } - schemes : HTTPS - consumes : "application/json" - consumes : "application/yaml" - produces : "application/json" - produces : "application/yaml" - security_definitions : { - security : { - key : "BasicAuth" - value : {type : TYPE_BASIC} - } - security : { - key : "ApiKeyAuth" - value : {type : TYPE_API_KEY in : IN_HEADER name : "X-RAFAY-API-KEYID"} - } - } - security : { - security_requirement : { - key : "BasicAuth" - value : {} - } - security_requirement : { - key : "ApiKeyAuth" - value : {} - } - } - responses : { - key : "403" - value : { - description : "Returned when the group does not have permission to " - "access " - "the resource." - } - } - responses : { - key : "404" - value : { - description : "Returned when the resource does not exist." - schema : {json_schema : {type : STRING}} - } - } -}; - -// Add filtering with org as well -message GetGroupsRequest { - string project = 1 - [ (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { - title : "Project", - description : "Project of user to filter by" - read_only : true - } ]; -} -message GetGroupRequest { string id = 1; } -message DeleteGroupRequest { string id = 1; } -message PutGroupRequest { - string id = 1; - rafay.dev.types.user.v3.Group group = 2; -} -message GetGroupsResponse { repeated rafay.dev.types.user.v3.Group group = 1; } -message GroupResponse { - string status = 1; - string message = 2; -} - -service Group { - rpc CreateGroup(rafay.dev.types.user.v3.Group) - returns (rafay.dev.types.user.v3.Group) { - option (google.api.http) = { - post : "/auth/v3/groups" - body : "*" - }; - - option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation) = { - responses : { - key : "201" - value : {description : "Returned when group is created successfully."} - } - }; - }; - - rpc GetGroups(GetGroupsRequest) returns (GetGroupsResponse) { - option (google.api.http) = { - get : "/auth/v3/groups" - }; - }; - - rpc GetGroup(GetGroupRequest) returns (rafay.dev.types.user.v3.Group) { - option (google.api.http) = { - get : "/auth/v3/group/{id}" - }; - }; - - rpc UpdateGroup(PutGroupRequest) returns (GroupResponse) { - option (google.api.http) = { - put : "/auth/v3/group/{id}" - body : "group" - }; - }; - - rpc DeleteGroup(DeleteGroupRequest) returns (GroupResponse) { - option (google.api.http) = { - delete : "/auth/v3/group/{id}" - }; - }; -} \ No newline at end of file diff --git a/components/usermgmt/proto/proto/rpc/v3/role.proto b/components/usermgmt/proto/proto/rpc/v3/role.proto deleted file mode 100644 index 27063ed..0000000 --- a/components/usermgmt/proto/proto/rpc/v3/role.proto +++ /dev/null @@ -1,120 +0,0 @@ -syntax = "proto3"; -package rafay.dev.rpc.v3; - -import "google/api/annotations.proto"; -import "gogoproto/gogo.proto"; -import "protoc-gen-openapiv2/options/annotations.proto"; -import "proto/types/userpb/v3/role.proto"; - -// Enable custom Marshal method. -option (gogoproto.marshaler_all) = true; -// Enable custom Unmarshal method. -option (gogoproto.unmarshaler_all) = true; -// Enable custom Size method (Required by Marshal and Unmarshal). -option (gogoproto.sizer_all) = true; -// Enable registration with golang/protobuf for the grpc-gateway. -option (gogoproto.goproto_registration) = true; -// Enable generation of XXX_MessageName methods for grpc-go/status. -option (gogoproto.messagename_all) = true; - -option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_swagger) = { - info : { - title : "Role management Service" - version : "2.0" - contact : {name : "Rafay Dev"} - } - schemes : HTTPS - consumes : "application/json" - consumes : "application/yaml" - produces : "application/json" - produces : "application/yaml" - security_definitions : { - security : { - key : "BasicAuth" - value : {type : TYPE_BASIC} - } - security : { - key : "ApiKeyAuth" - value : {type : TYPE_API_KEY in : IN_HEADER name : "X-RAFAY-API-KEYID"} - } - } - security : { - security_requirement : { - key : "BasicAuth" - value : {} - } - security_requirement : { - key : "ApiKeyAuth" - value : {} - } - } - responses : { - key : "403" - value : { - description : "Returned when the role does not have permission to access " - "the resource." - } - } - responses : { - key : "404" - value : { - description : "Returned when the resource does not exist." - schema : {json_schema : {type : STRING}} - } - } -}; - -message GetRolesRequest {} -message GetRoleRequest { string id = 1; } -message DeleteRoleRequest { string id = 1; } -message PutRoleRequest { - string id = 1; - rafay.dev.types.user.v3.Role role = 2; -} -message GetRolesResponse { repeated rafay.dev.types.user.v3.Role role = 1; } -message RoleResponse { - string status = 1; - string message = 2; -} - -service Role { - rpc CreateRole(rafay.dev.types.user.v3.Role) - returns (rafay.dev.types.user.v3.Role) { - option (google.api.http) = { - post : "/auth/v3/roles" - body : "*" - }; - - option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation) = { - responses : { - key : "201" - value : {description : "Returned when role is created successfully."} - } - }; - }; - - rpc GetRoles(GetRolesRequest) returns (GetRolesResponse) { - option (google.api.http) = { - get : "/auth/v3/roles" - }; - }; - - rpc GetRole(GetRoleRequest) returns (rafay.dev.types.user.v3.Role) { - option (google.api.http) = { - get : "/auth/v3/role/{id}" - }; - }; - - rpc UpdateRole(PutRoleRequest) returns (RoleResponse) { - option (google.api.http) = { - put : "/auth/v3/role/{id}" - body : "role" - }; - }; - - rpc DeleteRole(DeleteRoleRequest) returns (RoleResponse) { - option (google.api.http) = { - delete : "/auth/v3/role/{id}" - }; - }; -} \ No newline at end of file diff --git a/components/usermgmt/proto/proto/rpc/v3/rolepermission.proto b/components/usermgmt/proto/proto/rpc/v3/rolepermission.proto deleted file mode 100644 index 9c9ca4f..0000000 --- a/components/usermgmt/proto/proto/rpc/v3/rolepermission.proto +++ /dev/null @@ -1,99 +0,0 @@ -syntax = "proto3"; -package rafay.dev.rpc.v3; - -import "google/api/annotations.proto"; -import "gogoproto/gogo.proto"; -import "protoc-gen-openapiv2/options/annotations.proto"; -import "proto/types/userpb/v3/rolepermission.proto"; - -// Enable custom Marshal method. -option (gogoproto.marshaler_all) = true; -// Enable custom Unmarshal method. -option (gogoproto.unmarshaler_all) = true; -// Enable custom Size method (Required by Marshal and Unmarshal). -option (gogoproto.sizer_all) = true; -// Enable registration with golang/protobuf for the grpc-gateway. -option (gogoproto.goproto_registration) = true; -// Enable generation of XXX_MessageName methods for grpc-go/status. -option (gogoproto.messagename_all) = true; - -option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_swagger) = { - info : { - title : "Rolepermission management Service" - version : "2.0" - contact : {name : "Rafay Dev"} - } - schemes : HTTPS - consumes : "application/json" - consumes : "application/yaml" - produces : "application/json" - produces : "application/yaml" - security_definitions : { - security : { - key : "BasicAuth" - value : {type : TYPE_BASIC} - } - security : { - key : "ApiKeyAuth" - value : {type : TYPE_API_KEY in : IN_HEADER name : "X-RAFAY-API-KEYID"} - } - } - security : { - security_requirement : { - key : "BasicAuth" - value : {} - } - security_requirement : { - key : "ApiKeyAuth" - value : {} - } - } - responses : { - key : "403" - value : { - description : "Returned when the rolepermission does not have permission " - "to access " - "the resource." - } - } - responses : { - key : "404" - value : { - description : "Returned when the resource does not exist." - schema : {json_schema : {type : STRING}} - } - } -}; - -message GetRolepermissionsRequest {} -message GetRolepermissionRequest { - string id = 1 - [ (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { - title : "Id", - description : "Id of the rolepermission resource" - } ]; -} -message GetRolepermissionsResponse { - repeated rafay.dev.types.user.v3.RolePermission rolepermissions = 1 - [ (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { - title : "RolePermissions", - description : "List of the rolepermission resources" - } ]; - -} - -service Rolepermission { - rpc GetRolepermissions(GetRolepermissionsRequest) - returns (GetRolepermissionsResponse) { - option (google.api.http) = { - get : "/auth/v3/rolepermissions" - }; - }; - - rpc GetRolepermission(GetRolepermissionRequest) - returns (rafay.dev.types.user.v3.RolePermission) { - option (google.api.http) = { - get : "/auth/v3/rolepermission/{id}" - }; - }; -} \ No newline at end of file diff --git a/components/usermgmt/proto/proto/rpc/v3/user.proto b/components/usermgmt/proto/proto/rpc/v3/user.proto deleted file mode 100644 index f181039..0000000 --- a/components/usermgmt/proto/proto/rpc/v3/user.proto +++ /dev/null @@ -1,121 +0,0 @@ -syntax = "proto3"; -package rafay.dev.rpc.v3; - -import "google/api/annotations.proto"; -import "gogoproto/gogo.proto"; -import "protoc-gen-openapiv2/options/annotations.proto"; -import "proto/types/userpb/v3/user.proto"; - -// Enable custom Marshal method. -option (gogoproto.marshaler_all) = true; -// Enable custom Unmarshal method. -option (gogoproto.unmarshaler_all) = true; -// Enable custom Size method (Required by Marshal and Unmarshal). -option (gogoproto.sizer_all) = true; -// Enable registration with golang/protobuf for the grpc-gateway. -option (gogoproto.goproto_registration) = true; -// Enable generation of XXX_MessageName methods for grpc-go/status. -option (gogoproto.messagename_all) = true; - -option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_swagger) = { - info : { - title : "User management Service" - version : "2.0" - contact : {name : "Rafay Dev"} - } - schemes : HTTPS - consumes : "application/json" - consumes : "application/yaml" - produces : "application/json" - produces : "application/yaml" - security_definitions : { - security : { - key : "BasicAuth" - value : {type : TYPE_BASIC} - } - security : { - key : "ApiKeyAuth" - value : {type : TYPE_API_KEY in : IN_HEADER name : "X-RAFAY-API-KEYID"} - } - } - security : { - security_requirement : { - key : "BasicAuth" - value : {} - } - security_requirement : { - key : "ApiKeyAuth" - value : {} - } - } - responses : { - key : "403" - value : { - description : "Returned when the user does not have permission to access " - "the resource." - } - } - responses : { - key : "404" - value : { - description : "Returned when the resource does not exist." - schema : {json_schema : {type : STRING}} - } - } -}; - -// Add option to filter by more org and group -message GetUsersRequest { string project = 1; } -message GetUserRequest { string userid = 1; } -message DeleteUserRequest { string userid = 1; } -message PutUserRequest { - string userid = 1; - rafay.dev.types.user.v3.User user = 2; -} -message GetUsersResponse { repeated rafay.dev.types.user.v3.User user = 1; } -message UserResponse { - string status = 1; - string message = 2; -} - -service User { - rpc CreateUser(rafay.dev.types.user.v3.User) - returns (rafay.dev.types.user.v3.User) { - option (google.api.http) = { - post : "/auth/v3/users" - body : "*" - }; - - option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation) = { - responses : { - key : "201" - value : {description : "Returned when user is created successfully."} - } - }; - }; - - rpc GetUsers(GetUsersRequest) returns (GetUsersResponse) { - option (google.api.http) = { - get : "/auth/v3/users" - }; - }; - - rpc GetUser(GetUserRequest) returns (rafay.dev.types.user.v3.User) { - option (google.api.http) = { - get : "/auth/v3/user/{userid}" - }; - }; - - rpc UpdateUser(PutUserRequest) returns (UserResponse) { - option (google.api.http) = { - put : "/auth/v3/user/{userid}" - body : "user" - }; - }; - - rpc DeleteUser(DeleteUserRequest) returns (UserResponse) { - option (google.api.http) = { - delete : "/auth/v3/user/{userid}" - }; - }; -} \ No newline at end of file diff --git a/components/usermgmt/proto/proto/types/userpb/v3/group.proto b/components/usermgmt/proto/proto/types/userpb/v3/group.proto deleted file mode 100644 index 041e675..0000000 --- a/components/usermgmt/proto/proto/types/userpb/v3/group.proto +++ /dev/null @@ -1,124 +0,0 @@ -syntax = "proto3"; -package rafay.dev.types.user.v3; - -import "proto/types/commonpb/v3/common.proto"; -import "proto/types/systempb/v3/project.proto"; -import "proto/types/userpb/v3/role.proto"; -import "protoc-gen-openapiv2/options/annotations.proto"; -// import "google/api/field_behavior.proto"; - -message Group { - option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_schema) = { - json_schema : { - title : "Group" - description : "Group" - required : [ "apiVersion", "kind", "metadata", "spec" ] - } - }; - string apiVersion = 1 - [ (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { - title : "API Version", - description : "API Version of the group resource" - default : "usermgmt.k8smgmt.io/v3" - } ]; - string kind = 2 - [ (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { - title : "Kind", - description : "Kind of the group resource" - default : "Pipeline" - } ]; - rafay.dev.types.common.v3.Metadata metadata = 3 - [ (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { - title : "Metadata", - description : "Metadata of the group resource" - } ]; - GroupSpec spec = 4 - [ (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { - title : "Metadata", - description : "Metadata of the group resource" - } ]; - rafay.dev.types.common.v3.Status status = 5 - [ (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { - title : "Status", - description : "Status of the resource" - read_only : true - } ]; -} - -message ProjectRole { - option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_schema) = { - json_schema : { - title : "ProjectRole" - description : "Project and role pairing for permission" - } - }; - rafay.dev.types.system.v3.Project project = 1 - [ (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { - title : "Project" - description : "Project" - } ]; - rafay.dev.types.user.v3.Role role = 2 - [ (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { - title : "Role" - description : "Role" - } ]; -} - -message GroupSpec { - option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_schema) = { - json_schema : { - title : "Group Specification" - description : "Group specification" - } - }; - repeated ProjectRole projectroles = 1 - [ (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { - title : "ProjectRoles" - description : "ProjectRole groups for permission" - } ]; - repeated string users = 2 - [ (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { - title : "Users" - description : "List of users for group" - } ]; - string type = 3 - [ (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { - title : "Type" - description : "Type of group" - } ]; -} - -message GroupList { - option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_schema) = { - json_schema : { - title : "GroupList" - description : "Group list" - read_only : true - } - }; - - string apiVersion = 1 - [ (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { - title : "API Version", - description : "API Version of the group list resource" - read_only : true - } ]; - string kind = 2 - [ (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { - title : "Kind", - description : "Kind of the group list resource" - read_only : true - } ]; - rafay.dev.types.common.v3.ListMetadata metadata = 3 - [ (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { - title : "Metadata", - description : "Metadata of the group list resource" - read_only : true - } ]; - repeated Group items = 4 - [ (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { - title : "Items", - description : "List of the group resources" - read_only : true - } ]; -} diff --git a/components/usermgmt/proto/proto/types/userpb/v3/role.proto b/components/usermgmt/proto/proto/types/userpb/v3/role.proto deleted file mode 100644 index 2e08031..0000000 --- a/components/usermgmt/proto/proto/types/userpb/v3/role.proto +++ /dev/null @@ -1,94 +0,0 @@ -syntax = "proto3"; -package rafay.dev.types.user.v3; - -import "proto/types/commonpb/v3/common.proto"; -import "proto/types/userpb/v3/rolepermission.proto"; -import "protoc-gen-openapiv2/options/annotations.proto"; -// import "google/api/field_behavior.proto"; - -message Role { - option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_schema) = { - json_schema : { - title : "Role" - description : "Role" - required : [ "apiVersion", "kind", "metadata", "spec" ] - } - }; - - string apiVersion = 1 - [ (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { - title : "API Version", - description : "API Version of the Role resource" - default : "usermgmt.k8smgmt.io/v3" - } ]; - string kind = 2 - [ (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { - title : "Kind", - description : "Kind of the role resource" - default : "Role" - } ]; - rafay.dev.types.common.v3.Metadata metadata = 3 - [ (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { - title : "Metadata", - description : "Metadata of the role resource" - } ]; - RoleSpec spec = 4 - [ (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { - title : "Spec", - description : "Spec of the role resource" - } ]; - rafay.dev.types.common.v3.Status status = 5 - [ (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { - title : "Status", - description : "Status of the resource" - read_only : true - } ]; -} - -message RoleSpec { - option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_schema) = { - json_schema : { - title : "Role Specification" - description : "Role specification" - } - }; - repeated rafay.dev.types.user.v3.RolePermission rolepermissions = 1 - [ (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { - title : "RolePermissions" - description : "Permissions for the role" - } ]; -} - -message RoleList { - option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_schema) = { - json_schema : { - title : "RoleList" - description : "Role list" - read_only : true - } - }; - string apiVersion = 1 - [ (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { - title : "API Version", - description : "API Version of the role list resource" - read_only : true - } ]; - string kind = 2 - [ (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { - title : "Kind", - description : "Kind of the role list resource" - read_only : true - } ]; - rafay.dev.types.common.v3.ListMetadata metadata = 3 - [ (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { - title : "Metadata", - description : "Metadata of the role list resource" - read_only : true - } ]; - repeated Role items = 4 - [ (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { - title : "Items", - description : "List of role resources" - read_only : true - } ]; -} diff --git a/components/usermgmt/proto/proto/types/userpb/v3/rolepermission.proto b/components/usermgmt/proto/proto/types/userpb/v3/rolepermission.proto deleted file mode 100644 index a993684..0000000 --- a/components/usermgmt/proto/proto/types/userpb/v3/rolepermission.proto +++ /dev/null @@ -1,93 +0,0 @@ -syntax = "proto3"; -package rafay.dev.types.user.v3; - -import "proto/types/commonpb/v3/common.proto"; -import "protoc-gen-openapiv2/options/annotations.proto"; -// import "google/api/field_behavior.proto"; - -message RolePermission { - option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_schema) = { - json_schema : { - title : "RolePermission" - description : "Role Permission" - required : [ "apiVersion", "kind", "metadata", "spec" ] - } - }; - - string apiVersion = 1 - [ (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { - title : "API Version", - description : "API Version of the role permission resource" - default : "usermgmt.k8smgmt.io/v3" - } ]; - string kind = 2 - [ (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { - title : "Kind", - description : "Kind of the role permission resource" - default : "RolePermission" - } ]; - rafay.dev.types.common.v3.Metadata metadata = 3 - [ (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { - title : "Metadata", - description : "Metadata of the role permission resource" - } ]; - RolePermissionSpec spec = 4 - [ (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { - title : "Metadata", - description : "Metadata of the role permission resource" - } ]; - rafay.dev.types.common.v3.Status status = 5 - [ (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { - title : "Status", - description : "Status of the resource" - read_only : true - } ]; -} - -message RolePermissionSpec { - option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_schema) = { - json_schema : { - title : "RolePermission Specification" - description : "RolePermisson specification" - } - }; - repeated string permissions = 1 - [ (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { - title : "Permissions" - description : "List of permisions for role" - } ]; -} - -message RolePermissionList { - option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_schema) = { - json_schema : { - title : "RolePermissionList" - description : "RolePeList list" - read_only : true - } - }; - string apiVersion = 1 - [ (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { - title : "API Version", - description : "API Version of the role permission list resource" - read_only : true - } ]; - string kind = 2 - [ (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { - title : "Kind", - description : "Kind of the role permission list resource" - read_only : true - } ]; - rafay.dev.types.common.v3.ListMetadata metadata = 3 - [ (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { - title : "Metadata", - description : "Metadata of the role permission list resource" - read_only : true - } ]; - repeated RolePermission items = 4 - [ (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { - title : "Items", - description : "List of the role permission resources" - read_only : true - } ]; -} diff --git a/components/usermgmt/proto/proto/types/userpb/v3/user.proto b/components/usermgmt/proto/proto/types/userpb/v3/user.proto deleted file mode 100644 index b5d354a..0000000 --- a/components/usermgmt/proto/proto/types/userpb/v3/user.proto +++ /dev/null @@ -1,163 +0,0 @@ -syntax = "proto3"; -package rafay.dev.types.user.v3; - -import "proto/types/commonpb/v3/common.proto"; -import "proto/types/userpb/v3/role.proto"; -import "proto/types/userpb/v3/rolepermission.proto"; -import "proto/types/userpb/v3/group.proto"; -import "proto/types/systempb/v3/project.proto"; -import "protoc-gen-openapiv2/options/annotations.proto"; -// import "google/api/field_behavior.proto"; - -message User { - option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_schema) = { - json_schema : { - title : "User" - description : "User" - required : [ "apiVersion", "kind", "metadata", "spec" ] - } - }; - - string apiVersion = 1 - [ (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { - title : "API Version", - description : "API Version of the user resource" - default : "usermgmt.k8smgmt.io/v3" - } ]; - string kind = 2 - [ (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { - title : "Kind", - description : "Kind of the user resource" - default : "User" - } ]; - rafay.dev.types.common.v3.Metadata metadata = 3 - [ (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { - title : "Metadata", - description : "Metadata of the user resource" - } ]; - UserSpec spec = 4 - [ (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { - title : "Spec", - description : "Spec of the user resource" - } ]; - - rafay.dev.types.common.v3.Status status = 5 - [ (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { - title : "Status", - description : "Status of the resource" - read_only : true - } ]; -} - -message UserSpec { - option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_schema) = { - json_schema : { - title : "User Specification" - description : "User specification" - } - }; - string firstName = 1 - [ (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { - title : "FirstName" - description : "First name of the user" - } ]; - string lastName = 2 - [ (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { - title : "LastName" - description : "Last name of the user" - } ]; - string username = 3 - [ (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { - title : "Username" - description : "Username of the user" - } ]; - string phone = 4 - [ (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { - title : "Phone" - description : "Phone number of the user" - } ]; - string password = 5 - [ (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { - title : "Password" - description : "Password of the user" - } ]; - string totpRequired = 6 - [ (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { - title : "TotpRequired" - description : "Flag to specify if TOTP is required" - } ]; - string totpSecret = 7 - [ (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { - title : "TotpSecret" - description : "Secret for TOTP" - } ]; - repeated rafay.dev.types.user.v3.Role roles = 8 - [ (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { - title : "Roles" - description : "Roles of the user" - } ]; - repeated rafay.dev.types.user.v3.Group groups = 9 - [ (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { - title : "Group" - description : "Groups of the user" - } ]; - repeated rafay.dev.types.system.v3.Project projects = 10 - [ (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { - title : "Projects" - description : "Projects of the user" - } ]; - bool emailVerified = 11 - [ (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { - title : "EmailVerified" - description : "Flag to show if the email of the user was verified" - read_only : true - } ]; - bool phoneVerified = 12 - [ (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { - title : "PhoneVerified" - description : "Flag to show if phone number of the user was verified" - read_only : true - } ]; - bool totpVerified = 13 - [ (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { - title : "TotpVerified" - description : "Flag to show if the TOTP of the user was verified" - read_only : true - } ]; -} - -message UserList { - option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_schema) = { - json_schema : { - title : "UserList" - description : "User list" - read_only : true - } - }; - string apiVersion = 1 - [ (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { - title : "API Version", - description : "API Version of the user list resource" - default : "usermgmt.k8smgmt.io/v3" - read_only : true - } ]; - string kind = 2 - [ (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { - title : "Kind", - description : "Kind of the user list resource" - default : "UserList" - read_only : true - } ]; - rafay.dev.types.common.v3.ListMetadata metadata = 3 - [ (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { - title : "Metadata", - description : "Metadata of the user list resource" - read_only : true - } ]; - repeated User items = 4 - [ (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { - title : "Items", - description : "List of the user resources" - read_only : true - } ]; -} diff --git a/components/usermgmt/proto/proto/rpc/v3/group.pb.go b/components/usermgmt/proto/rpc/v3/group.pb.go similarity index 100% rename from components/usermgmt/proto/proto/rpc/v3/group.pb.go rename to components/usermgmt/proto/rpc/v3/group.pb.go diff --git a/components/usermgmt/proto/proto/rpc/v3/group.pb.gw.go b/components/usermgmt/proto/rpc/v3/group.pb.gw.go similarity index 100% rename from components/usermgmt/proto/proto/rpc/v3/group.pb.gw.go rename to components/usermgmt/proto/rpc/v3/group.pb.gw.go diff --git a/components/usermgmt/proto/proto/rpc/v3/group_grpc.pb.go b/components/usermgmt/proto/rpc/v3/group_grpc.pb.go similarity index 100% rename from components/usermgmt/proto/proto/rpc/v3/group_grpc.pb.go rename to components/usermgmt/proto/rpc/v3/group_grpc.pb.go diff --git a/components/usermgmt/proto/proto/rpc/v3/role.pb.go b/components/usermgmt/proto/rpc/v3/role.pb.go similarity index 100% rename from components/usermgmt/proto/proto/rpc/v3/role.pb.go rename to components/usermgmt/proto/rpc/v3/role.pb.go diff --git a/components/usermgmt/proto/proto/rpc/v3/role.pb.gw.go b/components/usermgmt/proto/rpc/v3/role.pb.gw.go similarity index 100% rename from components/usermgmt/proto/proto/rpc/v3/role.pb.gw.go rename to components/usermgmt/proto/rpc/v3/role.pb.gw.go diff --git a/components/usermgmt/proto/proto/rpc/v3/role_grpc.pb.go b/components/usermgmt/proto/rpc/v3/role_grpc.pb.go similarity index 100% rename from components/usermgmt/proto/proto/rpc/v3/role_grpc.pb.go rename to components/usermgmt/proto/rpc/v3/role_grpc.pb.go diff --git a/components/usermgmt/proto/proto/rpc/v3/rolepermission.pb.go b/components/usermgmt/proto/rpc/v3/rolepermission.pb.go similarity index 100% rename from components/usermgmt/proto/proto/rpc/v3/rolepermission.pb.go rename to components/usermgmt/proto/rpc/v3/rolepermission.pb.go diff --git a/components/usermgmt/proto/proto/rpc/v3/rolepermission.pb.gw.go b/components/usermgmt/proto/rpc/v3/rolepermission.pb.gw.go similarity index 100% rename from components/usermgmt/proto/proto/rpc/v3/rolepermission.pb.gw.go rename to components/usermgmt/proto/rpc/v3/rolepermission.pb.gw.go diff --git a/components/usermgmt/proto/proto/rpc/v3/rolepermission_grpc.pb.go b/components/usermgmt/proto/rpc/v3/rolepermission_grpc.pb.go similarity index 100% rename from components/usermgmt/proto/proto/rpc/v3/rolepermission_grpc.pb.go rename to components/usermgmt/proto/rpc/v3/rolepermission_grpc.pb.go diff --git a/components/usermgmt/proto/proto/rpc/v3/user.pb.go b/components/usermgmt/proto/rpc/v3/user.pb.go similarity index 100% rename from components/usermgmt/proto/proto/rpc/v3/user.pb.go rename to components/usermgmt/proto/rpc/v3/user.pb.go diff --git a/components/usermgmt/proto/proto/rpc/v3/user.pb.gw.go b/components/usermgmt/proto/rpc/v3/user.pb.gw.go similarity index 100% rename from components/usermgmt/proto/proto/rpc/v3/user.pb.gw.go rename to components/usermgmt/proto/rpc/v3/user.pb.gw.go diff --git a/components/usermgmt/proto/proto/rpc/v3/user_grpc.pb.go b/components/usermgmt/proto/rpc/v3/user_grpc.pb.go similarity index 100% rename from components/usermgmt/proto/proto/rpc/v3/user_grpc.pb.go rename to components/usermgmt/proto/rpc/v3/user_grpc.pb.go diff --git a/components/usermgmt/proto/proto/types/userpb/v3/group.pb.go b/components/usermgmt/proto/types/userpb/v3/group.pb.go similarity index 99% rename from components/usermgmt/proto/proto/types/userpb/v3/group.pb.go rename to components/usermgmt/proto/types/userpb/v3/group.pb.go index decddce..9f63784 100644 --- a/components/usermgmt/proto/proto/types/userpb/v3/group.pb.go +++ b/components/usermgmt/proto/types/userpb/v3/group.pb.go @@ -7,8 +7,8 @@ package userv3 import ( - v3 "github.com/RafaySystems/rcloud-base/components/usermgmt/proto/types/commonpb/v3" - v31 "github.com/RafaySystems/rcloud-base/components/usermgmt/proto/types/systempb/v3" + v3 "github.com/RafaySystems/rcloud-base/components/common/proto/types/commonpb/v3" + v31 "github.com/RafaySystems/rcloud-base/components/adminsrv/proto/types/systempb/v3" _ "github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-openapiv2/options" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" diff --git a/components/usermgmt/proto/proto/types/userpb/v3/role.pb.go b/components/usermgmt/proto/types/userpb/v3/role.pb.go similarity index 99% rename from components/usermgmt/proto/proto/types/userpb/v3/role.pb.go rename to components/usermgmt/proto/types/userpb/v3/role.pb.go index e3f506a..acf92de 100644 --- a/components/usermgmt/proto/proto/types/userpb/v3/role.pb.go +++ b/components/usermgmt/proto/types/userpb/v3/role.pb.go @@ -7,7 +7,7 @@ package userv3 import ( - v3 "github.com/RafaySystems/rcloud-base/components/usermgmt/proto/types/commonpb/v3" + v3 "github.com/RafaySystems/rcloud-base/components/common/proto/types/commonpb/v3" _ "github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-openapiv2/options" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" diff --git a/components/usermgmt/proto/proto/types/userpb/v3/rolepermission.pb.go b/components/usermgmt/proto/types/userpb/v3/rolepermission.pb.go similarity index 99% rename from components/usermgmt/proto/proto/types/userpb/v3/rolepermission.pb.go rename to components/usermgmt/proto/types/userpb/v3/rolepermission.pb.go index 2af147b..1397522 100644 --- a/components/usermgmt/proto/proto/types/userpb/v3/rolepermission.pb.go +++ b/components/usermgmt/proto/types/userpb/v3/rolepermission.pb.go @@ -7,7 +7,7 @@ package userv3 import ( - v3 "github.com/RafaySystems/rcloud-base/components/usermgmt/proto/types/commonpb/v3" + v3 "github.com/RafaySystems/rcloud-base/components/common/proto/types/commonpb/v3" _ "github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-openapiv2/options" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" diff --git a/components/usermgmt/proto/proto/types/userpb/v3/user.pb.go b/components/usermgmt/proto/types/userpb/v3/user.pb.go similarity index 99% rename from components/usermgmt/proto/proto/types/userpb/v3/user.pb.go rename to components/usermgmt/proto/types/userpb/v3/user.pb.go index 8d96686..7d67db2 100644 --- a/components/usermgmt/proto/proto/types/userpb/v3/user.pb.go +++ b/components/usermgmt/proto/types/userpb/v3/user.pb.go @@ -7,8 +7,8 @@ package userv3 import ( - v3 "github.com/RafaySystems/rcloud-base/components/usermgmt/proto/types/commonpb/v3" - v31 "github.com/RafaySystems/rcloud-base/components/usermgmt/proto/types/systempb/v3" + v3 "github.com/RafaySystems/rcloud-base/components/common/proto/types/commonpb/v3" + v31 "github.com/RafaySystems/rcloud-base/components/adminsrv/proto/types/systempb/v3" _ "github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-openapiv2/options" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" From 1f7774edf941ff91668883cddfa320a073006a52 Mon Sep 17 00:00:00 2001 From: Abin Simon Date: Mon, 3 Jan 2022 10:52:25 +0530 Subject: [PATCH 05/28] Basic server setup complete for usermgmt --- components/usermgmt/go.mod | 1 - components/usermgmt/go.sum | 2 + components/usermgmt/main.go | 77 ++++++++++++++++++++++++- components/usermgmt/pkg/service/user.go | 30 ++++++++++ 4 files changed, 107 insertions(+), 3 deletions(-) create mode 100644 components/usermgmt/pkg/service/user.go diff --git a/components/usermgmt/go.mod b/components/usermgmt/go.mod index 977b8b1..b9a18ef 100644 --- a/components/usermgmt/go.mod +++ b/components/usermgmt/go.mod @@ -6,7 +6,6 @@ require ( github.com/RafaySystems/rcloud-base/components/adminsrv v0.0.0-unpublished github.com/RafaySystems/rcloud-base/components/common v0.0.0-unpublished github.com/gogo/protobuf v1.3.2 - github.com/grpc-ecosystem/grpc-gateway v1.16.0 github.com/grpc-ecosystem/grpc-gateway/v2 v2.7.2 github.com/spf13/viper v1.10.1 google.golang.org/genproto v0.0.0-20211208223120-3a66f561d7aa diff --git a/components/usermgmt/go.sum b/components/usermgmt/go.sum index 5ec7f80..3633fd4 100644 --- a/components/usermgmt/go.sum +++ b/components/usermgmt/go.sum @@ -336,6 +336,7 @@ github.com/jstemmer/go-junit-report v0.0.0-20190106144839-af01ea7f8024/go.mod h1 github.com/jstemmer/go-junit-report v0.9.1/go.mod h1:Brl9GWCQeLvo8nXZwPNNblvFj/XSXhF0NWZEnDohbsk= github.com/jtolds/gls v4.20.0+incompatible/go.mod h1:QJZ7F/aHp+rZTRtaJ1ow/lLfFfVYBRgL+9YlvaHOwJU= github.com/julienschmidt/httprouter v1.2.0/go.mod h1:SYymIcj16QtmaHHD7aYtjjsJG7VTCxuUUipMqKk8s4w= +github.com/julienschmidt/httprouter v1.3.0 h1:U0609e9tgbseu3rBINet9P48AI/D3oJs4dN7jwJOQ1U= github.com/julienschmidt/httprouter v1.3.0/go.mod h1:JR6WtHb+2LUe8TCKY3cZOxFyyO8IZAc4RVcycCCAKdM= github.com/kisielk/errcheck v1.1.0/go.mod h1:EZBBE59ingxPouuu3KfxchcWSUPOHkagtvWXihfKN4Q= github.com/kisielk/errcheck v1.2.0/go.mod h1:/BMXB+zMLi60iA8Vv6Ksmxu/1UDYcXs4uQLJ+jE2L00= @@ -484,6 +485,7 @@ github.com/smartystreets/goconvey v1.6.4/go.mod h1:syvi0/a8iFYH4r/RixwvyeAJjdLS9 github.com/soheilhy/cmux v0.1.4/go.mod h1:IM3LyeVVIOuxMH7sFAkER9+bJ4dT7Ms6E4xg4kGIyLM= github.com/soheilhy/cmux v0.1.5/go.mod h1:T7TcVDs9LWfQgPlPsdngu6I6QIoyIFZDDC6sNE1GqG0= github.com/spaolacci/murmur3 v0.0.0-20180118202830-f09979ecbc72/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA= +github.com/speps/go-hashids v2.0.0+incompatible h1:kSfxGfESueJKTx0mpER9Y/1XHl+FVQjtCqRyYcviFbw= github.com/speps/go-hashids v2.0.0+incompatible/go.mod h1:P7hqPzMdnZOfyIk+xrlG1QaSMw+gCBdHKsBDnhpaZvc= github.com/spf13/afero v1.1.2/go.mod h1:j4pytiNVoe2o6bmDsKpLACNPDBIoEAkihy7loJ1B0CQ= github.com/spf13/afero v1.2.2/go.mod h1:9ZxEEn6pIJ8Rxe320qSDBk6AsU0r9pR7Q4OcevTdifk= diff --git a/components/usermgmt/main.go b/components/usermgmt/main.go index 72e1fb1..da9179c 100644 --- a/components/usermgmt/main.go +++ b/components/usermgmt/main.go @@ -3,18 +3,25 @@ package main import ( "context" "fmt" + "net" "net/http" "sync" + "time" "github.com/grpc-ecosystem/grpc-gateway/v2/runtime" "github.com/spf13/viper" "sigs.k8s.io/controller-runtime/pkg/manager/signals" + "github.com/RafaySystems/rcloud-base/components/common/pkg/auth/interceptors" authv3 "github.com/RafaySystems/rcloud-base/components/common/pkg/auth/v3" "github.com/RafaySystems/rcloud-base/components/common/pkg/gateway" logv2 "github.com/RafaySystems/rcloud-base/components/common/pkg/log/v2" configrpc "github.com/RafaySystems/rcloud-base/components/common/proto/rpc/config" + "github.com/RafaySystems/rcloud-base/components/usermgmt/pkg/service" pbrpcv3 "github.com/RafaySystems/rcloud-base/components/usermgmt/proto/rpc/v3" + rpcv3 "github.com/RafaySystems/rcloud-base/components/usermgmt/proto/rpc/v3" + "google.golang.org/grpc" + _grpc "google.golang.org/grpc" ) const ( @@ -78,8 +85,8 @@ func run() { wg.Add(1) go runAPI(&wg, ctx) - // go runRPC(&wg, ctx) - // go runDebug(&wg, ctx) + go runRPC(&wg, ctx) + go runDebug(&wg, ctx) <-ctx.Done() wg.Wait() @@ -120,6 +127,72 @@ func runAPI(wg *sync.WaitGroup, ctx context.Context) { } } +func runRPC(wg *sync.WaitGroup, ctx context.Context) { + defer wg.Done() + // defer configPool.Close() + + // userServer := rpcv3.NewUserServer(service.NewUserServer()) + + l, err := net.Listen("tcp", fmt.Sprintf(":%d", rpcPort)) + if err != nil { + _log.Fatalw("unable to start rpc listener", "error", err) + } + + var opts []_grpc.ServerOption + if !dev { + opts = append(opts, _grpc.UnaryInterceptor( + interceptors.NewAuthInterceptorWithOptions( + interceptors.WithLogRequest(), + interceptors.WithAuthPool(authPool), + interceptors.WithExclude("POST", "/v2/sentry/bootstrap/:templateToken/register"), + ), + )) + defer authPool.Close() + } else { + opts = append(opts, _grpc.UnaryInterceptor( + interceptors.NewAuthInterceptorWithOptions(interceptors.WithDummy())), + ) + } + s := grpc.NewServer(opts...) + if err != nil { + _log.Fatalw("unable to create grpc server", "error", err) + } + + go func() { + defer s.GracefulStop() + + <-ctx.Done() + _log.Infow("context done") + }() + + rpcv3.RegisterUserServer(s, service.NewUserServer()) + + _log.Infow("starting rpc server", "port", rpcPort) + err = s.Serve(l) + if err != nil { + _log.Fatalw("unable to start rpc server", "error", err) + } +} + +func runDebug(wg *sync.WaitGroup, ctx context.Context) { + defer wg.Done() + s := http.Server{ + Addr: fmt.Sprintf(":%d", debugPort), + } + _log.Infow("starting debug server", "port", debugPort) + go func() { + err := s.ListenAndServe() + if err != nil { + _log.Fatalw("unable to start debug server", "error", err) + } + }() + + <-ctx.Done() + ctx, cancel := context.WithTimeout(ctx, time.Second*10) + defer cancel() + s.Shutdown(ctx) +} + func main() { setup() run() diff --git a/components/usermgmt/pkg/service/user.go b/components/usermgmt/pkg/service/user.go new file mode 100644 index 0000000..b009b48 --- /dev/null +++ b/components/usermgmt/pkg/service/user.go @@ -0,0 +1,30 @@ +package service + +import ( + "context" + "fmt" + + userv3 "github.com/RafaySystems/rcloud-base/components/usermgmt/proto/types/userpb/v3" + userrpcv3 "github.com/RafaySystems/rcloud-base/components/usermgmt/proto/rpc/v3" +) + +type server struct{} + +func (s *server) CreateUser(context.Context, *userv3.User) (*userv3.User, error) { + fmt.Println("Called create user") + return nil, nil +} +func (s *server) GetUsers(context.Context, *userrpcv3.GetUsersRequest) (*userrpcv3.GetUsersResponse, error) { + return nil, nil +} +func (s *server) GetUser(context.Context, *userrpcv3.GetUserRequest) (*userv3.User, error) { return nil, nil } +func (s *server) UpdateUser(context.Context, *userrpcv3.PutUserRequest) (*userrpcv3.UserResponse, error) { + return nil, nil +} +func (s *server) DeleteUser(context.Context, *userrpcv3.DeleteUserRequest) (*userrpcv3.UserResponse, error) { + return nil, nil +} + +func NewUserServer() userrpcv3.UserServer { + return &server{} +} From 428672f3135922a452afd56689c37d853da2f432 Mon Sep 17 00:00:00 2001 From: Abin Simon Date: Tue, 4 Jan 2022 15:33:08 +0530 Subject: [PATCH 06/28] Simple user CRUD operations --- .../openapi/proto/rpc/v3/user.swagger.json | 339 +++----------- components/usermgmt/go.mod | 1 + components/usermgmt/go.sum | 5 + components/usermgmt/main.go | 41 +- components/usermgmt/master.rest | 20 + components/usermgmt/pkg/service/user.go | 94 +++- components/usermgmt/proto/rpc/v3/user.pb.go | 416 ++++++------------ .../usermgmt/proto/rpc/v3/user.pb.gw.go | 30 +- components/usermgmt/proto/rpc/v3/user.proto | 14 +- .../usermgmt/proto/rpc/v3/user_grpc.pb.go | 38 +- .../usermgmt/proto/types/userpb/v3/user.pb.go | 272 +++++------- .../usermgmt/proto/types/userpb/v3/user.proto | 49 ++- 12 files changed, 488 insertions(+), 831 deletions(-) create mode 100644 components/usermgmt/master.rest diff --git a/components/usermgmt/gen/openapi/proto/rpc/v3/user.swagger.json b/components/usermgmt/gen/openapi/proto/rpc/v3/user.swagger.json index eca0fd7..8662c16 100644 --- a/components/usermgmt/gen/openapi/proto/rpc/v3/user.swagger.json +++ b/components/usermgmt/gen/openapi/proto/rpc/v3/user.swagger.json @@ -158,7 +158,7 @@ "200": { "description": "A successful response.", "schema": { - "$ref": "#/definitions/v3GetUsersResponse" + "$ref": "#/definitions/v3UserList" } }, "403": { @@ -179,14 +179,6 @@ } } }, - "parameters": [ - { - "name": "project", - "in": "query", - "required": false, - "type": "string" - } - ], "tags": [ "User" ] @@ -316,85 +308,23 @@ "default": "StatusNotSet", "title": "$title: ConditionStatus\n$description: status of a condition for a resource" }, - "v3GetUsersResponse": { + "v3ListMetadata": { "type": "object", "properties": { - "user": { - "type": "array", - "items": { - "$ref": "#/definitions/v3User" - } - } - } - }, - "v3Group": { - "type": "object", - "properties": { - "apiVersion": { + "count": { "type": "string", - "default": "usermgmt.k8smgmt.io/v3", - "description": "API Version of the group resource", - "title": "API Version" + "format": "int64" }, - "kind": { + "offset": { "type": "string", - "default": "Pipeline", - "description": "Kind of the group resource", - "title": "Kind" + "format": "int64" }, - "metadata": { - "$ref": "#/definitions/v3Metadata", - "description": "Metadata of the group resource", - "title": "Metadata" - }, - "spec": { - "$ref": "#/definitions/v3GroupSpec", - "description": "Metadata of the group resource", - "title": "Metadata" - }, - "status": { - "$ref": "#/definitions/commonv3Status", - "description": "Status of the resource", - "title": "Status", - "readOnly": true + "limt": { + "type": "string", + "format": "int64" } }, - "description": "Group", - "title": "Group", - "required": [ - "apiVersion", - "kind", - "metadata", - "spec" - ] - }, - "v3GroupSpec": { - "type": "object", - "properties": { - "projectroles": { - "type": "array", - "items": { - "$ref": "#/definitions/v3ProjectRole" - }, - "description": "ProjectRole groups for permission", - "title": "ProjectRoles" - }, - "users": { - "type": "array", - "items": { - "type": "string" - }, - "description": "List of users for group", - "title": "Users" - }, - "type": { - "type": "string", - "description": "Type of group", - "title": "Type" - } - }, - "description": "Group specification", - "title": "Group Specification" + "title": "$title: ListMetadata\n$description: metadata for a list of resources\n$required: enabled" }, "v3Metadata": { "type": "object", @@ -456,188 +386,6 @@ "project" ] }, - "v3Project": { - "type": "object", - "properties": { - "apiVersion": { - "type": "string", - "default": "system.k8smgmt.io/v3", - "description": "API Version of the project resource", - "title": "API Version" - }, - "kind": { - "type": "string", - "default": "Pipeline", - "description": "Kind of the project resource", - "title": "Kind" - }, - "metadata": { - "$ref": "#/definitions/v3Metadata", - "description": "Metadata of the project resource", - "title": "Metadata" - }, - "spec": { - "$ref": "#/definitions/v3ProjectSpec", - "description": "Metadata of the project resource", - "title": "Metadata" - }, - "status": { - "$ref": "#/definitions/commonv3Status", - "description": "Status of the resource", - "title": "Status", - "readOnly": true - } - }, - "description": "Project", - "title": "Project", - "required": [ - "apiVersion", - "kind", - "metadata", - "spec" - ] - }, - "v3ProjectRole": { - "type": "object", - "properties": { - "project": { - "$ref": "#/definitions/v3Project", - "description": "Project", - "title": "Project" - }, - "role": { - "$ref": "#/definitions/v3Role", - "description": "Role", - "title": "Role" - } - }, - "description": "Project and role pairing for permission", - "title": "ProjectRole" - }, - "v3ProjectSpec": { - "type": "object", - "properties": { - "default": { - "type": "boolean", - "description": "flag to indicate if this is the default project in the organization", - "title": "Default" - } - }, - "description": "project specification", - "title": "Project Specification" - }, - "v3Role": { - "type": "object", - "properties": { - "apiVersion": { - "type": "string", - "default": "usermgmt.k8smgmt.io/v3", - "description": "API Version of the Role resource", - "title": "API Version" - }, - "kind": { - "type": "string", - "default": "Role", - "description": "Kind of the role resource", - "title": "Kind" - }, - "metadata": { - "$ref": "#/definitions/v3Metadata", - "description": "Metadata of the role resource", - "title": "Metadata" - }, - "spec": { - "$ref": "#/definitions/v3RoleSpec", - "description": "Spec of the role resource", - "title": "Spec" - }, - "status": { - "$ref": "#/definitions/commonv3Status", - "description": "Status of the resource", - "title": "Status", - "readOnly": true - } - }, - "description": "Role", - "title": "Role", - "required": [ - "apiVersion", - "kind", - "metadata", - "spec" - ] - }, - "v3RolePermission": { - "type": "object", - "properties": { - "apiVersion": { - "type": "string", - "default": "usermgmt.k8smgmt.io/v3", - "description": "API Version of the role permission resource", - "title": "API Version" - }, - "kind": { - "type": "string", - "default": "RolePermission", - "description": "Kind of the role permission resource", - "title": "Kind" - }, - "metadata": { - "$ref": "#/definitions/v3Metadata", - "description": "Metadata of the role permission resource", - "title": "Metadata" - }, - "spec": { - "$ref": "#/definitions/v3RolePermissionSpec", - "description": "Metadata of the role permission resource", - "title": "Metadata" - }, - "status": { - "$ref": "#/definitions/commonv3Status", - "description": "Status of the resource", - "title": "Status", - "readOnly": true - } - }, - "description": "Role Permission", - "title": "RolePermission", - "required": [ - "apiVersion", - "kind", - "metadata", - "spec" - ] - }, - "v3RolePermissionSpec": { - "type": "object", - "properties": { - "permissions": { - "type": "array", - "items": { - "type": "string" - }, - "description": "List of permisions for role", - "title": "Permissions" - } - }, - "description": "RolePermisson specification", - "title": "RolePermission Specification" - }, - "v3RoleSpec": { - "type": "object", - "properties": { - "rolepermissions": { - "type": "array", - "items": { - "$ref": "#/definitions/v3RolePermission" - }, - "description": "Permissions for the role", - "title": "RolePermissions" - } - }, - "description": "Role specification", - "title": "Role Specification" - }, "v3User": { "type": "object", "properties": { @@ -679,6 +427,43 @@ "spec" ] }, + "v3UserList": { + "type": "object", + "properties": { + "apiVersion": { + "type": "string", + "default": "usermgmt.k8smgmt.io/v3", + "description": "API Version of the user list resource", + "title": "API Version", + "readOnly": true + }, + "kind": { + "type": "string", + "default": "UserList", + "description": "Kind of the user list resource", + "title": "Kind", + "readOnly": true + }, + "metadata": { + "$ref": "#/definitions/v3ListMetadata", + "description": "Metadata of the user list resource", + "title": "Metadata", + "readOnly": true + }, + "items": { + "type": "array", + "items": { + "$ref": "#/definitions/v3User" + }, + "description": "List of the user resources", + "title": "Items", + "readOnly": true + } + }, + "description": "User list", + "title": "UserList", + "readOnly": true + }, "v3UserResponse": { "type": "object", "properties": { @@ -718,40 +503,14 @@ "description": "Password of the user", "title": "Password" }, - "totpRequired": { - "type": "string", - "description": "Flag to specify if TOTP is required", - "title": "TotpRequired" - }, - "totpSecret": { - "type": "string", - "description": "Secret for TOTP", - "title": "TotpSecret" - }, - "roles": { - "type": "array", - "items": { - "$ref": "#/definitions/v3Role" - }, - "description": "Roles of the user", - "title": "Roles" - }, "groups": { "type": "array", "items": { - "$ref": "#/definitions/v3Group" + "type": "string" }, - "description": "Groups of the user", + "description": "Groups the user belongs to", "title": "Group" }, - "projects": { - "type": "array", - "items": { - "$ref": "#/definitions/v3Project" - }, - "description": "Projects of the user", - "title": "Projects" - }, "emailVerified": { "type": "boolean", "description": "Flag to show if the email of the user was verified", diff --git a/components/usermgmt/go.mod b/components/usermgmt/go.mod index b9a18ef..c8606df 100644 --- a/components/usermgmt/go.mod +++ b/components/usermgmt/go.mod @@ -7,6 +7,7 @@ require ( github.com/RafaySystems/rcloud-base/components/common v0.0.0-unpublished github.com/gogo/protobuf v1.3.2 github.com/grpc-ecosystem/grpc-gateway/v2 v2.7.2 + github.com/ory/kratos-client-go v0.8.2-alpha.1 github.com/spf13/viper v1.10.1 google.golang.org/genproto v0.0.0-20211208223120-3a66f561d7aa google.golang.org/grpc v1.43.0 diff --git a/components/usermgmt/go.sum b/components/usermgmt/go.sum index 3633fd4..af5edd1 100644 --- a/components/usermgmt/go.sum +++ b/components/usermgmt/go.sum @@ -420,6 +420,8 @@ github.com/onsi/gomega v1.10.1/go.mod h1:iN09h71vgCQne3DLsj+A5owkum+a2tYe+TOCB1y github.com/onsi/gomega v1.17.0 h1:9Luw4uT5HTjHTN8+aNcSThgH1vdXnmdJ8xIfZ4wyTRE= github.com/onsi/gomega v1.17.0/go.mod h1:HnhC7FXeEQY45zxNK3PPoIUhzk/80Xly9PcubAlGdZY= github.com/opentracing/opentracing-go v1.1.0/go.mod h1:UkNAQd3GIcIGf0SeVgPpRdFStlNbqXla1AfSYxPUl2o= +github.com/ory/kratos-client-go v0.8.2-alpha.1 h1:YlKhGOSZjounlB9iY4xSWlqHbyLYkeLzlLk8ZL7/nEM= +github.com/ory/kratos-client-go v0.8.2-alpha.1/go.mod h1:dOQIsar76K07wMPJD/6aMhrWyY+sFGEagLDLso1CpsA= github.com/pascaldekloe/goe v0.0.0-20180627143212-57f6aae5913c/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144TG7ZOy1lc= github.com/pascaldekloe/goe v0.1.0/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144TG7ZOy1lc= github.com/pelletier/go-toml v1.2.0/go.mod h1:5z9KED0ma1S8pY6P1sdut58dfprrGBbd/94hg7ilaic= @@ -697,12 +699,14 @@ golang.org/x/oauth2 v0.0.0-20201208152858-08078c50e5b5/go.mod h1:KelEdhl1UZF7XfJ golang.org/x/oauth2 v0.0.0-20210218202405-ba52d332ba99/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= golang.org/x/oauth2 v0.0.0-20210220000619-9bb904979d93/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= golang.org/x/oauth2 v0.0.0-20210313182246-cd4f82c27b84/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= +golang.org/x/oauth2 v0.0.0-20210323180902-22b0adad7558/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= golang.org/x/oauth2 v0.0.0-20210402161424-2e8d93401602/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= golang.org/x/oauth2 v0.0.0-20210514164344-f6687ab2804c/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= golang.org/x/oauth2 v0.0.0-20210628180205-a41e5a781914/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= golang.org/x/oauth2 v0.0.0-20210805134026-6f1e6394065a/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= golang.org/x/oauth2 v0.0.0-20210819190943-2bc19b11175f/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= golang.org/x/oauth2 v0.0.0-20211005180243-6b3c2da341f1/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= +golang.org/x/oauth2 v0.0.0-20211104180415-d3ed0bb246c8 h1:RerP+noqYHUQ8CMRcPlC2nvTa4dcBIjegkuWdcUDuqg= golang.org/x/oauth2 v0.0.0-20211104180415-d3ed0bb246c8/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= @@ -925,6 +929,7 @@ google.golang.org/appengine v1.5.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7 google.golang.org/appengine v1.6.1/go.mod h1:i06prIuMbXzDqacNJfV5OdTW448YApPu5ww/cMBSeb0= google.golang.org/appengine v1.6.5/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= google.golang.org/appengine v1.6.6/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= +google.golang.org/appengine v1.6.7 h1:FZR1q0exgwxzPzp/aF+VccGrSfxfPpkBqjIIEq3ru6c= google.golang.org/appengine v1.6.7/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= google.golang.org/genproto v0.0.0-20190307195333-5fe7a883aa19/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= diff --git a/components/usermgmt/main.go b/components/usermgmt/main.go index da9179c..2ce70e4 100644 --- a/components/usermgmt/main.go +++ b/components/usermgmt/main.go @@ -9,6 +9,7 @@ import ( "time" "github.com/grpc-ecosystem/grpc-gateway/v2/runtime" + kclient "github.com/ory/kratos-client-go" "github.com/spf13/viper" "sigs.k8s.io/controller-runtime/pkg/manager/signals" @@ -25,12 +26,13 @@ import ( ) const ( - rpcPortEnv = "RPC_PORT" - apiPortEnv = "API_PORT" - debugPortEnv = "DEBUG_PORT" - kratosAddrEnv = "KRATOS_ADDR" - devEnv = "DEV" - configAddrENV = "CONFIG_ADDR" + rpcPortEnv = "RPC_PORT" + apiPortEnv = "API_PORT" + debugPortEnv = "DEBUG_PORT" + kratosSchemeEnv = "KRATOS_SCHEME" + kratosAddrEnv = "KRATOS_ADDR" + devEnv = "DEV" + configAddrENV = "CONFIG_ADDR" ) var ( @@ -38,26 +40,29 @@ var ( apiPort int debugPort int rpcRelayPeeringPort int + kratosScheme string kratosAddr string + kc *kclient.APIClient dev bool - // ps service.PartnerService - _log = logv2.GetLogger() - authPool authv3.AuthPool - configPool configrpc.ConfigPool - configAddr string + _log = logv2.GetLogger() + authPool authv3.AuthPool + configPool configrpc.ConfigPool + configAddr string ) func setup() { viper.SetDefault(rpcPortEnv, 10000) viper.SetDefault(apiPortEnv, 11000) viper.SetDefault(debugPortEnv, 12000) - viper.SetDefault(kratosAddr, "localhost:5443") + viper.SetDefault(kratosSchemeEnv, "http") + viper.SetDefault(kratosAddrEnv, "localhost:4433") viper.SetDefault(devEnv, true) viper.SetDefault(configAddrENV, "localhost:7000") viper.BindEnv(rpcPortEnv) viper.BindEnv(apiPortEnv) viper.BindEnv(debugPortEnv) + viper.BindEnv(kratosSchemeEnv) viper.BindEnv(kratosAddrEnv) viper.BindEnv(devEnv) viper.BindEnv(configAddrENV) @@ -65,15 +70,17 @@ func setup() { rpcPort = viper.GetInt(rpcPortEnv) apiPort = viper.GetInt(apiPortEnv) debugPort = viper.GetInt(debugPortEnv) + kratosScheme = viper.GetString(kratosSchemeEnv) kratosAddr = viper.GetString(kratosAddrEnv) dev = viper.GetBool(devEnv) configAddr = viper.GetString(configAddrENV) rpcRelayPeeringPort = rpcPort + 1 + kratosConfig := kclient.NewConfiguration() + kratosConfig.Servers[0].URL = kratosScheme + "://" + kratosAddr + kc = kclient.NewAPIClient(kratosConfig) - _log.Infow("usrmgmt setup") - - // ps = service.NewPartnerService(db) + _log.Infow("usrmgmt setup complete") } func run() { @@ -131,8 +138,6 @@ func runRPC(wg *sync.WaitGroup, ctx context.Context) { defer wg.Done() // defer configPool.Close() - // userServer := rpcv3.NewUserServer(service.NewUserServer()) - l, err := net.Listen("tcp", fmt.Sprintf(":%d", rpcPort)) if err != nil { _log.Fatalw("unable to start rpc listener", "error", err) @@ -165,7 +170,7 @@ func runRPC(wg *sync.WaitGroup, ctx context.Context) { _log.Infow("context done") }() - rpcv3.RegisterUserServer(s, service.NewUserServer()) + rpcv3.RegisterUserServer(s, service.NewUserServer(kc)) _log.Infow("starting rpc server", "port", rpcPort) err = s.Serve(l) diff --git a/components/usermgmt/master.rest b/components/usermgmt/master.rest new file mode 100644 index 0000000..175a90c --- /dev/null +++ b/components/usermgmt/master.rest @@ -0,0 +1,20 @@ +:host = http://localhost:11000 +:userid = 4c92ca6d-8ff4-4930-bbeb-c19d22ffe71d + +# Create user +POST :host/auth/v3/users +{"spec": {"username": "newguy@notaprovider.com", "firstName": "John", "lastName": "Doe"}} +-> jq-set-var :userid .metadata.id + +# Get all users +GET :host/auth/v3/users + +# Get single user +GET :host/auth/v3/user/:userid + +# Update user info +PUT :host/auth/v3/user/:userid +{"spec": {"username": "changedemail@notaprovider.com", "firstName": "John", "lastName": "Doe"}} + +# Delete single user +DELETE :host/auth/v3/user/:userid \ No newline at end of file diff --git a/components/usermgmt/pkg/service/user.go b/components/usermgmt/pkg/service/user.go index b009b48..1991355 100644 --- a/components/usermgmt/pkg/service/user.go +++ b/components/usermgmt/pkg/service/user.go @@ -4,27 +4,85 @@ import ( "context" "fmt" - userv3 "github.com/RafaySystems/rcloud-base/components/usermgmt/proto/types/userpb/v3" + kclient "github.com/ory/kratos-client-go" + + v3 "github.com/RafaySystems/rcloud-base/components/common/proto/types/commonpb/v3" userrpcv3 "github.com/RafaySystems/rcloud-base/components/usermgmt/proto/rpc/v3" + userv3 "github.com/RafaySystems/rcloud-base/components/usermgmt/proto/types/userpb/v3" ) -type server struct{} - -func (s *server) CreateUser(context.Context, *userv3.User) (*userv3.User, error) { - fmt.Println("Called create user") - return nil, nil -} -func (s *server) GetUsers(context.Context, *userrpcv3.GetUsersRequest) (*userrpcv3.GetUsersResponse, error) { - return nil, nil -} -func (s *server) GetUser(context.Context, *userrpcv3.GetUserRequest) (*userv3.User, error) { return nil, nil } -func (s *server) UpdateUser(context.Context, *userrpcv3.PutUserRequest) (*userrpcv3.UserResponse, error) { - return nil, nil -} -func (s *server) DeleteUser(context.Context, *userrpcv3.DeleteUserRequest) (*userrpcv3.UserResponse, error) { - return nil, nil +type server struct { + kc *kclient.APIClient } -func NewUserServer() userrpcv3.UserServer { - return &server{} +func identityToUser(id *kclient.Identity) *userv3.User { + traits := id.Traits.(map[string]interface{}) + return &userv3.User{ + ApiVersion: "usermgmt.k8smgmt.io/v3", + Kind: "User", + Metadata: &v3.Metadata{ + Id: id.Id, + }, + Spec: &userv3.UserSpec{ + Username: traits["email"].(string), + FirstName: traits["first_name"].(string), + LastName: traits["last_name"].(string), + }, + } +} + +func (s *server) CreateUser(ctx context.Context, user *userv3.User) (*userv3.User, error) { + // TODO: restrict endpoint to admin + cib := kclient.NewAdminCreateIdentityBody("default", map[string]interface{}{"email": user.Spec.Username, "first_name": user.Spec.FirstName, "last_name": user.Spec.LastName}) + ir, hr, err := s.kc.V0alpha2Api.AdminCreateIdentity(ctx).AdminCreateIdentityBody(*cib).Execute() + if err != nil { + fmt.Println(hr) + // TODO: forward exact error message from kratos (eg: json schema validation) + return nil, err + } + rlb := kclient.NewAdminCreateSelfServiceRecoveryLinkBody(ir.Id) + rl, _, err := s.kc.V0alpha2Api.AdminCreateSelfServiceRecoveryLink(ctx).AdminCreateSelfServiceRecoveryLinkBody(*rlb).Execute() + fmt.Println("Recovery link:", rl.RecoveryLink) // TODO: email the recovery link to the user + return identityToUser(ir), nil +} +func (s *server) GetUsers(ctx context.Context, _ *userrpcv3.Empty) (*userv3.UserList, error) { + ir, _, err := s.kc.V0alpha2Api.AdminListIdentities(ctx).Execute() + if err != nil { + return nil, err + } + res := &userv3.UserList{} + for _, u := range ir { + res.Items = append(res.Items, identityToUser(&u)) + } + return res, nil +} +func (s *server) GetUser(ctx context.Context, req *userrpcv3.UserRequest) (*userv3.User, error) { + // TODO: should it be get by id or by email? Kratos can only fileter by id + ir, _, err := s.kc.V0alpha2Api.AdminGetIdentity(ctx, req.Userid).Execute() + if err != nil { + return nil, err + } + return identityToUser(ir), nil +} +func (s *server) UpdateUser(ctx context.Context, req *userrpcv3.PutUserRequest) (*userrpcv3.UserResponse, error) { + uib := kclient.NewAdminUpdateIdentityBody("active", map[string]interface{}{"email": req.User.Spec.Username, "first_name": req.User.Spec.FirstName, "last_name": req.User.Spec.LastName}) + _, hr, err := s.kc.V0alpha2Api.AdminUpdateIdentity(ctx, req.Userid).AdminUpdateIdentityBody(*uib).Execute() + if err != nil { + fmt.Println(hr) + // TODO: forward exact error message from kratos (eg: json schema validation) + return nil, err + } + return &userrpcv3.UserResponse{Status: "OK"}, nil +} +func (s *server) DeleteUser(ctx context.Context, req *userrpcv3.UserRequest) (*userrpcv3.UserResponse, error) { + // TODO: should it be get by id or by email? Kratos can only fileter by id + _, err := s.kc.V0alpha2Api.AdminDeleteIdentity(ctx, req.Userid).Execute() + if err != nil { + return nil, err + } + return &userrpcv3.UserResponse{Status: "OK"}, nil +} + +func NewUserServer(kc *kclient.APIClient) userrpcv3.UserServer { + return &server{kc: kc} } diff --git a/components/usermgmt/proto/rpc/v3/user.pb.go b/components/usermgmt/proto/rpc/v3/user.pb.go index 3ebf946..501a31d 100644 --- a/components/usermgmt/proto/rpc/v3/user.pb.go +++ b/components/usermgmt/proto/rpc/v3/user.pb.go @@ -24,17 +24,15 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) -// Add option to filter by more org and group -type GetUsersRequest struct { +// TODO: Add option to filter users list +type Empty struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - - Project string `protobuf:"bytes,1,opt,name=project,proto3" json:"project,omitempty"` } -func (x *GetUsersRequest) Reset() { - *x = GetUsersRequest{} +func (x *Empty) Reset() { + *x = Empty{} if protoimpl.UnsafeEnabled { mi := &file_proto_rpc_v3_user_proto_msgTypes[0] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -42,13 +40,13 @@ func (x *GetUsersRequest) Reset() { } } -func (x *GetUsersRequest) String() string { +func (x *Empty) String() string { return protoimpl.X.MessageStringOf(x) } -func (*GetUsersRequest) ProtoMessage() {} +func (*Empty) ProtoMessage() {} -func (x *GetUsersRequest) ProtoReflect() protoreflect.Message { +func (x *Empty) ProtoReflect() protoreflect.Message { mi := &file_proto_rpc_v3_user_proto_msgTypes[0] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -60,19 +58,12 @@ func (x *GetUsersRequest) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use GetUsersRequest.ProtoReflect.Descriptor instead. -func (*GetUsersRequest) Descriptor() ([]byte, []int) { +// Deprecated: Use Empty.ProtoReflect.Descriptor instead. +func (*Empty) Descriptor() ([]byte, []int) { return file_proto_rpc_v3_user_proto_rawDescGZIP(), []int{0} } -func (x *GetUsersRequest) GetProject() string { - if x != nil { - return x.Project - } - return "" -} - -type GetUserRequest struct { +type UserRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields @@ -80,8 +71,8 @@ type GetUserRequest struct { Userid string `protobuf:"bytes,1,opt,name=userid,proto3" json:"userid,omitempty"` } -func (x *GetUserRequest) Reset() { - *x = GetUserRequest{} +func (x *UserRequest) Reset() { + *x = UserRequest{} if protoimpl.UnsafeEnabled { mi := &file_proto_rpc_v3_user_proto_msgTypes[1] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -89,13 +80,13 @@ func (x *GetUserRequest) Reset() { } } -func (x *GetUserRequest) String() string { +func (x *UserRequest) String() string { return protoimpl.X.MessageStringOf(x) } -func (*GetUserRequest) ProtoMessage() {} +func (*UserRequest) ProtoMessage() {} -func (x *GetUserRequest) ProtoReflect() protoreflect.Message { +func (x *UserRequest) ProtoReflect() protoreflect.Message { mi := &file_proto_rpc_v3_user_proto_msgTypes[1] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -107,59 +98,12 @@ func (x *GetUserRequest) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use GetUserRequest.ProtoReflect.Descriptor instead. -func (*GetUserRequest) Descriptor() ([]byte, []int) { +// Deprecated: Use UserRequest.ProtoReflect.Descriptor instead. +func (*UserRequest) Descriptor() ([]byte, []int) { return file_proto_rpc_v3_user_proto_rawDescGZIP(), []int{1} } -func (x *GetUserRequest) GetUserid() string { - if x != nil { - return x.Userid - } - return "" -} - -type DeleteUserRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Userid string `protobuf:"bytes,1,opt,name=userid,proto3" json:"userid,omitempty"` -} - -func (x *DeleteUserRequest) Reset() { - *x = DeleteUserRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_proto_rpc_v3_user_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *DeleteUserRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*DeleteUserRequest) ProtoMessage() {} - -func (x *DeleteUserRequest) ProtoReflect() protoreflect.Message { - mi := &file_proto_rpc_v3_user_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use DeleteUserRequest.ProtoReflect.Descriptor instead. -func (*DeleteUserRequest) Descriptor() ([]byte, []int) { - return file_proto_rpc_v3_user_proto_rawDescGZIP(), []int{2} -} - -func (x *DeleteUserRequest) GetUserid() string { +func (x *UserRequest) GetUserid() string { if x != nil { return x.Userid } @@ -178,7 +122,7 @@ type PutUserRequest struct { func (x *PutUserRequest) Reset() { *x = PutUserRequest{} if protoimpl.UnsafeEnabled { - mi := &file_proto_rpc_v3_user_proto_msgTypes[3] + mi := &file_proto_rpc_v3_user_proto_msgTypes[2] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -191,7 +135,7 @@ func (x *PutUserRequest) String() string { func (*PutUserRequest) ProtoMessage() {} func (x *PutUserRequest) ProtoReflect() protoreflect.Message { - mi := &file_proto_rpc_v3_user_proto_msgTypes[3] + mi := &file_proto_rpc_v3_user_proto_msgTypes[2] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -204,7 +148,7 @@ func (x *PutUserRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use PutUserRequest.ProtoReflect.Descriptor instead. func (*PutUserRequest) Descriptor() ([]byte, []int) { - return file_proto_rpc_v3_user_proto_rawDescGZIP(), []int{3} + return file_proto_rpc_v3_user_proto_rawDescGZIP(), []int{2} } func (x *PutUserRequest) GetUserid() string { @@ -221,53 +165,6 @@ func (x *PutUserRequest) GetUser() *v3.User { return nil } -type GetUsersResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - User []*v3.User `protobuf:"bytes,1,rep,name=user,proto3" json:"user,omitempty"` -} - -func (x *GetUsersResponse) Reset() { - *x = GetUsersResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_proto_rpc_v3_user_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *GetUsersResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GetUsersResponse) ProtoMessage() {} - -func (x *GetUsersResponse) ProtoReflect() protoreflect.Message { - mi := &file_proto_rpc_v3_user_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use GetUsersResponse.ProtoReflect.Descriptor instead. -func (*GetUsersResponse) Descriptor() ([]byte, []int) { - return file_proto_rpc_v3_user_proto_rawDescGZIP(), []int{4} -} - -func (x *GetUsersResponse) GetUser() []*v3.User { - if x != nil { - return x.User - } - return nil -} - type UserResponse struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -280,7 +177,7 @@ type UserResponse struct { func (x *UserResponse) Reset() { *x = UserResponse{} if protoimpl.UnsafeEnabled { - mi := &file_proto_rpc_v3_user_proto_msgTypes[5] + mi := &file_proto_rpc_v3_user_proto_msgTypes[3] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -293,7 +190,7 @@ func (x *UserResponse) String() string { func (*UserResponse) ProtoMessage() {} func (x *UserResponse) ProtoReflect() protoreflect.Message { - mi := &file_proto_rpc_v3_user_proto_msgTypes[5] + mi := &file_proto_rpc_v3_user_proto_msgTypes[3] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -306,7 +203,7 @@ func (x *UserResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use UserResponse.ProtoReflect.Descriptor instead. func (*UserResponse) Descriptor() ([]byte, []int) { - return file_proto_rpc_v3_user_proto_rawDescGZIP(), []int{5} + return file_proto_rpc_v3_user_proto_rawDescGZIP(), []int{3} } func (x *UserResponse) GetStatus() string { @@ -337,105 +234,94 @@ var file_proto_rpc_v3_user_proto_rawDesc = []byte{ 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x20, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2f, 0x75, 0x73, 0x65, 0x72, 0x70, 0x62, 0x2f, 0x76, 0x33, 0x2f, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x22, 0x2b, 0x0a, 0x0f, 0x47, 0x65, 0x74, 0x55, 0x73, 0x65, 0x72, 0x73, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x12, 0x18, 0x0a, 0x07, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x22, 0x28, - 0x0a, 0x0e, 0x47, 0x65, 0x74, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x12, 0x16, 0x0a, 0x06, 0x75, 0x73, 0x65, 0x72, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x06, 0x75, 0x73, 0x65, 0x72, 0x69, 0x64, 0x22, 0x2b, 0x0a, 0x11, 0x44, 0x65, 0x6c, 0x65, - 0x74, 0x65, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x16, 0x0a, - 0x06, 0x75, 0x73, 0x65, 0x72, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x75, - 0x73, 0x65, 0x72, 0x69, 0x64, 0x22, 0x5b, 0x0a, 0x0e, 0x50, 0x75, 0x74, 0x55, 0x73, 0x65, 0x72, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x75, 0x73, 0x65, 0x72, 0x69, - 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x75, 0x73, 0x65, 0x72, 0x69, 0x64, 0x12, - 0x31, 0x0a, 0x04, 0x75, 0x73, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1d, 0x2e, - 0x72, 0x61, 0x66, 0x61, 0x79, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, - 0x75, 0x73, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x52, 0x04, 0x75, 0x73, - 0x65, 0x72, 0x22, 0x45, 0x0a, 0x10, 0x47, 0x65, 0x74, 0x55, 0x73, 0x65, 0x72, 0x73, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x31, 0x0a, 0x04, 0x75, 0x73, 0x65, 0x72, 0x18, 0x01, - 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x72, 0x61, 0x66, 0x61, 0x79, 0x2e, 0x64, 0x65, 0x76, + 0x6f, 0x22, 0x07, 0x0a, 0x05, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x25, 0x0a, 0x0b, 0x55, 0x73, + 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x75, 0x73, 0x65, + 0x72, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x75, 0x73, 0x65, 0x72, 0x69, + 0x64, 0x22, 0x5b, 0x0a, 0x0e, 0x50, 0x75, 0x74, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x75, 0x73, 0x65, 0x72, 0x69, 0x64, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x06, 0x75, 0x73, 0x65, 0x72, 0x69, 0x64, 0x12, 0x31, 0x0a, 0x04, 0x75, + 0x73, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x72, 0x61, 0x66, 0x61, + 0x79, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x75, 0x73, 0x65, 0x72, + 0x2e, 0x76, 0x33, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x52, 0x04, 0x75, 0x73, 0x65, 0x72, 0x22, 0x40, + 0x0a, 0x0c, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x16, + 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, + 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x18, 0x0a, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, + 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, + 0x32, 0xd3, 0x04, 0x0a, 0x04, 0x55, 0x73, 0x65, 0x72, 0x12, 0x9e, 0x01, 0x0a, 0x0a, 0x43, 0x72, + 0x65, 0x61, 0x74, 0x65, 0x55, 0x73, 0x65, 0x72, 0x12, 0x1d, 0x2e, 0x72, 0x61, 0x66, 0x61, 0x79, + 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, + 0x76, 0x33, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x1a, 0x1d, 0x2e, 0x72, 0x61, 0x66, 0x61, 0x79, 0x2e, + 0x64, 0x65, 0x76, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x76, + 0x33, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x22, 0x52, 0x92, 0x41, 0x36, 0x4a, 0x34, 0x0a, 0x03, 0x32, + 0x30, 0x31, 0x12, 0x2d, 0x0a, 0x2b, 0x52, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x65, 0x64, 0x20, 0x77, + 0x68, 0x65, 0x6e, 0x20, 0x75, 0x73, 0x65, 0x72, 0x20, 0x69, 0x73, 0x20, 0x63, 0x72, 0x65, 0x61, + 0x74, 0x65, 0x64, 0x20, 0x73, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x66, 0x75, 0x6c, 0x6c, 0x79, + 0x2e, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x13, 0x22, 0x0e, 0x2f, 0x61, 0x75, 0x74, 0x68, 0x2f, 0x76, + 0x33, 0x2f, 0x75, 0x73, 0x65, 0x72, 0x73, 0x3a, 0x01, 0x2a, 0x12, 0x5e, 0x0a, 0x08, 0x47, 0x65, + 0x74, 0x55, 0x73, 0x65, 0x72, 0x73, 0x12, 0x17, 0x2e, 0x72, 0x61, 0x66, 0x61, 0x79, 0x2e, 0x64, + 0x65, 0x76, 0x2e, 0x72, 0x70, 0x63, 0x2e, 0x76, 0x33, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x1a, + 0x21, 0x2e, 0x72, 0x61, 0x66, 0x61, 0x79, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x74, 0x79, 0x70, 0x65, + 0x73, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x4c, 0x69, + 0x73, 0x74, 0x22, 0x16, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x10, 0x12, 0x0e, 0x2f, 0x61, 0x75, 0x74, + 0x68, 0x2f, 0x76, 0x33, 0x2f, 0x75, 0x73, 0x65, 0x72, 0x73, 0x12, 0x67, 0x0a, 0x07, 0x47, 0x65, + 0x74, 0x55, 0x73, 0x65, 0x72, 0x12, 0x1d, 0x2e, 0x72, 0x61, 0x66, 0x61, 0x79, 0x2e, 0x64, 0x65, + 0x76, 0x2e, 0x72, 0x70, 0x63, 0x2e, 0x76, 0x33, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1d, 0x2e, 0x72, 0x61, 0x66, 0x61, 0x79, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x2e, 0x55, - 0x73, 0x65, 0x72, 0x52, 0x04, 0x75, 0x73, 0x65, 0x72, 0x22, 0x40, 0x0a, 0x0c, 0x55, 0x73, 0x65, - 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x74, 0x61, - 0x74, 0x75, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, - 0x73, 0x12, 0x18, 0x0a, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x02, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x32, 0xe7, 0x04, 0x0a, 0x04, - 0x55, 0x73, 0x65, 0x72, 0x12, 0x9e, 0x01, 0x0a, 0x0a, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x55, - 0x73, 0x65, 0x72, 0x12, 0x1d, 0x2e, 0x72, 0x61, 0x66, 0x61, 0x79, 0x2e, 0x64, 0x65, 0x76, 0x2e, - 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x2e, 0x55, 0x73, - 0x65, 0x72, 0x1a, 0x1d, 0x2e, 0x72, 0x61, 0x66, 0x61, 0x79, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x74, - 0x79, 0x70, 0x65, 0x73, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x2e, 0x55, 0x73, 0x65, - 0x72, 0x22, 0x52, 0x92, 0x41, 0x36, 0x4a, 0x34, 0x0a, 0x03, 0x32, 0x30, 0x31, 0x12, 0x2d, 0x0a, - 0x2b, 0x52, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x65, 0x64, 0x20, 0x77, 0x68, 0x65, 0x6e, 0x20, 0x75, - 0x73, 0x65, 0x72, 0x20, 0x69, 0x73, 0x20, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x20, 0x73, - 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x66, 0x75, 0x6c, 0x6c, 0x79, 0x2e, 0x82, 0xd3, 0xe4, 0x93, - 0x02, 0x13, 0x22, 0x0e, 0x2f, 0x61, 0x75, 0x74, 0x68, 0x2f, 0x76, 0x33, 0x2f, 0x75, 0x73, 0x65, - 0x72, 0x73, 0x3a, 0x01, 0x2a, 0x12, 0x69, 0x0a, 0x08, 0x47, 0x65, 0x74, 0x55, 0x73, 0x65, 0x72, - 0x73, 0x12, 0x21, 0x2e, 0x72, 0x61, 0x66, 0x61, 0x79, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x72, 0x70, - 0x63, 0x2e, 0x76, 0x33, 0x2e, 0x47, 0x65, 0x74, 0x55, 0x73, 0x65, 0x72, 0x73, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x1a, 0x22, 0x2e, 0x72, 0x61, 0x66, 0x61, 0x79, 0x2e, 0x64, 0x65, 0x76, - 0x2e, 0x72, 0x70, 0x63, 0x2e, 0x76, 0x33, 0x2e, 0x47, 0x65, 0x74, 0x55, 0x73, 0x65, 0x72, 0x73, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x16, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x10, - 0x12, 0x0e, 0x2f, 0x61, 0x75, 0x74, 0x68, 0x2f, 0x76, 0x33, 0x2f, 0x75, 0x73, 0x65, 0x72, 0x73, - 0x12, 0x6a, 0x0a, 0x07, 0x47, 0x65, 0x74, 0x55, 0x73, 0x65, 0x72, 0x12, 0x20, 0x2e, 0x72, 0x61, - 0x66, 0x61, 0x79, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x72, 0x70, 0x63, 0x2e, 0x76, 0x33, 0x2e, 0x47, - 0x65, 0x74, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1d, 0x2e, - 0x72, 0x61, 0x66, 0x61, 0x79, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, - 0x75, 0x73, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x22, 0x1e, 0x82, 0xd3, - 0xe4, 0x93, 0x02, 0x18, 0x12, 0x16, 0x2f, 0x61, 0x75, 0x74, 0x68, 0x2f, 0x76, 0x33, 0x2f, 0x75, - 0x73, 0x65, 0x72, 0x2f, 0x7b, 0x75, 0x73, 0x65, 0x72, 0x69, 0x64, 0x7d, 0x12, 0x74, 0x0a, 0x0a, - 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x55, 0x73, 0x65, 0x72, 0x12, 0x20, 0x2e, 0x72, 0x61, 0x66, - 0x61, 0x79, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x72, 0x70, 0x63, 0x2e, 0x76, 0x33, 0x2e, 0x50, 0x75, - 0x74, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1e, 0x2e, 0x72, - 0x61, 0x66, 0x61, 0x79, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x72, 0x70, 0x63, 0x2e, 0x76, 0x33, 0x2e, - 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x24, 0x82, 0xd3, - 0xe4, 0x93, 0x02, 0x1e, 0x1a, 0x16, 0x2f, 0x61, 0x75, 0x74, 0x68, 0x2f, 0x76, 0x33, 0x2f, 0x75, - 0x73, 0x65, 0x72, 0x2f, 0x7b, 0x75, 0x73, 0x65, 0x72, 0x69, 0x64, 0x7d, 0x3a, 0x04, 0x75, 0x73, - 0x65, 0x72, 0x12, 0x71, 0x0a, 0x0a, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x55, 0x73, 0x65, 0x72, - 0x12, 0x23, 0x2e, 0x72, 0x61, 0x66, 0x61, 0x79, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x72, 0x70, 0x63, - 0x2e, 0x76, 0x33, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1e, 0x2e, 0x72, 0x61, 0x66, 0x61, 0x79, 0x2e, 0x64, 0x65, - 0x76, 0x2e, 0x72, 0x70, 0x63, 0x2e, 0x76, 0x33, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x1e, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x18, 0x2a, 0x16, 0x2f, - 0x61, 0x75, 0x74, 0x68, 0x2f, 0x76, 0x33, 0x2f, 0x75, 0x73, 0x65, 0x72, 0x2f, 0x7b, 0x75, 0x73, - 0x65, 0x72, 0x69, 0x64, 0x7d, 0x42, 0xca, 0x04, 0x0a, 0x14, 0x63, 0x6f, 0x6d, 0x2e, 0x72, 0x61, - 0x66, 0x61, 0x79, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x72, 0x70, 0x63, 0x2e, 0x76, 0x33, 0x42, 0x09, - 0x55, 0x73, 0x65, 0x72, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x4a, 0x67, 0x69, 0x74, - 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x52, 0x61, 0x66, 0x61, 0x79, 0x53, 0x79, 0x73, - 0x74, 0x65, 0x6d, 0x73, 0x2f, 0x72, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2d, 0x62, 0x61, 0x73, 0x65, - 0x2f, 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x73, 0x2f, 0x75, 0x73, 0x65, 0x72, - 0x6d, 0x67, 0x6d, 0x74, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x72, 0x70, 0x63, 0x2f, 0x76, - 0x33, 0x3b, 0x72, 0x70, 0x63, 0x76, 0x33, 0xa2, 0x02, 0x03, 0x52, 0x44, 0x52, 0xaa, 0x02, 0x10, - 0x52, 0x61, 0x66, 0x61, 0x79, 0x2e, 0x44, 0x65, 0x76, 0x2e, 0x52, 0x70, 0x63, 0x2e, 0x56, 0x33, - 0xca, 0x02, 0x10, 0x52, 0x61, 0x66, 0x61, 0x79, 0x5c, 0x44, 0x65, 0x76, 0x5c, 0x52, 0x70, 0x63, - 0x5c, 0x56, 0x33, 0xe2, 0x02, 0x1c, 0x52, 0x61, 0x66, 0x61, 0x79, 0x5c, 0x44, 0x65, 0x76, 0x5c, - 0x52, 0x70, 0x63, 0x5c, 0x56, 0x33, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, - 0x74, 0x61, 0xea, 0x02, 0x13, 0x52, 0x61, 0x66, 0x61, 0x79, 0x3a, 0x3a, 0x44, 0x65, 0x76, 0x3a, - 0x3a, 0x52, 0x70, 0x63, 0x3a, 0x3a, 0x56, 0x33, 0x92, 0x41, 0xe2, 0x02, 0x12, 0x2b, 0x0a, 0x17, - 0x55, 0x73, 0x65, 0x72, 0x20, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x20, - 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x22, 0x0b, 0x0a, 0x09, 0x52, 0x61, 0x66, 0x61, 0x79, - 0x20, 0x44, 0x65, 0x76, 0x32, 0x03, 0x32, 0x2e, 0x30, 0x2a, 0x01, 0x02, 0x32, 0x10, 0x61, 0x70, - 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x6a, 0x73, 0x6f, 0x6e, 0x32, 0x10, - 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x79, 0x61, 0x6d, 0x6c, - 0x3a, 0x10, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x6a, 0x73, - 0x6f, 0x6e, 0x3a, 0x10, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, - 0x79, 0x61, 0x6d, 0x6c, 0x52, 0x50, 0x0a, 0x03, 0x34, 0x30, 0x33, 0x12, 0x49, 0x0a, 0x47, 0x52, - 0x65, 0x74, 0x75, 0x72, 0x6e, 0x65, 0x64, 0x20, 0x77, 0x68, 0x65, 0x6e, 0x20, 0x74, 0x68, 0x65, - 0x20, 0x75, 0x73, 0x65, 0x72, 0x20, 0x64, 0x6f, 0x65, 0x73, 0x20, 0x6e, 0x6f, 0x74, 0x20, 0x68, - 0x61, 0x76, 0x65, 0x20, 0x70, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x20, 0x74, - 0x6f, 0x20, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x20, 0x74, 0x68, 0x65, 0x20, 0x72, 0x65, 0x73, - 0x6f, 0x75, 0x72, 0x63, 0x65, 0x2e, 0x52, 0x3b, 0x0a, 0x03, 0x34, 0x30, 0x34, 0x12, 0x34, 0x0a, - 0x2a, 0x52, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x65, 0x64, 0x20, 0x77, 0x68, 0x65, 0x6e, 0x20, 0x74, - 0x68, 0x65, 0x20, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x20, 0x64, 0x6f, 0x65, 0x73, - 0x20, 0x6e, 0x6f, 0x74, 0x20, 0x65, 0x78, 0x69, 0x73, 0x74, 0x2e, 0x12, 0x06, 0x0a, 0x04, 0x9a, - 0x02, 0x01, 0x07, 0x5a, 0x38, 0x0a, 0x25, 0x0a, 0x0a, 0x41, 0x70, 0x69, 0x4b, 0x65, 0x79, 0x41, - 0x75, 0x74, 0x68, 0x12, 0x17, 0x08, 0x02, 0x1a, 0x11, 0x58, 0x2d, 0x52, 0x41, 0x46, 0x41, 0x59, - 0x2d, 0x41, 0x50, 0x49, 0x2d, 0x4b, 0x45, 0x59, 0x49, 0x44, 0x20, 0x02, 0x0a, 0x0f, 0x0a, 0x09, - 0x42, 0x61, 0x73, 0x69, 0x63, 0x41, 0x75, 0x74, 0x68, 0x12, 0x02, 0x08, 0x01, 0x62, 0x1f, 0x0a, - 0x0e, 0x0a, 0x0a, 0x41, 0x70, 0x69, 0x4b, 0x65, 0x79, 0x41, 0x75, 0x74, 0x68, 0x12, 0x00, 0x0a, - 0x0d, 0x0a, 0x09, 0x42, 0x61, 0x73, 0x69, 0x63, 0x41, 0x75, 0x74, 0x68, 0x12, 0x00, 0xc8, 0xe2, - 0x1e, 0x01, 0xd0, 0xe2, 0x1e, 0x01, 0xe0, 0xe2, 0x1e, 0x01, 0xc0, 0xe3, 0x1e, 0x01, 0xc8, 0xe3, - 0x1e, 0x01, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x73, 0x65, 0x72, 0x22, 0x1e, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x18, 0x12, 0x16, 0x2f, 0x61, 0x75, + 0x74, 0x68, 0x2f, 0x76, 0x33, 0x2f, 0x75, 0x73, 0x65, 0x72, 0x2f, 0x7b, 0x75, 0x73, 0x65, 0x72, + 0x69, 0x64, 0x7d, 0x12, 0x74, 0x0a, 0x0a, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x55, 0x73, 0x65, + 0x72, 0x12, 0x20, 0x2e, 0x72, 0x61, 0x66, 0x61, 0x79, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x72, 0x70, + 0x63, 0x2e, 0x76, 0x33, 0x2e, 0x50, 0x75, 0x74, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x1a, 0x1e, 0x2e, 0x72, 0x61, 0x66, 0x61, 0x79, 0x2e, 0x64, 0x65, 0x76, 0x2e, + 0x72, 0x70, 0x63, 0x2e, 0x76, 0x33, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x22, 0x24, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1e, 0x1a, 0x16, 0x2f, 0x61, 0x75, + 0x74, 0x68, 0x2f, 0x76, 0x33, 0x2f, 0x75, 0x73, 0x65, 0x72, 0x2f, 0x7b, 0x75, 0x73, 0x65, 0x72, + 0x69, 0x64, 0x7d, 0x3a, 0x04, 0x75, 0x73, 0x65, 0x72, 0x12, 0x6b, 0x0a, 0x0a, 0x44, 0x65, 0x6c, + 0x65, 0x74, 0x65, 0x55, 0x73, 0x65, 0x72, 0x12, 0x1d, 0x2e, 0x72, 0x61, 0x66, 0x61, 0x79, 0x2e, + 0x64, 0x65, 0x76, 0x2e, 0x72, 0x70, 0x63, 0x2e, 0x76, 0x33, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1e, 0x2e, 0x72, 0x61, 0x66, 0x61, 0x79, 0x2e, 0x64, + 0x65, 0x76, 0x2e, 0x72, 0x70, 0x63, 0x2e, 0x76, 0x33, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x1e, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x18, 0x2a, 0x16, + 0x2f, 0x61, 0x75, 0x74, 0x68, 0x2f, 0x76, 0x33, 0x2f, 0x75, 0x73, 0x65, 0x72, 0x2f, 0x7b, 0x75, + 0x73, 0x65, 0x72, 0x69, 0x64, 0x7d, 0x42, 0xca, 0x04, 0x0a, 0x14, 0x63, 0x6f, 0x6d, 0x2e, 0x72, + 0x61, 0x66, 0x61, 0x79, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x72, 0x70, 0x63, 0x2e, 0x76, 0x33, 0x42, + 0x09, 0x55, 0x73, 0x65, 0x72, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x4a, 0x67, 0x69, + 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x52, 0x61, 0x66, 0x61, 0x79, 0x53, 0x79, + 0x73, 0x74, 0x65, 0x6d, 0x73, 0x2f, 0x72, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2d, 0x62, 0x61, 0x73, + 0x65, 0x2f, 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x73, 0x2f, 0x75, 0x73, 0x65, + 0x72, 0x6d, 0x67, 0x6d, 0x74, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x72, 0x70, 0x63, 0x2f, + 0x76, 0x33, 0x3b, 0x72, 0x70, 0x63, 0x76, 0x33, 0xa2, 0x02, 0x03, 0x52, 0x44, 0x52, 0xaa, 0x02, + 0x10, 0x52, 0x61, 0x66, 0x61, 0x79, 0x2e, 0x44, 0x65, 0x76, 0x2e, 0x52, 0x70, 0x63, 0x2e, 0x56, + 0x33, 0xca, 0x02, 0x10, 0x52, 0x61, 0x66, 0x61, 0x79, 0x5c, 0x44, 0x65, 0x76, 0x5c, 0x52, 0x70, + 0x63, 0x5c, 0x56, 0x33, 0xe2, 0x02, 0x1c, 0x52, 0x61, 0x66, 0x61, 0x79, 0x5c, 0x44, 0x65, 0x76, + 0x5c, 0x52, 0x70, 0x63, 0x5c, 0x56, 0x33, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, + 0x61, 0x74, 0x61, 0xea, 0x02, 0x13, 0x52, 0x61, 0x66, 0x61, 0x79, 0x3a, 0x3a, 0x44, 0x65, 0x76, + 0x3a, 0x3a, 0x52, 0x70, 0x63, 0x3a, 0x3a, 0x56, 0x33, 0x92, 0x41, 0xe2, 0x02, 0x12, 0x2b, 0x0a, + 0x17, 0x55, 0x73, 0x65, 0x72, 0x20, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, + 0x20, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x22, 0x0b, 0x0a, 0x09, 0x52, 0x61, 0x66, 0x61, + 0x79, 0x20, 0x44, 0x65, 0x76, 0x32, 0x03, 0x32, 0x2e, 0x30, 0x2a, 0x01, 0x02, 0x32, 0x10, 0x61, + 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x6a, 0x73, 0x6f, 0x6e, 0x32, + 0x10, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x79, 0x61, 0x6d, + 0x6c, 0x3a, 0x10, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x6a, + 0x73, 0x6f, 0x6e, 0x3a, 0x10, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x2f, 0x79, 0x61, 0x6d, 0x6c, 0x52, 0x50, 0x0a, 0x03, 0x34, 0x30, 0x33, 0x12, 0x49, 0x0a, 0x47, + 0x52, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x65, 0x64, 0x20, 0x77, 0x68, 0x65, 0x6e, 0x20, 0x74, 0x68, + 0x65, 0x20, 0x75, 0x73, 0x65, 0x72, 0x20, 0x64, 0x6f, 0x65, 0x73, 0x20, 0x6e, 0x6f, 0x74, 0x20, + 0x68, 0x61, 0x76, 0x65, 0x20, 0x70, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x20, + 0x74, 0x6f, 0x20, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x20, 0x74, 0x68, 0x65, 0x20, 0x72, 0x65, + 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x2e, 0x52, 0x3b, 0x0a, 0x03, 0x34, 0x30, 0x34, 0x12, 0x34, + 0x0a, 0x2a, 0x52, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x65, 0x64, 0x20, 0x77, 0x68, 0x65, 0x6e, 0x20, + 0x74, 0x68, 0x65, 0x20, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x20, 0x64, 0x6f, 0x65, + 0x73, 0x20, 0x6e, 0x6f, 0x74, 0x20, 0x65, 0x78, 0x69, 0x73, 0x74, 0x2e, 0x12, 0x06, 0x0a, 0x04, + 0x9a, 0x02, 0x01, 0x07, 0x5a, 0x38, 0x0a, 0x25, 0x0a, 0x0a, 0x41, 0x70, 0x69, 0x4b, 0x65, 0x79, + 0x41, 0x75, 0x74, 0x68, 0x12, 0x17, 0x08, 0x02, 0x1a, 0x11, 0x58, 0x2d, 0x52, 0x41, 0x46, 0x41, + 0x59, 0x2d, 0x41, 0x50, 0x49, 0x2d, 0x4b, 0x45, 0x59, 0x49, 0x44, 0x20, 0x02, 0x0a, 0x0f, 0x0a, + 0x09, 0x42, 0x61, 0x73, 0x69, 0x63, 0x41, 0x75, 0x74, 0x68, 0x12, 0x02, 0x08, 0x01, 0x62, 0x1f, + 0x0a, 0x0e, 0x0a, 0x0a, 0x41, 0x70, 0x69, 0x4b, 0x65, 0x79, 0x41, 0x75, 0x74, 0x68, 0x12, 0x00, + 0x0a, 0x0d, 0x0a, 0x09, 0x42, 0x61, 0x73, 0x69, 0x63, 0x41, 0x75, 0x74, 0x68, 0x12, 0x00, 0xc8, + 0xe2, 0x1e, 0x01, 0xd0, 0xe2, 0x1e, 0x01, 0xe0, 0xe2, 0x1e, 0x01, 0xc0, 0xe3, 0x1e, 0x01, 0xc8, + 0xe3, 0x1e, 0x01, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -450,34 +336,32 @@ func file_proto_rpc_v3_user_proto_rawDescGZIP() []byte { return file_proto_rpc_v3_user_proto_rawDescData } -var file_proto_rpc_v3_user_proto_msgTypes = make([]protoimpl.MessageInfo, 6) +var file_proto_rpc_v3_user_proto_msgTypes = make([]protoimpl.MessageInfo, 4) var file_proto_rpc_v3_user_proto_goTypes = []interface{}{ - (*GetUsersRequest)(nil), // 0: rafay.dev.rpc.v3.GetUsersRequest - (*GetUserRequest)(nil), // 1: rafay.dev.rpc.v3.GetUserRequest - (*DeleteUserRequest)(nil), // 2: rafay.dev.rpc.v3.DeleteUserRequest - (*PutUserRequest)(nil), // 3: rafay.dev.rpc.v3.PutUserRequest - (*GetUsersResponse)(nil), // 4: rafay.dev.rpc.v3.GetUsersResponse - (*UserResponse)(nil), // 5: rafay.dev.rpc.v3.UserResponse - (*v3.User)(nil), // 6: rafay.dev.types.user.v3.User + (*Empty)(nil), // 0: rafay.dev.rpc.v3.Empty + (*UserRequest)(nil), // 1: rafay.dev.rpc.v3.UserRequest + (*PutUserRequest)(nil), // 2: rafay.dev.rpc.v3.PutUserRequest + (*UserResponse)(nil), // 3: rafay.dev.rpc.v3.UserResponse + (*v3.User)(nil), // 4: rafay.dev.types.user.v3.User + (*v3.UserList)(nil), // 5: rafay.dev.types.user.v3.UserList } var file_proto_rpc_v3_user_proto_depIdxs = []int32{ - 6, // 0: rafay.dev.rpc.v3.PutUserRequest.user:type_name -> rafay.dev.types.user.v3.User - 6, // 1: rafay.dev.rpc.v3.GetUsersResponse.user:type_name -> rafay.dev.types.user.v3.User - 6, // 2: rafay.dev.rpc.v3.User.CreateUser:input_type -> rafay.dev.types.user.v3.User - 0, // 3: rafay.dev.rpc.v3.User.GetUsers:input_type -> rafay.dev.rpc.v3.GetUsersRequest - 1, // 4: rafay.dev.rpc.v3.User.GetUser:input_type -> rafay.dev.rpc.v3.GetUserRequest - 3, // 5: rafay.dev.rpc.v3.User.UpdateUser:input_type -> rafay.dev.rpc.v3.PutUserRequest - 2, // 6: rafay.dev.rpc.v3.User.DeleteUser:input_type -> rafay.dev.rpc.v3.DeleteUserRequest - 6, // 7: rafay.dev.rpc.v3.User.CreateUser:output_type -> rafay.dev.types.user.v3.User - 4, // 8: rafay.dev.rpc.v3.User.GetUsers:output_type -> rafay.dev.rpc.v3.GetUsersResponse - 6, // 9: rafay.dev.rpc.v3.User.GetUser:output_type -> rafay.dev.types.user.v3.User - 5, // 10: rafay.dev.rpc.v3.User.UpdateUser:output_type -> rafay.dev.rpc.v3.UserResponse - 5, // 11: rafay.dev.rpc.v3.User.DeleteUser:output_type -> rafay.dev.rpc.v3.UserResponse - 7, // [7:12] is the sub-list for method output_type - 2, // [2:7] is the sub-list for method input_type - 2, // [2:2] is the sub-list for extension type_name - 2, // [2:2] is the sub-list for extension extendee - 0, // [0:2] is the sub-list for field type_name + 4, // 0: rafay.dev.rpc.v3.PutUserRequest.user:type_name -> rafay.dev.types.user.v3.User + 4, // 1: rafay.dev.rpc.v3.User.CreateUser:input_type -> rafay.dev.types.user.v3.User + 0, // 2: rafay.dev.rpc.v3.User.GetUsers:input_type -> rafay.dev.rpc.v3.Empty + 1, // 3: rafay.dev.rpc.v3.User.GetUser:input_type -> rafay.dev.rpc.v3.UserRequest + 2, // 4: rafay.dev.rpc.v3.User.UpdateUser:input_type -> rafay.dev.rpc.v3.PutUserRequest + 1, // 5: rafay.dev.rpc.v3.User.DeleteUser:input_type -> rafay.dev.rpc.v3.UserRequest + 4, // 6: rafay.dev.rpc.v3.User.CreateUser:output_type -> rafay.dev.types.user.v3.User + 5, // 7: rafay.dev.rpc.v3.User.GetUsers:output_type -> rafay.dev.types.user.v3.UserList + 4, // 8: rafay.dev.rpc.v3.User.GetUser:output_type -> rafay.dev.types.user.v3.User + 3, // 9: rafay.dev.rpc.v3.User.UpdateUser:output_type -> rafay.dev.rpc.v3.UserResponse + 3, // 10: rafay.dev.rpc.v3.User.DeleteUser:output_type -> rafay.dev.rpc.v3.UserResponse + 6, // [6:11] is the sub-list for method output_type + 1, // [1:6] is the sub-list for method input_type + 1, // [1:1] is the sub-list for extension type_name + 1, // [1:1] is the sub-list for extension extendee + 0, // [0:1] is the sub-list for field type_name } func init() { file_proto_rpc_v3_user_proto_init() } @@ -487,7 +371,7 @@ func file_proto_rpc_v3_user_proto_init() { } if !protoimpl.UnsafeEnabled { file_proto_rpc_v3_user_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetUsersRequest); i { + switch v := v.(*Empty); i { case 0: return &v.state case 1: @@ -499,7 +383,7 @@ func file_proto_rpc_v3_user_proto_init() { } } file_proto_rpc_v3_user_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetUserRequest); i { + switch v := v.(*UserRequest); i { case 0: return &v.state case 1: @@ -511,18 +395,6 @@ func file_proto_rpc_v3_user_proto_init() { } } file_proto_rpc_v3_user_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*DeleteUserRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_proto_rpc_v3_user_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PutUserRequest); i { case 0: return &v.state @@ -534,19 +406,7 @@ func file_proto_rpc_v3_user_proto_init() { return nil } } - file_proto_rpc_v3_user_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetUsersResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_proto_rpc_v3_user_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + file_proto_rpc_v3_user_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*UserResponse); i { case 0: return &v.state @@ -565,7 +425,7 @@ func file_proto_rpc_v3_user_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_proto_rpc_v3_user_proto_rawDesc, NumEnums: 0, - NumMessages: 6, + NumMessages: 4, NumExtensions: 0, NumServices: 1, }, diff --git a/components/usermgmt/proto/rpc/v3/user.pb.gw.go b/components/usermgmt/proto/rpc/v3/user.pb.gw.go index 9985fea..3c62298 100644 --- a/components/usermgmt/proto/rpc/v3/user.pb.gw.go +++ b/components/usermgmt/proto/rpc/v3/user.pb.gw.go @@ -66,44 +66,26 @@ func local_request_User_CreateUser_0(ctx context.Context, marshaler runtime.Mars } -var ( - filter_User_GetUsers_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} -) - func request_User_GetUsers_0(ctx context.Context, marshaler runtime.Marshaler, client UserClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq GetUsersRequest + var protoReq Empty var metadata runtime.ServerMetadata - if err := req.ParseForm(); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_User_GetUsers_0); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - msg, err := client.GetUsers(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err } func local_request_User_GetUsers_0(ctx context.Context, marshaler runtime.Marshaler, server UserServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq GetUsersRequest + var protoReq Empty var metadata runtime.ServerMetadata - if err := req.ParseForm(); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_User_GetUsers_0); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - msg, err := server.GetUsers(ctx, &protoReq) return msg, metadata, err } func request_User_GetUser_0(ctx context.Context, marshaler runtime.Marshaler, client UserClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq GetUserRequest + var protoReq UserRequest var metadata runtime.ServerMetadata var ( @@ -129,7 +111,7 @@ func request_User_GetUser_0(ctx context.Context, marshaler runtime.Marshaler, cl } func local_request_User_GetUser_0(ctx context.Context, marshaler runtime.Marshaler, server UserServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq GetUserRequest + var protoReq UserRequest var metadata runtime.ServerMetadata var ( @@ -223,7 +205,7 @@ func local_request_User_UpdateUser_0(ctx context.Context, marshaler runtime.Mars } func request_User_DeleteUser_0(ctx context.Context, marshaler runtime.Marshaler, client UserClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq DeleteUserRequest + var protoReq UserRequest var metadata runtime.ServerMetadata var ( @@ -249,7 +231,7 @@ func request_User_DeleteUser_0(ctx context.Context, marshaler runtime.Marshaler, } func local_request_User_DeleteUser_0(ctx context.Context, marshaler runtime.Marshaler, server UserServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq DeleteUserRequest + var protoReq UserRequest var metadata runtime.ServerMetadata var ( diff --git a/components/usermgmt/proto/rpc/v3/user.proto b/components/usermgmt/proto/rpc/v3/user.proto index f181039..948aaf5 100644 --- a/components/usermgmt/proto/rpc/v3/user.proto +++ b/components/usermgmt/proto/rpc/v3/user.proto @@ -64,15 +64,13 @@ option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_swagger) = { } }; -// Add option to filter by more org and group -message GetUsersRequest { string project = 1; } -message GetUserRequest { string userid = 1; } -message DeleteUserRequest { string userid = 1; } +// TODO: Add option to filter users list +message Empty {} +message UserRequest { string userid = 1; } message PutUserRequest { string userid = 1; rafay.dev.types.user.v3.User user = 2; } -message GetUsersResponse { repeated rafay.dev.types.user.v3.User user = 1; } message UserResponse { string status = 1; string message = 2; @@ -94,13 +92,13 @@ service User { }; }; - rpc GetUsers(GetUsersRequest) returns (GetUsersResponse) { + rpc GetUsers(Empty) returns (rafay.dev.types.user.v3.UserList) { option (google.api.http) = { get : "/auth/v3/users" }; }; - rpc GetUser(GetUserRequest) returns (rafay.dev.types.user.v3.User) { + rpc GetUser(UserRequest) returns (rafay.dev.types.user.v3.User) { option (google.api.http) = { get : "/auth/v3/user/{userid}" }; @@ -113,7 +111,7 @@ service User { }; }; - rpc DeleteUser(DeleteUserRequest) returns (UserResponse) { + rpc DeleteUser(UserRequest) returns (UserResponse) { option (google.api.http) = { delete : "/auth/v3/user/{userid}" }; diff --git a/components/usermgmt/proto/rpc/v3/user_grpc.pb.go b/components/usermgmt/proto/rpc/v3/user_grpc.pb.go index 5fd6ffb..879604e 100644 --- a/components/usermgmt/proto/rpc/v3/user_grpc.pb.go +++ b/components/usermgmt/proto/rpc/v3/user_grpc.pb.go @@ -24,10 +24,10 @@ const _ = grpc.SupportPackageIsVersion7 // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. type UserClient interface { CreateUser(ctx context.Context, in *v3.User, opts ...grpc.CallOption) (*v3.User, error) - GetUsers(ctx context.Context, in *GetUsersRequest, opts ...grpc.CallOption) (*GetUsersResponse, error) - GetUser(ctx context.Context, in *GetUserRequest, opts ...grpc.CallOption) (*v3.User, error) + GetUsers(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*v3.UserList, error) + GetUser(ctx context.Context, in *UserRequest, opts ...grpc.CallOption) (*v3.User, error) UpdateUser(ctx context.Context, in *PutUserRequest, opts ...grpc.CallOption) (*UserResponse, error) - DeleteUser(ctx context.Context, in *DeleteUserRequest, opts ...grpc.CallOption) (*UserResponse, error) + DeleteUser(ctx context.Context, in *UserRequest, opts ...grpc.CallOption) (*UserResponse, error) } type userClient struct { @@ -47,8 +47,8 @@ func (c *userClient) CreateUser(ctx context.Context, in *v3.User, opts ...grpc.C return out, nil } -func (c *userClient) GetUsers(ctx context.Context, in *GetUsersRequest, opts ...grpc.CallOption) (*GetUsersResponse, error) { - out := new(GetUsersResponse) +func (c *userClient) GetUsers(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*v3.UserList, error) { + out := new(v3.UserList) err := c.cc.Invoke(ctx, "/rafay.dev.rpc.v3.User/GetUsers", in, out, opts...) if err != nil { return nil, err @@ -56,7 +56,7 @@ func (c *userClient) GetUsers(ctx context.Context, in *GetUsersRequest, opts ... return out, nil } -func (c *userClient) GetUser(ctx context.Context, in *GetUserRequest, opts ...grpc.CallOption) (*v3.User, error) { +func (c *userClient) GetUser(ctx context.Context, in *UserRequest, opts ...grpc.CallOption) (*v3.User, error) { out := new(v3.User) err := c.cc.Invoke(ctx, "/rafay.dev.rpc.v3.User/GetUser", in, out, opts...) if err != nil { @@ -74,7 +74,7 @@ func (c *userClient) UpdateUser(ctx context.Context, in *PutUserRequest, opts .. return out, nil } -func (c *userClient) DeleteUser(ctx context.Context, in *DeleteUserRequest, opts ...grpc.CallOption) (*UserResponse, error) { +func (c *userClient) DeleteUser(ctx context.Context, in *UserRequest, opts ...grpc.CallOption) (*UserResponse, error) { out := new(UserResponse) err := c.cc.Invoke(ctx, "/rafay.dev.rpc.v3.User/DeleteUser", in, out, opts...) if err != nil { @@ -88,10 +88,10 @@ func (c *userClient) DeleteUser(ctx context.Context, in *DeleteUserRequest, opts // for forward compatibility type UserServer interface { CreateUser(context.Context, *v3.User) (*v3.User, error) - GetUsers(context.Context, *GetUsersRequest) (*GetUsersResponse, error) - GetUser(context.Context, *GetUserRequest) (*v3.User, error) + GetUsers(context.Context, *Empty) (*v3.UserList, error) + GetUser(context.Context, *UserRequest) (*v3.User, error) UpdateUser(context.Context, *PutUserRequest) (*UserResponse, error) - DeleteUser(context.Context, *DeleteUserRequest) (*UserResponse, error) + DeleteUser(context.Context, *UserRequest) (*UserResponse, error) } // UnimplementedUserServer should be embedded to have forward compatible implementations. @@ -101,16 +101,16 @@ type UnimplementedUserServer struct { func (UnimplementedUserServer) CreateUser(context.Context, *v3.User) (*v3.User, error) { return nil, status.Errorf(codes.Unimplemented, "method CreateUser not implemented") } -func (UnimplementedUserServer) GetUsers(context.Context, *GetUsersRequest) (*GetUsersResponse, error) { +func (UnimplementedUserServer) GetUsers(context.Context, *Empty) (*v3.UserList, error) { return nil, status.Errorf(codes.Unimplemented, "method GetUsers not implemented") } -func (UnimplementedUserServer) GetUser(context.Context, *GetUserRequest) (*v3.User, error) { +func (UnimplementedUserServer) GetUser(context.Context, *UserRequest) (*v3.User, error) { return nil, status.Errorf(codes.Unimplemented, "method GetUser not implemented") } func (UnimplementedUserServer) UpdateUser(context.Context, *PutUserRequest) (*UserResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method UpdateUser not implemented") } -func (UnimplementedUserServer) DeleteUser(context.Context, *DeleteUserRequest) (*UserResponse, error) { +func (UnimplementedUserServer) DeleteUser(context.Context, *UserRequest) (*UserResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method DeleteUser not implemented") } @@ -144,7 +144,7 @@ func _User_CreateUser_Handler(srv interface{}, ctx context.Context, dec func(int } func _User_GetUsers_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(GetUsersRequest) + in := new(Empty) if err := dec(in); err != nil { return nil, err } @@ -156,13 +156,13 @@ func _User_GetUsers_Handler(srv interface{}, ctx context.Context, dec func(inter FullMethod: "/rafay.dev.rpc.v3.User/GetUsers", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(UserServer).GetUsers(ctx, req.(*GetUsersRequest)) + return srv.(UserServer).GetUsers(ctx, req.(*Empty)) } return interceptor(ctx, in, info, handler) } func _User_GetUser_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(GetUserRequest) + in := new(UserRequest) if err := dec(in); err != nil { return nil, err } @@ -174,7 +174,7 @@ func _User_GetUser_Handler(srv interface{}, ctx context.Context, dec func(interf FullMethod: "/rafay.dev.rpc.v3.User/GetUser", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(UserServer).GetUser(ctx, req.(*GetUserRequest)) + return srv.(UserServer).GetUser(ctx, req.(*UserRequest)) } return interceptor(ctx, in, info, handler) } @@ -198,7 +198,7 @@ func _User_UpdateUser_Handler(srv interface{}, ctx context.Context, dec func(int } func _User_DeleteUser_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(DeleteUserRequest) + in := new(UserRequest) if err := dec(in); err != nil { return nil, err } @@ -210,7 +210,7 @@ func _User_DeleteUser_Handler(srv interface{}, ctx context.Context, dec func(int FullMethod: "/rafay.dev.rpc.v3.User/DeleteUser", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(UserServer).DeleteUser(ctx, req.(*DeleteUserRequest)) + return srv.(UserServer).DeleteUser(ctx, req.(*UserRequest)) } return interceptor(ctx, in, info, handler) } diff --git a/components/usermgmt/proto/types/userpb/v3/user.pb.go b/components/usermgmt/proto/types/userpb/v3/user.pb.go index 7d67db2..40940df 100644 --- a/components/usermgmt/proto/types/userpb/v3/user.pb.go +++ b/components/usermgmt/proto/types/userpb/v3/user.pb.go @@ -8,7 +8,7 @@ package userv3 import ( v3 "github.com/RafaySystems/rcloud-base/components/common/proto/types/commonpb/v3" - v31 "github.com/RafaySystems/rcloud-base/components/adminsrv/proto/types/systempb/v3" + _ "github.com/RafaySystems/rcloud-base/components/adminsrv/proto/types/systempb/v3" _ "github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-openapiv2/options" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" @@ -107,19 +107,40 @@ type UserSpec struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - FirstName string `protobuf:"bytes,1,opt,name=firstName,proto3" json:"firstName,omitempty"` - LastName string `protobuf:"bytes,2,opt,name=lastName,proto3" json:"lastName,omitempty"` - Username string `protobuf:"bytes,3,opt,name=username,proto3" json:"username,omitempty"` - Phone string `protobuf:"bytes,4,opt,name=phone,proto3" json:"phone,omitempty"` - Password string `protobuf:"bytes,5,opt,name=password,proto3" json:"password,omitempty"` - TotpRequired string `protobuf:"bytes,6,opt,name=totpRequired,proto3" json:"totpRequired,omitempty"` - TotpSecret string `protobuf:"bytes,7,opt,name=totpSecret,proto3" json:"totpSecret,omitempty"` - Roles []*Role `protobuf:"bytes,8,rep,name=roles,proto3" json:"roles,omitempty"` - Groups []*Group `protobuf:"bytes,9,rep,name=groups,proto3" json:"groups,omitempty"` - Projects []*v31.Project `protobuf:"bytes,10,rep,name=projects,proto3" json:"projects,omitempty"` - EmailVerified bool `protobuf:"varint,11,opt,name=emailVerified,proto3" json:"emailVerified,omitempty"` - PhoneVerified bool `protobuf:"varint,12,opt,name=phoneVerified,proto3" json:"phoneVerified,omitempty"` - TotpVerified bool `protobuf:"varint,13,opt,name=totpVerified,proto3" json:"totpVerified,omitempty"` + FirstName string `protobuf:"bytes,1,opt,name=firstName,proto3" json:"firstName,omitempty"` + LastName string `protobuf:"bytes,2,opt,name=lastName,proto3" json:"lastName,omitempty"` + Username string `protobuf:"bytes,3,opt,name=username,proto3" json:"username,omitempty"` + Phone string `protobuf:"bytes,4,opt,name=phone,proto3" json:"phone,omitempty"` + Password string `protobuf:"bytes,5,opt,name=password,proto3" json:"password,omitempty"` + // string totpRequired = 6 + // [ (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { + // title : "TotpRequired" + // description : "Flag to specify if TOTP is required" + // } ]; + // string totpSecret = 7 + // [ (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { + // title : "TotpSecret" + // description : "Secret for TOTP" + // } ]; + // repeated rafay.dev.types.user.v3.Role roles = 8 + // [ (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { + // title : "Roles" + // description : "Roles of the user" + // } ]; + // repeated rafay.dev.types.user.v3.Group groups = 9 + // [ (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { + // title : "Group" + // description : "Groups of the user" + // } ]; + // repeated rafay.dev.types.system.v3.Project projects = 10 + // [ (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { + // title : "Projects" + // description : "Projects of the user" + // } ]; + Groups []string `protobuf:"bytes,9,rep,name=groups,proto3" json:"groups,omitempty"` + EmailVerified bool `protobuf:"varint,11,opt,name=emailVerified,proto3" json:"emailVerified,omitempty"` + PhoneVerified bool `protobuf:"varint,12,opt,name=phoneVerified,proto3" json:"phoneVerified,omitempty"` + TotpVerified bool `protobuf:"varint,13,opt,name=totpVerified,proto3" json:"totpVerified,omitempty"` } func (x *UserSpec) Reset() { @@ -189,41 +210,13 @@ func (x *UserSpec) GetPassword() string { return "" } -func (x *UserSpec) GetTotpRequired() string { - if x != nil { - return x.TotpRequired - } - return "" -} - -func (x *UserSpec) GetTotpSecret() string { - if x != nil { - return x.TotpSecret - } - return "" -} - -func (x *UserSpec) GetRoles() []*Role { - if x != nil { - return x.Roles - } - return nil -} - -func (x *UserSpec) GetGroups() []*Group { +func (x *UserSpec) GetGroups() []string { if x != nil { return x.Groups } return nil } -func (x *UserSpec) GetProjects() []*v31.Project { - if x != nil { - return x.Projects - } - return nil -} - func (x *UserSpec) GetEmailVerified() bool { if x != nil { return x.EmailVerified @@ -371,7 +364,7 @@ var file_proto_types_userpb_v3_user_proto_rawDesc = []byte{ 0x34, 0x0a, 0x32, 0x2a, 0x04, 0x55, 0x73, 0x65, 0x72, 0x32, 0x04, 0x55, 0x73, 0x65, 0x72, 0xd2, 0x01, 0x0a, 0x61, 0x70, 0x69, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0xd2, 0x01, 0x04, 0x6b, 0x69, 0x6e, 0x64, 0xd2, 0x01, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xd2, 0x01, - 0x04, 0x73, 0x70, 0x65, 0x63, 0x22, 0xfd, 0x08, 0x0a, 0x08, 0x55, 0x73, 0x65, 0x72, 0x53, 0x70, + 0x04, 0x73, 0x70, 0x65, 0x63, 0x22, 0x8e, 0x06, 0x0a, 0x08, 0x55, 0x73, 0x65, 0x72, 0x53, 0x70, 0x65, 0x63, 0x12, 0x44, 0x0a, 0x09, 0x66, 0x69, 0x72, 0x73, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x26, 0x92, 0x41, 0x23, 0x2a, 0x09, 0x46, 0x69, 0x72, 0x73, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x32, 0x16, 0x46, 0x69, 0x72, 0x73, 0x74, 0x20, 0x6e, 0x61, 0x6d, @@ -392,103 +385,80 @@ var file_proto_types_userpb_v3_user_proto_rawDesc = []byte{ 0x6f, 0x72, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x42, 0x23, 0x92, 0x41, 0x20, 0x2a, 0x08, 0x50, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x32, 0x14, 0x50, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, 0x20, 0x75, 0x73, 0x65, 0x72, 0x52, 0x08, - 0x70, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x12, 0x5a, 0x0a, 0x0c, 0x74, 0x6f, 0x74, 0x70, - 0x52, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x64, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x42, 0x36, - 0x92, 0x41, 0x33, 0x2a, 0x0c, 0x54, 0x6f, 0x74, 0x70, 0x52, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, - 0x64, 0x32, 0x23, 0x46, 0x6c, 0x61, 0x67, 0x20, 0x74, 0x6f, 0x20, 0x73, 0x70, 0x65, 0x63, 0x69, - 0x66, 0x79, 0x20, 0x69, 0x66, 0x20, 0x54, 0x4f, 0x54, 0x50, 0x20, 0x69, 0x73, 0x20, 0x72, 0x65, - 0x71, 0x75, 0x69, 0x72, 0x65, 0x64, 0x52, 0x0c, 0x74, 0x6f, 0x74, 0x70, 0x52, 0x65, 0x71, 0x75, - 0x69, 0x72, 0x65, 0x64, 0x12, 0x40, 0x0a, 0x0a, 0x74, 0x6f, 0x74, 0x70, 0x53, 0x65, 0x63, 0x72, - 0x65, 0x74, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x42, 0x20, 0x92, 0x41, 0x1d, 0x2a, 0x0a, 0x54, - 0x6f, 0x74, 0x70, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x32, 0x0f, 0x53, 0x65, 0x63, 0x72, 0x65, - 0x74, 0x20, 0x66, 0x6f, 0x72, 0x20, 0x54, 0x4f, 0x54, 0x50, 0x52, 0x0a, 0x74, 0x6f, 0x74, 0x70, - 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x12, 0x52, 0x0a, 0x05, 0x72, 0x6f, 0x6c, 0x65, 0x73, 0x18, - 0x08, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x72, 0x61, 0x66, 0x61, 0x79, 0x2e, 0x64, 0x65, - 0x76, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x2e, - 0x52, 0x6f, 0x6c, 0x65, 0x42, 0x1d, 0x92, 0x41, 0x1a, 0x2a, 0x05, 0x52, 0x6f, 0x6c, 0x65, 0x73, - 0x32, 0x11, 0x52, 0x6f, 0x6c, 0x65, 0x73, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, 0x20, 0x75, - 0x73, 0x65, 0x72, 0x52, 0x05, 0x72, 0x6f, 0x6c, 0x65, 0x73, 0x12, 0x56, 0x0a, 0x06, 0x67, 0x72, - 0x6f, 0x75, 0x70, 0x73, 0x18, 0x09, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x72, 0x61, 0x66, - 0x61, 0x79, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x75, 0x73, 0x65, - 0x72, 0x2e, 0x76, 0x33, 0x2e, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x42, 0x1e, 0x92, 0x41, 0x1b, 0x2a, - 0x05, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x32, 0x12, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x73, 0x20, 0x6f, - 0x66, 0x20, 0x74, 0x68, 0x65, 0x20, 0x75, 0x73, 0x65, 0x72, 0x52, 0x06, 0x67, 0x72, 0x6f, 0x75, - 0x70, 0x73, 0x12, 0x63, 0x0a, 0x08, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x18, 0x0a, - 0x20, 0x03, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x72, 0x61, 0x66, 0x61, 0x79, 0x2e, 0x64, 0x65, 0x76, - 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x73, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x2e, 0x76, 0x33, - 0x2e, 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x42, 0x23, 0x92, 0x41, 0x20, 0x2a, 0x08, 0x50, - 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x32, 0x14, 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, - 0x73, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, 0x20, 0x75, 0x73, 0x65, 0x72, 0x52, 0x08, 0x70, - 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x12, 0x6e, 0x0a, 0x0d, 0x65, 0x6d, 0x61, 0x69, 0x6c, - 0x56, 0x65, 0x72, 0x69, 0x66, 0x69, 0x65, 0x64, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x08, 0x42, 0x48, - 0x92, 0x41, 0x45, 0x2a, 0x0d, 0x45, 0x6d, 0x61, 0x69, 0x6c, 0x56, 0x65, 0x72, 0x69, 0x66, 0x69, - 0x65, 0x64, 0x32, 0x32, 0x46, 0x6c, 0x61, 0x67, 0x20, 0x74, 0x6f, 0x20, 0x73, 0x68, 0x6f, 0x77, - 0x20, 0x69, 0x66, 0x20, 0x74, 0x68, 0x65, 0x20, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x20, 0x6f, 0x66, - 0x20, 0x74, 0x68, 0x65, 0x20, 0x75, 0x73, 0x65, 0x72, 0x20, 0x77, 0x61, 0x73, 0x20, 0x76, 0x65, - 0x72, 0x69, 0x66, 0x69, 0x65, 0x64, 0x40, 0x01, 0x52, 0x0d, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x56, - 0x65, 0x72, 0x69, 0x66, 0x69, 0x65, 0x64, 0x12, 0x71, 0x0a, 0x0d, 0x70, 0x68, 0x6f, 0x6e, 0x65, - 0x56, 0x65, 0x72, 0x69, 0x66, 0x69, 0x65, 0x64, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x08, 0x42, 0x4b, - 0x92, 0x41, 0x48, 0x2a, 0x0d, 0x50, 0x68, 0x6f, 0x6e, 0x65, 0x56, 0x65, 0x72, 0x69, 0x66, 0x69, - 0x65, 0x64, 0x32, 0x35, 0x46, 0x6c, 0x61, 0x67, 0x20, 0x74, 0x6f, 0x20, 0x73, 0x68, 0x6f, 0x77, - 0x20, 0x69, 0x66, 0x20, 0x70, 0x68, 0x6f, 0x6e, 0x65, 0x20, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, - 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, 0x20, 0x75, 0x73, 0x65, 0x72, 0x20, 0x77, 0x61, 0x73, - 0x20, 0x76, 0x65, 0x72, 0x69, 0x66, 0x69, 0x65, 0x64, 0x40, 0x01, 0x52, 0x0d, 0x70, 0x68, 0x6f, - 0x6e, 0x65, 0x56, 0x65, 0x72, 0x69, 0x66, 0x69, 0x65, 0x64, 0x12, 0x6a, 0x0a, 0x0c, 0x74, 0x6f, - 0x74, 0x70, 0x56, 0x65, 0x72, 0x69, 0x66, 0x69, 0x65, 0x64, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x08, - 0x42, 0x46, 0x92, 0x41, 0x43, 0x2a, 0x0c, 0x54, 0x6f, 0x74, 0x70, 0x56, 0x65, 0x72, 0x69, 0x66, - 0x69, 0x65, 0x64, 0x32, 0x31, 0x46, 0x6c, 0x61, 0x67, 0x20, 0x74, 0x6f, 0x20, 0x73, 0x68, 0x6f, - 0x77, 0x20, 0x69, 0x66, 0x20, 0x74, 0x68, 0x65, 0x20, 0x54, 0x4f, 0x54, 0x50, 0x20, 0x6f, 0x66, - 0x20, 0x74, 0x68, 0x65, 0x20, 0x75, 0x73, 0x65, 0x72, 0x20, 0x77, 0x61, 0x73, 0x20, 0x76, 0x65, - 0x72, 0x69, 0x66, 0x69, 0x65, 0x64, 0x40, 0x01, 0x52, 0x0c, 0x74, 0x6f, 0x74, 0x70, 0x56, 0x65, - 0x72, 0x69, 0x66, 0x69, 0x65, 0x64, 0x3a, 0x2d, 0x92, 0x41, 0x2a, 0x0a, 0x28, 0x2a, 0x12, 0x55, - 0x73, 0x65, 0x72, 0x20, 0x53, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x32, 0x12, 0x55, 0x73, 0x65, 0x72, 0x20, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x63, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0xbf, 0x03, 0x0a, 0x08, 0x55, 0x73, 0x65, 0x72, 0x4c, 0x69, - 0x73, 0x74, 0x12, 0x71, 0x0a, 0x0a, 0x61, 0x70, 0x69, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x51, 0x92, 0x41, 0x4e, 0x2a, 0x0b, 0x41, 0x50, 0x49, - 0x20, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x32, 0x25, 0x41, 0x50, 0x49, 0x20, 0x56, 0x65, - 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, 0x20, 0x75, 0x73, 0x65, + 0x70, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x12, 0x3e, 0x0a, 0x06, 0x67, 0x72, 0x6f, 0x75, + 0x70, 0x73, 0x18, 0x09, 0x20, 0x03, 0x28, 0x09, 0x42, 0x26, 0x92, 0x41, 0x23, 0x2a, 0x05, 0x47, + 0x72, 0x6f, 0x75, 0x70, 0x32, 0x1a, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x73, 0x20, 0x74, 0x68, 0x65, + 0x20, 0x75, 0x73, 0x65, 0x72, 0x20, 0x62, 0x65, 0x6c, 0x6f, 0x6e, 0x67, 0x73, 0x20, 0x74, 0x6f, + 0x52, 0x06, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x73, 0x12, 0x6e, 0x0a, 0x0d, 0x65, 0x6d, 0x61, 0x69, + 0x6c, 0x56, 0x65, 0x72, 0x69, 0x66, 0x69, 0x65, 0x64, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x08, 0x42, + 0x48, 0x92, 0x41, 0x45, 0x2a, 0x0d, 0x45, 0x6d, 0x61, 0x69, 0x6c, 0x56, 0x65, 0x72, 0x69, 0x66, + 0x69, 0x65, 0x64, 0x32, 0x32, 0x46, 0x6c, 0x61, 0x67, 0x20, 0x74, 0x6f, 0x20, 0x73, 0x68, 0x6f, + 0x77, 0x20, 0x69, 0x66, 0x20, 0x74, 0x68, 0x65, 0x20, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x20, 0x6f, + 0x66, 0x20, 0x74, 0x68, 0x65, 0x20, 0x75, 0x73, 0x65, 0x72, 0x20, 0x77, 0x61, 0x73, 0x20, 0x76, + 0x65, 0x72, 0x69, 0x66, 0x69, 0x65, 0x64, 0x40, 0x01, 0x52, 0x0d, 0x65, 0x6d, 0x61, 0x69, 0x6c, + 0x56, 0x65, 0x72, 0x69, 0x66, 0x69, 0x65, 0x64, 0x12, 0x71, 0x0a, 0x0d, 0x70, 0x68, 0x6f, 0x6e, + 0x65, 0x56, 0x65, 0x72, 0x69, 0x66, 0x69, 0x65, 0x64, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x08, 0x42, + 0x4b, 0x92, 0x41, 0x48, 0x2a, 0x0d, 0x50, 0x68, 0x6f, 0x6e, 0x65, 0x56, 0x65, 0x72, 0x69, 0x66, + 0x69, 0x65, 0x64, 0x32, 0x35, 0x46, 0x6c, 0x61, 0x67, 0x20, 0x74, 0x6f, 0x20, 0x73, 0x68, 0x6f, + 0x77, 0x20, 0x69, 0x66, 0x20, 0x70, 0x68, 0x6f, 0x6e, 0x65, 0x20, 0x6e, 0x75, 0x6d, 0x62, 0x65, + 0x72, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, 0x20, 0x75, 0x73, 0x65, 0x72, 0x20, 0x77, 0x61, + 0x73, 0x20, 0x76, 0x65, 0x72, 0x69, 0x66, 0x69, 0x65, 0x64, 0x40, 0x01, 0x52, 0x0d, 0x70, 0x68, + 0x6f, 0x6e, 0x65, 0x56, 0x65, 0x72, 0x69, 0x66, 0x69, 0x65, 0x64, 0x12, 0x6a, 0x0a, 0x0c, 0x74, + 0x6f, 0x74, 0x70, 0x56, 0x65, 0x72, 0x69, 0x66, 0x69, 0x65, 0x64, 0x18, 0x0d, 0x20, 0x01, 0x28, + 0x08, 0x42, 0x46, 0x92, 0x41, 0x43, 0x2a, 0x0c, 0x54, 0x6f, 0x74, 0x70, 0x56, 0x65, 0x72, 0x69, + 0x66, 0x69, 0x65, 0x64, 0x32, 0x31, 0x46, 0x6c, 0x61, 0x67, 0x20, 0x74, 0x6f, 0x20, 0x73, 0x68, + 0x6f, 0x77, 0x20, 0x69, 0x66, 0x20, 0x74, 0x68, 0x65, 0x20, 0x54, 0x4f, 0x54, 0x50, 0x20, 0x6f, + 0x66, 0x20, 0x74, 0x68, 0x65, 0x20, 0x75, 0x73, 0x65, 0x72, 0x20, 0x77, 0x61, 0x73, 0x20, 0x76, + 0x65, 0x72, 0x69, 0x66, 0x69, 0x65, 0x64, 0x40, 0x01, 0x52, 0x0c, 0x74, 0x6f, 0x74, 0x70, 0x56, + 0x65, 0x72, 0x69, 0x66, 0x69, 0x65, 0x64, 0x3a, 0x2d, 0x92, 0x41, 0x2a, 0x0a, 0x28, 0x2a, 0x12, + 0x55, 0x73, 0x65, 0x72, 0x20, 0x53, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x32, 0x12, 0x55, 0x73, 0x65, 0x72, 0x20, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, + 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0xbf, 0x03, 0x0a, 0x08, 0x55, 0x73, 0x65, 0x72, 0x4c, + 0x69, 0x73, 0x74, 0x12, 0x71, 0x0a, 0x0a, 0x61, 0x70, 0x69, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, + 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x51, 0x92, 0x41, 0x4e, 0x2a, 0x0b, 0x41, 0x50, + 0x49, 0x20, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x32, 0x25, 0x41, 0x50, 0x49, 0x20, 0x56, + 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, 0x20, 0x75, 0x73, + 0x65, 0x72, 0x20, 0x6c, 0x69, 0x73, 0x74, 0x20, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, + 0x3a, 0x16, 0x75, 0x73, 0x65, 0x72, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x6b, 0x38, 0x73, 0x6d, 0x67, + 0x6d, 0x74, 0x2e, 0x69, 0x6f, 0x2f, 0x76, 0x33, 0x40, 0x01, 0x52, 0x0a, 0x61, 0x70, 0x69, 0x56, + 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x49, 0x0a, 0x04, 0x6b, 0x69, 0x6e, 0x64, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x09, 0x42, 0x35, 0x92, 0x41, 0x32, 0x2a, 0x04, 0x4b, 0x69, 0x6e, 0x64, 0x32, + 0x1e, 0x4b, 0x69, 0x6e, 0x64, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, 0x20, 0x75, 0x73, 0x65, 0x72, 0x20, 0x6c, 0x69, 0x73, 0x74, 0x20, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x3a, - 0x16, 0x75, 0x73, 0x65, 0x72, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x6b, 0x38, 0x73, 0x6d, 0x67, 0x6d, - 0x74, 0x2e, 0x69, 0x6f, 0x2f, 0x76, 0x33, 0x40, 0x01, 0x52, 0x0a, 0x61, 0x70, 0x69, 0x56, 0x65, - 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x49, 0x0a, 0x04, 0x6b, 0x69, 0x6e, 0x64, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x09, 0x42, 0x35, 0x92, 0x41, 0x32, 0x2a, 0x04, 0x4b, 0x69, 0x6e, 0x64, 0x32, 0x1e, - 0x4b, 0x69, 0x6e, 0x64, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, 0x20, 0x75, 0x73, 0x65, 0x72, - 0x20, 0x6c, 0x69, 0x73, 0x74, 0x20, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x3a, 0x08, - 0x55, 0x73, 0x65, 0x72, 0x4c, 0x69, 0x73, 0x74, 0x40, 0x01, 0x52, 0x04, 0x6b, 0x69, 0x6e, 0x64, - 0x12, 0x78, 0x0a, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, 0x03, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x72, 0x61, 0x66, 0x61, 0x79, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x74, - 0x79, 0x70, 0x65, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x33, 0x2e, 0x4c, - 0x69, 0x73, 0x74, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x42, 0x33, 0x92, 0x41, 0x30, - 0x2a, 0x08, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x32, 0x22, 0x4d, 0x65, 0x74, 0x61, - 0x64, 0x61, 0x74, 0x61, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, 0x20, 0x75, 0x73, 0x65, 0x72, - 0x20, 0x6c, 0x69, 0x73, 0x74, 0x20, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x40, 0x01, - 0x52, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x5d, 0x0a, 0x05, 0x69, 0x74, - 0x65, 0x6d, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x72, 0x61, 0x66, 0x61, - 0x79, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x75, 0x73, 0x65, 0x72, - 0x2e, 0x76, 0x33, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x42, 0x28, 0x92, 0x41, 0x25, 0x2a, 0x05, 0x49, - 0x74, 0x65, 0x6d, 0x73, 0x32, 0x1a, 0x4c, 0x69, 0x73, 0x74, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, - 0x65, 0x20, 0x75, 0x73, 0x65, 0x72, 0x20, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, - 0x40, 0x01, 0x52, 0x05, 0x69, 0x74, 0x65, 0x6d, 0x73, 0x3a, 0x1c, 0x92, 0x41, 0x19, 0x0a, 0x17, - 0x2a, 0x08, 0x55, 0x73, 0x65, 0x72, 0x4c, 0x69, 0x73, 0x74, 0x32, 0x09, 0x55, 0x73, 0x65, 0x72, - 0x20, 0x6c, 0x69, 0x73, 0x74, 0x40, 0x01, 0x42, 0xff, 0x01, 0x0a, 0x1b, 0x63, 0x6f, 0x6d, 0x2e, - 0x72, 0x61, 0x66, 0x61, 0x79, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, - 0x75, 0x73, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x42, 0x09, 0x55, 0x73, 0x65, 0x72, 0x50, 0x72, 0x6f, - 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x54, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, - 0x2f, 0x52, 0x61, 0x66, 0x61, 0x79, 0x53, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x73, 0x2f, 0x72, 0x63, - 0x6c, 0x6f, 0x75, 0x64, 0x2d, 0x62, 0x61, 0x73, 0x65, 0x2f, 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, - 0x65, 0x6e, 0x74, 0x73, 0x2f, 0x75, 0x73, 0x65, 0x72, 0x6d, 0x67, 0x6d, 0x74, 0x2f, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2f, 0x75, 0x73, 0x65, 0x72, 0x70, 0x62, - 0x2f, 0x76, 0x33, 0x3b, 0x75, 0x73, 0x65, 0x72, 0x76, 0x33, 0xa2, 0x02, 0x04, 0x52, 0x44, 0x54, - 0x55, 0xaa, 0x02, 0x17, 0x52, 0x61, 0x66, 0x61, 0x79, 0x2e, 0x44, 0x65, 0x76, 0x2e, 0x54, 0x79, - 0x70, 0x65, 0x73, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x2e, 0x56, 0x33, 0xca, 0x02, 0x17, 0x52, 0x61, - 0x66, 0x61, 0x79, 0x5c, 0x44, 0x65, 0x76, 0x5c, 0x54, 0x79, 0x70, 0x65, 0x73, 0x5c, 0x55, 0x73, - 0x65, 0x72, 0x5c, 0x56, 0x33, 0xe2, 0x02, 0x23, 0x52, 0x61, 0x66, 0x61, 0x79, 0x5c, 0x44, 0x65, - 0x76, 0x5c, 0x54, 0x79, 0x70, 0x65, 0x73, 0x5c, 0x55, 0x73, 0x65, 0x72, 0x5c, 0x56, 0x33, 0x5c, - 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x1b, 0x52, 0x61, - 0x66, 0x61, 0x79, 0x3a, 0x3a, 0x44, 0x65, 0x76, 0x3a, 0x3a, 0x54, 0x79, 0x70, 0x65, 0x73, 0x3a, - 0x3a, 0x55, 0x73, 0x65, 0x72, 0x3a, 0x3a, 0x56, 0x33, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x33, + 0x08, 0x55, 0x73, 0x65, 0x72, 0x4c, 0x69, 0x73, 0x74, 0x40, 0x01, 0x52, 0x04, 0x6b, 0x69, 0x6e, + 0x64, 0x12, 0x78, 0x0a, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, 0x03, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x72, 0x61, 0x66, 0x61, 0x79, 0x2e, 0x64, 0x65, 0x76, 0x2e, + 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x33, 0x2e, + 0x4c, 0x69, 0x73, 0x74, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x42, 0x33, 0x92, 0x41, + 0x30, 0x2a, 0x08, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x32, 0x22, 0x4d, 0x65, 0x74, + 0x61, 0x64, 0x61, 0x74, 0x61, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, 0x20, 0x75, 0x73, 0x65, + 0x72, 0x20, 0x6c, 0x69, 0x73, 0x74, 0x20, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x40, + 0x01, 0x52, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x5d, 0x0a, 0x05, 0x69, + 0x74, 0x65, 0x6d, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x72, 0x61, 0x66, + 0x61, 0x79, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x75, 0x73, 0x65, + 0x72, 0x2e, 0x76, 0x33, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x42, 0x28, 0x92, 0x41, 0x25, 0x2a, 0x05, + 0x49, 0x74, 0x65, 0x6d, 0x73, 0x32, 0x1a, 0x4c, 0x69, 0x73, 0x74, 0x20, 0x6f, 0x66, 0x20, 0x74, + 0x68, 0x65, 0x20, 0x75, 0x73, 0x65, 0x72, 0x20, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, + 0x73, 0x40, 0x01, 0x52, 0x05, 0x69, 0x74, 0x65, 0x6d, 0x73, 0x3a, 0x1c, 0x92, 0x41, 0x19, 0x0a, + 0x17, 0x2a, 0x08, 0x55, 0x73, 0x65, 0x72, 0x4c, 0x69, 0x73, 0x74, 0x32, 0x09, 0x55, 0x73, 0x65, + 0x72, 0x20, 0x6c, 0x69, 0x73, 0x74, 0x40, 0x01, 0x42, 0xff, 0x01, 0x0a, 0x1b, 0x63, 0x6f, 0x6d, + 0x2e, 0x72, 0x61, 0x66, 0x61, 0x79, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, + 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x42, 0x09, 0x55, 0x73, 0x65, 0x72, 0x50, 0x72, + 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x54, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, + 0x6d, 0x2f, 0x52, 0x61, 0x66, 0x61, 0x79, 0x53, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x73, 0x2f, 0x72, + 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2d, 0x62, 0x61, 0x73, 0x65, 0x2f, 0x63, 0x6f, 0x6d, 0x70, 0x6f, + 0x6e, 0x65, 0x6e, 0x74, 0x73, 0x2f, 0x75, 0x73, 0x65, 0x72, 0x6d, 0x67, 0x6d, 0x74, 0x2f, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2f, 0x75, 0x73, 0x65, 0x72, 0x70, + 0x62, 0x2f, 0x76, 0x33, 0x3b, 0x75, 0x73, 0x65, 0x72, 0x76, 0x33, 0xa2, 0x02, 0x04, 0x52, 0x44, + 0x54, 0x55, 0xaa, 0x02, 0x17, 0x52, 0x61, 0x66, 0x61, 0x79, 0x2e, 0x44, 0x65, 0x76, 0x2e, 0x54, + 0x79, 0x70, 0x65, 0x73, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x2e, 0x56, 0x33, 0xca, 0x02, 0x17, 0x52, + 0x61, 0x66, 0x61, 0x79, 0x5c, 0x44, 0x65, 0x76, 0x5c, 0x54, 0x79, 0x70, 0x65, 0x73, 0x5c, 0x55, + 0x73, 0x65, 0x72, 0x5c, 0x56, 0x33, 0xe2, 0x02, 0x23, 0x52, 0x61, 0x66, 0x61, 0x79, 0x5c, 0x44, + 0x65, 0x76, 0x5c, 0x54, 0x79, 0x70, 0x65, 0x73, 0x5c, 0x55, 0x73, 0x65, 0x72, 0x5c, 0x56, 0x33, + 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x1b, 0x52, + 0x61, 0x66, 0x61, 0x79, 0x3a, 0x3a, 0x44, 0x65, 0x76, 0x3a, 0x3a, 0x54, 0x79, 0x70, 0x65, 0x73, + 0x3a, 0x3a, 0x55, 0x73, 0x65, 0x72, 0x3a, 0x3a, 0x56, 0x33, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x33, } var ( @@ -510,25 +480,19 @@ var file_proto_types_userpb_v3_user_proto_goTypes = []interface{}{ (*UserList)(nil), // 2: rafay.dev.types.user.v3.UserList (*v3.Metadata)(nil), // 3: rafay.dev.types.common.v3.Metadata (*v3.Status)(nil), // 4: rafay.dev.types.common.v3.Status - (*Role)(nil), // 5: rafay.dev.types.user.v3.Role - (*Group)(nil), // 6: rafay.dev.types.user.v3.Group - (*v31.Project)(nil), // 7: rafay.dev.types.system.v3.Project - (*v3.ListMetadata)(nil), // 8: rafay.dev.types.common.v3.ListMetadata + (*v3.ListMetadata)(nil), // 5: rafay.dev.types.common.v3.ListMetadata } var file_proto_types_userpb_v3_user_proto_depIdxs = []int32{ 3, // 0: rafay.dev.types.user.v3.User.metadata:type_name -> rafay.dev.types.common.v3.Metadata 1, // 1: rafay.dev.types.user.v3.User.spec:type_name -> rafay.dev.types.user.v3.UserSpec 4, // 2: rafay.dev.types.user.v3.User.status:type_name -> rafay.dev.types.common.v3.Status - 5, // 3: rafay.dev.types.user.v3.UserSpec.roles:type_name -> rafay.dev.types.user.v3.Role - 6, // 4: rafay.dev.types.user.v3.UserSpec.groups:type_name -> rafay.dev.types.user.v3.Group - 7, // 5: rafay.dev.types.user.v3.UserSpec.projects:type_name -> rafay.dev.types.system.v3.Project - 8, // 6: rafay.dev.types.user.v3.UserList.metadata:type_name -> rafay.dev.types.common.v3.ListMetadata - 0, // 7: rafay.dev.types.user.v3.UserList.items:type_name -> rafay.dev.types.user.v3.User - 8, // [8:8] is the sub-list for method output_type - 8, // [8:8] is the sub-list for method input_type - 8, // [8:8] is the sub-list for extension type_name - 8, // [8:8] is the sub-list for extension extendee - 0, // [0:8] is the sub-list for field type_name + 5, // 3: rafay.dev.types.user.v3.UserList.metadata:type_name -> rafay.dev.types.common.v3.ListMetadata + 0, // 4: rafay.dev.types.user.v3.UserList.items:type_name -> rafay.dev.types.user.v3.User + 5, // [5:5] is the sub-list for method output_type + 5, // [5:5] is the sub-list for method input_type + 5, // [5:5] is the sub-list for extension type_name + 5, // [5:5] is the sub-list for extension extendee + 0, // [0:5] is the sub-list for field type_name } func init() { file_proto_types_userpb_v3_user_proto_init() } diff --git a/components/usermgmt/proto/types/userpb/v3/user.proto b/components/usermgmt/proto/types/userpb/v3/user.proto index b5d354a..0ecdb39 100644 --- a/components/usermgmt/proto/types/userpb/v3/user.proto +++ b/components/usermgmt/proto/types/userpb/v3/user.proto @@ -81,30 +81,35 @@ message UserSpec { title : "Password" description : "Password of the user" } ]; - string totpRequired = 6 - [ (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { - title : "TotpRequired" - description : "Flag to specify if TOTP is required" - } ]; - string totpSecret = 7 - [ (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { - title : "TotpSecret" - description : "Secret for TOTP" - } ]; - repeated rafay.dev.types.user.v3.Role roles = 8 - [ (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { - title : "Roles" - description : "Roles of the user" - } ]; - repeated rafay.dev.types.user.v3.Group groups = 9 + // string totpRequired = 6 + // [ (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { + // title : "TotpRequired" + // description : "Flag to specify if TOTP is required" + // } ]; + // string totpSecret = 7 + // [ (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { + // title : "TotpSecret" + // description : "Secret for TOTP" + // } ]; + // repeated rafay.dev.types.user.v3.Role roles = 8 + // [ (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { + // title : "Roles" + // description : "Roles of the user" + // } ]; + // repeated rafay.dev.types.user.v3.Group groups = 9 + // [ (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { + // title : "Group" + // description : "Groups of the user" + // } ]; + // repeated rafay.dev.types.system.v3.Project projects = 10 + // [ (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { + // title : "Projects" + // description : "Projects of the user" + // } ]; + repeated string groups = 9 [ (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { title : "Group" - description : "Groups of the user" - } ]; - repeated rafay.dev.types.system.v3.Project projects = 10 - [ (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { - title : "Projects" - description : "Projects of the user" + description : "Groups the user belongs to" } ]; bool emailVerified = 11 [ (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { From 7ca97c845d4ee5d89d8601c92e6fde4964c00e8c Mon Sep 17 00:00:00 2001 From: Abin Simon Date: Tue, 4 Jan 2022 15:33:18 +0530 Subject: [PATCH 07/28] Initial kratos config files to start a server To start kratos: kratos serve -c kratos.yml --- .../usermgmt/_kratos/identity.schema.json | 48 +++++++++++ components/usermgmt/_kratos/kratos.yml | 79 +++++++++++++++++++ 2 files changed, 127 insertions(+) create mode 100644 components/usermgmt/_kratos/identity.schema.json create mode 100644 components/usermgmt/_kratos/kratos.yml diff --git a/components/usermgmt/_kratos/identity.schema.json b/components/usermgmt/_kratos/identity.schema.json new file mode 100644 index 0000000..6b1e998 --- /dev/null +++ b/components/usermgmt/_kratos/identity.schema.json @@ -0,0 +1,48 @@ +{ + "$id": "https://schemas.ory.sh/presets/kratos/quickstart/email-password/identity.schema.json", + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "Person", + "type": "object", + "properties": { + "traits": { + "type": "object", + "properties": { + "first_name": { + "title": "First name", + "type": "string", + "pattern": "^.*$" + }, + "last_name": { + "title": "Last name", + "type": "string", + "pattern": "^.*$" + }, + "email": { + "type": "string", + "format": "email", + "title": "E-Mail", + "minLength": 3, + "ory.sh/kratos": { + "credentials": { + "password": { + "identifier": true + } + }, + "verification": { + "via": "email" + }, + "recovery": { + "via": "email" + } + } + } + }, + "required": [ + "first_name", + "last_name", + "email" + ], + "additionalProperties": false + } + } +} diff --git a/components/usermgmt/_kratos/kratos.yml b/components/usermgmt/_kratos/kratos.yml new file mode 100644 index 0000000..72bc8de --- /dev/null +++ b/components/usermgmt/_kratos/kratos.yml @@ -0,0 +1,79 @@ +version: v0.7.1-alpha.1 + +dsn: memory + +serve: + public: + base_url: http://127.0.0.1:4433/ + cors: + enabled: true + admin: + base_url: http://127.0.0.1:4434/ + +selfservice: + default_browser_return_url: http://127.0.0.1:4455/ + whitelisted_return_urls: + - http://127.0.0.1:4455 + + methods: + password: + enabled: true + + flows: + error: + ui_url: http://127.0.0.1:4455/error + + settings: + ui_url: http://127.0.0.1:4455/settings + privileged_session_max_age: 15m + + recovery: + enabled: true + ui_url: http://127.0.0.1:4455/recovery + + verification: + enabled: true + ui_url: http://127.0.0.1:4455/verify + after: + default_browser_return_url: http://127.0.0.1:4455/ + + logout: + after: + default_browser_return_url: http://127.0.0.1:4455/auth/login + + login: + ui_url: http://127.0.0.1:4455/auth/login + lifespan: 10m + + registration: + lifespan: 10m + ui_url: http://127.0.0.1:4455/auth/registration + after: + password: + hooks: + - + hook: session + +log: + level: debug + format: text + leak_sensitive_values: true + +secrets: + cookie: + - PLEASE-CHANGE-ME-I-AM-VERY-INSECURE + +hashers: + argon2: + parallelism: 1 + memory: 128MB + iterations: 2 + salt_length: 16 + key_length: 16 + +identity: + default_schema_url: file://identity.schema.json + +courier: + smtp: + connection_uri: smtps://test:test@mailslurper:1025/?skip_ssl_verify=true&legacy_ssl=true From 3bf7e6e61c16e685b3d5c8589d50d7cffac718cd Mon Sep 17 00:00:00 2001 From: Abin Simon Date: Tue, 4 Jan 2022 15:36:51 +0530 Subject: [PATCH 08/28] Add a simple readme for usermgmt --- components/usermgmt/README.md | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 components/usermgmt/README.md diff --git a/components/usermgmt/README.md b/components/usermgmt/README.md new file mode 100644 index 0000000..1b09a84 --- /dev/null +++ b/components/usermgmt/README.md @@ -0,0 +1,22 @@ +# User management + +This module is responsible for manging users/groups/roles as well as being a frontend for the casbin internal service. +All user/auth related requests go through here. + + +## Development + +### Start kratos + +``` shell +cd components/usermgmt/_kratos +kratos serve -c kratos.yml +``` + +### Run usermgmt server + +``` shell +cd components/usermgmt/_kratos +go run main.go +``` + From 6c4c1b4b291e4e5d5730d600e94add5dc81dd061 Mon Sep 17 00:00:00 2001 From: Abin Simon Date: Wed, 5 Jan 2022 11:26:42 +0530 Subject: [PATCH 09/28] Fix incorrect imports with buf generate --- components/usermgmt/buf.gen.yaml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/components/usermgmt/buf.gen.yaml b/components/usermgmt/buf.gen.yaml index 9324567..9f2db66 100644 --- a/components/usermgmt/buf.gen.yaml +++ b/components/usermgmt/buf.gen.yaml @@ -7,6 +7,9 @@ managed: - buf.build/googleapis/googleapis - buf.build/grpc-ecosystem/grpc-gateway - buf.build/gogo/protobuf + override: + buf.build/nparikh/rafay-common: github.com/RafaySystems/rcloud-base/components/common + buf.build/nparikh/adminsrv: github.com/RafaySystems/rcloud-base/components/adminsrv plugins: - name: go out: . From 461683145b1eb5d7d7e03451eef7693af11db087 Mon Sep 17 00:00:00 2001 From: Abin Simon Date: Wed, 5 Jan 2022 11:27:10 +0530 Subject: [PATCH 10/28] Simplify input and output for user operations Post rebase fixups --- components/adminsrv/go.mod | 15 +- components/adminsrv/go.sum | 825 +----------------- .../openapi/proto/rpc/v3/group.swagger.json | 636 +++++++++++++- .../openapi/proto/rpc/v3/role.swagger.json | 568 +++++++++++- .../proto/rpc/v3/rolepermission.swagger.json | 302 ++++++- .../openapi/proto/rpc/v3/user.swagger.json | 778 ++++++++++++++++- components/usermgmt/go.mod | 1 - components/usermgmt/go.sum | 1 + components/usermgmt/pkg/service/user.go | 46 +- components/usermgmt/proto/rpc/v3/group.pb.go | 504 +++-------- .../usermgmt/proto/rpc/v3/group.pb.gw.go | 467 +++++++++- components/usermgmt/proto/rpc/v3/group.proto | 47 +- .../usermgmt/proto/rpc/v3/group_grpc.pb.go | 50 +- components/usermgmt/proto/rpc/v3/role.pb.go | 505 +++-------- .../usermgmt/proto/rpc/v3/role.pb.gw.go | 467 +++++++++- components/usermgmt/proto/rpc/v3/role.proto | 48 +- .../usermgmt/proto/rpc/v3/role_grpc.pb.go | 50 +- .../proto/rpc/v3/rolepermission.pb.go | 306 ++----- .../proto/rpc/v3/rolepermission.pb.gw.go | 166 +++- .../proto/rpc/v3/rolepermission.proto | 28 +- .../proto/rpc/v3/rolepermission_grpc.pb.go | 26 +- components/usermgmt/proto/rpc/v3/user.pb.go | 399 +++------ .../usermgmt/proto/rpc/v3/user.pb.gw.go | 471 +++++++++- components/usermgmt/proto/rpc/v3/user.proto | 47 +- .../usermgmt/proto/rpc/v3/user_grpc.pb.go | 52 +- .../proto/types/userpb/v3/group.pb.go | 2 +- .../usermgmt/proto/types/userpb/v3/user.pb.go | 2 +- 27 files changed, 4315 insertions(+), 2494 deletions(-) diff --git a/components/adminsrv/go.mod b/components/adminsrv/go.mod index c9f6ae6..389e368 100644 --- a/components/adminsrv/go.mod +++ b/components/adminsrv/go.mod @@ -1,20 +1,27 @@ module github.com/RafaySystems/rcloud-base/components/adminsrv -go 1.16 +go 1.17 require ( github.com/RafaySystems/rcloud-base/components/common v0.0.0-unpublished github.com/gogo/protobuf v1.3.2 - github.com/google/uuid v1.3.0 + github.com/grpc-ecosystem/grpc-gateway v1.16.0 github.com/grpc-ecosystem/grpc-gateway/v2 v2.7.2 + github.com/jinzhu/inflection v1.0.0 // indirect github.com/spf13/viper v1.10.1 - github.com/uptrace/bun v1.0.21 + github.com/tmthrgd/go-hex v0.0.0-20190904060850-447a3041c3bc // indirect + github.com/uptrace/bun v1.0.20 github.com/uptrace/bun/dialect/pgdialect v1.0.20 github.com/uptrace/bun/driver/pgdriver v1.0.20 github.com/uptrace/bun/extra/bundebug v1.0.20 + github.com/vmihailenco/msgpack/v5 v5.3.5 // indirect + github.com/vmihailenco/tagparser/v2 v2.0.0 // indirect + golang.org/x/crypto v0.0.0-20211215153901-e495a2d5b3d3 // indirect + golang.org/x/sys v0.0.0-20211216021012-1d35b9e2eb4e // indirect google.golang.org/genproto v0.0.0-20211208223120-3a66f561d7aa google.golang.org/grpc v1.43.0 google.golang.org/protobuf v1.27.1 + mellium.im/sasl v0.2.1 // indirect sigs.k8s.io/controller-runtime v0.11.0 ) @@ -58,4 +65,4 @@ require ( gopkg.in/yaml.v2 v2.4.0 // indirect mellium.im/sasl v0.2.1 // indirect sigs.k8s.io/yaml v1.3.0 // indirect -) +) \ No newline at end of file diff --git a/components/adminsrv/go.sum b/components/adminsrv/go.sum index 4f96505..aa89fdf 100644 --- a/components/adminsrv/go.sum +++ b/components/adminsrv/go.sum @@ -1,214 +1,44 @@ cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= cloud.google.com/go v0.34.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= -cloud.google.com/go v0.38.0/go.mod h1:990N+gfupTy94rShfmMCWGDn0LpTmnzTp2qbd1dvSRU= -cloud.google.com/go v0.44.1/go.mod h1:iSa0KzasP4Uvy3f1mN/7PiObzGgflwredwwASm/v6AU= -cloud.google.com/go v0.44.2/go.mod h1:60680Gw3Yr4ikxnPRS/oxxkBccT6SA1yMk63TGekxKY= -cloud.google.com/go v0.45.1/go.mod h1:RpBamKRgapWJb87xiFSdk4g1CME7QZg3uwTez+TSTjc= -cloud.google.com/go v0.46.3/go.mod h1:a6bKKbmY7er1mI7TEI4lsAkts/mkhTSZK8w33B4RAg0= -cloud.google.com/go v0.50.0/go.mod h1:r9sluTvynVuxRIOHXQEHMFffphuXHOMZMycpNR5e6To= -cloud.google.com/go v0.52.0/go.mod h1:pXajvRH/6o3+F9jDHZWQ5PbGhn+o8w9qiu/CffaVdO4= -cloud.google.com/go v0.53.0/go.mod h1:fp/UouUEsRkN6ryDKNW/Upv/JBKnv6WDthjR6+vze6M= -cloud.google.com/go v0.54.0/go.mod h1:1rq2OEkV3YMf6n/9ZvGWI3GWw0VoqH/1x2nd8Is/bPc= -cloud.google.com/go v0.56.0/go.mod h1:jr7tqZxxKOVYizybht9+26Z/gUq7tiRzu+ACVAMbKVk= -cloud.google.com/go v0.57.0/go.mod h1:oXiQ6Rzq3RAkkY7N6t3TcE6jE+CIBBbA36lwQ1JyzZs= -cloud.google.com/go v0.62.0/go.mod h1:jmCYTdRCQuc1PHIIJ/maLInMho30T/Y0M4hTdTShOYc= -cloud.google.com/go v0.65.0/go.mod h1:O5N8zS7uWy9vkA9vayVHs65eM1ubvY4h553ofrNHObY= -cloud.google.com/go v0.72.0/go.mod h1:M+5Vjvlc2wnp6tjzE102Dw08nGShTscUx2nZMufOKPI= -cloud.google.com/go v0.74.0/go.mod h1:VV1xSbzvo+9QJOxLDaJfTjx5e+MePCpCWwvftOeQmWk= -cloud.google.com/go v0.78.0/go.mod h1:QjdrLG0uq+YwhjoVOLsS1t7TW8fs36kLs4XO5R5ECHg= -cloud.google.com/go v0.79.0/go.mod h1:3bzgcEeQlzbuEAYu4mrWhKqWjmpprinYgKJLgKHnbb8= -cloud.google.com/go v0.81.0/go.mod h1:mk/AM35KwGk/Nm2YSeZbxXdrNK3KZOYHmLkOqC2V6E0= -cloud.google.com/go v0.83.0/go.mod h1:Z7MJUsANfY0pYPdw0lbnivPx4/vhy/e2FEkSkF7vAVY= -cloud.google.com/go v0.84.0/go.mod h1:RazrYuxIK6Kb7YrzzhPoLmCVzl7Sup4NrbKPg8KHSUM= -cloud.google.com/go v0.87.0/go.mod h1:TpDYlFy7vuLzZMMZ+B6iRiELaY7z/gJPaqbMx6mlWcY= -cloud.google.com/go v0.90.0/go.mod h1:kRX0mNRHe0e2rC6oNakvwQqzyDmg57xJ+SZU1eT2aDQ= -cloud.google.com/go v0.93.3/go.mod h1:8utlLll2EF5XMAV15woO4lSbWQlk8rer9aLOfLh7+YI= -cloud.google.com/go v0.94.1/go.mod h1:qAlAugsXlC+JWO+Bke5vCtc9ONxjQT3drlTTnAplMW4= -cloud.google.com/go v0.97.0/go.mod h1:GF7l59pYBVlXQIBLx3a761cZ41F9bBH3JUlihCt2Udc= -cloud.google.com/go v0.99.0/go.mod h1:w0Xx2nLzqWJPuozYQX+hFfCSI8WioryfRDzkoI/Y2ZA= -cloud.google.com/go/bigquery v1.0.1/go.mod h1:i/xbL2UlR5RvWAURpBYZTtm/cXjCha9lbfbpx4poX+o= -cloud.google.com/go/bigquery v1.3.0/go.mod h1:PjpwJnslEMmckchkHFfq+HTD2DmtT67aNFKH1/VBDHE= -cloud.google.com/go/bigquery v1.4.0/go.mod h1:S8dzgnTigyfTmLBfrtrhyYhwRxG72rYxvftPBK2Dvzc= -cloud.google.com/go/bigquery v1.5.0/go.mod h1:snEHRnqQbz117VIFhE8bmtwIDY80NLUZUMb4Nv6dBIg= -cloud.google.com/go/bigquery v1.7.0/go.mod h1://okPTzCYNXSlb24MZs83e2Do+h+VXtc4gLoIoXIAPc= -cloud.google.com/go/bigquery v1.8.0/go.mod h1:J5hqkt3O0uAFnINi6JXValWIb1v0goeZM77hZzJN/fQ= -cloud.google.com/go/datastore v1.0.0/go.mod h1:LXYbyblFSglQ5pkeyhO+Qmw7ukd3C+pD7TKLgZqpHYE= -cloud.google.com/go/datastore v1.1.0/go.mod h1:umbIZjpQpHh4hmRpGhH4tLFup+FVzqBi1b3c64qFpCk= -cloud.google.com/go/firestore v1.1.0/go.mod h1:ulACoGHTpvq5r8rxGJ4ddJZBZqakUQqClKRT5SZwBmk= -cloud.google.com/go/firestore v1.6.1/go.mod h1:asNXNOzBdyVQmEU+ggO8UPodTkEVFW5Qx+rwHnAz+EY= -cloud.google.com/go/pubsub v1.0.1/go.mod h1:R0Gpsv3s54REJCy4fxDixWD93lHJMoZTyQ2kNxGRt3I= -cloud.google.com/go/pubsub v1.1.0/go.mod h1:EwwdRX2sKPjnvnqCa270oGRyludottCI76h+R3AArQw= -cloud.google.com/go/pubsub v1.2.0/go.mod h1:jhfEVHT8odbXTkndysNHCcx0awwzvfOlguIAii9o8iA= -cloud.google.com/go/pubsub v1.3.1/go.mod h1:i+ucay31+CNRpDW4Lu78I4xXG+O1r/MAHgjpRVR+TSU= -cloud.google.com/go/storage v1.0.0/go.mod h1:IhtSnM/ZTZV8YYJWCY8RULGVqBDmpoyjwiyrjsg+URw= -cloud.google.com/go/storage v1.5.0/go.mod h1:tpKbwo567HUNpVclU5sGELwQWBDZ8gh0ZeosJ0Rtdos= -cloud.google.com/go/storage v1.6.0/go.mod h1:N7U0C8pVQ/+NIKOBQyamJIeKQKkZ+mxpohlUTyfDhBk= -cloud.google.com/go/storage v1.8.0/go.mod h1:Wv1Oy7z6Yz3DshWRJFhqM/UCfaWIRTdp0RXyy7KQOVs= -cloud.google.com/go/storage v1.10.0/go.mod h1:FLPqc6j+Ki4BU591ie1oL6qBQGu2Bl/tZ9ullr3+Kg0= -dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU= -github.com/Azure/go-ansiterm v0.0.0-20210608223527-2377c96fe795/go.mod h1:LmzpDX56iTiv29bbRTIsUNlaFfuhWRQBWjQdVyAevI8= -github.com/Azure/go-ansiterm v0.0.0-20210617225240-d185dfc1b5a1/go.mod h1:xomTg63KZ2rFqZQzSB4Vz2SUXa1BpHTVz9L5PTmPC4E= -github.com/Azure/go-autorest v14.2.0+incompatible/go.mod h1:r+4oMnoxhatjLLJ6zxSWATqVooLgysK6ZNox3g/xq24= -github.com/Azure/go-autorest/autorest v0.11.18/go.mod h1:dSiJPy22c3u0OtOKDNttNgqpNFY/GeWa7GH/Pz56QRA= -github.com/Azure/go-autorest/autorest/adal v0.9.13/go.mod h1:W/MM4U6nLxnIskrw4UwWzlHfGjwUS50aOsc/I3yuU8M= -github.com/Azure/go-autorest/autorest/date v0.3.0/go.mod h1:BI0uouVdmngYNUzGWeSYnokU+TrmwEsOqdt8Y6sso74= -github.com/Azure/go-autorest/autorest/mocks v0.4.1/go.mod h1:LTp+uSrOhSkaKrUy935gNZuuIPPVsHlr9DSOxSayd+k= -github.com/Azure/go-autorest/logger v0.2.1/go.mod h1:T9E3cAhj2VqvPOtCYAvby9aBXkZmbF5NWuPV8+WeEW8= -github.com/Azure/go-autorest/tracing v0.6.0/go.mod h1:+vhtPC754Xsa23ID7GlGsrdKBpUA79WCAKPPZVC2DeU= github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= -github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo= -github.com/DataDog/datadog-go v3.2.0+incompatible/go.mod h1:LButxg5PwREeZtORoXG3tL4fMGNddJ+vMq1mwgfaqoQ= -github.com/NYTimes/gziphandler v0.0.0-20170623195520-56545f4a5d46/go.mod h1:3wb06e3pkSAbeQ52E9H9iFoQsEEwGN64994WTCIhntQ= -github.com/NYTimes/gziphandler v1.1.1/go.mod h1:n/CVRwUEOgIxrgPvAQhUUr9oeUtvrhMomdKFjzJNB0c= github.com/OneOfOne/xxhash v1.2.2/go.mod h1:HSdplMjZKSmBqAxg5vPj2TmRDmfkzw+cTzAElWljhcU= -github.com/PuerkitoBio/purell v1.1.1/go.mod h1:c11w/QuzBsJSee3cPx9rAFu61PvFxuPbtSwDGJws/X0= -github.com/PuerkitoBio/urlesc v0.0.0-20170810143723-de5bf2ad4578/go.mod h1:uGdkoq3SwY9Y+13GIhn11/XLaGBb4BfwItxLd5jeuXE= -github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= -github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= -github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= -github.com/alecthomas/units v0.0.0-20190717042225-c3de453c63f4/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= -github.com/alecthomas/units v0.0.0-20190924025748-f65c72e2690d/go.mod h1:rBZYJk541a8SKzHPHnH3zbiI+7dagKZ0cgpgrD7Fyho= github.com/antihax/optional v1.0.0/go.mod h1:uupD/76wgC+ih3iEmQUL+0Ugr19nfwCT1kdvxnR2qWY= -github.com/antlr/antlr4/runtime/Go/antlr v0.0.0-20210826220005-b48c857c3a0e/go.mod h1:F7bn7fEU90QkQ3tnmaTx3LTKLEDqnwWODIYppRQ5hnY= -github.com/armon/circbuf v0.0.0-20150827004946-bbbad097214e/go.mod h1:3U/XgcO3hCbHZ8TKRvWD2dDTCfh9M9ya+I9JpbB7O8o= -github.com/armon/go-metrics v0.0.0-20180917152333-f0300d1749da/go.mod h1:Q73ZrmVTwzkszR9V5SSuryQ31EELlFMUz1kKyl939pY= -github.com/armon/go-metrics v0.3.10/go.mod h1:4O98XIr/9W0sxpJ8UaYkvjk10Iff7SnFrb4QAOwNTFc= -github.com/armon/go-radix v0.0.0-20180808171621-7fddfc383310/go.mod h1:ufUuZ+zHj4x4TnLV4JWEpy2hxWSpsRywHrMgIH9cCH8= -github.com/armon/go-radix v1.0.0/go.mod h1:ufUuZ+zHj4x4TnLV4JWEpy2hxWSpsRywHrMgIH9cCH8= -github.com/asaskevich/govalidator v0.0.0-20190424111038-f61b66f89f4a/go.mod h1:lB+ZfQJz7igIIfQNfa7Ml4HSf2uFQQRzpGGRXenZAgY= -github.com/benbjohnson/clock v1.0.3/go.mod h1:bGMdMPoPVvcYyt1gHDf4J2KE153Yf9BuiUKYMaxlTDM= github.com/benbjohnson/clock v1.1.0 h1:Q92kusRqC1XV2MjkWETPvjJVqKetz1OzxZB7mHJLju8= github.com/benbjohnson/clock v1.1.0/go.mod h1:J11/hYXuz8f4ySSvYwY0FKfm+ezbsZBKZxNJlLklBHA= -github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q= -github.com/beorn7/perks v1.0.0/go.mod h1:KWe93zE9D1o94FZ5RNwFwVgaQK1VOXiVxmqh+CedLV8= -github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw= -github.com/bgentry/speakeasy v0.1.0/go.mod h1:+zsyZBPWlz7T6j88CTgSN5bM796AkVf0kBD4zp0CCIs= -github.com/bketelsen/crypt v0.0.3-0.20200106085610-5cbc8cc4026c/go.mod h1:MKsuJmJgSg28kpZDP6UIiPt0e0Oz0kqKNGyRaWEPv84= -github.com/bketelsen/crypt v0.0.4/go.mod h1:aI6NrJ0pMGgvZKL1iVgXLnfIFJtfV+bKCoqOes/6LfM= -github.com/blang/semver v3.5.1+incompatible/go.mod h1:kRBLl5iJ+tD4TcOOxsy/0fnwebNt5EWlYSAyrTnjyyk= github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= -github.com/census-instrumentation/opencensus-proto v0.3.0/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= -github.com/certifi/gocertifi v0.0.0-20191021191039-0944d244cd40/go.mod h1:sGbDF6GwGcLpkNXPUTkMRoywsNa/ol15pxFe6ERfguA= -github.com/certifi/gocertifi v0.0.0-20200922220541-2c3bb06c6054/go.mod h1:sGbDF6GwGcLpkNXPUTkMRoywsNa/ol15pxFe6ERfguA= github.com/cespare/xxhash v1.1.0/go.mod h1:XrSqR1VqqWfGrhpAt58auRo0WTKS1nRRg3ghfAqPWnc= github.com/cespare/xxhash/v2 v2.1.1/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= -github.com/cespare/xxhash/v2 v2.1.2/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= -github.com/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWRnGsAI= -github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e/go.mod h1:nSuG5e5PlCu98SY8svDHJxuZscDgtXS6KTTbou5AhLI= -github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1/go.mod h1:Q3SI9o4m/ZMnBNeIyt5eFwwo7qiLfzFZmjNmxjkiQlU= -github.com/circonus-labs/circonus-gometrics v2.3.1+incompatible/go.mod h1:nmEj6Dob7S7YxXgwXpfOuvO54S+tGdZdw9fuRZt25Ag= -github.com/circonus-labs/circonusllhist v0.1.3/go.mod h1:kMXHVDlOchFAehlya5ePtbp5jckzBHf4XRpQvBOLI+I= github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc= -github.com/cncf/udpa/go v0.0.0-20200629203442-efcf912fb354/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk= github.com/cncf/udpa/go v0.0.0-20201120205902-5459f2c99403/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk= github.com/cncf/udpa/go v0.0.0-20210930031921-04548b0d99d4/go.mod h1:6pvJx4me5XPnfI9Z40ddWsdw2W/uZgQLFXToKeRcDiI= github.com/cncf/xds/go v0.0.0-20210312221358-fbca930ec8ed/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= github.com/cncf/xds/go v0.0.0-20210805033703-aa0b78936158/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= github.com/cncf/xds/go v0.0.0-20210922020428-25de7278fc84/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= -github.com/cncf/xds/go v0.0.0-20211001041855-01bcc9b48dfe/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= github.com/cncf/xds/go v0.0.0-20211011173535-cb28da3451f1/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= -github.com/cncf/xds/go v0.0.0-20211130200136-a8f946100490/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= -github.com/cockroachdb/datadriven v0.0.0-20200714090401-bf6692d28da5/go.mod h1:h6jFvWxBdQXxjopDMZyH2UVceIRfR84bdzbkoKrsWNo= -github.com/cockroachdb/errors v1.2.4/go.mod h1:rQD95gz6FARkaKkQXUksEje/d9a6wBJoCr5oaCLELYA= -github.com/cockroachdb/logtags v0.0.0-20190617123548-eb05cc24525f/go.mod h1:i/u985jwjWRlyHXQbwatDASoW0RMlZ/3i9yJHE2xLkI= -github.com/coreos/bbolt v1.3.2/go.mod h1:iRUV2dpdMOn7Bo10OQBFzIJO9kkE559Wcmn+qkEiiKk= -github.com/coreos/etcd v3.3.13+incompatible/go.mod h1:uF7uidLiAD3TWHmW31ZFd/JWoc32PjwdhPthX9715RE= -github.com/coreos/go-oidc v2.1.0+incompatible/go.mod h1:CgnwVTmzoESiwO9qyAFEMiHoZ1nMCKZlZ9V6mm3/LKc= -github.com/coreos/go-semver v0.3.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk= -github.com/coreos/go-systemd v0.0.0-20190321100706-95778dfbb74e/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4= -github.com/coreos/go-systemd/v22 v22.3.2/go.mod h1:Y58oyj3AT4RCenI/lSvhwexgC+NSVTIJ3seZv2GcEnc= -github.com/coreos/pkg v0.0.0-20180928190104-399ea9e2e55f/go.mod h1:E3G3o1h8I7cfcXa63jLwjI0eiQQMgzzUDFVpN/nH/eA= -github.com/cpuguy83/go-md2man/v2 v2.0.0/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU= -github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= -github.com/creack/pty v1.1.11/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/dgrijalva/jwt-go v3.2.0+incompatible/go.mod h1:E3ru+11k8xSBh+hMPgOLZmtrrCbhqsmaPHjLKYnJCaQ= -github.com/dgryski/go-sip13 v0.0.0-20181026042036-e10d5fee7954/go.mod h1:vAd38F8PWV+bWy6jNmig1y/TA+kYO4g3RSRF0IAv0no= -github.com/docopt/docopt-go v0.0.0-20180111231733-ee0de3bc6815/go.mod h1:WwZ+bS3ebgob9U8Nd0kOddGdZWjyMGR8Wziv+TBNwSE= -github.com/dustin/go-humanize v1.0.0/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk= -github.com/elazarl/goproxy v0.0.0-20180725130230-947c36da3153/go.mod h1:/Zj4wYkgs4iZTTu3o/KG3Itv/qCCa8VVMlb3i9OVuzc= -github.com/emicklei/go-restful v0.0.0-20170410110728-ff4f55a20633/go.mod h1:otzb+WCGbkyDHkqmQmT5YD2WR4BBwUdeQoFo8l/7tVs= -github.com/emicklei/go-restful v2.9.5+incompatible/go.mod h1:otzb+WCGbkyDHkqmQmT5YD2WR4BBwUdeQoFo8l/7tVs= github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1mIlRU8Am5FuJP05cCM98= -github.com/envoyproxy/go-control-plane v0.9.7/go.mod h1:cwu0lG7PUMfa9snN8LXBig5ynNVH9qI8YYLbd1fK2po= github.com/envoyproxy/go-control-plane v0.9.9-0.20201210154907-fd9021fe5dad/go.mod h1:cXg6YxExXjJnVBQHBLXeUAgxn2UodCpnH306RInaBQk= -github.com/envoyproxy/go-control-plane v0.9.9-0.20210217033140-668b12f5399d/go.mod h1:cXg6YxExXjJnVBQHBLXeUAgxn2UodCpnH306RInaBQk= github.com/envoyproxy/go-control-plane v0.9.9-0.20210512163311-63b5d3c536b0/go.mod h1:hliV/p42l8fGbc6Y9bQ70uLwIvmJyVE5k4iMKlh8wCQ= github.com/envoyproxy/go-control-plane v0.9.10-0.20210907150352-cf90f659a021/go.mod h1:AFq3mo9L8Lqqiid3OhADV3RfLJnjiw63cSpi+fDTRC0= -github.com/envoyproxy/go-control-plane v0.10.1/go.mod h1:AY7fTTXNdv/aJ2O5jwpxAPOWUZ7hQAEvzN5Pf27BkQQ= github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= -github.com/envoyproxy/protoc-gen-validate v0.6.2/go.mod h1:2t7qjJNvHPx8IjnBOzl9E9/baC+qXE/TeeyBRzgJDws= -github.com/evanphx/json-patch v0.5.2/go.mod h1:ZWS5hhDbVDyob71nXKNL0+PWn6ToqBHMikGIFbs31qQ= -github.com/evanphx/json-patch v4.12.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk= -github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4= -github.com/fatih/color v1.9.0/go.mod h1:eQcE1qtQxscV5RaZvpXrrb8Drkc3/DdQ+uUYCNjL+zU= github.com/fatih/color v1.13.0 h1:8LOYc1KYPPmyKMuN8QV2DNRWNbLo6LZ0iLs8+mlH53w= github.com/fatih/color v1.13.0/go.mod h1:kLAiJbzzSOZDVNGyDpeOxJ47H46qBXwg5ILebYFFOfk= -github.com/felixge/httpsnoop v1.0.1/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSwevea8zH2U= -github.com/form3tech-oss/jwt-go v3.2.2+incompatible/go.mod h1:pbq4aXjuKjdthFRnoDwaVPLA+WlJuPGy+QneDUgJi2k= -github.com/form3tech-oss/jwt-go v3.2.3+incompatible/go.mod h1:pbq4aXjuKjdthFRnoDwaVPLA+WlJuPGy+QneDUgJi2k= -github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo= -github.com/fsnotify/fsnotify v1.4.9/go.mod h1:znqG4EE+3YCdAaPaxE2ZRY/06pZUdp0tY4IgpuI1SZQ= github.com/fsnotify/fsnotify v1.5.1 h1:mZcQUHVQUQWoPXXtuf9yuEXKudkV2sx1E06UadKWpgI= github.com/fsnotify/fsnotify v1.5.1/go.mod h1:T3375wBYaZdLLcVNkcVbzGHY7f1l/uK5T5Ai1i3InKU= -github.com/getkin/kin-openapi v0.76.0/go.mod h1:660oXbgy5JFMKreazJaQTw7o+X00qeSyhcnluiMv+Xg= -github.com/getsentry/raven-go v0.2.0/go.mod h1:KungGk8q33+aIAZUIVWZDr2OfAEBsO49PX4NzFV5kcQ= github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= -github.com/go-gl/glfw v0.0.0-20190409004039-e6da0acd62b1/go.mod h1:vR7hzQXu2zJy9AVAgeJqvqgH9Q5CA+iKCZ2gyEVpxRU= -github.com/go-gl/glfw/v3.3/glfw v0.0.0-20191125211704-12ad95a8df72/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= -github.com/go-gl/glfw/v3.3/glfw v0.0.0-20200222043503-6f7a984d4dc4/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= -github.com/go-kit/kit v0.8.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= -github.com/go-kit/kit v0.9.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= -github.com/go-kit/log v0.1.0/go.mod h1:zbhenjAZHb184qTLMA9ZjW7ThYL0H2mk7Q6pNt4vbaY= -github.com/go-logfmt/logfmt v0.3.0/go.mod h1:Qt1PoO58o5twSAckw1HlFXLmHsOX5/0LbT9GBnD5lWE= -github.com/go-logfmt/logfmt v0.4.0/go.mod h1:3RMwSq7FuexP4Kalkev3ejPJsZTpXXBr9+V4qmtdjCk= -github.com/go-logfmt/logfmt v0.5.0/go.mod h1:wCYkCAKZfumFQihp8CzCvQ3paCTfi41vtzG1KdI/P7A= -github.com/go-logr/logr v0.1.0/go.mod h1:ixOQHD9gLJUVQQ2ZOR7zLEifBX6tGkNJF4QyIY7sIas= -github.com/go-logr/logr v0.2.0/go.mod h1:z6/tIYblkpsD+a4lm/fGIIU9mZ+XfAiaFtq7xTgseGU= -github.com/go-logr/logr v1.2.0/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= -github.com/go-logr/zapr v1.2.0/go.mod h1:Qa4Bsj2Vb+FAVeAKsLD8RLQ+YRJB8YDmOAKxaBQf7Ro= -github.com/go-openapi/jsonpointer v0.19.3/go.mod h1:Pl9vOtqEWErmShwVjC8pYs9cog34VGT37dQOVbmoatg= -github.com/go-openapi/jsonpointer v0.19.5/go.mod h1:Pl9vOtqEWErmShwVjC8pYs9cog34VGT37dQOVbmoatg= -github.com/go-openapi/jsonreference v0.19.3/go.mod h1:rjx6GuL8TTa9VaixXglHmQmIL98+wF9xc8zWvFonSJ8= -github.com/go-openapi/jsonreference v0.19.5/go.mod h1:RdybgQwPxbL4UEjuAruzK1x3nE69AqPYEJeo/TWfEeg= -github.com/go-openapi/swag v0.19.5/go.mod h1:POnQmlKehdgb5mhVOsnJFsivZCEZ/vjK9gh66Z9tfKk= -github.com/go-openapi/swag v0.19.14/go.mod h1:QYRuS/SOXUCsnplDa677K7+DxSOj6IPNl/eQntq43wQ= -github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY= -github.com/go-task/slim-sprig v0.0.0-20210107165309-348f09dbbbc0/go.mod h1:fyg7847qk6SyHyPtNmDHnmrv/HOrqktSC+C9fM+CJOE= -github.com/godbus/dbus/v5 v5.0.4/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA= -github.com/gogo/protobuf v1.1.1/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= -github.com/gogo/protobuf v1.2.1/go.mod h1:hp+jE20tsWTFYpLwKvXlhS1hjn+gTNwPg2I6zVXpSg4= -github.com/gogo/protobuf v1.3.1/go.mod h1:SlYgWuQ5SjCEi6WLHjHCa1yvBfUnHcTbrrZtXPKa29o= github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q= github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q= github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= github.com/golang/glog v1.0.0 h1:nfP3RFugxnNRyKgeWd4oI1nYvXpxrx8ck8ZrcizshdQ= -github.com/golang/glog v1.0.0/go.mod h1:EWib/APOK0SL3dFbYqvxE3UYd8E6s1ouQ7iEp/0LWV4= -github.com/golang/groupcache v0.0.0-20190129154638-5b532d6fd5ef/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= -github.com/golang/groupcache v0.0.0-20190702054246-869f871628b6/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= -github.com/golang/groupcache v0.0.0-20191227052852-215e87163ea7/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= -github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= -github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= -github.com/golang/mock v1.2.0/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= -github.com/golang/mock v1.3.1/go.mod h1:sBzyDLLjw3U8JLTeZvSv8jJB+tU5PVekmnlKIyFUx0Y= -github.com/golang/mock v1.4.0/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= -github.com/golang/mock v1.4.1/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= -github.com/golang/mock v1.4.3/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= -github.com/golang/mock v1.4.4/go.mod h1:l3mdAwkq5BuhzHwde/uurv3sEJeZMXNpwsxVWU71h+4= -github.com/golang/mock v1.5.0/go.mod h1:CWnOUgYIOo4TcNZ0wHX3YZCqsaM1I1Jvs6v3mP3KVu8= -github.com/golang/mock v1.6.0/go.mod h1:p6yTPP+5HYm5mzsMV8JkE6ZKdX+/wYM6Hr+LicevLPs= github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= -github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.3.3/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw= -github.com/golang/protobuf v1.3.4/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw= -github.com/golang/protobuf v1.3.5/go.mod h1:6O5/vntMXwX2lRkT1hjjk0nAC1IDOTvTlVgjlRvqsdk= github.com/golang/protobuf v1.4.0-rc.1/go.mod h1:ceaxUfeHdC40wWswd/P6IGgMaK3YpKi5j83Wpe3EHw8= github.com/golang/protobuf v1.4.0-rc.1.0.20200221234624-67d41d38c208/go.mod h1:xKAWHe0F5eneWXFV3EuXVDTCmh+JuBKY0li0aMyXATA= github.com/golang/protobuf v1.4.0-rc.2/go.mod h1:LlEzMj4AhA7rCAGe4KMBDvJI+AwstrUpVNzEA03Pprs= @@ -218,49 +48,15 @@ github.com/golang/protobuf v1.4.1/go.mod h1:U8fpvMrcmy5pZrNK1lt4xCsGvpyWQ/VVv6QD github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= github.com/golang/protobuf v1.4.3/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk= -github.com/golang/protobuf v1.5.1/go.mod h1:DopwsBzvsk0Fs44TXzsVbJyPhcCPeIwnvohx4u74HPM= github.com/golang/protobuf v1.5.2 h1:ROPKBNFfQgOUMifHyP+KYbvpjbdoFNs+aK7DXlji0Tw= github.com/golang/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= -github.com/golang/snappy v0.0.3/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= -github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= -github.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= -github.com/google/btree v1.0.1/go.mod h1:xXMiIv4Fb/0kKde4SpL7qlzvu5cMJDRkFDxJfI9uaxA= -github.com/google/cel-go v0.9.0/go.mod h1:U7ayypeSkw23szu4GaQTPJGx66c20mx8JklMSxrmI1w= -github.com/google/cel-spec v0.6.0/go.mod h1:Nwjgxy5CbjlPrtCWjeDjUyKMl8w41YBYGjsyDdqk0xA= github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M= github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.4.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.2/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.3/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.4/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.6 h1:BKbKCqvP6I+rmFHt06ZmyQtvB8xAkWdhFyr0ZUNZcxQ= -github.com/google/go-cmp v0.5.6/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= -github.com/google/gofuzz v1.1.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= -github.com/google/martian v2.1.0+incompatible/go.mod h1:9I4somxYTbIHy5NJKHRl3wXiIaQGbYVAs8BPL6v8lEs= -github.com/google/martian/v3 v3.0.0/go.mod h1:y5Zk1BBys9G+gd6Jrk0W3cC1+ELVxBWuIGO+w/tUAp0= -github.com/google/martian/v3 v3.1.0/go.mod h1:y5Zk1BBys9G+gd6Jrk0W3cC1+ELVxBWuIGO+w/tUAp0= -github.com/google/martian/v3 v3.2.1/go.mod h1:oBOf6HBosgwRXnUGWUB05QECsc6uvmMiJ3+6W4l/CUk= -github.com/google/pprof v0.0.0-20181206194817-3ea8567a2e57/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= -github.com/google/pprof v0.0.0-20190515194954-54271f7e092f/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= -github.com/google/pprof v0.0.0-20191218002539-d4f498aebedc/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= -github.com/google/pprof v0.0.0-20200212024743-f11f1df84d12/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= -github.com/google/pprof v0.0.0-20200229191704-1ebb73c60ed3/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= -github.com/google/pprof v0.0.0-20200430221834-fc25d7d30c6d/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= -github.com/google/pprof v0.0.0-20200708004538-1a94d8640e99/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= -github.com/google/pprof v0.0.0-20201023163331-3e6fc7fc9c4c/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= -github.com/google/pprof v0.0.0-20201203190320-1bf35d6f28c2/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= -github.com/google/pprof v0.0.0-20210122040257-d980be63207e/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= -github.com/google/pprof v0.0.0-20210226084205-cbba55b83ad5/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= -github.com/google/pprof v0.0.0-20210601050228-01bbb1931b22/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= -github.com/google/pprof v0.0.0-20210609004039-a478d1d731e9/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= -github.com/google/pprof v0.0.0-20210720184732-4bb14d4b1be1/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= -github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI= github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/google/uuid v1.3.0 h1:t6JiXgmwXMjEs8VusXIJk2BXHsn+wx8BZdTaoZ5fu7I= github.com/google/uuid v1.3.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= @@ -282,241 +78,64 @@ github.com/grpc-ecosystem/grpc-gateway v1.16.0 h1:gmcG1KaJ57LophUzW0Hy8NmPhnMZb4 github.com/grpc-ecosystem/grpc-gateway v1.16.0/go.mod h1:BDjrQk3hbvj6Nolgz8mAMFbcEtjT1g+wF4CSlocrBnw= github.com/grpc-ecosystem/grpc-gateway/v2 v2.7.2 h1:I/pwhnUln5wbMnTyRbzswA0/JxpK8sZj0aUfI3TV1So= github.com/grpc-ecosystem/grpc-gateway/v2 v2.7.2/go.mod h1:lsuH8kb4GlMdSlI4alNIBBSAt5CHJtg3i+0WuN9J5YM= -github.com/hashicorp/consul/api v1.1.0/go.mod h1:VmuI/Lkw1nC05EYQWNKwWGbkg+FbDBtguAZLlVdkD9Q= -github.com/hashicorp/consul/api v1.12.0/go.mod h1:6pVBMo0ebnYdt2S3H87XhekM/HHrUoTD2XXb/VrZVy0= -github.com/hashicorp/consul/sdk v0.1.1/go.mod h1:VKf9jXwCTEY1QZP2MOLRhb5i/I/ssyNV1vwHyQBF0x8= -github.com/hashicorp/consul/sdk v0.8.0/go.mod h1:GBvyrGALthsZObzUGsfgHZQDXjg4lOjagTIwIR1vPms= -github.com/hashicorp/errwrap v1.0.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4= -github.com/hashicorp/go-cleanhttp v0.5.0/go.mod h1:JpRdi6/HCYpAwUzNwuwqhbovhLtngrth3wmdIIUrZ80= -github.com/hashicorp/go-cleanhttp v0.5.1/go.mod h1:JpRdi6/HCYpAwUzNwuwqhbovhLtngrth3wmdIIUrZ80= -github.com/hashicorp/go-cleanhttp v0.5.2/go.mod h1:kO/YDlP8L1346E6Sodw+PrpBSV4/SoxCXGY6BqNFT48= -github.com/hashicorp/go-hclog v0.12.0/go.mod h1:whpDNt7SSdeAju8AWKIWsul05p54N/39EeqMAyrmvFQ= -github.com/hashicorp/go-hclog v1.0.0/go.mod h1:whpDNt7SSdeAju8AWKIWsul05p54N/39EeqMAyrmvFQ= -github.com/hashicorp/go-immutable-radix v1.0.0/go.mod h1:0y9vanUI8NX6FsYoO3zeMjhV/C5i9g4Q3DwcSNZ4P60= -github.com/hashicorp/go-immutable-radix v1.3.1/go.mod h1:0y9vanUI8NX6FsYoO3zeMjhV/C5i9g4Q3DwcSNZ4P60= -github.com/hashicorp/go-msgpack v0.5.3/go.mod h1:ahLV/dePpqEmjfWmKiqvPkv/twdG7iPBM1vqhUKIvfM= -github.com/hashicorp/go-multierror v1.0.0/go.mod h1:dHtQlpGsu+cZNNAkkCN/P3hoUDHhCYQXV3UM06sGGrk= -github.com/hashicorp/go-multierror v1.1.0/go.mod h1:spPvp8C1qA32ftKqdAHm4hHTbPw+vmowP0z+KUhOZdA= -github.com/hashicorp/go-retryablehttp v0.5.3/go.mod h1:9B5zBasrRhHXnJnui7y6sL7es7NDiJgTc6Er0maI1Xs= -github.com/hashicorp/go-rootcerts v1.0.0/go.mod h1:K6zTfqpRlCUIjkwsN4Z+hiSfzSTQa6eBIzfwKfwNnHU= -github.com/hashicorp/go-rootcerts v1.0.2/go.mod h1:pqUvnprVnM5bf7AOirdbb01K4ccR319Vf4pU3K5EGc8= -github.com/hashicorp/go-sockaddr v1.0.0/go.mod h1:7Xibr9yA9JjQq1JpNB2Vw7kxv8xerXegt+ozgdvDeDU= -github.com/hashicorp/go-syslog v1.0.0/go.mod h1:qPfqrKkXGihmCqbJM2mZgkZGvKG1dFdvsLplgctolz4= -github.com/hashicorp/go-uuid v1.0.0/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= -github.com/hashicorp/go-uuid v1.0.1/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= -github.com/hashicorp/go.net v0.0.1/go.mod h1:hjKkEWcCURg++eb33jQU7oqQcI9XDCnUzHA0oac0k90= -github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= -github.com/hashicorp/golang-lru v0.5.1/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= -github.com/hashicorp/golang-lru v0.5.4/go.mod h1:iADmTwqILo4mZ8BN3D2Q6+9jd8WM5uGBxy+E8yxSoD4= github.com/hashicorp/hcl v1.0.0 h1:0Anlzjpi4vEasTeNFn2mLJgTSwt0+6sfsiTG8qcWGx4= github.com/hashicorp/hcl v1.0.0/go.mod h1:E5yfLk+7swimpb2L/Alb/PJmXilQ/rhwaUYs4T20WEQ= -github.com/hashicorp/logutils v1.0.0/go.mod h1:QIAnNjmIWmVIIkWDTG1z5v++HQmx9WQRO+LraFDTW64= -github.com/hashicorp/mdns v1.0.0/go.mod h1:tL+uN++7HEJ6SQLQ2/p+z2pH24WQKWjBPkE0mNTz8vQ= -github.com/hashicorp/mdns v1.0.4/go.mod h1:mtBihi+LeNXGtG8L9dX59gAEa12BDtBQSp4v/YAJqrc= -github.com/hashicorp/memberlist v0.1.3/go.mod h1:ajVTdAv/9Im8oMAAj5G31PhhMCZJV2pPBoIllUwCN7I= -github.com/hashicorp/memberlist v0.3.0/go.mod h1:MS2lj3INKhZjWNqd3N0m3J+Jxf3DAOnAH9VT3Sh9MUE= -github.com/hashicorp/serf v0.8.2/go.mod h1:6hOLApaqBFA1NXqRQAsxw9QxuDEvNxSQRwA/JwenrHc= -github.com/hashicorp/serf v0.9.6/go.mod h1:TXZNMjZQijwlDvp+r0b63xZ45H7JmCmgg4gpTwn9UV4= -github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU= -github.com/iancoleman/strcase v0.2.0/go.mod h1:iwCmte+B7n89clKwxIoIXy/HfoL7AsD47ZCWhYzw7ho= -github.com/ianlancetaylor/demangle v0.0.0-20181102032728-5e5cf60278f6/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= -github.com/ianlancetaylor/demangle v0.0.0-20200824232613-28f6c0f3b639/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= -github.com/imdario/mergo v0.3.5/go.mod h1:2EnlNZ0deacrJVfApfmtdGgDfMuh/nq6Ok1EcJh5FfA= -github.com/imdario/mergo v0.3.12/go.mod h1:jmQim1M+e3UYxmgPu/WyfjB3N3VflVyUjjjwH0dnCYA= -github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8= -github.com/jessevdk/go-flags v1.4.0/go.mod h1:4FA24M0QyGHXBuZZK/XkWh8h0e1EYbRYJSGM75WSRxI= github.com/jinzhu/inflection v1.0.0 h1:K317FqzuhWc8YvSVlFMCCUb36O/S9MCKRDI7QkRKD/E= github.com/jinzhu/inflection v1.0.0/go.mod h1:h+uFLlag+Qp1Va5pdKtLDYj+kHp5pxUVkryuEj+Srlc= -github.com/jonboulle/clockwork v0.1.0/go.mod h1:Ii8DK3G1RaLaWxj9trq07+26W01tbo22gdxWY5EU2bo= -github.com/jonboulle/clockwork v0.2.2/go.mod h1:Pkfl5aHPm1nk2H9h0bjmnJD/BcgbGXUBGnn1kMkgxc8= -github.com/josharian/intern v1.0.0/go.mod h1:5DoeVV0s6jJacbCEi61lwdGj/aVlrQvzHFFd8Hwg//Y= -github.com/jpillora/backoff v1.0.0/go.mod h1:J/6gKK9jxlEcS3zixgDgUAsiuZ7yrSoa/FX5e0EB2j4= -github.com/json-iterator/go v1.1.6/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU= -github.com/json-iterator/go v1.1.9/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= -github.com/json-iterator/go v1.1.10/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= -github.com/json-iterator/go v1.1.11/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= -github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHmT4TnhNGBo= -github.com/jstemmer/go-junit-report v0.0.0-20190106144839-af01ea7f8024/go.mod h1:6v2b51hI/fHJwM22ozAgKL4VKDeJcHhJFhtBdhmNjmU= -github.com/jstemmer/go-junit-report v0.9.1/go.mod h1:Brl9GWCQeLvo8nXZwPNNblvFj/XSXhF0NWZEnDohbsk= -github.com/jtolds/gls v4.20.0+incompatible/go.mod h1:QJZ7F/aHp+rZTRtaJ1ow/lLfFfVYBRgL+9YlvaHOwJU= -github.com/julienschmidt/httprouter v1.2.0/go.mod h1:SYymIcj16QtmaHHD7aYtjjsJG7VTCxuUUipMqKk8s4w= github.com/julienschmidt/httprouter v1.3.0 h1:U0609e9tgbseu3rBINet9P48AI/D3oJs4dN7jwJOQ1U= github.com/julienschmidt/httprouter v1.3.0/go.mod h1:JR6WtHb+2LUe8TCKY3cZOxFyyO8IZAc4RVcycCCAKdM= -github.com/kisielk/errcheck v1.1.0/go.mod h1:EZBBE59ingxPouuu3KfxchcWSUPOHkagtvWXihfKN4Q= -github.com/kisielk/errcheck v1.2.0/go.mod h1:/BMXB+zMLi60iA8Vv6Ksmxu/1UDYcXs4uQLJ+jE2L00= github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8= github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= github.com/klauspost/cpuid/v2 v2.0.6 h1:dQ5ueTiftKxp0gyjKSx5+8BtPWkyQbd95m8Gys/RarI= github.com/klauspost/cpuid/v2 v2.0.6/go.mod h1:FInQzS24/EEf25PyTYn52gqo7WaD8xa0213Md/qVLRg= -github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= -github.com/konsorten/go-windows-terminal-sequences v1.0.3/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= github.com/kr/fs v0.1.0/go.mod h1:FFnZGqtBN9Gxj7eW1uZ42v5BccTP0vu6NEaFoC2HwRg= -github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515/go.mod h1:+0opPa2QZZtGFBFZlji/RkVcI2GknAs/DXo4wKdlNEc= +github.com/kr/pretty v0.1.0 h1:L/CwN0zerZDmRFUapSPitk6f+Q3+0za1rQkzVuMiMFI= github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= -github.com/kr/pretty v0.2.0/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= +github.com/kr/text v0.1.0 h1:45sCR5RtlFHMR4UwH9sdQ5TC8v0qDQCHnXt+kaKSTVE= github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= -github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= -github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= -github.com/lyft/protoc-gen-star v0.5.3/go.mod h1:V0xaHgaf5oCCqmcxYcWiDfTiKsZsRc87/1qhoTACD8w= -github.com/magiconair/properties v1.8.1/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ= github.com/magiconair/properties v1.8.5 h1:b6kJs+EmPFMYGkow9GiUyCyOvIwYetYJ3fSaWak/Gls= github.com/magiconair/properties v1.8.5/go.mod h1:y3VJvCyxH9uVvJTWEGAELF3aiYNyPKd5NZ3oSwXrF60= -github.com/mailru/easyjson v0.0.0-20190614124828-94de47d64c63/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= -github.com/mailru/easyjson v0.0.0-20190626092158-b2ccc519800e/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= -github.com/mailru/easyjson v0.7.6/go.mod h1:xzfreul335JAWq5oZzymOObrkdz5UnU4kGfJJLY9Nlc= -github.com/mattn/go-colorable v0.0.9/go.mod h1:9vuHe8Xs5qXnSaW/c/ABM9alt+Vo+STaOChaDxuIBZU= -github.com/mattn/go-colorable v0.1.4/go.mod h1:U0ppj6V5qS13XJ6of8GYAs25YV2eR4EVcfRqFIhoBtE= -github.com/mattn/go-colorable v0.1.6/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc= github.com/mattn/go-colorable v0.1.9/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc= github.com/mattn/go-colorable v0.1.12 h1:jF+Du6AlPIjs2BiUiQlKOX0rt3SujHxPnksPKZbaA40= github.com/mattn/go-colorable v0.1.12/go.mod h1:u5H1YNBxpqRaxsYJYSkiCWKzEfiAb1Gb520KVy5xxl4= -github.com/mattn/go-isatty v0.0.3/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4= -github.com/mattn/go-isatty v0.0.8/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hdxcsrc5s= -github.com/mattn/go-isatty v0.0.10/go.mod h1:qgIWMr58cqv1PHHyhnkY9lrL7etaEgOFcMEpPG5Rm84= -github.com/mattn/go-isatty v0.0.11/go.mod h1:PhnuNfih5lzO57/f3n+odYbM4JtupLOxQOAqxQCu2WE= github.com/mattn/go-isatty v0.0.12/go.mod h1:cbi8OIDigv2wuxKPP5vlRcQ1OAZbq2CE4Kysco4FUpU= github.com/mattn/go-isatty v0.0.14 h1:yVuAays6BHfxijgZPzw+3Zlu5yQgKGP2/hcQbHb7S9Y= github.com/mattn/go-isatty v0.0.14/go.mod h1:7GGIvUiUoEMVVmxf/4nioHXj79iQHKdU27kJ6hsGG94= -github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0= -github.com/matttproud/golang_protobuf_extensions v1.0.2-0.20181231171920-c182affec369/go.mod h1:BSXmuO+STAnVfrANrmjBb36TMTDstsz7MSK+HVaYKv4= -github.com/miekg/dns v1.0.14/go.mod h1:W1PPwlIAgtquWBMBEV9nkV9Cazfe8ScdGz/Lj7v3Nrg= -github.com/miekg/dns v1.1.26/go.mod h1:bPDLeHnStXmXAq1m/Ch/hvfNHr14JKNPMBo3VZKjuso= -github.com/miekg/dns v1.1.41/go.mod h1:p6aan82bvRIyn+zDIv9xYNUpwa73JcSh9BKwknJysuI= -github.com/mitchellh/cli v1.0.0/go.mod h1:hNIlj7HEI86fIcpObd7a0FcrxTWetlwJDGcceTlRvqc= -github.com/mitchellh/cli v1.1.0/go.mod h1:xcISNoH86gajksDmfB23e/pu+B+GeFRMYmoHXxx3xhI= -github.com/mitchellh/go-homedir v1.0.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0= -github.com/mitchellh/go-homedir v1.1.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0= -github.com/mitchellh/go-testing-interface v1.0.0/go.mod h1:kRemZodwjscx+RGhAo8eIhFbs2+BFgRtFPeD/KE+zxI= -github.com/mitchellh/gox v0.4.0/go.mod h1:Sd9lOJ0+aimLBi73mGofS1ycjY8lL3uZM3JPS42BGNg= -github.com/mitchellh/iochan v1.0.0/go.mod h1:JwYml1nuB7xOzsp52dPpHFffvOCDupsG0QubkSMEySY= -github.com/mitchellh/mapstructure v0.0.0-20160808181253-ca63d7c062ee/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= -github.com/mitchellh/mapstructure v1.1.2/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= -github.com/mitchellh/mapstructure v1.4.1/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= github.com/mitchellh/mapstructure v1.4.3 h1:OVowDSCllw/YjdLkam3/sm7wEtOy59d8ndGgCcyj8cs= github.com/mitchellh/mapstructure v1.4.3/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= -github.com/moby/spdystream v0.2.0/go.mod h1:f7i0iNDQJ059oMTcWxx8MA/zKFIuD/lY+0GqbN2Wy8c= -github.com/moby/term v0.0.0-20210610120745-9d4ed1856297/go.mod h1:vgPCkQMyxTZ7IDy8SXRufE172gr8+K/JE/7hHFxHW3A= -github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= -github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= -github.com/modern-go/reflect2 v0.0.0-20180701023420-4b7aa43c6742/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= -github.com/modern-go/reflect2 v1.0.1/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= -github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk= -github.com/munnerz/goautoneg v0.0.0-20120707110453-a547fc61f48d/go.mod h1:+n7T8mK8HuQTcFwEeznm/DIxMOiR9yIdICNftLE1DvQ= -github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822/go.mod h1:+n7T8mK8HuQTcFwEeznm/DIxMOiR9yIdICNftLE1DvQ= -github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= -github.com/mwitkow/go-conntrack v0.0.0-20190716064945-2f068394615f/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= -github.com/mxk/go-flowrate v0.0.0-20140419014527-cca7078d478f/go.mod h1:ZdcZmHo+o7JKHSa8/e818NopupXU1YMK5fe1lsApnBw= -github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e h1:fD57ERR4JtEqsWbfPhv4DMiApHyliiK5xCTNVSPiaAs= -github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e/go.mod h1:zD1mROLANZcx1PVRCS0qkT7pwLkGfwJo4zjcN/Tysno= -github.com/nxadm/tail v1.4.4/go.mod h1:kenIhsEOeOJmVchQTgglprH7qJGnHDVpk1VPCcaMI8A= github.com/nxadm/tail v1.4.8 h1:nPr65rt6Y5JFSKQO7qToXr7pePgD6Gwiw05lkbyAQTE= -github.com/nxadm/tail v1.4.8/go.mod h1:+ncqLTQzXmGhMZNUePPaPqPvBxHAIsmXswZKocGu+AU= -github.com/oklog/ulid v1.3.1/go.mod h1:CirwcVhetQ6Lv90oh/F+FBtV6XMibvdAFo93nm5qn4U= -github.com/onsi/ginkgo v0.0.0-20170829012221-11459a886d9c/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= -github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= -github.com/onsi/ginkgo v1.12.1/go.mod h1:zj2OWP4+oCPe1qIXoGWkgMRwljMUYCdkwsT2108oapk= -github.com/onsi/ginkgo v1.14.0/go.mod h1:iSB4RoI2tjJc9BBv4NKIKWKya62Rps+oPG/Lv9klQyY= -github.com/onsi/ginkgo v1.16.4/go.mod h1:dX+/inL/fNMqNlz0e9LfyB9TswhZpCVdJM/Z6Vvnwo0= github.com/onsi/ginkgo v1.16.5 h1:8xi0RTUf59SOSfEtZMvwTvXYMzG4gV23XVHOZiXNtnE= -github.com/onsi/ginkgo v1.16.5/go.mod h1:+E8gABHa3K6zRBolWtd+ROzc/U5bkGt0FwiG042wbpU= -github.com/onsi/gomega v0.0.0-20170829124025-dcabb60a477c/go.mod h1:C1qb7wdrVGGVU+Z6iS04AVkA3Q65CEZX59MT0QO5uiA= -github.com/onsi/gomega v1.7.1/go.mod h1:XdKZgCCFLUoM/7CFJVPcG8C1xQ1AJ0vpAezJrB7JYyY= -github.com/onsi/gomega v1.10.1/go.mod h1:iN09h71vgCQne3DLsj+A5owkum+a2tYe+TOCB1ybHNo= github.com/onsi/gomega v1.17.0 h1:9Luw4uT5HTjHTN8+aNcSThgH1vdXnmdJ8xIfZ4wyTRE= -github.com/onsi/gomega v1.17.0/go.mod h1:HnhC7FXeEQY45zxNK3PPoIUhzk/80Xly9PcubAlGdZY= -github.com/opentracing/opentracing-go v1.1.0/go.mod h1:UkNAQd3GIcIGf0SeVgPpRdFStlNbqXla1AfSYxPUl2o= -github.com/pascaldekloe/goe v0.0.0-20180627143212-57f6aae5913c/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144TG7ZOy1lc= -github.com/pascaldekloe/goe v0.1.0/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144TG7ZOy1lc= -github.com/pelletier/go-toml v1.2.0/go.mod h1:5z9KED0ma1S8pY6P1sdut58dfprrGBbd/94hg7ilaic= -github.com/pelletier/go-toml v1.9.3/go.mod h1:u1nR/EPcESfeI/szUZKdtJ0xRNbUoANCkoOuaOx1Y+c= github.com/pelletier/go-toml v1.9.4 h1:tjENF6MfZAg8e4ZmZTeWaWiT2vXtsoO6+iuOjFhECwM= github.com/pelletier/go-toml v1.9.4/go.mod h1:u1nR/EPcESfeI/szUZKdtJ0xRNbUoANCkoOuaOx1Y+c= -github.com/peterbourgon/diskv v2.0.1+incompatible/go.mod h1:uqqh8zWWbv1HBMNONnaR/tNboyR3/BZd58JJSHlUSCU= -github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= -github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/sftp v1.10.1/go.mod h1:lYOWFsE0bwd1+KfKJaKeuokY15vzFx25BLbzYYoAxZI= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= -github.com/posener/complete v1.1.1/go.mod h1:em0nMJCgc9GFtwrmVmEMR/ZL6WyhyjMBndrE9hABlRI= -github.com/posener/complete v1.2.3/go.mod h1:WZIdtGGp+qx0sLrYKtIRAruyNpv6hFCicSgv7Sy7s/s= -github.com/pquerna/cachecontrol v0.0.0-20171018203845-0dec1b30a021/go.mod h1:prYjPmNq4d1NPVmpShWobRqXY3q7Vp+80DqgxxUrUIA= github.com/processout/grpc-go-pool v1.2.1 h1:hbp1BOA02CIxEAoRLHGpUhhPFv77nwfBLBeO3Ya9P7I= github.com/processout/grpc-go-pool v1.2.1/go.mod h1:F4hiNj96O6VQ87jv4rdz8R9tkHdelQQJ/J2B1a5VSt4= -github.com/prometheus/client_golang v0.9.1/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw= -github.com/prometheus/client_golang v0.9.3/go.mod h1:/TN21ttK/J9q6uSwhBd54HahCDft0ttaMvbicHlPoso= -github.com/prometheus/client_golang v1.0.0/go.mod h1:db9x61etRT2tGnBNRi70OPL5FsnadC4Ky3P0J6CfImo= -github.com/prometheus/client_golang v1.4.0/go.mod h1:e9GMxYsXl05ICDXkRhurwBS4Q3OK1iX/F2sw+iXX5zU= -github.com/prometheus/client_golang v1.7.1/go.mod h1:PY5Wy2awLA44sXw4AOSfFBetzPP4j5+D6mVACh+pe2M= -github.com/prometheus/client_golang v1.11.0/go.mod h1:Z6t4BnS23TR94PD6BsDNk8yVqroYurpAkEiz0P2BEV0= -github.com/prometheus/client_model v0.0.0-20180712105110-5c3871d89910/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= -github.com/prometheus/client_model v0.0.0-20190129233127-fd36f4220a90/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= -github.com/prometheus/client_model v0.2.0/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= -github.com/prometheus/common v0.0.0-20181113130724-41aa239b4cce/go.mod h1:daVV7qP5qjZbuso7PdcryaAu0sAZbrN9i7WWcTMWvro= -github.com/prometheus/common v0.4.0/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= -github.com/prometheus/common v0.4.1/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= -github.com/prometheus/common v0.9.1/go.mod h1:yhUN8i9wzaXS3w1O07YhxHEBxD+W35wd8bs7vj7HSQ4= -github.com/prometheus/common v0.10.0/go.mod h1:Tlit/dnDKsSWFlCLTWaA1cyBgKHSMdTB80sz/V91rCo= -github.com/prometheus/common v0.26.0/go.mod h1:M7rCNAaPfAosfx8veZJCuw84e35h3Cfd9VFqTh1DIvc= -github.com/prometheus/common v0.28.0/go.mod h1:vu+V0TpY+O6vW9J44gczi3Ap/oXXR10b+M/gUGO4Hls= -github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= -github.com/prometheus/procfs v0.0.0-20190507164030-5867b95ac084/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= -github.com/prometheus/procfs v0.0.2/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= -github.com/prometheus/procfs v0.0.8/go.mod h1:7Qr8sr6344vo1JqZ6HhLceV9o3AJ1Ff+GxbHq6oeK9A= -github.com/prometheus/procfs v0.1.3/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4OA4YeYWdaU= -github.com/prometheus/procfs v0.6.0/go.mod h1:cz+aTbrPOrUb4q7XlbU9ygM+/jj0fzG6c1xBZuNvfVA= -github.com/prometheus/tsdb v0.7.1/go.mod h1:qhTCs0VvXwvX/y3TZrWD7rabWM+ijKTux40TwIPHuXU= -github.com/rogpeppe/fastuuid v0.0.0-20150106093220-6724a57986af/go.mod h1:XWv6SoW27p1b0cqNHllgS5HIMJraePCO15w5zCzIWYg= github.com/rogpeppe/fastuuid v1.2.0/go.mod h1:jVj6XXZzXRy/MSR5jhDC/2q6DgLz+nrA6LYCDYWNEvQ= -github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= -github.com/russross/blackfriday/v2 v2.0.1/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= -github.com/ryanuber/columnize v0.0.0-20160712163229-9b3edd62028f/go.mod h1:sm1tb6uqfes/u+d4ooFouqFdy9/2g9QGwK3SQygK0Ts= -github.com/sagikazarmark/crypt v0.4.0/go.mod h1:ALv2SRj7GxYV4HO9elxH9nS6M9gW+xDNxqmyJ6RfDFM= -github.com/sean-/seed v0.0.0-20170313163322-e2103e2c3529/go.mod h1:DxrIzT+xaE7yg65j358z/aeFdxmN0P9QXhEzd20vsDc= github.com/segmentio/asm v1.1.0 h1:fkVr8k5J4sKoFjTGVD6r1yKvDKqmvrEh3K7iyVxgBs8= github.com/segmentio/asm v1.1.0/go.mod h1:4EUJGaKsB8ImLUwOGORVsNd9vTRDeh44JGsY4aKp5I4= github.com/segmentio/encoding v0.3.2 h1:gkXXteOfNaPPlrXTEf/e5tWvaQGVJWnvT3LqMzUeH7U= github.com/segmentio/encoding v0.3.2/go.mod h1:waft2p6XI4z2pk07M0YzZV4wEiqaRvsBSyWNHxVx4gU= -github.com/shurcooL/sanitized_anchor_name v1.0.0/go.mod h1:1NzhyTcUVG4SuEtjjoZeVRXNmyL/1OwPU0+IJeTBvfc= -github.com/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo= -github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE= -github.com/sirupsen/logrus v1.6.0/go.mod h1:7uNnSEd1DgxDLC74fIahvMZmmYsHGZGEOFrfsX/uA88= -github.com/sirupsen/logrus v1.7.0/go.mod h1:yWOB1SBYBC5VeMP7gHvWumXLIWorT60ONWic61uBYv0= -github.com/sirupsen/logrus v1.8.1/go.mod h1:yWOB1SBYBC5VeMP7gHvWumXLIWorT60ONWic61uBYv0= -github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d/go.mod h1:OnSkiWE9lh6wB0YB77sQom3nweQdgAjqCqsofrRNTgc= -github.com/smartystreets/goconvey v1.6.4/go.mod h1:syvi0/a8iFYH4r/RixwvyeAJjdLS9QV7WQ/tjFTllLA= -github.com/soheilhy/cmux v0.1.4/go.mod h1:IM3LyeVVIOuxMH7sFAkER9+bJ4dT7Ms6E4xg4kGIyLM= -github.com/soheilhy/cmux v0.1.5/go.mod h1:T7TcVDs9LWfQgPlPsdngu6I6QIoyIFZDDC6sNE1GqG0= github.com/spaolacci/murmur3 v0.0.0-20180118202830-f09979ecbc72/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA= github.com/speps/go-hashids v2.0.0+incompatible h1:kSfxGfESueJKTx0mpER9Y/1XHl+FVQjtCqRyYcviFbw= github.com/speps/go-hashids v2.0.0+incompatible/go.mod h1:P7hqPzMdnZOfyIk+xrlG1QaSMw+gCBdHKsBDnhpaZvc= -github.com/spf13/afero v1.1.2/go.mod h1:j4pytiNVoe2o6bmDsKpLACNPDBIoEAkihy7loJ1B0CQ= -github.com/spf13/afero v1.2.2/go.mod h1:9ZxEEn6pIJ8Rxe320qSDBk6AsU0r9pR7Q4OcevTdifk= -github.com/spf13/afero v1.3.3/go.mod h1:5KUK8ByomD5Ti5Artl0RtHeI5pTF7MIDuXL3yY520V4= github.com/spf13/afero v1.6.0 h1:xoax2sJ2DT8S8xA2paPFjDCScCNeWsg75VG0DLRreiY= github.com/spf13/afero v1.6.0/go.mod h1:Ai8FlHk4v/PARR026UzYexafAt9roJ7LcLMAmO6Z93I= -github.com/spf13/cast v1.3.0/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE= -github.com/spf13/cast v1.3.1/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE= github.com/spf13/cast v1.4.1 h1:s0hze+J0196ZfEMTs80N7UlFt0BDuQ7Q+JDnHiMWKdA= github.com/spf13/cast v1.4.1/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE= -github.com/spf13/cobra v1.1.3/go.mod h1:pGADOWyqRD/YMrPZigI/zbliZ2wVD/23d+is3pSWzOo= -github.com/spf13/cobra v1.2.1/go.mod h1:ExllRjgxM/piMAM+3tAZvg8fsklGAf3tPfi+i8t68Nk= -github.com/spf13/jwalterweatherman v1.0.0/go.mod h1:cQK4TGJAtQXfYWX+Ddv3mKDzgVb68N+wFjFa4jdeBTo= github.com/spf13/jwalterweatherman v1.1.0 h1:ue6voC5bR5F8YxI5S67j9i582FU4Qvo2bmqnqMYADFk= github.com/spf13/jwalterweatherman v1.1.0/go.mod h1:aNWZUN0dPAAO/Ljvb5BEdw96iTZ0EXowPYD95IqWIGo= -github.com/spf13/pflag v1.0.3/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA= github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= -github.com/spf13/viper v1.7.0/go.mod h1:8WkrPz2fc9jxqZNCJI/76HCieCp4Q8HaLFoCha5qpdg= -github.com/spf13/viper v1.8.1/go.mod h1:o0Pch8wJ9BVSWGQMbra6iw0oQ5oktSIBaujf1rJH9Ns= github.com/spf13/viper v1.10.1 h1:nuJZuYpG7gTj/XqiUwg8bA0cp1+M2mC3J4g5luUYBKk= github.com/spf13/viper v1.10.1/go.mod h1:IGlFPqhNAPKRxohIzWpI5QEy4kuI7tcl5WvR+8qy1rU= -github.com/stoewer/go-strcase v1.2.0/go.mod h1:IBiWB2sKIp3wVVQ3Y035++gc+knqhUQag1KpM8ahLw8= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= -github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= @@ -526,8 +145,6 @@ github.com/stretchr/testify v1.7.0 h1:nwc3DEeHmmLAfoZucVR881uASk0Mfjw8xYJ99tb5Cc github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/subosito/gotenv v1.2.0 h1:Slr1R9HxAlEKefgq5jn9U+DnETlIUa6HfgEzj0g5d7s= github.com/subosito/gotenv v1.2.0/go.mod h1:N0PQaV/YGNqwC0u51sEeR/aUtSLEXKX9iv69rRypqCw= -github.com/tmc/grpc-websocket-proxy v0.0.0-20190109142713-0ad062ec5ee5/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= -github.com/tmc/grpc-websocket-proxy v0.0.0-20201229170055-e5319fda7802/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= github.com/tmthrgd/go-hex v0.0.0-20190904060850-447a3041c3bc h1:9lRDQMhESg+zvGYmW5DyG0UqvY96Bu5QYsTLvCHdrgo= github.com/tmthrgd/go-hex v0.0.0-20190904060850-447a3041c3bc/go.mod h1:bciPuU6GHm1iF1pBvUfxfsH0Wmnc2VbpgvbI9ZWuIRs= github.com/tv42/httpunix v0.0.0-20150427012821-b75d8614f926/go.mod h1:9ESjWnEqriFuLhtthL60Sar/7RFoluCcXsuvEwTV5KM= @@ -544,497 +161,110 @@ github.com/vmihailenco/msgpack/v5 v5.3.5 h1:5gO0H1iULLWGhs2H5tbAHIZTV8/cYafcFOr9 github.com/vmihailenco/msgpack/v5 v5.3.5/go.mod h1:7xyJ9e+0+9SaZT0Wt1RGleJXzli6Q/V5KbhBonMG9jc= github.com/vmihailenco/tagparser/v2 v2.0.0 h1:y09buUbR+b5aycVFQs/g70pqKVZNBmxwAhO7/IwNM9g= github.com/vmihailenco/tagparser/v2 v2.0.0/go.mod h1:Wri+At7QHww0WTrCBeu4J6bNtoV6mEfg5OIWRZA9qds= -github.com/xiang90/probing v0.0.0-20190116061207-43a291ad63a2/go.mod h1:UETIi67q53MR2AWcXfiuqkDkRtnGDLqkBTpCHuJHxtU= -github.com/yuin/goldmark v1.1.25/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= -github.com/yuin/goldmark v1.1.32/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= -github.com/yuin/goldmark v1.4.0/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= -go.etcd.io/bbolt v1.3.2/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU= -go.etcd.io/bbolt v1.3.6/go.mod h1:qXsaaIqmgQH0T+OPdb99Bf+PKfBBQVAdyD6TY9G8XM4= -go.etcd.io/etcd/api/v3 v3.5.0/go.mod h1:cbVKeC6lCfl7j/8jBhAK6aIYO9XOjdptoxU/nLQcPvs= -go.etcd.io/etcd/api/v3 v3.5.1/go.mod h1:cbVKeC6lCfl7j/8jBhAK6aIYO9XOjdptoxU/nLQcPvs= -go.etcd.io/etcd/client/pkg/v3 v3.5.0/go.mod h1:IJHfcCEKxYu1Os13ZdwCwIUTUVGYTSAM3YSwc9/Ac1g= -go.etcd.io/etcd/client/pkg/v3 v3.5.1/go.mod h1:IJHfcCEKxYu1Os13ZdwCwIUTUVGYTSAM3YSwc9/Ac1g= -go.etcd.io/etcd/client/v2 v2.305.0/go.mod h1:h9puh54ZTgAKtEbut2oe9P4L/oqKCVB6xsXlzd7alYQ= -go.etcd.io/etcd/client/v2 v2.305.1/go.mod h1:pMEacxZW7o8pg4CrFE7pquyCJJzZvkvdD2RibOCCCGs= -go.etcd.io/etcd/client/v3 v3.5.0/go.mod h1:AIKXXVX/DQXtfTEqBryiLTUXwON+GuvO6Z7lLS/oTh0= -go.etcd.io/etcd/pkg/v3 v3.5.0/go.mod h1:UzJGatBQ1lXChBkQF0AuAtkRQMYnHubxAEYIrC3MSsE= -go.etcd.io/etcd/raft/v3 v3.5.0/go.mod h1:UFOHSIvO/nKwd4lhkwabrTD3cqW5yVyYYf/KlD00Szc= -go.etcd.io/etcd/server/v3 v3.5.0/go.mod h1:3Ah5ruV+M+7RZr0+Y/5mNLwC+eQlni+mQmOVdCRJoS4= -go.opencensus.io v0.21.0/go.mod h1:mSImk1erAIZhrmZN+AvHh14ztQfjbGwt4TtuofqLduU= -go.opencensus.io v0.22.0/go.mod h1:+kGneAE2xo2IficOXnaByMWTGM9T73dGwxeWcUqIpI8= -go.opencensus.io v0.22.2/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= -go.opencensus.io v0.22.3/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= -go.opencensus.io v0.22.4/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= -go.opencensus.io v0.22.5/go.mod h1:5pWMHQbX5EPX2/62yrJeAkowc+lfs/XD7Uxpq3pI6kk= -go.opencensus.io v0.23.0/go.mod h1:XItmlyltB5F7CS4xOC1DcqMoFqwtC6OG2xF7mCv7P7E= -go.opentelemetry.io/contrib v0.20.0/go.mod h1:G/EtFaa6qaN7+LxqfIAT3GiZa7Wv5DTBUzl5H4LY0Kc= -go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.20.0/go.mod h1:oVGt1LRbBOBq1A5BQLlUg9UaU/54aiHw8cgjV3aWZ/E= -go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.20.0/go.mod h1:2AboqHi0CiIZU0qwhtUfCYD1GeUzvvIXWNkhDt7ZMG4= -go.opentelemetry.io/otel v0.20.0/go.mod h1:Y3ugLH2oa81t5QO+Lty+zXf8zC9L26ax4Nzoxm/dooo= -go.opentelemetry.io/otel/exporters/otlp v0.20.0/go.mod h1:YIieizyaN77rtLJra0buKiNBOm9XQfkPEKBeuhoMwAM= -go.opentelemetry.io/otel/metric v0.20.0/go.mod h1:598I5tYlH1vzBjn+BTuhzTCSb/9debfNp6R3s7Pr1eU= -go.opentelemetry.io/otel/oteltest v0.20.0/go.mod h1:L7bgKf9ZB7qCwT9Up7i9/pn0PWIa9FqQ2IQ8LoxiGnw= -go.opentelemetry.io/otel/sdk v0.20.0/go.mod h1:g/IcepuwNsoiX5Byy2nNV0ySUF1em498m7hBWC279Yc= -go.opentelemetry.io/otel/sdk/export/metric v0.20.0/go.mod h1:h7RBNMsDJ5pmI1zExLi+bJK+Dr8NQCh0qGhm1KDnNlE= -go.opentelemetry.io/otel/sdk/metric v0.20.0/go.mod h1:knxiS8Xd4E/N+ZqKmUPf3gTTZ4/0TjTXukfxjzSTpHE= -go.opentelemetry.io/otel/trace v0.20.0/go.mod h1:6GjCW8zgDjwGHGa6GkyeB8+/5vjT16gUEi0Nf1iBdgw= go.opentelemetry.io/proto/otlp v0.7.0/go.mod h1:PqfVotwruBrMGOCsRd/89rSnXhoiJIqeYNgFYFoEGnI= -go.uber.org/atomic v1.4.0/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= go.uber.org/atomic v1.7.0 h1:ADUqmZGgLDDfbSL9ZmPxKTybcoEYHgpYfELNoN+7hsw= go.uber.org/atomic v1.7.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc= -go.uber.org/goleak v1.1.10/go.mod h1:8a7PlsEVH3e/a/GLqe5IIrQx6GzcnRmZEufDUTk4A7A= go.uber.org/goleak v1.1.11-0.20210813005559-691160354723/go.mod h1:cwTWslyiVhfpKIDGSZEM2HlOvcqm+tG4zioyIeLoqMQ= go.uber.org/goleak v1.1.12 h1:gZAh5/EyT/HQwlpkCy6wTpqfH9H8Lz8zbm3dZh+OyzA= -go.uber.org/goleak v1.1.12/go.mod h1:cwTWslyiVhfpKIDGSZEM2HlOvcqm+tG4zioyIeLoqMQ= -go.uber.org/multierr v1.1.0/go.mod h1:wR5kodmAFQ0UK8QlbwjlSNy0Z68gJhDJUG5sjR94q/0= go.uber.org/multierr v1.6.0 h1:y6IPFStTAIT5Ytl7/XYmHvzXQ7S3g/IeZW9hyZ5thw4= go.uber.org/multierr v1.6.0/go.mod h1:cdWPpRnG4AhwMwsgIHip0KRBQjJy5kYEpYjJxpXp9iU= -go.uber.org/zap v1.10.0/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q= -go.uber.org/zap v1.17.0/go.mod h1:MXVU+bhUf/A7Xi2HNOnopQOrmycQ5Ih87HtOu4q5SSo= -go.uber.org/zap v1.19.0/go.mod h1:xg/QME4nWcxGxrpdeYfq7UvYrLh66cuVKdrbD1XF/NI= go.uber.org/zap v1.19.1 h1:ue41HOKd1vGURxrmeKIgELGb3jPW9DMUDGtsinblHwI= go.uber.org/zap v1.19.1/go.mod h1:j3DNczoxDZroyBnOT1L/Q79cfUMGZxlv/9dzN7SM1rI= -golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20180910181607-0e37d006457b/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= -golang.org/x/crypto v0.0.0-20181029021203-45a5f77698d3/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= -golang.org/x/crypto v0.0.0-20190510104115-cbcb75029529/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= -golang.org/x/crypto v0.0.0-20190605123033-f99c8df09eb5/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20190820162420-60c769a6c586/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= -golang.org/x/crypto v0.0.0-20190923035154-9ee001bba392/go.mod h1:/lpIB1dKB+9EgE3H3cr1v9wB50oz8l4C4h62xy7jSTY= golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= -golang.org/x/crypto v0.0.0-20201002170205-7f63de1d35b0/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= -golang.org/x/crypto v0.0.0-20210817164053-32db794688a5/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= golang.org/x/crypto v0.0.0-20211215153901-e495a2d5b3d3 h1:0es+/5331RGQPcXlMfP+WrnIIS6dNnNRe0WB02W0F4M= golang.org/x/crypto v0.0.0-20211215153901-e495a2d5b3d3/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= -golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= -golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8= -golang.org/x/exp v0.0.0-20190829153037-c13cbed26979/go.mod h1:86+5VVa7VpoJ4kLfm080zCjGlMRFzhUhsZKEZO7MGek= -golang.org/x/exp v0.0.0-20191030013958-a1ab85dbe136/go.mod h1:JXzH8nQsPlswgeRAPE3MuO9GYsAcnJvJ4vnMwN/5qkY= -golang.org/x/exp v0.0.0-20191129062945-2f5052295587/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= -golang.org/x/exp v0.0.0-20191227195350-da58074b4299/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= -golang.org/x/exp v0.0.0-20200119233911-0405dc783f0a/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= -golang.org/x/exp v0.0.0-20200207192155-f17229e696bd/go.mod h1:J/WKrq2StrnmMY6+EHIKF9dgMWnmCNThgcyBT1FY9mM= -golang.org/x/exp v0.0.0-20200224162631-6cc2880d07d6/go.mod h1:3jZMyOhIsHpP37uCMkUooju7aAi5cS1Q23tOzKc+0MU= -golang.org/x/image v0.0.0-20190227222117-0694c2d4d067/go.mod h1:kZ7UVZpmo3dzQBMxlp+ypCbDeSB+sBbTgSJuh5dn5js= -golang.org/x/image v0.0.0-20190802002840-cff245a6509b/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0= golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvxsM5YxQ5yQlVC4a0KAMCusXpPoU= -golang.org/x/lint v0.0.0-20190301231843-5614ed5bae6f/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= -golang.org/x/lint v0.0.0-20190409202823-959b441ac422/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= -golang.org/x/lint v0.0.0-20190909230951-414d861bb4ac/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= golang.org/x/lint v0.0.0-20190930215403-16217165b5de/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= -golang.org/x/lint v0.0.0-20191125180803-fdd1cda4f05f/go.mod h1:5qLYkcX4OjUUV8bRuDixDT3tpyyb+LUpUlRWLxfhWrs= -golang.org/x/lint v0.0.0-20200130185559-910be7a94367/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= -golang.org/x/lint v0.0.0-20200302205851-738671d3881b/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= -golang.org/x/lint v0.0.0-20201208152925-83fdc39ff7b5/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= -golang.org/x/lint v0.0.0-20210508222113-6edffad5e616/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= -golang.org/x/mobile v0.0.0-20190312151609-d3739f865fa6/go.mod h1:z+o9i4GpDbdi3rU15maQ/Ox0txvL9dWGYEHz965HBQE= -golang.org/x/mobile v0.0.0-20190719004257-d2bd2a29d028/go.mod h1:E/iHnbuqvinMTCcRqshq8CkpyQDoeVncDDYHnLhea+o= -golang.org/x/mod v0.0.0-20190513183733-4bf6d317e70e/go.mod h1:mXi4GBBbnImb6dmsKGUJ2LatrhH/nqhxcFungHvyanc= -golang.org/x/mod v0.1.0/go.mod h1:0QHyrYULN0/3qlju5TqG8bIK38QM8yzMo5ekMj3DlcY= -golang.org/x/mod v0.1.1-0.20191105210325-c90efee705ee/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg= -golang.org/x/mod v0.1.1-0.20191107180719-034126e5016b/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg= golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= -golang.org/x/mod v0.4.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= -golang.org/x/mod v0.4.1/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= -golang.org/x/mod v0.5.0/go.mod h1:5OXOZSfqPIIbmVBIIKWRFfZjPR0E5r58TLhUjH0a2Ro= golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20181023162649-9b4f9f5ad519/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20181114220301-adae6a3d119a/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20181201002055-351d144fa1fc/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20181220203305-927f97764cc3/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= -golang.org/x/net v0.0.0-20190501004415-9ce7a6920f09/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= -golang.org/x/net v0.0.0-20190503192946-f4e77d36d62c/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= -golang.org/x/net v0.0.0-20190603091049-60506f45cf65/go.mod h1:HSz+uSET+XFnRR8LxR5pz3Of3rY3CfYBVs4xY44aLks= -golang.org/x/net v0.0.0-20190613194153-d28f0bde5980/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20190628185345-da137c7871d7/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20190724013045-ca1201d0de80/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20190827160401-ba9fcec4b297/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20190923162816-aa69164e4478/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20191209160850-c0dbc17a3553/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20200114155413-6afb5195e5aa/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20200202094626-16171245cfb2/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20200222125558-5a598a2470a0/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20200301022130-244492dfa37a/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20200324143707-d3edc9973b7e/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= -golang.org/x/net v0.0.0-20200501053045-e0ff5e5a1de5/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= -golang.org/x/net v0.0.0-20200506145744-7e3656a0809f/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= -golang.org/x/net v0.0.0-20200513185701-a91f0712d120/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= -golang.org/x/net v0.0.0-20200520004742-59133d7f0dd7/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= -golang.org/x/net v0.0.0-20200520182314-0ba52f642ac2/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= -golang.org/x/net v0.0.0-20200625001655-4c5254603344/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= -golang.org/x/net v0.0.0-20200707034311-ab3426394381/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= golang.org/x/net v0.0.0-20200822124328-c89045814202/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= -golang.org/x/net v0.0.0-20201031054903-ff519b6c9102/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= -golang.org/x/net v0.0.0-20201110031124-69a78807bb2b/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= -golang.org/x/net v0.0.0-20201202161906-c7110b5ffcbb/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= -golang.org/x/net v0.0.0-20201209123823-ac852fbbde11/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= -golang.org/x/net v0.0.0-20210119194325-5f4716e94777/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= -golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= -golang.org/x/net v0.0.0-20210316092652-d523dce5a7f4/go.mod h1:RBQZq4jEuRlivfhVLdyRGr576XBO4/greRjx4P4O3yc= golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4/go.mod h1:p54w0d4576C0XHj96bSt6lcn1PtDYWL6XObtHCRCNQM= -golang.org/x/net v0.0.0-20210410081132-afb366fc7cd1/go.mod h1:9tjilg8BloeKEkVJvy7fQ90B1CfIiPueXVOjqfkSzI8= -golang.org/x/net v0.0.0-20210428140749-89ef3d95e781/go.mod h1:OJAsFXCWl8Ukc7SiCT/9KSuxbyM7479/AVlXFRxuMCk= -golang.org/x/net v0.0.0-20210503060351-7fd8e65b6420/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= -golang.org/x/net v0.0.0-20210525063256-abc453219eb5/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= -golang.org/x/net v0.0.0-20210805182204-aaa1db679c0d/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= -golang.org/x/net v0.0.0-20210813160813-60bc85c4be6d/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= -golang.org/x/net v0.0.0-20210825183410-e898025ed96a/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= -golang.org/x/net v0.0.0-20210916014120-12bc252f5db8/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2 h1:CIJ76btIcR3eFI5EgSo6k1qKw9KJexJuRLI9G7Hp5wE= golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= -golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= -golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= -golang.org/x/oauth2 v0.0.0-20191202225959-858c2ad4c8b6/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= -golang.org/x/oauth2 v0.0.0-20200902213428-5d25da1a8d43/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= -golang.org/x/oauth2 v0.0.0-20201109201403-9fd604954f58/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= -golang.org/x/oauth2 v0.0.0-20201208152858-08078c50e5b5/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= -golang.org/x/oauth2 v0.0.0-20210218202405-ba52d332ba99/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= -golang.org/x/oauth2 v0.0.0-20210220000619-9bb904979d93/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= -golang.org/x/oauth2 v0.0.0-20210313182246-cd4f82c27b84/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= -golang.org/x/oauth2 v0.0.0-20210402161424-2e8d93401602/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= -golang.org/x/oauth2 v0.0.0-20210514164344-f6687ab2804c/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= -golang.org/x/oauth2 v0.0.0-20210628180205-a41e5a781914/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= -golang.org/x/oauth2 v0.0.0-20210805134026-6f1e6394065a/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= -golang.org/x/oauth2 v0.0.0-20210819190943-2bc19b11175f/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= -golang.org/x/oauth2 v0.0.0-20211005180243-6b3c2da341f1/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= -golang.org/x/oauth2 v0.0.0-20211104180415-d3ed0bb246c8/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20190227155943-e225da77a7e6/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20200317015054-43a5402ce75a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20200625203802-6e8e738ad208/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20201207232520-09787c993a3a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sys v0.0.0-20180823144017-11551d06cbcc/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20181026203630-95b1ffbd15a5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20181107165924-66b7b1311ac8/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20181116152217-5ac8a444bdc5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20190222072716-a9d3bda3a223/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20190312061237-fead79001313/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190422165155-953cdadca894/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190502145724-3ef323f4f1fd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190507160741-ecd444e8653b/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190606165138-5da285871e9c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190624142023-c5567b49c5d0/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190726091711-fc99dfbffb4e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190904154756-749cb33beabd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190922100055-0a153f010e69/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190924154521-2837fb4f24fe/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20191001151750-bb3f8db39f24/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20191005200804-aed5e4c7ecf9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20191008105621-543471e840be/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20191026070338-33540a1f6037/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20191120155948-bd437916bb0e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20191204072324-ce4227a45e2e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20191228213918-04cbcbbfeed8/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200106162015-b016eb3dc98e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200113162924-86b910548bc1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200116001909-b77594299b42/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200122134326-e047566fdf82/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200124204421-9fbb57f87de9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200202164722-d101bd2416d5/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200212091648-12a6c2dcc1e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200223170610-d5e6a3e2c0ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200302150141-5c8b2ff67527/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200331124033-c3d80250170d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200501052902-10377860bb8e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200511232937-7e40ca221e25/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200515095857-1151b9dac4a9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200519105757-fe76b779f299/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200523222454-059865788121/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200615200032-f1bc736245b1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200625212154-ddb9806d33ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200803210538-64077c9b5642/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200831180312-196b9ba8737a/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200905004654-be1d3432aa8f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200923182605-d9f96fdee20d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20201201145000-ef89a241ccb3/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210104204734-6f8348627aad/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210112080510-489259a85091/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210119212857-b64e53b001e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210124154548-22da62e12c0c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210220050731-9a76102bfb43/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210303074136-134d130e1a04/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210305230114-8fe3ee5dd75b/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210315160823-c6e025ad8005/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210320140829-1e4c9ba3b0c4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210330210617-4fbd30eecc44/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210403161142-5e06dd20ab57/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210510120138-977fb7262007/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20210514084401-e8d321eab015/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20210603081109-ebe580a85c40/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20210603125802-9665404d3644/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20210616094352-59db8d763f22/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20210806184541-e5e7981a1069/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20210809222454-d867a43fc93e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20210816183151-1e6c022a8912/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20210823070655-63515b42dcdf/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20210831042530-f4d43177bf5e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20210908233432-aa78b53d3365/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210927094055-39ccf1dd6fa6/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20211007075335-d3039528d8ac/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20211029165221-6e7872819dc8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20211123173158-ef496fb156ab/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20211124211545-fe61309f8881/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20211210111614-af8b64212486/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20211216021012-1d35b9e2eb4e h1:fLOSk5Q00efkSvAm+4xcoXD+RRmLmmulPn5I3Y9F2EM= golang.org/x/sys v0.0.0-20211216021012-1d35b9e2eb4e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= -golang.org/x/term v0.0.0-20210615171337-6886f2dfbf5b/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= -golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= -golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= -golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= -golang.org/x/text v0.3.4/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.5/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.7 h1:olpwvP2KacW1ZWvsR7uQhoyTYvKAupfQrRGBFM352Gk= golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= -golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= -golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= -golang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= -golang.org/x/time v0.0.0-20210220033141-f8bda1e9f3ba/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= -golang.org/x/time v0.0.0-20210723032227-1f47c861a9ac/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= -golang.org/x/tools v0.0.0-20180221164845-07fd8470d635/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20181030221726-6c7e314b6563/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY= golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= -golang.org/x/tools v0.0.0-20190312151545-0bb0c0a6e846/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= -golang.org/x/tools v0.0.0-20190312170243-e65039ee4138/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= -golang.org/x/tools v0.0.0-20190328211700-ab21143f2384/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= -golang.org/x/tools v0.0.0-20190425150028-36563e24a262/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= -golang.org/x/tools v0.0.0-20190506145303-2d16b83fe98c/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= golang.org/x/tools v0.0.0-20190524140312-2c0ae7006135/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= -golang.org/x/tools v0.0.0-20190606124116-d0a3d012864b/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= -golang.org/x/tools v0.0.0-20190621195816-6e04913cbbac/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= -golang.org/x/tools v0.0.0-20190624222133-a101b041ded4/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= -golang.org/x/tools v0.0.0-20190628153133-6cdbf07be9d0/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= -golang.org/x/tools v0.0.0-20190816200558-6889da9d5479/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20190907020128-2ca718005c18/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20190911174233-4f2ddba30aff/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191012152004-8de300cfc20a/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191108193012-7d206e10da11/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191112195655-aa38f8e97acc/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191113191852-77e3bb0ad9e7/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191115202509-3a792d9c32b2/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191125144606-a911d9008d1f/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191130070609-6e064ea0cf2d/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191216173652-a0e659d51361/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20191227053925-7b8e75db28f4/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200117161641-43d50277825c/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200122220014-bf1340f18c4a/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200130002326-2f3ba24bd6e7/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200204074204-1cc6d1ef6c74/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200207183749-b753a1ba74fa/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200212150539-ea181f53ac56/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200224181240-023911ca70b2/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200227222343-706bc42d1f0d/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200304193943-95d2e580d8eb/go.mod h1:o4KQGtdN14AW+yjsvvwRTJJuXz8XRtIHtEnmAXLyFUw= -golang.org/x/tools v0.0.0-20200312045724-11d5b4c81c7d/go.mod h1:o4KQGtdN14AW+yjsvvwRTJJuXz8XRtIHtEnmAXLyFUw= -golang.org/x/tools v0.0.0-20200331025713-a30bf2db82d4/go.mod h1:Sl4aGygMT6LrqrWclx+PTx3U+LnKx/seiNR+3G19Ar8= -golang.org/x/tools v0.0.0-20200501065659-ab2804fb9c9d/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= -golang.org/x/tools v0.0.0-20200505023115-26f46d2f7ef8/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= -golang.org/x/tools v0.0.0-20200512131952-2bc93b1c0c88/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= -golang.org/x/tools v0.0.0-20200515010526-7d3b6ebf133d/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= -golang.org/x/tools v0.0.0-20200618134242-20370b0cb4b2/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= golang.org/x/tools v0.0.0-20200619180055-7c47624df98f/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= -golang.org/x/tools v0.0.0-20200729194436-6467de6f59a7/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= -golang.org/x/tools v0.0.0-20200804011535-6c149bb5ef0d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= -golang.org/x/tools v0.0.0-20200825202427-b303f430e36d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= -golang.org/x/tools v0.0.0-20200904185747-39188db58858/go.mod h1:Cj7w3i3Rnn0Xh82ur9kSqwfTHTeVxaDqrfMjpcNT6bE= -golang.org/x/tools v0.0.0-20201110124207-079ba7bd75cd/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= -golang.org/x/tools v0.0.0-20201201161351-ac6f37ff4c2a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= -golang.org/x/tools v0.0.0-20201208233053-a543418bbed2/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= -golang.org/x/tools v0.0.0-20201224043029-2b0845dc783e/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= -golang.org/x/tools v0.0.0-20210105154028-b0ab187a4818/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= -golang.org/x/tools v0.1.0/go.mod h1:xkSsbof2nBLbhDlRMhhhyNLN/zl3eTqcnHD5viDpcZ0= -golang.org/x/tools v0.1.1/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= -golang.org/x/tools v0.1.2/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= -golang.org/x/tools v0.1.3/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= -golang.org/x/tools v0.1.4/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= golang.org/x/tools v0.1.5/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= -golang.org/x/tools v0.1.6-0.20210820212750-d4cc65f0b2ff/go.mod h1:YD9qOF0M9xpSpdWTBbzEl5e/RnCefISl8E5Noe10jFM= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1 h1:go1bK/D/BFZV2I8cIQd1NKEZ+0owSTG1fDTci4IqFcE= golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -gomodules.xyz/jsonpatch/v2 v2.2.0/go.mod h1:WXp+iVDkoLQqPudfQ9GBlwB2eZ5DKOnjQZCYdOS8GPY= -google.golang.org/api v0.4.0/go.mod h1:8k5glujaEP+g9n7WNsDg8QP6cUVNI86fCNMcbazEtwE= -google.golang.org/api v0.7.0/go.mod h1:WtwebWUNSVBH/HAw79HIFXZNqEvBhG+Ra+ax0hx3E3M= -google.golang.org/api v0.8.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg= -google.golang.org/api v0.9.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg= -google.golang.org/api v0.13.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= -google.golang.org/api v0.14.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= -google.golang.org/api v0.15.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= -google.golang.org/api v0.17.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= -google.golang.org/api v0.18.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= -google.golang.org/api v0.19.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= -google.golang.org/api v0.20.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= -google.golang.org/api v0.22.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= -google.golang.org/api v0.24.0/go.mod h1:lIXQywCXRcnZPGlsd8NbLnOjtAoL6em04bJ9+z0MncE= -google.golang.org/api v0.28.0/go.mod h1:lIXQywCXRcnZPGlsd8NbLnOjtAoL6em04bJ9+z0MncE= -google.golang.org/api v0.29.0/go.mod h1:Lcubydp8VUV7KeIHD9z2Bys/sm/vGKnG1UHuDBSrHWM= -google.golang.org/api v0.30.0/go.mod h1:QGmEvQ87FHZNiUVJkT14jQNYJ4ZJjdRF23ZXz5138Fc= -google.golang.org/api v0.35.0/go.mod h1:/XrVsuzM0rZmrsbjJutiuftIzeuTQcEeaYcSk/mQ1dg= -google.golang.org/api v0.36.0/go.mod h1:+z5ficQTmoYpPn8LCUNVpK5I7hwkpjbcgqA7I34qYtE= -google.golang.org/api v0.40.0/go.mod h1:fYKFpnQN0DsDSKRVRcQSDQNtqWPfM9i+zNPxepjRCQ8= -google.golang.org/api v0.41.0/go.mod h1:RkxM5lITDfTzmyKFPt+wGrCJbVfniCr2ool8kTBzRTU= -google.golang.org/api v0.43.0/go.mod h1:nQsDGjRXMo4lvh5hP0TKqF244gqhGcr/YSIykhUk/94= -google.golang.org/api v0.44.0/go.mod h1:EBOGZqzyhtvMDoxwS97ctnh0zUmYY6CxqXsc1AvkYD8= -google.golang.org/api v0.47.0/go.mod h1:Wbvgpq1HddcWVtzsVLyfLp8lDg6AA241LmgIL59tHXo= -google.golang.org/api v0.48.0/go.mod h1:71Pr1vy+TAZRPkPs/xlCf5SsU8WjuAWv1Pfjbtukyy4= -google.golang.org/api v0.50.0/go.mod h1:4bNT5pAuq5ji4SRZm+5QIkjny9JAyVD/3gaSihNefaw= -google.golang.org/api v0.51.0/go.mod h1:t4HdrdoNgyN5cbEfm7Lum0lcLDLiise1F8qDKX00sOU= -google.golang.org/api v0.54.0/go.mod h1:7C4bFFOvVDGXjfDTAsgGwDgAxRDeQ4X8NvUedIt6z3k= -google.golang.org/api v0.55.0/go.mod h1:38yMfeP1kfjsl8isn0tliTjIb1rJXcQi4UXlbqivdVE= -google.golang.org/api v0.56.0/go.mod h1:38yMfeP1kfjsl8isn0tliTjIb1rJXcQi4UXlbqivdVE= -google.golang.org/api v0.57.0/go.mod h1:dVPlbZyBo2/OjBpmvNdpn2GRm6rPy75jyU7bmhdrMgI= -google.golang.org/api v0.59.0/go.mod h1:sT2boj7M9YJxZzgeZqXogmhfmRWDtPzT31xkieUbuZU= -google.golang.org/api v0.61.0/go.mod h1:xQRti5UdCmoCEqFxcz93fTl338AVqDgyaDRuOZ3hg9I= -google.golang.org/api v0.63.0/go.mod h1:gs4ij2ffTRXwuzzgJl/56BdwJaA194ijkfn++9tDuPo= google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= -google.golang.org/appengine v1.5.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= -google.golang.org/appengine v1.6.1/go.mod h1:i06prIuMbXzDqacNJfV5OdTW448YApPu5ww/cMBSeb0= -google.golang.org/appengine v1.6.5/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= -google.golang.org/appengine v1.6.6/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= -google.golang.org/appengine v1.6.7/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= -google.golang.org/genproto v0.0.0-20190307195333-5fe7a883aa19/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= -google.golang.org/genproto v0.0.0-20190418145605-e7d98fc518a7/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= -google.golang.org/genproto v0.0.0-20190425155659-357c62f0e4bb/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= -google.golang.org/genproto v0.0.0-20190502173448-54afdca5d873/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= -google.golang.org/genproto v0.0.0-20190801165951-fa694d86fc64/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= -google.golang.org/genproto v0.0.0-20190911173649-1774047e7e51/go.mod h1:IbNlFCBrqXvoKpeg0TB2l7cyZUmoaFKYIwrEpbDKLA8= -google.golang.org/genproto v0.0.0-20191108220845-16a3f7862a1a/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= -google.golang.org/genproto v0.0.0-20191115194625-c23dd37a84c9/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= -google.golang.org/genproto v0.0.0-20191216164720-4f79533eabd1/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= -google.golang.org/genproto v0.0.0-20191230161307-f3c370f40bfb/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= -google.golang.org/genproto v0.0.0-20200115191322-ca5a22157cba/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= -google.golang.org/genproto v0.0.0-20200122232147-0452cf42e150/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= -google.golang.org/genproto v0.0.0-20200204135345-fa8e72b47b90/go.mod h1:GmwEX6Z4W5gMy59cAlVYjN9JhxgbQH6Gn+gFDQe2lzA= -google.golang.org/genproto v0.0.0-20200212174721-66ed5ce911ce/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200224152610-e50cd9704f63/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200228133532-8c2c7df3a383/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200305110556-506484158171/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200312145019-da6875a35672/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200331122359-1ee6d9798940/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200423170343-7949de9c1215/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200430143042-b979b6f78d84/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200511104702-f5ebc3bea380/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= google.golang.org/genproto v0.0.0-20200513103714-09dca8ec2884/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200515170657-fc4c6c6a6587/go.mod h1:YsZOwe1myG/8QRHRsmBRE1LrgQY60beZKjly0O1fX9U= google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013/go.mod h1:NbSheEEYHJ7i3ixzK3sjbqSGDJWnxyFXZblF3eUsNvo= -google.golang.org/genproto v0.0.0-20200618031413-b414f8b61790/go.mod h1:jDfRM7FcilCzHH/e9qn6dsT145K34l5v+OpcnNgKAAA= -google.golang.org/genproto v0.0.0-20200729003335-053ba62fc06f/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20200804131852-c06518451d9c/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20200825200019-8632dd797987/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20200904004341-0bd0a958aa1d/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20201019141844-1ed22bb0c154/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20201102152239-715cce707fb0/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20201109203340-2640f1f9cdfb/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20201201144952-b05cb90ed32e/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20201210142538-e3217bee35cc/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20201214200347-8c77b98c765d/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20210222152913-aa3ee6e6a81c/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20210303154014-9728d6b83eeb/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20210310155132-4ce2db91004e/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20210319143718-93e7006c17a6/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20210402141018-6c239bbf2bb1/go.mod h1:9lPAdzaEmUacj36I+k7YKbEc5CXzPIeORRgDAUOu28A= -google.golang.org/genproto v0.0.0-20210513213006-bf773b8c8384/go.mod h1:P3QM42oQyzQSnHPnZ/vqoCdDmzH28fzWByN9asMeM8A= -google.golang.org/genproto v0.0.0-20210602131652-f16073e35f0c/go.mod h1:UODoCrxHCcBojKKwX1terBiRUaqAsFqJiF615XL43r0= -google.golang.org/genproto v0.0.0-20210604141403-392c879c8b08/go.mod h1:UODoCrxHCcBojKKwX1terBiRUaqAsFqJiF615XL43r0= -google.golang.org/genproto v0.0.0-20210608205507-b6d2f5bf0d7d/go.mod h1:UODoCrxHCcBojKKwX1terBiRUaqAsFqJiF615XL43r0= -google.golang.org/genproto v0.0.0-20210624195500-8bfb893ecb84/go.mod h1:SzzZ/N+nwJDaO1kznhnlzqS8ocJICar6hYhVyhi++24= -google.golang.org/genproto v0.0.0-20210713002101-d411969a0d9a/go.mod h1:AxrInvYm1dci+enl5hChSFPOmmUF1+uAa/UsgNRWd7k= -google.golang.org/genproto v0.0.0-20210716133855-ce7ef5c701ea/go.mod h1:AxrInvYm1dci+enl5hChSFPOmmUF1+uAa/UsgNRWd7k= -google.golang.org/genproto v0.0.0-20210728212813-7823e685a01f/go.mod h1:ob2IJxKrgPT52GcgX759i1sleT07tiKowYBGbczaW48= -google.golang.org/genproto v0.0.0-20210805201207-89edb61ffb67/go.mod h1:ob2IJxKrgPT52GcgX759i1sleT07tiKowYBGbczaW48= -google.golang.org/genproto v0.0.0-20210813162853-db860fec028c/go.mod h1:cFeNkxwySK631ADgubI+/XFU/xp8FD5KIVV4rj8UC5w= -google.golang.org/genproto v0.0.0-20210821163610-241b8fcbd6c8/go.mod h1:eFjDcFEctNawg4eG61bRv87N7iHBWyVhJu7u1kqDUXY= -google.golang.org/genproto v0.0.0-20210828152312-66f60bf46e71/go.mod h1:eFjDcFEctNawg4eG61bRv87N7iHBWyVhJu7u1kqDUXY= -google.golang.org/genproto v0.0.0-20210831024726-fe130286e0e2/go.mod h1:eFjDcFEctNawg4eG61bRv87N7iHBWyVhJu7u1kqDUXY= -google.golang.org/genproto v0.0.0-20210903162649-d08c68adba83/go.mod h1:eFjDcFEctNawg4eG61bRv87N7iHBWyVhJu7u1kqDUXY= -google.golang.org/genproto v0.0.0-20210909211513-a8c4777a87af/go.mod h1:eFjDcFEctNawg4eG61bRv87N7iHBWyVhJu7u1kqDUXY= -google.golang.org/genproto v0.0.0-20210924002016-3dee208752a0/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= -google.golang.org/genproto v0.0.0-20211008145708-270636b82663/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= -google.golang.org/genproto v0.0.0-20211028162531-8db9c33dc351/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= -google.golang.org/genproto v0.0.0-20211118181313-81c1377c94b1/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= -google.golang.org/genproto v0.0.0-20211206160659-862468c7d6e0/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= google.golang.org/genproto v0.0.0-20211208223120-3a66f561d7aa h1:I0YcKz0I7OAhddo7ya8kMnvprhcWM045PmkBdMO9zN0= google.golang.org/genproto v0.0.0-20211208223120-3a66f561d7aa/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= -google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38= -google.golang.org/grpc v1.21.1/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= google.golang.org/grpc v1.25.1/go.mod h1:c3i+UQWmh7LiEpx4sFZnkU36qjEYZ0imhYfXVyQciAY= -google.golang.org/grpc v1.26.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= google.golang.org/grpc v1.27.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= -google.golang.org/grpc v1.27.1/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= -google.golang.org/grpc v1.28.0/go.mod h1:rpkK4SK4GF4Ach/+MFLZUBavHOvF2JJB5uozKKal+60= -google.golang.org/grpc v1.29.1/go.mod h1:itym6AZVZYACWQqET3MqgPpjcuV5QH3BxFS3IjizoKk= -google.golang.org/grpc v1.30.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= -google.golang.org/grpc v1.31.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= -google.golang.org/grpc v1.31.1/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= google.golang.org/grpc v1.33.1/go.mod h1:fr5YgcSWrqhRRxogOsw7RzIpsmvOZ6IcH4kBYTpR3n0= -google.golang.org/grpc v1.33.2/go.mod h1:JMHMWHQWaTccqQQlmk3MJZS+GWXOdAesneDmEnv2fbc= -google.golang.org/grpc v1.34.0/go.mod h1:WotjhfgOW/POjDeRt8vscBtXq+2VjORFy659qA51WJ8= -google.golang.org/grpc v1.35.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= google.golang.org/grpc v1.36.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= -google.golang.org/grpc v1.36.1/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= -google.golang.org/grpc v1.37.0/go.mod h1:NREThFqKR1f3iQ6oBuvc5LadQuXVGo9rkm5ZGrQdJfM= -google.golang.org/grpc v1.37.1/go.mod h1:NREThFqKR1f3iQ6oBuvc5LadQuXVGo9rkm5ZGrQdJfM= -google.golang.org/grpc v1.38.0/go.mod h1:NREThFqKR1f3iQ6oBuvc5LadQuXVGo9rkm5ZGrQdJfM= -google.golang.org/grpc v1.39.0/go.mod h1:PImNr+rS9TWYb2O4/emRugxiyHZ5JyHW5F+RPnDzfrE= -google.golang.org/grpc v1.39.1/go.mod h1:PImNr+rS9TWYb2O4/emRugxiyHZ5JyHW5F+RPnDzfrE= google.golang.org/grpc v1.40.0/go.mod h1:ogyxbiOoUXAkP+4+xa6PZSE9DZgIHtSpzjDTB9KAK34= -google.golang.org/grpc v1.40.1/go.mod h1:ogyxbiOoUXAkP+4+xa6PZSE9DZgIHtSpzjDTB9KAK34= google.golang.org/grpc v1.43.0 h1:Eeu7bZtDZ2DpRCsLhUlcrLnvYaMK1Gz86a+hMVvELmM= google.golang.org/grpc v1.43.0/go.mod h1:k+4IHHFw41K8+bbowsex27ge2rCb65oeWqe4jJ590SU= -google.golang.org/grpc/cmd/protoc-gen-go-grpc v1.1.0/go.mod h1:6Kw0yEErY5E/yWrBtf03jp27GLLJujG4z/JK95pnjjw= google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM= @@ -1043,80 +273,31 @@ google.golang.org/protobuf v1.21.0/go.mod h1:47Nbq4nVaFHyn7ilMalzfO3qCViNmqZ2kzi google.golang.org/protobuf v1.22.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= google.golang.org/protobuf v1.23.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= google.golang.org/protobuf v1.23.1-0.20200526195155-81db48ad09cc/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= -google.golang.org/protobuf v1.24.0/go.mod h1:r/3tXBNzIEhYS9I1OUVjXDlt8tc493IdKGjtUeSXeh4= google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlbajtzgsN7c= google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= google.golang.org/protobuf v1.27.1 h1:SnqbnDw1V7RiZcXPx5MEeqPv2s79L9i7BJUlG/+RurQ= google.golang.org/protobuf v1.27.1/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= -gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127 h1:qIbj1fsPNlZgppZ+VLlY7N33q108Sa+fhmuc+sWQYwY= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= -gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= -gopkg.in/check.v1 v1.0.0-20200227125254-8fa46927fb4f h1:BLraFXnmrev5lT+xlilqcH8XK9/i0At2xKjWk4p6zsU= -gopkg.in/check.v1 v1.0.0-20200227125254-8fa46927fb4f/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= -gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= -gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys= -gopkg.in/inf.v0 v0.9.1/go.mod h1:cWUDdTG/fYaXco+Dcufb5Vnc6Gp2YChqWtbxRZE0mXw= -gopkg.in/ini.v1 v1.51.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= -gopkg.in/ini.v1 v1.62.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= gopkg.in/ini.v1 v1.66.2 h1:XfR1dOYubytKy4Shzc2LHrrGhU0lDCfDGG1yLPmpgsI= gopkg.in/ini.v1 v1.66.2/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= -gopkg.in/natefinch/lumberjack.v2 v2.0.0/go.mod h1:l0ndWWf7gzL7RNwBG7wST/UCcT4T24xpD6X8LsfU/+k= -gopkg.in/resty.v1 v1.12.0/go.mod h1:mDo4pnntr5jdWRML875a/NmxYqAlA73dVijT2AXvQQo= -gopkg.in/square/go-jose.v2 v2.2.2/go.mod h1:M9dMgbHiYLoDGQrXy7OpJDJWiKiU//h+vD76mk0e1AI= gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 h1:uRGJdciOHaEIrze2W8Q3AKkepLTh2hOroT7a+7czfdQ= -gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWDmTeBkI65Dw0HsyUHuEVlX15mw= -gopkg.in/yaml.v2 v2.0.0-20170812160011-eb3733d160e7/go.mod h1:JAlM8MvJe8wmxCU4Bli9HhUf9+ttbYbLASfIpnQbh74= -gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.3/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= -gopkg.in/yaml.v2 v2.2.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= -gopkg.in/yaml.v2 v2.2.5/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= -gopkg.in/yaml.v2 v2.3.0/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY= gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ= gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= -gopkg.in/yaml.v3 v3.0.0-20200615113413-eeeca48fe776/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b h1:h8qDotaEPuJATrMmW04NCwg7v22aHH28wwpauUhK9Oo= gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= -gotest.tools/v3 v3.0.2/go.mod h1:3SzNCllyD9/Y+b5r9JIKQ474KzkZyqLqEfYqMsX94Bk= -gotest.tools/v3 v3.0.3/go.mod h1:Z7Lb0S5l+klDB31fvDQX8ss/FlKDxtlFlw3Oa8Ymbl8= honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= -honnef.co/go/tools v0.0.0-20190106161140-3f1c8253044a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= -honnef.co/go/tools v0.0.0-20190418001031-e561f6794a2a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= -honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg= -honnef.co/go/tools v0.0.1-2020.1.3/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= -honnef.co/go/tools v0.0.1-2020.1.4/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= -k8s.io/api v0.23.0/go.mod h1:8wmDdLBHBNxtOIytwLstXt5E9PddnZb0GaMcqsvDBpg= -k8s.io/apiextensions-apiserver v0.23.0/go.mod h1:xIFAEEDlAZgpVBl/1VSjGDmLoXAWRG40+GsWhKhAxY4= k8s.io/apimachinery v0.23.0 h1:mIfWRMjBuMdolAWJ3Fd+aPTMv3X9z+waiARMpvvb0HQ= -k8s.io/apimachinery v0.23.0/go.mod h1:fFCTTBKvKcwTPFzjlcxp91uPFZr+JA0FubU4fLzzFYc= -k8s.io/apiserver v0.23.0/go.mod h1:Cec35u/9zAepDPPFyT+UMrgqOCjgJ5qtfVJDxjZYmt4= -k8s.io/client-go v0.23.0/go.mod h1:hrDnpnK1mSr65lHHcUuIZIXDgEbzc7/683c6hyG4jTA= -k8s.io/code-generator v0.23.0/go.mod h1:vQvOhDXhuzqiVfM/YHp+dmg10WDZCchJVObc9MvowsE= -k8s.io/component-base v0.23.0/go.mod h1:DHH5uiFvLC1edCpvcTDV++NKULdYYU6pR9Tt3HIKMKI= -k8s.io/gengo v0.0.0-20210813121822-485abfe95c7c/go.mod h1:FiNAH4ZV3gBg2Kwh89tzAEV2be7d5xI0vBa/VySYy3E= -k8s.io/klog/v2 v2.0.0/go.mod h1:PBfzABfn139FHAV07az/IF9Wp1bkk3vpT2XSJ76fSDE= -k8s.io/klog/v2 v2.2.0/go.mod h1:Od+F08eJP+W3HUb4pSrPpgp9DGU4GzlpG/TmITuYh/Y= -k8s.io/klog/v2 v2.30.0/go.mod h1:y1WjHnz7Dj687irZUWR/WLkLc5N1YHtjLdmgWjndZn0= -k8s.io/kube-openapi v0.0.0-20211115234752-e816edb12b65/go.mod h1:sX9MT8g7NVZM5lVL/j8QyCCJe8YSMW30QvGZWaCIDIk= -k8s.io/utils v0.0.0-20210802155522-efc7438f0176/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA= -k8s.io/utils v0.0.0-20210930125809-cb0fa318a74b/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA= mellium.im/sasl v0.2.1 h1:nspKSRg7/SyO0cRGY71OkfHab8tf9kCts6a6oTDut0w= mellium.im/sasl v0.2.1/go.mod h1:ROaEDLQNuf9vjKqE1SrAfnsobm2YKXT1gnN1uDp1PjQ= -rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8= -rsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0= -rsc.io/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA= -sigs.k8s.io/apiserver-network-proxy/konnectivity-client v0.0.25/go.mod h1:Mlj9PNLmG9bZ6BHFwFKDo5afkpWyUISkb9Me0GnK66I= sigs.k8s.io/controller-runtime v0.11.0 h1:DqO+c8mywcZLFJWILq4iktoECTyn30Bkj0CwgqMpZWQ= sigs.k8s.io/controller-runtime v0.11.0/go.mod h1:KKwLiTooNGu+JmLZGn9Sl3Gjmfj66eMbCQznLP5zcqA= -sigs.k8s.io/json v0.0.0-20211020170558-c049b76a60c6/go.mod h1:p4QtZmO4uMYipTQNzagwnNoseA6OxSUutVw05NhYDRs= -sigs.k8s.io/structured-merge-diff/v4 v4.0.2/go.mod h1:bJZC9H9iH24zzfZ/41RGcq60oK1F7G282QMXDPYydCw= -sigs.k8s.io/structured-merge-diff/v4 v4.1.2/go.mod h1:j/nl6xW8vLS49O8YvXW1ocPhZawJtm+Yrr7PPRQ0Vg4= -sigs.k8s.io/structured-merge-diff/v4 v4.2.0/go.mod h1:j/nl6xW8vLS49O8YvXW1ocPhZawJtm+Yrr7PPRQ0Vg4= -sigs.k8s.io/yaml v1.2.0/go.mod h1:yfXDCHCao9+ENCvLSE62v9VSji2MKu5jeNfTrofGhJc= sigs.k8s.io/yaml v1.3.0 h1:a2VclLzOGrwOHDiV8EfBGhvjHvP46CtW5j6POvhYGGo= sigs.k8s.io/yaml v1.3.0/go.mod h1:GeOyir5tyXNByN85N/dRIT9es5UQNerPYEKK56eTBm8= diff --git a/components/usermgmt/gen/openapi/proto/rpc/v3/group.swagger.json b/components/usermgmt/gen/openapi/proto/rpc/v3/group.swagger.json index fcbc69a..78181fb 100644 --- a/components/usermgmt/gen/openapi/proto/rpc/v3/group.swagger.json +++ b/components/usermgmt/gen/openapi/proto/rpc/v3/group.swagger.json @@ -24,7 +24,348 @@ "application/yaml" ], "paths": { - "/auth/v3/group/{id}": { + "/auth/v3/group/{metadata.id}": { + "get": { + "operationId": "Group_GetGroup2", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/v3Group" + } + }, + "403": { + "description": "Returned when the group does not have permission to access the resource.", + "schema": {} + }, + "404": { + "description": "Returned when the resource does not exist.", + "schema": { + "type": "string", + "format": "string" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/googlerpcStatus" + } + } + }, + "parameters": [ + { + "name": "metadata.id", + "in": "path", + "required": true, + "type": "string" + }, + { + "name": "apiVersion", + "description": "API Version. API Version of the group resource", + "in": "query", + "required": false, + "type": "string", + "default": "usermgmt.k8smgmt.io/v3" + }, + { + "name": "kind", + "description": "Kind. Kind of the group resource", + "in": "query", + "required": false, + "type": "string", + "default": "Pipeline" + }, + { + "name": "metadata.name", + "description": "Name. name of the resource", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "metadata.description", + "description": "Description. description of the resource", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "metadata.project", + "description": "Project. Project of the resource", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "metadata.partner", + "description": "Project. Project of the resource", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "metadata.modifiedAt", + "in": "query", + "required": false, + "type": "string", + "format": "date-time" + }, + { + "name": "spec.users", + "description": "Users. List of users for group", + "in": "query", + "required": false, + "type": "array", + "items": { + "type": "string" + }, + "collectionFormat": "multi" + }, + { + "name": "spec.type", + "description": "Type. Type of group", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "status.conditionType", + "description": "Condition Type. type of the status condition", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "status.conditionStatus", + "description": "Condition Status. status of the condition", + "in": "query", + "required": false, + "type": "string", + "enum": [ + "StatusNotSet", + "StatusSubmitted", + "StatusOK", + "StatusFailed" + ], + "default": "StatusNotSet" + }, + { + "name": "status.lastUpdated", + "description": "Last Updated. when the condition status is last updated", + "in": "query", + "required": false, + "type": "string", + "format": "date-time" + }, + { + "name": "status.reason", + "description": "Reason. reason of the last condition status", + "in": "query", + "required": false, + "type": "string" + } + ], + "tags": [ + "Group" + ] + }, + "delete": { + "operationId": "Group_DeleteGroup2", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/v3DeleteGroupResponse" + } + }, + "204": { + "description": "Returned when group is deleted successfully.", + "schema": {} + }, + "403": { + "description": "Returned when the group does not have permission to access the resource.", + "schema": {} + }, + "404": { + "description": "Returned when the resource does not exist.", + "schema": { + "type": "string", + "format": "string" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/googlerpcStatus" + } + } + }, + "parameters": [ + { + "name": "metadata.id", + "in": "path", + "required": true, + "type": "string" + }, + { + "name": "apiVersion", + "description": "API Version. API Version of the group resource", + "in": "query", + "required": false, + "type": "string", + "default": "usermgmt.k8smgmt.io/v3" + }, + { + "name": "kind", + "description": "Kind. Kind of the group resource", + "in": "query", + "required": false, + "type": "string", + "default": "Pipeline" + }, + { + "name": "metadata.name", + "description": "Name. name of the resource", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "metadata.description", + "description": "Description. description of the resource", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "metadata.project", + "description": "Project. Project of the resource", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "metadata.partner", + "description": "Project. Project of the resource", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "metadata.modifiedAt", + "in": "query", + "required": false, + "type": "string", + "format": "date-time" + }, + { + "name": "spec.users", + "description": "Users. List of users for group", + "in": "query", + "required": false, + "type": "array", + "items": { + "type": "string" + }, + "collectionFormat": "multi" + }, + { + "name": "spec.type", + "description": "Type. Type of group", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "status.conditionType", + "description": "Condition Type. type of the status condition", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "status.conditionStatus", + "description": "Condition Status. status of the condition", + "in": "query", + "required": false, + "type": "string", + "enum": [ + "StatusNotSet", + "StatusSubmitted", + "StatusOK", + "StatusFailed" + ], + "default": "StatusNotSet" + }, + { + "name": "status.lastUpdated", + "description": "Last Updated. when the condition status is last updated", + "in": "query", + "required": false, + "type": "string", + "format": "date-time" + }, + { + "name": "status.reason", + "description": "Reason. reason of the last condition status", + "in": "query", + "required": false, + "type": "string" + } + ], + "tags": [ + "Group" + ] + }, + "put": { + "operationId": "Group_UpdateGroup2", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/v3Group" + } + }, + "403": { + "description": "Returned when the group does not have permission to access the resource.", + "schema": {} + }, + "404": { + "description": "Returned when the resource does not exist.", + "schema": { + "type": "string", + "format": "string" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/googlerpcStatus" + } + } + }, + "parameters": [ + { + "name": "metadata.id", + "in": "path", + "required": true, + "type": "string" + }, + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/v3Group" + } + } + ], + "tags": [ + "Group" + ] + } + }, + "/auth/v3/group/{metadata.name}": { "get": { "operationId": "Group_GetGroup", "responses": { @@ -54,10 +395,115 @@ }, "parameters": [ { - "name": "id", + "name": "metadata.name", + "description": "name of the resource", "in": "path", "required": true, "type": "string" + }, + { + "name": "apiVersion", + "description": "API Version. API Version of the group resource", + "in": "query", + "required": false, + "type": "string", + "default": "usermgmt.k8smgmt.io/v3" + }, + { + "name": "kind", + "description": "Kind. Kind of the group resource", + "in": "query", + "required": false, + "type": "string", + "default": "Pipeline" + }, + { + "name": "metadata.description", + "description": "Description. description of the resource", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "metadata.project", + "description": "Project. Project of the resource", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "metadata.partner", + "description": "Project. Project of the resource", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "metadata.id", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "metadata.modifiedAt", + "in": "query", + "required": false, + "type": "string", + "format": "date-time" + }, + { + "name": "spec.users", + "description": "Users. List of users for group", + "in": "query", + "required": false, + "type": "array", + "items": { + "type": "string" + }, + "collectionFormat": "multi" + }, + { + "name": "spec.type", + "description": "Type. Type of group", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "status.conditionType", + "description": "Condition Type. type of the status condition", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "status.conditionStatus", + "description": "Condition Status. status of the condition", + "in": "query", + "required": false, + "type": "string", + "enum": [ + "StatusNotSet", + "StatusSubmitted", + "StatusOK", + "StatusFailed" + ], + "default": "StatusNotSet" + }, + { + "name": "status.lastUpdated", + "description": "Last Updated. when the condition status is last updated", + "in": "query", + "required": false, + "type": "string", + "format": "date-time" + }, + { + "name": "status.reason", + "description": "Reason. reason of the last condition status", + "in": "query", + "required": false, + "type": "string" } ], "tags": [ @@ -70,9 +516,13 @@ "200": { "description": "A successful response.", "schema": { - "$ref": "#/definitions/v3GroupResponse" + "$ref": "#/definitions/v3DeleteGroupResponse" } }, + "204": { + "description": "Returned when group is deleted successfully.", + "schema": {} + }, "403": { "description": "Returned when the group does not have permission to access the resource.", "schema": {} @@ -93,10 +543,115 @@ }, "parameters": [ { - "name": "id", + "name": "metadata.name", + "description": "name of the resource", "in": "path", "required": true, "type": "string" + }, + { + "name": "apiVersion", + "description": "API Version. API Version of the group resource", + "in": "query", + "required": false, + "type": "string", + "default": "usermgmt.k8smgmt.io/v3" + }, + { + "name": "kind", + "description": "Kind. Kind of the group resource", + "in": "query", + "required": false, + "type": "string", + "default": "Pipeline" + }, + { + "name": "metadata.description", + "description": "Description. description of the resource", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "metadata.project", + "description": "Project. Project of the resource", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "metadata.partner", + "description": "Project. Project of the resource", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "metadata.id", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "metadata.modifiedAt", + "in": "query", + "required": false, + "type": "string", + "format": "date-time" + }, + { + "name": "spec.users", + "description": "Users. List of users for group", + "in": "query", + "required": false, + "type": "array", + "items": { + "type": "string" + }, + "collectionFormat": "multi" + }, + { + "name": "spec.type", + "description": "Type. Type of group", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "status.conditionType", + "description": "Condition Type. type of the status condition", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "status.conditionStatus", + "description": "Condition Status. status of the condition", + "in": "query", + "required": false, + "type": "string", + "enum": [ + "StatusNotSet", + "StatusSubmitted", + "StatusOK", + "StatusFailed" + ], + "default": "StatusNotSet" + }, + { + "name": "status.lastUpdated", + "description": "Last Updated. when the condition status is last updated", + "in": "query", + "required": false, + "type": "string", + "format": "date-time" + }, + { + "name": "status.reason", + "description": "Reason. reason of the last condition status", + "in": "query", + "required": false, + "type": "string" } ], "tags": [ @@ -109,7 +664,7 @@ "200": { "description": "A successful response.", "schema": { - "$ref": "#/definitions/v3GroupResponse" + "$ref": "#/definitions/v3Group" } }, "403": { @@ -132,7 +687,8 @@ }, "parameters": [ { - "name": "id", + "name": "metadata.name", + "description": "name of the resource", "in": "path", "required": true, "type": "string" @@ -158,7 +714,7 @@ "200": { "description": "A successful response.", "schema": { - "$ref": "#/definitions/v3GetGroupsResponse" + "$ref": "#/definitions/v3GroupList" } }, "403": { @@ -317,16 +873,8 @@ "default": "StatusNotSet", "title": "$title: ConditionStatus\n$description: status of a condition for a resource" }, - "v3GetGroupsResponse": { - "type": "object", - "properties": { - "group": { - "type": "array", - "items": { - "$ref": "#/definitions/v3Group" - } - } - } + "v3DeleteGroupResponse": { + "type": "object" }, "v3Group": { "type": "object", @@ -369,16 +917,40 @@ "spec" ] }, - "v3GroupResponse": { + "v3GroupList": { "type": "object", "properties": { - "status": { - "type": "string" + "apiVersion": { + "type": "string", + "description": "API Version of the group list resource", + "title": "API Version", + "readOnly": true }, - "message": { - "type": "string" + "kind": { + "type": "string", + "description": "Kind of the group list resource", + "title": "Kind", + "readOnly": true + }, + "metadata": { + "$ref": "#/definitions/v3ListMetadata", + "description": "Metadata of the group list resource", + "title": "Metadata", + "readOnly": true + }, + "items": { + "type": "array", + "items": { + "$ref": "#/definitions/v3Group" + }, + "description": "List of the group resources", + "title": "Items", + "readOnly": true } - } + }, + "description": "Group list", + "title": "GroupList", + "readOnly": true }, "v3GroupSpec": { "type": "object", @@ -408,6 +980,24 @@ "description": "Group specification", "title": "Group Specification" }, + "v3ListMetadata": { + "type": "object", + "properties": { + "count": { + "type": "string", + "format": "int64" + }, + "offset": { + "type": "string", + "format": "int64" + }, + "limt": { + "type": "string", + "format": "int64" + } + }, + "title": "$title: ListMetadata\n$description: metadata for a list of resources\n$required: enabled" + }, "v3Metadata": { "type": "object", "example": { diff --git a/components/usermgmt/gen/openapi/proto/rpc/v3/role.swagger.json b/components/usermgmt/gen/openapi/proto/rpc/v3/role.swagger.json index 8a6b50e..7c7079c 100644 --- a/components/usermgmt/gen/openapi/proto/rpc/v3/role.swagger.json +++ b/components/usermgmt/gen/openapi/proto/rpc/v3/role.swagger.json @@ -24,7 +24,312 @@ "application/yaml" ], "paths": { - "/auth/v3/role/{id}": { + "/auth/v3/role/{metadata.id}": { + "get": { + "operationId": "Role_GetRole2", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/v3Role" + } + }, + "403": { + "description": "Returned when the role does not have permission to access the resource.", + "schema": {} + }, + "404": { + "description": "Returned when the resource does not exist.", + "schema": { + "type": "string", + "format": "string" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/googlerpcStatus" + } + } + }, + "parameters": [ + { + "name": "metadata.id", + "in": "path", + "required": true, + "type": "string" + }, + { + "name": "apiVersion", + "description": "API Version. API Version of the Role resource", + "in": "query", + "required": false, + "type": "string", + "default": "usermgmt.k8smgmt.io/v3" + }, + { + "name": "kind", + "description": "Kind. Kind of the role resource", + "in": "query", + "required": false, + "type": "string", + "default": "Role" + }, + { + "name": "metadata.name", + "description": "Name. name of the resource", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "metadata.description", + "description": "Description. description of the resource", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "metadata.project", + "description": "Project. Project of the resource", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "metadata.partner", + "description": "Project. Project of the resource", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "metadata.modifiedAt", + "in": "query", + "required": false, + "type": "string", + "format": "date-time" + }, + { + "name": "status.conditionType", + "description": "Condition Type. type of the status condition", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "status.conditionStatus", + "description": "Condition Status. status of the condition", + "in": "query", + "required": false, + "type": "string", + "enum": [ + "StatusNotSet", + "StatusSubmitted", + "StatusOK", + "StatusFailed" + ], + "default": "StatusNotSet" + }, + { + "name": "status.lastUpdated", + "description": "Last Updated. when the condition status is last updated", + "in": "query", + "required": false, + "type": "string", + "format": "date-time" + }, + { + "name": "status.reason", + "description": "Reason. reason of the last condition status", + "in": "query", + "required": false, + "type": "string" + } + ], + "tags": [ + "Role" + ] + }, + "delete": { + "operationId": "Role_DeleteRole2", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/v3DeleteRoleResponse" + } + }, + "204": { + "description": "Returned when role is deleted successfully.", + "schema": {} + }, + "403": { + "description": "Returned when the role does not have permission to access the resource.", + "schema": {} + }, + "404": { + "description": "Returned when the resource does not exist.", + "schema": { + "type": "string", + "format": "string" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/googlerpcStatus" + } + } + }, + "parameters": [ + { + "name": "metadata.id", + "in": "path", + "required": true, + "type": "string" + }, + { + "name": "apiVersion", + "description": "API Version. API Version of the Role resource", + "in": "query", + "required": false, + "type": "string", + "default": "usermgmt.k8smgmt.io/v3" + }, + { + "name": "kind", + "description": "Kind. Kind of the role resource", + "in": "query", + "required": false, + "type": "string", + "default": "Role" + }, + { + "name": "metadata.name", + "description": "Name. name of the resource", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "metadata.description", + "description": "Description. description of the resource", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "metadata.project", + "description": "Project. Project of the resource", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "metadata.partner", + "description": "Project. Project of the resource", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "metadata.modifiedAt", + "in": "query", + "required": false, + "type": "string", + "format": "date-time" + }, + { + "name": "status.conditionType", + "description": "Condition Type. type of the status condition", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "status.conditionStatus", + "description": "Condition Status. status of the condition", + "in": "query", + "required": false, + "type": "string", + "enum": [ + "StatusNotSet", + "StatusSubmitted", + "StatusOK", + "StatusFailed" + ], + "default": "StatusNotSet" + }, + { + "name": "status.lastUpdated", + "description": "Last Updated. when the condition status is last updated", + "in": "query", + "required": false, + "type": "string", + "format": "date-time" + }, + { + "name": "status.reason", + "description": "Reason. reason of the last condition status", + "in": "query", + "required": false, + "type": "string" + } + ], + "tags": [ + "Role" + ] + }, + "put": { + "operationId": "Role_UpdateRole2", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/v3Role" + } + }, + "403": { + "description": "Returned when the role does not have permission to access the resource.", + "schema": {} + }, + "404": { + "description": "Returned when the resource does not exist.", + "schema": { + "type": "string", + "format": "string" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/googlerpcStatus" + } + } + }, + "parameters": [ + { + "name": "metadata.id", + "in": "path", + "required": true, + "type": "string" + }, + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/v3Role" + } + } + ], + "tags": [ + "Role" + ] + } + }, + "/auth/v3/role/{metadata.name}": { "get": { "operationId": "Role_GetRole", "responses": { @@ -54,10 +359,97 @@ }, "parameters": [ { - "name": "id", + "name": "metadata.name", + "description": "name of the resource", "in": "path", "required": true, "type": "string" + }, + { + "name": "apiVersion", + "description": "API Version. API Version of the Role resource", + "in": "query", + "required": false, + "type": "string", + "default": "usermgmt.k8smgmt.io/v3" + }, + { + "name": "kind", + "description": "Kind. Kind of the role resource", + "in": "query", + "required": false, + "type": "string", + "default": "Role" + }, + { + "name": "metadata.description", + "description": "Description. description of the resource", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "metadata.project", + "description": "Project. Project of the resource", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "metadata.partner", + "description": "Project. Project of the resource", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "metadata.id", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "metadata.modifiedAt", + "in": "query", + "required": false, + "type": "string", + "format": "date-time" + }, + { + "name": "status.conditionType", + "description": "Condition Type. type of the status condition", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "status.conditionStatus", + "description": "Condition Status. status of the condition", + "in": "query", + "required": false, + "type": "string", + "enum": [ + "StatusNotSet", + "StatusSubmitted", + "StatusOK", + "StatusFailed" + ], + "default": "StatusNotSet" + }, + { + "name": "status.lastUpdated", + "description": "Last Updated. when the condition status is last updated", + "in": "query", + "required": false, + "type": "string", + "format": "date-time" + }, + { + "name": "status.reason", + "description": "Reason. reason of the last condition status", + "in": "query", + "required": false, + "type": "string" } ], "tags": [ @@ -70,9 +462,13 @@ "200": { "description": "A successful response.", "schema": { - "$ref": "#/definitions/v3RoleResponse" + "$ref": "#/definitions/v3DeleteRoleResponse" } }, + "204": { + "description": "Returned when role is deleted successfully.", + "schema": {} + }, "403": { "description": "Returned when the role does not have permission to access the resource.", "schema": {} @@ -93,10 +489,97 @@ }, "parameters": [ { - "name": "id", + "name": "metadata.name", + "description": "name of the resource", "in": "path", "required": true, "type": "string" + }, + { + "name": "apiVersion", + "description": "API Version. API Version of the Role resource", + "in": "query", + "required": false, + "type": "string", + "default": "usermgmt.k8smgmt.io/v3" + }, + { + "name": "kind", + "description": "Kind. Kind of the role resource", + "in": "query", + "required": false, + "type": "string", + "default": "Role" + }, + { + "name": "metadata.description", + "description": "Description. description of the resource", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "metadata.project", + "description": "Project. Project of the resource", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "metadata.partner", + "description": "Project. Project of the resource", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "metadata.id", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "metadata.modifiedAt", + "in": "query", + "required": false, + "type": "string", + "format": "date-time" + }, + { + "name": "status.conditionType", + "description": "Condition Type. type of the status condition", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "status.conditionStatus", + "description": "Condition Status. status of the condition", + "in": "query", + "required": false, + "type": "string", + "enum": [ + "StatusNotSet", + "StatusSubmitted", + "StatusOK", + "StatusFailed" + ], + "default": "StatusNotSet" + }, + { + "name": "status.lastUpdated", + "description": "Last Updated. when the condition status is last updated", + "in": "query", + "required": false, + "type": "string", + "format": "date-time" + }, + { + "name": "status.reason", + "description": "Reason. reason of the last condition status", + "in": "query", + "required": false, + "type": "string" } ], "tags": [ @@ -109,7 +592,7 @@ "200": { "description": "A successful response.", "schema": { - "$ref": "#/definitions/v3RoleResponse" + "$ref": "#/definitions/v3Role" } }, "403": { @@ -132,7 +615,8 @@ }, "parameters": [ { - "name": "id", + "name": "metadata.name", + "description": "name of the resource", "in": "path", "required": true, "type": "string" @@ -158,7 +642,7 @@ "200": { "description": "A successful response.", "schema": { - "$ref": "#/definitions/v3GetRolesResponse" + "$ref": "#/definitions/v3RoleList" } }, "403": { @@ -308,16 +792,26 @@ "default": "StatusNotSet", "title": "$title: ConditionStatus\n$description: status of a condition for a resource" }, - "v3GetRolesResponse": { + "v3DeleteRoleResponse": { + "type": "object" + }, + "v3ListMetadata": { "type": "object", "properties": { - "role": { - "type": "array", - "items": { - "$ref": "#/definitions/v3Role" - } + "count": { + "type": "string", + "format": "int64" + }, + "offset": { + "type": "string", + "format": "int64" + }, + "limt": { + "type": "string", + "format": "int64" } - } + }, + "title": "$title: ListMetadata\n$description: metadata for a list of resources\n$required: enabled" }, "v3Metadata": { "type": "object", @@ -420,6 +914,41 @@ "spec" ] }, + "v3RoleList": { + "type": "object", + "properties": { + "apiVersion": { + "type": "string", + "description": "API Version of the role list resource", + "title": "API Version", + "readOnly": true + }, + "kind": { + "type": "string", + "description": "Kind of the role list resource", + "title": "Kind", + "readOnly": true + }, + "metadata": { + "$ref": "#/definitions/v3ListMetadata", + "description": "Metadata of the role list resource", + "title": "Metadata", + "readOnly": true + }, + "items": { + "type": "array", + "items": { + "$ref": "#/definitions/v3Role" + }, + "description": "List of role resources", + "title": "Items", + "readOnly": true + } + }, + "description": "Role list", + "title": "RoleList", + "readOnly": true + }, "v3RolePermission": { "type": "object", "properties": { @@ -476,17 +1005,6 @@ "description": "RolePermisson specification", "title": "RolePermission Specification" }, - "v3RoleResponse": { - "type": "object", - "properties": { - "status": { - "type": "string" - }, - "message": { - "type": "string" - } - } - }, "v3RoleSpec": { "type": "object", "properties": { diff --git a/components/usermgmt/gen/openapi/proto/rpc/v3/rolepermission.swagger.json b/components/usermgmt/gen/openapi/proto/rpc/v3/rolepermission.swagger.json index 733db45..d3d0fbc 100644 --- a/components/usermgmt/gen/openapi/proto/rpc/v3/rolepermission.swagger.json +++ b/components/usermgmt/gen/openapi/proto/rpc/v3/rolepermission.swagger.json @@ -24,7 +24,146 @@ "application/yaml" ], "paths": { - "/auth/v3/rolepermission/{id}": { + "/auth/v3/rolepermission/{metadata.id}": { + "get": { + "operationId": "Rolepermission_GetRolepermission2", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/v3RolePermission" + } + }, + "403": { + "description": "Returned when the rolepermission does not have permission to access the resource.", + "schema": {} + }, + "404": { + "description": "Returned when the resource does not exist.", + "schema": { + "type": "string", + "format": "string" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/googlerpcStatus" + } + } + }, + "parameters": [ + { + "name": "metadata.id", + "in": "path", + "required": true, + "type": "string" + }, + { + "name": "apiVersion", + "description": "API Version. API Version of the role permission resource", + "in": "query", + "required": false, + "type": "string", + "default": "usermgmt.k8smgmt.io/v3" + }, + { + "name": "kind", + "description": "Kind. Kind of the role permission resource", + "in": "query", + "required": false, + "type": "string", + "default": "RolePermission" + }, + { + "name": "metadata.name", + "description": "Name. name of the resource", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "metadata.description", + "description": "Description. description of the resource", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "metadata.project", + "description": "Project. Project of the resource", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "metadata.partner", + "description": "Project. Project of the resource", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "metadata.modifiedAt", + "in": "query", + "required": false, + "type": "string", + "format": "date-time" + }, + { + "name": "spec.permissions", + "description": "Permissions. List of permisions for role", + "in": "query", + "required": false, + "type": "array", + "items": { + "type": "string" + }, + "collectionFormat": "multi" + }, + { + "name": "status.conditionType", + "description": "Condition Type. type of the status condition", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "status.conditionStatus", + "description": "Condition Status. status of the condition", + "in": "query", + "required": false, + "type": "string", + "enum": [ + "StatusNotSet", + "StatusSubmitted", + "StatusOK", + "StatusFailed" + ], + "default": "StatusNotSet" + }, + { + "name": "status.lastUpdated", + "description": "Last Updated. when the condition status is last updated", + "in": "query", + "required": false, + "type": "string", + "format": "date-time" + }, + { + "name": "status.reason", + "description": "Reason. reason of the last condition status", + "in": "query", + "required": false, + "type": "string" + } + ], + "tags": [ + "Rolepermission" + ] + } + }, + "/auth/v3/rolepermission/{metadata.name}": { "get": { "operationId": "Rolepermission_GetRolepermission", "responses": { @@ -54,11 +193,108 @@ }, "parameters": [ { - "name": "id", - "description": "Id of the rolepermission resource", + "name": "metadata.name", + "description": "name of the resource", "in": "path", "required": true, "type": "string" + }, + { + "name": "apiVersion", + "description": "API Version. API Version of the role permission resource", + "in": "query", + "required": false, + "type": "string", + "default": "usermgmt.k8smgmt.io/v3" + }, + { + "name": "kind", + "description": "Kind. Kind of the role permission resource", + "in": "query", + "required": false, + "type": "string", + "default": "RolePermission" + }, + { + "name": "metadata.description", + "description": "Description. description of the resource", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "metadata.project", + "description": "Project. Project of the resource", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "metadata.partner", + "description": "Project. Project of the resource", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "metadata.id", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "metadata.modifiedAt", + "in": "query", + "required": false, + "type": "string", + "format": "date-time" + }, + { + "name": "spec.permissions", + "description": "Permissions. List of permisions for role", + "in": "query", + "required": false, + "type": "array", + "items": { + "type": "string" + }, + "collectionFormat": "multi" + }, + { + "name": "status.conditionType", + "description": "Condition Type. type of the status condition", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "status.conditionStatus", + "description": "Condition Status. status of the condition", + "in": "query", + "required": false, + "type": "string", + "enum": [ + "StatusNotSet", + "StatusSubmitted", + "StatusOK", + "StatusFailed" + ], + "default": "StatusNotSet" + }, + { + "name": "status.lastUpdated", + "description": "Last Updated. when the condition status is last updated", + "in": "query", + "required": false, + "type": "string", + "format": "date-time" + }, + { + "name": "status.reason", + "description": "Reason. reason of the last condition status", + "in": "query", + "required": false, + "type": "string" } ], "tags": [ @@ -73,7 +309,7 @@ "200": { "description": "A successful response.", "schema": { - "$ref": "#/definitions/v3GetRolepermissionsResponse" + "$ref": "#/definitions/v3RolePermissionList" } }, "403": { @@ -178,18 +414,23 @@ "default": "StatusNotSet", "title": "$title: ConditionStatus\n$description: status of a condition for a resource" }, - "v3GetRolepermissionsResponse": { + "v3ListMetadata": { "type": "object", "properties": { - "rolepermissions": { - "type": "array", - "items": { - "$ref": "#/definitions/v3RolePermission" - }, - "description": "List of the rolepermission resources", - "title": "RolePermissions" + "count": { + "type": "string", + "format": "int64" + }, + "offset": { + "type": "string", + "format": "int64" + }, + "limt": { + "type": "string", + "format": "int64" } - } + }, + "title": "$title: ListMetadata\n$description: metadata for a list of resources\n$required: enabled" }, "v3Metadata": { "type": "object", @@ -292,6 +533,41 @@ "spec" ] }, + "v3RolePermissionList": { + "type": "object", + "properties": { + "apiVersion": { + "type": "string", + "description": "API Version of the role permission list resource", + "title": "API Version", + "readOnly": true + }, + "kind": { + "type": "string", + "description": "Kind of the role permission list resource", + "title": "Kind", + "readOnly": true + }, + "metadata": { + "$ref": "#/definitions/v3ListMetadata", + "description": "Metadata of the role permission list resource", + "title": "Metadata", + "readOnly": true + }, + "items": { + "type": "array", + "items": { + "$ref": "#/definitions/v3RolePermission" + }, + "description": "List of the role permission resources", + "title": "Items", + "readOnly": true + } + }, + "description": "RolePeList list", + "title": "RolePermissionList", + "readOnly": true + }, "v3RolePermissionSpec": { "type": "object", "properties": { diff --git a/components/usermgmt/gen/openapi/proto/rpc/v3/user.swagger.json b/components/usermgmt/gen/openapi/proto/rpc/v3/user.swagger.json index 8662c16..a37104f 100644 --- a/components/usermgmt/gen/openapi/proto/rpc/v3/user.swagger.json +++ b/components/usermgmt/gen/openapi/proto/rpc/v3/user.swagger.json @@ -24,7 +24,446 @@ "application/yaml" ], "paths": { - "/auth/v3/user/{userid}": { + "/auth/v3/user/{metadata.id}": { + "get": { + "operationId": "User_GetUser2", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/v3User" + } + }, + "403": { + "description": "Returned when the user does not have permission to access the resource.", + "schema": {} + }, + "404": { + "description": "Returned when the resource does not exist.", + "schema": { + "type": "string", + "format": "string" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/googlerpcStatus" + } + } + }, + "parameters": [ + { + "name": "metadata.id", + "in": "path", + "required": true, + "type": "string" + }, + { + "name": "apiVersion", + "description": "API Version. API Version of the user resource", + "in": "query", + "required": false, + "type": "string", + "default": "usermgmt.k8smgmt.io/v3" + }, + { + "name": "kind", + "description": "Kind. Kind of the user resource", + "in": "query", + "required": false, + "type": "string", + "default": "User" + }, + { + "name": "metadata.name", + "description": "Name. name of the resource", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "metadata.description", + "description": "Description. description of the resource", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "metadata.project", + "description": "Project. Project of the resource", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "metadata.partner", + "description": "Project. Project of the resource", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "metadata.modifiedAt", + "in": "query", + "required": false, + "type": "string", + "format": "date-time" + }, + { + "name": "spec.firstName", + "description": "FirstName. First name of the user", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "spec.lastName", + "description": "LastName. Last name of the user", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "spec.username", + "description": "Username. Username of the user", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "spec.phone", + "description": "Phone. Phone number of the user", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "spec.password", + "description": "Password. Password of the user", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "spec.groups", + "description": "Group. Groups the user belongs to", + "in": "query", + "required": false, + "type": "array", + "items": { + "type": "string" + }, + "collectionFormat": "multi" + }, + { + "name": "spec.emailVerified", + "description": "EmailVerified. Flag to show if the email of the user was verified", + "in": "query", + "required": false, + "type": "boolean" + }, + { + "name": "spec.phoneVerified", + "description": "PhoneVerified. Flag to show if phone number of the user was verified", + "in": "query", + "required": false, + "type": "boolean" + }, + { + "name": "spec.totpVerified", + "description": "TotpVerified. Flag to show if the TOTP of the user was verified", + "in": "query", + "required": false, + "type": "boolean" + }, + { + "name": "status.conditionType", + "description": "Condition Type. type of the status condition", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "status.conditionStatus", + "description": "Condition Status. status of the condition", + "in": "query", + "required": false, + "type": "string", + "enum": [ + "StatusNotSet", + "StatusSubmitted", + "StatusOK", + "StatusFailed" + ], + "default": "StatusNotSet" + }, + { + "name": "status.lastUpdated", + "description": "Last Updated. when the condition status is last updated", + "in": "query", + "required": false, + "type": "string", + "format": "date-time" + }, + { + "name": "status.reason", + "description": "Reason. reason of the last condition status", + "in": "query", + "required": false, + "type": "string" + } + ], + "tags": [ + "User" + ] + }, + "delete": { + "operationId": "User_DeleteUser2", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/v3DeleteUserResponse" + } + }, + "204": { + "description": "Returned when user is deleted successfully.", + "schema": {} + }, + "403": { + "description": "Returned when the user does not have permission to access the resource.", + "schema": {} + }, + "404": { + "description": "Returned when the resource does not exist.", + "schema": { + "type": "string", + "format": "string" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/googlerpcStatus" + } + } + }, + "parameters": [ + { + "name": "metadata.id", + "in": "path", + "required": true, + "type": "string" + }, + { + "name": "apiVersion", + "description": "API Version. API Version of the user resource", + "in": "query", + "required": false, + "type": "string", + "default": "usermgmt.k8smgmt.io/v3" + }, + { + "name": "kind", + "description": "Kind. Kind of the user resource", + "in": "query", + "required": false, + "type": "string", + "default": "User" + }, + { + "name": "metadata.name", + "description": "Name. name of the resource", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "metadata.description", + "description": "Description. description of the resource", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "metadata.project", + "description": "Project. Project of the resource", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "metadata.partner", + "description": "Project. Project of the resource", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "metadata.modifiedAt", + "in": "query", + "required": false, + "type": "string", + "format": "date-time" + }, + { + "name": "spec.firstName", + "description": "FirstName. First name of the user", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "spec.lastName", + "description": "LastName. Last name of the user", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "spec.username", + "description": "Username. Username of the user", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "spec.phone", + "description": "Phone. Phone number of the user", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "spec.password", + "description": "Password. Password of the user", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "spec.groups", + "description": "Group. Groups the user belongs to", + "in": "query", + "required": false, + "type": "array", + "items": { + "type": "string" + }, + "collectionFormat": "multi" + }, + { + "name": "spec.emailVerified", + "description": "EmailVerified. Flag to show if the email of the user was verified", + "in": "query", + "required": false, + "type": "boolean" + }, + { + "name": "spec.phoneVerified", + "description": "PhoneVerified. Flag to show if phone number of the user was verified", + "in": "query", + "required": false, + "type": "boolean" + }, + { + "name": "spec.totpVerified", + "description": "TotpVerified. Flag to show if the TOTP of the user was verified", + "in": "query", + "required": false, + "type": "boolean" + }, + { + "name": "status.conditionType", + "description": "Condition Type. type of the status condition", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "status.conditionStatus", + "description": "Condition Status. status of the condition", + "in": "query", + "required": false, + "type": "string", + "enum": [ + "StatusNotSet", + "StatusSubmitted", + "StatusOK", + "StatusFailed" + ], + "default": "StatusNotSet" + }, + { + "name": "status.lastUpdated", + "description": "Last Updated. when the condition status is last updated", + "in": "query", + "required": false, + "type": "string", + "format": "date-time" + }, + { + "name": "status.reason", + "description": "Reason. reason of the last condition status", + "in": "query", + "required": false, + "type": "string" + } + ], + "tags": [ + "User" + ] + }, + "put": { + "operationId": "User_UpdateUser2", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/v3User" + } + }, + "403": { + "description": "Returned when the user does not have permission to access the resource.", + "schema": {} + }, + "404": { + "description": "Returned when the resource does not exist.", + "schema": { + "type": "string", + "format": "string" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/googlerpcStatus" + } + } + }, + "parameters": [ + { + "name": "metadata.id", + "in": "path", + "required": true, + "type": "string" + }, + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/v3User" + } + } + ], + "tags": [ + "User" + ] + } + }, + "/auth/v3/user/{metadata.name}": { "get": { "operationId": "User_GetUser", "responses": { @@ -54,10 +493,164 @@ }, "parameters": [ { - "name": "userid", + "name": "metadata.name", + "description": "name of the resource", "in": "path", "required": true, "type": "string" + }, + { + "name": "apiVersion", + "description": "API Version. API Version of the user resource", + "in": "query", + "required": false, + "type": "string", + "default": "usermgmt.k8smgmt.io/v3" + }, + { + "name": "kind", + "description": "Kind. Kind of the user resource", + "in": "query", + "required": false, + "type": "string", + "default": "User" + }, + { + "name": "metadata.description", + "description": "Description. description of the resource", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "metadata.project", + "description": "Project. Project of the resource", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "metadata.partner", + "description": "Project. Project of the resource", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "metadata.id", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "metadata.modifiedAt", + "in": "query", + "required": false, + "type": "string", + "format": "date-time" + }, + { + "name": "spec.firstName", + "description": "FirstName. First name of the user", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "spec.lastName", + "description": "LastName. Last name of the user", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "spec.username", + "description": "Username. Username of the user", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "spec.phone", + "description": "Phone. Phone number of the user", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "spec.password", + "description": "Password. Password of the user", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "spec.groups", + "description": "Group. Groups the user belongs to", + "in": "query", + "required": false, + "type": "array", + "items": { + "type": "string" + }, + "collectionFormat": "multi" + }, + { + "name": "spec.emailVerified", + "description": "EmailVerified. Flag to show if the email of the user was verified", + "in": "query", + "required": false, + "type": "boolean" + }, + { + "name": "spec.phoneVerified", + "description": "PhoneVerified. Flag to show if phone number of the user was verified", + "in": "query", + "required": false, + "type": "boolean" + }, + { + "name": "spec.totpVerified", + "description": "TotpVerified. Flag to show if the TOTP of the user was verified", + "in": "query", + "required": false, + "type": "boolean" + }, + { + "name": "status.conditionType", + "description": "Condition Type. type of the status condition", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "status.conditionStatus", + "description": "Condition Status. status of the condition", + "in": "query", + "required": false, + "type": "string", + "enum": [ + "StatusNotSet", + "StatusSubmitted", + "StatusOK", + "StatusFailed" + ], + "default": "StatusNotSet" + }, + { + "name": "status.lastUpdated", + "description": "Last Updated. when the condition status is last updated", + "in": "query", + "required": false, + "type": "string", + "format": "date-time" + }, + { + "name": "status.reason", + "description": "Reason. reason of the last condition status", + "in": "query", + "required": false, + "type": "string" } ], "tags": [ @@ -70,9 +663,13 @@ "200": { "description": "A successful response.", "schema": { - "$ref": "#/definitions/v3UserResponse" + "$ref": "#/definitions/v3DeleteUserResponse" } }, + "204": { + "description": "Returned when user is deleted successfully.", + "schema": {} + }, "403": { "description": "Returned when the user does not have permission to access the resource.", "schema": {} @@ -93,10 +690,164 @@ }, "parameters": [ { - "name": "userid", + "name": "metadata.name", + "description": "name of the resource", "in": "path", "required": true, "type": "string" + }, + { + "name": "apiVersion", + "description": "API Version. API Version of the user resource", + "in": "query", + "required": false, + "type": "string", + "default": "usermgmt.k8smgmt.io/v3" + }, + { + "name": "kind", + "description": "Kind. Kind of the user resource", + "in": "query", + "required": false, + "type": "string", + "default": "User" + }, + { + "name": "metadata.description", + "description": "Description. description of the resource", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "metadata.project", + "description": "Project. Project of the resource", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "metadata.partner", + "description": "Project. Project of the resource", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "metadata.id", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "metadata.modifiedAt", + "in": "query", + "required": false, + "type": "string", + "format": "date-time" + }, + { + "name": "spec.firstName", + "description": "FirstName. First name of the user", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "spec.lastName", + "description": "LastName. Last name of the user", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "spec.username", + "description": "Username. Username of the user", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "spec.phone", + "description": "Phone. Phone number of the user", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "spec.password", + "description": "Password. Password of the user", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "spec.groups", + "description": "Group. Groups the user belongs to", + "in": "query", + "required": false, + "type": "array", + "items": { + "type": "string" + }, + "collectionFormat": "multi" + }, + { + "name": "spec.emailVerified", + "description": "EmailVerified. Flag to show if the email of the user was verified", + "in": "query", + "required": false, + "type": "boolean" + }, + { + "name": "spec.phoneVerified", + "description": "PhoneVerified. Flag to show if phone number of the user was verified", + "in": "query", + "required": false, + "type": "boolean" + }, + { + "name": "spec.totpVerified", + "description": "TotpVerified. Flag to show if the TOTP of the user was verified", + "in": "query", + "required": false, + "type": "boolean" + }, + { + "name": "status.conditionType", + "description": "Condition Type. type of the status condition", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "status.conditionStatus", + "description": "Condition Status. status of the condition", + "in": "query", + "required": false, + "type": "string", + "enum": [ + "StatusNotSet", + "StatusSubmitted", + "StatusOK", + "StatusFailed" + ], + "default": "StatusNotSet" + }, + { + "name": "status.lastUpdated", + "description": "Last Updated. when the condition status is last updated", + "in": "query", + "required": false, + "type": "string", + "format": "date-time" + }, + { + "name": "status.reason", + "description": "Reason. reason of the last condition status", + "in": "query", + "required": false, + "type": "string" } ], "tags": [ @@ -109,7 +860,7 @@ "200": { "description": "A successful response.", "schema": { - "$ref": "#/definitions/v3UserResponse" + "$ref": "#/definitions/v3User" } }, "403": { @@ -132,7 +883,8 @@ }, "parameters": [ { - "name": "userid", + "name": "metadata.name", + "description": "name of the resource", "in": "path", "required": true, "type": "string" @@ -308,6 +1060,9 @@ "default": "StatusNotSet", "title": "$title: ConditionStatus\n$description: status of a condition for a resource" }, + "v3DeleteUserResponse": { + "type": "object" + }, "v3ListMetadata": { "type": "object", "properties": { @@ -464,17 +1219,6 @@ "title": "UserList", "readOnly": true }, - "v3UserResponse": { - "type": "object", - "properties": { - "status": { - "type": "string" - }, - "message": { - "type": "string" - } - } - }, "v3UserSpec": { "type": "object", "properties": { diff --git a/components/usermgmt/go.mod b/components/usermgmt/go.mod index c8606df..63c3290 100644 --- a/components/usermgmt/go.mod +++ b/components/usermgmt/go.mod @@ -18,5 +18,4 @@ require ( replace ( github.com/RafaySystems/rcloud-base/components/adminsrv v0.0.0-unpublished => ../adminsrv/ github.com/RafaySystems/rcloud-base/components/common v0.0.0-unpublished => ../common/ -// github.com/RafaySystems/rcloud-base/components/usermgmt v0.0.0-unpublished => ../usermgmt ) diff --git a/components/usermgmt/go.sum b/components/usermgmt/go.sum index af5edd1..1ea4d27 100644 --- a/components/usermgmt/go.sum +++ b/components/usermgmt/go.sum @@ -261,6 +261,7 @@ github.com/google/pprof v0.0.0-20210609004039-a478d1d731e9/go.mod h1:kpwsk12EmLe github.com/google/pprof v0.0.0-20210720184732-4bb14d4b1be1/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI= github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= +github.com/google/uuid v1.3.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+vpHVxEJEs9eg= github.com/googleapis/gax-go/v2 v2.0.5/go.mod h1:DWXyrwAJ9X0FpwwEdw+IPEYBICEFu5mhpdKc/us6bOk= github.com/googleapis/gax-go/v2 v2.1.0/go.mod h1:Q3nei7sK6ybPYH7twZdmQpAd1MKb7pfu6SK+H1/DsU0= diff --git a/components/usermgmt/pkg/service/user.go b/components/usermgmt/pkg/service/user.go index 1991355..3e37cc5 100644 --- a/components/usermgmt/pkg/service/user.go +++ b/components/usermgmt/pkg/service/user.go @@ -15,6 +15,7 @@ type server struct { kc *kclient.APIClient } +// Convert from kratos.Identity to GVK format func identityToUser(id *kclient.Identity) *userv3.User { traits := id.Traits.(map[string]interface{}) return &userv3.User{ @@ -24,9 +25,9 @@ func identityToUser(id *kclient.Identity) *userv3.User { Id: id.Id, }, Spec: &userv3.UserSpec{ - Username: traits["email"].(string), + Username: traits["email"].(string), FirstName: traits["first_name"].(string), - LastName: traits["last_name"].(string), + LastName: traits["last_name"].(string), }, } } @@ -42,10 +43,21 @@ func (s *server) CreateUser(ctx context.Context, user *userv3.User) (*userv3.Use } rlb := kclient.NewAdminCreateSelfServiceRecoveryLinkBody(ir.Id) rl, _, err := s.kc.V0alpha2Api.AdminCreateSelfServiceRecoveryLink(ctx).AdminCreateSelfServiceRecoveryLinkBody(*rlb).Execute() + if err != nil { + return nil, err + } fmt.Println("Recovery link:", rl.RecoveryLink) // TODO: email the recovery link to the user - return identityToUser(ir), nil + user.Metadata = &v3.Metadata{ + Id : ir.Id, + } + user.Status = &v3.Status{ + ConditionType: "StatusOK", + ConditionStatus: v3.ConditionStatus_StatusOK, + } + + return user, nil } -func (s *server) GetUsers(ctx context.Context, _ *userrpcv3.Empty) (*userv3.UserList, error) { +func (s *server) GetUsers(ctx context.Context, _ *userrpcv3.GetUsersRequest) (*userv3.UserList, error) { ir, _, err := s.kc.V0alpha2Api.AdminListIdentities(ctx).Execute() if err != nil { return nil, err @@ -56,31 +68,37 @@ func (s *server) GetUsers(ctx context.Context, _ *userrpcv3.Empty) (*userv3.User } return res, nil } -func (s *server) GetUser(ctx context.Context, req *userrpcv3.UserRequest) (*userv3.User, error) { +func (s *server) GetUser(ctx context.Context, user *userv3.User) (*userv3.User, error) { // TODO: should it be get by id or by email? Kratos can only fileter by id - ir, _, err := s.kc.V0alpha2Api.AdminGetIdentity(ctx, req.Userid).Execute() + ir, _, err := s.kc.V0alpha2Api.AdminGetIdentity(ctx, user.Metadata.Id).Execute() if err != nil { return nil, err } return identityToUser(ir), nil } -func (s *server) UpdateUser(ctx context.Context, req *userrpcv3.PutUserRequest) (*userrpcv3.UserResponse, error) { - uib := kclient.NewAdminUpdateIdentityBody("active", map[string]interface{}{"email": req.User.Spec.Username, "first_name": req.User.Spec.FirstName, "last_name": req.User.Spec.LastName}) - _, hr, err := s.kc.V0alpha2Api.AdminUpdateIdentity(ctx, req.Userid).AdminUpdateIdentityBody(*uib).Execute() +func (s *server) UpdateUser(ctx context.Context, user *userv3.User) (*userv3.User, error) { + uib := kclient.NewAdminUpdateIdentityBody("active", map[string]interface{}{"email": user.Spec.Username, "first_name": user.Spec.FirstName, "last_name": user.Spec.LastName}) + _, hr, err := s.kc.V0alpha2Api.AdminUpdateIdentity(ctx, user.Metadata.Id).AdminUpdateIdentityBody(*uib).Execute() if err != nil { fmt.Println(hr) // TODO: forward exact error message from kratos (eg: json schema validation) return nil, err } - return &userrpcv3.UserResponse{Status: "OK"}, nil + user.Status = &v3.Status{ + ConditionType: "StatusOK", + ConditionStatus: v3.ConditionStatus_StatusOK, + } + + return user, nil } -func (s *server) DeleteUser(ctx context.Context, req *userrpcv3.UserRequest) (*userrpcv3.UserResponse, error) { - // TODO: should it be get by id or by email? Kratos can only fileter by id - _, err := s.kc.V0alpha2Api.AdminDeleteIdentity(ctx, req.Userid).Execute() +func (s *server) DeleteUser(ctx context.Context, user *userv3.User) (*userrpcv3.DeleteUserResponse, error) { + // TODO: should it be get by id or by email? Kratos can only filter by id + _, err := s.kc.V0alpha2Api.AdminDeleteIdentity(ctx, user.Metadata.Id).Execute() if err != nil { return nil, err } - return &userrpcv3.UserResponse{Status: "OK"}, nil + + return &userrpcv3.DeleteUserResponse{}, nil } func NewUserServer(kc *kclient.APIClient) userrpcv3.UserServer { diff --git a/components/usermgmt/proto/rpc/v3/group.pb.go b/components/usermgmt/proto/rpc/v3/group.pb.go index 9621987..d5005af 100644 --- a/components/usermgmt/proto/rpc/v3/group.pb.go +++ b/components/usermgmt/proto/rpc/v3/group.pb.go @@ -72,16 +72,14 @@ func (x *GetGroupsRequest) GetProject() string { return "" } -type GetGroupRequest struct { +type DeleteGroupResponse struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - - Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` } -func (x *GetGroupRequest) Reset() { - *x = GetGroupRequest{} +func (x *DeleteGroupResponse) Reset() { + *x = DeleteGroupResponse{} if protoimpl.UnsafeEnabled { mi := &file_proto_rpc_v3_group_proto_msgTypes[1] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -89,13 +87,13 @@ func (x *GetGroupRequest) Reset() { } } -func (x *GetGroupRequest) String() string { +func (x *DeleteGroupResponse) String() string { return protoimpl.X.MessageStringOf(x) } -func (*GetGroupRequest) ProtoMessage() {} +func (*DeleteGroupResponse) ProtoMessage() {} -func (x *GetGroupRequest) ProtoReflect() protoreflect.Message { +func (x *DeleteGroupResponse) ProtoReflect() protoreflect.Message { mi := &file_proto_rpc_v3_group_proto_msgTypes[1] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -107,222 +105,11 @@ func (x *GetGroupRequest) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use GetGroupRequest.ProtoReflect.Descriptor instead. -func (*GetGroupRequest) Descriptor() ([]byte, []int) { +// Deprecated: Use DeleteGroupResponse.ProtoReflect.Descriptor instead. +func (*DeleteGroupResponse) Descriptor() ([]byte, []int) { return file_proto_rpc_v3_group_proto_rawDescGZIP(), []int{1} } -func (x *GetGroupRequest) GetId() string { - if x != nil { - return x.Id - } - return "" -} - -type DeleteGroupRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` -} - -func (x *DeleteGroupRequest) Reset() { - *x = DeleteGroupRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_proto_rpc_v3_group_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *DeleteGroupRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*DeleteGroupRequest) ProtoMessage() {} - -func (x *DeleteGroupRequest) ProtoReflect() protoreflect.Message { - mi := &file_proto_rpc_v3_group_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use DeleteGroupRequest.ProtoReflect.Descriptor instead. -func (*DeleteGroupRequest) Descriptor() ([]byte, []int) { - return file_proto_rpc_v3_group_proto_rawDescGZIP(), []int{2} -} - -func (x *DeleteGroupRequest) GetId() string { - if x != nil { - return x.Id - } - return "" -} - -type PutGroupRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` - Group *v3.Group `protobuf:"bytes,2,opt,name=group,proto3" json:"group,omitempty"` -} - -func (x *PutGroupRequest) Reset() { - *x = PutGroupRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_proto_rpc_v3_group_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *PutGroupRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*PutGroupRequest) ProtoMessage() {} - -func (x *PutGroupRequest) ProtoReflect() protoreflect.Message { - mi := &file_proto_rpc_v3_group_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use PutGroupRequest.ProtoReflect.Descriptor instead. -func (*PutGroupRequest) Descriptor() ([]byte, []int) { - return file_proto_rpc_v3_group_proto_rawDescGZIP(), []int{3} -} - -func (x *PutGroupRequest) GetId() string { - if x != nil { - return x.Id - } - return "" -} - -func (x *PutGroupRequest) GetGroup() *v3.Group { - if x != nil { - return x.Group - } - return nil -} - -type GetGroupsResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Group []*v3.Group `protobuf:"bytes,1,rep,name=group,proto3" json:"group,omitempty"` -} - -func (x *GetGroupsResponse) Reset() { - *x = GetGroupsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_proto_rpc_v3_group_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *GetGroupsResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GetGroupsResponse) ProtoMessage() {} - -func (x *GetGroupsResponse) ProtoReflect() protoreflect.Message { - mi := &file_proto_rpc_v3_group_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use GetGroupsResponse.ProtoReflect.Descriptor instead. -func (*GetGroupsResponse) Descriptor() ([]byte, []int) { - return file_proto_rpc_v3_group_proto_rawDescGZIP(), []int{4} -} - -func (x *GetGroupsResponse) GetGroup() []*v3.Group { - if x != nil { - return x.Group - } - return nil -} - -type GroupResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Status string `protobuf:"bytes,1,opt,name=status,proto3" json:"status,omitempty"` - Message string `protobuf:"bytes,2,opt,name=message,proto3" json:"message,omitempty"` -} - -func (x *GroupResponse) Reset() { - *x = GroupResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_proto_rpc_v3_group_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *GroupResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GroupResponse) ProtoMessage() {} - -func (x *GroupResponse) ProtoReflect() protoreflect.Message { - mi := &file_proto_rpc_v3_group_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use GroupResponse.ProtoReflect.Descriptor instead. -func (*GroupResponse) Descriptor() ([]byte, []int) { - return file_proto_rpc_v3_group_proto_rawDescGZIP(), []int{5} -} - -func (x *GroupResponse) GetStatus() string { - if x != nil { - return x.Status - } - return "" -} - -func (x *GroupResponse) GetMessage() string { - if x != nil { - return x.Message - } - return "" -} - var File_proto_rpc_v3_group_proto protoreflect.FileDescriptor var file_proto_rpc_v3_group_proto_rawDesc = []byte{ @@ -343,102 +130,96 @@ var file_proto_rpc_v3_group_proto_rawDesc = []byte{ 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x32, 0x1c, 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x20, 0x6f, 0x66, 0x20, 0x75, 0x73, 0x65, 0x72, 0x20, 0x74, 0x6f, 0x20, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x20, 0x62, 0x79, 0x40, 0x01, 0x52, 0x07, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x22, - 0x21, 0x0a, 0x0f, 0x47, 0x65, 0x74, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, - 0x69, 0x64, 0x22, 0x24, 0x0a, 0x12, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x47, 0x72, 0x6f, 0x75, - 0x70, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x22, 0x57, 0x0a, 0x0f, 0x50, 0x75, 0x74, 0x47, - 0x72, 0x6f, 0x75, 0x70, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, - 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x34, 0x0a, 0x05, 0x67, - 0x72, 0x6f, 0x75, 0x70, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x72, 0x61, 0x66, - 0x61, 0x79, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x75, 0x73, 0x65, - 0x72, 0x2e, 0x76, 0x33, 0x2e, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x52, 0x05, 0x67, 0x72, 0x6f, 0x75, - 0x70, 0x22, 0x49, 0x0a, 0x11, 0x47, 0x65, 0x74, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x73, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x34, 0x0a, 0x05, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x18, - 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x72, 0x61, 0x66, 0x61, 0x79, 0x2e, 0x64, 0x65, - 0x76, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x2e, - 0x47, 0x72, 0x6f, 0x75, 0x70, 0x52, 0x05, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x22, 0x41, 0x0a, 0x0d, - 0x47, 0x72, 0x6f, 0x75, 0x70, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x16, 0x0a, - 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x73, - 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x18, 0x0a, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x32, - 0xf2, 0x04, 0x0a, 0x05, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x12, 0xa3, 0x01, 0x0a, 0x0b, 0x43, 0x72, - 0x65, 0x61, 0x74, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x12, 0x1e, 0x2e, 0x72, 0x61, 0x66, 0x61, + 0x15, 0x0a, 0x13, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x32, 0xa8, 0x06, 0x0a, 0x05, 0x47, 0x72, 0x6f, 0x75, 0x70, + 0x12, 0xa3, 0x01, 0x0a, 0x0b, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, + 0x12, 0x1e, 0x2e, 0x72, 0x61, 0x66, 0x61, 0x79, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x74, 0x79, 0x70, + 0x65, 0x73, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x2e, 0x47, 0x72, 0x6f, 0x75, 0x70, + 0x1a, 0x1e, 0x2e, 0x72, 0x61, 0x66, 0x61, 0x79, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x74, 0x79, 0x70, + 0x65, 0x73, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x2e, 0x47, 0x72, 0x6f, 0x75, 0x70, + 0x22, 0x54, 0x92, 0x41, 0x37, 0x4a, 0x35, 0x0a, 0x03, 0x32, 0x30, 0x31, 0x12, 0x2e, 0x0a, 0x2c, + 0x52, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x65, 0x64, 0x20, 0x77, 0x68, 0x65, 0x6e, 0x20, 0x67, 0x72, + 0x6f, 0x75, 0x70, 0x20, 0x69, 0x73, 0x20, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x20, 0x73, + 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x66, 0x75, 0x6c, 0x6c, 0x79, 0x2e, 0x82, 0xd3, 0xe4, 0x93, + 0x02, 0x14, 0x22, 0x0f, 0x2f, 0x61, 0x75, 0x74, 0x68, 0x2f, 0x76, 0x33, 0x2f, 0x67, 0x72, 0x6f, + 0x75, 0x70, 0x73, 0x3a, 0x01, 0x2a, 0x12, 0x6c, 0x0a, 0x09, 0x47, 0x65, 0x74, 0x47, 0x72, 0x6f, + 0x75, 0x70, 0x73, 0x12, 0x22, 0x2e, 0x72, 0x61, 0x66, 0x61, 0x79, 0x2e, 0x64, 0x65, 0x76, 0x2e, + 0x72, 0x70, 0x63, 0x2e, 0x76, 0x33, 0x2e, 0x47, 0x65, 0x74, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x73, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x22, 0x2e, 0x72, 0x61, 0x66, 0x61, 0x79, 0x2e, + 0x64, 0x65, 0x76, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x76, + 0x33, 0x2e, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x4c, 0x69, 0x73, 0x74, 0x22, 0x17, 0x82, 0xd3, 0xe4, + 0x93, 0x02, 0x11, 0x12, 0x0f, 0x2f, 0x61, 0x75, 0x74, 0x68, 0x2f, 0x76, 0x33, 0x2f, 0x67, 0x72, + 0x6f, 0x75, 0x70, 0x73, 0x12, 0x92, 0x01, 0x0a, 0x08, 0x47, 0x65, 0x74, 0x47, 0x72, 0x6f, 0x75, + 0x70, 0x12, 0x1e, 0x2e, 0x72, 0x61, 0x66, 0x61, 0x79, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x74, 0x79, + 0x70, 0x65, 0x73, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x2e, 0x47, 0x72, 0x6f, 0x75, + 0x70, 0x1a, 0x1e, 0x2e, 0x72, 0x61, 0x66, 0x61, 0x79, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x74, 0x79, + 0x70, 0x65, 0x73, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x2e, 0x47, 0x72, 0x6f, 0x75, + 0x70, 0x22, 0x46, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x40, 0x12, 0x1e, 0x2f, 0x61, 0x75, 0x74, 0x68, + 0x2f, 0x76, 0x33, 0x2f, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2f, 0x7b, 0x6d, 0x65, 0x74, 0x61, 0x64, + 0x61, 0x74, 0x61, 0x2e, 0x6e, 0x61, 0x6d, 0x65, 0x7d, 0x5a, 0x1e, 0x12, 0x1c, 0x2f, 0x61, 0x75, + 0x74, 0x68, 0x2f, 0x76, 0x33, 0x2f, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2f, 0x7b, 0x6d, 0x65, 0x74, + 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x69, 0x64, 0x7d, 0x12, 0x9b, 0x01, 0x0a, 0x0b, 0x55, 0x70, + 0x64, 0x61, 0x74, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x12, 0x1e, 0x2e, 0x72, 0x61, 0x66, 0x61, 0x79, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x2e, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x1a, 0x1e, 0x2e, 0x72, 0x61, 0x66, 0x61, 0x79, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x75, 0x73, 0x65, 0x72, - 0x2e, 0x76, 0x33, 0x2e, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x22, 0x54, 0x92, 0x41, 0x37, 0x4a, 0x35, - 0x0a, 0x03, 0x32, 0x30, 0x31, 0x12, 0x2e, 0x0a, 0x2c, 0x52, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x65, - 0x64, 0x20, 0x77, 0x68, 0x65, 0x6e, 0x20, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x20, 0x69, 0x73, 0x20, - 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x20, 0x73, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x66, - 0x75, 0x6c, 0x6c, 0x79, 0x2e, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x14, 0x22, 0x0f, 0x2f, 0x61, 0x75, - 0x74, 0x68, 0x2f, 0x76, 0x33, 0x2f, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x73, 0x3a, 0x01, 0x2a, 0x12, - 0x6d, 0x0a, 0x09, 0x47, 0x65, 0x74, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x73, 0x12, 0x22, 0x2e, 0x72, - 0x61, 0x66, 0x61, 0x79, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x72, 0x70, 0x63, 0x2e, 0x76, 0x33, 0x2e, - 0x47, 0x65, 0x74, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x1a, 0x23, 0x2e, 0x72, 0x61, 0x66, 0x61, 0x79, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x72, 0x70, 0x63, - 0x2e, 0x76, 0x33, 0x2e, 0x47, 0x65, 0x74, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x73, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x17, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x11, 0x12, 0x0f, 0x2f, - 0x61, 0x75, 0x74, 0x68, 0x2f, 0x76, 0x33, 0x2f, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x73, 0x12, 0x6a, - 0x0a, 0x08, 0x47, 0x65, 0x74, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x12, 0x21, 0x2e, 0x72, 0x61, 0x66, - 0x61, 0x79, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x72, 0x70, 0x63, 0x2e, 0x76, 0x33, 0x2e, 0x47, 0x65, - 0x74, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1e, 0x2e, - 0x72, 0x61, 0x66, 0x61, 0x79, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, - 0x75, 0x73, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x2e, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x22, 0x1b, 0x82, - 0xd3, 0xe4, 0x93, 0x02, 0x15, 0x12, 0x13, 0x2f, 0x61, 0x75, 0x74, 0x68, 0x2f, 0x76, 0x33, 0x2f, - 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2f, 0x7b, 0x69, 0x64, 0x7d, 0x12, 0x75, 0x0a, 0x0b, 0x55, 0x70, - 0x64, 0x61, 0x74, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x12, 0x21, 0x2e, 0x72, 0x61, 0x66, 0x61, - 0x79, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x72, 0x70, 0x63, 0x2e, 0x76, 0x33, 0x2e, 0x50, 0x75, 0x74, - 0x47, 0x72, 0x6f, 0x75, 0x70, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1f, 0x2e, 0x72, - 0x61, 0x66, 0x61, 0x79, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x72, 0x70, 0x63, 0x2e, 0x76, 0x33, 0x2e, - 0x47, 0x72, 0x6f, 0x75, 0x70, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x22, 0x82, - 0xd3, 0xe4, 0x93, 0x02, 0x1c, 0x1a, 0x13, 0x2f, 0x61, 0x75, 0x74, 0x68, 0x2f, 0x76, 0x33, 0x2f, - 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2f, 0x7b, 0x69, 0x64, 0x7d, 0x3a, 0x05, 0x67, 0x72, 0x6f, 0x75, - 0x70, 0x12, 0x71, 0x0a, 0x0b, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, - 0x12, 0x24, 0x2e, 0x72, 0x61, 0x66, 0x61, 0x79, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x72, 0x70, 0x63, - 0x2e, 0x76, 0x33, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1f, 0x2e, 0x72, 0x61, 0x66, 0x61, 0x79, 0x2e, 0x64, - 0x65, 0x76, 0x2e, 0x72, 0x70, 0x63, 0x2e, 0x76, 0x33, 0x2e, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x1b, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x15, 0x2a, - 0x13, 0x2f, 0x61, 0x75, 0x74, 0x68, 0x2f, 0x76, 0x33, 0x2f, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2f, - 0x7b, 0x69, 0x64, 0x7d, 0x42, 0xcd, 0x04, 0x0a, 0x14, 0x63, 0x6f, 0x6d, 0x2e, 0x72, 0x61, 0x66, - 0x61, 0x79, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x72, 0x70, 0x63, 0x2e, 0x76, 0x33, 0x42, 0x0a, 0x47, - 0x72, 0x6f, 0x75, 0x70, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x4a, 0x67, 0x69, 0x74, - 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x52, 0x61, 0x66, 0x61, 0x79, 0x53, 0x79, 0x73, - 0x74, 0x65, 0x6d, 0x73, 0x2f, 0x72, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2d, 0x62, 0x61, 0x73, 0x65, - 0x2f, 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x73, 0x2f, 0x75, 0x73, 0x65, 0x72, - 0x6d, 0x67, 0x6d, 0x74, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x72, 0x70, 0x63, 0x2f, 0x76, - 0x33, 0x3b, 0x72, 0x70, 0x63, 0x76, 0x33, 0xa2, 0x02, 0x03, 0x52, 0x44, 0x52, 0xaa, 0x02, 0x10, - 0x52, 0x61, 0x66, 0x61, 0x79, 0x2e, 0x44, 0x65, 0x76, 0x2e, 0x52, 0x70, 0x63, 0x2e, 0x56, 0x33, - 0xca, 0x02, 0x10, 0x52, 0x61, 0x66, 0x61, 0x79, 0x5c, 0x44, 0x65, 0x76, 0x5c, 0x52, 0x70, 0x63, - 0x5c, 0x56, 0x33, 0xe2, 0x02, 0x1c, 0x52, 0x61, 0x66, 0x61, 0x79, 0x5c, 0x44, 0x65, 0x76, 0x5c, - 0x52, 0x70, 0x63, 0x5c, 0x56, 0x33, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, - 0x74, 0x61, 0xea, 0x02, 0x13, 0x52, 0x61, 0x66, 0x61, 0x79, 0x3a, 0x3a, 0x44, 0x65, 0x76, 0x3a, - 0x3a, 0x52, 0x70, 0x63, 0x3a, 0x3a, 0x56, 0x33, 0x92, 0x41, 0xe4, 0x02, 0x12, 0x2c, 0x0a, 0x18, - 0x47, 0x72, 0x6f, 0x75, 0x70, 0x20, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, - 0x20, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x22, 0x0b, 0x0a, 0x09, 0x52, 0x61, 0x66, 0x61, - 0x79, 0x20, 0x44, 0x65, 0x76, 0x32, 0x03, 0x32, 0x2e, 0x30, 0x2a, 0x01, 0x02, 0x32, 0x10, 0x61, - 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x6a, 0x73, 0x6f, 0x6e, 0x32, - 0x10, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x79, 0x61, 0x6d, - 0x6c, 0x3a, 0x10, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x6a, - 0x73, 0x6f, 0x6e, 0x3a, 0x10, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x2f, 0x79, 0x61, 0x6d, 0x6c, 0x52, 0x51, 0x0a, 0x03, 0x34, 0x30, 0x33, 0x12, 0x4a, 0x0a, 0x48, + 0x2e, 0x76, 0x33, 0x2e, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x22, 0x4c, 0x82, 0xd3, 0xe4, 0x93, 0x02, + 0x46, 0x1a, 0x1e, 0x2f, 0x61, 0x75, 0x74, 0x68, 0x2f, 0x76, 0x33, 0x2f, 0x67, 0x72, 0x6f, 0x75, + 0x70, 0x2f, 0x7b, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x6e, 0x61, 0x6d, 0x65, + 0x7d, 0x3a, 0x01, 0x2a, 0x5a, 0x21, 0x1a, 0x1c, 0x2f, 0x61, 0x75, 0x74, 0x68, 0x2f, 0x76, 0x33, + 0x2f, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2f, 0x7b, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, + 0x2e, 0x69, 0x64, 0x7d, 0x3a, 0x01, 0x2a, 0x12, 0xd7, 0x01, 0x0a, 0x0b, 0x44, 0x65, 0x6c, 0x65, + 0x74, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x12, 0x1e, 0x2e, 0x72, 0x61, 0x66, 0x61, 0x79, 0x2e, + 0x64, 0x65, 0x76, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x76, + 0x33, 0x2e, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x1a, 0x25, 0x2e, 0x72, 0x61, 0x66, 0x61, 0x79, 0x2e, + 0x64, 0x65, 0x76, 0x2e, 0x72, 0x70, 0x63, 0x2e, 0x76, 0x33, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, + 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x80, + 0x01, 0x92, 0x41, 0x37, 0x4a, 0x35, 0x0a, 0x03, 0x32, 0x30, 0x34, 0x12, 0x2e, 0x0a, 0x2c, 0x52, + 0x65, 0x74, 0x75, 0x72, 0x6e, 0x65, 0x64, 0x20, 0x77, 0x68, 0x65, 0x6e, 0x20, 0x67, 0x72, 0x6f, + 0x75, 0x70, 0x20, 0x69, 0x73, 0x20, 0x64, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x64, 0x20, 0x73, 0x75, + 0x63, 0x63, 0x65, 0x73, 0x73, 0x66, 0x75, 0x6c, 0x6c, 0x79, 0x2e, 0x82, 0xd3, 0xe4, 0x93, 0x02, + 0x40, 0x2a, 0x1e, 0x2f, 0x61, 0x75, 0x74, 0x68, 0x2f, 0x76, 0x33, 0x2f, 0x67, 0x72, 0x6f, 0x75, + 0x70, 0x2f, 0x7b, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x6e, 0x61, 0x6d, 0x65, + 0x7d, 0x5a, 0x1e, 0x2a, 0x1c, 0x2f, 0x61, 0x75, 0x74, 0x68, 0x2f, 0x76, 0x33, 0x2f, 0x67, 0x72, + 0x6f, 0x75, 0x70, 0x2f, 0x7b, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x69, 0x64, + 0x7d, 0x42, 0xcd, 0x04, 0x0a, 0x14, 0x63, 0x6f, 0x6d, 0x2e, 0x72, 0x61, 0x66, 0x61, 0x79, 0x2e, + 0x64, 0x65, 0x76, 0x2e, 0x72, 0x70, 0x63, 0x2e, 0x76, 0x33, 0x42, 0x0a, 0x47, 0x72, 0x6f, 0x75, + 0x70, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x4a, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, + 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x52, 0x61, 0x66, 0x61, 0x79, 0x53, 0x79, 0x73, 0x74, 0x65, 0x6d, + 0x73, 0x2f, 0x72, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2d, 0x62, 0x61, 0x73, 0x65, 0x2f, 0x63, 0x6f, + 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x73, 0x2f, 0x75, 0x73, 0x65, 0x72, 0x6d, 0x67, 0x6d, + 0x74, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x72, 0x70, 0x63, 0x2f, 0x76, 0x33, 0x3b, 0x72, + 0x70, 0x63, 0x76, 0x33, 0xa2, 0x02, 0x03, 0x52, 0x44, 0x52, 0xaa, 0x02, 0x10, 0x52, 0x61, 0x66, + 0x61, 0x79, 0x2e, 0x44, 0x65, 0x76, 0x2e, 0x52, 0x70, 0x63, 0x2e, 0x56, 0x33, 0xca, 0x02, 0x10, + 0x52, 0x61, 0x66, 0x61, 0x79, 0x5c, 0x44, 0x65, 0x76, 0x5c, 0x52, 0x70, 0x63, 0x5c, 0x56, 0x33, + 0xe2, 0x02, 0x1c, 0x52, 0x61, 0x66, 0x61, 0x79, 0x5c, 0x44, 0x65, 0x76, 0x5c, 0x52, 0x70, 0x63, + 0x5c, 0x56, 0x33, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, + 0x02, 0x13, 0x52, 0x61, 0x66, 0x61, 0x79, 0x3a, 0x3a, 0x44, 0x65, 0x76, 0x3a, 0x3a, 0x52, 0x70, + 0x63, 0x3a, 0x3a, 0x56, 0x33, 0x92, 0x41, 0xe4, 0x02, 0x12, 0x2c, 0x0a, 0x18, 0x47, 0x72, 0x6f, + 0x75, 0x70, 0x20, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x20, 0x53, 0x65, + 0x72, 0x76, 0x69, 0x63, 0x65, 0x22, 0x0b, 0x0a, 0x09, 0x52, 0x61, 0x66, 0x61, 0x79, 0x20, 0x44, + 0x65, 0x76, 0x32, 0x03, 0x32, 0x2e, 0x30, 0x2a, 0x01, 0x02, 0x32, 0x10, 0x61, 0x70, 0x70, 0x6c, + 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x6a, 0x73, 0x6f, 0x6e, 0x32, 0x10, 0x61, 0x70, + 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x79, 0x61, 0x6d, 0x6c, 0x3a, 0x10, + 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x6a, 0x73, 0x6f, 0x6e, + 0x3a, 0x10, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x79, 0x61, + 0x6d, 0x6c, 0x52, 0x51, 0x0a, 0x03, 0x34, 0x30, 0x33, 0x12, 0x4a, 0x0a, 0x48, 0x52, 0x65, 0x74, + 0x75, 0x72, 0x6e, 0x65, 0x64, 0x20, 0x77, 0x68, 0x65, 0x6e, 0x20, 0x74, 0x68, 0x65, 0x20, 0x67, + 0x72, 0x6f, 0x75, 0x70, 0x20, 0x64, 0x6f, 0x65, 0x73, 0x20, 0x6e, 0x6f, 0x74, 0x20, 0x68, 0x61, + 0x76, 0x65, 0x20, 0x70, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x20, 0x74, 0x6f, + 0x20, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x20, 0x74, 0x68, 0x65, 0x20, 0x72, 0x65, 0x73, 0x6f, + 0x75, 0x72, 0x63, 0x65, 0x2e, 0x52, 0x3b, 0x0a, 0x03, 0x34, 0x30, 0x34, 0x12, 0x34, 0x0a, 0x2a, 0x52, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x65, 0x64, 0x20, 0x77, 0x68, 0x65, 0x6e, 0x20, 0x74, 0x68, - 0x65, 0x20, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x20, 0x64, 0x6f, 0x65, 0x73, 0x20, 0x6e, 0x6f, 0x74, - 0x20, 0x68, 0x61, 0x76, 0x65, 0x20, 0x70, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, - 0x20, 0x74, 0x6f, 0x20, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x20, 0x74, 0x68, 0x65, 0x20, 0x72, - 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x2e, 0x52, 0x3b, 0x0a, 0x03, 0x34, 0x30, 0x34, 0x12, - 0x34, 0x0a, 0x2a, 0x52, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x65, 0x64, 0x20, 0x77, 0x68, 0x65, 0x6e, - 0x20, 0x74, 0x68, 0x65, 0x20, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x20, 0x64, 0x6f, - 0x65, 0x73, 0x20, 0x6e, 0x6f, 0x74, 0x20, 0x65, 0x78, 0x69, 0x73, 0x74, 0x2e, 0x12, 0x06, 0x0a, - 0x04, 0x9a, 0x02, 0x01, 0x07, 0x5a, 0x38, 0x0a, 0x25, 0x0a, 0x0a, 0x41, 0x70, 0x69, 0x4b, 0x65, - 0x79, 0x41, 0x75, 0x74, 0x68, 0x12, 0x17, 0x08, 0x02, 0x1a, 0x11, 0x58, 0x2d, 0x52, 0x41, 0x46, - 0x41, 0x59, 0x2d, 0x41, 0x50, 0x49, 0x2d, 0x4b, 0x45, 0x59, 0x49, 0x44, 0x20, 0x02, 0x0a, 0x0f, - 0x0a, 0x09, 0x42, 0x61, 0x73, 0x69, 0x63, 0x41, 0x75, 0x74, 0x68, 0x12, 0x02, 0x08, 0x01, 0x62, - 0x1f, 0x0a, 0x0e, 0x0a, 0x0a, 0x41, 0x70, 0x69, 0x4b, 0x65, 0x79, 0x41, 0x75, 0x74, 0x68, 0x12, - 0x00, 0x0a, 0x0d, 0x0a, 0x09, 0x42, 0x61, 0x73, 0x69, 0x63, 0x41, 0x75, 0x74, 0x68, 0x12, 0x00, - 0xc8, 0xe2, 0x1e, 0x01, 0xd0, 0xe2, 0x1e, 0x01, 0xe0, 0xe2, 0x1e, 0x01, 0xc0, 0xe3, 0x1e, 0x01, - 0xc8, 0xe3, 0x1e, 0x01, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x65, 0x20, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x20, 0x64, 0x6f, 0x65, 0x73, 0x20, + 0x6e, 0x6f, 0x74, 0x20, 0x65, 0x78, 0x69, 0x73, 0x74, 0x2e, 0x12, 0x06, 0x0a, 0x04, 0x9a, 0x02, + 0x01, 0x07, 0x5a, 0x38, 0x0a, 0x25, 0x0a, 0x0a, 0x41, 0x70, 0x69, 0x4b, 0x65, 0x79, 0x41, 0x75, + 0x74, 0x68, 0x12, 0x17, 0x08, 0x02, 0x1a, 0x11, 0x58, 0x2d, 0x52, 0x41, 0x46, 0x41, 0x59, 0x2d, + 0x41, 0x50, 0x49, 0x2d, 0x4b, 0x45, 0x59, 0x49, 0x44, 0x20, 0x02, 0x0a, 0x0f, 0x0a, 0x09, 0x42, + 0x61, 0x73, 0x69, 0x63, 0x41, 0x75, 0x74, 0x68, 0x12, 0x02, 0x08, 0x01, 0x62, 0x1f, 0x0a, 0x0e, + 0x0a, 0x0a, 0x41, 0x70, 0x69, 0x4b, 0x65, 0x79, 0x41, 0x75, 0x74, 0x68, 0x12, 0x00, 0x0a, 0x0d, + 0x0a, 0x09, 0x42, 0x61, 0x73, 0x69, 0x63, 0x41, 0x75, 0x74, 0x68, 0x12, 0x00, 0xc8, 0xe2, 0x1e, + 0x01, 0xd0, 0xe2, 0x1e, 0x01, 0xe0, 0xe2, 0x1e, 0x01, 0xc0, 0xe3, 0x1e, 0x01, 0xc8, 0xe3, 0x1e, + 0x01, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -453,34 +234,29 @@ func file_proto_rpc_v3_group_proto_rawDescGZIP() []byte { return file_proto_rpc_v3_group_proto_rawDescData } -var file_proto_rpc_v3_group_proto_msgTypes = make([]protoimpl.MessageInfo, 6) +var file_proto_rpc_v3_group_proto_msgTypes = make([]protoimpl.MessageInfo, 2) var file_proto_rpc_v3_group_proto_goTypes = []interface{}{ - (*GetGroupsRequest)(nil), // 0: rafay.dev.rpc.v3.GetGroupsRequest - (*GetGroupRequest)(nil), // 1: rafay.dev.rpc.v3.GetGroupRequest - (*DeleteGroupRequest)(nil), // 2: rafay.dev.rpc.v3.DeleteGroupRequest - (*PutGroupRequest)(nil), // 3: rafay.dev.rpc.v3.PutGroupRequest - (*GetGroupsResponse)(nil), // 4: rafay.dev.rpc.v3.GetGroupsResponse - (*GroupResponse)(nil), // 5: rafay.dev.rpc.v3.GroupResponse - (*v3.Group)(nil), // 6: rafay.dev.types.user.v3.Group + (*GetGroupsRequest)(nil), // 0: rafay.dev.rpc.v3.GetGroupsRequest + (*DeleteGroupResponse)(nil), // 1: rafay.dev.rpc.v3.DeleteGroupResponse + (*v3.Group)(nil), // 2: rafay.dev.types.user.v3.Group + (*v3.GroupList)(nil), // 3: rafay.dev.types.user.v3.GroupList } var file_proto_rpc_v3_group_proto_depIdxs = []int32{ - 6, // 0: rafay.dev.rpc.v3.PutGroupRequest.group:type_name -> rafay.dev.types.user.v3.Group - 6, // 1: rafay.dev.rpc.v3.GetGroupsResponse.group:type_name -> rafay.dev.types.user.v3.Group - 6, // 2: rafay.dev.rpc.v3.Group.CreateGroup:input_type -> rafay.dev.types.user.v3.Group - 0, // 3: rafay.dev.rpc.v3.Group.GetGroups:input_type -> rafay.dev.rpc.v3.GetGroupsRequest - 1, // 4: rafay.dev.rpc.v3.Group.GetGroup:input_type -> rafay.dev.rpc.v3.GetGroupRequest - 3, // 5: rafay.dev.rpc.v3.Group.UpdateGroup:input_type -> rafay.dev.rpc.v3.PutGroupRequest - 2, // 6: rafay.dev.rpc.v3.Group.DeleteGroup:input_type -> rafay.dev.rpc.v3.DeleteGroupRequest - 6, // 7: rafay.dev.rpc.v3.Group.CreateGroup:output_type -> rafay.dev.types.user.v3.Group - 4, // 8: rafay.dev.rpc.v3.Group.GetGroups:output_type -> rafay.dev.rpc.v3.GetGroupsResponse - 6, // 9: rafay.dev.rpc.v3.Group.GetGroup:output_type -> rafay.dev.types.user.v3.Group - 5, // 10: rafay.dev.rpc.v3.Group.UpdateGroup:output_type -> rafay.dev.rpc.v3.GroupResponse - 5, // 11: rafay.dev.rpc.v3.Group.DeleteGroup:output_type -> rafay.dev.rpc.v3.GroupResponse - 7, // [7:12] is the sub-list for method output_type - 2, // [2:7] is the sub-list for method input_type - 2, // [2:2] is the sub-list for extension type_name - 2, // [2:2] is the sub-list for extension extendee - 0, // [0:2] is the sub-list for field type_name + 2, // 0: rafay.dev.rpc.v3.Group.CreateGroup:input_type -> rafay.dev.types.user.v3.Group + 0, // 1: rafay.dev.rpc.v3.Group.GetGroups:input_type -> rafay.dev.rpc.v3.GetGroupsRequest + 2, // 2: rafay.dev.rpc.v3.Group.GetGroup:input_type -> rafay.dev.types.user.v3.Group + 2, // 3: rafay.dev.rpc.v3.Group.UpdateGroup:input_type -> rafay.dev.types.user.v3.Group + 2, // 4: rafay.dev.rpc.v3.Group.DeleteGroup:input_type -> rafay.dev.types.user.v3.Group + 2, // 5: rafay.dev.rpc.v3.Group.CreateGroup:output_type -> rafay.dev.types.user.v3.Group + 3, // 6: rafay.dev.rpc.v3.Group.GetGroups:output_type -> rafay.dev.types.user.v3.GroupList + 2, // 7: rafay.dev.rpc.v3.Group.GetGroup:output_type -> rafay.dev.types.user.v3.Group + 2, // 8: rafay.dev.rpc.v3.Group.UpdateGroup:output_type -> rafay.dev.types.user.v3.Group + 1, // 9: rafay.dev.rpc.v3.Group.DeleteGroup:output_type -> rafay.dev.rpc.v3.DeleteGroupResponse + 5, // [5:10] is the sub-list for method output_type + 0, // [0:5] is the sub-list for method input_type + 0, // [0:0] is the sub-list for extension type_name + 0, // [0:0] is the sub-list for extension extendee + 0, // [0:0] is the sub-list for field type_name } func init() { file_proto_rpc_v3_group_proto_init() } @@ -502,55 +278,7 @@ func file_proto_rpc_v3_group_proto_init() { } } file_proto_rpc_v3_group_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetGroupRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_proto_rpc_v3_group_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*DeleteGroupRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_proto_rpc_v3_group_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*PutGroupRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_proto_rpc_v3_group_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetGroupsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_proto_rpc_v3_group_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GroupResponse); i { + switch v := v.(*DeleteGroupResponse); i { case 0: return &v.state case 1: @@ -568,7 +296,7 @@ func file_proto_rpc_v3_group_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_proto_rpc_v3_group_proto_rawDesc, NumEnums: 0, - NumMessages: 6, + NumMessages: 2, NumExtensions: 0, NumServices: 1, }, diff --git a/components/usermgmt/proto/rpc/v3/group.pb.gw.go b/components/usermgmt/proto/rpc/v3/group.pb.gw.go index cd214b2..2e8f44b 100644 --- a/components/usermgmt/proto/rpc/v3/group.pb.gw.go +++ b/components/usermgmt/proto/rpc/v3/group.pb.gw.go @@ -102,8 +102,12 @@ func local_request_Group_GetGroups_0(ctx context.Context, marshaler runtime.Mars } +var ( + filter_Group_GetGroup_0 = &utilities.DoubleArray{Encoding: map[string]int{"metadata": 0, "name": 1}, Base: []int{1, 1, 1, 0}, Check: []int{0, 1, 2, 3}} +) + func request_Group_GetGroup_0(ctx context.Context, marshaler runtime.Marshaler, client GroupClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq GetGroupRequest + var protoReq userv3.Group var metadata runtime.ServerMetadata var ( @@ -113,14 +117,21 @@ func request_Group_GetGroup_0(ctx context.Context, marshaler runtime.Marshaler, _ = err ) - val, ok = pathParams["id"] + val, ok = pathParams["metadata.name"] if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "id") + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "metadata.name") } - protoReq.Id, err = runtime.String(val) + err = runtime.PopulateFieldFromPath(&protoReq, "metadata.name", val) if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "id", err) + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "metadata.name", err) + } + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Group_GetGroup_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } msg, err := client.GetGroup(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) @@ -129,7 +140,7 @@ func request_Group_GetGroup_0(ctx context.Context, marshaler runtime.Marshaler, } func local_request_Group_GetGroup_0(ctx context.Context, marshaler runtime.Marshaler, server GroupServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq GetGroupRequest + var protoReq userv3.Group var metadata runtime.ServerMetadata var ( @@ -139,14 +150,91 @@ func local_request_Group_GetGroup_0(ctx context.Context, marshaler runtime.Marsh _ = err ) - val, ok = pathParams["id"] + val, ok = pathParams["metadata.name"] if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "id") + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "metadata.name") } - protoReq.Id, err = runtime.String(val) + err = runtime.PopulateFieldFromPath(&protoReq, "metadata.name", val) if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "id", err) + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "metadata.name", err) + } + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Group_GetGroup_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := server.GetGroup(ctx, &protoReq) + return msg, metadata, err + +} + +var ( + filter_Group_GetGroup_1 = &utilities.DoubleArray{Encoding: map[string]int{"metadata": 0, "id": 1}, Base: []int{1, 1, 1, 0}, Check: []int{0, 1, 2, 3}} +) + +func request_Group_GetGroup_1(ctx context.Context, marshaler runtime.Marshaler, client GroupClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq userv3.Group + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["metadata.id"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "metadata.id") + } + + err = runtime.PopulateFieldFromPath(&protoReq, "metadata.id", val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "metadata.id", err) + } + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Group_GetGroup_1); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := client.GetGroup(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_Group_GetGroup_1(ctx context.Context, marshaler runtime.Marshaler, server GroupServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq userv3.Group + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["metadata.id"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "metadata.id") + } + + err = runtime.PopulateFieldFromPath(&protoReq, "metadata.id", val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "metadata.id", err) + } + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Group_GetGroup_1); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } msg, err := server.GetGroup(ctx, &protoReq) @@ -155,14 +243,14 @@ func local_request_Group_GetGroup_0(ctx context.Context, marshaler runtime.Marsh } func request_Group_UpdateGroup_0(ctx context.Context, marshaler runtime.Marshaler, client GroupClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq PutGroupRequest + var protoReq userv3.Group var metadata runtime.ServerMetadata newReader, berr := utilities.IOReaderFactory(req.Body) if berr != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) } - if err := marshaler.NewDecoder(newReader()).Decode(&protoReq.Group); err != nil && err != io.EOF { + if err := marshaler.NewDecoder(newReader()).Decode(&protoReq); err != nil && err != io.EOF { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } @@ -173,14 +261,14 @@ func request_Group_UpdateGroup_0(ctx context.Context, marshaler runtime.Marshale _ = err ) - val, ok = pathParams["id"] + val, ok = pathParams["metadata.name"] if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "id") + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "metadata.name") } - protoReq.Id, err = runtime.String(val) + err = runtime.PopulateFieldFromPath(&protoReq, "metadata.name", val) if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "id", err) + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "metadata.name", err) } msg, err := client.UpdateGroup(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) @@ -189,14 +277,14 @@ func request_Group_UpdateGroup_0(ctx context.Context, marshaler runtime.Marshale } func local_request_Group_UpdateGroup_0(ctx context.Context, marshaler runtime.Marshaler, server GroupServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq PutGroupRequest + var protoReq userv3.Group var metadata runtime.ServerMetadata newReader, berr := utilities.IOReaderFactory(req.Body) if berr != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) } - if err := marshaler.NewDecoder(newReader()).Decode(&protoReq.Group); err != nil && err != io.EOF { + if err := marshaler.NewDecoder(newReader()).Decode(&protoReq); err != nil && err != io.EOF { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } @@ -207,14 +295,14 @@ func local_request_Group_UpdateGroup_0(ctx context.Context, marshaler runtime.Ma _ = err ) - val, ok = pathParams["id"] + val, ok = pathParams["metadata.name"] if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "id") + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "metadata.name") } - protoReq.Id, err = runtime.String(val) + err = runtime.PopulateFieldFromPath(&protoReq, "metadata.name", val) if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "id", err) + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "metadata.name", err) } msg, err := server.UpdateGroup(ctx, &protoReq) @@ -222,8 +310,80 @@ func local_request_Group_UpdateGroup_0(ctx context.Context, marshaler runtime.Ma } +func request_Group_UpdateGroup_1(ctx context.Context, marshaler runtime.Marshaler, client GroupClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq userv3.Group + var metadata runtime.ServerMetadata + + newReader, berr := utilities.IOReaderFactory(req.Body) + if berr != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) + } + if err := marshaler.NewDecoder(newReader()).Decode(&protoReq); err != nil && err != io.EOF { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["metadata.id"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "metadata.id") + } + + err = runtime.PopulateFieldFromPath(&protoReq, "metadata.id", val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "metadata.id", err) + } + + msg, err := client.UpdateGroup(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_Group_UpdateGroup_1(ctx context.Context, marshaler runtime.Marshaler, server GroupServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq userv3.Group + var metadata runtime.ServerMetadata + + newReader, berr := utilities.IOReaderFactory(req.Body) + if berr != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) + } + if err := marshaler.NewDecoder(newReader()).Decode(&protoReq); err != nil && err != io.EOF { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["metadata.id"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "metadata.id") + } + + err = runtime.PopulateFieldFromPath(&protoReq, "metadata.id", val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "metadata.id", err) + } + + msg, err := server.UpdateGroup(ctx, &protoReq) + return msg, metadata, err + +} + +var ( + filter_Group_DeleteGroup_0 = &utilities.DoubleArray{Encoding: map[string]int{"metadata": 0, "name": 1}, Base: []int{1, 1, 1, 0}, Check: []int{0, 1, 2, 3}} +) + func request_Group_DeleteGroup_0(ctx context.Context, marshaler runtime.Marshaler, client GroupClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq DeleteGroupRequest + var protoReq userv3.Group var metadata runtime.ServerMetadata var ( @@ -233,14 +393,21 @@ func request_Group_DeleteGroup_0(ctx context.Context, marshaler runtime.Marshale _ = err ) - val, ok = pathParams["id"] + val, ok = pathParams["metadata.name"] if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "id") + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "metadata.name") } - protoReq.Id, err = runtime.String(val) + err = runtime.PopulateFieldFromPath(&protoReq, "metadata.name", val) if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "id", err) + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "metadata.name", err) + } + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Group_DeleteGroup_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } msg, err := client.DeleteGroup(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) @@ -249,7 +416,7 @@ func request_Group_DeleteGroup_0(ctx context.Context, marshaler runtime.Marshale } func local_request_Group_DeleteGroup_0(ctx context.Context, marshaler runtime.Marshaler, server GroupServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq DeleteGroupRequest + var protoReq userv3.Group var metadata runtime.ServerMetadata var ( @@ -259,14 +426,91 @@ func local_request_Group_DeleteGroup_0(ctx context.Context, marshaler runtime.Ma _ = err ) - val, ok = pathParams["id"] + val, ok = pathParams["metadata.name"] if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "id") + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "metadata.name") } - protoReq.Id, err = runtime.String(val) + err = runtime.PopulateFieldFromPath(&protoReq, "metadata.name", val) if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "id", err) + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "metadata.name", err) + } + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Group_DeleteGroup_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := server.DeleteGroup(ctx, &protoReq) + return msg, metadata, err + +} + +var ( + filter_Group_DeleteGroup_1 = &utilities.DoubleArray{Encoding: map[string]int{"metadata": 0, "id": 1}, Base: []int{1, 1, 1, 0}, Check: []int{0, 1, 2, 3}} +) + +func request_Group_DeleteGroup_1(ctx context.Context, marshaler runtime.Marshaler, client GroupClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq userv3.Group + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["metadata.id"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "metadata.id") + } + + err = runtime.PopulateFieldFromPath(&protoReq, "metadata.id", val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "metadata.id", err) + } + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Group_DeleteGroup_1); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := client.DeleteGroup(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_Group_DeleteGroup_1(ctx context.Context, marshaler runtime.Marshaler, server GroupServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq userv3.Group + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["metadata.id"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "metadata.id") + } + + err = runtime.PopulateFieldFromPath(&protoReq, "metadata.id", val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "metadata.id", err) + } + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Group_DeleteGroup_1); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } msg, err := server.DeleteGroup(ctx, &protoReq) @@ -332,7 +576,7 @@ func RegisterGroupHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv var stream runtime.ServerTransportStream ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/rafay.dev.rpc.v3.Group/GetGroup", runtime.WithHTTPPathPattern("/auth/v3/group/{id}")) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/rafay.dev.rpc.v3.Group/GetGroup", runtime.WithHTTPPathPattern("/auth/v3/group/{metadata.name}")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -349,13 +593,36 @@ func RegisterGroupHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv }) + mux.Handle("GET", pattern_Group_GetGroup_1, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/rafay.dev.rpc.v3.Group/GetGroup", runtime.WithHTTPPathPattern("/auth/v3/group/{metadata.id}")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_Group_GetGroup_1(rctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Group_GetGroup_1(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + mux.Handle("PUT", pattern_Group_UpdateGroup_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() var stream runtime.ServerTransportStream ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/rafay.dev.rpc.v3.Group/UpdateGroup", runtime.WithHTTPPathPattern("/auth/v3/group/{id}")) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/rafay.dev.rpc.v3.Group/UpdateGroup", runtime.WithHTTPPathPattern("/auth/v3/group/{metadata.name}")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -372,13 +639,36 @@ func RegisterGroupHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv }) + mux.Handle("PUT", pattern_Group_UpdateGroup_1, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/rafay.dev.rpc.v3.Group/UpdateGroup", runtime.WithHTTPPathPattern("/auth/v3/group/{metadata.id}")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_Group_UpdateGroup_1(rctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Group_UpdateGroup_1(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + mux.Handle("DELETE", pattern_Group_DeleteGroup_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() var stream runtime.ServerTransportStream ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/rafay.dev.rpc.v3.Group/DeleteGroup", runtime.WithHTTPPathPattern("/auth/v3/group/{id}")) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/rafay.dev.rpc.v3.Group/DeleteGroup", runtime.WithHTTPPathPattern("/auth/v3/group/{metadata.name}")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -395,6 +685,29 @@ func RegisterGroupHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv }) + mux.Handle("DELETE", pattern_Group_DeleteGroup_1, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/rafay.dev.rpc.v3.Group/DeleteGroup", runtime.WithHTTPPathPattern("/auth/v3/group/{metadata.id}")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_Group_DeleteGroup_1(rctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Group_DeleteGroup_1(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + return nil } @@ -480,7 +793,7 @@ func RegisterGroupHandlerClient(ctx context.Context, mux *runtime.ServeMux, clie ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateContext(ctx, mux, req, "/rafay.dev.rpc.v3.Group/GetGroup", runtime.WithHTTPPathPattern("/auth/v3/group/{id}")) + rctx, err := runtime.AnnotateContext(ctx, mux, req, "/rafay.dev.rpc.v3.Group/GetGroup", runtime.WithHTTPPathPattern("/auth/v3/group/{metadata.name}")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -496,11 +809,31 @@ func RegisterGroupHandlerClient(ctx context.Context, mux *runtime.ServeMux, clie }) + mux.Handle("GET", pattern_Group_GetGroup_1, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateContext(ctx, mux, req, "/rafay.dev.rpc.v3.Group/GetGroup", runtime.WithHTTPPathPattern("/auth/v3/group/{metadata.id}")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_Group_GetGroup_1(rctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Group_GetGroup_1(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + mux.Handle("PUT", pattern_Group_UpdateGroup_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateContext(ctx, mux, req, "/rafay.dev.rpc.v3.Group/UpdateGroup", runtime.WithHTTPPathPattern("/auth/v3/group/{id}")) + rctx, err := runtime.AnnotateContext(ctx, mux, req, "/rafay.dev.rpc.v3.Group/UpdateGroup", runtime.WithHTTPPathPattern("/auth/v3/group/{metadata.name}")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -516,11 +849,31 @@ func RegisterGroupHandlerClient(ctx context.Context, mux *runtime.ServeMux, clie }) + mux.Handle("PUT", pattern_Group_UpdateGroup_1, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateContext(ctx, mux, req, "/rafay.dev.rpc.v3.Group/UpdateGroup", runtime.WithHTTPPathPattern("/auth/v3/group/{metadata.id}")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_Group_UpdateGroup_1(rctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Group_UpdateGroup_1(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + mux.Handle("DELETE", pattern_Group_DeleteGroup_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateContext(ctx, mux, req, "/rafay.dev.rpc.v3.Group/DeleteGroup", runtime.WithHTTPPathPattern("/auth/v3/group/{id}")) + rctx, err := runtime.AnnotateContext(ctx, mux, req, "/rafay.dev.rpc.v3.Group/DeleteGroup", runtime.WithHTTPPathPattern("/auth/v3/group/{metadata.name}")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -536,6 +889,26 @@ func RegisterGroupHandlerClient(ctx context.Context, mux *runtime.ServeMux, clie }) + mux.Handle("DELETE", pattern_Group_DeleteGroup_1, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateContext(ctx, mux, req, "/rafay.dev.rpc.v3.Group/DeleteGroup", runtime.WithHTTPPathPattern("/auth/v3/group/{metadata.id}")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_Group_DeleteGroup_1(rctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Group_DeleteGroup_1(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + return nil } @@ -544,11 +917,17 @@ var ( pattern_Group_GetGroups_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"auth", "v3", "groups"}, "")) - pattern_Group_GetGroup_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3}, []string{"auth", "v3", "group", "id"}, "")) + pattern_Group_GetGroup_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3}, []string{"auth", "v3", "group", "metadata.name"}, "")) - pattern_Group_UpdateGroup_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3}, []string{"auth", "v3", "group", "id"}, "")) + pattern_Group_GetGroup_1 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3}, []string{"auth", "v3", "group", "metadata.id"}, "")) - pattern_Group_DeleteGroup_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3}, []string{"auth", "v3", "group", "id"}, "")) + pattern_Group_UpdateGroup_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3}, []string{"auth", "v3", "group", "metadata.name"}, "")) + + pattern_Group_UpdateGroup_1 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3}, []string{"auth", "v3", "group", "metadata.id"}, "")) + + pattern_Group_DeleteGroup_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3}, []string{"auth", "v3", "group", "metadata.name"}, "")) + + pattern_Group_DeleteGroup_1 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3}, []string{"auth", "v3", "group", "metadata.id"}, "")) ) var ( @@ -558,7 +937,13 @@ var ( forward_Group_GetGroup_0 = runtime.ForwardResponseMessage + forward_Group_GetGroup_1 = runtime.ForwardResponseMessage + forward_Group_UpdateGroup_0 = runtime.ForwardResponseMessage + forward_Group_UpdateGroup_1 = runtime.ForwardResponseMessage + forward_Group_DeleteGroup_0 = runtime.ForwardResponseMessage + + forward_Group_DeleteGroup_1 = runtime.ForwardResponseMessage ) diff --git a/components/usermgmt/proto/rpc/v3/group.proto b/components/usermgmt/proto/rpc/v3/group.proto index 5173477..a99ce47 100644 --- a/components/usermgmt/proto/rpc/v3/group.proto +++ b/components/usermgmt/proto/rpc/v3/group.proto @@ -74,17 +74,7 @@ message GetGroupsRequest { read_only : true } ]; } -message GetGroupRequest { string id = 1; } -message DeleteGroupRequest { string id = 1; } -message PutGroupRequest { - string id = 1; - rafay.dev.types.user.v3.Group group = 2; -} -message GetGroupsResponse { repeated rafay.dev.types.user.v3.Group group = 1; } -message GroupResponse { - string status = 1; - string message = 2; -} +message DeleteGroupResponse {} service Group { rpc CreateGroup(rafay.dev.types.user.v3.Group) @@ -102,28 +92,47 @@ service Group { }; }; - rpc GetGroups(GetGroupsRequest) returns (GetGroupsResponse) { + rpc GetGroups(GetGroupsRequest) returns (rafay.dev.types.user.v3.GroupList) { option (google.api.http) = { get : "/auth/v3/groups" }; }; - rpc GetGroup(GetGroupRequest) returns (rafay.dev.types.user.v3.Group) { + rpc GetGroup(rafay.dev.types.user.v3.Group) returns (rafay.dev.types.user.v3.Group) { option (google.api.http) = { - get : "/auth/v3/group/{id}" + get : "/auth/v3/group/{metadata.name}" + additional_bindings { + get : "/auth/v3/group/{metadata.id}" + } }; }; - rpc UpdateGroup(PutGroupRequest) returns (GroupResponse) { + rpc UpdateGroup(rafay.dev.types.user.v3.Group) returns (rafay.dev.types.user.v3.Group) { option (google.api.http) = { - put : "/auth/v3/group/{id}" - body : "group" + put : "/auth/v3/group/{metadata.name}" + body : "*" + additional_bindings { + put : "/auth/v3/group/{metadata.id}" + body : "*" + } }; }; - rpc DeleteGroup(DeleteGroupRequest) returns (GroupResponse) { + rpc DeleteGroup(rafay.dev.types.user.v3.Group) returns (DeleteGroupResponse) { option (google.api.http) = { - delete : "/auth/v3/group/{id}" + delete : "/auth/v3/group/{metadata.name}" + additional_bindings { + delete : "/auth/v3/group/{metadata.id}" + } + }; + + option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation) = { + responses : { + key : "204" + value : { + description : "Returned when group is deleted successfully." + } + } }; }; } \ No newline at end of file diff --git a/components/usermgmt/proto/rpc/v3/group_grpc.pb.go b/components/usermgmt/proto/rpc/v3/group_grpc.pb.go index 866bc5d..860ff06 100644 --- a/components/usermgmt/proto/rpc/v3/group_grpc.pb.go +++ b/components/usermgmt/proto/rpc/v3/group_grpc.pb.go @@ -24,10 +24,10 @@ const _ = grpc.SupportPackageIsVersion7 // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. type GroupClient interface { CreateGroup(ctx context.Context, in *v3.Group, opts ...grpc.CallOption) (*v3.Group, error) - GetGroups(ctx context.Context, in *GetGroupsRequest, opts ...grpc.CallOption) (*GetGroupsResponse, error) - GetGroup(ctx context.Context, in *GetGroupRequest, opts ...grpc.CallOption) (*v3.Group, error) - UpdateGroup(ctx context.Context, in *PutGroupRequest, opts ...grpc.CallOption) (*GroupResponse, error) - DeleteGroup(ctx context.Context, in *DeleteGroupRequest, opts ...grpc.CallOption) (*GroupResponse, error) + GetGroups(ctx context.Context, in *GetGroupsRequest, opts ...grpc.CallOption) (*v3.GroupList, error) + GetGroup(ctx context.Context, in *v3.Group, opts ...grpc.CallOption) (*v3.Group, error) + UpdateGroup(ctx context.Context, in *v3.Group, opts ...grpc.CallOption) (*v3.Group, error) + DeleteGroup(ctx context.Context, in *v3.Group, opts ...grpc.CallOption) (*DeleteGroupResponse, error) } type groupClient struct { @@ -47,8 +47,8 @@ func (c *groupClient) CreateGroup(ctx context.Context, in *v3.Group, opts ...grp return out, nil } -func (c *groupClient) GetGroups(ctx context.Context, in *GetGroupsRequest, opts ...grpc.CallOption) (*GetGroupsResponse, error) { - out := new(GetGroupsResponse) +func (c *groupClient) GetGroups(ctx context.Context, in *GetGroupsRequest, opts ...grpc.CallOption) (*v3.GroupList, error) { + out := new(v3.GroupList) err := c.cc.Invoke(ctx, "/rafay.dev.rpc.v3.Group/GetGroups", in, out, opts...) if err != nil { return nil, err @@ -56,7 +56,7 @@ func (c *groupClient) GetGroups(ctx context.Context, in *GetGroupsRequest, opts return out, nil } -func (c *groupClient) GetGroup(ctx context.Context, in *GetGroupRequest, opts ...grpc.CallOption) (*v3.Group, error) { +func (c *groupClient) GetGroup(ctx context.Context, in *v3.Group, opts ...grpc.CallOption) (*v3.Group, error) { out := new(v3.Group) err := c.cc.Invoke(ctx, "/rafay.dev.rpc.v3.Group/GetGroup", in, out, opts...) if err != nil { @@ -65,8 +65,8 @@ func (c *groupClient) GetGroup(ctx context.Context, in *GetGroupRequest, opts .. return out, nil } -func (c *groupClient) UpdateGroup(ctx context.Context, in *PutGroupRequest, opts ...grpc.CallOption) (*GroupResponse, error) { - out := new(GroupResponse) +func (c *groupClient) UpdateGroup(ctx context.Context, in *v3.Group, opts ...grpc.CallOption) (*v3.Group, error) { + out := new(v3.Group) err := c.cc.Invoke(ctx, "/rafay.dev.rpc.v3.Group/UpdateGroup", in, out, opts...) if err != nil { return nil, err @@ -74,8 +74,8 @@ func (c *groupClient) UpdateGroup(ctx context.Context, in *PutGroupRequest, opts return out, nil } -func (c *groupClient) DeleteGroup(ctx context.Context, in *DeleteGroupRequest, opts ...grpc.CallOption) (*GroupResponse, error) { - out := new(GroupResponse) +func (c *groupClient) DeleteGroup(ctx context.Context, in *v3.Group, opts ...grpc.CallOption) (*DeleteGroupResponse, error) { + out := new(DeleteGroupResponse) err := c.cc.Invoke(ctx, "/rafay.dev.rpc.v3.Group/DeleteGroup", in, out, opts...) if err != nil { return nil, err @@ -88,10 +88,10 @@ func (c *groupClient) DeleteGroup(ctx context.Context, in *DeleteGroupRequest, o // for forward compatibility type GroupServer interface { CreateGroup(context.Context, *v3.Group) (*v3.Group, error) - GetGroups(context.Context, *GetGroupsRequest) (*GetGroupsResponse, error) - GetGroup(context.Context, *GetGroupRequest) (*v3.Group, error) - UpdateGroup(context.Context, *PutGroupRequest) (*GroupResponse, error) - DeleteGroup(context.Context, *DeleteGroupRequest) (*GroupResponse, error) + GetGroups(context.Context, *GetGroupsRequest) (*v3.GroupList, error) + GetGroup(context.Context, *v3.Group) (*v3.Group, error) + UpdateGroup(context.Context, *v3.Group) (*v3.Group, error) + DeleteGroup(context.Context, *v3.Group) (*DeleteGroupResponse, error) } // UnimplementedGroupServer should be embedded to have forward compatible implementations. @@ -101,16 +101,16 @@ type UnimplementedGroupServer struct { func (UnimplementedGroupServer) CreateGroup(context.Context, *v3.Group) (*v3.Group, error) { return nil, status.Errorf(codes.Unimplemented, "method CreateGroup not implemented") } -func (UnimplementedGroupServer) GetGroups(context.Context, *GetGroupsRequest) (*GetGroupsResponse, error) { +func (UnimplementedGroupServer) GetGroups(context.Context, *GetGroupsRequest) (*v3.GroupList, error) { return nil, status.Errorf(codes.Unimplemented, "method GetGroups not implemented") } -func (UnimplementedGroupServer) GetGroup(context.Context, *GetGroupRequest) (*v3.Group, error) { +func (UnimplementedGroupServer) GetGroup(context.Context, *v3.Group) (*v3.Group, error) { return nil, status.Errorf(codes.Unimplemented, "method GetGroup not implemented") } -func (UnimplementedGroupServer) UpdateGroup(context.Context, *PutGroupRequest) (*GroupResponse, error) { +func (UnimplementedGroupServer) UpdateGroup(context.Context, *v3.Group) (*v3.Group, error) { return nil, status.Errorf(codes.Unimplemented, "method UpdateGroup not implemented") } -func (UnimplementedGroupServer) DeleteGroup(context.Context, *DeleteGroupRequest) (*GroupResponse, error) { +func (UnimplementedGroupServer) DeleteGroup(context.Context, *v3.Group) (*DeleteGroupResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method DeleteGroup not implemented") } @@ -162,7 +162,7 @@ func _Group_GetGroups_Handler(srv interface{}, ctx context.Context, dec func(int } func _Group_GetGroup_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(GetGroupRequest) + in := new(v3.Group) if err := dec(in); err != nil { return nil, err } @@ -174,13 +174,13 @@ func _Group_GetGroup_Handler(srv interface{}, ctx context.Context, dec func(inte FullMethod: "/rafay.dev.rpc.v3.Group/GetGroup", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(GroupServer).GetGroup(ctx, req.(*GetGroupRequest)) + return srv.(GroupServer).GetGroup(ctx, req.(*v3.Group)) } return interceptor(ctx, in, info, handler) } func _Group_UpdateGroup_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(PutGroupRequest) + in := new(v3.Group) if err := dec(in); err != nil { return nil, err } @@ -192,13 +192,13 @@ func _Group_UpdateGroup_Handler(srv interface{}, ctx context.Context, dec func(i FullMethod: "/rafay.dev.rpc.v3.Group/UpdateGroup", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(GroupServer).UpdateGroup(ctx, req.(*PutGroupRequest)) + return srv.(GroupServer).UpdateGroup(ctx, req.(*v3.Group)) } return interceptor(ctx, in, info, handler) } func _Group_DeleteGroup_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(DeleteGroupRequest) + in := new(v3.Group) if err := dec(in); err != nil { return nil, err } @@ -210,7 +210,7 @@ func _Group_DeleteGroup_Handler(srv interface{}, ctx context.Context, dec func(i FullMethod: "/rafay.dev.rpc.v3.Group/DeleteGroup", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(GroupServer).DeleteGroup(ctx, req.(*DeleteGroupRequest)) + return srv.(GroupServer).DeleteGroup(ctx, req.(*v3.Group)) } return interceptor(ctx, in, info, handler) } diff --git a/components/usermgmt/proto/rpc/v3/role.pb.go b/components/usermgmt/proto/rpc/v3/role.pb.go index 6dc2be6..fa53860 100644 --- a/components/usermgmt/proto/rpc/v3/role.pb.go +++ b/components/usermgmt/proto/rpc/v3/role.pb.go @@ -24,6 +24,7 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) +// TODO: Add filters type GetRolesRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -62,16 +63,14 @@ func (*GetRolesRequest) Descriptor() ([]byte, []int) { return file_proto_rpc_v3_role_proto_rawDescGZIP(), []int{0} } -type GetRoleRequest struct { +type DeleteRoleResponse struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - - Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` } -func (x *GetRoleRequest) Reset() { - *x = GetRoleRequest{} +func (x *DeleteRoleResponse) Reset() { + *x = DeleteRoleResponse{} if protoimpl.UnsafeEnabled { mi := &file_proto_rpc_v3_role_proto_msgTypes[1] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -79,13 +78,13 @@ func (x *GetRoleRequest) Reset() { } } -func (x *GetRoleRequest) String() string { +func (x *DeleteRoleResponse) String() string { return protoimpl.X.MessageStringOf(x) } -func (*GetRoleRequest) ProtoMessage() {} +func (*DeleteRoleResponse) ProtoMessage() {} -func (x *GetRoleRequest) ProtoReflect() protoreflect.Message { +func (x *DeleteRoleResponse) ProtoReflect() protoreflect.Message { mi := &file_proto_rpc_v3_role_proto_msgTypes[1] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -97,222 +96,11 @@ func (x *GetRoleRequest) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use GetRoleRequest.ProtoReflect.Descriptor instead. -func (*GetRoleRequest) Descriptor() ([]byte, []int) { +// Deprecated: Use DeleteRoleResponse.ProtoReflect.Descriptor instead. +func (*DeleteRoleResponse) Descriptor() ([]byte, []int) { return file_proto_rpc_v3_role_proto_rawDescGZIP(), []int{1} } -func (x *GetRoleRequest) GetId() string { - if x != nil { - return x.Id - } - return "" -} - -type DeleteRoleRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` -} - -func (x *DeleteRoleRequest) Reset() { - *x = DeleteRoleRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_proto_rpc_v3_role_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *DeleteRoleRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*DeleteRoleRequest) ProtoMessage() {} - -func (x *DeleteRoleRequest) ProtoReflect() protoreflect.Message { - mi := &file_proto_rpc_v3_role_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use DeleteRoleRequest.ProtoReflect.Descriptor instead. -func (*DeleteRoleRequest) Descriptor() ([]byte, []int) { - return file_proto_rpc_v3_role_proto_rawDescGZIP(), []int{2} -} - -func (x *DeleteRoleRequest) GetId() string { - if x != nil { - return x.Id - } - return "" -} - -type PutRoleRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` - Role *v3.Role `protobuf:"bytes,2,opt,name=role,proto3" json:"role,omitempty"` -} - -func (x *PutRoleRequest) Reset() { - *x = PutRoleRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_proto_rpc_v3_role_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *PutRoleRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*PutRoleRequest) ProtoMessage() {} - -func (x *PutRoleRequest) ProtoReflect() protoreflect.Message { - mi := &file_proto_rpc_v3_role_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use PutRoleRequest.ProtoReflect.Descriptor instead. -func (*PutRoleRequest) Descriptor() ([]byte, []int) { - return file_proto_rpc_v3_role_proto_rawDescGZIP(), []int{3} -} - -func (x *PutRoleRequest) GetId() string { - if x != nil { - return x.Id - } - return "" -} - -func (x *PutRoleRequest) GetRole() *v3.Role { - if x != nil { - return x.Role - } - return nil -} - -type GetRolesResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Role []*v3.Role `protobuf:"bytes,1,rep,name=role,proto3" json:"role,omitempty"` -} - -func (x *GetRolesResponse) Reset() { - *x = GetRolesResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_proto_rpc_v3_role_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *GetRolesResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GetRolesResponse) ProtoMessage() {} - -func (x *GetRolesResponse) ProtoReflect() protoreflect.Message { - mi := &file_proto_rpc_v3_role_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use GetRolesResponse.ProtoReflect.Descriptor instead. -func (*GetRolesResponse) Descriptor() ([]byte, []int) { - return file_proto_rpc_v3_role_proto_rawDescGZIP(), []int{4} -} - -func (x *GetRolesResponse) GetRole() []*v3.Role { - if x != nil { - return x.Role - } - return nil -} - -type RoleResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Status string `protobuf:"bytes,1,opt,name=status,proto3" json:"status,omitempty"` - Message string `protobuf:"bytes,2,opt,name=message,proto3" json:"message,omitempty"` -} - -func (x *RoleResponse) Reset() { - *x = RoleResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_proto_rpc_v3_role_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *RoleResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*RoleResponse) ProtoMessage() {} - -func (x *RoleResponse) ProtoReflect() protoreflect.Message { - mi := &file_proto_rpc_v3_role_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use RoleResponse.ProtoReflect.Descriptor instead. -func (*RoleResponse) Descriptor() ([]byte, []int) { - return file_proto_rpc_v3_role_proto_rawDescGZIP(), []int{5} -} - -func (x *RoleResponse) GetStatus() string { - if x != nil { - return x.Status - } - return "" -} - -func (x *RoleResponse) GetMessage() string { - if x != nil { - return x.Message - } - return "" -} - var File_proto_rpc_v3_role_proto protoreflect.FileDescriptor var file_proto_rpc_v3_role_proto_rawDesc = []byte{ @@ -328,100 +116,94 @@ var file_proto_rpc_v3_role_proto_rawDesc = []byte{ 0x20, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2f, 0x75, 0x73, 0x65, 0x72, 0x70, 0x62, 0x2f, 0x76, 0x33, 0x2f, 0x72, 0x6f, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x11, 0x0a, 0x0f, 0x47, 0x65, 0x74, 0x52, 0x6f, 0x6c, 0x65, 0x73, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x22, 0x20, 0x0a, 0x0e, 0x47, 0x65, 0x74, 0x52, 0x6f, 0x6c, 0x65, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x22, 0x23, 0x0a, 0x11, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, - 0x52, 0x6f, 0x6c, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, - 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x22, 0x53, 0x0a, 0x0e, 0x50, - 0x75, 0x74, 0x52, 0x6f, 0x6c, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x0e, 0x0a, - 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x31, 0x0a, - 0x04, 0x72, 0x6f, 0x6c, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x72, 0x61, - 0x66, 0x61, 0x79, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x75, 0x73, - 0x65, 0x72, 0x2e, 0x76, 0x33, 0x2e, 0x52, 0x6f, 0x6c, 0x65, 0x52, 0x04, 0x72, 0x6f, 0x6c, 0x65, - 0x22, 0x45, 0x0a, 0x10, 0x47, 0x65, 0x74, 0x52, 0x6f, 0x6c, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x31, 0x0a, 0x04, 0x72, 0x6f, 0x6c, 0x65, 0x18, 0x01, 0x20, 0x03, - 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x72, 0x61, 0x66, 0x61, 0x79, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x74, + 0x75, 0x65, 0x73, 0x74, 0x22, 0x14, 0x0a, 0x12, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x52, 0x6f, + 0x6c, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x32, 0x8d, 0x06, 0x0a, 0x04, 0x52, + 0x6f, 0x6c, 0x65, 0x12, 0x9e, 0x01, 0x0a, 0x0a, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x52, 0x6f, + 0x6c, 0x65, 0x12, 0x1d, 0x2e, 0x72, 0x61, 0x66, 0x61, 0x79, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x2e, 0x52, 0x6f, 0x6c, - 0x65, 0x52, 0x04, 0x72, 0x6f, 0x6c, 0x65, 0x22, 0x40, 0x0a, 0x0c, 0x52, 0x6f, 0x6c, 0x65, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, - 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, - 0x18, 0x0a, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x32, 0xdb, 0x04, 0x0a, 0x04, 0x52, 0x6f, - 0x6c, 0x65, 0x12, 0x9e, 0x01, 0x0a, 0x0a, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x52, 0x6f, 0x6c, - 0x65, 0x12, 0x1d, 0x2e, 0x72, 0x61, 0x66, 0x61, 0x79, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x74, 0x79, + 0x65, 0x1a, 0x1d, 0x2e, 0x72, 0x61, 0x66, 0x61, 0x79, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x2e, 0x52, 0x6f, 0x6c, 0x65, - 0x1a, 0x1d, 0x2e, 0x72, 0x61, 0x66, 0x61, 0x79, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x74, 0x79, 0x70, - 0x65, 0x73, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x2e, 0x52, 0x6f, 0x6c, 0x65, 0x22, - 0x52, 0x92, 0x41, 0x36, 0x4a, 0x34, 0x0a, 0x03, 0x32, 0x30, 0x31, 0x12, 0x2d, 0x0a, 0x2b, 0x52, - 0x65, 0x74, 0x75, 0x72, 0x6e, 0x65, 0x64, 0x20, 0x77, 0x68, 0x65, 0x6e, 0x20, 0x72, 0x6f, 0x6c, - 0x65, 0x20, 0x69, 0x73, 0x20, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x20, 0x73, 0x75, 0x63, - 0x63, 0x65, 0x73, 0x73, 0x66, 0x75, 0x6c, 0x6c, 0x79, 0x2e, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x13, - 0x22, 0x0e, 0x2f, 0x61, 0x75, 0x74, 0x68, 0x2f, 0x76, 0x33, 0x2f, 0x72, 0x6f, 0x6c, 0x65, 0x73, - 0x3a, 0x01, 0x2a, 0x12, 0x69, 0x0a, 0x08, 0x47, 0x65, 0x74, 0x52, 0x6f, 0x6c, 0x65, 0x73, 0x12, - 0x21, 0x2e, 0x72, 0x61, 0x66, 0x61, 0x79, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x72, 0x70, 0x63, 0x2e, - 0x76, 0x33, 0x2e, 0x47, 0x65, 0x74, 0x52, 0x6f, 0x6c, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x1a, 0x22, 0x2e, 0x72, 0x61, 0x66, 0x61, 0x79, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x72, - 0x70, 0x63, 0x2e, 0x76, 0x33, 0x2e, 0x47, 0x65, 0x74, 0x52, 0x6f, 0x6c, 0x65, 0x73, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x16, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x10, 0x12, 0x0e, - 0x2f, 0x61, 0x75, 0x74, 0x68, 0x2f, 0x76, 0x33, 0x2f, 0x72, 0x6f, 0x6c, 0x65, 0x73, 0x12, 0x66, - 0x0a, 0x07, 0x47, 0x65, 0x74, 0x52, 0x6f, 0x6c, 0x65, 0x12, 0x20, 0x2e, 0x72, 0x61, 0x66, 0x61, - 0x79, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x72, 0x70, 0x63, 0x2e, 0x76, 0x33, 0x2e, 0x47, 0x65, 0x74, - 0x52, 0x6f, 0x6c, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1d, 0x2e, 0x72, 0x61, - 0x66, 0x61, 0x79, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x75, 0x73, - 0x65, 0x72, 0x2e, 0x76, 0x33, 0x2e, 0x52, 0x6f, 0x6c, 0x65, 0x22, 0x1a, 0x82, 0xd3, 0xe4, 0x93, - 0x02, 0x14, 0x12, 0x12, 0x2f, 0x61, 0x75, 0x74, 0x68, 0x2f, 0x76, 0x33, 0x2f, 0x72, 0x6f, 0x6c, - 0x65, 0x2f, 0x7b, 0x69, 0x64, 0x7d, 0x12, 0x70, 0x0a, 0x0a, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, - 0x52, 0x6f, 0x6c, 0x65, 0x12, 0x20, 0x2e, 0x72, 0x61, 0x66, 0x61, 0x79, 0x2e, 0x64, 0x65, 0x76, - 0x2e, 0x72, 0x70, 0x63, 0x2e, 0x76, 0x33, 0x2e, 0x50, 0x75, 0x74, 0x52, 0x6f, 0x6c, 0x65, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1e, 0x2e, 0x72, 0x61, 0x66, 0x61, 0x79, 0x2e, 0x64, - 0x65, 0x76, 0x2e, 0x72, 0x70, 0x63, 0x2e, 0x76, 0x33, 0x2e, 0x52, 0x6f, 0x6c, 0x65, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x20, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1a, 0x1a, 0x12, - 0x2f, 0x61, 0x75, 0x74, 0x68, 0x2f, 0x76, 0x33, 0x2f, 0x72, 0x6f, 0x6c, 0x65, 0x2f, 0x7b, 0x69, - 0x64, 0x7d, 0x3a, 0x04, 0x72, 0x6f, 0x6c, 0x65, 0x12, 0x6d, 0x0a, 0x0a, 0x44, 0x65, 0x6c, 0x65, - 0x74, 0x65, 0x52, 0x6f, 0x6c, 0x65, 0x12, 0x23, 0x2e, 0x72, 0x61, 0x66, 0x61, 0x79, 0x2e, 0x64, - 0x65, 0x76, 0x2e, 0x72, 0x70, 0x63, 0x2e, 0x76, 0x33, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, - 0x52, 0x6f, 0x6c, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1e, 0x2e, 0x72, 0x61, - 0x66, 0x61, 0x79, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x72, 0x70, 0x63, 0x2e, 0x76, 0x33, 0x2e, 0x52, - 0x6f, 0x6c, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x1a, 0x82, 0xd3, 0xe4, - 0x93, 0x02, 0x14, 0x2a, 0x12, 0x2f, 0x61, 0x75, 0x74, 0x68, 0x2f, 0x76, 0x33, 0x2f, 0x72, 0x6f, - 0x6c, 0x65, 0x2f, 0x7b, 0x69, 0x64, 0x7d, 0x42, 0xca, 0x04, 0x0a, 0x14, 0x63, 0x6f, 0x6d, 0x2e, - 0x72, 0x61, 0x66, 0x61, 0x79, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x72, 0x70, 0x63, 0x2e, 0x76, 0x33, - 0x42, 0x09, 0x52, 0x6f, 0x6c, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x4a, 0x67, - 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x52, 0x61, 0x66, 0x61, 0x79, 0x53, - 0x79, 0x73, 0x74, 0x65, 0x6d, 0x73, 0x2f, 0x72, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2d, 0x62, 0x61, - 0x73, 0x65, 0x2f, 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x73, 0x2f, 0x75, 0x73, - 0x65, 0x72, 0x6d, 0x67, 0x6d, 0x74, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x72, 0x70, 0x63, - 0x2f, 0x76, 0x33, 0x3b, 0x72, 0x70, 0x63, 0x76, 0x33, 0xa2, 0x02, 0x03, 0x52, 0x44, 0x52, 0xaa, - 0x02, 0x10, 0x52, 0x61, 0x66, 0x61, 0x79, 0x2e, 0x44, 0x65, 0x76, 0x2e, 0x52, 0x70, 0x63, 0x2e, - 0x56, 0x33, 0xca, 0x02, 0x10, 0x52, 0x61, 0x66, 0x61, 0x79, 0x5c, 0x44, 0x65, 0x76, 0x5c, 0x52, - 0x70, 0x63, 0x5c, 0x56, 0x33, 0xe2, 0x02, 0x1c, 0x52, 0x61, 0x66, 0x61, 0x79, 0x5c, 0x44, 0x65, - 0x76, 0x5c, 0x52, 0x70, 0x63, 0x5c, 0x56, 0x33, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, - 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x13, 0x52, 0x61, 0x66, 0x61, 0x79, 0x3a, 0x3a, 0x44, 0x65, - 0x76, 0x3a, 0x3a, 0x52, 0x70, 0x63, 0x3a, 0x3a, 0x56, 0x33, 0x92, 0x41, 0xe2, 0x02, 0x12, 0x2b, - 0x0a, 0x17, 0x52, 0x6f, 0x6c, 0x65, 0x20, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x6d, 0x65, 0x6e, - 0x74, 0x20, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x22, 0x0b, 0x0a, 0x09, 0x52, 0x61, 0x66, - 0x61, 0x79, 0x20, 0x44, 0x65, 0x76, 0x32, 0x03, 0x32, 0x2e, 0x30, 0x2a, 0x01, 0x02, 0x32, 0x10, - 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x6a, 0x73, 0x6f, 0x6e, - 0x32, 0x10, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x79, 0x61, - 0x6d, 0x6c, 0x3a, 0x10, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, - 0x6a, 0x73, 0x6f, 0x6e, 0x3a, 0x10, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x2f, 0x79, 0x61, 0x6d, 0x6c, 0x52, 0x50, 0x0a, 0x03, 0x34, 0x30, 0x33, 0x12, 0x49, 0x0a, - 0x47, 0x52, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x65, 0x64, 0x20, 0x77, 0x68, 0x65, 0x6e, 0x20, 0x74, - 0x68, 0x65, 0x20, 0x72, 0x6f, 0x6c, 0x65, 0x20, 0x64, 0x6f, 0x65, 0x73, 0x20, 0x6e, 0x6f, 0x74, - 0x20, 0x68, 0x61, 0x76, 0x65, 0x20, 0x70, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, - 0x20, 0x74, 0x6f, 0x20, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x20, 0x74, 0x68, 0x65, 0x20, 0x72, - 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x2e, 0x52, 0x3b, 0x0a, 0x03, 0x34, 0x30, 0x34, 0x12, - 0x34, 0x0a, 0x2a, 0x52, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x65, 0x64, 0x20, 0x77, 0x68, 0x65, 0x6e, - 0x20, 0x74, 0x68, 0x65, 0x20, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x20, 0x64, 0x6f, - 0x65, 0x73, 0x20, 0x6e, 0x6f, 0x74, 0x20, 0x65, 0x78, 0x69, 0x73, 0x74, 0x2e, 0x12, 0x06, 0x0a, - 0x04, 0x9a, 0x02, 0x01, 0x07, 0x5a, 0x38, 0x0a, 0x25, 0x0a, 0x0a, 0x41, 0x70, 0x69, 0x4b, 0x65, - 0x79, 0x41, 0x75, 0x74, 0x68, 0x12, 0x17, 0x08, 0x02, 0x1a, 0x11, 0x58, 0x2d, 0x52, 0x41, 0x46, - 0x41, 0x59, 0x2d, 0x41, 0x50, 0x49, 0x2d, 0x4b, 0x45, 0x59, 0x49, 0x44, 0x20, 0x02, 0x0a, 0x0f, - 0x0a, 0x09, 0x42, 0x61, 0x73, 0x69, 0x63, 0x41, 0x75, 0x74, 0x68, 0x12, 0x02, 0x08, 0x01, 0x62, - 0x1f, 0x0a, 0x0e, 0x0a, 0x0a, 0x41, 0x70, 0x69, 0x4b, 0x65, 0x79, 0x41, 0x75, 0x74, 0x68, 0x12, - 0x00, 0x0a, 0x0d, 0x0a, 0x09, 0x42, 0x61, 0x73, 0x69, 0x63, 0x41, 0x75, 0x74, 0x68, 0x12, 0x00, - 0xc8, 0xe2, 0x1e, 0x01, 0xd0, 0xe2, 0x1e, 0x01, 0xe0, 0xe2, 0x1e, 0x01, 0xc0, 0xe3, 0x1e, 0x01, - 0xc8, 0xe3, 0x1e, 0x01, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x22, 0x52, 0x92, 0x41, 0x36, 0x4a, 0x34, 0x0a, 0x03, 0x32, 0x30, 0x31, 0x12, 0x2d, 0x0a, 0x2b, + 0x52, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x65, 0x64, 0x20, 0x77, 0x68, 0x65, 0x6e, 0x20, 0x72, 0x6f, + 0x6c, 0x65, 0x20, 0x69, 0x73, 0x20, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x20, 0x73, 0x75, + 0x63, 0x63, 0x65, 0x73, 0x73, 0x66, 0x75, 0x6c, 0x6c, 0x79, 0x2e, 0x82, 0xd3, 0xe4, 0x93, 0x02, + 0x13, 0x22, 0x0e, 0x2f, 0x61, 0x75, 0x74, 0x68, 0x2f, 0x76, 0x33, 0x2f, 0x72, 0x6f, 0x6c, 0x65, + 0x73, 0x3a, 0x01, 0x2a, 0x12, 0x68, 0x0a, 0x08, 0x47, 0x65, 0x74, 0x52, 0x6f, 0x6c, 0x65, 0x73, + 0x12, 0x21, 0x2e, 0x72, 0x61, 0x66, 0x61, 0x79, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x72, 0x70, 0x63, + 0x2e, 0x76, 0x33, 0x2e, 0x47, 0x65, 0x74, 0x52, 0x6f, 0x6c, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x1a, 0x21, 0x2e, 0x72, 0x61, 0x66, 0x61, 0x79, 0x2e, 0x64, 0x65, 0x76, 0x2e, + 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x2e, 0x52, 0x6f, + 0x6c, 0x65, 0x4c, 0x69, 0x73, 0x74, 0x22, 0x16, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x10, 0x12, 0x0e, + 0x2f, 0x61, 0x75, 0x74, 0x68, 0x2f, 0x76, 0x33, 0x2f, 0x72, 0x6f, 0x6c, 0x65, 0x73, 0x12, 0x8d, + 0x01, 0x0a, 0x07, 0x47, 0x65, 0x74, 0x52, 0x6f, 0x6c, 0x65, 0x12, 0x1d, 0x2e, 0x72, 0x61, 0x66, + 0x61, 0x79, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x75, 0x73, 0x65, + 0x72, 0x2e, 0x76, 0x33, 0x2e, 0x52, 0x6f, 0x6c, 0x65, 0x1a, 0x1d, 0x2e, 0x72, 0x61, 0x66, 0x61, + 0x79, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x75, 0x73, 0x65, 0x72, + 0x2e, 0x76, 0x33, 0x2e, 0x52, 0x6f, 0x6c, 0x65, 0x22, 0x44, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x3e, + 0x12, 0x1d, 0x2f, 0x61, 0x75, 0x74, 0x68, 0x2f, 0x76, 0x33, 0x2f, 0x72, 0x6f, 0x6c, 0x65, 0x2f, + 0x7b, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x6e, 0x61, 0x6d, 0x65, 0x7d, 0x5a, + 0x1d, 0x12, 0x1b, 0x2f, 0x61, 0x75, 0x74, 0x68, 0x2f, 0x76, 0x33, 0x2f, 0x72, 0x6f, 0x6c, 0x65, + 0x2f, 0x7b, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x69, 0x64, 0x7d, 0x12, 0x96, + 0x01, 0x0a, 0x0a, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x52, 0x6f, 0x6c, 0x65, 0x12, 0x1d, 0x2e, + 0x72, 0x61, 0x66, 0x61, 0x79, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, + 0x75, 0x73, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x2e, 0x52, 0x6f, 0x6c, 0x65, 0x1a, 0x1d, 0x2e, 0x72, + 0x61, 0x66, 0x61, 0x79, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x75, + 0x73, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x2e, 0x52, 0x6f, 0x6c, 0x65, 0x22, 0x4a, 0x82, 0xd3, 0xe4, + 0x93, 0x02, 0x44, 0x1a, 0x1d, 0x2f, 0x61, 0x75, 0x74, 0x68, 0x2f, 0x76, 0x33, 0x2f, 0x72, 0x6f, + 0x6c, 0x65, 0x2f, 0x7b, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x6e, 0x61, 0x6d, + 0x65, 0x7d, 0x3a, 0x01, 0x2a, 0x5a, 0x20, 0x1a, 0x1b, 0x2f, 0x61, 0x75, 0x74, 0x68, 0x2f, 0x76, + 0x33, 0x2f, 0x72, 0x6f, 0x6c, 0x65, 0x2f, 0x7b, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, + 0x2e, 0x69, 0x64, 0x7d, 0x3a, 0x01, 0x2a, 0x12, 0xd0, 0x01, 0x0a, 0x0a, 0x44, 0x65, 0x6c, 0x65, + 0x74, 0x65, 0x52, 0x6f, 0x6c, 0x65, 0x12, 0x1d, 0x2e, 0x72, 0x61, 0x66, 0x61, 0x79, 0x2e, 0x64, + 0x65, 0x76, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x76, 0x33, + 0x2e, 0x52, 0x6f, 0x6c, 0x65, 0x1a, 0x24, 0x2e, 0x72, 0x61, 0x66, 0x61, 0x79, 0x2e, 0x64, 0x65, + 0x76, 0x2e, 0x72, 0x70, 0x63, 0x2e, 0x76, 0x33, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x52, + 0x6f, 0x6c, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x7d, 0x92, 0x41, 0x36, + 0x4a, 0x34, 0x0a, 0x03, 0x32, 0x30, 0x34, 0x12, 0x2d, 0x0a, 0x2b, 0x52, 0x65, 0x74, 0x75, 0x72, + 0x6e, 0x65, 0x64, 0x20, 0x77, 0x68, 0x65, 0x6e, 0x20, 0x72, 0x6f, 0x6c, 0x65, 0x20, 0x69, 0x73, + 0x20, 0x64, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x64, 0x20, 0x73, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, + 0x66, 0x75, 0x6c, 0x6c, 0x79, 0x2e, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x3e, 0x2a, 0x1d, 0x2f, 0x61, + 0x75, 0x74, 0x68, 0x2f, 0x76, 0x33, 0x2f, 0x72, 0x6f, 0x6c, 0x65, 0x2f, 0x7b, 0x6d, 0x65, 0x74, + 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x6e, 0x61, 0x6d, 0x65, 0x7d, 0x5a, 0x1d, 0x2a, 0x1b, 0x2f, + 0x61, 0x75, 0x74, 0x68, 0x2f, 0x76, 0x33, 0x2f, 0x72, 0x6f, 0x6c, 0x65, 0x2f, 0x7b, 0x6d, 0x65, + 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x69, 0x64, 0x7d, 0x42, 0xca, 0x04, 0x0a, 0x14, 0x63, + 0x6f, 0x6d, 0x2e, 0x72, 0x61, 0x66, 0x61, 0x79, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x72, 0x70, 0x63, + 0x2e, 0x76, 0x33, 0x42, 0x09, 0x52, 0x6f, 0x6c, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, + 0x5a, 0x4a, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x52, 0x61, 0x66, + 0x61, 0x79, 0x53, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x73, 0x2f, 0x72, 0x63, 0x6c, 0x6f, 0x75, 0x64, + 0x2d, 0x62, 0x61, 0x73, 0x65, 0x2f, 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x73, + 0x2f, 0x75, 0x73, 0x65, 0x72, 0x6d, 0x67, 0x6d, 0x74, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, + 0x72, 0x70, 0x63, 0x2f, 0x76, 0x33, 0x3b, 0x72, 0x70, 0x63, 0x76, 0x33, 0xa2, 0x02, 0x03, 0x52, + 0x44, 0x52, 0xaa, 0x02, 0x10, 0x52, 0x61, 0x66, 0x61, 0x79, 0x2e, 0x44, 0x65, 0x76, 0x2e, 0x52, + 0x70, 0x63, 0x2e, 0x56, 0x33, 0xca, 0x02, 0x10, 0x52, 0x61, 0x66, 0x61, 0x79, 0x5c, 0x44, 0x65, + 0x76, 0x5c, 0x52, 0x70, 0x63, 0x5c, 0x56, 0x33, 0xe2, 0x02, 0x1c, 0x52, 0x61, 0x66, 0x61, 0x79, + 0x5c, 0x44, 0x65, 0x76, 0x5c, 0x52, 0x70, 0x63, 0x5c, 0x56, 0x33, 0x5c, 0x47, 0x50, 0x42, 0x4d, + 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x13, 0x52, 0x61, 0x66, 0x61, 0x79, 0x3a, + 0x3a, 0x44, 0x65, 0x76, 0x3a, 0x3a, 0x52, 0x70, 0x63, 0x3a, 0x3a, 0x56, 0x33, 0x92, 0x41, 0xe2, + 0x02, 0x12, 0x2b, 0x0a, 0x17, 0x52, 0x6f, 0x6c, 0x65, 0x20, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, + 0x6d, 0x65, 0x6e, 0x74, 0x20, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x22, 0x0b, 0x0a, 0x09, + 0x52, 0x61, 0x66, 0x61, 0x79, 0x20, 0x44, 0x65, 0x76, 0x32, 0x03, 0x32, 0x2e, 0x30, 0x2a, 0x01, + 0x02, 0x32, 0x10, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x6a, + 0x73, 0x6f, 0x6e, 0x32, 0x10, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x2f, 0x79, 0x61, 0x6d, 0x6c, 0x3a, 0x10, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x2f, 0x6a, 0x73, 0x6f, 0x6e, 0x3a, 0x10, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x79, 0x61, 0x6d, 0x6c, 0x52, 0x50, 0x0a, 0x03, 0x34, 0x30, 0x33, + 0x12, 0x49, 0x0a, 0x47, 0x52, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x65, 0x64, 0x20, 0x77, 0x68, 0x65, + 0x6e, 0x20, 0x74, 0x68, 0x65, 0x20, 0x72, 0x6f, 0x6c, 0x65, 0x20, 0x64, 0x6f, 0x65, 0x73, 0x20, + 0x6e, 0x6f, 0x74, 0x20, 0x68, 0x61, 0x76, 0x65, 0x20, 0x70, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, + 0x69, 0x6f, 0x6e, 0x20, 0x74, 0x6f, 0x20, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x20, 0x74, 0x68, + 0x65, 0x20, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x2e, 0x52, 0x3b, 0x0a, 0x03, 0x34, + 0x30, 0x34, 0x12, 0x34, 0x0a, 0x2a, 0x52, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x65, 0x64, 0x20, 0x77, + 0x68, 0x65, 0x6e, 0x20, 0x74, 0x68, 0x65, 0x20, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, + 0x20, 0x64, 0x6f, 0x65, 0x73, 0x20, 0x6e, 0x6f, 0x74, 0x20, 0x65, 0x78, 0x69, 0x73, 0x74, 0x2e, + 0x12, 0x06, 0x0a, 0x04, 0x9a, 0x02, 0x01, 0x07, 0x5a, 0x38, 0x0a, 0x25, 0x0a, 0x0a, 0x41, 0x70, + 0x69, 0x4b, 0x65, 0x79, 0x41, 0x75, 0x74, 0x68, 0x12, 0x17, 0x08, 0x02, 0x1a, 0x11, 0x58, 0x2d, + 0x52, 0x41, 0x46, 0x41, 0x59, 0x2d, 0x41, 0x50, 0x49, 0x2d, 0x4b, 0x45, 0x59, 0x49, 0x44, 0x20, + 0x02, 0x0a, 0x0f, 0x0a, 0x09, 0x42, 0x61, 0x73, 0x69, 0x63, 0x41, 0x75, 0x74, 0x68, 0x12, 0x02, + 0x08, 0x01, 0x62, 0x1f, 0x0a, 0x0e, 0x0a, 0x0a, 0x41, 0x70, 0x69, 0x4b, 0x65, 0x79, 0x41, 0x75, + 0x74, 0x68, 0x12, 0x00, 0x0a, 0x0d, 0x0a, 0x09, 0x42, 0x61, 0x73, 0x69, 0x63, 0x41, 0x75, 0x74, + 0x68, 0x12, 0x00, 0xc8, 0xe2, 0x1e, 0x01, 0xd0, 0xe2, 0x1e, 0x01, 0xe0, 0xe2, 0x1e, 0x01, 0xc0, + 0xe3, 0x1e, 0x01, 0xc8, 0xe3, 0x1e, 0x01, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -436,34 +218,29 @@ func file_proto_rpc_v3_role_proto_rawDescGZIP() []byte { return file_proto_rpc_v3_role_proto_rawDescData } -var file_proto_rpc_v3_role_proto_msgTypes = make([]protoimpl.MessageInfo, 6) +var file_proto_rpc_v3_role_proto_msgTypes = make([]protoimpl.MessageInfo, 2) var file_proto_rpc_v3_role_proto_goTypes = []interface{}{ - (*GetRolesRequest)(nil), // 0: rafay.dev.rpc.v3.GetRolesRequest - (*GetRoleRequest)(nil), // 1: rafay.dev.rpc.v3.GetRoleRequest - (*DeleteRoleRequest)(nil), // 2: rafay.dev.rpc.v3.DeleteRoleRequest - (*PutRoleRequest)(nil), // 3: rafay.dev.rpc.v3.PutRoleRequest - (*GetRolesResponse)(nil), // 4: rafay.dev.rpc.v3.GetRolesResponse - (*RoleResponse)(nil), // 5: rafay.dev.rpc.v3.RoleResponse - (*v3.Role)(nil), // 6: rafay.dev.types.user.v3.Role + (*GetRolesRequest)(nil), // 0: rafay.dev.rpc.v3.GetRolesRequest + (*DeleteRoleResponse)(nil), // 1: rafay.dev.rpc.v3.DeleteRoleResponse + (*v3.Role)(nil), // 2: rafay.dev.types.user.v3.Role + (*v3.RoleList)(nil), // 3: rafay.dev.types.user.v3.RoleList } var file_proto_rpc_v3_role_proto_depIdxs = []int32{ - 6, // 0: rafay.dev.rpc.v3.PutRoleRequest.role:type_name -> rafay.dev.types.user.v3.Role - 6, // 1: rafay.dev.rpc.v3.GetRolesResponse.role:type_name -> rafay.dev.types.user.v3.Role - 6, // 2: rafay.dev.rpc.v3.Role.CreateRole:input_type -> rafay.dev.types.user.v3.Role - 0, // 3: rafay.dev.rpc.v3.Role.GetRoles:input_type -> rafay.dev.rpc.v3.GetRolesRequest - 1, // 4: rafay.dev.rpc.v3.Role.GetRole:input_type -> rafay.dev.rpc.v3.GetRoleRequest - 3, // 5: rafay.dev.rpc.v3.Role.UpdateRole:input_type -> rafay.dev.rpc.v3.PutRoleRequest - 2, // 6: rafay.dev.rpc.v3.Role.DeleteRole:input_type -> rafay.dev.rpc.v3.DeleteRoleRequest - 6, // 7: rafay.dev.rpc.v3.Role.CreateRole:output_type -> rafay.dev.types.user.v3.Role - 4, // 8: rafay.dev.rpc.v3.Role.GetRoles:output_type -> rafay.dev.rpc.v3.GetRolesResponse - 6, // 9: rafay.dev.rpc.v3.Role.GetRole:output_type -> rafay.dev.types.user.v3.Role - 5, // 10: rafay.dev.rpc.v3.Role.UpdateRole:output_type -> rafay.dev.rpc.v3.RoleResponse - 5, // 11: rafay.dev.rpc.v3.Role.DeleteRole:output_type -> rafay.dev.rpc.v3.RoleResponse - 7, // [7:12] is the sub-list for method output_type - 2, // [2:7] is the sub-list for method input_type - 2, // [2:2] is the sub-list for extension type_name - 2, // [2:2] is the sub-list for extension extendee - 0, // [0:2] is the sub-list for field type_name + 2, // 0: rafay.dev.rpc.v3.Role.CreateRole:input_type -> rafay.dev.types.user.v3.Role + 0, // 1: rafay.dev.rpc.v3.Role.GetRoles:input_type -> rafay.dev.rpc.v3.GetRolesRequest + 2, // 2: rafay.dev.rpc.v3.Role.GetRole:input_type -> rafay.dev.types.user.v3.Role + 2, // 3: rafay.dev.rpc.v3.Role.UpdateRole:input_type -> rafay.dev.types.user.v3.Role + 2, // 4: rafay.dev.rpc.v3.Role.DeleteRole:input_type -> rafay.dev.types.user.v3.Role + 2, // 5: rafay.dev.rpc.v3.Role.CreateRole:output_type -> rafay.dev.types.user.v3.Role + 3, // 6: rafay.dev.rpc.v3.Role.GetRoles:output_type -> rafay.dev.types.user.v3.RoleList + 2, // 7: rafay.dev.rpc.v3.Role.GetRole:output_type -> rafay.dev.types.user.v3.Role + 2, // 8: rafay.dev.rpc.v3.Role.UpdateRole:output_type -> rafay.dev.types.user.v3.Role + 1, // 9: rafay.dev.rpc.v3.Role.DeleteRole:output_type -> rafay.dev.rpc.v3.DeleteRoleResponse + 5, // [5:10] is the sub-list for method output_type + 0, // [0:5] is the sub-list for method input_type + 0, // [0:0] is the sub-list for extension type_name + 0, // [0:0] is the sub-list for extension extendee + 0, // [0:0] is the sub-list for field type_name } func init() { file_proto_rpc_v3_role_proto_init() } @@ -485,55 +262,7 @@ func file_proto_rpc_v3_role_proto_init() { } } file_proto_rpc_v3_role_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetRoleRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_proto_rpc_v3_role_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*DeleteRoleRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_proto_rpc_v3_role_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*PutRoleRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_proto_rpc_v3_role_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetRolesResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_proto_rpc_v3_role_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*RoleResponse); i { + switch v := v.(*DeleteRoleResponse); i { case 0: return &v.state case 1: @@ -551,7 +280,7 @@ func file_proto_rpc_v3_role_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_proto_rpc_v3_role_proto_rawDesc, NumEnums: 0, - NumMessages: 6, + NumMessages: 2, NumExtensions: 0, NumServices: 1, }, diff --git a/components/usermgmt/proto/rpc/v3/role.pb.gw.go b/components/usermgmt/proto/rpc/v3/role.pb.gw.go index 1542881..3d68092 100644 --- a/components/usermgmt/proto/rpc/v3/role.pb.gw.go +++ b/components/usermgmt/proto/rpc/v3/role.pb.gw.go @@ -84,8 +84,12 @@ func local_request_Role_GetRoles_0(ctx context.Context, marshaler runtime.Marsha } +var ( + filter_Role_GetRole_0 = &utilities.DoubleArray{Encoding: map[string]int{"metadata": 0, "name": 1}, Base: []int{1, 1, 1, 0}, Check: []int{0, 1, 2, 3}} +) + func request_Role_GetRole_0(ctx context.Context, marshaler runtime.Marshaler, client RoleClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq GetRoleRequest + var protoReq userv3.Role var metadata runtime.ServerMetadata var ( @@ -95,14 +99,21 @@ func request_Role_GetRole_0(ctx context.Context, marshaler runtime.Marshaler, cl _ = err ) - val, ok = pathParams["id"] + val, ok = pathParams["metadata.name"] if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "id") + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "metadata.name") } - protoReq.Id, err = runtime.String(val) + err = runtime.PopulateFieldFromPath(&protoReq, "metadata.name", val) if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "id", err) + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "metadata.name", err) + } + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Role_GetRole_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } msg, err := client.GetRole(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) @@ -111,7 +122,7 @@ func request_Role_GetRole_0(ctx context.Context, marshaler runtime.Marshaler, cl } func local_request_Role_GetRole_0(ctx context.Context, marshaler runtime.Marshaler, server RoleServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq GetRoleRequest + var protoReq userv3.Role var metadata runtime.ServerMetadata var ( @@ -121,14 +132,91 @@ func local_request_Role_GetRole_0(ctx context.Context, marshaler runtime.Marshal _ = err ) - val, ok = pathParams["id"] + val, ok = pathParams["metadata.name"] if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "id") + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "metadata.name") } - protoReq.Id, err = runtime.String(val) + err = runtime.PopulateFieldFromPath(&protoReq, "metadata.name", val) if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "id", err) + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "metadata.name", err) + } + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Role_GetRole_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := server.GetRole(ctx, &protoReq) + return msg, metadata, err + +} + +var ( + filter_Role_GetRole_1 = &utilities.DoubleArray{Encoding: map[string]int{"metadata": 0, "id": 1}, Base: []int{1, 1, 1, 0}, Check: []int{0, 1, 2, 3}} +) + +func request_Role_GetRole_1(ctx context.Context, marshaler runtime.Marshaler, client RoleClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq userv3.Role + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["metadata.id"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "metadata.id") + } + + err = runtime.PopulateFieldFromPath(&protoReq, "metadata.id", val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "metadata.id", err) + } + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Role_GetRole_1); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := client.GetRole(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_Role_GetRole_1(ctx context.Context, marshaler runtime.Marshaler, server RoleServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq userv3.Role + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["metadata.id"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "metadata.id") + } + + err = runtime.PopulateFieldFromPath(&protoReq, "metadata.id", val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "metadata.id", err) + } + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Role_GetRole_1); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } msg, err := server.GetRole(ctx, &protoReq) @@ -137,14 +225,14 @@ func local_request_Role_GetRole_0(ctx context.Context, marshaler runtime.Marshal } func request_Role_UpdateRole_0(ctx context.Context, marshaler runtime.Marshaler, client RoleClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq PutRoleRequest + var protoReq userv3.Role var metadata runtime.ServerMetadata newReader, berr := utilities.IOReaderFactory(req.Body) if berr != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) } - if err := marshaler.NewDecoder(newReader()).Decode(&protoReq.Role); err != nil && err != io.EOF { + if err := marshaler.NewDecoder(newReader()).Decode(&protoReq); err != nil && err != io.EOF { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } @@ -155,14 +243,14 @@ func request_Role_UpdateRole_0(ctx context.Context, marshaler runtime.Marshaler, _ = err ) - val, ok = pathParams["id"] + val, ok = pathParams["metadata.name"] if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "id") + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "metadata.name") } - protoReq.Id, err = runtime.String(val) + err = runtime.PopulateFieldFromPath(&protoReq, "metadata.name", val) if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "id", err) + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "metadata.name", err) } msg, err := client.UpdateRole(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) @@ -171,14 +259,14 @@ func request_Role_UpdateRole_0(ctx context.Context, marshaler runtime.Marshaler, } func local_request_Role_UpdateRole_0(ctx context.Context, marshaler runtime.Marshaler, server RoleServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq PutRoleRequest + var protoReq userv3.Role var metadata runtime.ServerMetadata newReader, berr := utilities.IOReaderFactory(req.Body) if berr != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) } - if err := marshaler.NewDecoder(newReader()).Decode(&protoReq.Role); err != nil && err != io.EOF { + if err := marshaler.NewDecoder(newReader()).Decode(&protoReq); err != nil && err != io.EOF { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } @@ -189,14 +277,14 @@ func local_request_Role_UpdateRole_0(ctx context.Context, marshaler runtime.Mars _ = err ) - val, ok = pathParams["id"] + val, ok = pathParams["metadata.name"] if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "id") + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "metadata.name") } - protoReq.Id, err = runtime.String(val) + err = runtime.PopulateFieldFromPath(&protoReq, "metadata.name", val) if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "id", err) + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "metadata.name", err) } msg, err := server.UpdateRole(ctx, &protoReq) @@ -204,8 +292,80 @@ func local_request_Role_UpdateRole_0(ctx context.Context, marshaler runtime.Mars } +func request_Role_UpdateRole_1(ctx context.Context, marshaler runtime.Marshaler, client RoleClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq userv3.Role + var metadata runtime.ServerMetadata + + newReader, berr := utilities.IOReaderFactory(req.Body) + if berr != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) + } + if err := marshaler.NewDecoder(newReader()).Decode(&protoReq); err != nil && err != io.EOF { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["metadata.id"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "metadata.id") + } + + err = runtime.PopulateFieldFromPath(&protoReq, "metadata.id", val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "metadata.id", err) + } + + msg, err := client.UpdateRole(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_Role_UpdateRole_1(ctx context.Context, marshaler runtime.Marshaler, server RoleServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq userv3.Role + var metadata runtime.ServerMetadata + + newReader, berr := utilities.IOReaderFactory(req.Body) + if berr != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) + } + if err := marshaler.NewDecoder(newReader()).Decode(&protoReq); err != nil && err != io.EOF { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["metadata.id"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "metadata.id") + } + + err = runtime.PopulateFieldFromPath(&protoReq, "metadata.id", val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "metadata.id", err) + } + + msg, err := server.UpdateRole(ctx, &protoReq) + return msg, metadata, err + +} + +var ( + filter_Role_DeleteRole_0 = &utilities.DoubleArray{Encoding: map[string]int{"metadata": 0, "name": 1}, Base: []int{1, 1, 1, 0}, Check: []int{0, 1, 2, 3}} +) + func request_Role_DeleteRole_0(ctx context.Context, marshaler runtime.Marshaler, client RoleClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq DeleteRoleRequest + var protoReq userv3.Role var metadata runtime.ServerMetadata var ( @@ -215,14 +375,21 @@ func request_Role_DeleteRole_0(ctx context.Context, marshaler runtime.Marshaler, _ = err ) - val, ok = pathParams["id"] + val, ok = pathParams["metadata.name"] if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "id") + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "metadata.name") } - protoReq.Id, err = runtime.String(val) + err = runtime.PopulateFieldFromPath(&protoReq, "metadata.name", val) if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "id", err) + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "metadata.name", err) + } + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Role_DeleteRole_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } msg, err := client.DeleteRole(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) @@ -231,7 +398,7 @@ func request_Role_DeleteRole_0(ctx context.Context, marshaler runtime.Marshaler, } func local_request_Role_DeleteRole_0(ctx context.Context, marshaler runtime.Marshaler, server RoleServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq DeleteRoleRequest + var protoReq userv3.Role var metadata runtime.ServerMetadata var ( @@ -241,14 +408,91 @@ func local_request_Role_DeleteRole_0(ctx context.Context, marshaler runtime.Mars _ = err ) - val, ok = pathParams["id"] + val, ok = pathParams["metadata.name"] if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "id") + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "metadata.name") } - protoReq.Id, err = runtime.String(val) + err = runtime.PopulateFieldFromPath(&protoReq, "metadata.name", val) if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "id", err) + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "metadata.name", err) + } + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Role_DeleteRole_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := server.DeleteRole(ctx, &protoReq) + return msg, metadata, err + +} + +var ( + filter_Role_DeleteRole_1 = &utilities.DoubleArray{Encoding: map[string]int{"metadata": 0, "id": 1}, Base: []int{1, 1, 1, 0}, Check: []int{0, 1, 2, 3}} +) + +func request_Role_DeleteRole_1(ctx context.Context, marshaler runtime.Marshaler, client RoleClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq userv3.Role + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["metadata.id"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "metadata.id") + } + + err = runtime.PopulateFieldFromPath(&protoReq, "metadata.id", val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "metadata.id", err) + } + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Role_DeleteRole_1); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := client.DeleteRole(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_Role_DeleteRole_1(ctx context.Context, marshaler runtime.Marshaler, server RoleServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq userv3.Role + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["metadata.id"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "metadata.id") + } + + err = runtime.PopulateFieldFromPath(&protoReq, "metadata.id", val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "metadata.id", err) + } + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Role_DeleteRole_1); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } msg, err := server.DeleteRole(ctx, &protoReq) @@ -314,7 +558,7 @@ func RegisterRoleHandlerServer(ctx context.Context, mux *runtime.ServeMux, serve var stream runtime.ServerTransportStream ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/rafay.dev.rpc.v3.Role/GetRole", runtime.WithHTTPPathPattern("/auth/v3/role/{id}")) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/rafay.dev.rpc.v3.Role/GetRole", runtime.WithHTTPPathPattern("/auth/v3/role/{metadata.name}")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -331,13 +575,36 @@ func RegisterRoleHandlerServer(ctx context.Context, mux *runtime.ServeMux, serve }) + mux.Handle("GET", pattern_Role_GetRole_1, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/rafay.dev.rpc.v3.Role/GetRole", runtime.WithHTTPPathPattern("/auth/v3/role/{metadata.id}")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_Role_GetRole_1(rctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Role_GetRole_1(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + mux.Handle("PUT", pattern_Role_UpdateRole_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() var stream runtime.ServerTransportStream ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/rafay.dev.rpc.v3.Role/UpdateRole", runtime.WithHTTPPathPattern("/auth/v3/role/{id}")) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/rafay.dev.rpc.v3.Role/UpdateRole", runtime.WithHTTPPathPattern("/auth/v3/role/{metadata.name}")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -354,13 +621,36 @@ func RegisterRoleHandlerServer(ctx context.Context, mux *runtime.ServeMux, serve }) + mux.Handle("PUT", pattern_Role_UpdateRole_1, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/rafay.dev.rpc.v3.Role/UpdateRole", runtime.WithHTTPPathPattern("/auth/v3/role/{metadata.id}")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_Role_UpdateRole_1(rctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Role_UpdateRole_1(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + mux.Handle("DELETE", pattern_Role_DeleteRole_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() var stream runtime.ServerTransportStream ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/rafay.dev.rpc.v3.Role/DeleteRole", runtime.WithHTTPPathPattern("/auth/v3/role/{id}")) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/rafay.dev.rpc.v3.Role/DeleteRole", runtime.WithHTTPPathPattern("/auth/v3/role/{metadata.name}")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -377,6 +667,29 @@ func RegisterRoleHandlerServer(ctx context.Context, mux *runtime.ServeMux, serve }) + mux.Handle("DELETE", pattern_Role_DeleteRole_1, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/rafay.dev.rpc.v3.Role/DeleteRole", runtime.WithHTTPPathPattern("/auth/v3/role/{metadata.id}")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_Role_DeleteRole_1(rctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Role_DeleteRole_1(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + return nil } @@ -462,7 +775,7 @@ func RegisterRoleHandlerClient(ctx context.Context, mux *runtime.ServeMux, clien ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateContext(ctx, mux, req, "/rafay.dev.rpc.v3.Role/GetRole", runtime.WithHTTPPathPattern("/auth/v3/role/{id}")) + rctx, err := runtime.AnnotateContext(ctx, mux, req, "/rafay.dev.rpc.v3.Role/GetRole", runtime.WithHTTPPathPattern("/auth/v3/role/{metadata.name}")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -478,11 +791,31 @@ func RegisterRoleHandlerClient(ctx context.Context, mux *runtime.ServeMux, clien }) + mux.Handle("GET", pattern_Role_GetRole_1, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateContext(ctx, mux, req, "/rafay.dev.rpc.v3.Role/GetRole", runtime.WithHTTPPathPattern("/auth/v3/role/{metadata.id}")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_Role_GetRole_1(rctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Role_GetRole_1(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + mux.Handle("PUT", pattern_Role_UpdateRole_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateContext(ctx, mux, req, "/rafay.dev.rpc.v3.Role/UpdateRole", runtime.WithHTTPPathPattern("/auth/v3/role/{id}")) + rctx, err := runtime.AnnotateContext(ctx, mux, req, "/rafay.dev.rpc.v3.Role/UpdateRole", runtime.WithHTTPPathPattern("/auth/v3/role/{metadata.name}")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -498,11 +831,31 @@ func RegisterRoleHandlerClient(ctx context.Context, mux *runtime.ServeMux, clien }) + mux.Handle("PUT", pattern_Role_UpdateRole_1, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateContext(ctx, mux, req, "/rafay.dev.rpc.v3.Role/UpdateRole", runtime.WithHTTPPathPattern("/auth/v3/role/{metadata.id}")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_Role_UpdateRole_1(rctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Role_UpdateRole_1(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + mux.Handle("DELETE", pattern_Role_DeleteRole_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateContext(ctx, mux, req, "/rafay.dev.rpc.v3.Role/DeleteRole", runtime.WithHTTPPathPattern("/auth/v3/role/{id}")) + rctx, err := runtime.AnnotateContext(ctx, mux, req, "/rafay.dev.rpc.v3.Role/DeleteRole", runtime.WithHTTPPathPattern("/auth/v3/role/{metadata.name}")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -518,6 +871,26 @@ func RegisterRoleHandlerClient(ctx context.Context, mux *runtime.ServeMux, clien }) + mux.Handle("DELETE", pattern_Role_DeleteRole_1, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateContext(ctx, mux, req, "/rafay.dev.rpc.v3.Role/DeleteRole", runtime.WithHTTPPathPattern("/auth/v3/role/{metadata.id}")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_Role_DeleteRole_1(rctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Role_DeleteRole_1(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + return nil } @@ -526,11 +899,17 @@ var ( pattern_Role_GetRoles_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"auth", "v3", "roles"}, "")) - pattern_Role_GetRole_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3}, []string{"auth", "v3", "role", "id"}, "")) + pattern_Role_GetRole_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3}, []string{"auth", "v3", "role", "metadata.name"}, "")) - pattern_Role_UpdateRole_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3}, []string{"auth", "v3", "role", "id"}, "")) + pattern_Role_GetRole_1 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3}, []string{"auth", "v3", "role", "metadata.id"}, "")) - pattern_Role_DeleteRole_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3}, []string{"auth", "v3", "role", "id"}, "")) + pattern_Role_UpdateRole_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3}, []string{"auth", "v3", "role", "metadata.name"}, "")) + + pattern_Role_UpdateRole_1 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3}, []string{"auth", "v3", "role", "metadata.id"}, "")) + + pattern_Role_DeleteRole_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3}, []string{"auth", "v3", "role", "metadata.name"}, "")) + + pattern_Role_DeleteRole_1 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3}, []string{"auth", "v3", "role", "metadata.id"}, "")) ) var ( @@ -540,7 +919,13 @@ var ( forward_Role_GetRole_0 = runtime.ForwardResponseMessage + forward_Role_GetRole_1 = runtime.ForwardResponseMessage + forward_Role_UpdateRole_0 = runtime.ForwardResponseMessage + forward_Role_UpdateRole_1 = runtime.ForwardResponseMessage + forward_Role_DeleteRole_0 = runtime.ForwardResponseMessage + + forward_Role_DeleteRole_1 = runtime.ForwardResponseMessage ) diff --git a/components/usermgmt/proto/rpc/v3/role.proto b/components/usermgmt/proto/rpc/v3/role.proto index 27063ed..e481951 100644 --- a/components/usermgmt/proto/rpc/v3/role.proto +++ b/components/usermgmt/proto/rpc/v3/role.proto @@ -64,18 +64,9 @@ option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_swagger) = { } }; +// TODO: Add filters message GetRolesRequest {} -message GetRoleRequest { string id = 1; } -message DeleteRoleRequest { string id = 1; } -message PutRoleRequest { - string id = 1; - rafay.dev.types.user.v3.Role role = 2; -} -message GetRolesResponse { repeated rafay.dev.types.user.v3.Role role = 1; } -message RoleResponse { - string status = 1; - string message = 2; -} +message DeleteRoleResponse {} service Role { rpc CreateRole(rafay.dev.types.user.v3.Role) @@ -93,28 +84,47 @@ service Role { }; }; - rpc GetRoles(GetRolesRequest) returns (GetRolesResponse) { + rpc GetRoles(GetRolesRequest) returns (rafay.dev.types.user.v3.RoleList) { option (google.api.http) = { get : "/auth/v3/roles" }; }; - rpc GetRole(GetRoleRequest) returns (rafay.dev.types.user.v3.Role) { + rpc GetRole(rafay.dev.types.user.v3.Role) returns (rafay.dev.types.user.v3.Role) { option (google.api.http) = { - get : "/auth/v3/role/{id}" + get : "/auth/v3/role/{metadata.name}" + additional_bindings { + get : "/auth/v3/role/{metadata.id}" + } }; }; - rpc UpdateRole(PutRoleRequest) returns (RoleResponse) { + rpc UpdateRole(rafay.dev.types.user.v3.Role) returns (rafay.dev.types.user.v3.Role) { option (google.api.http) = { - put : "/auth/v3/role/{id}" - body : "role" + put : "/auth/v3/role/{metadata.name}" + body : "*" + additional_bindings { + put : "/auth/v3/role/{metadata.id}" + body : "*" + } }; }; - rpc DeleteRole(DeleteRoleRequest) returns (RoleResponse) { + rpc DeleteRole(rafay.dev.types.user.v3.Role) returns (DeleteRoleResponse) { option (google.api.http) = { - delete : "/auth/v3/role/{id}" + delete : "/auth/v3/role/{metadata.name}" + additional_bindings { + delete : "/auth/v3/role/{metadata.id}" + } + }; + + option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation) = { + responses : { + key : "204" + value : { + description : "Returned when role is deleted successfully." + } + } }; }; } \ No newline at end of file diff --git a/components/usermgmt/proto/rpc/v3/role_grpc.pb.go b/components/usermgmt/proto/rpc/v3/role_grpc.pb.go index 470f2e0..591c8ed 100644 --- a/components/usermgmt/proto/rpc/v3/role_grpc.pb.go +++ b/components/usermgmt/proto/rpc/v3/role_grpc.pb.go @@ -24,10 +24,10 @@ const _ = grpc.SupportPackageIsVersion7 // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. type RoleClient interface { CreateRole(ctx context.Context, in *v3.Role, opts ...grpc.CallOption) (*v3.Role, error) - GetRoles(ctx context.Context, in *GetRolesRequest, opts ...grpc.CallOption) (*GetRolesResponse, error) - GetRole(ctx context.Context, in *GetRoleRequest, opts ...grpc.CallOption) (*v3.Role, error) - UpdateRole(ctx context.Context, in *PutRoleRequest, opts ...grpc.CallOption) (*RoleResponse, error) - DeleteRole(ctx context.Context, in *DeleteRoleRequest, opts ...grpc.CallOption) (*RoleResponse, error) + GetRoles(ctx context.Context, in *GetRolesRequest, opts ...grpc.CallOption) (*v3.RoleList, error) + GetRole(ctx context.Context, in *v3.Role, opts ...grpc.CallOption) (*v3.Role, error) + UpdateRole(ctx context.Context, in *v3.Role, opts ...grpc.CallOption) (*v3.Role, error) + DeleteRole(ctx context.Context, in *v3.Role, opts ...grpc.CallOption) (*DeleteRoleResponse, error) } type roleClient struct { @@ -47,8 +47,8 @@ func (c *roleClient) CreateRole(ctx context.Context, in *v3.Role, opts ...grpc.C return out, nil } -func (c *roleClient) GetRoles(ctx context.Context, in *GetRolesRequest, opts ...grpc.CallOption) (*GetRolesResponse, error) { - out := new(GetRolesResponse) +func (c *roleClient) GetRoles(ctx context.Context, in *GetRolesRequest, opts ...grpc.CallOption) (*v3.RoleList, error) { + out := new(v3.RoleList) err := c.cc.Invoke(ctx, "/rafay.dev.rpc.v3.Role/GetRoles", in, out, opts...) if err != nil { return nil, err @@ -56,7 +56,7 @@ func (c *roleClient) GetRoles(ctx context.Context, in *GetRolesRequest, opts ... return out, nil } -func (c *roleClient) GetRole(ctx context.Context, in *GetRoleRequest, opts ...grpc.CallOption) (*v3.Role, error) { +func (c *roleClient) GetRole(ctx context.Context, in *v3.Role, opts ...grpc.CallOption) (*v3.Role, error) { out := new(v3.Role) err := c.cc.Invoke(ctx, "/rafay.dev.rpc.v3.Role/GetRole", in, out, opts...) if err != nil { @@ -65,8 +65,8 @@ func (c *roleClient) GetRole(ctx context.Context, in *GetRoleRequest, opts ...gr return out, nil } -func (c *roleClient) UpdateRole(ctx context.Context, in *PutRoleRequest, opts ...grpc.CallOption) (*RoleResponse, error) { - out := new(RoleResponse) +func (c *roleClient) UpdateRole(ctx context.Context, in *v3.Role, opts ...grpc.CallOption) (*v3.Role, error) { + out := new(v3.Role) err := c.cc.Invoke(ctx, "/rafay.dev.rpc.v3.Role/UpdateRole", in, out, opts...) if err != nil { return nil, err @@ -74,8 +74,8 @@ func (c *roleClient) UpdateRole(ctx context.Context, in *PutRoleRequest, opts .. return out, nil } -func (c *roleClient) DeleteRole(ctx context.Context, in *DeleteRoleRequest, opts ...grpc.CallOption) (*RoleResponse, error) { - out := new(RoleResponse) +func (c *roleClient) DeleteRole(ctx context.Context, in *v3.Role, opts ...grpc.CallOption) (*DeleteRoleResponse, error) { + out := new(DeleteRoleResponse) err := c.cc.Invoke(ctx, "/rafay.dev.rpc.v3.Role/DeleteRole", in, out, opts...) if err != nil { return nil, err @@ -88,10 +88,10 @@ func (c *roleClient) DeleteRole(ctx context.Context, in *DeleteRoleRequest, opts // for forward compatibility type RoleServer interface { CreateRole(context.Context, *v3.Role) (*v3.Role, error) - GetRoles(context.Context, *GetRolesRequest) (*GetRolesResponse, error) - GetRole(context.Context, *GetRoleRequest) (*v3.Role, error) - UpdateRole(context.Context, *PutRoleRequest) (*RoleResponse, error) - DeleteRole(context.Context, *DeleteRoleRequest) (*RoleResponse, error) + GetRoles(context.Context, *GetRolesRequest) (*v3.RoleList, error) + GetRole(context.Context, *v3.Role) (*v3.Role, error) + UpdateRole(context.Context, *v3.Role) (*v3.Role, error) + DeleteRole(context.Context, *v3.Role) (*DeleteRoleResponse, error) } // UnimplementedRoleServer should be embedded to have forward compatible implementations. @@ -101,16 +101,16 @@ type UnimplementedRoleServer struct { func (UnimplementedRoleServer) CreateRole(context.Context, *v3.Role) (*v3.Role, error) { return nil, status.Errorf(codes.Unimplemented, "method CreateRole not implemented") } -func (UnimplementedRoleServer) GetRoles(context.Context, *GetRolesRequest) (*GetRolesResponse, error) { +func (UnimplementedRoleServer) GetRoles(context.Context, *GetRolesRequest) (*v3.RoleList, error) { return nil, status.Errorf(codes.Unimplemented, "method GetRoles not implemented") } -func (UnimplementedRoleServer) GetRole(context.Context, *GetRoleRequest) (*v3.Role, error) { +func (UnimplementedRoleServer) GetRole(context.Context, *v3.Role) (*v3.Role, error) { return nil, status.Errorf(codes.Unimplemented, "method GetRole not implemented") } -func (UnimplementedRoleServer) UpdateRole(context.Context, *PutRoleRequest) (*RoleResponse, error) { +func (UnimplementedRoleServer) UpdateRole(context.Context, *v3.Role) (*v3.Role, error) { return nil, status.Errorf(codes.Unimplemented, "method UpdateRole not implemented") } -func (UnimplementedRoleServer) DeleteRole(context.Context, *DeleteRoleRequest) (*RoleResponse, error) { +func (UnimplementedRoleServer) DeleteRole(context.Context, *v3.Role) (*DeleteRoleResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method DeleteRole not implemented") } @@ -162,7 +162,7 @@ func _Role_GetRoles_Handler(srv interface{}, ctx context.Context, dec func(inter } func _Role_GetRole_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(GetRoleRequest) + in := new(v3.Role) if err := dec(in); err != nil { return nil, err } @@ -174,13 +174,13 @@ func _Role_GetRole_Handler(srv interface{}, ctx context.Context, dec func(interf FullMethod: "/rafay.dev.rpc.v3.Role/GetRole", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(RoleServer).GetRole(ctx, req.(*GetRoleRequest)) + return srv.(RoleServer).GetRole(ctx, req.(*v3.Role)) } return interceptor(ctx, in, info, handler) } func _Role_UpdateRole_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(PutRoleRequest) + in := new(v3.Role) if err := dec(in); err != nil { return nil, err } @@ -192,13 +192,13 @@ func _Role_UpdateRole_Handler(srv interface{}, ctx context.Context, dec func(int FullMethod: "/rafay.dev.rpc.v3.Role/UpdateRole", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(RoleServer).UpdateRole(ctx, req.(*PutRoleRequest)) + return srv.(RoleServer).UpdateRole(ctx, req.(*v3.Role)) } return interceptor(ctx, in, info, handler) } func _Role_DeleteRole_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(DeleteRoleRequest) + in := new(v3.Role) if err := dec(in); err != nil { return nil, err } @@ -210,7 +210,7 @@ func _Role_DeleteRole_Handler(srv interface{}, ctx context.Context, dec func(int FullMethod: "/rafay.dev.rpc.v3.Role/DeleteRole", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(RoleServer).DeleteRole(ctx, req.(*DeleteRoleRequest)) + return srv.(RoleServer).DeleteRole(ctx, req.(*v3.Role)) } return interceptor(ctx, in, info, handler) } diff --git a/components/usermgmt/proto/rpc/v3/rolepermission.pb.go b/components/usermgmt/proto/rpc/v3/rolepermission.pb.go index 185f9d7..6341953 100644 --- a/components/usermgmt/proto/rpc/v3/rolepermission.pb.go +++ b/components/usermgmt/proto/rpc/v3/rolepermission.pb.go @@ -24,14 +24,14 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) -type GetRolepermissionsRequest struct { +type GetRolePermissionsRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields } -func (x *GetRolepermissionsRequest) Reset() { - *x = GetRolepermissionsRequest{} +func (x *GetRolePermissionsRequest) Reset() { + *x = GetRolePermissionsRequest{} if protoimpl.UnsafeEnabled { mi := &file_proto_rpc_v3_rolepermission_proto_msgTypes[0] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -39,13 +39,13 @@ func (x *GetRolepermissionsRequest) Reset() { } } -func (x *GetRolepermissionsRequest) String() string { +func (x *GetRolePermissionsRequest) String() string { return protoimpl.X.MessageStringOf(x) } -func (*GetRolepermissionsRequest) ProtoMessage() {} +func (*GetRolePermissionsRequest) ProtoMessage() {} -func (x *GetRolepermissionsRequest) ProtoReflect() protoreflect.Message { +func (x *GetRolePermissionsRequest) ProtoReflect() protoreflect.Message { mi := &file_proto_rpc_v3_rolepermission_proto_msgTypes[0] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -57,105 +57,11 @@ func (x *GetRolepermissionsRequest) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use GetRolepermissionsRequest.ProtoReflect.Descriptor instead. -func (*GetRolepermissionsRequest) Descriptor() ([]byte, []int) { +// Deprecated: Use GetRolePermissionsRequest.ProtoReflect.Descriptor instead. +func (*GetRolePermissionsRequest) Descriptor() ([]byte, []int) { return file_proto_rpc_v3_rolepermission_proto_rawDescGZIP(), []int{0} } -type GetRolepermissionRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` -} - -func (x *GetRolepermissionRequest) Reset() { - *x = GetRolepermissionRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_proto_rpc_v3_rolepermission_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *GetRolepermissionRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GetRolepermissionRequest) ProtoMessage() {} - -func (x *GetRolepermissionRequest) ProtoReflect() protoreflect.Message { - mi := &file_proto_rpc_v3_rolepermission_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use GetRolepermissionRequest.ProtoReflect.Descriptor instead. -func (*GetRolepermissionRequest) Descriptor() ([]byte, []int) { - return file_proto_rpc_v3_rolepermission_proto_rawDescGZIP(), []int{1} -} - -func (x *GetRolepermissionRequest) GetId() string { - if x != nil { - return x.Id - } - return "" -} - -type GetRolepermissionsResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Rolepermissions []*v3.RolePermission `protobuf:"bytes,1,rep,name=rolepermissions,proto3" json:"rolepermissions,omitempty"` -} - -func (x *GetRolepermissionsResponse) Reset() { - *x = GetRolepermissionsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_proto_rpc_v3_rolepermission_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *GetRolepermissionsResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GetRolepermissionsResponse) ProtoMessage() {} - -func (x *GetRolepermissionsResponse) ProtoReflect() protoreflect.Message { - mi := &file_proto_rpc_v3_rolepermission_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use GetRolepermissionsResponse.ProtoReflect.Descriptor instead. -func (*GetRolepermissionsResponse) Descriptor() ([]byte, []int) { - return file_proto_rpc_v3_rolepermission_proto_rawDescGZIP(), []int{2} -} - -func (x *GetRolepermissionsResponse) GetRolepermissions() []*v3.RolePermission { - if x != nil { - return x.Rolepermissions - } - return nil -} - var File_proto_rpc_v3_rolepermission_proto protoreflect.FileDescriptor var file_proto_rpc_v3_rolepermission_proto_rawDesc = []byte{ @@ -172,83 +78,69 @@ var file_proto_rpc_v3_rolepermission_proto_rawDesc = []byte{ 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2f, 0x75, 0x73, 0x65, 0x72, 0x70, 0x62, 0x2f, 0x76, 0x33, 0x2f, 0x72, 0x6f, 0x6c, 0x65, 0x70, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x1b, 0x0a, 0x19, 0x47, 0x65, 0x74, 0x52, 0x6f, 0x6c, 0x65, - 0x70, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x22, 0x56, 0x0a, 0x18, 0x47, 0x65, 0x74, 0x52, 0x6f, 0x6c, 0x65, 0x70, 0x65, 0x72, - 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x3a, - 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x2a, 0x92, 0x41, 0x27, 0x2a, - 0x02, 0x49, 0x64, 0x32, 0x21, 0x49, 0x64, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, 0x20, 0x72, - 0x6f, 0x6c, 0x65, 0x70, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x20, 0x72, 0x65, - 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x02, 0x69, 0x64, 0x22, 0xac, 0x01, 0x0a, 0x1a, 0x47, - 0x65, 0x74, 0x52, 0x6f, 0x6c, 0x65, 0x70, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, - 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x8d, 0x01, 0x0a, 0x0f, 0x72, 0x6f, - 0x6c, 0x65, 0x70, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x01, 0x20, - 0x03, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x72, 0x61, 0x66, 0x61, 0x79, 0x2e, 0x64, 0x65, 0x76, 0x2e, - 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x2e, 0x52, 0x6f, - 0x6c, 0x65, 0x50, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x42, 0x3a, 0x92, 0x41, - 0x37, 0x2a, 0x0f, 0x52, 0x6f, 0x6c, 0x65, 0x50, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, - 0x6e, 0x73, 0x32, 0x24, 0x4c, 0x69, 0x73, 0x74, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, 0x20, - 0x72, 0x6f, 0x6c, 0x65, 0x70, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x20, 0x72, - 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x52, 0x0f, 0x72, 0x6f, 0x6c, 0x65, 0x70, 0x65, - 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x32, 0xb5, 0x02, 0x0a, 0x0e, 0x52, 0x6f, - 0x6c, 0x65, 0x70, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x91, 0x01, 0x0a, - 0x12, 0x47, 0x65, 0x74, 0x52, 0x6f, 0x6c, 0x65, 0x70, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, - 0x6f, 0x6e, 0x73, 0x12, 0x2b, 0x2e, 0x72, 0x61, 0x66, 0x61, 0x79, 0x2e, 0x64, 0x65, 0x76, 0x2e, - 0x72, 0x70, 0x63, 0x2e, 0x76, 0x33, 0x2e, 0x47, 0x65, 0x74, 0x52, 0x6f, 0x6c, 0x65, 0x70, 0x65, - 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x1a, 0x2c, 0x2e, 0x72, 0x61, 0x66, 0x61, 0x79, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x72, 0x70, 0x63, - 0x2e, 0x76, 0x33, 0x2e, 0x47, 0x65, 0x74, 0x52, 0x6f, 0x6c, 0x65, 0x70, 0x65, 0x72, 0x6d, 0x69, - 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x20, - 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1a, 0x12, 0x18, 0x2f, 0x61, 0x75, 0x74, 0x68, 0x2f, 0x76, 0x33, - 0x2f, 0x72, 0x6f, 0x6c, 0x65, 0x70, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, - 0x12, 0x8e, 0x01, 0x0a, 0x11, 0x47, 0x65, 0x74, 0x52, 0x6f, 0x6c, 0x65, 0x70, 0x65, 0x72, 0x6d, - 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x2a, 0x2e, 0x72, 0x61, 0x66, 0x61, 0x79, 0x2e, 0x64, - 0x65, 0x76, 0x2e, 0x72, 0x70, 0x63, 0x2e, 0x76, 0x33, 0x2e, 0x47, 0x65, 0x74, 0x52, 0x6f, 0x6c, - 0x65, 0x70, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x1a, 0x27, 0x2e, 0x72, 0x61, 0x66, 0x61, 0x79, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x74, - 0x79, 0x70, 0x65, 0x73, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x2e, 0x52, 0x6f, 0x6c, - 0x65, 0x50, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x22, 0x24, 0x82, 0xd3, 0xe4, - 0x93, 0x02, 0x1e, 0x12, 0x1c, 0x2f, 0x61, 0x75, 0x74, 0x68, 0x2f, 0x76, 0x33, 0x2f, 0x72, 0x6f, - 0x6c, 0x65, 0x70, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x2f, 0x7b, 0x69, 0x64, - 0x7d, 0x42, 0xe8, 0x04, 0x0a, 0x14, 0x63, 0x6f, 0x6d, 0x2e, 0x72, 0x61, 0x66, 0x61, 0x79, 0x2e, - 0x64, 0x65, 0x76, 0x2e, 0x72, 0x70, 0x63, 0x2e, 0x76, 0x33, 0x42, 0x13, 0x52, 0x6f, 0x6c, 0x65, - 0x70, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, - 0x01, 0x5a, 0x4a, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x52, 0x61, - 0x66, 0x61, 0x79, 0x53, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x73, 0x2f, 0x72, 0x63, 0x6c, 0x6f, 0x75, - 0x64, 0x2d, 0x62, 0x61, 0x73, 0x65, 0x2f, 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, - 0x73, 0x2f, 0x75, 0x73, 0x65, 0x72, 0x6d, 0x67, 0x6d, 0x74, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x2f, 0x72, 0x70, 0x63, 0x2f, 0x76, 0x33, 0x3b, 0x72, 0x70, 0x63, 0x76, 0x33, 0xa2, 0x02, 0x03, - 0x52, 0x44, 0x52, 0xaa, 0x02, 0x10, 0x52, 0x61, 0x66, 0x61, 0x79, 0x2e, 0x44, 0x65, 0x76, 0x2e, - 0x52, 0x70, 0x63, 0x2e, 0x56, 0x33, 0xca, 0x02, 0x10, 0x52, 0x61, 0x66, 0x61, 0x79, 0x5c, 0x44, - 0x65, 0x76, 0x5c, 0x52, 0x70, 0x63, 0x5c, 0x56, 0x33, 0xe2, 0x02, 0x1c, 0x52, 0x61, 0x66, 0x61, - 0x79, 0x5c, 0x44, 0x65, 0x76, 0x5c, 0x52, 0x70, 0x63, 0x5c, 0x56, 0x33, 0x5c, 0x47, 0x50, 0x42, - 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x13, 0x52, 0x61, 0x66, 0x61, 0x79, - 0x3a, 0x3a, 0x44, 0x65, 0x76, 0x3a, 0x3a, 0x52, 0x70, 0x63, 0x3a, 0x3a, 0x56, 0x33, 0x92, 0x41, - 0xf6, 0x02, 0x12, 0x35, 0x0a, 0x21, 0x52, 0x6f, 0x6c, 0x65, 0x70, 0x65, 0x72, 0x6d, 0x69, 0x73, - 0x73, 0x69, 0x6f, 0x6e, 0x20, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x20, - 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x22, 0x0b, 0x0a, 0x09, 0x52, 0x61, 0x66, 0x61, 0x79, - 0x20, 0x44, 0x65, 0x76, 0x32, 0x03, 0x32, 0x2e, 0x30, 0x2a, 0x01, 0x02, 0x32, 0x10, 0x61, 0x70, - 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x6a, 0x73, 0x6f, 0x6e, 0x32, 0x10, - 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x79, 0x61, 0x6d, 0x6c, - 0x3a, 0x10, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x6a, 0x73, - 0x6f, 0x6e, 0x3a, 0x10, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, - 0x79, 0x61, 0x6d, 0x6c, 0x52, 0x5a, 0x0a, 0x03, 0x34, 0x30, 0x33, 0x12, 0x53, 0x0a, 0x51, 0x52, - 0x65, 0x74, 0x75, 0x72, 0x6e, 0x65, 0x64, 0x20, 0x77, 0x68, 0x65, 0x6e, 0x20, 0x74, 0x68, 0x65, - 0x20, 0x72, 0x6f, 0x6c, 0x65, 0x70, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x20, - 0x64, 0x6f, 0x65, 0x73, 0x20, 0x6e, 0x6f, 0x74, 0x20, 0x68, 0x61, 0x76, 0x65, 0x20, 0x70, 0x65, - 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x20, 0x74, 0x6f, 0x20, 0x61, 0x63, 0x63, 0x65, - 0x73, 0x73, 0x20, 0x74, 0x68, 0x65, 0x20, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x2e, - 0x52, 0x3b, 0x0a, 0x03, 0x34, 0x30, 0x34, 0x12, 0x34, 0x0a, 0x2a, 0x52, 0x65, 0x74, 0x75, 0x72, - 0x6e, 0x65, 0x64, 0x20, 0x77, 0x68, 0x65, 0x6e, 0x20, 0x74, 0x68, 0x65, 0x20, 0x72, 0x65, 0x73, - 0x6f, 0x75, 0x72, 0x63, 0x65, 0x20, 0x64, 0x6f, 0x65, 0x73, 0x20, 0x6e, 0x6f, 0x74, 0x20, 0x65, - 0x78, 0x69, 0x73, 0x74, 0x2e, 0x12, 0x06, 0x0a, 0x04, 0x9a, 0x02, 0x01, 0x07, 0x5a, 0x38, 0x0a, - 0x25, 0x0a, 0x0a, 0x41, 0x70, 0x69, 0x4b, 0x65, 0x79, 0x41, 0x75, 0x74, 0x68, 0x12, 0x17, 0x08, - 0x02, 0x1a, 0x11, 0x58, 0x2d, 0x52, 0x41, 0x46, 0x41, 0x59, 0x2d, 0x41, 0x50, 0x49, 0x2d, 0x4b, - 0x45, 0x59, 0x49, 0x44, 0x20, 0x02, 0x0a, 0x0f, 0x0a, 0x09, 0x42, 0x61, 0x73, 0x69, 0x63, 0x41, - 0x75, 0x74, 0x68, 0x12, 0x02, 0x08, 0x01, 0x62, 0x1f, 0x0a, 0x0e, 0x0a, 0x0a, 0x41, 0x70, 0x69, - 0x4b, 0x65, 0x79, 0x41, 0x75, 0x74, 0x68, 0x12, 0x00, 0x0a, 0x0d, 0x0a, 0x09, 0x42, 0x61, 0x73, - 0x69, 0x63, 0x41, 0x75, 0x74, 0x68, 0x12, 0x00, 0xc8, 0xe2, 0x1e, 0x01, 0xd0, 0xe2, 0x1e, 0x01, - 0xe0, 0xe2, 0x1e, 0x01, 0xc0, 0xe3, 0x1e, 0x01, 0xc8, 0xe3, 0x1e, 0x01, 0x62, 0x06, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x33, + 0x50, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x32, 0xe5, 0x02, 0x0a, 0x0e, 0x52, 0x6f, 0x6c, 0x65, 0x70, 0x65, 0x72, 0x6d, 0x69, + 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x90, 0x01, 0x0a, 0x12, 0x47, 0x65, 0x74, 0x52, 0x6f, 0x6c, + 0x65, 0x70, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x2b, 0x2e, 0x72, + 0x61, 0x66, 0x61, 0x79, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x72, 0x70, 0x63, 0x2e, 0x76, 0x33, 0x2e, + 0x47, 0x65, 0x74, 0x52, 0x6f, 0x6c, 0x65, 0x50, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, + 0x6e, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2b, 0x2e, 0x72, 0x61, 0x66, 0x61, + 0x79, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x75, 0x73, 0x65, 0x72, + 0x2e, 0x76, 0x33, 0x2e, 0x52, 0x6f, 0x6c, 0x65, 0x50, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, + 0x6f, 0x6e, 0x4c, 0x69, 0x73, 0x74, 0x22, 0x20, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1a, 0x12, 0x18, + 0x2f, 0x61, 0x75, 0x74, 0x68, 0x2f, 0x76, 0x33, 0x2f, 0x72, 0x6f, 0x6c, 0x65, 0x70, 0x65, 0x72, + 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0xbf, 0x01, 0x0a, 0x11, 0x47, 0x65, 0x74, + 0x52, 0x6f, 0x6c, 0x65, 0x70, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x27, + 0x2e, 0x72, 0x61, 0x66, 0x61, 0x79, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, + 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x2e, 0x52, 0x6f, 0x6c, 0x65, 0x50, 0x65, 0x72, + 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x1a, 0x27, 0x2e, 0x72, 0x61, 0x66, 0x61, 0x79, 0x2e, + 0x64, 0x65, 0x76, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x76, + 0x33, 0x2e, 0x52, 0x6f, 0x6c, 0x65, 0x50, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, + 0x22, 0x58, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x52, 0x12, 0x27, 0x2f, 0x61, 0x75, 0x74, 0x68, 0x2f, + 0x76, 0x33, 0x2f, 0x72, 0x6f, 0x6c, 0x65, 0x70, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, + 0x6e, 0x2f, 0x7b, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x6e, 0x61, 0x6d, 0x65, + 0x7d, 0x5a, 0x27, 0x12, 0x25, 0x2f, 0x61, 0x75, 0x74, 0x68, 0x2f, 0x76, 0x33, 0x2f, 0x72, 0x6f, + 0x6c, 0x65, 0x70, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x2f, 0x7b, 0x6d, 0x65, + 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x69, 0x64, 0x7d, 0x42, 0xe8, 0x04, 0x0a, 0x14, 0x63, + 0x6f, 0x6d, 0x2e, 0x72, 0x61, 0x66, 0x61, 0x79, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x72, 0x70, 0x63, + 0x2e, 0x76, 0x33, 0x42, 0x13, 0x52, 0x6f, 0x6c, 0x65, 0x70, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, + 0x69, 0x6f, 0x6e, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x4a, 0x67, 0x69, 0x74, 0x68, + 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x52, 0x61, 0x66, 0x61, 0x79, 0x53, 0x79, 0x73, 0x74, + 0x65, 0x6d, 0x73, 0x2f, 0x72, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2d, 0x62, 0x61, 0x73, 0x65, 0x2f, + 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x73, 0x2f, 0x75, 0x73, 0x65, 0x72, 0x6d, + 0x67, 0x6d, 0x74, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x72, 0x70, 0x63, 0x2f, 0x76, 0x33, + 0x3b, 0x72, 0x70, 0x63, 0x76, 0x33, 0xa2, 0x02, 0x03, 0x52, 0x44, 0x52, 0xaa, 0x02, 0x10, 0x52, + 0x61, 0x66, 0x61, 0x79, 0x2e, 0x44, 0x65, 0x76, 0x2e, 0x52, 0x70, 0x63, 0x2e, 0x56, 0x33, 0xca, + 0x02, 0x10, 0x52, 0x61, 0x66, 0x61, 0x79, 0x5c, 0x44, 0x65, 0x76, 0x5c, 0x52, 0x70, 0x63, 0x5c, + 0x56, 0x33, 0xe2, 0x02, 0x1c, 0x52, 0x61, 0x66, 0x61, 0x79, 0x5c, 0x44, 0x65, 0x76, 0x5c, 0x52, + 0x70, 0x63, 0x5c, 0x56, 0x33, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, + 0x61, 0xea, 0x02, 0x13, 0x52, 0x61, 0x66, 0x61, 0x79, 0x3a, 0x3a, 0x44, 0x65, 0x76, 0x3a, 0x3a, + 0x52, 0x70, 0x63, 0x3a, 0x3a, 0x56, 0x33, 0x92, 0x41, 0xf6, 0x02, 0x12, 0x35, 0x0a, 0x21, 0x52, + 0x6f, 0x6c, 0x65, 0x70, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x20, 0x6d, 0x61, + 0x6e, 0x61, 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x20, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, + 0x22, 0x0b, 0x0a, 0x09, 0x52, 0x61, 0x66, 0x61, 0x79, 0x20, 0x44, 0x65, 0x76, 0x32, 0x03, 0x32, + 0x2e, 0x30, 0x2a, 0x01, 0x02, 0x32, 0x10, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x2f, 0x6a, 0x73, 0x6f, 0x6e, 0x32, 0x10, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x79, 0x61, 0x6d, 0x6c, 0x3a, 0x10, 0x61, 0x70, 0x70, 0x6c, 0x69, + 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x6a, 0x73, 0x6f, 0x6e, 0x3a, 0x10, 0x61, 0x70, 0x70, + 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x79, 0x61, 0x6d, 0x6c, 0x52, 0x5a, 0x0a, + 0x03, 0x34, 0x30, 0x33, 0x12, 0x53, 0x0a, 0x51, 0x52, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x65, 0x64, + 0x20, 0x77, 0x68, 0x65, 0x6e, 0x20, 0x74, 0x68, 0x65, 0x20, 0x72, 0x6f, 0x6c, 0x65, 0x70, 0x65, + 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x20, 0x64, 0x6f, 0x65, 0x73, 0x20, 0x6e, 0x6f, + 0x74, 0x20, 0x68, 0x61, 0x76, 0x65, 0x20, 0x70, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, + 0x6e, 0x20, 0x74, 0x6f, 0x20, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x20, 0x74, 0x68, 0x65, 0x20, + 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x2e, 0x52, 0x3b, 0x0a, 0x03, 0x34, 0x30, 0x34, + 0x12, 0x34, 0x0a, 0x2a, 0x52, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x65, 0x64, 0x20, 0x77, 0x68, 0x65, + 0x6e, 0x20, 0x74, 0x68, 0x65, 0x20, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x20, 0x64, + 0x6f, 0x65, 0x73, 0x20, 0x6e, 0x6f, 0x74, 0x20, 0x65, 0x78, 0x69, 0x73, 0x74, 0x2e, 0x12, 0x06, + 0x0a, 0x04, 0x9a, 0x02, 0x01, 0x07, 0x5a, 0x38, 0x0a, 0x25, 0x0a, 0x0a, 0x41, 0x70, 0x69, 0x4b, + 0x65, 0x79, 0x41, 0x75, 0x74, 0x68, 0x12, 0x17, 0x08, 0x02, 0x1a, 0x11, 0x58, 0x2d, 0x52, 0x41, + 0x46, 0x41, 0x59, 0x2d, 0x41, 0x50, 0x49, 0x2d, 0x4b, 0x45, 0x59, 0x49, 0x44, 0x20, 0x02, 0x0a, + 0x0f, 0x0a, 0x09, 0x42, 0x61, 0x73, 0x69, 0x63, 0x41, 0x75, 0x74, 0x68, 0x12, 0x02, 0x08, 0x01, + 0x62, 0x1f, 0x0a, 0x0e, 0x0a, 0x0a, 0x41, 0x70, 0x69, 0x4b, 0x65, 0x79, 0x41, 0x75, 0x74, 0x68, + 0x12, 0x00, 0x0a, 0x0d, 0x0a, 0x09, 0x42, 0x61, 0x73, 0x69, 0x63, 0x41, 0x75, 0x74, 0x68, 0x12, + 0x00, 0xc8, 0xe2, 0x1e, 0x01, 0xd0, 0xe2, 0x1e, 0x01, 0xe0, 0xe2, 0x1e, 0x01, 0xc0, 0xe3, 0x1e, + 0x01, 0xc8, 0xe3, 0x1e, 0x01, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -263,24 +155,22 @@ func file_proto_rpc_v3_rolepermission_proto_rawDescGZIP() []byte { return file_proto_rpc_v3_rolepermission_proto_rawDescData } -var file_proto_rpc_v3_rolepermission_proto_msgTypes = make([]protoimpl.MessageInfo, 3) +var file_proto_rpc_v3_rolepermission_proto_msgTypes = make([]protoimpl.MessageInfo, 1) var file_proto_rpc_v3_rolepermission_proto_goTypes = []interface{}{ - (*GetRolepermissionsRequest)(nil), // 0: rafay.dev.rpc.v3.GetRolepermissionsRequest - (*GetRolepermissionRequest)(nil), // 1: rafay.dev.rpc.v3.GetRolepermissionRequest - (*GetRolepermissionsResponse)(nil), // 2: rafay.dev.rpc.v3.GetRolepermissionsResponse - (*v3.RolePermission)(nil), // 3: rafay.dev.types.user.v3.RolePermission + (*GetRolePermissionsRequest)(nil), // 0: rafay.dev.rpc.v3.GetRolePermissionsRequest + (*v3.RolePermission)(nil), // 1: rafay.dev.types.user.v3.RolePermission + (*v3.RolePermissionList)(nil), // 2: rafay.dev.types.user.v3.RolePermissionList } var file_proto_rpc_v3_rolepermission_proto_depIdxs = []int32{ - 3, // 0: rafay.dev.rpc.v3.GetRolepermissionsResponse.rolepermissions:type_name -> rafay.dev.types.user.v3.RolePermission - 0, // 1: rafay.dev.rpc.v3.Rolepermission.GetRolepermissions:input_type -> rafay.dev.rpc.v3.GetRolepermissionsRequest - 1, // 2: rafay.dev.rpc.v3.Rolepermission.GetRolepermission:input_type -> rafay.dev.rpc.v3.GetRolepermissionRequest - 2, // 3: rafay.dev.rpc.v3.Rolepermission.GetRolepermissions:output_type -> rafay.dev.rpc.v3.GetRolepermissionsResponse - 3, // 4: rafay.dev.rpc.v3.Rolepermission.GetRolepermission:output_type -> rafay.dev.types.user.v3.RolePermission - 3, // [3:5] is the sub-list for method output_type - 1, // [1:3] is the sub-list for method input_type - 1, // [1:1] is the sub-list for extension type_name - 1, // [1:1] is the sub-list for extension extendee - 0, // [0:1] is the sub-list for field type_name + 0, // 0: rafay.dev.rpc.v3.Rolepermission.GetRolepermissions:input_type -> rafay.dev.rpc.v3.GetRolePermissionsRequest + 1, // 1: rafay.dev.rpc.v3.Rolepermission.GetRolepermission:input_type -> rafay.dev.types.user.v3.RolePermission + 2, // 2: rafay.dev.rpc.v3.Rolepermission.GetRolepermissions:output_type -> rafay.dev.types.user.v3.RolePermissionList + 1, // 3: rafay.dev.rpc.v3.Rolepermission.GetRolepermission:output_type -> rafay.dev.types.user.v3.RolePermission + 2, // [2:4] is the sub-list for method output_type + 0, // [0:2] is the sub-list for method input_type + 0, // [0:0] is the sub-list for extension type_name + 0, // [0:0] is the sub-list for extension extendee + 0, // [0:0] is the sub-list for field type_name } func init() { file_proto_rpc_v3_rolepermission_proto_init() } @@ -290,31 +180,7 @@ func file_proto_rpc_v3_rolepermission_proto_init() { } if !protoimpl.UnsafeEnabled { file_proto_rpc_v3_rolepermission_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetRolepermissionsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_proto_rpc_v3_rolepermission_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetRolepermissionRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_proto_rpc_v3_rolepermission_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetRolepermissionsResponse); i { + switch v := v.(*GetRolePermissionsRequest); i { case 0: return &v.state case 1: @@ -332,7 +198,7 @@ func file_proto_rpc_v3_rolepermission_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_proto_rpc_v3_rolepermission_proto_rawDesc, NumEnums: 0, - NumMessages: 3, + NumMessages: 1, NumExtensions: 0, NumServices: 1, }, diff --git a/components/usermgmt/proto/rpc/v3/rolepermission.pb.gw.go b/components/usermgmt/proto/rpc/v3/rolepermission.pb.gw.go index 12b8274..0d7a701 100644 --- a/components/usermgmt/proto/rpc/v3/rolepermission.pb.gw.go +++ b/components/usermgmt/proto/rpc/v3/rolepermission.pb.gw.go @@ -13,6 +13,7 @@ import ( "io" "net/http" + "github.com/RafaySystems/rcloud-base/components/usermgmt/proto/types/userpb/v3" "github.com/grpc-ecosystem/grpc-gateway/v2/runtime" "github.com/grpc-ecosystem/grpc-gateway/v2/utilities" "google.golang.org/grpc" @@ -32,7 +33,7 @@ var _ = utilities.NewDoubleArray var _ = metadata.Join func request_Rolepermission_GetRolepermissions_0(ctx context.Context, marshaler runtime.Marshaler, client RolepermissionClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq GetRolepermissionsRequest + var protoReq GetRolePermissionsRequest var metadata runtime.ServerMetadata msg, err := client.GetRolepermissions(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) @@ -41,7 +42,7 @@ func request_Rolepermission_GetRolepermissions_0(ctx context.Context, marshaler } func local_request_Rolepermission_GetRolepermissions_0(ctx context.Context, marshaler runtime.Marshaler, server RolepermissionServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq GetRolepermissionsRequest + var protoReq GetRolePermissionsRequest var metadata runtime.ServerMetadata msg, err := server.GetRolepermissions(ctx, &protoReq) @@ -49,8 +50,12 @@ func local_request_Rolepermission_GetRolepermissions_0(ctx context.Context, mars } +var ( + filter_Rolepermission_GetRolepermission_0 = &utilities.DoubleArray{Encoding: map[string]int{"metadata": 0, "name": 1}, Base: []int{1, 1, 1, 0}, Check: []int{0, 1, 2, 3}} +) + func request_Rolepermission_GetRolepermission_0(ctx context.Context, marshaler runtime.Marshaler, client RolepermissionClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq GetRolepermissionRequest + var protoReq userv3.RolePermission var metadata runtime.ServerMetadata var ( @@ -60,14 +65,21 @@ func request_Rolepermission_GetRolepermission_0(ctx context.Context, marshaler r _ = err ) - val, ok = pathParams["id"] + val, ok = pathParams["metadata.name"] if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "id") + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "metadata.name") } - protoReq.Id, err = runtime.String(val) + err = runtime.PopulateFieldFromPath(&protoReq, "metadata.name", val) if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "id", err) + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "metadata.name", err) + } + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Rolepermission_GetRolepermission_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } msg, err := client.GetRolepermission(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) @@ -76,7 +88,7 @@ func request_Rolepermission_GetRolepermission_0(ctx context.Context, marshaler r } func local_request_Rolepermission_GetRolepermission_0(ctx context.Context, marshaler runtime.Marshaler, server RolepermissionServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq GetRolepermissionRequest + var protoReq userv3.RolePermission var metadata runtime.ServerMetadata var ( @@ -86,14 +98,91 @@ func local_request_Rolepermission_GetRolepermission_0(ctx context.Context, marsh _ = err ) - val, ok = pathParams["id"] + val, ok = pathParams["metadata.name"] if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "id") + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "metadata.name") } - protoReq.Id, err = runtime.String(val) + err = runtime.PopulateFieldFromPath(&protoReq, "metadata.name", val) if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "id", err) + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "metadata.name", err) + } + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Rolepermission_GetRolepermission_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := server.GetRolepermission(ctx, &protoReq) + return msg, metadata, err + +} + +var ( + filter_Rolepermission_GetRolepermission_1 = &utilities.DoubleArray{Encoding: map[string]int{"metadata": 0, "id": 1}, Base: []int{1, 1, 1, 0}, Check: []int{0, 1, 2, 3}} +) + +func request_Rolepermission_GetRolepermission_1(ctx context.Context, marshaler runtime.Marshaler, client RolepermissionClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq userv3.RolePermission + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["metadata.id"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "metadata.id") + } + + err = runtime.PopulateFieldFromPath(&protoReq, "metadata.id", val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "metadata.id", err) + } + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Rolepermission_GetRolepermission_1); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := client.GetRolepermission(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_Rolepermission_GetRolepermission_1(ctx context.Context, marshaler runtime.Marshaler, server RolepermissionServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq userv3.RolePermission + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["metadata.id"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "metadata.id") + } + + err = runtime.PopulateFieldFromPath(&protoReq, "metadata.id", val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "metadata.id", err) + } + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Rolepermission_GetRolepermission_1); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } msg, err := server.GetRolepermission(ctx, &protoReq) @@ -136,7 +225,7 @@ func RegisterRolepermissionHandlerServer(ctx context.Context, mux *runtime.Serve var stream runtime.ServerTransportStream ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/rafay.dev.rpc.v3.Rolepermission/GetRolepermission", runtime.WithHTTPPathPattern("/auth/v3/rolepermission/{id}")) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/rafay.dev.rpc.v3.Rolepermission/GetRolepermission", runtime.WithHTTPPathPattern("/auth/v3/rolepermission/{metadata.name}")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -153,6 +242,29 @@ func RegisterRolepermissionHandlerServer(ctx context.Context, mux *runtime.Serve }) + mux.Handle("GET", pattern_Rolepermission_GetRolepermission_1, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/rafay.dev.rpc.v3.Rolepermission/GetRolepermission", runtime.WithHTTPPathPattern("/auth/v3/rolepermission/{metadata.id}")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_Rolepermission_GetRolepermission_1(rctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Rolepermission_GetRolepermission_1(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + return nil } @@ -218,7 +330,7 @@ func RegisterRolepermissionHandlerClient(ctx context.Context, mux *runtime.Serve ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateContext(ctx, mux, req, "/rafay.dev.rpc.v3.Rolepermission/GetRolepermission", runtime.WithHTTPPathPattern("/auth/v3/rolepermission/{id}")) + rctx, err := runtime.AnnotateContext(ctx, mux, req, "/rafay.dev.rpc.v3.Rolepermission/GetRolepermission", runtime.WithHTTPPathPattern("/auth/v3/rolepermission/{metadata.name}")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -234,17 +346,41 @@ func RegisterRolepermissionHandlerClient(ctx context.Context, mux *runtime.Serve }) + mux.Handle("GET", pattern_Rolepermission_GetRolepermission_1, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateContext(ctx, mux, req, "/rafay.dev.rpc.v3.Rolepermission/GetRolepermission", runtime.WithHTTPPathPattern("/auth/v3/rolepermission/{metadata.id}")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_Rolepermission_GetRolepermission_1(rctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Rolepermission_GetRolepermission_1(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + return nil } var ( pattern_Rolepermission_GetRolepermissions_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"auth", "v3", "rolepermissions"}, "")) - pattern_Rolepermission_GetRolepermission_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3}, []string{"auth", "v3", "rolepermission", "id"}, "")) + pattern_Rolepermission_GetRolepermission_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3}, []string{"auth", "v3", "rolepermission", "metadata.name"}, "")) + + pattern_Rolepermission_GetRolepermission_1 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3}, []string{"auth", "v3", "rolepermission", "metadata.id"}, "")) ) var ( forward_Rolepermission_GetRolepermissions_0 = runtime.ForwardResponseMessage forward_Rolepermission_GetRolepermission_0 = runtime.ForwardResponseMessage + + forward_Rolepermission_GetRolepermission_1 = runtime.ForwardResponseMessage ) diff --git a/components/usermgmt/proto/rpc/v3/rolepermission.proto b/components/usermgmt/proto/rpc/v3/rolepermission.proto index 9c9ca4f..ac7382d 100644 --- a/components/usermgmt/proto/rpc/v3/rolepermission.proto +++ b/components/usermgmt/proto/rpc/v3/rolepermission.proto @@ -65,35 +65,23 @@ option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_swagger) = { } }; -message GetRolepermissionsRequest {} -message GetRolepermissionRequest { - string id = 1 - [ (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { - title : "Id", - description : "Id of the rolepermission resource" - } ]; -} -message GetRolepermissionsResponse { - repeated rafay.dev.types.user.v3.RolePermission rolepermissions = 1 - [ (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { - title : "RolePermissions", - description : "List of the rolepermission resources" - } ]; - -} +message GetRolePermissionsRequest {} service Rolepermission { - rpc GetRolepermissions(GetRolepermissionsRequest) - returns (GetRolepermissionsResponse) { + rpc GetRolepermissions(GetRolePermissionsRequest) + returns (rafay.dev.types.user.v3.RolePermissionList) { option (google.api.http) = { get : "/auth/v3/rolepermissions" }; }; - rpc GetRolepermission(GetRolepermissionRequest) + rpc GetRolepermission(rafay.dev.types.user.v3.RolePermission) returns (rafay.dev.types.user.v3.RolePermission) { option (google.api.http) = { - get : "/auth/v3/rolepermission/{id}" + get : "/auth/v3/rolepermission/{metadata.name}" + additional_bindings { + get : "/auth/v3/rolepermission/{metadata.id}" + } }; }; } \ No newline at end of file diff --git a/components/usermgmt/proto/rpc/v3/rolepermission_grpc.pb.go b/components/usermgmt/proto/rpc/v3/rolepermission_grpc.pb.go index 0f6b37d..00bc3fd 100644 --- a/components/usermgmt/proto/rpc/v3/rolepermission_grpc.pb.go +++ b/components/usermgmt/proto/rpc/v3/rolepermission_grpc.pb.go @@ -23,8 +23,8 @@ const _ = grpc.SupportPackageIsVersion7 // // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. type RolepermissionClient interface { - GetRolepermissions(ctx context.Context, in *GetRolepermissionsRequest, opts ...grpc.CallOption) (*GetRolepermissionsResponse, error) - GetRolepermission(ctx context.Context, in *GetRolepermissionRequest, opts ...grpc.CallOption) (*v3.RolePermission, error) + GetRolepermissions(ctx context.Context, in *GetRolePermissionsRequest, opts ...grpc.CallOption) (*v3.RolePermissionList, error) + GetRolepermission(ctx context.Context, in *v3.RolePermission, opts ...grpc.CallOption) (*v3.RolePermission, error) } type rolepermissionClient struct { @@ -35,8 +35,8 @@ func NewRolepermissionClient(cc grpc.ClientConnInterface) RolepermissionClient { return &rolepermissionClient{cc} } -func (c *rolepermissionClient) GetRolepermissions(ctx context.Context, in *GetRolepermissionsRequest, opts ...grpc.CallOption) (*GetRolepermissionsResponse, error) { - out := new(GetRolepermissionsResponse) +func (c *rolepermissionClient) GetRolepermissions(ctx context.Context, in *GetRolePermissionsRequest, opts ...grpc.CallOption) (*v3.RolePermissionList, error) { + out := new(v3.RolePermissionList) err := c.cc.Invoke(ctx, "/rafay.dev.rpc.v3.Rolepermission/GetRolepermissions", in, out, opts...) if err != nil { return nil, err @@ -44,7 +44,7 @@ func (c *rolepermissionClient) GetRolepermissions(ctx context.Context, in *GetRo return out, nil } -func (c *rolepermissionClient) GetRolepermission(ctx context.Context, in *GetRolepermissionRequest, opts ...grpc.CallOption) (*v3.RolePermission, error) { +func (c *rolepermissionClient) GetRolepermission(ctx context.Context, in *v3.RolePermission, opts ...grpc.CallOption) (*v3.RolePermission, error) { out := new(v3.RolePermission) err := c.cc.Invoke(ctx, "/rafay.dev.rpc.v3.Rolepermission/GetRolepermission", in, out, opts...) if err != nil { @@ -57,18 +57,18 @@ func (c *rolepermissionClient) GetRolepermission(ctx context.Context, in *GetRol // All implementations should embed UnimplementedRolepermissionServer // for forward compatibility type RolepermissionServer interface { - GetRolepermissions(context.Context, *GetRolepermissionsRequest) (*GetRolepermissionsResponse, error) - GetRolepermission(context.Context, *GetRolepermissionRequest) (*v3.RolePermission, error) + GetRolepermissions(context.Context, *GetRolePermissionsRequest) (*v3.RolePermissionList, error) + GetRolepermission(context.Context, *v3.RolePermission) (*v3.RolePermission, error) } // UnimplementedRolepermissionServer should be embedded to have forward compatible implementations. type UnimplementedRolepermissionServer struct { } -func (UnimplementedRolepermissionServer) GetRolepermissions(context.Context, *GetRolepermissionsRequest) (*GetRolepermissionsResponse, error) { +func (UnimplementedRolepermissionServer) GetRolepermissions(context.Context, *GetRolePermissionsRequest) (*v3.RolePermissionList, error) { return nil, status.Errorf(codes.Unimplemented, "method GetRolepermissions not implemented") } -func (UnimplementedRolepermissionServer) GetRolepermission(context.Context, *GetRolepermissionRequest) (*v3.RolePermission, error) { +func (UnimplementedRolepermissionServer) GetRolepermission(context.Context, *v3.RolePermission) (*v3.RolePermission, error) { return nil, status.Errorf(codes.Unimplemented, "method GetRolepermission not implemented") } @@ -84,7 +84,7 @@ func RegisterRolepermissionServer(s grpc.ServiceRegistrar, srv RolepermissionSer } func _Rolepermission_GetRolepermissions_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(GetRolepermissionsRequest) + in := new(GetRolePermissionsRequest) if err := dec(in); err != nil { return nil, err } @@ -96,13 +96,13 @@ func _Rolepermission_GetRolepermissions_Handler(srv interface{}, ctx context.Con FullMethod: "/rafay.dev.rpc.v3.Rolepermission/GetRolepermissions", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(RolepermissionServer).GetRolepermissions(ctx, req.(*GetRolepermissionsRequest)) + return srv.(RolepermissionServer).GetRolepermissions(ctx, req.(*GetRolePermissionsRequest)) } return interceptor(ctx, in, info, handler) } func _Rolepermission_GetRolepermission_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(GetRolepermissionRequest) + in := new(v3.RolePermission) if err := dec(in); err != nil { return nil, err } @@ -114,7 +114,7 @@ func _Rolepermission_GetRolepermission_Handler(srv interface{}, ctx context.Cont FullMethod: "/rafay.dev.rpc.v3.Rolepermission/GetRolepermission", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(RolepermissionServer).GetRolepermission(ctx, req.(*GetRolepermissionRequest)) + return srv.(RolepermissionServer).GetRolepermission(ctx, req.(*v3.RolePermission)) } return interceptor(ctx, in, info, handler) } diff --git a/components/usermgmt/proto/rpc/v3/user.pb.go b/components/usermgmt/proto/rpc/v3/user.pb.go index 501a31d..6481aa3 100644 --- a/components/usermgmt/proto/rpc/v3/user.pb.go +++ b/components/usermgmt/proto/rpc/v3/user.pb.go @@ -25,14 +25,14 @@ const ( ) // TODO: Add option to filter users list -type Empty struct { +type GetUsersRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields } -func (x *Empty) Reset() { - *x = Empty{} +func (x *GetUsersRequest) Reset() { + *x = GetUsersRequest{} if protoimpl.UnsafeEnabled { mi := &file_proto_rpc_v3_user_proto_msgTypes[0] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -40,13 +40,13 @@ func (x *Empty) Reset() { } } -func (x *Empty) String() string { +func (x *GetUsersRequest) String() string { return protoimpl.X.MessageStringOf(x) } -func (*Empty) ProtoMessage() {} +func (*GetUsersRequest) ProtoMessage() {} -func (x *Empty) ProtoReflect() protoreflect.Message { +func (x *GetUsersRequest) ProtoReflect() protoreflect.Message { mi := &file_proto_rpc_v3_user_proto_msgTypes[0] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -58,21 +58,19 @@ func (x *Empty) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use Empty.ProtoReflect.Descriptor instead. -func (*Empty) Descriptor() ([]byte, []int) { +// Deprecated: Use GetUsersRequest.ProtoReflect.Descriptor instead. +func (*GetUsersRequest) Descriptor() ([]byte, []int) { return file_proto_rpc_v3_user_proto_rawDescGZIP(), []int{0} } -type UserRequest struct { +type DeleteUserResponse struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - - Userid string `protobuf:"bytes,1,opt,name=userid,proto3" json:"userid,omitempty"` } -func (x *UserRequest) Reset() { - *x = UserRequest{} +func (x *DeleteUserResponse) Reset() { + *x = DeleteUserResponse{} if protoimpl.UnsafeEnabled { mi := &file_proto_rpc_v3_user_proto_msgTypes[1] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -80,13 +78,13 @@ func (x *UserRequest) Reset() { } } -func (x *UserRequest) String() string { +func (x *DeleteUserResponse) String() string { return protoimpl.X.MessageStringOf(x) } -func (*UserRequest) ProtoMessage() {} +func (*DeleteUserResponse) ProtoMessage() {} -func (x *UserRequest) ProtoReflect() protoreflect.Message { +func (x *DeleteUserResponse) ProtoReflect() protoreflect.Message { mi := &file_proto_rpc_v3_user_proto_msgTypes[1] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -98,128 +96,11 @@ func (x *UserRequest) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use UserRequest.ProtoReflect.Descriptor instead. -func (*UserRequest) Descriptor() ([]byte, []int) { +// Deprecated: Use DeleteUserResponse.ProtoReflect.Descriptor instead. +func (*DeleteUserResponse) Descriptor() ([]byte, []int) { return file_proto_rpc_v3_user_proto_rawDescGZIP(), []int{1} } -func (x *UserRequest) GetUserid() string { - if x != nil { - return x.Userid - } - return "" -} - -type PutUserRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Userid string `protobuf:"bytes,1,opt,name=userid,proto3" json:"userid,omitempty"` - User *v3.User `protobuf:"bytes,2,opt,name=user,proto3" json:"user,omitempty"` -} - -func (x *PutUserRequest) Reset() { - *x = PutUserRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_proto_rpc_v3_user_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *PutUserRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*PutUserRequest) ProtoMessage() {} - -func (x *PutUserRequest) ProtoReflect() protoreflect.Message { - mi := &file_proto_rpc_v3_user_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use PutUserRequest.ProtoReflect.Descriptor instead. -func (*PutUserRequest) Descriptor() ([]byte, []int) { - return file_proto_rpc_v3_user_proto_rawDescGZIP(), []int{2} -} - -func (x *PutUserRequest) GetUserid() string { - if x != nil { - return x.Userid - } - return "" -} - -func (x *PutUserRequest) GetUser() *v3.User { - if x != nil { - return x.User - } - return nil -} - -type UserResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Status string `protobuf:"bytes,1,opt,name=status,proto3" json:"status,omitempty"` - Message string `protobuf:"bytes,2,opt,name=message,proto3" json:"message,omitempty"` -} - -func (x *UserResponse) Reset() { - *x = UserResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_proto_rpc_v3_user_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *UserResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*UserResponse) ProtoMessage() {} - -func (x *UserResponse) ProtoReflect() protoreflect.Message { - mi := &file_proto_rpc_v3_user_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use UserResponse.ProtoReflect.Descriptor instead. -func (*UserResponse) Descriptor() ([]byte, []int) { - return file_proto_rpc_v3_user_proto_rawDescGZIP(), []int{3} -} - -func (x *UserResponse) GetStatus() string { - if x != nil { - return x.Status - } - return "" -} - -func (x *UserResponse) GetMessage() string { - if x != nil { - return x.Message - } - return "" -} - var File_proto_rpc_v3_user_proto protoreflect.FileDescriptor var file_proto_rpc_v3_user_proto_rawDesc = []byte{ @@ -234,94 +115,95 @@ var file_proto_rpc_v3_user_proto_rawDesc = []byte{ 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x20, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2f, 0x75, 0x73, 0x65, 0x72, 0x70, 0x62, 0x2f, 0x76, 0x33, 0x2f, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x22, 0x07, 0x0a, 0x05, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x25, 0x0a, 0x0b, 0x55, 0x73, - 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x75, 0x73, 0x65, - 0x72, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x75, 0x73, 0x65, 0x72, 0x69, - 0x64, 0x22, 0x5b, 0x0a, 0x0e, 0x50, 0x75, 0x74, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x75, 0x73, 0x65, 0x72, 0x69, 0x64, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x06, 0x75, 0x73, 0x65, 0x72, 0x69, 0x64, 0x12, 0x31, 0x0a, 0x04, 0x75, - 0x73, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x72, 0x61, 0x66, 0x61, + 0x6f, 0x22, 0x11, 0x0a, 0x0f, 0x47, 0x65, 0x74, 0x55, 0x73, 0x65, 0x72, 0x73, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x22, 0x14, 0x0a, 0x12, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x55, 0x73, + 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x32, 0x8d, 0x06, 0x0a, 0x04, 0x55, + 0x73, 0x65, 0x72, 0x12, 0x9e, 0x01, 0x0a, 0x0a, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x55, 0x73, + 0x65, 0x72, 0x12, 0x1d, 0x2e, 0x72, 0x61, 0x66, 0x61, 0x79, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x74, + 0x79, 0x70, 0x65, 0x73, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x2e, 0x55, 0x73, 0x65, + 0x72, 0x1a, 0x1d, 0x2e, 0x72, 0x61, 0x66, 0x61, 0x79, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x74, 0x79, + 0x70, 0x65, 0x73, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x2e, 0x55, 0x73, 0x65, 0x72, + 0x22, 0x52, 0x92, 0x41, 0x36, 0x4a, 0x34, 0x0a, 0x03, 0x32, 0x30, 0x31, 0x12, 0x2d, 0x0a, 0x2b, + 0x52, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x65, 0x64, 0x20, 0x77, 0x68, 0x65, 0x6e, 0x20, 0x75, 0x73, + 0x65, 0x72, 0x20, 0x69, 0x73, 0x20, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x20, 0x73, 0x75, + 0x63, 0x63, 0x65, 0x73, 0x73, 0x66, 0x75, 0x6c, 0x6c, 0x79, 0x2e, 0x82, 0xd3, 0xe4, 0x93, 0x02, + 0x13, 0x22, 0x0e, 0x2f, 0x61, 0x75, 0x74, 0x68, 0x2f, 0x76, 0x33, 0x2f, 0x75, 0x73, 0x65, 0x72, + 0x73, 0x3a, 0x01, 0x2a, 0x12, 0x68, 0x0a, 0x08, 0x47, 0x65, 0x74, 0x55, 0x73, 0x65, 0x72, 0x73, + 0x12, 0x21, 0x2e, 0x72, 0x61, 0x66, 0x61, 0x79, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x72, 0x70, 0x63, + 0x2e, 0x76, 0x33, 0x2e, 0x47, 0x65, 0x74, 0x55, 0x73, 0x65, 0x72, 0x73, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x1a, 0x21, 0x2e, 0x72, 0x61, 0x66, 0x61, 0x79, 0x2e, 0x64, 0x65, 0x76, 0x2e, + 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x2e, 0x55, 0x73, + 0x65, 0x72, 0x4c, 0x69, 0x73, 0x74, 0x22, 0x16, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x10, 0x12, 0x0e, + 0x2f, 0x61, 0x75, 0x74, 0x68, 0x2f, 0x76, 0x33, 0x2f, 0x75, 0x73, 0x65, 0x72, 0x73, 0x12, 0x8d, + 0x01, 0x0a, 0x07, 0x47, 0x65, 0x74, 0x55, 0x73, 0x65, 0x72, 0x12, 0x1d, 0x2e, 0x72, 0x61, 0x66, + 0x61, 0x79, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x75, 0x73, 0x65, + 0x72, 0x2e, 0x76, 0x33, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x1a, 0x1d, 0x2e, 0x72, 0x61, 0x66, 0x61, 0x79, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x75, 0x73, 0x65, 0x72, - 0x2e, 0x76, 0x33, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x52, 0x04, 0x75, 0x73, 0x65, 0x72, 0x22, 0x40, - 0x0a, 0x0c, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x16, - 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, - 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x18, 0x0a, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, - 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, - 0x32, 0xd3, 0x04, 0x0a, 0x04, 0x55, 0x73, 0x65, 0x72, 0x12, 0x9e, 0x01, 0x0a, 0x0a, 0x43, 0x72, - 0x65, 0x61, 0x74, 0x65, 0x55, 0x73, 0x65, 0x72, 0x12, 0x1d, 0x2e, 0x72, 0x61, 0x66, 0x61, 0x79, - 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, - 0x76, 0x33, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x1a, 0x1d, 0x2e, 0x72, 0x61, 0x66, 0x61, 0x79, 0x2e, - 0x64, 0x65, 0x76, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x76, - 0x33, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x22, 0x52, 0x92, 0x41, 0x36, 0x4a, 0x34, 0x0a, 0x03, 0x32, - 0x30, 0x31, 0x12, 0x2d, 0x0a, 0x2b, 0x52, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x65, 0x64, 0x20, 0x77, - 0x68, 0x65, 0x6e, 0x20, 0x75, 0x73, 0x65, 0x72, 0x20, 0x69, 0x73, 0x20, 0x63, 0x72, 0x65, 0x61, - 0x74, 0x65, 0x64, 0x20, 0x73, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x66, 0x75, 0x6c, 0x6c, 0x79, - 0x2e, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x13, 0x22, 0x0e, 0x2f, 0x61, 0x75, 0x74, 0x68, 0x2f, 0x76, - 0x33, 0x2f, 0x75, 0x73, 0x65, 0x72, 0x73, 0x3a, 0x01, 0x2a, 0x12, 0x5e, 0x0a, 0x08, 0x47, 0x65, - 0x74, 0x55, 0x73, 0x65, 0x72, 0x73, 0x12, 0x17, 0x2e, 0x72, 0x61, 0x66, 0x61, 0x79, 0x2e, 0x64, - 0x65, 0x76, 0x2e, 0x72, 0x70, 0x63, 0x2e, 0x76, 0x33, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x1a, - 0x21, 0x2e, 0x72, 0x61, 0x66, 0x61, 0x79, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x74, 0x79, 0x70, 0x65, - 0x73, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x4c, 0x69, - 0x73, 0x74, 0x22, 0x16, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x10, 0x12, 0x0e, 0x2f, 0x61, 0x75, 0x74, - 0x68, 0x2f, 0x76, 0x33, 0x2f, 0x75, 0x73, 0x65, 0x72, 0x73, 0x12, 0x67, 0x0a, 0x07, 0x47, 0x65, - 0x74, 0x55, 0x73, 0x65, 0x72, 0x12, 0x1d, 0x2e, 0x72, 0x61, 0x66, 0x61, 0x79, 0x2e, 0x64, 0x65, - 0x76, 0x2e, 0x72, 0x70, 0x63, 0x2e, 0x76, 0x33, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1d, 0x2e, 0x72, 0x61, 0x66, 0x61, 0x79, 0x2e, 0x64, 0x65, 0x76, - 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x2e, 0x55, - 0x73, 0x65, 0x72, 0x22, 0x1e, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x18, 0x12, 0x16, 0x2f, 0x61, 0x75, - 0x74, 0x68, 0x2f, 0x76, 0x33, 0x2f, 0x75, 0x73, 0x65, 0x72, 0x2f, 0x7b, 0x75, 0x73, 0x65, 0x72, - 0x69, 0x64, 0x7d, 0x12, 0x74, 0x0a, 0x0a, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x55, 0x73, 0x65, - 0x72, 0x12, 0x20, 0x2e, 0x72, 0x61, 0x66, 0x61, 0x79, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x72, 0x70, - 0x63, 0x2e, 0x76, 0x33, 0x2e, 0x50, 0x75, 0x74, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x1a, 0x1e, 0x2e, 0x72, 0x61, 0x66, 0x61, 0x79, 0x2e, 0x64, 0x65, 0x76, 0x2e, - 0x72, 0x70, 0x63, 0x2e, 0x76, 0x33, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x22, 0x24, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1e, 0x1a, 0x16, 0x2f, 0x61, 0x75, - 0x74, 0x68, 0x2f, 0x76, 0x33, 0x2f, 0x75, 0x73, 0x65, 0x72, 0x2f, 0x7b, 0x75, 0x73, 0x65, 0x72, - 0x69, 0x64, 0x7d, 0x3a, 0x04, 0x75, 0x73, 0x65, 0x72, 0x12, 0x6b, 0x0a, 0x0a, 0x44, 0x65, 0x6c, - 0x65, 0x74, 0x65, 0x55, 0x73, 0x65, 0x72, 0x12, 0x1d, 0x2e, 0x72, 0x61, 0x66, 0x61, 0x79, 0x2e, - 0x64, 0x65, 0x76, 0x2e, 0x72, 0x70, 0x63, 0x2e, 0x76, 0x33, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1e, 0x2e, 0x72, 0x61, 0x66, 0x61, 0x79, 0x2e, 0x64, - 0x65, 0x76, 0x2e, 0x72, 0x70, 0x63, 0x2e, 0x76, 0x33, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x1e, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x18, 0x2a, 0x16, - 0x2f, 0x61, 0x75, 0x74, 0x68, 0x2f, 0x76, 0x33, 0x2f, 0x75, 0x73, 0x65, 0x72, 0x2f, 0x7b, 0x75, - 0x73, 0x65, 0x72, 0x69, 0x64, 0x7d, 0x42, 0xca, 0x04, 0x0a, 0x14, 0x63, 0x6f, 0x6d, 0x2e, 0x72, - 0x61, 0x66, 0x61, 0x79, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x72, 0x70, 0x63, 0x2e, 0x76, 0x33, 0x42, - 0x09, 0x55, 0x73, 0x65, 0x72, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x4a, 0x67, 0x69, - 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x52, 0x61, 0x66, 0x61, 0x79, 0x53, 0x79, - 0x73, 0x74, 0x65, 0x6d, 0x73, 0x2f, 0x72, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2d, 0x62, 0x61, 0x73, - 0x65, 0x2f, 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x73, 0x2f, 0x75, 0x73, 0x65, - 0x72, 0x6d, 0x67, 0x6d, 0x74, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x72, 0x70, 0x63, 0x2f, - 0x76, 0x33, 0x3b, 0x72, 0x70, 0x63, 0x76, 0x33, 0xa2, 0x02, 0x03, 0x52, 0x44, 0x52, 0xaa, 0x02, - 0x10, 0x52, 0x61, 0x66, 0x61, 0x79, 0x2e, 0x44, 0x65, 0x76, 0x2e, 0x52, 0x70, 0x63, 0x2e, 0x56, - 0x33, 0xca, 0x02, 0x10, 0x52, 0x61, 0x66, 0x61, 0x79, 0x5c, 0x44, 0x65, 0x76, 0x5c, 0x52, 0x70, - 0x63, 0x5c, 0x56, 0x33, 0xe2, 0x02, 0x1c, 0x52, 0x61, 0x66, 0x61, 0x79, 0x5c, 0x44, 0x65, 0x76, - 0x5c, 0x52, 0x70, 0x63, 0x5c, 0x56, 0x33, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, - 0x61, 0x74, 0x61, 0xea, 0x02, 0x13, 0x52, 0x61, 0x66, 0x61, 0x79, 0x3a, 0x3a, 0x44, 0x65, 0x76, - 0x3a, 0x3a, 0x52, 0x70, 0x63, 0x3a, 0x3a, 0x56, 0x33, 0x92, 0x41, 0xe2, 0x02, 0x12, 0x2b, 0x0a, - 0x17, 0x55, 0x73, 0x65, 0x72, 0x20, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, - 0x20, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x22, 0x0b, 0x0a, 0x09, 0x52, 0x61, 0x66, 0x61, - 0x79, 0x20, 0x44, 0x65, 0x76, 0x32, 0x03, 0x32, 0x2e, 0x30, 0x2a, 0x01, 0x02, 0x32, 0x10, 0x61, - 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x6a, 0x73, 0x6f, 0x6e, 0x32, - 0x10, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x79, 0x61, 0x6d, - 0x6c, 0x3a, 0x10, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x6a, - 0x73, 0x6f, 0x6e, 0x3a, 0x10, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x2f, 0x79, 0x61, 0x6d, 0x6c, 0x52, 0x50, 0x0a, 0x03, 0x34, 0x30, 0x33, 0x12, 0x49, 0x0a, 0x47, - 0x52, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x65, 0x64, 0x20, 0x77, 0x68, 0x65, 0x6e, 0x20, 0x74, 0x68, - 0x65, 0x20, 0x75, 0x73, 0x65, 0x72, 0x20, 0x64, 0x6f, 0x65, 0x73, 0x20, 0x6e, 0x6f, 0x74, 0x20, - 0x68, 0x61, 0x76, 0x65, 0x20, 0x70, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x20, - 0x74, 0x6f, 0x20, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x20, 0x74, 0x68, 0x65, 0x20, 0x72, 0x65, - 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x2e, 0x52, 0x3b, 0x0a, 0x03, 0x34, 0x30, 0x34, 0x12, 0x34, - 0x0a, 0x2a, 0x52, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x65, 0x64, 0x20, 0x77, 0x68, 0x65, 0x6e, 0x20, - 0x74, 0x68, 0x65, 0x20, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x20, 0x64, 0x6f, 0x65, - 0x73, 0x20, 0x6e, 0x6f, 0x74, 0x20, 0x65, 0x78, 0x69, 0x73, 0x74, 0x2e, 0x12, 0x06, 0x0a, 0x04, - 0x9a, 0x02, 0x01, 0x07, 0x5a, 0x38, 0x0a, 0x25, 0x0a, 0x0a, 0x41, 0x70, 0x69, 0x4b, 0x65, 0x79, - 0x41, 0x75, 0x74, 0x68, 0x12, 0x17, 0x08, 0x02, 0x1a, 0x11, 0x58, 0x2d, 0x52, 0x41, 0x46, 0x41, - 0x59, 0x2d, 0x41, 0x50, 0x49, 0x2d, 0x4b, 0x45, 0x59, 0x49, 0x44, 0x20, 0x02, 0x0a, 0x0f, 0x0a, - 0x09, 0x42, 0x61, 0x73, 0x69, 0x63, 0x41, 0x75, 0x74, 0x68, 0x12, 0x02, 0x08, 0x01, 0x62, 0x1f, - 0x0a, 0x0e, 0x0a, 0x0a, 0x41, 0x70, 0x69, 0x4b, 0x65, 0x79, 0x41, 0x75, 0x74, 0x68, 0x12, 0x00, - 0x0a, 0x0d, 0x0a, 0x09, 0x42, 0x61, 0x73, 0x69, 0x63, 0x41, 0x75, 0x74, 0x68, 0x12, 0x00, 0xc8, - 0xe2, 0x1e, 0x01, 0xd0, 0xe2, 0x1e, 0x01, 0xe0, 0xe2, 0x1e, 0x01, 0xc0, 0xe3, 0x1e, 0x01, 0xc8, - 0xe3, 0x1e, 0x01, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x2e, 0x76, 0x33, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x22, 0x44, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x3e, + 0x12, 0x1d, 0x2f, 0x61, 0x75, 0x74, 0x68, 0x2f, 0x76, 0x33, 0x2f, 0x75, 0x73, 0x65, 0x72, 0x2f, + 0x7b, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x6e, 0x61, 0x6d, 0x65, 0x7d, 0x5a, + 0x1d, 0x12, 0x1b, 0x2f, 0x61, 0x75, 0x74, 0x68, 0x2f, 0x76, 0x33, 0x2f, 0x75, 0x73, 0x65, 0x72, + 0x2f, 0x7b, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x69, 0x64, 0x7d, 0x12, 0x96, + 0x01, 0x0a, 0x0a, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x55, 0x73, 0x65, 0x72, 0x12, 0x1d, 0x2e, + 0x72, 0x61, 0x66, 0x61, 0x79, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, + 0x75, 0x73, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x1a, 0x1d, 0x2e, 0x72, + 0x61, 0x66, 0x61, 0x79, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x75, + 0x73, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x22, 0x4a, 0x82, 0xd3, 0xe4, + 0x93, 0x02, 0x44, 0x1a, 0x1d, 0x2f, 0x61, 0x75, 0x74, 0x68, 0x2f, 0x76, 0x33, 0x2f, 0x75, 0x73, + 0x65, 0x72, 0x2f, 0x7b, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x6e, 0x61, 0x6d, + 0x65, 0x7d, 0x3a, 0x01, 0x2a, 0x5a, 0x20, 0x1a, 0x1b, 0x2f, 0x61, 0x75, 0x74, 0x68, 0x2f, 0x76, + 0x33, 0x2f, 0x75, 0x73, 0x65, 0x72, 0x2f, 0x7b, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, + 0x2e, 0x69, 0x64, 0x7d, 0x3a, 0x01, 0x2a, 0x12, 0xd0, 0x01, 0x0a, 0x0a, 0x44, 0x65, 0x6c, 0x65, + 0x74, 0x65, 0x55, 0x73, 0x65, 0x72, 0x12, 0x1d, 0x2e, 0x72, 0x61, 0x66, 0x61, 0x79, 0x2e, 0x64, + 0x65, 0x76, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x76, 0x33, + 0x2e, 0x55, 0x73, 0x65, 0x72, 0x1a, 0x24, 0x2e, 0x72, 0x61, 0x66, 0x61, 0x79, 0x2e, 0x64, 0x65, + 0x76, 0x2e, 0x72, 0x70, 0x63, 0x2e, 0x76, 0x33, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x55, + 0x73, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x7d, 0x92, 0x41, 0x36, + 0x4a, 0x34, 0x0a, 0x03, 0x32, 0x30, 0x34, 0x12, 0x2d, 0x0a, 0x2b, 0x52, 0x65, 0x74, 0x75, 0x72, + 0x6e, 0x65, 0x64, 0x20, 0x77, 0x68, 0x65, 0x6e, 0x20, 0x75, 0x73, 0x65, 0x72, 0x20, 0x69, 0x73, + 0x20, 0x64, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x64, 0x20, 0x73, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, + 0x66, 0x75, 0x6c, 0x6c, 0x79, 0x2e, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x3e, 0x2a, 0x1d, 0x2f, 0x61, + 0x75, 0x74, 0x68, 0x2f, 0x76, 0x33, 0x2f, 0x75, 0x73, 0x65, 0x72, 0x2f, 0x7b, 0x6d, 0x65, 0x74, + 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x6e, 0x61, 0x6d, 0x65, 0x7d, 0x5a, 0x1d, 0x2a, 0x1b, 0x2f, + 0x61, 0x75, 0x74, 0x68, 0x2f, 0x76, 0x33, 0x2f, 0x75, 0x73, 0x65, 0x72, 0x2f, 0x7b, 0x6d, 0x65, + 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x69, 0x64, 0x7d, 0x42, 0xca, 0x04, 0x0a, 0x14, 0x63, + 0x6f, 0x6d, 0x2e, 0x72, 0x61, 0x66, 0x61, 0x79, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x72, 0x70, 0x63, + 0x2e, 0x76, 0x33, 0x42, 0x09, 0x55, 0x73, 0x65, 0x72, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, + 0x5a, 0x4a, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x52, 0x61, 0x66, + 0x61, 0x79, 0x53, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x73, 0x2f, 0x72, 0x63, 0x6c, 0x6f, 0x75, 0x64, + 0x2d, 0x62, 0x61, 0x73, 0x65, 0x2f, 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x73, + 0x2f, 0x75, 0x73, 0x65, 0x72, 0x6d, 0x67, 0x6d, 0x74, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, + 0x72, 0x70, 0x63, 0x2f, 0x76, 0x33, 0x3b, 0x72, 0x70, 0x63, 0x76, 0x33, 0xa2, 0x02, 0x03, 0x52, + 0x44, 0x52, 0xaa, 0x02, 0x10, 0x52, 0x61, 0x66, 0x61, 0x79, 0x2e, 0x44, 0x65, 0x76, 0x2e, 0x52, + 0x70, 0x63, 0x2e, 0x56, 0x33, 0xca, 0x02, 0x10, 0x52, 0x61, 0x66, 0x61, 0x79, 0x5c, 0x44, 0x65, + 0x76, 0x5c, 0x52, 0x70, 0x63, 0x5c, 0x56, 0x33, 0xe2, 0x02, 0x1c, 0x52, 0x61, 0x66, 0x61, 0x79, + 0x5c, 0x44, 0x65, 0x76, 0x5c, 0x52, 0x70, 0x63, 0x5c, 0x56, 0x33, 0x5c, 0x47, 0x50, 0x42, 0x4d, + 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x13, 0x52, 0x61, 0x66, 0x61, 0x79, 0x3a, + 0x3a, 0x44, 0x65, 0x76, 0x3a, 0x3a, 0x52, 0x70, 0x63, 0x3a, 0x3a, 0x56, 0x33, 0x92, 0x41, 0xe2, + 0x02, 0x12, 0x2b, 0x0a, 0x17, 0x55, 0x73, 0x65, 0x72, 0x20, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, + 0x6d, 0x65, 0x6e, 0x74, 0x20, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x22, 0x0b, 0x0a, 0x09, + 0x52, 0x61, 0x66, 0x61, 0x79, 0x20, 0x44, 0x65, 0x76, 0x32, 0x03, 0x32, 0x2e, 0x30, 0x2a, 0x01, + 0x02, 0x32, 0x10, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x6a, + 0x73, 0x6f, 0x6e, 0x32, 0x10, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x2f, 0x79, 0x61, 0x6d, 0x6c, 0x3a, 0x10, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x2f, 0x6a, 0x73, 0x6f, 0x6e, 0x3a, 0x10, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x79, 0x61, 0x6d, 0x6c, 0x52, 0x50, 0x0a, 0x03, 0x34, 0x30, 0x33, + 0x12, 0x49, 0x0a, 0x47, 0x52, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x65, 0x64, 0x20, 0x77, 0x68, 0x65, + 0x6e, 0x20, 0x74, 0x68, 0x65, 0x20, 0x75, 0x73, 0x65, 0x72, 0x20, 0x64, 0x6f, 0x65, 0x73, 0x20, + 0x6e, 0x6f, 0x74, 0x20, 0x68, 0x61, 0x76, 0x65, 0x20, 0x70, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, + 0x69, 0x6f, 0x6e, 0x20, 0x74, 0x6f, 0x20, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x20, 0x74, 0x68, + 0x65, 0x20, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x2e, 0x52, 0x3b, 0x0a, 0x03, 0x34, + 0x30, 0x34, 0x12, 0x34, 0x0a, 0x2a, 0x52, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x65, 0x64, 0x20, 0x77, + 0x68, 0x65, 0x6e, 0x20, 0x74, 0x68, 0x65, 0x20, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, + 0x20, 0x64, 0x6f, 0x65, 0x73, 0x20, 0x6e, 0x6f, 0x74, 0x20, 0x65, 0x78, 0x69, 0x73, 0x74, 0x2e, + 0x12, 0x06, 0x0a, 0x04, 0x9a, 0x02, 0x01, 0x07, 0x5a, 0x38, 0x0a, 0x25, 0x0a, 0x0a, 0x41, 0x70, + 0x69, 0x4b, 0x65, 0x79, 0x41, 0x75, 0x74, 0x68, 0x12, 0x17, 0x08, 0x02, 0x1a, 0x11, 0x58, 0x2d, + 0x52, 0x41, 0x46, 0x41, 0x59, 0x2d, 0x41, 0x50, 0x49, 0x2d, 0x4b, 0x45, 0x59, 0x49, 0x44, 0x20, + 0x02, 0x0a, 0x0f, 0x0a, 0x09, 0x42, 0x61, 0x73, 0x69, 0x63, 0x41, 0x75, 0x74, 0x68, 0x12, 0x02, + 0x08, 0x01, 0x62, 0x1f, 0x0a, 0x0e, 0x0a, 0x0a, 0x41, 0x70, 0x69, 0x4b, 0x65, 0x79, 0x41, 0x75, + 0x74, 0x68, 0x12, 0x00, 0x0a, 0x0d, 0x0a, 0x09, 0x42, 0x61, 0x73, 0x69, 0x63, 0x41, 0x75, 0x74, + 0x68, 0x12, 0x00, 0xc8, 0xe2, 0x1e, 0x01, 0xd0, 0xe2, 0x1e, 0x01, 0xe0, 0xe2, 0x1e, 0x01, 0xc0, + 0xe3, 0x1e, 0x01, 0xc8, 0xe3, 0x1e, 0x01, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -336,32 +218,29 @@ func file_proto_rpc_v3_user_proto_rawDescGZIP() []byte { return file_proto_rpc_v3_user_proto_rawDescData } -var file_proto_rpc_v3_user_proto_msgTypes = make([]protoimpl.MessageInfo, 4) +var file_proto_rpc_v3_user_proto_msgTypes = make([]protoimpl.MessageInfo, 2) var file_proto_rpc_v3_user_proto_goTypes = []interface{}{ - (*Empty)(nil), // 0: rafay.dev.rpc.v3.Empty - (*UserRequest)(nil), // 1: rafay.dev.rpc.v3.UserRequest - (*PutUserRequest)(nil), // 2: rafay.dev.rpc.v3.PutUserRequest - (*UserResponse)(nil), // 3: rafay.dev.rpc.v3.UserResponse - (*v3.User)(nil), // 4: rafay.dev.types.user.v3.User - (*v3.UserList)(nil), // 5: rafay.dev.types.user.v3.UserList + (*GetUsersRequest)(nil), // 0: rafay.dev.rpc.v3.GetUsersRequest + (*DeleteUserResponse)(nil), // 1: rafay.dev.rpc.v3.DeleteUserResponse + (*v3.User)(nil), // 2: rafay.dev.types.user.v3.User + (*v3.UserList)(nil), // 3: rafay.dev.types.user.v3.UserList } var file_proto_rpc_v3_user_proto_depIdxs = []int32{ - 4, // 0: rafay.dev.rpc.v3.PutUserRequest.user:type_name -> rafay.dev.types.user.v3.User - 4, // 1: rafay.dev.rpc.v3.User.CreateUser:input_type -> rafay.dev.types.user.v3.User - 0, // 2: rafay.dev.rpc.v3.User.GetUsers:input_type -> rafay.dev.rpc.v3.Empty - 1, // 3: rafay.dev.rpc.v3.User.GetUser:input_type -> rafay.dev.rpc.v3.UserRequest - 2, // 4: rafay.dev.rpc.v3.User.UpdateUser:input_type -> rafay.dev.rpc.v3.PutUserRequest - 1, // 5: rafay.dev.rpc.v3.User.DeleteUser:input_type -> rafay.dev.rpc.v3.UserRequest - 4, // 6: rafay.dev.rpc.v3.User.CreateUser:output_type -> rafay.dev.types.user.v3.User - 5, // 7: rafay.dev.rpc.v3.User.GetUsers:output_type -> rafay.dev.types.user.v3.UserList - 4, // 8: rafay.dev.rpc.v3.User.GetUser:output_type -> rafay.dev.types.user.v3.User - 3, // 9: rafay.dev.rpc.v3.User.UpdateUser:output_type -> rafay.dev.rpc.v3.UserResponse - 3, // 10: rafay.dev.rpc.v3.User.DeleteUser:output_type -> rafay.dev.rpc.v3.UserResponse - 6, // [6:11] is the sub-list for method output_type - 1, // [1:6] is the sub-list for method input_type - 1, // [1:1] is the sub-list for extension type_name - 1, // [1:1] is the sub-list for extension extendee - 0, // [0:1] is the sub-list for field type_name + 2, // 0: rafay.dev.rpc.v3.User.CreateUser:input_type -> rafay.dev.types.user.v3.User + 0, // 1: rafay.dev.rpc.v3.User.GetUsers:input_type -> rafay.dev.rpc.v3.GetUsersRequest + 2, // 2: rafay.dev.rpc.v3.User.GetUser:input_type -> rafay.dev.types.user.v3.User + 2, // 3: rafay.dev.rpc.v3.User.UpdateUser:input_type -> rafay.dev.types.user.v3.User + 2, // 4: rafay.dev.rpc.v3.User.DeleteUser:input_type -> rafay.dev.types.user.v3.User + 2, // 5: rafay.dev.rpc.v3.User.CreateUser:output_type -> rafay.dev.types.user.v3.User + 3, // 6: rafay.dev.rpc.v3.User.GetUsers:output_type -> rafay.dev.types.user.v3.UserList + 2, // 7: rafay.dev.rpc.v3.User.GetUser:output_type -> rafay.dev.types.user.v3.User + 2, // 8: rafay.dev.rpc.v3.User.UpdateUser:output_type -> rafay.dev.types.user.v3.User + 1, // 9: rafay.dev.rpc.v3.User.DeleteUser:output_type -> rafay.dev.rpc.v3.DeleteUserResponse + 5, // [5:10] is the sub-list for method output_type + 0, // [0:5] is the sub-list for method input_type + 0, // [0:0] is the sub-list for extension type_name + 0, // [0:0] is the sub-list for extension extendee + 0, // [0:0] is the sub-list for field type_name } func init() { file_proto_rpc_v3_user_proto_init() } @@ -371,7 +250,7 @@ func file_proto_rpc_v3_user_proto_init() { } if !protoimpl.UnsafeEnabled { file_proto_rpc_v3_user_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Empty); i { + switch v := v.(*GetUsersRequest); i { case 0: return &v.state case 1: @@ -383,31 +262,7 @@ func file_proto_rpc_v3_user_proto_init() { } } file_proto_rpc_v3_user_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*UserRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_proto_rpc_v3_user_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*PutUserRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_proto_rpc_v3_user_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*UserResponse); i { + switch v := v.(*DeleteUserResponse); i { case 0: return &v.state case 1: @@ -425,7 +280,7 @@ func file_proto_rpc_v3_user_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_proto_rpc_v3_user_proto_rawDesc, NumEnums: 0, - NumMessages: 4, + NumMessages: 2, NumExtensions: 0, NumServices: 1, }, diff --git a/components/usermgmt/proto/rpc/v3/user.pb.gw.go b/components/usermgmt/proto/rpc/v3/user.pb.gw.go index 3c62298..2573f60 100644 --- a/components/usermgmt/proto/rpc/v3/user.pb.gw.go +++ b/components/usermgmt/proto/rpc/v3/user.pb.gw.go @@ -67,7 +67,7 @@ func local_request_User_CreateUser_0(ctx context.Context, marshaler runtime.Mars } func request_User_GetUsers_0(ctx context.Context, marshaler runtime.Marshaler, client UserClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq Empty + var protoReq GetUsersRequest var metadata runtime.ServerMetadata msg, err := client.GetUsers(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) @@ -76,7 +76,7 @@ func request_User_GetUsers_0(ctx context.Context, marshaler runtime.Marshaler, c } func local_request_User_GetUsers_0(ctx context.Context, marshaler runtime.Marshaler, server UserServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq Empty + var protoReq GetUsersRequest var metadata runtime.ServerMetadata msg, err := server.GetUsers(ctx, &protoReq) @@ -84,8 +84,12 @@ func local_request_User_GetUsers_0(ctx context.Context, marshaler runtime.Marsha } +var ( + filter_User_GetUser_0 = &utilities.DoubleArray{Encoding: map[string]int{"metadata": 0, "name": 1}, Base: []int{1, 1, 1, 0}, Check: []int{0, 1, 2, 3}} +) + func request_User_GetUser_0(ctx context.Context, marshaler runtime.Marshaler, client UserClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq UserRequest + var protoReq userv3.User var metadata runtime.ServerMetadata var ( @@ -95,14 +99,21 @@ func request_User_GetUser_0(ctx context.Context, marshaler runtime.Marshaler, cl _ = err ) - val, ok = pathParams["userid"] + val, ok = pathParams["metadata.name"] if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "userid") + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "metadata.name") } - protoReq.Userid, err = runtime.String(val) + err = runtime.PopulateFieldFromPath(&protoReq, "metadata.name", val) if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "userid", err) + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "metadata.name", err) + } + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_User_GetUser_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } msg, err := client.GetUser(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) @@ -111,7 +122,7 @@ func request_User_GetUser_0(ctx context.Context, marshaler runtime.Marshaler, cl } func local_request_User_GetUser_0(ctx context.Context, marshaler runtime.Marshaler, server UserServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq UserRequest + var protoReq userv3.User var metadata runtime.ServerMetadata var ( @@ -121,14 +132,91 @@ func local_request_User_GetUser_0(ctx context.Context, marshaler runtime.Marshal _ = err ) - val, ok = pathParams["userid"] + val, ok = pathParams["metadata.name"] if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "userid") + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "metadata.name") } - protoReq.Userid, err = runtime.String(val) + err = runtime.PopulateFieldFromPath(&protoReq, "metadata.name", val) if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "userid", err) + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "metadata.name", err) + } + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_User_GetUser_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := server.GetUser(ctx, &protoReq) + return msg, metadata, err + +} + +var ( + filter_User_GetUser_1 = &utilities.DoubleArray{Encoding: map[string]int{"metadata": 0, "id": 1}, Base: []int{1, 1, 1, 0}, Check: []int{0, 1, 2, 3}} +) + +func request_User_GetUser_1(ctx context.Context, marshaler runtime.Marshaler, client UserClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq userv3.User + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["metadata.id"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "metadata.id") + } + + err = runtime.PopulateFieldFromPath(&protoReq, "metadata.id", val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "metadata.id", err) + } + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_User_GetUser_1); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := client.GetUser(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_User_GetUser_1(ctx context.Context, marshaler runtime.Marshaler, server UserServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq userv3.User + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["metadata.id"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "metadata.id") + } + + err = runtime.PopulateFieldFromPath(&protoReq, "metadata.id", val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "metadata.id", err) + } + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_User_GetUser_1); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } msg, err := server.GetUser(ctx, &protoReq) @@ -137,14 +225,14 @@ func local_request_User_GetUser_0(ctx context.Context, marshaler runtime.Marshal } func request_User_UpdateUser_0(ctx context.Context, marshaler runtime.Marshaler, client UserClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq PutUserRequest + var protoReq userv3.User var metadata runtime.ServerMetadata newReader, berr := utilities.IOReaderFactory(req.Body) if berr != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) } - if err := marshaler.NewDecoder(newReader()).Decode(&protoReq.User); err != nil && err != io.EOF { + if err := marshaler.NewDecoder(newReader()).Decode(&protoReq); err != nil && err != io.EOF { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } @@ -155,14 +243,14 @@ func request_User_UpdateUser_0(ctx context.Context, marshaler runtime.Marshaler, _ = err ) - val, ok = pathParams["userid"] + val, ok = pathParams["metadata.name"] if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "userid") + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "metadata.name") } - protoReq.Userid, err = runtime.String(val) + err = runtime.PopulateFieldFromPath(&protoReq, "metadata.name", val) if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "userid", err) + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "metadata.name", err) } msg, err := client.UpdateUser(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) @@ -171,14 +259,14 @@ func request_User_UpdateUser_0(ctx context.Context, marshaler runtime.Marshaler, } func local_request_User_UpdateUser_0(ctx context.Context, marshaler runtime.Marshaler, server UserServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq PutUserRequest + var protoReq userv3.User var metadata runtime.ServerMetadata newReader, berr := utilities.IOReaderFactory(req.Body) if berr != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) } - if err := marshaler.NewDecoder(newReader()).Decode(&protoReq.User); err != nil && err != io.EOF { + if err := marshaler.NewDecoder(newReader()).Decode(&protoReq); err != nil && err != io.EOF { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } @@ -189,14 +277,14 @@ func local_request_User_UpdateUser_0(ctx context.Context, marshaler runtime.Mars _ = err ) - val, ok = pathParams["userid"] + val, ok = pathParams["metadata.name"] if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "userid") + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "metadata.name") } - protoReq.Userid, err = runtime.String(val) + err = runtime.PopulateFieldFromPath(&protoReq, "metadata.name", val) if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "userid", err) + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "metadata.name", err) } msg, err := server.UpdateUser(ctx, &protoReq) @@ -204,8 +292,80 @@ func local_request_User_UpdateUser_0(ctx context.Context, marshaler runtime.Mars } +func request_User_UpdateUser_1(ctx context.Context, marshaler runtime.Marshaler, client UserClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq userv3.User + var metadata runtime.ServerMetadata + + newReader, berr := utilities.IOReaderFactory(req.Body) + if berr != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) + } + if err := marshaler.NewDecoder(newReader()).Decode(&protoReq); err != nil && err != io.EOF { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["metadata.id"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "metadata.id") + } + + err = runtime.PopulateFieldFromPath(&protoReq, "metadata.id", val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "metadata.id", err) + } + + msg, err := client.UpdateUser(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_User_UpdateUser_1(ctx context.Context, marshaler runtime.Marshaler, server UserServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq userv3.User + var metadata runtime.ServerMetadata + + newReader, berr := utilities.IOReaderFactory(req.Body) + if berr != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) + } + if err := marshaler.NewDecoder(newReader()).Decode(&protoReq); err != nil && err != io.EOF { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["metadata.id"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "metadata.id") + } + + err = runtime.PopulateFieldFromPath(&protoReq, "metadata.id", val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "metadata.id", err) + } + + msg, err := server.UpdateUser(ctx, &protoReq) + return msg, metadata, err + +} + +var ( + filter_User_DeleteUser_0 = &utilities.DoubleArray{Encoding: map[string]int{"metadata": 0, "name": 1}, Base: []int{1, 1, 1, 0}, Check: []int{0, 1, 2, 3}} +) + func request_User_DeleteUser_0(ctx context.Context, marshaler runtime.Marshaler, client UserClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq UserRequest + var protoReq userv3.User var metadata runtime.ServerMetadata var ( @@ -215,14 +375,21 @@ func request_User_DeleteUser_0(ctx context.Context, marshaler runtime.Marshaler, _ = err ) - val, ok = pathParams["userid"] + val, ok = pathParams["metadata.name"] if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "userid") + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "metadata.name") } - protoReq.Userid, err = runtime.String(val) + err = runtime.PopulateFieldFromPath(&protoReq, "metadata.name", val) if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "userid", err) + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "metadata.name", err) + } + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_User_DeleteUser_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } msg, err := client.DeleteUser(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) @@ -231,7 +398,7 @@ func request_User_DeleteUser_0(ctx context.Context, marshaler runtime.Marshaler, } func local_request_User_DeleteUser_0(ctx context.Context, marshaler runtime.Marshaler, server UserServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq UserRequest + var protoReq userv3.User var metadata runtime.ServerMetadata var ( @@ -241,14 +408,91 @@ func local_request_User_DeleteUser_0(ctx context.Context, marshaler runtime.Mars _ = err ) - val, ok = pathParams["userid"] + val, ok = pathParams["metadata.name"] if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "userid") + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "metadata.name") } - protoReq.Userid, err = runtime.String(val) + err = runtime.PopulateFieldFromPath(&protoReq, "metadata.name", val) if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "userid", err) + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "metadata.name", err) + } + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_User_DeleteUser_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := server.DeleteUser(ctx, &protoReq) + return msg, metadata, err + +} + +var ( + filter_User_DeleteUser_1 = &utilities.DoubleArray{Encoding: map[string]int{"metadata": 0, "id": 1}, Base: []int{1, 1, 1, 0}, Check: []int{0, 1, 2, 3}} +) + +func request_User_DeleteUser_1(ctx context.Context, marshaler runtime.Marshaler, client UserClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq userv3.User + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["metadata.id"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "metadata.id") + } + + err = runtime.PopulateFieldFromPath(&protoReq, "metadata.id", val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "metadata.id", err) + } + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_User_DeleteUser_1); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := client.DeleteUser(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_User_DeleteUser_1(ctx context.Context, marshaler runtime.Marshaler, server UserServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq userv3.User + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["metadata.id"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "metadata.id") + } + + err = runtime.PopulateFieldFromPath(&protoReq, "metadata.id", val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "metadata.id", err) + } + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_User_DeleteUser_1); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } msg, err := server.DeleteUser(ctx, &protoReq) @@ -314,7 +558,7 @@ func RegisterUserHandlerServer(ctx context.Context, mux *runtime.ServeMux, serve var stream runtime.ServerTransportStream ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/rafay.dev.rpc.v3.User/GetUser", runtime.WithHTTPPathPattern("/auth/v3/user/{userid}")) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/rafay.dev.rpc.v3.User/GetUser", runtime.WithHTTPPathPattern("/auth/v3/user/{metadata.name}")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -331,13 +575,36 @@ func RegisterUserHandlerServer(ctx context.Context, mux *runtime.ServeMux, serve }) + mux.Handle("GET", pattern_User_GetUser_1, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/rafay.dev.rpc.v3.User/GetUser", runtime.WithHTTPPathPattern("/auth/v3/user/{metadata.id}")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_User_GetUser_1(rctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_User_GetUser_1(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + mux.Handle("PUT", pattern_User_UpdateUser_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() var stream runtime.ServerTransportStream ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/rafay.dev.rpc.v3.User/UpdateUser", runtime.WithHTTPPathPattern("/auth/v3/user/{userid}")) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/rafay.dev.rpc.v3.User/UpdateUser", runtime.WithHTTPPathPattern("/auth/v3/user/{metadata.name}")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -354,13 +621,36 @@ func RegisterUserHandlerServer(ctx context.Context, mux *runtime.ServeMux, serve }) + mux.Handle("PUT", pattern_User_UpdateUser_1, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/rafay.dev.rpc.v3.User/UpdateUser", runtime.WithHTTPPathPattern("/auth/v3/user/{metadata.id}")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_User_UpdateUser_1(rctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_User_UpdateUser_1(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + mux.Handle("DELETE", pattern_User_DeleteUser_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() var stream runtime.ServerTransportStream ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/rafay.dev.rpc.v3.User/DeleteUser", runtime.WithHTTPPathPattern("/auth/v3/user/{userid}")) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/rafay.dev.rpc.v3.User/DeleteUser", runtime.WithHTTPPathPattern("/auth/v3/user/{metadata.name}")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -377,6 +667,29 @@ func RegisterUserHandlerServer(ctx context.Context, mux *runtime.ServeMux, serve }) + mux.Handle("DELETE", pattern_User_DeleteUser_1, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/rafay.dev.rpc.v3.User/DeleteUser", runtime.WithHTTPPathPattern("/auth/v3/user/{metadata.id}")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_User_DeleteUser_1(rctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_User_DeleteUser_1(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + return nil } @@ -462,7 +775,7 @@ func RegisterUserHandlerClient(ctx context.Context, mux *runtime.ServeMux, clien ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateContext(ctx, mux, req, "/rafay.dev.rpc.v3.User/GetUser", runtime.WithHTTPPathPattern("/auth/v3/user/{userid}")) + rctx, err := runtime.AnnotateContext(ctx, mux, req, "/rafay.dev.rpc.v3.User/GetUser", runtime.WithHTTPPathPattern("/auth/v3/user/{metadata.name}")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -478,11 +791,31 @@ func RegisterUserHandlerClient(ctx context.Context, mux *runtime.ServeMux, clien }) + mux.Handle("GET", pattern_User_GetUser_1, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateContext(ctx, mux, req, "/rafay.dev.rpc.v3.User/GetUser", runtime.WithHTTPPathPattern("/auth/v3/user/{metadata.id}")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_User_GetUser_1(rctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_User_GetUser_1(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + mux.Handle("PUT", pattern_User_UpdateUser_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateContext(ctx, mux, req, "/rafay.dev.rpc.v3.User/UpdateUser", runtime.WithHTTPPathPattern("/auth/v3/user/{userid}")) + rctx, err := runtime.AnnotateContext(ctx, mux, req, "/rafay.dev.rpc.v3.User/UpdateUser", runtime.WithHTTPPathPattern("/auth/v3/user/{metadata.name}")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -498,11 +831,31 @@ func RegisterUserHandlerClient(ctx context.Context, mux *runtime.ServeMux, clien }) + mux.Handle("PUT", pattern_User_UpdateUser_1, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateContext(ctx, mux, req, "/rafay.dev.rpc.v3.User/UpdateUser", runtime.WithHTTPPathPattern("/auth/v3/user/{metadata.id}")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_User_UpdateUser_1(rctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_User_UpdateUser_1(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + mux.Handle("DELETE", pattern_User_DeleteUser_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateContext(ctx, mux, req, "/rafay.dev.rpc.v3.User/DeleteUser", runtime.WithHTTPPathPattern("/auth/v3/user/{userid}")) + rctx, err := runtime.AnnotateContext(ctx, mux, req, "/rafay.dev.rpc.v3.User/DeleteUser", runtime.WithHTTPPathPattern("/auth/v3/user/{metadata.name}")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -518,6 +871,26 @@ func RegisterUserHandlerClient(ctx context.Context, mux *runtime.ServeMux, clien }) + mux.Handle("DELETE", pattern_User_DeleteUser_1, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateContext(ctx, mux, req, "/rafay.dev.rpc.v3.User/DeleteUser", runtime.WithHTTPPathPattern("/auth/v3/user/{metadata.id}")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_User_DeleteUser_1(rctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_User_DeleteUser_1(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + return nil } @@ -526,11 +899,17 @@ var ( pattern_User_GetUsers_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"auth", "v3", "users"}, "")) - pattern_User_GetUser_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3}, []string{"auth", "v3", "user", "userid"}, "")) + pattern_User_GetUser_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3}, []string{"auth", "v3", "user", "metadata.name"}, "")) - pattern_User_UpdateUser_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3}, []string{"auth", "v3", "user", "userid"}, "")) + pattern_User_GetUser_1 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3}, []string{"auth", "v3", "user", "metadata.id"}, "")) - pattern_User_DeleteUser_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3}, []string{"auth", "v3", "user", "userid"}, "")) + pattern_User_UpdateUser_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3}, []string{"auth", "v3", "user", "metadata.name"}, "")) + + pattern_User_UpdateUser_1 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3}, []string{"auth", "v3", "user", "metadata.id"}, "")) + + pattern_User_DeleteUser_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3}, []string{"auth", "v3", "user", "metadata.name"}, "")) + + pattern_User_DeleteUser_1 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3}, []string{"auth", "v3", "user", "metadata.id"}, "")) ) var ( @@ -540,7 +919,13 @@ var ( forward_User_GetUser_0 = runtime.ForwardResponseMessage + forward_User_GetUser_1 = runtime.ForwardResponseMessage + forward_User_UpdateUser_0 = runtime.ForwardResponseMessage + forward_User_UpdateUser_1 = runtime.ForwardResponseMessage + forward_User_DeleteUser_0 = runtime.ForwardResponseMessage + + forward_User_DeleteUser_1 = runtime.ForwardResponseMessage ) diff --git a/components/usermgmt/proto/rpc/v3/user.proto b/components/usermgmt/proto/rpc/v3/user.proto index 948aaf5..0b83983 100644 --- a/components/usermgmt/proto/rpc/v3/user.proto +++ b/components/usermgmt/proto/rpc/v3/user.proto @@ -65,16 +65,8 @@ option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_swagger) = { }; // TODO: Add option to filter users list -message Empty {} -message UserRequest { string userid = 1; } -message PutUserRequest { - string userid = 1; - rafay.dev.types.user.v3.User user = 2; -} -message UserResponse { - string status = 1; - string message = 2; -} +message GetUsersRequest {} +message DeleteUserResponse {} service User { rpc CreateUser(rafay.dev.types.user.v3.User) @@ -92,28 +84,47 @@ service User { }; }; - rpc GetUsers(Empty) returns (rafay.dev.types.user.v3.UserList) { + rpc GetUsers(GetUsersRequest) returns (rafay.dev.types.user.v3.UserList) { option (google.api.http) = { get : "/auth/v3/users" }; }; - rpc GetUser(UserRequest) returns (rafay.dev.types.user.v3.User) { + rpc GetUser(rafay.dev.types.user.v3.User) returns (rafay.dev.types.user.v3.User) { option (google.api.http) = { - get : "/auth/v3/user/{userid}" + get : "/auth/v3/user/{metadata.name}" + additional_bindings { + get : "/auth/v3/user/{metadata.id}" + } }; }; - rpc UpdateUser(PutUserRequest) returns (UserResponse) { + rpc UpdateUser(rafay.dev.types.user.v3.User) returns (rafay.dev.types.user.v3.User) { option (google.api.http) = { - put : "/auth/v3/user/{userid}" - body : "user" + put : "/auth/v3/user/{metadata.name}" + body : "*" + additional_bindings { + put : "/auth/v3/user/{metadata.id}" + body : "*" + } }; }; - rpc DeleteUser(UserRequest) returns (UserResponse) { + rpc DeleteUser(rafay.dev.types.user.v3.User) returns (DeleteUserResponse) { option (google.api.http) = { - delete : "/auth/v3/user/{userid}" + delete : "/auth/v3/user/{metadata.name}" + additional_bindings { + delete : "/auth/v3/user/{metadata.id}" + } + }; + + option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation) = { + responses : { + key : "204" + value : { + description : "Returned when user is deleted successfully." + } + } }; }; } \ No newline at end of file diff --git a/components/usermgmt/proto/rpc/v3/user_grpc.pb.go b/components/usermgmt/proto/rpc/v3/user_grpc.pb.go index 879604e..41c5cad 100644 --- a/components/usermgmt/proto/rpc/v3/user_grpc.pb.go +++ b/components/usermgmt/proto/rpc/v3/user_grpc.pb.go @@ -24,10 +24,10 @@ const _ = grpc.SupportPackageIsVersion7 // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. type UserClient interface { CreateUser(ctx context.Context, in *v3.User, opts ...grpc.CallOption) (*v3.User, error) - GetUsers(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*v3.UserList, error) - GetUser(ctx context.Context, in *UserRequest, opts ...grpc.CallOption) (*v3.User, error) - UpdateUser(ctx context.Context, in *PutUserRequest, opts ...grpc.CallOption) (*UserResponse, error) - DeleteUser(ctx context.Context, in *UserRequest, opts ...grpc.CallOption) (*UserResponse, error) + GetUsers(ctx context.Context, in *GetUsersRequest, opts ...grpc.CallOption) (*v3.UserList, error) + GetUser(ctx context.Context, in *v3.User, opts ...grpc.CallOption) (*v3.User, error) + UpdateUser(ctx context.Context, in *v3.User, opts ...grpc.CallOption) (*v3.User, error) + DeleteUser(ctx context.Context, in *v3.User, opts ...grpc.CallOption) (*DeleteUserResponse, error) } type userClient struct { @@ -47,7 +47,7 @@ func (c *userClient) CreateUser(ctx context.Context, in *v3.User, opts ...grpc.C return out, nil } -func (c *userClient) GetUsers(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*v3.UserList, error) { +func (c *userClient) GetUsers(ctx context.Context, in *GetUsersRequest, opts ...grpc.CallOption) (*v3.UserList, error) { out := new(v3.UserList) err := c.cc.Invoke(ctx, "/rafay.dev.rpc.v3.User/GetUsers", in, out, opts...) if err != nil { @@ -56,7 +56,7 @@ func (c *userClient) GetUsers(ctx context.Context, in *Empty, opts ...grpc.CallO return out, nil } -func (c *userClient) GetUser(ctx context.Context, in *UserRequest, opts ...grpc.CallOption) (*v3.User, error) { +func (c *userClient) GetUser(ctx context.Context, in *v3.User, opts ...grpc.CallOption) (*v3.User, error) { out := new(v3.User) err := c.cc.Invoke(ctx, "/rafay.dev.rpc.v3.User/GetUser", in, out, opts...) if err != nil { @@ -65,8 +65,8 @@ func (c *userClient) GetUser(ctx context.Context, in *UserRequest, opts ...grpc. return out, nil } -func (c *userClient) UpdateUser(ctx context.Context, in *PutUserRequest, opts ...grpc.CallOption) (*UserResponse, error) { - out := new(UserResponse) +func (c *userClient) UpdateUser(ctx context.Context, in *v3.User, opts ...grpc.CallOption) (*v3.User, error) { + out := new(v3.User) err := c.cc.Invoke(ctx, "/rafay.dev.rpc.v3.User/UpdateUser", in, out, opts...) if err != nil { return nil, err @@ -74,8 +74,8 @@ func (c *userClient) UpdateUser(ctx context.Context, in *PutUserRequest, opts .. return out, nil } -func (c *userClient) DeleteUser(ctx context.Context, in *UserRequest, opts ...grpc.CallOption) (*UserResponse, error) { - out := new(UserResponse) +func (c *userClient) DeleteUser(ctx context.Context, in *v3.User, opts ...grpc.CallOption) (*DeleteUserResponse, error) { + out := new(DeleteUserResponse) err := c.cc.Invoke(ctx, "/rafay.dev.rpc.v3.User/DeleteUser", in, out, opts...) if err != nil { return nil, err @@ -88,10 +88,10 @@ func (c *userClient) DeleteUser(ctx context.Context, in *UserRequest, opts ...gr // for forward compatibility type UserServer interface { CreateUser(context.Context, *v3.User) (*v3.User, error) - GetUsers(context.Context, *Empty) (*v3.UserList, error) - GetUser(context.Context, *UserRequest) (*v3.User, error) - UpdateUser(context.Context, *PutUserRequest) (*UserResponse, error) - DeleteUser(context.Context, *UserRequest) (*UserResponse, error) + GetUsers(context.Context, *GetUsersRequest) (*v3.UserList, error) + GetUser(context.Context, *v3.User) (*v3.User, error) + UpdateUser(context.Context, *v3.User) (*v3.User, error) + DeleteUser(context.Context, *v3.User) (*DeleteUserResponse, error) } // UnimplementedUserServer should be embedded to have forward compatible implementations. @@ -101,16 +101,16 @@ type UnimplementedUserServer struct { func (UnimplementedUserServer) CreateUser(context.Context, *v3.User) (*v3.User, error) { return nil, status.Errorf(codes.Unimplemented, "method CreateUser not implemented") } -func (UnimplementedUserServer) GetUsers(context.Context, *Empty) (*v3.UserList, error) { +func (UnimplementedUserServer) GetUsers(context.Context, *GetUsersRequest) (*v3.UserList, error) { return nil, status.Errorf(codes.Unimplemented, "method GetUsers not implemented") } -func (UnimplementedUserServer) GetUser(context.Context, *UserRequest) (*v3.User, error) { +func (UnimplementedUserServer) GetUser(context.Context, *v3.User) (*v3.User, error) { return nil, status.Errorf(codes.Unimplemented, "method GetUser not implemented") } -func (UnimplementedUserServer) UpdateUser(context.Context, *PutUserRequest) (*UserResponse, error) { +func (UnimplementedUserServer) UpdateUser(context.Context, *v3.User) (*v3.User, error) { return nil, status.Errorf(codes.Unimplemented, "method UpdateUser not implemented") } -func (UnimplementedUserServer) DeleteUser(context.Context, *UserRequest) (*UserResponse, error) { +func (UnimplementedUserServer) DeleteUser(context.Context, *v3.User) (*DeleteUserResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method DeleteUser not implemented") } @@ -144,7 +144,7 @@ func _User_CreateUser_Handler(srv interface{}, ctx context.Context, dec func(int } func _User_GetUsers_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(Empty) + in := new(GetUsersRequest) if err := dec(in); err != nil { return nil, err } @@ -156,13 +156,13 @@ func _User_GetUsers_Handler(srv interface{}, ctx context.Context, dec func(inter FullMethod: "/rafay.dev.rpc.v3.User/GetUsers", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(UserServer).GetUsers(ctx, req.(*Empty)) + return srv.(UserServer).GetUsers(ctx, req.(*GetUsersRequest)) } return interceptor(ctx, in, info, handler) } func _User_GetUser_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(UserRequest) + in := new(v3.User) if err := dec(in); err != nil { return nil, err } @@ -174,13 +174,13 @@ func _User_GetUser_Handler(srv interface{}, ctx context.Context, dec func(interf FullMethod: "/rafay.dev.rpc.v3.User/GetUser", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(UserServer).GetUser(ctx, req.(*UserRequest)) + return srv.(UserServer).GetUser(ctx, req.(*v3.User)) } return interceptor(ctx, in, info, handler) } func _User_UpdateUser_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(PutUserRequest) + in := new(v3.User) if err := dec(in); err != nil { return nil, err } @@ -192,13 +192,13 @@ func _User_UpdateUser_Handler(srv interface{}, ctx context.Context, dec func(int FullMethod: "/rafay.dev.rpc.v3.User/UpdateUser", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(UserServer).UpdateUser(ctx, req.(*PutUserRequest)) + return srv.(UserServer).UpdateUser(ctx, req.(*v3.User)) } return interceptor(ctx, in, info, handler) } func _User_DeleteUser_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(UserRequest) + in := new(v3.User) if err := dec(in); err != nil { return nil, err } @@ -210,7 +210,7 @@ func _User_DeleteUser_Handler(srv interface{}, ctx context.Context, dec func(int FullMethod: "/rafay.dev.rpc.v3.User/DeleteUser", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(UserServer).DeleteUser(ctx, req.(*UserRequest)) + return srv.(UserServer).DeleteUser(ctx, req.(*v3.User)) } return interceptor(ctx, in, info, handler) } diff --git a/components/usermgmt/proto/types/userpb/v3/group.pb.go b/components/usermgmt/proto/types/userpb/v3/group.pb.go index 9f63784..ec6a581 100644 --- a/components/usermgmt/proto/types/userpb/v3/group.pb.go +++ b/components/usermgmt/proto/types/userpb/v3/group.pb.go @@ -7,8 +7,8 @@ package userv3 import ( - v3 "github.com/RafaySystems/rcloud-base/components/common/proto/types/commonpb/v3" v31 "github.com/RafaySystems/rcloud-base/components/adminsrv/proto/types/systempb/v3" + v3 "github.com/RafaySystems/rcloud-base/components/common/proto/types/commonpb/v3" _ "github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-openapiv2/options" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" diff --git a/components/usermgmt/proto/types/userpb/v3/user.pb.go b/components/usermgmt/proto/types/userpb/v3/user.pb.go index 40940df..4674fd6 100644 --- a/components/usermgmt/proto/types/userpb/v3/user.pb.go +++ b/components/usermgmt/proto/types/userpb/v3/user.pb.go @@ -7,8 +7,8 @@ package userv3 import ( - v3 "github.com/RafaySystems/rcloud-base/components/common/proto/types/commonpb/v3" _ "github.com/RafaySystems/rcloud-base/components/adminsrv/proto/types/systempb/v3" + v3 "github.com/RafaySystems/rcloud-base/components/common/proto/types/commonpb/v3" _ "github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-openapiv2/options" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" From 769acb9c8041b64d78b7bdbc2d62033afdc755f6 Mon Sep 17 00:00:00 2001 From: Abin Simon Date: Thu, 6 Jan 2022 13:35:23 +0530 Subject: [PATCH 11/28] Complete basic setup for groups in usermgmt --- README.md | 46 ++ .../openapi/proto/rpc/v3/group.swagger.json | 281 ++++++++++-- .../openapi/proto/rpc/v3/role.swagger.json | 250 ++++++++-- .../proto/rpc/v3/rolepermission.swagger.json | 140 +++++- .../openapi/proto/rpc/v3/user.swagger.json | 334 ++++++++++++-- components/usermgmt/go.mod | 5 + components/usermgmt/go.sum | 14 + components/usermgmt/main.go | 46 +- components/usermgmt/master.rest | 37 +- .../usermgmt/pkg/internal/models/group.go | 22 + .../persistence/provider/pg/entity_dao.go | 98 ++++ components/usermgmt/pkg/server/group.go | 63 +++ components/usermgmt/pkg/service/group.go | 357 +++++++++++++++ components/usermgmt/pkg/service/user.go | 2 +- components/usermgmt/proto/rpc/v3/group.pb.go | 370 ++++++--------- .../usermgmt/proto/rpc/v3/group.pb.gw.go | 410 +++++++++++++++-- components/usermgmt/proto/rpc/v3/group.proto | 31 +- .../usermgmt/proto/rpc/v3/group_grpc.pb.go | 22 +- components/usermgmt/proto/rpc/v3/role.pb.go | 350 ++++++-------- .../usermgmt/proto/rpc/v3/role.pb.gw.go | 426 ++++++++++++++++-- components/usermgmt/proto/rpc/v3/role.proto | 24 +- .../usermgmt/proto/rpc/v3/role_grpc.pb.go | 22 +- .../proto/rpc/v3/rolepermission.pb.go | 208 +++------ .../proto/rpc/v3/rolepermission.pb.gw.go | 22 +- .../proto/rpc/v3/rolepermission.proto | 4 +- .../proto/rpc/v3/rolepermission_grpc.pb.go | 12 +- components/usermgmt/proto/rpc/v3/user.pb.go | 285 ++++++------ .../usermgmt/proto/rpc/v3/user.pb.gw.go | 426 ++++++++++++++++-- components/usermgmt/proto/rpc/v3/user.proto | 20 +- .../usermgmt/proto/rpc/v3/user_grpc.pb.go | 12 +- 30 files changed, 3271 insertions(+), 1068 deletions(-) create mode 100644 components/usermgmt/pkg/internal/models/group.go create mode 100644 components/usermgmt/pkg/internal/persistence/provider/pg/entity_dao.go create mode 100644 components/usermgmt/pkg/server/group.go create mode 100644 components/usermgmt/pkg/service/group.go diff --git a/README.md b/README.md index 1f209a9..46d0c9c 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,48 @@ # rcloud-base rcloud-base + +## Setting up the database + +### Create the initial db/user + +Example for `admindb`: + +``` sql +create database admindb; +create user admindbuser; +``` + +Now in the newly created db: + +``` sql +CREATE EXTENSION IF NOT EXISTS "uuid-ossp"; +grant execute on function uuid_generate_v4() to admindbuser; +``` + +*This will grant the necessary permission to the newly created user to run uuid_generate_v4()* + +### Run migrations + +We use [`golang-migrate`](https://github.com/golang-migrate/migrate) to perform migrations. + +### Install [`golang-migrate`](https://github.com/golang-migrate/migrate) + +``` shell +go install -tags 'postgres' github.com/golang-migrate/migrate/v4/cmd/migrate@latest +``` + +*`-tags 'postgres'` is important as otherwise it compiles without postgres support* + +You can refer to the [guide](https://github.com/golang-migrate/migrate/tree/master/cmd/migrate) for full details. + +### Run migrations + +Example for `admindb`: + +``` shell +export POSTGRESQL_URL='postgres://:@:/admindb?sslmode=disable' +migrate -path ./persistence/migrations/admindb -database "$POSTGRESQL_URL" up +``` + +See [cli-usage](https://github.com/golang-migrate/migrate#cli-usage) for more info. + diff --git a/components/usermgmt/gen/openapi/proto/rpc/v3/group.swagger.json b/components/usermgmt/gen/openapi/proto/rpc/v3/group.swagger.json index 78181fb..22fa64c 100644 --- a/components/usermgmt/gen/openapi/proto/rpc/v3/group.swagger.json +++ b/components/usermgmt/gen/openapi/proto/rpc/v3/group.swagger.json @@ -24,7 +24,7 @@ "application/yaml" ], "paths": { - "/auth/v3/group/{metadata.id}": { + "/auth/v3/partner/{metadata.partner}/organization/{metadata.organization}/group/{metadata.id}": { "get": { "operationId": "Group_GetGroup2", "responses": { @@ -53,6 +53,20 @@ } }, "parameters": [ + { + "name": "metadata.partner", + "description": "Partner to which the resource belongs", + "in": "path", + "required": true, + "type": "string" + }, + { + "name": "metadata.organization", + "description": "Organization to which the resource belongs", + "in": "path", + "required": true, + "type": "string" + }, { "name": "metadata.id", "in": "path", @@ -96,13 +110,6 @@ "required": false, "type": "string" }, - { - "name": "metadata.partner", - "description": "Project. Project of the resource", - "in": "query", - "required": false, - "type": "string" - }, { "name": "metadata.modifiedAt", "in": "query", @@ -175,7 +182,7 @@ "200": { "description": "A successful response.", "schema": { - "$ref": "#/definitions/v3DeleteGroupResponse" + "$ref": "#/definitions/v3Group" } }, "204": { @@ -201,6 +208,20 @@ } }, "parameters": [ + { + "name": "metadata.partner", + "description": "Partner to which the resource belongs", + "in": "path", + "required": true, + "type": "string" + }, + { + "name": "metadata.organization", + "description": "Organization to which the resource belongs", + "in": "path", + "required": true, + "type": "string" + }, { "name": "metadata.id", "in": "path", @@ -244,13 +265,6 @@ "required": false, "type": "string" }, - { - "name": "metadata.partner", - "description": "Project. Project of the resource", - "in": "query", - "required": false, - "type": "string" - }, { "name": "metadata.modifiedAt", "in": "query", @@ -345,6 +359,20 @@ } }, "parameters": [ + { + "name": "metadata.partner", + "description": "Partner to which the resource belongs", + "in": "path", + "required": true, + "type": "string" + }, + { + "name": "metadata.organization", + "description": "Organization to which the resource belongs", + "in": "path", + "required": true, + "type": "string" + }, { "name": "metadata.id", "in": "path", @@ -365,7 +393,7 @@ ] } }, - "/auth/v3/group/{metadata.name}": { + "/auth/v3/partner/{metadata.partner}/organization/{metadata.organization}/group/{metadata.name}": { "get": { "operationId": "Group_GetGroup", "responses": { @@ -394,6 +422,20 @@ } }, "parameters": [ + { + "name": "metadata.partner", + "description": "Partner to which the resource belongs", + "in": "path", + "required": true, + "type": "string" + }, + { + "name": "metadata.organization", + "description": "Organization to which the resource belongs", + "in": "path", + "required": true, + "type": "string" + }, { "name": "metadata.name", "description": "name of the resource", @@ -431,13 +473,6 @@ "required": false, "type": "string" }, - { - "name": "metadata.partner", - "description": "Project. Project of the resource", - "in": "query", - "required": false, - "type": "string" - }, { "name": "metadata.id", "in": "query", @@ -516,7 +551,7 @@ "200": { "description": "A successful response.", "schema": { - "$ref": "#/definitions/v3DeleteGroupResponse" + "$ref": "#/definitions/v3Group" } }, "204": { @@ -542,6 +577,20 @@ } }, "parameters": [ + { + "name": "metadata.partner", + "description": "Partner to which the resource belongs", + "in": "path", + "required": true, + "type": "string" + }, + { + "name": "metadata.organization", + "description": "Organization to which the resource belongs", + "in": "path", + "required": true, + "type": "string" + }, { "name": "metadata.name", "description": "name of the resource", @@ -579,13 +628,6 @@ "required": false, "type": "string" }, - { - "name": "metadata.partner", - "description": "Project. Project of the resource", - "in": "query", - "required": false, - "type": "string" - }, { "name": "metadata.id", "in": "query", @@ -686,6 +728,20 @@ } }, "parameters": [ + { + "name": "metadata.partner", + "description": "Partner to which the resource belongs", + "in": "path", + "required": true, + "type": "string" + }, + { + "name": "metadata.organization", + "description": "Organization to which the resource belongs", + "in": "path", + "required": true, + "type": "string" + }, { "name": "metadata.name", "description": "name of the resource", @@ -707,7 +763,7 @@ ] } }, - "/auth/v3/groups": { + "/auth/v3/partner/{metadata.partner}/organization/{metadata.organization}/groups": { "get": { "operationId": "Group_GetGroups", "responses": { @@ -737,8 +793,119 @@ }, "parameters": [ { - "name": "project", - "description": "Project. Project of user to filter by", + "name": "metadata.partner", + "description": "Partner to which the resource belongs", + "in": "path", + "required": true, + "type": "string" + }, + { + "name": "metadata.organization", + "description": "Organization to which the resource belongs", + "in": "path", + "required": true, + "type": "string" + }, + { + "name": "apiVersion", + "description": "API Version. API Version of the group resource", + "in": "query", + "required": false, + "type": "string", + "default": "usermgmt.k8smgmt.io/v3" + }, + { + "name": "kind", + "description": "Kind. Kind of the group resource", + "in": "query", + "required": false, + "type": "string", + "default": "Pipeline" + }, + { + "name": "metadata.name", + "description": "Name. name of the resource", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "metadata.description", + "description": "Description. description of the resource", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "metadata.project", + "description": "Project. Project of the resource", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "metadata.id", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "metadata.modifiedAt", + "in": "query", + "required": false, + "type": "string", + "format": "date-time" + }, + { + "name": "spec.users", + "description": "Users. List of users for group", + "in": "query", + "required": false, + "type": "array", + "items": { + "type": "string" + }, + "collectionFormat": "multi" + }, + { + "name": "spec.type", + "description": "Type. Type of group", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "status.conditionType", + "description": "Condition Type. type of the status condition", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "status.conditionStatus", + "description": "Condition Status. status of the condition", + "in": "query", + "required": false, + "type": "string", + "enum": [ + "StatusNotSet", + "StatusSubmitted", + "StatusOK", + "StatusFailed" + ], + "default": "StatusNotSet" + }, + { + "name": "status.lastUpdated", + "description": "Last Updated. when the condition status is last updated", + "in": "query", + "required": false, + "type": "string", + "format": "date-time" + }, + { + "name": "status.reason", + "description": "Reason. reason of the last condition status", "in": "query", "required": false, "type": "string" @@ -780,6 +947,20 @@ } }, "parameters": [ + { + "name": "metadata.partner", + "description": "Partner to which the resource belongs", + "in": "path", + "required": true, + "type": "string" + }, + { + "name": "metadata.organization", + "description": "Organization to which the resource belongs", + "in": "path", + "required": true, + "type": "string" + }, { "name": "body", "in": "body", @@ -873,9 +1054,6 @@ "default": "StatusNotSet", "title": "$title: ConditionStatus\n$description: status of a condition for a resource" }, - "v3DeleteGroupResponse": { - "type": "object" - }, "v3Group": { "type": "object", "properties": { @@ -1036,10 +1214,15 @@ "description": "Project of the resource", "title": "Project" }, + "organization": { + "type": "string", + "description": "Organization to which the resource belongs", + "title": "Organization" + }, "partner": { "type": "string", - "description": "Project of the resource", - "title": "Project" + "description": "Partner to which the resource belongs", + "title": "Partner" }, "id": { "type": "string", @@ -1064,24 +1247,26 @@ "apiVersion": { "type": "string", "default": "system.k8smgmt.io/v3", - "description": "API Version of the project resource", - "title": "API Version" + "description": "API Version of the resource", + "title": "API Version", + "readOnly": true }, "kind": { "type": "string", - "default": "Pipeline", - "description": "Kind of the project resource", - "title": "Kind" + "default": "Project", + "description": "Kind of the resource", + "title": "Kind", + "readOnly": true }, "metadata": { "$ref": "#/definitions/v3Metadata", - "description": "Metadata of the project resource", + "description": "Metadata of the resource", "title": "Metadata" }, "spec": { "$ref": "#/definitions/v3ProjectSpec", - "description": "Metadata of the project resource", - "title": "Metadata" + "description": "Spec of the resource", + "title": "Spec" }, "status": { "$ref": "#/definitions/commonv3Status", diff --git a/components/usermgmt/gen/openapi/proto/rpc/v3/role.swagger.json b/components/usermgmt/gen/openapi/proto/rpc/v3/role.swagger.json index 7c7079c..5d637d5 100644 --- a/components/usermgmt/gen/openapi/proto/rpc/v3/role.swagger.json +++ b/components/usermgmt/gen/openapi/proto/rpc/v3/role.swagger.json @@ -24,7 +24,7 @@ "application/yaml" ], "paths": { - "/auth/v3/role/{metadata.id}": { + "/auth/v3/partner/{metadata.partner}/organization/{metadata.organization}/role/{metadata.id}": { "get": { "operationId": "Role_GetRole2", "responses": { @@ -53,6 +53,20 @@ } }, "parameters": [ + { + "name": "metadata.partner", + "description": "Partner to which the resource belongs", + "in": "path", + "required": true, + "type": "string" + }, + { + "name": "metadata.organization", + "description": "Organization to which the resource belongs", + "in": "path", + "required": true, + "type": "string" + }, { "name": "metadata.id", "in": "path", @@ -96,13 +110,6 @@ "required": false, "type": "string" }, - { - "name": "metadata.partner", - "description": "Project. Project of the resource", - "in": "query", - "required": false, - "type": "string" - }, { "name": "metadata.modifiedAt", "in": "query", @@ -157,7 +164,7 @@ "200": { "description": "A successful response.", "schema": { - "$ref": "#/definitions/v3DeleteRoleResponse" + "$ref": "#/definitions/v3Role" } }, "204": { @@ -183,6 +190,20 @@ } }, "parameters": [ + { + "name": "metadata.partner", + "description": "Partner to which the resource belongs", + "in": "path", + "required": true, + "type": "string" + }, + { + "name": "metadata.organization", + "description": "Organization to which the resource belongs", + "in": "path", + "required": true, + "type": "string" + }, { "name": "metadata.id", "in": "path", @@ -226,13 +247,6 @@ "required": false, "type": "string" }, - { - "name": "metadata.partner", - "description": "Project. Project of the resource", - "in": "query", - "required": false, - "type": "string" - }, { "name": "metadata.modifiedAt", "in": "query", @@ -309,6 +323,20 @@ } }, "parameters": [ + { + "name": "metadata.partner", + "description": "Partner to which the resource belongs", + "in": "path", + "required": true, + "type": "string" + }, + { + "name": "metadata.organization", + "description": "Organization to which the resource belongs", + "in": "path", + "required": true, + "type": "string" + }, { "name": "metadata.id", "in": "path", @@ -329,7 +357,7 @@ ] } }, - "/auth/v3/role/{metadata.name}": { + "/auth/v3/partner/{metadata.partner}/organization/{metadata.organization}/role/{metadata.name}": { "get": { "operationId": "Role_GetRole", "responses": { @@ -358,6 +386,20 @@ } }, "parameters": [ + { + "name": "metadata.partner", + "description": "Partner to which the resource belongs", + "in": "path", + "required": true, + "type": "string" + }, + { + "name": "metadata.organization", + "description": "Organization to which the resource belongs", + "in": "path", + "required": true, + "type": "string" + }, { "name": "metadata.name", "description": "name of the resource", @@ -395,13 +437,6 @@ "required": false, "type": "string" }, - { - "name": "metadata.partner", - "description": "Project. Project of the resource", - "in": "query", - "required": false, - "type": "string" - }, { "name": "metadata.id", "in": "query", @@ -462,7 +497,7 @@ "200": { "description": "A successful response.", "schema": { - "$ref": "#/definitions/v3DeleteRoleResponse" + "$ref": "#/definitions/v3Role" } }, "204": { @@ -488,6 +523,20 @@ } }, "parameters": [ + { + "name": "metadata.partner", + "description": "Partner to which the resource belongs", + "in": "path", + "required": true, + "type": "string" + }, + { + "name": "metadata.organization", + "description": "Organization to which the resource belongs", + "in": "path", + "required": true, + "type": "string" + }, { "name": "metadata.name", "description": "name of the resource", @@ -525,13 +574,6 @@ "required": false, "type": "string" }, - { - "name": "metadata.partner", - "description": "Project. Project of the resource", - "in": "query", - "required": false, - "type": "string" - }, { "name": "metadata.id", "in": "query", @@ -614,6 +656,20 @@ } }, "parameters": [ + { + "name": "metadata.partner", + "description": "Partner to which the resource belongs", + "in": "path", + "required": true, + "type": "string" + }, + { + "name": "metadata.organization", + "description": "Organization to which the resource belongs", + "in": "path", + "required": true, + "type": "string" + }, { "name": "metadata.name", "description": "name of the resource", @@ -635,7 +691,7 @@ ] } }, - "/auth/v3/roles": { + "/auth/v3/partner/{metadata.partner}/organization/{metadata.organization}/roles": { "get": { "operationId": "Role_GetRoles", "responses": { @@ -663,6 +719,108 @@ } } }, + "parameters": [ + { + "name": "metadata.partner", + "description": "Partner to which the resource belongs", + "in": "path", + "required": true, + "type": "string" + }, + { + "name": "metadata.organization", + "description": "Organization to which the resource belongs", + "in": "path", + "required": true, + "type": "string" + }, + { + "name": "apiVersion", + "description": "API Version. API Version of the Role resource", + "in": "query", + "required": false, + "type": "string", + "default": "usermgmt.k8smgmt.io/v3" + }, + { + "name": "kind", + "description": "Kind. Kind of the role resource", + "in": "query", + "required": false, + "type": "string", + "default": "Role" + }, + { + "name": "metadata.name", + "description": "Name. name of the resource", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "metadata.description", + "description": "Description. description of the resource", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "metadata.project", + "description": "Project. Project of the resource", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "metadata.id", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "metadata.modifiedAt", + "in": "query", + "required": false, + "type": "string", + "format": "date-time" + }, + { + "name": "status.conditionType", + "description": "Condition Type. type of the status condition", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "status.conditionStatus", + "description": "Condition Status. status of the condition", + "in": "query", + "required": false, + "type": "string", + "enum": [ + "StatusNotSet", + "StatusSubmitted", + "StatusOK", + "StatusFailed" + ], + "default": "StatusNotSet" + }, + { + "name": "status.lastUpdated", + "description": "Last Updated. when the condition status is last updated", + "in": "query", + "required": false, + "type": "string", + "format": "date-time" + }, + { + "name": "status.reason", + "description": "Reason. reason of the last condition status", + "in": "query", + "required": false, + "type": "string" + } + ], "tags": [ "Role" ] @@ -699,6 +857,20 @@ } }, "parameters": [ + { + "name": "metadata.partner", + "description": "Partner to which the resource belongs", + "in": "path", + "required": true, + "type": "string" + }, + { + "name": "metadata.organization", + "description": "Organization to which the resource belongs", + "in": "path", + "required": true, + "type": "string" + }, { "name": "body", "in": "body", @@ -792,9 +964,6 @@ "default": "StatusNotSet", "title": "$title: ConditionStatus\n$description: status of a condition for a resource" }, - "v3DeleteRoleResponse": { - "type": "object" - }, "v3ListMetadata": { "type": "object", "properties": { @@ -851,10 +1020,15 @@ "description": "Project of the resource", "title": "Project" }, + "organization": { + "type": "string", + "description": "Organization to which the resource belongs", + "title": "Organization" + }, "partner": { "type": "string", - "description": "Project of the resource", - "title": "Project" + "description": "Partner to which the resource belongs", + "title": "Partner" }, "id": { "type": "string", diff --git a/components/usermgmt/gen/openapi/proto/rpc/v3/rolepermission.swagger.json b/components/usermgmt/gen/openapi/proto/rpc/v3/rolepermission.swagger.json index d3d0fbc..6254731 100644 --- a/components/usermgmt/gen/openapi/proto/rpc/v3/rolepermission.swagger.json +++ b/components/usermgmt/gen/openapi/proto/rpc/v3/rolepermission.swagger.json @@ -96,9 +96,16 @@ "required": false, "type": "string" }, + { + "name": "metadata.organization", + "description": "Organization. Organization to which the resource belongs", + "in": "query", + "required": false, + "type": "string" + }, { "name": "metadata.partner", - "description": "Project. Project of the resource", + "description": "Partner. Partner to which the resource belongs", "in": "query", "required": false, "type": "string" @@ -229,9 +236,16 @@ "required": false, "type": "string" }, + { + "name": "metadata.organization", + "description": "Organization. Organization to which the resource belongs", + "in": "query", + "required": false, + "type": "string" + }, { "name": "metadata.partner", - "description": "Project. Project of the resource", + "description": "Partner. Partner to which the resource belongs", "in": "query", "required": false, "type": "string" @@ -330,6 +344,119 @@ } } }, + "parameters": [ + { + "name": "apiVersion", + "description": "API Version. API Version of the role permission resource", + "in": "query", + "required": false, + "type": "string", + "default": "usermgmt.k8smgmt.io/v3" + }, + { + "name": "kind", + "description": "Kind. Kind of the role permission resource", + "in": "query", + "required": false, + "type": "string", + "default": "RolePermission" + }, + { + "name": "metadata.name", + "description": "Name. name of the resource", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "metadata.description", + "description": "Description. description of the resource", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "metadata.project", + "description": "Project. Project of the resource", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "metadata.organization", + "description": "Organization. Organization to which the resource belongs", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "metadata.partner", + "description": "Partner. Partner to which the resource belongs", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "metadata.id", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "metadata.modifiedAt", + "in": "query", + "required": false, + "type": "string", + "format": "date-time" + }, + { + "name": "spec.permissions", + "description": "Permissions. List of permisions for role", + "in": "query", + "required": false, + "type": "array", + "items": { + "type": "string" + }, + "collectionFormat": "multi" + }, + { + "name": "status.conditionType", + "description": "Condition Type. type of the status condition", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "status.conditionStatus", + "description": "Condition Status. status of the condition", + "in": "query", + "required": false, + "type": "string", + "enum": [ + "StatusNotSet", + "StatusSubmitted", + "StatusOK", + "StatusFailed" + ], + "default": "StatusNotSet" + }, + { + "name": "status.lastUpdated", + "description": "Last Updated. when the condition status is last updated", + "in": "query", + "required": false, + "type": "string", + "format": "date-time" + }, + { + "name": "status.reason", + "description": "Reason. reason of the last condition status", + "in": "query", + "required": false, + "type": "string" + } + ], "tags": [ "Rolepermission" ] @@ -470,10 +597,15 @@ "description": "Project of the resource", "title": "Project" }, + "organization": { + "type": "string", + "description": "Organization to which the resource belongs", + "title": "Organization" + }, "partner": { "type": "string", - "description": "Project of the resource", - "title": "Project" + "description": "Partner to which the resource belongs", + "title": "Partner" }, "id": { "type": "string", diff --git a/components/usermgmt/gen/openapi/proto/rpc/v3/user.swagger.json b/components/usermgmt/gen/openapi/proto/rpc/v3/user.swagger.json index a37104f..08b40cf 100644 --- a/components/usermgmt/gen/openapi/proto/rpc/v3/user.swagger.json +++ b/components/usermgmt/gen/openapi/proto/rpc/v3/user.swagger.json @@ -24,16 +24,20 @@ "application/yaml" ], "paths": { - "/auth/v3/user/{metadata.id}": { - "get": { - "operationId": "User_GetUser2", + "/auth/partner/{metadata.partner}/organization/{metadata.organization}/v3/user/{metadata.id}": { + "delete": { + "operationId": "User_DeleteUser2", "responses": { "200": { "description": "A successful response.", "schema": { - "$ref": "#/definitions/v3User" + "$ref": "#/definitions/v3DeleteUserResponse" } }, + "204": { + "description": "Returned when user is deleted successfully.", + "schema": {} + }, "403": { "description": "Returned when the user does not have permission to access the resource.", "schema": {} @@ -53,6 +57,20 @@ } }, "parameters": [ + { + "name": "metadata.partner", + "description": "Partner to which the resource belongs", + "in": "path", + "required": true, + "type": "string" + }, + { + "name": "metadata.organization", + "description": "Organization to which the resource belongs", + "in": "path", + "required": true, + "type": "string" + }, { "name": "metadata.id", "in": "path", @@ -96,13 +114,6 @@ "required": false, "type": "string" }, - { - "name": "metadata.partner", - "description": "Project. Project of the resource", - "in": "query", - "required": false, - "type": "string" - }, { "name": "metadata.modifiedAt", "in": "query", @@ -217,20 +228,18 @@ "tags": [ "User" ] - }, - "delete": { - "operationId": "User_DeleteUser2", + } + }, + "/auth/v3/partner/{metadata.partner}/organization/{metadata.organization}/user/{metadata.id}": { + "get": { + "operationId": "User_GetUser2", "responses": { "200": { "description": "A successful response.", "schema": { - "$ref": "#/definitions/v3DeleteUserResponse" + "$ref": "#/definitions/v3User" } }, - "204": { - "description": "Returned when user is deleted successfully.", - "schema": {} - }, "403": { "description": "Returned when the user does not have permission to access the resource.", "schema": {} @@ -250,6 +259,20 @@ } }, "parameters": [ + { + "name": "metadata.partner", + "description": "Partner to which the resource belongs", + "in": "path", + "required": true, + "type": "string" + }, + { + "name": "metadata.organization", + "description": "Organization to which the resource belongs", + "in": "path", + "required": true, + "type": "string" + }, { "name": "metadata.id", "in": "path", @@ -293,13 +316,6 @@ "required": false, "type": "string" }, - { - "name": "metadata.partner", - "description": "Project. Project of the resource", - "in": "query", - "required": false, - "type": "string" - }, { "name": "metadata.modifiedAt", "in": "query", @@ -443,6 +459,20 @@ } }, "parameters": [ + { + "name": "metadata.partner", + "description": "Partner to which the resource belongs", + "in": "path", + "required": true, + "type": "string" + }, + { + "name": "metadata.organization", + "description": "Organization to which the resource belongs", + "in": "path", + "required": true, + "type": "string" + }, { "name": "metadata.id", "in": "path", @@ -463,7 +493,7 @@ ] } }, - "/auth/v3/user/{metadata.name}": { + "/auth/v3/partner/{metadata.partner}/organization/{metadata.organization}/user/{metadata.name}": { "get": { "operationId": "User_GetUser", "responses": { @@ -492,6 +522,20 @@ } }, "parameters": [ + { + "name": "metadata.partner", + "description": "Partner to which the resource belongs", + "in": "path", + "required": true, + "type": "string" + }, + { + "name": "metadata.organization", + "description": "Organization to which the resource belongs", + "in": "path", + "required": true, + "type": "string" + }, { "name": "metadata.name", "description": "name of the resource", @@ -529,13 +573,6 @@ "required": false, "type": "string" }, - { - "name": "metadata.partner", - "description": "Project. Project of the resource", - "in": "query", - "required": false, - "type": "string" - }, { "name": "metadata.id", "in": "query", @@ -689,6 +726,20 @@ } }, "parameters": [ + { + "name": "metadata.partner", + "description": "Partner to which the resource belongs", + "in": "path", + "required": true, + "type": "string" + }, + { + "name": "metadata.organization", + "description": "Organization to which the resource belongs", + "in": "path", + "required": true, + "type": "string" + }, { "name": "metadata.name", "description": "name of the resource", @@ -726,13 +777,6 @@ "required": false, "type": "string" }, - { - "name": "metadata.partner", - "description": "Project. Project of the resource", - "in": "query", - "required": false, - "type": "string" - }, { "name": "metadata.id", "in": "query", @@ -882,6 +926,20 @@ } }, "parameters": [ + { + "name": "metadata.partner", + "description": "Partner to which the resource belongs", + "in": "path", + "required": true, + "type": "string" + }, + { + "name": "metadata.organization", + "description": "Organization to which the resource belongs", + "in": "path", + "required": true, + "type": "string" + }, { "name": "metadata.name", "description": "name of the resource", @@ -903,7 +961,7 @@ ] } }, - "/auth/v3/users": { + "/auth/v3/partner/{metadata.partner}/organization/{metadata.organization}/users": { "get": { "operationId": "User_GetUsers", "responses": { @@ -931,6 +989,175 @@ } } }, + "parameters": [ + { + "name": "metadata.partner", + "description": "Partner to which the resource belongs", + "in": "path", + "required": true, + "type": "string" + }, + { + "name": "metadata.organization", + "description": "Organization to which the resource belongs", + "in": "path", + "required": true, + "type": "string" + }, + { + "name": "apiVersion", + "description": "API Version. API Version of the user resource", + "in": "query", + "required": false, + "type": "string", + "default": "usermgmt.k8smgmt.io/v3" + }, + { + "name": "kind", + "description": "Kind. Kind of the user resource", + "in": "query", + "required": false, + "type": "string", + "default": "User" + }, + { + "name": "metadata.name", + "description": "Name. name of the resource", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "metadata.description", + "description": "Description. description of the resource", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "metadata.project", + "description": "Project. Project of the resource", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "metadata.id", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "metadata.modifiedAt", + "in": "query", + "required": false, + "type": "string", + "format": "date-time" + }, + { + "name": "spec.firstName", + "description": "FirstName. First name of the user", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "spec.lastName", + "description": "LastName. Last name of the user", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "spec.username", + "description": "Username. Username of the user", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "spec.phone", + "description": "Phone. Phone number of the user", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "spec.password", + "description": "Password. Password of the user", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "spec.groups", + "description": "Group. Groups the user belongs to", + "in": "query", + "required": false, + "type": "array", + "items": { + "type": "string" + }, + "collectionFormat": "multi" + }, + { + "name": "spec.emailVerified", + "description": "EmailVerified. Flag to show if the email of the user was verified", + "in": "query", + "required": false, + "type": "boolean" + }, + { + "name": "spec.phoneVerified", + "description": "PhoneVerified. Flag to show if phone number of the user was verified", + "in": "query", + "required": false, + "type": "boolean" + }, + { + "name": "spec.totpVerified", + "description": "TotpVerified. Flag to show if the TOTP of the user was verified", + "in": "query", + "required": false, + "type": "boolean" + }, + { + "name": "status.conditionType", + "description": "Condition Type. type of the status condition", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "status.conditionStatus", + "description": "Condition Status. status of the condition", + "in": "query", + "required": false, + "type": "string", + "enum": [ + "StatusNotSet", + "StatusSubmitted", + "StatusOK", + "StatusFailed" + ], + "default": "StatusNotSet" + }, + { + "name": "status.lastUpdated", + "description": "Last Updated. when the condition status is last updated", + "in": "query", + "required": false, + "type": "string", + "format": "date-time" + }, + { + "name": "status.reason", + "description": "Reason. reason of the last condition status", + "in": "query", + "required": false, + "type": "string" + } + ], "tags": [ "User" ] @@ -967,6 +1194,20 @@ } }, "parameters": [ + { + "name": "metadata.partner", + "description": "Partner to which the resource belongs", + "in": "path", + "required": true, + "type": "string" + }, + { + "name": "metadata.organization", + "description": "Organization to which the resource belongs", + "in": "path", + "required": true, + "type": "string" + }, { "name": "body", "in": "body", @@ -1119,10 +1360,15 @@ "description": "Project of the resource", "title": "Project" }, + "organization": { + "type": "string", + "description": "Organization to which the resource belongs", + "title": "Organization" + }, "partner": { "type": "string", - "description": "Project of the resource", - "title": "Project" + "description": "Partner to which the resource belongs", + "title": "Partner" }, "id": { "type": "string", diff --git a/components/usermgmt/go.mod b/components/usermgmt/go.mod index 63c3290..1b8e20d 100644 --- a/components/usermgmt/go.mod +++ b/components/usermgmt/go.mod @@ -6,9 +6,14 @@ require ( github.com/RafaySystems/rcloud-base/components/adminsrv v0.0.0-unpublished github.com/RafaySystems/rcloud-base/components/common v0.0.0-unpublished github.com/gogo/protobuf v1.3.2 + github.com/google/uuid v1.3.0 github.com/grpc-ecosystem/grpc-gateway/v2 v2.7.2 github.com/ory/kratos-client-go v0.8.2-alpha.1 github.com/spf13/viper v1.10.1 + github.com/uptrace/bun v1.0.20 + github.com/uptrace/bun/dialect/pgdialect v1.0.20 + github.com/uptrace/bun/driver/pgdriver v1.0.20 + github.com/uptrace/bun/extra/bundebug v1.0.20 google.golang.org/genproto v0.0.0-20211208223120-3a66f561d7aa google.golang.org/grpc v1.43.0 google.golang.org/protobuf v1.27.1 diff --git a/components/usermgmt/go.sum b/components/usermgmt/go.sum index 1ea4d27..fda661d 100644 --- a/components/usermgmt/go.sum +++ b/components/usermgmt/go.sum @@ -147,6 +147,7 @@ github.com/evanphx/json-patch v0.5.2/go.mod h1:ZWS5hhDbVDyob71nXKNL0+PWn6ToqBHMi github.com/evanphx/json-patch v4.12.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk= github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4= github.com/fatih/color v1.9.0/go.mod h1:eQcE1qtQxscV5RaZvpXrrb8Drkc3/DdQ+uUYCNjL+zU= +github.com/fatih/color v1.13.0 h1:8LOYc1KYPPmyKMuN8QV2DNRWNbLo6LZ0iLs8+mlH53w= github.com/fatih/color v1.13.0/go.mod h1:kLAiJbzzSOZDVNGyDpeOxJ47H46qBXwg5ILebYFFOfk= github.com/felixge/httpsnoop v1.0.1/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSwevea8zH2U= github.com/form3tech-oss/jwt-go v3.2.2+incompatible/go.mod h1:pbq4aXjuKjdthFRnoDwaVPLA+WlJuPGy+QneDUgJi2k= @@ -261,6 +262,7 @@ github.com/google/pprof v0.0.0-20210609004039-a478d1d731e9/go.mod h1:kpwsk12EmLe github.com/google/pprof v0.0.0-20210720184732-4bb14d4b1be1/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI= github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= +github.com/google/uuid v1.3.0 h1:t6JiXgmwXMjEs8VusXIJk2BXHsn+wx8BZdTaoZ5fu7I= github.com/google/uuid v1.3.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+vpHVxEJEs9eg= github.com/googleapis/gax-go/v2 v2.0.5/go.mod h1:DWXyrwAJ9X0FpwwEdw+IPEYBICEFu5mhpdKc/us6bOk= @@ -323,6 +325,7 @@ github.com/imdario/mergo v0.3.5/go.mod h1:2EnlNZ0deacrJVfApfmtdGgDfMuh/nq6Ok1EcJ github.com/imdario/mergo v0.3.12/go.mod h1:jmQim1M+e3UYxmgPu/WyfjB3N3VflVyUjjjwH0dnCYA= github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8= github.com/jessevdk/go-flags v1.4.0/go.mod h1:4FA24M0QyGHXBuZZK/XkWh8h0e1EYbRYJSGM75WSRxI= +github.com/jinzhu/inflection v1.0.0 h1:K317FqzuhWc8YvSVlFMCCUb36O/S9MCKRDI7QkRKD/E= github.com/jinzhu/inflection v1.0.0/go.mod h1:h+uFLlag+Qp1Va5pdKtLDYj+kHp5pxUVkryuEj+Srlc= github.com/jonboulle/clockwork v0.1.0/go.mod h1:Ii8DK3G1RaLaWxj9trq07+26W01tbo22gdxWY5EU2bo= github.com/jonboulle/clockwork v0.2.2/go.mod h1:Pkfl5aHPm1nk2H9h0bjmnJD/BcgbGXUBGnn1kMkgxc8= @@ -366,12 +369,14 @@ github.com/mattn/go-colorable v0.0.9/go.mod h1:9vuHe8Xs5qXnSaW/c/ABM9alt+Vo+STaO github.com/mattn/go-colorable v0.1.4/go.mod h1:U0ppj6V5qS13XJ6of8GYAs25YV2eR4EVcfRqFIhoBtE= github.com/mattn/go-colorable v0.1.6/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc= github.com/mattn/go-colorable v0.1.9/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc= +github.com/mattn/go-colorable v0.1.12 h1:jF+Du6AlPIjs2BiUiQlKOX0rt3SujHxPnksPKZbaA40= github.com/mattn/go-colorable v0.1.12/go.mod h1:u5H1YNBxpqRaxsYJYSkiCWKzEfiAb1Gb520KVy5xxl4= github.com/mattn/go-isatty v0.0.3/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4= github.com/mattn/go-isatty v0.0.8/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hdxcsrc5s= github.com/mattn/go-isatty v0.0.10/go.mod h1:qgIWMr58cqv1PHHyhnkY9lrL7etaEgOFcMEpPG5Rm84= github.com/mattn/go-isatty v0.0.11/go.mod h1:PhnuNfih5lzO57/f3n+odYbM4JtupLOxQOAqxQCu2WE= github.com/mattn/go-isatty v0.0.12/go.mod h1:cbi8OIDigv2wuxKPP5vlRcQ1OAZbq2CE4Kysco4FUpU= +github.com/mattn/go-isatty v0.0.14 h1:yVuAays6BHfxijgZPzw+3Zlu5yQgKGP2/hcQbHb7S9Y= github.com/mattn/go-isatty v0.0.14/go.mod h1:7GGIvUiUoEMVVmxf/4nioHXj79iQHKdU27kJ6hsGG94= github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0= github.com/matttproud/golang_protobuf_extensions v1.0.2-0.20181231171920-c182affec369/go.mod h1:BSXmuO+STAnVfrANrmjBb36TMTDstsz7MSK+HVaYKv4= @@ -525,13 +530,20 @@ github.com/subosito/gotenv v1.2.0 h1:Slr1R9HxAlEKefgq5jn9U+DnETlIUa6HfgEzj0g5d7s github.com/subosito/gotenv v1.2.0/go.mod h1:N0PQaV/YGNqwC0u51sEeR/aUtSLEXKX9iv69rRypqCw= github.com/tmc/grpc-websocket-proxy v0.0.0-20190109142713-0ad062ec5ee5/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= github.com/tmc/grpc-websocket-proxy v0.0.0-20201229170055-e5319fda7802/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= +github.com/tmthrgd/go-hex v0.0.0-20190904060850-447a3041c3bc h1:9lRDQMhESg+zvGYmW5DyG0UqvY96Bu5QYsTLvCHdrgo= github.com/tmthrgd/go-hex v0.0.0-20190904060850-447a3041c3bc/go.mod h1:bciPuU6GHm1iF1pBvUfxfsH0Wmnc2VbpgvbI9ZWuIRs= github.com/tv42/httpunix v0.0.0-20150427012821-b75d8614f926/go.mod h1:9ESjWnEqriFuLhtthL60Sar/7RFoluCcXsuvEwTV5KM= +github.com/uptrace/bun v1.0.20 h1:/T4p9C9tEN75U3cFMBr5njlP+rBfs4An8BmlQQPbcfE= github.com/uptrace/bun v1.0.20/go.mod h1:Uv7z0z+7dXnUS9P5hMF0hdiM/4M+xOUHQCrZpyDrpRc= +github.com/uptrace/bun/dialect/pgdialect v1.0.20 h1:1Yajz0M2AhOzvxFEQSAQ8TpqzSRFxYOg+saksIQ0dmU= github.com/uptrace/bun/dialect/pgdialect v1.0.20/go.mod h1:Z2UoOgTKHXgFOuInXsJKkNQJiFIaPkCvsj0EayOI2yk= +github.com/uptrace/bun/driver/pgdriver v1.0.20 h1:CEWHL5NS5FQIJAJxY40t0llwe8XxVlsblbgi9Upm0fA= github.com/uptrace/bun/driver/pgdriver v1.0.20/go.mod h1:KAONvCIiI4A6HdMTZ8zCdGxh7P6+23Todz+bL8HRzV4= +github.com/uptrace/bun/extra/bundebug v1.0.20 h1:lwuGUMiqujR3NuGDKgJu1j7XL3LsULSv1MDFHlYBAGs= github.com/uptrace/bun/extra/bundebug v1.0.20/go.mod h1:tDoi/zmjHkumthaCujwfI2+mni0G41HfJD4HC2oMdpk= +github.com/vmihailenco/msgpack/v5 v5.3.5 h1:5gO0H1iULLWGhs2H5tbAHIZTV8/cYafcFOr9znI5mJU= github.com/vmihailenco/msgpack/v5 v5.3.5/go.mod h1:7xyJ9e+0+9SaZT0Wt1RGleJXzli6Q/V5KbhBonMG9jc= +github.com/vmihailenco/tagparser/v2 v2.0.0 h1:y09buUbR+b5aycVFQs/g70pqKVZNBmxwAhO7/IwNM9g= github.com/vmihailenco/tagparser/v2 v2.0.0/go.mod h1:Wri+At7QHww0WTrCBeu4J6bNtoV6mEfg5OIWRZA9qds= github.com/xiang90/probing v0.0.0-20190116061207-43a291ad63a2/go.mod h1:UETIi67q53MR2AWcXfiuqkDkRtnGDLqkBTpCHuJHxtU= github.com/yuin/goldmark v1.1.25/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= @@ -598,6 +610,7 @@ golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8U golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20201002170205-7f63de1d35b0/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20210817164053-32db794688a5/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= +golang.org/x/crypto v0.0.0-20211215153901-e495a2d5b3d3 h1:0es+/5331RGQPcXlMfP+WrnIIS6dNnNRe0WB02W0F4M= golang.org/x/crypto v0.0.0-20211215153901-e495a2d5b3d3/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= @@ -1096,6 +1109,7 @@ k8s.io/klog/v2 v2.30.0/go.mod h1:y1WjHnz7Dj687irZUWR/WLkLc5N1YHtjLdmgWjndZn0= k8s.io/kube-openapi v0.0.0-20211115234752-e816edb12b65/go.mod h1:sX9MT8g7NVZM5lVL/j8QyCCJe8YSMW30QvGZWaCIDIk= k8s.io/utils v0.0.0-20210802155522-efc7438f0176/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA= k8s.io/utils v0.0.0-20210930125809-cb0fa318a74b/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA= +mellium.im/sasl v0.2.1 h1:nspKSRg7/SyO0cRGY71OkfHab8tf9kCts6a6oTDut0w= mellium.im/sasl v0.2.1/go.mod h1:ROaEDLQNuf9vjKqE1SrAfnsobm2YKXT1gnN1uDp1PjQ= rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8= rsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0= diff --git a/components/usermgmt/main.go b/components/usermgmt/main.go index 2ce70e4..7b8aac3 100644 --- a/components/usermgmt/main.go +++ b/components/usermgmt/main.go @@ -2,6 +2,7 @@ package main import ( "context" + "database/sql" "fmt" "net" "net/http" @@ -11,6 +12,10 @@ import ( "github.com/grpc-ecosystem/grpc-gateway/v2/runtime" kclient "github.com/ory/kratos-client-go" "github.com/spf13/viper" + "github.com/uptrace/bun" + "github.com/uptrace/bun/dialect/pgdialect" + "github.com/uptrace/bun/driver/pgdriver" + "github.com/uptrace/bun/extra/bundebug" "sigs.k8s.io/controller-runtime/pkg/manager/signals" "github.com/RafaySystems/rcloud-base/components/common/pkg/auth/interceptors" @@ -18,6 +23,7 @@ import ( "github.com/RafaySystems/rcloud-base/components/common/pkg/gateway" logv2 "github.com/RafaySystems/rcloud-base/components/common/pkg/log/v2" configrpc "github.com/RafaySystems/rcloud-base/components/common/proto/rpc/config" + "github.com/RafaySystems/rcloud-base/components/usermgmt/pkg/server" "github.com/RafaySystems/rcloud-base/components/usermgmt/pkg/service" pbrpcv3 "github.com/RafaySystems/rcloud-base/components/usermgmt/proto/rpc/v3" rpcv3 "github.com/RafaySystems/rcloud-base/components/usermgmt/proto/rpc/v3" @@ -31,6 +37,10 @@ const ( debugPortEnv = "DEBUG_PORT" kratosSchemeEnv = "KRATOS_SCHEME" kratosAddrEnv = "KRATOS_ADDR" + dbAddrEnv = "DB_ADDR" + dbNameEnv = "DB_NAME" + dbUserEnv = "DB_USER" + dbPasswordEnv = "DB_PASSWORD" devEnv = "DEV" configAddrENV = "CONFIG_ADDR" ) @@ -43,6 +53,12 @@ var ( kratosScheme string kratosAddr string kc *kclient.APIClient + dbAddr string + dbName string + dbUser string + dbPassword string + db *bun.DB + gs service.GroupService dev bool _log = logv2.GetLogger() authPool authv3.AuthPool @@ -56,6 +72,10 @@ func setup() { viper.SetDefault(debugPortEnv, 12000) viper.SetDefault(kratosSchemeEnv, "http") viper.SetDefault(kratosAddrEnv, "localhost:4433") + viper.SetDefault(dbAddr, ":5432") + viper.SetDefault(dbNameEnv, "admindb") + viper.SetDefault(dbUserEnv, "admindbuser") + viper.SetDefault(dbPasswordEnv, "admindbpassword") viper.SetDefault(devEnv, true) viper.SetDefault(configAddrENV, "localhost:7000") @@ -64,6 +84,10 @@ func setup() { viper.BindEnv(debugPortEnv) viper.BindEnv(kratosSchemeEnv) viper.BindEnv(kratosAddrEnv) + viper.BindEnv(dbAddrEnv) + viper.BindEnv(dbNameEnv) + viper.BindEnv(dbPasswordEnv) + viper.BindEnv(dbPasswordEnv) viper.BindEnv(devEnv) viper.BindEnv(configAddrENV) @@ -72,6 +96,10 @@ func setup() { debugPort = viper.GetInt(debugPortEnv) kratosScheme = viper.GetString(kratosSchemeEnv) kratosAddr = viper.GetString(kratosAddrEnv) + dbAddr = viper.GetString(dbAddrEnv) + dbName = viper.GetString(dbNameEnv) + dbUser = viper.GetString(dbUserEnv) + dbPassword = viper.GetString(dbPasswordEnv) dev = viper.GetBool(devEnv) configAddr = viper.GetString(configAddrENV) @@ -80,7 +108,18 @@ func setup() { kratosConfig.Servers[0].URL = kratosScheme + "://" + kratosAddr kc = kclient.NewAPIClient(kratosConfig) - _log.Infow("usrmgmt setup complete") + dsn := "postgres://admindbuser:admindbpassword@localhost:5432/admindb?sslmode=disable" + sqldb := sql.OpenDB(pgdriver.NewConnector(pgdriver.WithDSN(dsn))) + db := bun.NewDB(sqldb, pgdialect.New()) + + db.AddQueryHook(bundebug.NewQueryHook( + bundebug.WithVerbose(true), + bundebug.FromEnv("BUNDEBUG"), + )) + + gs = service.NewGroupService(db) + + _log.Infow("usermgmt setup complete") } func run() { @@ -110,6 +149,7 @@ func runAPI(wg *sync.WaitGroup, ctx context.Context) { fmt.Sprintf(":%d", rpcPort), make([]runtime.ServeMuxOption, 0), pbrpcv3.RegisterUserHandlerFromEndpoint, + pbrpcv3.RegisterGroupHandlerFromEndpoint, ) if err != nil { _log.Fatalw("unable to create gateway", "error", err) @@ -137,6 +177,9 @@ func runAPI(wg *sync.WaitGroup, ctx context.Context) { func runRPC(wg *sync.WaitGroup, ctx context.Context) { defer wg.Done() // defer configPool.Close() + defer gs.Close() + + groupServer := server.NewGroupServer(gs) l, err := net.Listen("tcp", fmt.Sprintf(":%d", rpcPort)) if err != nil { @@ -171,6 +214,7 @@ func runRPC(wg *sync.WaitGroup, ctx context.Context) { }() rpcv3.RegisterUserServer(s, service.NewUserServer(kc)) + rpcv3.RegisterGroupServer(s, groupServer) _log.Infow("starting rpc server", "port", rpcPort) err = s.Serve(l) diff --git a/components/usermgmt/master.rest b/components/usermgmt/master.rest index 175a90c..d3886e8 100644 --- a/components/usermgmt/master.rest +++ b/components/usermgmt/master.rest @@ -1,20 +1,43 @@ :host = http://localhost:11000 -:userid = 4c92ca6d-8ff4-4930-bbeb-c19d22ffe71d +:partner = 439fd1c6-e947-4dad-a9e9-ca1f50898f85 +:org = 960bb196-76b2-430a-a72e-88d8362c07c3 +:userid = 8f35abd7-0c8c-4770-a2c7-430f79bb5eb7 + +## Users # Create user -POST :host/auth/v3/users -{"spec": {"username": "newguy@notaprovider.com", "firstName": "John", "lastName": "Doe"}} +POST :host/auth/v3/partner/:partner/organization/:org/users +{"spec": {"username": "anothernewguy@notaprovider.com", "firstName": "John", "lastName": "Doe"}} -> jq-set-var :userid .metadata.id # Get all users -GET :host/auth/v3/users +GET :host/auth/v3/partner/:partner/organization/:org/users # Get single user -GET :host/auth/v3/user/:userid +GET :host/auth/v3/partner/:partner/organization/:org/user/:userid # Update user info -PUT :host/auth/v3/user/:userid +PUT :host/auth/v3/partner/:partner/organization/:org/user/:userid {"spec": {"username": "changedemail@notaprovider.com", "firstName": "John", "lastName": "Doe"}} # Delete single user -DELETE :host/auth/v3/user/:userid \ No newline at end of file +DELETE :host/auth/v3/partner/:partner/organization/:org/user/:userid + + +## Groups + +# Create group + +POST :host/auth/v3/partner/:partner/organization/:org/groups +Content-Type: application/yaml + +metadata: + name: my-group + description: My first description + partner: :partner + organization: :org +spec: + type: simple + +# Get all groups +GET :host/auth/v3/partner/:partner/organization/:org/groups \ No newline at end of file diff --git a/components/usermgmt/pkg/internal/models/group.go b/components/usermgmt/pkg/internal/models/group.go new file mode 100644 index 0000000..51d7e36 --- /dev/null +++ b/components/usermgmt/pkg/internal/models/group.go @@ -0,0 +1,22 @@ +package models + +import ( + "time" + + "github.com/google/uuid" + "github.com/uptrace/bun" +) + +type Group struct { + bun.BaseModel `bun:"table:authsrv_group,alias:group"` + + ID uuid.UUID `bun:"id,type:uuid,pk,default:uuid_generate_v4()"` + Name string `bun:"name,notnull"` + Description string `bun:"description,notnull"` + CreatedAt time.Time `bun:"created_at,notnull,default:current_timestamp"` + ModifiedAt time.Time `bun:"modified_at,notnull,default:current_timestamp"` + Trash bool `bun:"trash,notnull"` + OrganizationId uuid.UUID `bun:"organization_id,type:uuid"` + PartnerId uuid.UUID `bun:"partner_id,type:uuid"` + Type string `bun:"type,notnull"` +} diff --git a/components/usermgmt/pkg/internal/persistence/provider/pg/entity_dao.go b/components/usermgmt/pkg/internal/persistence/provider/pg/entity_dao.go new file mode 100644 index 0000000..5d55f68 --- /dev/null +++ b/components/usermgmt/pkg/internal/persistence/provider/pg/entity_dao.go @@ -0,0 +1,98 @@ +package pg + +import ( + "context" + + "github.com/google/uuid" + bun "github.com/uptrace/bun" +) + +// DAO is the interface for database operations +type EntityDAO interface { + Close() error + // create entity + Create(ctx context.Context, entity interface{}) (interface{}, error) + // get entity by id + GetByID(ctx context.Context, id uuid.UUID, entity interface{}) (interface{}, error) + // get entity by name + GetByName(ctx context.Context, name string, entity interface{}) (interface{}, error) + //Update entity + Update(ctx context.Context, id uuid.UUID, entity interface{}) (interface{}, error) + // delete entity + Delete(ctx context.Context, id uuid.UUID, entity interface{}) error + // get list of entities + List(ctx context.Context, partnerId uuid.NullUUID, organizationId uuid.NullUUID, entities interface{}) (interface{}, error) +} + +type entityDAO struct { + db *bun.DB +} + +func (dao *entityDAO) Close() error { + return dao.db.Close() +} + +// NewEntityDao return new entity dao +func NewEntityDAO(db *bun.DB) EntityDAO { + return &entityDAO{db} +} + +func (dao *entityDAO) Create(ctx context.Context, entity interface{}) (interface{}, error) { + + if _, err := dao.db.NewInsert().Model(entity).Exec(ctx); err != nil { + return nil, err + } + + return entity, nil +} + +func (dao *entityDAO) GetByID(ctx context.Context, id uuid.UUID, entity interface{}) (interface{}, error) { + + err := dao.db.NewSelect().Model(entity). + Where("id = ?", id). + Scan(ctx) + if err != nil { + return nil, err + } + + return entity, nil +} + +func (dao *entityDAO) GetByName(ctx context.Context, name string, entity interface{}) (interface{}, error) { + + err := dao.db.NewSelect().Model(entity). + Where("name = ?", name). + Scan(ctx) + if err != nil { + return nil, err + } + + return entity, nil +} + +func (dao *entityDAO) Update(ctx context.Context, id uuid.UUID, entity interface{}) (interface{}, error) { + if _, err := dao.db.NewUpdate().Model(entity).Where("id = ?", id).Exec(ctx); err != nil { + return nil, err + } + return entity, nil +} + +func (dao *entityDAO) Delete(ctx context.Context, id uuid.UUID, entity interface{}) error { + _, err := dao.db.NewDelete(). + Model(entity). + Where("id = ?", id). + Exec(ctx) + return err +} + +func (dao *entityDAO) List(ctx context.Context, partnerId uuid.NullUUID, organizationId uuid.NullUUID, entities interface{}) (interface{}, error) { + sq := dao.db.NewSelect().Model(entities) + if partnerId.Valid { + sq = sq.Where("partner_id = ?", partnerId) + } + if organizationId.Valid { + sq = sq.Where("organization_id = ?", organizationId) + } + err := sq.Scan(ctx) + return entities, err +} diff --git a/components/usermgmt/pkg/server/group.go b/components/usermgmt/pkg/server/group.go new file mode 100644 index 0000000..38c8888 --- /dev/null +++ b/components/usermgmt/pkg/server/group.go @@ -0,0 +1,63 @@ +package server + +import ( + "context" + + "github.com/RafaySystems/rcloud-base/components/usermgmt/pkg/service" + userpbv3 "github.com/RafaySystems/rcloud-base/components/usermgmt/proto/types/userpb/v3" + rpcv3 "github.com/RafaySystems/rcloud-base/components/usermgmt/proto/rpc/v3" +) + +type groupServer struct { + service.GroupService +} + +// NewGroupServer returns new group server implementation +func NewGroupServer(ps service.GroupService) rpcv3.GroupServer { + return &groupServer{ps} +} + +func (s *groupServer) CreateGroup(ctx context.Context, p *userpbv3.Group) (*userpbv3.Group, error) { + group, err := s.Create(ctx, p) + if err != nil { + return nil, err + } + return group, nil +} + +func (s *groupServer) GetGroups(ctx context.Context, p *userpbv3.Group) (*userpbv3.GroupList, error) { + groups, err := s.List(ctx, p) + if err != nil { + return nil, err + } + return groups, nil +} + +func (s *groupServer) GetGroup(ctx context.Context, p *userpbv3.Group) (*userpbv3.Group, error) { + + group, err := s.GetByName(ctx, p.Metadata.Name) + if err != nil { + group, err = s.GetByID(ctx, p.Metadata.Id) + if err != nil { + return nil, err + } + } + + return group, nil +} + +func (s *groupServer) DeleteGroup(ctx context.Context, p *userpbv3.Group) (*userpbv3.Group, error) { + _, err := s.Delete(ctx, p) + if err != nil { + return nil, err + } + return nil, nil +} + +func (s *groupServer) UpdateGroup(ctx context.Context, p *userpbv3.Group) (*userpbv3.Group, error) { + group, err := s.Update(ctx, p) + if err != nil { + return nil, err + } + return group, nil +} diff --git a/components/usermgmt/pkg/service/group.go b/components/usermgmt/pkg/service/group.go new file mode 100644 index 0000000..bb727b7 --- /dev/null +++ b/components/usermgmt/pkg/service/group.go @@ -0,0 +1,357 @@ +package service + +import ( + "context" + "fmt" + "time" + + v3 "github.com/RafaySystems/rcloud-base/components/common/proto/types/commonpb/v3" + "github.com/RafaySystems/rcloud-base/components/usermgmt/pkg/internal/models" + "github.com/RafaySystems/rcloud-base/components/usermgmt/pkg/internal/persistence/provider/pg" + userv3 "github.com/RafaySystems/rcloud-base/components/usermgmt/proto/types/userpb/v3" + "github.com/google/uuid" + bun "github.com/uptrace/bun" + "google.golang.org/protobuf/types/known/timestamppb" +) + +const ( + apiVersion = "system.k8smgmt.io/v3" + groupKind = "Group" + groupListKind = "GroupList" +) + +// GroupService is the interface for group operations +type GroupService interface { + Close() error + // create group + Create(ctx context.Context, group *userv3.Group) (*userv3.Group, error) + // get group by id + GetByID(ctx context.Context, id string) (*userv3.Group, error) + // get group by name + GetByName(ctx context.Context, name string) (*userv3.Group, error) + // create or update group + Update(ctx context.Context, group *userv3.Group) (*userv3.Group, error) + // delete group + Delete(ctx context.Context, group *userv3.Group) (*userv3.Group, error) + // list groups + List(ctx context.Context, group *userv3.Group) (*userv3.GroupList, error) +} + +// groupService implements GroupService +type groupService struct { + dao pg.EntityDAO +} + +// NewGroupService return new group service +func NewGroupService(db *bun.DB) GroupService { + return &groupService{ + dao: pg.NewEntityDAO(db), + } +} + +func (s *groupService) Create(ctx context.Context, group *userv3.Group) (*userv3.Group, error) { + + partnerId, _ := uuid.Parse(group.GetMetadata().GetPartner()) + organizationId, _ := uuid.Parse(group.GetMetadata().GetOrganization()) + // TODO: find out the interaction if project key is present in the group metadata + // TODO: check if a group with the same 'name' already exists and fail if so + //convert v3 spec to internal models + grp := models.Group{ + Name: group.GetMetadata().GetName(), + Description: group.GetMetadata().GetDescription(), + CreatedAt: time.Now(), + ModifiedAt: time.Now(), + Trash: false, + OrganizationId: organizationId, + PartnerId: partnerId, + Type: group.GetSpec().GetType(), + } + entity, err := s.dao.Create(ctx, &grp) + if err != nil { + group.Status = &v3.Status{ + ConditionType: "Create", + ConditionStatus: v3.ConditionStatus_StatusFailed, + LastUpdated: timestamppb.Now(), + } + return group, err + } + + //update v3 spec + if createdGroup, ok := entity.(*models.Group); ok { + group.Metadata.Id = createdGroup.ID.String() + group.Spec = &userv3.GroupSpec{ + Type: createdGroup.Type, + } + if group.Status != nil { + group.Status = &v3.Status{ + ConditionType: "Create", + ConditionStatus: v3.ConditionStatus_StatusOK, + LastUpdated: timestamppb.Now(), + } + } + } + + return group, nil + +} + +func (s *groupService) GetByID(ctx context.Context, id string) (*userv3.Group, error) { + + group := &userv3.Group{ + ApiVersion: apiVersion, + Kind: groupKind, + Metadata: &v3.Metadata{ + Id: id, + }, + } + + uid, err := uuid.Parse(id) + if err != nil { + group.Status = &v3.Status{ + ConditionType: "Describe", + ConditionStatus: v3.ConditionStatus_StatusFailed, + LastUpdated: timestamppb.Now(), + Reason: err.Error(), + } + return group, err + } + entity, err := s.dao.GetByID(ctx, uid, &models.Group{}) + if err != nil { + group.Status = &v3.Status{ + ConditionType: "Describe", + ConditionStatus: v3.ConditionStatus_StatusFailed, + LastUpdated: timestamppb.Now(), + Reason: err.Error(), + } + return group, err + } + + if grp, ok := entity.(*models.Group); ok { + labels := make(map[string]string) + labels["organization"] = grp.OrganizationId.String() + + group.Metadata = &v3.Metadata{ + Name: grp.Name, + Description: grp.Description, + Id: grp.ID.String(), + Organization: grp.OrganizationId.String(), + Partner: grp.PartnerId.String(), + Labels: labels, + ModifiedAt: timestamppb.New(grp.ModifiedAt), + } + group.Spec = &userv3.GroupSpec{ + Type: grp.Type, + } + group.Status = &v3.Status{ + LastUpdated: timestamppb.Now(), + ConditionType: "Describe", + ConditionStatus: v3.ConditionStatus_StatusOK, + } + + return group, nil + } + return group, nil + +} + +func (s *groupService) GetByName(ctx context.Context, name string) (*userv3.Group, error) { + + group := &userv3.Group{ + ApiVersion: apiVersion, + Kind: groupKind, + Metadata: &v3.Metadata{ + Name: name, + }, + } + + entity, err := s.dao.GetByName(ctx, name, &models.Group{}) + if err != nil { + group.Status = &v3.Status{ + ConditionType: "Describe", + ConditionStatus: v3.ConditionStatus_StatusFailed, + LastUpdated: timestamppb.Now(), + Reason: err.Error(), + } + return group, err + } + + if grp, ok := entity.(*models.Group); ok { + labels := make(map[string]string) + labels["organization"] = grp.OrganizationId.String() + + group.Metadata = &v3.Metadata{ + Name: grp.Name, + Description: grp.Description, + Id: grp.ID.String(), + Organization: grp.OrganizationId.String(), + Partner: grp.PartnerId.String(), + Labels: labels, + ModifiedAt: timestamppb.New(grp.ModifiedAt), + } + group.Spec = &userv3.GroupSpec{ + Type: grp.Type, + } + group.Status = &v3.Status{ + LastUpdated: timestamppb.Now(), + ConditionType: "Describe", + ConditionStatus: v3.ConditionStatus_StatusOK, + } + + return group, nil + } + return group, nil + +} + +func (s *groupService) Update(ctx context.Context, group *userv3.Group) (*userv3.Group, error) { + + id, _ := uuid.Parse(group.Metadata.Id) + entity, err := s.dao.GetByID(ctx, id, &models.Group{}) + if err != nil { + group.Status = &v3.Status{ + ConditionType: "Update", + ConditionStatus: v3.ConditionStatus_StatusFailed, + LastUpdated: timestamppb.Now(), + Reason: err.Error(), + } + return group, err + } + + if grp, ok := entity.(*models.Group); ok { + //update group details + grp.Name = group.Metadata.Name + grp.Description = group.Metadata.Description + grp.Type = group.Spec.Type + grp.ModifiedAt = time.Now() + + _, err = s.dao.Update(ctx, id, grp) + if err != nil { + group.Status = &v3.Status{ + ConditionType: "Update", + ConditionStatus: v3.ConditionStatus_StatusFailed, + LastUpdated: timestamppb.Now(), + Reason: err.Error(), + } + return group, err + } + + //update spec and status + group.Spec = &userv3.GroupSpec{ + Type: grp.Type, + } + group.Status = &v3.Status{ + ConditionType: "Update", + ConditionStatus: v3.ConditionStatus_StatusOK, + LastUpdated: timestamppb.Now(), + } + } + + return group, nil +} + +func (s *groupService) Delete(ctx context.Context, group *userv3.Group) (*userv3.Group, error) { + id, err := uuid.Parse(group.Metadata.Id) + if err != nil { + group.Status = &v3.Status{ + ConditionType: "Delete", + ConditionStatus: v3.ConditionStatus_StatusFailed, + LastUpdated: timestamppb.Now(), + Reason: err.Error(), + } + return group, err + } + entity, err := s.dao.GetByID(ctx, id, &models.Group{}) + if err != nil { + group.Status = &v3.Status{ + ConditionType: "Delete", + ConditionStatus: v3.ConditionStatus_StatusFailed, + LastUpdated: timestamppb.Now(), + Reason: err.Error(), + } + return group, err + } + if grp, ok := entity.(*models.Group); ok { + err = s.dao.Delete(ctx, id, grp) + if err != nil { + group.Status = &v3.Status{ + ConditionType: "Delete", + ConditionStatus: v3.ConditionStatus_StatusFailed, + LastUpdated: timestamppb.Now(), + Reason: err.Error(), + } + return group, err + } + //update v3 spec + group.Metadata.Id = grp.ID.String() + group.Metadata.Name = grp.Name + group.Status = &v3.Status{ + ConditionType: "Delete", + ConditionStatus: v3.ConditionStatus_StatusOK, + LastUpdated: timestamppb.Now(), + } + } + + return group, nil +} + +func (s *groupService) List(ctx context.Context, group *userv3.Group) (*userv3.GroupList, error) { + + var groups []*userv3.Group + groupList := &userv3.GroupList{ + ApiVersion: apiVersion, + Kind: groupListKind, + Metadata: &v3.ListMetadata{ + Count: 0, + }, + } + if len(group.Metadata.Organization) > 0 { + orgId, err := uuid.Parse(group.Metadata.Organization) + if err != nil { + return groupList, err + } + partId, err := uuid.Parse(group.Metadata.Partner) + if err != nil { + return groupList, err + } + var grps []models.Group + entities, err := s.dao.List(ctx, uuid.NullUUID{UUID: partId, Valid: true}, uuid.NullUUID{UUID: orgId, Valid: true}, &grps) + if err != nil { + return groupList, err + } + if grps, ok := entities.(*[]models.Group); ok { + for _, grp := range *grps { + labels := make(map[string]string) + labels["organization"] = grp.OrganizationId.String() + labels["partner"] = grp.PartnerId.String() + + group.Metadata = &v3.Metadata{ + Name: grp.Name, + Description: grp.Description, + Id: grp.ID.String(), + Organization: grp.OrganizationId.String(), + Partner: grp.PartnerId.String(), + Labels: labels, + ModifiedAt: timestamppb.New(grp.ModifiedAt), + } + group.Spec = &userv3.GroupSpec{ + Type: grp.Type, + } + groups = append(groups, group) + } + + //update the list metadata and items response + groupList.Metadata = &v3.ListMetadata{ + Count: int64(len(groups)), + } + groupList.Items = groups + } + + } else { + return groupList, fmt.Errorf("missing organization id in metadata") + } + return groupList, nil +} + +func (s *groupService) Close() error { + return s.dao.Close() +} diff --git a/components/usermgmt/pkg/service/user.go b/components/usermgmt/pkg/service/user.go index 3e37cc5..0989496 100644 --- a/components/usermgmt/pkg/service/user.go +++ b/components/usermgmt/pkg/service/user.go @@ -57,7 +57,7 @@ func (s *server) CreateUser(ctx context.Context, user *userv3.User) (*userv3.Use return user, nil } -func (s *server) GetUsers(ctx context.Context, _ *userrpcv3.GetUsersRequest) (*userv3.UserList, error) { +func (s *server) GetUsers(ctx context.Context, _ *userv3.User) (*userv3.UserList, error) { ir, _, err := s.kc.V0alpha2Api.AdminListIdentities(ctx).Execute() if err != nil { return nil, err diff --git a/components/usermgmt/proto/rpc/v3/group.pb.go b/components/usermgmt/proto/rpc/v3/group.pb.go index d5005af..e844e42 100644 --- a/components/usermgmt/proto/rpc/v3/group.pb.go +++ b/components/usermgmt/proto/rpc/v3/group.pb.go @@ -14,7 +14,6 @@ import ( protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" reflect "reflect" - sync "sync" ) const ( @@ -24,92 +23,6 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) -// Add filtering with org as well -type GetGroupsRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Project string `protobuf:"bytes,1,opt,name=project,proto3" json:"project,omitempty"` -} - -func (x *GetGroupsRequest) Reset() { - *x = GetGroupsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_proto_rpc_v3_group_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *GetGroupsRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GetGroupsRequest) ProtoMessage() {} - -func (x *GetGroupsRequest) ProtoReflect() protoreflect.Message { - mi := &file_proto_rpc_v3_group_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use GetGroupsRequest.ProtoReflect.Descriptor instead. -func (*GetGroupsRequest) Descriptor() ([]byte, []int) { - return file_proto_rpc_v3_group_proto_rawDescGZIP(), []int{0} -} - -func (x *GetGroupsRequest) GetProject() string { - if x != nil { - return x.Project - } - return "" -} - -type DeleteGroupResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields -} - -func (x *DeleteGroupResponse) Reset() { - *x = DeleteGroupResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_proto_rpc_v3_group_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *DeleteGroupResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*DeleteGroupResponse) ProtoMessage() {} - -func (x *DeleteGroupResponse) ProtoReflect() protoreflect.Message { - mi := &file_proto_rpc_v3_group_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use DeleteGroupResponse.ProtoReflect.Descriptor instead. -func (*DeleteGroupResponse) Descriptor() ([]byte, []int) { - return file_proto_rpc_v3_group_proto_rawDescGZIP(), []int{1} -} - var File_proto_rpc_v3_group_proto protoreflect.FileDescriptor var file_proto_rpc_v3_group_proto_rawDesc = []byte{ @@ -124,134 +37,144 @@ var file_proto_rpc_v3_group_proto_rawDesc = []byte{ 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x21, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2f, 0x75, 0x73, 0x65, 0x72, 0x70, 0x62, 0x2f, 0x76, 0x33, 0x2f, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2e, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x22, 0x5a, 0x0a, 0x10, 0x47, 0x65, 0x74, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x73, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x46, 0x0a, 0x07, 0x70, 0x72, 0x6f, 0x6a, 0x65, - 0x63, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x2c, 0x92, 0x41, 0x29, 0x2a, 0x07, 0x50, - 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x32, 0x1c, 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x20, - 0x6f, 0x66, 0x20, 0x75, 0x73, 0x65, 0x72, 0x20, 0x74, 0x6f, 0x20, 0x66, 0x69, 0x6c, 0x74, 0x65, - 0x72, 0x20, 0x62, 0x79, 0x40, 0x01, 0x52, 0x07, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x22, - 0x15, 0x0a, 0x13, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x32, 0xa8, 0x06, 0x0a, 0x05, 0x47, 0x72, 0x6f, 0x75, 0x70, - 0x12, 0xa3, 0x01, 0x0a, 0x0b, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, - 0x12, 0x1e, 0x2e, 0x72, 0x61, 0x66, 0x61, 0x79, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x74, 0x79, 0x70, - 0x65, 0x73, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x2e, 0x47, 0x72, 0x6f, 0x75, 0x70, - 0x1a, 0x1e, 0x2e, 0x72, 0x61, 0x66, 0x61, 0x79, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x74, 0x79, 0x70, - 0x65, 0x73, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x2e, 0x47, 0x72, 0x6f, 0x75, 0x70, - 0x22, 0x54, 0x92, 0x41, 0x37, 0x4a, 0x35, 0x0a, 0x03, 0x32, 0x30, 0x31, 0x12, 0x2e, 0x0a, 0x2c, - 0x52, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x65, 0x64, 0x20, 0x77, 0x68, 0x65, 0x6e, 0x20, 0x67, 0x72, - 0x6f, 0x75, 0x70, 0x20, 0x69, 0x73, 0x20, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x20, 0x73, - 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x66, 0x75, 0x6c, 0x6c, 0x79, 0x2e, 0x82, 0xd3, 0xe4, 0x93, - 0x02, 0x14, 0x22, 0x0f, 0x2f, 0x61, 0x75, 0x74, 0x68, 0x2f, 0x76, 0x33, 0x2f, 0x67, 0x72, 0x6f, - 0x75, 0x70, 0x73, 0x3a, 0x01, 0x2a, 0x12, 0x6c, 0x0a, 0x09, 0x47, 0x65, 0x74, 0x47, 0x72, 0x6f, - 0x75, 0x70, 0x73, 0x12, 0x22, 0x2e, 0x72, 0x61, 0x66, 0x61, 0x79, 0x2e, 0x64, 0x65, 0x76, 0x2e, - 0x72, 0x70, 0x63, 0x2e, 0x76, 0x33, 0x2e, 0x47, 0x65, 0x74, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x73, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x22, 0x2e, 0x72, 0x61, 0x66, 0x61, 0x79, 0x2e, - 0x64, 0x65, 0x76, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x76, - 0x33, 0x2e, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x4c, 0x69, 0x73, 0x74, 0x22, 0x17, 0x82, 0xd3, 0xe4, - 0x93, 0x02, 0x11, 0x12, 0x0f, 0x2f, 0x61, 0x75, 0x74, 0x68, 0x2f, 0x76, 0x33, 0x2f, 0x67, 0x72, - 0x6f, 0x75, 0x70, 0x73, 0x12, 0x92, 0x01, 0x0a, 0x08, 0x47, 0x65, 0x74, 0x47, 0x72, 0x6f, 0x75, - 0x70, 0x12, 0x1e, 0x2e, 0x72, 0x61, 0x66, 0x61, 0x79, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x74, 0x79, - 0x70, 0x65, 0x73, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x2e, 0x47, 0x72, 0x6f, 0x75, - 0x70, 0x1a, 0x1e, 0x2e, 0x72, 0x61, 0x66, 0x61, 0x79, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x74, 0x79, - 0x70, 0x65, 0x73, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x2e, 0x47, 0x72, 0x6f, 0x75, - 0x70, 0x22, 0x46, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x40, 0x12, 0x1e, 0x2f, 0x61, 0x75, 0x74, 0x68, - 0x2f, 0x76, 0x33, 0x2f, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2f, 0x7b, 0x6d, 0x65, 0x74, 0x61, 0x64, - 0x61, 0x74, 0x61, 0x2e, 0x6e, 0x61, 0x6d, 0x65, 0x7d, 0x5a, 0x1e, 0x12, 0x1c, 0x2f, 0x61, 0x75, - 0x74, 0x68, 0x2f, 0x76, 0x33, 0x2f, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2f, 0x7b, 0x6d, 0x65, 0x74, - 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x69, 0x64, 0x7d, 0x12, 0x9b, 0x01, 0x0a, 0x0b, 0x55, 0x70, - 0x64, 0x61, 0x74, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x12, 0x1e, 0x2e, 0x72, 0x61, 0x66, 0x61, - 0x79, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x75, 0x73, 0x65, 0x72, - 0x2e, 0x76, 0x33, 0x2e, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x1a, 0x1e, 0x2e, 0x72, 0x61, 0x66, 0x61, - 0x79, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x75, 0x73, 0x65, 0x72, - 0x2e, 0x76, 0x33, 0x2e, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x22, 0x4c, 0x82, 0xd3, 0xe4, 0x93, 0x02, - 0x46, 0x1a, 0x1e, 0x2f, 0x61, 0x75, 0x74, 0x68, 0x2f, 0x76, 0x33, 0x2f, 0x67, 0x72, 0x6f, 0x75, - 0x70, 0x2f, 0x7b, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x6e, 0x61, 0x6d, 0x65, - 0x7d, 0x3a, 0x01, 0x2a, 0x5a, 0x21, 0x1a, 0x1c, 0x2f, 0x61, 0x75, 0x74, 0x68, 0x2f, 0x76, 0x33, + 0x6f, 0x74, 0x6f, 0x32, 0xa4, 0x0a, 0x0a, 0x05, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x12, 0xe4, 0x01, + 0x0a, 0x0b, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x12, 0x1e, 0x2e, + 0x72, 0x61, 0x66, 0x61, 0x79, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, + 0x75, 0x73, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x2e, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x1a, 0x1e, 0x2e, + 0x72, 0x61, 0x66, 0x61, 0x79, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, + 0x75, 0x73, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x2e, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x22, 0x94, 0x01, + 0x92, 0x41, 0x37, 0x4a, 0x35, 0x0a, 0x03, 0x32, 0x30, 0x31, 0x12, 0x2e, 0x0a, 0x2c, 0x52, 0x65, + 0x74, 0x75, 0x72, 0x6e, 0x65, 0x64, 0x20, 0x77, 0x68, 0x65, 0x6e, 0x20, 0x67, 0x72, 0x6f, 0x75, + 0x70, 0x20, 0x69, 0x73, 0x20, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x20, 0x73, 0x75, 0x63, + 0x63, 0x65, 0x73, 0x73, 0x66, 0x75, 0x6c, 0x6c, 0x79, 0x2e, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x54, + 0x22, 0x4f, 0x2f, 0x61, 0x75, 0x74, 0x68, 0x2f, 0x76, 0x33, 0x2f, 0x70, 0x61, 0x72, 0x74, 0x6e, + 0x65, 0x72, 0x2f, 0x7b, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x70, 0x61, 0x72, + 0x74, 0x6e, 0x65, 0x72, 0x7d, 0x2f, 0x6f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x2f, 0x7b, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x6f, 0x72, 0x67, + 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x7d, 0x2f, 0x67, 0x72, 0x6f, 0x75, 0x70, + 0x73, 0x3a, 0x01, 0x2a, 0x12, 0xa8, 0x01, 0x0a, 0x09, 0x47, 0x65, 0x74, 0x47, 0x72, 0x6f, 0x75, + 0x70, 0x73, 0x12, 0x1e, 0x2e, 0x72, 0x61, 0x66, 0x61, 0x79, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x74, + 0x79, 0x70, 0x65, 0x73, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x2e, 0x47, 0x72, 0x6f, + 0x75, 0x70, 0x1a, 0x22, 0x2e, 0x72, 0x61, 0x66, 0x61, 0x79, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x74, + 0x79, 0x70, 0x65, 0x73, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x2e, 0x47, 0x72, 0x6f, + 0x75, 0x70, 0x4c, 0x69, 0x73, 0x74, 0x22, 0x57, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x51, 0x12, 0x4f, + 0x2f, 0x61, 0x75, 0x74, 0x68, 0x2f, 0x76, 0x33, 0x2f, 0x70, 0x61, 0x72, 0x74, 0x6e, 0x65, 0x72, + 0x2f, 0x7b, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x70, 0x61, 0x72, 0x74, 0x6e, + 0x65, 0x72, 0x7d, 0x2f, 0x6f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x2f, 0x7b, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x6f, 0x72, 0x67, 0x61, 0x6e, + 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x7d, 0x2f, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x73, 0x12, + 0x94, 0x02, 0x0a, 0x08, 0x47, 0x65, 0x74, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x12, 0x1e, 0x2e, 0x72, + 0x61, 0x66, 0x61, 0x79, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x75, + 0x73, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x2e, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x1a, 0x1e, 0x2e, 0x72, + 0x61, 0x66, 0x61, 0x79, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x75, + 0x73, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x2e, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x22, 0xc7, 0x01, 0x82, + 0xd3, 0xe4, 0x93, 0x02, 0xc0, 0x01, 0x12, 0x5e, 0x2f, 0x61, 0x75, 0x74, 0x68, 0x2f, 0x76, 0x33, + 0x2f, 0x70, 0x61, 0x72, 0x74, 0x6e, 0x65, 0x72, 0x2f, 0x7b, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, + 0x74, 0x61, 0x2e, 0x70, 0x61, 0x72, 0x74, 0x6e, 0x65, 0x72, 0x7d, 0x2f, 0x6f, 0x72, 0x67, 0x61, + 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x7b, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, + 0x74, 0x61, 0x2e, 0x6f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x7d, 0x2f, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2f, 0x7b, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, - 0x2e, 0x69, 0x64, 0x7d, 0x3a, 0x01, 0x2a, 0x12, 0xd7, 0x01, 0x0a, 0x0b, 0x44, 0x65, 0x6c, 0x65, - 0x74, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x12, 0x1e, 0x2e, 0x72, 0x61, 0x66, 0x61, 0x79, 0x2e, - 0x64, 0x65, 0x76, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x76, - 0x33, 0x2e, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x1a, 0x25, 0x2e, 0x72, 0x61, 0x66, 0x61, 0x79, 0x2e, - 0x64, 0x65, 0x76, 0x2e, 0x72, 0x70, 0x63, 0x2e, 0x76, 0x33, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, - 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x80, - 0x01, 0x92, 0x41, 0x37, 0x4a, 0x35, 0x0a, 0x03, 0x32, 0x30, 0x34, 0x12, 0x2e, 0x0a, 0x2c, 0x52, - 0x65, 0x74, 0x75, 0x72, 0x6e, 0x65, 0x64, 0x20, 0x77, 0x68, 0x65, 0x6e, 0x20, 0x67, 0x72, 0x6f, - 0x75, 0x70, 0x20, 0x69, 0x73, 0x20, 0x64, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x64, 0x20, 0x73, 0x75, - 0x63, 0x63, 0x65, 0x73, 0x73, 0x66, 0x75, 0x6c, 0x6c, 0x79, 0x2e, 0x82, 0xd3, 0xe4, 0x93, 0x02, - 0x40, 0x2a, 0x1e, 0x2f, 0x61, 0x75, 0x74, 0x68, 0x2f, 0x76, 0x33, 0x2f, 0x67, 0x72, 0x6f, 0x75, - 0x70, 0x2f, 0x7b, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x6e, 0x61, 0x6d, 0x65, - 0x7d, 0x5a, 0x1e, 0x2a, 0x1c, 0x2f, 0x61, 0x75, 0x74, 0x68, 0x2f, 0x76, 0x33, 0x2f, 0x67, 0x72, - 0x6f, 0x75, 0x70, 0x2f, 0x7b, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x69, 0x64, - 0x7d, 0x42, 0xcd, 0x04, 0x0a, 0x14, 0x63, 0x6f, 0x6d, 0x2e, 0x72, 0x61, 0x66, 0x61, 0x79, 0x2e, - 0x64, 0x65, 0x76, 0x2e, 0x72, 0x70, 0x63, 0x2e, 0x76, 0x33, 0x42, 0x0a, 0x47, 0x72, 0x6f, 0x75, - 0x70, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x4a, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, - 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x52, 0x61, 0x66, 0x61, 0x79, 0x53, 0x79, 0x73, 0x74, 0x65, 0x6d, - 0x73, 0x2f, 0x72, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2d, 0x62, 0x61, 0x73, 0x65, 0x2f, 0x63, 0x6f, - 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x73, 0x2f, 0x75, 0x73, 0x65, 0x72, 0x6d, 0x67, 0x6d, - 0x74, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x72, 0x70, 0x63, 0x2f, 0x76, 0x33, 0x3b, 0x72, - 0x70, 0x63, 0x76, 0x33, 0xa2, 0x02, 0x03, 0x52, 0x44, 0x52, 0xaa, 0x02, 0x10, 0x52, 0x61, 0x66, - 0x61, 0x79, 0x2e, 0x44, 0x65, 0x76, 0x2e, 0x52, 0x70, 0x63, 0x2e, 0x56, 0x33, 0xca, 0x02, 0x10, - 0x52, 0x61, 0x66, 0x61, 0x79, 0x5c, 0x44, 0x65, 0x76, 0x5c, 0x52, 0x70, 0x63, 0x5c, 0x56, 0x33, - 0xe2, 0x02, 0x1c, 0x52, 0x61, 0x66, 0x61, 0x79, 0x5c, 0x44, 0x65, 0x76, 0x5c, 0x52, 0x70, 0x63, - 0x5c, 0x56, 0x33, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, - 0x02, 0x13, 0x52, 0x61, 0x66, 0x61, 0x79, 0x3a, 0x3a, 0x44, 0x65, 0x76, 0x3a, 0x3a, 0x52, 0x70, - 0x63, 0x3a, 0x3a, 0x56, 0x33, 0x92, 0x41, 0xe4, 0x02, 0x12, 0x2c, 0x0a, 0x18, 0x47, 0x72, 0x6f, - 0x75, 0x70, 0x20, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x20, 0x53, 0x65, - 0x72, 0x76, 0x69, 0x63, 0x65, 0x22, 0x0b, 0x0a, 0x09, 0x52, 0x61, 0x66, 0x61, 0x79, 0x20, 0x44, - 0x65, 0x76, 0x32, 0x03, 0x32, 0x2e, 0x30, 0x2a, 0x01, 0x02, 0x32, 0x10, 0x61, 0x70, 0x70, 0x6c, - 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x6a, 0x73, 0x6f, 0x6e, 0x32, 0x10, 0x61, 0x70, - 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x79, 0x61, 0x6d, 0x6c, 0x3a, 0x10, - 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x6a, 0x73, 0x6f, 0x6e, - 0x3a, 0x10, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x79, 0x61, - 0x6d, 0x6c, 0x52, 0x51, 0x0a, 0x03, 0x34, 0x30, 0x33, 0x12, 0x4a, 0x0a, 0x48, 0x52, 0x65, 0x74, - 0x75, 0x72, 0x6e, 0x65, 0x64, 0x20, 0x77, 0x68, 0x65, 0x6e, 0x20, 0x74, 0x68, 0x65, 0x20, 0x67, - 0x72, 0x6f, 0x75, 0x70, 0x20, 0x64, 0x6f, 0x65, 0x73, 0x20, 0x6e, 0x6f, 0x74, 0x20, 0x68, 0x61, - 0x76, 0x65, 0x20, 0x70, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x20, 0x74, 0x6f, - 0x20, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x20, 0x74, 0x68, 0x65, 0x20, 0x72, 0x65, 0x73, 0x6f, - 0x75, 0x72, 0x63, 0x65, 0x2e, 0x52, 0x3b, 0x0a, 0x03, 0x34, 0x30, 0x34, 0x12, 0x34, 0x0a, 0x2a, - 0x52, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x65, 0x64, 0x20, 0x77, 0x68, 0x65, 0x6e, 0x20, 0x74, 0x68, - 0x65, 0x20, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x20, 0x64, 0x6f, 0x65, 0x73, 0x20, - 0x6e, 0x6f, 0x74, 0x20, 0x65, 0x78, 0x69, 0x73, 0x74, 0x2e, 0x12, 0x06, 0x0a, 0x04, 0x9a, 0x02, - 0x01, 0x07, 0x5a, 0x38, 0x0a, 0x25, 0x0a, 0x0a, 0x41, 0x70, 0x69, 0x4b, 0x65, 0x79, 0x41, 0x75, - 0x74, 0x68, 0x12, 0x17, 0x08, 0x02, 0x1a, 0x11, 0x58, 0x2d, 0x52, 0x41, 0x46, 0x41, 0x59, 0x2d, - 0x41, 0x50, 0x49, 0x2d, 0x4b, 0x45, 0x59, 0x49, 0x44, 0x20, 0x02, 0x0a, 0x0f, 0x0a, 0x09, 0x42, - 0x61, 0x73, 0x69, 0x63, 0x41, 0x75, 0x74, 0x68, 0x12, 0x02, 0x08, 0x01, 0x62, 0x1f, 0x0a, 0x0e, - 0x0a, 0x0a, 0x41, 0x70, 0x69, 0x4b, 0x65, 0x79, 0x41, 0x75, 0x74, 0x68, 0x12, 0x00, 0x0a, 0x0d, - 0x0a, 0x09, 0x42, 0x61, 0x73, 0x69, 0x63, 0x41, 0x75, 0x74, 0x68, 0x12, 0x00, 0xc8, 0xe2, 0x1e, - 0x01, 0xd0, 0xe2, 0x1e, 0x01, 0xe0, 0xe2, 0x1e, 0x01, 0xc0, 0xe3, 0x1e, 0x01, 0xc8, 0xe3, 0x1e, - 0x01, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x2e, 0x6e, 0x61, 0x6d, 0x65, 0x7d, 0x5a, 0x5e, 0x12, 0x5c, 0x2f, 0x61, 0x75, 0x74, 0x68, 0x2f, + 0x76, 0x33, 0x2f, 0x70, 0x61, 0x72, 0x74, 0x6e, 0x65, 0x72, 0x2f, 0x7b, 0x6d, 0x65, 0x74, 0x61, + 0x64, 0x61, 0x74, 0x61, 0x2e, 0x70, 0x61, 0x72, 0x74, 0x6e, 0x65, 0x72, 0x7d, 0x2f, 0x6f, 0x72, + 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x7b, 0x6d, 0x65, 0x74, 0x61, + 0x64, 0x61, 0x74, 0x61, 0x2e, 0x6f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x7d, 0x2f, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2f, 0x7b, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, + 0x74, 0x61, 0x2e, 0x69, 0x64, 0x7d, 0x12, 0x9d, 0x02, 0x0a, 0x0b, 0x55, 0x70, 0x64, 0x61, 0x74, + 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x12, 0x1e, 0x2e, 0x72, 0x61, 0x66, 0x61, 0x79, 0x2e, 0x64, + 0x65, 0x76, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x76, 0x33, + 0x2e, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x1a, 0x1e, 0x2e, 0x72, 0x61, 0x66, 0x61, 0x79, 0x2e, 0x64, + 0x65, 0x76, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x76, 0x33, + 0x2e, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x22, 0xcd, 0x01, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0xc6, 0x01, + 0x1a, 0x5e, 0x2f, 0x61, 0x75, 0x74, 0x68, 0x2f, 0x76, 0x33, 0x2f, 0x70, 0x61, 0x72, 0x74, 0x6e, + 0x65, 0x72, 0x2f, 0x7b, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x70, 0x61, 0x72, + 0x74, 0x6e, 0x65, 0x72, 0x7d, 0x2f, 0x6f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x2f, 0x7b, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x6f, 0x72, 0x67, + 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x7d, 0x2f, 0x67, 0x72, 0x6f, 0x75, 0x70, + 0x2f, 0x7b, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x6e, 0x61, 0x6d, 0x65, 0x7d, + 0x3a, 0x01, 0x2a, 0x5a, 0x61, 0x1a, 0x5c, 0x2f, 0x61, 0x75, 0x74, 0x68, 0x2f, 0x76, 0x33, 0x2f, + 0x70, 0x61, 0x72, 0x74, 0x6e, 0x65, 0x72, 0x2f, 0x7b, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, + 0x61, 0x2e, 0x70, 0x61, 0x72, 0x74, 0x6e, 0x65, 0x72, 0x7d, 0x2f, 0x6f, 0x72, 0x67, 0x61, 0x6e, + 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x7b, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, + 0x61, 0x2e, 0x6f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x7d, 0x2f, + 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2f, 0x7b, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, + 0x69, 0x64, 0x7d, 0x3a, 0x01, 0x2a, 0x12, 0xd1, 0x02, 0x0a, 0x0b, 0x44, 0x65, 0x6c, 0x65, 0x74, + 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x12, 0x1e, 0x2e, 0x72, 0x61, 0x66, 0x61, 0x79, 0x2e, 0x64, + 0x65, 0x76, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x76, 0x33, + 0x2e, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x1a, 0x1e, 0x2e, 0x72, 0x61, 0x66, 0x61, 0x79, 0x2e, 0x64, + 0x65, 0x76, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x76, 0x33, + 0x2e, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x22, 0x81, 0x02, 0x92, 0x41, 0x37, 0x4a, 0x35, 0x0a, 0x03, + 0x32, 0x30, 0x34, 0x12, 0x2e, 0x0a, 0x2c, 0x52, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x65, 0x64, 0x20, + 0x77, 0x68, 0x65, 0x6e, 0x20, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x20, 0x69, 0x73, 0x20, 0x64, 0x65, + 0x6c, 0x65, 0x74, 0x65, 0x64, 0x20, 0x73, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x66, 0x75, 0x6c, + 0x6c, 0x79, 0x2e, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0xc0, 0x01, 0x2a, 0x5e, 0x2f, 0x61, 0x75, 0x74, + 0x68, 0x2f, 0x76, 0x33, 0x2f, 0x70, 0x61, 0x72, 0x74, 0x6e, 0x65, 0x72, 0x2f, 0x7b, 0x6d, 0x65, + 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x70, 0x61, 0x72, 0x74, 0x6e, 0x65, 0x72, 0x7d, 0x2f, + 0x6f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x7b, 0x6d, 0x65, + 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x6f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x7d, 0x2f, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2f, 0x7b, 0x6d, 0x65, 0x74, 0x61, + 0x64, 0x61, 0x74, 0x61, 0x2e, 0x6e, 0x61, 0x6d, 0x65, 0x7d, 0x5a, 0x5e, 0x2a, 0x5c, 0x2f, 0x61, + 0x75, 0x74, 0x68, 0x2f, 0x76, 0x33, 0x2f, 0x70, 0x61, 0x72, 0x74, 0x6e, 0x65, 0x72, 0x2f, 0x7b, + 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x70, 0x61, 0x72, 0x74, 0x6e, 0x65, 0x72, + 0x7d, 0x2f, 0x6f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x7b, + 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x6f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x7d, 0x2f, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2f, 0x7b, 0x6d, 0x65, + 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x69, 0x64, 0x7d, 0x42, 0xcd, 0x04, 0x0a, 0x14, 0x63, + 0x6f, 0x6d, 0x2e, 0x72, 0x61, 0x66, 0x61, 0x79, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x72, 0x70, 0x63, + 0x2e, 0x76, 0x33, 0x42, 0x0a, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, + 0x01, 0x5a, 0x4a, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x52, 0x61, + 0x66, 0x61, 0x79, 0x53, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x73, 0x2f, 0x72, 0x63, 0x6c, 0x6f, 0x75, + 0x64, 0x2d, 0x62, 0x61, 0x73, 0x65, 0x2f, 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, + 0x73, 0x2f, 0x75, 0x73, 0x65, 0x72, 0x6d, 0x67, 0x6d, 0x74, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x2f, 0x72, 0x70, 0x63, 0x2f, 0x76, 0x33, 0x3b, 0x72, 0x70, 0x63, 0x76, 0x33, 0xa2, 0x02, 0x03, + 0x52, 0x44, 0x52, 0xaa, 0x02, 0x10, 0x52, 0x61, 0x66, 0x61, 0x79, 0x2e, 0x44, 0x65, 0x76, 0x2e, + 0x52, 0x70, 0x63, 0x2e, 0x56, 0x33, 0xca, 0x02, 0x10, 0x52, 0x61, 0x66, 0x61, 0x79, 0x5c, 0x44, + 0x65, 0x76, 0x5c, 0x52, 0x70, 0x63, 0x5c, 0x56, 0x33, 0xe2, 0x02, 0x1c, 0x52, 0x61, 0x66, 0x61, + 0x79, 0x5c, 0x44, 0x65, 0x76, 0x5c, 0x52, 0x70, 0x63, 0x5c, 0x56, 0x33, 0x5c, 0x47, 0x50, 0x42, + 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x13, 0x52, 0x61, 0x66, 0x61, 0x79, + 0x3a, 0x3a, 0x44, 0x65, 0x76, 0x3a, 0x3a, 0x52, 0x70, 0x63, 0x3a, 0x3a, 0x56, 0x33, 0x92, 0x41, + 0xe4, 0x02, 0x12, 0x2c, 0x0a, 0x18, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x20, 0x6d, 0x61, 0x6e, 0x61, + 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x20, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x22, 0x0b, + 0x0a, 0x09, 0x52, 0x61, 0x66, 0x61, 0x79, 0x20, 0x44, 0x65, 0x76, 0x32, 0x03, 0x32, 0x2e, 0x30, + 0x2a, 0x01, 0x02, 0x32, 0x10, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x2f, 0x6a, 0x73, 0x6f, 0x6e, 0x32, 0x10, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x2f, 0x79, 0x61, 0x6d, 0x6c, 0x3a, 0x10, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x6a, 0x73, 0x6f, 0x6e, 0x3a, 0x10, 0x61, 0x70, 0x70, 0x6c, 0x69, + 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x79, 0x61, 0x6d, 0x6c, 0x52, 0x51, 0x0a, 0x03, 0x34, + 0x30, 0x33, 0x12, 0x4a, 0x0a, 0x48, 0x52, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x65, 0x64, 0x20, 0x77, + 0x68, 0x65, 0x6e, 0x20, 0x74, 0x68, 0x65, 0x20, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x20, 0x64, 0x6f, + 0x65, 0x73, 0x20, 0x6e, 0x6f, 0x74, 0x20, 0x68, 0x61, 0x76, 0x65, 0x20, 0x70, 0x65, 0x72, 0x6d, + 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x20, 0x74, 0x6f, 0x20, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, + 0x20, 0x74, 0x68, 0x65, 0x20, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x2e, 0x52, 0x3b, + 0x0a, 0x03, 0x34, 0x30, 0x34, 0x12, 0x34, 0x0a, 0x2a, 0x52, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x65, + 0x64, 0x20, 0x77, 0x68, 0x65, 0x6e, 0x20, 0x74, 0x68, 0x65, 0x20, 0x72, 0x65, 0x73, 0x6f, 0x75, + 0x72, 0x63, 0x65, 0x20, 0x64, 0x6f, 0x65, 0x73, 0x20, 0x6e, 0x6f, 0x74, 0x20, 0x65, 0x78, 0x69, + 0x73, 0x74, 0x2e, 0x12, 0x06, 0x0a, 0x04, 0x9a, 0x02, 0x01, 0x07, 0x5a, 0x38, 0x0a, 0x25, 0x0a, + 0x0a, 0x41, 0x70, 0x69, 0x4b, 0x65, 0x79, 0x41, 0x75, 0x74, 0x68, 0x12, 0x17, 0x08, 0x02, 0x1a, + 0x11, 0x58, 0x2d, 0x52, 0x41, 0x46, 0x41, 0x59, 0x2d, 0x41, 0x50, 0x49, 0x2d, 0x4b, 0x45, 0x59, + 0x49, 0x44, 0x20, 0x02, 0x0a, 0x0f, 0x0a, 0x09, 0x42, 0x61, 0x73, 0x69, 0x63, 0x41, 0x75, 0x74, + 0x68, 0x12, 0x02, 0x08, 0x01, 0x62, 0x1f, 0x0a, 0x0e, 0x0a, 0x0a, 0x41, 0x70, 0x69, 0x4b, 0x65, + 0x79, 0x41, 0x75, 0x74, 0x68, 0x12, 0x00, 0x0a, 0x0d, 0x0a, 0x09, 0x42, 0x61, 0x73, 0x69, 0x63, + 0x41, 0x75, 0x74, 0x68, 0x12, 0x00, 0xc8, 0xe2, 0x1e, 0x01, 0xd0, 0xe2, 0x1e, 0x01, 0xe0, 0xe2, + 0x1e, 0x01, 0xc0, 0xe3, 0x1e, 0x01, 0xc8, 0xe3, 0x1e, 0x01, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x33, } -var ( - file_proto_rpc_v3_group_proto_rawDescOnce sync.Once - file_proto_rpc_v3_group_proto_rawDescData = file_proto_rpc_v3_group_proto_rawDesc -) - -func file_proto_rpc_v3_group_proto_rawDescGZIP() []byte { - file_proto_rpc_v3_group_proto_rawDescOnce.Do(func() { - file_proto_rpc_v3_group_proto_rawDescData = protoimpl.X.CompressGZIP(file_proto_rpc_v3_group_proto_rawDescData) - }) - return file_proto_rpc_v3_group_proto_rawDescData -} - -var file_proto_rpc_v3_group_proto_msgTypes = make([]protoimpl.MessageInfo, 2) var file_proto_rpc_v3_group_proto_goTypes = []interface{}{ - (*GetGroupsRequest)(nil), // 0: rafay.dev.rpc.v3.GetGroupsRequest - (*DeleteGroupResponse)(nil), // 1: rafay.dev.rpc.v3.DeleteGroupResponse - (*v3.Group)(nil), // 2: rafay.dev.types.user.v3.Group - (*v3.GroupList)(nil), // 3: rafay.dev.types.user.v3.GroupList + (*v3.Group)(nil), // 0: rafay.dev.types.user.v3.Group + (*v3.GroupList)(nil), // 1: rafay.dev.types.user.v3.GroupList } var file_proto_rpc_v3_group_proto_depIdxs = []int32{ - 2, // 0: rafay.dev.rpc.v3.Group.CreateGroup:input_type -> rafay.dev.types.user.v3.Group - 0, // 1: rafay.dev.rpc.v3.Group.GetGroups:input_type -> rafay.dev.rpc.v3.GetGroupsRequest - 2, // 2: rafay.dev.rpc.v3.Group.GetGroup:input_type -> rafay.dev.types.user.v3.Group - 2, // 3: rafay.dev.rpc.v3.Group.UpdateGroup:input_type -> rafay.dev.types.user.v3.Group - 2, // 4: rafay.dev.rpc.v3.Group.DeleteGroup:input_type -> rafay.dev.types.user.v3.Group - 2, // 5: rafay.dev.rpc.v3.Group.CreateGroup:output_type -> rafay.dev.types.user.v3.Group - 3, // 6: rafay.dev.rpc.v3.Group.GetGroups:output_type -> rafay.dev.types.user.v3.GroupList - 2, // 7: rafay.dev.rpc.v3.Group.GetGroup:output_type -> rafay.dev.types.user.v3.Group - 2, // 8: rafay.dev.rpc.v3.Group.UpdateGroup:output_type -> rafay.dev.types.user.v3.Group - 1, // 9: rafay.dev.rpc.v3.Group.DeleteGroup:output_type -> rafay.dev.rpc.v3.DeleteGroupResponse + 0, // 0: rafay.dev.rpc.v3.Group.CreateGroup:input_type -> rafay.dev.types.user.v3.Group + 0, // 1: rafay.dev.rpc.v3.Group.GetGroups:input_type -> rafay.dev.types.user.v3.Group + 0, // 2: rafay.dev.rpc.v3.Group.GetGroup:input_type -> rafay.dev.types.user.v3.Group + 0, // 3: rafay.dev.rpc.v3.Group.UpdateGroup:input_type -> rafay.dev.types.user.v3.Group + 0, // 4: rafay.dev.rpc.v3.Group.DeleteGroup:input_type -> rafay.dev.types.user.v3.Group + 0, // 5: rafay.dev.rpc.v3.Group.CreateGroup:output_type -> rafay.dev.types.user.v3.Group + 1, // 6: rafay.dev.rpc.v3.Group.GetGroups:output_type -> rafay.dev.types.user.v3.GroupList + 0, // 7: rafay.dev.rpc.v3.Group.GetGroup:output_type -> rafay.dev.types.user.v3.Group + 0, // 8: rafay.dev.rpc.v3.Group.UpdateGroup:output_type -> rafay.dev.types.user.v3.Group + 0, // 9: rafay.dev.rpc.v3.Group.DeleteGroup:output_type -> rafay.dev.types.user.v3.Group 5, // [5:10] is the sub-list for method output_type 0, // [0:5] is the sub-list for method input_type 0, // [0:0] is the sub-list for extension type_name @@ -264,45 +187,18 @@ func file_proto_rpc_v3_group_proto_init() { if File_proto_rpc_v3_group_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_proto_rpc_v3_group_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetGroupsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_proto_rpc_v3_group_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*DeleteGroupResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_proto_rpc_v3_group_proto_rawDesc, NumEnums: 0, - NumMessages: 2, + NumMessages: 0, NumExtensions: 0, NumServices: 1, }, GoTypes: file_proto_rpc_v3_group_proto_goTypes, DependencyIndexes: file_proto_rpc_v3_group_proto_depIdxs, - MessageInfos: file_proto_rpc_v3_group_proto_msgTypes, }.Build() File_proto_rpc_v3_group_proto = out.File file_proto_rpc_v3_group_proto_rawDesc = nil diff --git a/components/usermgmt/proto/rpc/v3/group.pb.gw.go b/components/usermgmt/proto/rpc/v3/group.pb.gw.go index 2e8f44b..bdb507c 100644 --- a/components/usermgmt/proto/rpc/v3/group.pb.gw.go +++ b/components/usermgmt/proto/rpc/v3/group.pb.gw.go @@ -44,6 +44,33 @@ func request_Group_CreateGroup_0(ctx context.Context, marshaler runtime.Marshale return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["metadata.partner"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "metadata.partner") + } + + err = runtime.PopulateFieldFromPath(&protoReq, "metadata.partner", val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "metadata.partner", err) + } + + val, ok = pathParams["metadata.organization"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "metadata.organization") + } + + err = runtime.PopulateFieldFromPath(&protoReq, "metadata.organization", val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "metadata.organization", err) + } + msg, err := client.CreateGroup(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err @@ -61,19 +88,73 @@ func local_request_Group_CreateGroup_0(ctx context.Context, marshaler runtime.Ma return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["metadata.partner"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "metadata.partner") + } + + err = runtime.PopulateFieldFromPath(&protoReq, "metadata.partner", val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "metadata.partner", err) + } + + val, ok = pathParams["metadata.organization"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "metadata.organization") + } + + err = runtime.PopulateFieldFromPath(&protoReq, "metadata.organization", val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "metadata.organization", err) + } + msg, err := server.CreateGroup(ctx, &protoReq) return msg, metadata, err } var ( - filter_Group_GetGroups_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} + filter_Group_GetGroups_0 = &utilities.DoubleArray{Encoding: map[string]int{"metadata": 0, "partner": 1, "organization": 2}, Base: []int{1, 1, 1, 2, 0, 0}, Check: []int{0, 1, 2, 2, 3, 4}} ) func request_Group_GetGroups_0(ctx context.Context, marshaler runtime.Marshaler, client GroupClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq GetGroupsRequest + var protoReq userv3.Group var metadata runtime.ServerMetadata + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["metadata.partner"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "metadata.partner") + } + + err = runtime.PopulateFieldFromPath(&protoReq, "metadata.partner", val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "metadata.partner", err) + } + + val, ok = pathParams["metadata.organization"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "metadata.organization") + } + + err = runtime.PopulateFieldFromPath(&protoReq, "metadata.organization", val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "metadata.organization", err) + } + if err := req.ParseForm(); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } @@ -87,9 +168,36 @@ func request_Group_GetGroups_0(ctx context.Context, marshaler runtime.Marshaler, } func local_request_Group_GetGroups_0(ctx context.Context, marshaler runtime.Marshaler, server GroupServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq GetGroupsRequest + var protoReq userv3.Group var metadata runtime.ServerMetadata + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["metadata.partner"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "metadata.partner") + } + + err = runtime.PopulateFieldFromPath(&protoReq, "metadata.partner", val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "metadata.partner", err) + } + + val, ok = pathParams["metadata.organization"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "metadata.organization") + } + + err = runtime.PopulateFieldFromPath(&protoReq, "metadata.organization", val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "metadata.organization", err) + } + if err := req.ParseForm(); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } @@ -103,7 +211,7 @@ func local_request_Group_GetGroups_0(ctx context.Context, marshaler runtime.Mars } var ( - filter_Group_GetGroup_0 = &utilities.DoubleArray{Encoding: map[string]int{"metadata": 0, "name": 1}, Base: []int{1, 1, 1, 0}, Check: []int{0, 1, 2, 3}} + filter_Group_GetGroup_0 = &utilities.DoubleArray{Encoding: map[string]int{"metadata": 0, "partner": 1, "organization": 2, "name": 3}, Base: []int{1, 1, 1, 2, 3, 0, 0, 0}, Check: []int{0, 1, 2, 2, 2, 3, 4, 5}} ) func request_Group_GetGroup_0(ctx context.Context, marshaler runtime.Marshaler, client GroupClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -117,6 +225,26 @@ func request_Group_GetGroup_0(ctx context.Context, marshaler runtime.Marshaler, _ = err ) + val, ok = pathParams["metadata.partner"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "metadata.partner") + } + + err = runtime.PopulateFieldFromPath(&protoReq, "metadata.partner", val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "metadata.partner", err) + } + + val, ok = pathParams["metadata.organization"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "metadata.organization") + } + + err = runtime.PopulateFieldFromPath(&protoReq, "metadata.organization", val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "metadata.organization", err) + } + val, ok = pathParams["metadata.name"] if !ok { return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "metadata.name") @@ -150,6 +278,26 @@ func local_request_Group_GetGroup_0(ctx context.Context, marshaler runtime.Marsh _ = err ) + val, ok = pathParams["metadata.partner"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "metadata.partner") + } + + err = runtime.PopulateFieldFromPath(&protoReq, "metadata.partner", val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "metadata.partner", err) + } + + val, ok = pathParams["metadata.organization"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "metadata.organization") + } + + err = runtime.PopulateFieldFromPath(&protoReq, "metadata.organization", val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "metadata.organization", err) + } + val, ok = pathParams["metadata.name"] if !ok { return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "metadata.name") @@ -173,7 +321,7 @@ func local_request_Group_GetGroup_0(ctx context.Context, marshaler runtime.Marsh } var ( - filter_Group_GetGroup_1 = &utilities.DoubleArray{Encoding: map[string]int{"metadata": 0, "id": 1}, Base: []int{1, 1, 1, 0}, Check: []int{0, 1, 2, 3}} + filter_Group_GetGroup_1 = &utilities.DoubleArray{Encoding: map[string]int{"metadata": 0, "partner": 1, "organization": 2, "id": 3}, Base: []int{1, 1, 1, 2, 3, 0, 0, 0}, Check: []int{0, 1, 2, 2, 2, 3, 4, 5}} ) func request_Group_GetGroup_1(ctx context.Context, marshaler runtime.Marshaler, client GroupClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -187,6 +335,26 @@ func request_Group_GetGroup_1(ctx context.Context, marshaler runtime.Marshaler, _ = err ) + val, ok = pathParams["metadata.partner"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "metadata.partner") + } + + err = runtime.PopulateFieldFromPath(&protoReq, "metadata.partner", val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "metadata.partner", err) + } + + val, ok = pathParams["metadata.organization"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "metadata.organization") + } + + err = runtime.PopulateFieldFromPath(&protoReq, "metadata.organization", val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "metadata.organization", err) + } + val, ok = pathParams["metadata.id"] if !ok { return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "metadata.id") @@ -220,6 +388,26 @@ func local_request_Group_GetGroup_1(ctx context.Context, marshaler runtime.Marsh _ = err ) + val, ok = pathParams["metadata.partner"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "metadata.partner") + } + + err = runtime.PopulateFieldFromPath(&protoReq, "metadata.partner", val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "metadata.partner", err) + } + + val, ok = pathParams["metadata.organization"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "metadata.organization") + } + + err = runtime.PopulateFieldFromPath(&protoReq, "metadata.organization", val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "metadata.organization", err) + } + val, ok = pathParams["metadata.id"] if !ok { return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "metadata.id") @@ -261,6 +449,26 @@ func request_Group_UpdateGroup_0(ctx context.Context, marshaler runtime.Marshale _ = err ) + val, ok = pathParams["metadata.partner"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "metadata.partner") + } + + err = runtime.PopulateFieldFromPath(&protoReq, "metadata.partner", val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "metadata.partner", err) + } + + val, ok = pathParams["metadata.organization"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "metadata.organization") + } + + err = runtime.PopulateFieldFromPath(&protoReq, "metadata.organization", val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "metadata.organization", err) + } + val, ok = pathParams["metadata.name"] if !ok { return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "metadata.name") @@ -295,6 +503,26 @@ func local_request_Group_UpdateGroup_0(ctx context.Context, marshaler runtime.Ma _ = err ) + val, ok = pathParams["metadata.partner"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "metadata.partner") + } + + err = runtime.PopulateFieldFromPath(&protoReq, "metadata.partner", val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "metadata.partner", err) + } + + val, ok = pathParams["metadata.organization"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "metadata.organization") + } + + err = runtime.PopulateFieldFromPath(&protoReq, "metadata.organization", val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "metadata.organization", err) + } + val, ok = pathParams["metadata.name"] if !ok { return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "metadata.name") @@ -329,6 +557,26 @@ func request_Group_UpdateGroup_1(ctx context.Context, marshaler runtime.Marshale _ = err ) + val, ok = pathParams["metadata.partner"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "metadata.partner") + } + + err = runtime.PopulateFieldFromPath(&protoReq, "metadata.partner", val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "metadata.partner", err) + } + + val, ok = pathParams["metadata.organization"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "metadata.organization") + } + + err = runtime.PopulateFieldFromPath(&protoReq, "metadata.organization", val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "metadata.organization", err) + } + val, ok = pathParams["metadata.id"] if !ok { return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "metadata.id") @@ -363,6 +611,26 @@ func local_request_Group_UpdateGroup_1(ctx context.Context, marshaler runtime.Ma _ = err ) + val, ok = pathParams["metadata.partner"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "metadata.partner") + } + + err = runtime.PopulateFieldFromPath(&protoReq, "metadata.partner", val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "metadata.partner", err) + } + + val, ok = pathParams["metadata.organization"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "metadata.organization") + } + + err = runtime.PopulateFieldFromPath(&protoReq, "metadata.organization", val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "metadata.organization", err) + } + val, ok = pathParams["metadata.id"] if !ok { return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "metadata.id") @@ -379,7 +647,7 @@ func local_request_Group_UpdateGroup_1(ctx context.Context, marshaler runtime.Ma } var ( - filter_Group_DeleteGroup_0 = &utilities.DoubleArray{Encoding: map[string]int{"metadata": 0, "name": 1}, Base: []int{1, 1, 1, 0}, Check: []int{0, 1, 2, 3}} + filter_Group_DeleteGroup_0 = &utilities.DoubleArray{Encoding: map[string]int{"metadata": 0, "partner": 1, "organization": 2, "name": 3}, Base: []int{1, 1, 1, 2, 3, 0, 0, 0}, Check: []int{0, 1, 2, 2, 2, 3, 4, 5}} ) func request_Group_DeleteGroup_0(ctx context.Context, marshaler runtime.Marshaler, client GroupClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -393,6 +661,26 @@ func request_Group_DeleteGroup_0(ctx context.Context, marshaler runtime.Marshale _ = err ) + val, ok = pathParams["metadata.partner"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "metadata.partner") + } + + err = runtime.PopulateFieldFromPath(&protoReq, "metadata.partner", val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "metadata.partner", err) + } + + val, ok = pathParams["metadata.organization"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "metadata.organization") + } + + err = runtime.PopulateFieldFromPath(&protoReq, "metadata.organization", val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "metadata.organization", err) + } + val, ok = pathParams["metadata.name"] if !ok { return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "metadata.name") @@ -426,6 +714,26 @@ func local_request_Group_DeleteGroup_0(ctx context.Context, marshaler runtime.Ma _ = err ) + val, ok = pathParams["metadata.partner"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "metadata.partner") + } + + err = runtime.PopulateFieldFromPath(&protoReq, "metadata.partner", val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "metadata.partner", err) + } + + val, ok = pathParams["metadata.organization"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "metadata.organization") + } + + err = runtime.PopulateFieldFromPath(&protoReq, "metadata.organization", val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "metadata.organization", err) + } + val, ok = pathParams["metadata.name"] if !ok { return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "metadata.name") @@ -449,7 +757,7 @@ func local_request_Group_DeleteGroup_0(ctx context.Context, marshaler runtime.Ma } var ( - filter_Group_DeleteGroup_1 = &utilities.DoubleArray{Encoding: map[string]int{"metadata": 0, "id": 1}, Base: []int{1, 1, 1, 0}, Check: []int{0, 1, 2, 3}} + filter_Group_DeleteGroup_1 = &utilities.DoubleArray{Encoding: map[string]int{"metadata": 0, "partner": 1, "organization": 2, "id": 3}, Base: []int{1, 1, 1, 2, 3, 0, 0, 0}, Check: []int{0, 1, 2, 2, 2, 3, 4, 5}} ) func request_Group_DeleteGroup_1(ctx context.Context, marshaler runtime.Marshaler, client GroupClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -463,6 +771,26 @@ func request_Group_DeleteGroup_1(ctx context.Context, marshaler runtime.Marshale _ = err ) + val, ok = pathParams["metadata.partner"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "metadata.partner") + } + + err = runtime.PopulateFieldFromPath(&protoReq, "metadata.partner", val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "metadata.partner", err) + } + + val, ok = pathParams["metadata.organization"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "metadata.organization") + } + + err = runtime.PopulateFieldFromPath(&protoReq, "metadata.organization", val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "metadata.organization", err) + } + val, ok = pathParams["metadata.id"] if !ok { return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "metadata.id") @@ -496,6 +824,26 @@ func local_request_Group_DeleteGroup_1(ctx context.Context, marshaler runtime.Ma _ = err ) + val, ok = pathParams["metadata.partner"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "metadata.partner") + } + + err = runtime.PopulateFieldFromPath(&protoReq, "metadata.partner", val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "metadata.partner", err) + } + + val, ok = pathParams["metadata.organization"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "metadata.organization") + } + + err = runtime.PopulateFieldFromPath(&protoReq, "metadata.organization", val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "metadata.organization", err) + } + val, ok = pathParams["metadata.id"] if !ok { return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "metadata.id") @@ -530,7 +878,7 @@ func RegisterGroupHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv var stream runtime.ServerTransportStream ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/rafay.dev.rpc.v3.Group/CreateGroup", runtime.WithHTTPPathPattern("/auth/v3/groups")) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/rafay.dev.rpc.v3.Group/CreateGroup", runtime.WithHTTPPathPattern("/auth/v3/partner/{metadata.partner}/organization/{metadata.organization}/groups")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -553,7 +901,7 @@ func RegisterGroupHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv var stream runtime.ServerTransportStream ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/rafay.dev.rpc.v3.Group/GetGroups", runtime.WithHTTPPathPattern("/auth/v3/groups")) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/rafay.dev.rpc.v3.Group/GetGroups", runtime.WithHTTPPathPattern("/auth/v3/partner/{metadata.partner}/organization/{metadata.organization}/groups")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -576,7 +924,7 @@ func RegisterGroupHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv var stream runtime.ServerTransportStream ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/rafay.dev.rpc.v3.Group/GetGroup", runtime.WithHTTPPathPattern("/auth/v3/group/{metadata.name}")) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/rafay.dev.rpc.v3.Group/GetGroup", runtime.WithHTTPPathPattern("/auth/v3/partner/{metadata.partner}/organization/{metadata.organization}/group/{metadata.name}")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -599,7 +947,7 @@ func RegisterGroupHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv var stream runtime.ServerTransportStream ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/rafay.dev.rpc.v3.Group/GetGroup", runtime.WithHTTPPathPattern("/auth/v3/group/{metadata.id}")) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/rafay.dev.rpc.v3.Group/GetGroup", runtime.WithHTTPPathPattern("/auth/v3/partner/{metadata.partner}/organization/{metadata.organization}/group/{metadata.id}")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -622,7 +970,7 @@ func RegisterGroupHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv var stream runtime.ServerTransportStream ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/rafay.dev.rpc.v3.Group/UpdateGroup", runtime.WithHTTPPathPattern("/auth/v3/group/{metadata.name}")) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/rafay.dev.rpc.v3.Group/UpdateGroup", runtime.WithHTTPPathPattern("/auth/v3/partner/{metadata.partner}/organization/{metadata.organization}/group/{metadata.name}")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -645,7 +993,7 @@ func RegisterGroupHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv var stream runtime.ServerTransportStream ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/rafay.dev.rpc.v3.Group/UpdateGroup", runtime.WithHTTPPathPattern("/auth/v3/group/{metadata.id}")) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/rafay.dev.rpc.v3.Group/UpdateGroup", runtime.WithHTTPPathPattern("/auth/v3/partner/{metadata.partner}/organization/{metadata.organization}/group/{metadata.id}")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -668,7 +1016,7 @@ func RegisterGroupHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv var stream runtime.ServerTransportStream ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/rafay.dev.rpc.v3.Group/DeleteGroup", runtime.WithHTTPPathPattern("/auth/v3/group/{metadata.name}")) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/rafay.dev.rpc.v3.Group/DeleteGroup", runtime.WithHTTPPathPattern("/auth/v3/partner/{metadata.partner}/organization/{metadata.organization}/group/{metadata.name}")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -691,7 +1039,7 @@ func RegisterGroupHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv var stream runtime.ServerTransportStream ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/rafay.dev.rpc.v3.Group/DeleteGroup", runtime.WithHTTPPathPattern("/auth/v3/group/{metadata.id}")) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/rafay.dev.rpc.v3.Group/DeleteGroup", runtime.WithHTTPPathPattern("/auth/v3/partner/{metadata.partner}/organization/{metadata.organization}/group/{metadata.id}")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -753,7 +1101,7 @@ func RegisterGroupHandlerClient(ctx context.Context, mux *runtime.ServeMux, clie ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateContext(ctx, mux, req, "/rafay.dev.rpc.v3.Group/CreateGroup", runtime.WithHTTPPathPattern("/auth/v3/groups")) + rctx, err := runtime.AnnotateContext(ctx, mux, req, "/rafay.dev.rpc.v3.Group/CreateGroup", runtime.WithHTTPPathPattern("/auth/v3/partner/{metadata.partner}/organization/{metadata.organization}/groups")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -773,7 +1121,7 @@ func RegisterGroupHandlerClient(ctx context.Context, mux *runtime.ServeMux, clie ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateContext(ctx, mux, req, "/rafay.dev.rpc.v3.Group/GetGroups", runtime.WithHTTPPathPattern("/auth/v3/groups")) + rctx, err := runtime.AnnotateContext(ctx, mux, req, "/rafay.dev.rpc.v3.Group/GetGroups", runtime.WithHTTPPathPattern("/auth/v3/partner/{metadata.partner}/organization/{metadata.organization}/groups")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -793,7 +1141,7 @@ func RegisterGroupHandlerClient(ctx context.Context, mux *runtime.ServeMux, clie ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateContext(ctx, mux, req, "/rafay.dev.rpc.v3.Group/GetGroup", runtime.WithHTTPPathPattern("/auth/v3/group/{metadata.name}")) + rctx, err := runtime.AnnotateContext(ctx, mux, req, "/rafay.dev.rpc.v3.Group/GetGroup", runtime.WithHTTPPathPattern("/auth/v3/partner/{metadata.partner}/organization/{metadata.organization}/group/{metadata.name}")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -813,7 +1161,7 @@ func RegisterGroupHandlerClient(ctx context.Context, mux *runtime.ServeMux, clie ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateContext(ctx, mux, req, "/rafay.dev.rpc.v3.Group/GetGroup", runtime.WithHTTPPathPattern("/auth/v3/group/{metadata.id}")) + rctx, err := runtime.AnnotateContext(ctx, mux, req, "/rafay.dev.rpc.v3.Group/GetGroup", runtime.WithHTTPPathPattern("/auth/v3/partner/{metadata.partner}/organization/{metadata.organization}/group/{metadata.id}")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -833,7 +1181,7 @@ func RegisterGroupHandlerClient(ctx context.Context, mux *runtime.ServeMux, clie ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateContext(ctx, mux, req, "/rafay.dev.rpc.v3.Group/UpdateGroup", runtime.WithHTTPPathPattern("/auth/v3/group/{metadata.name}")) + rctx, err := runtime.AnnotateContext(ctx, mux, req, "/rafay.dev.rpc.v3.Group/UpdateGroup", runtime.WithHTTPPathPattern("/auth/v3/partner/{metadata.partner}/organization/{metadata.organization}/group/{metadata.name}")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -853,7 +1201,7 @@ func RegisterGroupHandlerClient(ctx context.Context, mux *runtime.ServeMux, clie ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateContext(ctx, mux, req, "/rafay.dev.rpc.v3.Group/UpdateGroup", runtime.WithHTTPPathPattern("/auth/v3/group/{metadata.id}")) + rctx, err := runtime.AnnotateContext(ctx, mux, req, "/rafay.dev.rpc.v3.Group/UpdateGroup", runtime.WithHTTPPathPattern("/auth/v3/partner/{metadata.partner}/organization/{metadata.organization}/group/{metadata.id}")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -873,7 +1221,7 @@ func RegisterGroupHandlerClient(ctx context.Context, mux *runtime.ServeMux, clie ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateContext(ctx, mux, req, "/rafay.dev.rpc.v3.Group/DeleteGroup", runtime.WithHTTPPathPattern("/auth/v3/group/{metadata.name}")) + rctx, err := runtime.AnnotateContext(ctx, mux, req, "/rafay.dev.rpc.v3.Group/DeleteGroup", runtime.WithHTTPPathPattern("/auth/v3/partner/{metadata.partner}/organization/{metadata.organization}/group/{metadata.name}")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -893,7 +1241,7 @@ func RegisterGroupHandlerClient(ctx context.Context, mux *runtime.ServeMux, clie ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateContext(ctx, mux, req, "/rafay.dev.rpc.v3.Group/DeleteGroup", runtime.WithHTTPPathPattern("/auth/v3/group/{metadata.id}")) + rctx, err := runtime.AnnotateContext(ctx, mux, req, "/rafay.dev.rpc.v3.Group/DeleteGroup", runtime.WithHTTPPathPattern("/auth/v3/partner/{metadata.partner}/organization/{metadata.organization}/group/{metadata.id}")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -913,21 +1261,21 @@ func RegisterGroupHandlerClient(ctx context.Context, mux *runtime.ServeMux, clie } var ( - pattern_Group_CreateGroup_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"auth", "v3", "groups"}, "")) + pattern_Group_CreateGroup_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3, 2, 4, 1, 0, 4, 1, 5, 5, 2, 6}, []string{"auth", "v3", "partner", "metadata.partner", "organization", "metadata.organization", "groups"}, "")) - pattern_Group_GetGroups_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"auth", "v3", "groups"}, "")) + pattern_Group_GetGroups_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3, 2, 4, 1, 0, 4, 1, 5, 5, 2, 6}, []string{"auth", "v3", "partner", "metadata.partner", "organization", "metadata.organization", "groups"}, "")) - pattern_Group_GetGroup_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3}, []string{"auth", "v3", "group", "metadata.name"}, "")) + pattern_Group_GetGroup_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3, 2, 4, 1, 0, 4, 1, 5, 5, 2, 6, 1, 0, 4, 1, 5, 7}, []string{"auth", "v3", "partner", "metadata.partner", "organization", "metadata.organization", "group", "metadata.name"}, "")) - pattern_Group_GetGroup_1 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3}, []string{"auth", "v3", "group", "metadata.id"}, "")) + pattern_Group_GetGroup_1 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3, 2, 4, 1, 0, 4, 1, 5, 5, 2, 6, 1, 0, 4, 1, 5, 7}, []string{"auth", "v3", "partner", "metadata.partner", "organization", "metadata.organization", "group", "metadata.id"}, "")) - pattern_Group_UpdateGroup_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3}, []string{"auth", "v3", "group", "metadata.name"}, "")) + pattern_Group_UpdateGroup_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3, 2, 4, 1, 0, 4, 1, 5, 5, 2, 6, 1, 0, 4, 1, 5, 7}, []string{"auth", "v3", "partner", "metadata.partner", "organization", "metadata.organization", "group", "metadata.name"}, "")) - pattern_Group_UpdateGroup_1 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3}, []string{"auth", "v3", "group", "metadata.id"}, "")) + pattern_Group_UpdateGroup_1 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3, 2, 4, 1, 0, 4, 1, 5, 5, 2, 6, 1, 0, 4, 1, 5, 7}, []string{"auth", "v3", "partner", "metadata.partner", "organization", "metadata.organization", "group", "metadata.id"}, "")) - pattern_Group_DeleteGroup_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3}, []string{"auth", "v3", "group", "metadata.name"}, "")) + pattern_Group_DeleteGroup_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3, 2, 4, 1, 0, 4, 1, 5, 5, 2, 6, 1, 0, 4, 1, 5, 7}, []string{"auth", "v3", "partner", "metadata.partner", "organization", "metadata.organization", "group", "metadata.name"}, "")) - pattern_Group_DeleteGroup_1 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3}, []string{"auth", "v3", "group", "metadata.id"}, "")) + pattern_Group_DeleteGroup_1 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3, 2, 4, 1, 0, 4, 1, 5, 5, 2, 6, 1, 0, 4, 1, 5, 7}, []string{"auth", "v3", "partner", "metadata.partner", "organization", "metadata.organization", "group", "metadata.id"}, "")) ) var ( diff --git a/components/usermgmt/proto/rpc/v3/group.proto b/components/usermgmt/proto/rpc/v3/group.proto index a99ce47..2fb9c80 100644 --- a/components/usermgmt/proto/rpc/v3/group.proto +++ b/components/usermgmt/proto/rpc/v3/group.proto @@ -65,22 +65,11 @@ option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_swagger) = { } }; -// Add filtering with org as well -message GetGroupsRequest { - string project = 1 - [ (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { - title : "Project", - description : "Project of user to filter by" - read_only : true - } ]; -} -message DeleteGroupResponse {} - service Group { rpc CreateGroup(rafay.dev.types.user.v3.Group) returns (rafay.dev.types.user.v3.Group) { option (google.api.http) = { - post : "/auth/v3/groups" + post : "/auth/v3/partner/{metadata.partner}/organization/{metadata.organization}/groups" body : "*" }; @@ -92,37 +81,37 @@ service Group { }; }; - rpc GetGroups(GetGroupsRequest) returns (rafay.dev.types.user.v3.GroupList) { + rpc GetGroups(rafay.dev.types.user.v3.Group) returns (rafay.dev.types.user.v3.GroupList) { option (google.api.http) = { - get : "/auth/v3/groups" + get : "/auth/v3/partner/{metadata.partner}/organization/{metadata.organization}/groups" }; }; rpc GetGroup(rafay.dev.types.user.v3.Group) returns (rafay.dev.types.user.v3.Group) { option (google.api.http) = { - get : "/auth/v3/group/{metadata.name}" + get : "/auth/v3/partner/{metadata.partner}/organization/{metadata.organization}/group/{metadata.name}" additional_bindings { - get : "/auth/v3/group/{metadata.id}" + get : "/auth/v3/partner/{metadata.partner}/organization/{metadata.organization}/group/{metadata.id}" } }; }; rpc UpdateGroup(rafay.dev.types.user.v3.Group) returns (rafay.dev.types.user.v3.Group) { option (google.api.http) = { - put : "/auth/v3/group/{metadata.name}" + put : "/auth/v3/partner/{metadata.partner}/organization/{metadata.organization}/group/{metadata.name}" body : "*" additional_bindings { - put : "/auth/v3/group/{metadata.id}" + put : "/auth/v3/partner/{metadata.partner}/organization/{metadata.organization}/group/{metadata.id}" body : "*" } }; }; - rpc DeleteGroup(rafay.dev.types.user.v3.Group) returns (DeleteGroupResponse) { + rpc DeleteGroup(rafay.dev.types.user.v3.Group) returns (rafay.dev.types.user.v3.Group) { option (google.api.http) = { - delete : "/auth/v3/group/{metadata.name}" + delete : "/auth/v3/partner/{metadata.partner}/organization/{metadata.organization}/group/{metadata.name}" additional_bindings { - delete : "/auth/v3/group/{metadata.id}" + delete : "/auth/v3/partner/{metadata.partner}/organization/{metadata.organization}/group/{metadata.id}" } }; diff --git a/components/usermgmt/proto/rpc/v3/group_grpc.pb.go b/components/usermgmt/proto/rpc/v3/group_grpc.pb.go index 860ff06..70944d8 100644 --- a/components/usermgmt/proto/rpc/v3/group_grpc.pb.go +++ b/components/usermgmt/proto/rpc/v3/group_grpc.pb.go @@ -24,10 +24,10 @@ const _ = grpc.SupportPackageIsVersion7 // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. type GroupClient interface { CreateGroup(ctx context.Context, in *v3.Group, opts ...grpc.CallOption) (*v3.Group, error) - GetGroups(ctx context.Context, in *GetGroupsRequest, opts ...grpc.CallOption) (*v3.GroupList, error) + GetGroups(ctx context.Context, in *v3.Group, opts ...grpc.CallOption) (*v3.GroupList, error) GetGroup(ctx context.Context, in *v3.Group, opts ...grpc.CallOption) (*v3.Group, error) UpdateGroup(ctx context.Context, in *v3.Group, opts ...grpc.CallOption) (*v3.Group, error) - DeleteGroup(ctx context.Context, in *v3.Group, opts ...grpc.CallOption) (*DeleteGroupResponse, error) + DeleteGroup(ctx context.Context, in *v3.Group, opts ...grpc.CallOption) (*v3.Group, error) } type groupClient struct { @@ -47,7 +47,7 @@ func (c *groupClient) CreateGroup(ctx context.Context, in *v3.Group, opts ...grp return out, nil } -func (c *groupClient) GetGroups(ctx context.Context, in *GetGroupsRequest, opts ...grpc.CallOption) (*v3.GroupList, error) { +func (c *groupClient) GetGroups(ctx context.Context, in *v3.Group, opts ...grpc.CallOption) (*v3.GroupList, error) { out := new(v3.GroupList) err := c.cc.Invoke(ctx, "/rafay.dev.rpc.v3.Group/GetGroups", in, out, opts...) if err != nil { @@ -74,8 +74,8 @@ func (c *groupClient) UpdateGroup(ctx context.Context, in *v3.Group, opts ...grp return out, nil } -func (c *groupClient) DeleteGroup(ctx context.Context, in *v3.Group, opts ...grpc.CallOption) (*DeleteGroupResponse, error) { - out := new(DeleteGroupResponse) +func (c *groupClient) DeleteGroup(ctx context.Context, in *v3.Group, opts ...grpc.CallOption) (*v3.Group, error) { + out := new(v3.Group) err := c.cc.Invoke(ctx, "/rafay.dev.rpc.v3.Group/DeleteGroup", in, out, opts...) if err != nil { return nil, err @@ -88,10 +88,10 @@ func (c *groupClient) DeleteGroup(ctx context.Context, in *v3.Group, opts ...grp // for forward compatibility type GroupServer interface { CreateGroup(context.Context, *v3.Group) (*v3.Group, error) - GetGroups(context.Context, *GetGroupsRequest) (*v3.GroupList, error) + GetGroups(context.Context, *v3.Group) (*v3.GroupList, error) GetGroup(context.Context, *v3.Group) (*v3.Group, error) UpdateGroup(context.Context, *v3.Group) (*v3.Group, error) - DeleteGroup(context.Context, *v3.Group) (*DeleteGroupResponse, error) + DeleteGroup(context.Context, *v3.Group) (*v3.Group, error) } // UnimplementedGroupServer should be embedded to have forward compatible implementations. @@ -101,7 +101,7 @@ type UnimplementedGroupServer struct { func (UnimplementedGroupServer) CreateGroup(context.Context, *v3.Group) (*v3.Group, error) { return nil, status.Errorf(codes.Unimplemented, "method CreateGroup not implemented") } -func (UnimplementedGroupServer) GetGroups(context.Context, *GetGroupsRequest) (*v3.GroupList, error) { +func (UnimplementedGroupServer) GetGroups(context.Context, *v3.Group) (*v3.GroupList, error) { return nil, status.Errorf(codes.Unimplemented, "method GetGroups not implemented") } func (UnimplementedGroupServer) GetGroup(context.Context, *v3.Group) (*v3.Group, error) { @@ -110,7 +110,7 @@ func (UnimplementedGroupServer) GetGroup(context.Context, *v3.Group) (*v3.Group, func (UnimplementedGroupServer) UpdateGroup(context.Context, *v3.Group) (*v3.Group, error) { return nil, status.Errorf(codes.Unimplemented, "method UpdateGroup not implemented") } -func (UnimplementedGroupServer) DeleteGroup(context.Context, *v3.Group) (*DeleteGroupResponse, error) { +func (UnimplementedGroupServer) DeleteGroup(context.Context, *v3.Group) (*v3.Group, error) { return nil, status.Errorf(codes.Unimplemented, "method DeleteGroup not implemented") } @@ -144,7 +144,7 @@ func _Group_CreateGroup_Handler(srv interface{}, ctx context.Context, dec func(i } func _Group_GetGroups_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(GetGroupsRequest) + in := new(v3.Group) if err := dec(in); err != nil { return nil, err } @@ -156,7 +156,7 @@ func _Group_GetGroups_Handler(srv interface{}, ctx context.Context, dec func(int FullMethod: "/rafay.dev.rpc.v3.Group/GetGroups", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(GroupServer).GetGroups(ctx, req.(*GetGroupsRequest)) + return srv.(GroupServer).GetGroups(ctx, req.(*v3.Group)) } return interceptor(ctx, in, info, handler) } diff --git a/components/usermgmt/proto/rpc/v3/role.pb.go b/components/usermgmt/proto/rpc/v3/role.pb.go index fa53860..ed7c62d 100644 --- a/components/usermgmt/proto/rpc/v3/role.pb.go +++ b/components/usermgmt/proto/rpc/v3/role.pb.go @@ -14,7 +14,6 @@ import ( protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" reflect "reflect" - sync "sync" ) const ( @@ -24,83 +23,6 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) -// TODO: Add filters -type GetRolesRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields -} - -func (x *GetRolesRequest) Reset() { - *x = GetRolesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_proto_rpc_v3_role_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *GetRolesRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GetRolesRequest) ProtoMessage() {} - -func (x *GetRolesRequest) ProtoReflect() protoreflect.Message { - mi := &file_proto_rpc_v3_role_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use GetRolesRequest.ProtoReflect.Descriptor instead. -func (*GetRolesRequest) Descriptor() ([]byte, []int) { - return file_proto_rpc_v3_role_proto_rawDescGZIP(), []int{0} -} - -type DeleteRoleResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields -} - -func (x *DeleteRoleResponse) Reset() { - *x = DeleteRoleResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_proto_rpc_v3_role_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *DeleteRoleResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*DeleteRoleResponse) ProtoMessage() {} - -func (x *DeleteRoleResponse) ProtoReflect() protoreflect.Message { - mi := &file_proto_rpc_v3_role_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use DeleteRoleResponse.ProtoReflect.Descriptor instead. -func (*DeleteRoleResponse) Descriptor() ([]byte, []int) { - return file_proto_rpc_v3_role_proto_rawDescGZIP(), []int{1} -} - var File_proto_rpc_v3_role_proto protoreflect.FileDescriptor var file_proto_rpc_v3_role_proto_rawDesc = []byte{ @@ -115,127 +37,142 @@ var file_proto_rpc_v3_role_proto_rawDesc = []byte{ 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x20, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2f, 0x75, 0x73, 0x65, 0x72, 0x70, 0x62, 0x2f, 0x76, 0x33, 0x2f, 0x72, 0x6f, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x22, 0x11, 0x0a, 0x0f, 0x47, 0x65, 0x74, 0x52, 0x6f, 0x6c, 0x65, 0x73, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x22, 0x14, 0x0a, 0x12, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x52, 0x6f, - 0x6c, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x32, 0x8d, 0x06, 0x0a, 0x04, 0x52, - 0x6f, 0x6c, 0x65, 0x12, 0x9e, 0x01, 0x0a, 0x0a, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x52, 0x6f, - 0x6c, 0x65, 0x12, 0x1d, 0x2e, 0x72, 0x61, 0x66, 0x61, 0x79, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x74, - 0x79, 0x70, 0x65, 0x73, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x2e, 0x52, 0x6f, 0x6c, - 0x65, 0x1a, 0x1d, 0x2e, 0x72, 0x61, 0x66, 0x61, 0x79, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x74, 0x79, - 0x70, 0x65, 0x73, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x2e, 0x52, 0x6f, 0x6c, 0x65, - 0x22, 0x52, 0x92, 0x41, 0x36, 0x4a, 0x34, 0x0a, 0x03, 0x32, 0x30, 0x31, 0x12, 0x2d, 0x0a, 0x2b, - 0x52, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x65, 0x64, 0x20, 0x77, 0x68, 0x65, 0x6e, 0x20, 0x72, 0x6f, - 0x6c, 0x65, 0x20, 0x69, 0x73, 0x20, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x20, 0x73, 0x75, - 0x63, 0x63, 0x65, 0x73, 0x73, 0x66, 0x75, 0x6c, 0x6c, 0x79, 0x2e, 0x82, 0xd3, 0xe4, 0x93, 0x02, - 0x13, 0x22, 0x0e, 0x2f, 0x61, 0x75, 0x74, 0x68, 0x2f, 0x76, 0x33, 0x2f, 0x72, 0x6f, 0x6c, 0x65, - 0x73, 0x3a, 0x01, 0x2a, 0x12, 0x68, 0x0a, 0x08, 0x47, 0x65, 0x74, 0x52, 0x6f, 0x6c, 0x65, 0x73, - 0x12, 0x21, 0x2e, 0x72, 0x61, 0x66, 0x61, 0x79, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x72, 0x70, 0x63, - 0x2e, 0x76, 0x33, 0x2e, 0x47, 0x65, 0x74, 0x52, 0x6f, 0x6c, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x1a, 0x21, 0x2e, 0x72, 0x61, 0x66, 0x61, 0x79, 0x2e, 0x64, 0x65, 0x76, 0x2e, - 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x2e, 0x52, 0x6f, - 0x6c, 0x65, 0x4c, 0x69, 0x73, 0x74, 0x22, 0x16, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x10, 0x12, 0x0e, - 0x2f, 0x61, 0x75, 0x74, 0x68, 0x2f, 0x76, 0x33, 0x2f, 0x72, 0x6f, 0x6c, 0x65, 0x73, 0x12, 0x8d, - 0x01, 0x0a, 0x07, 0x47, 0x65, 0x74, 0x52, 0x6f, 0x6c, 0x65, 0x12, 0x1d, 0x2e, 0x72, 0x61, 0x66, - 0x61, 0x79, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x75, 0x73, 0x65, - 0x72, 0x2e, 0x76, 0x33, 0x2e, 0x52, 0x6f, 0x6c, 0x65, 0x1a, 0x1d, 0x2e, 0x72, 0x61, 0x66, 0x61, + 0x6f, 0x32, 0x8a, 0x0a, 0x0a, 0x04, 0x52, 0x6f, 0x6c, 0x65, 0x12, 0xdf, 0x01, 0x0a, 0x0a, 0x43, + 0x72, 0x65, 0x61, 0x74, 0x65, 0x52, 0x6f, 0x6c, 0x65, 0x12, 0x1d, 0x2e, 0x72, 0x61, 0x66, 0x61, 0x79, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x75, 0x73, 0x65, 0x72, - 0x2e, 0x76, 0x33, 0x2e, 0x52, 0x6f, 0x6c, 0x65, 0x22, 0x44, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x3e, - 0x12, 0x1d, 0x2f, 0x61, 0x75, 0x74, 0x68, 0x2f, 0x76, 0x33, 0x2f, 0x72, 0x6f, 0x6c, 0x65, 0x2f, + 0x2e, 0x76, 0x33, 0x2e, 0x52, 0x6f, 0x6c, 0x65, 0x1a, 0x1d, 0x2e, 0x72, 0x61, 0x66, 0x61, 0x79, + 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, + 0x76, 0x33, 0x2e, 0x52, 0x6f, 0x6c, 0x65, 0x22, 0x92, 0x01, 0x92, 0x41, 0x36, 0x4a, 0x34, 0x0a, + 0x03, 0x32, 0x30, 0x31, 0x12, 0x2d, 0x0a, 0x2b, 0x52, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x65, 0x64, + 0x20, 0x77, 0x68, 0x65, 0x6e, 0x20, 0x72, 0x6f, 0x6c, 0x65, 0x20, 0x69, 0x73, 0x20, 0x63, 0x72, + 0x65, 0x61, 0x74, 0x65, 0x64, 0x20, 0x73, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x66, 0x75, 0x6c, + 0x6c, 0x79, 0x2e, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x53, 0x22, 0x4e, 0x2f, 0x61, 0x75, 0x74, 0x68, + 0x2f, 0x76, 0x33, 0x2f, 0x70, 0x61, 0x72, 0x74, 0x6e, 0x65, 0x72, 0x2f, 0x7b, 0x6d, 0x65, 0x74, + 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x70, 0x61, 0x72, 0x74, 0x6e, 0x65, 0x72, 0x7d, 0x2f, 0x6f, + 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x7b, 0x6d, 0x65, 0x74, + 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x6f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x7d, 0x2f, 0x72, 0x6f, 0x6c, 0x65, 0x73, 0x3a, 0x01, 0x2a, 0x12, 0xa4, 0x01, 0x0a, + 0x08, 0x47, 0x65, 0x74, 0x52, 0x6f, 0x6c, 0x65, 0x73, 0x12, 0x1d, 0x2e, 0x72, 0x61, 0x66, 0x61, + 0x79, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x75, 0x73, 0x65, 0x72, + 0x2e, 0x76, 0x33, 0x2e, 0x52, 0x6f, 0x6c, 0x65, 0x1a, 0x21, 0x2e, 0x72, 0x61, 0x66, 0x61, 0x79, + 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, + 0x76, 0x33, 0x2e, 0x52, 0x6f, 0x6c, 0x65, 0x4c, 0x69, 0x73, 0x74, 0x22, 0x56, 0x82, 0xd3, 0xe4, + 0x93, 0x02, 0x50, 0x12, 0x4e, 0x2f, 0x61, 0x75, 0x74, 0x68, 0x2f, 0x76, 0x33, 0x2f, 0x70, 0x61, + 0x72, 0x74, 0x6e, 0x65, 0x72, 0x2f, 0x7b, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, + 0x70, 0x61, 0x72, 0x74, 0x6e, 0x65, 0x72, 0x7d, 0x2f, 0x6f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x7b, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, + 0x6f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x7d, 0x2f, 0x72, 0x6f, + 0x6c, 0x65, 0x73, 0x12, 0x8f, 0x02, 0x0a, 0x07, 0x47, 0x65, 0x74, 0x52, 0x6f, 0x6c, 0x65, 0x12, + 0x1d, 0x2e, 0x72, 0x61, 0x66, 0x61, 0x79, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x74, 0x79, 0x70, 0x65, + 0x73, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x2e, 0x52, 0x6f, 0x6c, 0x65, 0x1a, 0x1d, + 0x2e, 0x72, 0x61, 0x66, 0x61, 0x79, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, + 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x2e, 0x52, 0x6f, 0x6c, 0x65, 0x22, 0xc5, 0x01, + 0x82, 0xd3, 0xe4, 0x93, 0x02, 0xbe, 0x01, 0x12, 0x5d, 0x2f, 0x61, 0x75, 0x74, 0x68, 0x2f, 0x76, + 0x33, 0x2f, 0x70, 0x61, 0x72, 0x74, 0x6e, 0x65, 0x72, 0x2f, 0x7b, 0x6d, 0x65, 0x74, 0x61, 0x64, + 0x61, 0x74, 0x61, 0x2e, 0x70, 0x61, 0x72, 0x74, 0x6e, 0x65, 0x72, 0x7d, 0x2f, 0x6f, 0x72, 0x67, + 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x7b, 0x6d, 0x65, 0x74, 0x61, 0x64, + 0x61, 0x74, 0x61, 0x2e, 0x6f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x7d, 0x2f, 0x72, 0x6f, 0x6c, 0x65, 0x2f, 0x7b, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, + 0x2e, 0x6e, 0x61, 0x6d, 0x65, 0x7d, 0x5a, 0x5d, 0x12, 0x5b, 0x2f, 0x61, 0x75, 0x74, 0x68, 0x2f, + 0x76, 0x33, 0x2f, 0x70, 0x61, 0x72, 0x74, 0x6e, 0x65, 0x72, 0x2f, 0x7b, 0x6d, 0x65, 0x74, 0x61, + 0x64, 0x61, 0x74, 0x61, 0x2e, 0x70, 0x61, 0x72, 0x74, 0x6e, 0x65, 0x72, 0x7d, 0x2f, 0x6f, 0x72, + 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x7b, 0x6d, 0x65, 0x74, 0x61, + 0x64, 0x61, 0x74, 0x61, 0x2e, 0x6f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x7d, 0x2f, 0x72, 0x6f, 0x6c, 0x65, 0x2f, 0x7b, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, + 0x61, 0x2e, 0x69, 0x64, 0x7d, 0x12, 0x98, 0x02, 0x0a, 0x0a, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, + 0x52, 0x6f, 0x6c, 0x65, 0x12, 0x1d, 0x2e, 0x72, 0x61, 0x66, 0x61, 0x79, 0x2e, 0x64, 0x65, 0x76, + 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x2e, 0x52, + 0x6f, 0x6c, 0x65, 0x1a, 0x1d, 0x2e, 0x72, 0x61, 0x66, 0x61, 0x79, 0x2e, 0x64, 0x65, 0x76, 0x2e, + 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x2e, 0x52, 0x6f, + 0x6c, 0x65, 0x22, 0xcb, 0x01, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0xc4, 0x01, 0x1a, 0x5d, 0x2f, 0x61, + 0x75, 0x74, 0x68, 0x2f, 0x76, 0x33, 0x2f, 0x70, 0x61, 0x72, 0x74, 0x6e, 0x65, 0x72, 0x2f, 0x7b, + 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x70, 0x61, 0x72, 0x74, 0x6e, 0x65, 0x72, + 0x7d, 0x2f, 0x6f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x7b, + 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x6f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x7d, 0x2f, 0x72, 0x6f, 0x6c, 0x65, 0x2f, 0x7b, 0x6d, 0x65, 0x74, + 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x6e, 0x61, 0x6d, 0x65, 0x7d, 0x3a, 0x01, 0x2a, 0x5a, 0x60, + 0x1a, 0x5b, 0x2f, 0x61, 0x75, 0x74, 0x68, 0x2f, 0x76, 0x33, 0x2f, 0x70, 0x61, 0x72, 0x74, 0x6e, + 0x65, 0x72, 0x2f, 0x7b, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x70, 0x61, 0x72, + 0x74, 0x6e, 0x65, 0x72, 0x7d, 0x2f, 0x6f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x2f, 0x7b, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x6f, 0x72, 0x67, + 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x7d, 0x2f, 0x72, 0x6f, 0x6c, 0x65, 0x2f, + 0x7b, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x69, 0x64, 0x7d, 0x3a, 0x01, 0x2a, + 0x12, 0xcb, 0x02, 0x0a, 0x0a, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x52, 0x6f, 0x6c, 0x65, 0x12, + 0x1d, 0x2e, 0x72, 0x61, 0x66, 0x61, 0x79, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x74, 0x79, 0x70, 0x65, + 0x73, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x2e, 0x52, 0x6f, 0x6c, 0x65, 0x1a, 0x1d, + 0x2e, 0x72, 0x61, 0x66, 0x61, 0x79, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, + 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x2e, 0x52, 0x6f, 0x6c, 0x65, 0x22, 0xfe, 0x01, + 0x92, 0x41, 0x36, 0x4a, 0x34, 0x0a, 0x03, 0x32, 0x30, 0x34, 0x12, 0x2d, 0x0a, 0x2b, 0x52, 0x65, + 0x74, 0x75, 0x72, 0x6e, 0x65, 0x64, 0x20, 0x77, 0x68, 0x65, 0x6e, 0x20, 0x72, 0x6f, 0x6c, 0x65, + 0x20, 0x69, 0x73, 0x20, 0x64, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x64, 0x20, 0x73, 0x75, 0x63, 0x63, + 0x65, 0x73, 0x73, 0x66, 0x75, 0x6c, 0x6c, 0x79, 0x2e, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0xbe, 0x01, + 0x2a, 0x5d, 0x2f, 0x61, 0x75, 0x74, 0x68, 0x2f, 0x76, 0x33, 0x2f, 0x70, 0x61, 0x72, 0x74, 0x6e, + 0x65, 0x72, 0x2f, 0x7b, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x70, 0x61, 0x72, + 0x74, 0x6e, 0x65, 0x72, 0x7d, 0x2f, 0x6f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x2f, 0x7b, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x6f, 0x72, 0x67, + 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x7d, 0x2f, 0x72, 0x6f, 0x6c, 0x65, 0x2f, 0x7b, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x6e, 0x61, 0x6d, 0x65, 0x7d, 0x5a, - 0x1d, 0x12, 0x1b, 0x2f, 0x61, 0x75, 0x74, 0x68, 0x2f, 0x76, 0x33, 0x2f, 0x72, 0x6f, 0x6c, 0x65, - 0x2f, 0x7b, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x69, 0x64, 0x7d, 0x12, 0x96, - 0x01, 0x0a, 0x0a, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x52, 0x6f, 0x6c, 0x65, 0x12, 0x1d, 0x2e, - 0x72, 0x61, 0x66, 0x61, 0x79, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, - 0x75, 0x73, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x2e, 0x52, 0x6f, 0x6c, 0x65, 0x1a, 0x1d, 0x2e, 0x72, - 0x61, 0x66, 0x61, 0x79, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x75, - 0x73, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x2e, 0x52, 0x6f, 0x6c, 0x65, 0x22, 0x4a, 0x82, 0xd3, 0xe4, - 0x93, 0x02, 0x44, 0x1a, 0x1d, 0x2f, 0x61, 0x75, 0x74, 0x68, 0x2f, 0x76, 0x33, 0x2f, 0x72, 0x6f, - 0x6c, 0x65, 0x2f, 0x7b, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x6e, 0x61, 0x6d, - 0x65, 0x7d, 0x3a, 0x01, 0x2a, 0x5a, 0x20, 0x1a, 0x1b, 0x2f, 0x61, 0x75, 0x74, 0x68, 0x2f, 0x76, - 0x33, 0x2f, 0x72, 0x6f, 0x6c, 0x65, 0x2f, 0x7b, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, - 0x2e, 0x69, 0x64, 0x7d, 0x3a, 0x01, 0x2a, 0x12, 0xd0, 0x01, 0x0a, 0x0a, 0x44, 0x65, 0x6c, 0x65, - 0x74, 0x65, 0x52, 0x6f, 0x6c, 0x65, 0x12, 0x1d, 0x2e, 0x72, 0x61, 0x66, 0x61, 0x79, 0x2e, 0x64, - 0x65, 0x76, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x76, 0x33, - 0x2e, 0x52, 0x6f, 0x6c, 0x65, 0x1a, 0x24, 0x2e, 0x72, 0x61, 0x66, 0x61, 0x79, 0x2e, 0x64, 0x65, - 0x76, 0x2e, 0x72, 0x70, 0x63, 0x2e, 0x76, 0x33, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x52, - 0x6f, 0x6c, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x7d, 0x92, 0x41, 0x36, - 0x4a, 0x34, 0x0a, 0x03, 0x32, 0x30, 0x34, 0x12, 0x2d, 0x0a, 0x2b, 0x52, 0x65, 0x74, 0x75, 0x72, - 0x6e, 0x65, 0x64, 0x20, 0x77, 0x68, 0x65, 0x6e, 0x20, 0x72, 0x6f, 0x6c, 0x65, 0x20, 0x69, 0x73, - 0x20, 0x64, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x64, 0x20, 0x73, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, - 0x66, 0x75, 0x6c, 0x6c, 0x79, 0x2e, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x3e, 0x2a, 0x1d, 0x2f, 0x61, - 0x75, 0x74, 0x68, 0x2f, 0x76, 0x33, 0x2f, 0x72, 0x6f, 0x6c, 0x65, 0x2f, 0x7b, 0x6d, 0x65, 0x74, - 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x6e, 0x61, 0x6d, 0x65, 0x7d, 0x5a, 0x1d, 0x2a, 0x1b, 0x2f, - 0x61, 0x75, 0x74, 0x68, 0x2f, 0x76, 0x33, 0x2f, 0x72, 0x6f, 0x6c, 0x65, 0x2f, 0x7b, 0x6d, 0x65, - 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x69, 0x64, 0x7d, 0x42, 0xca, 0x04, 0x0a, 0x14, 0x63, - 0x6f, 0x6d, 0x2e, 0x72, 0x61, 0x66, 0x61, 0x79, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x72, 0x70, 0x63, - 0x2e, 0x76, 0x33, 0x42, 0x09, 0x52, 0x6f, 0x6c, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, - 0x5a, 0x4a, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x52, 0x61, 0x66, - 0x61, 0x79, 0x53, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x73, 0x2f, 0x72, 0x63, 0x6c, 0x6f, 0x75, 0x64, - 0x2d, 0x62, 0x61, 0x73, 0x65, 0x2f, 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x73, - 0x2f, 0x75, 0x73, 0x65, 0x72, 0x6d, 0x67, 0x6d, 0x74, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, - 0x72, 0x70, 0x63, 0x2f, 0x76, 0x33, 0x3b, 0x72, 0x70, 0x63, 0x76, 0x33, 0xa2, 0x02, 0x03, 0x52, - 0x44, 0x52, 0xaa, 0x02, 0x10, 0x52, 0x61, 0x66, 0x61, 0x79, 0x2e, 0x44, 0x65, 0x76, 0x2e, 0x52, - 0x70, 0x63, 0x2e, 0x56, 0x33, 0xca, 0x02, 0x10, 0x52, 0x61, 0x66, 0x61, 0x79, 0x5c, 0x44, 0x65, - 0x76, 0x5c, 0x52, 0x70, 0x63, 0x5c, 0x56, 0x33, 0xe2, 0x02, 0x1c, 0x52, 0x61, 0x66, 0x61, 0x79, - 0x5c, 0x44, 0x65, 0x76, 0x5c, 0x52, 0x70, 0x63, 0x5c, 0x56, 0x33, 0x5c, 0x47, 0x50, 0x42, 0x4d, - 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x13, 0x52, 0x61, 0x66, 0x61, 0x79, 0x3a, - 0x3a, 0x44, 0x65, 0x76, 0x3a, 0x3a, 0x52, 0x70, 0x63, 0x3a, 0x3a, 0x56, 0x33, 0x92, 0x41, 0xe2, - 0x02, 0x12, 0x2b, 0x0a, 0x17, 0x52, 0x6f, 0x6c, 0x65, 0x20, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, - 0x6d, 0x65, 0x6e, 0x74, 0x20, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x22, 0x0b, 0x0a, 0x09, - 0x52, 0x61, 0x66, 0x61, 0x79, 0x20, 0x44, 0x65, 0x76, 0x32, 0x03, 0x32, 0x2e, 0x30, 0x2a, 0x01, - 0x02, 0x32, 0x10, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x6a, - 0x73, 0x6f, 0x6e, 0x32, 0x10, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x2f, 0x79, 0x61, 0x6d, 0x6c, 0x3a, 0x10, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x2f, 0x6a, 0x73, 0x6f, 0x6e, 0x3a, 0x10, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x79, 0x61, 0x6d, 0x6c, 0x52, 0x50, 0x0a, 0x03, 0x34, 0x30, 0x33, - 0x12, 0x49, 0x0a, 0x47, 0x52, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x65, 0x64, 0x20, 0x77, 0x68, 0x65, - 0x6e, 0x20, 0x74, 0x68, 0x65, 0x20, 0x72, 0x6f, 0x6c, 0x65, 0x20, 0x64, 0x6f, 0x65, 0x73, 0x20, - 0x6e, 0x6f, 0x74, 0x20, 0x68, 0x61, 0x76, 0x65, 0x20, 0x70, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, - 0x69, 0x6f, 0x6e, 0x20, 0x74, 0x6f, 0x20, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x20, 0x74, 0x68, - 0x65, 0x20, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x2e, 0x52, 0x3b, 0x0a, 0x03, 0x34, - 0x30, 0x34, 0x12, 0x34, 0x0a, 0x2a, 0x52, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x65, 0x64, 0x20, 0x77, - 0x68, 0x65, 0x6e, 0x20, 0x74, 0x68, 0x65, 0x20, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, - 0x20, 0x64, 0x6f, 0x65, 0x73, 0x20, 0x6e, 0x6f, 0x74, 0x20, 0x65, 0x78, 0x69, 0x73, 0x74, 0x2e, - 0x12, 0x06, 0x0a, 0x04, 0x9a, 0x02, 0x01, 0x07, 0x5a, 0x38, 0x0a, 0x25, 0x0a, 0x0a, 0x41, 0x70, - 0x69, 0x4b, 0x65, 0x79, 0x41, 0x75, 0x74, 0x68, 0x12, 0x17, 0x08, 0x02, 0x1a, 0x11, 0x58, 0x2d, - 0x52, 0x41, 0x46, 0x41, 0x59, 0x2d, 0x41, 0x50, 0x49, 0x2d, 0x4b, 0x45, 0x59, 0x49, 0x44, 0x20, - 0x02, 0x0a, 0x0f, 0x0a, 0x09, 0x42, 0x61, 0x73, 0x69, 0x63, 0x41, 0x75, 0x74, 0x68, 0x12, 0x02, - 0x08, 0x01, 0x62, 0x1f, 0x0a, 0x0e, 0x0a, 0x0a, 0x41, 0x70, 0x69, 0x4b, 0x65, 0x79, 0x41, 0x75, - 0x74, 0x68, 0x12, 0x00, 0x0a, 0x0d, 0x0a, 0x09, 0x42, 0x61, 0x73, 0x69, 0x63, 0x41, 0x75, 0x74, - 0x68, 0x12, 0x00, 0xc8, 0xe2, 0x1e, 0x01, 0xd0, 0xe2, 0x1e, 0x01, 0xe0, 0xe2, 0x1e, 0x01, 0xc0, - 0xe3, 0x1e, 0x01, 0xc8, 0xe3, 0x1e, 0x01, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x5d, 0x2a, 0x5b, 0x2f, 0x61, 0x75, 0x74, 0x68, 0x2f, 0x76, 0x33, 0x2f, 0x70, 0x61, 0x72, 0x74, + 0x6e, 0x65, 0x72, 0x2f, 0x7b, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x70, 0x61, + 0x72, 0x74, 0x6e, 0x65, 0x72, 0x7d, 0x2f, 0x6f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x2f, 0x7b, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x6f, 0x72, + 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x7d, 0x2f, 0x72, 0x6f, 0x6c, 0x65, + 0x2f, 0x7b, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x69, 0x64, 0x7d, 0x42, 0xca, + 0x04, 0x0a, 0x14, 0x63, 0x6f, 0x6d, 0x2e, 0x72, 0x61, 0x66, 0x61, 0x79, 0x2e, 0x64, 0x65, 0x76, + 0x2e, 0x72, 0x70, 0x63, 0x2e, 0x76, 0x33, 0x42, 0x09, 0x52, 0x6f, 0x6c, 0x65, 0x50, 0x72, 0x6f, + 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x4a, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, + 0x2f, 0x52, 0x61, 0x66, 0x61, 0x79, 0x53, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x73, 0x2f, 0x72, 0x63, + 0x6c, 0x6f, 0x75, 0x64, 0x2d, 0x62, 0x61, 0x73, 0x65, 0x2f, 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, + 0x65, 0x6e, 0x74, 0x73, 0x2f, 0x75, 0x73, 0x65, 0x72, 0x6d, 0x67, 0x6d, 0x74, 0x2f, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x2f, 0x72, 0x70, 0x63, 0x2f, 0x76, 0x33, 0x3b, 0x72, 0x70, 0x63, 0x76, 0x33, + 0xa2, 0x02, 0x03, 0x52, 0x44, 0x52, 0xaa, 0x02, 0x10, 0x52, 0x61, 0x66, 0x61, 0x79, 0x2e, 0x44, + 0x65, 0x76, 0x2e, 0x52, 0x70, 0x63, 0x2e, 0x56, 0x33, 0xca, 0x02, 0x10, 0x52, 0x61, 0x66, 0x61, + 0x79, 0x5c, 0x44, 0x65, 0x76, 0x5c, 0x52, 0x70, 0x63, 0x5c, 0x56, 0x33, 0xe2, 0x02, 0x1c, 0x52, + 0x61, 0x66, 0x61, 0x79, 0x5c, 0x44, 0x65, 0x76, 0x5c, 0x52, 0x70, 0x63, 0x5c, 0x56, 0x33, 0x5c, + 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x13, 0x52, 0x61, + 0x66, 0x61, 0x79, 0x3a, 0x3a, 0x44, 0x65, 0x76, 0x3a, 0x3a, 0x52, 0x70, 0x63, 0x3a, 0x3a, 0x56, + 0x33, 0x92, 0x41, 0xe2, 0x02, 0x12, 0x2b, 0x0a, 0x17, 0x52, 0x6f, 0x6c, 0x65, 0x20, 0x6d, 0x61, + 0x6e, 0x61, 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x20, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, + 0x22, 0x0b, 0x0a, 0x09, 0x52, 0x61, 0x66, 0x61, 0x79, 0x20, 0x44, 0x65, 0x76, 0x32, 0x03, 0x32, + 0x2e, 0x30, 0x2a, 0x01, 0x02, 0x32, 0x10, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x2f, 0x6a, 0x73, 0x6f, 0x6e, 0x32, 0x10, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x79, 0x61, 0x6d, 0x6c, 0x3a, 0x10, 0x61, 0x70, 0x70, 0x6c, 0x69, + 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x6a, 0x73, 0x6f, 0x6e, 0x3a, 0x10, 0x61, 0x70, 0x70, + 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x79, 0x61, 0x6d, 0x6c, 0x52, 0x50, 0x0a, + 0x03, 0x34, 0x30, 0x33, 0x12, 0x49, 0x0a, 0x47, 0x52, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x65, 0x64, + 0x20, 0x77, 0x68, 0x65, 0x6e, 0x20, 0x74, 0x68, 0x65, 0x20, 0x72, 0x6f, 0x6c, 0x65, 0x20, 0x64, + 0x6f, 0x65, 0x73, 0x20, 0x6e, 0x6f, 0x74, 0x20, 0x68, 0x61, 0x76, 0x65, 0x20, 0x70, 0x65, 0x72, + 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x20, 0x74, 0x6f, 0x20, 0x61, 0x63, 0x63, 0x65, 0x73, + 0x73, 0x20, 0x74, 0x68, 0x65, 0x20, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x2e, 0x52, + 0x3b, 0x0a, 0x03, 0x34, 0x30, 0x34, 0x12, 0x34, 0x0a, 0x2a, 0x52, 0x65, 0x74, 0x75, 0x72, 0x6e, + 0x65, 0x64, 0x20, 0x77, 0x68, 0x65, 0x6e, 0x20, 0x74, 0x68, 0x65, 0x20, 0x72, 0x65, 0x73, 0x6f, + 0x75, 0x72, 0x63, 0x65, 0x20, 0x64, 0x6f, 0x65, 0x73, 0x20, 0x6e, 0x6f, 0x74, 0x20, 0x65, 0x78, + 0x69, 0x73, 0x74, 0x2e, 0x12, 0x06, 0x0a, 0x04, 0x9a, 0x02, 0x01, 0x07, 0x5a, 0x38, 0x0a, 0x25, + 0x0a, 0x0a, 0x41, 0x70, 0x69, 0x4b, 0x65, 0x79, 0x41, 0x75, 0x74, 0x68, 0x12, 0x17, 0x08, 0x02, + 0x1a, 0x11, 0x58, 0x2d, 0x52, 0x41, 0x46, 0x41, 0x59, 0x2d, 0x41, 0x50, 0x49, 0x2d, 0x4b, 0x45, + 0x59, 0x49, 0x44, 0x20, 0x02, 0x0a, 0x0f, 0x0a, 0x09, 0x42, 0x61, 0x73, 0x69, 0x63, 0x41, 0x75, + 0x74, 0x68, 0x12, 0x02, 0x08, 0x01, 0x62, 0x1f, 0x0a, 0x0e, 0x0a, 0x0a, 0x41, 0x70, 0x69, 0x4b, + 0x65, 0x79, 0x41, 0x75, 0x74, 0x68, 0x12, 0x00, 0x0a, 0x0d, 0x0a, 0x09, 0x42, 0x61, 0x73, 0x69, + 0x63, 0x41, 0x75, 0x74, 0x68, 0x12, 0x00, 0xc8, 0xe2, 0x1e, 0x01, 0xd0, 0xe2, 0x1e, 0x01, 0xe0, + 0xe2, 0x1e, 0x01, 0xc0, 0xe3, 0x1e, 0x01, 0xc8, 0xe3, 0x1e, 0x01, 0x62, 0x06, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x33, } -var ( - file_proto_rpc_v3_role_proto_rawDescOnce sync.Once - file_proto_rpc_v3_role_proto_rawDescData = file_proto_rpc_v3_role_proto_rawDesc -) - -func file_proto_rpc_v3_role_proto_rawDescGZIP() []byte { - file_proto_rpc_v3_role_proto_rawDescOnce.Do(func() { - file_proto_rpc_v3_role_proto_rawDescData = protoimpl.X.CompressGZIP(file_proto_rpc_v3_role_proto_rawDescData) - }) - return file_proto_rpc_v3_role_proto_rawDescData -} - -var file_proto_rpc_v3_role_proto_msgTypes = make([]protoimpl.MessageInfo, 2) var file_proto_rpc_v3_role_proto_goTypes = []interface{}{ - (*GetRolesRequest)(nil), // 0: rafay.dev.rpc.v3.GetRolesRequest - (*DeleteRoleResponse)(nil), // 1: rafay.dev.rpc.v3.DeleteRoleResponse - (*v3.Role)(nil), // 2: rafay.dev.types.user.v3.Role - (*v3.RoleList)(nil), // 3: rafay.dev.types.user.v3.RoleList + (*v3.Role)(nil), // 0: rafay.dev.types.user.v3.Role + (*v3.RoleList)(nil), // 1: rafay.dev.types.user.v3.RoleList } var file_proto_rpc_v3_role_proto_depIdxs = []int32{ - 2, // 0: rafay.dev.rpc.v3.Role.CreateRole:input_type -> rafay.dev.types.user.v3.Role - 0, // 1: rafay.dev.rpc.v3.Role.GetRoles:input_type -> rafay.dev.rpc.v3.GetRolesRequest - 2, // 2: rafay.dev.rpc.v3.Role.GetRole:input_type -> rafay.dev.types.user.v3.Role - 2, // 3: rafay.dev.rpc.v3.Role.UpdateRole:input_type -> rafay.dev.types.user.v3.Role - 2, // 4: rafay.dev.rpc.v3.Role.DeleteRole:input_type -> rafay.dev.types.user.v3.Role - 2, // 5: rafay.dev.rpc.v3.Role.CreateRole:output_type -> rafay.dev.types.user.v3.Role - 3, // 6: rafay.dev.rpc.v3.Role.GetRoles:output_type -> rafay.dev.types.user.v3.RoleList - 2, // 7: rafay.dev.rpc.v3.Role.GetRole:output_type -> rafay.dev.types.user.v3.Role - 2, // 8: rafay.dev.rpc.v3.Role.UpdateRole:output_type -> rafay.dev.types.user.v3.Role - 1, // 9: rafay.dev.rpc.v3.Role.DeleteRole:output_type -> rafay.dev.rpc.v3.DeleteRoleResponse + 0, // 0: rafay.dev.rpc.v3.Role.CreateRole:input_type -> rafay.dev.types.user.v3.Role + 0, // 1: rafay.dev.rpc.v3.Role.GetRoles:input_type -> rafay.dev.types.user.v3.Role + 0, // 2: rafay.dev.rpc.v3.Role.GetRole:input_type -> rafay.dev.types.user.v3.Role + 0, // 3: rafay.dev.rpc.v3.Role.UpdateRole:input_type -> rafay.dev.types.user.v3.Role + 0, // 4: rafay.dev.rpc.v3.Role.DeleteRole:input_type -> rafay.dev.types.user.v3.Role + 0, // 5: rafay.dev.rpc.v3.Role.CreateRole:output_type -> rafay.dev.types.user.v3.Role + 1, // 6: rafay.dev.rpc.v3.Role.GetRoles:output_type -> rafay.dev.types.user.v3.RoleList + 0, // 7: rafay.dev.rpc.v3.Role.GetRole:output_type -> rafay.dev.types.user.v3.Role + 0, // 8: rafay.dev.rpc.v3.Role.UpdateRole:output_type -> rafay.dev.types.user.v3.Role + 0, // 9: rafay.dev.rpc.v3.Role.DeleteRole:output_type -> rafay.dev.types.user.v3.Role 5, // [5:10] is the sub-list for method output_type 0, // [0:5] is the sub-list for method input_type 0, // [0:0] is the sub-list for extension type_name @@ -248,45 +185,18 @@ func file_proto_rpc_v3_role_proto_init() { if File_proto_rpc_v3_role_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_proto_rpc_v3_role_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetRolesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_proto_rpc_v3_role_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*DeleteRoleResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_proto_rpc_v3_role_proto_rawDesc, NumEnums: 0, - NumMessages: 2, + NumMessages: 0, NumExtensions: 0, NumServices: 1, }, GoTypes: file_proto_rpc_v3_role_proto_goTypes, DependencyIndexes: file_proto_rpc_v3_role_proto_depIdxs, - MessageInfos: file_proto_rpc_v3_role_proto_msgTypes, }.Build() File_proto_rpc_v3_role_proto = out.File file_proto_rpc_v3_role_proto_rawDesc = nil diff --git a/components/usermgmt/proto/rpc/v3/role.pb.gw.go b/components/usermgmt/proto/rpc/v3/role.pb.gw.go index 3d68092..7dee664 100644 --- a/components/usermgmt/proto/rpc/v3/role.pb.gw.go +++ b/components/usermgmt/proto/rpc/v3/role.pb.gw.go @@ -44,6 +44,33 @@ func request_Role_CreateRole_0(ctx context.Context, marshaler runtime.Marshaler, return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["metadata.partner"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "metadata.partner") + } + + err = runtime.PopulateFieldFromPath(&protoReq, "metadata.partner", val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "metadata.partner", err) + } + + val, ok = pathParams["metadata.organization"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "metadata.organization") + } + + err = runtime.PopulateFieldFromPath(&protoReq, "metadata.organization", val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "metadata.organization", err) + } + msg, err := client.CreateRole(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err @@ -61,31 +88,130 @@ func local_request_Role_CreateRole_0(ctx context.Context, marshaler runtime.Mars return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["metadata.partner"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "metadata.partner") + } + + err = runtime.PopulateFieldFromPath(&protoReq, "metadata.partner", val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "metadata.partner", err) + } + + val, ok = pathParams["metadata.organization"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "metadata.organization") + } + + err = runtime.PopulateFieldFromPath(&protoReq, "metadata.organization", val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "metadata.organization", err) + } + msg, err := server.CreateRole(ctx, &protoReq) return msg, metadata, err } +var ( + filter_Role_GetRoles_0 = &utilities.DoubleArray{Encoding: map[string]int{"metadata": 0, "partner": 1, "organization": 2}, Base: []int{1, 1, 1, 2, 0, 0}, Check: []int{0, 1, 2, 2, 3, 4}} +) + func request_Role_GetRoles_0(ctx context.Context, marshaler runtime.Marshaler, client RoleClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq GetRolesRequest + var protoReq userv3.Role var metadata runtime.ServerMetadata + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["metadata.partner"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "metadata.partner") + } + + err = runtime.PopulateFieldFromPath(&protoReq, "metadata.partner", val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "metadata.partner", err) + } + + val, ok = pathParams["metadata.organization"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "metadata.organization") + } + + err = runtime.PopulateFieldFromPath(&protoReq, "metadata.organization", val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "metadata.organization", err) + } + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Role_GetRoles_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + msg, err := client.GetRoles(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err } func local_request_Role_GetRoles_0(ctx context.Context, marshaler runtime.Marshaler, server RoleServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq GetRolesRequest + var protoReq userv3.Role var metadata runtime.ServerMetadata + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["metadata.partner"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "metadata.partner") + } + + err = runtime.PopulateFieldFromPath(&protoReq, "metadata.partner", val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "metadata.partner", err) + } + + val, ok = pathParams["metadata.organization"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "metadata.organization") + } + + err = runtime.PopulateFieldFromPath(&protoReq, "metadata.organization", val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "metadata.organization", err) + } + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Role_GetRoles_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + msg, err := server.GetRoles(ctx, &protoReq) return msg, metadata, err } var ( - filter_Role_GetRole_0 = &utilities.DoubleArray{Encoding: map[string]int{"metadata": 0, "name": 1}, Base: []int{1, 1, 1, 0}, Check: []int{0, 1, 2, 3}} + filter_Role_GetRole_0 = &utilities.DoubleArray{Encoding: map[string]int{"metadata": 0, "partner": 1, "organization": 2, "name": 3}, Base: []int{1, 1, 1, 2, 3, 0, 0, 0}, Check: []int{0, 1, 2, 2, 2, 3, 4, 5}} ) func request_Role_GetRole_0(ctx context.Context, marshaler runtime.Marshaler, client RoleClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -99,6 +225,26 @@ func request_Role_GetRole_0(ctx context.Context, marshaler runtime.Marshaler, cl _ = err ) + val, ok = pathParams["metadata.partner"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "metadata.partner") + } + + err = runtime.PopulateFieldFromPath(&protoReq, "metadata.partner", val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "metadata.partner", err) + } + + val, ok = pathParams["metadata.organization"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "metadata.organization") + } + + err = runtime.PopulateFieldFromPath(&protoReq, "metadata.organization", val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "metadata.organization", err) + } + val, ok = pathParams["metadata.name"] if !ok { return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "metadata.name") @@ -132,6 +278,26 @@ func local_request_Role_GetRole_0(ctx context.Context, marshaler runtime.Marshal _ = err ) + val, ok = pathParams["metadata.partner"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "metadata.partner") + } + + err = runtime.PopulateFieldFromPath(&protoReq, "metadata.partner", val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "metadata.partner", err) + } + + val, ok = pathParams["metadata.organization"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "metadata.organization") + } + + err = runtime.PopulateFieldFromPath(&protoReq, "metadata.organization", val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "metadata.organization", err) + } + val, ok = pathParams["metadata.name"] if !ok { return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "metadata.name") @@ -155,7 +321,7 @@ func local_request_Role_GetRole_0(ctx context.Context, marshaler runtime.Marshal } var ( - filter_Role_GetRole_1 = &utilities.DoubleArray{Encoding: map[string]int{"metadata": 0, "id": 1}, Base: []int{1, 1, 1, 0}, Check: []int{0, 1, 2, 3}} + filter_Role_GetRole_1 = &utilities.DoubleArray{Encoding: map[string]int{"metadata": 0, "partner": 1, "organization": 2, "id": 3}, Base: []int{1, 1, 1, 2, 3, 0, 0, 0}, Check: []int{0, 1, 2, 2, 2, 3, 4, 5}} ) func request_Role_GetRole_1(ctx context.Context, marshaler runtime.Marshaler, client RoleClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -169,6 +335,26 @@ func request_Role_GetRole_1(ctx context.Context, marshaler runtime.Marshaler, cl _ = err ) + val, ok = pathParams["metadata.partner"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "metadata.partner") + } + + err = runtime.PopulateFieldFromPath(&protoReq, "metadata.partner", val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "metadata.partner", err) + } + + val, ok = pathParams["metadata.organization"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "metadata.organization") + } + + err = runtime.PopulateFieldFromPath(&protoReq, "metadata.organization", val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "metadata.organization", err) + } + val, ok = pathParams["metadata.id"] if !ok { return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "metadata.id") @@ -202,6 +388,26 @@ func local_request_Role_GetRole_1(ctx context.Context, marshaler runtime.Marshal _ = err ) + val, ok = pathParams["metadata.partner"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "metadata.partner") + } + + err = runtime.PopulateFieldFromPath(&protoReq, "metadata.partner", val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "metadata.partner", err) + } + + val, ok = pathParams["metadata.organization"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "metadata.organization") + } + + err = runtime.PopulateFieldFromPath(&protoReq, "metadata.organization", val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "metadata.organization", err) + } + val, ok = pathParams["metadata.id"] if !ok { return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "metadata.id") @@ -243,6 +449,26 @@ func request_Role_UpdateRole_0(ctx context.Context, marshaler runtime.Marshaler, _ = err ) + val, ok = pathParams["metadata.partner"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "metadata.partner") + } + + err = runtime.PopulateFieldFromPath(&protoReq, "metadata.partner", val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "metadata.partner", err) + } + + val, ok = pathParams["metadata.organization"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "metadata.organization") + } + + err = runtime.PopulateFieldFromPath(&protoReq, "metadata.organization", val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "metadata.organization", err) + } + val, ok = pathParams["metadata.name"] if !ok { return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "metadata.name") @@ -277,6 +503,26 @@ func local_request_Role_UpdateRole_0(ctx context.Context, marshaler runtime.Mars _ = err ) + val, ok = pathParams["metadata.partner"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "metadata.partner") + } + + err = runtime.PopulateFieldFromPath(&protoReq, "metadata.partner", val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "metadata.partner", err) + } + + val, ok = pathParams["metadata.organization"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "metadata.organization") + } + + err = runtime.PopulateFieldFromPath(&protoReq, "metadata.organization", val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "metadata.organization", err) + } + val, ok = pathParams["metadata.name"] if !ok { return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "metadata.name") @@ -311,6 +557,26 @@ func request_Role_UpdateRole_1(ctx context.Context, marshaler runtime.Marshaler, _ = err ) + val, ok = pathParams["metadata.partner"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "metadata.partner") + } + + err = runtime.PopulateFieldFromPath(&protoReq, "metadata.partner", val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "metadata.partner", err) + } + + val, ok = pathParams["metadata.organization"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "metadata.organization") + } + + err = runtime.PopulateFieldFromPath(&protoReq, "metadata.organization", val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "metadata.organization", err) + } + val, ok = pathParams["metadata.id"] if !ok { return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "metadata.id") @@ -345,6 +611,26 @@ func local_request_Role_UpdateRole_1(ctx context.Context, marshaler runtime.Mars _ = err ) + val, ok = pathParams["metadata.partner"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "metadata.partner") + } + + err = runtime.PopulateFieldFromPath(&protoReq, "metadata.partner", val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "metadata.partner", err) + } + + val, ok = pathParams["metadata.organization"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "metadata.organization") + } + + err = runtime.PopulateFieldFromPath(&protoReq, "metadata.organization", val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "metadata.organization", err) + } + val, ok = pathParams["metadata.id"] if !ok { return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "metadata.id") @@ -361,7 +647,7 @@ func local_request_Role_UpdateRole_1(ctx context.Context, marshaler runtime.Mars } var ( - filter_Role_DeleteRole_0 = &utilities.DoubleArray{Encoding: map[string]int{"metadata": 0, "name": 1}, Base: []int{1, 1, 1, 0}, Check: []int{0, 1, 2, 3}} + filter_Role_DeleteRole_0 = &utilities.DoubleArray{Encoding: map[string]int{"metadata": 0, "partner": 1, "organization": 2, "name": 3}, Base: []int{1, 1, 1, 2, 3, 0, 0, 0}, Check: []int{0, 1, 2, 2, 2, 3, 4, 5}} ) func request_Role_DeleteRole_0(ctx context.Context, marshaler runtime.Marshaler, client RoleClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -375,6 +661,26 @@ func request_Role_DeleteRole_0(ctx context.Context, marshaler runtime.Marshaler, _ = err ) + val, ok = pathParams["metadata.partner"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "metadata.partner") + } + + err = runtime.PopulateFieldFromPath(&protoReq, "metadata.partner", val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "metadata.partner", err) + } + + val, ok = pathParams["metadata.organization"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "metadata.organization") + } + + err = runtime.PopulateFieldFromPath(&protoReq, "metadata.organization", val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "metadata.organization", err) + } + val, ok = pathParams["metadata.name"] if !ok { return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "metadata.name") @@ -408,6 +714,26 @@ func local_request_Role_DeleteRole_0(ctx context.Context, marshaler runtime.Mars _ = err ) + val, ok = pathParams["metadata.partner"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "metadata.partner") + } + + err = runtime.PopulateFieldFromPath(&protoReq, "metadata.partner", val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "metadata.partner", err) + } + + val, ok = pathParams["metadata.organization"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "metadata.organization") + } + + err = runtime.PopulateFieldFromPath(&protoReq, "metadata.organization", val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "metadata.organization", err) + } + val, ok = pathParams["metadata.name"] if !ok { return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "metadata.name") @@ -431,7 +757,7 @@ func local_request_Role_DeleteRole_0(ctx context.Context, marshaler runtime.Mars } var ( - filter_Role_DeleteRole_1 = &utilities.DoubleArray{Encoding: map[string]int{"metadata": 0, "id": 1}, Base: []int{1, 1, 1, 0}, Check: []int{0, 1, 2, 3}} + filter_Role_DeleteRole_1 = &utilities.DoubleArray{Encoding: map[string]int{"metadata": 0, "partner": 1, "organization": 2, "id": 3}, Base: []int{1, 1, 1, 2, 3, 0, 0, 0}, Check: []int{0, 1, 2, 2, 2, 3, 4, 5}} ) func request_Role_DeleteRole_1(ctx context.Context, marshaler runtime.Marshaler, client RoleClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -445,6 +771,26 @@ func request_Role_DeleteRole_1(ctx context.Context, marshaler runtime.Marshaler, _ = err ) + val, ok = pathParams["metadata.partner"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "metadata.partner") + } + + err = runtime.PopulateFieldFromPath(&protoReq, "metadata.partner", val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "metadata.partner", err) + } + + val, ok = pathParams["metadata.organization"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "metadata.organization") + } + + err = runtime.PopulateFieldFromPath(&protoReq, "metadata.organization", val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "metadata.organization", err) + } + val, ok = pathParams["metadata.id"] if !ok { return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "metadata.id") @@ -478,6 +824,26 @@ func local_request_Role_DeleteRole_1(ctx context.Context, marshaler runtime.Mars _ = err ) + val, ok = pathParams["metadata.partner"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "metadata.partner") + } + + err = runtime.PopulateFieldFromPath(&protoReq, "metadata.partner", val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "metadata.partner", err) + } + + val, ok = pathParams["metadata.organization"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "metadata.organization") + } + + err = runtime.PopulateFieldFromPath(&protoReq, "metadata.organization", val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "metadata.organization", err) + } + val, ok = pathParams["metadata.id"] if !ok { return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "metadata.id") @@ -512,7 +878,7 @@ func RegisterRoleHandlerServer(ctx context.Context, mux *runtime.ServeMux, serve var stream runtime.ServerTransportStream ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/rafay.dev.rpc.v3.Role/CreateRole", runtime.WithHTTPPathPattern("/auth/v3/roles")) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/rafay.dev.rpc.v3.Role/CreateRole", runtime.WithHTTPPathPattern("/auth/v3/partner/{metadata.partner}/organization/{metadata.organization}/roles")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -535,7 +901,7 @@ func RegisterRoleHandlerServer(ctx context.Context, mux *runtime.ServeMux, serve var stream runtime.ServerTransportStream ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/rafay.dev.rpc.v3.Role/GetRoles", runtime.WithHTTPPathPattern("/auth/v3/roles")) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/rafay.dev.rpc.v3.Role/GetRoles", runtime.WithHTTPPathPattern("/auth/v3/partner/{metadata.partner}/organization/{metadata.organization}/roles")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -558,7 +924,7 @@ func RegisterRoleHandlerServer(ctx context.Context, mux *runtime.ServeMux, serve var stream runtime.ServerTransportStream ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/rafay.dev.rpc.v3.Role/GetRole", runtime.WithHTTPPathPattern("/auth/v3/role/{metadata.name}")) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/rafay.dev.rpc.v3.Role/GetRole", runtime.WithHTTPPathPattern("/auth/v3/partner/{metadata.partner}/organization/{metadata.organization}/role/{metadata.name}")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -581,7 +947,7 @@ func RegisterRoleHandlerServer(ctx context.Context, mux *runtime.ServeMux, serve var stream runtime.ServerTransportStream ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/rafay.dev.rpc.v3.Role/GetRole", runtime.WithHTTPPathPattern("/auth/v3/role/{metadata.id}")) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/rafay.dev.rpc.v3.Role/GetRole", runtime.WithHTTPPathPattern("/auth/v3/partner/{metadata.partner}/organization/{metadata.organization}/role/{metadata.id}")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -604,7 +970,7 @@ func RegisterRoleHandlerServer(ctx context.Context, mux *runtime.ServeMux, serve var stream runtime.ServerTransportStream ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/rafay.dev.rpc.v3.Role/UpdateRole", runtime.WithHTTPPathPattern("/auth/v3/role/{metadata.name}")) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/rafay.dev.rpc.v3.Role/UpdateRole", runtime.WithHTTPPathPattern("/auth/v3/partner/{metadata.partner}/organization/{metadata.organization}/role/{metadata.name}")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -627,7 +993,7 @@ func RegisterRoleHandlerServer(ctx context.Context, mux *runtime.ServeMux, serve var stream runtime.ServerTransportStream ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/rafay.dev.rpc.v3.Role/UpdateRole", runtime.WithHTTPPathPattern("/auth/v3/role/{metadata.id}")) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/rafay.dev.rpc.v3.Role/UpdateRole", runtime.WithHTTPPathPattern("/auth/v3/partner/{metadata.partner}/organization/{metadata.organization}/role/{metadata.id}")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -650,7 +1016,7 @@ func RegisterRoleHandlerServer(ctx context.Context, mux *runtime.ServeMux, serve var stream runtime.ServerTransportStream ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/rafay.dev.rpc.v3.Role/DeleteRole", runtime.WithHTTPPathPattern("/auth/v3/role/{metadata.name}")) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/rafay.dev.rpc.v3.Role/DeleteRole", runtime.WithHTTPPathPattern("/auth/v3/partner/{metadata.partner}/organization/{metadata.organization}/role/{metadata.name}")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -673,7 +1039,7 @@ func RegisterRoleHandlerServer(ctx context.Context, mux *runtime.ServeMux, serve var stream runtime.ServerTransportStream ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/rafay.dev.rpc.v3.Role/DeleteRole", runtime.WithHTTPPathPattern("/auth/v3/role/{metadata.id}")) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/rafay.dev.rpc.v3.Role/DeleteRole", runtime.WithHTTPPathPattern("/auth/v3/partner/{metadata.partner}/organization/{metadata.organization}/role/{metadata.id}")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -735,7 +1101,7 @@ func RegisterRoleHandlerClient(ctx context.Context, mux *runtime.ServeMux, clien ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateContext(ctx, mux, req, "/rafay.dev.rpc.v3.Role/CreateRole", runtime.WithHTTPPathPattern("/auth/v3/roles")) + rctx, err := runtime.AnnotateContext(ctx, mux, req, "/rafay.dev.rpc.v3.Role/CreateRole", runtime.WithHTTPPathPattern("/auth/v3/partner/{metadata.partner}/organization/{metadata.organization}/roles")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -755,7 +1121,7 @@ func RegisterRoleHandlerClient(ctx context.Context, mux *runtime.ServeMux, clien ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateContext(ctx, mux, req, "/rafay.dev.rpc.v3.Role/GetRoles", runtime.WithHTTPPathPattern("/auth/v3/roles")) + rctx, err := runtime.AnnotateContext(ctx, mux, req, "/rafay.dev.rpc.v3.Role/GetRoles", runtime.WithHTTPPathPattern("/auth/v3/partner/{metadata.partner}/organization/{metadata.organization}/roles")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -775,7 +1141,7 @@ func RegisterRoleHandlerClient(ctx context.Context, mux *runtime.ServeMux, clien ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateContext(ctx, mux, req, "/rafay.dev.rpc.v3.Role/GetRole", runtime.WithHTTPPathPattern("/auth/v3/role/{metadata.name}")) + rctx, err := runtime.AnnotateContext(ctx, mux, req, "/rafay.dev.rpc.v3.Role/GetRole", runtime.WithHTTPPathPattern("/auth/v3/partner/{metadata.partner}/organization/{metadata.organization}/role/{metadata.name}")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -795,7 +1161,7 @@ func RegisterRoleHandlerClient(ctx context.Context, mux *runtime.ServeMux, clien ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateContext(ctx, mux, req, "/rafay.dev.rpc.v3.Role/GetRole", runtime.WithHTTPPathPattern("/auth/v3/role/{metadata.id}")) + rctx, err := runtime.AnnotateContext(ctx, mux, req, "/rafay.dev.rpc.v3.Role/GetRole", runtime.WithHTTPPathPattern("/auth/v3/partner/{metadata.partner}/organization/{metadata.organization}/role/{metadata.id}")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -815,7 +1181,7 @@ func RegisterRoleHandlerClient(ctx context.Context, mux *runtime.ServeMux, clien ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateContext(ctx, mux, req, "/rafay.dev.rpc.v3.Role/UpdateRole", runtime.WithHTTPPathPattern("/auth/v3/role/{metadata.name}")) + rctx, err := runtime.AnnotateContext(ctx, mux, req, "/rafay.dev.rpc.v3.Role/UpdateRole", runtime.WithHTTPPathPattern("/auth/v3/partner/{metadata.partner}/organization/{metadata.organization}/role/{metadata.name}")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -835,7 +1201,7 @@ func RegisterRoleHandlerClient(ctx context.Context, mux *runtime.ServeMux, clien ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateContext(ctx, mux, req, "/rafay.dev.rpc.v3.Role/UpdateRole", runtime.WithHTTPPathPattern("/auth/v3/role/{metadata.id}")) + rctx, err := runtime.AnnotateContext(ctx, mux, req, "/rafay.dev.rpc.v3.Role/UpdateRole", runtime.WithHTTPPathPattern("/auth/v3/partner/{metadata.partner}/organization/{metadata.organization}/role/{metadata.id}")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -855,7 +1221,7 @@ func RegisterRoleHandlerClient(ctx context.Context, mux *runtime.ServeMux, clien ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateContext(ctx, mux, req, "/rafay.dev.rpc.v3.Role/DeleteRole", runtime.WithHTTPPathPattern("/auth/v3/role/{metadata.name}")) + rctx, err := runtime.AnnotateContext(ctx, mux, req, "/rafay.dev.rpc.v3.Role/DeleteRole", runtime.WithHTTPPathPattern("/auth/v3/partner/{metadata.partner}/organization/{metadata.organization}/role/{metadata.name}")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -875,7 +1241,7 @@ func RegisterRoleHandlerClient(ctx context.Context, mux *runtime.ServeMux, clien ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateContext(ctx, mux, req, "/rafay.dev.rpc.v3.Role/DeleteRole", runtime.WithHTTPPathPattern("/auth/v3/role/{metadata.id}")) + rctx, err := runtime.AnnotateContext(ctx, mux, req, "/rafay.dev.rpc.v3.Role/DeleteRole", runtime.WithHTTPPathPattern("/auth/v3/partner/{metadata.partner}/organization/{metadata.organization}/role/{metadata.id}")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -895,21 +1261,21 @@ func RegisterRoleHandlerClient(ctx context.Context, mux *runtime.ServeMux, clien } var ( - pattern_Role_CreateRole_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"auth", "v3", "roles"}, "")) + pattern_Role_CreateRole_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3, 2, 4, 1, 0, 4, 1, 5, 5, 2, 6}, []string{"auth", "v3", "partner", "metadata.partner", "organization", "metadata.organization", "roles"}, "")) - pattern_Role_GetRoles_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"auth", "v3", "roles"}, "")) + pattern_Role_GetRoles_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3, 2, 4, 1, 0, 4, 1, 5, 5, 2, 6}, []string{"auth", "v3", "partner", "metadata.partner", "organization", "metadata.organization", "roles"}, "")) - pattern_Role_GetRole_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3}, []string{"auth", "v3", "role", "metadata.name"}, "")) + pattern_Role_GetRole_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3, 2, 4, 1, 0, 4, 1, 5, 5, 2, 6, 1, 0, 4, 1, 5, 7}, []string{"auth", "v3", "partner", "metadata.partner", "organization", "metadata.organization", "role", "metadata.name"}, "")) - pattern_Role_GetRole_1 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3}, []string{"auth", "v3", "role", "metadata.id"}, "")) + pattern_Role_GetRole_1 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3, 2, 4, 1, 0, 4, 1, 5, 5, 2, 6, 1, 0, 4, 1, 5, 7}, []string{"auth", "v3", "partner", "metadata.partner", "organization", "metadata.organization", "role", "metadata.id"}, "")) - pattern_Role_UpdateRole_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3}, []string{"auth", "v3", "role", "metadata.name"}, "")) + pattern_Role_UpdateRole_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3, 2, 4, 1, 0, 4, 1, 5, 5, 2, 6, 1, 0, 4, 1, 5, 7}, []string{"auth", "v3", "partner", "metadata.partner", "organization", "metadata.organization", "role", "metadata.name"}, "")) - pattern_Role_UpdateRole_1 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3}, []string{"auth", "v3", "role", "metadata.id"}, "")) + pattern_Role_UpdateRole_1 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3, 2, 4, 1, 0, 4, 1, 5, 5, 2, 6, 1, 0, 4, 1, 5, 7}, []string{"auth", "v3", "partner", "metadata.partner", "organization", "metadata.organization", "role", "metadata.id"}, "")) - pattern_Role_DeleteRole_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3}, []string{"auth", "v3", "role", "metadata.name"}, "")) + pattern_Role_DeleteRole_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3, 2, 4, 1, 0, 4, 1, 5, 5, 2, 6, 1, 0, 4, 1, 5, 7}, []string{"auth", "v3", "partner", "metadata.partner", "organization", "metadata.organization", "role", "metadata.name"}, "")) - pattern_Role_DeleteRole_1 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3}, []string{"auth", "v3", "role", "metadata.id"}, "")) + pattern_Role_DeleteRole_1 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3, 2, 4, 1, 0, 4, 1, 5, 5, 2, 6, 1, 0, 4, 1, 5, 7}, []string{"auth", "v3", "partner", "metadata.partner", "organization", "metadata.organization", "role", "metadata.id"}, "")) ) var ( diff --git a/components/usermgmt/proto/rpc/v3/role.proto b/components/usermgmt/proto/rpc/v3/role.proto index e481951..d72b2c8 100644 --- a/components/usermgmt/proto/rpc/v3/role.proto +++ b/components/usermgmt/proto/rpc/v3/role.proto @@ -64,15 +64,11 @@ option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_swagger) = { } }; -// TODO: Add filters -message GetRolesRequest {} -message DeleteRoleResponse {} - service Role { rpc CreateRole(rafay.dev.types.user.v3.Role) returns (rafay.dev.types.user.v3.Role) { option (google.api.http) = { - post : "/auth/v3/roles" + post : "/auth/v3/partner/{metadata.partner}/organization/{metadata.organization}/roles" body : "*" }; @@ -84,37 +80,37 @@ service Role { }; }; - rpc GetRoles(GetRolesRequest) returns (rafay.dev.types.user.v3.RoleList) { + rpc GetRoles(rafay.dev.types.user.v3.Role) returns (rafay.dev.types.user.v3.RoleList) { option (google.api.http) = { - get : "/auth/v3/roles" + get : "/auth/v3/partner/{metadata.partner}/organization/{metadata.organization}/roles" }; }; rpc GetRole(rafay.dev.types.user.v3.Role) returns (rafay.dev.types.user.v3.Role) { option (google.api.http) = { - get : "/auth/v3/role/{metadata.name}" + get : "/auth/v3/partner/{metadata.partner}/organization/{metadata.organization}/role/{metadata.name}" additional_bindings { - get : "/auth/v3/role/{metadata.id}" + get : "/auth/v3/partner/{metadata.partner}/organization/{metadata.organization}/role/{metadata.id}" } }; }; rpc UpdateRole(rafay.dev.types.user.v3.Role) returns (rafay.dev.types.user.v3.Role) { option (google.api.http) = { - put : "/auth/v3/role/{metadata.name}" + put : "/auth/v3/partner/{metadata.partner}/organization/{metadata.organization}/role/{metadata.name}" body : "*" additional_bindings { - put : "/auth/v3/role/{metadata.id}" + put : "/auth/v3/partner/{metadata.partner}/organization/{metadata.organization}/role/{metadata.id}" body : "*" } }; }; - rpc DeleteRole(rafay.dev.types.user.v3.Role) returns (DeleteRoleResponse) { + rpc DeleteRole(rafay.dev.types.user.v3.Role) returns (rafay.dev.types.user.v3.Role) { option (google.api.http) = { - delete : "/auth/v3/role/{metadata.name}" + delete : "/auth/v3/partner/{metadata.partner}/organization/{metadata.organization}/role/{metadata.name}" additional_bindings { - delete : "/auth/v3/role/{metadata.id}" + delete : "/auth/v3/partner/{metadata.partner}/organization/{metadata.organization}/role/{metadata.id}" } }; diff --git a/components/usermgmt/proto/rpc/v3/role_grpc.pb.go b/components/usermgmt/proto/rpc/v3/role_grpc.pb.go index 591c8ed..2533948 100644 --- a/components/usermgmt/proto/rpc/v3/role_grpc.pb.go +++ b/components/usermgmt/proto/rpc/v3/role_grpc.pb.go @@ -24,10 +24,10 @@ const _ = grpc.SupportPackageIsVersion7 // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. type RoleClient interface { CreateRole(ctx context.Context, in *v3.Role, opts ...grpc.CallOption) (*v3.Role, error) - GetRoles(ctx context.Context, in *GetRolesRequest, opts ...grpc.CallOption) (*v3.RoleList, error) + GetRoles(ctx context.Context, in *v3.Role, opts ...grpc.CallOption) (*v3.RoleList, error) GetRole(ctx context.Context, in *v3.Role, opts ...grpc.CallOption) (*v3.Role, error) UpdateRole(ctx context.Context, in *v3.Role, opts ...grpc.CallOption) (*v3.Role, error) - DeleteRole(ctx context.Context, in *v3.Role, opts ...grpc.CallOption) (*DeleteRoleResponse, error) + DeleteRole(ctx context.Context, in *v3.Role, opts ...grpc.CallOption) (*v3.Role, error) } type roleClient struct { @@ -47,7 +47,7 @@ func (c *roleClient) CreateRole(ctx context.Context, in *v3.Role, opts ...grpc.C return out, nil } -func (c *roleClient) GetRoles(ctx context.Context, in *GetRolesRequest, opts ...grpc.CallOption) (*v3.RoleList, error) { +func (c *roleClient) GetRoles(ctx context.Context, in *v3.Role, opts ...grpc.CallOption) (*v3.RoleList, error) { out := new(v3.RoleList) err := c.cc.Invoke(ctx, "/rafay.dev.rpc.v3.Role/GetRoles", in, out, opts...) if err != nil { @@ -74,8 +74,8 @@ func (c *roleClient) UpdateRole(ctx context.Context, in *v3.Role, opts ...grpc.C return out, nil } -func (c *roleClient) DeleteRole(ctx context.Context, in *v3.Role, opts ...grpc.CallOption) (*DeleteRoleResponse, error) { - out := new(DeleteRoleResponse) +func (c *roleClient) DeleteRole(ctx context.Context, in *v3.Role, opts ...grpc.CallOption) (*v3.Role, error) { + out := new(v3.Role) err := c.cc.Invoke(ctx, "/rafay.dev.rpc.v3.Role/DeleteRole", in, out, opts...) if err != nil { return nil, err @@ -88,10 +88,10 @@ func (c *roleClient) DeleteRole(ctx context.Context, in *v3.Role, opts ...grpc.C // for forward compatibility type RoleServer interface { CreateRole(context.Context, *v3.Role) (*v3.Role, error) - GetRoles(context.Context, *GetRolesRequest) (*v3.RoleList, error) + GetRoles(context.Context, *v3.Role) (*v3.RoleList, error) GetRole(context.Context, *v3.Role) (*v3.Role, error) UpdateRole(context.Context, *v3.Role) (*v3.Role, error) - DeleteRole(context.Context, *v3.Role) (*DeleteRoleResponse, error) + DeleteRole(context.Context, *v3.Role) (*v3.Role, error) } // UnimplementedRoleServer should be embedded to have forward compatible implementations. @@ -101,7 +101,7 @@ type UnimplementedRoleServer struct { func (UnimplementedRoleServer) CreateRole(context.Context, *v3.Role) (*v3.Role, error) { return nil, status.Errorf(codes.Unimplemented, "method CreateRole not implemented") } -func (UnimplementedRoleServer) GetRoles(context.Context, *GetRolesRequest) (*v3.RoleList, error) { +func (UnimplementedRoleServer) GetRoles(context.Context, *v3.Role) (*v3.RoleList, error) { return nil, status.Errorf(codes.Unimplemented, "method GetRoles not implemented") } func (UnimplementedRoleServer) GetRole(context.Context, *v3.Role) (*v3.Role, error) { @@ -110,7 +110,7 @@ func (UnimplementedRoleServer) GetRole(context.Context, *v3.Role) (*v3.Role, err func (UnimplementedRoleServer) UpdateRole(context.Context, *v3.Role) (*v3.Role, error) { return nil, status.Errorf(codes.Unimplemented, "method UpdateRole not implemented") } -func (UnimplementedRoleServer) DeleteRole(context.Context, *v3.Role) (*DeleteRoleResponse, error) { +func (UnimplementedRoleServer) DeleteRole(context.Context, *v3.Role) (*v3.Role, error) { return nil, status.Errorf(codes.Unimplemented, "method DeleteRole not implemented") } @@ -144,7 +144,7 @@ func _Role_CreateRole_Handler(srv interface{}, ctx context.Context, dec func(int } func _Role_GetRoles_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(GetRolesRequest) + in := new(v3.Role) if err := dec(in); err != nil { return nil, err } @@ -156,7 +156,7 @@ func _Role_GetRoles_Handler(srv interface{}, ctx context.Context, dec func(inter FullMethod: "/rafay.dev.rpc.v3.Role/GetRoles", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(RoleServer).GetRoles(ctx, req.(*GetRolesRequest)) + return srv.(RoleServer).GetRoles(ctx, req.(*v3.Role)) } return interceptor(ctx, in, info, handler) } diff --git a/components/usermgmt/proto/rpc/v3/rolepermission.pb.go b/components/usermgmt/proto/rpc/v3/rolepermission.pb.go index 6341953..7faca0e 100644 --- a/components/usermgmt/proto/rpc/v3/rolepermission.pb.go +++ b/components/usermgmt/proto/rpc/v3/rolepermission.pb.go @@ -14,7 +14,6 @@ import ( protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" reflect "reflect" - sync "sync" ) const ( @@ -24,44 +23,6 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) -type GetRolePermissionsRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields -} - -func (x *GetRolePermissionsRequest) Reset() { - *x = GetRolePermissionsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_proto_rpc_v3_rolepermission_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *GetRolePermissionsRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GetRolePermissionsRequest) ProtoMessage() {} - -func (x *GetRolePermissionsRequest) ProtoReflect() protoreflect.Message { - mi := &file_proto_rpc_v3_rolepermission_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use GetRolePermissionsRequest.ProtoReflect.Descriptor instead. -func (*GetRolePermissionsRequest) Descriptor() ([]byte, []int) { - return file_proto_rpc_v3_rolepermission_proto_rawDescGZIP(), []int{0} -} - var File_proto_rpc_v3_rolepermission_proto protoreflect.FileDescriptor var file_proto_rpc_v3_rolepermission_proto_rawDesc = []byte{ @@ -77,95 +38,79 @@ var file_proto_rpc_v3_rolepermission_proto_rawDesc = []byte{ 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x2a, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2f, 0x75, 0x73, 0x65, 0x72, 0x70, 0x62, 0x2f, 0x76, 0x33, 0x2f, 0x72, 0x6f, 0x6c, 0x65, 0x70, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x2e, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x1b, 0x0a, 0x19, 0x47, 0x65, 0x74, 0x52, 0x6f, 0x6c, 0x65, - 0x50, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x32, 0xe5, 0x02, 0x0a, 0x0e, 0x52, 0x6f, 0x6c, 0x65, 0x70, 0x65, 0x72, 0x6d, 0x69, - 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x90, 0x01, 0x0a, 0x12, 0x47, 0x65, 0x74, 0x52, 0x6f, 0x6c, - 0x65, 0x70, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x2b, 0x2e, 0x72, - 0x61, 0x66, 0x61, 0x79, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x72, 0x70, 0x63, 0x2e, 0x76, 0x33, 0x2e, - 0x47, 0x65, 0x74, 0x52, 0x6f, 0x6c, 0x65, 0x50, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, - 0x6e, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2b, 0x2e, 0x72, 0x61, 0x66, 0x61, - 0x79, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x75, 0x73, 0x65, 0x72, - 0x2e, 0x76, 0x33, 0x2e, 0x52, 0x6f, 0x6c, 0x65, 0x50, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, - 0x6f, 0x6e, 0x4c, 0x69, 0x73, 0x74, 0x22, 0x20, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1a, 0x12, 0x18, - 0x2f, 0x61, 0x75, 0x74, 0x68, 0x2f, 0x76, 0x33, 0x2f, 0x72, 0x6f, 0x6c, 0x65, 0x70, 0x65, 0x72, - 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0xbf, 0x01, 0x0a, 0x11, 0x47, 0x65, 0x74, - 0x52, 0x6f, 0x6c, 0x65, 0x70, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x27, - 0x2e, 0x72, 0x61, 0x66, 0x61, 0x79, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, - 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x2e, 0x52, 0x6f, 0x6c, 0x65, 0x50, 0x65, 0x72, - 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x1a, 0x27, 0x2e, 0x72, 0x61, 0x66, 0x61, 0x79, 0x2e, - 0x64, 0x65, 0x76, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x76, - 0x33, 0x2e, 0x52, 0x6f, 0x6c, 0x65, 0x50, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, - 0x22, 0x58, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x52, 0x12, 0x27, 0x2f, 0x61, 0x75, 0x74, 0x68, 0x2f, - 0x76, 0x33, 0x2f, 0x72, 0x6f, 0x6c, 0x65, 0x70, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, - 0x6e, 0x2f, 0x7b, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x6e, 0x61, 0x6d, 0x65, - 0x7d, 0x5a, 0x27, 0x12, 0x25, 0x2f, 0x61, 0x75, 0x74, 0x68, 0x2f, 0x76, 0x33, 0x2f, 0x72, 0x6f, - 0x6c, 0x65, 0x70, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x2f, 0x7b, 0x6d, 0x65, - 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x69, 0x64, 0x7d, 0x42, 0xe8, 0x04, 0x0a, 0x14, 0x63, - 0x6f, 0x6d, 0x2e, 0x72, 0x61, 0x66, 0x61, 0x79, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x72, 0x70, 0x63, - 0x2e, 0x76, 0x33, 0x42, 0x13, 0x52, 0x6f, 0x6c, 0x65, 0x70, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, - 0x69, 0x6f, 0x6e, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x4a, 0x67, 0x69, 0x74, 0x68, - 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x52, 0x61, 0x66, 0x61, 0x79, 0x53, 0x79, 0x73, 0x74, - 0x65, 0x6d, 0x73, 0x2f, 0x72, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2d, 0x62, 0x61, 0x73, 0x65, 0x2f, - 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x73, 0x2f, 0x75, 0x73, 0x65, 0x72, 0x6d, - 0x67, 0x6d, 0x74, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x72, 0x70, 0x63, 0x2f, 0x76, 0x33, - 0x3b, 0x72, 0x70, 0x63, 0x76, 0x33, 0xa2, 0x02, 0x03, 0x52, 0x44, 0x52, 0xaa, 0x02, 0x10, 0x52, - 0x61, 0x66, 0x61, 0x79, 0x2e, 0x44, 0x65, 0x76, 0x2e, 0x52, 0x70, 0x63, 0x2e, 0x56, 0x33, 0xca, - 0x02, 0x10, 0x52, 0x61, 0x66, 0x61, 0x79, 0x5c, 0x44, 0x65, 0x76, 0x5c, 0x52, 0x70, 0x63, 0x5c, - 0x56, 0x33, 0xe2, 0x02, 0x1c, 0x52, 0x61, 0x66, 0x61, 0x79, 0x5c, 0x44, 0x65, 0x76, 0x5c, 0x52, - 0x70, 0x63, 0x5c, 0x56, 0x33, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, - 0x61, 0xea, 0x02, 0x13, 0x52, 0x61, 0x66, 0x61, 0x79, 0x3a, 0x3a, 0x44, 0x65, 0x76, 0x3a, 0x3a, - 0x52, 0x70, 0x63, 0x3a, 0x3a, 0x56, 0x33, 0x92, 0x41, 0xf6, 0x02, 0x12, 0x35, 0x0a, 0x21, 0x52, - 0x6f, 0x6c, 0x65, 0x70, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x20, 0x6d, 0x61, - 0x6e, 0x61, 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x20, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, - 0x22, 0x0b, 0x0a, 0x09, 0x52, 0x61, 0x66, 0x61, 0x79, 0x20, 0x44, 0x65, 0x76, 0x32, 0x03, 0x32, - 0x2e, 0x30, 0x2a, 0x01, 0x02, 0x32, 0x10, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x2f, 0x6a, 0x73, 0x6f, 0x6e, 0x32, 0x10, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x79, 0x61, 0x6d, 0x6c, 0x3a, 0x10, 0x61, 0x70, 0x70, 0x6c, 0x69, - 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x6a, 0x73, 0x6f, 0x6e, 0x3a, 0x10, 0x61, 0x70, 0x70, - 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x79, 0x61, 0x6d, 0x6c, 0x52, 0x5a, 0x0a, - 0x03, 0x34, 0x30, 0x33, 0x12, 0x53, 0x0a, 0x51, 0x52, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x65, 0x64, - 0x20, 0x77, 0x68, 0x65, 0x6e, 0x20, 0x74, 0x68, 0x65, 0x20, 0x72, 0x6f, 0x6c, 0x65, 0x70, 0x65, - 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x20, 0x64, 0x6f, 0x65, 0x73, 0x20, 0x6e, 0x6f, - 0x74, 0x20, 0x68, 0x61, 0x76, 0x65, 0x20, 0x70, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, - 0x6e, 0x20, 0x74, 0x6f, 0x20, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x20, 0x74, 0x68, 0x65, 0x20, - 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x2e, 0x52, 0x3b, 0x0a, 0x03, 0x34, 0x30, 0x34, - 0x12, 0x34, 0x0a, 0x2a, 0x52, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x65, 0x64, 0x20, 0x77, 0x68, 0x65, - 0x6e, 0x20, 0x74, 0x68, 0x65, 0x20, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x20, 0x64, - 0x6f, 0x65, 0x73, 0x20, 0x6e, 0x6f, 0x74, 0x20, 0x65, 0x78, 0x69, 0x73, 0x74, 0x2e, 0x12, 0x06, - 0x0a, 0x04, 0x9a, 0x02, 0x01, 0x07, 0x5a, 0x38, 0x0a, 0x25, 0x0a, 0x0a, 0x41, 0x70, 0x69, 0x4b, - 0x65, 0x79, 0x41, 0x75, 0x74, 0x68, 0x12, 0x17, 0x08, 0x02, 0x1a, 0x11, 0x58, 0x2d, 0x52, 0x41, - 0x46, 0x41, 0x59, 0x2d, 0x41, 0x50, 0x49, 0x2d, 0x4b, 0x45, 0x59, 0x49, 0x44, 0x20, 0x02, 0x0a, - 0x0f, 0x0a, 0x09, 0x42, 0x61, 0x73, 0x69, 0x63, 0x41, 0x75, 0x74, 0x68, 0x12, 0x02, 0x08, 0x01, - 0x62, 0x1f, 0x0a, 0x0e, 0x0a, 0x0a, 0x41, 0x70, 0x69, 0x4b, 0x65, 0x79, 0x41, 0x75, 0x74, 0x68, - 0x12, 0x00, 0x0a, 0x0d, 0x0a, 0x09, 0x42, 0x61, 0x73, 0x69, 0x63, 0x41, 0x75, 0x74, 0x68, 0x12, - 0x00, 0xc8, 0xe2, 0x1e, 0x01, 0xd0, 0xe2, 0x1e, 0x01, 0xe0, 0xe2, 0x1e, 0x01, 0xc0, 0xe3, 0x1e, - 0x01, 0xc8, 0xe3, 0x1e, 0x01, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x32, 0xe1, 0x02, 0x0a, 0x0e, 0x52, 0x6f, 0x6c, 0x65, 0x70, 0x65, + 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x8c, 0x01, 0x0a, 0x12, 0x47, 0x65, 0x74, + 0x52, 0x6f, 0x6c, 0x65, 0x70, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x12, + 0x27, 0x2e, 0x72, 0x61, 0x66, 0x61, 0x79, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x74, 0x79, 0x70, 0x65, + 0x73, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x2e, 0x52, 0x6f, 0x6c, 0x65, 0x50, 0x65, + 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x1a, 0x2b, 0x2e, 0x72, 0x61, 0x66, 0x61, 0x79, + 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, + 0x76, 0x33, 0x2e, 0x52, 0x6f, 0x6c, 0x65, 0x50, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, + 0x6e, 0x4c, 0x69, 0x73, 0x74, 0x22, 0x20, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1a, 0x12, 0x18, 0x2f, + 0x61, 0x75, 0x74, 0x68, 0x2f, 0x76, 0x33, 0x2f, 0x72, 0x6f, 0x6c, 0x65, 0x70, 0x65, 0x72, 0x6d, + 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0xbf, 0x01, 0x0a, 0x11, 0x47, 0x65, 0x74, 0x52, + 0x6f, 0x6c, 0x65, 0x70, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x27, 0x2e, + 0x72, 0x61, 0x66, 0x61, 0x79, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, + 0x75, 0x73, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x2e, 0x52, 0x6f, 0x6c, 0x65, 0x50, 0x65, 0x72, 0x6d, + 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x1a, 0x27, 0x2e, 0x72, 0x61, 0x66, 0x61, 0x79, 0x2e, 0x64, + 0x65, 0x76, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x76, 0x33, + 0x2e, 0x52, 0x6f, 0x6c, 0x65, 0x50, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x22, + 0x58, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x52, 0x12, 0x27, 0x2f, 0x61, 0x75, 0x74, 0x68, 0x2f, 0x76, + 0x33, 0x2f, 0x72, 0x6f, 0x6c, 0x65, 0x70, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, + 0x2f, 0x7b, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x6e, 0x61, 0x6d, 0x65, 0x7d, + 0x5a, 0x27, 0x12, 0x25, 0x2f, 0x61, 0x75, 0x74, 0x68, 0x2f, 0x76, 0x33, 0x2f, 0x72, 0x6f, 0x6c, + 0x65, 0x70, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x2f, 0x7b, 0x6d, 0x65, 0x74, + 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x69, 0x64, 0x7d, 0x42, 0xe8, 0x04, 0x0a, 0x14, 0x63, 0x6f, + 0x6d, 0x2e, 0x72, 0x61, 0x66, 0x61, 0x79, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x72, 0x70, 0x63, 0x2e, + 0x76, 0x33, 0x42, 0x13, 0x52, 0x6f, 0x6c, 0x65, 0x70, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, + 0x6f, 0x6e, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x4a, 0x67, 0x69, 0x74, 0x68, 0x75, + 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x52, 0x61, 0x66, 0x61, 0x79, 0x53, 0x79, 0x73, 0x74, 0x65, + 0x6d, 0x73, 0x2f, 0x72, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2d, 0x62, 0x61, 0x73, 0x65, 0x2f, 0x63, + 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x73, 0x2f, 0x75, 0x73, 0x65, 0x72, 0x6d, 0x67, + 0x6d, 0x74, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x72, 0x70, 0x63, 0x2f, 0x76, 0x33, 0x3b, + 0x72, 0x70, 0x63, 0x76, 0x33, 0xa2, 0x02, 0x03, 0x52, 0x44, 0x52, 0xaa, 0x02, 0x10, 0x52, 0x61, + 0x66, 0x61, 0x79, 0x2e, 0x44, 0x65, 0x76, 0x2e, 0x52, 0x70, 0x63, 0x2e, 0x56, 0x33, 0xca, 0x02, + 0x10, 0x52, 0x61, 0x66, 0x61, 0x79, 0x5c, 0x44, 0x65, 0x76, 0x5c, 0x52, 0x70, 0x63, 0x5c, 0x56, + 0x33, 0xe2, 0x02, 0x1c, 0x52, 0x61, 0x66, 0x61, 0x79, 0x5c, 0x44, 0x65, 0x76, 0x5c, 0x52, 0x70, + 0x63, 0x5c, 0x56, 0x33, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, + 0xea, 0x02, 0x13, 0x52, 0x61, 0x66, 0x61, 0x79, 0x3a, 0x3a, 0x44, 0x65, 0x76, 0x3a, 0x3a, 0x52, + 0x70, 0x63, 0x3a, 0x3a, 0x56, 0x33, 0x92, 0x41, 0xf6, 0x02, 0x12, 0x35, 0x0a, 0x21, 0x52, 0x6f, + 0x6c, 0x65, 0x70, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x20, 0x6d, 0x61, 0x6e, + 0x61, 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x20, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x22, + 0x0b, 0x0a, 0x09, 0x52, 0x61, 0x66, 0x61, 0x79, 0x20, 0x44, 0x65, 0x76, 0x32, 0x03, 0x32, 0x2e, + 0x30, 0x2a, 0x01, 0x02, 0x32, 0x10, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x2f, 0x6a, 0x73, 0x6f, 0x6e, 0x32, 0x10, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x2f, 0x79, 0x61, 0x6d, 0x6c, 0x3a, 0x10, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x6a, 0x73, 0x6f, 0x6e, 0x3a, 0x10, 0x61, 0x70, 0x70, 0x6c, + 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x79, 0x61, 0x6d, 0x6c, 0x52, 0x5a, 0x0a, 0x03, + 0x34, 0x30, 0x33, 0x12, 0x53, 0x0a, 0x51, 0x52, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x65, 0x64, 0x20, + 0x77, 0x68, 0x65, 0x6e, 0x20, 0x74, 0x68, 0x65, 0x20, 0x72, 0x6f, 0x6c, 0x65, 0x70, 0x65, 0x72, + 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x20, 0x64, 0x6f, 0x65, 0x73, 0x20, 0x6e, 0x6f, 0x74, + 0x20, 0x68, 0x61, 0x76, 0x65, 0x20, 0x70, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, + 0x20, 0x74, 0x6f, 0x20, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x20, 0x74, 0x68, 0x65, 0x20, 0x72, + 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x2e, 0x52, 0x3b, 0x0a, 0x03, 0x34, 0x30, 0x34, 0x12, + 0x34, 0x0a, 0x2a, 0x52, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x65, 0x64, 0x20, 0x77, 0x68, 0x65, 0x6e, + 0x20, 0x74, 0x68, 0x65, 0x20, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x20, 0x64, 0x6f, + 0x65, 0x73, 0x20, 0x6e, 0x6f, 0x74, 0x20, 0x65, 0x78, 0x69, 0x73, 0x74, 0x2e, 0x12, 0x06, 0x0a, + 0x04, 0x9a, 0x02, 0x01, 0x07, 0x5a, 0x38, 0x0a, 0x25, 0x0a, 0x0a, 0x41, 0x70, 0x69, 0x4b, 0x65, + 0x79, 0x41, 0x75, 0x74, 0x68, 0x12, 0x17, 0x08, 0x02, 0x1a, 0x11, 0x58, 0x2d, 0x52, 0x41, 0x46, + 0x41, 0x59, 0x2d, 0x41, 0x50, 0x49, 0x2d, 0x4b, 0x45, 0x59, 0x49, 0x44, 0x20, 0x02, 0x0a, 0x0f, + 0x0a, 0x09, 0x42, 0x61, 0x73, 0x69, 0x63, 0x41, 0x75, 0x74, 0x68, 0x12, 0x02, 0x08, 0x01, 0x62, + 0x1f, 0x0a, 0x0e, 0x0a, 0x0a, 0x41, 0x70, 0x69, 0x4b, 0x65, 0x79, 0x41, 0x75, 0x74, 0x68, 0x12, + 0x00, 0x0a, 0x0d, 0x0a, 0x09, 0x42, 0x61, 0x73, 0x69, 0x63, 0x41, 0x75, 0x74, 0x68, 0x12, 0x00, + 0xc8, 0xe2, 0x1e, 0x01, 0xd0, 0xe2, 0x1e, 0x01, 0xe0, 0xe2, 0x1e, 0x01, 0xc0, 0xe3, 0x1e, 0x01, + 0xc8, 0xe3, 0x1e, 0x01, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } -var ( - file_proto_rpc_v3_rolepermission_proto_rawDescOnce sync.Once - file_proto_rpc_v3_rolepermission_proto_rawDescData = file_proto_rpc_v3_rolepermission_proto_rawDesc -) - -func file_proto_rpc_v3_rolepermission_proto_rawDescGZIP() []byte { - file_proto_rpc_v3_rolepermission_proto_rawDescOnce.Do(func() { - file_proto_rpc_v3_rolepermission_proto_rawDescData = protoimpl.X.CompressGZIP(file_proto_rpc_v3_rolepermission_proto_rawDescData) - }) - return file_proto_rpc_v3_rolepermission_proto_rawDescData -} - -var file_proto_rpc_v3_rolepermission_proto_msgTypes = make([]protoimpl.MessageInfo, 1) var file_proto_rpc_v3_rolepermission_proto_goTypes = []interface{}{ - (*GetRolePermissionsRequest)(nil), // 0: rafay.dev.rpc.v3.GetRolePermissionsRequest - (*v3.RolePermission)(nil), // 1: rafay.dev.types.user.v3.RolePermission - (*v3.RolePermissionList)(nil), // 2: rafay.dev.types.user.v3.RolePermissionList + (*v3.RolePermission)(nil), // 0: rafay.dev.types.user.v3.RolePermission + (*v3.RolePermissionList)(nil), // 1: rafay.dev.types.user.v3.RolePermissionList } var file_proto_rpc_v3_rolepermission_proto_depIdxs = []int32{ - 0, // 0: rafay.dev.rpc.v3.Rolepermission.GetRolepermissions:input_type -> rafay.dev.rpc.v3.GetRolePermissionsRequest - 1, // 1: rafay.dev.rpc.v3.Rolepermission.GetRolepermission:input_type -> rafay.dev.types.user.v3.RolePermission - 2, // 2: rafay.dev.rpc.v3.Rolepermission.GetRolepermissions:output_type -> rafay.dev.types.user.v3.RolePermissionList - 1, // 3: rafay.dev.rpc.v3.Rolepermission.GetRolepermission:output_type -> rafay.dev.types.user.v3.RolePermission + 0, // 0: rafay.dev.rpc.v3.Rolepermission.GetRolepermissions:input_type -> rafay.dev.types.user.v3.RolePermission + 0, // 1: rafay.dev.rpc.v3.Rolepermission.GetRolepermission:input_type -> rafay.dev.types.user.v3.RolePermission + 1, // 2: rafay.dev.rpc.v3.Rolepermission.GetRolepermissions:output_type -> rafay.dev.types.user.v3.RolePermissionList + 0, // 3: rafay.dev.rpc.v3.Rolepermission.GetRolepermission:output_type -> rafay.dev.types.user.v3.RolePermission 2, // [2:4] is the sub-list for method output_type 0, // [0:2] is the sub-list for method input_type 0, // [0:0] is the sub-list for extension type_name @@ -178,33 +123,18 @@ func file_proto_rpc_v3_rolepermission_proto_init() { if File_proto_rpc_v3_rolepermission_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_proto_rpc_v3_rolepermission_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetRolePermissionsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_proto_rpc_v3_rolepermission_proto_rawDesc, NumEnums: 0, - NumMessages: 1, + NumMessages: 0, NumExtensions: 0, NumServices: 1, }, GoTypes: file_proto_rpc_v3_rolepermission_proto_goTypes, DependencyIndexes: file_proto_rpc_v3_rolepermission_proto_depIdxs, - MessageInfos: file_proto_rpc_v3_rolepermission_proto_msgTypes, }.Build() File_proto_rpc_v3_rolepermission_proto = out.File file_proto_rpc_v3_rolepermission_proto_rawDesc = nil diff --git a/components/usermgmt/proto/rpc/v3/rolepermission.pb.gw.go b/components/usermgmt/proto/rpc/v3/rolepermission.pb.gw.go index 0d7a701..b6c6120 100644 --- a/components/usermgmt/proto/rpc/v3/rolepermission.pb.gw.go +++ b/components/usermgmt/proto/rpc/v3/rolepermission.pb.gw.go @@ -32,19 +32,37 @@ var _ = runtime.String var _ = utilities.NewDoubleArray var _ = metadata.Join +var ( + filter_Rolepermission_GetRolepermissions_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} +) + func request_Rolepermission_GetRolepermissions_0(ctx context.Context, marshaler runtime.Marshaler, client RolepermissionClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq GetRolePermissionsRequest + var protoReq userv3.RolePermission var metadata runtime.ServerMetadata + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Rolepermission_GetRolepermissions_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + msg, err := client.GetRolepermissions(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err } func local_request_Rolepermission_GetRolepermissions_0(ctx context.Context, marshaler runtime.Marshaler, server RolepermissionServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq GetRolePermissionsRequest + var protoReq userv3.RolePermission var metadata runtime.ServerMetadata + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Rolepermission_GetRolepermissions_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + msg, err := server.GetRolepermissions(ctx, &protoReq) return msg, metadata, err diff --git a/components/usermgmt/proto/rpc/v3/rolepermission.proto b/components/usermgmt/proto/rpc/v3/rolepermission.proto index ac7382d..b52d041 100644 --- a/components/usermgmt/proto/rpc/v3/rolepermission.proto +++ b/components/usermgmt/proto/rpc/v3/rolepermission.proto @@ -65,10 +65,8 @@ option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_swagger) = { } }; -message GetRolePermissionsRequest {} - service Rolepermission { - rpc GetRolepermissions(GetRolePermissionsRequest) + rpc GetRolepermissions(rafay.dev.types.user.v3.RolePermission) returns (rafay.dev.types.user.v3.RolePermissionList) { option (google.api.http) = { get : "/auth/v3/rolepermissions" diff --git a/components/usermgmt/proto/rpc/v3/rolepermission_grpc.pb.go b/components/usermgmt/proto/rpc/v3/rolepermission_grpc.pb.go index 00bc3fd..b03aebc 100644 --- a/components/usermgmt/proto/rpc/v3/rolepermission_grpc.pb.go +++ b/components/usermgmt/proto/rpc/v3/rolepermission_grpc.pb.go @@ -23,7 +23,7 @@ const _ = grpc.SupportPackageIsVersion7 // // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. type RolepermissionClient interface { - GetRolepermissions(ctx context.Context, in *GetRolePermissionsRequest, opts ...grpc.CallOption) (*v3.RolePermissionList, error) + GetRolepermissions(ctx context.Context, in *v3.RolePermission, opts ...grpc.CallOption) (*v3.RolePermissionList, error) GetRolepermission(ctx context.Context, in *v3.RolePermission, opts ...grpc.CallOption) (*v3.RolePermission, error) } @@ -35,7 +35,7 @@ func NewRolepermissionClient(cc grpc.ClientConnInterface) RolepermissionClient { return &rolepermissionClient{cc} } -func (c *rolepermissionClient) GetRolepermissions(ctx context.Context, in *GetRolePermissionsRequest, opts ...grpc.CallOption) (*v3.RolePermissionList, error) { +func (c *rolepermissionClient) GetRolepermissions(ctx context.Context, in *v3.RolePermission, opts ...grpc.CallOption) (*v3.RolePermissionList, error) { out := new(v3.RolePermissionList) err := c.cc.Invoke(ctx, "/rafay.dev.rpc.v3.Rolepermission/GetRolepermissions", in, out, opts...) if err != nil { @@ -57,7 +57,7 @@ func (c *rolepermissionClient) GetRolepermission(ctx context.Context, in *v3.Rol // All implementations should embed UnimplementedRolepermissionServer // for forward compatibility type RolepermissionServer interface { - GetRolepermissions(context.Context, *GetRolePermissionsRequest) (*v3.RolePermissionList, error) + GetRolepermissions(context.Context, *v3.RolePermission) (*v3.RolePermissionList, error) GetRolepermission(context.Context, *v3.RolePermission) (*v3.RolePermission, error) } @@ -65,7 +65,7 @@ type RolepermissionServer interface { type UnimplementedRolepermissionServer struct { } -func (UnimplementedRolepermissionServer) GetRolepermissions(context.Context, *GetRolePermissionsRequest) (*v3.RolePermissionList, error) { +func (UnimplementedRolepermissionServer) GetRolepermissions(context.Context, *v3.RolePermission) (*v3.RolePermissionList, error) { return nil, status.Errorf(codes.Unimplemented, "method GetRolepermissions not implemented") } func (UnimplementedRolepermissionServer) GetRolepermission(context.Context, *v3.RolePermission) (*v3.RolePermission, error) { @@ -84,7 +84,7 @@ func RegisterRolepermissionServer(s grpc.ServiceRegistrar, srv RolepermissionSer } func _Rolepermission_GetRolepermissions_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(GetRolePermissionsRequest) + in := new(v3.RolePermission) if err := dec(in); err != nil { return nil, err } @@ -96,7 +96,7 @@ func _Rolepermission_GetRolepermissions_Handler(srv interface{}, ctx context.Con FullMethod: "/rafay.dev.rpc.v3.Rolepermission/GetRolepermissions", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(RolepermissionServer).GetRolepermissions(ctx, req.(*GetRolePermissionsRequest)) + return srv.(RolepermissionServer).GetRolepermissions(ctx, req.(*v3.RolePermission)) } return interceptor(ctx, in, info, handler) } diff --git a/components/usermgmt/proto/rpc/v3/user.pb.go b/components/usermgmt/proto/rpc/v3/user.pb.go index 6481aa3..e002f76 100644 --- a/components/usermgmt/proto/rpc/v3/user.pb.go +++ b/components/usermgmt/proto/rpc/v3/user.pb.go @@ -24,45 +24,6 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) -// TODO: Add option to filter users list -type GetUsersRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields -} - -func (x *GetUsersRequest) Reset() { - *x = GetUsersRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_proto_rpc_v3_user_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *GetUsersRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GetUsersRequest) ProtoMessage() {} - -func (x *GetUsersRequest) ProtoReflect() protoreflect.Message { - mi := &file_proto_rpc_v3_user_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use GetUsersRequest.ProtoReflect.Descriptor instead. -func (*GetUsersRequest) Descriptor() ([]byte, []int) { - return file_proto_rpc_v3_user_proto_rawDescGZIP(), []int{0} -} - type DeleteUserResponse struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -72,7 +33,7 @@ type DeleteUserResponse struct { func (x *DeleteUserResponse) Reset() { *x = DeleteUserResponse{} if protoimpl.UnsafeEnabled { - mi := &file_proto_rpc_v3_user_proto_msgTypes[1] + mi := &file_proto_rpc_v3_user_proto_msgTypes[0] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -85,7 +46,7 @@ func (x *DeleteUserResponse) String() string { func (*DeleteUserResponse) ProtoMessage() {} func (x *DeleteUserResponse) ProtoReflect() protoreflect.Message { - mi := &file_proto_rpc_v3_user_proto_msgTypes[1] + mi := &file_proto_rpc_v3_user_proto_msgTypes[0] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -98,7 +59,7 @@ func (x *DeleteUserResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use DeleteUserResponse.ProtoReflect.Descriptor instead. func (*DeleteUserResponse) Descriptor() ([]byte, []int) { - return file_proto_rpc_v3_user_proto_rawDescGZIP(), []int{1} + return file_proto_rpc_v3_user_proto_rawDescGZIP(), []int{0} } var File_proto_rpc_v3_user_proto protoreflect.FileDescriptor @@ -115,95 +76,126 @@ var file_proto_rpc_v3_user_proto_rawDesc = []byte{ 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x20, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2f, 0x75, 0x73, 0x65, 0x72, 0x70, 0x62, 0x2f, 0x76, 0x33, 0x2f, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x22, 0x11, 0x0a, 0x0f, 0x47, 0x65, 0x74, 0x55, 0x73, 0x65, 0x72, 0x73, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x22, 0x14, 0x0a, 0x12, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x55, 0x73, - 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x32, 0x8d, 0x06, 0x0a, 0x04, 0x55, - 0x73, 0x65, 0x72, 0x12, 0x9e, 0x01, 0x0a, 0x0a, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x55, 0x73, - 0x65, 0x72, 0x12, 0x1d, 0x2e, 0x72, 0x61, 0x66, 0x61, 0x79, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x74, - 0x79, 0x70, 0x65, 0x73, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x2e, 0x55, 0x73, 0x65, - 0x72, 0x1a, 0x1d, 0x2e, 0x72, 0x61, 0x66, 0x61, 0x79, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x74, 0x79, - 0x70, 0x65, 0x73, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x2e, 0x55, 0x73, 0x65, 0x72, - 0x22, 0x52, 0x92, 0x41, 0x36, 0x4a, 0x34, 0x0a, 0x03, 0x32, 0x30, 0x31, 0x12, 0x2d, 0x0a, 0x2b, - 0x52, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x65, 0x64, 0x20, 0x77, 0x68, 0x65, 0x6e, 0x20, 0x75, 0x73, - 0x65, 0x72, 0x20, 0x69, 0x73, 0x20, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x20, 0x73, 0x75, - 0x63, 0x63, 0x65, 0x73, 0x73, 0x66, 0x75, 0x6c, 0x6c, 0x79, 0x2e, 0x82, 0xd3, 0xe4, 0x93, 0x02, - 0x13, 0x22, 0x0e, 0x2f, 0x61, 0x75, 0x74, 0x68, 0x2f, 0x76, 0x33, 0x2f, 0x75, 0x73, 0x65, 0x72, - 0x73, 0x3a, 0x01, 0x2a, 0x12, 0x68, 0x0a, 0x08, 0x47, 0x65, 0x74, 0x55, 0x73, 0x65, 0x72, 0x73, - 0x12, 0x21, 0x2e, 0x72, 0x61, 0x66, 0x61, 0x79, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x72, 0x70, 0x63, - 0x2e, 0x76, 0x33, 0x2e, 0x47, 0x65, 0x74, 0x55, 0x73, 0x65, 0x72, 0x73, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x1a, 0x21, 0x2e, 0x72, 0x61, 0x66, 0x61, 0x79, 0x2e, 0x64, 0x65, 0x76, 0x2e, - 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x2e, 0x55, 0x73, - 0x65, 0x72, 0x4c, 0x69, 0x73, 0x74, 0x22, 0x16, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x10, 0x12, 0x0e, - 0x2f, 0x61, 0x75, 0x74, 0x68, 0x2f, 0x76, 0x33, 0x2f, 0x75, 0x73, 0x65, 0x72, 0x73, 0x12, 0x8d, - 0x01, 0x0a, 0x07, 0x47, 0x65, 0x74, 0x55, 0x73, 0x65, 0x72, 0x12, 0x1d, 0x2e, 0x72, 0x61, 0x66, + 0x6f, 0x22, 0x14, 0x0a, 0x12, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x55, 0x73, 0x65, 0x72, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x32, 0x91, 0x0a, 0x0a, 0x04, 0x55, 0x73, 0x65, 0x72, + 0x12, 0xdf, 0x01, 0x0a, 0x0a, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x55, 0x73, 0x65, 0x72, 0x12, + 0x1d, 0x2e, 0x72, 0x61, 0x66, 0x61, 0x79, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x74, 0x79, 0x70, 0x65, + 0x73, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x1a, 0x1d, + 0x2e, 0x72, 0x61, 0x66, 0x61, 0x79, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, + 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x22, 0x92, 0x01, + 0x92, 0x41, 0x36, 0x4a, 0x34, 0x0a, 0x03, 0x32, 0x30, 0x31, 0x12, 0x2d, 0x0a, 0x2b, 0x52, 0x65, + 0x74, 0x75, 0x72, 0x6e, 0x65, 0x64, 0x20, 0x77, 0x68, 0x65, 0x6e, 0x20, 0x75, 0x73, 0x65, 0x72, + 0x20, 0x69, 0x73, 0x20, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x20, 0x73, 0x75, 0x63, 0x63, + 0x65, 0x73, 0x73, 0x66, 0x75, 0x6c, 0x6c, 0x79, 0x2e, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x53, 0x22, + 0x4e, 0x2f, 0x61, 0x75, 0x74, 0x68, 0x2f, 0x76, 0x33, 0x2f, 0x70, 0x61, 0x72, 0x74, 0x6e, 0x65, + 0x72, 0x2f, 0x7b, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x70, 0x61, 0x72, 0x74, + 0x6e, 0x65, 0x72, 0x7d, 0x2f, 0x6f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x2f, 0x7b, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x6f, 0x72, 0x67, 0x61, + 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x7d, 0x2f, 0x75, 0x73, 0x65, 0x72, 0x73, 0x3a, + 0x01, 0x2a, 0x12, 0xa4, 0x01, 0x0a, 0x08, 0x47, 0x65, 0x74, 0x55, 0x73, 0x65, 0x72, 0x73, 0x12, + 0x1d, 0x2e, 0x72, 0x61, 0x66, 0x61, 0x79, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x74, 0x79, 0x70, 0x65, + 0x73, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x1a, 0x21, + 0x2e, 0x72, 0x61, 0x66, 0x61, 0x79, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, + 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x4c, 0x69, 0x73, + 0x74, 0x22, 0x56, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x50, 0x12, 0x4e, 0x2f, 0x61, 0x75, 0x74, 0x68, + 0x2f, 0x76, 0x33, 0x2f, 0x70, 0x61, 0x72, 0x74, 0x6e, 0x65, 0x72, 0x2f, 0x7b, 0x6d, 0x65, 0x74, + 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x70, 0x61, 0x72, 0x74, 0x6e, 0x65, 0x72, 0x7d, 0x2f, 0x6f, + 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x7b, 0x6d, 0x65, 0x74, + 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x6f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x7d, 0x2f, 0x75, 0x73, 0x65, 0x72, 0x73, 0x12, 0x8f, 0x02, 0x0a, 0x07, 0x47, 0x65, + 0x74, 0x55, 0x73, 0x65, 0x72, 0x12, 0x1d, 0x2e, 0x72, 0x61, 0x66, 0x61, 0x79, 0x2e, 0x64, 0x65, + 0x76, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x2e, + 0x55, 0x73, 0x65, 0x72, 0x1a, 0x1d, 0x2e, 0x72, 0x61, 0x66, 0x61, 0x79, 0x2e, 0x64, 0x65, 0x76, + 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x2e, 0x55, + 0x73, 0x65, 0x72, 0x22, 0xc5, 0x01, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0xbe, 0x01, 0x12, 0x5d, 0x2f, + 0x61, 0x75, 0x74, 0x68, 0x2f, 0x76, 0x33, 0x2f, 0x70, 0x61, 0x72, 0x74, 0x6e, 0x65, 0x72, 0x2f, + 0x7b, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x70, 0x61, 0x72, 0x74, 0x6e, 0x65, + 0x72, 0x7d, 0x2f, 0x6f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, + 0x7b, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x6f, 0x72, 0x67, 0x61, 0x6e, 0x69, + 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x7d, 0x2f, 0x75, 0x73, 0x65, 0x72, 0x2f, 0x7b, 0x6d, 0x65, + 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x6e, 0x61, 0x6d, 0x65, 0x7d, 0x5a, 0x5d, 0x12, 0x5b, + 0x2f, 0x61, 0x75, 0x74, 0x68, 0x2f, 0x76, 0x33, 0x2f, 0x70, 0x61, 0x72, 0x74, 0x6e, 0x65, 0x72, + 0x2f, 0x7b, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x70, 0x61, 0x72, 0x74, 0x6e, + 0x65, 0x72, 0x7d, 0x2f, 0x6f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x2f, 0x7b, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x6f, 0x72, 0x67, 0x61, 0x6e, + 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x7d, 0x2f, 0x75, 0x73, 0x65, 0x72, 0x2f, 0x7b, 0x6d, + 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x69, 0x64, 0x7d, 0x12, 0x98, 0x02, 0x0a, 0x0a, + 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x55, 0x73, 0x65, 0x72, 0x12, 0x1d, 0x2e, 0x72, 0x61, 0x66, 0x61, 0x79, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x1a, 0x1d, 0x2e, 0x72, 0x61, 0x66, 0x61, 0x79, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x75, 0x73, 0x65, 0x72, - 0x2e, 0x76, 0x33, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x22, 0x44, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x3e, - 0x12, 0x1d, 0x2f, 0x61, 0x75, 0x74, 0x68, 0x2f, 0x76, 0x33, 0x2f, 0x75, 0x73, 0x65, 0x72, 0x2f, - 0x7b, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x6e, 0x61, 0x6d, 0x65, 0x7d, 0x5a, - 0x1d, 0x12, 0x1b, 0x2f, 0x61, 0x75, 0x74, 0x68, 0x2f, 0x76, 0x33, 0x2f, 0x75, 0x73, 0x65, 0x72, - 0x2f, 0x7b, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x69, 0x64, 0x7d, 0x12, 0x96, - 0x01, 0x0a, 0x0a, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x55, 0x73, 0x65, 0x72, 0x12, 0x1d, 0x2e, - 0x72, 0x61, 0x66, 0x61, 0x79, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, - 0x75, 0x73, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x1a, 0x1d, 0x2e, 0x72, - 0x61, 0x66, 0x61, 0x79, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x75, - 0x73, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x22, 0x4a, 0x82, 0xd3, 0xe4, - 0x93, 0x02, 0x44, 0x1a, 0x1d, 0x2f, 0x61, 0x75, 0x74, 0x68, 0x2f, 0x76, 0x33, 0x2f, 0x75, 0x73, - 0x65, 0x72, 0x2f, 0x7b, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x6e, 0x61, 0x6d, - 0x65, 0x7d, 0x3a, 0x01, 0x2a, 0x5a, 0x20, 0x1a, 0x1b, 0x2f, 0x61, 0x75, 0x74, 0x68, 0x2f, 0x76, - 0x33, 0x2f, 0x75, 0x73, 0x65, 0x72, 0x2f, 0x7b, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, - 0x2e, 0x69, 0x64, 0x7d, 0x3a, 0x01, 0x2a, 0x12, 0xd0, 0x01, 0x0a, 0x0a, 0x44, 0x65, 0x6c, 0x65, - 0x74, 0x65, 0x55, 0x73, 0x65, 0x72, 0x12, 0x1d, 0x2e, 0x72, 0x61, 0x66, 0x61, 0x79, 0x2e, 0x64, - 0x65, 0x76, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x76, 0x33, - 0x2e, 0x55, 0x73, 0x65, 0x72, 0x1a, 0x24, 0x2e, 0x72, 0x61, 0x66, 0x61, 0x79, 0x2e, 0x64, 0x65, - 0x76, 0x2e, 0x72, 0x70, 0x63, 0x2e, 0x76, 0x33, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x55, - 0x73, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x7d, 0x92, 0x41, 0x36, + 0x2e, 0x76, 0x33, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x22, 0xcb, 0x01, 0x82, 0xd3, 0xe4, 0x93, 0x02, + 0xc4, 0x01, 0x1a, 0x5d, 0x2f, 0x61, 0x75, 0x74, 0x68, 0x2f, 0x76, 0x33, 0x2f, 0x70, 0x61, 0x72, + 0x74, 0x6e, 0x65, 0x72, 0x2f, 0x7b, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x70, + 0x61, 0x72, 0x74, 0x6e, 0x65, 0x72, 0x7d, 0x2f, 0x6f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x7b, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x6f, + 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x7d, 0x2f, 0x75, 0x73, 0x65, + 0x72, 0x2f, 0x7b, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x6e, 0x61, 0x6d, 0x65, + 0x7d, 0x3a, 0x01, 0x2a, 0x5a, 0x60, 0x1a, 0x5b, 0x2f, 0x61, 0x75, 0x74, 0x68, 0x2f, 0x76, 0x33, + 0x2f, 0x70, 0x61, 0x72, 0x74, 0x6e, 0x65, 0x72, 0x2f, 0x7b, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, + 0x74, 0x61, 0x2e, 0x70, 0x61, 0x72, 0x74, 0x6e, 0x65, 0x72, 0x7d, 0x2f, 0x6f, 0x72, 0x67, 0x61, + 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x7b, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, + 0x74, 0x61, 0x2e, 0x6f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x7d, + 0x2f, 0x75, 0x73, 0x65, 0x72, 0x2f, 0x7b, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, + 0x69, 0x64, 0x7d, 0x3a, 0x01, 0x2a, 0x12, 0xd2, 0x02, 0x0a, 0x0a, 0x44, 0x65, 0x6c, 0x65, 0x74, + 0x65, 0x55, 0x73, 0x65, 0x72, 0x12, 0x1d, 0x2e, 0x72, 0x61, 0x66, 0x61, 0x79, 0x2e, 0x64, 0x65, + 0x76, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x2e, + 0x55, 0x73, 0x65, 0x72, 0x1a, 0x24, 0x2e, 0x72, 0x61, 0x66, 0x61, 0x79, 0x2e, 0x64, 0x65, 0x76, + 0x2e, 0x72, 0x70, 0x63, 0x2e, 0x76, 0x33, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x55, 0x73, + 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0xfe, 0x01, 0x92, 0x41, 0x36, 0x4a, 0x34, 0x0a, 0x03, 0x32, 0x30, 0x34, 0x12, 0x2d, 0x0a, 0x2b, 0x52, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x65, 0x64, 0x20, 0x77, 0x68, 0x65, 0x6e, 0x20, 0x75, 0x73, 0x65, 0x72, 0x20, 0x69, 0x73, 0x20, 0x64, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x64, 0x20, 0x73, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, - 0x66, 0x75, 0x6c, 0x6c, 0x79, 0x2e, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x3e, 0x2a, 0x1d, 0x2f, 0x61, - 0x75, 0x74, 0x68, 0x2f, 0x76, 0x33, 0x2f, 0x75, 0x73, 0x65, 0x72, 0x2f, 0x7b, 0x6d, 0x65, 0x74, - 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x6e, 0x61, 0x6d, 0x65, 0x7d, 0x5a, 0x1d, 0x2a, 0x1b, 0x2f, - 0x61, 0x75, 0x74, 0x68, 0x2f, 0x76, 0x33, 0x2f, 0x75, 0x73, 0x65, 0x72, 0x2f, 0x7b, 0x6d, 0x65, - 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x69, 0x64, 0x7d, 0x42, 0xca, 0x04, 0x0a, 0x14, 0x63, - 0x6f, 0x6d, 0x2e, 0x72, 0x61, 0x66, 0x61, 0x79, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x72, 0x70, 0x63, - 0x2e, 0x76, 0x33, 0x42, 0x09, 0x55, 0x73, 0x65, 0x72, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, - 0x5a, 0x4a, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x52, 0x61, 0x66, - 0x61, 0x79, 0x53, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x73, 0x2f, 0x72, 0x63, 0x6c, 0x6f, 0x75, 0x64, - 0x2d, 0x62, 0x61, 0x73, 0x65, 0x2f, 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x73, - 0x2f, 0x75, 0x73, 0x65, 0x72, 0x6d, 0x67, 0x6d, 0x74, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, - 0x72, 0x70, 0x63, 0x2f, 0x76, 0x33, 0x3b, 0x72, 0x70, 0x63, 0x76, 0x33, 0xa2, 0x02, 0x03, 0x52, - 0x44, 0x52, 0xaa, 0x02, 0x10, 0x52, 0x61, 0x66, 0x61, 0x79, 0x2e, 0x44, 0x65, 0x76, 0x2e, 0x52, - 0x70, 0x63, 0x2e, 0x56, 0x33, 0xca, 0x02, 0x10, 0x52, 0x61, 0x66, 0x61, 0x79, 0x5c, 0x44, 0x65, - 0x76, 0x5c, 0x52, 0x70, 0x63, 0x5c, 0x56, 0x33, 0xe2, 0x02, 0x1c, 0x52, 0x61, 0x66, 0x61, 0x79, - 0x5c, 0x44, 0x65, 0x76, 0x5c, 0x52, 0x70, 0x63, 0x5c, 0x56, 0x33, 0x5c, 0x47, 0x50, 0x42, 0x4d, - 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x13, 0x52, 0x61, 0x66, 0x61, 0x79, 0x3a, - 0x3a, 0x44, 0x65, 0x76, 0x3a, 0x3a, 0x52, 0x70, 0x63, 0x3a, 0x3a, 0x56, 0x33, 0x92, 0x41, 0xe2, - 0x02, 0x12, 0x2b, 0x0a, 0x17, 0x55, 0x73, 0x65, 0x72, 0x20, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, - 0x6d, 0x65, 0x6e, 0x74, 0x20, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x22, 0x0b, 0x0a, 0x09, - 0x52, 0x61, 0x66, 0x61, 0x79, 0x20, 0x44, 0x65, 0x76, 0x32, 0x03, 0x32, 0x2e, 0x30, 0x2a, 0x01, - 0x02, 0x32, 0x10, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x6a, - 0x73, 0x6f, 0x6e, 0x32, 0x10, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x2f, 0x79, 0x61, 0x6d, 0x6c, 0x3a, 0x10, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x2f, 0x6a, 0x73, 0x6f, 0x6e, 0x3a, 0x10, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x79, 0x61, 0x6d, 0x6c, 0x52, 0x50, 0x0a, 0x03, 0x34, 0x30, 0x33, - 0x12, 0x49, 0x0a, 0x47, 0x52, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x65, 0x64, 0x20, 0x77, 0x68, 0x65, - 0x6e, 0x20, 0x74, 0x68, 0x65, 0x20, 0x75, 0x73, 0x65, 0x72, 0x20, 0x64, 0x6f, 0x65, 0x73, 0x20, - 0x6e, 0x6f, 0x74, 0x20, 0x68, 0x61, 0x76, 0x65, 0x20, 0x70, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, - 0x69, 0x6f, 0x6e, 0x20, 0x74, 0x6f, 0x20, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x20, 0x74, 0x68, - 0x65, 0x20, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x2e, 0x52, 0x3b, 0x0a, 0x03, 0x34, - 0x30, 0x34, 0x12, 0x34, 0x0a, 0x2a, 0x52, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x65, 0x64, 0x20, 0x77, - 0x68, 0x65, 0x6e, 0x20, 0x74, 0x68, 0x65, 0x20, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, - 0x20, 0x64, 0x6f, 0x65, 0x73, 0x20, 0x6e, 0x6f, 0x74, 0x20, 0x65, 0x78, 0x69, 0x73, 0x74, 0x2e, - 0x12, 0x06, 0x0a, 0x04, 0x9a, 0x02, 0x01, 0x07, 0x5a, 0x38, 0x0a, 0x25, 0x0a, 0x0a, 0x41, 0x70, - 0x69, 0x4b, 0x65, 0x79, 0x41, 0x75, 0x74, 0x68, 0x12, 0x17, 0x08, 0x02, 0x1a, 0x11, 0x58, 0x2d, - 0x52, 0x41, 0x46, 0x41, 0x59, 0x2d, 0x41, 0x50, 0x49, 0x2d, 0x4b, 0x45, 0x59, 0x49, 0x44, 0x20, - 0x02, 0x0a, 0x0f, 0x0a, 0x09, 0x42, 0x61, 0x73, 0x69, 0x63, 0x41, 0x75, 0x74, 0x68, 0x12, 0x02, - 0x08, 0x01, 0x62, 0x1f, 0x0a, 0x0e, 0x0a, 0x0a, 0x41, 0x70, 0x69, 0x4b, 0x65, 0x79, 0x41, 0x75, - 0x74, 0x68, 0x12, 0x00, 0x0a, 0x0d, 0x0a, 0x09, 0x42, 0x61, 0x73, 0x69, 0x63, 0x41, 0x75, 0x74, - 0x68, 0x12, 0x00, 0xc8, 0xe2, 0x1e, 0x01, 0xd0, 0xe2, 0x1e, 0x01, 0xe0, 0xe2, 0x1e, 0x01, 0xc0, - 0xe3, 0x1e, 0x01, 0xc8, 0xe3, 0x1e, 0x01, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x66, 0x75, 0x6c, 0x6c, 0x79, 0x2e, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0xbe, 0x01, 0x2a, 0x5d, 0x2f, + 0x61, 0x75, 0x74, 0x68, 0x2f, 0x76, 0x33, 0x2f, 0x70, 0x61, 0x72, 0x74, 0x6e, 0x65, 0x72, 0x2f, + 0x7b, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x70, 0x61, 0x72, 0x74, 0x6e, 0x65, + 0x72, 0x7d, 0x2f, 0x6f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, + 0x7b, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x6f, 0x72, 0x67, 0x61, 0x6e, 0x69, + 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x7d, 0x2f, 0x75, 0x73, 0x65, 0x72, 0x2f, 0x7b, 0x6d, 0x65, + 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x6e, 0x61, 0x6d, 0x65, 0x7d, 0x5a, 0x5d, 0x2a, 0x5b, + 0x2f, 0x61, 0x75, 0x74, 0x68, 0x2f, 0x70, 0x61, 0x72, 0x74, 0x6e, 0x65, 0x72, 0x2f, 0x7b, 0x6d, + 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x70, 0x61, 0x72, 0x74, 0x6e, 0x65, 0x72, 0x7d, + 0x2f, 0x6f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x7b, 0x6d, + 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x6f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x7d, 0x2f, 0x76, 0x33, 0x2f, 0x75, 0x73, 0x65, 0x72, 0x2f, 0x7b, 0x6d, + 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x69, 0x64, 0x7d, 0x42, 0xca, 0x04, 0x0a, 0x14, + 0x63, 0x6f, 0x6d, 0x2e, 0x72, 0x61, 0x66, 0x61, 0x79, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x72, 0x70, + 0x63, 0x2e, 0x76, 0x33, 0x42, 0x09, 0x55, 0x73, 0x65, 0x72, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, + 0x01, 0x5a, 0x4a, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x52, 0x61, + 0x66, 0x61, 0x79, 0x53, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x73, 0x2f, 0x72, 0x63, 0x6c, 0x6f, 0x75, + 0x64, 0x2d, 0x62, 0x61, 0x73, 0x65, 0x2f, 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, + 0x73, 0x2f, 0x75, 0x73, 0x65, 0x72, 0x6d, 0x67, 0x6d, 0x74, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x2f, 0x72, 0x70, 0x63, 0x2f, 0x76, 0x33, 0x3b, 0x72, 0x70, 0x63, 0x76, 0x33, 0xa2, 0x02, 0x03, + 0x52, 0x44, 0x52, 0xaa, 0x02, 0x10, 0x52, 0x61, 0x66, 0x61, 0x79, 0x2e, 0x44, 0x65, 0x76, 0x2e, + 0x52, 0x70, 0x63, 0x2e, 0x56, 0x33, 0xca, 0x02, 0x10, 0x52, 0x61, 0x66, 0x61, 0x79, 0x5c, 0x44, + 0x65, 0x76, 0x5c, 0x52, 0x70, 0x63, 0x5c, 0x56, 0x33, 0xe2, 0x02, 0x1c, 0x52, 0x61, 0x66, 0x61, + 0x79, 0x5c, 0x44, 0x65, 0x76, 0x5c, 0x52, 0x70, 0x63, 0x5c, 0x56, 0x33, 0x5c, 0x47, 0x50, 0x42, + 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x13, 0x52, 0x61, 0x66, 0x61, 0x79, + 0x3a, 0x3a, 0x44, 0x65, 0x76, 0x3a, 0x3a, 0x52, 0x70, 0x63, 0x3a, 0x3a, 0x56, 0x33, 0x92, 0x41, + 0xe2, 0x02, 0x12, 0x2b, 0x0a, 0x17, 0x55, 0x73, 0x65, 0x72, 0x20, 0x6d, 0x61, 0x6e, 0x61, 0x67, + 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x20, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x22, 0x0b, 0x0a, + 0x09, 0x52, 0x61, 0x66, 0x61, 0x79, 0x20, 0x44, 0x65, 0x76, 0x32, 0x03, 0x32, 0x2e, 0x30, 0x2a, + 0x01, 0x02, 0x32, 0x10, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, + 0x6a, 0x73, 0x6f, 0x6e, 0x32, 0x10, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x2f, 0x79, 0x61, 0x6d, 0x6c, 0x3a, 0x10, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x2f, 0x6a, 0x73, 0x6f, 0x6e, 0x3a, 0x10, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x79, 0x61, 0x6d, 0x6c, 0x52, 0x50, 0x0a, 0x03, 0x34, 0x30, + 0x33, 0x12, 0x49, 0x0a, 0x47, 0x52, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x65, 0x64, 0x20, 0x77, 0x68, + 0x65, 0x6e, 0x20, 0x74, 0x68, 0x65, 0x20, 0x75, 0x73, 0x65, 0x72, 0x20, 0x64, 0x6f, 0x65, 0x73, + 0x20, 0x6e, 0x6f, 0x74, 0x20, 0x68, 0x61, 0x76, 0x65, 0x20, 0x70, 0x65, 0x72, 0x6d, 0x69, 0x73, + 0x73, 0x69, 0x6f, 0x6e, 0x20, 0x74, 0x6f, 0x20, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x20, 0x74, + 0x68, 0x65, 0x20, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x2e, 0x52, 0x3b, 0x0a, 0x03, + 0x34, 0x30, 0x34, 0x12, 0x34, 0x0a, 0x2a, 0x52, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x65, 0x64, 0x20, + 0x77, 0x68, 0x65, 0x6e, 0x20, 0x74, 0x68, 0x65, 0x20, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, + 0x65, 0x20, 0x64, 0x6f, 0x65, 0x73, 0x20, 0x6e, 0x6f, 0x74, 0x20, 0x65, 0x78, 0x69, 0x73, 0x74, + 0x2e, 0x12, 0x06, 0x0a, 0x04, 0x9a, 0x02, 0x01, 0x07, 0x5a, 0x38, 0x0a, 0x25, 0x0a, 0x0a, 0x41, + 0x70, 0x69, 0x4b, 0x65, 0x79, 0x41, 0x75, 0x74, 0x68, 0x12, 0x17, 0x08, 0x02, 0x1a, 0x11, 0x58, + 0x2d, 0x52, 0x41, 0x46, 0x41, 0x59, 0x2d, 0x41, 0x50, 0x49, 0x2d, 0x4b, 0x45, 0x59, 0x49, 0x44, + 0x20, 0x02, 0x0a, 0x0f, 0x0a, 0x09, 0x42, 0x61, 0x73, 0x69, 0x63, 0x41, 0x75, 0x74, 0x68, 0x12, + 0x02, 0x08, 0x01, 0x62, 0x1f, 0x0a, 0x0e, 0x0a, 0x0a, 0x41, 0x70, 0x69, 0x4b, 0x65, 0x79, 0x41, + 0x75, 0x74, 0x68, 0x12, 0x00, 0x0a, 0x0d, 0x0a, 0x09, 0x42, 0x61, 0x73, 0x69, 0x63, 0x41, 0x75, + 0x74, 0x68, 0x12, 0x00, 0xc8, 0xe2, 0x1e, 0x01, 0xd0, 0xe2, 0x1e, 0x01, 0xe0, 0xe2, 0x1e, 0x01, + 0xc0, 0xe3, 0x1e, 0x01, 0xc8, 0xe3, 0x1e, 0x01, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -218,24 +210,23 @@ func file_proto_rpc_v3_user_proto_rawDescGZIP() []byte { return file_proto_rpc_v3_user_proto_rawDescData } -var file_proto_rpc_v3_user_proto_msgTypes = make([]protoimpl.MessageInfo, 2) +var file_proto_rpc_v3_user_proto_msgTypes = make([]protoimpl.MessageInfo, 1) var file_proto_rpc_v3_user_proto_goTypes = []interface{}{ - (*GetUsersRequest)(nil), // 0: rafay.dev.rpc.v3.GetUsersRequest - (*DeleteUserResponse)(nil), // 1: rafay.dev.rpc.v3.DeleteUserResponse - (*v3.User)(nil), // 2: rafay.dev.types.user.v3.User - (*v3.UserList)(nil), // 3: rafay.dev.types.user.v3.UserList + (*DeleteUserResponse)(nil), // 0: rafay.dev.rpc.v3.DeleteUserResponse + (*v3.User)(nil), // 1: rafay.dev.types.user.v3.User + (*v3.UserList)(nil), // 2: rafay.dev.types.user.v3.UserList } var file_proto_rpc_v3_user_proto_depIdxs = []int32{ - 2, // 0: rafay.dev.rpc.v3.User.CreateUser:input_type -> rafay.dev.types.user.v3.User - 0, // 1: rafay.dev.rpc.v3.User.GetUsers:input_type -> rafay.dev.rpc.v3.GetUsersRequest - 2, // 2: rafay.dev.rpc.v3.User.GetUser:input_type -> rafay.dev.types.user.v3.User - 2, // 3: rafay.dev.rpc.v3.User.UpdateUser:input_type -> rafay.dev.types.user.v3.User - 2, // 4: rafay.dev.rpc.v3.User.DeleteUser:input_type -> rafay.dev.types.user.v3.User - 2, // 5: rafay.dev.rpc.v3.User.CreateUser:output_type -> rafay.dev.types.user.v3.User - 3, // 6: rafay.dev.rpc.v3.User.GetUsers:output_type -> rafay.dev.types.user.v3.UserList - 2, // 7: rafay.dev.rpc.v3.User.GetUser:output_type -> rafay.dev.types.user.v3.User - 2, // 8: rafay.dev.rpc.v3.User.UpdateUser:output_type -> rafay.dev.types.user.v3.User - 1, // 9: rafay.dev.rpc.v3.User.DeleteUser:output_type -> rafay.dev.rpc.v3.DeleteUserResponse + 1, // 0: rafay.dev.rpc.v3.User.CreateUser:input_type -> rafay.dev.types.user.v3.User + 1, // 1: rafay.dev.rpc.v3.User.GetUsers:input_type -> rafay.dev.types.user.v3.User + 1, // 2: rafay.dev.rpc.v3.User.GetUser:input_type -> rafay.dev.types.user.v3.User + 1, // 3: rafay.dev.rpc.v3.User.UpdateUser:input_type -> rafay.dev.types.user.v3.User + 1, // 4: rafay.dev.rpc.v3.User.DeleteUser:input_type -> rafay.dev.types.user.v3.User + 1, // 5: rafay.dev.rpc.v3.User.CreateUser:output_type -> rafay.dev.types.user.v3.User + 2, // 6: rafay.dev.rpc.v3.User.GetUsers:output_type -> rafay.dev.types.user.v3.UserList + 1, // 7: rafay.dev.rpc.v3.User.GetUser:output_type -> rafay.dev.types.user.v3.User + 1, // 8: rafay.dev.rpc.v3.User.UpdateUser:output_type -> rafay.dev.types.user.v3.User + 0, // 9: rafay.dev.rpc.v3.User.DeleteUser:output_type -> rafay.dev.rpc.v3.DeleteUserResponse 5, // [5:10] is the sub-list for method output_type 0, // [0:5] is the sub-list for method input_type 0, // [0:0] is the sub-list for extension type_name @@ -250,18 +241,6 @@ func file_proto_rpc_v3_user_proto_init() { } if !protoimpl.UnsafeEnabled { file_proto_rpc_v3_user_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetUsersRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_proto_rpc_v3_user_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*DeleteUserResponse); i { case 0: return &v.state @@ -280,7 +259,7 @@ func file_proto_rpc_v3_user_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_proto_rpc_v3_user_proto_rawDesc, NumEnums: 0, - NumMessages: 2, + NumMessages: 1, NumExtensions: 0, NumServices: 1, }, diff --git a/components/usermgmt/proto/rpc/v3/user.pb.gw.go b/components/usermgmt/proto/rpc/v3/user.pb.gw.go index 2573f60..94182dc 100644 --- a/components/usermgmt/proto/rpc/v3/user.pb.gw.go +++ b/components/usermgmt/proto/rpc/v3/user.pb.gw.go @@ -44,6 +44,33 @@ func request_User_CreateUser_0(ctx context.Context, marshaler runtime.Marshaler, return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["metadata.partner"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "metadata.partner") + } + + err = runtime.PopulateFieldFromPath(&protoReq, "metadata.partner", val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "metadata.partner", err) + } + + val, ok = pathParams["metadata.organization"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "metadata.organization") + } + + err = runtime.PopulateFieldFromPath(&protoReq, "metadata.organization", val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "metadata.organization", err) + } + msg, err := client.CreateUser(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err @@ -61,31 +88,130 @@ func local_request_User_CreateUser_0(ctx context.Context, marshaler runtime.Mars return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["metadata.partner"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "metadata.partner") + } + + err = runtime.PopulateFieldFromPath(&protoReq, "metadata.partner", val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "metadata.partner", err) + } + + val, ok = pathParams["metadata.organization"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "metadata.organization") + } + + err = runtime.PopulateFieldFromPath(&protoReq, "metadata.organization", val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "metadata.organization", err) + } + msg, err := server.CreateUser(ctx, &protoReq) return msg, metadata, err } +var ( + filter_User_GetUsers_0 = &utilities.DoubleArray{Encoding: map[string]int{"metadata": 0, "partner": 1, "organization": 2}, Base: []int{1, 1, 1, 2, 0, 0}, Check: []int{0, 1, 2, 2, 3, 4}} +) + func request_User_GetUsers_0(ctx context.Context, marshaler runtime.Marshaler, client UserClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq GetUsersRequest + var protoReq userv3.User var metadata runtime.ServerMetadata + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["metadata.partner"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "metadata.partner") + } + + err = runtime.PopulateFieldFromPath(&protoReq, "metadata.partner", val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "metadata.partner", err) + } + + val, ok = pathParams["metadata.organization"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "metadata.organization") + } + + err = runtime.PopulateFieldFromPath(&protoReq, "metadata.organization", val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "metadata.organization", err) + } + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_User_GetUsers_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + msg, err := client.GetUsers(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err } func local_request_User_GetUsers_0(ctx context.Context, marshaler runtime.Marshaler, server UserServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq GetUsersRequest + var protoReq userv3.User var metadata runtime.ServerMetadata + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["metadata.partner"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "metadata.partner") + } + + err = runtime.PopulateFieldFromPath(&protoReq, "metadata.partner", val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "metadata.partner", err) + } + + val, ok = pathParams["metadata.organization"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "metadata.organization") + } + + err = runtime.PopulateFieldFromPath(&protoReq, "metadata.organization", val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "metadata.organization", err) + } + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_User_GetUsers_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + msg, err := server.GetUsers(ctx, &protoReq) return msg, metadata, err } var ( - filter_User_GetUser_0 = &utilities.DoubleArray{Encoding: map[string]int{"metadata": 0, "name": 1}, Base: []int{1, 1, 1, 0}, Check: []int{0, 1, 2, 3}} + filter_User_GetUser_0 = &utilities.DoubleArray{Encoding: map[string]int{"metadata": 0, "partner": 1, "organization": 2, "name": 3}, Base: []int{1, 1, 1, 2, 3, 0, 0, 0}, Check: []int{0, 1, 2, 2, 2, 3, 4, 5}} ) func request_User_GetUser_0(ctx context.Context, marshaler runtime.Marshaler, client UserClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -99,6 +225,26 @@ func request_User_GetUser_0(ctx context.Context, marshaler runtime.Marshaler, cl _ = err ) + val, ok = pathParams["metadata.partner"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "metadata.partner") + } + + err = runtime.PopulateFieldFromPath(&protoReq, "metadata.partner", val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "metadata.partner", err) + } + + val, ok = pathParams["metadata.organization"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "metadata.organization") + } + + err = runtime.PopulateFieldFromPath(&protoReq, "metadata.organization", val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "metadata.organization", err) + } + val, ok = pathParams["metadata.name"] if !ok { return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "metadata.name") @@ -132,6 +278,26 @@ func local_request_User_GetUser_0(ctx context.Context, marshaler runtime.Marshal _ = err ) + val, ok = pathParams["metadata.partner"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "metadata.partner") + } + + err = runtime.PopulateFieldFromPath(&protoReq, "metadata.partner", val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "metadata.partner", err) + } + + val, ok = pathParams["metadata.organization"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "metadata.organization") + } + + err = runtime.PopulateFieldFromPath(&protoReq, "metadata.organization", val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "metadata.organization", err) + } + val, ok = pathParams["metadata.name"] if !ok { return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "metadata.name") @@ -155,7 +321,7 @@ func local_request_User_GetUser_0(ctx context.Context, marshaler runtime.Marshal } var ( - filter_User_GetUser_1 = &utilities.DoubleArray{Encoding: map[string]int{"metadata": 0, "id": 1}, Base: []int{1, 1, 1, 0}, Check: []int{0, 1, 2, 3}} + filter_User_GetUser_1 = &utilities.DoubleArray{Encoding: map[string]int{"metadata": 0, "partner": 1, "organization": 2, "id": 3}, Base: []int{1, 1, 1, 2, 3, 0, 0, 0}, Check: []int{0, 1, 2, 2, 2, 3, 4, 5}} ) func request_User_GetUser_1(ctx context.Context, marshaler runtime.Marshaler, client UserClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -169,6 +335,26 @@ func request_User_GetUser_1(ctx context.Context, marshaler runtime.Marshaler, cl _ = err ) + val, ok = pathParams["metadata.partner"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "metadata.partner") + } + + err = runtime.PopulateFieldFromPath(&protoReq, "metadata.partner", val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "metadata.partner", err) + } + + val, ok = pathParams["metadata.organization"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "metadata.organization") + } + + err = runtime.PopulateFieldFromPath(&protoReq, "metadata.organization", val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "metadata.organization", err) + } + val, ok = pathParams["metadata.id"] if !ok { return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "metadata.id") @@ -202,6 +388,26 @@ func local_request_User_GetUser_1(ctx context.Context, marshaler runtime.Marshal _ = err ) + val, ok = pathParams["metadata.partner"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "metadata.partner") + } + + err = runtime.PopulateFieldFromPath(&protoReq, "metadata.partner", val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "metadata.partner", err) + } + + val, ok = pathParams["metadata.organization"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "metadata.organization") + } + + err = runtime.PopulateFieldFromPath(&protoReq, "metadata.organization", val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "metadata.organization", err) + } + val, ok = pathParams["metadata.id"] if !ok { return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "metadata.id") @@ -243,6 +449,26 @@ func request_User_UpdateUser_0(ctx context.Context, marshaler runtime.Marshaler, _ = err ) + val, ok = pathParams["metadata.partner"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "metadata.partner") + } + + err = runtime.PopulateFieldFromPath(&protoReq, "metadata.partner", val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "metadata.partner", err) + } + + val, ok = pathParams["metadata.organization"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "metadata.organization") + } + + err = runtime.PopulateFieldFromPath(&protoReq, "metadata.organization", val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "metadata.organization", err) + } + val, ok = pathParams["metadata.name"] if !ok { return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "metadata.name") @@ -277,6 +503,26 @@ func local_request_User_UpdateUser_0(ctx context.Context, marshaler runtime.Mars _ = err ) + val, ok = pathParams["metadata.partner"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "metadata.partner") + } + + err = runtime.PopulateFieldFromPath(&protoReq, "metadata.partner", val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "metadata.partner", err) + } + + val, ok = pathParams["metadata.organization"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "metadata.organization") + } + + err = runtime.PopulateFieldFromPath(&protoReq, "metadata.organization", val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "metadata.organization", err) + } + val, ok = pathParams["metadata.name"] if !ok { return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "metadata.name") @@ -311,6 +557,26 @@ func request_User_UpdateUser_1(ctx context.Context, marshaler runtime.Marshaler, _ = err ) + val, ok = pathParams["metadata.partner"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "metadata.partner") + } + + err = runtime.PopulateFieldFromPath(&protoReq, "metadata.partner", val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "metadata.partner", err) + } + + val, ok = pathParams["metadata.organization"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "metadata.organization") + } + + err = runtime.PopulateFieldFromPath(&protoReq, "metadata.organization", val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "metadata.organization", err) + } + val, ok = pathParams["metadata.id"] if !ok { return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "metadata.id") @@ -345,6 +611,26 @@ func local_request_User_UpdateUser_1(ctx context.Context, marshaler runtime.Mars _ = err ) + val, ok = pathParams["metadata.partner"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "metadata.partner") + } + + err = runtime.PopulateFieldFromPath(&protoReq, "metadata.partner", val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "metadata.partner", err) + } + + val, ok = pathParams["metadata.organization"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "metadata.organization") + } + + err = runtime.PopulateFieldFromPath(&protoReq, "metadata.organization", val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "metadata.organization", err) + } + val, ok = pathParams["metadata.id"] if !ok { return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "metadata.id") @@ -361,7 +647,7 @@ func local_request_User_UpdateUser_1(ctx context.Context, marshaler runtime.Mars } var ( - filter_User_DeleteUser_0 = &utilities.DoubleArray{Encoding: map[string]int{"metadata": 0, "name": 1}, Base: []int{1, 1, 1, 0}, Check: []int{0, 1, 2, 3}} + filter_User_DeleteUser_0 = &utilities.DoubleArray{Encoding: map[string]int{"metadata": 0, "partner": 1, "organization": 2, "name": 3}, Base: []int{1, 1, 1, 2, 3, 0, 0, 0}, Check: []int{0, 1, 2, 2, 2, 3, 4, 5}} ) func request_User_DeleteUser_0(ctx context.Context, marshaler runtime.Marshaler, client UserClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -375,6 +661,26 @@ func request_User_DeleteUser_0(ctx context.Context, marshaler runtime.Marshaler, _ = err ) + val, ok = pathParams["metadata.partner"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "metadata.partner") + } + + err = runtime.PopulateFieldFromPath(&protoReq, "metadata.partner", val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "metadata.partner", err) + } + + val, ok = pathParams["metadata.organization"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "metadata.organization") + } + + err = runtime.PopulateFieldFromPath(&protoReq, "metadata.organization", val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "metadata.organization", err) + } + val, ok = pathParams["metadata.name"] if !ok { return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "metadata.name") @@ -408,6 +714,26 @@ func local_request_User_DeleteUser_0(ctx context.Context, marshaler runtime.Mars _ = err ) + val, ok = pathParams["metadata.partner"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "metadata.partner") + } + + err = runtime.PopulateFieldFromPath(&protoReq, "metadata.partner", val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "metadata.partner", err) + } + + val, ok = pathParams["metadata.organization"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "metadata.organization") + } + + err = runtime.PopulateFieldFromPath(&protoReq, "metadata.organization", val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "metadata.organization", err) + } + val, ok = pathParams["metadata.name"] if !ok { return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "metadata.name") @@ -431,7 +757,7 @@ func local_request_User_DeleteUser_0(ctx context.Context, marshaler runtime.Mars } var ( - filter_User_DeleteUser_1 = &utilities.DoubleArray{Encoding: map[string]int{"metadata": 0, "id": 1}, Base: []int{1, 1, 1, 0}, Check: []int{0, 1, 2, 3}} + filter_User_DeleteUser_1 = &utilities.DoubleArray{Encoding: map[string]int{"metadata": 0, "partner": 1, "organization": 2, "id": 3}, Base: []int{1, 1, 1, 2, 3, 0, 0, 0}, Check: []int{0, 1, 2, 2, 2, 3, 4, 5}} ) func request_User_DeleteUser_1(ctx context.Context, marshaler runtime.Marshaler, client UserClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -445,6 +771,26 @@ func request_User_DeleteUser_1(ctx context.Context, marshaler runtime.Marshaler, _ = err ) + val, ok = pathParams["metadata.partner"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "metadata.partner") + } + + err = runtime.PopulateFieldFromPath(&protoReq, "metadata.partner", val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "metadata.partner", err) + } + + val, ok = pathParams["metadata.organization"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "metadata.organization") + } + + err = runtime.PopulateFieldFromPath(&protoReq, "metadata.organization", val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "metadata.organization", err) + } + val, ok = pathParams["metadata.id"] if !ok { return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "metadata.id") @@ -478,6 +824,26 @@ func local_request_User_DeleteUser_1(ctx context.Context, marshaler runtime.Mars _ = err ) + val, ok = pathParams["metadata.partner"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "metadata.partner") + } + + err = runtime.PopulateFieldFromPath(&protoReq, "metadata.partner", val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "metadata.partner", err) + } + + val, ok = pathParams["metadata.organization"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "metadata.organization") + } + + err = runtime.PopulateFieldFromPath(&protoReq, "metadata.organization", val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "metadata.organization", err) + } + val, ok = pathParams["metadata.id"] if !ok { return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "metadata.id") @@ -512,7 +878,7 @@ func RegisterUserHandlerServer(ctx context.Context, mux *runtime.ServeMux, serve var stream runtime.ServerTransportStream ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/rafay.dev.rpc.v3.User/CreateUser", runtime.WithHTTPPathPattern("/auth/v3/users")) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/rafay.dev.rpc.v3.User/CreateUser", runtime.WithHTTPPathPattern("/auth/v3/partner/{metadata.partner}/organization/{metadata.organization}/users")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -535,7 +901,7 @@ func RegisterUserHandlerServer(ctx context.Context, mux *runtime.ServeMux, serve var stream runtime.ServerTransportStream ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/rafay.dev.rpc.v3.User/GetUsers", runtime.WithHTTPPathPattern("/auth/v3/users")) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/rafay.dev.rpc.v3.User/GetUsers", runtime.WithHTTPPathPattern("/auth/v3/partner/{metadata.partner}/organization/{metadata.organization}/users")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -558,7 +924,7 @@ func RegisterUserHandlerServer(ctx context.Context, mux *runtime.ServeMux, serve var stream runtime.ServerTransportStream ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/rafay.dev.rpc.v3.User/GetUser", runtime.WithHTTPPathPattern("/auth/v3/user/{metadata.name}")) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/rafay.dev.rpc.v3.User/GetUser", runtime.WithHTTPPathPattern("/auth/v3/partner/{metadata.partner}/organization/{metadata.organization}/user/{metadata.name}")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -581,7 +947,7 @@ func RegisterUserHandlerServer(ctx context.Context, mux *runtime.ServeMux, serve var stream runtime.ServerTransportStream ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/rafay.dev.rpc.v3.User/GetUser", runtime.WithHTTPPathPattern("/auth/v3/user/{metadata.id}")) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/rafay.dev.rpc.v3.User/GetUser", runtime.WithHTTPPathPattern("/auth/v3/partner/{metadata.partner}/organization/{metadata.organization}/user/{metadata.id}")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -604,7 +970,7 @@ func RegisterUserHandlerServer(ctx context.Context, mux *runtime.ServeMux, serve var stream runtime.ServerTransportStream ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/rafay.dev.rpc.v3.User/UpdateUser", runtime.WithHTTPPathPattern("/auth/v3/user/{metadata.name}")) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/rafay.dev.rpc.v3.User/UpdateUser", runtime.WithHTTPPathPattern("/auth/v3/partner/{metadata.partner}/organization/{metadata.organization}/user/{metadata.name}")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -627,7 +993,7 @@ func RegisterUserHandlerServer(ctx context.Context, mux *runtime.ServeMux, serve var stream runtime.ServerTransportStream ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/rafay.dev.rpc.v3.User/UpdateUser", runtime.WithHTTPPathPattern("/auth/v3/user/{metadata.id}")) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/rafay.dev.rpc.v3.User/UpdateUser", runtime.WithHTTPPathPattern("/auth/v3/partner/{metadata.partner}/organization/{metadata.organization}/user/{metadata.id}")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -650,7 +1016,7 @@ func RegisterUserHandlerServer(ctx context.Context, mux *runtime.ServeMux, serve var stream runtime.ServerTransportStream ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/rafay.dev.rpc.v3.User/DeleteUser", runtime.WithHTTPPathPattern("/auth/v3/user/{metadata.name}")) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/rafay.dev.rpc.v3.User/DeleteUser", runtime.WithHTTPPathPattern("/auth/v3/partner/{metadata.partner}/organization/{metadata.organization}/user/{metadata.name}")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -673,7 +1039,7 @@ func RegisterUserHandlerServer(ctx context.Context, mux *runtime.ServeMux, serve var stream runtime.ServerTransportStream ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/rafay.dev.rpc.v3.User/DeleteUser", runtime.WithHTTPPathPattern("/auth/v3/user/{metadata.id}")) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/rafay.dev.rpc.v3.User/DeleteUser", runtime.WithHTTPPathPattern("/auth/partner/{metadata.partner}/organization/{metadata.organization}/v3/user/{metadata.id}")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -735,7 +1101,7 @@ func RegisterUserHandlerClient(ctx context.Context, mux *runtime.ServeMux, clien ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateContext(ctx, mux, req, "/rafay.dev.rpc.v3.User/CreateUser", runtime.WithHTTPPathPattern("/auth/v3/users")) + rctx, err := runtime.AnnotateContext(ctx, mux, req, "/rafay.dev.rpc.v3.User/CreateUser", runtime.WithHTTPPathPattern("/auth/v3/partner/{metadata.partner}/organization/{metadata.organization}/users")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -755,7 +1121,7 @@ func RegisterUserHandlerClient(ctx context.Context, mux *runtime.ServeMux, clien ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateContext(ctx, mux, req, "/rafay.dev.rpc.v3.User/GetUsers", runtime.WithHTTPPathPattern("/auth/v3/users")) + rctx, err := runtime.AnnotateContext(ctx, mux, req, "/rafay.dev.rpc.v3.User/GetUsers", runtime.WithHTTPPathPattern("/auth/v3/partner/{metadata.partner}/organization/{metadata.organization}/users")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -775,7 +1141,7 @@ func RegisterUserHandlerClient(ctx context.Context, mux *runtime.ServeMux, clien ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateContext(ctx, mux, req, "/rafay.dev.rpc.v3.User/GetUser", runtime.WithHTTPPathPattern("/auth/v3/user/{metadata.name}")) + rctx, err := runtime.AnnotateContext(ctx, mux, req, "/rafay.dev.rpc.v3.User/GetUser", runtime.WithHTTPPathPattern("/auth/v3/partner/{metadata.partner}/organization/{metadata.organization}/user/{metadata.name}")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -795,7 +1161,7 @@ func RegisterUserHandlerClient(ctx context.Context, mux *runtime.ServeMux, clien ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateContext(ctx, mux, req, "/rafay.dev.rpc.v3.User/GetUser", runtime.WithHTTPPathPattern("/auth/v3/user/{metadata.id}")) + rctx, err := runtime.AnnotateContext(ctx, mux, req, "/rafay.dev.rpc.v3.User/GetUser", runtime.WithHTTPPathPattern("/auth/v3/partner/{metadata.partner}/organization/{metadata.organization}/user/{metadata.id}")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -815,7 +1181,7 @@ func RegisterUserHandlerClient(ctx context.Context, mux *runtime.ServeMux, clien ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateContext(ctx, mux, req, "/rafay.dev.rpc.v3.User/UpdateUser", runtime.WithHTTPPathPattern("/auth/v3/user/{metadata.name}")) + rctx, err := runtime.AnnotateContext(ctx, mux, req, "/rafay.dev.rpc.v3.User/UpdateUser", runtime.WithHTTPPathPattern("/auth/v3/partner/{metadata.partner}/organization/{metadata.organization}/user/{metadata.name}")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -835,7 +1201,7 @@ func RegisterUserHandlerClient(ctx context.Context, mux *runtime.ServeMux, clien ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateContext(ctx, mux, req, "/rafay.dev.rpc.v3.User/UpdateUser", runtime.WithHTTPPathPattern("/auth/v3/user/{metadata.id}")) + rctx, err := runtime.AnnotateContext(ctx, mux, req, "/rafay.dev.rpc.v3.User/UpdateUser", runtime.WithHTTPPathPattern("/auth/v3/partner/{metadata.partner}/organization/{metadata.organization}/user/{metadata.id}")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -855,7 +1221,7 @@ func RegisterUserHandlerClient(ctx context.Context, mux *runtime.ServeMux, clien ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateContext(ctx, mux, req, "/rafay.dev.rpc.v3.User/DeleteUser", runtime.WithHTTPPathPattern("/auth/v3/user/{metadata.name}")) + rctx, err := runtime.AnnotateContext(ctx, mux, req, "/rafay.dev.rpc.v3.User/DeleteUser", runtime.WithHTTPPathPattern("/auth/v3/partner/{metadata.partner}/organization/{metadata.organization}/user/{metadata.name}")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -875,7 +1241,7 @@ func RegisterUserHandlerClient(ctx context.Context, mux *runtime.ServeMux, clien ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateContext(ctx, mux, req, "/rafay.dev.rpc.v3.User/DeleteUser", runtime.WithHTTPPathPattern("/auth/v3/user/{metadata.id}")) + rctx, err := runtime.AnnotateContext(ctx, mux, req, "/rafay.dev.rpc.v3.User/DeleteUser", runtime.WithHTTPPathPattern("/auth/partner/{metadata.partner}/organization/{metadata.organization}/v3/user/{metadata.id}")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -895,21 +1261,21 @@ func RegisterUserHandlerClient(ctx context.Context, mux *runtime.ServeMux, clien } var ( - pattern_User_CreateUser_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"auth", "v3", "users"}, "")) + pattern_User_CreateUser_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3, 2, 4, 1, 0, 4, 1, 5, 5, 2, 6}, []string{"auth", "v3", "partner", "metadata.partner", "organization", "metadata.organization", "users"}, "")) - pattern_User_GetUsers_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"auth", "v3", "users"}, "")) + pattern_User_GetUsers_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3, 2, 4, 1, 0, 4, 1, 5, 5, 2, 6}, []string{"auth", "v3", "partner", "metadata.partner", "organization", "metadata.organization", "users"}, "")) - pattern_User_GetUser_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3}, []string{"auth", "v3", "user", "metadata.name"}, "")) + pattern_User_GetUser_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3, 2, 4, 1, 0, 4, 1, 5, 5, 2, 6, 1, 0, 4, 1, 5, 7}, []string{"auth", "v3", "partner", "metadata.partner", "organization", "metadata.organization", "user", "metadata.name"}, "")) - pattern_User_GetUser_1 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3}, []string{"auth", "v3", "user", "metadata.id"}, "")) + pattern_User_GetUser_1 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3, 2, 4, 1, 0, 4, 1, 5, 5, 2, 6, 1, 0, 4, 1, 5, 7}, []string{"auth", "v3", "partner", "metadata.partner", "organization", "metadata.organization", "user", "metadata.id"}, "")) - pattern_User_UpdateUser_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3}, []string{"auth", "v3", "user", "metadata.name"}, "")) + pattern_User_UpdateUser_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3, 2, 4, 1, 0, 4, 1, 5, 5, 2, 6, 1, 0, 4, 1, 5, 7}, []string{"auth", "v3", "partner", "metadata.partner", "organization", "metadata.organization", "user", "metadata.name"}, "")) - pattern_User_UpdateUser_1 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3}, []string{"auth", "v3", "user", "metadata.id"}, "")) + pattern_User_UpdateUser_1 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3, 2, 4, 1, 0, 4, 1, 5, 5, 2, 6, 1, 0, 4, 1, 5, 7}, []string{"auth", "v3", "partner", "metadata.partner", "organization", "metadata.organization", "user", "metadata.id"}, "")) - pattern_User_DeleteUser_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3}, []string{"auth", "v3", "user", "metadata.name"}, "")) + pattern_User_DeleteUser_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3, 2, 4, 1, 0, 4, 1, 5, 5, 2, 6, 1, 0, 4, 1, 5, 7}, []string{"auth", "v3", "partner", "metadata.partner", "organization", "metadata.organization", "user", "metadata.name"}, "")) - pattern_User_DeleteUser_1 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3}, []string{"auth", "v3", "user", "metadata.id"}, "")) + pattern_User_DeleteUser_1 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 1, 5, 2, 2, 3, 1, 0, 4, 1, 5, 4, 2, 5, 2, 6, 1, 0, 4, 1, 5, 7}, []string{"auth", "partner", "metadata.partner", "organization", "metadata.organization", "v3", "user", "metadata.id"}, "")) ) var ( diff --git a/components/usermgmt/proto/rpc/v3/user.proto b/components/usermgmt/proto/rpc/v3/user.proto index 0b83983..14a1ad5 100644 --- a/components/usermgmt/proto/rpc/v3/user.proto +++ b/components/usermgmt/proto/rpc/v3/user.proto @@ -64,15 +64,13 @@ option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_swagger) = { } }; -// TODO: Add option to filter users list -message GetUsersRequest {} message DeleteUserResponse {} service User { rpc CreateUser(rafay.dev.types.user.v3.User) returns (rafay.dev.types.user.v3.User) { option (google.api.http) = { - post : "/auth/v3/users" + post : "/auth/v3/partner/{metadata.partner}/organization/{metadata.organization}/users" body : "*" }; @@ -84,27 +82,27 @@ service User { }; }; - rpc GetUsers(GetUsersRequest) returns (rafay.dev.types.user.v3.UserList) { + rpc GetUsers(rafay.dev.types.user.v3.User) returns (rafay.dev.types.user.v3.UserList) { option (google.api.http) = { - get : "/auth/v3/users" + get : "/auth/v3/partner/{metadata.partner}/organization/{metadata.organization}/users" }; }; rpc GetUser(rafay.dev.types.user.v3.User) returns (rafay.dev.types.user.v3.User) { option (google.api.http) = { - get : "/auth/v3/user/{metadata.name}" + get : "/auth/v3/partner/{metadata.partner}/organization/{metadata.organization}/user/{metadata.name}" additional_bindings { - get : "/auth/v3/user/{metadata.id}" + get : "/auth/v3/partner/{metadata.partner}/organization/{metadata.organization}/user/{metadata.id}" } }; }; rpc UpdateUser(rafay.dev.types.user.v3.User) returns (rafay.dev.types.user.v3.User) { option (google.api.http) = { - put : "/auth/v3/user/{metadata.name}" + put : "/auth/v3/partner/{metadata.partner}/organization/{metadata.organization}/user/{metadata.name}" body : "*" additional_bindings { - put : "/auth/v3/user/{metadata.id}" + put : "/auth/v3/partner/{metadata.partner}/organization/{metadata.organization}/user/{metadata.id}" body : "*" } }; @@ -112,9 +110,9 @@ service User { rpc DeleteUser(rafay.dev.types.user.v3.User) returns (DeleteUserResponse) { option (google.api.http) = { - delete : "/auth/v3/user/{metadata.name}" + delete : "/auth/v3/partner/{metadata.partner}/organization/{metadata.organization}/user/{metadata.name}" additional_bindings { - delete : "/auth/v3/user/{metadata.id}" + delete : "/auth/partner/{metadata.partner}/organization/{metadata.organization}/v3/user/{metadata.id}" } }; diff --git a/components/usermgmt/proto/rpc/v3/user_grpc.pb.go b/components/usermgmt/proto/rpc/v3/user_grpc.pb.go index 41c5cad..cb993e1 100644 --- a/components/usermgmt/proto/rpc/v3/user_grpc.pb.go +++ b/components/usermgmt/proto/rpc/v3/user_grpc.pb.go @@ -24,7 +24,7 @@ const _ = grpc.SupportPackageIsVersion7 // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. type UserClient interface { CreateUser(ctx context.Context, in *v3.User, opts ...grpc.CallOption) (*v3.User, error) - GetUsers(ctx context.Context, in *GetUsersRequest, opts ...grpc.CallOption) (*v3.UserList, error) + GetUsers(ctx context.Context, in *v3.User, opts ...grpc.CallOption) (*v3.UserList, error) GetUser(ctx context.Context, in *v3.User, opts ...grpc.CallOption) (*v3.User, error) UpdateUser(ctx context.Context, in *v3.User, opts ...grpc.CallOption) (*v3.User, error) DeleteUser(ctx context.Context, in *v3.User, opts ...grpc.CallOption) (*DeleteUserResponse, error) @@ -47,7 +47,7 @@ func (c *userClient) CreateUser(ctx context.Context, in *v3.User, opts ...grpc.C return out, nil } -func (c *userClient) GetUsers(ctx context.Context, in *GetUsersRequest, opts ...grpc.CallOption) (*v3.UserList, error) { +func (c *userClient) GetUsers(ctx context.Context, in *v3.User, opts ...grpc.CallOption) (*v3.UserList, error) { out := new(v3.UserList) err := c.cc.Invoke(ctx, "/rafay.dev.rpc.v3.User/GetUsers", in, out, opts...) if err != nil { @@ -88,7 +88,7 @@ func (c *userClient) DeleteUser(ctx context.Context, in *v3.User, opts ...grpc.C // for forward compatibility type UserServer interface { CreateUser(context.Context, *v3.User) (*v3.User, error) - GetUsers(context.Context, *GetUsersRequest) (*v3.UserList, error) + GetUsers(context.Context, *v3.User) (*v3.UserList, error) GetUser(context.Context, *v3.User) (*v3.User, error) UpdateUser(context.Context, *v3.User) (*v3.User, error) DeleteUser(context.Context, *v3.User) (*DeleteUserResponse, error) @@ -101,7 +101,7 @@ type UnimplementedUserServer struct { func (UnimplementedUserServer) CreateUser(context.Context, *v3.User) (*v3.User, error) { return nil, status.Errorf(codes.Unimplemented, "method CreateUser not implemented") } -func (UnimplementedUserServer) GetUsers(context.Context, *GetUsersRequest) (*v3.UserList, error) { +func (UnimplementedUserServer) GetUsers(context.Context, *v3.User) (*v3.UserList, error) { return nil, status.Errorf(codes.Unimplemented, "method GetUsers not implemented") } func (UnimplementedUserServer) GetUser(context.Context, *v3.User) (*v3.User, error) { @@ -144,7 +144,7 @@ func _User_CreateUser_Handler(srv interface{}, ctx context.Context, dec func(int } func _User_GetUsers_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(GetUsersRequest) + in := new(v3.User) if err := dec(in); err != nil { return nil, err } @@ -156,7 +156,7 @@ func _User_GetUsers_Handler(srv interface{}, ctx context.Context, dec func(inter FullMethod: "/rafay.dev.rpc.v3.User/GetUsers", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(UserServer).GetUsers(ctx, req.(*GetUsersRequest)) + return srv.(UserServer).GetUsers(ctx, req.(*v3.User)) } return interceptor(ctx, in, info, handler) } From 544a2d6bb057ec1d609d9fea0b8d17327e1e1d3c Mon Sep 17 00:00:00 2001 From: Abin Simon Date: Thu, 6 Jan 2022 15:50:23 +0530 Subject: [PATCH 12/28] Basic CRUD operations on role can now be done --- .../openapi/proto/rpc/v3/group.swagger.json | 10 + .../openapi/proto/rpc/v3/role.swagger.json | 80 ++++ components/usermgmt/main.go | 6 + .../usermgmt/pkg/internal/models/role.go | 23 ++ components/usermgmt/pkg/server/group.go | 3 +- components/usermgmt/pkg/server/role.go | 62 +++ components/usermgmt/pkg/service/group.go | 4 + components/usermgmt/pkg/service/role.go | 367 ++++++++++++++++++ .../usermgmt/proto/types/userpb/v3/role.pb.go | 118 +++--- .../usermgmt/proto/types/userpb/v3/role.proto | 10 + 10 files changed, 634 insertions(+), 49 deletions(-) create mode 100644 components/usermgmt/pkg/internal/models/role.go create mode 100644 components/usermgmt/pkg/server/role.go create mode 100644 components/usermgmt/pkg/service/role.go diff --git a/components/usermgmt/gen/openapi/proto/rpc/v3/group.swagger.json b/components/usermgmt/gen/openapi/proto/rpc/v3/group.swagger.json index 22fa64c..0eb6bb8 100644 --- a/components/usermgmt/gen/openapi/proto/rpc/v3/group.swagger.json +++ b/components/usermgmt/gen/openapi/proto/rpc/v3/group.swagger.json @@ -1420,6 +1420,16 @@ }, "description": "Permissions for the role", "title": "RolePermissions" + }, + "isGlobal": { + "type": "boolean", + "description": "Specify if this is a global role", + "title": "IsGlobal" + }, + "scope": { + "type": "string", + "description": "Scope of the rol", + "title": "Scope" } }, "description": "Role specification", diff --git a/components/usermgmt/gen/openapi/proto/rpc/v3/role.swagger.json b/components/usermgmt/gen/openapi/proto/rpc/v3/role.swagger.json index 5d637d5..e3139ea 100644 --- a/components/usermgmt/gen/openapi/proto/rpc/v3/role.swagger.json +++ b/components/usermgmt/gen/openapi/proto/rpc/v3/role.swagger.json @@ -117,6 +117,20 @@ "type": "string", "format": "date-time" }, + { + "name": "spec.isGlobal", + "description": "IsGlobal. Specify if this is a global role", + "in": "query", + "required": false, + "type": "boolean" + }, + { + "name": "spec.scope", + "description": "Scope. Scope of the rol", + "in": "query", + "required": false, + "type": "string" + }, { "name": "status.conditionType", "description": "Condition Type. type of the status condition", @@ -254,6 +268,20 @@ "type": "string", "format": "date-time" }, + { + "name": "spec.isGlobal", + "description": "IsGlobal. Specify if this is a global role", + "in": "query", + "required": false, + "type": "boolean" + }, + { + "name": "spec.scope", + "description": "Scope. Scope of the rol", + "in": "query", + "required": false, + "type": "string" + }, { "name": "status.conditionType", "description": "Condition Type. type of the status condition", @@ -450,6 +478,20 @@ "type": "string", "format": "date-time" }, + { + "name": "spec.isGlobal", + "description": "IsGlobal. Specify if this is a global role", + "in": "query", + "required": false, + "type": "boolean" + }, + { + "name": "spec.scope", + "description": "Scope. Scope of the rol", + "in": "query", + "required": false, + "type": "string" + }, { "name": "status.conditionType", "description": "Condition Type. type of the status condition", @@ -587,6 +629,20 @@ "type": "string", "format": "date-time" }, + { + "name": "spec.isGlobal", + "description": "IsGlobal. Specify if this is a global role", + "in": "query", + "required": false, + "type": "boolean" + }, + { + "name": "spec.scope", + "description": "Scope. Scope of the rol", + "in": "query", + "required": false, + "type": "string" + }, { "name": "status.conditionType", "description": "Condition Type. type of the status condition", @@ -784,6 +840,20 @@ "type": "string", "format": "date-time" }, + { + "name": "spec.isGlobal", + "description": "IsGlobal. Specify if this is a global role", + "in": "query", + "required": false, + "type": "boolean" + }, + { + "name": "spec.scope", + "description": "Scope. Scope of the rol", + "in": "query", + "required": false, + "type": "string" + }, { "name": "status.conditionType", "description": "Condition Type. type of the status condition", @@ -1189,6 +1259,16 @@ }, "description": "Permissions for the role", "title": "RolePermissions" + }, + "isGlobal": { + "type": "boolean", + "description": "Specify if this is a global role", + "title": "IsGlobal" + }, + "scope": { + "type": "string", + "description": "Scope of the rol", + "title": "Scope" } }, "description": "Role specification", diff --git a/components/usermgmt/main.go b/components/usermgmt/main.go index 7b8aac3..0cd206e 100644 --- a/components/usermgmt/main.go +++ b/components/usermgmt/main.go @@ -59,6 +59,7 @@ var ( dbPassword string db *bun.DB gs service.GroupService + rs service.RoleService dev bool _log = logv2.GetLogger() authPool authv3.AuthPool @@ -118,6 +119,7 @@ func setup() { )) gs = service.NewGroupService(db) + rs = service.NewRoleService(db) _log.Infow("usermgmt setup complete") } @@ -150,6 +152,7 @@ func runAPI(wg *sync.WaitGroup, ctx context.Context) { make([]runtime.ServeMuxOption, 0), pbrpcv3.RegisterUserHandlerFromEndpoint, pbrpcv3.RegisterGroupHandlerFromEndpoint, + pbrpcv3.RegisterRoleHandlerFromEndpoint, ) if err != nil { _log.Fatalw("unable to create gateway", "error", err) @@ -178,8 +181,10 @@ func runRPC(wg *sync.WaitGroup, ctx context.Context) { defer wg.Done() // defer configPool.Close() defer gs.Close() + defer rs.Close() groupServer := server.NewGroupServer(gs) + roleServer := server.NewRoleServer(rs) l, err := net.Listen("tcp", fmt.Sprintf(":%d", rpcPort)) if err != nil { @@ -215,6 +220,7 @@ func runRPC(wg *sync.WaitGroup, ctx context.Context) { rpcv3.RegisterUserServer(s, service.NewUserServer(kc)) rpcv3.RegisterGroupServer(s, groupServer) + rpcv3.RegisterRoleServer(s, roleServer) _log.Infow("starting rpc server", "port", rpcPort) err = s.Serve(l) diff --git a/components/usermgmt/pkg/internal/models/role.go b/components/usermgmt/pkg/internal/models/role.go new file mode 100644 index 0000000..a5ca75e --- /dev/null +++ b/components/usermgmt/pkg/internal/models/role.go @@ -0,0 +1,23 @@ +package models + +import ( + "time" + + "github.com/google/uuid" + "github.com/uptrace/bun" +) + +type Role struct { + bun.BaseModel `bun:"table:authsrv_resourcerole,alias:resourcerole"` + + ID uuid.UUID `bun:"id,type:uuid,pk,default:uuid_generate_v4()"` + Name string `bun:"name,notnull"` + Description string `bun:"description,notnull"` + CreatedAt time.Time `bun:"created_at,notnull,default:current_timestamp"` + ModifiedAt time.Time `bun:"modified_at,notnull,default:current_timestamp"` + Trash bool `bun:"trash,notnull"` + OrganizationId uuid.UUID `bun:"organization_id,type:uuid"` + PartnerId uuid.UUID `bun:"partner_id,type:uuid"` + IsGlobal bool `bun:"is_global,notnull"` + Scope string `bun:"scope,notnull"` +} diff --git a/components/usermgmt/pkg/server/group.go b/components/usermgmt/pkg/server/group.go index 38c8888..4d3056a 100644 --- a/components/usermgmt/pkg/server/group.go +++ b/components/usermgmt/pkg/server/group.go @@ -4,8 +4,8 @@ import ( "context" "github.com/RafaySystems/rcloud-base/components/usermgmt/pkg/service" - userpbv3 "github.com/RafaySystems/rcloud-base/components/usermgmt/proto/types/userpb/v3" rpcv3 "github.com/RafaySystems/rcloud-base/components/usermgmt/proto/rpc/v3" + userpbv3 "github.com/RafaySystems/rcloud-base/components/usermgmt/proto/types/userpb/v3" ) type groupServer struct { @@ -34,7 +34,6 @@ func (s *groupServer) GetGroups(ctx context.Context, p *userpbv3.Group) (*userpb } func (s *groupServer) GetGroup(ctx context.Context, p *userpbv3.Group) (*userpbv3.Group, error) { - group, err := s.GetByName(ctx, p.Metadata.Name) if err != nil { group, err = s.GetByID(ctx, p.Metadata.Id) diff --git a/components/usermgmt/pkg/server/role.go b/components/usermgmt/pkg/server/role.go new file mode 100644 index 0000000..dac0ce8 --- /dev/null +++ b/components/usermgmt/pkg/server/role.go @@ -0,0 +1,62 @@ +package server + +import ( + "context" + + "github.com/RafaySystems/rcloud-base/components/usermgmt/pkg/service" + rpcv3 "github.com/RafaySystems/rcloud-base/components/usermgmt/proto/rpc/v3" + userpbv3 "github.com/RafaySystems/rcloud-base/components/usermgmt/proto/types/userpb/v3" +) + +type roleServer struct { + service.RoleService +} + +// NewRoleServer returns new role server implementation +func NewRoleServer(ps service.RoleService) rpcv3.RoleServer { + return &roleServer{ps} +} + +func (s *roleServer) CreateRole(ctx context.Context, p *userpbv3.Role) (*userpbv3.Role, error) { + role, err := s.Create(ctx, p) + if err != nil { + return nil, err + } + return role, nil +} + +func (s *roleServer) GetRoles(ctx context.Context, p *userpbv3.Role) (*userpbv3.RoleList, error) { + roles, err := s.List(ctx, p) + if err != nil { + return nil, err + } + return roles, nil +} + +func (s *roleServer) GetRole(ctx context.Context, p *userpbv3.Role) (*userpbv3.Role, error) { + role, err := s.GetByName(ctx, p.Metadata.Name) + if err != nil { + role, err = s.GetByID(ctx, p.Metadata.Id) + if err != nil { + return nil, err + } + } + + return role, nil +} + +func (s *roleServer) DeleteRole(ctx context.Context, p *userpbv3.Role) (*userpbv3.Role, error) { + _, err := s.Delete(ctx, p) + if err != nil { + return nil, err + } + return nil, nil +} + +func (s *roleServer) UpdateRole(ctx context.Context, p *userpbv3.Role) (*userpbv3.Role, error) { + role, err := s.Update(ctx, p) + if err != nil { + return nil, err + } + return role, nil +} diff --git a/components/usermgmt/pkg/service/group.go b/components/usermgmt/pkg/service/group.go index bb727b7..59083f9 100644 --- a/components/usermgmt/pkg/service/group.go +++ b/components/usermgmt/pkg/service/group.go @@ -55,6 +55,8 @@ func (s *groupService) Create(ctx context.Context, group *userv3.Group) (*userv3 organizationId, _ := uuid.Parse(group.GetMetadata().GetOrganization()) // TODO: find out the interaction if project key is present in the group metadata // TODO: check if a group with the same 'name' already exists and fail if so + // TODO: we should be specifying names instead of ids for partner and org + // TODO: create vs apply difference like in kubectl?? //convert v3 spec to internal models grp := models.Group{ Name: group.GetMetadata().GetName(), @@ -155,6 +157,7 @@ func (s *groupService) GetByID(ctx context.Context, id string) (*userv3.Group, e } func (s *groupService) GetByName(ctx context.Context, name string) (*userv3.Group, error) { + fmt.Println("name:", name); group := &userv3.Group{ ApiVersion: apiVersion, @@ -204,6 +207,7 @@ func (s *groupService) GetByName(ctx context.Context, name string) (*userv3.Grou } func (s *groupService) Update(ctx context.Context, group *userv3.Group) (*userv3.Group, error) { + // TODO: inform when unchanged id, _ := uuid.Parse(group.Metadata.Id) entity, err := s.dao.GetByID(ctx, id, &models.Group{}) diff --git a/components/usermgmt/pkg/service/role.go b/components/usermgmt/pkg/service/role.go new file mode 100644 index 0000000..83f0225 --- /dev/null +++ b/components/usermgmt/pkg/service/role.go @@ -0,0 +1,367 @@ +package service + +import ( + "context" + "fmt" + "time" + + v3 "github.com/RafaySystems/rcloud-base/components/common/proto/types/commonpb/v3" + "github.com/RafaySystems/rcloud-base/components/usermgmt/pkg/internal/models" + "github.com/RafaySystems/rcloud-base/components/usermgmt/pkg/internal/persistence/provider/pg" + userv3 "github.com/RafaySystems/rcloud-base/components/usermgmt/proto/types/userpb/v3" + "github.com/google/uuid" + bun "github.com/uptrace/bun" + "google.golang.org/protobuf/types/known/timestamppb" +) + +const ( + roleKind = "Role" + roleListKind = "RoleList" +) + +// RoleService is the interface for role operations +type RoleService interface { + Close() error + // create role + Create(ctx context.Context, role *userv3.Role) (*userv3.Role, error) + // get role by id + GetByID(ctx context.Context, id string) (*userv3.Role, error) + // get role by name + GetByName(ctx context.Context, name string) (*userv3.Role, error) + // create or update role + Update(ctx context.Context, role *userv3.Role) (*userv3.Role, error) + // delete role + Delete(ctx context.Context, role *userv3.Role) (*userv3.Role, error) + // list roles + List(ctx context.Context, role *userv3.Role) (*userv3.RoleList, error) +} + +// roleService implements RoleService +type roleService struct { + dao pg.EntityDAO +} + +// NewRoleService return new role service +func NewRoleService(db *bun.DB) RoleService { + return &roleService{ + dao: pg.NewEntityDAO(db), + } +} + +func (s *roleService) Create(ctx context.Context, role *userv3.Role) (*userv3.Role, error) { + + partnerId, _ := uuid.Parse(role.GetMetadata().GetPartner()) + organizationId, _ := uuid.Parse(role.GetMetadata().GetOrganization()) + // TODO: find out the interaction if project key is present in the role metadata + // TODO: check if a role with the same 'name' already exists and fail if so + // TODO: we should be specifying names instead of ids for partner and org + // TODO: create vs apply difference like in kubectl?? + //convert v3 spec to internal models + grp := models.Role{ + Name: role.GetMetadata().GetName(), + Description: role.GetMetadata().GetDescription(), + CreatedAt: time.Now(), + ModifiedAt: time.Now(), + Trash: false, + OrganizationId: organizationId, + PartnerId: partnerId, + IsGlobal: role.GetSpec().GetIsGlobal(), + Scope: role.GetSpec().GetScope(), + } + entity, err := s.dao.Create(ctx, &grp) + if err != nil { + role.Status = &v3.Status{ + ConditionType: "Create", + ConditionStatus: v3.ConditionStatus_StatusFailed, + LastUpdated: timestamppb.Now(), + } + return role, err + } + + //update v3 spec + if createdRole, ok := entity.(*models.Role); ok { + role.Metadata.Id = createdRole.ID.String() + role.Spec = &userv3.RoleSpec{ + IsGlobal: createdRole.IsGlobal, + Scope: createdRole.Scope, + } + if role.Status != nil { + role.Status = &v3.Status{ + ConditionType: "Create", + ConditionStatus: v3.ConditionStatus_StatusOK, + LastUpdated: timestamppb.Now(), + } + } + } + + return role, nil + +} + +func (s *roleService) GetByID(ctx context.Context, id string) (*userv3.Role, error) { + + role := &userv3.Role{ + ApiVersion: apiVersion, + Kind: roleKind, + Metadata: &v3.Metadata{ + Id: id, + }, + } + + uid, err := uuid.Parse(id) + if err != nil { + role.Status = &v3.Status{ + ConditionType: "Describe", + ConditionStatus: v3.ConditionStatus_StatusFailed, + LastUpdated: timestamppb.Now(), + Reason: err.Error(), + } + return role, err + } + entity, err := s.dao.GetByID(ctx, uid, &models.Role{}) + if err != nil { + role.Status = &v3.Status{ + ConditionType: "Describe", + ConditionStatus: v3.ConditionStatus_StatusFailed, + LastUpdated: timestamppb.Now(), + Reason: err.Error(), + } + return role, err + } + + if grp, ok := entity.(*models.Role); ok { + labels := make(map[string]string) + labels["organization"] = grp.OrganizationId.String() + + role.Metadata = &v3.Metadata{ + Name: grp.Name, + Description: grp.Description, + Id: grp.ID.String(), + Organization: grp.OrganizationId.String(), + Partner: grp.PartnerId.String(), + Labels: labels, + ModifiedAt: timestamppb.New(grp.ModifiedAt), + } + role.Spec = &userv3.RoleSpec{ + IsGlobal: grp.IsGlobal, + Scope: grp.Scope, + } + role.Status = &v3.Status{ + LastUpdated: timestamppb.Now(), + ConditionType: "Describe", + ConditionStatus: v3.ConditionStatus_StatusOK, + } + + return role, nil + } + return role, nil + +} + +func (s *roleService) GetByName(ctx context.Context, name string) (*userv3.Role, error) { + fmt.Println("name:", name) + + role := &userv3.Role{ + ApiVersion: apiVersion, + Kind: roleKind, + Metadata: &v3.Metadata{ + Name: name, + }, + } + + entity, err := s.dao.GetByName(ctx, name, &models.Role{}) + if err != nil { + role.Status = &v3.Status{ + ConditionType: "Describe", + ConditionStatus: v3.ConditionStatus_StatusFailed, + LastUpdated: timestamppb.Now(), + Reason: err.Error(), + } + return role, err + } + + if grp, ok := entity.(*models.Role); ok { + labels := make(map[string]string) + labels["organization"] = grp.OrganizationId.String() + + role.Metadata = &v3.Metadata{ + Name: grp.Name, + Description: grp.Description, + Id: grp.ID.String(), + Organization: grp.OrganizationId.String(), + Partner: grp.PartnerId.String(), + Labels: labels, + ModifiedAt: timestamppb.New(grp.ModifiedAt), + } + role.Spec = &userv3.RoleSpec{ + IsGlobal: grp.IsGlobal, + Scope: grp.Scope, + } + role.Status = &v3.Status{ + LastUpdated: timestamppb.Now(), + ConditionType: "Describe", + ConditionStatus: v3.ConditionStatus_StatusOK, + } + + return role, nil + } + return role, nil + +} + +func (s *roleService) Update(ctx context.Context, role *userv3.Role) (*userv3.Role, error) { + // TODO: inform when unchanged + + id, _ := uuid.Parse(role.Metadata.Id) + entity, err := s.dao.GetByID(ctx, id, &models.Role{}) + if err != nil { + role.Status = &v3.Status{ + ConditionType: "Update", + ConditionStatus: v3.ConditionStatus_StatusFailed, + LastUpdated: timestamppb.Now(), + Reason: err.Error(), + } + return role, err + } + + if grp, ok := entity.(*models.Role); ok { + //update role details + grp.Name = role.Metadata.Name + grp.Description = role.Metadata.Description + grp.IsGlobal = role.Spec.IsGlobal + grp.Scope = role.Spec.Scope + grp.ModifiedAt = time.Now() + + _, err = s.dao.Update(ctx, id, grp) + if err != nil { + role.Status = &v3.Status{ + ConditionType: "Update", + ConditionStatus: v3.ConditionStatus_StatusFailed, + LastUpdated: timestamppb.Now(), + Reason: err.Error(), + } + return role, err + } + + //update spec and status + role.Spec = &userv3.RoleSpec{ + IsGlobal: grp.IsGlobal, + Scope: grp.Scope, + } + role.Status = &v3.Status{ + ConditionType: "Update", + ConditionStatus: v3.ConditionStatus_StatusOK, + LastUpdated: timestamppb.Now(), + } + } + + return role, nil +} + +func (s *roleService) Delete(ctx context.Context, role *userv3.Role) (*userv3.Role, error) { + id, err := uuid.Parse(role.Metadata.Id) + if err != nil { + role.Status = &v3.Status{ + ConditionType: "Delete", + ConditionStatus: v3.ConditionStatus_StatusFailed, + LastUpdated: timestamppb.Now(), + Reason: err.Error(), + } + return role, err + } + entity, err := s.dao.GetByID(ctx, id, &models.Role{}) + if err != nil { + role.Status = &v3.Status{ + ConditionType: "Delete", + ConditionStatus: v3.ConditionStatus_StatusFailed, + LastUpdated: timestamppb.Now(), + Reason: err.Error(), + } + return role, err + } + if grp, ok := entity.(*models.Role); ok { + err = s.dao.Delete(ctx, id, grp) + if err != nil { + role.Status = &v3.Status{ + ConditionType: "Delete", + ConditionStatus: v3.ConditionStatus_StatusFailed, + LastUpdated: timestamppb.Now(), + Reason: err.Error(), + } + return role, err + } + //update v3 spec + role.Metadata.Id = grp.ID.String() + role.Metadata.Name = grp.Name + role.Status = &v3.Status{ + ConditionType: "Delete", + ConditionStatus: v3.ConditionStatus_StatusOK, + LastUpdated: timestamppb.Now(), + } + } + + return role, nil +} + +func (s *roleService) List(ctx context.Context, role *userv3.Role) (*userv3.RoleList, error) { + + var roles []*userv3.Role + roleList := &userv3.RoleList{ + ApiVersion: apiVersion, + Kind: roleListKind, + Metadata: &v3.ListMetadata{ + Count: 0, + }, + } + if len(role.Metadata.Organization) > 0 { + orgId, err := uuid.Parse(role.Metadata.Organization) + if err != nil { + return roleList, err + } + partId, err := uuid.Parse(role.Metadata.Partner) + if err != nil { + return roleList, err + } + var grps []models.Role + entities, err := s.dao.List(ctx, uuid.NullUUID{UUID: partId, Valid: true}, uuid.NullUUID{UUID: orgId, Valid: true}, &grps) + if err != nil { + return roleList, err + } + if grps, ok := entities.(*[]models.Role); ok { + for _, grp := range *grps { + labels := make(map[string]string) + labels["organization"] = grp.OrganizationId.String() + labels["partner"] = grp.PartnerId.String() + + role.Metadata = &v3.Metadata{ + Name: grp.Name, + Description: grp.Description, + Id: grp.ID.String(), + Organization: grp.OrganizationId.String(), + Partner: grp.PartnerId.String(), + Labels: labels, + ModifiedAt: timestamppb.New(grp.ModifiedAt), + } + role.Spec = &userv3.RoleSpec{ + // IsGlobal: grp.IsGlobal, + Scope: grp.Scope, + } + roles = append(roles, role) + } + + //update the list metadata and items response + roleList.Metadata = &v3.ListMetadata{ + Count: int64(len(roles)), + } + roleList.Items = roles + } + + } else { + return roleList, fmt.Errorf("missing organization id in metadata") + } + return roleList, nil +} + +func (s *roleService) Close() error { + return s.dao.Close() +} diff --git a/components/usermgmt/proto/types/userpb/v3/role.pb.go b/components/usermgmt/proto/types/userpb/v3/role.pb.go index acf92de..90960bb 100644 --- a/components/usermgmt/proto/types/userpb/v3/role.pb.go +++ b/components/usermgmt/proto/types/userpb/v3/role.pb.go @@ -107,6 +107,8 @@ type RoleSpec struct { unknownFields protoimpl.UnknownFields Rolepermissions []*RolePermission `protobuf:"bytes,1,rep,name=rolepermissions,proto3" json:"rolepermissions,omitempty"` + IsGlobal bool `protobuf:"varint,2,opt,name=isGlobal,proto3" json:"isGlobal,omitempty"` + Scope string `protobuf:"bytes,3,opt,name=scope,proto3" json:"scope,omitempty"` } func (x *RoleSpec) Reset() { @@ -148,6 +150,20 @@ func (x *RoleSpec) GetRolepermissions() []*RolePermission { return nil } +func (x *RoleSpec) GetIsGlobal() bool { + if x != nil { + return x.IsGlobal + } + return false +} + +func (x *RoleSpec) GetScope() string { + if x != nil { + return x.Scope + } + return "" +} + type RoleList struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -267,7 +283,7 @@ var file_proto_types_userpb_v3_role_proto_rawDesc = []byte{ 0x3a, 0x37, 0x92, 0x41, 0x34, 0x0a, 0x32, 0x2a, 0x04, 0x52, 0x6f, 0x6c, 0x65, 0x32, 0x04, 0x52, 0x6f, 0x6c, 0x65, 0xd2, 0x01, 0x0a, 0x61, 0x70, 0x69, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0xd2, 0x01, 0x04, 0x6b, 0x69, 0x6e, 0x64, 0xd2, 0x01, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, - 0x74, 0x61, 0xd2, 0x01, 0x04, 0x73, 0x70, 0x65, 0x63, 0x22, 0xbd, 0x01, 0x0a, 0x08, 0x52, 0x6f, + 0x74, 0x61, 0xd2, 0x01, 0x04, 0x73, 0x70, 0x65, 0x63, 0x22, 0xbe, 0x02, 0x0a, 0x08, 0x52, 0x6f, 0x6c, 0x65, 0x53, 0x70, 0x65, 0x63, 0x12, 0x81, 0x01, 0x0a, 0x0f, 0x72, 0x6f, 0x6c, 0x65, 0x70, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x72, 0x61, 0x66, 0x61, 0x79, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x74, 0x79, 0x70, @@ -276,52 +292,60 @@ var file_proto_types_userpb_v3_role_proto_rawDesc = []byte{ 0x52, 0x6f, 0x6c, 0x65, 0x50, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x32, 0x18, 0x50, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x20, 0x66, 0x6f, 0x72, 0x20, 0x74, 0x68, 0x65, 0x20, 0x72, 0x6f, 0x6c, 0x65, 0x52, 0x0f, 0x72, 0x6f, 0x6c, 0x65, 0x70, - 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x3a, 0x2d, 0x92, 0x41, 0x2a, 0x0a, - 0x28, 0x2a, 0x12, 0x52, 0x6f, 0x6c, 0x65, 0x20, 0x53, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x63, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x32, 0x12, 0x52, 0x6f, 0x6c, 0x65, 0x20, 0x73, 0x70, 0x65, 0x63, - 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x99, 0x03, 0x0a, 0x08, 0x52, 0x6f, - 0x6c, 0x65, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x59, 0x0a, 0x0a, 0x61, 0x70, 0x69, 0x56, 0x65, 0x72, - 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x39, 0x92, 0x41, 0x36, 0x2a, - 0x0b, 0x41, 0x50, 0x49, 0x20, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x32, 0x25, 0x41, 0x50, - 0x49, 0x20, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, - 0x20, 0x72, 0x6f, 0x6c, 0x65, 0x20, 0x6c, 0x69, 0x73, 0x74, 0x20, 0x72, 0x65, 0x73, 0x6f, 0x75, - 0x72, 0x63, 0x65, 0x40, 0x01, 0x52, 0x0a, 0x61, 0x70, 0x69, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, - 0x6e, 0x12, 0x3f, 0x0a, 0x04, 0x6b, 0x69, 0x6e, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, - 0x2b, 0x92, 0x41, 0x28, 0x2a, 0x04, 0x4b, 0x69, 0x6e, 0x64, 0x32, 0x1e, 0x4b, 0x69, 0x6e, 0x64, - 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, 0x20, 0x72, 0x6f, 0x6c, 0x65, 0x20, 0x6c, 0x69, 0x73, - 0x74, 0x20, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x40, 0x01, 0x52, 0x04, 0x6b, 0x69, - 0x6e, 0x64, 0x12, 0x78, 0x0a, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, 0x03, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x72, 0x61, 0x66, 0x61, 0x79, 0x2e, 0x64, 0x65, 0x76, - 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x33, - 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x42, 0x33, 0x92, - 0x41, 0x30, 0x2a, 0x08, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x32, 0x22, 0x4d, 0x65, - 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, 0x20, 0x72, 0x6f, - 0x6c, 0x65, 0x20, 0x6c, 0x69, 0x73, 0x74, 0x20, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, - 0x40, 0x01, 0x52, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x59, 0x0a, 0x05, - 0x69, 0x74, 0x65, 0x6d, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x72, 0x61, - 0x66, 0x61, 0x79, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x75, 0x73, - 0x65, 0x72, 0x2e, 0x76, 0x33, 0x2e, 0x52, 0x6f, 0x6c, 0x65, 0x42, 0x24, 0x92, 0x41, 0x21, 0x2a, - 0x05, 0x49, 0x74, 0x65, 0x6d, 0x73, 0x32, 0x16, 0x4c, 0x69, 0x73, 0x74, 0x20, 0x6f, 0x66, 0x20, - 0x72, 0x6f, 0x6c, 0x65, 0x20, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x40, 0x01, - 0x52, 0x05, 0x69, 0x74, 0x65, 0x6d, 0x73, 0x3a, 0x1c, 0x92, 0x41, 0x19, 0x0a, 0x17, 0x2a, 0x08, - 0x52, 0x6f, 0x6c, 0x65, 0x4c, 0x69, 0x73, 0x74, 0x32, 0x09, 0x52, 0x6f, 0x6c, 0x65, 0x20, 0x6c, - 0x69, 0x73, 0x74, 0x40, 0x01, 0x42, 0xff, 0x01, 0x0a, 0x1b, 0x63, 0x6f, 0x6d, 0x2e, 0x72, 0x61, - 0x66, 0x61, 0x79, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x75, 0x73, - 0x65, 0x72, 0x2e, 0x76, 0x33, 0x42, 0x09, 0x52, 0x6f, 0x6c, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, - 0x50, 0x01, 0x5a, 0x54, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x52, - 0x61, 0x66, 0x61, 0x79, 0x53, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x73, 0x2f, 0x72, 0x63, 0x6c, 0x6f, - 0x75, 0x64, 0x2d, 0x62, 0x61, 0x73, 0x65, 0x2f, 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, - 0x74, 0x73, 0x2f, 0x75, 0x73, 0x65, 0x72, 0x6d, 0x67, 0x6d, 0x74, 0x2f, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2f, 0x75, 0x73, 0x65, 0x72, 0x70, 0x62, 0x2f, 0x76, - 0x33, 0x3b, 0x75, 0x73, 0x65, 0x72, 0x76, 0x33, 0xa2, 0x02, 0x04, 0x52, 0x44, 0x54, 0x55, 0xaa, - 0x02, 0x17, 0x52, 0x61, 0x66, 0x61, 0x79, 0x2e, 0x44, 0x65, 0x76, 0x2e, 0x54, 0x79, 0x70, 0x65, - 0x73, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x2e, 0x56, 0x33, 0xca, 0x02, 0x17, 0x52, 0x61, 0x66, 0x61, - 0x79, 0x5c, 0x44, 0x65, 0x76, 0x5c, 0x54, 0x79, 0x70, 0x65, 0x73, 0x5c, 0x55, 0x73, 0x65, 0x72, - 0x5c, 0x56, 0x33, 0xe2, 0x02, 0x23, 0x52, 0x61, 0x66, 0x61, 0x79, 0x5c, 0x44, 0x65, 0x76, 0x5c, - 0x54, 0x79, 0x70, 0x65, 0x73, 0x5c, 0x55, 0x73, 0x65, 0x72, 0x5c, 0x56, 0x33, 0x5c, 0x47, 0x50, - 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x1b, 0x52, 0x61, 0x66, 0x61, - 0x79, 0x3a, 0x3a, 0x44, 0x65, 0x76, 0x3a, 0x3a, 0x54, 0x79, 0x70, 0x65, 0x73, 0x3a, 0x3a, 0x55, - 0x73, 0x65, 0x72, 0x3a, 0x3a, 0x56, 0x33, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x4b, 0x0a, 0x08, 0x69, 0x73, + 0x47, 0x6c, 0x6f, 0x62, 0x61, 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x42, 0x2f, 0x92, 0x41, + 0x2c, 0x2a, 0x08, 0x49, 0x73, 0x47, 0x6c, 0x6f, 0x62, 0x61, 0x6c, 0x32, 0x20, 0x53, 0x70, 0x65, + 0x63, 0x69, 0x66, 0x79, 0x20, 0x69, 0x66, 0x20, 0x74, 0x68, 0x69, 0x73, 0x20, 0x69, 0x73, 0x20, + 0x61, 0x20, 0x67, 0x6c, 0x6f, 0x62, 0x61, 0x6c, 0x20, 0x72, 0x6f, 0x6c, 0x65, 0x52, 0x08, 0x69, + 0x73, 0x47, 0x6c, 0x6f, 0x62, 0x61, 0x6c, 0x12, 0x32, 0x0a, 0x05, 0x73, 0x63, 0x6f, 0x70, 0x65, + 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x42, 0x1c, 0x92, 0x41, 0x19, 0x2a, 0x05, 0x53, 0x63, 0x6f, + 0x70, 0x65, 0x32, 0x10, 0x53, 0x63, 0x6f, 0x70, 0x65, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, + 0x20, 0x72, 0x6f, 0x6c, 0x52, 0x05, 0x73, 0x63, 0x6f, 0x70, 0x65, 0x3a, 0x2d, 0x92, 0x41, 0x2a, + 0x0a, 0x28, 0x2a, 0x12, 0x52, 0x6f, 0x6c, 0x65, 0x20, 0x53, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, + 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x32, 0x12, 0x52, 0x6f, 0x6c, 0x65, 0x20, 0x73, 0x70, 0x65, + 0x63, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x99, 0x03, 0x0a, 0x08, 0x52, + 0x6f, 0x6c, 0x65, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x59, 0x0a, 0x0a, 0x61, 0x70, 0x69, 0x56, 0x65, + 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x39, 0x92, 0x41, 0x36, + 0x2a, 0x0b, 0x41, 0x50, 0x49, 0x20, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x32, 0x25, 0x41, + 0x50, 0x49, 0x20, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, + 0x65, 0x20, 0x72, 0x6f, 0x6c, 0x65, 0x20, 0x6c, 0x69, 0x73, 0x74, 0x20, 0x72, 0x65, 0x73, 0x6f, + 0x75, 0x72, 0x63, 0x65, 0x40, 0x01, 0x52, 0x0a, 0x61, 0x70, 0x69, 0x56, 0x65, 0x72, 0x73, 0x69, + 0x6f, 0x6e, 0x12, 0x3f, 0x0a, 0x04, 0x6b, 0x69, 0x6e, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, + 0x42, 0x2b, 0x92, 0x41, 0x28, 0x2a, 0x04, 0x4b, 0x69, 0x6e, 0x64, 0x32, 0x1e, 0x4b, 0x69, 0x6e, + 0x64, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, 0x20, 0x72, 0x6f, 0x6c, 0x65, 0x20, 0x6c, 0x69, + 0x73, 0x74, 0x20, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x40, 0x01, 0x52, 0x04, 0x6b, + 0x69, 0x6e, 0x64, 0x12, 0x78, 0x0a, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, + 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x72, 0x61, 0x66, 0x61, 0x79, 0x2e, 0x64, 0x65, + 0x76, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, + 0x33, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x42, 0x33, + 0x92, 0x41, 0x30, 0x2a, 0x08, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x32, 0x22, 0x4d, + 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, 0x20, 0x72, + 0x6f, 0x6c, 0x65, 0x20, 0x6c, 0x69, 0x73, 0x74, 0x20, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, + 0x65, 0x40, 0x01, 0x52, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x59, 0x0a, + 0x05, 0x69, 0x74, 0x65, 0x6d, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x72, + 0x61, 0x66, 0x61, 0x79, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x75, + 0x73, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x2e, 0x52, 0x6f, 0x6c, 0x65, 0x42, 0x24, 0x92, 0x41, 0x21, + 0x2a, 0x05, 0x49, 0x74, 0x65, 0x6d, 0x73, 0x32, 0x16, 0x4c, 0x69, 0x73, 0x74, 0x20, 0x6f, 0x66, + 0x20, 0x72, 0x6f, 0x6c, 0x65, 0x20, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x40, + 0x01, 0x52, 0x05, 0x69, 0x74, 0x65, 0x6d, 0x73, 0x3a, 0x1c, 0x92, 0x41, 0x19, 0x0a, 0x17, 0x2a, + 0x08, 0x52, 0x6f, 0x6c, 0x65, 0x4c, 0x69, 0x73, 0x74, 0x32, 0x09, 0x52, 0x6f, 0x6c, 0x65, 0x20, + 0x6c, 0x69, 0x73, 0x74, 0x40, 0x01, 0x42, 0xff, 0x01, 0x0a, 0x1b, 0x63, 0x6f, 0x6d, 0x2e, 0x72, + 0x61, 0x66, 0x61, 0x79, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x75, + 0x73, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x42, 0x09, 0x52, 0x6f, 0x6c, 0x65, 0x50, 0x72, 0x6f, 0x74, + 0x6f, 0x50, 0x01, 0x5a, 0x54, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, + 0x52, 0x61, 0x66, 0x61, 0x79, 0x53, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x73, 0x2f, 0x72, 0x63, 0x6c, + 0x6f, 0x75, 0x64, 0x2d, 0x62, 0x61, 0x73, 0x65, 0x2f, 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, + 0x6e, 0x74, 0x73, 0x2f, 0x75, 0x73, 0x65, 0x72, 0x6d, 0x67, 0x6d, 0x74, 0x2f, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2f, 0x75, 0x73, 0x65, 0x72, 0x70, 0x62, 0x2f, + 0x76, 0x33, 0x3b, 0x75, 0x73, 0x65, 0x72, 0x76, 0x33, 0xa2, 0x02, 0x04, 0x52, 0x44, 0x54, 0x55, + 0xaa, 0x02, 0x17, 0x52, 0x61, 0x66, 0x61, 0x79, 0x2e, 0x44, 0x65, 0x76, 0x2e, 0x54, 0x79, 0x70, + 0x65, 0x73, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x2e, 0x56, 0x33, 0xca, 0x02, 0x17, 0x52, 0x61, 0x66, + 0x61, 0x79, 0x5c, 0x44, 0x65, 0x76, 0x5c, 0x54, 0x79, 0x70, 0x65, 0x73, 0x5c, 0x55, 0x73, 0x65, + 0x72, 0x5c, 0x56, 0x33, 0xe2, 0x02, 0x23, 0x52, 0x61, 0x66, 0x61, 0x79, 0x5c, 0x44, 0x65, 0x76, + 0x5c, 0x54, 0x79, 0x70, 0x65, 0x73, 0x5c, 0x55, 0x73, 0x65, 0x72, 0x5c, 0x56, 0x33, 0x5c, 0x47, + 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x1b, 0x52, 0x61, 0x66, + 0x61, 0x79, 0x3a, 0x3a, 0x44, 0x65, 0x76, 0x3a, 0x3a, 0x54, 0x79, 0x70, 0x65, 0x73, 0x3a, 0x3a, + 0x55, 0x73, 0x65, 0x72, 0x3a, 0x3a, 0x56, 0x33, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/components/usermgmt/proto/types/userpb/v3/role.proto b/components/usermgmt/proto/types/userpb/v3/role.proto index 2e08031..720bd6c 100644 --- a/components/usermgmt/proto/types/userpb/v3/role.proto +++ b/components/usermgmt/proto/types/userpb/v3/role.proto @@ -57,6 +57,16 @@ message RoleSpec { title : "RolePermissions" description : "Permissions for the role" } ]; + bool isGlobal = 2 + [ (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { + title : "IsGlobal" + description : "Specify if this is a global role" + } ]; + string scope = 3 + [ (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { + title : "Scope" + description : "Scope of the rol" + } ]; } message RoleList { From 9e2d13876c871e97949402fb1fbc83ce945549d4 Mon Sep 17 00:00:00 2001 From: Abin Simon Date: Sun, 9 Jan 2022 16:22:23 +0530 Subject: [PATCH 13/28] Group creation now also maps proper accounts --- .../pkg/internal/models/groupaccount.go | 24 +++++ components/usermgmt/pkg/service/group.go | 56 ++++++++++- components/usermgmt/pkg/service/role.go | 98 +++++++++---------- .../000014_authsrv_groupaccount.up.sql | 9 +- 4 files changed, 130 insertions(+), 57 deletions(-) create mode 100644 components/usermgmt/pkg/internal/models/groupaccount.go diff --git a/components/usermgmt/pkg/internal/models/groupaccount.go b/components/usermgmt/pkg/internal/models/groupaccount.go new file mode 100644 index 0000000..c8c5907 --- /dev/null +++ b/components/usermgmt/pkg/internal/models/groupaccount.go @@ -0,0 +1,24 @@ +package models + +import ( + "time" + + "github.com/google/uuid" + "github.com/uptrace/bun" +) + +type GroupAccount struct { + bun.BaseModel `bun:"table:authsrv_groupaccount,alias:groupaccount"` + + ID uuid.UUID `bun:"id,type:uuid,pk,default:uuid_generate_v4()"` + Name string `bun:"name,notnull"` + Description string `bun:"description,notnull"` + CreatedAt time.Time `bun:"created_at,notnull,default:current_timestamp"` + ModifiedAt time.Time `bun:"modified_at,notnull,default:current_timestamp"` + Trash bool `bun:"trash,notnull"` + // OrganizationId uuid.UUID `bun:"organization_id,type:uuid"` + // PartnerId uuid.UUID `bun:"partner_id,type:uuid"` + AccountId uuid.UUID `bun:"account_id,type:uuid"` + GroupId uuid.UUID `bun:"group_id,type:uuid"` + Active bool `bun:"active,notnull"` +} diff --git a/components/usermgmt/pkg/service/group.go b/components/usermgmt/pkg/service/group.go index 59083f9..d7ebf59 100644 --- a/components/usermgmt/pkg/service/group.go +++ b/components/usermgmt/pkg/service/group.go @@ -49,13 +49,51 @@ func NewGroupService(db *bun.DB) GroupService { } } +// Update the users(account) mapped to each group +func (s *groupService) updateGroupAccountRelation(ctx context.Context, group *userv3.Group) (*userv3.Group, error) { + // TODO: use a more efficient way to update the relations + // TODO: diff and delete the old relations + groupId, _ := uuid.Parse(group.GetMetadata().GetId()) + + // TODO: add transactions + var grpaccs []models.GroupAccount + for _, account := range group.GetSpec().GetUsers() { + accountId, err := uuid.Parse(account) + if err != nil { + return nil, err + } + grp := models.GroupAccount{ + Name: group.GetMetadata().GetName(), + Description: group.GetMetadata().GetDescription(), + CreatedAt: time.Now(), + ModifiedAt: time.Now(), + Trash: false, + AccountId: accountId, + GroupId: groupId, + Active: true, + } + grpaccs = append(grpaccs, grp) + } + _, err := s.dao.Create(ctx, &grpaccs) + if err != nil { + group.Status = &v3.Status{ + ConditionType: "Create", + ConditionStatus: v3.ConditionStatus_StatusFailed, + LastUpdated: timestamppb.Now(), + } + return group, err + } + + return group, nil +} + func (s *groupService) Create(ctx context.Context, group *userv3.Group) (*userv3.Group, error) { partnerId, _ := uuid.Parse(group.GetMetadata().GetPartner()) organizationId, _ := uuid.Parse(group.GetMetadata().GetOrganization()) // TODO: find out the interaction if project key is present in the group metadata // TODO: check if a group with the same 'name' already exists and fail if so - // TODO: we should be specifying names instead of ids for partner and org + // TODO: we should be specifying names instead of ids for partner and org (at least in output) // TODO: create vs apply difference like in kubectl?? //convert v3 spec to internal models grp := models.Group{ @@ -82,7 +120,8 @@ func (s *groupService) Create(ctx context.Context, group *userv3.Group) (*userv3 if createdGroup, ok := entity.(*models.Group); ok { group.Metadata.Id = createdGroup.ID.String() group.Spec = &userv3.GroupSpec{ - Type: createdGroup.Type, + Type: createdGroup.Type, + Users: group.Spec.Users, // TODO: is this the right thing to do? } if group.Status != nil { group.Status = &v3.Status{ @@ -93,8 +132,17 @@ func (s *groupService) Create(ctx context.Context, group *userv3.Group) (*userv3 } } - return group, nil + group, err = s.updateGroupAccountRelation(ctx, group) + if err != nil { + group.Status = &v3.Status{ + ConditionType: "Create", + ConditionStatus: v3.ConditionStatus_StatusFailed, + LastUpdated: timestamppb.Now(), + } + return group, err + } + return group, nil } func (s *groupService) GetByID(ctx context.Context, id string) (*userv3.Group, error) { @@ -157,7 +205,7 @@ func (s *groupService) GetByID(ctx context.Context, id string) (*userv3.Group, e } func (s *groupService) GetByName(ctx context.Context, name string) (*userv3.Group, error) { - fmt.Println("name:", name); + fmt.Println("name:", name) group := &userv3.Group{ ApiVersion: apiVersion, diff --git a/components/usermgmt/pkg/service/role.go b/components/usermgmt/pkg/service/role.go index 83f0225..3f8b768 100644 --- a/components/usermgmt/pkg/service/role.go +++ b/components/usermgmt/pkg/service/role.go @@ -57,7 +57,7 @@ func (s *roleService) Create(ctx context.Context, role *userv3.Role) (*userv3.Ro // TODO: we should be specifying names instead of ids for partner and org // TODO: create vs apply difference like in kubectl?? //convert v3 spec to internal models - grp := models.Role{ + rle := models.Role{ Name: role.GetMetadata().GetName(), Description: role.GetMetadata().GetDescription(), CreatedAt: time.Now(), @@ -68,7 +68,7 @@ func (s *roleService) Create(ctx context.Context, role *userv3.Role) (*userv3.Ro IsGlobal: role.GetSpec().GetIsGlobal(), Scope: role.GetSpec().GetScope(), } - entity, err := s.dao.Create(ctx, &grp) + entity, err := s.dao.Create(ctx, &rle) if err != nil { role.Status = &v3.Status{ ConditionType: "Create", @@ -129,22 +129,22 @@ func (s *roleService) GetByID(ctx context.Context, id string) (*userv3.Role, err return role, err } - if grp, ok := entity.(*models.Role); ok { + if rle, ok := entity.(*models.Role); ok { labels := make(map[string]string) - labels["organization"] = grp.OrganizationId.String() + labels["organization"] = rle.OrganizationId.String() role.Metadata = &v3.Metadata{ - Name: grp.Name, - Description: grp.Description, - Id: grp.ID.String(), - Organization: grp.OrganizationId.String(), - Partner: grp.PartnerId.String(), + Name: rle.Name, + Description: rle.Description, + Id: rle.ID.String(), + Organization: rle.OrganizationId.String(), + Partner: rle.PartnerId.String(), Labels: labels, - ModifiedAt: timestamppb.New(grp.ModifiedAt), + ModifiedAt: timestamppb.New(rle.ModifiedAt), } role.Spec = &userv3.RoleSpec{ - IsGlobal: grp.IsGlobal, - Scope: grp.Scope, + IsGlobal: rle.IsGlobal, + Scope: rle.Scope, } role.Status = &v3.Status{ LastUpdated: timestamppb.Now(), @@ -180,22 +180,22 @@ func (s *roleService) GetByName(ctx context.Context, name string) (*userv3.Role, return role, err } - if grp, ok := entity.(*models.Role); ok { + if rle, ok := entity.(*models.Role); ok { labels := make(map[string]string) - labels["organization"] = grp.OrganizationId.String() + labels["organization"] = rle.OrganizationId.String() role.Metadata = &v3.Metadata{ - Name: grp.Name, - Description: grp.Description, - Id: grp.ID.String(), - Organization: grp.OrganizationId.String(), - Partner: grp.PartnerId.String(), + Name: rle.Name, + Description: rle.Description, + Id: rle.ID.String(), + Organization: rle.OrganizationId.String(), + Partner: rle.PartnerId.String(), Labels: labels, - ModifiedAt: timestamppb.New(grp.ModifiedAt), + ModifiedAt: timestamppb.New(rle.ModifiedAt), } role.Spec = &userv3.RoleSpec{ - IsGlobal: grp.IsGlobal, - Scope: grp.Scope, + IsGlobal: rle.IsGlobal, + Scope: rle.Scope, } role.Status = &v3.Status{ LastUpdated: timestamppb.Now(), @@ -224,15 +224,15 @@ func (s *roleService) Update(ctx context.Context, role *userv3.Role) (*userv3.Ro return role, err } - if grp, ok := entity.(*models.Role); ok { + if rle, ok := entity.(*models.Role); ok { //update role details - grp.Name = role.Metadata.Name - grp.Description = role.Metadata.Description - grp.IsGlobal = role.Spec.IsGlobal - grp.Scope = role.Spec.Scope - grp.ModifiedAt = time.Now() + rle.Name = role.Metadata.Name + rle.Description = role.Metadata.Description + rle.IsGlobal = role.Spec.IsGlobal + rle.Scope = role.Spec.Scope + rle.ModifiedAt = time.Now() - _, err = s.dao.Update(ctx, id, grp) + _, err = s.dao.Update(ctx, id, rle) if err != nil { role.Status = &v3.Status{ ConditionType: "Update", @@ -245,8 +245,8 @@ func (s *roleService) Update(ctx context.Context, role *userv3.Role) (*userv3.Ro //update spec and status role.Spec = &userv3.RoleSpec{ - IsGlobal: grp.IsGlobal, - Scope: grp.Scope, + IsGlobal: rle.IsGlobal, + Scope: rle.Scope, } role.Status = &v3.Status{ ConditionType: "Update", @@ -279,8 +279,8 @@ func (s *roleService) Delete(ctx context.Context, role *userv3.Role) (*userv3.Ro } return role, err } - if grp, ok := entity.(*models.Role); ok { - err = s.dao.Delete(ctx, id, grp) + if rle, ok := entity.(*models.Role); ok { + err = s.dao.Delete(ctx, id, rle) if err != nil { role.Status = &v3.Status{ ConditionType: "Delete", @@ -291,8 +291,8 @@ func (s *roleService) Delete(ctx context.Context, role *userv3.Role) (*userv3.Ro return role, err } //update v3 spec - role.Metadata.Id = grp.ID.String() - role.Metadata.Name = grp.Name + role.Metadata.Id = rle.ID.String() + role.Metadata.Name = rle.Name role.Status = &v3.Status{ ConditionType: "Delete", ConditionStatus: v3.ConditionStatus_StatusOK, @@ -322,29 +322,29 @@ func (s *roleService) List(ctx context.Context, role *userv3.Role) (*userv3.Role if err != nil { return roleList, err } - var grps []models.Role - entities, err := s.dao.List(ctx, uuid.NullUUID{UUID: partId, Valid: true}, uuid.NullUUID{UUID: orgId, Valid: true}, &grps) + var rles []models.Role + entities, err := s.dao.List(ctx, uuid.NullUUID{UUID: partId, Valid: true}, uuid.NullUUID{UUID: orgId, Valid: true}, &rles) if err != nil { return roleList, err } - if grps, ok := entities.(*[]models.Role); ok { - for _, grp := range *grps { + if rles, ok := entities.(*[]models.Role); ok { + for _, rle := range *rles { labels := make(map[string]string) - labels["organization"] = grp.OrganizationId.String() - labels["partner"] = grp.PartnerId.String() + labels["organization"] = rle.OrganizationId.String() + labels["partner"] = rle.PartnerId.String() role.Metadata = &v3.Metadata{ - Name: grp.Name, - Description: grp.Description, - Id: grp.ID.String(), - Organization: grp.OrganizationId.String(), - Partner: grp.PartnerId.String(), + Name: rle.Name, + Description: rle.Description, + Id: rle.ID.String(), + Organization: rle.OrganizationId.String(), + Partner: rle.PartnerId.String(), Labels: labels, - ModifiedAt: timestamppb.New(grp.ModifiedAt), + ModifiedAt: timestamppb.New(rle.ModifiedAt), } role.Spec = &userv3.RoleSpec{ - // IsGlobal: grp.IsGlobal, - Scope: grp.Scope, + // IsGlobal: rle.IsGlobal, + Scope: rle.Scope, } roles = append(roles, role) } diff --git a/persistence/migrations/admindb/000014_authsrv_groupaccount.up.sql b/persistence/migrations/admindb/000014_authsrv_groupaccount.up.sql index a0a7fce..ad1ecd8 100644 --- a/persistence/migrations/admindb/000014_authsrv_groupaccount.up.sql +++ b/persistence/migrations/admindb/000014_authsrv_groupaccount.up.sql @@ -22,10 +22,11 @@ CREATE INDEX authsrv_groupaccount_name_d17de056 ON authsrv_groupaccount USING bt CREATE INDEX authsrv_groupaccount_name_d17de056_like ON authsrv_groupaccount USING btree (name varchar_pattern_ops); -ALTER TABLE ONLY authsrv_groupaccount - ADD CONSTRAINT authsrv_groupaccount_account_id_041e4e98_fk_authsrv_account_id FOREIGN KEY (account_id) - REFERENCES authsrv_account(id) DEFERRABLE INITIALLY DEFERRED; +-- TODO: find a better constraint now that we have a different accounts table +-- ALTER TABLE ONLY authsrv_groupaccount +-- ADD CONSTRAINT authsrv_groupaccount_account_id_041e4e98_fk_authsrv_account_id FOREIGN KEY (account_id) +-- REFERENCES authsrv_account(id) DEFERRABLE INITIALLY DEFERRED; ALTER TABLE ONLY authsrv_groupaccount ADD CONSTRAINT authsrv_groupaccount_group_id_c67750ef_fk_authsrv_group_id FOREIGN KEY (group_id) - REFERENCES authsrv_group(id) DEFERRABLE INITIALLY DEFERRED; \ No newline at end of file + REFERENCES authsrv_group(id) DEFERRABLE INITIALLY DEFERRED; From 36b00390fe9a160bc45e10f2dd2679582d733af6 Mon Sep 17 00:00:00 2001 From: Abin Simon Date: Sun, 9 Jan 2022 17:38:13 +0530 Subject: [PATCH 14/28] Project, group, namespace, role linking basics --- .../openapi/proto/rpc/v3/group.swagger.json | 201 ++------------- .../usermgmt/pkg/internal/models/grouprole.go | 25 ++ .../internal/models/projectgroupnamespace.go | 26 ++ .../pkg/internal/models/projectgrouprole.go | 26 ++ components/usermgmt/pkg/service/group.go | 106 +++++++- .../proto/types/userpb/v3/group.pb.go | 243 +++++++++--------- .../proto/types/userpb/v3/group.proto | 21 +- 7 files changed, 334 insertions(+), 314 deletions(-) create mode 100644 components/usermgmt/pkg/internal/models/grouprole.go create mode 100644 components/usermgmt/pkg/internal/models/projectgroupnamespace.go create mode 100644 components/usermgmt/pkg/internal/models/projectgrouprole.go diff --git a/components/usermgmt/gen/openapi/proto/rpc/v3/group.swagger.json b/components/usermgmt/gen/openapi/proto/rpc/v3/group.swagger.json index 0eb6bb8..cd110d0 100644 --- a/components/usermgmt/gen/openapi/proto/rpc/v3/group.swagger.json +++ b/components/usermgmt/gen/openapi/proto/rpc/v3/group.swagger.json @@ -1133,13 +1133,13 @@ "v3GroupSpec": { "type": "object", "properties": { - "projectroles": { + "projectnamespaceroles": { "type": "array", "items": { - "$ref": "#/definitions/v3ProjectRole" + "$ref": "#/definitions/v3ProjectNamespaceRole" }, - "description": "ProjectRole groups for permission", - "title": "ProjectRoles" + "description": "Project, namespace, role associations for permission", + "title": "ProjectNamespaceRoles" }, "users": { "type": "array", @@ -1241,199 +1241,28 @@ "project" ] }, - "v3Project": { - "type": "object", - "properties": { - "apiVersion": { - "type": "string", - "default": "system.k8smgmt.io/v3", - "description": "API Version of the resource", - "title": "API Version", - "readOnly": true - }, - "kind": { - "type": "string", - "default": "Project", - "description": "Kind of the resource", - "title": "Kind", - "readOnly": true - }, - "metadata": { - "$ref": "#/definitions/v3Metadata", - "description": "Metadata of the resource", - "title": "Metadata" - }, - "spec": { - "$ref": "#/definitions/v3ProjectSpec", - "description": "Spec of the resource", - "title": "Spec" - }, - "status": { - "$ref": "#/definitions/commonv3Status", - "description": "Status of the resource", - "title": "Status", - "readOnly": true - } - }, - "description": "Project", - "title": "Project", - "required": [ - "apiVersion", - "kind", - "metadata", - "spec" - ] - }, - "v3ProjectRole": { + "v3ProjectNamespaceRole": { "type": "object", "properties": { "project": { - "$ref": "#/definitions/v3Project", + "type": "string", "description": "Project", "title": "Project" }, + "namespace": { + "type": "string", + "format": "int64", + "description": "Namespace", + "title": "Namespace" + }, "role": { - "$ref": "#/definitions/v3Role", + "type": "string", "description": "Role", "title": "Role" } }, - "description": "Project and role pairing for permission", - "title": "ProjectRole" - }, - "v3ProjectSpec": { - "type": "object", - "properties": { - "default": { - "type": "boolean", - "description": "flag to indicate if this is the default project in the organization", - "title": "Default" - } - }, - "description": "project specification", - "title": "Project Specification" - }, - "v3Role": { - "type": "object", - "properties": { - "apiVersion": { - "type": "string", - "default": "usermgmt.k8smgmt.io/v3", - "description": "API Version of the Role resource", - "title": "API Version" - }, - "kind": { - "type": "string", - "default": "Role", - "description": "Kind of the role resource", - "title": "Kind" - }, - "metadata": { - "$ref": "#/definitions/v3Metadata", - "description": "Metadata of the role resource", - "title": "Metadata" - }, - "spec": { - "$ref": "#/definitions/v3RoleSpec", - "description": "Spec of the role resource", - "title": "Spec" - }, - "status": { - "$ref": "#/definitions/commonv3Status", - "description": "Status of the resource", - "title": "Status", - "readOnly": true - } - }, - "description": "Role", - "title": "Role", - "required": [ - "apiVersion", - "kind", - "metadata", - "spec" - ] - }, - "v3RolePermission": { - "type": "object", - "properties": { - "apiVersion": { - "type": "string", - "default": "usermgmt.k8smgmt.io/v3", - "description": "API Version of the role permission resource", - "title": "API Version" - }, - "kind": { - "type": "string", - "default": "RolePermission", - "description": "Kind of the role permission resource", - "title": "Kind" - }, - "metadata": { - "$ref": "#/definitions/v3Metadata", - "description": "Metadata of the role permission resource", - "title": "Metadata" - }, - "spec": { - "$ref": "#/definitions/v3RolePermissionSpec", - "description": "Metadata of the role permission resource", - "title": "Metadata" - }, - "status": { - "$ref": "#/definitions/commonv3Status", - "description": "Status of the resource", - "title": "Status", - "readOnly": true - } - }, - "description": "Role Permission", - "title": "RolePermission", - "required": [ - "apiVersion", - "kind", - "metadata", - "spec" - ] - }, - "v3RolePermissionSpec": { - "type": "object", - "properties": { - "permissions": { - "type": "array", - "items": { - "type": "string" - }, - "description": "List of permisions for role", - "title": "Permissions" - } - }, - "description": "RolePermisson specification", - "title": "RolePermission Specification" - }, - "v3RoleSpec": { - "type": "object", - "properties": { - "rolepermissions": { - "type": "array", - "items": { - "$ref": "#/definitions/v3RolePermission" - }, - "description": "Permissions for the role", - "title": "RolePermissions" - }, - "isGlobal": { - "type": "boolean", - "description": "Specify if this is a global role", - "title": "IsGlobal" - }, - "scope": { - "type": "string", - "description": "Scope of the rol", - "title": "Scope" - } - }, - "description": "Role specification", - "title": "Role Specification" + "description": "Project, role and namespace pairing for permission", + "title": "ProjectNamespaceRole" } }, "securityDefinitions": { diff --git a/components/usermgmt/pkg/internal/models/grouprole.go b/components/usermgmt/pkg/internal/models/grouprole.go new file mode 100644 index 0000000..e8fa0a2 --- /dev/null +++ b/components/usermgmt/pkg/internal/models/grouprole.go @@ -0,0 +1,25 @@ +package models + +import ( + "time" + + "github.com/google/uuid" + "github.com/uptrace/bun" +) + +type GroupRole struct { + bun.BaseModel `bun:"table:authsrv_grouprole,alias:grouprole"` + + ID uuid.UUID `bun:"id,type:uuid,pk,default:uuid_generate_v4()"` + Name string `bun:"name,notnull"` + Description string `bun:"description,notnull"` + CreatedAt time.Time `bun:"created_at,notnull,default:current_timestamp"` + ModifiedAt time.Time `bun:"modified_at,notnull,default:current_timestamp"` + Trash bool `bun:"trash,notnull"` + Default bool `bun:"default,notnull"` + OrganizationId uuid.UUID `bun:"organization_id,type:uuid"` + PartnerId uuid.UUID `bun:"partner_id,type:uuid"` + RoleId uuid.UUID `bun:"role_id,type:uuid"` + GroupId uuid.UUID `bun:"group_id,type:uuid"` + Active bool `bun:"active,notnull"` +} diff --git a/components/usermgmt/pkg/internal/models/projectgroupnamespace.go b/components/usermgmt/pkg/internal/models/projectgroupnamespace.go new file mode 100644 index 0000000..3a173cd --- /dev/null +++ b/components/usermgmt/pkg/internal/models/projectgroupnamespace.go @@ -0,0 +1,26 @@ +package models + +import ( + "time" + + "github.com/google/uuid" + "github.com/uptrace/bun" +) + +type ProjectGroupNamespaceRole struct { + bun.BaseModel `bun:"table:authsrv_projectgroupnamespacerole,alias:projectgroupnamespacerole"` + + ID uuid.UUID `bun:"id,type:uuid,pk,default:uuid_generate_v4()"` + Name string `bun:"name,notnull"` + Description string `bun:"description,notnull"` + CreatedAt time.Time `bun:"created_at,notnull,default:current_timestamp"` + ModifiedAt time.Time `bun:"modified_at,notnull,default:current_timestamp"` + Trash bool `bun:"trash,notnull"` + OrganizationId uuid.UUID `bun:"organization_id,type:uuid"` + PartnerId uuid.UUID `bun:"partner_id,type:uuid"` + RoleId uuid.UUID `bun:"role_id,type:uuid"` + GroupId uuid.UUID `bun:"group_id,type:uuid"` + ProjectId uuid.UUID `bun:"project_id,type:uuid"` + NamesapceId int64 `bun:"namespace_id,type:uuid"` + Active bool `bun:"active,notnull"` +} diff --git a/components/usermgmt/pkg/internal/models/projectgrouprole.go b/components/usermgmt/pkg/internal/models/projectgrouprole.go new file mode 100644 index 0000000..14d03de --- /dev/null +++ b/components/usermgmt/pkg/internal/models/projectgrouprole.go @@ -0,0 +1,26 @@ +package models + +import ( + "time" + + "github.com/google/uuid" + "github.com/uptrace/bun" +) + +type ProjectGroupRole struct { + bun.BaseModel `bun:"table:authsrv_projectgrouprole,alias:projectgrouprole"` + + ID uuid.UUID `bun:"id,type:uuid,pk,default:uuid_generate_v4()"` + Name string `bun:"name,notnull"` + Description string `bun:"description,notnull"` + CreatedAt time.Time `bun:"created_at,notnull,default:current_timestamp"` + ModifiedAt time.Time `bun:"modified_at,notnull,default:current_timestamp"` + Trash bool `bun:"trash,notnull"` + Default bool `bun:"default,notnull"` + OrganizationId uuid.UUID `bun:"organization_id,type:uuid"` + PartnerId uuid.UUID `bun:"partner_id,type:uuid"` + RoleId uuid.UUID `bun:"role_id,type:uuid"` + GroupId uuid.UUID `bun:"group_id,type:uuid"` + ProjectId uuid.UUID `bun:"project_id,type:uuid"` + Active bool `bun:"active,notnull"` +} diff --git a/components/usermgmt/pkg/service/group.go b/components/usermgmt/pkg/service/group.go index d7ebf59..94ba0bb 100644 --- a/components/usermgmt/pkg/service/group.go +++ b/components/usermgmt/pkg/service/group.go @@ -49,6 +49,98 @@ func NewGroupService(db *bun.DB) GroupService { } } +// Map roles to groups +func (s *groupService) userGroupRoleRelation(ctx context.Context, group *userv3.Group) (*userv3.Group, error) { + groupId, _ := uuid.Parse(group.GetMetadata().GetId()) + partnerId, _ := uuid.Parse(group.GetMetadata().GetPartner()) + organizationId, _ := uuid.Parse(group.GetMetadata().GetOrganization()) + + // TODO: also parse out namesapce + projectNamespaceRoles := group.GetSpec().GetProjectnamespaceroles() + + // TODO: add transactions + var pgnrs []models.ProjectGroupNamespaceRole + var pgrs []models.ProjectGroupRole + var grs []models.GroupRole + for _, pnr := range projectNamespaceRoles { + projectId, perr := uuid.Parse(pnr.GetProject()) + namespaceId := pnr.GetNamespace() + roleId, err := uuid.Parse(pnr.GetRole()) + if err != nil { + return group, err + } + switch { + case namespaceId != 0: // TODO: namespaceId can be zero? + pgnr := models.ProjectGroupNamespaceRole{ + Name: group.GetMetadata().GetName(), + Description: group.GetMetadata().GetDescription(), + CreatedAt: time.Now(), + ModifiedAt: time.Now(), + Trash: false, + RoleId: roleId, + PartnerId: partnerId, + OrganizationId: organizationId, + GroupId: groupId, + ProjectId: projectId, + NamesapceId: namespaceId, + Active: true, + } + pgnrs = append(pgnrs, pgnr) + case perr == nil: // TODO: maybe a better check? + pgr := models.ProjectGroupRole{ + Name: group.GetMetadata().GetName(), + Description: group.GetMetadata().GetDescription(), + CreatedAt: time.Now(), + ModifiedAt: time.Now(), + Trash: false, + Default: true, // TODO: what is this for? + RoleId: roleId, + PartnerId: partnerId, + OrganizationId: organizationId, + GroupId: groupId, + ProjectId: projectId, + Active: true, + } + pgrs = append(pgrs, pgr) + default: + gr := models.GroupRole{ + Name: group.GetMetadata().GetName(), + Description: group.GetMetadata().GetDescription(), + CreatedAt: time.Now(), + ModifiedAt: time.Now(), + Trash: false, + Default: true, // TODO: what is this for? + RoleId: roleId, + PartnerId: partnerId, + OrganizationId: organizationId, + GroupId: groupId, + Active: true, + } + grs = append(grs, gr) + } + } + if len(pgnrs) > 0 { + _, err := s.dao.Create(ctx, &pgnrs) + if err != nil { + return group, err + } + } + if len(pgrs) > 0 { + _, err := s.dao.Create(ctx, &pgrs) + if err != nil { + return group, err + } + } + if len(grs) > 0 { + _, err := s.dao.Create(ctx, &grs) + if err != nil { + return group, err + } + } + + return group, nil +} + // Update the users(account) mapped to each group func (s *groupService) updateGroupAccountRelation(ctx context.Context, group *userv3.Group) (*userv3.Group, error) { // TODO: use a more efficient way to update the relations @@ -88,7 +180,6 @@ func (s *groupService) updateGroupAccountRelation(ctx context.Context, group *us } func (s *groupService) Create(ctx context.Context, group *userv3.Group) (*userv3.Group, error) { - partnerId, _ := uuid.Parse(group.GetMetadata().GetPartner()) organizationId, _ := uuid.Parse(group.GetMetadata().GetOrganization()) // TODO: find out the interaction if project key is present in the group metadata @@ -122,6 +213,7 @@ func (s *groupService) Create(ctx context.Context, group *userv3.Group) (*userv3 group.Spec = &userv3.GroupSpec{ Type: createdGroup.Type, Users: group.Spec.Users, // TODO: is this the right thing to do? + Projectnamespaceroles: group.Spec.Projectnamespaceroles, // TODO: is this the right thing to do? } if group.Status != nil { group.Status = &v3.Status{ @@ -142,6 +234,16 @@ func (s *groupService) Create(ctx context.Context, group *userv3.Group) (*userv3 return group, err } + group, err = s.userGroupRoleRelation(ctx, group) + if err != nil { + group.Status = &v3.Status{ + ConditionType: "Create", + ConditionStatus: v3.ConditionStatus_StatusFailed, + LastUpdated: timestamppb.Now(), + } + return group, err + } + return group, nil } @@ -205,8 +307,6 @@ func (s *groupService) GetByID(ctx context.Context, id string) (*userv3.Group, e } func (s *groupService) GetByName(ctx context.Context, name string) (*userv3.Group, error) { - fmt.Println("name:", name) - group := &userv3.Group{ ApiVersion: apiVersion, Kind: groupKind, diff --git a/components/usermgmt/proto/types/userpb/v3/group.pb.go b/components/usermgmt/proto/types/userpb/v3/group.pb.go index ec6a581..1cd49f0 100644 --- a/components/usermgmt/proto/types/userpb/v3/group.pb.go +++ b/components/usermgmt/proto/types/userpb/v3/group.pb.go @@ -7,7 +7,7 @@ package userv3 import ( - v31 "github.com/RafaySystems/rcloud-base/components/adminsrv/proto/types/systempb/v3" + _ "github.com/RafaySystems/rcloud-base/components/adminsrv/proto/types/systempb/v3" v3 "github.com/RafaySystems/rcloud-base/components/common/proto/types/commonpb/v3" _ "github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-openapiv2/options" protoreflect "google.golang.org/protobuf/reflect/protoreflect" @@ -102,17 +102,18 @@ func (x *Group) GetStatus() *v3.Status { return nil } -type ProjectRole struct { +type ProjectNamespaceRole struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Project *v31.Project `protobuf:"bytes,1,opt,name=project,proto3" json:"project,omitempty"` - Role *Role `protobuf:"bytes,2,opt,name=role,proto3" json:"role,omitempty"` + Project string `protobuf:"bytes,1,opt,name=project,proto3" json:"project,omitempty"` + Namespace int64 `protobuf:"varint,2,opt,name=namespace,proto3" json:"namespace,omitempty"` + Role string `protobuf:"bytes,3,opt,name=role,proto3" json:"role,omitempty"` } -func (x *ProjectRole) Reset() { - *x = ProjectRole{} +func (x *ProjectNamespaceRole) Reset() { + *x = ProjectNamespaceRole{} if protoimpl.UnsafeEnabled { mi := &file_proto_types_userpb_v3_group_proto_msgTypes[1] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -120,13 +121,13 @@ func (x *ProjectRole) Reset() { } } -func (x *ProjectRole) String() string { +func (x *ProjectNamespaceRole) String() string { return protoimpl.X.MessageStringOf(x) } -func (*ProjectRole) ProtoMessage() {} +func (*ProjectNamespaceRole) ProtoMessage() {} -func (x *ProjectRole) ProtoReflect() protoreflect.Message { +func (x *ProjectNamespaceRole) ProtoReflect() protoreflect.Message { mi := &file_proto_types_userpb_v3_group_proto_msgTypes[1] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -138,23 +139,30 @@ func (x *ProjectRole) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use ProjectRole.ProtoReflect.Descriptor instead. -func (*ProjectRole) Descriptor() ([]byte, []int) { +// Deprecated: Use ProjectNamespaceRole.ProtoReflect.Descriptor instead. +func (*ProjectNamespaceRole) Descriptor() ([]byte, []int) { return file_proto_types_userpb_v3_group_proto_rawDescGZIP(), []int{1} } -func (x *ProjectRole) GetProject() *v31.Project { +func (x *ProjectNamespaceRole) GetProject() string { if x != nil { return x.Project } - return nil + return "" } -func (x *ProjectRole) GetRole() *Role { +func (x *ProjectNamespaceRole) GetNamespace() int64 { + if x != nil { + return x.Namespace + } + return 0 +} + +func (x *ProjectNamespaceRole) GetRole() string { if x != nil { return x.Role } - return nil + return "" } type GroupSpec struct { @@ -162,9 +170,9 @@ type GroupSpec struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Projectroles []*ProjectRole `protobuf:"bytes,1,rep,name=projectroles,proto3" json:"projectroles,omitempty"` - Users []string `protobuf:"bytes,2,rep,name=users,proto3" json:"users,omitempty"` - Type string `protobuf:"bytes,3,opt,name=type,proto3" json:"type,omitempty"` + Projectnamespaceroles []*ProjectNamespaceRole `protobuf:"bytes,1,rep,name=projectnamespaceroles,proto3" json:"projectnamespaceroles,omitempty"` + Users []string `protobuf:"bytes,2,rep,name=users,proto3" json:"users,omitempty"` + Type string `protobuf:"bytes,3,opt,name=type,proto3" json:"type,omitempty"` } func (x *GroupSpec) Reset() { @@ -199,9 +207,9 @@ func (*GroupSpec) Descriptor() ([]byte, []int) { return file_proto_types_userpb_v3_group_proto_rawDescGZIP(), []int{2} } -func (x *GroupSpec) GetProjectroles() []*ProjectRole { +func (x *GroupSpec) GetProjectnamespaceroles() []*ProjectNamespaceRole { if x != nil { - return x.Projectroles + return x.Projectnamespaceroles } return nil } @@ -342,83 +350,88 @@ var file_proto_types_userpb_v3_group_proto_rawDesc = []byte{ 0x3a, 0x39, 0x92, 0x41, 0x36, 0x0a, 0x34, 0x2a, 0x05, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x32, 0x05, 0x47, 0x72, 0x6f, 0x75, 0x70, 0xd2, 0x01, 0x0a, 0x61, 0x70, 0x69, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0xd2, 0x01, 0x04, 0x6b, 0x69, 0x6e, 0x64, 0xd2, 0x01, 0x08, 0x6d, 0x65, 0x74, 0x61, - 0x64, 0x61, 0x74, 0x61, 0xd2, 0x01, 0x04, 0x73, 0x70, 0x65, 0x63, 0x22, 0xe3, 0x01, 0x0a, 0x0b, - 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x6f, 0x6c, 0x65, 0x12, 0x53, 0x0a, 0x07, 0x70, - 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x72, - 0x61, 0x66, 0x61, 0x79, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x73, - 0x79, 0x73, 0x74, 0x65, 0x6d, 0x2e, 0x76, 0x33, 0x2e, 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, - 0x42, 0x15, 0x92, 0x41, 0x12, 0x2a, 0x07, 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x32, 0x07, - 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x07, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, - 0x12, 0x42, 0x0a, 0x04, 0x72, 0x6f, 0x6c, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1d, - 0x2e, 0x72, 0x61, 0x66, 0x61, 0x79, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, - 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x2e, 0x52, 0x6f, 0x6c, 0x65, 0x42, 0x0f, 0x92, - 0x41, 0x0c, 0x2a, 0x04, 0x52, 0x6f, 0x6c, 0x65, 0x32, 0x04, 0x52, 0x6f, 0x6c, 0x65, 0x52, 0x04, - 0x72, 0x6f, 0x6c, 0x65, 0x3a, 0x3b, 0x92, 0x41, 0x38, 0x0a, 0x36, 0x2a, 0x0b, 0x50, 0x72, 0x6f, - 0x6a, 0x65, 0x63, 0x74, 0x52, 0x6f, 0x6c, 0x65, 0x32, 0x27, 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63, - 0x74, 0x20, 0x61, 0x6e, 0x64, 0x20, 0x72, 0x6f, 0x6c, 0x65, 0x20, 0x70, 0x61, 0x69, 0x72, 0x69, - 0x6e, 0x67, 0x20, 0x66, 0x6f, 0x72, 0x20, 0x70, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, - 0x6e, 0x22, 0xa5, 0x02, 0x0a, 0x09, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x53, 0x70, 0x65, 0x63, 0x12, - 0x7e, 0x0a, 0x0c, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x72, 0x6f, 0x6c, 0x65, 0x73, 0x18, - 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x72, 0x61, 0x66, 0x61, 0x79, 0x2e, 0x64, 0x65, - 0x76, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x2e, - 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x6f, 0x6c, 0x65, 0x42, 0x34, 0x92, 0x41, 0x31, - 0x2a, 0x0c, 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x6f, 0x6c, 0x65, 0x73, 0x32, 0x21, - 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x6f, 0x6c, 0x65, 0x20, 0x67, 0x72, 0x6f, 0x75, - 0x70, 0x73, 0x20, 0x66, 0x6f, 0x72, 0x20, 0x70, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, - 0x6e, 0x52, 0x0c, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x72, 0x6f, 0x6c, 0x65, 0x73, 0x12, - 0x39, 0x0a, 0x05, 0x75, 0x73, 0x65, 0x72, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x42, 0x23, - 0x92, 0x41, 0x20, 0x2a, 0x05, 0x55, 0x73, 0x65, 0x72, 0x73, 0x32, 0x17, 0x4c, 0x69, 0x73, 0x74, - 0x20, 0x6f, 0x66, 0x20, 0x75, 0x73, 0x65, 0x72, 0x73, 0x20, 0x66, 0x6f, 0x72, 0x20, 0x67, 0x72, - 0x6f, 0x75, 0x70, 0x52, 0x05, 0x75, 0x73, 0x65, 0x72, 0x73, 0x12, 0x2c, 0x0a, 0x04, 0x74, 0x79, - 0x70, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x42, 0x18, 0x92, 0x41, 0x15, 0x2a, 0x04, 0x54, - 0x79, 0x70, 0x65, 0x32, 0x0d, 0x54, 0x79, 0x70, 0x65, 0x20, 0x6f, 0x66, 0x20, 0x67, 0x72, 0x6f, - 0x75, 0x70, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x3a, 0x2f, 0x92, 0x41, 0x2c, 0x0a, 0x2a, 0x2a, - 0x13, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x20, 0x53, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x63, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x32, 0x13, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x20, 0x73, 0x70, 0x65, 0x63, - 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0xa5, 0x03, 0x0a, 0x09, 0x47, 0x72, - 0x6f, 0x75, 0x70, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x5a, 0x0a, 0x0a, 0x61, 0x70, 0x69, 0x56, 0x65, - 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x3a, 0x92, 0x41, 0x37, - 0x2a, 0x0b, 0x41, 0x50, 0x49, 0x20, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x32, 0x26, 0x41, - 0x50, 0x49, 0x20, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, - 0x65, 0x20, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x20, 0x6c, 0x69, 0x73, 0x74, 0x20, 0x72, 0x65, 0x73, - 0x6f, 0x75, 0x72, 0x63, 0x65, 0x40, 0x01, 0x52, 0x0a, 0x61, 0x70, 0x69, 0x56, 0x65, 0x72, 0x73, - 0x69, 0x6f, 0x6e, 0x12, 0x40, 0x0a, 0x04, 0x6b, 0x69, 0x6e, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x09, 0x42, 0x2c, 0x92, 0x41, 0x29, 0x2a, 0x04, 0x4b, 0x69, 0x6e, 0x64, 0x32, 0x1f, 0x4b, 0x69, - 0x6e, 0x64, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, 0x20, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x20, - 0x6c, 0x69, 0x73, 0x74, 0x20, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x40, 0x01, 0x52, - 0x04, 0x6b, 0x69, 0x6e, 0x64, 0x12, 0x79, 0x0a, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, - 0x61, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x72, 0x61, 0x66, 0x61, 0x79, 0x2e, - 0x64, 0x65, 0x76, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, - 0x2e, 0x76, 0x33, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, - 0x42, 0x34, 0x92, 0x41, 0x31, 0x2a, 0x08, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x32, - 0x23, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, - 0x20, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x20, 0x6c, 0x69, 0x73, 0x74, 0x20, 0x72, 0x65, 0x73, 0x6f, - 0x75, 0x72, 0x63, 0x65, 0x40, 0x01, 0x52, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, - 0x12, 0x5f, 0x0a, 0x05, 0x69, 0x74, 0x65, 0x6d, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, - 0x1e, 0x2e, 0x72, 0x61, 0x66, 0x61, 0x79, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x74, 0x79, 0x70, 0x65, - 0x73, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x2e, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x42, - 0x29, 0x92, 0x41, 0x26, 0x2a, 0x05, 0x49, 0x74, 0x65, 0x6d, 0x73, 0x32, 0x1b, 0x4c, 0x69, 0x73, - 0x74, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, 0x20, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x20, 0x72, - 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x40, 0x01, 0x52, 0x05, 0x69, 0x74, 0x65, 0x6d, - 0x73, 0x3a, 0x1e, 0x92, 0x41, 0x1b, 0x0a, 0x19, 0x2a, 0x09, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x4c, - 0x69, 0x73, 0x74, 0x32, 0x0a, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x20, 0x6c, 0x69, 0x73, 0x74, 0x40, - 0x01, 0x42, 0x80, 0x02, 0x0a, 0x1b, 0x63, 0x6f, 0x6d, 0x2e, 0x72, 0x61, 0x66, 0x61, 0x79, 0x2e, - 0x64, 0x65, 0x76, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x76, - 0x33, 0x42, 0x0a, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, - 0x54, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x52, 0x61, 0x66, 0x61, - 0x79, 0x53, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x73, 0x2f, 0x72, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2d, - 0x62, 0x61, 0x73, 0x65, 0x2f, 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x73, 0x2f, - 0x75, 0x73, 0x65, 0x72, 0x6d, 0x67, 0x6d, 0x74, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x74, - 0x79, 0x70, 0x65, 0x73, 0x2f, 0x75, 0x73, 0x65, 0x72, 0x70, 0x62, 0x2f, 0x76, 0x33, 0x3b, 0x75, - 0x73, 0x65, 0x72, 0x76, 0x33, 0xa2, 0x02, 0x04, 0x52, 0x44, 0x54, 0x55, 0xaa, 0x02, 0x17, 0x52, - 0x61, 0x66, 0x61, 0x79, 0x2e, 0x44, 0x65, 0x76, 0x2e, 0x54, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x55, - 0x73, 0x65, 0x72, 0x2e, 0x56, 0x33, 0xca, 0x02, 0x17, 0x52, 0x61, 0x66, 0x61, 0x79, 0x5c, 0x44, - 0x65, 0x76, 0x5c, 0x54, 0x79, 0x70, 0x65, 0x73, 0x5c, 0x55, 0x73, 0x65, 0x72, 0x5c, 0x56, 0x33, - 0xe2, 0x02, 0x23, 0x52, 0x61, 0x66, 0x61, 0x79, 0x5c, 0x44, 0x65, 0x76, 0x5c, 0x54, 0x79, 0x70, - 0x65, 0x73, 0x5c, 0x55, 0x73, 0x65, 0x72, 0x5c, 0x56, 0x33, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, - 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x1b, 0x52, 0x61, 0x66, 0x61, 0x79, 0x3a, 0x3a, - 0x44, 0x65, 0x76, 0x3a, 0x3a, 0x54, 0x79, 0x70, 0x65, 0x73, 0x3a, 0x3a, 0x55, 0x73, 0x65, 0x72, - 0x3a, 0x3a, 0x56, 0x33, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x64, 0x61, 0x74, 0x61, 0xd2, 0x01, 0x04, 0x73, 0x70, 0x65, 0x63, 0x22, 0xf6, 0x01, 0x0a, 0x14, + 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, + 0x52, 0x6f, 0x6c, 0x65, 0x12, 0x2f, 0x0a, 0x07, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x15, 0x92, 0x41, 0x12, 0x2a, 0x07, 0x50, 0x72, 0x6f, 0x6a, + 0x65, 0x63, 0x74, 0x32, 0x07, 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x07, 0x70, 0x72, + 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x12, 0x37, 0x0a, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, + 0x63, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x42, 0x19, 0x92, 0x41, 0x16, 0x2a, 0x09, 0x4e, + 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x32, 0x09, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x70, + 0x61, 0x63, 0x65, 0x52, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x23, + 0x0a, 0x04, 0x72, 0x6f, 0x6c, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x42, 0x0f, 0x92, 0x41, + 0x0c, 0x2a, 0x04, 0x52, 0x6f, 0x6c, 0x65, 0x32, 0x04, 0x52, 0x6f, 0x6c, 0x65, 0x52, 0x04, 0x72, + 0x6f, 0x6c, 0x65, 0x3a, 0x4f, 0x92, 0x41, 0x4c, 0x0a, 0x4a, 0x2a, 0x14, 0x50, 0x72, 0x6f, 0x6a, + 0x65, 0x63, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x52, 0x6f, 0x6c, 0x65, + 0x32, 0x32, 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x2c, 0x20, 0x72, 0x6f, 0x6c, 0x65, 0x20, + 0x61, 0x6e, 0x64, 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x20, 0x70, 0x61, + 0x69, 0x72, 0x69, 0x6e, 0x67, 0x20, 0x66, 0x6f, 0x72, 0x20, 0x70, 0x65, 0x72, 0x6d, 0x69, 0x73, + 0x73, 0x69, 0x6f, 0x6e, 0x22, 0xdd, 0x02, 0x0a, 0x09, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x53, 0x70, + 0x65, 0x63, 0x12, 0xb5, 0x01, 0x0a, 0x15, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x6e, 0x61, + 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x72, 0x6f, 0x6c, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, + 0x28, 0x0b, 0x32, 0x2d, 0x2e, 0x72, 0x61, 0x66, 0x61, 0x79, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x74, + 0x79, 0x70, 0x65, 0x73, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x2e, 0x50, 0x72, 0x6f, + 0x6a, 0x65, 0x63, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x52, 0x6f, 0x6c, + 0x65, 0x42, 0x50, 0x92, 0x41, 0x4d, 0x2a, 0x15, 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x4e, + 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x52, 0x6f, 0x6c, 0x65, 0x73, 0x32, 0x34, 0x50, + 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x2c, 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, + 0x65, 0x2c, 0x20, 0x72, 0x6f, 0x6c, 0x65, 0x20, 0x61, 0x73, 0x73, 0x6f, 0x63, 0x69, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x73, 0x20, 0x66, 0x6f, 0x72, 0x20, 0x70, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, + 0x69, 0x6f, 0x6e, 0x52, 0x15, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x6e, 0x61, 0x6d, 0x65, + 0x73, 0x70, 0x61, 0x63, 0x65, 0x72, 0x6f, 0x6c, 0x65, 0x73, 0x12, 0x39, 0x0a, 0x05, 0x75, 0x73, + 0x65, 0x72, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x42, 0x23, 0x92, 0x41, 0x20, 0x2a, 0x05, + 0x55, 0x73, 0x65, 0x72, 0x73, 0x32, 0x17, 0x4c, 0x69, 0x73, 0x74, 0x20, 0x6f, 0x66, 0x20, 0x75, + 0x73, 0x65, 0x72, 0x73, 0x20, 0x66, 0x6f, 0x72, 0x20, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x52, 0x05, + 0x75, 0x73, 0x65, 0x72, 0x73, 0x12, 0x2c, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x03, 0x20, + 0x01, 0x28, 0x09, 0x42, 0x18, 0x92, 0x41, 0x15, 0x2a, 0x04, 0x54, 0x79, 0x70, 0x65, 0x32, 0x0d, + 0x54, 0x79, 0x70, 0x65, 0x20, 0x6f, 0x66, 0x20, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x52, 0x04, 0x74, + 0x79, 0x70, 0x65, 0x3a, 0x2f, 0x92, 0x41, 0x2c, 0x0a, 0x2a, 0x2a, 0x13, 0x47, 0x72, 0x6f, 0x75, + 0x70, 0x20, 0x53, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x32, + 0x13, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x20, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x63, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x22, 0xa5, 0x03, 0x0a, 0x09, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x4c, 0x69, + 0x73, 0x74, 0x12, 0x5a, 0x0a, 0x0a, 0x61, 0x70, 0x69, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x3a, 0x92, 0x41, 0x37, 0x2a, 0x0b, 0x41, 0x50, 0x49, + 0x20, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x32, 0x26, 0x41, 0x50, 0x49, 0x20, 0x56, 0x65, + 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, 0x20, 0x67, 0x72, 0x6f, + 0x75, 0x70, 0x20, 0x6c, 0x69, 0x73, 0x74, 0x20, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, + 0x40, 0x01, 0x52, 0x0a, 0x61, 0x70, 0x69, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x40, + 0x0a, 0x04, 0x6b, 0x69, 0x6e, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x2c, 0x92, 0x41, + 0x29, 0x2a, 0x04, 0x4b, 0x69, 0x6e, 0x64, 0x32, 0x1f, 0x4b, 0x69, 0x6e, 0x64, 0x20, 0x6f, 0x66, + 0x20, 0x74, 0x68, 0x65, 0x20, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x20, 0x6c, 0x69, 0x73, 0x74, 0x20, + 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x40, 0x01, 0x52, 0x04, 0x6b, 0x69, 0x6e, 0x64, + 0x12, 0x79, 0x0a, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, 0x03, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x72, 0x61, 0x66, 0x61, 0x79, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x74, + 0x79, 0x70, 0x65, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x33, 0x2e, 0x4c, + 0x69, 0x73, 0x74, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x42, 0x34, 0x92, 0x41, 0x31, + 0x2a, 0x08, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x32, 0x23, 0x4d, 0x65, 0x74, 0x61, + 0x64, 0x61, 0x74, 0x61, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, 0x20, 0x67, 0x72, 0x6f, 0x75, + 0x70, 0x20, 0x6c, 0x69, 0x73, 0x74, 0x20, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x40, + 0x01, 0x52, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x5f, 0x0a, 0x05, 0x69, + 0x74, 0x65, 0x6d, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x72, 0x61, 0x66, + 0x61, 0x79, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x75, 0x73, 0x65, + 0x72, 0x2e, 0x76, 0x33, 0x2e, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x42, 0x29, 0x92, 0x41, 0x26, 0x2a, + 0x05, 0x49, 0x74, 0x65, 0x6d, 0x73, 0x32, 0x1b, 0x4c, 0x69, 0x73, 0x74, 0x20, 0x6f, 0x66, 0x20, + 0x74, 0x68, 0x65, 0x20, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x20, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, + 0x63, 0x65, 0x73, 0x40, 0x01, 0x52, 0x05, 0x69, 0x74, 0x65, 0x6d, 0x73, 0x3a, 0x1e, 0x92, 0x41, + 0x1b, 0x0a, 0x19, 0x2a, 0x09, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x4c, 0x69, 0x73, 0x74, 0x32, 0x0a, + 0x47, 0x72, 0x6f, 0x75, 0x70, 0x20, 0x6c, 0x69, 0x73, 0x74, 0x40, 0x01, 0x42, 0x80, 0x02, 0x0a, + 0x1b, 0x63, 0x6f, 0x6d, 0x2e, 0x72, 0x61, 0x66, 0x61, 0x79, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x74, + 0x79, 0x70, 0x65, 0x73, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x42, 0x0a, 0x47, 0x72, + 0x6f, 0x75, 0x70, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x54, 0x67, 0x69, 0x74, 0x68, + 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x52, 0x61, 0x66, 0x61, 0x79, 0x53, 0x79, 0x73, 0x74, + 0x65, 0x6d, 0x73, 0x2f, 0x72, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2d, 0x62, 0x61, 0x73, 0x65, 0x2f, + 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x73, 0x2f, 0x75, 0x73, 0x65, 0x72, 0x6d, + 0x67, 0x6d, 0x74, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2f, + 0x75, 0x73, 0x65, 0x72, 0x70, 0x62, 0x2f, 0x76, 0x33, 0x3b, 0x75, 0x73, 0x65, 0x72, 0x76, 0x33, + 0xa2, 0x02, 0x04, 0x52, 0x44, 0x54, 0x55, 0xaa, 0x02, 0x17, 0x52, 0x61, 0x66, 0x61, 0x79, 0x2e, + 0x44, 0x65, 0x76, 0x2e, 0x54, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x2e, 0x56, + 0x33, 0xca, 0x02, 0x17, 0x52, 0x61, 0x66, 0x61, 0x79, 0x5c, 0x44, 0x65, 0x76, 0x5c, 0x54, 0x79, + 0x70, 0x65, 0x73, 0x5c, 0x55, 0x73, 0x65, 0x72, 0x5c, 0x56, 0x33, 0xe2, 0x02, 0x23, 0x52, 0x61, + 0x66, 0x61, 0x79, 0x5c, 0x44, 0x65, 0x76, 0x5c, 0x54, 0x79, 0x70, 0x65, 0x73, 0x5c, 0x55, 0x73, + 0x65, 0x72, 0x5c, 0x56, 0x33, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, + 0x61, 0xea, 0x02, 0x1b, 0x52, 0x61, 0x66, 0x61, 0x79, 0x3a, 0x3a, 0x44, 0x65, 0x76, 0x3a, 0x3a, + 0x54, 0x79, 0x70, 0x65, 0x73, 0x3a, 0x3a, 0x55, 0x73, 0x65, 0x72, 0x3a, 0x3a, 0x56, 0x33, 0x62, + 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -435,30 +448,26 @@ func file_proto_types_userpb_v3_group_proto_rawDescGZIP() []byte { var file_proto_types_userpb_v3_group_proto_msgTypes = make([]protoimpl.MessageInfo, 4) var file_proto_types_userpb_v3_group_proto_goTypes = []interface{}{ - (*Group)(nil), // 0: rafay.dev.types.user.v3.Group - (*ProjectRole)(nil), // 1: rafay.dev.types.user.v3.ProjectRole - (*GroupSpec)(nil), // 2: rafay.dev.types.user.v3.GroupSpec - (*GroupList)(nil), // 3: rafay.dev.types.user.v3.GroupList - (*v3.Metadata)(nil), // 4: rafay.dev.types.common.v3.Metadata - (*v3.Status)(nil), // 5: rafay.dev.types.common.v3.Status - (*v31.Project)(nil), // 6: rafay.dev.types.system.v3.Project - (*Role)(nil), // 7: rafay.dev.types.user.v3.Role - (*v3.ListMetadata)(nil), // 8: rafay.dev.types.common.v3.ListMetadata + (*Group)(nil), // 0: rafay.dev.types.user.v3.Group + (*ProjectNamespaceRole)(nil), // 1: rafay.dev.types.user.v3.ProjectNamespaceRole + (*GroupSpec)(nil), // 2: rafay.dev.types.user.v3.GroupSpec + (*GroupList)(nil), // 3: rafay.dev.types.user.v3.GroupList + (*v3.Metadata)(nil), // 4: rafay.dev.types.common.v3.Metadata + (*v3.Status)(nil), // 5: rafay.dev.types.common.v3.Status + (*v3.ListMetadata)(nil), // 6: rafay.dev.types.common.v3.ListMetadata } var file_proto_types_userpb_v3_group_proto_depIdxs = []int32{ 4, // 0: rafay.dev.types.user.v3.Group.metadata:type_name -> rafay.dev.types.common.v3.Metadata 2, // 1: rafay.dev.types.user.v3.Group.spec:type_name -> rafay.dev.types.user.v3.GroupSpec 5, // 2: rafay.dev.types.user.v3.Group.status:type_name -> rafay.dev.types.common.v3.Status - 6, // 3: rafay.dev.types.user.v3.ProjectRole.project:type_name -> rafay.dev.types.system.v3.Project - 7, // 4: rafay.dev.types.user.v3.ProjectRole.role:type_name -> rafay.dev.types.user.v3.Role - 1, // 5: rafay.dev.types.user.v3.GroupSpec.projectroles:type_name -> rafay.dev.types.user.v3.ProjectRole - 8, // 6: rafay.dev.types.user.v3.GroupList.metadata:type_name -> rafay.dev.types.common.v3.ListMetadata - 0, // 7: rafay.dev.types.user.v3.GroupList.items:type_name -> rafay.dev.types.user.v3.Group - 8, // [8:8] is the sub-list for method output_type - 8, // [8:8] is the sub-list for method input_type - 8, // [8:8] is the sub-list for extension type_name - 8, // [8:8] is the sub-list for extension extendee - 0, // [0:8] is the sub-list for field type_name + 1, // 3: rafay.dev.types.user.v3.GroupSpec.projectnamespaceroles:type_name -> rafay.dev.types.user.v3.ProjectNamespaceRole + 6, // 4: rafay.dev.types.user.v3.GroupList.metadata:type_name -> rafay.dev.types.common.v3.ListMetadata + 0, // 5: rafay.dev.types.user.v3.GroupList.items:type_name -> rafay.dev.types.user.v3.Group + 6, // [6:6] is the sub-list for method output_type + 6, // [6:6] is the sub-list for method input_type + 6, // [6:6] is the sub-list for extension type_name + 6, // [6:6] is the sub-list for extension extendee + 0, // [0:6] is the sub-list for field type_name } func init() { file_proto_types_userpb_v3_group_proto_init() } @@ -481,7 +490,7 @@ func file_proto_types_userpb_v3_group_proto_init() { } } file_proto_types_userpb_v3_group_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ProjectRole); i { + switch v := v.(*ProjectNamespaceRole); i { case 0: return &v.state case 1: diff --git a/components/usermgmt/proto/types/userpb/v3/group.proto b/components/usermgmt/proto/types/userpb/v3/group.proto index 041e675..052e5f3 100644 --- a/components/usermgmt/proto/types/userpb/v3/group.proto +++ b/components/usermgmt/proto/types/userpb/v3/group.proto @@ -45,19 +45,24 @@ message Group { } ]; } -message ProjectRole { +message ProjectNamespaceRole { option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_schema) = { json_schema : { - title : "ProjectRole" - description : "Project and role pairing for permission" + title : "ProjectNamespaceRole" + description : "Project, role and namespace pairing for permission" } }; - rafay.dev.types.system.v3.Project project = 1 + string project = 1 [ (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { title : "Project" description : "Project" } ]; - rafay.dev.types.user.v3.Role role = 2 + int64 namespace = 2 + [ (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { + title : "Namespace" + description : "Namespace" + } ]; + string role = 3 [ (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { title : "Role" description : "Role" @@ -71,10 +76,10 @@ message GroupSpec { description : "Group specification" } }; - repeated ProjectRole projectroles = 1 + repeated ProjectNamespaceRole projectnamespaceroles = 1 [ (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { - title : "ProjectRoles" - description : "ProjectRole groups for permission" + title : "ProjectNamespaceRoles" + description : "Project, namespace, role associations for permission" } ]; repeated string users = 2 [ (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { From d8b8fab1ff448404341a268560de96399992148b Mon Sep 17 00:00:00 2001 From: Abin Simon Date: Mon, 10 Jan 2022 10:25:53 +0530 Subject: [PATCH 15/28] Move user management to new strucutre --- components/usermgmt/main.go | 5 +- components/usermgmt/pkg/server/user.go | 62 +++++++++++++++++++++++++ components/usermgmt/pkg/service/user.go | 46 +++++++++++++----- 3 files changed, 100 insertions(+), 13 deletions(-) create mode 100644 components/usermgmt/pkg/server/user.go diff --git a/components/usermgmt/main.go b/components/usermgmt/main.go index 0cd206e..f43013b 100644 --- a/components/usermgmt/main.go +++ b/components/usermgmt/main.go @@ -58,6 +58,7 @@ var ( dbUser string dbPassword string db *bun.DB + us service.UserService gs service.GroupService rs service.RoleService dev bool @@ -118,6 +119,7 @@ func setup() { bundebug.FromEnv("BUNDEBUG"), )) + us = service.NewUserService(kc) gs = service.NewGroupService(db) rs = service.NewRoleService(db) @@ -183,6 +185,7 @@ func runRPC(wg *sync.WaitGroup, ctx context.Context) { defer gs.Close() defer rs.Close() + userServer := server.NewUserServer(us) groupServer := server.NewGroupServer(gs) roleServer := server.NewRoleServer(rs) @@ -218,7 +221,7 @@ func runRPC(wg *sync.WaitGroup, ctx context.Context) { _log.Infow("context done") }() - rpcv3.RegisterUserServer(s, service.NewUserServer(kc)) + rpcv3.RegisterUserServer(s, userServer) rpcv3.RegisterGroupServer(s, groupServer) rpcv3.RegisterRoleServer(s, roleServer) diff --git a/components/usermgmt/pkg/server/user.go b/components/usermgmt/pkg/server/user.go new file mode 100644 index 0000000..4b1087f --- /dev/null +++ b/components/usermgmt/pkg/server/user.go @@ -0,0 +1,62 @@ +package server + +import ( + "context" + + "github.com/RafaySystems/rcloud-base/components/usermgmt/pkg/service" + rpcv3 "github.com/RafaySystems/rcloud-base/components/usermgmt/proto/rpc/v3" + userpbv3 "github.com/RafaySystems/rcloud-base/components/usermgmt/proto/types/userpb/v3" +) + +type userServer struct { + service.UserService +} + +// NewUserServer returns new user server implementation +func NewUserServer(ps service.UserService) rpcv3.UserServer { + return &userServer{ps} +} + +func (s *userServer) CreateUser(ctx context.Context, p *userpbv3.User) (*userpbv3.User, error) { + user, err := s.Create(ctx, p) + if err != nil { + return nil, err + } + return user, nil +} + +func (s *userServer) GetUsers(ctx context.Context, p *userpbv3.User) (*userpbv3.UserList, error) { + users, err := s.List(ctx, p) + if err != nil { + return nil, err + } + return users, nil +} + +func (s *userServer) GetUser(ctx context.Context, p *userpbv3.User) (*userpbv3.User, error) { + // user, err := s.GetByName(ctx, p.Metadata.Name) + // if err != nil { + user, err := s.GetByID(ctx, p.Metadata.Id) + if err != nil { + return nil, err + } + // } + + return user, nil +} + +func (s *userServer) DeleteUser(ctx context.Context, p *userpbv3.User) (*rpcv3.DeleteUserResponse, error) { + _, err := s.Delete(ctx, p) + if err != nil { + return nil, err + } + return nil, nil +} + +func (s *userServer) UpdateUser(ctx context.Context, p *userpbv3.User) (*userpbv3.User, error) { + user, err := s.Update(ctx, p) + if err != nil { + return nil, err + } + return user, nil +} diff --git a/components/usermgmt/pkg/service/user.go b/components/usermgmt/pkg/service/user.go index 0989496..4285ad9 100644 --- a/components/usermgmt/pkg/service/user.go +++ b/components/usermgmt/pkg/service/user.go @@ -11,10 +11,36 @@ import ( userv3 "github.com/RafaySystems/rcloud-base/components/usermgmt/proto/types/userpb/v3" ) -type server struct { +const ( + userKind = "User" + userListKind = "UserList" +) + +// GroupService is the interface for group operations +type UserService interface { + // create user + Create(ctx context.Context, user *userv3.User) (*userv3.User, error) + // get user by id + GetByID(ctx context.Context, id string) (*userv3.User, error) + // // get user by name + // TODO: Implement GetByName + // GetByName(ctx context.Context, name string) (*userv3.User, error) + // create or update user + Update(ctx context.Context, user *userv3.User) (*userv3.User, error) + // delete user + Delete(ctx context.Context, user *userv3.User) (*userrpcv3.DeleteUserResponse, error) + // list users + List(ctx context.Context, user *userv3.User) (*userv3.UserList, error) +} + +type userService struct { kc *kclient.APIClient } +func NewUserService(kc *kclient.APIClient) UserService { + return &userService{kc: kc} +} + // Convert from kratos.Identity to GVK format func identityToUser(id *kclient.Identity) *userv3.User { traits := id.Traits.(map[string]interface{}) @@ -32,7 +58,7 @@ func identityToUser(id *kclient.Identity) *userv3.User { } } -func (s *server) CreateUser(ctx context.Context, user *userv3.User) (*userv3.User, error) { +func (s *userService) Create(ctx context.Context, user *userv3.User) (*userv3.User, error) { // TODO: restrict endpoint to admin cib := kclient.NewAdminCreateIdentityBody("default", map[string]interface{}{"email": user.Spec.Username, "first_name": user.Spec.FirstName, "last_name": user.Spec.LastName}) ir, hr, err := s.kc.V0alpha2Api.AdminCreateIdentity(ctx).AdminCreateIdentityBody(*cib).Execute() @@ -48,7 +74,7 @@ func (s *server) CreateUser(ctx context.Context, user *userv3.User) (*userv3.Use } fmt.Println("Recovery link:", rl.RecoveryLink) // TODO: email the recovery link to the user user.Metadata = &v3.Metadata{ - Id : ir.Id, + Id: ir.Id, } user.Status = &v3.Status{ ConditionType: "StatusOK", @@ -57,7 +83,7 @@ func (s *server) CreateUser(ctx context.Context, user *userv3.User) (*userv3.Use return user, nil } -func (s *server) GetUsers(ctx context.Context, _ *userv3.User) (*userv3.UserList, error) { +func (s *userService) List(ctx context.Context, _ *userv3.User) (*userv3.UserList, error) { ir, _, err := s.kc.V0alpha2Api.AdminListIdentities(ctx).Execute() if err != nil { return nil, err @@ -68,15 +94,15 @@ func (s *server) GetUsers(ctx context.Context, _ *userv3.User) (*userv3.UserList } return res, nil } -func (s *server) GetUser(ctx context.Context, user *userv3.User) (*userv3.User, error) { +func (s *userService) GetByID(ctx context.Context, id string) (*userv3.User, error) { // TODO: should it be get by id or by email? Kratos can only fileter by id - ir, _, err := s.kc.V0alpha2Api.AdminGetIdentity(ctx, user.Metadata.Id).Execute() + ir, _, err := s.kc.V0alpha2Api.AdminGetIdentity(ctx, id).Execute() if err != nil { return nil, err } return identityToUser(ir), nil } -func (s *server) UpdateUser(ctx context.Context, user *userv3.User) (*userv3.User, error) { +func (s *userService) Update(ctx context.Context, user *userv3.User) (*userv3.User, error) { uib := kclient.NewAdminUpdateIdentityBody("active", map[string]interface{}{"email": user.Spec.Username, "first_name": user.Spec.FirstName, "last_name": user.Spec.LastName}) _, hr, err := s.kc.V0alpha2Api.AdminUpdateIdentity(ctx, user.Metadata.Id).AdminUpdateIdentityBody(*uib).Execute() if err != nil { @@ -91,7 +117,7 @@ func (s *server) UpdateUser(ctx context.Context, user *userv3.User) (*userv3.Use return user, nil } -func (s *server) DeleteUser(ctx context.Context, user *userv3.User) (*userrpcv3.DeleteUserResponse, error) { +func (s *userService) Delete(ctx context.Context, user *userv3.User) (*userrpcv3.DeleteUserResponse, error) { // TODO: should it be get by id or by email? Kratos can only filter by id _, err := s.kc.V0alpha2Api.AdminDeleteIdentity(ctx, user.Metadata.Id).Execute() if err != nil { @@ -100,7 +126,3 @@ func (s *server) DeleteUser(ctx context.Context, user *userv3.User) (*userrpcv3. return &userrpcv3.DeleteUserResponse{}, nil } - -func NewUserServer(kc *kclient.APIClient) userrpcv3.UserServer { - return &server{kc: kc} -} From 21e06a0b6f64913287d1cdc857171ed2a03c512b Mon Sep 17 00:00:00 2001 From: Abin Simon Date: Mon, 10 Jan 2022 11:07:18 +0530 Subject: [PATCH 16/28] Switch kratos from using mem to db --- README.md | 7 +++---- components/usermgmt/README.md | 8 +++++++- components/usermgmt/_kratos/kratos.yml | 2 +- 3 files changed, 11 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 46d0c9c..a2559df 100644 --- a/README.md +++ b/README.md @@ -21,11 +21,11 @@ grant execute on function uuid_generate_v4() to admindbuser; *This will grant the necessary permission to the newly created user to run uuid_generate_v4()* -### Run migrations +### Run application migrations We use [`golang-migrate`](https://github.com/golang-migrate/migrate) to perform migrations. -### Install [`golang-migrate`](https://github.com/golang-migrate/migrate) +#### Install [`golang-migrate`](https://github.com/golang-migrate/migrate) ``` shell go install -tags 'postgres' github.com/golang-migrate/migrate/v4/cmd/migrate@latest @@ -35,7 +35,7 @@ go install -tags 'postgres' github.com/golang-migrate/migrate/v4/cmd/migrate@lat You can refer to the [guide](https://github.com/golang-migrate/migrate/tree/master/cmd/migrate) for full details. -### Run migrations +#### Run migrations Example for `admindb`: @@ -45,4 +45,3 @@ migrate -path ./persistence/migrations/admindb -database "$POSTGRESQL_URL" up ``` See [cli-usage](https://github.com/golang-migrate/migrate#cli-usage) for more info. - diff --git a/components/usermgmt/README.md b/components/usermgmt/README.md index 1b09a84..73b5c39 100644 --- a/components/usermgmt/README.md +++ b/components/usermgmt/README.md @@ -6,6 +6,13 @@ All user/auth related requests go through here. ## Development +### Run kratos migrations + +``` shell +export DSN='postgres://admindbuser@localhost:5432/admindb?sslmode=disable' +kratos -c kratos.yaml migrate sql -e --yes +``` + ### Start kratos ``` shell @@ -19,4 +26,3 @@ kratos serve -c kratos.yml cd components/usermgmt/_kratos go run main.go ``` - diff --git a/components/usermgmt/_kratos/kratos.yml b/components/usermgmt/_kratos/kratos.yml index 72bc8de..2e5ce71 100644 --- a/components/usermgmt/_kratos/kratos.yml +++ b/components/usermgmt/_kratos/kratos.yml @@ -1,6 +1,6 @@ version: v0.7.1-alpha.1 -dsn: memory +dsn: postgres://admindbuser@localhost:5432/admindb?sslmode=disable serve: public: From d2d214c7e38fcb502aa2387a365dc7a1b271c5c9 Mon Sep 17 00:00:00 2001 From: Abin Simon Date: Mon, 10 Jan 2022 13:18:19 +0530 Subject: [PATCH 17/28] Update account id constraints to use kratos db --- .../000010_authsrv_projectaccountresourcerole.up.sql | 4 ++-- .../000011_authsrv_projectaccountnamespacerole.up.sql | 4 ++-- .../migrations/admindb/000014_authsrv_groupaccount.up.sql | 7 +++---- .../admindb/000016_authsrv_accountresourcerole.up.sql | 4 ++-- 4 files changed, 9 insertions(+), 10 deletions(-) diff --git a/persistence/migrations/admindb/000010_authsrv_projectaccountresourcerole.up.sql b/persistence/migrations/admindb/000010_authsrv_projectaccountresourcerole.up.sql index fb5a1d7..e6a0352 100644 --- a/persistence/migrations/admindb/000010_authsrv_projectaccountresourcerole.up.sql +++ b/persistence/migrations/admindb/000010_authsrv_projectaccountresourcerole.up.sql @@ -34,7 +34,7 @@ CREATE INDEX authsrv_projectaccountresourcerole_role_id_a345b16f ON authsrv_proj ALTER TABLE ONLY authsrv_projectaccountresourcerole ADD CONSTRAINT authsrv_projectaccou_account_id_532ce8df_fk_authsrv_a FOREIGN KEY (account_id) - REFERENCES authsrv_account(id) DEFERRABLE INITIALLY DEFERRED; + REFERENCES identities(id) DEFERRABLE INITIALLY DEFERRED; ALTER TABLE ONLY authsrv_projectaccountresourcerole ADD CONSTRAINT authsrv_projectaccou_organization_id_91c5602d_fk_authsrv_o FOREIGN KEY (organization_id) @@ -50,4 +50,4 @@ ALTER TABLE ONLY authsrv_projectaccountresourcerole ALTER TABLE ONLY authsrv_projectaccountresourcerole ADD CONSTRAINT authsrv_projectaccou_role_id_a345b16f_fk_authsrv_r FOREIGN KEY (role_id) - REFERENCES authsrv_resourcerole(id) DEFERRABLE INITIALLY DEFERRED; \ No newline at end of file + REFERENCES authsrv_resourcerole(id) DEFERRABLE INITIALLY DEFERRED; diff --git a/persistence/migrations/admindb/000011_authsrv_projectaccountnamespacerole.up.sql b/persistence/migrations/admindb/000011_authsrv_projectaccountnamespacerole.up.sql index f095faf..3572aa8 100644 --- a/persistence/migrations/admindb/000011_authsrv_projectaccountnamespacerole.up.sql +++ b/persistence/migrations/admindb/000011_authsrv_projectaccountnamespacerole.up.sql @@ -34,7 +34,7 @@ CREATE INDEX authsrv_projectaccountnamespacerole_role_id_8a5411cc ON authsrv_pro ALTER TABLE ONLY authsrv_projectaccountnamespacerole ADD CONSTRAINT authsrv_projectaccou_account_id_4fac0ac2_fk_authsrv_a FOREIGN KEY (account_id) - REFERENCES authsrv_account(id) DEFERRABLE INITIALLY DEFERRED; + REFERENCES identities(id) DEFERRABLE INITIALLY DEFERRED; ALTER TABLE ONLY authsrv_projectaccountnamespacerole ADD CONSTRAINT authsrv_projectaccou_organization_id_96c921c9_fk_authsrv_o FOREIGN KEY (organization_id) @@ -50,4 +50,4 @@ ALTER TABLE ONLY authsrv_projectaccountnamespacerole ALTER TABLE ONLY authsrv_projectaccountnamespacerole ADD CONSTRAINT authsrv_projectaccou_role_id_8a5411cc_fk_authsrv_r FOREIGN KEY (role_id) - REFERENCES authsrv_resourcerole(id) DEFERRABLE INITIALLY DEFERRED; \ No newline at end of file + REFERENCES authsrv_resourcerole(id) DEFERRABLE INITIALLY DEFERRED; diff --git a/persistence/migrations/admindb/000014_authsrv_groupaccount.up.sql b/persistence/migrations/admindb/000014_authsrv_groupaccount.up.sql index ad1ecd8..258a5b1 100644 --- a/persistence/migrations/admindb/000014_authsrv_groupaccount.up.sql +++ b/persistence/migrations/admindb/000014_authsrv_groupaccount.up.sql @@ -22,10 +22,9 @@ CREATE INDEX authsrv_groupaccount_name_d17de056 ON authsrv_groupaccount USING bt CREATE INDEX authsrv_groupaccount_name_d17de056_like ON authsrv_groupaccount USING btree (name varchar_pattern_ops); --- TODO: find a better constraint now that we have a different accounts table --- ALTER TABLE ONLY authsrv_groupaccount --- ADD CONSTRAINT authsrv_groupaccount_account_id_041e4e98_fk_authsrv_account_id FOREIGN KEY (account_id) --- REFERENCES authsrv_account(id) DEFERRABLE INITIALLY DEFERRED; +ALTER TABLE ONLY authsrv_groupaccount + ADD CONSTRAINT authsrv_groupaccount_account_id_041e4e98_fk_authsrv_account_id FOREIGN KEY (account_id) + REFERENCES identities(id) DEFERRABLE INITIALLY DEFERRED; ALTER TABLE ONLY authsrv_groupaccount ADD CONSTRAINT authsrv_groupaccount_group_id_c67750ef_fk_authsrv_group_id FOREIGN KEY (group_id) diff --git a/persistence/migrations/admindb/000016_authsrv_accountresourcerole.up.sql b/persistence/migrations/admindb/000016_authsrv_accountresourcerole.up.sql index a6764ad..523a7b1 100644 --- a/persistence/migrations/admindb/000016_authsrv_accountresourcerole.up.sql +++ b/persistence/migrations/admindb/000016_authsrv_accountresourcerole.up.sql @@ -31,7 +31,7 @@ CREATE INDEX authsrv_accountresourcerole_role_id_769ec143 ON authsrv_accountreso ALTER TABLE ONLY authsrv_accountresourcerole ADD CONSTRAINT authsrv_accountresou_account_id_229069ae_fk_authsrv_a FOREIGN KEY (account_id) - REFERENCES authsrv_account(id) DEFERRABLE INITIALLY DEFERRED; + REFERENCES identities(id) DEFERRABLE INITIALLY DEFERRED; ALTER TABLE ONLY authsrv_accountresourcerole ADD CONSTRAINT authsrv_accountresou_organization_id_22bb772c_fk_authsrv_o FOREIGN KEY (organization_id) @@ -43,4 +43,4 @@ ALTER TABLE ONLY authsrv_accountresourcerole ALTER TABLE ONLY authsrv_accountresourcerole ADD CONSTRAINT authsrv_accountresou_role_id_769ec143_fk_authsrv_r FOREIGN KEY (role_id) - REFERENCES authsrv_resourcerole(id) DEFERRABLE INITIALLY DEFERRED; \ No newline at end of file + REFERENCES authsrv_resourcerole(id) DEFERRABLE INITIALLY DEFERRED; From eba34f40edcdbd6b7fe1889729868449f817474a Mon Sep 17 00:00:00 2001 From: Abin Simon Date: Mon, 10 Jan 2022 13:19:46 +0530 Subject: [PATCH 18/28] Users can now be assigned to roles without group --- .../openapi/proto/rpc/v3/group.swagger.json | 2 +- .../openapi/proto/rpc/v3/user.swagger.json | 31 +++ components/usermgmt/main.go | 2 +- .../internal/models/accountresourcerole.go | 25 +++ .../models/projectaccountnamespacerole.go | 26 +++ .../models/projectaccountresourcerole.go | 26 +++ ...espace.go => projectgroupnamespacerole.go} | 0 components/usermgmt/pkg/service/group.go | 4 +- components/usermgmt/pkg/service/role.go | 2 +- components/usermgmt/pkg/service/user.go | 117 +++++++++- .../proto/types/userpb/v3/group.pb.go | 120 +++++------ .../proto/types/userpb/v3/group.proto | 2 +- .../usermgmt/proto/types/userpb/v3/user.pb.go | 199 ++++++++++-------- .../usermgmt/proto/types/userpb/v3/user.proto | 13 +- 14 files changed, 407 insertions(+), 162 deletions(-) create mode 100644 components/usermgmt/pkg/internal/models/accountresourcerole.go create mode 100644 components/usermgmt/pkg/internal/models/projectaccountnamespacerole.go create mode 100644 components/usermgmt/pkg/internal/models/projectaccountresourcerole.go rename components/usermgmt/pkg/internal/models/{projectgroupnamespace.go => projectgroupnamespacerole.go} (100%) diff --git a/components/usermgmt/gen/openapi/proto/rpc/v3/group.swagger.json b/components/usermgmt/gen/openapi/proto/rpc/v3/group.swagger.json index cd110d0..5f933a7 100644 --- a/components/usermgmt/gen/openapi/proto/rpc/v3/group.swagger.json +++ b/components/usermgmt/gen/openapi/proto/rpc/v3/group.swagger.json @@ -1138,7 +1138,7 @@ "items": { "$ref": "#/definitions/v3ProjectNamespaceRole" }, - "description": "Project, namespace, role associations for permission", + "description": "Project, namespace, role associations for group", "title": "ProjectNamespaceRoles" }, "users": { diff --git a/components/usermgmt/gen/openapi/proto/rpc/v3/user.swagger.json b/components/usermgmt/gen/openapi/proto/rpc/v3/user.swagger.json index 08b40cf..7197ca2 100644 --- a/components/usermgmt/gen/openapi/proto/rpc/v3/user.swagger.json +++ b/components/usermgmt/gen/openapi/proto/rpc/v3/user.swagger.json @@ -1387,6 +1387,29 @@ "project" ] }, + "v3ProjectNamespaceRole": { + "type": "object", + "properties": { + "project": { + "type": "string", + "description": "Project", + "title": "Project" + }, + "namespace": { + "type": "string", + "format": "int64", + "description": "Namespace", + "title": "Namespace" + }, + "role": { + "type": "string", + "description": "Role", + "title": "Role" + } + }, + "description": "Project, role and namespace pairing for permission", + "title": "ProjectNamespaceRole" + }, "v3User": { "type": "object", "properties": { @@ -1501,6 +1524,14 @@ "description": "Groups the user belongs to", "title": "Group" }, + "projectnamespaceroles": { + "type": "array", + "items": { + "$ref": "#/definitions/v3ProjectNamespaceRole" + }, + "description": "Project, namespace, role associations for user", + "title": "ProjectNamespaceRoles" + }, "emailVerified": { "type": "boolean", "description": "Flag to show if the email of the user was verified", diff --git a/components/usermgmt/main.go b/components/usermgmt/main.go index f43013b..972c445 100644 --- a/components/usermgmt/main.go +++ b/components/usermgmt/main.go @@ -119,7 +119,7 @@ func setup() { bundebug.FromEnv("BUNDEBUG"), )) - us = service.NewUserService(kc) + us = service.NewUserService(kc, db) gs = service.NewGroupService(db) rs = service.NewRoleService(db) diff --git a/components/usermgmt/pkg/internal/models/accountresourcerole.go b/components/usermgmt/pkg/internal/models/accountresourcerole.go new file mode 100644 index 0000000..a132816 --- /dev/null +++ b/components/usermgmt/pkg/internal/models/accountresourcerole.go @@ -0,0 +1,25 @@ +package models + +import ( + "time" + + "github.com/google/uuid" + "github.com/uptrace/bun" +) + +type AccountResourcerole struct { + bun.BaseModel `bun:"table:authsrv_accountresourcerole,alias:accountresourcerole"` + + ID uuid.UUID `bun:"id,type:uuid,pk,default:uuid_generate_v4()"` + Name string `bun:"name,notnull"` + Description string `bun:"description,notnull"` + CreatedAt time.Time `bun:"created_at,notnull,default:current_timestamp"` + ModifiedAt time.Time `bun:"modified_at,notnull,default:current_timestamp"` + Trash bool `bun:"trash,notnull"` + Default bool `bun:"default,notnull"` + OrganizationId uuid.UUID `bun:"organization_id,type:uuid"` + PartnerId uuid.UUID `bun:"partner_id,type:uuid"` + RoleId uuid.UUID `bun:"role_id,type:uuid"` + AccountId uuid.UUID `bun:"account_id,type:uuid"` + Active bool `bun:"active,notnull"` +} diff --git a/components/usermgmt/pkg/internal/models/projectaccountnamespacerole.go b/components/usermgmt/pkg/internal/models/projectaccountnamespacerole.go new file mode 100644 index 0000000..2ab610d --- /dev/null +++ b/components/usermgmt/pkg/internal/models/projectaccountnamespacerole.go @@ -0,0 +1,26 @@ +package models + +import ( + "time" + + "github.com/google/uuid" + "github.com/uptrace/bun" +) + +type ProjectAccountNamespaceRole struct { + bun.BaseModel `bun:"table:authsrv_projectaccountnamespacerole,alias:projectaccountnamespacerole"` + + ID uuid.UUID `bun:"id,type:uuid,pk,default:uuid_generate_v4()"` + Name string `bun:"name,notnull"` + Description string `bun:"description,notnull"` + CreatedAt time.Time `bun:"created_at,notnull,default:current_timestamp"` + ModifiedAt time.Time `bun:"modified_at,notnull,default:current_timestamp"` + Trash bool `bun:"trash,notnull"` + OrganizationId uuid.UUID `bun:"organization_id,type:uuid"` + PartnerId uuid.UUID `bun:"partner_id,type:uuid"` + RoleId uuid.UUID `bun:"role_id,type:uuid"` + AccountId uuid.UUID `bun:"account_id,type:uuid"` + ProjectId uuid.UUID `bun:"project_id,type:uuid"` + NamesapceId int64 `bun:"namespace_id,type:uuid"` + Active bool `bun:"active,notnull"` +} diff --git a/components/usermgmt/pkg/internal/models/projectaccountresourcerole.go b/components/usermgmt/pkg/internal/models/projectaccountresourcerole.go new file mode 100644 index 0000000..451a916 --- /dev/null +++ b/components/usermgmt/pkg/internal/models/projectaccountresourcerole.go @@ -0,0 +1,26 @@ +package models + +import ( + "time" + + "github.com/google/uuid" + "github.com/uptrace/bun" +) + +type ProjectAccountResourcerole struct { + bun.BaseModel `bun:"table:authsrv_projectaccountrole,alias:projectaccountrole"` + + ID uuid.UUID `bun:"id,type:uuid,pk,default:uuid_generate_v4()"` + Name string `bun:"name,notnull"` + Description string `bun:"description,notnull"` + CreatedAt time.Time `bun:"created_at,notnull,default:current_timestamp"` + ModifiedAt time.Time `bun:"modified_at,notnull,default:current_timestamp"` + Trash bool `bun:"trash,notnull"` + Default bool `bun:"default,notnull"` + OrganizationId uuid.UUID `bun:"organization_id,type:uuid"` + PartnerId uuid.UUID `bun:"partner_id,type:uuid"` + RoleId uuid.UUID `bun:"role_id,type:uuid"` + AccountId uuid.UUID `bun:"account_id,type:uuid"` + ProjectId uuid.UUID `bun:"project_id,type:uuid"` + Active bool `bun:"active,notnull"` +} diff --git a/components/usermgmt/pkg/internal/models/projectgroupnamespace.go b/components/usermgmt/pkg/internal/models/projectgroupnamespacerole.go similarity index 100% rename from components/usermgmt/pkg/internal/models/projectgroupnamespace.go rename to components/usermgmt/pkg/internal/models/projectgroupnamespacerole.go diff --git a/components/usermgmt/pkg/service/group.go b/components/usermgmt/pkg/service/group.go index 94ba0bb..9ab96dc 100644 --- a/components/usermgmt/pkg/service/group.go +++ b/components/usermgmt/pkg/service/group.go @@ -50,7 +50,7 @@ func NewGroupService(db *bun.DB) GroupService { } // Map roles to groups -func (s *groupService) userGroupRoleRelation(ctx context.Context, group *userv3.Group) (*userv3.Group, error) { +func (s *groupService) updateGroupRoleRelation(ctx context.Context, group *userv3.Group) (*userv3.Group, error) { groupId, _ := uuid.Parse(group.GetMetadata().GetId()) partnerId, _ := uuid.Parse(group.GetMetadata().GetPartner()) organizationId, _ := uuid.Parse(group.GetMetadata().GetOrganization()) @@ -234,7 +234,7 @@ func (s *groupService) Create(ctx context.Context, group *userv3.Group) (*userv3 return group, err } - group, err = s.userGroupRoleRelation(ctx, group) + group, err = s.updateGroupRoleRelation(ctx, group) if err != nil { group.Status = &v3.Status{ ConditionType: "Create", diff --git a/components/usermgmt/pkg/service/role.go b/components/usermgmt/pkg/service/role.go index 3f8b768..c847fc0 100644 --- a/components/usermgmt/pkg/service/role.go +++ b/components/usermgmt/pkg/service/role.go @@ -48,11 +48,11 @@ func NewRoleService(db *bun.DB) RoleService { } } +// TODO: This right now just lets us create roles, we will have to make sure the mapping happens func (s *roleService) Create(ctx context.Context, role *userv3.Role) (*userv3.Role, error) { partnerId, _ := uuid.Parse(role.GetMetadata().GetPartner()) organizationId, _ := uuid.Parse(role.GetMetadata().GetOrganization()) - // TODO: find out the interaction if project key is present in the role metadata // TODO: check if a role with the same 'name' already exists and fail if so // TODO: we should be specifying names instead of ids for partner and org // TODO: create vs apply difference like in kubectl?? diff --git a/components/usermgmt/pkg/service/user.go b/components/usermgmt/pkg/service/user.go index 4285ad9..6fd1f93 100644 --- a/components/usermgmt/pkg/service/user.go +++ b/components/usermgmt/pkg/service/user.go @@ -3,10 +3,16 @@ package service import ( "context" "fmt" + "time" + "github.com/google/uuid" kclient "github.com/ory/kratos-client-go" + bun "github.com/uptrace/bun" + "google.golang.org/protobuf/types/known/timestamppb" v3 "github.com/RafaySystems/rcloud-base/components/common/proto/types/commonpb/v3" + "github.com/RafaySystems/rcloud-base/components/usermgmt/pkg/internal/models" + "github.com/RafaySystems/rcloud-base/components/usermgmt/pkg/internal/persistence/provider/pg" userrpcv3 "github.com/RafaySystems/rcloud-base/components/usermgmt/proto/rpc/v3" userv3 "github.com/RafaySystems/rcloud-base/components/usermgmt/proto/types/userpb/v3" ) @@ -34,11 +40,12 @@ type UserService interface { } type userService struct { - kc *kclient.APIClient + kc *kclient.APIClient + dao pg.EntityDAO } -func NewUserService(kc *kclient.APIClient) UserService { - return &userService{kc: kc} +func NewUserService(kc *kclient.APIClient, db *bun.DB) UserService { + return &userService{kc: kc, dao: pg.NewEntityDAO(db)} } // Convert from kratos.Identity to GVK format @@ -58,6 +65,98 @@ func identityToUser(id *kclient.Identity) *userv3.User { } } +// Map roles to accounts +func (s *userService) updateUserRoleRelation(ctx context.Context, user *userv3.User) (*userv3.User, error) { + accountId, _ := uuid.Parse(user.GetMetadata().GetId()) + partnerId, _ := uuid.Parse(user.GetMetadata().GetPartner()) + organizationId, _ := uuid.Parse(user.GetMetadata().GetOrganization()) + + // TODO: also parse out namesapce + projectNamespaceRoles := user.GetSpec().GetProjectnamespaceroles() + + // TODO: add transactions + var panrs []models.ProjectAccountNamespaceRole + var pars []models.ProjectAccountResourcerole + var ars []models.AccountResourcerole + for _, pnr := range projectNamespaceRoles { + projectId, perr := uuid.Parse(pnr.GetProject()) + namespaceId := pnr.GetNamespace() + roleId, err := uuid.Parse(pnr.GetRole()) + if err != nil { + return user, err + } + switch { + case namespaceId != 0: // TODO: namespaceId can be zero? + panr := models.ProjectAccountNamespaceRole{ + Name: user.GetMetadata().GetName(), + Description: user.GetMetadata().GetDescription(), + CreatedAt: time.Now(), + ModifiedAt: time.Now(), + Trash: false, + RoleId: roleId, + PartnerId: partnerId, + OrganizationId: organizationId, + AccountId: accountId, + ProjectId: projectId, + NamesapceId: namespaceId, + Active: true, + } + panrs = append(panrs, panr) + case perr == nil: // TODO: maybe a better check? + par := models.ProjectAccountResourcerole{ + Name: user.GetMetadata().GetName(), + Description: user.GetMetadata().GetDescription(), + CreatedAt: time.Now(), + ModifiedAt: time.Now(), + Trash: false, + Default: true, // TODO: what is this for? + RoleId: roleId, + PartnerId: partnerId, + OrganizationId: organizationId, + AccountId: accountId, + ProjectId: projectId, + Active: true, + } + pars = append(pars, par) + default: + ar := models.AccountResourcerole{ + Name: user.GetMetadata().GetName(), + Description: user.GetMetadata().GetDescription(), + CreatedAt: time.Now(), + ModifiedAt: time.Now(), + Trash: false, + Default: true, // TODO: what is this for? + RoleId: roleId, + PartnerId: partnerId, + OrganizationId: organizationId, + AccountId: accountId, + Active: true, + } + ars = append(ars, ar) + } + } + if len(panrs) > 0 { + _, err := s.dao.Create(ctx, &panrs) + if err != nil { + return user, err + } + } + if len(pars) > 0 { + _, err := s.dao.Create(ctx, &pars) + if err != nil { + return user, err + } + } + if len(ars) > 0 { + _, err := s.dao.Create(ctx, &ars) + if err != nil { + return user, err + } + } + + return user, nil +} + func (s *userService) Create(ctx context.Context, user *userv3.User) (*userv3.User, error) { // TODO: restrict endpoint to admin cib := kclient.NewAdminCreateIdentityBody("default", map[string]interface{}{"email": user.Spec.Username, "first_name": user.Spec.FirstName, "last_name": user.Spec.LastName}) @@ -67,11 +166,23 @@ func (s *userService) Create(ctx context.Context, user *userv3.User) (*userv3.Us // TODO: forward exact error message from kratos (eg: json schema validation) return nil, err } + user.Metadata.Id = ir.Id rlb := kclient.NewAdminCreateSelfServiceRecoveryLinkBody(ir.Id) rl, _, err := s.kc.V0alpha2Api.AdminCreateSelfServiceRecoveryLink(ctx).AdminCreateSelfServiceRecoveryLinkBody(*rlb).Execute() if err != nil { return nil, err } + + user, err = s.updateUserRoleRelation(ctx, user) + if err != nil { + user.Status = &v3.Status{ + ConditionType: "Create", + ConditionStatus: v3.ConditionStatus_StatusFailed, + LastUpdated: timestamppb.Now(), + } + return user, err + } + fmt.Println("Recovery link:", rl.RecoveryLink) // TODO: email the recovery link to the user user.Metadata = &v3.Metadata{ Id: ir.Id, diff --git a/components/usermgmt/proto/types/userpb/v3/group.pb.go b/components/usermgmt/proto/types/userpb/v3/group.pb.go index 1cd49f0..f57131e 100644 --- a/components/usermgmt/proto/types/userpb/v3/group.pb.go +++ b/components/usermgmt/proto/types/userpb/v3/group.pb.go @@ -366,72 +366,72 @@ var file_proto_types_userpb_v3_group_proto_rawDesc = []byte{ 0x32, 0x32, 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x2c, 0x20, 0x72, 0x6f, 0x6c, 0x65, 0x20, 0x61, 0x6e, 0x64, 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x20, 0x70, 0x61, 0x69, 0x72, 0x69, 0x6e, 0x67, 0x20, 0x66, 0x6f, 0x72, 0x20, 0x70, 0x65, 0x72, 0x6d, 0x69, 0x73, - 0x73, 0x69, 0x6f, 0x6e, 0x22, 0xdd, 0x02, 0x0a, 0x09, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x53, 0x70, - 0x65, 0x63, 0x12, 0xb5, 0x01, 0x0a, 0x15, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x6e, 0x61, + 0x73, 0x69, 0x6f, 0x6e, 0x22, 0xd8, 0x02, 0x0a, 0x09, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x53, 0x70, + 0x65, 0x63, 0x12, 0xb0, 0x01, 0x0a, 0x15, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x72, 0x6f, 0x6c, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2d, 0x2e, 0x72, 0x61, 0x66, 0x61, 0x79, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x2e, 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x52, 0x6f, 0x6c, - 0x65, 0x42, 0x50, 0x92, 0x41, 0x4d, 0x2a, 0x15, 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x4e, - 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x52, 0x6f, 0x6c, 0x65, 0x73, 0x32, 0x34, 0x50, + 0x65, 0x42, 0x4b, 0x92, 0x41, 0x48, 0x2a, 0x15, 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x4e, + 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x52, 0x6f, 0x6c, 0x65, 0x73, 0x32, 0x2f, 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x2c, 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x2c, 0x20, 0x72, 0x6f, 0x6c, 0x65, 0x20, 0x61, 0x73, 0x73, 0x6f, 0x63, 0x69, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x73, 0x20, 0x66, 0x6f, 0x72, 0x20, 0x70, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, - 0x69, 0x6f, 0x6e, 0x52, 0x15, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x6e, 0x61, 0x6d, 0x65, - 0x73, 0x70, 0x61, 0x63, 0x65, 0x72, 0x6f, 0x6c, 0x65, 0x73, 0x12, 0x39, 0x0a, 0x05, 0x75, 0x73, - 0x65, 0x72, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x42, 0x23, 0x92, 0x41, 0x20, 0x2a, 0x05, - 0x55, 0x73, 0x65, 0x72, 0x73, 0x32, 0x17, 0x4c, 0x69, 0x73, 0x74, 0x20, 0x6f, 0x66, 0x20, 0x75, - 0x73, 0x65, 0x72, 0x73, 0x20, 0x66, 0x6f, 0x72, 0x20, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x52, 0x05, - 0x75, 0x73, 0x65, 0x72, 0x73, 0x12, 0x2c, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x03, 0x20, - 0x01, 0x28, 0x09, 0x42, 0x18, 0x92, 0x41, 0x15, 0x2a, 0x04, 0x54, 0x79, 0x70, 0x65, 0x32, 0x0d, - 0x54, 0x79, 0x70, 0x65, 0x20, 0x6f, 0x66, 0x20, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x52, 0x04, 0x74, - 0x79, 0x70, 0x65, 0x3a, 0x2f, 0x92, 0x41, 0x2c, 0x0a, 0x2a, 0x2a, 0x13, 0x47, 0x72, 0x6f, 0x75, - 0x70, 0x20, 0x53, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x32, - 0x13, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x20, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x63, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x22, 0xa5, 0x03, 0x0a, 0x09, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x4c, 0x69, - 0x73, 0x74, 0x12, 0x5a, 0x0a, 0x0a, 0x61, 0x70, 0x69, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x3a, 0x92, 0x41, 0x37, 0x2a, 0x0b, 0x41, 0x50, 0x49, - 0x20, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x32, 0x26, 0x41, 0x50, 0x49, 0x20, 0x56, 0x65, - 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, 0x20, 0x67, 0x72, 0x6f, - 0x75, 0x70, 0x20, 0x6c, 0x69, 0x73, 0x74, 0x20, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, - 0x40, 0x01, 0x52, 0x0a, 0x61, 0x70, 0x69, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x40, - 0x0a, 0x04, 0x6b, 0x69, 0x6e, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x2c, 0x92, 0x41, - 0x29, 0x2a, 0x04, 0x4b, 0x69, 0x6e, 0x64, 0x32, 0x1f, 0x4b, 0x69, 0x6e, 0x64, 0x20, 0x6f, 0x66, - 0x20, 0x74, 0x68, 0x65, 0x20, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x20, 0x6c, 0x69, 0x73, 0x74, 0x20, - 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x40, 0x01, 0x52, 0x04, 0x6b, 0x69, 0x6e, 0x64, - 0x12, 0x79, 0x0a, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, 0x03, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x72, 0x61, 0x66, 0x61, 0x79, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x74, - 0x79, 0x70, 0x65, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x33, 0x2e, 0x4c, - 0x69, 0x73, 0x74, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x42, 0x34, 0x92, 0x41, 0x31, - 0x2a, 0x08, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x32, 0x23, 0x4d, 0x65, 0x74, 0x61, - 0x64, 0x61, 0x74, 0x61, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, 0x20, 0x67, 0x72, 0x6f, 0x75, - 0x70, 0x20, 0x6c, 0x69, 0x73, 0x74, 0x20, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x40, - 0x01, 0x52, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x5f, 0x0a, 0x05, 0x69, - 0x74, 0x65, 0x6d, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x72, 0x61, 0x66, - 0x61, 0x79, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x75, 0x73, 0x65, - 0x72, 0x2e, 0x76, 0x33, 0x2e, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x42, 0x29, 0x92, 0x41, 0x26, 0x2a, - 0x05, 0x49, 0x74, 0x65, 0x6d, 0x73, 0x32, 0x1b, 0x4c, 0x69, 0x73, 0x74, 0x20, 0x6f, 0x66, 0x20, - 0x74, 0x68, 0x65, 0x20, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x20, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, - 0x63, 0x65, 0x73, 0x40, 0x01, 0x52, 0x05, 0x69, 0x74, 0x65, 0x6d, 0x73, 0x3a, 0x1e, 0x92, 0x41, - 0x1b, 0x0a, 0x19, 0x2a, 0x09, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x4c, 0x69, 0x73, 0x74, 0x32, 0x0a, - 0x47, 0x72, 0x6f, 0x75, 0x70, 0x20, 0x6c, 0x69, 0x73, 0x74, 0x40, 0x01, 0x42, 0x80, 0x02, 0x0a, - 0x1b, 0x63, 0x6f, 0x6d, 0x2e, 0x72, 0x61, 0x66, 0x61, 0x79, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x74, - 0x79, 0x70, 0x65, 0x73, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x42, 0x0a, 0x47, 0x72, - 0x6f, 0x75, 0x70, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x54, 0x67, 0x69, 0x74, 0x68, - 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x52, 0x61, 0x66, 0x61, 0x79, 0x53, 0x79, 0x73, 0x74, - 0x65, 0x6d, 0x73, 0x2f, 0x72, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2d, 0x62, 0x61, 0x73, 0x65, 0x2f, - 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x73, 0x2f, 0x75, 0x73, 0x65, 0x72, 0x6d, - 0x67, 0x6d, 0x74, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2f, - 0x75, 0x73, 0x65, 0x72, 0x70, 0x62, 0x2f, 0x76, 0x33, 0x3b, 0x75, 0x73, 0x65, 0x72, 0x76, 0x33, - 0xa2, 0x02, 0x04, 0x52, 0x44, 0x54, 0x55, 0xaa, 0x02, 0x17, 0x52, 0x61, 0x66, 0x61, 0x79, 0x2e, - 0x44, 0x65, 0x76, 0x2e, 0x54, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x2e, 0x56, - 0x33, 0xca, 0x02, 0x17, 0x52, 0x61, 0x66, 0x61, 0x79, 0x5c, 0x44, 0x65, 0x76, 0x5c, 0x54, 0x79, - 0x70, 0x65, 0x73, 0x5c, 0x55, 0x73, 0x65, 0x72, 0x5c, 0x56, 0x33, 0xe2, 0x02, 0x23, 0x52, 0x61, - 0x66, 0x61, 0x79, 0x5c, 0x44, 0x65, 0x76, 0x5c, 0x54, 0x79, 0x70, 0x65, 0x73, 0x5c, 0x55, 0x73, - 0x65, 0x72, 0x5c, 0x56, 0x33, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, - 0x61, 0xea, 0x02, 0x1b, 0x52, 0x61, 0x66, 0x61, 0x79, 0x3a, 0x3a, 0x44, 0x65, 0x76, 0x3a, 0x3a, - 0x54, 0x79, 0x70, 0x65, 0x73, 0x3a, 0x3a, 0x55, 0x73, 0x65, 0x72, 0x3a, 0x3a, 0x56, 0x33, 0x62, - 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x69, 0x6f, 0x6e, 0x73, 0x20, 0x66, 0x6f, 0x72, 0x20, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x52, 0x15, + 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, + 0x72, 0x6f, 0x6c, 0x65, 0x73, 0x12, 0x39, 0x0a, 0x05, 0x75, 0x73, 0x65, 0x72, 0x73, 0x18, 0x02, + 0x20, 0x03, 0x28, 0x09, 0x42, 0x23, 0x92, 0x41, 0x20, 0x2a, 0x05, 0x55, 0x73, 0x65, 0x72, 0x73, + 0x32, 0x17, 0x4c, 0x69, 0x73, 0x74, 0x20, 0x6f, 0x66, 0x20, 0x75, 0x73, 0x65, 0x72, 0x73, 0x20, + 0x66, 0x6f, 0x72, 0x20, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x52, 0x05, 0x75, 0x73, 0x65, 0x72, 0x73, + 0x12, 0x2c, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x42, 0x18, + 0x92, 0x41, 0x15, 0x2a, 0x04, 0x54, 0x79, 0x70, 0x65, 0x32, 0x0d, 0x54, 0x79, 0x70, 0x65, 0x20, + 0x6f, 0x66, 0x20, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x3a, 0x2f, + 0x92, 0x41, 0x2c, 0x0a, 0x2a, 0x2a, 0x13, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x20, 0x53, 0x70, 0x65, + 0x63, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x32, 0x13, 0x47, 0x72, 0x6f, 0x75, + 0x70, 0x20, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, + 0xa5, 0x03, 0x0a, 0x09, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x5a, 0x0a, + 0x0a, 0x61, 0x70, 0x69, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x09, 0x42, 0x3a, 0x92, 0x41, 0x37, 0x2a, 0x0b, 0x41, 0x50, 0x49, 0x20, 0x56, 0x65, 0x72, 0x73, + 0x69, 0x6f, 0x6e, 0x32, 0x26, 0x41, 0x50, 0x49, 0x20, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, + 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, 0x20, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x20, 0x6c, 0x69, + 0x73, 0x74, 0x20, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x40, 0x01, 0x52, 0x0a, 0x61, + 0x70, 0x69, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x40, 0x0a, 0x04, 0x6b, 0x69, 0x6e, + 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x2c, 0x92, 0x41, 0x29, 0x2a, 0x04, 0x4b, 0x69, + 0x6e, 0x64, 0x32, 0x1f, 0x4b, 0x69, 0x6e, 0x64, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, 0x20, + 0x67, 0x72, 0x6f, 0x75, 0x70, 0x20, 0x6c, 0x69, 0x73, 0x74, 0x20, 0x72, 0x65, 0x73, 0x6f, 0x75, + 0x72, 0x63, 0x65, 0x40, 0x01, 0x52, 0x04, 0x6b, 0x69, 0x6e, 0x64, 0x12, 0x79, 0x0a, 0x08, 0x6d, + 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x27, 0x2e, + 0x72, 0x61, 0x66, 0x61, 0x79, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, + 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x33, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x4d, 0x65, + 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x42, 0x34, 0x92, 0x41, 0x31, 0x2a, 0x08, 0x4d, 0x65, 0x74, + 0x61, 0x64, 0x61, 0x74, 0x61, 0x32, 0x23, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x20, + 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, 0x20, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x20, 0x6c, 0x69, 0x73, + 0x74, 0x20, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x40, 0x01, 0x52, 0x08, 0x6d, 0x65, + 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x5f, 0x0a, 0x05, 0x69, 0x74, 0x65, 0x6d, 0x73, 0x18, + 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x72, 0x61, 0x66, 0x61, 0x79, 0x2e, 0x64, 0x65, + 0x76, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x2e, + 0x47, 0x72, 0x6f, 0x75, 0x70, 0x42, 0x29, 0x92, 0x41, 0x26, 0x2a, 0x05, 0x49, 0x74, 0x65, 0x6d, + 0x73, 0x32, 0x1b, 0x4c, 0x69, 0x73, 0x74, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, 0x20, 0x67, + 0x72, 0x6f, 0x75, 0x70, 0x20, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x40, 0x01, + 0x52, 0x05, 0x69, 0x74, 0x65, 0x6d, 0x73, 0x3a, 0x1e, 0x92, 0x41, 0x1b, 0x0a, 0x19, 0x2a, 0x09, + 0x47, 0x72, 0x6f, 0x75, 0x70, 0x4c, 0x69, 0x73, 0x74, 0x32, 0x0a, 0x47, 0x72, 0x6f, 0x75, 0x70, + 0x20, 0x6c, 0x69, 0x73, 0x74, 0x40, 0x01, 0x42, 0x80, 0x02, 0x0a, 0x1b, 0x63, 0x6f, 0x6d, 0x2e, + 0x72, 0x61, 0x66, 0x61, 0x79, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, + 0x75, 0x73, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x42, 0x0a, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x50, 0x72, + 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x54, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, + 0x6d, 0x2f, 0x52, 0x61, 0x66, 0x61, 0x79, 0x53, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x73, 0x2f, 0x72, + 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2d, 0x62, 0x61, 0x73, 0x65, 0x2f, 0x63, 0x6f, 0x6d, 0x70, 0x6f, + 0x6e, 0x65, 0x6e, 0x74, 0x73, 0x2f, 0x75, 0x73, 0x65, 0x72, 0x6d, 0x67, 0x6d, 0x74, 0x2f, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2f, 0x75, 0x73, 0x65, 0x72, 0x70, + 0x62, 0x2f, 0x76, 0x33, 0x3b, 0x75, 0x73, 0x65, 0x72, 0x76, 0x33, 0xa2, 0x02, 0x04, 0x52, 0x44, + 0x54, 0x55, 0xaa, 0x02, 0x17, 0x52, 0x61, 0x66, 0x61, 0x79, 0x2e, 0x44, 0x65, 0x76, 0x2e, 0x54, + 0x79, 0x70, 0x65, 0x73, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x2e, 0x56, 0x33, 0xca, 0x02, 0x17, 0x52, + 0x61, 0x66, 0x61, 0x79, 0x5c, 0x44, 0x65, 0x76, 0x5c, 0x54, 0x79, 0x70, 0x65, 0x73, 0x5c, 0x55, + 0x73, 0x65, 0x72, 0x5c, 0x56, 0x33, 0xe2, 0x02, 0x23, 0x52, 0x61, 0x66, 0x61, 0x79, 0x5c, 0x44, + 0x65, 0x76, 0x5c, 0x54, 0x79, 0x70, 0x65, 0x73, 0x5c, 0x55, 0x73, 0x65, 0x72, 0x5c, 0x56, 0x33, + 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x1b, 0x52, + 0x61, 0x66, 0x61, 0x79, 0x3a, 0x3a, 0x44, 0x65, 0x76, 0x3a, 0x3a, 0x54, 0x79, 0x70, 0x65, 0x73, + 0x3a, 0x3a, 0x55, 0x73, 0x65, 0x72, 0x3a, 0x3a, 0x56, 0x33, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x33, } var ( diff --git a/components/usermgmt/proto/types/userpb/v3/group.proto b/components/usermgmt/proto/types/userpb/v3/group.proto index 052e5f3..5a6c86d 100644 --- a/components/usermgmt/proto/types/userpb/v3/group.proto +++ b/components/usermgmt/proto/types/userpb/v3/group.proto @@ -79,7 +79,7 @@ message GroupSpec { repeated ProjectNamespaceRole projectnamespaceroles = 1 [ (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { title : "ProjectNamespaceRoles" - description : "Project, namespace, role associations for permission" + description : "Project, namespace, role associations for group" } ]; repeated string users = 2 [ (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { diff --git a/components/usermgmt/proto/types/userpb/v3/user.pb.go b/components/usermgmt/proto/types/userpb/v3/user.pb.go index 4674fd6..df648a2 100644 --- a/components/usermgmt/proto/types/userpb/v3/user.pb.go +++ b/components/usermgmt/proto/types/userpb/v3/user.pb.go @@ -137,10 +137,11 @@ type UserSpec struct { // title : "Projects" // description : "Projects of the user" // } ]; - Groups []string `protobuf:"bytes,9,rep,name=groups,proto3" json:"groups,omitempty"` - EmailVerified bool `protobuf:"varint,11,opt,name=emailVerified,proto3" json:"emailVerified,omitempty"` - PhoneVerified bool `protobuf:"varint,12,opt,name=phoneVerified,proto3" json:"phoneVerified,omitempty"` - TotpVerified bool `protobuf:"varint,13,opt,name=totpVerified,proto3" json:"totpVerified,omitempty"` + Groups []string `protobuf:"bytes,6,rep,name=groups,proto3" json:"groups,omitempty"` + Projectnamespaceroles []*ProjectNamespaceRole `protobuf:"bytes,7,rep,name=projectnamespaceroles,proto3" json:"projectnamespaceroles,omitempty"` + EmailVerified bool `protobuf:"varint,8,opt,name=emailVerified,proto3" json:"emailVerified,omitempty"` + PhoneVerified bool `protobuf:"varint,9,opt,name=phoneVerified,proto3" json:"phoneVerified,omitempty"` + TotpVerified bool `protobuf:"varint,10,opt,name=totpVerified,proto3" json:"totpVerified,omitempty"` } func (x *UserSpec) Reset() { @@ -217,6 +218,13 @@ func (x *UserSpec) GetGroups() []string { return nil } +func (x *UserSpec) GetProjectnamespaceroles() []*ProjectNamespaceRole { + if x != nil { + return x.Projectnamespaceroles + } + return nil +} + func (x *UserSpec) GetEmailVerified() bool { if x != nil { return x.EmailVerified @@ -364,7 +372,7 @@ var file_proto_types_userpb_v3_user_proto_rawDesc = []byte{ 0x34, 0x0a, 0x32, 0x2a, 0x04, 0x55, 0x73, 0x65, 0x72, 0x32, 0x04, 0x55, 0x73, 0x65, 0x72, 0xd2, 0x01, 0x0a, 0x61, 0x70, 0x69, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0xd2, 0x01, 0x04, 0x6b, 0x69, 0x6e, 0x64, 0xd2, 0x01, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xd2, 0x01, - 0x04, 0x73, 0x70, 0x65, 0x63, 0x22, 0x8e, 0x06, 0x0a, 0x08, 0x55, 0x73, 0x65, 0x72, 0x53, 0x70, + 0x04, 0x73, 0x70, 0x65, 0x63, 0x22, 0xc0, 0x07, 0x0a, 0x08, 0x55, 0x73, 0x65, 0x72, 0x53, 0x70, 0x65, 0x63, 0x12, 0x44, 0x0a, 0x09, 0x66, 0x69, 0x72, 0x73, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x26, 0x92, 0x41, 0x23, 0x2a, 0x09, 0x46, 0x69, 0x72, 0x73, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x32, 0x16, 0x46, 0x69, 0x72, 0x73, 0x74, 0x20, 0x6e, 0x61, 0x6d, @@ -386,79 +394,90 @@ var file_proto_types_userpb_v3_user_proto_rawDesc = []byte{ 0x50, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x32, 0x14, 0x50, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, 0x20, 0x75, 0x73, 0x65, 0x72, 0x52, 0x08, 0x70, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x12, 0x3e, 0x0a, 0x06, 0x67, 0x72, 0x6f, 0x75, - 0x70, 0x73, 0x18, 0x09, 0x20, 0x03, 0x28, 0x09, 0x42, 0x26, 0x92, 0x41, 0x23, 0x2a, 0x05, 0x47, + 0x70, 0x73, 0x18, 0x06, 0x20, 0x03, 0x28, 0x09, 0x42, 0x26, 0x92, 0x41, 0x23, 0x2a, 0x05, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x32, 0x1a, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x73, 0x20, 0x74, 0x68, 0x65, 0x20, 0x75, 0x73, 0x65, 0x72, 0x20, 0x62, 0x65, 0x6c, 0x6f, 0x6e, 0x67, 0x73, 0x20, 0x74, 0x6f, - 0x52, 0x06, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x73, 0x12, 0x6e, 0x0a, 0x0d, 0x65, 0x6d, 0x61, 0x69, - 0x6c, 0x56, 0x65, 0x72, 0x69, 0x66, 0x69, 0x65, 0x64, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x08, 0x42, - 0x48, 0x92, 0x41, 0x45, 0x2a, 0x0d, 0x45, 0x6d, 0x61, 0x69, 0x6c, 0x56, 0x65, 0x72, 0x69, 0x66, - 0x69, 0x65, 0x64, 0x32, 0x32, 0x46, 0x6c, 0x61, 0x67, 0x20, 0x74, 0x6f, 0x20, 0x73, 0x68, 0x6f, - 0x77, 0x20, 0x69, 0x66, 0x20, 0x74, 0x68, 0x65, 0x20, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x20, 0x6f, - 0x66, 0x20, 0x74, 0x68, 0x65, 0x20, 0x75, 0x73, 0x65, 0x72, 0x20, 0x77, 0x61, 0x73, 0x20, 0x76, - 0x65, 0x72, 0x69, 0x66, 0x69, 0x65, 0x64, 0x40, 0x01, 0x52, 0x0d, 0x65, 0x6d, 0x61, 0x69, 0x6c, - 0x56, 0x65, 0x72, 0x69, 0x66, 0x69, 0x65, 0x64, 0x12, 0x71, 0x0a, 0x0d, 0x70, 0x68, 0x6f, 0x6e, - 0x65, 0x56, 0x65, 0x72, 0x69, 0x66, 0x69, 0x65, 0x64, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x08, 0x42, - 0x4b, 0x92, 0x41, 0x48, 0x2a, 0x0d, 0x50, 0x68, 0x6f, 0x6e, 0x65, 0x56, 0x65, 0x72, 0x69, 0x66, - 0x69, 0x65, 0x64, 0x32, 0x35, 0x46, 0x6c, 0x61, 0x67, 0x20, 0x74, 0x6f, 0x20, 0x73, 0x68, 0x6f, - 0x77, 0x20, 0x69, 0x66, 0x20, 0x70, 0x68, 0x6f, 0x6e, 0x65, 0x20, 0x6e, 0x75, 0x6d, 0x62, 0x65, - 0x72, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, 0x20, 0x75, 0x73, 0x65, 0x72, 0x20, 0x77, 0x61, - 0x73, 0x20, 0x76, 0x65, 0x72, 0x69, 0x66, 0x69, 0x65, 0x64, 0x40, 0x01, 0x52, 0x0d, 0x70, 0x68, - 0x6f, 0x6e, 0x65, 0x56, 0x65, 0x72, 0x69, 0x66, 0x69, 0x65, 0x64, 0x12, 0x6a, 0x0a, 0x0c, 0x74, - 0x6f, 0x74, 0x70, 0x56, 0x65, 0x72, 0x69, 0x66, 0x69, 0x65, 0x64, 0x18, 0x0d, 0x20, 0x01, 0x28, - 0x08, 0x42, 0x46, 0x92, 0x41, 0x43, 0x2a, 0x0c, 0x54, 0x6f, 0x74, 0x70, 0x56, 0x65, 0x72, 0x69, - 0x66, 0x69, 0x65, 0x64, 0x32, 0x31, 0x46, 0x6c, 0x61, 0x67, 0x20, 0x74, 0x6f, 0x20, 0x73, 0x68, - 0x6f, 0x77, 0x20, 0x69, 0x66, 0x20, 0x74, 0x68, 0x65, 0x20, 0x54, 0x4f, 0x54, 0x50, 0x20, 0x6f, - 0x66, 0x20, 0x74, 0x68, 0x65, 0x20, 0x75, 0x73, 0x65, 0x72, 0x20, 0x77, 0x61, 0x73, 0x20, 0x76, - 0x65, 0x72, 0x69, 0x66, 0x69, 0x65, 0x64, 0x40, 0x01, 0x52, 0x0c, 0x74, 0x6f, 0x74, 0x70, 0x56, - 0x65, 0x72, 0x69, 0x66, 0x69, 0x65, 0x64, 0x3a, 0x2d, 0x92, 0x41, 0x2a, 0x0a, 0x28, 0x2a, 0x12, - 0x55, 0x73, 0x65, 0x72, 0x20, 0x53, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x32, 0x12, 0x55, 0x73, 0x65, 0x72, 0x20, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, - 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0xbf, 0x03, 0x0a, 0x08, 0x55, 0x73, 0x65, 0x72, 0x4c, - 0x69, 0x73, 0x74, 0x12, 0x71, 0x0a, 0x0a, 0x61, 0x70, 0x69, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, - 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x51, 0x92, 0x41, 0x4e, 0x2a, 0x0b, 0x41, 0x50, - 0x49, 0x20, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x32, 0x25, 0x41, 0x50, 0x49, 0x20, 0x56, - 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, 0x20, 0x75, 0x73, - 0x65, 0x72, 0x20, 0x6c, 0x69, 0x73, 0x74, 0x20, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, - 0x3a, 0x16, 0x75, 0x73, 0x65, 0x72, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x6b, 0x38, 0x73, 0x6d, 0x67, - 0x6d, 0x74, 0x2e, 0x69, 0x6f, 0x2f, 0x76, 0x33, 0x40, 0x01, 0x52, 0x0a, 0x61, 0x70, 0x69, 0x56, - 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x49, 0x0a, 0x04, 0x6b, 0x69, 0x6e, 0x64, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x09, 0x42, 0x35, 0x92, 0x41, 0x32, 0x2a, 0x04, 0x4b, 0x69, 0x6e, 0x64, 0x32, - 0x1e, 0x4b, 0x69, 0x6e, 0x64, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, 0x20, 0x75, 0x73, 0x65, - 0x72, 0x20, 0x6c, 0x69, 0x73, 0x74, 0x20, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x3a, - 0x08, 0x55, 0x73, 0x65, 0x72, 0x4c, 0x69, 0x73, 0x74, 0x40, 0x01, 0x52, 0x04, 0x6b, 0x69, 0x6e, - 0x64, 0x12, 0x78, 0x0a, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, 0x03, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x72, 0x61, 0x66, 0x61, 0x79, 0x2e, 0x64, 0x65, 0x76, 0x2e, - 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x33, 0x2e, - 0x4c, 0x69, 0x73, 0x74, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x42, 0x33, 0x92, 0x41, - 0x30, 0x2a, 0x08, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x32, 0x22, 0x4d, 0x65, 0x74, - 0x61, 0x64, 0x61, 0x74, 0x61, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, 0x20, 0x75, 0x73, 0x65, - 0x72, 0x20, 0x6c, 0x69, 0x73, 0x74, 0x20, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x40, - 0x01, 0x52, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x5d, 0x0a, 0x05, 0x69, - 0x74, 0x65, 0x6d, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x72, 0x61, 0x66, - 0x61, 0x79, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x75, 0x73, 0x65, - 0x72, 0x2e, 0x76, 0x33, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x42, 0x28, 0x92, 0x41, 0x25, 0x2a, 0x05, - 0x49, 0x74, 0x65, 0x6d, 0x73, 0x32, 0x1a, 0x4c, 0x69, 0x73, 0x74, 0x20, 0x6f, 0x66, 0x20, 0x74, - 0x68, 0x65, 0x20, 0x75, 0x73, 0x65, 0x72, 0x20, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, - 0x73, 0x40, 0x01, 0x52, 0x05, 0x69, 0x74, 0x65, 0x6d, 0x73, 0x3a, 0x1c, 0x92, 0x41, 0x19, 0x0a, - 0x17, 0x2a, 0x08, 0x55, 0x73, 0x65, 0x72, 0x4c, 0x69, 0x73, 0x74, 0x32, 0x09, 0x55, 0x73, 0x65, - 0x72, 0x20, 0x6c, 0x69, 0x73, 0x74, 0x40, 0x01, 0x42, 0xff, 0x01, 0x0a, 0x1b, 0x63, 0x6f, 0x6d, - 0x2e, 0x72, 0x61, 0x66, 0x61, 0x79, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, - 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x42, 0x09, 0x55, 0x73, 0x65, 0x72, 0x50, 0x72, - 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x54, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, - 0x6d, 0x2f, 0x52, 0x61, 0x66, 0x61, 0x79, 0x53, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x73, 0x2f, 0x72, - 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2d, 0x62, 0x61, 0x73, 0x65, 0x2f, 0x63, 0x6f, 0x6d, 0x70, 0x6f, - 0x6e, 0x65, 0x6e, 0x74, 0x73, 0x2f, 0x75, 0x73, 0x65, 0x72, 0x6d, 0x67, 0x6d, 0x74, 0x2f, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2f, 0x75, 0x73, 0x65, 0x72, 0x70, - 0x62, 0x2f, 0x76, 0x33, 0x3b, 0x75, 0x73, 0x65, 0x72, 0x76, 0x33, 0xa2, 0x02, 0x04, 0x52, 0x44, - 0x54, 0x55, 0xaa, 0x02, 0x17, 0x52, 0x61, 0x66, 0x61, 0x79, 0x2e, 0x44, 0x65, 0x76, 0x2e, 0x54, - 0x79, 0x70, 0x65, 0x73, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x2e, 0x56, 0x33, 0xca, 0x02, 0x17, 0x52, - 0x61, 0x66, 0x61, 0x79, 0x5c, 0x44, 0x65, 0x76, 0x5c, 0x54, 0x79, 0x70, 0x65, 0x73, 0x5c, 0x55, - 0x73, 0x65, 0x72, 0x5c, 0x56, 0x33, 0xe2, 0x02, 0x23, 0x52, 0x61, 0x66, 0x61, 0x79, 0x5c, 0x44, - 0x65, 0x76, 0x5c, 0x54, 0x79, 0x70, 0x65, 0x73, 0x5c, 0x55, 0x73, 0x65, 0x72, 0x5c, 0x56, 0x33, - 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x1b, 0x52, - 0x61, 0x66, 0x61, 0x79, 0x3a, 0x3a, 0x44, 0x65, 0x76, 0x3a, 0x3a, 0x54, 0x79, 0x70, 0x65, 0x73, - 0x3a, 0x3a, 0x55, 0x73, 0x65, 0x72, 0x3a, 0x3a, 0x56, 0x33, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x33, + 0x52, 0x06, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x73, 0x12, 0xaf, 0x01, 0x0a, 0x15, 0x70, 0x72, 0x6f, + 0x6a, 0x65, 0x63, 0x74, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x72, 0x6f, 0x6c, + 0x65, 0x73, 0x18, 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2d, 0x2e, 0x72, 0x61, 0x66, 0x61, 0x79, + 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, + 0x76, 0x33, 0x2e, 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x70, + 0x61, 0x63, 0x65, 0x52, 0x6f, 0x6c, 0x65, 0x42, 0x4a, 0x92, 0x41, 0x47, 0x2a, 0x15, 0x50, 0x72, + 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x52, 0x6f, + 0x6c, 0x65, 0x73, 0x32, 0x2e, 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x2c, 0x20, 0x6e, 0x61, + 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x2c, 0x20, 0x72, 0x6f, 0x6c, 0x65, 0x20, 0x61, 0x73, + 0x73, 0x6f, 0x63, 0x69, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x20, 0x66, 0x6f, 0x72, 0x20, 0x75, + 0x73, 0x65, 0x72, 0x52, 0x15, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x6e, 0x61, 0x6d, 0x65, + 0x73, 0x70, 0x61, 0x63, 0x65, 0x72, 0x6f, 0x6c, 0x65, 0x73, 0x12, 0x6e, 0x0a, 0x0d, 0x65, 0x6d, + 0x61, 0x69, 0x6c, 0x56, 0x65, 0x72, 0x69, 0x66, 0x69, 0x65, 0x64, 0x18, 0x08, 0x20, 0x01, 0x28, + 0x08, 0x42, 0x48, 0x92, 0x41, 0x45, 0x2a, 0x0d, 0x45, 0x6d, 0x61, 0x69, 0x6c, 0x56, 0x65, 0x72, + 0x69, 0x66, 0x69, 0x65, 0x64, 0x32, 0x32, 0x46, 0x6c, 0x61, 0x67, 0x20, 0x74, 0x6f, 0x20, 0x73, + 0x68, 0x6f, 0x77, 0x20, 0x69, 0x66, 0x20, 0x74, 0x68, 0x65, 0x20, 0x65, 0x6d, 0x61, 0x69, 0x6c, + 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, 0x20, 0x75, 0x73, 0x65, 0x72, 0x20, 0x77, 0x61, 0x73, + 0x20, 0x76, 0x65, 0x72, 0x69, 0x66, 0x69, 0x65, 0x64, 0x40, 0x01, 0x52, 0x0d, 0x65, 0x6d, 0x61, + 0x69, 0x6c, 0x56, 0x65, 0x72, 0x69, 0x66, 0x69, 0x65, 0x64, 0x12, 0x71, 0x0a, 0x0d, 0x70, 0x68, + 0x6f, 0x6e, 0x65, 0x56, 0x65, 0x72, 0x69, 0x66, 0x69, 0x65, 0x64, 0x18, 0x09, 0x20, 0x01, 0x28, + 0x08, 0x42, 0x4b, 0x92, 0x41, 0x48, 0x2a, 0x0d, 0x50, 0x68, 0x6f, 0x6e, 0x65, 0x56, 0x65, 0x72, + 0x69, 0x66, 0x69, 0x65, 0x64, 0x32, 0x35, 0x46, 0x6c, 0x61, 0x67, 0x20, 0x74, 0x6f, 0x20, 0x73, + 0x68, 0x6f, 0x77, 0x20, 0x69, 0x66, 0x20, 0x70, 0x68, 0x6f, 0x6e, 0x65, 0x20, 0x6e, 0x75, 0x6d, + 0x62, 0x65, 0x72, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, 0x20, 0x75, 0x73, 0x65, 0x72, 0x20, + 0x77, 0x61, 0x73, 0x20, 0x76, 0x65, 0x72, 0x69, 0x66, 0x69, 0x65, 0x64, 0x40, 0x01, 0x52, 0x0d, + 0x70, 0x68, 0x6f, 0x6e, 0x65, 0x56, 0x65, 0x72, 0x69, 0x66, 0x69, 0x65, 0x64, 0x12, 0x6a, 0x0a, + 0x0c, 0x74, 0x6f, 0x74, 0x70, 0x56, 0x65, 0x72, 0x69, 0x66, 0x69, 0x65, 0x64, 0x18, 0x0a, 0x20, + 0x01, 0x28, 0x08, 0x42, 0x46, 0x92, 0x41, 0x43, 0x2a, 0x0c, 0x54, 0x6f, 0x74, 0x70, 0x56, 0x65, + 0x72, 0x69, 0x66, 0x69, 0x65, 0x64, 0x32, 0x31, 0x46, 0x6c, 0x61, 0x67, 0x20, 0x74, 0x6f, 0x20, + 0x73, 0x68, 0x6f, 0x77, 0x20, 0x69, 0x66, 0x20, 0x74, 0x68, 0x65, 0x20, 0x54, 0x4f, 0x54, 0x50, + 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, 0x20, 0x75, 0x73, 0x65, 0x72, 0x20, 0x77, 0x61, 0x73, + 0x20, 0x76, 0x65, 0x72, 0x69, 0x66, 0x69, 0x65, 0x64, 0x40, 0x01, 0x52, 0x0c, 0x74, 0x6f, 0x74, + 0x70, 0x56, 0x65, 0x72, 0x69, 0x66, 0x69, 0x65, 0x64, 0x3a, 0x2d, 0x92, 0x41, 0x2a, 0x0a, 0x28, + 0x2a, 0x12, 0x55, 0x73, 0x65, 0x72, 0x20, 0x53, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x63, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x32, 0x12, 0x55, 0x73, 0x65, 0x72, 0x20, 0x73, 0x70, 0x65, 0x63, 0x69, + 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0xbf, 0x03, 0x0a, 0x08, 0x55, 0x73, 0x65, + 0x72, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x71, 0x0a, 0x0a, 0x61, 0x70, 0x69, 0x56, 0x65, 0x72, 0x73, + 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x51, 0x92, 0x41, 0x4e, 0x2a, 0x0b, + 0x41, 0x50, 0x49, 0x20, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x32, 0x25, 0x41, 0x50, 0x49, + 0x20, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, 0x20, + 0x75, 0x73, 0x65, 0x72, 0x20, 0x6c, 0x69, 0x73, 0x74, 0x20, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, + 0x63, 0x65, 0x3a, 0x16, 0x75, 0x73, 0x65, 0x72, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x6b, 0x38, 0x73, + 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x69, 0x6f, 0x2f, 0x76, 0x33, 0x40, 0x01, 0x52, 0x0a, 0x61, 0x70, + 0x69, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x49, 0x0a, 0x04, 0x6b, 0x69, 0x6e, 0x64, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x35, 0x92, 0x41, 0x32, 0x2a, 0x04, 0x4b, 0x69, 0x6e, + 0x64, 0x32, 0x1e, 0x4b, 0x69, 0x6e, 0x64, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, 0x20, 0x75, + 0x73, 0x65, 0x72, 0x20, 0x6c, 0x69, 0x73, 0x74, 0x20, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, + 0x65, 0x3a, 0x08, 0x55, 0x73, 0x65, 0x72, 0x4c, 0x69, 0x73, 0x74, 0x40, 0x01, 0x52, 0x04, 0x6b, + 0x69, 0x6e, 0x64, 0x12, 0x78, 0x0a, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, + 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x72, 0x61, 0x66, 0x61, 0x79, 0x2e, 0x64, 0x65, + 0x76, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, + 0x33, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x42, 0x33, + 0x92, 0x41, 0x30, 0x2a, 0x08, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x32, 0x22, 0x4d, + 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, 0x20, 0x75, + 0x73, 0x65, 0x72, 0x20, 0x6c, 0x69, 0x73, 0x74, 0x20, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, + 0x65, 0x40, 0x01, 0x52, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x5d, 0x0a, + 0x05, 0x69, 0x74, 0x65, 0x6d, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x72, + 0x61, 0x66, 0x61, 0x79, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x75, + 0x73, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x42, 0x28, 0x92, 0x41, 0x25, + 0x2a, 0x05, 0x49, 0x74, 0x65, 0x6d, 0x73, 0x32, 0x1a, 0x4c, 0x69, 0x73, 0x74, 0x20, 0x6f, 0x66, + 0x20, 0x74, 0x68, 0x65, 0x20, 0x75, 0x73, 0x65, 0x72, 0x20, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, + 0x63, 0x65, 0x73, 0x40, 0x01, 0x52, 0x05, 0x69, 0x74, 0x65, 0x6d, 0x73, 0x3a, 0x1c, 0x92, 0x41, + 0x19, 0x0a, 0x17, 0x2a, 0x08, 0x55, 0x73, 0x65, 0x72, 0x4c, 0x69, 0x73, 0x74, 0x32, 0x09, 0x55, + 0x73, 0x65, 0x72, 0x20, 0x6c, 0x69, 0x73, 0x74, 0x40, 0x01, 0x42, 0xff, 0x01, 0x0a, 0x1b, 0x63, + 0x6f, 0x6d, 0x2e, 0x72, 0x61, 0x66, 0x61, 0x79, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x74, 0x79, 0x70, + 0x65, 0x73, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x42, 0x09, 0x55, 0x73, 0x65, 0x72, + 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x54, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, + 0x63, 0x6f, 0x6d, 0x2f, 0x52, 0x61, 0x66, 0x61, 0x79, 0x53, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x73, + 0x2f, 0x72, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2d, 0x62, 0x61, 0x73, 0x65, 0x2f, 0x63, 0x6f, 0x6d, + 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x73, 0x2f, 0x75, 0x73, 0x65, 0x72, 0x6d, 0x67, 0x6d, 0x74, + 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2f, 0x75, 0x73, 0x65, + 0x72, 0x70, 0x62, 0x2f, 0x76, 0x33, 0x3b, 0x75, 0x73, 0x65, 0x72, 0x76, 0x33, 0xa2, 0x02, 0x04, + 0x52, 0x44, 0x54, 0x55, 0xaa, 0x02, 0x17, 0x52, 0x61, 0x66, 0x61, 0x79, 0x2e, 0x44, 0x65, 0x76, + 0x2e, 0x54, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x2e, 0x56, 0x33, 0xca, 0x02, + 0x17, 0x52, 0x61, 0x66, 0x61, 0x79, 0x5c, 0x44, 0x65, 0x76, 0x5c, 0x54, 0x79, 0x70, 0x65, 0x73, + 0x5c, 0x55, 0x73, 0x65, 0x72, 0x5c, 0x56, 0x33, 0xe2, 0x02, 0x23, 0x52, 0x61, 0x66, 0x61, 0x79, + 0x5c, 0x44, 0x65, 0x76, 0x5c, 0x54, 0x79, 0x70, 0x65, 0x73, 0x5c, 0x55, 0x73, 0x65, 0x72, 0x5c, + 0x56, 0x33, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, + 0x1b, 0x52, 0x61, 0x66, 0x61, 0x79, 0x3a, 0x3a, 0x44, 0x65, 0x76, 0x3a, 0x3a, 0x54, 0x79, 0x70, + 0x65, 0x73, 0x3a, 0x3a, 0x55, 0x73, 0x65, 0x72, 0x3a, 0x3a, 0x56, 0x33, 0x62, 0x06, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -475,24 +494,26 @@ func file_proto_types_userpb_v3_user_proto_rawDescGZIP() []byte { var file_proto_types_userpb_v3_user_proto_msgTypes = make([]protoimpl.MessageInfo, 3) var file_proto_types_userpb_v3_user_proto_goTypes = []interface{}{ - (*User)(nil), // 0: rafay.dev.types.user.v3.User - (*UserSpec)(nil), // 1: rafay.dev.types.user.v3.UserSpec - (*UserList)(nil), // 2: rafay.dev.types.user.v3.UserList - (*v3.Metadata)(nil), // 3: rafay.dev.types.common.v3.Metadata - (*v3.Status)(nil), // 4: rafay.dev.types.common.v3.Status - (*v3.ListMetadata)(nil), // 5: rafay.dev.types.common.v3.ListMetadata + (*User)(nil), // 0: rafay.dev.types.user.v3.User + (*UserSpec)(nil), // 1: rafay.dev.types.user.v3.UserSpec + (*UserList)(nil), // 2: rafay.dev.types.user.v3.UserList + (*v3.Metadata)(nil), // 3: rafay.dev.types.common.v3.Metadata + (*v3.Status)(nil), // 4: rafay.dev.types.common.v3.Status + (*ProjectNamespaceRole)(nil), // 5: rafay.dev.types.user.v3.ProjectNamespaceRole + (*v3.ListMetadata)(nil), // 6: rafay.dev.types.common.v3.ListMetadata } var file_proto_types_userpb_v3_user_proto_depIdxs = []int32{ 3, // 0: rafay.dev.types.user.v3.User.metadata:type_name -> rafay.dev.types.common.v3.Metadata 1, // 1: rafay.dev.types.user.v3.User.spec:type_name -> rafay.dev.types.user.v3.UserSpec 4, // 2: rafay.dev.types.user.v3.User.status:type_name -> rafay.dev.types.common.v3.Status - 5, // 3: rafay.dev.types.user.v3.UserList.metadata:type_name -> rafay.dev.types.common.v3.ListMetadata - 0, // 4: rafay.dev.types.user.v3.UserList.items:type_name -> rafay.dev.types.user.v3.User - 5, // [5:5] is the sub-list for method output_type - 5, // [5:5] is the sub-list for method input_type - 5, // [5:5] is the sub-list for extension type_name - 5, // [5:5] is the sub-list for extension extendee - 0, // [0:5] is the sub-list for field type_name + 5, // 3: rafay.dev.types.user.v3.UserSpec.projectnamespaceroles:type_name -> rafay.dev.types.user.v3.ProjectNamespaceRole + 6, // 4: rafay.dev.types.user.v3.UserList.metadata:type_name -> rafay.dev.types.common.v3.ListMetadata + 0, // 5: rafay.dev.types.user.v3.UserList.items:type_name -> rafay.dev.types.user.v3.User + 6, // [6:6] is the sub-list for method output_type + 6, // [6:6] is the sub-list for method input_type + 6, // [6:6] is the sub-list for extension type_name + 6, // [6:6] is the sub-list for extension extendee + 0, // [0:6] is the sub-list for field type_name } func init() { file_proto_types_userpb_v3_user_proto_init() } diff --git a/components/usermgmt/proto/types/userpb/v3/user.proto b/components/usermgmt/proto/types/userpb/v3/user.proto index 0ecdb39..6cd9650 100644 --- a/components/usermgmt/proto/types/userpb/v3/user.proto +++ b/components/usermgmt/proto/types/userpb/v3/user.proto @@ -106,24 +106,29 @@ message UserSpec { // title : "Projects" // description : "Projects of the user" // } ]; - repeated string groups = 9 + repeated string groups = 6 [ (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { title : "Group" description : "Groups the user belongs to" } ]; - bool emailVerified = 11 + repeated rafay.dev.types.user.v3.ProjectNamespaceRole projectnamespaceroles = 7 + [ (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { + title : "ProjectNamespaceRoles" + description : "Project, namespace, role associations for user" + } ]; + bool emailVerified = 8 [ (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { title : "EmailVerified" description : "Flag to show if the email of the user was verified" read_only : true } ]; - bool phoneVerified = 12 + bool phoneVerified = 9 [ (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { title : "PhoneVerified" description : "Flag to show if phone number of the user was verified" read_only : true } ]; - bool totpVerified = 13 + bool totpVerified = 10 [ (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { title : "TotpVerified" description : "Flag to show if the TOTP of the user was verified" From 82cec87a0acb3d3a05657abe648ec940b80646d1 Mon Sep 17 00:00:00 2001 From: Abin Simon Date: Mon, 10 Jan 2022 13:32:25 +0530 Subject: [PATCH 19/28] Post rebase fixes --- components/adminsrv/go.mod | 13 +- components/adminsrv/go.sum | 825 ++++++++++++++++++++++++++++++++++++- 2 files changed, 825 insertions(+), 13 deletions(-) diff --git a/components/adminsrv/go.mod b/components/adminsrv/go.mod index 389e368..1809fe0 100644 --- a/components/adminsrv/go.mod +++ b/components/adminsrv/go.mod @@ -5,23 +5,16 @@ go 1.17 require ( github.com/RafaySystems/rcloud-base/components/common v0.0.0-unpublished github.com/gogo/protobuf v1.3.2 - github.com/grpc-ecosystem/grpc-gateway v1.16.0 + github.com/google/uuid v1.3.0 github.com/grpc-ecosystem/grpc-gateway/v2 v2.7.2 - github.com/jinzhu/inflection v1.0.0 // indirect github.com/spf13/viper v1.10.1 - github.com/tmthrgd/go-hex v0.0.0-20190904060850-447a3041c3bc // indirect - github.com/uptrace/bun v1.0.20 + github.com/uptrace/bun v1.0.21 github.com/uptrace/bun/dialect/pgdialect v1.0.20 github.com/uptrace/bun/driver/pgdriver v1.0.20 github.com/uptrace/bun/extra/bundebug v1.0.20 - github.com/vmihailenco/msgpack/v5 v5.3.5 // indirect - github.com/vmihailenco/tagparser/v2 v2.0.0 // indirect - golang.org/x/crypto v0.0.0-20211215153901-e495a2d5b3d3 // indirect - golang.org/x/sys v0.0.0-20211216021012-1d35b9e2eb4e // indirect google.golang.org/genproto v0.0.0-20211208223120-3a66f561d7aa google.golang.org/grpc v1.43.0 google.golang.org/protobuf v1.27.1 - mellium.im/sasl v0.2.1 // indirect sigs.k8s.io/controller-runtime v0.11.0 ) @@ -65,4 +58,4 @@ require ( gopkg.in/yaml.v2 v2.4.0 // indirect mellium.im/sasl v0.2.1 // indirect sigs.k8s.io/yaml v1.3.0 // indirect -) \ No newline at end of file +) diff --git a/components/adminsrv/go.sum b/components/adminsrv/go.sum index aa89fdf..4f96505 100644 --- a/components/adminsrv/go.sum +++ b/components/adminsrv/go.sum @@ -1,44 +1,214 @@ cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= cloud.google.com/go v0.34.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= +cloud.google.com/go v0.38.0/go.mod h1:990N+gfupTy94rShfmMCWGDn0LpTmnzTp2qbd1dvSRU= +cloud.google.com/go v0.44.1/go.mod h1:iSa0KzasP4Uvy3f1mN/7PiObzGgflwredwwASm/v6AU= +cloud.google.com/go v0.44.2/go.mod h1:60680Gw3Yr4ikxnPRS/oxxkBccT6SA1yMk63TGekxKY= +cloud.google.com/go v0.45.1/go.mod h1:RpBamKRgapWJb87xiFSdk4g1CME7QZg3uwTez+TSTjc= +cloud.google.com/go v0.46.3/go.mod h1:a6bKKbmY7er1mI7TEI4lsAkts/mkhTSZK8w33B4RAg0= +cloud.google.com/go v0.50.0/go.mod h1:r9sluTvynVuxRIOHXQEHMFffphuXHOMZMycpNR5e6To= +cloud.google.com/go v0.52.0/go.mod h1:pXajvRH/6o3+F9jDHZWQ5PbGhn+o8w9qiu/CffaVdO4= +cloud.google.com/go v0.53.0/go.mod h1:fp/UouUEsRkN6ryDKNW/Upv/JBKnv6WDthjR6+vze6M= +cloud.google.com/go v0.54.0/go.mod h1:1rq2OEkV3YMf6n/9ZvGWI3GWw0VoqH/1x2nd8Is/bPc= +cloud.google.com/go v0.56.0/go.mod h1:jr7tqZxxKOVYizybht9+26Z/gUq7tiRzu+ACVAMbKVk= +cloud.google.com/go v0.57.0/go.mod h1:oXiQ6Rzq3RAkkY7N6t3TcE6jE+CIBBbA36lwQ1JyzZs= +cloud.google.com/go v0.62.0/go.mod h1:jmCYTdRCQuc1PHIIJ/maLInMho30T/Y0M4hTdTShOYc= +cloud.google.com/go v0.65.0/go.mod h1:O5N8zS7uWy9vkA9vayVHs65eM1ubvY4h553ofrNHObY= +cloud.google.com/go v0.72.0/go.mod h1:M+5Vjvlc2wnp6tjzE102Dw08nGShTscUx2nZMufOKPI= +cloud.google.com/go v0.74.0/go.mod h1:VV1xSbzvo+9QJOxLDaJfTjx5e+MePCpCWwvftOeQmWk= +cloud.google.com/go v0.78.0/go.mod h1:QjdrLG0uq+YwhjoVOLsS1t7TW8fs36kLs4XO5R5ECHg= +cloud.google.com/go v0.79.0/go.mod h1:3bzgcEeQlzbuEAYu4mrWhKqWjmpprinYgKJLgKHnbb8= +cloud.google.com/go v0.81.0/go.mod h1:mk/AM35KwGk/Nm2YSeZbxXdrNK3KZOYHmLkOqC2V6E0= +cloud.google.com/go v0.83.0/go.mod h1:Z7MJUsANfY0pYPdw0lbnivPx4/vhy/e2FEkSkF7vAVY= +cloud.google.com/go v0.84.0/go.mod h1:RazrYuxIK6Kb7YrzzhPoLmCVzl7Sup4NrbKPg8KHSUM= +cloud.google.com/go v0.87.0/go.mod h1:TpDYlFy7vuLzZMMZ+B6iRiELaY7z/gJPaqbMx6mlWcY= +cloud.google.com/go v0.90.0/go.mod h1:kRX0mNRHe0e2rC6oNakvwQqzyDmg57xJ+SZU1eT2aDQ= +cloud.google.com/go v0.93.3/go.mod h1:8utlLll2EF5XMAV15woO4lSbWQlk8rer9aLOfLh7+YI= +cloud.google.com/go v0.94.1/go.mod h1:qAlAugsXlC+JWO+Bke5vCtc9ONxjQT3drlTTnAplMW4= +cloud.google.com/go v0.97.0/go.mod h1:GF7l59pYBVlXQIBLx3a761cZ41F9bBH3JUlihCt2Udc= +cloud.google.com/go v0.99.0/go.mod h1:w0Xx2nLzqWJPuozYQX+hFfCSI8WioryfRDzkoI/Y2ZA= +cloud.google.com/go/bigquery v1.0.1/go.mod h1:i/xbL2UlR5RvWAURpBYZTtm/cXjCha9lbfbpx4poX+o= +cloud.google.com/go/bigquery v1.3.0/go.mod h1:PjpwJnslEMmckchkHFfq+HTD2DmtT67aNFKH1/VBDHE= +cloud.google.com/go/bigquery v1.4.0/go.mod h1:S8dzgnTigyfTmLBfrtrhyYhwRxG72rYxvftPBK2Dvzc= +cloud.google.com/go/bigquery v1.5.0/go.mod h1:snEHRnqQbz117VIFhE8bmtwIDY80NLUZUMb4Nv6dBIg= +cloud.google.com/go/bigquery v1.7.0/go.mod h1://okPTzCYNXSlb24MZs83e2Do+h+VXtc4gLoIoXIAPc= +cloud.google.com/go/bigquery v1.8.0/go.mod h1:J5hqkt3O0uAFnINi6JXValWIb1v0goeZM77hZzJN/fQ= +cloud.google.com/go/datastore v1.0.0/go.mod h1:LXYbyblFSglQ5pkeyhO+Qmw7ukd3C+pD7TKLgZqpHYE= +cloud.google.com/go/datastore v1.1.0/go.mod h1:umbIZjpQpHh4hmRpGhH4tLFup+FVzqBi1b3c64qFpCk= +cloud.google.com/go/firestore v1.1.0/go.mod h1:ulACoGHTpvq5r8rxGJ4ddJZBZqakUQqClKRT5SZwBmk= +cloud.google.com/go/firestore v1.6.1/go.mod h1:asNXNOzBdyVQmEU+ggO8UPodTkEVFW5Qx+rwHnAz+EY= +cloud.google.com/go/pubsub v1.0.1/go.mod h1:R0Gpsv3s54REJCy4fxDixWD93lHJMoZTyQ2kNxGRt3I= +cloud.google.com/go/pubsub v1.1.0/go.mod h1:EwwdRX2sKPjnvnqCa270oGRyludottCI76h+R3AArQw= +cloud.google.com/go/pubsub v1.2.0/go.mod h1:jhfEVHT8odbXTkndysNHCcx0awwzvfOlguIAii9o8iA= +cloud.google.com/go/pubsub v1.3.1/go.mod h1:i+ucay31+CNRpDW4Lu78I4xXG+O1r/MAHgjpRVR+TSU= +cloud.google.com/go/storage v1.0.0/go.mod h1:IhtSnM/ZTZV8YYJWCY8RULGVqBDmpoyjwiyrjsg+URw= +cloud.google.com/go/storage v1.5.0/go.mod h1:tpKbwo567HUNpVclU5sGELwQWBDZ8gh0ZeosJ0Rtdos= +cloud.google.com/go/storage v1.6.0/go.mod h1:N7U0C8pVQ/+NIKOBQyamJIeKQKkZ+mxpohlUTyfDhBk= +cloud.google.com/go/storage v1.8.0/go.mod h1:Wv1Oy7z6Yz3DshWRJFhqM/UCfaWIRTdp0RXyy7KQOVs= +cloud.google.com/go/storage v1.10.0/go.mod h1:FLPqc6j+Ki4BU591ie1oL6qBQGu2Bl/tZ9ullr3+Kg0= +dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU= +github.com/Azure/go-ansiterm v0.0.0-20210608223527-2377c96fe795/go.mod h1:LmzpDX56iTiv29bbRTIsUNlaFfuhWRQBWjQdVyAevI8= +github.com/Azure/go-ansiterm v0.0.0-20210617225240-d185dfc1b5a1/go.mod h1:xomTg63KZ2rFqZQzSB4Vz2SUXa1BpHTVz9L5PTmPC4E= +github.com/Azure/go-autorest v14.2.0+incompatible/go.mod h1:r+4oMnoxhatjLLJ6zxSWATqVooLgysK6ZNox3g/xq24= +github.com/Azure/go-autorest/autorest v0.11.18/go.mod h1:dSiJPy22c3u0OtOKDNttNgqpNFY/GeWa7GH/Pz56QRA= +github.com/Azure/go-autorest/autorest/adal v0.9.13/go.mod h1:W/MM4U6nLxnIskrw4UwWzlHfGjwUS50aOsc/I3yuU8M= +github.com/Azure/go-autorest/autorest/date v0.3.0/go.mod h1:BI0uouVdmngYNUzGWeSYnokU+TrmwEsOqdt8Y6sso74= +github.com/Azure/go-autorest/autorest/mocks v0.4.1/go.mod h1:LTp+uSrOhSkaKrUy935gNZuuIPPVsHlr9DSOxSayd+k= +github.com/Azure/go-autorest/logger v0.2.1/go.mod h1:T9E3cAhj2VqvPOtCYAvby9aBXkZmbF5NWuPV8+WeEW8= +github.com/Azure/go-autorest/tracing v0.6.0/go.mod h1:+vhtPC754Xsa23ID7GlGsrdKBpUA79WCAKPPZVC2DeU= github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= +github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo= +github.com/DataDog/datadog-go v3.2.0+incompatible/go.mod h1:LButxg5PwREeZtORoXG3tL4fMGNddJ+vMq1mwgfaqoQ= +github.com/NYTimes/gziphandler v0.0.0-20170623195520-56545f4a5d46/go.mod h1:3wb06e3pkSAbeQ52E9H9iFoQsEEwGN64994WTCIhntQ= +github.com/NYTimes/gziphandler v1.1.1/go.mod h1:n/CVRwUEOgIxrgPvAQhUUr9oeUtvrhMomdKFjzJNB0c= github.com/OneOfOne/xxhash v1.2.2/go.mod h1:HSdplMjZKSmBqAxg5vPj2TmRDmfkzw+cTzAElWljhcU= +github.com/PuerkitoBio/purell v1.1.1/go.mod h1:c11w/QuzBsJSee3cPx9rAFu61PvFxuPbtSwDGJws/X0= +github.com/PuerkitoBio/urlesc v0.0.0-20170810143723-de5bf2ad4578/go.mod h1:uGdkoq3SwY9Y+13GIhn11/XLaGBb4BfwItxLd5jeuXE= +github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= +github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= +github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= +github.com/alecthomas/units v0.0.0-20190717042225-c3de453c63f4/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= +github.com/alecthomas/units v0.0.0-20190924025748-f65c72e2690d/go.mod h1:rBZYJk541a8SKzHPHnH3zbiI+7dagKZ0cgpgrD7Fyho= github.com/antihax/optional v1.0.0/go.mod h1:uupD/76wgC+ih3iEmQUL+0Ugr19nfwCT1kdvxnR2qWY= +github.com/antlr/antlr4/runtime/Go/antlr v0.0.0-20210826220005-b48c857c3a0e/go.mod h1:F7bn7fEU90QkQ3tnmaTx3LTKLEDqnwWODIYppRQ5hnY= +github.com/armon/circbuf v0.0.0-20150827004946-bbbad097214e/go.mod h1:3U/XgcO3hCbHZ8TKRvWD2dDTCfh9M9ya+I9JpbB7O8o= +github.com/armon/go-metrics v0.0.0-20180917152333-f0300d1749da/go.mod h1:Q73ZrmVTwzkszR9V5SSuryQ31EELlFMUz1kKyl939pY= +github.com/armon/go-metrics v0.3.10/go.mod h1:4O98XIr/9W0sxpJ8UaYkvjk10Iff7SnFrb4QAOwNTFc= +github.com/armon/go-radix v0.0.0-20180808171621-7fddfc383310/go.mod h1:ufUuZ+zHj4x4TnLV4JWEpy2hxWSpsRywHrMgIH9cCH8= +github.com/armon/go-radix v1.0.0/go.mod h1:ufUuZ+zHj4x4TnLV4JWEpy2hxWSpsRywHrMgIH9cCH8= +github.com/asaskevich/govalidator v0.0.0-20190424111038-f61b66f89f4a/go.mod h1:lB+ZfQJz7igIIfQNfa7Ml4HSf2uFQQRzpGGRXenZAgY= +github.com/benbjohnson/clock v1.0.3/go.mod h1:bGMdMPoPVvcYyt1gHDf4J2KE153Yf9BuiUKYMaxlTDM= github.com/benbjohnson/clock v1.1.0 h1:Q92kusRqC1XV2MjkWETPvjJVqKetz1OzxZB7mHJLju8= github.com/benbjohnson/clock v1.1.0/go.mod h1:J11/hYXuz8f4ySSvYwY0FKfm+ezbsZBKZxNJlLklBHA= +github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q= +github.com/beorn7/perks v1.0.0/go.mod h1:KWe93zE9D1o94FZ5RNwFwVgaQK1VOXiVxmqh+CedLV8= +github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw= +github.com/bgentry/speakeasy v0.1.0/go.mod h1:+zsyZBPWlz7T6j88CTgSN5bM796AkVf0kBD4zp0CCIs= +github.com/bketelsen/crypt v0.0.3-0.20200106085610-5cbc8cc4026c/go.mod h1:MKsuJmJgSg28kpZDP6UIiPt0e0Oz0kqKNGyRaWEPv84= +github.com/bketelsen/crypt v0.0.4/go.mod h1:aI6NrJ0pMGgvZKL1iVgXLnfIFJtfV+bKCoqOes/6LfM= +github.com/blang/semver v3.5.1+incompatible/go.mod h1:kRBLl5iJ+tD4TcOOxsy/0fnwebNt5EWlYSAyrTnjyyk= github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= +github.com/census-instrumentation/opencensus-proto v0.3.0/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= +github.com/certifi/gocertifi v0.0.0-20191021191039-0944d244cd40/go.mod h1:sGbDF6GwGcLpkNXPUTkMRoywsNa/ol15pxFe6ERfguA= +github.com/certifi/gocertifi v0.0.0-20200922220541-2c3bb06c6054/go.mod h1:sGbDF6GwGcLpkNXPUTkMRoywsNa/ol15pxFe6ERfguA= github.com/cespare/xxhash v1.1.0/go.mod h1:XrSqR1VqqWfGrhpAt58auRo0WTKS1nRRg3ghfAqPWnc= github.com/cespare/xxhash/v2 v2.1.1/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= +github.com/cespare/xxhash/v2 v2.1.2/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= +github.com/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWRnGsAI= +github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e/go.mod h1:nSuG5e5PlCu98SY8svDHJxuZscDgtXS6KTTbou5AhLI= +github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1/go.mod h1:Q3SI9o4m/ZMnBNeIyt5eFwwo7qiLfzFZmjNmxjkiQlU= +github.com/circonus-labs/circonus-gometrics v2.3.1+incompatible/go.mod h1:nmEj6Dob7S7YxXgwXpfOuvO54S+tGdZdw9fuRZt25Ag= +github.com/circonus-labs/circonusllhist v0.1.3/go.mod h1:kMXHVDlOchFAehlya5ePtbp5jckzBHf4XRpQvBOLI+I= github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc= +github.com/cncf/udpa/go v0.0.0-20200629203442-efcf912fb354/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk= github.com/cncf/udpa/go v0.0.0-20201120205902-5459f2c99403/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk= github.com/cncf/udpa/go v0.0.0-20210930031921-04548b0d99d4/go.mod h1:6pvJx4me5XPnfI9Z40ddWsdw2W/uZgQLFXToKeRcDiI= github.com/cncf/xds/go v0.0.0-20210312221358-fbca930ec8ed/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= github.com/cncf/xds/go v0.0.0-20210805033703-aa0b78936158/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= github.com/cncf/xds/go v0.0.0-20210922020428-25de7278fc84/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= +github.com/cncf/xds/go v0.0.0-20211001041855-01bcc9b48dfe/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= github.com/cncf/xds/go v0.0.0-20211011173535-cb28da3451f1/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= +github.com/cncf/xds/go v0.0.0-20211130200136-a8f946100490/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= +github.com/cockroachdb/datadriven v0.0.0-20200714090401-bf6692d28da5/go.mod h1:h6jFvWxBdQXxjopDMZyH2UVceIRfR84bdzbkoKrsWNo= +github.com/cockroachdb/errors v1.2.4/go.mod h1:rQD95gz6FARkaKkQXUksEje/d9a6wBJoCr5oaCLELYA= +github.com/cockroachdb/logtags v0.0.0-20190617123548-eb05cc24525f/go.mod h1:i/u985jwjWRlyHXQbwatDASoW0RMlZ/3i9yJHE2xLkI= +github.com/coreos/bbolt v1.3.2/go.mod h1:iRUV2dpdMOn7Bo10OQBFzIJO9kkE559Wcmn+qkEiiKk= +github.com/coreos/etcd v3.3.13+incompatible/go.mod h1:uF7uidLiAD3TWHmW31ZFd/JWoc32PjwdhPthX9715RE= +github.com/coreos/go-oidc v2.1.0+incompatible/go.mod h1:CgnwVTmzoESiwO9qyAFEMiHoZ1nMCKZlZ9V6mm3/LKc= +github.com/coreos/go-semver v0.3.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk= +github.com/coreos/go-systemd v0.0.0-20190321100706-95778dfbb74e/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4= +github.com/coreos/go-systemd/v22 v22.3.2/go.mod h1:Y58oyj3AT4RCenI/lSvhwexgC+NSVTIJ3seZv2GcEnc= +github.com/coreos/pkg v0.0.0-20180928190104-399ea9e2e55f/go.mod h1:E3G3o1h8I7cfcXa63jLwjI0eiQQMgzzUDFVpN/nH/eA= +github.com/cpuguy83/go-md2man/v2 v2.0.0/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU= +github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= +github.com/creack/pty v1.1.11/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/dgrijalva/jwt-go v3.2.0+incompatible/go.mod h1:E3ru+11k8xSBh+hMPgOLZmtrrCbhqsmaPHjLKYnJCaQ= +github.com/dgryski/go-sip13 v0.0.0-20181026042036-e10d5fee7954/go.mod h1:vAd38F8PWV+bWy6jNmig1y/TA+kYO4g3RSRF0IAv0no= +github.com/docopt/docopt-go v0.0.0-20180111231733-ee0de3bc6815/go.mod h1:WwZ+bS3ebgob9U8Nd0kOddGdZWjyMGR8Wziv+TBNwSE= +github.com/dustin/go-humanize v1.0.0/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk= +github.com/elazarl/goproxy v0.0.0-20180725130230-947c36da3153/go.mod h1:/Zj4wYkgs4iZTTu3o/KG3Itv/qCCa8VVMlb3i9OVuzc= +github.com/emicklei/go-restful v0.0.0-20170410110728-ff4f55a20633/go.mod h1:otzb+WCGbkyDHkqmQmT5YD2WR4BBwUdeQoFo8l/7tVs= +github.com/emicklei/go-restful v2.9.5+incompatible/go.mod h1:otzb+WCGbkyDHkqmQmT5YD2WR4BBwUdeQoFo8l/7tVs= github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1mIlRU8Am5FuJP05cCM98= +github.com/envoyproxy/go-control-plane v0.9.7/go.mod h1:cwu0lG7PUMfa9snN8LXBig5ynNVH9qI8YYLbd1fK2po= github.com/envoyproxy/go-control-plane v0.9.9-0.20201210154907-fd9021fe5dad/go.mod h1:cXg6YxExXjJnVBQHBLXeUAgxn2UodCpnH306RInaBQk= +github.com/envoyproxy/go-control-plane v0.9.9-0.20210217033140-668b12f5399d/go.mod h1:cXg6YxExXjJnVBQHBLXeUAgxn2UodCpnH306RInaBQk= github.com/envoyproxy/go-control-plane v0.9.9-0.20210512163311-63b5d3c536b0/go.mod h1:hliV/p42l8fGbc6Y9bQ70uLwIvmJyVE5k4iMKlh8wCQ= github.com/envoyproxy/go-control-plane v0.9.10-0.20210907150352-cf90f659a021/go.mod h1:AFq3mo9L8Lqqiid3OhADV3RfLJnjiw63cSpi+fDTRC0= +github.com/envoyproxy/go-control-plane v0.10.1/go.mod h1:AY7fTTXNdv/aJ2O5jwpxAPOWUZ7hQAEvzN5Pf27BkQQ= github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= +github.com/envoyproxy/protoc-gen-validate v0.6.2/go.mod h1:2t7qjJNvHPx8IjnBOzl9E9/baC+qXE/TeeyBRzgJDws= +github.com/evanphx/json-patch v0.5.2/go.mod h1:ZWS5hhDbVDyob71nXKNL0+PWn6ToqBHMikGIFbs31qQ= +github.com/evanphx/json-patch v4.12.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk= +github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4= +github.com/fatih/color v1.9.0/go.mod h1:eQcE1qtQxscV5RaZvpXrrb8Drkc3/DdQ+uUYCNjL+zU= github.com/fatih/color v1.13.0 h1:8LOYc1KYPPmyKMuN8QV2DNRWNbLo6LZ0iLs8+mlH53w= github.com/fatih/color v1.13.0/go.mod h1:kLAiJbzzSOZDVNGyDpeOxJ47H46qBXwg5ILebYFFOfk= +github.com/felixge/httpsnoop v1.0.1/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSwevea8zH2U= +github.com/form3tech-oss/jwt-go v3.2.2+incompatible/go.mod h1:pbq4aXjuKjdthFRnoDwaVPLA+WlJuPGy+QneDUgJi2k= +github.com/form3tech-oss/jwt-go v3.2.3+incompatible/go.mod h1:pbq4aXjuKjdthFRnoDwaVPLA+WlJuPGy+QneDUgJi2k= +github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo= +github.com/fsnotify/fsnotify v1.4.9/go.mod h1:znqG4EE+3YCdAaPaxE2ZRY/06pZUdp0tY4IgpuI1SZQ= github.com/fsnotify/fsnotify v1.5.1 h1:mZcQUHVQUQWoPXXtuf9yuEXKudkV2sx1E06UadKWpgI= github.com/fsnotify/fsnotify v1.5.1/go.mod h1:T3375wBYaZdLLcVNkcVbzGHY7f1l/uK5T5Ai1i3InKU= +github.com/getkin/kin-openapi v0.76.0/go.mod h1:660oXbgy5JFMKreazJaQTw7o+X00qeSyhcnluiMv+Xg= +github.com/getsentry/raven-go v0.2.0/go.mod h1:KungGk8q33+aIAZUIVWZDr2OfAEBsO49PX4NzFV5kcQ= github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= +github.com/go-gl/glfw v0.0.0-20190409004039-e6da0acd62b1/go.mod h1:vR7hzQXu2zJy9AVAgeJqvqgH9Q5CA+iKCZ2gyEVpxRU= +github.com/go-gl/glfw/v3.3/glfw v0.0.0-20191125211704-12ad95a8df72/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= +github.com/go-gl/glfw/v3.3/glfw v0.0.0-20200222043503-6f7a984d4dc4/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= +github.com/go-kit/kit v0.8.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= +github.com/go-kit/kit v0.9.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= +github.com/go-kit/log v0.1.0/go.mod h1:zbhenjAZHb184qTLMA9ZjW7ThYL0H2mk7Q6pNt4vbaY= +github.com/go-logfmt/logfmt v0.3.0/go.mod h1:Qt1PoO58o5twSAckw1HlFXLmHsOX5/0LbT9GBnD5lWE= +github.com/go-logfmt/logfmt v0.4.0/go.mod h1:3RMwSq7FuexP4Kalkev3ejPJsZTpXXBr9+V4qmtdjCk= +github.com/go-logfmt/logfmt v0.5.0/go.mod h1:wCYkCAKZfumFQihp8CzCvQ3paCTfi41vtzG1KdI/P7A= +github.com/go-logr/logr v0.1.0/go.mod h1:ixOQHD9gLJUVQQ2ZOR7zLEifBX6tGkNJF4QyIY7sIas= +github.com/go-logr/logr v0.2.0/go.mod h1:z6/tIYblkpsD+a4lm/fGIIU9mZ+XfAiaFtq7xTgseGU= +github.com/go-logr/logr v1.2.0/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= +github.com/go-logr/zapr v1.2.0/go.mod h1:Qa4Bsj2Vb+FAVeAKsLD8RLQ+YRJB8YDmOAKxaBQf7Ro= +github.com/go-openapi/jsonpointer v0.19.3/go.mod h1:Pl9vOtqEWErmShwVjC8pYs9cog34VGT37dQOVbmoatg= +github.com/go-openapi/jsonpointer v0.19.5/go.mod h1:Pl9vOtqEWErmShwVjC8pYs9cog34VGT37dQOVbmoatg= +github.com/go-openapi/jsonreference v0.19.3/go.mod h1:rjx6GuL8TTa9VaixXglHmQmIL98+wF9xc8zWvFonSJ8= +github.com/go-openapi/jsonreference v0.19.5/go.mod h1:RdybgQwPxbL4UEjuAruzK1x3nE69AqPYEJeo/TWfEeg= +github.com/go-openapi/swag v0.19.5/go.mod h1:POnQmlKehdgb5mhVOsnJFsivZCEZ/vjK9gh66Z9tfKk= +github.com/go-openapi/swag v0.19.14/go.mod h1:QYRuS/SOXUCsnplDa677K7+DxSOj6IPNl/eQntq43wQ= +github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY= +github.com/go-task/slim-sprig v0.0.0-20210107165309-348f09dbbbc0/go.mod h1:fyg7847qk6SyHyPtNmDHnmrv/HOrqktSC+C9fM+CJOE= +github.com/godbus/dbus/v5 v5.0.4/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA= +github.com/gogo/protobuf v1.1.1/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= +github.com/gogo/protobuf v1.2.1/go.mod h1:hp+jE20tsWTFYpLwKvXlhS1hjn+gTNwPg2I6zVXpSg4= +github.com/gogo/protobuf v1.3.1/go.mod h1:SlYgWuQ5SjCEi6WLHjHCa1yvBfUnHcTbrrZtXPKa29o= github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q= github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q= github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= github.com/golang/glog v1.0.0 h1:nfP3RFugxnNRyKgeWd4oI1nYvXpxrx8ck8ZrcizshdQ= +github.com/golang/glog v1.0.0/go.mod h1:EWib/APOK0SL3dFbYqvxE3UYd8E6s1ouQ7iEp/0LWV4= +github.com/golang/groupcache v0.0.0-20190129154638-5b532d6fd5ef/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= +github.com/golang/groupcache v0.0.0-20190702054246-869f871628b6/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= +github.com/golang/groupcache v0.0.0-20191227052852-215e87163ea7/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= +github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= +github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= +github.com/golang/mock v1.2.0/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= +github.com/golang/mock v1.3.1/go.mod h1:sBzyDLLjw3U8JLTeZvSv8jJB+tU5PVekmnlKIyFUx0Y= +github.com/golang/mock v1.4.0/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= +github.com/golang/mock v1.4.1/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= +github.com/golang/mock v1.4.3/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= +github.com/golang/mock v1.4.4/go.mod h1:l3mdAwkq5BuhzHwde/uurv3sEJeZMXNpwsxVWU71h+4= +github.com/golang/mock v1.5.0/go.mod h1:CWnOUgYIOo4TcNZ0wHX3YZCqsaM1I1Jvs6v3mP3KVu8= +github.com/golang/mock v1.6.0/go.mod h1:p6yTPP+5HYm5mzsMV8JkE6ZKdX+/wYM6Hr+LicevLPs= github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= +github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.3.3/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw= +github.com/golang/protobuf v1.3.4/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw= +github.com/golang/protobuf v1.3.5/go.mod h1:6O5/vntMXwX2lRkT1hjjk0nAC1IDOTvTlVgjlRvqsdk= github.com/golang/protobuf v1.4.0-rc.1/go.mod h1:ceaxUfeHdC40wWswd/P6IGgMaK3YpKi5j83Wpe3EHw8= github.com/golang/protobuf v1.4.0-rc.1.0.20200221234624-67d41d38c208/go.mod h1:xKAWHe0F5eneWXFV3EuXVDTCmh+JuBKY0li0aMyXATA= github.com/golang/protobuf v1.4.0-rc.2/go.mod h1:LlEzMj4AhA7rCAGe4KMBDvJI+AwstrUpVNzEA03Pprs= @@ -48,15 +218,49 @@ github.com/golang/protobuf v1.4.1/go.mod h1:U8fpvMrcmy5pZrNK1lt4xCsGvpyWQ/VVv6QD github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= github.com/golang/protobuf v1.4.3/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk= +github.com/golang/protobuf v1.5.1/go.mod h1:DopwsBzvsk0Fs44TXzsVbJyPhcCPeIwnvohx4u74HPM= github.com/golang/protobuf v1.5.2 h1:ROPKBNFfQgOUMifHyP+KYbvpjbdoFNs+aK7DXlji0Tw= github.com/golang/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= +github.com/golang/snappy v0.0.3/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= +github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= +github.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= +github.com/google/btree v1.0.1/go.mod h1:xXMiIv4Fb/0kKde4SpL7qlzvu5cMJDRkFDxJfI9uaxA= +github.com/google/cel-go v0.9.0/go.mod h1:U7ayypeSkw23szu4GaQTPJGx66c20mx8JklMSxrmI1w= +github.com/google/cel-spec v0.6.0/go.mod h1:Nwjgxy5CbjlPrtCWjeDjUyKMl8w41YBYGjsyDdqk0xA= github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M= github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.4.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.2/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.3/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.4/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.6 h1:BKbKCqvP6I+rmFHt06ZmyQtvB8xAkWdhFyr0ZUNZcxQ= +github.com/google/go-cmp v0.5.6/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= +github.com/google/gofuzz v1.1.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= +github.com/google/martian v2.1.0+incompatible/go.mod h1:9I4somxYTbIHy5NJKHRl3wXiIaQGbYVAs8BPL6v8lEs= +github.com/google/martian/v3 v3.0.0/go.mod h1:y5Zk1BBys9G+gd6Jrk0W3cC1+ELVxBWuIGO+w/tUAp0= +github.com/google/martian/v3 v3.1.0/go.mod h1:y5Zk1BBys9G+gd6Jrk0W3cC1+ELVxBWuIGO+w/tUAp0= +github.com/google/martian/v3 v3.2.1/go.mod h1:oBOf6HBosgwRXnUGWUB05QECsc6uvmMiJ3+6W4l/CUk= +github.com/google/pprof v0.0.0-20181206194817-3ea8567a2e57/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= +github.com/google/pprof v0.0.0-20190515194954-54271f7e092f/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= +github.com/google/pprof v0.0.0-20191218002539-d4f498aebedc/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= +github.com/google/pprof v0.0.0-20200212024743-f11f1df84d12/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= +github.com/google/pprof v0.0.0-20200229191704-1ebb73c60ed3/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= +github.com/google/pprof v0.0.0-20200430221834-fc25d7d30c6d/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= +github.com/google/pprof v0.0.0-20200708004538-1a94d8640e99/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= +github.com/google/pprof v0.0.0-20201023163331-3e6fc7fc9c4c/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= +github.com/google/pprof v0.0.0-20201203190320-1bf35d6f28c2/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= +github.com/google/pprof v0.0.0-20210122040257-d980be63207e/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= +github.com/google/pprof v0.0.0-20210226084205-cbba55b83ad5/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= +github.com/google/pprof v0.0.0-20210601050228-01bbb1931b22/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= +github.com/google/pprof v0.0.0-20210609004039-a478d1d731e9/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= +github.com/google/pprof v0.0.0-20210720184732-4bb14d4b1be1/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= +github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI= github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/google/uuid v1.3.0 h1:t6JiXgmwXMjEs8VusXIJk2BXHsn+wx8BZdTaoZ5fu7I= github.com/google/uuid v1.3.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= @@ -78,64 +282,241 @@ github.com/grpc-ecosystem/grpc-gateway v1.16.0 h1:gmcG1KaJ57LophUzW0Hy8NmPhnMZb4 github.com/grpc-ecosystem/grpc-gateway v1.16.0/go.mod h1:BDjrQk3hbvj6Nolgz8mAMFbcEtjT1g+wF4CSlocrBnw= github.com/grpc-ecosystem/grpc-gateway/v2 v2.7.2 h1:I/pwhnUln5wbMnTyRbzswA0/JxpK8sZj0aUfI3TV1So= github.com/grpc-ecosystem/grpc-gateway/v2 v2.7.2/go.mod h1:lsuH8kb4GlMdSlI4alNIBBSAt5CHJtg3i+0WuN9J5YM= +github.com/hashicorp/consul/api v1.1.0/go.mod h1:VmuI/Lkw1nC05EYQWNKwWGbkg+FbDBtguAZLlVdkD9Q= +github.com/hashicorp/consul/api v1.12.0/go.mod h1:6pVBMo0ebnYdt2S3H87XhekM/HHrUoTD2XXb/VrZVy0= +github.com/hashicorp/consul/sdk v0.1.1/go.mod h1:VKf9jXwCTEY1QZP2MOLRhb5i/I/ssyNV1vwHyQBF0x8= +github.com/hashicorp/consul/sdk v0.8.0/go.mod h1:GBvyrGALthsZObzUGsfgHZQDXjg4lOjagTIwIR1vPms= +github.com/hashicorp/errwrap v1.0.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4= +github.com/hashicorp/go-cleanhttp v0.5.0/go.mod h1:JpRdi6/HCYpAwUzNwuwqhbovhLtngrth3wmdIIUrZ80= +github.com/hashicorp/go-cleanhttp v0.5.1/go.mod h1:JpRdi6/HCYpAwUzNwuwqhbovhLtngrth3wmdIIUrZ80= +github.com/hashicorp/go-cleanhttp v0.5.2/go.mod h1:kO/YDlP8L1346E6Sodw+PrpBSV4/SoxCXGY6BqNFT48= +github.com/hashicorp/go-hclog v0.12.0/go.mod h1:whpDNt7SSdeAju8AWKIWsul05p54N/39EeqMAyrmvFQ= +github.com/hashicorp/go-hclog v1.0.0/go.mod h1:whpDNt7SSdeAju8AWKIWsul05p54N/39EeqMAyrmvFQ= +github.com/hashicorp/go-immutable-radix v1.0.0/go.mod h1:0y9vanUI8NX6FsYoO3zeMjhV/C5i9g4Q3DwcSNZ4P60= +github.com/hashicorp/go-immutable-radix v1.3.1/go.mod h1:0y9vanUI8NX6FsYoO3zeMjhV/C5i9g4Q3DwcSNZ4P60= +github.com/hashicorp/go-msgpack v0.5.3/go.mod h1:ahLV/dePpqEmjfWmKiqvPkv/twdG7iPBM1vqhUKIvfM= +github.com/hashicorp/go-multierror v1.0.0/go.mod h1:dHtQlpGsu+cZNNAkkCN/P3hoUDHhCYQXV3UM06sGGrk= +github.com/hashicorp/go-multierror v1.1.0/go.mod h1:spPvp8C1qA32ftKqdAHm4hHTbPw+vmowP0z+KUhOZdA= +github.com/hashicorp/go-retryablehttp v0.5.3/go.mod h1:9B5zBasrRhHXnJnui7y6sL7es7NDiJgTc6Er0maI1Xs= +github.com/hashicorp/go-rootcerts v1.0.0/go.mod h1:K6zTfqpRlCUIjkwsN4Z+hiSfzSTQa6eBIzfwKfwNnHU= +github.com/hashicorp/go-rootcerts v1.0.2/go.mod h1:pqUvnprVnM5bf7AOirdbb01K4ccR319Vf4pU3K5EGc8= +github.com/hashicorp/go-sockaddr v1.0.0/go.mod h1:7Xibr9yA9JjQq1JpNB2Vw7kxv8xerXegt+ozgdvDeDU= +github.com/hashicorp/go-syslog v1.0.0/go.mod h1:qPfqrKkXGihmCqbJM2mZgkZGvKG1dFdvsLplgctolz4= +github.com/hashicorp/go-uuid v1.0.0/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= +github.com/hashicorp/go-uuid v1.0.1/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= +github.com/hashicorp/go.net v0.0.1/go.mod h1:hjKkEWcCURg++eb33jQU7oqQcI9XDCnUzHA0oac0k90= +github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= +github.com/hashicorp/golang-lru v0.5.1/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= +github.com/hashicorp/golang-lru v0.5.4/go.mod h1:iADmTwqILo4mZ8BN3D2Q6+9jd8WM5uGBxy+E8yxSoD4= github.com/hashicorp/hcl v1.0.0 h1:0Anlzjpi4vEasTeNFn2mLJgTSwt0+6sfsiTG8qcWGx4= github.com/hashicorp/hcl v1.0.0/go.mod h1:E5yfLk+7swimpb2L/Alb/PJmXilQ/rhwaUYs4T20WEQ= +github.com/hashicorp/logutils v1.0.0/go.mod h1:QIAnNjmIWmVIIkWDTG1z5v++HQmx9WQRO+LraFDTW64= +github.com/hashicorp/mdns v1.0.0/go.mod h1:tL+uN++7HEJ6SQLQ2/p+z2pH24WQKWjBPkE0mNTz8vQ= +github.com/hashicorp/mdns v1.0.4/go.mod h1:mtBihi+LeNXGtG8L9dX59gAEa12BDtBQSp4v/YAJqrc= +github.com/hashicorp/memberlist v0.1.3/go.mod h1:ajVTdAv/9Im8oMAAj5G31PhhMCZJV2pPBoIllUwCN7I= +github.com/hashicorp/memberlist v0.3.0/go.mod h1:MS2lj3INKhZjWNqd3N0m3J+Jxf3DAOnAH9VT3Sh9MUE= +github.com/hashicorp/serf v0.8.2/go.mod h1:6hOLApaqBFA1NXqRQAsxw9QxuDEvNxSQRwA/JwenrHc= +github.com/hashicorp/serf v0.9.6/go.mod h1:TXZNMjZQijwlDvp+r0b63xZ45H7JmCmgg4gpTwn9UV4= +github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU= +github.com/iancoleman/strcase v0.2.0/go.mod h1:iwCmte+B7n89clKwxIoIXy/HfoL7AsD47ZCWhYzw7ho= +github.com/ianlancetaylor/demangle v0.0.0-20181102032728-5e5cf60278f6/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= +github.com/ianlancetaylor/demangle v0.0.0-20200824232613-28f6c0f3b639/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= +github.com/imdario/mergo v0.3.5/go.mod h1:2EnlNZ0deacrJVfApfmtdGgDfMuh/nq6Ok1EcJh5FfA= +github.com/imdario/mergo v0.3.12/go.mod h1:jmQim1M+e3UYxmgPu/WyfjB3N3VflVyUjjjwH0dnCYA= +github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8= +github.com/jessevdk/go-flags v1.4.0/go.mod h1:4FA24M0QyGHXBuZZK/XkWh8h0e1EYbRYJSGM75WSRxI= github.com/jinzhu/inflection v1.0.0 h1:K317FqzuhWc8YvSVlFMCCUb36O/S9MCKRDI7QkRKD/E= github.com/jinzhu/inflection v1.0.0/go.mod h1:h+uFLlag+Qp1Va5pdKtLDYj+kHp5pxUVkryuEj+Srlc= +github.com/jonboulle/clockwork v0.1.0/go.mod h1:Ii8DK3G1RaLaWxj9trq07+26W01tbo22gdxWY5EU2bo= +github.com/jonboulle/clockwork v0.2.2/go.mod h1:Pkfl5aHPm1nk2H9h0bjmnJD/BcgbGXUBGnn1kMkgxc8= +github.com/josharian/intern v1.0.0/go.mod h1:5DoeVV0s6jJacbCEi61lwdGj/aVlrQvzHFFd8Hwg//Y= +github.com/jpillora/backoff v1.0.0/go.mod h1:J/6gKK9jxlEcS3zixgDgUAsiuZ7yrSoa/FX5e0EB2j4= +github.com/json-iterator/go v1.1.6/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU= +github.com/json-iterator/go v1.1.9/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= +github.com/json-iterator/go v1.1.10/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= +github.com/json-iterator/go v1.1.11/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= +github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHmT4TnhNGBo= +github.com/jstemmer/go-junit-report v0.0.0-20190106144839-af01ea7f8024/go.mod h1:6v2b51hI/fHJwM22ozAgKL4VKDeJcHhJFhtBdhmNjmU= +github.com/jstemmer/go-junit-report v0.9.1/go.mod h1:Brl9GWCQeLvo8nXZwPNNblvFj/XSXhF0NWZEnDohbsk= +github.com/jtolds/gls v4.20.0+incompatible/go.mod h1:QJZ7F/aHp+rZTRtaJ1ow/lLfFfVYBRgL+9YlvaHOwJU= +github.com/julienschmidt/httprouter v1.2.0/go.mod h1:SYymIcj16QtmaHHD7aYtjjsJG7VTCxuUUipMqKk8s4w= github.com/julienschmidt/httprouter v1.3.0 h1:U0609e9tgbseu3rBINet9P48AI/D3oJs4dN7jwJOQ1U= github.com/julienschmidt/httprouter v1.3.0/go.mod h1:JR6WtHb+2LUe8TCKY3cZOxFyyO8IZAc4RVcycCCAKdM= +github.com/kisielk/errcheck v1.1.0/go.mod h1:EZBBE59ingxPouuu3KfxchcWSUPOHkagtvWXihfKN4Q= +github.com/kisielk/errcheck v1.2.0/go.mod h1:/BMXB+zMLi60iA8Vv6Ksmxu/1UDYcXs4uQLJ+jE2L00= github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8= github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= github.com/klauspost/cpuid/v2 v2.0.6 h1:dQ5ueTiftKxp0gyjKSx5+8BtPWkyQbd95m8Gys/RarI= github.com/klauspost/cpuid/v2 v2.0.6/go.mod h1:FInQzS24/EEf25PyTYn52gqo7WaD8xa0213Md/qVLRg= +github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= +github.com/konsorten/go-windows-terminal-sequences v1.0.3/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= github.com/kr/fs v0.1.0/go.mod h1:FFnZGqtBN9Gxj7eW1uZ42v5BccTP0vu6NEaFoC2HwRg= -github.com/kr/pretty v0.1.0 h1:L/CwN0zerZDmRFUapSPitk6f+Q3+0za1rQkzVuMiMFI= +github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515/go.mod h1:+0opPa2QZZtGFBFZlji/RkVcI2GknAs/DXo4wKdlNEc= github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= +github.com/kr/pretty v0.2.0/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= -github.com/kr/text v0.1.0 h1:45sCR5RtlFHMR4UwH9sdQ5TC8v0qDQCHnXt+kaKSTVE= github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= +github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= +github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= +github.com/lyft/protoc-gen-star v0.5.3/go.mod h1:V0xaHgaf5oCCqmcxYcWiDfTiKsZsRc87/1qhoTACD8w= +github.com/magiconair/properties v1.8.1/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ= github.com/magiconair/properties v1.8.5 h1:b6kJs+EmPFMYGkow9GiUyCyOvIwYetYJ3fSaWak/Gls= github.com/magiconair/properties v1.8.5/go.mod h1:y3VJvCyxH9uVvJTWEGAELF3aiYNyPKd5NZ3oSwXrF60= +github.com/mailru/easyjson v0.0.0-20190614124828-94de47d64c63/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= +github.com/mailru/easyjson v0.0.0-20190626092158-b2ccc519800e/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= +github.com/mailru/easyjson v0.7.6/go.mod h1:xzfreul335JAWq5oZzymOObrkdz5UnU4kGfJJLY9Nlc= +github.com/mattn/go-colorable v0.0.9/go.mod h1:9vuHe8Xs5qXnSaW/c/ABM9alt+Vo+STaOChaDxuIBZU= +github.com/mattn/go-colorable v0.1.4/go.mod h1:U0ppj6V5qS13XJ6of8GYAs25YV2eR4EVcfRqFIhoBtE= +github.com/mattn/go-colorable v0.1.6/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc= github.com/mattn/go-colorable v0.1.9/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc= github.com/mattn/go-colorable v0.1.12 h1:jF+Du6AlPIjs2BiUiQlKOX0rt3SujHxPnksPKZbaA40= github.com/mattn/go-colorable v0.1.12/go.mod h1:u5H1YNBxpqRaxsYJYSkiCWKzEfiAb1Gb520KVy5xxl4= +github.com/mattn/go-isatty v0.0.3/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4= +github.com/mattn/go-isatty v0.0.8/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hdxcsrc5s= +github.com/mattn/go-isatty v0.0.10/go.mod h1:qgIWMr58cqv1PHHyhnkY9lrL7etaEgOFcMEpPG5Rm84= +github.com/mattn/go-isatty v0.0.11/go.mod h1:PhnuNfih5lzO57/f3n+odYbM4JtupLOxQOAqxQCu2WE= github.com/mattn/go-isatty v0.0.12/go.mod h1:cbi8OIDigv2wuxKPP5vlRcQ1OAZbq2CE4Kysco4FUpU= github.com/mattn/go-isatty v0.0.14 h1:yVuAays6BHfxijgZPzw+3Zlu5yQgKGP2/hcQbHb7S9Y= github.com/mattn/go-isatty v0.0.14/go.mod h1:7GGIvUiUoEMVVmxf/4nioHXj79iQHKdU27kJ6hsGG94= +github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0= +github.com/matttproud/golang_protobuf_extensions v1.0.2-0.20181231171920-c182affec369/go.mod h1:BSXmuO+STAnVfrANrmjBb36TMTDstsz7MSK+HVaYKv4= +github.com/miekg/dns v1.0.14/go.mod h1:W1PPwlIAgtquWBMBEV9nkV9Cazfe8ScdGz/Lj7v3Nrg= +github.com/miekg/dns v1.1.26/go.mod h1:bPDLeHnStXmXAq1m/Ch/hvfNHr14JKNPMBo3VZKjuso= +github.com/miekg/dns v1.1.41/go.mod h1:p6aan82bvRIyn+zDIv9xYNUpwa73JcSh9BKwknJysuI= +github.com/mitchellh/cli v1.0.0/go.mod h1:hNIlj7HEI86fIcpObd7a0FcrxTWetlwJDGcceTlRvqc= +github.com/mitchellh/cli v1.1.0/go.mod h1:xcISNoH86gajksDmfB23e/pu+B+GeFRMYmoHXxx3xhI= +github.com/mitchellh/go-homedir v1.0.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0= +github.com/mitchellh/go-homedir v1.1.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0= +github.com/mitchellh/go-testing-interface v1.0.0/go.mod h1:kRemZodwjscx+RGhAo8eIhFbs2+BFgRtFPeD/KE+zxI= +github.com/mitchellh/gox v0.4.0/go.mod h1:Sd9lOJ0+aimLBi73mGofS1ycjY8lL3uZM3JPS42BGNg= +github.com/mitchellh/iochan v1.0.0/go.mod h1:JwYml1nuB7xOzsp52dPpHFffvOCDupsG0QubkSMEySY= +github.com/mitchellh/mapstructure v0.0.0-20160808181253-ca63d7c062ee/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= +github.com/mitchellh/mapstructure v1.1.2/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= +github.com/mitchellh/mapstructure v1.4.1/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= github.com/mitchellh/mapstructure v1.4.3 h1:OVowDSCllw/YjdLkam3/sm7wEtOy59d8ndGgCcyj8cs= github.com/mitchellh/mapstructure v1.4.3/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= +github.com/moby/spdystream v0.2.0/go.mod h1:f7i0iNDQJ059oMTcWxx8MA/zKFIuD/lY+0GqbN2Wy8c= +github.com/moby/term v0.0.0-20210610120745-9d4ed1856297/go.mod h1:vgPCkQMyxTZ7IDy8SXRufE172gr8+K/JE/7hHFxHW3A= +github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= +github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= +github.com/modern-go/reflect2 v0.0.0-20180701023420-4b7aa43c6742/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= +github.com/modern-go/reflect2 v1.0.1/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= +github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk= +github.com/munnerz/goautoneg v0.0.0-20120707110453-a547fc61f48d/go.mod h1:+n7T8mK8HuQTcFwEeznm/DIxMOiR9yIdICNftLE1DvQ= +github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822/go.mod h1:+n7T8mK8HuQTcFwEeznm/DIxMOiR9yIdICNftLE1DvQ= +github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= +github.com/mwitkow/go-conntrack v0.0.0-20190716064945-2f068394615f/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= +github.com/mxk/go-flowrate v0.0.0-20140419014527-cca7078d478f/go.mod h1:ZdcZmHo+o7JKHSa8/e818NopupXU1YMK5fe1lsApnBw= +github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e h1:fD57ERR4JtEqsWbfPhv4DMiApHyliiK5xCTNVSPiaAs= +github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e/go.mod h1:zD1mROLANZcx1PVRCS0qkT7pwLkGfwJo4zjcN/Tysno= +github.com/nxadm/tail v1.4.4/go.mod h1:kenIhsEOeOJmVchQTgglprH7qJGnHDVpk1VPCcaMI8A= github.com/nxadm/tail v1.4.8 h1:nPr65rt6Y5JFSKQO7qToXr7pePgD6Gwiw05lkbyAQTE= +github.com/nxadm/tail v1.4.8/go.mod h1:+ncqLTQzXmGhMZNUePPaPqPvBxHAIsmXswZKocGu+AU= +github.com/oklog/ulid v1.3.1/go.mod h1:CirwcVhetQ6Lv90oh/F+FBtV6XMibvdAFo93nm5qn4U= +github.com/onsi/ginkgo v0.0.0-20170829012221-11459a886d9c/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= +github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= +github.com/onsi/ginkgo v1.12.1/go.mod h1:zj2OWP4+oCPe1qIXoGWkgMRwljMUYCdkwsT2108oapk= +github.com/onsi/ginkgo v1.14.0/go.mod h1:iSB4RoI2tjJc9BBv4NKIKWKya62Rps+oPG/Lv9klQyY= +github.com/onsi/ginkgo v1.16.4/go.mod h1:dX+/inL/fNMqNlz0e9LfyB9TswhZpCVdJM/Z6Vvnwo0= github.com/onsi/ginkgo v1.16.5 h1:8xi0RTUf59SOSfEtZMvwTvXYMzG4gV23XVHOZiXNtnE= +github.com/onsi/ginkgo v1.16.5/go.mod h1:+E8gABHa3K6zRBolWtd+ROzc/U5bkGt0FwiG042wbpU= +github.com/onsi/gomega v0.0.0-20170829124025-dcabb60a477c/go.mod h1:C1qb7wdrVGGVU+Z6iS04AVkA3Q65CEZX59MT0QO5uiA= +github.com/onsi/gomega v1.7.1/go.mod h1:XdKZgCCFLUoM/7CFJVPcG8C1xQ1AJ0vpAezJrB7JYyY= +github.com/onsi/gomega v1.10.1/go.mod h1:iN09h71vgCQne3DLsj+A5owkum+a2tYe+TOCB1ybHNo= github.com/onsi/gomega v1.17.0 h1:9Luw4uT5HTjHTN8+aNcSThgH1vdXnmdJ8xIfZ4wyTRE= +github.com/onsi/gomega v1.17.0/go.mod h1:HnhC7FXeEQY45zxNK3PPoIUhzk/80Xly9PcubAlGdZY= +github.com/opentracing/opentracing-go v1.1.0/go.mod h1:UkNAQd3GIcIGf0SeVgPpRdFStlNbqXla1AfSYxPUl2o= +github.com/pascaldekloe/goe v0.0.0-20180627143212-57f6aae5913c/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144TG7ZOy1lc= +github.com/pascaldekloe/goe v0.1.0/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144TG7ZOy1lc= +github.com/pelletier/go-toml v1.2.0/go.mod h1:5z9KED0ma1S8pY6P1sdut58dfprrGBbd/94hg7ilaic= +github.com/pelletier/go-toml v1.9.3/go.mod h1:u1nR/EPcESfeI/szUZKdtJ0xRNbUoANCkoOuaOx1Y+c= github.com/pelletier/go-toml v1.9.4 h1:tjENF6MfZAg8e4ZmZTeWaWiT2vXtsoO6+iuOjFhECwM= github.com/pelletier/go-toml v1.9.4/go.mod h1:u1nR/EPcESfeI/szUZKdtJ0xRNbUoANCkoOuaOx1Y+c= +github.com/peterbourgon/diskv v2.0.1+incompatible/go.mod h1:uqqh8zWWbv1HBMNONnaR/tNboyR3/BZd58JJSHlUSCU= +github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= +github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/sftp v1.10.1/go.mod h1:lYOWFsE0bwd1+KfKJaKeuokY15vzFx25BLbzYYoAxZI= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= +github.com/posener/complete v1.1.1/go.mod h1:em0nMJCgc9GFtwrmVmEMR/ZL6WyhyjMBndrE9hABlRI= +github.com/posener/complete v1.2.3/go.mod h1:WZIdtGGp+qx0sLrYKtIRAruyNpv6hFCicSgv7Sy7s/s= +github.com/pquerna/cachecontrol v0.0.0-20171018203845-0dec1b30a021/go.mod h1:prYjPmNq4d1NPVmpShWobRqXY3q7Vp+80DqgxxUrUIA= github.com/processout/grpc-go-pool v1.2.1 h1:hbp1BOA02CIxEAoRLHGpUhhPFv77nwfBLBeO3Ya9P7I= github.com/processout/grpc-go-pool v1.2.1/go.mod h1:F4hiNj96O6VQ87jv4rdz8R9tkHdelQQJ/J2B1a5VSt4= +github.com/prometheus/client_golang v0.9.1/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw= +github.com/prometheus/client_golang v0.9.3/go.mod h1:/TN21ttK/J9q6uSwhBd54HahCDft0ttaMvbicHlPoso= +github.com/prometheus/client_golang v1.0.0/go.mod h1:db9x61etRT2tGnBNRi70OPL5FsnadC4Ky3P0J6CfImo= +github.com/prometheus/client_golang v1.4.0/go.mod h1:e9GMxYsXl05ICDXkRhurwBS4Q3OK1iX/F2sw+iXX5zU= +github.com/prometheus/client_golang v1.7.1/go.mod h1:PY5Wy2awLA44sXw4AOSfFBetzPP4j5+D6mVACh+pe2M= +github.com/prometheus/client_golang v1.11.0/go.mod h1:Z6t4BnS23TR94PD6BsDNk8yVqroYurpAkEiz0P2BEV0= +github.com/prometheus/client_model v0.0.0-20180712105110-5c3871d89910/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= +github.com/prometheus/client_model v0.0.0-20190129233127-fd36f4220a90/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= +github.com/prometheus/client_model v0.2.0/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= +github.com/prometheus/common v0.0.0-20181113130724-41aa239b4cce/go.mod h1:daVV7qP5qjZbuso7PdcryaAu0sAZbrN9i7WWcTMWvro= +github.com/prometheus/common v0.4.0/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= +github.com/prometheus/common v0.4.1/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= +github.com/prometheus/common v0.9.1/go.mod h1:yhUN8i9wzaXS3w1O07YhxHEBxD+W35wd8bs7vj7HSQ4= +github.com/prometheus/common v0.10.0/go.mod h1:Tlit/dnDKsSWFlCLTWaA1cyBgKHSMdTB80sz/V91rCo= +github.com/prometheus/common v0.26.0/go.mod h1:M7rCNAaPfAosfx8veZJCuw84e35h3Cfd9VFqTh1DIvc= +github.com/prometheus/common v0.28.0/go.mod h1:vu+V0TpY+O6vW9J44gczi3Ap/oXXR10b+M/gUGO4Hls= +github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= +github.com/prometheus/procfs v0.0.0-20190507164030-5867b95ac084/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= +github.com/prometheus/procfs v0.0.2/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= +github.com/prometheus/procfs v0.0.8/go.mod h1:7Qr8sr6344vo1JqZ6HhLceV9o3AJ1Ff+GxbHq6oeK9A= +github.com/prometheus/procfs v0.1.3/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4OA4YeYWdaU= +github.com/prometheus/procfs v0.6.0/go.mod h1:cz+aTbrPOrUb4q7XlbU9ygM+/jj0fzG6c1xBZuNvfVA= +github.com/prometheus/tsdb v0.7.1/go.mod h1:qhTCs0VvXwvX/y3TZrWD7rabWM+ijKTux40TwIPHuXU= +github.com/rogpeppe/fastuuid v0.0.0-20150106093220-6724a57986af/go.mod h1:XWv6SoW27p1b0cqNHllgS5HIMJraePCO15w5zCzIWYg= github.com/rogpeppe/fastuuid v1.2.0/go.mod h1:jVj6XXZzXRy/MSR5jhDC/2q6DgLz+nrA6LYCDYWNEvQ= +github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= +github.com/russross/blackfriday/v2 v2.0.1/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= +github.com/ryanuber/columnize v0.0.0-20160712163229-9b3edd62028f/go.mod h1:sm1tb6uqfes/u+d4ooFouqFdy9/2g9QGwK3SQygK0Ts= +github.com/sagikazarmark/crypt v0.4.0/go.mod h1:ALv2SRj7GxYV4HO9elxH9nS6M9gW+xDNxqmyJ6RfDFM= +github.com/sean-/seed v0.0.0-20170313163322-e2103e2c3529/go.mod h1:DxrIzT+xaE7yg65j358z/aeFdxmN0P9QXhEzd20vsDc= github.com/segmentio/asm v1.1.0 h1:fkVr8k5J4sKoFjTGVD6r1yKvDKqmvrEh3K7iyVxgBs8= github.com/segmentio/asm v1.1.0/go.mod h1:4EUJGaKsB8ImLUwOGORVsNd9vTRDeh44JGsY4aKp5I4= github.com/segmentio/encoding v0.3.2 h1:gkXXteOfNaPPlrXTEf/e5tWvaQGVJWnvT3LqMzUeH7U= github.com/segmentio/encoding v0.3.2/go.mod h1:waft2p6XI4z2pk07M0YzZV4wEiqaRvsBSyWNHxVx4gU= +github.com/shurcooL/sanitized_anchor_name v1.0.0/go.mod h1:1NzhyTcUVG4SuEtjjoZeVRXNmyL/1OwPU0+IJeTBvfc= +github.com/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo= +github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE= +github.com/sirupsen/logrus v1.6.0/go.mod h1:7uNnSEd1DgxDLC74fIahvMZmmYsHGZGEOFrfsX/uA88= +github.com/sirupsen/logrus v1.7.0/go.mod h1:yWOB1SBYBC5VeMP7gHvWumXLIWorT60ONWic61uBYv0= +github.com/sirupsen/logrus v1.8.1/go.mod h1:yWOB1SBYBC5VeMP7gHvWumXLIWorT60ONWic61uBYv0= +github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d/go.mod h1:OnSkiWE9lh6wB0YB77sQom3nweQdgAjqCqsofrRNTgc= +github.com/smartystreets/goconvey v1.6.4/go.mod h1:syvi0/a8iFYH4r/RixwvyeAJjdLS9QV7WQ/tjFTllLA= +github.com/soheilhy/cmux v0.1.4/go.mod h1:IM3LyeVVIOuxMH7sFAkER9+bJ4dT7Ms6E4xg4kGIyLM= +github.com/soheilhy/cmux v0.1.5/go.mod h1:T7TcVDs9LWfQgPlPsdngu6I6QIoyIFZDDC6sNE1GqG0= github.com/spaolacci/murmur3 v0.0.0-20180118202830-f09979ecbc72/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA= github.com/speps/go-hashids v2.0.0+incompatible h1:kSfxGfESueJKTx0mpER9Y/1XHl+FVQjtCqRyYcviFbw= github.com/speps/go-hashids v2.0.0+incompatible/go.mod h1:P7hqPzMdnZOfyIk+xrlG1QaSMw+gCBdHKsBDnhpaZvc= +github.com/spf13/afero v1.1.2/go.mod h1:j4pytiNVoe2o6bmDsKpLACNPDBIoEAkihy7loJ1B0CQ= +github.com/spf13/afero v1.2.2/go.mod h1:9ZxEEn6pIJ8Rxe320qSDBk6AsU0r9pR7Q4OcevTdifk= +github.com/spf13/afero v1.3.3/go.mod h1:5KUK8ByomD5Ti5Artl0RtHeI5pTF7MIDuXL3yY520V4= github.com/spf13/afero v1.6.0 h1:xoax2sJ2DT8S8xA2paPFjDCScCNeWsg75VG0DLRreiY= github.com/spf13/afero v1.6.0/go.mod h1:Ai8FlHk4v/PARR026UzYexafAt9roJ7LcLMAmO6Z93I= +github.com/spf13/cast v1.3.0/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE= +github.com/spf13/cast v1.3.1/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE= github.com/spf13/cast v1.4.1 h1:s0hze+J0196ZfEMTs80N7UlFt0BDuQ7Q+JDnHiMWKdA= github.com/spf13/cast v1.4.1/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE= +github.com/spf13/cobra v1.1.3/go.mod h1:pGADOWyqRD/YMrPZigI/zbliZ2wVD/23d+is3pSWzOo= +github.com/spf13/cobra v1.2.1/go.mod h1:ExllRjgxM/piMAM+3tAZvg8fsklGAf3tPfi+i8t68Nk= +github.com/spf13/jwalterweatherman v1.0.0/go.mod h1:cQK4TGJAtQXfYWX+Ddv3mKDzgVb68N+wFjFa4jdeBTo= github.com/spf13/jwalterweatherman v1.1.0 h1:ue6voC5bR5F8YxI5S67j9i582FU4Qvo2bmqnqMYADFk= github.com/spf13/jwalterweatherman v1.1.0/go.mod h1:aNWZUN0dPAAO/Ljvb5BEdw96iTZ0EXowPYD95IqWIGo= +github.com/spf13/pflag v1.0.3/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA= github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= +github.com/spf13/viper v1.7.0/go.mod h1:8WkrPz2fc9jxqZNCJI/76HCieCp4Q8HaLFoCha5qpdg= +github.com/spf13/viper v1.8.1/go.mod h1:o0Pch8wJ9BVSWGQMbra6iw0oQ5oktSIBaujf1rJH9Ns= github.com/spf13/viper v1.10.1 h1:nuJZuYpG7gTj/XqiUwg8bA0cp1+M2mC3J4g5luUYBKk= github.com/spf13/viper v1.10.1/go.mod h1:IGlFPqhNAPKRxohIzWpI5QEy4kuI7tcl5WvR+8qy1rU= +github.com/stoewer/go-strcase v1.2.0/go.mod h1:IBiWB2sKIp3wVVQ3Y035++gc+knqhUQag1KpM8ahLw8= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= +github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= @@ -145,6 +526,8 @@ github.com/stretchr/testify v1.7.0 h1:nwc3DEeHmmLAfoZucVR881uASk0Mfjw8xYJ99tb5Cc github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/subosito/gotenv v1.2.0 h1:Slr1R9HxAlEKefgq5jn9U+DnETlIUa6HfgEzj0g5d7s= github.com/subosito/gotenv v1.2.0/go.mod h1:N0PQaV/YGNqwC0u51sEeR/aUtSLEXKX9iv69rRypqCw= +github.com/tmc/grpc-websocket-proxy v0.0.0-20190109142713-0ad062ec5ee5/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= +github.com/tmc/grpc-websocket-proxy v0.0.0-20201229170055-e5319fda7802/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= github.com/tmthrgd/go-hex v0.0.0-20190904060850-447a3041c3bc h1:9lRDQMhESg+zvGYmW5DyG0UqvY96Bu5QYsTLvCHdrgo= github.com/tmthrgd/go-hex v0.0.0-20190904060850-447a3041c3bc/go.mod h1:bciPuU6GHm1iF1pBvUfxfsH0Wmnc2VbpgvbI9ZWuIRs= github.com/tv42/httpunix v0.0.0-20150427012821-b75d8614f926/go.mod h1:9ESjWnEqriFuLhtthL60Sar/7RFoluCcXsuvEwTV5KM= @@ -161,110 +544,497 @@ github.com/vmihailenco/msgpack/v5 v5.3.5 h1:5gO0H1iULLWGhs2H5tbAHIZTV8/cYafcFOr9 github.com/vmihailenco/msgpack/v5 v5.3.5/go.mod h1:7xyJ9e+0+9SaZT0Wt1RGleJXzli6Q/V5KbhBonMG9jc= github.com/vmihailenco/tagparser/v2 v2.0.0 h1:y09buUbR+b5aycVFQs/g70pqKVZNBmxwAhO7/IwNM9g= github.com/vmihailenco/tagparser/v2 v2.0.0/go.mod h1:Wri+At7QHww0WTrCBeu4J6bNtoV6mEfg5OIWRZA9qds= +github.com/xiang90/probing v0.0.0-20190116061207-43a291ad63a2/go.mod h1:UETIi67q53MR2AWcXfiuqkDkRtnGDLqkBTpCHuJHxtU= +github.com/yuin/goldmark v1.1.25/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= +github.com/yuin/goldmark v1.1.32/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= +github.com/yuin/goldmark v1.4.0/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= +go.etcd.io/bbolt v1.3.2/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU= +go.etcd.io/bbolt v1.3.6/go.mod h1:qXsaaIqmgQH0T+OPdb99Bf+PKfBBQVAdyD6TY9G8XM4= +go.etcd.io/etcd/api/v3 v3.5.0/go.mod h1:cbVKeC6lCfl7j/8jBhAK6aIYO9XOjdptoxU/nLQcPvs= +go.etcd.io/etcd/api/v3 v3.5.1/go.mod h1:cbVKeC6lCfl7j/8jBhAK6aIYO9XOjdptoxU/nLQcPvs= +go.etcd.io/etcd/client/pkg/v3 v3.5.0/go.mod h1:IJHfcCEKxYu1Os13ZdwCwIUTUVGYTSAM3YSwc9/Ac1g= +go.etcd.io/etcd/client/pkg/v3 v3.5.1/go.mod h1:IJHfcCEKxYu1Os13ZdwCwIUTUVGYTSAM3YSwc9/Ac1g= +go.etcd.io/etcd/client/v2 v2.305.0/go.mod h1:h9puh54ZTgAKtEbut2oe9P4L/oqKCVB6xsXlzd7alYQ= +go.etcd.io/etcd/client/v2 v2.305.1/go.mod h1:pMEacxZW7o8pg4CrFE7pquyCJJzZvkvdD2RibOCCCGs= +go.etcd.io/etcd/client/v3 v3.5.0/go.mod h1:AIKXXVX/DQXtfTEqBryiLTUXwON+GuvO6Z7lLS/oTh0= +go.etcd.io/etcd/pkg/v3 v3.5.0/go.mod h1:UzJGatBQ1lXChBkQF0AuAtkRQMYnHubxAEYIrC3MSsE= +go.etcd.io/etcd/raft/v3 v3.5.0/go.mod h1:UFOHSIvO/nKwd4lhkwabrTD3cqW5yVyYYf/KlD00Szc= +go.etcd.io/etcd/server/v3 v3.5.0/go.mod h1:3Ah5ruV+M+7RZr0+Y/5mNLwC+eQlni+mQmOVdCRJoS4= +go.opencensus.io v0.21.0/go.mod h1:mSImk1erAIZhrmZN+AvHh14ztQfjbGwt4TtuofqLduU= +go.opencensus.io v0.22.0/go.mod h1:+kGneAE2xo2IficOXnaByMWTGM9T73dGwxeWcUqIpI8= +go.opencensus.io v0.22.2/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= +go.opencensus.io v0.22.3/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= +go.opencensus.io v0.22.4/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= +go.opencensus.io v0.22.5/go.mod h1:5pWMHQbX5EPX2/62yrJeAkowc+lfs/XD7Uxpq3pI6kk= +go.opencensus.io v0.23.0/go.mod h1:XItmlyltB5F7CS4xOC1DcqMoFqwtC6OG2xF7mCv7P7E= +go.opentelemetry.io/contrib v0.20.0/go.mod h1:G/EtFaa6qaN7+LxqfIAT3GiZa7Wv5DTBUzl5H4LY0Kc= +go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.20.0/go.mod h1:oVGt1LRbBOBq1A5BQLlUg9UaU/54aiHw8cgjV3aWZ/E= +go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.20.0/go.mod h1:2AboqHi0CiIZU0qwhtUfCYD1GeUzvvIXWNkhDt7ZMG4= +go.opentelemetry.io/otel v0.20.0/go.mod h1:Y3ugLH2oa81t5QO+Lty+zXf8zC9L26ax4Nzoxm/dooo= +go.opentelemetry.io/otel/exporters/otlp v0.20.0/go.mod h1:YIieizyaN77rtLJra0buKiNBOm9XQfkPEKBeuhoMwAM= +go.opentelemetry.io/otel/metric v0.20.0/go.mod h1:598I5tYlH1vzBjn+BTuhzTCSb/9debfNp6R3s7Pr1eU= +go.opentelemetry.io/otel/oteltest v0.20.0/go.mod h1:L7bgKf9ZB7qCwT9Up7i9/pn0PWIa9FqQ2IQ8LoxiGnw= +go.opentelemetry.io/otel/sdk v0.20.0/go.mod h1:g/IcepuwNsoiX5Byy2nNV0ySUF1em498m7hBWC279Yc= +go.opentelemetry.io/otel/sdk/export/metric v0.20.0/go.mod h1:h7RBNMsDJ5pmI1zExLi+bJK+Dr8NQCh0qGhm1KDnNlE= +go.opentelemetry.io/otel/sdk/metric v0.20.0/go.mod h1:knxiS8Xd4E/N+ZqKmUPf3gTTZ4/0TjTXukfxjzSTpHE= +go.opentelemetry.io/otel/trace v0.20.0/go.mod h1:6GjCW8zgDjwGHGa6GkyeB8+/5vjT16gUEi0Nf1iBdgw= go.opentelemetry.io/proto/otlp v0.7.0/go.mod h1:PqfVotwruBrMGOCsRd/89rSnXhoiJIqeYNgFYFoEGnI= +go.uber.org/atomic v1.4.0/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= go.uber.org/atomic v1.7.0 h1:ADUqmZGgLDDfbSL9ZmPxKTybcoEYHgpYfELNoN+7hsw= go.uber.org/atomic v1.7.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc= +go.uber.org/goleak v1.1.10/go.mod h1:8a7PlsEVH3e/a/GLqe5IIrQx6GzcnRmZEufDUTk4A7A= go.uber.org/goleak v1.1.11-0.20210813005559-691160354723/go.mod h1:cwTWslyiVhfpKIDGSZEM2HlOvcqm+tG4zioyIeLoqMQ= go.uber.org/goleak v1.1.12 h1:gZAh5/EyT/HQwlpkCy6wTpqfH9H8Lz8zbm3dZh+OyzA= +go.uber.org/goleak v1.1.12/go.mod h1:cwTWslyiVhfpKIDGSZEM2HlOvcqm+tG4zioyIeLoqMQ= +go.uber.org/multierr v1.1.0/go.mod h1:wR5kodmAFQ0UK8QlbwjlSNy0Z68gJhDJUG5sjR94q/0= go.uber.org/multierr v1.6.0 h1:y6IPFStTAIT5Ytl7/XYmHvzXQ7S3g/IeZW9hyZ5thw4= go.uber.org/multierr v1.6.0/go.mod h1:cdWPpRnG4AhwMwsgIHip0KRBQjJy5kYEpYjJxpXp9iU= +go.uber.org/zap v1.10.0/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q= +go.uber.org/zap v1.17.0/go.mod h1:MXVU+bhUf/A7Xi2HNOnopQOrmycQ5Ih87HtOu4q5SSo= +go.uber.org/zap v1.19.0/go.mod h1:xg/QME4nWcxGxrpdeYfq7UvYrLh66cuVKdrbD1XF/NI= go.uber.org/zap v1.19.1 h1:ue41HOKd1vGURxrmeKIgELGb3jPW9DMUDGtsinblHwI= go.uber.org/zap v1.19.1/go.mod h1:j3DNczoxDZroyBnOT1L/Q79cfUMGZxlv/9dzN7SM1rI= +golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20180910181607-0e37d006457b/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= +golang.org/x/crypto v0.0.0-20181029021203-45a5f77698d3/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= +golang.org/x/crypto v0.0.0-20190510104115-cbcb75029529/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= +golang.org/x/crypto v0.0.0-20190605123033-f99c8df09eb5/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20190820162420-60c769a6c586/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= +golang.org/x/crypto v0.0.0-20190923035154-9ee001bba392/go.mod h1:/lpIB1dKB+9EgE3H3cr1v9wB50oz8l4C4h62xy7jSTY= golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= +golang.org/x/crypto v0.0.0-20201002170205-7f63de1d35b0/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= +golang.org/x/crypto v0.0.0-20210817164053-32db794688a5/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= golang.org/x/crypto v0.0.0-20211215153901-e495a2d5b3d3 h1:0es+/5331RGQPcXlMfP+WrnIIS6dNnNRe0WB02W0F4M= golang.org/x/crypto v0.0.0-20211215153901-e495a2d5b3d3/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= +golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= +golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8= +golang.org/x/exp v0.0.0-20190829153037-c13cbed26979/go.mod h1:86+5VVa7VpoJ4kLfm080zCjGlMRFzhUhsZKEZO7MGek= +golang.org/x/exp v0.0.0-20191030013958-a1ab85dbe136/go.mod h1:JXzH8nQsPlswgeRAPE3MuO9GYsAcnJvJ4vnMwN/5qkY= +golang.org/x/exp v0.0.0-20191129062945-2f5052295587/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= +golang.org/x/exp v0.0.0-20191227195350-da58074b4299/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= +golang.org/x/exp v0.0.0-20200119233911-0405dc783f0a/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= +golang.org/x/exp v0.0.0-20200207192155-f17229e696bd/go.mod h1:J/WKrq2StrnmMY6+EHIKF9dgMWnmCNThgcyBT1FY9mM= +golang.org/x/exp v0.0.0-20200224162631-6cc2880d07d6/go.mod h1:3jZMyOhIsHpP37uCMkUooju7aAi5cS1Q23tOzKc+0MU= +golang.org/x/image v0.0.0-20190227222117-0694c2d4d067/go.mod h1:kZ7UVZpmo3dzQBMxlp+ypCbDeSB+sBbTgSJuh5dn5js= +golang.org/x/image v0.0.0-20190802002840-cff245a6509b/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0= golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvxsM5YxQ5yQlVC4a0KAMCusXpPoU= +golang.org/x/lint v0.0.0-20190301231843-5614ed5bae6f/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= +golang.org/x/lint v0.0.0-20190409202823-959b441ac422/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= +golang.org/x/lint v0.0.0-20190909230951-414d861bb4ac/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= golang.org/x/lint v0.0.0-20190930215403-16217165b5de/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= +golang.org/x/lint v0.0.0-20191125180803-fdd1cda4f05f/go.mod h1:5qLYkcX4OjUUV8bRuDixDT3tpyyb+LUpUlRWLxfhWrs= +golang.org/x/lint v0.0.0-20200130185559-910be7a94367/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= +golang.org/x/lint v0.0.0-20200302205851-738671d3881b/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= +golang.org/x/lint v0.0.0-20201208152925-83fdc39ff7b5/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= +golang.org/x/lint v0.0.0-20210508222113-6edffad5e616/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= +golang.org/x/mobile v0.0.0-20190312151609-d3739f865fa6/go.mod h1:z+o9i4GpDbdi3rU15maQ/Ox0txvL9dWGYEHz965HBQE= +golang.org/x/mobile v0.0.0-20190719004257-d2bd2a29d028/go.mod h1:E/iHnbuqvinMTCcRqshq8CkpyQDoeVncDDYHnLhea+o= +golang.org/x/mod v0.0.0-20190513183733-4bf6d317e70e/go.mod h1:mXi4GBBbnImb6dmsKGUJ2LatrhH/nqhxcFungHvyanc= +golang.org/x/mod v0.1.0/go.mod h1:0QHyrYULN0/3qlju5TqG8bIK38QM8yzMo5ekMj3DlcY= +golang.org/x/mod v0.1.1-0.20191105210325-c90efee705ee/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg= +golang.org/x/mod v0.1.1-0.20191107180719-034126e5016b/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg= golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= +golang.org/x/mod v0.4.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= +golang.org/x/mod v0.4.1/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= +golang.org/x/mod v0.5.0/go.mod h1:5OXOZSfqPIIbmVBIIKWRFfZjPR0E5r58TLhUjH0a2Ro= golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20181023162649-9b4f9f5ad519/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20181114220301-adae6a3d119a/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20181201002055-351d144fa1fc/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20181220203305-927f97764cc3/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/net v0.0.0-20190501004415-9ce7a6920f09/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/net v0.0.0-20190503192946-f4e77d36d62c/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/net v0.0.0-20190603091049-60506f45cf65/go.mod h1:HSz+uSET+XFnRR8LxR5pz3Of3rY3CfYBVs4xY44aLks= +golang.org/x/net v0.0.0-20190613194153-d28f0bde5980/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20190628185345-da137c7871d7/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20190724013045-ca1201d0de80/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20190827160401-ba9fcec4b297/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20190923162816-aa69164e4478/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20191209160850-c0dbc17a3553/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20200114155413-6afb5195e5aa/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20200202094626-16171245cfb2/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20200222125558-5a598a2470a0/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20200301022130-244492dfa37a/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20200324143707-d3edc9973b7e/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= +golang.org/x/net v0.0.0-20200501053045-e0ff5e5a1de5/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= +golang.org/x/net v0.0.0-20200506145744-7e3656a0809f/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= +golang.org/x/net v0.0.0-20200513185701-a91f0712d120/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= +golang.org/x/net v0.0.0-20200520004742-59133d7f0dd7/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= +golang.org/x/net v0.0.0-20200520182314-0ba52f642ac2/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= +golang.org/x/net v0.0.0-20200625001655-4c5254603344/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= +golang.org/x/net v0.0.0-20200707034311-ab3426394381/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= golang.org/x/net v0.0.0-20200822124328-c89045814202/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= +golang.org/x/net v0.0.0-20201031054903-ff519b6c9102/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= +golang.org/x/net v0.0.0-20201110031124-69a78807bb2b/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= +golang.org/x/net v0.0.0-20201202161906-c7110b5ffcbb/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= +golang.org/x/net v0.0.0-20201209123823-ac852fbbde11/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= +golang.org/x/net v0.0.0-20210119194325-5f4716e94777/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= +golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= +golang.org/x/net v0.0.0-20210316092652-d523dce5a7f4/go.mod h1:RBQZq4jEuRlivfhVLdyRGr576XBO4/greRjx4P4O3yc= golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4/go.mod h1:p54w0d4576C0XHj96bSt6lcn1PtDYWL6XObtHCRCNQM= +golang.org/x/net v0.0.0-20210410081132-afb366fc7cd1/go.mod h1:9tjilg8BloeKEkVJvy7fQ90B1CfIiPueXVOjqfkSzI8= +golang.org/x/net v0.0.0-20210428140749-89ef3d95e781/go.mod h1:OJAsFXCWl8Ukc7SiCT/9KSuxbyM7479/AVlXFRxuMCk= +golang.org/x/net v0.0.0-20210503060351-7fd8e65b6420/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= +golang.org/x/net v0.0.0-20210525063256-abc453219eb5/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= +golang.org/x/net v0.0.0-20210805182204-aaa1db679c0d/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= +golang.org/x/net v0.0.0-20210813160813-60bc85c4be6d/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= +golang.org/x/net v0.0.0-20210825183410-e898025ed96a/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= +golang.org/x/net v0.0.0-20210916014120-12bc252f5db8/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2 h1:CIJ76btIcR3eFI5EgSo6k1qKw9KJexJuRLI9G7Hp5wE= golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= +golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= +golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= +golang.org/x/oauth2 v0.0.0-20191202225959-858c2ad4c8b6/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= +golang.org/x/oauth2 v0.0.0-20200902213428-5d25da1a8d43/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= +golang.org/x/oauth2 v0.0.0-20201109201403-9fd604954f58/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= +golang.org/x/oauth2 v0.0.0-20201208152858-08078c50e5b5/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= +golang.org/x/oauth2 v0.0.0-20210218202405-ba52d332ba99/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= +golang.org/x/oauth2 v0.0.0-20210220000619-9bb904979d93/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= +golang.org/x/oauth2 v0.0.0-20210313182246-cd4f82c27b84/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= +golang.org/x/oauth2 v0.0.0-20210402161424-2e8d93401602/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= +golang.org/x/oauth2 v0.0.0-20210514164344-f6687ab2804c/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= +golang.org/x/oauth2 v0.0.0-20210628180205-a41e5a781914/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= +golang.org/x/oauth2 v0.0.0-20210805134026-6f1e6394065a/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= +golang.org/x/oauth2 v0.0.0-20210819190943-2bc19b11175f/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= +golang.org/x/oauth2 v0.0.0-20211005180243-6b3c2da341f1/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= +golang.org/x/oauth2 v0.0.0-20211104180415-d3ed0bb246c8/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20190227155943-e225da77a7e6/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20200317015054-43a5402ce75a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20200625203802-6e8e738ad208/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20201207232520-09787c993a3a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sys v0.0.0-20180823144017-11551d06cbcc/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20181026203630-95b1ffbd15a5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20181107165924-66b7b1311ac8/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20181116152217-5ac8a444bdc5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20190222072716-a9d3bda3a223/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20190312061237-fead79001313/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190422165155-953cdadca894/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190502145724-3ef323f4f1fd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190507160741-ecd444e8653b/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190606165138-5da285871e9c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190624142023-c5567b49c5d0/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190726091711-fc99dfbffb4e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190904154756-749cb33beabd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190922100055-0a153f010e69/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190924154521-2837fb4f24fe/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191001151750-bb3f8db39f24/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191005200804-aed5e4c7ecf9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191008105621-543471e840be/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191026070338-33540a1f6037/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191120155948-bd437916bb0e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191204072324-ce4227a45e2e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191228213918-04cbcbbfeed8/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200106162015-b016eb3dc98e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200113162924-86b910548bc1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200116001909-b77594299b42/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200122134326-e047566fdf82/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200124204421-9fbb57f87de9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200202164722-d101bd2416d5/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200212091648-12a6c2dcc1e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200223170610-d5e6a3e2c0ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200302150141-5c8b2ff67527/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200331124033-c3d80250170d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200501052902-10377860bb8e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200511232937-7e40ca221e25/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200515095857-1151b9dac4a9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200519105757-fe76b779f299/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200523222454-059865788121/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200615200032-f1bc736245b1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200625212154-ddb9806d33ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200803210538-64077c9b5642/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200831180312-196b9ba8737a/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200905004654-be1d3432aa8f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200923182605-d9f96fdee20d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20201201145000-ef89a241ccb3/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210104204734-6f8348627aad/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210112080510-489259a85091/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210119212857-b64e53b001e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210124154548-22da62e12c0c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210220050731-9a76102bfb43/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210303074136-134d130e1a04/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210305230114-8fe3ee5dd75b/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210315160823-c6e025ad8005/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210320140829-1e4c9ba3b0c4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210330210617-4fbd30eecc44/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210403161142-5e06dd20ab57/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210510120138-977fb7262007/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20210514084401-e8d321eab015/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20210603081109-ebe580a85c40/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20210603125802-9665404d3644/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20210616094352-59db8d763f22/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20210806184541-e5e7981a1069/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20210809222454-d867a43fc93e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20210816183151-1e6c022a8912/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20210823070655-63515b42dcdf/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20210831042530-f4d43177bf5e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20210908233432-aa78b53d3365/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210927094055-39ccf1dd6fa6/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20211007075335-d3039528d8ac/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20211029165221-6e7872819dc8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20211123173158-ef496fb156ab/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20211124211545-fe61309f8881/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20211210111614-af8b64212486/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20211216021012-1d35b9e2eb4e h1:fLOSk5Q00efkSvAm+4xcoXD+RRmLmmulPn5I3Y9F2EM= golang.org/x/sys v0.0.0-20211216021012-1d35b9e2eb4e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= +golang.org/x/term v0.0.0-20210615171337-6886f2dfbf5b/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= +golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= +golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= +golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= +golang.org/x/text v0.3.4/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.5/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.7 h1:olpwvP2KacW1ZWvsR7uQhoyTYvKAupfQrRGBFM352Gk= golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= +golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= +golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= +golang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= +golang.org/x/time v0.0.0-20210220033141-f8bda1e9f3ba/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= +golang.org/x/time v0.0.0-20210723032227-1f47c861a9ac/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= +golang.org/x/tools v0.0.0-20180221164845-07fd8470d635/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/tools v0.0.0-20181030221726-6c7e314b6563/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY= golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= +golang.org/x/tools v0.0.0-20190312151545-0bb0c0a6e846/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= +golang.org/x/tools v0.0.0-20190312170243-e65039ee4138/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= +golang.org/x/tools v0.0.0-20190328211700-ab21143f2384/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= +golang.org/x/tools v0.0.0-20190425150028-36563e24a262/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= +golang.org/x/tools v0.0.0-20190506145303-2d16b83fe98c/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= golang.org/x/tools v0.0.0-20190524140312-2c0ae7006135/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= +golang.org/x/tools v0.0.0-20190606124116-d0a3d012864b/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= +golang.org/x/tools v0.0.0-20190621195816-6e04913cbbac/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= +golang.org/x/tools v0.0.0-20190624222133-a101b041ded4/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= +golang.org/x/tools v0.0.0-20190628153133-6cdbf07be9d0/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= +golang.org/x/tools v0.0.0-20190816200558-6889da9d5479/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20190907020128-2ca718005c18/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20190911174233-4f2ddba30aff/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191012152004-8de300cfc20a/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191108193012-7d206e10da11/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191112195655-aa38f8e97acc/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191113191852-77e3bb0ad9e7/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191115202509-3a792d9c32b2/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191125144606-a911d9008d1f/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191130070609-6e064ea0cf2d/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191216173652-a0e659d51361/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20191227053925-7b8e75db28f4/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200117161641-43d50277825c/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200122220014-bf1340f18c4a/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200130002326-2f3ba24bd6e7/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200204074204-1cc6d1ef6c74/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200207183749-b753a1ba74fa/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200212150539-ea181f53ac56/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200224181240-023911ca70b2/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200227222343-706bc42d1f0d/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200304193943-95d2e580d8eb/go.mod h1:o4KQGtdN14AW+yjsvvwRTJJuXz8XRtIHtEnmAXLyFUw= +golang.org/x/tools v0.0.0-20200312045724-11d5b4c81c7d/go.mod h1:o4KQGtdN14AW+yjsvvwRTJJuXz8XRtIHtEnmAXLyFUw= +golang.org/x/tools v0.0.0-20200331025713-a30bf2db82d4/go.mod h1:Sl4aGygMT6LrqrWclx+PTx3U+LnKx/seiNR+3G19Ar8= +golang.org/x/tools v0.0.0-20200501065659-ab2804fb9c9d/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= +golang.org/x/tools v0.0.0-20200505023115-26f46d2f7ef8/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= +golang.org/x/tools v0.0.0-20200512131952-2bc93b1c0c88/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= +golang.org/x/tools v0.0.0-20200515010526-7d3b6ebf133d/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= +golang.org/x/tools v0.0.0-20200618134242-20370b0cb4b2/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= golang.org/x/tools v0.0.0-20200619180055-7c47624df98f/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= +golang.org/x/tools v0.0.0-20200729194436-6467de6f59a7/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= +golang.org/x/tools v0.0.0-20200804011535-6c149bb5ef0d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= +golang.org/x/tools v0.0.0-20200825202427-b303f430e36d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= +golang.org/x/tools v0.0.0-20200904185747-39188db58858/go.mod h1:Cj7w3i3Rnn0Xh82ur9kSqwfTHTeVxaDqrfMjpcNT6bE= +golang.org/x/tools v0.0.0-20201110124207-079ba7bd75cd/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= +golang.org/x/tools v0.0.0-20201201161351-ac6f37ff4c2a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= +golang.org/x/tools v0.0.0-20201208233053-a543418bbed2/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= +golang.org/x/tools v0.0.0-20201224043029-2b0845dc783e/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= +golang.org/x/tools v0.0.0-20210105154028-b0ab187a4818/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= +golang.org/x/tools v0.1.0/go.mod h1:xkSsbof2nBLbhDlRMhhhyNLN/zl3eTqcnHD5viDpcZ0= +golang.org/x/tools v0.1.1/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= +golang.org/x/tools v0.1.2/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= +golang.org/x/tools v0.1.3/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= +golang.org/x/tools v0.1.4/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= golang.org/x/tools v0.1.5/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= +golang.org/x/tools v0.1.6-0.20210820212750-d4cc65f0b2ff/go.mod h1:YD9qOF0M9xpSpdWTBbzEl5e/RnCefISl8E5Noe10jFM= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1 h1:go1bK/D/BFZV2I8cIQd1NKEZ+0owSTG1fDTci4IqFcE= golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +gomodules.xyz/jsonpatch/v2 v2.2.0/go.mod h1:WXp+iVDkoLQqPudfQ9GBlwB2eZ5DKOnjQZCYdOS8GPY= +google.golang.org/api v0.4.0/go.mod h1:8k5glujaEP+g9n7WNsDg8QP6cUVNI86fCNMcbazEtwE= +google.golang.org/api v0.7.0/go.mod h1:WtwebWUNSVBH/HAw79HIFXZNqEvBhG+Ra+ax0hx3E3M= +google.golang.org/api v0.8.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg= +google.golang.org/api v0.9.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg= +google.golang.org/api v0.13.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= +google.golang.org/api v0.14.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= +google.golang.org/api v0.15.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= +google.golang.org/api v0.17.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= +google.golang.org/api v0.18.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= +google.golang.org/api v0.19.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= +google.golang.org/api v0.20.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= +google.golang.org/api v0.22.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= +google.golang.org/api v0.24.0/go.mod h1:lIXQywCXRcnZPGlsd8NbLnOjtAoL6em04bJ9+z0MncE= +google.golang.org/api v0.28.0/go.mod h1:lIXQywCXRcnZPGlsd8NbLnOjtAoL6em04bJ9+z0MncE= +google.golang.org/api v0.29.0/go.mod h1:Lcubydp8VUV7KeIHD9z2Bys/sm/vGKnG1UHuDBSrHWM= +google.golang.org/api v0.30.0/go.mod h1:QGmEvQ87FHZNiUVJkT14jQNYJ4ZJjdRF23ZXz5138Fc= +google.golang.org/api v0.35.0/go.mod h1:/XrVsuzM0rZmrsbjJutiuftIzeuTQcEeaYcSk/mQ1dg= +google.golang.org/api v0.36.0/go.mod h1:+z5ficQTmoYpPn8LCUNVpK5I7hwkpjbcgqA7I34qYtE= +google.golang.org/api v0.40.0/go.mod h1:fYKFpnQN0DsDSKRVRcQSDQNtqWPfM9i+zNPxepjRCQ8= +google.golang.org/api v0.41.0/go.mod h1:RkxM5lITDfTzmyKFPt+wGrCJbVfniCr2ool8kTBzRTU= +google.golang.org/api v0.43.0/go.mod h1:nQsDGjRXMo4lvh5hP0TKqF244gqhGcr/YSIykhUk/94= +google.golang.org/api v0.44.0/go.mod h1:EBOGZqzyhtvMDoxwS97ctnh0zUmYY6CxqXsc1AvkYD8= +google.golang.org/api v0.47.0/go.mod h1:Wbvgpq1HddcWVtzsVLyfLp8lDg6AA241LmgIL59tHXo= +google.golang.org/api v0.48.0/go.mod h1:71Pr1vy+TAZRPkPs/xlCf5SsU8WjuAWv1Pfjbtukyy4= +google.golang.org/api v0.50.0/go.mod h1:4bNT5pAuq5ji4SRZm+5QIkjny9JAyVD/3gaSihNefaw= +google.golang.org/api v0.51.0/go.mod h1:t4HdrdoNgyN5cbEfm7Lum0lcLDLiise1F8qDKX00sOU= +google.golang.org/api v0.54.0/go.mod h1:7C4bFFOvVDGXjfDTAsgGwDgAxRDeQ4X8NvUedIt6z3k= +google.golang.org/api v0.55.0/go.mod h1:38yMfeP1kfjsl8isn0tliTjIb1rJXcQi4UXlbqivdVE= +google.golang.org/api v0.56.0/go.mod h1:38yMfeP1kfjsl8isn0tliTjIb1rJXcQi4UXlbqivdVE= +google.golang.org/api v0.57.0/go.mod h1:dVPlbZyBo2/OjBpmvNdpn2GRm6rPy75jyU7bmhdrMgI= +google.golang.org/api v0.59.0/go.mod h1:sT2boj7M9YJxZzgeZqXogmhfmRWDtPzT31xkieUbuZU= +google.golang.org/api v0.61.0/go.mod h1:xQRti5UdCmoCEqFxcz93fTl338AVqDgyaDRuOZ3hg9I= +google.golang.org/api v0.63.0/go.mod h1:gs4ij2ffTRXwuzzgJl/56BdwJaA194ijkfn++9tDuPo= google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= +google.golang.org/appengine v1.5.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= +google.golang.org/appengine v1.6.1/go.mod h1:i06prIuMbXzDqacNJfV5OdTW448YApPu5ww/cMBSeb0= +google.golang.org/appengine v1.6.5/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= +google.golang.org/appengine v1.6.6/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= +google.golang.org/appengine v1.6.7/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= +google.golang.org/genproto v0.0.0-20190307195333-5fe7a883aa19/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= +google.golang.org/genproto v0.0.0-20190418145605-e7d98fc518a7/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= +google.golang.org/genproto v0.0.0-20190425155659-357c62f0e4bb/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= +google.golang.org/genproto v0.0.0-20190502173448-54afdca5d873/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= +google.golang.org/genproto v0.0.0-20190801165951-fa694d86fc64/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= +google.golang.org/genproto v0.0.0-20190911173649-1774047e7e51/go.mod h1:IbNlFCBrqXvoKpeg0TB2l7cyZUmoaFKYIwrEpbDKLA8= +google.golang.org/genproto v0.0.0-20191108220845-16a3f7862a1a/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= +google.golang.org/genproto v0.0.0-20191115194625-c23dd37a84c9/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= +google.golang.org/genproto v0.0.0-20191216164720-4f79533eabd1/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= +google.golang.org/genproto v0.0.0-20191230161307-f3c370f40bfb/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= +google.golang.org/genproto v0.0.0-20200115191322-ca5a22157cba/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= +google.golang.org/genproto v0.0.0-20200122232147-0452cf42e150/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= +google.golang.org/genproto v0.0.0-20200204135345-fa8e72b47b90/go.mod h1:GmwEX6Z4W5gMy59cAlVYjN9JhxgbQH6Gn+gFDQe2lzA= +google.golang.org/genproto v0.0.0-20200212174721-66ed5ce911ce/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200224152610-e50cd9704f63/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200228133532-8c2c7df3a383/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200305110556-506484158171/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200312145019-da6875a35672/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200331122359-1ee6d9798940/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200423170343-7949de9c1215/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200430143042-b979b6f78d84/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200511104702-f5ebc3bea380/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= google.golang.org/genproto v0.0.0-20200513103714-09dca8ec2884/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200515170657-fc4c6c6a6587/go.mod h1:YsZOwe1myG/8QRHRsmBRE1LrgQY60beZKjly0O1fX9U= google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013/go.mod h1:NbSheEEYHJ7i3ixzK3sjbqSGDJWnxyFXZblF3eUsNvo= +google.golang.org/genproto v0.0.0-20200618031413-b414f8b61790/go.mod h1:jDfRM7FcilCzHH/e9qn6dsT145K34l5v+OpcnNgKAAA= +google.golang.org/genproto v0.0.0-20200729003335-053ba62fc06f/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20200804131852-c06518451d9c/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20200825200019-8632dd797987/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20200904004341-0bd0a958aa1d/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20201019141844-1ed22bb0c154/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20201102152239-715cce707fb0/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20201109203340-2640f1f9cdfb/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20201201144952-b05cb90ed32e/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20201210142538-e3217bee35cc/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20201214200347-8c77b98c765d/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20210222152913-aa3ee6e6a81c/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20210303154014-9728d6b83eeb/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20210310155132-4ce2db91004e/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20210319143718-93e7006c17a6/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20210402141018-6c239bbf2bb1/go.mod h1:9lPAdzaEmUacj36I+k7YKbEc5CXzPIeORRgDAUOu28A= +google.golang.org/genproto v0.0.0-20210513213006-bf773b8c8384/go.mod h1:P3QM42oQyzQSnHPnZ/vqoCdDmzH28fzWByN9asMeM8A= +google.golang.org/genproto v0.0.0-20210602131652-f16073e35f0c/go.mod h1:UODoCrxHCcBojKKwX1terBiRUaqAsFqJiF615XL43r0= +google.golang.org/genproto v0.0.0-20210604141403-392c879c8b08/go.mod h1:UODoCrxHCcBojKKwX1terBiRUaqAsFqJiF615XL43r0= +google.golang.org/genproto v0.0.0-20210608205507-b6d2f5bf0d7d/go.mod h1:UODoCrxHCcBojKKwX1terBiRUaqAsFqJiF615XL43r0= +google.golang.org/genproto v0.0.0-20210624195500-8bfb893ecb84/go.mod h1:SzzZ/N+nwJDaO1kznhnlzqS8ocJICar6hYhVyhi++24= +google.golang.org/genproto v0.0.0-20210713002101-d411969a0d9a/go.mod h1:AxrInvYm1dci+enl5hChSFPOmmUF1+uAa/UsgNRWd7k= +google.golang.org/genproto v0.0.0-20210716133855-ce7ef5c701ea/go.mod h1:AxrInvYm1dci+enl5hChSFPOmmUF1+uAa/UsgNRWd7k= +google.golang.org/genproto v0.0.0-20210728212813-7823e685a01f/go.mod h1:ob2IJxKrgPT52GcgX759i1sleT07tiKowYBGbczaW48= +google.golang.org/genproto v0.0.0-20210805201207-89edb61ffb67/go.mod h1:ob2IJxKrgPT52GcgX759i1sleT07tiKowYBGbczaW48= +google.golang.org/genproto v0.0.0-20210813162853-db860fec028c/go.mod h1:cFeNkxwySK631ADgubI+/XFU/xp8FD5KIVV4rj8UC5w= +google.golang.org/genproto v0.0.0-20210821163610-241b8fcbd6c8/go.mod h1:eFjDcFEctNawg4eG61bRv87N7iHBWyVhJu7u1kqDUXY= +google.golang.org/genproto v0.0.0-20210828152312-66f60bf46e71/go.mod h1:eFjDcFEctNawg4eG61bRv87N7iHBWyVhJu7u1kqDUXY= +google.golang.org/genproto v0.0.0-20210831024726-fe130286e0e2/go.mod h1:eFjDcFEctNawg4eG61bRv87N7iHBWyVhJu7u1kqDUXY= +google.golang.org/genproto v0.0.0-20210903162649-d08c68adba83/go.mod h1:eFjDcFEctNawg4eG61bRv87N7iHBWyVhJu7u1kqDUXY= +google.golang.org/genproto v0.0.0-20210909211513-a8c4777a87af/go.mod h1:eFjDcFEctNawg4eG61bRv87N7iHBWyVhJu7u1kqDUXY= +google.golang.org/genproto v0.0.0-20210924002016-3dee208752a0/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= +google.golang.org/genproto v0.0.0-20211008145708-270636b82663/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= +google.golang.org/genproto v0.0.0-20211028162531-8db9c33dc351/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= +google.golang.org/genproto v0.0.0-20211118181313-81c1377c94b1/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= +google.golang.org/genproto v0.0.0-20211206160659-862468c7d6e0/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= google.golang.org/genproto v0.0.0-20211208223120-3a66f561d7aa h1:I0YcKz0I7OAhddo7ya8kMnvprhcWM045PmkBdMO9zN0= google.golang.org/genproto v0.0.0-20211208223120-3a66f561d7aa/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= +google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38= +google.golang.org/grpc v1.21.1/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= google.golang.org/grpc v1.25.1/go.mod h1:c3i+UQWmh7LiEpx4sFZnkU36qjEYZ0imhYfXVyQciAY= +google.golang.org/grpc v1.26.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= google.golang.org/grpc v1.27.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= +google.golang.org/grpc v1.27.1/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= +google.golang.org/grpc v1.28.0/go.mod h1:rpkK4SK4GF4Ach/+MFLZUBavHOvF2JJB5uozKKal+60= +google.golang.org/grpc v1.29.1/go.mod h1:itym6AZVZYACWQqET3MqgPpjcuV5QH3BxFS3IjizoKk= +google.golang.org/grpc v1.30.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= +google.golang.org/grpc v1.31.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= +google.golang.org/grpc v1.31.1/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= google.golang.org/grpc v1.33.1/go.mod h1:fr5YgcSWrqhRRxogOsw7RzIpsmvOZ6IcH4kBYTpR3n0= +google.golang.org/grpc v1.33.2/go.mod h1:JMHMWHQWaTccqQQlmk3MJZS+GWXOdAesneDmEnv2fbc= +google.golang.org/grpc v1.34.0/go.mod h1:WotjhfgOW/POjDeRt8vscBtXq+2VjORFy659qA51WJ8= +google.golang.org/grpc v1.35.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= google.golang.org/grpc v1.36.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= +google.golang.org/grpc v1.36.1/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= +google.golang.org/grpc v1.37.0/go.mod h1:NREThFqKR1f3iQ6oBuvc5LadQuXVGo9rkm5ZGrQdJfM= +google.golang.org/grpc v1.37.1/go.mod h1:NREThFqKR1f3iQ6oBuvc5LadQuXVGo9rkm5ZGrQdJfM= +google.golang.org/grpc v1.38.0/go.mod h1:NREThFqKR1f3iQ6oBuvc5LadQuXVGo9rkm5ZGrQdJfM= +google.golang.org/grpc v1.39.0/go.mod h1:PImNr+rS9TWYb2O4/emRugxiyHZ5JyHW5F+RPnDzfrE= +google.golang.org/grpc v1.39.1/go.mod h1:PImNr+rS9TWYb2O4/emRugxiyHZ5JyHW5F+RPnDzfrE= google.golang.org/grpc v1.40.0/go.mod h1:ogyxbiOoUXAkP+4+xa6PZSE9DZgIHtSpzjDTB9KAK34= +google.golang.org/grpc v1.40.1/go.mod h1:ogyxbiOoUXAkP+4+xa6PZSE9DZgIHtSpzjDTB9KAK34= google.golang.org/grpc v1.43.0 h1:Eeu7bZtDZ2DpRCsLhUlcrLnvYaMK1Gz86a+hMVvELmM= google.golang.org/grpc v1.43.0/go.mod h1:k+4IHHFw41K8+bbowsex27ge2rCb65oeWqe4jJ590SU= +google.golang.org/grpc/cmd/protoc-gen-go-grpc v1.1.0/go.mod h1:6Kw0yEErY5E/yWrBtf03jp27GLLJujG4z/JK95pnjjw= google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM= @@ -273,31 +1043,80 @@ google.golang.org/protobuf v1.21.0/go.mod h1:47Nbq4nVaFHyn7ilMalzfO3qCViNmqZ2kzi google.golang.org/protobuf v1.22.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= google.golang.org/protobuf v1.23.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= google.golang.org/protobuf v1.23.1-0.20200526195155-81db48ad09cc/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= +google.golang.org/protobuf v1.24.0/go.mod h1:r/3tXBNzIEhYS9I1OUVjXDlt8tc493IdKGjtUeSXeh4= google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlbajtzgsN7c= google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= google.golang.org/protobuf v1.27.1 h1:SnqbnDw1V7RiZcXPx5MEeqPv2s79L9i7BJUlG/+RurQ= google.golang.org/protobuf v1.27.1/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= +gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= -gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127 h1:qIbj1fsPNlZgppZ+VLlY7N33q108Sa+fhmuc+sWQYwY= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/check.v1 v1.0.0-20200227125254-8fa46927fb4f h1:BLraFXnmrev5lT+xlilqcH8XK9/i0At2xKjWk4p6zsU= +gopkg.in/check.v1 v1.0.0-20200227125254-8fa46927fb4f/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= +gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys= +gopkg.in/inf.v0 v0.9.1/go.mod h1:cWUDdTG/fYaXco+Dcufb5Vnc6Gp2YChqWtbxRZE0mXw= +gopkg.in/ini.v1 v1.51.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= +gopkg.in/ini.v1 v1.62.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= gopkg.in/ini.v1 v1.66.2 h1:XfR1dOYubytKy4Shzc2LHrrGhU0lDCfDGG1yLPmpgsI= gopkg.in/ini.v1 v1.66.2/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= +gopkg.in/natefinch/lumberjack.v2 v2.0.0/go.mod h1:l0ndWWf7gzL7RNwBG7wST/UCcT4T24xpD6X8LsfU/+k= +gopkg.in/resty.v1 v1.12.0/go.mod h1:mDo4pnntr5jdWRML875a/NmxYqAlA73dVijT2AXvQQo= +gopkg.in/square/go-jose.v2 v2.2.2/go.mod h1:M9dMgbHiYLoDGQrXy7OpJDJWiKiU//h+vD76mk0e1AI= gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 h1:uRGJdciOHaEIrze2W8Q3AKkepLTh2hOroT7a+7czfdQ= +gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWDmTeBkI65Dw0HsyUHuEVlX15mw= +gopkg.in/yaml.v2 v2.0.0-20170812160011-eb3733d160e7/go.mod h1:JAlM8MvJe8wmxCU4Bli9HhUf9+ttbYbLASfIpnQbh74= +gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.3/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.2.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.2.5/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.3.0/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY= gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ= gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= +gopkg.in/yaml.v3 v3.0.0-20200615113413-eeeca48fe776/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b h1:h8qDotaEPuJATrMmW04NCwg7v22aHH28wwpauUhK9Oo= gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= +gotest.tools/v3 v3.0.2/go.mod h1:3SzNCllyD9/Y+b5r9JIKQ474KzkZyqLqEfYqMsX94Bk= +gotest.tools/v3 v3.0.3/go.mod h1:Z7Lb0S5l+klDB31fvDQX8ss/FlKDxtlFlw3Oa8Ymbl8= honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= +honnef.co/go/tools v0.0.0-20190106161140-3f1c8253044a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= +honnef.co/go/tools v0.0.0-20190418001031-e561f6794a2a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= +honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg= +honnef.co/go/tools v0.0.1-2020.1.3/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= +honnef.co/go/tools v0.0.1-2020.1.4/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= +k8s.io/api v0.23.0/go.mod h1:8wmDdLBHBNxtOIytwLstXt5E9PddnZb0GaMcqsvDBpg= +k8s.io/apiextensions-apiserver v0.23.0/go.mod h1:xIFAEEDlAZgpVBl/1VSjGDmLoXAWRG40+GsWhKhAxY4= k8s.io/apimachinery v0.23.0 h1:mIfWRMjBuMdolAWJ3Fd+aPTMv3X9z+waiARMpvvb0HQ= +k8s.io/apimachinery v0.23.0/go.mod h1:fFCTTBKvKcwTPFzjlcxp91uPFZr+JA0FubU4fLzzFYc= +k8s.io/apiserver v0.23.0/go.mod h1:Cec35u/9zAepDPPFyT+UMrgqOCjgJ5qtfVJDxjZYmt4= +k8s.io/client-go v0.23.0/go.mod h1:hrDnpnK1mSr65lHHcUuIZIXDgEbzc7/683c6hyG4jTA= +k8s.io/code-generator v0.23.0/go.mod h1:vQvOhDXhuzqiVfM/YHp+dmg10WDZCchJVObc9MvowsE= +k8s.io/component-base v0.23.0/go.mod h1:DHH5uiFvLC1edCpvcTDV++NKULdYYU6pR9Tt3HIKMKI= +k8s.io/gengo v0.0.0-20210813121822-485abfe95c7c/go.mod h1:FiNAH4ZV3gBg2Kwh89tzAEV2be7d5xI0vBa/VySYy3E= +k8s.io/klog/v2 v2.0.0/go.mod h1:PBfzABfn139FHAV07az/IF9Wp1bkk3vpT2XSJ76fSDE= +k8s.io/klog/v2 v2.2.0/go.mod h1:Od+F08eJP+W3HUb4pSrPpgp9DGU4GzlpG/TmITuYh/Y= +k8s.io/klog/v2 v2.30.0/go.mod h1:y1WjHnz7Dj687irZUWR/WLkLc5N1YHtjLdmgWjndZn0= +k8s.io/kube-openapi v0.0.0-20211115234752-e816edb12b65/go.mod h1:sX9MT8g7NVZM5lVL/j8QyCCJe8YSMW30QvGZWaCIDIk= +k8s.io/utils v0.0.0-20210802155522-efc7438f0176/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA= +k8s.io/utils v0.0.0-20210930125809-cb0fa318a74b/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA= mellium.im/sasl v0.2.1 h1:nspKSRg7/SyO0cRGY71OkfHab8tf9kCts6a6oTDut0w= mellium.im/sasl v0.2.1/go.mod h1:ROaEDLQNuf9vjKqE1SrAfnsobm2YKXT1gnN1uDp1PjQ= +rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8= +rsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0= +rsc.io/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA= +sigs.k8s.io/apiserver-network-proxy/konnectivity-client v0.0.25/go.mod h1:Mlj9PNLmG9bZ6BHFwFKDo5afkpWyUISkb9Me0GnK66I= sigs.k8s.io/controller-runtime v0.11.0 h1:DqO+c8mywcZLFJWILq4iktoECTyn30Bkj0CwgqMpZWQ= sigs.k8s.io/controller-runtime v0.11.0/go.mod h1:KKwLiTooNGu+JmLZGn9Sl3Gjmfj66eMbCQznLP5zcqA= +sigs.k8s.io/json v0.0.0-20211020170558-c049b76a60c6/go.mod h1:p4QtZmO4uMYipTQNzagwnNoseA6OxSUutVw05NhYDRs= +sigs.k8s.io/structured-merge-diff/v4 v4.0.2/go.mod h1:bJZC9H9iH24zzfZ/41RGcq60oK1F7G282QMXDPYydCw= +sigs.k8s.io/structured-merge-diff/v4 v4.1.2/go.mod h1:j/nl6xW8vLS49O8YvXW1ocPhZawJtm+Yrr7PPRQ0Vg4= +sigs.k8s.io/structured-merge-diff/v4 v4.2.0/go.mod h1:j/nl6xW8vLS49O8YvXW1ocPhZawJtm+Yrr7PPRQ0Vg4= +sigs.k8s.io/yaml v1.2.0/go.mod h1:yfXDCHCao9+ENCvLSE62v9VSji2MKu5jeNfTrofGhJc= sigs.k8s.io/yaml v1.3.0 h1:a2VclLzOGrwOHDiV8EfBGhvjHvP46CtW5j6POvhYGGo= sigs.k8s.io/yaml v1.3.0/go.mod h1:GeOyir5tyXNByN85N/dRIT9es5UQNerPYEKK56eTBm8= From 723c719eb95c34adb1c6ef6b6730390de9813c89 Mon Sep 17 00:00:00 2001 From: Abin Simon Date: Mon, 10 Jan 2022 13:41:40 +0530 Subject: [PATCH 20/28] Switch to using EntityDAO from common --- components/usermgmt/go.mod | 2 +- components/usermgmt/go.sum | 3 +- .../persistence/provider/pg/entity_dao.go | 98 ------------------- components/usermgmt/pkg/service/group.go | 2 +- components/usermgmt/pkg/service/role.go | 2 +- components/usermgmt/pkg/service/user.go | 2 +- 6 files changed, 6 insertions(+), 103 deletions(-) delete mode 100644 components/usermgmt/pkg/internal/persistence/provider/pg/entity_dao.go diff --git a/components/usermgmt/go.mod b/components/usermgmt/go.mod index 1b8e20d..d696dd8 100644 --- a/components/usermgmt/go.mod +++ b/components/usermgmt/go.mod @@ -10,7 +10,7 @@ require ( github.com/grpc-ecosystem/grpc-gateway/v2 v2.7.2 github.com/ory/kratos-client-go v0.8.2-alpha.1 github.com/spf13/viper v1.10.1 - github.com/uptrace/bun v1.0.20 + github.com/uptrace/bun v1.0.21 github.com/uptrace/bun/dialect/pgdialect v1.0.20 github.com/uptrace/bun/driver/pgdriver v1.0.20 github.com/uptrace/bun/extra/bundebug v1.0.20 diff --git a/components/usermgmt/go.sum b/components/usermgmt/go.sum index fda661d..78bcb52 100644 --- a/components/usermgmt/go.sum +++ b/components/usermgmt/go.sum @@ -533,8 +533,9 @@ github.com/tmc/grpc-websocket-proxy v0.0.0-20201229170055-e5319fda7802/go.mod h1 github.com/tmthrgd/go-hex v0.0.0-20190904060850-447a3041c3bc h1:9lRDQMhESg+zvGYmW5DyG0UqvY96Bu5QYsTLvCHdrgo= github.com/tmthrgd/go-hex v0.0.0-20190904060850-447a3041c3bc/go.mod h1:bciPuU6GHm1iF1pBvUfxfsH0Wmnc2VbpgvbI9ZWuIRs= github.com/tv42/httpunix v0.0.0-20150427012821-b75d8614f926/go.mod h1:9ESjWnEqriFuLhtthL60Sar/7RFoluCcXsuvEwTV5KM= -github.com/uptrace/bun v1.0.20 h1:/T4p9C9tEN75U3cFMBr5njlP+rBfs4An8BmlQQPbcfE= github.com/uptrace/bun v1.0.20/go.mod h1:Uv7z0z+7dXnUS9P5hMF0hdiM/4M+xOUHQCrZpyDrpRc= +github.com/uptrace/bun v1.0.21 h1:5ek4bnrEmZo6wvY/RHt1dJNXzOPOnrfJeZMoZfZt9Io= +github.com/uptrace/bun v1.0.21/go.mod h1:u+QsgCgjGFwshy3euGAN1CLEO9RMf42lga5jQ/ezYsc= github.com/uptrace/bun/dialect/pgdialect v1.0.20 h1:1Yajz0M2AhOzvxFEQSAQ8TpqzSRFxYOg+saksIQ0dmU= github.com/uptrace/bun/dialect/pgdialect v1.0.20/go.mod h1:Z2UoOgTKHXgFOuInXsJKkNQJiFIaPkCvsj0EayOI2yk= github.com/uptrace/bun/driver/pgdriver v1.0.20 h1:CEWHL5NS5FQIJAJxY40t0llwe8XxVlsblbgi9Upm0fA= diff --git a/components/usermgmt/pkg/internal/persistence/provider/pg/entity_dao.go b/components/usermgmt/pkg/internal/persistence/provider/pg/entity_dao.go deleted file mode 100644 index 5d55f68..0000000 --- a/components/usermgmt/pkg/internal/persistence/provider/pg/entity_dao.go +++ /dev/null @@ -1,98 +0,0 @@ -package pg - -import ( - "context" - - "github.com/google/uuid" - bun "github.com/uptrace/bun" -) - -// DAO is the interface for database operations -type EntityDAO interface { - Close() error - // create entity - Create(ctx context.Context, entity interface{}) (interface{}, error) - // get entity by id - GetByID(ctx context.Context, id uuid.UUID, entity interface{}) (interface{}, error) - // get entity by name - GetByName(ctx context.Context, name string, entity interface{}) (interface{}, error) - //Update entity - Update(ctx context.Context, id uuid.UUID, entity interface{}) (interface{}, error) - // delete entity - Delete(ctx context.Context, id uuid.UUID, entity interface{}) error - // get list of entities - List(ctx context.Context, partnerId uuid.NullUUID, organizationId uuid.NullUUID, entities interface{}) (interface{}, error) -} - -type entityDAO struct { - db *bun.DB -} - -func (dao *entityDAO) Close() error { - return dao.db.Close() -} - -// NewEntityDao return new entity dao -func NewEntityDAO(db *bun.DB) EntityDAO { - return &entityDAO{db} -} - -func (dao *entityDAO) Create(ctx context.Context, entity interface{}) (interface{}, error) { - - if _, err := dao.db.NewInsert().Model(entity).Exec(ctx); err != nil { - return nil, err - } - - return entity, nil -} - -func (dao *entityDAO) GetByID(ctx context.Context, id uuid.UUID, entity interface{}) (interface{}, error) { - - err := dao.db.NewSelect().Model(entity). - Where("id = ?", id). - Scan(ctx) - if err != nil { - return nil, err - } - - return entity, nil -} - -func (dao *entityDAO) GetByName(ctx context.Context, name string, entity interface{}) (interface{}, error) { - - err := dao.db.NewSelect().Model(entity). - Where("name = ?", name). - Scan(ctx) - if err != nil { - return nil, err - } - - return entity, nil -} - -func (dao *entityDAO) Update(ctx context.Context, id uuid.UUID, entity interface{}) (interface{}, error) { - if _, err := dao.db.NewUpdate().Model(entity).Where("id = ?", id).Exec(ctx); err != nil { - return nil, err - } - return entity, nil -} - -func (dao *entityDAO) Delete(ctx context.Context, id uuid.UUID, entity interface{}) error { - _, err := dao.db.NewDelete(). - Model(entity). - Where("id = ?", id). - Exec(ctx) - return err -} - -func (dao *entityDAO) List(ctx context.Context, partnerId uuid.NullUUID, organizationId uuid.NullUUID, entities interface{}) (interface{}, error) { - sq := dao.db.NewSelect().Model(entities) - if partnerId.Valid { - sq = sq.Where("partner_id = ?", partnerId) - } - if organizationId.Valid { - sq = sq.Where("organization_id = ?", organizationId) - } - err := sq.Scan(ctx) - return entities, err -} diff --git a/components/usermgmt/pkg/service/group.go b/components/usermgmt/pkg/service/group.go index 9ab96dc..d49d2ca 100644 --- a/components/usermgmt/pkg/service/group.go +++ b/components/usermgmt/pkg/service/group.go @@ -7,7 +7,7 @@ import ( v3 "github.com/RafaySystems/rcloud-base/components/common/proto/types/commonpb/v3" "github.com/RafaySystems/rcloud-base/components/usermgmt/pkg/internal/models" - "github.com/RafaySystems/rcloud-base/components/usermgmt/pkg/internal/persistence/provider/pg" + "github.com/RafaySystems/rcloud-base/components/common/pkg/persistence/provider/pg" userv3 "github.com/RafaySystems/rcloud-base/components/usermgmt/proto/types/userpb/v3" "github.com/google/uuid" bun "github.com/uptrace/bun" diff --git a/components/usermgmt/pkg/service/role.go b/components/usermgmt/pkg/service/role.go index c847fc0..2bd17df 100644 --- a/components/usermgmt/pkg/service/role.go +++ b/components/usermgmt/pkg/service/role.go @@ -7,7 +7,7 @@ import ( v3 "github.com/RafaySystems/rcloud-base/components/common/proto/types/commonpb/v3" "github.com/RafaySystems/rcloud-base/components/usermgmt/pkg/internal/models" - "github.com/RafaySystems/rcloud-base/components/usermgmt/pkg/internal/persistence/provider/pg" + "github.com/RafaySystems/rcloud-base/components/common/pkg/persistence/provider/pg" userv3 "github.com/RafaySystems/rcloud-base/components/usermgmt/proto/types/userpb/v3" "github.com/google/uuid" bun "github.com/uptrace/bun" diff --git a/components/usermgmt/pkg/service/user.go b/components/usermgmt/pkg/service/user.go index 6fd1f93..faec10c 100644 --- a/components/usermgmt/pkg/service/user.go +++ b/components/usermgmt/pkg/service/user.go @@ -12,7 +12,7 @@ import ( v3 "github.com/RafaySystems/rcloud-base/components/common/proto/types/commonpb/v3" "github.com/RafaySystems/rcloud-base/components/usermgmt/pkg/internal/models" - "github.com/RafaySystems/rcloud-base/components/usermgmt/pkg/internal/persistence/provider/pg" + "github.com/RafaySystems/rcloud-base/components/common/pkg/persistence/provider/pg" userrpcv3 "github.com/RafaySystems/rcloud-base/components/usermgmt/proto/rpc/v3" userv3 "github.com/RafaySystems/rcloud-base/components/usermgmt/proto/types/userpb/v3" ) From 4e77e0495c78f0b482a32afeb0e2ddef0f075e3b Mon Sep 17 00:00:00 2001 From: Abin Simon Date: Mon, 10 Jan 2022 15:53:41 +0530 Subject: [PATCH 21/28] Fix a few issues in group proto spec --- .../openapi/proto/rpc/v3/group.swagger.json | 12 +- components/usermgmt/pkg/service/group.go | 17 +- .../proto/types/userpb/v3/group.pb.go | 231 +++++++++--------- .../proto/types/userpb/v3/group.proto | 6 +- 4 files changed, 136 insertions(+), 130 deletions(-) diff --git a/components/usermgmt/gen/openapi/proto/rpc/v3/group.swagger.json b/components/usermgmt/gen/openapi/proto/rpc/v3/group.swagger.json index 5f933a7..82ecb6b 100644 --- a/components/usermgmt/gen/openapi/proto/rpc/v3/group.swagger.json +++ b/components/usermgmt/gen/openapi/proto/rpc/v3/group.swagger.json @@ -87,7 +87,7 @@ "in": "query", "required": false, "type": "string", - "default": "Pipeline" + "default": "Group" }, { "name": "metadata.name", @@ -242,7 +242,7 @@ "in": "query", "required": false, "type": "string", - "default": "Pipeline" + "default": "Group" }, { "name": "metadata.name", @@ -457,7 +457,7 @@ "in": "query", "required": false, "type": "string", - "default": "Pipeline" + "default": "Group" }, { "name": "metadata.description", @@ -612,7 +612,7 @@ "in": "query", "required": false, "type": "string", - "default": "Pipeline" + "default": "Group" }, { "name": "metadata.description", @@ -820,7 +820,7 @@ "in": "query", "required": false, "type": "string", - "default": "Pipeline" + "default": "Group" }, { "name": "metadata.name", @@ -1065,7 +1065,7 @@ }, "kind": { "type": "string", - "default": "Pipeline", + "default": "Group", "description": "Kind of the group resource", "title": "Kind" }, diff --git a/components/usermgmt/pkg/service/group.go b/components/usermgmt/pkg/service/group.go index d49d2ca..845a4cb 100644 --- a/components/usermgmt/pkg/service/group.go +++ b/components/usermgmt/pkg/service/group.go @@ -5,9 +5,9 @@ import ( "fmt" "time" + "github.com/RafaySystems/rcloud-base/components/common/pkg/persistence/provider/pg" v3 "github.com/RafaySystems/rcloud-base/components/common/proto/types/commonpb/v3" "github.com/RafaySystems/rcloud-base/components/usermgmt/pkg/internal/models" - "github.com/RafaySystems/rcloud-base/components/common/pkg/persistence/provider/pg" userv3 "github.com/RafaySystems/rcloud-base/components/usermgmt/proto/types/userpb/v3" "github.com/google/uuid" bun "github.com/uptrace/bun" @@ -63,14 +63,16 @@ func (s *groupService) updateGroupRoleRelation(ctx context.Context, group *userv var pgrs []models.ProjectGroupRole var grs []models.GroupRole for _, pnr := range projectNamespaceRoles { - projectId, perr := uuid.Parse(pnr.GetProject()) - namespaceId := pnr.GetNamespace() + project := pnr.Project + namespace := pnr.Namespace roleId, err := uuid.Parse(pnr.GetRole()) if err != nil { return group, err } switch { - case namespaceId != 0: // TODO: namespaceId can be zero? + case namespace != nil: + namespaceId := pnr.GetNamespace() + projectId, _ := uuid.Parse(pnr.GetProject()) pgnr := models.ProjectGroupNamespaceRole{ Name: group.GetMetadata().GetName(), Description: group.GetMetadata().GetDescription(), @@ -86,7 +88,8 @@ func (s *groupService) updateGroupRoleRelation(ctx context.Context, group *userv Active: true, } pgnrs = append(pgnrs, pgnr) - case perr == nil: // TODO: maybe a better check? + case project != nil: + projectId, _ := uuid.Parse(pnr.GetProject()) pgr := models.ProjectGroupRole{ Name: group.GetMetadata().GetName(), Description: group.GetMetadata().GetDescription(), @@ -211,8 +214,8 @@ func (s *groupService) Create(ctx context.Context, group *userv3.Group) (*userv3 if createdGroup, ok := entity.(*models.Group); ok { group.Metadata.Id = createdGroup.ID.String() group.Spec = &userv3.GroupSpec{ - Type: createdGroup.Type, - Users: group.Spec.Users, // TODO: is this the right thing to do? + Type: createdGroup.Type, + Users: group.Spec.Users, // TODO: is this the right thing to do? Projectnamespaceroles: group.Spec.Projectnamespaceroles, // TODO: is this the right thing to do? } if group.Status != nil { diff --git a/components/usermgmt/proto/types/userpb/v3/group.pb.go b/components/usermgmt/proto/types/userpb/v3/group.pb.go index f57131e..03733b7 100644 --- a/components/usermgmt/proto/types/userpb/v3/group.pb.go +++ b/components/usermgmt/proto/types/userpb/v3/group.pb.go @@ -107,9 +107,9 @@ type ProjectNamespaceRole struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Project string `protobuf:"bytes,1,opt,name=project,proto3" json:"project,omitempty"` - Namespace int64 `protobuf:"varint,2,opt,name=namespace,proto3" json:"namespace,omitempty"` - Role string `protobuf:"bytes,3,opt,name=role,proto3" json:"role,omitempty"` + Project *string `protobuf:"bytes,1,opt,name=project,proto3,oneof" json:"project,omitempty"` + Namespace *int64 `protobuf:"varint,2,opt,name=namespace,proto3,oneof" json:"namespace,omitempty"` + Role string `protobuf:"bytes,3,opt,name=role,proto3" json:"role,omitempty"` } func (x *ProjectNamespaceRole) Reset() { @@ -145,15 +145,15 @@ func (*ProjectNamespaceRole) Descriptor() ([]byte, []int) { } func (x *ProjectNamespaceRole) GetProject() string { - if x != nil { - return x.Project + if x != nil && x.Project != nil { + return *x.Project } return "" } func (x *ProjectNamespaceRole) GetNamespace() int64 { - if x != nil { - return x.Namespace + if x != nil && x.Namespace != nil { + return *x.Namespace } return 0 } @@ -315,7 +315,7 @@ var file_proto_types_userpb_v3_group_proto_rawDesc = []byte{ 0x2f, 0x72, 0x6f, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x2d, 0x67, 0x65, 0x6e, 0x2d, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x76, 0x32, 0x2f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xad, 0x04, 0x0a, 0x05, + 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xaa, 0x04, 0x0a, 0x05, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x12, 0x6b, 0x0a, 0x0a, 0x61, 0x70, 0x69, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x4b, 0x92, 0x41, 0x48, 0x2a, 0x0b, 0x41, 0x50, 0x49, 0x20, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x32, 0x21, 0x41, 0x50, 0x49, @@ -323,115 +323,117 @@ var file_proto_types_userpb_v3_group_proto_rawDesc = []byte{ 0x67, 0x72, 0x6f, 0x75, 0x70, 0x20, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x3a, 0x16, 0x75, 0x73, 0x65, 0x72, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x6b, 0x38, 0x73, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x69, 0x6f, 0x2f, 0x76, 0x33, 0x52, 0x0a, 0x61, 0x70, 0x69, 0x56, 0x65, 0x72, 0x73, 0x69, - 0x6f, 0x6e, 0x12, 0x43, 0x0a, 0x04, 0x6b, 0x69, 0x6e, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, - 0x42, 0x2f, 0x92, 0x41, 0x2c, 0x2a, 0x04, 0x4b, 0x69, 0x6e, 0x64, 0x32, 0x1a, 0x4b, 0x69, 0x6e, + 0x6f, 0x6e, 0x12, 0x40, 0x0a, 0x04, 0x6b, 0x69, 0x6e, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, + 0x42, 0x2c, 0x92, 0x41, 0x29, 0x2a, 0x04, 0x4b, 0x69, 0x6e, 0x64, 0x32, 0x1a, 0x4b, 0x69, 0x6e, 0x64, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, 0x20, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x20, 0x72, - 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x3a, 0x08, 0x50, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, - 0x65, 0x52, 0x04, 0x6b, 0x69, 0x6e, 0x64, 0x12, 0x6e, 0x0a, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, - 0x61, 0x74, 0x61, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x72, 0x61, 0x66, 0x61, - 0x79, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, - 0x6f, 0x6e, 0x2e, 0x76, 0x33, 0x2e, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x42, 0x2d, - 0x92, 0x41, 0x2a, 0x2a, 0x08, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x32, 0x1e, 0x4d, - 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, 0x20, 0x67, - 0x72, 0x6f, 0x75, 0x70, 0x20, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x08, 0x6d, - 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x65, 0x0a, 0x04, 0x73, 0x70, 0x65, 0x63, 0x18, - 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x72, 0x61, 0x66, 0x61, 0x79, 0x2e, 0x64, 0x65, - 0x76, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x2e, - 0x47, 0x72, 0x6f, 0x75, 0x70, 0x53, 0x70, 0x65, 0x63, 0x42, 0x2d, 0x92, 0x41, 0x2a, 0x2a, 0x08, - 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x32, 0x1e, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, - 0x74, 0x61, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, 0x20, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x20, - 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x04, 0x73, 0x70, 0x65, 0x63, 0x12, 0x60, - 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x21, - 0x2e, 0x72, 0x61, 0x66, 0x61, 0x79, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, - 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x33, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x75, - 0x73, 0x42, 0x25, 0x92, 0x41, 0x22, 0x2a, 0x06, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x32, 0x16, - 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, 0x20, 0x72, 0x65, - 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x40, 0x01, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, - 0x3a, 0x39, 0x92, 0x41, 0x36, 0x0a, 0x34, 0x2a, 0x05, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x32, 0x05, - 0x47, 0x72, 0x6f, 0x75, 0x70, 0xd2, 0x01, 0x0a, 0x61, 0x70, 0x69, 0x56, 0x65, 0x72, 0x73, 0x69, - 0x6f, 0x6e, 0xd2, 0x01, 0x04, 0x6b, 0x69, 0x6e, 0x64, 0xd2, 0x01, 0x08, 0x6d, 0x65, 0x74, 0x61, - 0x64, 0x61, 0x74, 0x61, 0xd2, 0x01, 0x04, 0x73, 0x70, 0x65, 0x63, 0x22, 0xf6, 0x01, 0x0a, 0x14, - 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, - 0x52, 0x6f, 0x6c, 0x65, 0x12, 0x2f, 0x0a, 0x07, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x15, 0x92, 0x41, 0x12, 0x2a, 0x07, 0x50, 0x72, 0x6f, 0x6a, - 0x65, 0x63, 0x74, 0x32, 0x07, 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x07, 0x70, 0x72, - 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x12, 0x37, 0x0a, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, - 0x63, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x42, 0x19, 0x92, 0x41, 0x16, 0x2a, 0x09, 0x4e, - 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x32, 0x09, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x70, - 0x61, 0x63, 0x65, 0x52, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x23, - 0x0a, 0x04, 0x72, 0x6f, 0x6c, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x42, 0x0f, 0x92, 0x41, - 0x0c, 0x2a, 0x04, 0x52, 0x6f, 0x6c, 0x65, 0x32, 0x04, 0x52, 0x6f, 0x6c, 0x65, 0x52, 0x04, 0x72, - 0x6f, 0x6c, 0x65, 0x3a, 0x4f, 0x92, 0x41, 0x4c, 0x0a, 0x4a, 0x2a, 0x14, 0x50, 0x72, 0x6f, 0x6a, - 0x65, 0x63, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x52, 0x6f, 0x6c, 0x65, - 0x32, 0x32, 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x2c, 0x20, 0x72, 0x6f, 0x6c, 0x65, 0x20, - 0x61, 0x6e, 0x64, 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x20, 0x70, 0x61, - 0x69, 0x72, 0x69, 0x6e, 0x67, 0x20, 0x66, 0x6f, 0x72, 0x20, 0x70, 0x65, 0x72, 0x6d, 0x69, 0x73, - 0x73, 0x69, 0x6f, 0x6e, 0x22, 0xd8, 0x02, 0x0a, 0x09, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x53, 0x70, - 0x65, 0x63, 0x12, 0xb0, 0x01, 0x0a, 0x15, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x6e, 0x61, - 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x72, 0x6f, 0x6c, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, - 0x28, 0x0b, 0x32, 0x2d, 0x2e, 0x72, 0x61, 0x66, 0x61, 0x79, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x74, - 0x79, 0x70, 0x65, 0x73, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x2e, 0x50, 0x72, 0x6f, + 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x3a, 0x05, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x52, 0x04, + 0x6b, 0x69, 0x6e, 0x64, 0x12, 0x6e, 0x0a, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, + 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x72, 0x61, 0x66, 0x61, 0x79, 0x2e, 0x64, + 0x65, 0x76, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, + 0x76, 0x33, 0x2e, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x42, 0x2d, 0x92, 0x41, 0x2a, + 0x2a, 0x08, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x32, 0x1e, 0x4d, 0x65, 0x74, 0x61, + 0x64, 0x61, 0x74, 0x61, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, 0x20, 0x67, 0x72, 0x6f, 0x75, + 0x70, 0x20, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x08, 0x6d, 0x65, 0x74, 0x61, + 0x64, 0x61, 0x74, 0x61, 0x12, 0x65, 0x0a, 0x04, 0x73, 0x70, 0x65, 0x63, 0x18, 0x04, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x72, 0x61, 0x66, 0x61, 0x79, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x74, + 0x79, 0x70, 0x65, 0x73, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x2e, 0x47, 0x72, 0x6f, + 0x75, 0x70, 0x53, 0x70, 0x65, 0x63, 0x42, 0x2d, 0x92, 0x41, 0x2a, 0x2a, 0x08, 0x4d, 0x65, 0x74, + 0x61, 0x64, 0x61, 0x74, 0x61, 0x32, 0x1e, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x20, + 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, 0x20, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x20, 0x72, 0x65, 0x73, + 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x04, 0x73, 0x70, 0x65, 0x63, 0x12, 0x60, 0x0a, 0x06, 0x73, + 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x72, 0x61, + 0x66, 0x61, 0x79, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x63, 0x6f, + 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x33, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x42, 0x25, + 0x92, 0x41, 0x22, 0x2a, 0x06, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x32, 0x16, 0x53, 0x74, 0x61, + 0x74, 0x75, 0x73, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, 0x20, 0x72, 0x65, 0x73, 0x6f, 0x75, + 0x72, 0x63, 0x65, 0x40, 0x01, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x3a, 0x39, 0x92, + 0x41, 0x36, 0x0a, 0x34, 0x2a, 0x05, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x32, 0x05, 0x47, 0x72, 0x6f, + 0x75, 0x70, 0xd2, 0x01, 0x0a, 0x61, 0x70, 0x69, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0xd2, + 0x01, 0x04, 0x6b, 0x69, 0x6e, 0x64, 0xd2, 0x01, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, + 0x61, 0xd2, 0x01, 0x04, 0x73, 0x70, 0x65, 0x63, 0x22, 0x9a, 0x02, 0x0a, 0x14, 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x52, 0x6f, 0x6c, - 0x65, 0x42, 0x4b, 0x92, 0x41, 0x48, 0x2a, 0x15, 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x4e, - 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x52, 0x6f, 0x6c, 0x65, 0x73, 0x32, 0x2f, 0x50, - 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x2c, 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, - 0x65, 0x2c, 0x20, 0x72, 0x6f, 0x6c, 0x65, 0x20, 0x61, 0x73, 0x73, 0x6f, 0x63, 0x69, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x73, 0x20, 0x66, 0x6f, 0x72, 0x20, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x52, 0x15, - 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, - 0x72, 0x6f, 0x6c, 0x65, 0x73, 0x12, 0x39, 0x0a, 0x05, 0x75, 0x73, 0x65, 0x72, 0x73, 0x18, 0x02, - 0x20, 0x03, 0x28, 0x09, 0x42, 0x23, 0x92, 0x41, 0x20, 0x2a, 0x05, 0x55, 0x73, 0x65, 0x72, 0x73, - 0x32, 0x17, 0x4c, 0x69, 0x73, 0x74, 0x20, 0x6f, 0x66, 0x20, 0x75, 0x73, 0x65, 0x72, 0x73, 0x20, - 0x66, 0x6f, 0x72, 0x20, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x52, 0x05, 0x75, 0x73, 0x65, 0x72, 0x73, - 0x12, 0x2c, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x42, 0x18, - 0x92, 0x41, 0x15, 0x2a, 0x04, 0x54, 0x79, 0x70, 0x65, 0x32, 0x0d, 0x54, 0x79, 0x70, 0x65, 0x20, - 0x6f, 0x66, 0x20, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x3a, 0x2f, - 0x92, 0x41, 0x2c, 0x0a, 0x2a, 0x2a, 0x13, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x20, 0x53, 0x70, 0x65, - 0x63, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x32, 0x13, 0x47, 0x72, 0x6f, 0x75, - 0x70, 0x20, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, - 0xa5, 0x03, 0x0a, 0x09, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x5a, 0x0a, - 0x0a, 0x61, 0x70, 0x69, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x09, 0x42, 0x3a, 0x92, 0x41, 0x37, 0x2a, 0x0b, 0x41, 0x50, 0x49, 0x20, 0x56, 0x65, 0x72, 0x73, - 0x69, 0x6f, 0x6e, 0x32, 0x26, 0x41, 0x50, 0x49, 0x20, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, + 0x65, 0x12, 0x34, 0x0a, 0x07, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x09, 0x42, 0x15, 0x92, 0x41, 0x12, 0x2a, 0x07, 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, + 0x32, 0x07, 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x48, 0x00, 0x52, 0x07, 0x70, 0x72, 0x6f, + 0x6a, 0x65, 0x63, 0x74, 0x88, 0x01, 0x01, 0x12, 0x3c, 0x0a, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, + 0x70, 0x61, 0x63, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x42, 0x19, 0x92, 0x41, 0x16, 0x2a, + 0x09, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x32, 0x09, 0x4e, 0x61, 0x6d, 0x65, + 0x73, 0x70, 0x61, 0x63, 0x65, 0x48, 0x01, 0x52, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, + 0x63, 0x65, 0x88, 0x01, 0x01, 0x12, 0x23, 0x0a, 0x04, 0x72, 0x6f, 0x6c, 0x65, 0x18, 0x03, 0x20, + 0x01, 0x28, 0x09, 0x42, 0x0f, 0x92, 0x41, 0x0c, 0x2a, 0x04, 0x52, 0x6f, 0x6c, 0x65, 0x32, 0x04, + 0x52, 0x6f, 0x6c, 0x65, 0x52, 0x04, 0x72, 0x6f, 0x6c, 0x65, 0x3a, 0x4f, 0x92, 0x41, 0x4c, 0x0a, + 0x4a, 0x2a, 0x14, 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x70, + 0x61, 0x63, 0x65, 0x52, 0x6f, 0x6c, 0x65, 0x32, 0x32, 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, + 0x2c, 0x20, 0x72, 0x6f, 0x6c, 0x65, 0x20, 0x61, 0x6e, 0x64, 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x73, + 0x70, 0x61, 0x63, 0x65, 0x20, 0x70, 0x61, 0x69, 0x72, 0x69, 0x6e, 0x67, 0x20, 0x66, 0x6f, 0x72, + 0x20, 0x70, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x42, 0x0a, 0x0a, 0x08, 0x5f, + 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x42, 0x0c, 0x0a, 0x0a, 0x5f, 0x6e, 0x61, 0x6d, 0x65, + 0x73, 0x70, 0x61, 0x63, 0x65, 0x22, 0xd8, 0x02, 0x0a, 0x09, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x53, + 0x70, 0x65, 0x63, 0x12, 0xb0, 0x01, 0x0a, 0x15, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x6e, + 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x72, 0x6f, 0x6c, 0x65, 0x73, 0x18, 0x01, 0x20, + 0x03, 0x28, 0x0b, 0x32, 0x2d, 0x2e, 0x72, 0x61, 0x66, 0x61, 0x79, 0x2e, 0x64, 0x65, 0x76, 0x2e, + 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x2e, 0x50, 0x72, + 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x52, 0x6f, + 0x6c, 0x65, 0x42, 0x4b, 0x92, 0x41, 0x48, 0x2a, 0x15, 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, + 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x52, 0x6f, 0x6c, 0x65, 0x73, 0x32, 0x2f, + 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x2c, 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, + 0x63, 0x65, 0x2c, 0x20, 0x72, 0x6f, 0x6c, 0x65, 0x20, 0x61, 0x73, 0x73, 0x6f, 0x63, 0x69, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x20, 0x66, 0x6f, 0x72, 0x20, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x52, + 0x15, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, + 0x65, 0x72, 0x6f, 0x6c, 0x65, 0x73, 0x12, 0x39, 0x0a, 0x05, 0x75, 0x73, 0x65, 0x72, 0x73, 0x18, + 0x02, 0x20, 0x03, 0x28, 0x09, 0x42, 0x23, 0x92, 0x41, 0x20, 0x2a, 0x05, 0x55, 0x73, 0x65, 0x72, + 0x73, 0x32, 0x17, 0x4c, 0x69, 0x73, 0x74, 0x20, 0x6f, 0x66, 0x20, 0x75, 0x73, 0x65, 0x72, 0x73, + 0x20, 0x66, 0x6f, 0x72, 0x20, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x52, 0x05, 0x75, 0x73, 0x65, 0x72, + 0x73, 0x12, 0x2c, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x42, + 0x18, 0x92, 0x41, 0x15, 0x2a, 0x04, 0x54, 0x79, 0x70, 0x65, 0x32, 0x0d, 0x54, 0x79, 0x70, 0x65, + 0x20, 0x6f, 0x66, 0x20, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x3a, + 0x2f, 0x92, 0x41, 0x2c, 0x0a, 0x2a, 0x2a, 0x13, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x20, 0x53, 0x70, + 0x65, 0x63, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x32, 0x13, 0x47, 0x72, 0x6f, + 0x75, 0x70, 0x20, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x22, 0xa5, 0x03, 0x0a, 0x09, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x5a, + 0x0a, 0x0a, 0x61, 0x70, 0x69, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x09, 0x42, 0x3a, 0x92, 0x41, 0x37, 0x2a, 0x0b, 0x41, 0x50, 0x49, 0x20, 0x56, 0x65, 0x72, + 0x73, 0x69, 0x6f, 0x6e, 0x32, 0x26, 0x41, 0x50, 0x49, 0x20, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, + 0x6e, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, 0x20, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x20, 0x6c, + 0x69, 0x73, 0x74, 0x20, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x40, 0x01, 0x52, 0x0a, + 0x61, 0x70, 0x69, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x40, 0x0a, 0x04, 0x6b, 0x69, + 0x6e, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x2c, 0x92, 0x41, 0x29, 0x2a, 0x04, 0x4b, + 0x69, 0x6e, 0x64, 0x32, 0x1f, 0x4b, 0x69, 0x6e, 0x64, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, + 0x20, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x20, 0x6c, 0x69, 0x73, 0x74, 0x20, 0x72, 0x65, 0x73, 0x6f, + 0x75, 0x72, 0x63, 0x65, 0x40, 0x01, 0x52, 0x04, 0x6b, 0x69, 0x6e, 0x64, 0x12, 0x79, 0x0a, 0x08, + 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x27, + 0x2e, 0x72, 0x61, 0x66, 0x61, 0x79, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, + 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x33, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x4d, + 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x42, 0x34, 0x92, 0x41, 0x31, 0x2a, 0x08, 0x4d, 0x65, + 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x32, 0x23, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, 0x20, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x20, 0x6c, 0x69, - 0x73, 0x74, 0x20, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x40, 0x01, 0x52, 0x0a, 0x61, - 0x70, 0x69, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x40, 0x0a, 0x04, 0x6b, 0x69, 0x6e, - 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x2c, 0x92, 0x41, 0x29, 0x2a, 0x04, 0x4b, 0x69, - 0x6e, 0x64, 0x32, 0x1f, 0x4b, 0x69, 0x6e, 0x64, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, 0x20, - 0x67, 0x72, 0x6f, 0x75, 0x70, 0x20, 0x6c, 0x69, 0x73, 0x74, 0x20, 0x72, 0x65, 0x73, 0x6f, 0x75, - 0x72, 0x63, 0x65, 0x40, 0x01, 0x52, 0x04, 0x6b, 0x69, 0x6e, 0x64, 0x12, 0x79, 0x0a, 0x08, 0x6d, - 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x27, 0x2e, - 0x72, 0x61, 0x66, 0x61, 0x79, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, - 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x33, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x4d, 0x65, - 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x42, 0x34, 0x92, 0x41, 0x31, 0x2a, 0x08, 0x4d, 0x65, 0x74, - 0x61, 0x64, 0x61, 0x74, 0x61, 0x32, 0x23, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x20, - 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, 0x20, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x20, 0x6c, 0x69, 0x73, - 0x74, 0x20, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x40, 0x01, 0x52, 0x08, 0x6d, 0x65, - 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x5f, 0x0a, 0x05, 0x69, 0x74, 0x65, 0x6d, 0x73, 0x18, - 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x72, 0x61, 0x66, 0x61, 0x79, 0x2e, 0x64, 0x65, - 0x76, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x2e, - 0x47, 0x72, 0x6f, 0x75, 0x70, 0x42, 0x29, 0x92, 0x41, 0x26, 0x2a, 0x05, 0x49, 0x74, 0x65, 0x6d, - 0x73, 0x32, 0x1b, 0x4c, 0x69, 0x73, 0x74, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, 0x20, 0x67, - 0x72, 0x6f, 0x75, 0x70, 0x20, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x40, 0x01, - 0x52, 0x05, 0x69, 0x74, 0x65, 0x6d, 0x73, 0x3a, 0x1e, 0x92, 0x41, 0x1b, 0x0a, 0x19, 0x2a, 0x09, - 0x47, 0x72, 0x6f, 0x75, 0x70, 0x4c, 0x69, 0x73, 0x74, 0x32, 0x0a, 0x47, 0x72, 0x6f, 0x75, 0x70, - 0x20, 0x6c, 0x69, 0x73, 0x74, 0x40, 0x01, 0x42, 0x80, 0x02, 0x0a, 0x1b, 0x63, 0x6f, 0x6d, 0x2e, - 0x72, 0x61, 0x66, 0x61, 0x79, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, - 0x75, 0x73, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x42, 0x0a, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x50, 0x72, - 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x54, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, - 0x6d, 0x2f, 0x52, 0x61, 0x66, 0x61, 0x79, 0x53, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x73, 0x2f, 0x72, - 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2d, 0x62, 0x61, 0x73, 0x65, 0x2f, 0x63, 0x6f, 0x6d, 0x70, 0x6f, - 0x6e, 0x65, 0x6e, 0x74, 0x73, 0x2f, 0x75, 0x73, 0x65, 0x72, 0x6d, 0x67, 0x6d, 0x74, 0x2f, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2f, 0x75, 0x73, 0x65, 0x72, 0x70, - 0x62, 0x2f, 0x76, 0x33, 0x3b, 0x75, 0x73, 0x65, 0x72, 0x76, 0x33, 0xa2, 0x02, 0x04, 0x52, 0x44, - 0x54, 0x55, 0xaa, 0x02, 0x17, 0x52, 0x61, 0x66, 0x61, 0x79, 0x2e, 0x44, 0x65, 0x76, 0x2e, 0x54, - 0x79, 0x70, 0x65, 0x73, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x2e, 0x56, 0x33, 0xca, 0x02, 0x17, 0x52, - 0x61, 0x66, 0x61, 0x79, 0x5c, 0x44, 0x65, 0x76, 0x5c, 0x54, 0x79, 0x70, 0x65, 0x73, 0x5c, 0x55, - 0x73, 0x65, 0x72, 0x5c, 0x56, 0x33, 0xe2, 0x02, 0x23, 0x52, 0x61, 0x66, 0x61, 0x79, 0x5c, 0x44, - 0x65, 0x76, 0x5c, 0x54, 0x79, 0x70, 0x65, 0x73, 0x5c, 0x55, 0x73, 0x65, 0x72, 0x5c, 0x56, 0x33, - 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x1b, 0x52, - 0x61, 0x66, 0x61, 0x79, 0x3a, 0x3a, 0x44, 0x65, 0x76, 0x3a, 0x3a, 0x54, 0x79, 0x70, 0x65, 0x73, - 0x3a, 0x3a, 0x55, 0x73, 0x65, 0x72, 0x3a, 0x3a, 0x56, 0x33, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x33, + 0x73, 0x74, 0x20, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x40, 0x01, 0x52, 0x08, 0x6d, + 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x5f, 0x0a, 0x05, 0x69, 0x74, 0x65, 0x6d, 0x73, + 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x72, 0x61, 0x66, 0x61, 0x79, 0x2e, 0x64, + 0x65, 0x76, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x76, 0x33, + 0x2e, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x42, 0x29, 0x92, 0x41, 0x26, 0x2a, 0x05, 0x49, 0x74, 0x65, + 0x6d, 0x73, 0x32, 0x1b, 0x4c, 0x69, 0x73, 0x74, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, 0x20, + 0x67, 0x72, 0x6f, 0x75, 0x70, 0x20, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x40, + 0x01, 0x52, 0x05, 0x69, 0x74, 0x65, 0x6d, 0x73, 0x3a, 0x1e, 0x92, 0x41, 0x1b, 0x0a, 0x19, 0x2a, + 0x09, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x4c, 0x69, 0x73, 0x74, 0x32, 0x0a, 0x47, 0x72, 0x6f, 0x75, + 0x70, 0x20, 0x6c, 0x69, 0x73, 0x74, 0x40, 0x01, 0x42, 0x80, 0x02, 0x0a, 0x1b, 0x63, 0x6f, 0x6d, + 0x2e, 0x72, 0x61, 0x66, 0x61, 0x79, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, + 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x42, 0x0a, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x50, + 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x54, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, + 0x6f, 0x6d, 0x2f, 0x52, 0x61, 0x66, 0x61, 0x79, 0x53, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x73, 0x2f, + 0x72, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2d, 0x62, 0x61, 0x73, 0x65, 0x2f, 0x63, 0x6f, 0x6d, 0x70, + 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x73, 0x2f, 0x75, 0x73, 0x65, 0x72, 0x6d, 0x67, 0x6d, 0x74, 0x2f, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2f, 0x75, 0x73, 0x65, 0x72, + 0x70, 0x62, 0x2f, 0x76, 0x33, 0x3b, 0x75, 0x73, 0x65, 0x72, 0x76, 0x33, 0xa2, 0x02, 0x04, 0x52, + 0x44, 0x54, 0x55, 0xaa, 0x02, 0x17, 0x52, 0x61, 0x66, 0x61, 0x79, 0x2e, 0x44, 0x65, 0x76, 0x2e, + 0x54, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x2e, 0x56, 0x33, 0xca, 0x02, 0x17, + 0x52, 0x61, 0x66, 0x61, 0x79, 0x5c, 0x44, 0x65, 0x76, 0x5c, 0x54, 0x79, 0x70, 0x65, 0x73, 0x5c, + 0x55, 0x73, 0x65, 0x72, 0x5c, 0x56, 0x33, 0xe2, 0x02, 0x23, 0x52, 0x61, 0x66, 0x61, 0x79, 0x5c, + 0x44, 0x65, 0x76, 0x5c, 0x54, 0x79, 0x70, 0x65, 0x73, 0x5c, 0x55, 0x73, 0x65, 0x72, 0x5c, 0x56, + 0x33, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x1b, + 0x52, 0x61, 0x66, 0x61, 0x79, 0x3a, 0x3a, 0x44, 0x65, 0x76, 0x3a, 0x3a, 0x54, 0x79, 0x70, 0x65, + 0x73, 0x3a, 0x3a, 0x55, 0x73, 0x65, 0x72, 0x3a, 0x3a, 0x56, 0x33, 0x62, 0x06, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x33, } var ( @@ -526,6 +528,7 @@ func file_proto_types_userpb_v3_group_proto_init() { } } } + file_proto_types_userpb_v3_group_proto_msgTypes[1].OneofWrappers = []interface{}{} type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/components/usermgmt/proto/types/userpb/v3/group.proto b/components/usermgmt/proto/types/userpb/v3/group.proto index 5a6c86d..955b1e3 100644 --- a/components/usermgmt/proto/types/userpb/v3/group.proto +++ b/components/usermgmt/proto/types/userpb/v3/group.proto @@ -25,7 +25,7 @@ message Group { [ (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { title : "Kind", description : "Kind of the group resource" - default : "Pipeline" + default : "Group" } ]; rafay.dev.types.common.v3.Metadata metadata = 3 [ (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { @@ -52,12 +52,12 @@ message ProjectNamespaceRole { description : "Project, role and namespace pairing for permission" } }; - string project = 1 + optional string project = 1 [ (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { title : "Project" description : "Project" } ]; - int64 namespace = 2 + optional int64 namespace = 2 [ (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { title : "Namespace" description : "Namespace" From 7bbc1541f825b99a5c6bcc3f340b612f5794766f Mon Sep 17 00:00:00 2001 From: Abin Simon Date: Mon, 10 Jan 2022 16:12:43 +0530 Subject: [PATCH 22/28] Set Trash colums in models to default to false --- components/usermgmt/pkg/internal/models/accountresourcerole.go | 2 +- components/usermgmt/pkg/internal/models/group.go | 2 +- components/usermgmt/pkg/internal/models/groupaccount.go | 2 +- components/usermgmt/pkg/internal/models/grouprole.go | 2 +- .../usermgmt/pkg/internal/models/projectaccountnamespacerole.go | 2 +- .../usermgmt/pkg/internal/models/projectaccountresourcerole.go | 2 +- .../usermgmt/pkg/internal/models/projectgroupnamespacerole.go | 2 +- components/usermgmt/pkg/internal/models/projectgrouprole.go | 2 +- components/usermgmt/pkg/internal/models/role.go | 2 +- 9 files changed, 9 insertions(+), 9 deletions(-) diff --git a/components/usermgmt/pkg/internal/models/accountresourcerole.go b/components/usermgmt/pkg/internal/models/accountresourcerole.go index a132816..cda4a5e 100644 --- a/components/usermgmt/pkg/internal/models/accountresourcerole.go +++ b/components/usermgmt/pkg/internal/models/accountresourcerole.go @@ -15,7 +15,7 @@ type AccountResourcerole struct { Description string `bun:"description,notnull"` CreatedAt time.Time `bun:"created_at,notnull,default:current_timestamp"` ModifiedAt time.Time `bun:"modified_at,notnull,default:current_timestamp"` - Trash bool `bun:"trash,notnull"` + Trash bool `bun:"trash,notnull,default:false"` Default bool `bun:"default,notnull"` OrganizationId uuid.UUID `bun:"organization_id,type:uuid"` PartnerId uuid.UUID `bun:"partner_id,type:uuid"` diff --git a/components/usermgmt/pkg/internal/models/group.go b/components/usermgmt/pkg/internal/models/group.go index 51d7e36..2733be1 100644 --- a/components/usermgmt/pkg/internal/models/group.go +++ b/components/usermgmt/pkg/internal/models/group.go @@ -15,7 +15,7 @@ type Group struct { Description string `bun:"description,notnull"` CreatedAt time.Time `bun:"created_at,notnull,default:current_timestamp"` ModifiedAt time.Time `bun:"modified_at,notnull,default:current_timestamp"` - Trash bool `bun:"trash,notnull"` + Trash bool `bun:"trash,notnull,default:false"` OrganizationId uuid.UUID `bun:"organization_id,type:uuid"` PartnerId uuid.UUID `bun:"partner_id,type:uuid"` Type string `bun:"type,notnull"` diff --git a/components/usermgmt/pkg/internal/models/groupaccount.go b/components/usermgmt/pkg/internal/models/groupaccount.go index c8c5907..89b96ae 100644 --- a/components/usermgmt/pkg/internal/models/groupaccount.go +++ b/components/usermgmt/pkg/internal/models/groupaccount.go @@ -15,7 +15,7 @@ type GroupAccount struct { Description string `bun:"description,notnull"` CreatedAt time.Time `bun:"created_at,notnull,default:current_timestamp"` ModifiedAt time.Time `bun:"modified_at,notnull,default:current_timestamp"` - Trash bool `bun:"trash,notnull"` + Trash bool `bun:"trash,notnull,default:false"` // OrganizationId uuid.UUID `bun:"organization_id,type:uuid"` // PartnerId uuid.UUID `bun:"partner_id,type:uuid"` AccountId uuid.UUID `bun:"account_id,type:uuid"` diff --git a/components/usermgmt/pkg/internal/models/grouprole.go b/components/usermgmt/pkg/internal/models/grouprole.go index e8fa0a2..6530a9b 100644 --- a/components/usermgmt/pkg/internal/models/grouprole.go +++ b/components/usermgmt/pkg/internal/models/grouprole.go @@ -15,7 +15,7 @@ type GroupRole struct { Description string `bun:"description,notnull"` CreatedAt time.Time `bun:"created_at,notnull,default:current_timestamp"` ModifiedAt time.Time `bun:"modified_at,notnull,default:current_timestamp"` - Trash bool `bun:"trash,notnull"` + Trash bool `bun:"trash,notnull,default:false"` Default bool `bun:"default,notnull"` OrganizationId uuid.UUID `bun:"organization_id,type:uuid"` PartnerId uuid.UUID `bun:"partner_id,type:uuid"` diff --git a/components/usermgmt/pkg/internal/models/projectaccountnamespacerole.go b/components/usermgmt/pkg/internal/models/projectaccountnamespacerole.go index 2ab610d..08bf67f 100644 --- a/components/usermgmt/pkg/internal/models/projectaccountnamespacerole.go +++ b/components/usermgmt/pkg/internal/models/projectaccountnamespacerole.go @@ -15,7 +15,7 @@ type ProjectAccountNamespaceRole struct { Description string `bun:"description,notnull"` CreatedAt time.Time `bun:"created_at,notnull,default:current_timestamp"` ModifiedAt time.Time `bun:"modified_at,notnull,default:current_timestamp"` - Trash bool `bun:"trash,notnull"` + Trash bool `bun:"trash,notnull,default:false"` OrganizationId uuid.UUID `bun:"organization_id,type:uuid"` PartnerId uuid.UUID `bun:"partner_id,type:uuid"` RoleId uuid.UUID `bun:"role_id,type:uuid"` diff --git a/components/usermgmt/pkg/internal/models/projectaccountresourcerole.go b/components/usermgmt/pkg/internal/models/projectaccountresourcerole.go index 451a916..28a88b9 100644 --- a/components/usermgmt/pkg/internal/models/projectaccountresourcerole.go +++ b/components/usermgmt/pkg/internal/models/projectaccountresourcerole.go @@ -15,7 +15,7 @@ type ProjectAccountResourcerole struct { Description string `bun:"description,notnull"` CreatedAt time.Time `bun:"created_at,notnull,default:current_timestamp"` ModifiedAt time.Time `bun:"modified_at,notnull,default:current_timestamp"` - Trash bool `bun:"trash,notnull"` + Trash bool `bun:"trash,notnull,default:false"` Default bool `bun:"default,notnull"` OrganizationId uuid.UUID `bun:"organization_id,type:uuid"` PartnerId uuid.UUID `bun:"partner_id,type:uuid"` diff --git a/components/usermgmt/pkg/internal/models/projectgroupnamespacerole.go b/components/usermgmt/pkg/internal/models/projectgroupnamespacerole.go index 3a173cd..810161f 100644 --- a/components/usermgmt/pkg/internal/models/projectgroupnamespacerole.go +++ b/components/usermgmt/pkg/internal/models/projectgroupnamespacerole.go @@ -15,7 +15,7 @@ type ProjectGroupNamespaceRole struct { Description string `bun:"description,notnull"` CreatedAt time.Time `bun:"created_at,notnull,default:current_timestamp"` ModifiedAt time.Time `bun:"modified_at,notnull,default:current_timestamp"` - Trash bool `bun:"trash,notnull"` + Trash bool `bun:"trash,notnull,default:false"` OrganizationId uuid.UUID `bun:"organization_id,type:uuid"` PartnerId uuid.UUID `bun:"partner_id,type:uuid"` RoleId uuid.UUID `bun:"role_id,type:uuid"` diff --git a/components/usermgmt/pkg/internal/models/projectgrouprole.go b/components/usermgmt/pkg/internal/models/projectgrouprole.go index 14d03de..a9dfef5 100644 --- a/components/usermgmt/pkg/internal/models/projectgrouprole.go +++ b/components/usermgmt/pkg/internal/models/projectgrouprole.go @@ -15,7 +15,7 @@ type ProjectGroupRole struct { Description string `bun:"description,notnull"` CreatedAt time.Time `bun:"created_at,notnull,default:current_timestamp"` ModifiedAt time.Time `bun:"modified_at,notnull,default:current_timestamp"` - Trash bool `bun:"trash,notnull"` + Trash bool `bun:"trash,notnull,default:false"` Default bool `bun:"default,notnull"` OrganizationId uuid.UUID `bun:"organization_id,type:uuid"` PartnerId uuid.UUID `bun:"partner_id,type:uuid"` diff --git a/components/usermgmt/pkg/internal/models/role.go b/components/usermgmt/pkg/internal/models/role.go index a5ca75e..9ef1163 100644 --- a/components/usermgmt/pkg/internal/models/role.go +++ b/components/usermgmt/pkg/internal/models/role.go @@ -15,7 +15,7 @@ type Role struct { Description string `bun:"description,notnull"` CreatedAt time.Time `bun:"created_at,notnull,default:current_timestamp"` ModifiedAt time.Time `bun:"modified_at,notnull,default:current_timestamp"` - Trash bool `bun:"trash,notnull"` + Trash bool `bun:"trash,notnull,default:false"` OrganizationId uuid.UUID `bun:"organization_id,type:uuid"` PartnerId uuid.UUID `bun:"partner_id,type:uuid"` IsGlobal bool `bun:"is_global,notnull"` From dca468292d620b00b9310cbea1bc8f35f1661789 Mon Sep 17 00:00:00 2001 From: Abin Simon Date: Tue, 11 Jan 2022 10:06:40 +0530 Subject: [PATCH 23/28] Revert bun version to 1.0.20 1.0.21 was returning `0` for the ids after insertion --- components/adminsrv/go.mod | 4 +++- components/adminsrv/go.sum | 3 +-- components/common/go.mod | 2 +- components/common/go.sum | 4 ++-- components/usermgmt/go.mod | 45 ++++++++++++++++++++++++++++++++++++-- components/usermgmt/go.sum | 3 +-- go.mod | 10 --------- go.sum | 20 ----------------- 8 files changed, 51 insertions(+), 40 deletions(-) diff --git a/components/adminsrv/go.mod b/components/adminsrv/go.mod index 1809fe0..1936837 100644 --- a/components/adminsrv/go.mod +++ b/components/adminsrv/go.mod @@ -8,7 +8,7 @@ require ( github.com/google/uuid v1.3.0 github.com/grpc-ecosystem/grpc-gateway/v2 v2.7.2 github.com/spf13/viper v1.10.1 - github.com/uptrace/bun v1.0.21 + github.com/uptrace/bun v1.0.20 github.com/uptrace/bun/dialect/pgdialect v1.0.20 github.com/uptrace/bun/driver/pgdriver v1.0.20 github.com/uptrace/bun/extra/bundebug v1.0.20 @@ -59,3 +59,5 @@ require ( mellium.im/sasl v0.2.1 // indirect sigs.k8s.io/yaml v1.3.0 // indirect ) + +replace github.com/RafaySystems/rcloud-base/components/common v0.0.0-unpublished => ../common/ diff --git a/components/adminsrv/go.sum b/components/adminsrv/go.sum index 4f96505..1e2d995 100644 --- a/components/adminsrv/go.sum +++ b/components/adminsrv/go.sum @@ -531,9 +531,8 @@ github.com/tmc/grpc-websocket-proxy v0.0.0-20201229170055-e5319fda7802/go.mod h1 github.com/tmthrgd/go-hex v0.0.0-20190904060850-447a3041c3bc h1:9lRDQMhESg+zvGYmW5DyG0UqvY96Bu5QYsTLvCHdrgo= github.com/tmthrgd/go-hex v0.0.0-20190904060850-447a3041c3bc/go.mod h1:bciPuU6GHm1iF1pBvUfxfsH0Wmnc2VbpgvbI9ZWuIRs= github.com/tv42/httpunix v0.0.0-20150427012821-b75d8614f926/go.mod h1:9ESjWnEqriFuLhtthL60Sar/7RFoluCcXsuvEwTV5KM= +github.com/uptrace/bun v1.0.20 h1:/T4p9C9tEN75U3cFMBr5njlP+rBfs4An8BmlQQPbcfE= github.com/uptrace/bun v1.0.20/go.mod h1:Uv7z0z+7dXnUS9P5hMF0hdiM/4M+xOUHQCrZpyDrpRc= -github.com/uptrace/bun v1.0.21 h1:5ek4bnrEmZo6wvY/RHt1dJNXzOPOnrfJeZMoZfZt9Io= -github.com/uptrace/bun v1.0.21/go.mod h1:u+QsgCgjGFwshy3euGAN1CLEO9RMf42lga5jQ/ezYsc= github.com/uptrace/bun/dialect/pgdialect v1.0.20 h1:1Yajz0M2AhOzvxFEQSAQ8TpqzSRFxYOg+saksIQ0dmU= github.com/uptrace/bun/dialect/pgdialect v1.0.20/go.mod h1:Z2UoOgTKHXgFOuInXsJKkNQJiFIaPkCvsj0EayOI2yk= github.com/uptrace/bun/driver/pgdriver v1.0.20 h1:CEWHL5NS5FQIJAJxY40t0llwe8XxVlsblbgi9Upm0fA= diff --git a/components/common/go.mod b/components/common/go.mod index d1ea3c6..02b764b 100644 --- a/components/common/go.mod +++ b/components/common/go.mod @@ -11,7 +11,7 @@ require ( github.com/processout/grpc-go-pool v1.2.1 github.com/segmentio/encoding v0.3.2 github.com/speps/go-hashids v2.0.0+incompatible - github.com/uptrace/bun v1.0.21 + github.com/uptrace/bun v1.0.20 go.uber.org/zap v1.19.1 google.golang.org/genproto v0.0.0-20211208223120-3a66f561d7aa google.golang.org/grpc v1.43.0 diff --git a/components/common/go.sum b/components/common/go.sum index 5baafbf..c943669 100644 --- a/components/common/go.sum +++ b/components/common/go.sum @@ -172,8 +172,8 @@ github.com/stretchr/testify v1.7.0 h1:nwc3DEeHmmLAfoZucVR881uASk0Mfjw8xYJ99tb5Cc github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/tmthrgd/go-hex v0.0.0-20190904060850-447a3041c3bc h1:9lRDQMhESg+zvGYmW5DyG0UqvY96Bu5QYsTLvCHdrgo= github.com/tmthrgd/go-hex v0.0.0-20190904060850-447a3041c3bc/go.mod h1:bciPuU6GHm1iF1pBvUfxfsH0Wmnc2VbpgvbI9ZWuIRs= -github.com/uptrace/bun v1.0.21 h1:5ek4bnrEmZo6wvY/RHt1dJNXzOPOnrfJeZMoZfZt9Io= -github.com/uptrace/bun v1.0.21/go.mod h1:u+QsgCgjGFwshy3euGAN1CLEO9RMf42lga5jQ/ezYsc= +github.com/uptrace/bun v1.0.20 h1:/T4p9C9tEN75U3cFMBr5njlP+rBfs4An8BmlQQPbcfE= +github.com/uptrace/bun v1.0.20/go.mod h1:Uv7z0z+7dXnUS9P5hMF0hdiM/4M+xOUHQCrZpyDrpRc= github.com/vmihailenco/msgpack/v5 v5.3.5 h1:5gO0H1iULLWGhs2H5tbAHIZTV8/cYafcFOr9znI5mJU= github.com/vmihailenco/msgpack/v5 v5.3.5/go.mod h1:7xyJ9e+0+9SaZT0Wt1RGleJXzli6Q/V5KbhBonMG9jc= github.com/vmihailenco/tagparser/v2 v2.0.0 h1:y09buUbR+b5aycVFQs/g70pqKVZNBmxwAhO7/IwNM9g= diff --git a/components/usermgmt/go.mod b/components/usermgmt/go.mod index d696dd8..5945c4c 100644 --- a/components/usermgmt/go.mod +++ b/components/usermgmt/go.mod @@ -1,6 +1,6 @@ module github.com/RafaySystems/rcloud-base/components/usermgmt -go 1.16 +go 1.17 require ( github.com/RafaySystems/rcloud-base/components/adminsrv v0.0.0-unpublished @@ -10,7 +10,7 @@ require ( github.com/grpc-ecosystem/grpc-gateway/v2 v2.7.2 github.com/ory/kratos-client-go v0.8.2-alpha.1 github.com/spf13/viper v1.10.1 - github.com/uptrace/bun v1.0.21 + github.com/uptrace/bun v1.0.20 github.com/uptrace/bun/dialect/pgdialect v1.0.20 github.com/uptrace/bun/driver/pgdriver v1.0.20 github.com/uptrace/bun/extra/bundebug v1.0.20 @@ -20,6 +20,47 @@ require ( sigs.k8s.io/controller-runtime v0.11.0 ) +require ( + github.com/fatih/color v1.13.0 // indirect + github.com/fsnotify/fsnotify v1.5.1 // indirect + github.com/golang/protobuf v1.5.2 // indirect + github.com/grpc-ecosystem/grpc-gateway v1.16.0 // indirect + github.com/hashicorp/hcl v1.0.0 // indirect + github.com/jinzhu/inflection v1.0.0 // indirect + github.com/julienschmidt/httprouter v1.3.0 // indirect + github.com/klauspost/cpuid/v2 v2.0.6 // indirect + github.com/magiconair/properties v1.8.5 // indirect + github.com/mattn/go-colorable v0.1.12 // indirect + github.com/mattn/go-isatty v0.0.14 // indirect + github.com/mitchellh/mapstructure v1.4.3 // indirect + github.com/pelletier/go-toml v1.9.4 // indirect + github.com/processout/grpc-go-pool v1.2.1 // indirect + github.com/segmentio/asm v1.1.0 // indirect + github.com/segmentio/encoding v0.3.2 // indirect + github.com/speps/go-hashids v2.0.0+incompatible // indirect + github.com/spf13/afero v1.6.0 // indirect + github.com/spf13/cast v1.4.1 // indirect + github.com/spf13/jwalterweatherman v1.1.0 // indirect + github.com/spf13/pflag v1.0.5 // indirect + github.com/subosito/gotenv v1.2.0 // indirect + github.com/tmthrgd/go-hex v0.0.0-20190904060850-447a3041c3bc // indirect + github.com/vmihailenco/msgpack/v5 v5.3.5 // indirect + github.com/vmihailenco/tagparser/v2 v2.0.0 // indirect + go.uber.org/atomic v1.7.0 // indirect + go.uber.org/multierr v1.6.0 // indirect + go.uber.org/zap v1.19.1 // indirect + golang.org/x/crypto v0.0.0-20211215153901-e495a2d5b3d3 // indirect + golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2 // indirect + golang.org/x/oauth2 v0.0.0-20211104180415-d3ed0bb246c8 // indirect + golang.org/x/sys v0.0.0-20211216021012-1d35b9e2eb4e // indirect + golang.org/x/text v0.3.7 // indirect + google.golang.org/appengine v1.6.7 // indirect + gopkg.in/ini.v1 v1.66.2 // indirect + gopkg.in/yaml.v2 v2.4.0 // indirect + mellium.im/sasl v0.2.1 // indirect + sigs.k8s.io/yaml v1.3.0 // indirect +) + replace ( github.com/RafaySystems/rcloud-base/components/adminsrv v0.0.0-unpublished => ../adminsrv/ github.com/RafaySystems/rcloud-base/components/common v0.0.0-unpublished => ../common/ diff --git a/components/usermgmt/go.sum b/components/usermgmt/go.sum index 78bcb52..fda661d 100644 --- a/components/usermgmt/go.sum +++ b/components/usermgmt/go.sum @@ -533,9 +533,8 @@ github.com/tmc/grpc-websocket-proxy v0.0.0-20201229170055-e5319fda7802/go.mod h1 github.com/tmthrgd/go-hex v0.0.0-20190904060850-447a3041c3bc h1:9lRDQMhESg+zvGYmW5DyG0UqvY96Bu5QYsTLvCHdrgo= github.com/tmthrgd/go-hex v0.0.0-20190904060850-447a3041c3bc/go.mod h1:bciPuU6GHm1iF1pBvUfxfsH0Wmnc2VbpgvbI9ZWuIRs= github.com/tv42/httpunix v0.0.0-20150427012821-b75d8614f926/go.mod h1:9ESjWnEqriFuLhtthL60Sar/7RFoluCcXsuvEwTV5KM= +github.com/uptrace/bun v1.0.20 h1:/T4p9C9tEN75U3cFMBr5njlP+rBfs4An8BmlQQPbcfE= github.com/uptrace/bun v1.0.20/go.mod h1:Uv7z0z+7dXnUS9P5hMF0hdiM/4M+xOUHQCrZpyDrpRc= -github.com/uptrace/bun v1.0.21 h1:5ek4bnrEmZo6wvY/RHt1dJNXzOPOnrfJeZMoZfZt9Io= -github.com/uptrace/bun v1.0.21/go.mod h1:u+QsgCgjGFwshy3euGAN1CLEO9RMf42lga5jQ/ezYsc= github.com/uptrace/bun/dialect/pgdialect v1.0.20 h1:1Yajz0M2AhOzvxFEQSAQ8TpqzSRFxYOg+saksIQ0dmU= github.com/uptrace/bun/dialect/pgdialect v1.0.20/go.mod h1:Z2UoOgTKHXgFOuInXsJKkNQJiFIaPkCvsj0EayOI2yk= github.com/uptrace/bun/driver/pgdriver v1.0.20 h1:CEWHL5NS5FQIJAJxY40t0llwe8XxVlsblbgi9Upm0fA= diff --git a/go.mod b/go.mod index 196e342..29fa961 100644 --- a/go.mod +++ b/go.mod @@ -1,13 +1,3 @@ module github.com/RafaySystems/rcloud-base go 1.17 - -require github.com/uptrace/bun v1.0.20 - -require ( - github.com/jinzhu/inflection v1.0.0 // indirect - github.com/tmthrgd/go-hex v0.0.0-20190904060850-447a3041c3bc // indirect - github.com/vmihailenco/msgpack/v5 v5.3.5 // indirect - github.com/vmihailenco/tagparser/v2 v2.0.0 // indirect - golang.org/x/sys v0.0.0-20211123173158-ef496fb156ab // indirect -) diff --git a/go.sum b/go.sum index 620e00d..e69de29 100644 --- a/go.sum +++ b/go.sum @@ -1,20 +0,0 @@ -github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/jinzhu/inflection v1.0.0 h1:K317FqzuhWc8YvSVlFMCCUb36O/S9MCKRDI7QkRKD/E= -github.com/jinzhu/inflection v1.0.0/go.mod h1:h+uFLlag+Qp1Va5pdKtLDYj+kHp5pxUVkryuEj+Srlc= -github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= -github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= -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/tmthrgd/go-hex v0.0.0-20190904060850-447a3041c3bc h1:9lRDQMhESg+zvGYmW5DyG0UqvY96Bu5QYsTLvCHdrgo= -github.com/tmthrgd/go-hex v0.0.0-20190904060850-447a3041c3bc/go.mod h1:bciPuU6GHm1iF1pBvUfxfsH0Wmnc2VbpgvbI9ZWuIRs= -github.com/uptrace/bun v1.0.20 h1:/T4p9C9tEN75U3cFMBr5njlP+rBfs4An8BmlQQPbcfE= -github.com/uptrace/bun v1.0.20/go.mod h1:Uv7z0z+7dXnUS9P5hMF0hdiM/4M+xOUHQCrZpyDrpRc= -github.com/vmihailenco/msgpack/v5 v5.3.5 h1:5gO0H1iULLWGhs2H5tbAHIZTV8/cYafcFOr9znI5mJU= -github.com/vmihailenco/msgpack/v5 v5.3.5/go.mod h1:7xyJ9e+0+9SaZT0Wt1RGleJXzli6Q/V5KbhBonMG9jc= -github.com/vmihailenco/tagparser/v2 v2.0.0 h1:y09buUbR+b5aycVFQs/g70pqKVZNBmxwAhO7/IwNM9g= -github.com/vmihailenco/tagparser/v2 v2.0.0/go.mod h1:Wri+At7QHww0WTrCBeu4J6bNtoV6mEfg5OIWRZA9qds= -golang.org/x/sys v0.0.0-20211123173158-ef496fb156ab h1:rfJ1bsoJQQIAoAxTxB7bme+vHrNkRw8CqfsYh9w54cw= -golang.org/x/sys v0.0.0-20211123173158-ef496fb156ab/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= -gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= From 9a189f4bb67420b1d2822effd83d83a6526a5c0a Mon Sep 17 00:00:00 2001 From: Abin Simon Date: Tue, 11 Jan 2022 10:23:09 +0530 Subject: [PATCH 24/28] Return updated status back to client on error --- components/usermgmt/pkg/server/group.go | 8 ++++---- components/usermgmt/pkg/server/role.go | 8 ++++---- components/usermgmt/pkg/server/user.go | 6 +++--- components/usermgmt/pkg/service/role.go | 2 -- 4 files changed, 11 insertions(+), 13 deletions(-) diff --git a/components/usermgmt/pkg/server/group.go b/components/usermgmt/pkg/server/group.go index 4d3056a..456ed23 100644 --- a/components/usermgmt/pkg/server/group.go +++ b/components/usermgmt/pkg/server/group.go @@ -20,7 +20,7 @@ func NewGroupServer(ps service.GroupService) rpcv3.GroupServer { func (s *groupServer) CreateGroup(ctx context.Context, p *userpbv3.Group) (*userpbv3.Group, error) { group, err := s.Create(ctx, p) if err != nil { - return nil, err + return group, err } return group, nil } @@ -28,7 +28,7 @@ func (s *groupServer) CreateGroup(ctx context.Context, p *userpbv3.Group) (*user func (s *groupServer) GetGroups(ctx context.Context, p *userpbv3.Group) (*userpbv3.GroupList, error) { groups, err := s.List(ctx, p) if err != nil { - return nil, err + return groups, err } return groups, nil } @@ -38,7 +38,7 @@ func (s *groupServer) GetGroup(ctx context.Context, p *userpbv3.Group) (*userpbv if err != nil { group, err = s.GetByID(ctx, p.Metadata.Id) if err != nil { - return nil, err + return group, err } } @@ -56,7 +56,7 @@ func (s *groupServer) DeleteGroup(ctx context.Context, p *userpbv3.Group) (*user func (s *groupServer) UpdateGroup(ctx context.Context, p *userpbv3.Group) (*userpbv3.Group, error) { group, err := s.Update(ctx, p) if err != nil { - return nil, err + return group, err } return group, nil } diff --git a/components/usermgmt/pkg/server/role.go b/components/usermgmt/pkg/server/role.go index dac0ce8..fe19903 100644 --- a/components/usermgmt/pkg/server/role.go +++ b/components/usermgmt/pkg/server/role.go @@ -20,7 +20,7 @@ func NewRoleServer(ps service.RoleService) rpcv3.RoleServer { func (s *roleServer) CreateRole(ctx context.Context, p *userpbv3.Role) (*userpbv3.Role, error) { role, err := s.Create(ctx, p) if err != nil { - return nil, err + return role, err } return role, nil } @@ -28,7 +28,7 @@ func (s *roleServer) CreateRole(ctx context.Context, p *userpbv3.Role) (*userpbv func (s *roleServer) GetRoles(ctx context.Context, p *userpbv3.Role) (*userpbv3.RoleList, error) { roles, err := s.List(ctx, p) if err != nil { - return nil, err + return roles, err } return roles, nil } @@ -38,7 +38,7 @@ func (s *roleServer) GetRole(ctx context.Context, p *userpbv3.Role) (*userpbv3.R if err != nil { role, err = s.GetByID(ctx, p.Metadata.Id) if err != nil { - return nil, err + return role, err } } @@ -56,7 +56,7 @@ func (s *roleServer) DeleteRole(ctx context.Context, p *userpbv3.Role) (*userpbv func (s *roleServer) UpdateRole(ctx context.Context, p *userpbv3.Role) (*userpbv3.Role, error) { role, err := s.Update(ctx, p) if err != nil { - return nil, err + return role, err } return role, nil } diff --git a/components/usermgmt/pkg/server/user.go b/components/usermgmt/pkg/server/user.go index 4b1087f..c279870 100644 --- a/components/usermgmt/pkg/server/user.go +++ b/components/usermgmt/pkg/server/user.go @@ -20,7 +20,7 @@ func NewUserServer(ps service.UserService) rpcv3.UserServer { func (s *userServer) CreateUser(ctx context.Context, p *userpbv3.User) (*userpbv3.User, error) { user, err := s.Create(ctx, p) if err != nil { - return nil, err + return user, err } return user, nil } @@ -28,7 +28,7 @@ func (s *userServer) CreateUser(ctx context.Context, p *userpbv3.User) (*userpbv func (s *userServer) GetUsers(ctx context.Context, p *userpbv3.User) (*userpbv3.UserList, error) { users, err := s.List(ctx, p) if err != nil { - return nil, err + return users, err } return users, nil } @@ -38,7 +38,7 @@ func (s *userServer) GetUser(ctx context.Context, p *userpbv3.User) (*userpbv3.U // if err != nil { user, err := s.GetByID(ctx, p.Metadata.Id) if err != nil { - return nil, err + return user, err } // } diff --git a/components/usermgmt/pkg/service/role.go b/components/usermgmt/pkg/service/role.go index 2bd17df..3b0a72f 100644 --- a/components/usermgmt/pkg/service/role.go +++ b/components/usermgmt/pkg/service/role.go @@ -159,8 +159,6 @@ func (s *roleService) GetByID(ctx context.Context, id string) (*userv3.Role, err } func (s *roleService) GetByName(ctx context.Context, name string) (*userv3.Role, error) { - fmt.Println("name:", name) - role := &userv3.Role{ ApiVersion: apiVersion, Kind: roleKind, From f2124caf288e0c32f64269cbe83bbe26f4e1764f Mon Sep 17 00:00:00 2001 From: Abin Simon Date: Tue, 11 Jan 2022 10:45:28 +0530 Subject: [PATCH 25/28] User spec can now specify the groups a user belongs to --- components/usermgmt/pkg/service/user.go | 53 ++++++++++++++++++++++++- 1 file changed, 51 insertions(+), 2 deletions(-) diff --git a/components/usermgmt/pkg/service/user.go b/components/usermgmt/pkg/service/user.go index faec10c..fb9e0bc 100644 --- a/components/usermgmt/pkg/service/user.go +++ b/components/usermgmt/pkg/service/user.go @@ -70,8 +70,6 @@ func (s *userService) updateUserRoleRelation(ctx context.Context, user *userv3.U accountId, _ := uuid.Parse(user.GetMetadata().GetId()) partnerId, _ := uuid.Parse(user.GetMetadata().GetPartner()) organizationId, _ := uuid.Parse(user.GetMetadata().GetOrganization()) - - // TODO: also parse out namesapce projectNamespaceRoles := user.GetSpec().GetProjectnamespaceroles() // TODO: add transactions @@ -157,6 +155,47 @@ func (s *userService) updateUserRoleRelation(ctx context.Context, user *userv3.U return user, nil } +// Update the users(account) mapped to each group +func (s *userService) updateGroupAccountRelation(ctx context.Context, user *userv3.User) (*userv3.User, error) { + // TODO: diff and delete the old relations + userId, _ := uuid.Parse(user.GetMetadata().GetId()) + fmt.Println("userId:", userId); + + // TODO: add transactions + var grpaccs []models.GroupAccount + for _, group := range user.GetSpec().GetGroups() { + groupId, err := uuid.Parse(group) + if err != nil { + return nil, err + } + grp := models.GroupAccount{ + Name: user.GetMetadata().GetName(), // TODO: what is name for relations? + Description: user.GetMetadata().GetDescription(), // TODO: now sure what this is either + CreatedAt: time.Now(), + ModifiedAt: time.Now(), + Trash: false, + AccountId: userId, + GroupId: groupId, + Active: true, + } + grpaccs = append(grpaccs, grp) + } + if len(grpaccs) == 0 { + return user, nil + } + _, err := s.dao.Create(ctx, &grpaccs) + if err != nil { + user.Status = &v3.Status{ + ConditionType: "Create", + ConditionStatus: v3.ConditionStatus_StatusFailed, + LastUpdated: timestamppb.Now(), + } + return user, err + } + + return user, nil +} + func (s *userService) Create(ctx context.Context, user *userv3.User) (*userv3.User, error) { // TODO: restrict endpoint to admin cib := kclient.NewAdminCreateIdentityBody("default", map[string]interface{}{"email": user.Spec.Username, "first_name": user.Spec.FirstName, "last_name": user.Spec.LastName}) @@ -183,6 +222,16 @@ func (s *userService) Create(ctx context.Context, user *userv3.User) (*userv3.Us return user, err } + user, err = s.updateGroupAccountRelation(ctx, user) + if err != nil { + user.Status = &v3.Status{ + ConditionType: "Create", + ConditionStatus: v3.ConditionStatus_StatusFailed, + LastUpdated: timestamppb.Now(), + } + return user, err + } + fmt.Println("Recovery link:", rl.RecoveryLink) // TODO: email the recovery link to the user user.Metadata = &v3.Metadata{ Id: ir.Id, From 0aef2df882fb09193bb1723b396fa8d9b8889400 Mon Sep 17 00:00:00 2001 From: Abin Simon Date: Wed, 12 Jan 2022 15:12:37 +0530 Subject: [PATCH 26/28] Few tweaks on resource response on success --- components/usermgmt/README.md | 4 ++-- components/usermgmt/pkg/service/group.go | 7 +++++-- components/usermgmt/pkg/service/role.go | 2 +- components/usermgmt/pkg/service/user.go | 7 +++---- components/usermgmt/readme | 11 ----------- 5 files changed, 11 insertions(+), 20 deletions(-) delete mode 100644 components/usermgmt/readme diff --git a/components/usermgmt/README.md b/components/usermgmt/README.md index 73b5c39..a9ac69e 100644 --- a/components/usermgmt/README.md +++ b/components/usermgmt/README.md @@ -8,8 +8,8 @@ All user/auth related requests go through here. ### Run kratos migrations -``` shell -export DSN='postgres://admindbuser@localhost:5432/admindb?sslmode=disable' +``` shele +export DSN='postgres://postgres@localhost:5432/admindb?sslmode=disable' kratos -c kratos.yaml migrate sql -e --yes ``` diff --git a/components/usermgmt/pkg/service/group.go b/components/usermgmt/pkg/service/group.go index 845a4cb..8a3830c 100644 --- a/components/usermgmt/pkg/service/group.go +++ b/components/usermgmt/pkg/service/group.go @@ -76,7 +76,7 @@ func (s *groupService) updateGroupRoleRelation(ctx context.Context, group *userv pgnr := models.ProjectGroupNamespaceRole{ Name: group.GetMetadata().GetName(), Description: group.GetMetadata().GetDescription(), - CreatedAt: time.Now(), + CreatedAt: time.Now(), // TODO: could drop this as it is default ModifiedAt: time.Now(), Trash: false, RoleId: roleId, @@ -169,6 +169,9 @@ func (s *groupService) updateGroupAccountRelation(ctx context.Context, group *us } grpaccs = append(grpaccs, grp) } + if len(grpaccs) == 0 { + return group, nil + } _, err := s.dao.Create(ctx, &grpaccs) if err != nil { group.Status = &v3.Status{ @@ -218,7 +221,7 @@ func (s *groupService) Create(ctx context.Context, group *userv3.Group) (*userv3 Users: group.Spec.Users, // TODO: is this the right thing to do? Projectnamespaceroles: group.Spec.Projectnamespaceroles, // TODO: is this the right thing to do? } - if group.Status != nil { + if group.Status == nil { group.Status = &v3.Status{ ConditionType: "Create", ConditionStatus: v3.ConditionStatus_StatusOK, diff --git a/components/usermgmt/pkg/service/role.go b/components/usermgmt/pkg/service/role.go index 3b0a72f..fb31cf7 100644 --- a/components/usermgmt/pkg/service/role.go +++ b/components/usermgmt/pkg/service/role.go @@ -85,7 +85,7 @@ func (s *roleService) Create(ctx context.Context, role *userv3.Role) (*userv3.Ro IsGlobal: createdRole.IsGlobal, Scope: createdRole.Scope, } - if role.Status != nil { + if role.Status == nil { role.Status = &v3.Status{ ConditionType: "Create", ConditionStatus: v3.ConditionStatus_StatusOK, diff --git a/components/usermgmt/pkg/service/user.go b/components/usermgmt/pkg/service/user.go index fb9e0bc..51c8326 100644 --- a/components/usermgmt/pkg/service/user.go +++ b/components/usermgmt/pkg/service/user.go @@ -10,9 +10,9 @@ import ( bun "github.com/uptrace/bun" "google.golang.org/protobuf/types/known/timestamppb" + "github.com/RafaySystems/rcloud-base/components/common/pkg/persistence/provider/pg" v3 "github.com/RafaySystems/rcloud-base/components/common/proto/types/commonpb/v3" "github.com/RafaySystems/rcloud-base/components/usermgmt/pkg/internal/models" - "github.com/RafaySystems/rcloud-base/components/common/pkg/persistence/provider/pg" userrpcv3 "github.com/RafaySystems/rcloud-base/components/usermgmt/proto/rpc/v3" userv3 "github.com/RafaySystems/rcloud-base/components/usermgmt/proto/types/userpb/v3" ) @@ -50,7 +50,7 @@ func NewUserService(kc *kclient.APIClient, db *bun.DB) UserService { // Convert from kratos.Identity to GVK format func identityToUser(id *kclient.Identity) *userv3.User { - traits := id.Traits.(map[string]interface{}) + traits := id.GetTraits().(map[string]interface{}) return &userv3.User{ ApiVersion: "usermgmt.k8smgmt.io/v3", Kind: "User", @@ -159,7 +159,6 @@ func (s *userService) updateUserRoleRelation(ctx context.Context, user *userv3.U func (s *userService) updateGroupAccountRelation(ctx context.Context, user *userv3.User) (*userv3.User, error) { // TODO: diff and delete the old relations userId, _ := uuid.Parse(user.GetMetadata().GetId()) - fmt.Println("userId:", userId); // TODO: add transactions var grpaccs []models.GroupAccount @@ -169,7 +168,7 @@ func (s *userService) updateGroupAccountRelation(ctx context.Context, user *user return nil, err } grp := models.GroupAccount{ - Name: user.GetMetadata().GetName(), // TODO: what is name for relations? + Name: user.GetMetadata().GetName(), // TODO: what is name for relations? Description: user.GetMetadata().GetDescription(), // TODO: now sure what this is either CreatedAt: time.Now(), ModifiedAt: time.Now(), diff --git a/components/usermgmt/readme b/components/usermgmt/readme deleted file mode 100644 index 688f79a..0000000 --- a/components/usermgmt/readme +++ /dev/null @@ -1,11 +0,0 @@ -User management for rcloud - -Dependencies: -- ory/kratos - -Components: -- Glue between frontend and kratos -- Auth validation for use in other modules - -TBD: -- Will casbin be integrated in same module or separate api call? (Probably separate api call) \ No newline at end of file From ca11e2bd9ba426886ea41bfb61c5443dc06ad1eb Mon Sep 17 00:00:00 2001 From: Abin Simon Date: Wed, 12 Jan 2022 15:12:57 +0530 Subject: [PATCH 27/28] Updated rest examples file --- components/usermgmt/master.rest | 104 ++++++++++++++++++++++++++++++-- 1 file changed, 99 insertions(+), 5 deletions(-) diff --git a/components/usermgmt/master.rest b/components/usermgmt/master.rest index d3886e8..0427b53 100644 --- a/components/usermgmt/master.rest +++ b/components/usermgmt/master.rest @@ -1,14 +1,45 @@ :host = http://localhost:11000 :partner = 439fd1c6-e947-4dad-a9e9-ca1f50898f85 :org = 960bb196-76b2-430a-a72e-88d8362c07c3 +:group = my-group +:role = my-role +:groupid = 99f4ea22-089c-4016-a1f9-e8b156d34cf5 +:roleid = 3de58ba8-a42f-49bb-b8bd-052363123fdc :userid = 8f35abd7-0c8c-4770-a2c7-430f79bb5eb7 +:projectid = c61ec2fe-543c-4e10-a1b6-c53c43fb9ca4 ## Users # Create user POST :host/auth/v3/partner/:partner/organization/:org/users -{"spec": {"username": "anothernewguy@notaprovider.com", "firstName": "John", "lastName": "Doe"}} --> jq-set-var :userid .metadata.id +{"spec": {"username": "updatduser@notaprovider.com", "firstName": "John", "lastName": "Doe"}} + +# Create user with roles +POST :host/auth/v3/partner/:partner/organization/:org/users +Content-Type: application/yaml + +spec: + username: tany@notarvider.com + firstName: John + lastName: Doe + projectnamespaceroles: + - role: :roleid + namespace: 7 + project: :projectid + - role: :roleid + namespace: 9 + project: :projectid + +# Create user with groups +POST :host/auth/v3/partner/:partner/organization/:org/users +Content-Type: application/yaml + +spec: + username: aegy@notaprovider.com + firstName: John + lastName: Doe + groups: + - :groupid # Get all users GET :host/auth/v3/partner/:partner/organization/:org/users @@ -27,17 +58,80 @@ DELETE :host/auth/v3/partner/:partner/organization/:org/user/:userid ## Groups # Create group - POST :host/auth/v3/partner/:partner/organization/:org/groups Content-Type: application/yaml metadata: - name: my-group + name: :groupname description: My first description partner: :partner organization: :org spec: type: simple + users: + - 8f35abd7-0c8c-4770-a2c7-430f79bb5eb7 + projectnamespaceroles: + - role: :roleid + namespace: 7 + project: :projectid + +# Create group no namespace +POST :host/auth/v3/partner/:partner/organization/:org/groups +Content-Type: application/yaml + +metadata: + name: :groupname + description: My first description + partner: :partner + organization: :org +spec: + type: simple + users: + - 8f35abd7-0c8c-4770-a2c7-430f79bb5eb7 + projectnamespaceroles: + - role: :roleid + project: :projectid + +# Create group no namespace and project +POST :host/auth/v3/partner/:partner/organization/:org/groups +Content-Type: application/yaml + +metadata: + name: :groupname + description: My first description + partner: :partner + organization: :org +spec: + type: simple + users: + - 8f35abd7-0c8c-4770-a2c7-430f79bb5eb7 + projectnamespaceroles: + - role: :roleid # Get all groups -GET :host/auth/v3/partner/:partner/organization/:org/groups \ No newline at end of file +GET :host/auth/v3/partner/:partner/organization/:org/groups + +# Get a group +GET :host/auth/v3/partner/:partner/organization/:org/group/:groupid + + +## Roles + +# Create role + +POST :host/auth/v3/partner/:partner/organization/:org/roles +Content-Type: application/yaml + +metadata: + name: :role + description: My first role + partner: :partner + organization: :org +spec: + type: simple + +# Get all roles +GET :host/auth/v3/partner/:partner/organization/:org/roles + +# Get a role +GET :host/auth/v3/partner/:partner/organization/:org/role/:role \ No newline at end of file From 64a70363dbc3075c7afa3936447e6166e7eb7422 Mon Sep 17 00:00:00 2001 From: Abin Simon Date: Thu, 13 Jan 2022 10:29:54 +0530 Subject: [PATCH 28/28] Simplify server package for usermgmt --- components/usermgmt/pkg/server/group.go | 29 ++++------------------- components/usermgmt/pkg/server/role.go | 29 ++++------------------- components/usermgmt/pkg/server/user.go | 31 +++++-------------------- 3 files changed, 16 insertions(+), 73 deletions(-) diff --git a/components/usermgmt/pkg/server/group.go b/components/usermgmt/pkg/server/group.go index 456ed23..3e396d9 100644 --- a/components/usermgmt/pkg/server/group.go +++ b/components/usermgmt/pkg/server/group.go @@ -18,45 +18,26 @@ func NewGroupServer(ps service.GroupService) rpcv3.GroupServer { } func (s *groupServer) CreateGroup(ctx context.Context, p *userpbv3.Group) (*userpbv3.Group, error) { - group, err := s.Create(ctx, p) - if err != nil { - return group, err - } - return group, nil + return s.Create(ctx, p) } func (s *groupServer) GetGroups(ctx context.Context, p *userpbv3.Group) (*userpbv3.GroupList, error) { - groups, err := s.List(ctx, p) - if err != nil { - return groups, err - } - return groups, nil + return s.List(ctx, p) } func (s *groupServer) GetGroup(ctx context.Context, p *userpbv3.Group) (*userpbv3.Group, error) { group, err := s.GetByName(ctx, p.Metadata.Name) if err != nil { - group, err = s.GetByID(ctx, p.Metadata.Id) - if err != nil { - return group, err - } + return s.GetByID(ctx, p.Metadata.Id) } - return group, nil } func (s *groupServer) DeleteGroup(ctx context.Context, p *userpbv3.Group) (*userpbv3.Group, error) { _, err := s.Delete(ctx, p) - if err != nil { - return nil, err - } - return nil, nil + return nil, err } func (s *groupServer) UpdateGroup(ctx context.Context, p *userpbv3.Group) (*userpbv3.Group, error) { - group, err := s.Update(ctx, p) - if err != nil { - return group, err - } - return group, nil + return s.Update(ctx, p) } diff --git a/components/usermgmt/pkg/server/role.go b/components/usermgmt/pkg/server/role.go index fe19903..d63d22c 100644 --- a/components/usermgmt/pkg/server/role.go +++ b/components/usermgmt/pkg/server/role.go @@ -18,45 +18,26 @@ func NewRoleServer(ps service.RoleService) rpcv3.RoleServer { } func (s *roleServer) CreateRole(ctx context.Context, p *userpbv3.Role) (*userpbv3.Role, error) { - role, err := s.Create(ctx, p) - if err != nil { - return role, err - } - return role, nil + return s.Create(ctx, p) } func (s *roleServer) GetRoles(ctx context.Context, p *userpbv3.Role) (*userpbv3.RoleList, error) { - roles, err := s.List(ctx, p) - if err != nil { - return roles, err - } - return roles, nil + return s.List(ctx, p) } func (s *roleServer) GetRole(ctx context.Context, p *userpbv3.Role) (*userpbv3.Role, error) { role, err := s.GetByName(ctx, p.Metadata.Name) if err != nil { - role, err = s.GetByID(ctx, p.Metadata.Id) - if err != nil { - return role, err - } + return s.GetByID(ctx, p.Metadata.Id) } - return role, nil } func (s *roleServer) DeleteRole(ctx context.Context, p *userpbv3.Role) (*userpbv3.Role, error) { _, err := s.Delete(ctx, p) - if err != nil { - return nil, err - } - return nil, nil + return nil, err } func (s *roleServer) UpdateRole(ctx context.Context, p *userpbv3.Role) (*userpbv3.Role, error) { - role, err := s.Update(ctx, p) - if err != nil { - return role, err - } - return role, nil + return s.Update(ctx, p) } diff --git a/components/usermgmt/pkg/server/user.go b/components/usermgmt/pkg/server/user.go index c279870..7104106 100644 --- a/components/usermgmt/pkg/server/user.go +++ b/components/usermgmt/pkg/server/user.go @@ -18,45 +18,26 @@ func NewUserServer(ps service.UserService) rpcv3.UserServer { } func (s *userServer) CreateUser(ctx context.Context, p *userpbv3.User) (*userpbv3.User, error) { - user, err := s.Create(ctx, p) - if err != nil { - return user, err - } - return user, nil + return s.Create(ctx, p) } func (s *userServer) GetUsers(ctx context.Context, p *userpbv3.User) (*userpbv3.UserList, error) { - users, err := s.List(ctx, p) - if err != nil { - return users, err - } - return users, nil + return s.List(ctx, p) } func (s *userServer) GetUser(ctx context.Context, p *userpbv3.User) (*userpbv3.User, error) { // user, err := s.GetByName(ctx, p.Metadata.Name) // if err != nil { - user, err := s.GetByID(ctx, p.Metadata.Id) - if err != nil { - return user, err - } + return s.GetByID(ctx, p.Metadata.Id) // } - - return user, nil + // return user, nil } func (s *userServer) DeleteUser(ctx context.Context, p *userpbv3.User) (*rpcv3.DeleteUserResponse, error) { _, err := s.Delete(ctx, p) - if err != nil { - return nil, err - } - return nil, nil + return nil, err } func (s *userServer) UpdateUser(ctx context.Context, p *userpbv3.User) (*userpbv3.User, error) { - user, err := s.Update(ctx, p) - if err != nil { - return nil, err - } - return user, nil + return s.Update(ctx, p) }