diff --git a/README.md b/README.md index 1f209a9..a2559df 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,47 @@ # 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 application 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/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/README.md b/components/usermgmt/README.md new file mode 100644 index 0000000..a9ac69e --- /dev/null +++ b/components/usermgmt/README.md @@ -0,0 +1,28 @@ +# 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 + +### Run kratos migrations + +``` shele +export DSN='postgres://postgres@localhost:5432/admindb?sslmode=disable' +kratos -c kratos.yaml migrate sql -e --yes +``` + +### Start kratos + +``` shell +cd components/usermgmt/_kratos +kratos serve -c kratos.yml +``` + +### Run usermgmt server + +``` shell +cd components/usermgmt/_kratos +go run main.go +``` 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..2e5ce71 --- /dev/null +++ b/components/usermgmt/_kratos/kratos.yml @@ -0,0 +1,79 @@ +version: v0.7.1-alpha.1 + +dsn: postgres://admindbuser@localhost:5432/admindb?sslmode=disable + +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 diff --git a/components/usermgmt/buf.gen.yaml b/components/usermgmt/buf.gen.yaml new file mode 100644 index 0000000..9f2db66 --- /dev/null +++ b/components/usermgmt/buf.gen.yaml @@ -0,0 +1,26 @@ +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 + 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: . + 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/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..82ecb6b --- /dev/null +++ b/components/usermgmt/gen/openapi/proto/rpc/v3/group.swagger.json @@ -0,0 +1,1284 @@ +{ + "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/partner/{metadata.partner}/organization/{metadata.organization}/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.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", + "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": "Group" + }, + { + "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.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/v3Group" + } + }, + "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.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", + "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": "Group" + }, + { + "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.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.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", + "required": true, + "type": "string" + }, + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/v3Group" + } + } + ], + "tags": [ + "Group" + ] + } + }, + "/auth/v3/partner/{metadata.partner}/organization/{metadata.organization}/group/{metadata.name}": { + "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": "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", + "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": "Group" + }, + { + "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" + } + ], + "tags": [ + "Group" + ] + }, + "delete": { + "operationId": "Group_DeleteGroup", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/v3Group" + } + }, + "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.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", + "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": "Group" + }, + { + "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" + } + ], + "tags": [ + "Group" + ] + }, + "put": { + "operationId": "Group_UpdateGroup", + "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.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", + "in": "path", + "required": true, + "type": "string" + }, + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/v3Group" + } + } + ], + "tags": [ + "Group" + ] + } + }, + "/auth/v3/partner/{metadata.partner}/organization/{metadata.organization}/groups": { + "get": { + "operationId": "Group_GetGroups", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/v3GroupList" + } + }, + "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.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": "Group" + }, + { + "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" + } + ], + "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": "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", + "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" + }, + "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": "Group", + "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" + ] + }, + "v3GroupList": { + "type": "object", + "properties": { + "apiVersion": { + "type": "string", + "description": "API Version of the group list resource", + "title": "API Version", + "readOnly": true + }, + "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", + "properties": { + "projectnamespaceroles": { + "type": "array", + "items": { + "$ref": "#/definitions/v3ProjectNamespaceRole" + }, + "description": "Project, namespace, role associations for group", + "title": "ProjectNamespaceRoles" + }, + "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" + }, + "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": { + "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" + }, + "organization": { + "type": "string", + "description": "Organization to which the resource belongs", + "title": "Organization" + }, + "partner": { + "type": "string", + "description": "Partner to which the resource belongs", + "title": "Partner" + }, + "id": { + "type": "string", + "readOnly": true + }, + "modifiedAt": { + "type": "string", + "format": "date-time", + "readOnly": true + } + }, + "description": "metadata of the resource", + "title": "Metadata", + "required": [ + "name", + "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" + } + }, + "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..e3139ea --- /dev/null +++ b/components/usermgmt/gen/openapi/proto/rpc/v3/role.swagger.json @@ -0,0 +1,1294 @@ +{ + "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/partner/{metadata.partner}/organization/{metadata.organization}/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.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", + "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.modifiedAt", + "in": "query", + "required": false, + "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", + "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/v3Role" + } + }, + "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.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", + "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.modifiedAt", + "in": "query", + "required": false, + "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", + "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.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", + "required": true, + "type": "string" + }, + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/v3Role" + } + } + ], + "tags": [ + "Role" + ] + } + }, + "/auth/v3/partner/{metadata.partner}/organization/{metadata.organization}/role/{metadata.name}": { + "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": "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", + "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.id", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "metadata.modifiedAt", + "in": "query", + "required": false, + "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", + "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_DeleteRole", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/v3Role" + } + }, + "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.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", + "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.id", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "metadata.modifiedAt", + "in": "query", + "required": false, + "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", + "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_UpdateRole", + "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.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", + "in": "path", + "required": true, + "type": "string" + }, + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/v3Role" + } + } + ], + "tags": [ + "Role" + ] + } + }, + "/auth/v3/partner/{metadata.partner}/organization/{metadata.organization}/roles": { + "get": { + "operationId": "Role_GetRoles", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/v3RoleList" + } + }, + "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.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": "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", + "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" + ] + }, + "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": "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", + "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" + }, + "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": { + "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" + }, + "organization": { + "type": "string", + "description": "Organization to which the resource belongs", + "title": "Organization" + }, + "partner": { + "type": "string", + "description": "Partner to which the resource belongs", + "title": "Partner" + }, + "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" + ] + }, + "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": { + "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" + } + }, + "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..6254731 --- /dev/null +++ b/components/usermgmt/gen/openapi/proto/rpc/v3/rolepermission.swagger.json @@ -0,0 +1,735 @@ +{ + "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/{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.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.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": { + "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.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.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" + ] + } + }, + "/auth/v3/rolepermissions": { + "get": { + "operationId": "Rolepermission_GetRolepermissions", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/v3RolePermissionList" + } + }, + "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": "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" + ] + } + } + }, + "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" + }, + "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": { + "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" + }, + "organization": { + "type": "string", + "description": "Organization to which the resource belongs", + "title": "Organization" + }, + "partner": { + "type": "string", + "description": "Partner to which the resource belongs", + "title": "Partner" + }, + "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" + ] + }, + "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": { + "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..7197ca2 --- /dev/null +++ b/components/usermgmt/gen/openapi/proto/rpc/v3/user.swagger.json @@ -0,0 +1,1574 @@ +{ + "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/partner/{metadata.partner}/organization/{metadata.organization}/v3/user/{metadata.id}": { + "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.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", + "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.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" + ] + } + }, + "/auth/v3/partner/{metadata.partner}/organization/{metadata.organization}/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.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", + "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.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.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", + "required": true, + "type": "string" + }, + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/v3User" + } + } + ], + "tags": [ + "User" + ] + } + }, + "/auth/v3/partner/{metadata.partner}/organization/{metadata.organization}/user/{metadata.name}": { + "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": "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", + "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.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" + ] + }, + "delete": { + "operationId": "User_DeleteUser", + "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.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", + "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.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" + ] + }, + "put": { + "operationId": "User_UpdateUser", + "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.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", + "in": "path", + "required": true, + "type": "string" + }, + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/v3User" + } + } + ], + "tags": [ + "User" + ] + } + }, + "/auth/v3/partner/{metadata.partner}/organization/{metadata.organization}/users": { + "get": { + "operationId": "User_GetUsers", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/v3UserList" + } + }, + "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.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" + ] + }, + "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": "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", + "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" + }, + "v3DeleteUserResponse": { + "type": "object" + }, + "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": { + "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" + }, + "organization": { + "type": "string", + "description": "Organization to which the resource belongs", + "title": "Organization" + }, + "partner": { + "type": "string", + "description": "Partner to which the resource belongs", + "title": "Partner" + }, + "id": { + "type": "string", + "readOnly": true + }, + "modifiedAt": { + "type": "string", + "format": "date-time", + "readOnly": true + } + }, + "description": "metadata of the resource", + "title": "Metadata", + "required": [ + "name", + "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": { + "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" + ] + }, + "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 + }, + "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" + }, + "groups": { + "type": "array", + "items": { + "type": "string" + }, + "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", + "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/go.mod b/components/usermgmt/go.mod new file mode 100644 index 0000000..5945c4c --- /dev/null +++ b/components/usermgmt/go.mod @@ -0,0 +1,67 @@ +module github.com/RafaySystems/rcloud-base/components/usermgmt + +go 1.17 + +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 + 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 new file mode 100644 index 0000000..fda661d --- /dev/null +++ b/components/usermgmt/go.sum @@ -0,0 +1,1126 @@ +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= +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/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= +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 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/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 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/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= +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= +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 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= +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-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= +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 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= +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 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/main.go b/components/usermgmt/main.go new file mode 100644 index 0000000..972c445 --- /dev/null +++ b/components/usermgmt/main.go @@ -0,0 +1,257 @@ +package main + +import ( + "context" + "database/sql" + "fmt" + "net" + "net/http" + "sync" + "time" + + "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" + 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/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" + "google.golang.org/grpc" + _grpc "google.golang.org/grpc" +) + +const ( + rpcPortEnv = "RPC_PORT" + apiPortEnv = "API_PORT" + 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" +) + +var ( + rpcPort int + apiPort int + debugPort int + rpcRelayPeeringPort int + kratosScheme string + kratosAddr string + kc *kclient.APIClient + dbAddr string + dbName string + dbUser string + dbPassword string + db *bun.DB + us service.UserService + gs service.GroupService + rs service.RoleService + dev bool + _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(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") + + viper.BindEnv(rpcPortEnv) + viper.BindEnv(apiPortEnv) + 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) + + rpcPort = viper.GetInt(rpcPortEnv) + apiPort = viper.GetInt(apiPortEnv) + 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) + + rpcRelayPeeringPort = rpcPort + 1 + kratosConfig := kclient.NewConfiguration() + kratosConfig.Servers[0].URL = kratosScheme + "://" + kratosAddr + kc = kclient.NewAPIClient(kratosConfig) + + 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"), + )) + + us = service.NewUserService(kc, db) + gs = service.NewGroupService(db) + rs = service.NewRoleService(db) + + _log.Infow("usermgmt setup complete") +} + +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, + pbrpcv3.RegisterGroupHandlerFromEndpoint, + pbrpcv3.RegisterRoleHandlerFromEndpoint, + ) + 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 runRPC(wg *sync.WaitGroup, ctx context.Context) { + defer wg.Done() + // defer configPool.Close() + defer gs.Close() + defer rs.Close() + + userServer := server.NewUserServer(us) + groupServer := server.NewGroupServer(gs) + roleServer := server.NewRoleServer(rs) + + 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, userServer) + rpcv3.RegisterGroupServer(s, groupServer) + rpcv3.RegisterRoleServer(s, roleServer) + + _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/master.rest b/components/usermgmt/master.rest new file mode 100644 index 0000000..0427b53 --- /dev/null +++ b/components/usermgmt/master.rest @@ -0,0 +1,137 @@ +: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": "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 + +# Get single user +GET :host/auth/v3/partner/:partner/organization/:org/user/:userid + +# Update user info +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/partner/:partner/organization/:org/user/:userid + + +## Groups + +# Create group +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 + 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 + +# 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 diff --git a/components/usermgmt/pkg/internal/models/accountresourcerole.go b/components/usermgmt/pkg/internal/models/accountresourcerole.go new file mode 100644 index 0000000..cda4a5e --- /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:false"` + 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/group.go b/components/usermgmt/pkg/internal/models/group.go new file mode 100644 index 0000000..2733be1 --- /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,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 new file mode 100644 index 0000000..89b96ae --- /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,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"` + GroupId uuid.UUID `bun:"group_id,type:uuid"` + Active bool `bun:"active,notnull"` +} diff --git a/components/usermgmt/pkg/internal/models/grouprole.go b/components/usermgmt/pkg/internal/models/grouprole.go new file mode 100644 index 0000000..6530a9b --- /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:false"` + 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/projectaccountnamespacerole.go b/components/usermgmt/pkg/internal/models/projectaccountnamespacerole.go new file mode 100644 index 0000000..08bf67f --- /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,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"` + 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..28a88b9 --- /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:false"` + 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/projectgroupnamespacerole.go b/components/usermgmt/pkg/internal/models/projectgroupnamespacerole.go new file mode 100644 index 0000000..810161f --- /dev/null +++ b/components/usermgmt/pkg/internal/models/projectgroupnamespacerole.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,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"` + 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..a9dfef5 --- /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:false"` + 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/internal/models/role.go b/components/usermgmt/pkg/internal/models/role.go new file mode 100644 index 0000000..9ef1163 --- /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,default:false"` + 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 new file mode 100644 index 0000000..3e396d9 --- /dev/null +++ b/components/usermgmt/pkg/server/group.go @@ -0,0 +1,43 @@ +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 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) { + return s.Create(ctx, p) +} + +func (s *groupServer) GetGroups(ctx context.Context, p *userpbv3.Group) (*userpbv3.GroupList, error) { + 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 { + 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) + return nil, err +} + +func (s *groupServer) UpdateGroup(ctx context.Context, p *userpbv3.Group) (*userpbv3.Group, error) { + return s.Update(ctx, p) +} diff --git a/components/usermgmt/pkg/server/role.go b/components/usermgmt/pkg/server/role.go new file mode 100644 index 0000000..d63d22c --- /dev/null +++ b/components/usermgmt/pkg/server/role.go @@ -0,0 +1,43 @@ +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) { + return s.Create(ctx, p) +} + +func (s *roleServer) GetRoles(ctx context.Context, p *userpbv3.Role) (*userpbv3.RoleList, error) { + 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 { + 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) + return nil, err +} + +func (s *roleServer) UpdateRole(ctx context.Context, p *userpbv3.Role) (*userpbv3.Role, error) { + return s.Update(ctx, p) +} diff --git a/components/usermgmt/pkg/server/user.go b/components/usermgmt/pkg/server/user.go new file mode 100644 index 0000000..7104106 --- /dev/null +++ b/components/usermgmt/pkg/server/user.go @@ -0,0 +1,43 @@ +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) { + return s.Create(ctx, p) +} + +func (s *userServer) GetUsers(ctx context.Context, p *userpbv3.User) (*userpbv3.UserList, error) { + 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 { + return s.GetByID(ctx, p.Metadata.Id) + // } + // return user, nil +} + +func (s *userServer) DeleteUser(ctx context.Context, p *userpbv3.User) (*rpcv3.DeleteUserResponse, error) { + _, err := s.Delete(ctx, p) + return nil, err +} + +func (s *userServer) UpdateUser(ctx context.Context, p *userpbv3.User) (*userpbv3.User, error) { + return s.Update(ctx, p) +} diff --git a/components/usermgmt/pkg/service/group.go b/components/usermgmt/pkg/service/group.go new file mode 100644 index 0000000..8a3830c --- /dev/null +++ b/components/usermgmt/pkg/service/group.go @@ -0,0 +1,515 @@ +package service + +import ( + "context" + "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" + 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), + } +} + +// Map roles to groups +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()) + + // 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 { + project := pnr.Project + namespace := pnr.Namespace + roleId, err := uuid.Parse(pnr.GetRole()) + if err != nil { + return group, err + } + switch { + case namespace != nil: + namespaceId := pnr.GetNamespace() + projectId, _ := uuid.Parse(pnr.GetProject()) + pgnr := models.ProjectGroupNamespaceRole{ + Name: group.GetMetadata().GetName(), + Description: group.GetMetadata().GetDescription(), + CreatedAt: time.Now(), // TODO: could drop this as it is default + ModifiedAt: time.Now(), + Trash: false, + RoleId: roleId, + PartnerId: partnerId, + OrganizationId: organizationId, + GroupId: groupId, + ProjectId: projectId, + NamesapceId: namespaceId, + Active: true, + } + pgnrs = append(pgnrs, pgnr) + case project != nil: + projectId, _ := uuid.Parse(pnr.GetProject()) + 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 + // 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) + } + if len(grpaccs) == 0 { + return group, nil + } + _, 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 (at least in output) + // TODO: create vs apply difference like in kubectl?? + //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, + 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{ + ConditionType: "Create", + ConditionStatus: v3.ConditionStatus_StatusOK, + LastUpdated: timestamppb.Now(), + } + } + } + + 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 + } + + group, err = s.updateGroupRoleRelation(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) { + + 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) { + // TODO: inform when unchanged + + 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/role.go b/components/usermgmt/pkg/service/role.go new file mode 100644 index 0000000..fb31cf7 --- /dev/null +++ b/components/usermgmt/pkg/service/role.go @@ -0,0 +1,365 @@ +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/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" + "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), + } +} + +// 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: 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 + rle := 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, &rle) + 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 rle, ok := entity.(*models.Role); ok { + labels := make(map[string]string) + labels["organization"] = rle.OrganizationId.String() + + role.Metadata = &v3.Metadata{ + Name: rle.Name, + Description: rle.Description, + Id: rle.ID.String(), + Organization: rle.OrganizationId.String(), + Partner: rle.PartnerId.String(), + Labels: labels, + ModifiedAt: timestamppb.New(rle.ModifiedAt), + } + role.Spec = &userv3.RoleSpec{ + IsGlobal: rle.IsGlobal, + Scope: rle.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) { + 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 rle, ok := entity.(*models.Role); ok { + labels := make(map[string]string) + labels["organization"] = rle.OrganizationId.String() + + role.Metadata = &v3.Metadata{ + Name: rle.Name, + Description: rle.Description, + Id: rle.ID.String(), + Organization: rle.OrganizationId.String(), + Partner: rle.PartnerId.String(), + Labels: labels, + ModifiedAt: timestamppb.New(rle.ModifiedAt), + } + role.Spec = &userv3.RoleSpec{ + IsGlobal: rle.IsGlobal, + Scope: rle.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 rle, ok := entity.(*models.Role); ok { + //update role details + 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, rle) + 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: rle.IsGlobal, + Scope: rle.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 rle, ok := entity.(*models.Role); ok { + err = s.dao.Delete(ctx, id, rle) + 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 = rle.ID.String() + role.Metadata.Name = rle.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 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 rles, ok := entities.(*[]models.Role); ok { + for _, rle := range *rles { + labels := make(map[string]string) + labels["organization"] = rle.OrganizationId.String() + labels["partner"] = rle.PartnerId.String() + + role.Metadata = &v3.Metadata{ + Name: rle.Name, + Description: rle.Description, + Id: rle.ID.String(), + Organization: rle.OrganizationId.String(), + Partner: rle.PartnerId.String(), + Labels: labels, + ModifiedAt: timestamppb.New(rle.ModifiedAt), + } + role.Spec = &userv3.RoleSpec{ + // IsGlobal: rle.IsGlobal, + Scope: rle.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/pkg/service/user.go b/components/usermgmt/pkg/service/user.go new file mode 100644 index 0000000..51c8326 --- /dev/null +++ b/components/usermgmt/pkg/service/user.go @@ -0,0 +1,287 @@ +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" + + "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" + userrpcv3 "github.com/RafaySystems/rcloud-base/components/usermgmt/proto/rpc/v3" + userv3 "github.com/RafaySystems/rcloud-base/components/usermgmt/proto/types/userpb/v3" +) + +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 + dao pg.EntityDAO +} + +func NewUserService(kc *kclient.APIClient, db *bun.DB) UserService { + return &userService{kc: kc, dao: pg.NewEntityDAO(db)} +} + +// Convert from kratos.Identity to GVK format +func identityToUser(id *kclient.Identity) *userv3.User { + traits := id.GetTraits().(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), + }, + } +} + +// 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()) + 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 +} + +// 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()) + + // 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}) + 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 + } + 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 + } + + 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, + } + user.Status = &v3.Status{ + ConditionType: "StatusOK", + ConditionStatus: v3.ConditionStatus_StatusOK, + } + + return user, nil +} +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 + } + res := &userv3.UserList{} + for _, u := range ir { + res.Items = append(res.Items, identityToUser(&u)) + } + return res, nil +} +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, id).Execute() + if err != nil { + return nil, err + } + return identityToUser(ir), nil +} +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 { + fmt.Println(hr) + // TODO: forward exact error message from kratos (eg: json schema validation) + return nil, err + } + user.Status = &v3.Status{ + ConditionType: "StatusOK", + ConditionStatus: v3.ConditionStatus_StatusOK, + } + + return user, nil +} +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 { + return nil, err + } + + return &userrpcv3.DeleteUserResponse{}, nil +} diff --git a/components/usermgmt/proto/rpc/v3/group.pb.go b/components/usermgmt/proto/rpc/v3/group.pb.go new file mode 100644 index 0000000..e844e42 --- /dev/null +++ b/components/usermgmt/proto/rpc/v3/group.pb.go @@ -0,0 +1,207 @@ +// 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" +) + +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) +) + +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, 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, 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_goTypes = []interface{}{ + (*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{ + 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 + 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() } +func file_proto_rpc_v3_group_proto_init() { + if File_proto_rpc_v3_group_proto != nil { + return + } + 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: 0, + NumExtensions: 0, + NumServices: 1, + }, + GoTypes: file_proto_rpc_v3_group_proto_goTypes, + DependencyIndexes: file_proto_rpc_v3_group_proto_depIdxs, + }.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/rpc/v3/group.pb.gw.go b/components/usermgmt/proto/rpc/v3/group.pb.gw.go new file mode 100644 index 0000000..bdb507c --- /dev/null +++ b/components/usermgmt/proto/rpc/v3/group.pb.gw.go @@ -0,0 +1,1297 @@ +// 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) + } + + 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 + +} + +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) + } + + 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{"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 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) + } + 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 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) + } + 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 + +} + +var ( + 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) { + 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) + } + + val, ok = pathParams["metadata.name"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "metadata.name") + } + + err = runtime.PopulateFieldFromPath(&protoReq, "metadata.name", val) + if err != nil { + 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)) + 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 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) + } + + val, ok = pathParams["metadata.name"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "metadata.name") + } + + err = runtime.PopulateFieldFromPath(&protoReq, "metadata.name", val) + if err != nil { + 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, "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) { + 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) + } + + 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.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") + } + + 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) + 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 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.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") + } + + err = runtime.PopulateFieldFromPath(&protoReq, "metadata.name", val) + if err != nil { + 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)) + 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 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.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") + } + + err = runtime.PopulateFieldFromPath(&protoReq, "metadata.name", val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "metadata.name", err) + } + + msg, err := server.UpdateGroup(ctx, &protoReq) + return msg, metadata, err + +} + +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.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") + } + + 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.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") + } + + 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, "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) { + 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) + } + + val, ok = pathParams["metadata.name"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "metadata.name") + } + + err = runtime.PopulateFieldFromPath(&protoReq, "metadata.name", val) + if err != nil { + 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)) + 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 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) + } + + val, ok = pathParams["metadata.name"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "metadata.name") + } + + err = runtime.PopulateFieldFromPath(&protoReq, "metadata.name", val) + if err != nil { + 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, "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) { + 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) + } + + 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.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") + } + + 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) + 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/partner/{metadata.partner}/organization/{metadata.organization}/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/partner/{metadata.partner}/organization/{metadata.organization}/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/partner/{metadata.partner}/organization/{metadata.organization}/group/{metadata.name}")) + 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("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/partner/{metadata.partner}/organization/{metadata.organization}/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/partner/{metadata.partner}/organization/{metadata.organization}/group/{metadata.name}")) + 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("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/partner/{metadata.partner}/organization/{metadata.organization}/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/partner/{metadata.partner}/organization/{metadata.organization}/group/{metadata.name}")) + 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()...) + + }) + + 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/partner/{metadata.partner}/organization/{metadata.organization}/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 +} + +// 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/partner/{metadata.partner}/organization/{metadata.organization}/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/partner/{metadata.partner}/organization/{metadata.organization}/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/partner/{metadata.partner}/organization/{metadata.organization}/group/{metadata.name}")) + 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("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/partner/{metadata.partner}/organization/{metadata.organization}/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/partner/{metadata.partner}/organization/{metadata.organization}/group/{metadata.name}")) + 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("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/partner/{metadata.partner}/organization/{metadata.organization}/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/partner/{metadata.partner}/organization/{metadata.organization}/group/{metadata.name}")) + 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()...) + + }) + + 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/partner/{metadata.partner}/organization/{metadata.organization}/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 +} + +var ( + 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, 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, 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, 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, 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, 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, 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, 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 ( + forward_Group_CreateGroup_0 = runtime.ForwardResponseMessage + + forward_Group_GetGroups_0 = runtime.ForwardResponseMessage + + 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 new file mode 100644 index 0000000..2fb9c80 --- /dev/null +++ b/components/usermgmt/proto/rpc/v3/group.proto @@ -0,0 +1,127 @@ +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}} + } + } +}; + +service Group { + rpc CreateGroup(rafay.dev.types.user.v3.Group) + returns (rafay.dev.types.user.v3.Group) { + option (google.api.http) = { + post : "/auth/v3/partner/{metadata.partner}/organization/{metadata.organization}/groups" + body : "*" + }; + + option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation) = { + responses : { + key : "201" + value : {description : "Returned when group is created successfully."} + } + }; + }; + + rpc GetGroups(rafay.dev.types.user.v3.Group) returns (rafay.dev.types.user.v3.GroupList) { + option (google.api.http) = { + 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/partner/{metadata.partner}/organization/{metadata.organization}/group/{metadata.name}" + additional_bindings { + 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/partner/{metadata.partner}/organization/{metadata.organization}/group/{metadata.name}" + body : "*" + additional_bindings { + put : "/auth/v3/partner/{metadata.partner}/organization/{metadata.organization}/group/{metadata.id}" + body : "*" + } + }; + }; + + rpc DeleteGroup(rafay.dev.types.user.v3.Group) returns (rafay.dev.types.user.v3.Group) { + option (google.api.http) = { + delete : "/auth/v3/partner/{metadata.partner}/organization/{metadata.organization}/group/{metadata.name}" + additional_bindings { + delete : "/auth/v3/partner/{metadata.partner}/organization/{metadata.organization}/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 new file mode 100644 index 0000000..70944d8 --- /dev/null +++ b/components/usermgmt/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 *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) (*v3.Group, 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 *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 { + return nil, err + } + return out, nil +} + +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 { + return nil, err + } + return out, nil +} + +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 + } + return out, nil +} + +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 + } + 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, *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) (*v3.Group, 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, *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) { + return nil, status.Errorf(codes.Unimplemented, "method GetGroup not implemented") +} +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) (*v3.Group, 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(v3.Group) + 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.(*v3.Group)) + } + 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(v3.Group) + 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.(*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(v3.Group) + 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.(*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(v3.Group) + 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.(*v3.Group)) + } + 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/rpc/v3/role.pb.go b/components/usermgmt/proto/rpc/v3/role.pb.go new file mode 100644 index 0000000..ed7c62d --- /dev/null +++ b/components/usermgmt/proto/rpc/v3/role.pb.go @@ -0,0 +1,205 @@ +// 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" +) + +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) +) + +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, 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, 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, + 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_goTypes = []interface{}{ + (*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{ + 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 + 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() } +func file_proto_rpc_v3_role_proto_init() { + if File_proto_rpc_v3_role_proto != nil { + return + } + 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: 0, + NumExtensions: 0, + NumServices: 1, + }, + GoTypes: file_proto_rpc_v3_role_proto_goTypes, + DependencyIndexes: file_proto_rpc_v3_role_proto_depIdxs, + }.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/rpc/v3/role.pb.gw.go b/components/usermgmt/proto/rpc/v3/role.pb.gw.go new file mode 100644 index 0000000..7dee664 --- /dev/null +++ b/components/usermgmt/proto/rpc/v3/role.pb.gw.go @@ -0,0 +1,1297 @@ +// 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) + } + + 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 + +} + +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) + } + + 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 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 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, "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) { + 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) + } + + val, ok = pathParams["metadata.name"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "metadata.name") + } + + err = runtime.PopulateFieldFromPath(&protoReq, "metadata.name", val) + if err != nil { + 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)) + 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 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) + } + + val, ok = pathParams["metadata.name"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "metadata.name") + } + + err = runtime.PopulateFieldFromPath(&protoReq, "metadata.name", val) + if err != nil { + 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, "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) { + 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) + } + + 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.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") + } + + 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) + 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 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.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") + } + + err = runtime.PopulateFieldFromPath(&protoReq, "metadata.name", val) + if err != nil { + 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)) + 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 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.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") + } + + err = runtime.PopulateFieldFromPath(&protoReq, "metadata.name", val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "metadata.name", err) + } + + msg, err := server.UpdateRole(ctx, &protoReq) + return msg, metadata, err + +} + +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.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") + } + + 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.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") + } + + 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, "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) { + 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) + } + + val, ok = pathParams["metadata.name"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "metadata.name") + } + + err = runtime.PopulateFieldFromPath(&protoReq, "metadata.name", val) + if err != nil { + 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)) + 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 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) + } + + val, ok = pathParams["metadata.name"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "metadata.name") + } + + err = runtime.PopulateFieldFromPath(&protoReq, "metadata.name", val) + if err != nil { + 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, "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) { + 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) + } + + 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.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") + } + + 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) + 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/partner/{metadata.partner}/organization/{metadata.organization}/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/partner/{metadata.partner}/organization/{metadata.organization}/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/partner/{metadata.partner}/organization/{metadata.organization}/role/{metadata.name}")) + 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("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/partner/{metadata.partner}/organization/{metadata.organization}/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/partner/{metadata.partner}/organization/{metadata.organization}/role/{metadata.name}")) + 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("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/partner/{metadata.partner}/organization/{metadata.organization}/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/partner/{metadata.partner}/organization/{metadata.organization}/role/{metadata.name}")) + 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()...) + + }) + + 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/partner/{metadata.partner}/organization/{metadata.organization}/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 +} + +// 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/partner/{metadata.partner}/organization/{metadata.organization}/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/partner/{metadata.partner}/organization/{metadata.organization}/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/partner/{metadata.partner}/organization/{metadata.organization}/role/{metadata.name}")) + 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("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/partner/{metadata.partner}/organization/{metadata.organization}/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/partner/{metadata.partner}/organization/{metadata.organization}/role/{metadata.name}")) + 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("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/partner/{metadata.partner}/organization/{metadata.organization}/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/partner/{metadata.partner}/organization/{metadata.organization}/role/{metadata.name}")) + 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()...) + + }) + + 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/partner/{metadata.partner}/organization/{metadata.organization}/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 +} + +var ( + 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, 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, 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, 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, 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, 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, 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, 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 ( + forward_Role_CreateRole_0 = runtime.ForwardResponseMessage + + forward_Role_GetRoles_0 = runtime.ForwardResponseMessage + + 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 new file mode 100644 index 0000000..d72b2c8 --- /dev/null +++ b/components/usermgmt/proto/rpc/v3/role.proto @@ -0,0 +1,126 @@ +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}} + } + } +}; + +service Role { + rpc CreateRole(rafay.dev.types.user.v3.Role) + returns (rafay.dev.types.user.v3.Role) { + option (google.api.http) = { + post : "/auth/v3/partner/{metadata.partner}/organization/{metadata.organization}/roles" + body : "*" + }; + + option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation) = { + responses : { + key : "201" + value : {description : "Returned when role is created successfully."} + } + }; + }; + + rpc GetRoles(rafay.dev.types.user.v3.Role) returns (rafay.dev.types.user.v3.RoleList) { + option (google.api.http) = { + 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/partner/{metadata.partner}/organization/{metadata.organization}/role/{metadata.name}" + additional_bindings { + 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/partner/{metadata.partner}/organization/{metadata.organization}/role/{metadata.name}" + body : "*" + additional_bindings { + put : "/auth/v3/partner/{metadata.partner}/organization/{metadata.organization}/role/{metadata.id}" + body : "*" + } + }; + }; + + rpc DeleteRole(rafay.dev.types.user.v3.Role) returns (rafay.dev.types.user.v3.Role) { + option (google.api.http) = { + delete : "/auth/v3/partner/{metadata.partner}/organization/{metadata.organization}/role/{metadata.name}" + additional_bindings { + delete : "/auth/v3/partner/{metadata.partner}/organization/{metadata.organization}/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 new file mode 100644 index 0000000..2533948 --- /dev/null +++ b/components/usermgmt/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 *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) (*v3.Role, 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 *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 { + return nil, err + } + return out, nil +} + +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 { + return nil, err + } + return out, nil +} + +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 + } + return out, nil +} + +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 + } + 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, *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) (*v3.Role, 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, *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) { + return nil, status.Errorf(codes.Unimplemented, "method GetRole not implemented") +} +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) (*v3.Role, 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(v3.Role) + 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.(*v3.Role)) + } + 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(v3.Role) + 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.(*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(v3.Role) + 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.(*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(v3.Role) + 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.(*v3.Role)) + } + 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/rpc/v3/rolepermission.pb.go b/components/usermgmt/proto/rpc/v3/rolepermission.pb.go new file mode 100644 index 0000000..7faca0e --- /dev/null +++ b/components/usermgmt/proto/rpc/v3/rolepermission.pb.go @@ -0,0 +1,143 @@ +// 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" +) + +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) +) + +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, 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_goTypes = []interface{}{ + (*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.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 + 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() } +func file_proto_rpc_v3_rolepermission_proto_init() { + if File_proto_rpc_v3_rolepermission_proto != nil { + return + } + 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: 0, + NumExtensions: 0, + NumServices: 1, + }, + GoTypes: file_proto_rpc_v3_rolepermission_proto_goTypes, + DependencyIndexes: file_proto_rpc_v3_rolepermission_proto_depIdxs, + }.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/rpc/v3/rolepermission.pb.gw.go b/components/usermgmt/proto/rpc/v3/rolepermission.pb.gw.go new file mode 100644 index 0000000..b6c6120 --- /dev/null +++ b/components/usermgmt/proto/rpc/v3/rolepermission.pb.gw.go @@ -0,0 +1,404 @@ +// 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/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 + +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 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 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 + +} + +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 userv3.RolePermission + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["metadata.name"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "metadata.name") + } + + err = runtime.PopulateFieldFromPath(&protoReq, "metadata.name", val) + if err != nil { + 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)) + 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 userv3.RolePermission + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["metadata.name"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "metadata.name") + } + + err = runtime.PopulateFieldFromPath(&protoReq, "metadata.name", val) + if err != nil { + 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) + 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/{metadata.name}")) + 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()...) + + }) + + 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 +} + +// 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/{metadata.name}")) + 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()...) + + }) + + 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", "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 new file mode 100644 index 0000000..b52d041 --- /dev/null +++ b/components/usermgmt/proto/rpc/v3/rolepermission.proto @@ -0,0 +1,85 @@ +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}} + } + } +}; + +service Rolepermission { + rpc GetRolepermissions(rafay.dev.types.user.v3.RolePermission) + returns (rafay.dev.types.user.v3.RolePermissionList) { + option (google.api.http) = { + get : "/auth/v3/rolepermissions" + }; + }; + + rpc GetRolepermission(rafay.dev.types.user.v3.RolePermission) + returns (rafay.dev.types.user.v3.RolePermission) { + option (google.api.http) = { + 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 new file mode 100644 index 0000000..b03aebc --- /dev/null +++ b/components/usermgmt/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 *v3.RolePermission, opts ...grpc.CallOption) (*v3.RolePermissionList, error) + GetRolepermission(ctx context.Context, in *v3.RolePermission, 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 *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 { + return nil, err + } + return out, nil +} + +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 { + 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, *v3.RolePermission) (*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, *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) { + 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(v3.RolePermission) + 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.(*v3.RolePermission)) + } + 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(v3.RolePermission) + 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.(*v3.RolePermission)) + } + 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/rpc/v3/user.pb.go b/components/usermgmt/proto/rpc/v3/user.pb.go new file mode 100644 index 0000000..e002f76 --- /dev/null +++ b/components/usermgmt/proto/rpc/v3/user.pb.go @@ -0,0 +1,274 @@ +// 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) +) + +type DeleteUserResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *DeleteUserResponse) Reset() { + *x = DeleteUserResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_proto_rpc_v3_user_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *DeleteUserResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DeleteUserResponse) ProtoMessage() {} + +func (x *DeleteUserResponse) 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 DeleteUserResponse.ProtoReflect.Descriptor instead. +func (*DeleteUserResponse) Descriptor() ([]byte, []int) { + return file_proto_rpc_v3_user_proto_rawDescGZIP(), []int{0} +} + +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, 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, 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, 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 ( + 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, 1) +var file_proto_rpc_v3_user_proto_goTypes = []interface{}{ + (*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{ + 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 + 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() } +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.(*DeleteUserResponse); 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: 1, + 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/rpc/v3/user.pb.gw.go b/components/usermgmt/proto/rpc/v3/user.pb.gw.go new file mode 100644 index 0000000..94182dc --- /dev/null +++ b/components/usermgmt/proto/rpc/v3/user.pb.gw.go @@ -0,0 +1,1297 @@ +// 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) + } + + 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 + +} + +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) + } + + 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 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 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, "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) { + 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) + } + + val, ok = pathParams["metadata.name"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "metadata.name") + } + + err = runtime.PopulateFieldFromPath(&protoReq, "metadata.name", val) + if err != nil { + 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)) + 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 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) + } + + val, ok = pathParams["metadata.name"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "metadata.name") + } + + err = runtime.PopulateFieldFromPath(&protoReq, "metadata.name", val) + if err != nil { + 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, "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) { + 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) + } + + 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.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") + } + + 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) + 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 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.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") + } + + err = runtime.PopulateFieldFromPath(&protoReq, "metadata.name", val) + if err != nil { + 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)) + 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 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.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") + } + + err = runtime.PopulateFieldFromPath(&protoReq, "metadata.name", val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "metadata.name", err) + } + + msg, err := server.UpdateUser(ctx, &protoReq) + return msg, metadata, err + +} + +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.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") + } + + 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.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") + } + + 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, "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) { + 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) + } + + val, ok = pathParams["metadata.name"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "metadata.name") + } + + err = runtime.PopulateFieldFromPath(&protoReq, "metadata.name", val) + if err != nil { + 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)) + 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 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) + } + + val, ok = pathParams["metadata.name"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "metadata.name") + } + + err = runtime.PopulateFieldFromPath(&protoReq, "metadata.name", val) + if err != nil { + 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, "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) { + 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) + } + + 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.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") + } + + 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) + 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/partner/{metadata.partner}/organization/{metadata.organization}/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/partner/{metadata.partner}/organization/{metadata.organization}/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/partner/{metadata.partner}/organization/{metadata.organization}/user/{metadata.name}")) + 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("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/partner/{metadata.partner}/organization/{metadata.organization}/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/partner/{metadata.partner}/organization/{metadata.organization}/user/{metadata.name}")) + 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("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/partner/{metadata.partner}/organization/{metadata.organization}/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/partner/{metadata.partner}/organization/{metadata.organization}/user/{metadata.name}")) + 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()...) + + }) + + 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/partner/{metadata.partner}/organization/{metadata.organization}/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 +} + +// 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/partner/{metadata.partner}/organization/{metadata.organization}/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/partner/{metadata.partner}/organization/{metadata.organization}/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/partner/{metadata.partner}/organization/{metadata.organization}/user/{metadata.name}")) + 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("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/partner/{metadata.partner}/organization/{metadata.organization}/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/partner/{metadata.partner}/organization/{metadata.organization}/user/{metadata.name}")) + 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("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/partner/{metadata.partner}/organization/{metadata.organization}/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/partner/{metadata.partner}/organization/{metadata.organization}/user/{metadata.name}")) + 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()...) + + }) + + 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/partner/{metadata.partner}/organization/{metadata.organization}/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 +} + +var ( + 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, 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, 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, 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, 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, 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, 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, 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 ( + forward_User_CreateUser_0 = runtime.ForwardResponseMessage + + forward_User_GetUsers_0 = runtime.ForwardResponseMessage + + 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 new file mode 100644 index 0000000..14a1ad5 --- /dev/null +++ b/components/usermgmt/proto/rpc/v3/user.proto @@ -0,0 +1,128 @@ +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}} + } + } +}; + +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/partner/{metadata.partner}/organization/{metadata.organization}/users" + body : "*" + }; + + option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation) = { + responses : { + key : "201" + value : {description : "Returned when user is created successfully."} + } + }; + }; + + rpc GetUsers(rafay.dev.types.user.v3.User) returns (rafay.dev.types.user.v3.UserList) { + option (google.api.http) = { + 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/partner/{metadata.partner}/organization/{metadata.organization}/user/{metadata.name}" + additional_bindings { + 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/partner/{metadata.partner}/organization/{metadata.organization}/user/{metadata.name}" + body : "*" + additional_bindings { + put : "/auth/v3/partner/{metadata.partner}/organization/{metadata.organization}/user/{metadata.id}" + body : "*" + } + }; + }; + + rpc DeleteUser(rafay.dev.types.user.v3.User) returns (DeleteUserResponse) { + option (google.api.http) = { + delete : "/auth/v3/partner/{metadata.partner}/organization/{metadata.organization}/user/{metadata.name}" + additional_bindings { + delete : "/auth/partner/{metadata.partner}/organization/{metadata.organization}/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 new file mode 100644 index 0000000..cb993e1 --- /dev/null +++ b/components/usermgmt/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 *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) +} + +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 *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 { + return nil, err + } + return out, nil +} + +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 { + return nil, err + } + return out, nil +} + +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 + } + return out, nil +} + +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 + } + 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, *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) +} + +// 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, *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) { + return nil, status.Errorf(codes.Unimplemented, "method GetUser not implemented") +} +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, *v3.User) (*DeleteUserResponse, 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(v3.User) + 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.(*v3.User)) + } + 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(v3.User) + 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.(*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(v3.User) + 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.(*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(v3.User) + 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.(*v3.User)) + } + 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/types/userpb/v3/group.pb.go b/components/usermgmt/proto/types/userpb/v3/group.pb.go new file mode 100644 index 0000000..03733b7 --- /dev/null +++ b/components/usermgmt/proto/types/userpb/v3/group.pb.go @@ -0,0 +1,550 @@ +// 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 ( + _ "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" + 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 ProjectNamespaceRole struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + 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() { + *x = ProjectNamespaceRole{} + 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 *ProjectNamespaceRole) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ProjectNamespaceRole) ProtoMessage() {} + +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)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ProjectNamespaceRole.ProtoReflect.Descriptor instead. +func (*ProjectNamespaceRole) Descriptor() ([]byte, []int) { + return file_proto_types_userpb_v3_group_proto_rawDescGZIP(), []int{1} +} + +func (x *ProjectNamespaceRole) GetProject() string { + if x != nil && x.Project != nil { + return *x.Project + } + return "" +} + +func (x *ProjectNamespaceRole) GetNamespace() int64 { + if x != nil && x.Namespace != nil { + return *x.Namespace + } + return 0 +} + +func (x *ProjectNamespaceRole) GetRole() string { + if x != nil { + return x.Role + } + return "" +} + +type GroupSpec struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + 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() { + *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) GetProjectnamespaceroles() []*ProjectNamespaceRole { + if x != nil { + return x.Projectnamespaceroles + } + 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, 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, + 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, 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, 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, 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, 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 + (*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 + 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() } +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.(*ProjectNamespaceRole); 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 + } + } + } + file_proto_types_userpb_v3_group_proto_msgTypes[1].OneofWrappers = []interface{}{} + 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/types/userpb/v3/group.proto b/components/usermgmt/proto/types/userpb/v3/group.proto new file mode 100644 index 0000000..955b1e3 --- /dev/null +++ b/components/usermgmt/proto/types/userpb/v3/group.proto @@ -0,0 +1,129 @@ +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 : "Group" + } ]; + 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 ProjectNamespaceRole { + option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_schema) = { + json_schema : { + title : "ProjectNamespaceRole" + description : "Project, role and namespace pairing for permission" + } + }; + optional string project = 1 + [ (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { + title : "Project" + description : "Project" + } ]; + optional 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" + } ]; +} + +message GroupSpec { + option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_schema) = { + json_schema : { + title : "Group Specification" + description : "Group specification" + } + }; + repeated ProjectNamespaceRole projectnamespaceroles = 1 + [ (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { + title : "ProjectNamespaceRoles" + description : "Project, namespace, role associations for group" + } ]; + 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/types/userpb/v3/role.pb.go b/components/usermgmt/proto/types/userpb/v3/role.pb.go new file mode 100644 index 0000000..90960bb --- /dev/null +++ b/components/usermgmt/proto/types/userpb/v3/role.pb.go @@ -0,0 +1,449 @@ +// 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/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" + 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"` + 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() { + *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 +} + +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 + 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, 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, + 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, 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 ( + 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/types/userpb/v3/role.proto b/components/usermgmt/proto/types/userpb/v3/role.proto new file mode 100644 index 0000000..720bd6c --- /dev/null +++ b/components/usermgmt/proto/types/userpb/v3/role.proto @@ -0,0 +1,104 @@ +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" + } ]; + 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 { + 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.pb.go b/components/usermgmt/proto/types/userpb/v3/rolepermission.pb.go new file mode 100644 index 0000000..1397522 --- /dev/null +++ b/components/usermgmt/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/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" + 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/types/userpb/v3/rolepermission.proto b/components/usermgmt/proto/types/userpb/v3/rolepermission.proto new file mode 100644 index 0000000..a993684 --- /dev/null +++ b/components/usermgmt/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/types/userpb/v3/user.pb.go b/components/usermgmt/proto/types/userpb/v3/user.pb.go new file mode 100644 index 0000000..df648a2 --- /dev/null +++ b/components/usermgmt/proto/types/userpb/v3/user.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/types/userpb/v3/user.proto + +package userv3 + +import ( + _ "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" + 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"` + // 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,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() { + *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) GetGroups() []string { + if x != nil { + return x.Groups + } + 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 + } + 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, 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, + 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, 0x3e, 0x0a, 0x06, 0x67, 0x72, 0x6f, 0x75, + 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, 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 ( + 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 + (*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.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() } +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/types/userpb/v3/user.proto b/components/usermgmt/proto/types/userpb/v3/user.proto new file mode 100644 index 0000000..6cd9650 --- /dev/null +++ b/components/usermgmt/proto/types/userpb/v3/user.proto @@ -0,0 +1,173 @@ +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" + // } ]; + repeated string groups = 6 + [ (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { + title : "Group" + description : "Groups the user belongs to" + } ]; + 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 = 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 = 10 + [ (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/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= 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 a0a7fce..258a5b1 100644 --- a/persistence/migrations/admindb/000014_authsrv_groupaccount.up.sql +++ b/persistence/migrations/admindb/000014_authsrv_groupaccount.up.sql @@ -24,8 +24,8 @@ CREATE INDEX authsrv_groupaccount_name_d17de056_like ON authsrv_groupaccount USI 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; + 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) - REFERENCES authsrv_group(id) DEFERRABLE INITIALLY DEFERRED; \ No newline at end of file + REFERENCES authsrv_group(id) DEFERRABLE INITIALLY DEFERRED; 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;