mirror of
https://github.com/paralus/paralus.git
synced 2026-05-19 14:56:57 +00:00
Merge pull request #1 from RafaySystems/adminsrv
initial commit for adminsrv
This commit is contained in:
25
Makefile
Normal file
25
Makefile
Normal file
@@ -0,0 +1,25 @@
|
||||
.PHONY: tidy
|
||||
tidy:
|
||||
GOPRIVATE=github.com/RafaySystems/* go mod tidy
|
||||
.PHONY: vendor
|
||||
vendor:
|
||||
go mod vendor
|
||||
|
||||
.PHONY: build-proto
|
||||
build-proto:
|
||||
cd components; buf build
|
||||
|
||||
.PHONY: gen-proto
|
||||
gen-proto:
|
||||
cd components/common; buf generate
|
||||
cd components/adminsrv; buf generate
|
||||
|
||||
.PHONY: check
|
||||
check:
|
||||
go fmt ./...
|
||||
go vet ./...
|
||||
|
||||
.PHONY: clean
|
||||
clean:
|
||||
rm -rf components/**/gen
|
||||
find . -name "*.pb*" -type f -delete
|
||||
23
components/adminsrv/buf.gen.yaml
Normal file
23
components/adminsrv/buf.gen.yaml
Normal file
@@ -0,0 +1,23 @@
|
||||
version: v1
|
||||
managed:
|
||||
enabled: true
|
||||
go_package_prefix:
|
||||
default: github.com/RafaySystems/rcloud-base/components/adminsrv
|
||||
except:
|
||||
- buf.build/googleapis/googleapis
|
||||
- buf.build/grpc-ecosystem/grpc-gateway
|
||||
- buf.build/gogo/protobuf
|
||||
plugins:
|
||||
- name: go
|
||||
out: .
|
||||
opt: paths=source_relative
|
||||
- name: go-grpc
|
||||
out: .
|
||||
opt:
|
||||
- paths=source_relative
|
||||
- require_unimplemented_servers=false
|
||||
- name: grpc-gateway
|
||||
out: .
|
||||
opt: paths=source_relative
|
||||
- name: openapiv2
|
||||
out: gen/openapi
|
||||
24
components/adminsrv/buf.lock
Normal file
24
components/adminsrv/buf.lock
Normal file
@@ -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
|
||||
12
components/adminsrv/buf.yaml
Normal file
12
components/adminsrv/buf.yaml
Normal file
@@ -0,0 +1,12 @@
|
||||
version: v1
|
||||
name: buf.build/nparikh/adminsrv
|
||||
deps:
|
||||
- buf.build/googleapis/googleapis
|
||||
- buf.build/grpc-ecosystem/grpc-gateway
|
||||
- buf.build/gogo/protobuf
|
||||
breaking:
|
||||
use:
|
||||
- FILE
|
||||
lint:
|
||||
use:
|
||||
- DEFAULT
|
||||
File diff suppressed because it is too large
Load Diff
1300
components/adminsrv/gen/openapi/proto/rpc/v3/partner.swagger.json
Normal file
1300
components/adminsrv/gen/openapi/proto/rpc/v3/partner.swagger.json
Normal file
File diff suppressed because it is too large
Load Diff
1195
components/adminsrv/gen/openapi/proto/rpc/v3/project.swagger.json
Normal file
1195
components/adminsrv/gen/openapi/proto/rpc/v3/project.swagger.json
Normal file
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,43 @@
|
||||
{
|
||||
"swagger": "2.0",
|
||||
"info": {
|
||||
"title": "proto/types/systempb/v3/organization.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": {}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,43 @@
|
||||
{
|
||||
"swagger": "2.0",
|
||||
"info": {
|
||||
"title": "proto/types/systempb/v3/partner.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": {}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,43 @@
|
||||
{
|
||||
"swagger": "2.0",
|
||||
"info": {
|
||||
"title": "proto/types/systempb/v3/project.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": {}
|
||||
}
|
||||
}
|
||||
}
|
||||
58
components/adminsrv/go.mod
Normal file
58
components/adminsrv/go.mod
Normal file
@@ -0,0 +1,58 @@
|
||||
module github.com/RafaySystems/rcloud-base/components/adminsrv
|
||||
|
||||
go 1.17
|
||||
|
||||
require (
|
||||
github.com/RafaySystems/rcloud-base/components/common v0.0.0-unpublished
|
||||
github.com/gogo/protobuf v1.3.2
|
||||
github.com/grpc-ecosystem/grpc-gateway v1.16.0
|
||||
github.com/grpc-ecosystem/grpc-gateway/v2 v2.7.2
|
||||
github.com/jinzhu/inflection v1.0.0 // indirect
|
||||
github.com/spf13/viper v1.10.1
|
||||
github.com/tmthrgd/go-hex v0.0.0-20190904060850-447a3041c3bc // indirect
|
||||
github.com/uptrace/bun v1.0.20
|
||||
github.com/uptrace/bun/dialect/pgdialect v1.0.20
|
||||
github.com/uptrace/bun/driver/pgdriver v1.0.20
|
||||
github.com/uptrace/bun/extra/bundebug v1.0.20
|
||||
github.com/vmihailenco/msgpack/v5 v5.3.5 // indirect
|
||||
github.com/vmihailenco/tagparser/v2 v2.0.0 // indirect
|
||||
golang.org/x/crypto v0.0.0-20211215153901-e495a2d5b3d3 // indirect
|
||||
golang.org/x/sys v0.0.0-20211216021012-1d35b9e2eb4e // indirect
|
||||
google.golang.org/genproto v0.0.0-20211208223120-3a66f561d7aa
|
||||
google.golang.org/grpc v1.43.0
|
||||
google.golang.org/protobuf v1.27.1
|
||||
mellium.im/sasl v0.2.1 // indirect
|
||||
sigs.k8s.io/controller-runtime v0.11.0
|
||||
)
|
||||
|
||||
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/google/uuid v1.3.0 // indirect
|
||||
github.com/hashicorp/hcl 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
|
||||
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/net v0.0.0-20211112202133-69e39bad7dc2 // indirect
|
||||
golang.org/x/text v0.3.7 // indirect
|
||||
gopkg.in/ini.v1 v1.66.2 // indirect
|
||||
gopkg.in/yaml.v2 v2.4.0 // indirect
|
||||
sigs.k8s.io/yaml v1.3.0 // indirect
|
||||
)
|
||||
287
components/adminsrv/go.sum
Normal file
287
components/adminsrv/go.sum
Normal file
@@ -0,0 +1,287 @@
|
||||
cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw=
|
||||
cloud.google.com/go v0.34.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw=
|
||||
github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU=
|
||||
github.com/OneOfOne/xxhash v1.2.2/go.mod h1:HSdplMjZKSmBqAxg5vPj2TmRDmfkzw+cTzAElWljhcU=
|
||||
github.com/antihax/optional v1.0.0/go.mod h1:uupD/76wgC+ih3iEmQUL+0Ugr19nfwCT1kdvxnR2qWY=
|
||||
github.com/benbjohnson/clock v1.1.0 h1:Q92kusRqC1XV2MjkWETPvjJVqKetz1OzxZB7mHJLju8=
|
||||
github.com/benbjohnson/clock v1.1.0/go.mod h1:J11/hYXuz8f4ySSvYwY0FKfm+ezbsZBKZxNJlLklBHA=
|
||||
github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU=
|
||||
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/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw=
|
||||
github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc=
|
||||
github.com/cncf/udpa/go v0.0.0-20201120205902-5459f2c99403/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk=
|
||||
github.com/cncf/udpa/go v0.0.0-20210930031921-04548b0d99d4/go.mod h1:6pvJx4me5XPnfI9Z40ddWsdw2W/uZgQLFXToKeRcDiI=
|
||||
github.com/cncf/xds/go v0.0.0-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-20211011173535-cb28da3451f1/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs=
|
||||
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
|
||||
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
|
||||
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
|
||||
github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4=
|
||||
github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4=
|
||||
github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1mIlRU8Am5FuJP05cCM98=
|
||||
github.com/envoyproxy/go-control-plane v0.9.9-0.20201210154907-fd9021fe5dad/go.mod h1:cXg6YxExXjJnVBQHBLXeUAgxn2UodCpnH306RInaBQk=
|
||||
github.com/envoyproxy/go-control-plane v0.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/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c=
|
||||
github.com/fatih/color v1.13.0 h1:8LOYc1KYPPmyKMuN8QV2DNRWNbLo6LZ0iLs8+mlH53w=
|
||||
github.com/fatih/color v1.13.0/go.mod h1:kLAiJbzzSOZDVNGyDpeOxJ47H46qBXwg5ILebYFFOfk=
|
||||
github.com/fsnotify/fsnotify v1.5.1 h1:mZcQUHVQUQWoPXXtuf9yuEXKudkV2sx1E06UadKWpgI=
|
||||
github.com/fsnotify/fsnotify v1.5.1/go.mod h1:T3375wBYaZdLLcVNkcVbzGHY7f1l/uK5T5Ai1i3InKU=
|
||||
github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04=
|
||||
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/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A=
|
||||
github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U=
|
||||
github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U=
|
||||
github.com/golang/protobuf v1.3.3/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw=
|
||||
github.com/golang/protobuf v1.4.0-rc.1/go.mod h1:ceaxUfeHdC40wWswd/P6IGgMaK3YpKi5j83Wpe3EHw8=
|
||||
github.com/golang/protobuf v1.4.0-rc.1.0.20200221234624-67d41d38c208/go.mod h1:xKAWHe0F5eneWXFV3EuXVDTCmh+JuBKY0li0aMyXATA=
|
||||
github.com/golang/protobuf v1.4.0-rc.2/go.mod h1:LlEzMj4AhA7rCAGe4KMBDvJI+AwstrUpVNzEA03Pprs=
|
||||
github.com/golang/protobuf v1.4.0-rc.4.0.20200313231945-b860323f09d0/go.mod h1:WU3c8KckQ9AFe+yFwt9sWVRKCVIyN9cPHBJSNnbL67w=
|
||||
github.com/golang/protobuf v1.4.0/go.mod h1:jodUvKwWbYaEsadDk5Fwe5c77LiNKVO9IDvqG2KuDX0=
|
||||
github.com/golang/protobuf v1.4.1/go.mod h1:U8fpvMrcmy5pZrNK1lt4xCsGvpyWQ/VVv6QDs8UjoX8=
|
||||
github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI=
|
||||
github.com/golang/protobuf v1.4.3/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI=
|
||||
github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk=
|
||||
github.com/golang/protobuf v1.5.2 h1:ROPKBNFfQgOUMifHyP+KYbvpjbdoFNs+aK7DXlji0Tw=
|
||||
github.com/golang/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY=
|
||||
github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M=
|
||||
github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU=
|
||||
github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU=
|
||||
github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
|
||||
github.com/google/go-cmp v0.5.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
|
||||
github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
|
||||
github.com/google/go-cmp v0.5.6 h1:BKbKCqvP6I+rmFHt06ZmyQtvB8xAkWdhFyr0ZUNZcxQ=
|
||||
github.com/google/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/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/hcl v1.0.0 h1:0Anlzjpi4vEasTeNFn2mLJgTSwt0+6sfsiTG8qcWGx4=
|
||||
github.com/hashicorp/hcl v1.0.0/go.mod h1:E5yfLk+7swimpb2L/Alb/PJmXilQ/rhwaUYs4T20WEQ=
|
||||
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/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.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/kr/fs v0.1.0/go.mod h1:FFnZGqtBN9Gxj7eW1uZ42v5BccTP0vu6NEaFoC2HwRg=
|
||||
github.com/kr/pretty v0.1.0 h1:L/CwN0zerZDmRFUapSPitk6f+Q3+0za1rQkzVuMiMFI=
|
||||
github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo=
|
||||
github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ=
|
||||
github.com/kr/text v0.1.0 h1:45sCR5RtlFHMR4UwH9sdQ5TC8v0qDQCHnXt+kaKSTVE=
|
||||
github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI=
|
||||
github.com/magiconair/properties v1.8.5 h1:b6kJs+EmPFMYGkow9GiUyCyOvIwYetYJ3fSaWak/Gls=
|
||||
github.com/magiconair/properties v1.8.5/go.mod h1:y3VJvCyxH9uVvJTWEGAELF3aiYNyPKd5NZ3oSwXrF60=
|
||||
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.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/mitchellh/mapstructure v1.4.3 h1:OVowDSCllw/YjdLkam3/sm7wEtOy59d8ndGgCcyj8cs=
|
||||
github.com/mitchellh/mapstructure v1.4.3/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo=
|
||||
github.com/nxadm/tail v1.4.8 h1:nPr65rt6Y5JFSKQO7qToXr7pePgD6Gwiw05lkbyAQTE=
|
||||
github.com/onsi/ginkgo v1.16.5 h1:8xi0RTUf59SOSfEtZMvwTvXYMzG4gV23XVHOZiXNtnE=
|
||||
github.com/onsi/gomega v1.17.0 h1:9Luw4uT5HTjHTN8+aNcSThgH1vdXnmdJ8xIfZ4wyTRE=
|
||||
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/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
|
||||
github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4=
|
||||
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/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_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA=
|
||||
github.com/rogpeppe/fastuuid v1.2.0/go.mod h1:jVj6XXZzXRy/MSR5jhDC/2q6DgLz+nrA6LYCDYWNEvQ=
|
||||
github.com/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/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.6.0 h1:xoax2sJ2DT8S8xA2paPFjDCScCNeWsg75VG0DLRreiY=
|
||||
github.com/spf13/afero v1.6.0/go.mod h1:Ai8FlHk4v/PARR026UzYexafAt9roJ7LcLMAmO6Z93I=
|
||||
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/jwalterweatherman v1.1.0 h1:ue6voC5bR5F8YxI5S67j9i582FU4Qvo2bmqnqMYADFk=
|
||||
github.com/spf13/jwalterweatherman v1.1.0/go.mod h1:aNWZUN0dPAAO/Ljvb5BEdw96iTZ0EXowPYD95IqWIGo=
|
||||
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.10.1 h1:nuJZuYpG7gTj/XqiUwg8bA0cp1+M2mC3J4g5luUYBKk=
|
||||
github.com/spf13/viper v1.10.1/go.mod h1:IGlFPqhNAPKRxohIzWpI5QEy4kuI7tcl5WvR+8qy1rU=
|
||||
github.com/stretchr/objx v0.1.0/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/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/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/yuin/goldmark v1.1.27/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=
|
||||
go.opentelemetry.io/proto/otlp v0.7.0/go.mod h1:PqfVotwruBrMGOCsRd/89rSnXhoiJIqeYNgFYFoEGnI=
|
||||
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.11-0.20210813005559-691160354723/go.mod h1:cwTWslyiVhfpKIDGSZEM2HlOvcqm+tG4zioyIeLoqMQ=
|
||||
go.uber.org/goleak v1.1.12 h1:gZAh5/EyT/HQwlpkCy6wTpqfH9H8Lz8zbm3dZh+OyzA=
|
||||
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.19.1 h1:ue41HOKd1vGURxrmeKIgELGb3jPW9DMUDGtsinblHwI=
|
||||
go.uber.org/zap v1.19.1/go.mod h1:j3DNczoxDZroyBnOT1L/Q79cfUMGZxlv/9dzN7SM1rI=
|
||||
golang.org/x/crypto v0.0.0-20180910181607-0e37d006457b/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-20190820162420-60c769a6c586/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
|
||||
golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
|
||||
golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto=
|
||||
golang.org/x/crypto v0.0.0-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/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE=
|
||||
golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvxsM5YxQ5yQlVC4a0KAMCusXpPoU=
|
||||
golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc=
|
||||
golang.org/x/lint v0.0.0-20190930215403-16217165b5de/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc=
|
||||
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.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
|
||||
golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
|
||||
golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
|
||||
golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
|
||||
golang.org/x/net v0.0.0-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
|
||||
golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
|
||||
golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
|
||||
golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
|
||||
golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
|
||||
golang.org/x/net v0.0.0-20200822124328-c89045814202/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA=
|
||||
golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU=
|
||||
golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4/go.mod h1:p54w0d4576C0XHj96bSt6lcn1PtDYWL6XObtHCRCNQM=
|
||||
golang.org/x/net v0.0.0-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-20200107190931-bf48bf16ab8d/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=
|
||||
golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
||||
golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
||||
golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
||||
golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
||||
golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/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-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
||||
golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
|
||||
golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
|
||||
golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20200116001909-b77594299b42/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20200223170610-d5e6a3e2c0ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20210330210617-4fbd30eecc44/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20210510120138-977fb7262007/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/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-20210927094055-39ccf1dd6fa6/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-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/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
|
||||
golang.org/x/text v0.3.3/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/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
|
||||
golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
|
||||
golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY=
|
||||
golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs=
|
||||
golang.org/x/tools v0.0.0-20190524140312-2c0ae7006135/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q=
|
||||
golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
|
||||
golang.org/x/tools v0.0.0-20200619180055-7c47624df98f/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE=
|
||||
golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA=
|
||||
golang.org/x/tools v0.1.5/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk=
|
||||
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=
|
||||
google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM=
|
||||
google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4=
|
||||
google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc=
|
||||
google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc=
|
||||
google.golang.org/genproto v0.0.0-20200513103714-09dca8ec2884/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c=
|
||||
google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013/go.mod h1:NbSheEEYHJ7i3ixzK3sjbqSGDJWnxyFXZblF3eUsNvo=
|
||||
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.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg=
|
||||
google.golang.org/grpc v1.25.1/go.mod h1:c3i+UQWmh7LiEpx4sFZnkU36qjEYZ0imhYfXVyQciAY=
|
||||
google.golang.org/grpc v1.27.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk=
|
||||
google.golang.org/grpc v1.33.1/go.mod h1:fr5YgcSWrqhRRxogOsw7RzIpsmvOZ6IcH4kBYTpR3n0=
|
||||
google.golang.org/grpc v1.36.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU=
|
||||
google.golang.org/grpc v1.40.0/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/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8=
|
||||
google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0=
|
||||
google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM=
|
||||
google.golang.org/protobuf v1.20.1-0.20200309200217-e05f789c0967/go.mod h1:A+miEFZTKqfCUM6K7xSMQL9OKL/b6hQv+e19PK+JZNE=
|
||||
google.golang.org/protobuf v1.21.0/go.mod h1:47Nbq4nVaFHyn7ilMalzfO3qCViNmqZ2kzikPIcrTAo=
|
||||
google.golang.org/protobuf v1.22.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU=
|
||||
google.golang.org/protobuf v1.23.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU=
|
||||
google.golang.org/protobuf v1.23.1-0.20200526195155-81db48ad09cc/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU=
|
||||
google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlbajtzgsN7c=
|
||||
google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw=
|
||||
google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc=
|
||||
google.golang.org/protobuf v1.27.1 h1:SnqbnDw1V7RiZcXPx5MEeqPv2s79L9i7BJUlG/+RurQ=
|
||||
google.golang.org/protobuf v1.27.1/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc=
|
||||
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
|
||||
gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127 h1:qIbj1fsPNlZgppZ+VLlY7N33q108Sa+fhmuc+sWQYwY=
|
||||
gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
|
||||
gopkg.in/ini.v1 v1.66.2 h1:XfR1dOYubytKy4Shzc2LHrrGhU0lDCfDGG1yLPmpgsI=
|
||||
gopkg.in/ini.v1 v1.66.2/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k=
|
||||
gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 h1:uRGJdciOHaEIrze2W8Q3AKkepLTh2hOroT7a+7czfdQ=
|
||||
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.8/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-20210107192922-496545a6307b h1:h8qDotaEPuJATrMmW04NCwg7v22aHH28wwpauUhK9Oo=
|
||||
gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
|
||||
honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4=
|
||||
honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4=
|
||||
k8s.io/apimachinery v0.23.0 h1:mIfWRMjBuMdolAWJ3Fd+aPTMv3X9z+waiARMpvvb0HQ=
|
||||
mellium.im/sasl v0.2.1 h1:nspKSRg7/SyO0cRGY71OkfHab8tf9kCts6a6oTDut0w=
|
||||
mellium.im/sasl v0.2.1/go.mod h1:ROaEDLQNuf9vjKqE1SrAfnsobm2YKXT1gnN1uDp1PjQ=
|
||||
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/yaml v1.3.0 h1:a2VclLzOGrwOHDiV8EfBGhvjHvP46CtW5j6POvhYGGo=
|
||||
sigs.k8s.io/yaml v1.3.0/go.mod h1:GeOyir5tyXNByN85N/dRIT9es5UQNerPYEKK56eTBm8=
|
||||
243
components/adminsrv/main.go
Normal file
243
components/adminsrv/main.go
Normal file
@@ -0,0 +1,243 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"context"
|
||||
"database/sql"
|
||||
"fmt"
|
||||
"net"
|
||||
"net/http"
|
||||
goruntime "runtime"
|
||||
"sync"
|
||||
"time"
|
||||
|
||||
"github.com/RafaySystems/rcloud-base/components/adminsrv/pkg/service"
|
||||
pbrpcv3 "github.com/RafaySystems/rcloud-base/components/adminsrv/proto/rpc/v3"
|
||||
"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/grpc-ecosystem/grpc-gateway/v2/runtime"
|
||||
"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"
|
||||
"google.golang.org/grpc"
|
||||
_grpc "google.golang.org/grpc"
|
||||
"sigs.k8s.io/controller-runtime/pkg/manager/signals"
|
||||
)
|
||||
|
||||
const (
|
||||
rpcPortEnv = "RPC_PORT"
|
||||
apiPortEnv = "API_PORT"
|
||||
debugPortEnv = "DEBUG_PORT"
|
||||
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
|
||||
dbAddr string
|
||||
dbName string
|
||||
dbUser string
|
||||
dbPassword string
|
||||
dev bool
|
||||
db *bun.DB
|
||||
ps service.PartnerService
|
||||
os service.OrganizationService
|
||||
pps service.ProjectService
|
||||
_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(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(dbAddrEnv)
|
||||
viper.BindEnv(dbNameEnv)
|
||||
viper.BindEnv(dbPasswordEnv)
|
||||
viper.BindEnv(dbPasswordEnv)
|
||||
viper.BindEnv(devEnv)
|
||||
viper.BindEnv(dbUserEnv)
|
||||
viper.BindEnv(configAddrENV)
|
||||
|
||||
rpcPort = viper.GetInt(rpcPortEnv)
|
||||
apiPort = viper.GetInt(apiPortEnv)
|
||||
debugPort = viper.GetInt(debugPortEnv)
|
||||
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
|
||||
|
||||
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"),
|
||||
))
|
||||
|
||||
_log.Infow("printing db", "db", db)
|
||||
|
||||
configPool = configrpc.NewConfigPool(configAddr, 5*goruntime.NumCPU())
|
||||
|
||||
ps = service.NewPartnerService(db)
|
||||
os = service.NewOrganizationService(db)
|
||||
pps = service.NewProjectService(db)
|
||||
}
|
||||
|
||||
func run() {
|
||||
|
||||
ctx := signals.SetupSignalHandler()
|
||||
|
||||
var wg sync.WaitGroup
|
||||
|
||||
wg.Add(4)
|
||||
|
||||
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.RegisterPartnerHandlerFromEndpoint,
|
||||
pbrpcv3.RegisterOrganizationHandlerFromEndpoint,
|
||||
pbrpcv3.RegisterProjectHandlerFromEndpoint,
|
||||
)
|
||||
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 ps.Close()
|
||||
defer configPool.Close()
|
||||
|
||||
partnerServer := pbrpcv3.NewPartnerServer(ps)
|
||||
organizationServer := pbrpcv3.NewOrganizationServer(os)
|
||||
projectServer := pbrpcv3.NewProjectServer(pps)
|
||||
|
||||
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")
|
||||
}()
|
||||
|
||||
pbrpcv3.RegisterPartnerServer(s, partnerServer)
|
||||
pbrpcv3.RegisterOrganizationServer(s, organizationServer)
|
||||
pbrpcv3.RegisterProjectServer(s, projectServer)
|
||||
|
||||
_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),
|
||||
}
|
||||
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()
|
||||
}
|
||||
41
components/adminsrv/pkg/internal/models/organization.go
Normal file
41
components/adminsrv/pkg/internal/models/organization.go
Normal file
@@ -0,0 +1,41 @@
|
||||
package models
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
"time"
|
||||
|
||||
"github.com/google/uuid"
|
||||
"github.com/uptrace/bun"
|
||||
)
|
||||
|
||||
type Organization struct {
|
||||
bun.BaseModel `bun:"table:authsrv_organization,alias:organization"`
|
||||
|
||||
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"`
|
||||
Settings json.RawMessage `bun:"settings,notnull,type:jsonb"`
|
||||
BillingAddress string `bun:"billing_address,notnull,type:text"`
|
||||
PartnerId uuid.UUID `bun:"partner_id,notnull,type:uuid"`
|
||||
Active bool `bun:"active,notnull"`
|
||||
Approved bool `bun:"approved,notnull"`
|
||||
Type string `bun:"type,notnull"`
|
||||
AddressLine1 string `bun:"address_line1,notnull,type:text"`
|
||||
AddressLine2 string `bun:"address_line2,notnull,type:text"`
|
||||
City string `bun:"city,notnull,type:text"`
|
||||
Country string `bun:"country,notnull,type:text"`
|
||||
Phone string `bun:"phone,notnull,type:text"`
|
||||
State string `bun:"state,notnull,type:text"`
|
||||
Zipcode string `bun:"zipcode,notnull,type:text"`
|
||||
DeletedName string `bun:"deleted_name"`
|
||||
IsPrivate bool `bun:"is_private"`
|
||||
IsTOTPEnabled bool `bun:"is_totp_enabled,notnull"`
|
||||
AreClustersShared bool `bun:"are_clusters_shared,notnull"`
|
||||
PspsEnabled bool `bun:"psps_enabled,default:true"`
|
||||
CustomPspsEnabled bool `bun:"custom_psps_enabled"`
|
||||
DefaultBlueprintsEnabled bool `bun:"default_blueprints_enabled,default:true"`
|
||||
Referer string `bun:"referer"`
|
||||
}
|
||||
34
components/adminsrv/pkg/internal/models/partner.go
Normal file
34
components/adminsrv/pkg/internal/models/partner.go
Normal file
@@ -0,0 +1,34 @@
|
||||
package models
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
"time"
|
||||
|
||||
"github.com/google/uuid"
|
||||
"github.com/uptrace/bun"
|
||||
)
|
||||
|
||||
type Partner struct {
|
||||
bun.BaseModel `bun:"table:authsrv_partner,alias:partner"`
|
||||
|
||||
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"`
|
||||
Settings json.RawMessage `bun:"settings,notnull,type:jsonb"`
|
||||
Host string `bun:"host,notnull"`
|
||||
Domain string `bun:"domain,notnull"`
|
||||
TosLink string `bun:"tos_link,notnull"`
|
||||
LogoLink string `bun:"logo_link,notnull"`
|
||||
NotificationEmail string `bun:"notification_email,notnull"`
|
||||
ParentId uuid.UUID `bun:"parent_id,type:uuid"`
|
||||
HelpdeskEmail string `bun:"partner_helpdesk_email,notnull"`
|
||||
ProductName string `bun:"partner_product_name"`
|
||||
SupportTeamName string `bun:"support_team_name,notnull"`
|
||||
OpsHost string `bun:"ops_host,notnull"`
|
||||
FavIconLink string `bun:"fav_icon_link,notnull"`
|
||||
IsTOTPEnabled bool `bun:"is_totp_enabled,notnull"`
|
||||
IsSyntheticPartnerEnabled bool `bun:"is_synthetic_partner_enabled,notnull"`
|
||||
}
|
||||
22
components/adminsrv/pkg/internal/models/project.go
Normal file
22
components/adminsrv/pkg/internal/models/project.go
Normal file
@@ -0,0 +1,22 @@
|
||||
package models
|
||||
|
||||
import (
|
||||
"time"
|
||||
|
||||
"github.com/google/uuid"
|
||||
"github.com/uptrace/bun"
|
||||
)
|
||||
|
||||
type Project struct {
|
||||
bun.BaseModel `bun:"table:authsrv_project,alias:project"`
|
||||
|
||||
ID uuid.UUID `bun:"id,type:uuid,pk,default:uuid_generate_v4()"`
|
||||
Name string `bun:"name,notnull"`
|
||||
Description string `bun:"description,notnull"`
|
||||
CreatedAt time.Time `bun:"created_at,notnull,default:current_timestamp"`
|
||||
ModifiedAt time.Time `bun:"modified_at,notnull,default:current_timestamp"`
|
||||
Trash bool `bun:"trash,notnull"`
|
||||
OrganizationId uuid.UUID `bun:"organization_id,type:uuid"`
|
||||
PartnerId uuid.UUID `bun:"partner_id,type:uuid"`
|
||||
Default bool `bun:"default,notnull"`
|
||||
}
|
||||
@@ -0,0 +1,98 @@
|
||||
package pg
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
"github.com/google/uuid"
|
||||
bun "github.com/uptrace/bun"
|
||||
)
|
||||
|
||||
// DAO is the interface for database operations
|
||||
type EntityDAO interface {
|
||||
Close() error
|
||||
// create entity
|
||||
Create(ctx context.Context, entity interface{}) (interface{}, error)
|
||||
// get entity by id
|
||||
GetByID(ctx context.Context, id uuid.UUID, entity interface{}) (interface{}, error)
|
||||
// get entity by name
|
||||
GetByName(ctx context.Context, name string, entity interface{}) (interface{}, error)
|
||||
//Update entity
|
||||
Update(ctx context.Context, id uuid.UUID, entity interface{}) (interface{}, error)
|
||||
// delete entity
|
||||
Delete(ctx context.Context, id uuid.UUID, entity interface{}) error
|
||||
// get list of entities
|
||||
List(ctx context.Context, partnerId uuid.NullUUID, organizationId uuid.NullUUID, entities interface{}) (interface{}, error)
|
||||
}
|
||||
|
||||
type entityDAO struct {
|
||||
db *bun.DB
|
||||
}
|
||||
|
||||
func (dao *entityDAO) Close() error {
|
||||
return dao.db.Close()
|
||||
}
|
||||
|
||||
// NewEntityDao return new entity dao
|
||||
func NewEntityDAO(db *bun.DB) EntityDAO {
|
||||
return &entityDAO{db}
|
||||
}
|
||||
|
||||
func (dao *entityDAO) Create(ctx context.Context, entity interface{}) (interface{}, error) {
|
||||
|
||||
if _, err := dao.db.NewInsert().Model(entity).Exec(ctx); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
return entity, nil
|
||||
}
|
||||
|
||||
func (dao *entityDAO) GetByID(ctx context.Context, id uuid.UUID, entity interface{}) (interface{}, error) {
|
||||
|
||||
err := dao.db.NewSelect().Model(entity).
|
||||
Where("id = ?", id).
|
||||
Scan(ctx)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
return entity, nil
|
||||
}
|
||||
|
||||
func (dao *entityDAO) GetByName(ctx context.Context, name string, entity interface{}) (interface{}, error) {
|
||||
|
||||
err := dao.db.NewSelect().Model(entity).
|
||||
Where("name = ?", name).
|
||||
Scan(ctx)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
return entity, nil
|
||||
}
|
||||
|
||||
func (dao *entityDAO) Update(ctx context.Context, id uuid.UUID, entity interface{}) (interface{}, error) {
|
||||
if _, err := dao.db.NewUpdate().Model(entity).Where("id = ?", id).Exec(ctx); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return entity, nil
|
||||
}
|
||||
|
||||
func (dao *entityDAO) Delete(ctx context.Context, id uuid.UUID, entity interface{}) error {
|
||||
_, err := dao.db.NewDelete().
|
||||
Model(entity).
|
||||
Where("id = ?", id).
|
||||
Exec(ctx)
|
||||
return err
|
||||
}
|
||||
|
||||
func (dao *entityDAO) List(ctx context.Context, partnerId uuid.NullUUID, organizationId uuid.NullUUID, entities interface{}) (interface{}, error) {
|
||||
sq := dao.db.NewSelect().Model(entities)
|
||||
if partnerId.Valid {
|
||||
sq = sq.Where("partner_id = ?", partnerId)
|
||||
}
|
||||
if organizationId.Valid {
|
||||
sq = sq.Where("organization_id = ?", organizationId)
|
||||
}
|
||||
err := sq.Scan(ctx)
|
||||
return entities, err
|
||||
}
|
||||
468
components/adminsrv/pkg/service/organization.go
Normal file
468
components/adminsrv/pkg/service/organization.go
Normal file
@@ -0,0 +1,468 @@
|
||||
package service
|
||||
|
||||
import (
|
||||
"context"
|
||||
"encoding/json"
|
||||
"fmt"
|
||||
"time"
|
||||
|
||||
"github.com/RafaySystems/rcloud-base/components/adminsrv/pkg/internal/models"
|
||||
"github.com/RafaySystems/rcloud-base/components/adminsrv/pkg/internal/persistence/provider/pg"
|
||||
systemv3 "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/google/uuid"
|
||||
bun "github.com/uptrace/bun"
|
||||
"google.golang.org/protobuf/types/known/timestamppb"
|
||||
)
|
||||
|
||||
const (
|
||||
organizationKind = "Organization"
|
||||
organizationListKind = "OrganizationList"
|
||||
)
|
||||
|
||||
// OrganizationService is the interface for organization operations
|
||||
type OrganizationService interface {
|
||||
Close() error
|
||||
// create organization
|
||||
Create(ctx context.Context, organization *systemv3.Organization) (*systemv3.Organization, error)
|
||||
// get organization by id
|
||||
GetByID(ctx context.Context, id string) (*systemv3.Organization, error)
|
||||
// get organization by id
|
||||
GetByName(ctx context.Context, name string) (*systemv3.Organization, error)
|
||||
// create or update organization
|
||||
Update(ctx context.Context, organization *systemv3.Organization) (*systemv3.Organization, error)
|
||||
// delete organization
|
||||
Delete(ctx context.Context, organization *systemv3.Organization) (*systemv3.Organization, error)
|
||||
// list organization
|
||||
List(ctx context.Context, organization *systemv3.Organization) (*systemv3.OrganizationList, error)
|
||||
}
|
||||
|
||||
// organizationService implements OrganizationService
|
||||
type organizationService struct {
|
||||
dao pg.EntityDAO
|
||||
}
|
||||
|
||||
// NewOrganizationService return new organization service
|
||||
func NewOrganizationService(db *bun.DB) OrganizationService {
|
||||
return &organizationService{
|
||||
dao: pg.NewEntityDAO(db),
|
||||
}
|
||||
}
|
||||
|
||||
func (s *organizationService) Create(ctx context.Context, org *systemv3.Organization) (*systemv3.Organization, error) {
|
||||
|
||||
partnerId, _ := uuid.Parse(org.GetMetadata().GetPartner())
|
||||
|
||||
//update default organization setting values
|
||||
org.Spec.Settings = &systemv3.OrganizationSettings{
|
||||
Lockout: &systemv3.Lockout{
|
||||
Enabled: true,
|
||||
PeriodMin: 15,
|
||||
Attempts: 5,
|
||||
},
|
||||
IdleLogoutMin: 60,
|
||||
}
|
||||
sb, err := json.MarshalIndent(org.GetSpec().GetSettings(), "", "\t")
|
||||
if err != nil {
|
||||
org.Status = &v3.Status{
|
||||
ConditionType: "Create",
|
||||
ConditionStatus: v3.ConditionStatus_StatusFailed,
|
||||
LastUpdated: timestamppb.Now(),
|
||||
Reason: err.Error(),
|
||||
}
|
||||
}
|
||||
//convert v3 spec to internal models
|
||||
organization := models.Organization{
|
||||
Name: org.GetMetadata().GetName(),
|
||||
Description: org.GetMetadata().GetDescription(),
|
||||
Trash: false,
|
||||
Settings: json.RawMessage(sb),
|
||||
BillingAddress: org.GetSpec().GetBillingAddress(),
|
||||
PartnerId: partnerId,
|
||||
Active: org.GetSpec().GetActive(),
|
||||
Approved: org.GetSpec().GetApproved(),
|
||||
Type: org.GetSpec().GetType(),
|
||||
AddressLine1: org.GetSpec().GetAddressLine1(),
|
||||
AddressLine2: org.GetSpec().GetAddressLine2(),
|
||||
City: org.GetSpec().GetCity(),
|
||||
Country: org.GetSpec().GetCountry(),
|
||||
Phone: org.GetSpec().GetPhone(),
|
||||
State: org.GetSpec().GetState(),
|
||||
Zipcode: org.GetSpec().GetZipcode(),
|
||||
IsPrivate: org.GetSpec().GetIsPrivate(),
|
||||
IsTOTPEnabled: org.GetSpec().GetIsTotpEnabled(),
|
||||
AreClustersShared: org.GetSpec().GetAreClustersShared(),
|
||||
CreatedAt: time.Now(),
|
||||
ModifiedAt: time.Now(),
|
||||
}
|
||||
entity, err := s.dao.Create(ctx, &organization)
|
||||
if err != nil {
|
||||
org.Status = &v3.Status{
|
||||
ConditionType: "Create",
|
||||
ConditionStatus: v3.ConditionStatus_StatusFailed,
|
||||
LastUpdated: timestamppb.Now(),
|
||||
Reason: err.Error(),
|
||||
}
|
||||
return org, err
|
||||
}
|
||||
|
||||
if createdOrg, ok := entity.(*models.Organization); ok {
|
||||
//update v3 spec
|
||||
org.Metadata.Id = createdOrg.ID.String()
|
||||
org.Status = &v3.Status{
|
||||
ConditionType: "Create",
|
||||
ConditionStatus: v3.ConditionStatus_StatusOK,
|
||||
LastUpdated: timestamppb.Now(),
|
||||
}
|
||||
}
|
||||
|
||||
return org, nil
|
||||
}
|
||||
|
||||
func (s *organizationService) GetByID(ctx context.Context, id string) (*systemv3.Organization, error) {
|
||||
|
||||
organization := &systemv3.Organization{
|
||||
ApiVersion: apiVersion,
|
||||
Kind: organizationKind,
|
||||
Metadata: &v3.Metadata{
|
||||
Id: id,
|
||||
},
|
||||
Spec: &systemv3.OrganizationSpec{},
|
||||
}
|
||||
|
||||
uid, err := uuid.Parse(id)
|
||||
if err != nil {
|
||||
organization.Status = &v3.Status{
|
||||
ConditionType: "Describe",
|
||||
LastUpdated: timestamppb.Now(),
|
||||
ConditionStatus: v3.ConditionStatus_StatusFailed,
|
||||
}
|
||||
return organization, err
|
||||
}
|
||||
entity, err := s.dao.GetByID(ctx, uid, &models.Organization{})
|
||||
if err != nil {
|
||||
organization.Status = &v3.Status{
|
||||
ConditionType: "Describe",
|
||||
LastUpdated: timestamppb.Now(),
|
||||
ConditionStatus: v3.ConditionStatus_StatusFailed,
|
||||
}
|
||||
return organization, err
|
||||
}
|
||||
|
||||
if org, ok := entity.(*models.Organization); ok {
|
||||
|
||||
var settings systemv3.OrganizationSettings
|
||||
err := json.Unmarshal(org.Settings, &settings)
|
||||
if err != nil {
|
||||
organization.Status = &v3.Status{
|
||||
ConditionType: "Describe",
|
||||
LastUpdated: timestamppb.Now(),
|
||||
ConditionStatus: v3.ConditionStatus_StatusFailed,
|
||||
}
|
||||
return organization, err
|
||||
}
|
||||
|
||||
organization.Metadata = &v3.Metadata{
|
||||
Name: org.Name,
|
||||
Description: org.Description,
|
||||
Id: org.ID.String(),
|
||||
Partner: org.PartnerId.String(),
|
||||
ModifiedAt: timestamppb.New(org.ModifiedAt),
|
||||
}
|
||||
organization.Spec = &systemv3.OrganizationSpec{
|
||||
BillingAddress: org.BillingAddress,
|
||||
Active: org.Active,
|
||||
Approved: org.Approved,
|
||||
Type: org.Type,
|
||||
AddressLine1: org.AddressLine1,
|
||||
AddressLine2: org.AddressLine2,
|
||||
City: org.City,
|
||||
Country: org.Country,
|
||||
Phone: org.Phone,
|
||||
State: org.State,
|
||||
Zipcode: org.Zipcode,
|
||||
IsPrivate: org.IsPrivate,
|
||||
IsTotpEnabled: org.IsTOTPEnabled,
|
||||
AreClustersShared: org.AreClustersShared,
|
||||
Settings: &settings,
|
||||
}
|
||||
organization.Status = &v3.Status{
|
||||
ConditionType: "Describe",
|
||||
LastUpdated: timestamppb.Now(),
|
||||
ConditionStatus: v3.ConditionStatus_StatusOK,
|
||||
}
|
||||
|
||||
return organization, nil
|
||||
|
||||
} else {
|
||||
organization := &systemv3.Organization{
|
||||
ApiVersion: apiVersion,
|
||||
Kind: organizationKind,
|
||||
Metadata: &v3.Metadata{
|
||||
Id: id,
|
||||
},
|
||||
Status: &v3.Status{
|
||||
ConditionType: "Describe",
|
||||
ConditionStatus: v3.ConditionStatus_StatusNotSet,
|
||||
Reason: "Unable to fetch organization information",
|
||||
LastUpdated: timestamppb.Now(),
|
||||
},
|
||||
}
|
||||
|
||||
return organization, nil
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
func (s *organizationService) GetByName(ctx context.Context, name string) (*systemv3.Organization, error) {
|
||||
|
||||
organization := &systemv3.Organization{
|
||||
ApiVersion: apiVersion,
|
||||
Kind: organizationKind,
|
||||
Metadata: &v3.Metadata{
|
||||
Name: name,
|
||||
},
|
||||
}
|
||||
entity, err := s.dao.GetByName(ctx, name, &models.Organization{})
|
||||
if err != nil {
|
||||
organization.Metadata = &v3.Metadata{
|
||||
Name: name,
|
||||
}
|
||||
organization.Status = &v3.Status{
|
||||
ConditionType: "Describe",
|
||||
ConditionStatus: v3.ConditionStatus_StatusFailed,
|
||||
Reason: err.Error(),
|
||||
LastUpdated: timestamppb.Now(),
|
||||
}
|
||||
return organization, err
|
||||
}
|
||||
|
||||
if org, ok := entity.(*models.Organization); ok {
|
||||
|
||||
var settings systemv3.OrganizationSettings
|
||||
err := json.Unmarshal(org.Settings, &settings)
|
||||
if err != nil {
|
||||
organization.Status = &v3.Status{
|
||||
ConditionType: "Describe",
|
||||
ConditionStatus: v3.ConditionStatus_StatusFailed,
|
||||
}
|
||||
return organization, err
|
||||
}
|
||||
|
||||
organization.Metadata = &v3.Metadata{
|
||||
Name: org.Name,
|
||||
Description: org.Description,
|
||||
Id: org.ID.String(),
|
||||
Partner: org.PartnerId.String(),
|
||||
ModifiedAt: timestamppb.New(org.ModifiedAt),
|
||||
}
|
||||
organization.Spec = &systemv3.OrganizationSpec{
|
||||
BillingAddress: org.BillingAddress,
|
||||
Active: org.Active,
|
||||
Approved: org.Approved,
|
||||
Type: org.Type,
|
||||
AddressLine1: org.AddressLine1,
|
||||
AddressLine2: org.AddressLine2,
|
||||
City: org.City,
|
||||
Country: org.Country,
|
||||
Phone: org.Phone,
|
||||
State: org.State,
|
||||
Zipcode: org.Zipcode,
|
||||
IsPrivate: org.IsPrivate,
|
||||
IsTotpEnabled: org.IsTOTPEnabled,
|
||||
AreClustersShared: org.AreClustersShared,
|
||||
Settings: &settings,
|
||||
}
|
||||
organization.Status = &v3.Status{
|
||||
ConditionType: "Describe",
|
||||
LastUpdated: timestamppb.Now(),
|
||||
ConditionStatus: v3.ConditionStatus_StatusOK,
|
||||
}
|
||||
}
|
||||
|
||||
return organization, nil
|
||||
}
|
||||
|
||||
func (s *organizationService) Update(ctx context.Context, organization *systemv3.Organization) (*systemv3.Organization, error) {
|
||||
|
||||
id, _ := uuid.Parse(organization.Metadata.Id)
|
||||
entity, err := s.dao.GetByID(ctx, id, &models.Organization{})
|
||||
if err != nil {
|
||||
organization.Status = &v3.Status{
|
||||
ConditionType: "Update",
|
||||
ConditionStatus: v3.ConditionStatus_StatusFailed,
|
||||
Reason: err.Error(),
|
||||
LastUpdated: timestamppb.Now(),
|
||||
}
|
||||
return organization, err
|
||||
}
|
||||
|
||||
if org, ok := entity.(*models.Organization); ok {
|
||||
|
||||
sb, err := json.MarshalIndent(organization.GetSpec().GetSettings(), "", "\t")
|
||||
if err != nil {
|
||||
organization.Status = &v3.Status{
|
||||
ConditionType: "Update",
|
||||
ConditionStatus: v3.ConditionStatus_StatusFailed,
|
||||
Reason: err.Error(),
|
||||
LastUpdated: timestamppb.Now(),
|
||||
}
|
||||
}
|
||||
|
||||
//update organization details
|
||||
org.Name = organization.GetMetadata().GetName()
|
||||
org.Description = organization.GetMetadata().GetDescription()
|
||||
org.ModifiedAt = time.Now()
|
||||
org.Trash = false
|
||||
org.Settings = json.RawMessage(sb)
|
||||
org.BillingAddress = organization.GetSpec().GetBillingAddress()
|
||||
org.Active = organization.GetSpec().GetActive()
|
||||
org.Approved = organization.GetSpec().GetApproved()
|
||||
org.Type = organization.GetSpec().GetType()
|
||||
org.AddressLine1 = organization.GetSpec().GetAddressLine1()
|
||||
org.AddressLine2 = organization.GetSpec().GetAddressLine2()
|
||||
org.City = organization.GetSpec().GetCity()
|
||||
org.Country = organization.GetSpec().GetCountry()
|
||||
org.Phone = organization.GetSpec().GetPhone()
|
||||
org.State = organization.GetSpec().GetState()
|
||||
org.Zipcode = organization.GetSpec().GetZipcode()
|
||||
org.IsPrivate = organization.GetSpec().GetIsPrivate()
|
||||
org.IsTOTPEnabled = organization.GetSpec().GetIsTotpEnabled()
|
||||
org.AreClustersShared = organization.GetSpec().GetAreClustersShared()
|
||||
|
||||
_, err = s.dao.Update(ctx, id, org)
|
||||
if err != nil {
|
||||
organization.Status = &v3.Status{
|
||||
ConditionType: "Update",
|
||||
ConditionStatus: v3.ConditionStatus_StatusFailed,
|
||||
LastUpdated: timestamppb.Now(),
|
||||
Reason: err.Error(),
|
||||
}
|
||||
return organization, err
|
||||
}
|
||||
|
||||
//update status
|
||||
if organization.Status != nil {
|
||||
organization.Status = &v3.Status{
|
||||
ConditionType: "Update",
|
||||
ConditionStatus: v3.ConditionStatus_StatusOK,
|
||||
LastUpdated: timestamppb.Now(),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return organization, nil
|
||||
}
|
||||
|
||||
func (s *organizationService) Delete(ctx context.Context, organization *systemv3.Organization) (*systemv3.Organization, error) {
|
||||
id, err := uuid.Parse(organization.Metadata.Id)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
entity, err := s.dao.GetByID(ctx, id, &models.Organization{})
|
||||
if err != nil {
|
||||
organization.Status = &v3.Status{
|
||||
ConditionType: "Delete",
|
||||
ConditionStatus: v3.ConditionStatus_StatusFailed,
|
||||
Reason: err.Error(),
|
||||
LastUpdated: timestamppb.Now(),
|
||||
}
|
||||
return organization, err
|
||||
}
|
||||
|
||||
if org, ok := entity.(*models.Organization); ok {
|
||||
err = s.dao.Delete(ctx, id, org)
|
||||
if err != nil {
|
||||
organization.Status = &v3.Status{
|
||||
ConditionType: "Delete",
|
||||
ConditionStatus: v3.ConditionStatus_StatusFailed,
|
||||
Reason: err.Error(),
|
||||
LastUpdated: timestamppb.Now(),
|
||||
}
|
||||
return organization, err
|
||||
}
|
||||
//update v3 status
|
||||
organization.Metadata.Id = org.ID.String()
|
||||
organization.Metadata.Name = org.Name
|
||||
organization.Metadata.ModifiedAt = timestamppb.New(org.ModifiedAt)
|
||||
organization.Status = &v3.Status{
|
||||
ConditionType: "Deleted",
|
||||
ConditionStatus: v3.ConditionStatus_StatusOK,
|
||||
LastUpdated: timestamppb.Now(),
|
||||
}
|
||||
}
|
||||
return organization, nil
|
||||
|
||||
}
|
||||
|
||||
func (s *organizationService) List(ctx context.Context, organization *systemv3.Organization) (*systemv3.OrganizationList, error) {
|
||||
|
||||
var organizations []*systemv3.Organization
|
||||
organinzationList := &systemv3.OrganizationList{
|
||||
ApiVersion: apiVersion,
|
||||
Kind: organizationListKind,
|
||||
Metadata: &v3.ListMetadata{
|
||||
Count: 0,
|
||||
},
|
||||
}
|
||||
if len(organization.Metadata.Partner) > 0 {
|
||||
id, err := uuid.Parse(organization.Metadata.Partner)
|
||||
if err != nil {
|
||||
return organinzationList, err
|
||||
}
|
||||
var orgs []models.Organization
|
||||
entities, err := s.dao.List(ctx, uuid.NullUUID{UUID: id, Valid: true}, uuid.NullUUID{UUID: uuid.Nil}, &orgs)
|
||||
if err != nil {
|
||||
return organinzationList, err
|
||||
}
|
||||
if orgs, ok := entities.(*[]models.Organization); ok {
|
||||
for _, org := range *orgs {
|
||||
var settings systemv3.OrganizationSettings
|
||||
err := json.Unmarshal(org.Settings, &settings)
|
||||
if err != nil {
|
||||
fmt.Print(err)
|
||||
return nil, err
|
||||
}
|
||||
organization.Metadata = &v3.Metadata{
|
||||
Name: org.Name,
|
||||
Description: org.Description,
|
||||
Id: org.ID.String(),
|
||||
Partner: org.PartnerId.String(),
|
||||
ModifiedAt: timestamppb.New(org.ModifiedAt),
|
||||
}
|
||||
organization.Spec = &systemv3.OrganizationSpec{
|
||||
BillingAddress: org.BillingAddress,
|
||||
Active: org.Active,
|
||||
Approved: org.Approved,
|
||||
Type: org.Type,
|
||||
AddressLine1: org.AddressLine1,
|
||||
AddressLine2: org.AddressLine2,
|
||||
City: org.City,
|
||||
Country: org.Country,
|
||||
Phone: org.Phone,
|
||||
State: org.State,
|
||||
Zipcode: org.Zipcode,
|
||||
IsPrivate: org.IsPrivate,
|
||||
IsTotpEnabled: org.IsTOTPEnabled,
|
||||
AreClustersShared: org.AreClustersShared,
|
||||
Settings: &settings,
|
||||
}
|
||||
organizations = append(organizations, organization)
|
||||
}
|
||||
|
||||
//update the list metadata and items response
|
||||
organinzationList.Metadata = &v3.ListMetadata{
|
||||
Count: int64(len(organizations)),
|
||||
}
|
||||
organinzationList.Items = organizations
|
||||
}
|
||||
|
||||
} else {
|
||||
return organinzationList, fmt.Errorf("missing partner id in metadata")
|
||||
}
|
||||
return organinzationList, nil
|
||||
}
|
||||
|
||||
func (s *organizationService) Close() error {
|
||||
return s.dao.Close()
|
||||
}
|
||||
362
components/adminsrv/pkg/service/partner.go
Normal file
362
components/adminsrv/pkg/service/partner.go
Normal file
@@ -0,0 +1,362 @@
|
||||
package service
|
||||
|
||||
import (
|
||||
"context"
|
||||
"encoding/json"
|
||||
"time"
|
||||
|
||||
"github.com/RafaySystems/rcloud-base/components/adminsrv/pkg/internal/models"
|
||||
"github.com/RafaySystems/rcloud-base/components/adminsrv/pkg/internal/persistence/provider/pg"
|
||||
systemv3 "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/google/uuid"
|
||||
bun "github.com/uptrace/bun"
|
||||
"google.golang.org/protobuf/types/known/timestamppb"
|
||||
)
|
||||
|
||||
const (
|
||||
apiVersion = "system.k8smgmt.io/v3"
|
||||
partnerKind = "Partner"
|
||||
)
|
||||
|
||||
// PartnerService is the interface for partner operations
|
||||
type PartnerService interface {
|
||||
Close() error
|
||||
// create partner
|
||||
Create(ctx context.Context, partner *systemv3.Partner) (*systemv3.Partner, error)
|
||||
// get partner by id
|
||||
GetByID(ctx context.Context, partnerId string) (*systemv3.Partner, error)
|
||||
// get partner by id
|
||||
GetByName(ctx context.Context, name string) (*systemv3.Partner, error)
|
||||
// create or update partner
|
||||
Update(ctx context.Context, partner *systemv3.Partner) (*systemv3.Partner, error)
|
||||
// delete partner
|
||||
Delete(ctx context.Context, partner *systemv3.Partner) (*systemv3.Partner, error)
|
||||
}
|
||||
|
||||
// partnerService implements PartnerService
|
||||
type partnerService struct {
|
||||
dao pg.EntityDAO
|
||||
}
|
||||
|
||||
// NewPartnerService return new partner service
|
||||
func NewPartnerService(db *bun.DB) PartnerService {
|
||||
return &partnerService{
|
||||
dao: pg.NewEntityDAO(db),
|
||||
}
|
||||
}
|
||||
|
||||
func (s *partnerService) Create(ctx context.Context, partner *systemv3.Partner) (*systemv3.Partner, error) {
|
||||
|
||||
var sb []byte
|
||||
if partner.GetSpec().GetSettings() != nil {
|
||||
sb = json.RawMessage(partner.GetSpec().GetSettings().String())
|
||||
}
|
||||
//convert v3 spec to internal models
|
||||
part := models.Partner{
|
||||
Name: partner.GetMetadata().GetName(),
|
||||
Description: partner.GetMetadata().GetDescription(),
|
||||
Trash: false,
|
||||
Settings: sb,
|
||||
Host: partner.GetSpec().GetHost(),
|
||||
Domain: partner.GetSpec().GetDomain(),
|
||||
TosLink: partner.GetSpec().GetTosLink(),
|
||||
LogoLink: partner.GetSpec().GetLogoLink(),
|
||||
NotificationEmail: partner.GetSpec().GetNotificationEmail(),
|
||||
HelpdeskEmail: partner.GetSpec().GetHelpdeskEmail(),
|
||||
ProductName: partner.GetSpec().GetProductName(),
|
||||
SupportTeamName: partner.GetSpec().GetSupportTeamName(),
|
||||
OpsHost: partner.GetSpec().GetOpsHost(),
|
||||
FavIconLink: partner.GetSpec().GetFavIconLink(),
|
||||
IsTOTPEnabled: partner.GetSpec().GetIsTOTPEnabled(),
|
||||
IsSyntheticPartnerEnabled: false,
|
||||
CreatedAt: time.Now(),
|
||||
ModifiedAt: time.Now(),
|
||||
}
|
||||
entity, err := s.dao.Create(ctx, &part)
|
||||
if err != nil {
|
||||
partner.Status = &v3.Status{
|
||||
ConditionStatus: v3.ConditionStatus_StatusFailed,
|
||||
Reason: err.Error(),
|
||||
}
|
||||
return partner, err
|
||||
}
|
||||
|
||||
if createdPartner, ok := entity.(*models.Partner); ok {
|
||||
//update v3 spec
|
||||
partner.Metadata.Id = createdPartner.ID.String()
|
||||
partner.Metadata.ModifiedAt = timestamppb.New(createdPartner.ModifiedAt)
|
||||
if partner.Status != nil {
|
||||
partner.Status = &v3.Status{
|
||||
ConditionStatus: v3.ConditionStatus_StatusOK,
|
||||
LastUpdated: timestamppb.Now(),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return partner, nil
|
||||
|
||||
}
|
||||
|
||||
func (s *partnerService) GetByID(ctx context.Context, id string) (*systemv3.Partner, error) {
|
||||
|
||||
partner := &systemv3.Partner{
|
||||
ApiVersion: apiVersion,
|
||||
Kind: partnerKind,
|
||||
Metadata: &v3.Metadata{
|
||||
Id: id,
|
||||
},
|
||||
}
|
||||
|
||||
uid, err := uuid.Parse(id)
|
||||
if err != nil {
|
||||
partner.Status = &v3.Status{
|
||||
ConditionType: "Describe",
|
||||
ConditionStatus: v3.ConditionStatus_StatusFailed,
|
||||
Reason: err.Error(),
|
||||
LastUpdated: timestamppb.Now(),
|
||||
}
|
||||
return partner, err
|
||||
}
|
||||
entity, err := s.dao.GetByID(ctx, uid, &models.Partner{})
|
||||
if err != nil {
|
||||
partner.Status = &v3.Status{
|
||||
ConditionType: "Describe",
|
||||
ConditionStatus: v3.ConditionStatus_StatusFailed,
|
||||
Reason: err.Error(),
|
||||
LastUpdated: timestamppb.Now(),
|
||||
}
|
||||
return partner, err
|
||||
}
|
||||
|
||||
if part, ok := entity.(*models.Partner); ok {
|
||||
|
||||
partner.Metadata = &v3.Metadata{
|
||||
Name: part.Name,
|
||||
Description: part.Description,
|
||||
Id: part.ID.String(),
|
||||
ModifiedAt: timestamppb.New(part.ModifiedAt),
|
||||
}
|
||||
partner.Spec = &systemv3.PartnerSpec{
|
||||
Host: part.Host,
|
||||
Domain: part.Domain,
|
||||
TosLink: part.TosLink,
|
||||
LogoLink: part.LogoLink,
|
||||
NotificationEmail: part.NotificationEmail,
|
||||
HelpdeskEmail: part.HelpdeskEmail,
|
||||
ProductName: part.ProductName,
|
||||
SupportTeamName: part.SupportTeamName,
|
||||
OpsHost: part.OpsHost,
|
||||
FavIconLink: part.FavIconLink,
|
||||
IsTOTPEnabled: part.IsTOTPEnabled,
|
||||
Settings: nil, //TODO
|
||||
}
|
||||
partner.Status = &v3.Status{
|
||||
ConditionType: "Describe",
|
||||
ConditionStatus: v3.ConditionStatus_StatusOK,
|
||||
LastUpdated: timestamppb.New(part.ModifiedAt),
|
||||
}
|
||||
|
||||
return partner, nil
|
||||
|
||||
} else {
|
||||
partner := &systemv3.Partner{
|
||||
ApiVersion: apiVersion,
|
||||
Kind: partnerKind,
|
||||
Metadata: &v3.Metadata{
|
||||
Id: id,
|
||||
},
|
||||
Status: &v3.Status{
|
||||
ConditionStatus: v3.ConditionStatus_StatusNotSet,
|
||||
Reason: "Unable to fetch partner information",
|
||||
LastUpdated: timestamppb.Now(),
|
||||
},
|
||||
}
|
||||
|
||||
return partner, nil
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
func (s *partnerService) GetByName(ctx context.Context, name string) (*systemv3.Partner, error) {
|
||||
|
||||
partner := &systemv3.Partner{
|
||||
ApiVersion: apiVersion,
|
||||
Kind: partnerKind,
|
||||
Metadata: &v3.Metadata{
|
||||
Name: name,
|
||||
},
|
||||
}
|
||||
|
||||
entity, err := s.dao.GetByName(ctx, name, &models.Partner{})
|
||||
if err != nil {
|
||||
partner.Status = &v3.Status{
|
||||
ConditionType: "Describe",
|
||||
ConditionStatus: v3.ConditionStatus_StatusFailed,
|
||||
Reason: err.Error(),
|
||||
LastUpdated: timestamppb.Now(),
|
||||
}
|
||||
return partner, err
|
||||
}
|
||||
|
||||
if part, ok := entity.(*models.Partner); ok {
|
||||
|
||||
partner.Metadata = &v3.Metadata{
|
||||
Name: part.Name,
|
||||
Description: part.Description,
|
||||
Id: part.ID.String(),
|
||||
ModifiedAt: timestamppb.New(part.ModifiedAt),
|
||||
}
|
||||
partner.Spec = &systemv3.PartnerSpec{
|
||||
Host: part.Host,
|
||||
Domain: part.Domain,
|
||||
TosLink: part.TosLink,
|
||||
LogoLink: part.LogoLink,
|
||||
NotificationEmail: part.NotificationEmail,
|
||||
HelpdeskEmail: part.HelpdeskEmail,
|
||||
ProductName: part.ProductName,
|
||||
SupportTeamName: part.SupportTeamName,
|
||||
OpsHost: part.OpsHost,
|
||||
FavIconLink: part.FavIconLink,
|
||||
IsTOTPEnabled: part.IsTOTPEnabled,
|
||||
Settings: nil, //TODO
|
||||
}
|
||||
partner.Status = &v3.Status{
|
||||
ConditionType: "Describe",
|
||||
ConditionStatus: v3.ConditionStatus_StatusOK,
|
||||
LastUpdated: timestamppb.New(part.ModifiedAt),
|
||||
}
|
||||
|
||||
return partner, nil
|
||||
} else {
|
||||
partner := &systemv3.Partner{
|
||||
ApiVersion: apiVersion,
|
||||
Kind: partnerKind,
|
||||
Metadata: &v3.Metadata{
|
||||
Name: name,
|
||||
},
|
||||
Status: &v3.Status{
|
||||
ConditionType: "Describe",
|
||||
ConditionStatus: v3.ConditionStatus_StatusNotSet,
|
||||
Reason: "Unable to fetch partner information",
|
||||
LastUpdated: timestamppb.Now(),
|
||||
},
|
||||
}
|
||||
|
||||
return partner, nil
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
func (s *partnerService) Update(ctx context.Context, partner *systemv3.Partner) (*systemv3.Partner, error) {
|
||||
|
||||
id, _ := uuid.Parse(partner.Metadata.Id)
|
||||
entity, err := s.dao.GetByID(ctx, id, &models.Partner{})
|
||||
if err != nil {
|
||||
partner.Status = &v3.Status{
|
||||
ConditionStatus: v3.ConditionStatus_StatusFailed,
|
||||
Reason: err.Error(),
|
||||
LastUpdated: timestamppb.Now(),
|
||||
}
|
||||
return partner, err
|
||||
}
|
||||
|
||||
var sb []byte
|
||||
if partner.GetSpec().GetSettings() != nil {
|
||||
sb = json.RawMessage(partner.GetSpec().GetSettings().String())
|
||||
}
|
||||
|
||||
if part, ok := entity.(*models.Partner); ok {
|
||||
//update partner details
|
||||
part.ID = id
|
||||
part.Name = partner.GetMetadata().Name
|
||||
part.Description = partner.GetMetadata().GetDescription()
|
||||
part.Settings = sb
|
||||
part.Host = partner.GetSpec().GetHost()
|
||||
part.Domain = partner.GetSpec().GetDomain()
|
||||
part.TosLink = partner.GetSpec().GetTosLink()
|
||||
part.LogoLink = partner.GetSpec().GetLogoLink()
|
||||
part.NotificationEmail = partner.GetSpec().GetNotificationEmail()
|
||||
part.HelpdeskEmail = partner.GetSpec().GetHelpdeskEmail()
|
||||
part.ProductName = partner.GetSpec().GetProductName()
|
||||
part.SupportTeamName = partner.GetSpec().GetSupportTeamName()
|
||||
part.OpsHost = partner.GetSpec().GetOpsHost()
|
||||
part.FavIconLink = partner.GetSpec().GetFavIconLink()
|
||||
part.IsTOTPEnabled = partner.GetSpec().GetIsTOTPEnabled()
|
||||
part.ModifiedAt = time.Now()
|
||||
|
||||
//Update the partner details
|
||||
_, err = s.dao.Update(ctx, id, part)
|
||||
if err != nil {
|
||||
partner.Status = &v3.Status{
|
||||
ConditionStatus: v3.ConditionStatus_StatusFailed,
|
||||
Reason: err.Error(),
|
||||
LastUpdated: timestamppb.Now(),
|
||||
}
|
||||
return partner, err
|
||||
}
|
||||
|
||||
//update metadata and status
|
||||
partner.Metadata.ModifiedAt = timestamppb.New(part.ModifiedAt)
|
||||
partner.Status = &v3.Status{
|
||||
ConditionStatus: v3.ConditionStatus_StatusOK,
|
||||
LastUpdated: timestamppb.Now(),
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
return partner, nil
|
||||
}
|
||||
|
||||
func (s *partnerService) Delete(ctx context.Context, partner *systemv3.Partner) (*systemv3.Partner, error) {
|
||||
id, err := uuid.Parse(partner.Metadata.Id)
|
||||
if err != nil {
|
||||
partner.Status = &v3.Status{
|
||||
ConditionType: "Delete",
|
||||
ConditionStatus: v3.ConditionStatus_StatusFailed,
|
||||
Reason: err.Error(),
|
||||
LastUpdated: timestamppb.Now(),
|
||||
}
|
||||
return partner, err
|
||||
}
|
||||
entity, err := s.dao.GetByID(ctx, id, &models.Partner{})
|
||||
if err != nil {
|
||||
partner.Status = &v3.Status{
|
||||
ConditionType: "Delete",
|
||||
ConditionStatus: v3.ConditionStatus_StatusFailed,
|
||||
Reason: err.Error(),
|
||||
LastUpdated: timestamppb.Now(),
|
||||
}
|
||||
return partner, err
|
||||
}
|
||||
|
||||
if part, ok := entity.(*models.Partner); ok {
|
||||
err = s.dao.Delete(ctx, id, part)
|
||||
if err != nil {
|
||||
partner.Status = &v3.Status{
|
||||
ConditionType: "Delete",
|
||||
ConditionStatus: v3.ConditionStatus_StatusFailed,
|
||||
Reason: err.Error(),
|
||||
LastUpdated: timestamppb.Now(),
|
||||
}
|
||||
return partner, err
|
||||
}
|
||||
//update status
|
||||
if partner != nil {
|
||||
partner.Metadata.Id = part.ID.String()
|
||||
partner.Metadata.Name = part.Name
|
||||
partner.Status = &v3.Status{
|
||||
ConditionStatus: v3.ConditionStatus_StatusOK,
|
||||
ConditionType: "Delete",
|
||||
}
|
||||
}
|
||||
return partner, nil
|
||||
}
|
||||
|
||||
return partner, nil
|
||||
|
||||
}
|
||||
|
||||
func (s *partnerService) Close() error {
|
||||
return s.dao.Close()
|
||||
}
|
||||
355
components/adminsrv/pkg/service/project.go
Normal file
355
components/adminsrv/pkg/service/project.go
Normal file
@@ -0,0 +1,355 @@
|
||||
package service
|
||||
|
||||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
"time"
|
||||
|
||||
"github.com/RafaySystems/rcloud-base/components/adminsrv/pkg/internal/models"
|
||||
"github.com/RafaySystems/rcloud-base/components/adminsrv/pkg/internal/persistence/provider/pg"
|
||||
systemv3 "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/google/uuid"
|
||||
bun "github.com/uptrace/bun"
|
||||
"google.golang.org/protobuf/types/known/timestamppb"
|
||||
)
|
||||
|
||||
const (
|
||||
projectKind = "Project"
|
||||
projectListKind = "ProjectList"
|
||||
)
|
||||
|
||||
// ProjectService is the interface for project operations
|
||||
type ProjectService interface {
|
||||
Close() error
|
||||
// create project
|
||||
Create(ctx context.Context, project *systemv3.Project) (*systemv3.Project, error)
|
||||
// get project by id
|
||||
GetByID(ctx context.Context, id string) (*systemv3.Project, error)
|
||||
// get project by name
|
||||
GetByName(ctx context.Context, name string) (*systemv3.Project, error)
|
||||
// create or update project
|
||||
Update(ctx context.Context, project *systemv3.Project) (*systemv3.Project, error)
|
||||
// delete project
|
||||
Delete(ctx context.Context, project *systemv3.Project) (*systemv3.Project, error)
|
||||
// list projects
|
||||
List(ctx context.Context, project *systemv3.Project) (*systemv3.ProjectList, error)
|
||||
//TODO Associate project with groups, user, roles
|
||||
}
|
||||
|
||||
// projectService implements ProjectService
|
||||
type projectService struct {
|
||||
dao pg.EntityDAO
|
||||
}
|
||||
|
||||
// NewProjectService return new project service
|
||||
func NewProjectService(db *bun.DB) ProjectService {
|
||||
return &projectService{
|
||||
dao: pg.NewEntityDAO(db),
|
||||
}
|
||||
}
|
||||
|
||||
func (s *projectService) Create(ctx context.Context, project *systemv3.Project) (*systemv3.Project, error) {
|
||||
|
||||
partnerId, _ := uuid.Parse(project.GetMetadata().GetPartner())
|
||||
organizationId, _ := uuid.Parse(project.GetMetadata().GetOrganization())
|
||||
//convert v3 spec to internal models
|
||||
proj := models.Project{
|
||||
Name: project.GetMetadata().GetName(),
|
||||
Description: project.GetMetadata().GetDescription(),
|
||||
CreatedAt: time.Now(),
|
||||
ModifiedAt: time.Now(),
|
||||
Trash: false,
|
||||
OrganizationId: organizationId,
|
||||
PartnerId: partnerId,
|
||||
Default: project.GetSpec().GetDefault(),
|
||||
}
|
||||
entity, err := s.dao.Create(ctx, &proj)
|
||||
if err != nil {
|
||||
project.Status = &v3.Status{
|
||||
ConditionType: "Create",
|
||||
ConditionStatus: v3.ConditionStatus_StatusFailed,
|
||||
LastUpdated: timestamppb.Now(),
|
||||
}
|
||||
return project, err
|
||||
}
|
||||
|
||||
//update v3 spec
|
||||
if createdProject, ok := entity.(*models.Project); ok {
|
||||
project.Metadata.Id = createdProject.ID.String()
|
||||
project.Spec = &systemv3.ProjectSpec{
|
||||
Default: createdProject.Default,
|
||||
}
|
||||
if project.Status != nil {
|
||||
project.Status = &v3.Status{
|
||||
ConditionType: "Create",
|
||||
ConditionStatus: v3.ConditionStatus_StatusOK,
|
||||
LastUpdated: timestamppb.Now(),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return project, nil
|
||||
|
||||
}
|
||||
|
||||
func (s *projectService) GetByID(ctx context.Context, id string) (*systemv3.Project, error) {
|
||||
|
||||
project := &systemv3.Project{
|
||||
ApiVersion: apiVersion,
|
||||
Kind: projectKind,
|
||||
Metadata: &v3.Metadata{
|
||||
Id: id,
|
||||
},
|
||||
}
|
||||
|
||||
uid, err := uuid.Parse(id)
|
||||
if err != nil {
|
||||
project.Status = &v3.Status{
|
||||
ConditionType: "Describe",
|
||||
ConditionStatus: v3.ConditionStatus_StatusFailed,
|
||||
LastUpdated: timestamppb.Now(),
|
||||
Reason: err.Error(),
|
||||
}
|
||||
return project, err
|
||||
}
|
||||
entity, err := s.dao.GetByID(ctx, uid, &models.Project{})
|
||||
if err != nil {
|
||||
project.Status = &v3.Status{
|
||||
ConditionType: "Describe",
|
||||
ConditionStatus: v3.ConditionStatus_StatusFailed,
|
||||
LastUpdated: timestamppb.Now(),
|
||||
Reason: err.Error(),
|
||||
}
|
||||
return project, err
|
||||
}
|
||||
|
||||
if proj, ok := entity.(*models.Project); ok {
|
||||
labels := make(map[string]string)
|
||||
labels["organization"] = proj.OrganizationId.String()
|
||||
|
||||
project.Metadata = &v3.Metadata{
|
||||
Name: proj.Name,
|
||||
Description: proj.Description,
|
||||
Id: proj.ID.String(),
|
||||
Organization: proj.OrganizationId.String(),
|
||||
Partner: proj.PartnerId.String(),
|
||||
Labels: labels,
|
||||
ModifiedAt: timestamppb.New(proj.ModifiedAt),
|
||||
}
|
||||
project.Spec = &systemv3.ProjectSpec{
|
||||
Default: proj.Default,
|
||||
}
|
||||
project.Status = &v3.Status{
|
||||
LastUpdated: timestamppb.Now(),
|
||||
ConditionType: "Describe",
|
||||
ConditionStatus: v3.ConditionStatus_StatusOK,
|
||||
}
|
||||
|
||||
return project, nil
|
||||
}
|
||||
return project, nil
|
||||
|
||||
}
|
||||
|
||||
func (s *projectService) GetByName(ctx context.Context, name string) (*systemv3.Project, error) {
|
||||
|
||||
project := &systemv3.Project{
|
||||
ApiVersion: apiVersion,
|
||||
Kind: projectKind,
|
||||
Metadata: &v3.Metadata{
|
||||
Name: name,
|
||||
},
|
||||
}
|
||||
|
||||
entity, err := s.dao.GetByName(ctx, name, &models.Project{})
|
||||
if err != nil {
|
||||
project.Status = &v3.Status{
|
||||
ConditionType: "Describe",
|
||||
ConditionStatus: v3.ConditionStatus_StatusFailed,
|
||||
LastUpdated: timestamppb.Now(),
|
||||
Reason: err.Error(),
|
||||
}
|
||||
return project, err
|
||||
}
|
||||
|
||||
if proj, ok := entity.(*models.Project); ok {
|
||||
labels := make(map[string]string)
|
||||
labels["organization"] = proj.OrganizationId.String()
|
||||
|
||||
project.Metadata = &v3.Metadata{
|
||||
Name: proj.Name,
|
||||
Description: proj.Description,
|
||||
Id: proj.ID.String(),
|
||||
Organization: proj.OrganizationId.String(),
|
||||
Partner: proj.PartnerId.String(),
|
||||
Labels: labels,
|
||||
ModifiedAt: timestamppb.New(proj.ModifiedAt),
|
||||
}
|
||||
project.Spec = &systemv3.ProjectSpec{
|
||||
Default: proj.Default,
|
||||
}
|
||||
project.Status = &v3.Status{
|
||||
LastUpdated: timestamppb.Now(),
|
||||
ConditionType: "Describe",
|
||||
ConditionStatus: v3.ConditionStatus_StatusOK,
|
||||
}
|
||||
|
||||
return project, nil
|
||||
}
|
||||
return project, nil
|
||||
|
||||
}
|
||||
|
||||
func (s *projectService) Update(ctx context.Context, project *systemv3.Project) (*systemv3.Project, error) {
|
||||
|
||||
id, _ := uuid.Parse(project.Metadata.Id)
|
||||
entity, err := s.dao.GetByID(ctx, id, &models.Project{})
|
||||
if err != nil {
|
||||
project.Status = &v3.Status{
|
||||
ConditionType: "Update",
|
||||
ConditionStatus: v3.ConditionStatus_StatusFailed,
|
||||
LastUpdated: timestamppb.Now(),
|
||||
Reason: err.Error(),
|
||||
}
|
||||
return project, err
|
||||
}
|
||||
|
||||
if proj, ok := entity.(*models.Project); ok {
|
||||
//update project details
|
||||
proj.Name = project.Metadata.Name
|
||||
proj.Description = project.Metadata.Description
|
||||
proj.Default = project.Spec.Default
|
||||
proj.ModifiedAt = time.Now()
|
||||
|
||||
_, err = s.dao.Update(ctx, id, proj)
|
||||
if err != nil {
|
||||
project.Status = &v3.Status{
|
||||
ConditionType: "Update",
|
||||
ConditionStatus: v3.ConditionStatus_StatusFailed,
|
||||
LastUpdated: timestamppb.Now(),
|
||||
Reason: err.Error(),
|
||||
}
|
||||
return project, err
|
||||
}
|
||||
|
||||
//update spec and status
|
||||
project.Spec = &systemv3.ProjectSpec{
|
||||
Default: proj.Default,
|
||||
}
|
||||
project.Status = &v3.Status{
|
||||
ConditionType: "Update",
|
||||
ConditionStatus: v3.ConditionStatus_StatusOK,
|
||||
LastUpdated: timestamppb.Now(),
|
||||
}
|
||||
}
|
||||
|
||||
return project, nil
|
||||
}
|
||||
|
||||
func (s *projectService) Delete(ctx context.Context, project *systemv3.Project) (*systemv3.Project, error) {
|
||||
id, err := uuid.Parse(project.Metadata.Id)
|
||||
if err != nil {
|
||||
project.Status = &v3.Status{
|
||||
ConditionType: "Delete",
|
||||
ConditionStatus: v3.ConditionStatus_StatusFailed,
|
||||
LastUpdated: timestamppb.Now(),
|
||||
Reason: err.Error(),
|
||||
}
|
||||
return project, err
|
||||
}
|
||||
entity, err := s.dao.GetByID(ctx, id, &models.Project{})
|
||||
if err != nil {
|
||||
project.Status = &v3.Status{
|
||||
ConditionType: "Delete",
|
||||
ConditionStatus: v3.ConditionStatus_StatusFailed,
|
||||
LastUpdated: timestamppb.Now(),
|
||||
Reason: err.Error(),
|
||||
}
|
||||
return project, err
|
||||
}
|
||||
if proj, ok := entity.(*models.Project); ok {
|
||||
err = s.dao.Delete(ctx, id, proj)
|
||||
if err != nil {
|
||||
project.Status = &v3.Status{
|
||||
ConditionType: "Delete",
|
||||
ConditionStatus: v3.ConditionStatus_StatusFailed,
|
||||
LastUpdated: timestamppb.Now(),
|
||||
Reason: err.Error(),
|
||||
}
|
||||
return project, err
|
||||
}
|
||||
//update v3 spec
|
||||
project.Metadata.Id = proj.ID.String()
|
||||
project.Metadata.Name = proj.Name
|
||||
project.Status = &v3.Status{
|
||||
ConditionType: "Delete",
|
||||
ConditionStatus: v3.ConditionStatus_StatusOK,
|
||||
LastUpdated: timestamppb.Now(),
|
||||
}
|
||||
}
|
||||
|
||||
return project, nil
|
||||
}
|
||||
|
||||
func (s *projectService) List(ctx context.Context, project *systemv3.Project) (*systemv3.ProjectList, error) {
|
||||
|
||||
var projects []*systemv3.Project
|
||||
projectList := &systemv3.ProjectList{
|
||||
ApiVersion: apiVersion,
|
||||
Kind: projectListKind,
|
||||
Metadata: &v3.ListMetadata{
|
||||
Count: 0,
|
||||
},
|
||||
}
|
||||
if len(project.Metadata.Organization) > 0 {
|
||||
orgId, err := uuid.Parse(project.Metadata.Organization)
|
||||
if err != nil {
|
||||
return projectList, err
|
||||
}
|
||||
partId, err := uuid.Parse(project.Metadata.Partner)
|
||||
if err != nil {
|
||||
return projectList, err
|
||||
}
|
||||
var projs []models.Project
|
||||
entities, err := s.dao.List(ctx, uuid.NullUUID{UUID: partId, Valid: true}, uuid.NullUUID{UUID: orgId, Valid: true}, &projs)
|
||||
if err != nil {
|
||||
return projectList, err
|
||||
}
|
||||
if projs, ok := entities.(*[]models.Project); ok {
|
||||
for _, proj := range *projs {
|
||||
labels := make(map[string]string)
|
||||
labels["organization"] = proj.OrganizationId.String()
|
||||
labels["partner"] = proj.PartnerId.String()
|
||||
|
||||
project.Metadata = &v3.Metadata{
|
||||
Name: proj.Name,
|
||||
Description: proj.Description,
|
||||
Id: proj.ID.String(),
|
||||
Organization: proj.OrganizationId.String(),
|
||||
Partner: proj.PartnerId.String(),
|
||||
Labels: labels,
|
||||
ModifiedAt: timestamppb.New(proj.ModifiedAt),
|
||||
}
|
||||
project.Spec = &systemv3.ProjectSpec{
|
||||
Default: proj.Default,
|
||||
}
|
||||
projects = append(projects, project)
|
||||
}
|
||||
|
||||
//update the list metadata and items response
|
||||
projectList.Metadata = &v3.ListMetadata{
|
||||
Count: int64(len(projects)),
|
||||
}
|
||||
projectList.Items = projects
|
||||
}
|
||||
|
||||
} else {
|
||||
return projectList, fmt.Errorf("missing organization id in metadata")
|
||||
}
|
||||
return projectList, nil
|
||||
}
|
||||
|
||||
func (s *projectService) Close() error {
|
||||
return s.dao.Close()
|
||||
}
|
||||
62
components/adminsrv/proto/rpc/v3/organization.go
Normal file
62
components/adminsrv/proto/rpc/v3/organization.go
Normal file
@@ -0,0 +1,62 @@
|
||||
package rpcv3
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
"github.com/RafaySystems/rcloud-base/components/adminsrv/pkg/service"
|
||||
systempbv3 "github.com/RafaySystems/rcloud-base/components/adminsrv/proto/types/systempb/v3"
|
||||
)
|
||||
|
||||
type organizationServer struct {
|
||||
service.OrganizationService
|
||||
}
|
||||
|
||||
// NewOrganizationServer returns new organization server implementation
|
||||
func NewOrganizationServer(ps service.OrganizationService) OrganizationServer {
|
||||
return &organizationServer{ps}
|
||||
}
|
||||
|
||||
func (s *organizationServer) CreateOrganization(ctx context.Context, o *systempbv3.Organization) (*systempbv3.Organization, error) {
|
||||
organization, err := s.Create(ctx, o)
|
||||
if err != nil {
|
||||
return o, err
|
||||
}
|
||||
return organization, nil
|
||||
}
|
||||
|
||||
func (s *organizationServer) GetOrganizations(ctx context.Context, o *systempbv3.Organization) (*systempbv3.OrganizationList, error) {
|
||||
organizations, err := s.List(ctx, o)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return organizations, nil
|
||||
}
|
||||
|
||||
func (s *organizationServer) GetOrganization(ctx context.Context, o *systempbv3.Organization) (*systempbv3.Organization, error) {
|
||||
|
||||
organization, err := s.GetByName(ctx, o.Metadata.Name)
|
||||
if err != nil {
|
||||
organization, err = s.GetByID(ctx, o.Metadata.Id)
|
||||
if err != nil {
|
||||
return o, err
|
||||
}
|
||||
}
|
||||
|
||||
return organization, nil
|
||||
}
|
||||
|
||||
func (s *organizationServer) DeleteOrganization(ctx context.Context, o *systempbv3.Organization) (*systempbv3.Organization, error) {
|
||||
organization, err := s.Delete(ctx, o)
|
||||
if err != nil {
|
||||
return o, err
|
||||
}
|
||||
return organization, nil
|
||||
}
|
||||
|
||||
func (s *organizationServer) UpdateOrganization(ctx context.Context, o *systempbv3.Organization) (*systempbv3.Organization, error) {
|
||||
organization, err := s.Update(ctx, o)
|
||||
if err != nil {
|
||||
return o, err
|
||||
}
|
||||
return organization, nil
|
||||
}
|
||||
202
components/adminsrv/proto/rpc/v3/organization.pb.go
Normal file
202
components/adminsrv/proto/rpc/v3/organization.pb.go
Normal file
@@ -0,0 +1,202 @@
|
||||
// Code generated by protoc-gen-go. DO NOT EDIT.
|
||||
// versions:
|
||||
// protoc-gen-go v1.27.1
|
||||
// protoc (unknown)
|
||||
// source: proto/rpc/v3/organization.proto
|
||||
|
||||
package rpcv3
|
||||
|
||||
import (
|
||||
v3 "github.com/RafaySystems/rcloud-base/components/adminsrv/proto/types/systempb/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_organization_proto protoreflect.FileDescriptor
|
||||
|
||||
var file_proto_rpc_v3_organization_proto_rawDesc = []byte{
|
||||
0x0a, 0x1f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x72, 0x70, 0x63, 0x2f, 0x76, 0x33, 0x2f, 0x6f,
|
||||
0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 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, 0x73, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x70, 0x62, 0x2f, 0x76, 0x33,
|
||||
0x2f, 0x6f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72,
|
||||
0x6f, 0x74, 0x6f, 0x32, 0xc4, 0x09, 0x0a, 0x0c, 0x4f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61,
|
||||
0x74, 0x69, 0x6f, 0x6e, 0x12, 0xe4, 0x01, 0x0a, 0x12, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x4f,
|
||||
0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x27, 0x2e, 0x72, 0x61,
|
||||
0x66, 0x61, 0x79, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x73, 0x79,
|
||||
0x73, 0x74, 0x65, 0x6d, 0x2e, 0x76, 0x33, 0x2e, 0x4f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61,
|
||||
0x74, 0x69, 0x6f, 0x6e, 0x1a, 0x27, 0x2e, 0x72, 0x61, 0x66, 0x61, 0x79, 0x2e, 0x64, 0x65, 0x76,
|
||||
0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x73, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x2e, 0x76, 0x33,
|
||||
0x2e, 0x4f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x7c, 0x92,
|
||||
0x41, 0x3e, 0x4a, 0x3c, 0x0a, 0x03, 0x32, 0x30, 0x31, 0x12, 0x35, 0x0a, 0x33, 0x52, 0x65, 0x74,
|
||||
0x75, 0x72, 0x6e, 0x65, 0x64, 0x20, 0x77, 0x68, 0x65, 0x6e, 0x20, 0x6f, 0x72, 0x67, 0x61, 0x6e,
|
||||
0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 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, 0x35, 0x22, 0x30, 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, 0x3a, 0x01, 0x2a, 0x12, 0xa3, 0x01, 0x0a, 0x10,
|
||||
0x47, 0x65, 0x74, 0x4f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73,
|
||||
0x12, 0x27, 0x2e, 0x72, 0x61, 0x66, 0x61, 0x79, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x74, 0x79, 0x70,
|
||||
0x65, 0x73, 0x2e, 0x73, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x2e, 0x76, 0x33, 0x2e, 0x4f, 0x72, 0x67,
|
||||
0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x1a, 0x2b, 0x2e, 0x72, 0x61, 0x66, 0x61,
|
||||
0x79, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x73, 0x79, 0x73, 0x74,
|
||||
0x65, 0x6d, 0x2e, 0x76, 0x33, 0x2e, 0x4f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69,
|
||||
0x6f, 0x6e, 0x4c, 0x69, 0x73, 0x74, 0x22, 0x39, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x33, 0x12, 0x31,
|
||||
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,
|
||||
0x73, 0x12, 0xf1, 0x01, 0x0a, 0x0f, 0x47, 0x65, 0x74, 0x4f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a,
|
||||
0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x27, 0x2e, 0x72, 0x61, 0x66, 0x61, 0x79, 0x2e, 0x64, 0x65,
|
||||
0x76, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x73, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x2e, 0x76,
|
||||
0x33, 0x2e, 0x4f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x1a, 0x27,
|
||||
0x2e, 0x72, 0x61, 0x66, 0x61, 0x79, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73,
|
||||
0x2e, 0x73, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x2e, 0x76, 0x33, 0x2e, 0x4f, 0x72, 0x67, 0x61, 0x6e,
|
||||
0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x8b, 0x01, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x84,
|
||||
0x01, 0x12, 0x40, 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, 0x6e, 0x61,
|
||||
0x6d, 0x65, 0x7d, 0x5a, 0x40, 0x12, 0x3e, 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, 0x69, 0x64, 0x7d, 0x12, 0xfa, 0x01, 0x0a, 0x12, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65,
|
||||
0x4f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x27, 0x2e, 0x72,
|
||||
0x61, 0x66, 0x61, 0x79, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x73,
|
||||
0x79, 0x73, 0x74, 0x65, 0x6d, 0x2e, 0x76, 0x33, 0x2e, 0x4f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a,
|
||||
0x61, 0x74, 0x69, 0x6f, 0x6e, 0x1a, 0x27, 0x2e, 0x72, 0x61, 0x66, 0x61, 0x79, 0x2e, 0x64, 0x65,
|
||||
0x76, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x73, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x2e, 0x76,
|
||||
0x33, 0x2e, 0x4f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x91,
|
||||
0x01, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x8a, 0x01, 0x1a, 0x40, 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, 0x6e, 0x61, 0x6d, 0x65, 0x7d, 0x3a, 0x01, 0x2a, 0x5a, 0x43, 0x1a,
|
||||
0x3e, 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, 0x69, 0x64, 0x7d, 0x3a,
|
||||
0x01, 0x2a, 0x12, 0xb5, 0x02, 0x0a, 0x12, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x4f, 0x72, 0x67,
|
||||
0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x27, 0x2e, 0x72, 0x61, 0x66, 0x61,
|
||||
0x79, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x73, 0x79, 0x73, 0x74,
|
||||
0x65, 0x6d, 0x2e, 0x76, 0x33, 0x2e, 0x4f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69,
|
||||
0x6f, 0x6e, 0x1a, 0x27, 0x2e, 0x72, 0x61, 0x66, 0x61, 0x79, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x74,
|
||||
0x79, 0x70, 0x65, 0x73, 0x2e, 0x73, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x2e, 0x76, 0x33, 0x2e, 0x4f,
|
||||
0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0xcc, 0x01, 0x92, 0x41,
|
||||
0x3e, 0x4a, 0x3c, 0x0a, 0x03, 0x32, 0x30, 0x34, 0x12, 0x35, 0x0a, 0x33, 0x52, 0x65, 0x74, 0x75,
|
||||
0x72, 0x6e, 0x65, 0x64, 0x20, 0x77, 0x68, 0x65, 0x6e, 0x20, 0x6f, 0x72, 0x67, 0x61, 0x6e, 0x69,
|
||||
0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 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, 0x84, 0x01, 0x2a, 0x40, 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, 0x6e, 0x61, 0x6d, 0x65, 0x7d, 0x5a, 0x40, 0x2a, 0x3e, 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, 0x69, 0x64, 0x7d, 0x42, 0xcf, 0x04, 0x0a, 0x14, 0x63,
|
||||
0x6f, 0x6d, 0x2e, 0x72, 0x61, 0x66, 0x61, 0x79, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x72, 0x70, 0x63,
|
||||
0x2e, 0x76, 0x33, 0x42, 0x11, 0x4f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 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, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x73, 0x72,
|
||||
0x76, 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, 0xdf, 0x02, 0x12, 0x28, 0x0a, 0x14, 0x4f, 0x72, 0x67,
|
||||
0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63,
|
||||
0x65, 0x22, 0x0b, 0x0a, 0x09, 0x52, 0x61, 0x66, 0x61, 0x79, 0x20, 0x44, 0x65, 0x76, 0x32, 0x03,
|
||||
0x33, 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_organization_proto_goTypes = []interface{}{
|
||||
(*v3.Organization)(nil), // 0: rafay.dev.types.system.v3.Organization
|
||||
(*v3.OrganizationList)(nil), // 1: rafay.dev.types.system.v3.OrganizationList
|
||||
}
|
||||
var file_proto_rpc_v3_organization_proto_depIdxs = []int32{
|
||||
0, // 0: rafay.dev.rpc.v3.Organization.CreateOrganization:input_type -> rafay.dev.types.system.v3.Organization
|
||||
0, // 1: rafay.dev.rpc.v3.Organization.GetOrganizations:input_type -> rafay.dev.types.system.v3.Organization
|
||||
0, // 2: rafay.dev.rpc.v3.Organization.GetOrganization:input_type -> rafay.dev.types.system.v3.Organization
|
||||
0, // 3: rafay.dev.rpc.v3.Organization.UpdateOrganization:input_type -> rafay.dev.types.system.v3.Organization
|
||||
0, // 4: rafay.dev.rpc.v3.Organization.DeleteOrganization:input_type -> rafay.dev.types.system.v3.Organization
|
||||
0, // 5: rafay.dev.rpc.v3.Organization.CreateOrganization:output_type -> rafay.dev.types.system.v3.Organization
|
||||
1, // 6: rafay.dev.rpc.v3.Organization.GetOrganizations:output_type -> rafay.dev.types.system.v3.OrganizationList
|
||||
0, // 7: rafay.dev.rpc.v3.Organization.GetOrganization:output_type -> rafay.dev.types.system.v3.Organization
|
||||
0, // 8: rafay.dev.rpc.v3.Organization.UpdateOrganization:output_type -> rafay.dev.types.system.v3.Organization
|
||||
0, // 9: rafay.dev.rpc.v3.Organization.DeleteOrganization:output_type -> rafay.dev.types.system.v3.Organization
|
||||
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_organization_proto_init() }
|
||||
func file_proto_rpc_v3_organization_proto_init() {
|
||||
if File_proto_rpc_v3_organization_proto != nil {
|
||||
return
|
||||
}
|
||||
type x struct{}
|
||||
out := protoimpl.TypeBuilder{
|
||||
File: protoimpl.DescBuilder{
|
||||
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
|
||||
RawDescriptor: file_proto_rpc_v3_organization_proto_rawDesc,
|
||||
NumEnums: 0,
|
||||
NumMessages: 0,
|
||||
NumExtensions: 0,
|
||||
NumServices: 1,
|
||||
},
|
||||
GoTypes: file_proto_rpc_v3_organization_proto_goTypes,
|
||||
DependencyIndexes: file_proto_rpc_v3_organization_proto_depIdxs,
|
||||
}.Build()
|
||||
File_proto_rpc_v3_organization_proto = out.File
|
||||
file_proto_rpc_v3_organization_proto_rawDesc = nil
|
||||
file_proto_rpc_v3_organization_proto_goTypes = nil
|
||||
file_proto_rpc_v3_organization_proto_depIdxs = nil
|
||||
}
|
||||
1137
components/adminsrv/proto/rpc/v3/organization.pb.gw.go
Normal file
1137
components/adminsrv/proto/rpc/v3/organization.pb.gw.go
Normal file
File diff suppressed because it is too large
Load Diff
138
components/adminsrv/proto/rpc/v3/organization.proto
Normal file
138
components/adminsrv/proto/rpc/v3/organization.proto
Normal file
@@ -0,0 +1,138 @@
|
||||
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/systempb/v3/organization.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: "Organization Service"
|
||||
version: "3.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 } }
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
service Organization {
|
||||
rpc CreateOrganization(rafay.dev.types.system.v3.Organization)
|
||||
returns (rafay.dev.types.system.v3.Organization) {
|
||||
option (google.api.http) = {
|
||||
post : "/auth/v3/partner/{metadata.partner}/organization"
|
||||
body : "*"
|
||||
};
|
||||
|
||||
option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation) = {
|
||||
responses : {
|
||||
key : "201"
|
||||
value : {
|
||||
description : "Returned when organization is created successfully."
|
||||
}
|
||||
}
|
||||
};
|
||||
};
|
||||
|
||||
rpc GetOrganizations(rafay.dev.types.system.v3.Organization)
|
||||
returns (rafay.dev.types.system.v3.OrganizationList) {
|
||||
option (google.api.http) = {
|
||||
get : "/auth/v3/partner/{metadata.partner}/organizations"
|
||||
};
|
||||
};
|
||||
|
||||
rpc GetOrganization(rafay.dev.types.system.v3.Organization)
|
||||
returns (rafay.dev.types.system.v3.Organization) {
|
||||
option (google.api.http) = {
|
||||
get : "/auth/v3/partner/{metadata.partner}/organization/"
|
||||
"{metadata.name}"
|
||||
additional_bindings {
|
||||
get : "/auth/v3/partner/{metadata.partner}/organization/"
|
||||
"{metadata.id}"
|
||||
}
|
||||
};
|
||||
};
|
||||
|
||||
rpc UpdateOrganization(rafay.dev.types.system.v3.Organization)
|
||||
returns (rafay.dev.types.system.v3.Organization) {
|
||||
option (google.api.http) = {
|
||||
put : "/auth/v3/partner/{metadata.partner}/organization/"
|
||||
"{metadata.name}"
|
||||
body : "*"
|
||||
additional_bindings {
|
||||
put : "/auth/v3/partner/{metadata.partner}/organization/"
|
||||
"{metadata.id}"
|
||||
body : "*"
|
||||
}
|
||||
};
|
||||
};
|
||||
|
||||
rpc DeleteOrganization(rafay.dev.types.system.v3.Organization)
|
||||
returns (rafay.dev.types.system.v3.Organization) {
|
||||
option (google.api.http) = {
|
||||
delete : "/auth/v3/partner/{metadata.partner}/organization/"
|
||||
"{metadata.name}"
|
||||
additional_bindings {
|
||||
delete : "/auth/v3/partner/{metadata.partner}/organization/"
|
||||
"{metadata.id}"
|
||||
}
|
||||
};
|
||||
|
||||
option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation) = {
|
||||
responses : {
|
||||
key : "204"
|
||||
value : {
|
||||
description : "Returned when organization is deleted successfully."
|
||||
}
|
||||
}
|
||||
};
|
||||
};
|
||||
|
||||
}
|
||||
248
components/adminsrv/proto/rpc/v3/organization_grpc.pb.go
Normal file
248
components/adminsrv/proto/rpc/v3/organization_grpc.pb.go
Normal file
@@ -0,0 +1,248 @@
|
||||
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
|
||||
// versions:
|
||||
// - protoc-gen-go-grpc v1.2.0
|
||||
// - protoc (unknown)
|
||||
// source: proto/rpc/v3/organization.proto
|
||||
|
||||
package rpcv3
|
||||
|
||||
import (
|
||||
context "context"
|
||||
v3 "github.com/RafaySystems/rcloud-base/components/adminsrv/proto/types/systempb/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
|
||||
|
||||
// OrganizationClient is the client API for Organization 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 OrganizationClient interface {
|
||||
CreateOrganization(ctx context.Context, in *v3.Organization, opts ...grpc.CallOption) (*v3.Organization, error)
|
||||
GetOrganizations(ctx context.Context, in *v3.Organization, opts ...grpc.CallOption) (*v3.OrganizationList, error)
|
||||
GetOrganization(ctx context.Context, in *v3.Organization, opts ...grpc.CallOption) (*v3.Organization, error)
|
||||
UpdateOrganization(ctx context.Context, in *v3.Organization, opts ...grpc.CallOption) (*v3.Organization, error)
|
||||
DeleteOrganization(ctx context.Context, in *v3.Organization, opts ...grpc.CallOption) (*v3.Organization, error)
|
||||
}
|
||||
|
||||
type organizationClient struct {
|
||||
cc grpc.ClientConnInterface
|
||||
}
|
||||
|
||||
func NewOrganizationClient(cc grpc.ClientConnInterface) OrganizationClient {
|
||||
return &organizationClient{cc}
|
||||
}
|
||||
|
||||
func (c *organizationClient) CreateOrganization(ctx context.Context, in *v3.Organization, opts ...grpc.CallOption) (*v3.Organization, error) {
|
||||
out := new(v3.Organization)
|
||||
err := c.cc.Invoke(ctx, "/rafay.dev.rpc.v3.Organization/CreateOrganization", in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *organizationClient) GetOrganizations(ctx context.Context, in *v3.Organization, opts ...grpc.CallOption) (*v3.OrganizationList, error) {
|
||||
out := new(v3.OrganizationList)
|
||||
err := c.cc.Invoke(ctx, "/rafay.dev.rpc.v3.Organization/GetOrganizations", in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *organizationClient) GetOrganization(ctx context.Context, in *v3.Organization, opts ...grpc.CallOption) (*v3.Organization, error) {
|
||||
out := new(v3.Organization)
|
||||
err := c.cc.Invoke(ctx, "/rafay.dev.rpc.v3.Organization/GetOrganization", in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *organizationClient) UpdateOrganization(ctx context.Context, in *v3.Organization, opts ...grpc.CallOption) (*v3.Organization, error) {
|
||||
out := new(v3.Organization)
|
||||
err := c.cc.Invoke(ctx, "/rafay.dev.rpc.v3.Organization/UpdateOrganization", in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *organizationClient) DeleteOrganization(ctx context.Context, in *v3.Organization, opts ...grpc.CallOption) (*v3.Organization, error) {
|
||||
out := new(v3.Organization)
|
||||
err := c.cc.Invoke(ctx, "/rafay.dev.rpc.v3.Organization/DeleteOrganization", in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
// OrganizationServer is the server API for Organization service.
|
||||
// All implementations should embed UnimplementedOrganizationServer
|
||||
// for forward compatibility
|
||||
type OrganizationServer interface {
|
||||
CreateOrganization(context.Context, *v3.Organization) (*v3.Organization, error)
|
||||
GetOrganizations(context.Context, *v3.Organization) (*v3.OrganizationList, error)
|
||||
GetOrganization(context.Context, *v3.Organization) (*v3.Organization, error)
|
||||
UpdateOrganization(context.Context, *v3.Organization) (*v3.Organization, error)
|
||||
DeleteOrganization(context.Context, *v3.Organization) (*v3.Organization, error)
|
||||
}
|
||||
|
||||
// UnimplementedOrganizationServer should be embedded to have forward compatible implementations.
|
||||
type UnimplementedOrganizationServer struct {
|
||||
}
|
||||
|
||||
func (UnimplementedOrganizationServer) CreateOrganization(context.Context, *v3.Organization) (*v3.Organization, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method CreateOrganization not implemented")
|
||||
}
|
||||
func (UnimplementedOrganizationServer) GetOrganizations(context.Context, *v3.Organization) (*v3.OrganizationList, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method GetOrganizations not implemented")
|
||||
}
|
||||
func (UnimplementedOrganizationServer) GetOrganization(context.Context, *v3.Organization) (*v3.Organization, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method GetOrganization not implemented")
|
||||
}
|
||||
func (UnimplementedOrganizationServer) UpdateOrganization(context.Context, *v3.Organization) (*v3.Organization, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method UpdateOrganization not implemented")
|
||||
}
|
||||
func (UnimplementedOrganizationServer) DeleteOrganization(context.Context, *v3.Organization) (*v3.Organization, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method DeleteOrganization not implemented")
|
||||
}
|
||||
|
||||
// UnsafeOrganizationServer may be embedded to opt out of forward compatibility for this service.
|
||||
// Use of this interface is not recommended, as added methods to OrganizationServer will
|
||||
// result in compilation errors.
|
||||
type UnsafeOrganizationServer interface {
|
||||
mustEmbedUnimplementedOrganizationServer()
|
||||
}
|
||||
|
||||
func RegisterOrganizationServer(s grpc.ServiceRegistrar, srv OrganizationServer) {
|
||||
s.RegisterService(&Organization_ServiceDesc, srv)
|
||||
}
|
||||
|
||||
func _Organization_CreateOrganization_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(v3.Organization)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(OrganizationServer).CreateOrganization(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: "/rafay.dev.rpc.v3.Organization/CreateOrganization",
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(OrganizationServer).CreateOrganization(ctx, req.(*v3.Organization))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _Organization_GetOrganizations_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(v3.Organization)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(OrganizationServer).GetOrganizations(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: "/rafay.dev.rpc.v3.Organization/GetOrganizations",
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(OrganizationServer).GetOrganizations(ctx, req.(*v3.Organization))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _Organization_GetOrganization_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(v3.Organization)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(OrganizationServer).GetOrganization(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: "/rafay.dev.rpc.v3.Organization/GetOrganization",
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(OrganizationServer).GetOrganization(ctx, req.(*v3.Organization))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _Organization_UpdateOrganization_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(v3.Organization)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(OrganizationServer).UpdateOrganization(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: "/rafay.dev.rpc.v3.Organization/UpdateOrganization",
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(OrganizationServer).UpdateOrganization(ctx, req.(*v3.Organization))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _Organization_DeleteOrganization_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(v3.Organization)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(OrganizationServer).DeleteOrganization(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: "/rafay.dev.rpc.v3.Organization/DeleteOrganization",
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(OrganizationServer).DeleteOrganization(ctx, req.(*v3.Organization))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
// Organization_ServiceDesc is the grpc.ServiceDesc for Organization service.
|
||||
// It's only intended for direct use with grpc.RegisterService,
|
||||
// and not to be introspected or modified (even as a copy)
|
||||
var Organization_ServiceDesc = grpc.ServiceDesc{
|
||||
ServiceName: "rafay.dev.rpc.v3.Organization",
|
||||
HandlerType: (*OrganizationServer)(nil),
|
||||
Methods: []grpc.MethodDesc{
|
||||
{
|
||||
MethodName: "CreateOrganization",
|
||||
Handler: _Organization_CreateOrganization_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "GetOrganizations",
|
||||
Handler: _Organization_GetOrganizations_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "GetOrganization",
|
||||
Handler: _Organization_GetOrganization_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "UpdateOrganization",
|
||||
Handler: _Organization_UpdateOrganization_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "DeleteOrganization",
|
||||
Handler: _Organization_DeleteOrganization_Handler,
|
||||
},
|
||||
},
|
||||
Streams: []grpc.StreamDesc{},
|
||||
Metadata: "proto/rpc/v3/organization.proto",
|
||||
}
|
||||
53
components/adminsrv/proto/rpc/v3/partner.go
Normal file
53
components/adminsrv/proto/rpc/v3/partner.go
Normal file
@@ -0,0 +1,53 @@
|
||||
package rpcv3
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
"github.com/RafaySystems/rcloud-base/components/adminsrv/pkg/service"
|
||||
systempbv3 "github.com/RafaySystems/rcloud-base/components/adminsrv/proto/types/systempb/v3"
|
||||
)
|
||||
|
||||
type partnerServer struct {
|
||||
service.PartnerService
|
||||
}
|
||||
|
||||
// NewPartnerServer returns new partner server implementation
|
||||
func NewPartnerServer(ps service.PartnerService) PartnerServer {
|
||||
return &partnerServer{ps}
|
||||
}
|
||||
|
||||
func (s *partnerServer) CreatePartner(ctx context.Context, p *systempbv3.Partner) (*systempbv3.Partner, error) {
|
||||
p, err := s.Create(ctx, p)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return p, nil
|
||||
}
|
||||
func (s *partnerServer) GetPartner(ctx context.Context, p *systempbv3.Partner) (*systempbv3.Partner, error) {
|
||||
|
||||
partner, err := s.GetByName(ctx, p.Metadata.Name)
|
||||
if err != nil {
|
||||
partner, err = s.GetByID(ctx, p.Metadata.Id)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
}
|
||||
|
||||
return partner, nil
|
||||
}
|
||||
|
||||
func (s *partnerServer) DeletePartner(ctx context.Context, p *systempbv3.Partner) (*systempbv3.Partner, error) {
|
||||
partner, err := s.Delete(ctx, p)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return partner, nil
|
||||
}
|
||||
|
||||
func (s *partnerServer) UpdatePartner(ctx context.Context, p *systempbv3.Partner) (*systempbv3.Partner, error) {
|
||||
partner, err := s.Update(ctx, p)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return partner, nil
|
||||
}
|
||||
168
components/adminsrv/proto/rpc/v3/partner.pb.go
Normal file
168
components/adminsrv/proto/rpc/v3/partner.pb.go
Normal file
@@ -0,0 +1,168 @@
|
||||
// Code generated by protoc-gen-go. DO NOT EDIT.
|
||||
// versions:
|
||||
// protoc-gen-go v1.27.1
|
||||
// protoc (unknown)
|
||||
// source: proto/rpc/v3/partner.proto
|
||||
|
||||
package rpcv3
|
||||
|
||||
import (
|
||||
v3 "github.com/RafaySystems/rcloud-base/components/adminsrv/proto/types/systempb/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_partner_proto protoreflect.FileDescriptor
|
||||
|
||||
var file_proto_rpc_v3_partner_proto_rawDesc = []byte{
|
||||
0x0a, 0x1a, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x72, 0x70, 0x63, 0x2f, 0x76, 0x33, 0x2f, 0x70,
|
||||
0x61, 0x72, 0x74, 0x6e, 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, 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, 0x61, 0x72, 0x74,
|
||||
0x6e, 0x65, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x32, 0xee, 0x05, 0x0a, 0x07, 0x50, 0x61,
|
||||
0x72, 0x74, 0x6e, 0x65, 0x72, 0x12, 0xb0, 0x01, 0x0a, 0x0d, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65,
|
||||
0x50, 0x61, 0x72, 0x74, 0x6e, 0x65, 0x72, 0x12, 0x22, 0x2e, 0x72, 0x61, 0x66, 0x61, 0x79, 0x2e,
|
||||
0x64, 0x65, 0x76, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x73, 0x79, 0x73, 0x74, 0x65, 0x6d,
|
||||
0x2e, 0x76, 0x33, 0x2e, 0x50, 0x61, 0x72, 0x74, 0x6e, 0x65, 0x72, 0x1a, 0x22, 0x2e, 0x72, 0x61,
|
||||
0x66, 0x61, 0x79, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x73, 0x79,
|
||||
0x73, 0x74, 0x65, 0x6d, 0x2e, 0x76, 0x33, 0x2e, 0x50, 0x61, 0x72, 0x74, 0x6e, 0x65, 0x72, 0x22,
|
||||
0x57, 0x92, 0x41, 0x39, 0x4a, 0x37, 0x0a, 0x03, 0x32, 0x30, 0x31, 0x12, 0x30, 0x0a, 0x2e, 0x52,
|
||||
0x65, 0x74, 0x75, 0x72, 0x6e, 0x65, 0x64, 0x20, 0x77, 0x68, 0x65, 0x6e, 0x20, 0x70, 0x61, 0x72,
|
||||
0x74, 0x6e, 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, 0x15, 0x22, 0x10, 0x2f, 0x61, 0x75, 0x74, 0x68, 0x2f, 0x76, 0x33, 0x2f, 0x70, 0x61,
|
||||
0x72, 0x74, 0x6e, 0x65, 0x72, 0x3a, 0x01, 0x2a, 0x12, 0xa0, 0x01, 0x0a, 0x0a, 0x47, 0x65, 0x74,
|
||||
0x50, 0x61, 0x72, 0x74, 0x6e, 0x65, 0x72, 0x12, 0x22, 0x2e, 0x72, 0x61, 0x66, 0x61, 0x79, 0x2e,
|
||||
0x64, 0x65, 0x76, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x73, 0x79, 0x73, 0x74, 0x65, 0x6d,
|
||||
0x2e, 0x76, 0x33, 0x2e, 0x50, 0x61, 0x72, 0x74, 0x6e, 0x65, 0x72, 0x1a, 0x22, 0x2e, 0x72, 0x61,
|
||||
0x66, 0x61, 0x79, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x73, 0x79,
|
||||
0x73, 0x74, 0x65, 0x6d, 0x2e, 0x76, 0x33, 0x2e, 0x50, 0x61, 0x72, 0x74, 0x6e, 0x65, 0x72, 0x22,
|
||||
0x4a, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x44, 0x12, 0x20, 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, 0x6e, 0x61, 0x6d, 0x65, 0x7d, 0x5a, 0x20, 0x12, 0x1e, 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, 0x69, 0x64, 0x7d, 0x12, 0xa9, 0x01, 0x0a, 0x0d,
|
||||
0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x61, 0x72, 0x74, 0x6e, 0x65, 0x72, 0x12, 0x22, 0x2e,
|
||||
0x72, 0x61, 0x66, 0x61, 0x79, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e,
|
||||
0x73, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x2e, 0x76, 0x33, 0x2e, 0x50, 0x61, 0x72, 0x74, 0x6e, 0x65,
|
||||
0x72, 0x1a, 0x22, 0x2e, 0x72, 0x61, 0x66, 0x61, 0x79, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x74, 0x79,
|
||||
0x70, 0x65, 0x73, 0x2e, 0x73, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x2e, 0x76, 0x33, 0x2e, 0x50, 0x61,
|
||||
0x72, 0x74, 0x6e, 0x65, 0x72, 0x22, 0x50, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x4a, 0x1a, 0x20, 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, 0x6e, 0x61, 0x6d, 0x65, 0x7d, 0x3a,
|
||||
0x01, 0x2a, 0x5a, 0x23, 0x1a, 0x1e, 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, 0x69, 0x64, 0x7d, 0x3a, 0x01, 0x2a, 0x12, 0xe0, 0x01, 0x0a, 0x0d, 0x44, 0x65, 0x6c, 0x65,
|
||||
0x74, 0x65, 0x50, 0x61, 0x72, 0x74, 0x6e, 0x65, 0x72, 0x12, 0x22, 0x2e, 0x72, 0x61, 0x66, 0x61,
|
||||
0x79, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x73, 0x79, 0x73, 0x74,
|
||||
0x65, 0x6d, 0x2e, 0x76, 0x33, 0x2e, 0x50, 0x61, 0x72, 0x74, 0x6e, 0x65, 0x72, 0x1a, 0x22, 0x2e,
|
||||
0x72, 0x61, 0x66, 0x61, 0x79, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e,
|
||||
0x73, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x2e, 0x76, 0x33, 0x2e, 0x50, 0x61, 0x72, 0x74, 0x6e, 0x65,
|
||||
0x72, 0x22, 0x86, 0x01, 0x92, 0x41, 0x39, 0x4a, 0x37, 0x0a, 0x03, 0x32, 0x30, 0x34, 0x12, 0x30,
|
||||
0x0a, 0x2e, 0x52, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x65, 0x64, 0x20, 0x77, 0x68, 0x65, 0x6e, 0x20,
|
||||
0x70, 0x61, 0x72, 0x74, 0x6e, 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, 0x44, 0x2a, 0x20, 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, 0x6e, 0x61, 0x6d, 0x65, 0x7d, 0x5a, 0x20, 0x2a, 0x1e, 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, 0x69, 0x64, 0x7d, 0x42, 0xc5, 0x04, 0x0a, 0x14, 0x63,
|
||||
0x6f, 0x6d, 0x2e, 0x72, 0x61, 0x66, 0x61, 0x79, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x72, 0x70, 0x63,
|
||||
0x2e, 0x76, 0x33, 0x42, 0x0c, 0x50, 0x61, 0x72, 0x74, 0x6e, 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, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x73, 0x72, 0x76, 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, 0xda, 0x02, 0x12, 0x23, 0x0a, 0x0f, 0x50, 0x61, 0x72, 0x74, 0x6e, 0x65, 0x72, 0x20,
|
||||
0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x22, 0x0b, 0x0a, 0x09, 0x52, 0x61, 0x66, 0x61, 0x79,
|
||||
0x20, 0x44, 0x65, 0x76, 0x32, 0x03, 0x33, 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_partner_proto_goTypes = []interface{}{
|
||||
(*v3.Partner)(nil), // 0: rafay.dev.types.system.v3.Partner
|
||||
}
|
||||
var file_proto_rpc_v3_partner_proto_depIdxs = []int32{
|
||||
0, // 0: rafay.dev.rpc.v3.Partner.CreatePartner:input_type -> rafay.dev.types.system.v3.Partner
|
||||
0, // 1: rafay.dev.rpc.v3.Partner.GetPartner:input_type -> rafay.dev.types.system.v3.Partner
|
||||
0, // 2: rafay.dev.rpc.v3.Partner.UpdatePartner:input_type -> rafay.dev.types.system.v3.Partner
|
||||
0, // 3: rafay.dev.rpc.v3.Partner.DeletePartner:input_type -> rafay.dev.types.system.v3.Partner
|
||||
0, // 4: rafay.dev.rpc.v3.Partner.CreatePartner:output_type -> rafay.dev.types.system.v3.Partner
|
||||
0, // 5: rafay.dev.rpc.v3.Partner.GetPartner:output_type -> rafay.dev.types.system.v3.Partner
|
||||
0, // 6: rafay.dev.rpc.v3.Partner.UpdatePartner:output_type -> rafay.dev.types.system.v3.Partner
|
||||
0, // 7: rafay.dev.rpc.v3.Partner.DeletePartner:output_type -> rafay.dev.types.system.v3.Partner
|
||||
4, // [4:8] is the sub-list for method output_type
|
||||
0, // [0:4] 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_partner_proto_init() }
|
||||
func file_proto_rpc_v3_partner_proto_init() {
|
||||
if File_proto_rpc_v3_partner_proto != nil {
|
||||
return
|
||||
}
|
||||
type x struct{}
|
||||
out := protoimpl.TypeBuilder{
|
||||
File: protoimpl.DescBuilder{
|
||||
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
|
||||
RawDescriptor: file_proto_rpc_v3_partner_proto_rawDesc,
|
||||
NumEnums: 0,
|
||||
NumMessages: 0,
|
||||
NumExtensions: 0,
|
||||
NumServices: 1,
|
||||
},
|
||||
GoTypes: file_proto_rpc_v3_partner_proto_goTypes,
|
||||
DependencyIndexes: file_proto_rpc_v3_partner_proto_depIdxs,
|
||||
}.Build()
|
||||
File_proto_rpc_v3_partner_proto = out.File
|
||||
file_proto_rpc_v3_partner_proto_rawDesc = nil
|
||||
file_proto_rpc_v3_partner_proto_goTypes = nil
|
||||
file_proto_rpc_v3_partner_proto_depIdxs = nil
|
||||
}
|
||||
866
components/adminsrv/proto/rpc/v3/partner.pb.gw.go
Normal file
866
components/adminsrv/proto/rpc/v3/partner.pb.gw.go
Normal file
@@ -0,0 +1,866 @@
|
||||
// Code generated by protoc-gen-grpc-gateway. DO NOT EDIT.
|
||||
// source: proto/rpc/v3/partner.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/adminsrv/proto/types/systempb/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_Partner_CreatePartner_0(ctx context.Context, marshaler runtime.Marshaler, client PartnerClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
|
||||
var protoReq systemv3.Partner
|
||||
var metadata runtime.ServerMetadata
|
||||
|
||||
newReader, berr := utilities.IOReaderFactory(req.Body)
|
||||
if berr != nil {
|
||||
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr)
|
||||
}
|
||||
if err := marshaler.NewDecoder(newReader()).Decode(&protoReq); err != nil && err != io.EOF {
|
||||
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
|
||||
}
|
||||
|
||||
msg, err := client.CreatePartner(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
|
||||
return msg, metadata, err
|
||||
|
||||
}
|
||||
|
||||
func local_request_Partner_CreatePartner_0(ctx context.Context, marshaler runtime.Marshaler, server PartnerServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
|
||||
var protoReq systemv3.Partner
|
||||
var metadata runtime.ServerMetadata
|
||||
|
||||
newReader, berr := utilities.IOReaderFactory(req.Body)
|
||||
if berr != nil {
|
||||
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr)
|
||||
}
|
||||
if err := marshaler.NewDecoder(newReader()).Decode(&protoReq); err != nil && err != io.EOF {
|
||||
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
|
||||
}
|
||||
|
||||
msg, err := server.CreatePartner(ctx, &protoReq)
|
||||
return msg, metadata, err
|
||||
|
||||
}
|
||||
|
||||
var (
|
||||
filter_Partner_GetPartner_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_Partner_GetPartner_0(ctx context.Context, marshaler runtime.Marshaler, client PartnerClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
|
||||
var protoReq systemv3.Partner
|
||||
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_Partner_GetPartner_0); err != nil {
|
||||
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
|
||||
}
|
||||
|
||||
msg, err := client.GetPartner(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
|
||||
return msg, metadata, err
|
||||
|
||||
}
|
||||
|
||||
func local_request_Partner_GetPartner_0(ctx context.Context, marshaler runtime.Marshaler, server PartnerServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
|
||||
var protoReq systemv3.Partner
|
||||
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_Partner_GetPartner_0); err != nil {
|
||||
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
|
||||
}
|
||||
|
||||
msg, err := server.GetPartner(ctx, &protoReq)
|
||||
return msg, metadata, err
|
||||
|
||||
}
|
||||
|
||||
var (
|
||||
filter_Partner_GetPartner_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_Partner_GetPartner_1(ctx context.Context, marshaler runtime.Marshaler, client PartnerClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
|
||||
var protoReq systemv3.Partner
|
||||
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_Partner_GetPartner_1); err != nil {
|
||||
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
|
||||
}
|
||||
|
||||
msg, err := client.GetPartner(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
|
||||
return msg, metadata, err
|
||||
|
||||
}
|
||||
|
||||
func local_request_Partner_GetPartner_1(ctx context.Context, marshaler runtime.Marshaler, server PartnerServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
|
||||
var protoReq systemv3.Partner
|
||||
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_Partner_GetPartner_1); err != nil {
|
||||
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
|
||||
}
|
||||
|
||||
msg, err := server.GetPartner(ctx, &protoReq)
|
||||
return msg, metadata, err
|
||||
|
||||
}
|
||||
|
||||
func request_Partner_UpdatePartner_0(ctx context.Context, marshaler runtime.Marshaler, client PartnerClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
|
||||
var protoReq systemv3.Partner
|
||||
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.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.UpdatePartner(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
|
||||
return msg, metadata, err
|
||||
|
||||
}
|
||||
|
||||
func local_request_Partner_UpdatePartner_0(ctx context.Context, marshaler runtime.Marshaler, server PartnerServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
|
||||
var protoReq systemv3.Partner
|
||||
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.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.UpdatePartner(ctx, &protoReq)
|
||||
return msg, metadata, err
|
||||
|
||||
}
|
||||
|
||||
func request_Partner_UpdatePartner_1(ctx context.Context, marshaler runtime.Marshaler, client PartnerClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
|
||||
var protoReq systemv3.Partner
|
||||
var metadata runtime.ServerMetadata
|
||||
|
||||
newReader, berr := utilities.IOReaderFactory(req.Body)
|
||||
if berr != nil {
|
||||
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr)
|
||||
}
|
||||
if err := marshaler.NewDecoder(newReader()).Decode(&protoReq); err != nil && err != io.EOF {
|
||||
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
|
||||
}
|
||||
|
||||
var (
|
||||
val string
|
||||
ok bool
|
||||
err error
|
||||
_ = err
|
||||
)
|
||||
|
||||
val, ok = pathParams["metadata.id"]
|
||||
if !ok {
|
||||
return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "metadata.id")
|
||||
}
|
||||
|
||||
err = runtime.PopulateFieldFromPath(&protoReq, "metadata.id", val)
|
||||
if err != nil {
|
||||
return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "metadata.id", err)
|
||||
}
|
||||
|
||||
msg, err := client.UpdatePartner(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
|
||||
return msg, metadata, err
|
||||
|
||||
}
|
||||
|
||||
func local_request_Partner_UpdatePartner_1(ctx context.Context, marshaler runtime.Marshaler, server PartnerServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
|
||||
var protoReq systemv3.Partner
|
||||
var metadata runtime.ServerMetadata
|
||||
|
||||
newReader, berr := utilities.IOReaderFactory(req.Body)
|
||||
if berr != nil {
|
||||
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr)
|
||||
}
|
||||
if err := marshaler.NewDecoder(newReader()).Decode(&protoReq); err != nil && err != io.EOF {
|
||||
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
|
||||
}
|
||||
|
||||
var (
|
||||
val string
|
||||
ok bool
|
||||
err error
|
||||
_ = err
|
||||
)
|
||||
|
||||
val, ok = pathParams["metadata.id"]
|
||||
if !ok {
|
||||
return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "metadata.id")
|
||||
}
|
||||
|
||||
err = runtime.PopulateFieldFromPath(&protoReq, "metadata.id", val)
|
||||
if err != nil {
|
||||
return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "metadata.id", err)
|
||||
}
|
||||
|
||||
msg, err := server.UpdatePartner(ctx, &protoReq)
|
||||
return msg, metadata, err
|
||||
|
||||
}
|
||||
|
||||
var (
|
||||
filter_Partner_DeletePartner_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_Partner_DeletePartner_0(ctx context.Context, marshaler runtime.Marshaler, client PartnerClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
|
||||
var protoReq systemv3.Partner
|
||||
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_Partner_DeletePartner_0); err != nil {
|
||||
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
|
||||
}
|
||||
|
||||
msg, err := client.DeletePartner(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
|
||||
return msg, metadata, err
|
||||
|
||||
}
|
||||
|
||||
func local_request_Partner_DeletePartner_0(ctx context.Context, marshaler runtime.Marshaler, server PartnerServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
|
||||
var protoReq systemv3.Partner
|
||||
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_Partner_DeletePartner_0); err != nil {
|
||||
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
|
||||
}
|
||||
|
||||
msg, err := server.DeletePartner(ctx, &protoReq)
|
||||
return msg, metadata, err
|
||||
|
||||
}
|
||||
|
||||
var (
|
||||
filter_Partner_DeletePartner_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_Partner_DeletePartner_1(ctx context.Context, marshaler runtime.Marshaler, client PartnerClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
|
||||
var protoReq systemv3.Partner
|
||||
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_Partner_DeletePartner_1); err != nil {
|
||||
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
|
||||
}
|
||||
|
||||
msg, err := client.DeletePartner(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
|
||||
return msg, metadata, err
|
||||
|
||||
}
|
||||
|
||||
func local_request_Partner_DeletePartner_1(ctx context.Context, marshaler runtime.Marshaler, server PartnerServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
|
||||
var protoReq systemv3.Partner
|
||||
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_Partner_DeletePartner_1); err != nil {
|
||||
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
|
||||
}
|
||||
|
||||
msg, err := server.DeletePartner(ctx, &protoReq)
|
||||
return msg, metadata, err
|
||||
|
||||
}
|
||||
|
||||
// RegisterPartnerHandlerServer registers the http handlers for service Partner to "mux".
|
||||
// UnaryRPC :call PartnerServer 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 RegisterPartnerHandlerFromEndpoint instead.
|
||||
func RegisterPartnerHandlerServer(ctx context.Context, mux *runtime.ServeMux, server PartnerServer) error {
|
||||
|
||||
mux.Handle("POST", pattern_Partner_CreatePartner_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.Partner/CreatePartner", runtime.WithHTTPPathPattern("/auth/v3/partner"))
|
||||
if err != nil {
|
||||
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||
return
|
||||
}
|
||||
resp, md, err := local_request_Partner_CreatePartner_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_Partner_CreatePartner_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
|
||||
|
||||
})
|
||||
|
||||
mux.Handle("GET", pattern_Partner_GetPartner_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.Partner/GetPartner", runtime.WithHTTPPathPattern("/auth/v3/partner/{metadata.name}"))
|
||||
if err != nil {
|
||||
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||
return
|
||||
}
|
||||
resp, md, err := local_request_Partner_GetPartner_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_Partner_GetPartner_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
|
||||
|
||||
})
|
||||
|
||||
mux.Handle("GET", pattern_Partner_GetPartner_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.Partner/GetPartner", runtime.WithHTTPPathPattern("/auth/v3/partner/{metadata.id}"))
|
||||
if err != nil {
|
||||
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||
return
|
||||
}
|
||||
resp, md, err := local_request_Partner_GetPartner_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_Partner_GetPartner_1(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
|
||||
|
||||
})
|
||||
|
||||
mux.Handle("PUT", pattern_Partner_UpdatePartner_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.Partner/UpdatePartner", runtime.WithHTTPPathPattern("/auth/v3/partner/{metadata.name}"))
|
||||
if err != nil {
|
||||
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||
return
|
||||
}
|
||||
resp, md, err := local_request_Partner_UpdatePartner_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_Partner_UpdatePartner_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
|
||||
|
||||
})
|
||||
|
||||
mux.Handle("PUT", pattern_Partner_UpdatePartner_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.Partner/UpdatePartner", runtime.WithHTTPPathPattern("/auth/v3/partner/{metadata.id}"))
|
||||
if err != nil {
|
||||
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||
return
|
||||
}
|
||||
resp, md, err := local_request_Partner_UpdatePartner_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_Partner_UpdatePartner_1(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
|
||||
|
||||
})
|
||||
|
||||
mux.Handle("DELETE", pattern_Partner_DeletePartner_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.Partner/DeletePartner", runtime.WithHTTPPathPattern("/auth/v3/partner/{metadata.name}"))
|
||||
if err != nil {
|
||||
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||
return
|
||||
}
|
||||
resp, md, err := local_request_Partner_DeletePartner_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_Partner_DeletePartner_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
|
||||
|
||||
})
|
||||
|
||||
mux.Handle("DELETE", pattern_Partner_DeletePartner_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.Partner/DeletePartner", runtime.WithHTTPPathPattern("/auth/v3/partner/{metadata.id}"))
|
||||
if err != nil {
|
||||
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||
return
|
||||
}
|
||||
resp, md, err := local_request_Partner_DeletePartner_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_Partner_DeletePartner_1(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
|
||||
|
||||
})
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
// RegisterPartnerHandlerFromEndpoint is same as RegisterPartnerHandler but
|
||||
// automatically dials to "endpoint" and closes the connection when "ctx" gets done.
|
||||
func RegisterPartnerHandlerFromEndpoint(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 RegisterPartnerHandler(ctx, mux, conn)
|
||||
}
|
||||
|
||||
// RegisterPartnerHandler registers the http handlers for service Partner to "mux".
|
||||
// The handlers forward requests to the grpc endpoint over "conn".
|
||||
func RegisterPartnerHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error {
|
||||
return RegisterPartnerHandlerClient(ctx, mux, NewPartnerClient(conn))
|
||||
}
|
||||
|
||||
// RegisterPartnerHandlerClient registers the http handlers for service Partner
|
||||
// to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "PartnerClient".
|
||||
// Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "PartnerClient"
|
||||
// doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in
|
||||
// "PartnerClient" to call the correct interceptors.
|
||||
func RegisterPartnerHandlerClient(ctx context.Context, mux *runtime.ServeMux, client PartnerClient) error {
|
||||
|
||||
mux.Handle("POST", pattern_Partner_CreatePartner_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.Partner/CreatePartner", runtime.WithHTTPPathPattern("/auth/v3/partner"))
|
||||
if err != nil {
|
||||
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||
return
|
||||
}
|
||||
resp, md, err := request_Partner_CreatePartner_0(rctx, inboundMarshaler, client, req, pathParams)
|
||||
ctx = runtime.NewServerMetadataContext(ctx, md)
|
||||
if err != nil {
|
||||
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||
return
|
||||
}
|
||||
|
||||
forward_Partner_CreatePartner_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
|
||||
|
||||
})
|
||||
|
||||
mux.Handle("GET", pattern_Partner_GetPartner_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.Partner/GetPartner", runtime.WithHTTPPathPattern("/auth/v3/partner/{metadata.name}"))
|
||||
if err != nil {
|
||||
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||
return
|
||||
}
|
||||
resp, md, err := request_Partner_GetPartner_0(rctx, inboundMarshaler, client, req, pathParams)
|
||||
ctx = runtime.NewServerMetadataContext(ctx, md)
|
||||
if err != nil {
|
||||
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||
return
|
||||
}
|
||||
|
||||
forward_Partner_GetPartner_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
|
||||
|
||||
})
|
||||
|
||||
mux.Handle("GET", pattern_Partner_GetPartner_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.Partner/GetPartner", runtime.WithHTTPPathPattern("/auth/v3/partner/{metadata.id}"))
|
||||
if err != nil {
|
||||
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||
return
|
||||
}
|
||||
resp, md, err := request_Partner_GetPartner_1(rctx, inboundMarshaler, client, req, pathParams)
|
||||
ctx = runtime.NewServerMetadataContext(ctx, md)
|
||||
if err != nil {
|
||||
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||
return
|
||||
}
|
||||
|
||||
forward_Partner_GetPartner_1(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
|
||||
|
||||
})
|
||||
|
||||
mux.Handle("PUT", pattern_Partner_UpdatePartner_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.Partner/UpdatePartner", runtime.WithHTTPPathPattern("/auth/v3/partner/{metadata.name}"))
|
||||
if err != nil {
|
||||
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||
return
|
||||
}
|
||||
resp, md, err := request_Partner_UpdatePartner_0(rctx, inboundMarshaler, client, req, pathParams)
|
||||
ctx = runtime.NewServerMetadataContext(ctx, md)
|
||||
if err != nil {
|
||||
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||
return
|
||||
}
|
||||
|
||||
forward_Partner_UpdatePartner_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
|
||||
|
||||
})
|
||||
|
||||
mux.Handle("PUT", pattern_Partner_UpdatePartner_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.Partner/UpdatePartner", runtime.WithHTTPPathPattern("/auth/v3/partner/{metadata.id}"))
|
||||
if err != nil {
|
||||
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||
return
|
||||
}
|
||||
resp, md, err := request_Partner_UpdatePartner_1(rctx, inboundMarshaler, client, req, pathParams)
|
||||
ctx = runtime.NewServerMetadataContext(ctx, md)
|
||||
if err != nil {
|
||||
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||
return
|
||||
}
|
||||
|
||||
forward_Partner_UpdatePartner_1(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
|
||||
|
||||
})
|
||||
|
||||
mux.Handle("DELETE", pattern_Partner_DeletePartner_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.Partner/DeletePartner", runtime.WithHTTPPathPattern("/auth/v3/partner/{metadata.name}"))
|
||||
if err != nil {
|
||||
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||
return
|
||||
}
|
||||
resp, md, err := request_Partner_DeletePartner_0(rctx, inboundMarshaler, client, req, pathParams)
|
||||
ctx = runtime.NewServerMetadataContext(ctx, md)
|
||||
if err != nil {
|
||||
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||
return
|
||||
}
|
||||
|
||||
forward_Partner_DeletePartner_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
|
||||
|
||||
})
|
||||
|
||||
mux.Handle("DELETE", pattern_Partner_DeletePartner_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.Partner/DeletePartner", runtime.WithHTTPPathPattern("/auth/v3/partner/{metadata.id}"))
|
||||
if err != nil {
|
||||
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||
return
|
||||
}
|
||||
resp, md, err := request_Partner_DeletePartner_1(rctx, inboundMarshaler, client, req, pathParams)
|
||||
ctx = runtime.NewServerMetadataContext(ctx, md)
|
||||
if err != nil {
|
||||
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||
return
|
||||
}
|
||||
|
||||
forward_Partner_DeletePartner_1(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
|
||||
|
||||
})
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
var (
|
||||
pattern_Partner_CreatePartner_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"auth", "v3", "partner"}, ""))
|
||||
|
||||
pattern_Partner_GetPartner_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3}, []string{"auth", "v3", "partner", "metadata.name"}, ""))
|
||||
|
||||
pattern_Partner_GetPartner_1 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3}, []string{"auth", "v3", "partner", "metadata.id"}, ""))
|
||||
|
||||
pattern_Partner_UpdatePartner_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3}, []string{"auth", "v3", "partner", "metadata.name"}, ""))
|
||||
|
||||
pattern_Partner_UpdatePartner_1 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3}, []string{"auth", "v3", "partner", "metadata.id"}, ""))
|
||||
|
||||
pattern_Partner_DeletePartner_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3}, []string{"auth", "v3", "partner", "metadata.name"}, ""))
|
||||
|
||||
pattern_Partner_DeletePartner_1 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3}, []string{"auth", "v3", "partner", "metadata.id"}, ""))
|
||||
)
|
||||
|
||||
var (
|
||||
forward_Partner_CreatePartner_0 = runtime.ForwardResponseMessage
|
||||
|
||||
forward_Partner_GetPartner_0 = runtime.ForwardResponseMessage
|
||||
|
||||
forward_Partner_GetPartner_1 = runtime.ForwardResponseMessage
|
||||
|
||||
forward_Partner_UpdatePartner_0 = runtime.ForwardResponseMessage
|
||||
|
||||
forward_Partner_UpdatePartner_1 = runtime.ForwardResponseMessage
|
||||
|
||||
forward_Partner_DeletePartner_0 = runtime.ForwardResponseMessage
|
||||
|
||||
forward_Partner_DeletePartner_1 = runtime.ForwardResponseMessage
|
||||
)
|
||||
125
components/adminsrv/proto/rpc/v3/partner.proto
Normal file
125
components/adminsrv/proto/rpc/v3/partner.proto
Normal file
@@ -0,0 +1,125 @@
|
||||
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/systempb/v3/partner.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: "Partner Service"
|
||||
version: "3.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 } }
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
service Partner {
|
||||
rpc CreatePartner(rafay.dev.types.system.v3.Partner)
|
||||
returns (rafay.dev.types.system.v3.Partner) {
|
||||
option (google.api.http) = {
|
||||
post : "/auth/v3/partner"
|
||||
body : "*"
|
||||
};
|
||||
|
||||
option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation) = {
|
||||
responses : {
|
||||
key : "201"
|
||||
value : {
|
||||
description : "Returned when partner is created successfully."
|
||||
}
|
||||
}
|
||||
};
|
||||
};
|
||||
|
||||
rpc GetPartner(rafay.dev.types.system.v3.Partner)
|
||||
returns (rafay.dev.types.system.v3.Partner) {
|
||||
option (google.api.http) = {
|
||||
get : "/auth/v3/partner/{metadata.name}"
|
||||
additional_bindings {
|
||||
get : "/auth/v3/partner/{metadata.id}"
|
||||
}
|
||||
};
|
||||
};
|
||||
|
||||
rpc UpdatePartner(rafay.dev.types.system.v3.Partner)
|
||||
returns (rafay.dev.types.system.v3.Partner) {
|
||||
option (google.api.http) = {
|
||||
put : "/auth/v3/partner/{metadata.name}"
|
||||
body : "*"
|
||||
additional_bindings {
|
||||
put : "/auth/v3/partner/{metadata.id}"
|
||||
body : "*"
|
||||
}
|
||||
};
|
||||
};
|
||||
|
||||
rpc DeletePartner(rafay.dev.types.system.v3.Partner)
|
||||
returns (rafay.dev.types.system.v3.Partner) {
|
||||
option (google.api.http) = {
|
||||
delete : "/auth/v3/partner/{metadata.name}"
|
||||
additional_bindings {
|
||||
delete : "/auth/v3/partner/{metadata.id}"
|
||||
}
|
||||
};
|
||||
|
||||
option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation) = {
|
||||
responses : {
|
||||
key : "204"
|
||||
value : {
|
||||
description : "Returned when partner is deleted successfully."
|
||||
}
|
||||
}
|
||||
};
|
||||
};
|
||||
|
||||
}
|
||||
212
components/adminsrv/proto/rpc/v3/partner_grpc.pb.go
Normal file
212
components/adminsrv/proto/rpc/v3/partner_grpc.pb.go
Normal file
@@ -0,0 +1,212 @@
|
||||
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
|
||||
// versions:
|
||||
// - protoc-gen-go-grpc v1.2.0
|
||||
// - protoc (unknown)
|
||||
// source: proto/rpc/v3/partner.proto
|
||||
|
||||
package rpcv3
|
||||
|
||||
import (
|
||||
context "context"
|
||||
v3 "github.com/RafaySystems/rcloud-base/components/adminsrv/proto/types/systempb/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
|
||||
|
||||
// PartnerClient is the client API for Partner 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 PartnerClient interface {
|
||||
CreatePartner(ctx context.Context, in *v3.Partner, opts ...grpc.CallOption) (*v3.Partner, error)
|
||||
GetPartner(ctx context.Context, in *v3.Partner, opts ...grpc.CallOption) (*v3.Partner, error)
|
||||
UpdatePartner(ctx context.Context, in *v3.Partner, opts ...grpc.CallOption) (*v3.Partner, error)
|
||||
DeletePartner(ctx context.Context, in *v3.Partner, opts ...grpc.CallOption) (*v3.Partner, error)
|
||||
}
|
||||
|
||||
type partnerClient struct {
|
||||
cc grpc.ClientConnInterface
|
||||
}
|
||||
|
||||
func NewPartnerClient(cc grpc.ClientConnInterface) PartnerClient {
|
||||
return &partnerClient{cc}
|
||||
}
|
||||
|
||||
func (c *partnerClient) CreatePartner(ctx context.Context, in *v3.Partner, opts ...grpc.CallOption) (*v3.Partner, error) {
|
||||
out := new(v3.Partner)
|
||||
err := c.cc.Invoke(ctx, "/rafay.dev.rpc.v3.Partner/CreatePartner", in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *partnerClient) GetPartner(ctx context.Context, in *v3.Partner, opts ...grpc.CallOption) (*v3.Partner, error) {
|
||||
out := new(v3.Partner)
|
||||
err := c.cc.Invoke(ctx, "/rafay.dev.rpc.v3.Partner/GetPartner", in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *partnerClient) UpdatePartner(ctx context.Context, in *v3.Partner, opts ...grpc.CallOption) (*v3.Partner, error) {
|
||||
out := new(v3.Partner)
|
||||
err := c.cc.Invoke(ctx, "/rafay.dev.rpc.v3.Partner/UpdatePartner", in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *partnerClient) DeletePartner(ctx context.Context, in *v3.Partner, opts ...grpc.CallOption) (*v3.Partner, error) {
|
||||
out := new(v3.Partner)
|
||||
err := c.cc.Invoke(ctx, "/rafay.dev.rpc.v3.Partner/DeletePartner", in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
// PartnerServer is the server API for Partner service.
|
||||
// All implementations should embed UnimplementedPartnerServer
|
||||
// for forward compatibility
|
||||
type PartnerServer interface {
|
||||
CreatePartner(context.Context, *v3.Partner) (*v3.Partner, error)
|
||||
GetPartner(context.Context, *v3.Partner) (*v3.Partner, error)
|
||||
UpdatePartner(context.Context, *v3.Partner) (*v3.Partner, error)
|
||||
DeletePartner(context.Context, *v3.Partner) (*v3.Partner, error)
|
||||
}
|
||||
|
||||
// UnimplementedPartnerServer should be embedded to have forward compatible implementations.
|
||||
type UnimplementedPartnerServer struct {
|
||||
}
|
||||
|
||||
func (UnimplementedPartnerServer) CreatePartner(context.Context, *v3.Partner) (*v3.Partner, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method CreatePartner not implemented")
|
||||
}
|
||||
func (UnimplementedPartnerServer) GetPartner(context.Context, *v3.Partner) (*v3.Partner, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method GetPartner not implemented")
|
||||
}
|
||||
func (UnimplementedPartnerServer) UpdatePartner(context.Context, *v3.Partner) (*v3.Partner, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method UpdatePartner not implemented")
|
||||
}
|
||||
func (UnimplementedPartnerServer) DeletePartner(context.Context, *v3.Partner) (*v3.Partner, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method DeletePartner not implemented")
|
||||
}
|
||||
|
||||
// UnsafePartnerServer may be embedded to opt out of forward compatibility for this service.
|
||||
// Use of this interface is not recommended, as added methods to PartnerServer will
|
||||
// result in compilation errors.
|
||||
type UnsafePartnerServer interface {
|
||||
mustEmbedUnimplementedPartnerServer()
|
||||
}
|
||||
|
||||
func RegisterPartnerServer(s grpc.ServiceRegistrar, srv PartnerServer) {
|
||||
s.RegisterService(&Partner_ServiceDesc, srv)
|
||||
}
|
||||
|
||||
func _Partner_CreatePartner_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(v3.Partner)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(PartnerServer).CreatePartner(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: "/rafay.dev.rpc.v3.Partner/CreatePartner",
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(PartnerServer).CreatePartner(ctx, req.(*v3.Partner))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _Partner_GetPartner_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(v3.Partner)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(PartnerServer).GetPartner(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: "/rafay.dev.rpc.v3.Partner/GetPartner",
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(PartnerServer).GetPartner(ctx, req.(*v3.Partner))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _Partner_UpdatePartner_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(v3.Partner)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(PartnerServer).UpdatePartner(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: "/rafay.dev.rpc.v3.Partner/UpdatePartner",
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(PartnerServer).UpdatePartner(ctx, req.(*v3.Partner))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _Partner_DeletePartner_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(v3.Partner)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(PartnerServer).DeletePartner(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: "/rafay.dev.rpc.v3.Partner/DeletePartner",
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(PartnerServer).DeletePartner(ctx, req.(*v3.Partner))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
// Partner_ServiceDesc is the grpc.ServiceDesc for Partner service.
|
||||
// It's only intended for direct use with grpc.RegisterService,
|
||||
// and not to be introspected or modified (even as a copy)
|
||||
var Partner_ServiceDesc = grpc.ServiceDesc{
|
||||
ServiceName: "rafay.dev.rpc.v3.Partner",
|
||||
HandlerType: (*PartnerServer)(nil),
|
||||
Methods: []grpc.MethodDesc{
|
||||
{
|
||||
MethodName: "CreatePartner",
|
||||
Handler: _Partner_CreatePartner_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "GetPartner",
|
||||
Handler: _Partner_GetPartner_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "UpdatePartner",
|
||||
Handler: _Partner_UpdatePartner_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "DeletePartner",
|
||||
Handler: _Partner_DeletePartner_Handler,
|
||||
},
|
||||
},
|
||||
Streams: []grpc.StreamDesc{},
|
||||
Metadata: "proto/rpc/v3/partner.proto",
|
||||
}
|
||||
62
components/adminsrv/proto/rpc/v3/project.go
Normal file
62
components/adminsrv/proto/rpc/v3/project.go
Normal file
@@ -0,0 +1,62 @@
|
||||
package rpcv3
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
"github.com/RafaySystems/rcloud-base/components/adminsrv/pkg/service"
|
||||
systempbv3 "github.com/RafaySystems/rcloud-base/components/adminsrv/proto/types/systempb/v3"
|
||||
)
|
||||
|
||||
type projectServer struct {
|
||||
service.ProjectService
|
||||
}
|
||||
|
||||
// NewProjectServer returns new project server implementation
|
||||
func NewProjectServer(ps service.ProjectService) ProjectServer {
|
||||
return &projectServer{ps}
|
||||
}
|
||||
|
||||
func (s *projectServer) CreateProject(ctx context.Context, p *systempbv3.Project) (*systempbv3.Project, error) {
|
||||
project, err := s.Create(ctx, p)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return project, nil
|
||||
}
|
||||
|
||||
func (s *projectServer) GetProjects(ctx context.Context, p *systempbv3.Project) (*systempbv3.ProjectList, error) {
|
||||
projects, err := s.List(ctx, p)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return projects, nil
|
||||
}
|
||||
|
||||
func (s *projectServer) GetProject(ctx context.Context, p *systempbv3.Project) (*systempbv3.Project, error) {
|
||||
|
||||
project, err := s.GetByName(ctx, p.Metadata.Name)
|
||||
if err != nil {
|
||||
project, err = s.GetByID(ctx, p.Metadata.Id)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
}
|
||||
|
||||
return project, nil
|
||||
}
|
||||
|
||||
func (s *projectServer) DeleteProject(ctx context.Context, p *systempbv3.Project) (*systempbv3.Project, error) {
|
||||
project, err := s.Delete(ctx, p)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return project, nil
|
||||
}
|
||||
|
||||
func (s *projectServer) UpdateProject(ctx context.Context, p *systempbv3.Project) (*systempbv3.Project, error) {
|
||||
project, err := s.Update(ctx, p)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return project, nil
|
||||
}
|
||||
211
components/adminsrv/proto/rpc/v3/project.pb.go
Normal file
211
components/adminsrv/proto/rpc/v3/project.pb.go
Normal file
@@ -0,0 +1,211 @@
|
||||
// Code generated by protoc-gen-go. DO NOT EDIT.
|
||||
// versions:
|
||||
// protoc-gen-go v1.27.1
|
||||
// protoc (unknown)
|
||||
// source: proto/rpc/v3/project.proto
|
||||
|
||||
package rpcv3
|
||||
|
||||
import (
|
||||
v3 "github.com/RafaySystems/rcloud-base/components/adminsrv/proto/types/systempb/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_project_proto protoreflect.FileDescriptor
|
||||
|
||||
var file_proto_rpc_v3_project_proto_rawDesc = []byte{
|
||||
0x0a, 0x1a, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x72, 0x70, 0x63, 0x2f, 0x76, 0x33, 0x2f, 0x70,
|
||||
0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 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, 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, 0x32, 0xeb, 0x0a, 0x0a, 0x07, 0x50, 0x72,
|
||||
0x6f, 0x6a, 0x65, 0x63, 0x74, 0x12, 0xf1, 0x01, 0x0a, 0x0d, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65,
|
||||
0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x12, 0x22, 0x2e, 0x72, 0x61, 0x66, 0x61, 0x79, 0x2e,
|
||||
0x64, 0x65, 0x76, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x73, 0x79, 0x73, 0x74, 0x65, 0x6d,
|
||||
0x2e, 0x76, 0x33, 0x2e, 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x1a, 0x22, 0x2e, 0x72, 0x61,
|
||||
0x66, 0x61, 0x79, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x73, 0x79,
|
||||
0x73, 0x74, 0x65, 0x6d, 0x2e, 0x76, 0x33, 0x2e, 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x22,
|
||||
0x97, 0x01, 0x92, 0x41, 0x39, 0x4a, 0x37, 0x0a, 0x03, 0x32, 0x30, 0x31, 0x12, 0x30, 0x0a, 0x2e,
|
||||
0x52, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x65, 0x64, 0x20, 0x77, 0x68, 0x65, 0x6e, 0x20, 0x70, 0x72,
|
||||
0x6f, 0x6a, 0x65, 0x63, 0x74, 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, 0x55, 0x22, 0x50, 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, 0x70,
|
||||
0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x3a, 0x01, 0x2a, 0x12, 0xb4, 0x01, 0x0a, 0x0b, 0x47, 0x65,
|
||||
0x74, 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x12, 0x22, 0x2e, 0x72, 0x61, 0x66, 0x61,
|
||||
0x79, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x73, 0x79, 0x73, 0x74,
|
||||
0x65, 0x6d, 0x2e, 0x76, 0x33, 0x2e, 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x1a, 0x26, 0x2e,
|
||||
0x72, 0x61, 0x66, 0x61, 0x79, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e,
|
||||
0x73, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x2e, 0x76, 0x33, 0x2e, 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63,
|
||||
0x74, 0x4c, 0x69, 0x73, 0x74, 0x22, 0x59, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x53, 0x12, 0x51, 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, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x73,
|
||||
0x12, 0xa2, 0x02, 0x0a, 0x0a, 0x47, 0x65, 0x74, 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x12,
|
||||
0x22, 0x2e, 0x72, 0x61, 0x66, 0x61, 0x79, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x74, 0x79, 0x70, 0x65,
|
||||
0x73, 0x2e, 0x73, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x2e, 0x76, 0x33, 0x2e, 0x50, 0x72, 0x6f, 0x6a,
|
||||
0x65, 0x63, 0x74, 0x1a, 0x22, 0x2e, 0x72, 0x61, 0x66, 0x61, 0x79, 0x2e, 0x64, 0x65, 0x76, 0x2e,
|
||||
0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x73, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x2e, 0x76, 0x33, 0x2e,
|
||||
0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x22, 0xcb, 0x01, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0xc4,
|
||||
0x01, 0x12, 0x60, 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, 0x70, 0x72, 0x6f, 0x6a,
|
||||
0x65, 0x63, 0x74, 0x2f, 0x7b, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x6e, 0x61,
|
||||
0x6d, 0x65, 0x7d, 0x5a, 0x60, 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,
|
||||
0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x2f, 0x7b, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74,
|
||||
0x61, 0x2e, 0x69, 0x64, 0x7d, 0x12, 0xab, 0x02, 0x0a, 0x0d, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65,
|
||||
0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x12, 0x22, 0x2e, 0x72, 0x61, 0x66, 0x61, 0x79, 0x2e,
|
||||
0x64, 0x65, 0x76, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x73, 0x79, 0x73, 0x74, 0x65, 0x6d,
|
||||
0x2e, 0x76, 0x33, 0x2e, 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x1a, 0x22, 0x2e, 0x72, 0x61,
|
||||
0x66, 0x61, 0x79, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x73, 0x79,
|
||||
0x73, 0x74, 0x65, 0x6d, 0x2e, 0x76, 0x33, 0x2e, 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x22,
|
||||
0xd1, 0x01, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0xca, 0x01, 0x1a, 0x60, 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, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x2f, 0x7b, 0x6d, 0x65, 0x74,
|
||||
0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x6e, 0x61, 0x6d, 0x65, 0x7d, 0x3a, 0x01, 0x2a, 0x5a, 0x63,
|
||||
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, 0x70, 0x72, 0x6f, 0x6a, 0x65,
|
||||
0x63, 0x74, 0x2f, 0x7b, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x69, 0x64, 0x7d,
|
||||
0x3a, 0x01, 0x2a, 0x12, 0xe1, 0x02, 0x0a, 0x0d, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x50, 0x72,
|
||||
0x6f, 0x6a, 0x65, 0x63, 0x74, 0x12, 0x22, 0x2e, 0x72, 0x61, 0x66, 0x61, 0x79, 0x2e, 0x64, 0x65,
|
||||
0x76, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x73, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x2e, 0x76,
|
||||
0x33, 0x2e, 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x1a, 0x22, 0x2e, 0x72, 0x61, 0x66, 0x61,
|
||||
0x79, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x73, 0x79, 0x73, 0x74,
|
||||
0x65, 0x6d, 0x2e, 0x76, 0x33, 0x2e, 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x22, 0x87, 0x02,
|
||||
0x92, 0x41, 0x39, 0x4a, 0x37, 0x0a, 0x03, 0x32, 0x30, 0x34, 0x12, 0x30, 0x0a, 0x2e, 0x52, 0x65,
|
||||
0x74, 0x75, 0x72, 0x6e, 0x65, 0x64, 0x20, 0x77, 0x68, 0x65, 0x6e, 0x20, 0x70, 0x72, 0x6f, 0x6a,
|
||||
0x65, 0x63, 0x74, 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, 0xc4, 0x01, 0x2a, 0x60, 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, 0x70, 0x72,
|
||||
0x6f, 0x6a, 0x65, 0x63, 0x74, 0x2f, 0x7b, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e,
|
||||
0x6e, 0x61, 0x6d, 0x65, 0x7d, 0x5a, 0x60, 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, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x2f, 0x7b, 0x6d, 0x65, 0x74, 0x61, 0x64,
|
||||
0x61, 0x74, 0x61, 0x2e, 0x69, 0x64, 0x7d, 0x42, 0xc5, 0x04, 0x0a, 0x14, 0x63, 0x6f, 0x6d, 0x2e,
|
||||
0x72, 0x61, 0x66, 0x61, 0x79, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x72, 0x70, 0x63, 0x2e, 0x76, 0x33,
|
||||
0x42, 0x0c, 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 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, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x73, 0x72, 0x76, 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, 0xda,
|
||||
0x02, 0x12, 0x23, 0x0a, 0x0f, 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x20, 0x53, 0x65, 0x72,
|
||||
0x76, 0x69, 0x63, 0x65, 0x22, 0x0b, 0x0a, 0x09, 0x52, 0x61, 0x66, 0x61, 0x79, 0x20, 0x44, 0x65,
|
||||
0x76, 0x32, 0x03, 0x33, 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_project_proto_goTypes = []interface{}{
|
||||
(*v3.Project)(nil), // 0: rafay.dev.types.system.v3.Project
|
||||
(*v3.ProjectList)(nil), // 1: rafay.dev.types.system.v3.ProjectList
|
||||
}
|
||||
var file_proto_rpc_v3_project_proto_depIdxs = []int32{
|
||||
0, // 0: rafay.dev.rpc.v3.Project.CreateProject:input_type -> rafay.dev.types.system.v3.Project
|
||||
0, // 1: rafay.dev.rpc.v3.Project.GetProjects:input_type -> rafay.dev.types.system.v3.Project
|
||||
0, // 2: rafay.dev.rpc.v3.Project.GetProject:input_type -> rafay.dev.types.system.v3.Project
|
||||
0, // 3: rafay.dev.rpc.v3.Project.UpdateProject:input_type -> rafay.dev.types.system.v3.Project
|
||||
0, // 4: rafay.dev.rpc.v3.Project.DeleteProject:input_type -> rafay.dev.types.system.v3.Project
|
||||
0, // 5: rafay.dev.rpc.v3.Project.CreateProject:output_type -> rafay.dev.types.system.v3.Project
|
||||
1, // 6: rafay.dev.rpc.v3.Project.GetProjects:output_type -> rafay.dev.types.system.v3.ProjectList
|
||||
0, // 7: rafay.dev.rpc.v3.Project.GetProject:output_type -> rafay.dev.types.system.v3.Project
|
||||
0, // 8: rafay.dev.rpc.v3.Project.UpdateProject:output_type -> rafay.dev.types.system.v3.Project
|
||||
0, // 9: rafay.dev.rpc.v3.Project.DeleteProject:output_type -> rafay.dev.types.system.v3.Project
|
||||
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_project_proto_init() }
|
||||
func file_proto_rpc_v3_project_proto_init() {
|
||||
if File_proto_rpc_v3_project_proto != nil {
|
||||
return
|
||||
}
|
||||
type x struct{}
|
||||
out := protoimpl.TypeBuilder{
|
||||
File: protoimpl.DescBuilder{
|
||||
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
|
||||
RawDescriptor: file_proto_rpc_v3_project_proto_rawDesc,
|
||||
NumEnums: 0,
|
||||
NumMessages: 0,
|
||||
NumExtensions: 0,
|
||||
NumServices: 1,
|
||||
},
|
||||
GoTypes: file_proto_rpc_v3_project_proto_goTypes,
|
||||
DependencyIndexes: file_proto_rpc_v3_project_proto_depIdxs,
|
||||
}.Build()
|
||||
File_proto_rpc_v3_project_proto = out.File
|
||||
file_proto_rpc_v3_project_proto_rawDesc = nil
|
||||
file_proto_rpc_v3_project_proto_goTypes = nil
|
||||
file_proto_rpc_v3_project_proto_depIdxs = nil
|
||||
}
|
||||
1297
components/adminsrv/proto/rpc/v3/project.pb.gw.go
Normal file
1297
components/adminsrv/proto/rpc/v3/project.pb.gw.go
Normal file
File diff suppressed because it is too large
Load Diff
139
components/adminsrv/proto/rpc/v3/project.proto
Normal file
139
components/adminsrv/proto/rpc/v3/project.proto
Normal file
@@ -0,0 +1,139 @@
|
||||
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/systempb/v3/project.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 : "Project Service"
|
||||
version : "3.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}}
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
service Project {
|
||||
rpc CreateProject(rafay.dev.types.system.v3.Project)
|
||||
returns (rafay.dev.types.system.v3.Project) {
|
||||
option (google.api.http) = {
|
||||
post : "/auth/v3/partner/{metadata.partner}/organization/{metadata.organization}/project"
|
||||
body : "*"
|
||||
};
|
||||
|
||||
option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation) = {
|
||||
responses : {
|
||||
key : "201"
|
||||
value : {
|
||||
description : "Returned when project is created successfully."
|
||||
}
|
||||
}
|
||||
};
|
||||
};
|
||||
|
||||
rpc GetProjects(rafay.dev.types.system.v3.Project)
|
||||
returns (rafay.dev.types.system.v3.ProjectList) {
|
||||
option (google.api.http) = {
|
||||
get : "/auth/v3/partner/{metadata.partner}/organization/{metadata.organization}/projects"
|
||||
};
|
||||
};
|
||||
|
||||
rpc GetProject(rafay.dev.types.system.v3.Project)
|
||||
returns (rafay.dev.types.system.v3.Project) {
|
||||
option (google.api.http) = {
|
||||
get : "/auth/v3/partner/{metadata.partner}/organization/{metadata.organization}/project/"
|
||||
"{metadata.name}"
|
||||
additional_bindings {
|
||||
get : "/auth/v3/partner/{metadata.partner}/organization/{metadata.organization}/project/"
|
||||
"{metadata.id}"
|
||||
}
|
||||
};
|
||||
};
|
||||
|
||||
rpc UpdateProject(rafay.dev.types.system.v3.Project)
|
||||
returns (rafay.dev.types.system.v3.Project) {
|
||||
option (google.api.http) = {
|
||||
put : "/auth/v3/partner/{metadata.partner}/organization/{metadata.organization}/project/"
|
||||
"{metadata.name}"
|
||||
body : "*"
|
||||
additional_bindings {
|
||||
put : "/auth/v3/partner/{metadata.partner}/organization/{metadata.organization}/project/"
|
||||
"{metadata.id}"
|
||||
body : "*"
|
||||
}
|
||||
};
|
||||
};
|
||||
|
||||
rpc DeleteProject(rafay.dev.types.system.v3.Project)
|
||||
returns (rafay.dev.types.system.v3.Project) {
|
||||
option (google.api.http) = {
|
||||
delete : "/auth/v3/partner/{metadata.partner}/organization/{metadata.organization}/project/"
|
||||
"{metadata.name}"
|
||||
additional_bindings {
|
||||
delete : "/auth/v3/partner/{metadata.partner}/organization/{metadata.organization}/project/"
|
||||
"{metadata.id}"
|
||||
}
|
||||
};
|
||||
|
||||
option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation) = {
|
||||
responses : {
|
||||
key : "204"
|
||||
value : {
|
||||
description : "Returned when project is deleted successfully."
|
||||
}
|
||||
}
|
||||
};
|
||||
};
|
||||
|
||||
}
|
||||
248
components/adminsrv/proto/rpc/v3/project_grpc.pb.go
Normal file
248
components/adminsrv/proto/rpc/v3/project_grpc.pb.go
Normal file
@@ -0,0 +1,248 @@
|
||||
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
|
||||
// versions:
|
||||
// - protoc-gen-go-grpc v1.2.0
|
||||
// - protoc (unknown)
|
||||
// source: proto/rpc/v3/project.proto
|
||||
|
||||
package rpcv3
|
||||
|
||||
import (
|
||||
context "context"
|
||||
v3 "github.com/RafaySystems/rcloud-base/components/adminsrv/proto/types/systempb/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
|
||||
|
||||
// ProjectClient is the client API for Project 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 ProjectClient interface {
|
||||
CreateProject(ctx context.Context, in *v3.Project, opts ...grpc.CallOption) (*v3.Project, error)
|
||||
GetProjects(ctx context.Context, in *v3.Project, opts ...grpc.CallOption) (*v3.ProjectList, error)
|
||||
GetProject(ctx context.Context, in *v3.Project, opts ...grpc.CallOption) (*v3.Project, error)
|
||||
UpdateProject(ctx context.Context, in *v3.Project, opts ...grpc.CallOption) (*v3.Project, error)
|
||||
DeleteProject(ctx context.Context, in *v3.Project, opts ...grpc.CallOption) (*v3.Project, error)
|
||||
}
|
||||
|
||||
type projectClient struct {
|
||||
cc grpc.ClientConnInterface
|
||||
}
|
||||
|
||||
func NewProjectClient(cc grpc.ClientConnInterface) ProjectClient {
|
||||
return &projectClient{cc}
|
||||
}
|
||||
|
||||
func (c *projectClient) CreateProject(ctx context.Context, in *v3.Project, opts ...grpc.CallOption) (*v3.Project, error) {
|
||||
out := new(v3.Project)
|
||||
err := c.cc.Invoke(ctx, "/rafay.dev.rpc.v3.Project/CreateProject", in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *projectClient) GetProjects(ctx context.Context, in *v3.Project, opts ...grpc.CallOption) (*v3.ProjectList, error) {
|
||||
out := new(v3.ProjectList)
|
||||
err := c.cc.Invoke(ctx, "/rafay.dev.rpc.v3.Project/GetProjects", in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *projectClient) GetProject(ctx context.Context, in *v3.Project, opts ...grpc.CallOption) (*v3.Project, error) {
|
||||
out := new(v3.Project)
|
||||
err := c.cc.Invoke(ctx, "/rafay.dev.rpc.v3.Project/GetProject", in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *projectClient) UpdateProject(ctx context.Context, in *v3.Project, opts ...grpc.CallOption) (*v3.Project, error) {
|
||||
out := new(v3.Project)
|
||||
err := c.cc.Invoke(ctx, "/rafay.dev.rpc.v3.Project/UpdateProject", in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *projectClient) DeleteProject(ctx context.Context, in *v3.Project, opts ...grpc.CallOption) (*v3.Project, error) {
|
||||
out := new(v3.Project)
|
||||
err := c.cc.Invoke(ctx, "/rafay.dev.rpc.v3.Project/DeleteProject", in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
// ProjectServer is the server API for Project service.
|
||||
// All implementations should embed UnimplementedProjectServer
|
||||
// for forward compatibility
|
||||
type ProjectServer interface {
|
||||
CreateProject(context.Context, *v3.Project) (*v3.Project, error)
|
||||
GetProjects(context.Context, *v3.Project) (*v3.ProjectList, error)
|
||||
GetProject(context.Context, *v3.Project) (*v3.Project, error)
|
||||
UpdateProject(context.Context, *v3.Project) (*v3.Project, error)
|
||||
DeleteProject(context.Context, *v3.Project) (*v3.Project, error)
|
||||
}
|
||||
|
||||
// UnimplementedProjectServer should be embedded to have forward compatible implementations.
|
||||
type UnimplementedProjectServer struct {
|
||||
}
|
||||
|
||||
func (UnimplementedProjectServer) CreateProject(context.Context, *v3.Project) (*v3.Project, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method CreateProject not implemented")
|
||||
}
|
||||
func (UnimplementedProjectServer) GetProjects(context.Context, *v3.Project) (*v3.ProjectList, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method GetProjects not implemented")
|
||||
}
|
||||
func (UnimplementedProjectServer) GetProject(context.Context, *v3.Project) (*v3.Project, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method GetProject not implemented")
|
||||
}
|
||||
func (UnimplementedProjectServer) UpdateProject(context.Context, *v3.Project) (*v3.Project, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method UpdateProject not implemented")
|
||||
}
|
||||
func (UnimplementedProjectServer) DeleteProject(context.Context, *v3.Project) (*v3.Project, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method DeleteProject not implemented")
|
||||
}
|
||||
|
||||
// UnsafeProjectServer may be embedded to opt out of forward compatibility for this service.
|
||||
// Use of this interface is not recommended, as added methods to ProjectServer will
|
||||
// result in compilation errors.
|
||||
type UnsafeProjectServer interface {
|
||||
mustEmbedUnimplementedProjectServer()
|
||||
}
|
||||
|
||||
func RegisterProjectServer(s grpc.ServiceRegistrar, srv ProjectServer) {
|
||||
s.RegisterService(&Project_ServiceDesc, srv)
|
||||
}
|
||||
|
||||
func _Project_CreateProject_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(v3.Project)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(ProjectServer).CreateProject(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: "/rafay.dev.rpc.v3.Project/CreateProject",
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(ProjectServer).CreateProject(ctx, req.(*v3.Project))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _Project_GetProjects_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(v3.Project)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(ProjectServer).GetProjects(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: "/rafay.dev.rpc.v3.Project/GetProjects",
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(ProjectServer).GetProjects(ctx, req.(*v3.Project))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _Project_GetProject_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(v3.Project)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(ProjectServer).GetProject(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: "/rafay.dev.rpc.v3.Project/GetProject",
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(ProjectServer).GetProject(ctx, req.(*v3.Project))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _Project_UpdateProject_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(v3.Project)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(ProjectServer).UpdateProject(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: "/rafay.dev.rpc.v3.Project/UpdateProject",
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(ProjectServer).UpdateProject(ctx, req.(*v3.Project))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _Project_DeleteProject_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(v3.Project)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(ProjectServer).DeleteProject(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: "/rafay.dev.rpc.v3.Project/DeleteProject",
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(ProjectServer).DeleteProject(ctx, req.(*v3.Project))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
// Project_ServiceDesc is the grpc.ServiceDesc for Project service.
|
||||
// It's only intended for direct use with grpc.RegisterService,
|
||||
// and not to be introspected or modified (even as a copy)
|
||||
var Project_ServiceDesc = grpc.ServiceDesc{
|
||||
ServiceName: "rafay.dev.rpc.v3.Project",
|
||||
HandlerType: (*ProjectServer)(nil),
|
||||
Methods: []grpc.MethodDesc{
|
||||
{
|
||||
MethodName: "CreateProject",
|
||||
Handler: _Project_CreateProject_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "GetProjects",
|
||||
Handler: _Project_GetProjects_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "GetProject",
|
||||
Handler: _Project_GetProject_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "UpdateProject",
|
||||
Handler: _Project_UpdateProject_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "DeleteProject",
|
||||
Handler: _Project_DeleteProject_Handler,
|
||||
},
|
||||
},
|
||||
Streams: []grpc.StreamDesc{},
|
||||
Metadata: "proto/rpc/v3/project.proto",
|
||||
}
|
||||
774
components/adminsrv/proto/types/systempb/v3/organization.pb.go
Normal file
774
components/adminsrv/proto/types/systempb/v3/organization.pb.go
Normal file
@@ -0,0 +1,774 @@
|
||||
// Code generated by protoc-gen-go. DO NOT EDIT.
|
||||
// versions:
|
||||
// protoc-gen-go v1.27.1
|
||||
// protoc (unknown)
|
||||
// source: proto/types/systempb/v3/organization.proto
|
||||
|
||||
package systemv3
|
||||
|
||||
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 Lockout struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
Enabled bool `protobuf:"varint,1,opt,name=enabled,proto3" json:"enabled,omitempty"`
|
||||
PeriodMin int32 `protobuf:"varint,2,opt,name=period_min,json=periodMin,proto3" json:"period_min,omitempty"`
|
||||
Attempts int32 `protobuf:"varint,3,opt,name=attempts,proto3" json:"attempts,omitempty"`
|
||||
}
|
||||
|
||||
func (x *Lockout) Reset() {
|
||||
*x = Lockout{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_proto_types_systempb_v3_organization_proto_msgTypes[0]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
}
|
||||
|
||||
func (x *Lockout) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*Lockout) ProtoMessage() {}
|
||||
|
||||
func (x *Lockout) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_proto_types_systempb_v3_organization_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 Lockout.ProtoReflect.Descriptor instead.
|
||||
func (*Lockout) Descriptor() ([]byte, []int) {
|
||||
return file_proto_types_systempb_v3_organization_proto_rawDescGZIP(), []int{0}
|
||||
}
|
||||
|
||||
func (x *Lockout) GetEnabled() bool {
|
||||
if x != nil {
|
||||
return x.Enabled
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
func (x *Lockout) GetPeriodMin() int32 {
|
||||
if x != nil {
|
||||
return x.PeriodMin
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *Lockout) GetAttempts() int32 {
|
||||
if x != nil {
|
||||
return x.Attempts
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
type OrganizationSettings struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
Lockout *Lockout `protobuf:"bytes,1,opt,name=lockout,proto3" json:"lockout,omitempty"`
|
||||
IdleLogoutMin int32 `protobuf:"varint,2,opt,name=idleLogoutMin,proto3" json:"idleLogoutMin,omitempty"`
|
||||
}
|
||||
|
||||
func (x *OrganizationSettings) Reset() {
|
||||
*x = OrganizationSettings{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_proto_types_systempb_v3_organization_proto_msgTypes[1]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
}
|
||||
|
||||
func (x *OrganizationSettings) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*OrganizationSettings) ProtoMessage() {}
|
||||
|
||||
func (x *OrganizationSettings) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_proto_types_systempb_v3_organization_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 OrganizationSettings.ProtoReflect.Descriptor instead.
|
||||
func (*OrganizationSettings) Descriptor() ([]byte, []int) {
|
||||
return file_proto_types_systempb_v3_organization_proto_rawDescGZIP(), []int{1}
|
||||
}
|
||||
|
||||
func (x *OrganizationSettings) GetLockout() *Lockout {
|
||||
if x != nil {
|
||||
return x.Lockout
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (x *OrganizationSettings) GetIdleLogoutMin() int32 {
|
||||
if x != nil {
|
||||
return x.IdleLogoutMin
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
type OrganizationSpec struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
BillingAddress string `protobuf:"bytes,1,opt,name=billingAddress,proto3" json:"billingAddress,omitempty"`
|
||||
Active bool `protobuf:"varint,2,opt,name=active,proto3" json:"active,omitempty"`
|
||||
Approved bool `protobuf:"varint,3,opt,name=approved,proto3" json:"approved,omitempty"`
|
||||
Type string `protobuf:"bytes,4,opt,name=type,proto3" json:"type,omitempty"`
|
||||
AddressLine1 string `protobuf:"bytes,5,opt,name=addressLine1,proto3" json:"addressLine1,omitempty"`
|
||||
AddressLine2 string `protobuf:"bytes,6,opt,name=addressLine2,proto3" json:"addressLine2,omitempty"`
|
||||
City string `protobuf:"bytes,7,opt,name=city,proto3" json:"city,omitempty"`
|
||||
Country string `protobuf:"bytes,8,opt,name=country,proto3" json:"country,omitempty"`
|
||||
Phone string `protobuf:"bytes,9,opt,name=phone,proto3" json:"phone,omitempty"`
|
||||
State string `protobuf:"bytes,10,opt,name=state,proto3" json:"state,omitempty"`
|
||||
Zipcode string `protobuf:"bytes,11,opt,name=zipcode,proto3" json:"zipcode,omitempty"`
|
||||
IsPrivate bool `protobuf:"varint,12,opt,name=isPrivate,proto3" json:"isPrivate,omitempty"`
|
||||
IsTotpEnabled bool `protobuf:"varint,13,opt,name=isTotpEnabled,proto3" json:"isTotpEnabled,omitempty"`
|
||||
AreClustersShared bool `protobuf:"varint,14,opt,name=areClustersShared,proto3" json:"areClustersShared,omitempty"`
|
||||
Settings *OrganizationSettings `protobuf:"bytes,15,opt,name=settings,proto3" json:"settings,omitempty"`
|
||||
}
|
||||
|
||||
func (x *OrganizationSpec) Reset() {
|
||||
*x = OrganizationSpec{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_proto_types_systempb_v3_organization_proto_msgTypes[2]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
}
|
||||
|
||||
func (x *OrganizationSpec) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*OrganizationSpec) ProtoMessage() {}
|
||||
|
||||
func (x *OrganizationSpec) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_proto_types_systempb_v3_organization_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 OrganizationSpec.ProtoReflect.Descriptor instead.
|
||||
func (*OrganizationSpec) Descriptor() ([]byte, []int) {
|
||||
return file_proto_types_systempb_v3_organization_proto_rawDescGZIP(), []int{2}
|
||||
}
|
||||
|
||||
func (x *OrganizationSpec) GetBillingAddress() string {
|
||||
if x != nil {
|
||||
return x.BillingAddress
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *OrganizationSpec) GetActive() bool {
|
||||
if x != nil {
|
||||
return x.Active
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
func (x *OrganizationSpec) GetApproved() bool {
|
||||
if x != nil {
|
||||
return x.Approved
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
func (x *OrganizationSpec) GetType() string {
|
||||
if x != nil {
|
||||
return x.Type
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *OrganizationSpec) GetAddressLine1() string {
|
||||
if x != nil {
|
||||
return x.AddressLine1
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *OrganizationSpec) GetAddressLine2() string {
|
||||
if x != nil {
|
||||
return x.AddressLine2
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *OrganizationSpec) GetCity() string {
|
||||
if x != nil {
|
||||
return x.City
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *OrganizationSpec) GetCountry() string {
|
||||
if x != nil {
|
||||
return x.Country
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *OrganizationSpec) GetPhone() string {
|
||||
if x != nil {
|
||||
return x.Phone
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *OrganizationSpec) GetState() string {
|
||||
if x != nil {
|
||||
return x.State
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *OrganizationSpec) GetZipcode() string {
|
||||
if x != nil {
|
||||
return x.Zipcode
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *OrganizationSpec) GetIsPrivate() bool {
|
||||
if x != nil {
|
||||
return x.IsPrivate
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
func (x *OrganizationSpec) GetIsTotpEnabled() bool {
|
||||
if x != nil {
|
||||
return x.IsTotpEnabled
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
func (x *OrganizationSpec) GetAreClustersShared() bool {
|
||||
if x != nil {
|
||||
return x.AreClustersShared
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
func (x *OrganizationSpec) GetSettings() *OrganizationSettings {
|
||||
if x != nil {
|
||||
return x.Settings
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
type Organization 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 *OrganizationSpec `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 *Organization) Reset() {
|
||||
*x = Organization{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_proto_types_systempb_v3_organization_proto_msgTypes[3]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
}
|
||||
|
||||
func (x *Organization) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*Organization) ProtoMessage() {}
|
||||
|
||||
func (x *Organization) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_proto_types_systempb_v3_organization_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 Organization.ProtoReflect.Descriptor instead.
|
||||
func (*Organization) Descriptor() ([]byte, []int) {
|
||||
return file_proto_types_systempb_v3_organization_proto_rawDescGZIP(), []int{3}
|
||||
}
|
||||
|
||||
func (x *Organization) GetApiVersion() string {
|
||||
if x != nil {
|
||||
return x.ApiVersion
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *Organization) GetKind() string {
|
||||
if x != nil {
|
||||
return x.Kind
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *Organization) GetMetadata() *v3.Metadata {
|
||||
if x != nil {
|
||||
return x.Metadata
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (x *Organization) GetSpec() *OrganizationSpec {
|
||||
if x != nil {
|
||||
return x.Spec
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (x *Organization) GetStatus() *v3.Status {
|
||||
if x != nil {
|
||||
return x.Status
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
type OrganizationList 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 []*Organization `protobuf:"bytes,4,rep,name=items,proto3" json:"items,omitempty"`
|
||||
}
|
||||
|
||||
func (x *OrganizationList) Reset() {
|
||||
*x = OrganizationList{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_proto_types_systempb_v3_organization_proto_msgTypes[4]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
}
|
||||
|
||||
func (x *OrganizationList) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*OrganizationList) ProtoMessage() {}
|
||||
|
||||
func (x *OrganizationList) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_proto_types_systempb_v3_organization_proto_msgTypes[4]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use OrganizationList.ProtoReflect.Descriptor instead.
|
||||
func (*OrganizationList) Descriptor() ([]byte, []int) {
|
||||
return file_proto_types_systempb_v3_organization_proto_rawDescGZIP(), []int{4}
|
||||
}
|
||||
|
||||
func (x *OrganizationList) GetApiVersion() string {
|
||||
if x != nil {
|
||||
return x.ApiVersion
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *OrganizationList) GetKind() string {
|
||||
if x != nil {
|
||||
return x.Kind
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *OrganizationList) GetMetadata() *v3.ListMetadata {
|
||||
if x != nil {
|
||||
return x.Metadata
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (x *OrganizationList) GetItems() []*Organization {
|
||||
if x != nil {
|
||||
return x.Items
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
var File_proto_types_systempb_v3_organization_proto protoreflect.FileDescriptor
|
||||
|
||||
var file_proto_types_systempb_v3_organization_proto_rawDesc = []byte{
|
||||
0x0a, 0x2a, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2f, 0x73, 0x79,
|
||||
0x73, 0x74, 0x65, 0x6d, 0x70, 0x62, 0x2f, 0x76, 0x33, 0x2f, 0x6f, 0x72, 0x67, 0x61, 0x6e, 0x69,
|
||||
0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x19, 0x72, 0x61,
|
||||
0x66, 0x61, 0x79, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x73, 0x79,
|
||||
0x73, 0x74, 0x65, 0x6d, 0x2e, 0x76, 0x33, 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, 0xf0, 0x01,
|
||||
0x0a, 0x07, 0x4c, 0x6f, 0x63, 0x6b, 0x6f, 0x75, 0x74, 0x12, 0x44, 0x0a, 0x07, 0x65, 0x6e, 0x61,
|
||||
0x62, 0x6c, 0x65, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x42, 0x2a, 0x92, 0x41, 0x27, 0x2a,
|
||||
0x07, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x32, 0x1c, 0x49, 0x73, 0x20, 0x6c, 0x6f, 0x63,
|
||||
0x6b, 0x6f, 0x75, 0x74, 0x20, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x20, 0x65, 0x6e,
|
||||
0x61, 0x62, 0x6c, 0x65, 0x64, 0x3f, 0x52, 0x07, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x12,
|
||||
0x4d, 0x0a, 0x0a, 0x70, 0x65, 0x72, 0x69, 0x6f, 0x64, 0x5f, 0x6d, 0x69, 0x6e, 0x18, 0x02, 0x20,
|
||||
0x01, 0x28, 0x05, 0x42, 0x2e, 0x92, 0x41, 0x2b, 0x2a, 0x0e, 0x50, 0x65, 0x72, 0x69, 0x6f, 0x64,
|
||||
0x20, 0x4d, 0x69, 0x6e, 0x75, 0x74, 0x65, 0x73, 0x32, 0x19, 0x4c, 0x6f, 0x63, 0x6b, 0x6f, 0x75,
|
||||
0x74, 0x20, 0x70, 0x65, 0x72, 0x69, 0x6f, 0x64, 0x20, 0x69, 0x6e, 0x20, 0x4d, 0x69, 0x6e, 0x75,
|
||||
0x74, 0x65, 0x73, 0x52, 0x09, 0x70, 0x65, 0x72, 0x69, 0x6f, 0x64, 0x4d, 0x69, 0x6e, 0x12, 0x50,
|
||||
0x0a, 0x08, 0x61, 0x74, 0x74, 0x65, 0x6d, 0x70, 0x74, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05,
|
||||
0x42, 0x34, 0x92, 0x41, 0x31, 0x2a, 0x08, 0x41, 0x74, 0x74, 0x65, 0x6d, 0x70, 0x74, 0x73, 0x32,
|
||||
0x25, 0x4d, 0x61, 0x78, 0x20, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x20, 0x6f, 0x66, 0x20, 0x61,
|
||||
0x74, 0x74, 0x65, 0x6d, 0x70, 0x74, 0x73, 0x20, 0x62, 0x65, 0x66, 0x6f, 0x72, 0x65, 0x20, 0x6c,
|
||||
0x6f, 0x63, 0x6b, 0x6f, 0x75, 0x74, 0x52, 0x08, 0x61, 0x74, 0x74, 0x65, 0x6d, 0x70, 0x74, 0x73,
|
||||
0x22, 0xe5, 0x01, 0x0a, 0x14, 0x4f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f,
|
||||
0x6e, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x12, 0x70, 0x0a, 0x07, 0x6c, 0x6f, 0x63,
|
||||
0x6b, 0x6f, 0x75, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x72, 0x61, 0x66,
|
||||
0x61, 0x79, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x73, 0x79, 0x73,
|
||||
0x74, 0x65, 0x6d, 0x2e, 0x76, 0x33, 0x2e, 0x4c, 0x6f, 0x63, 0x6b, 0x6f, 0x75, 0x74, 0x42, 0x32,
|
||||
0x92, 0x41, 0x2f, 0x2a, 0x07, 0x4c, 0x6f, 0x63, 0x6b, 0x6f, 0x75, 0x74, 0x32, 0x24, 0x4c, 0x6f,
|
||||
0x63, 0x6b, 0x6f, 0x75, 0x74, 0x20, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x20, 0x6f,
|
||||
0x66, 0x20, 0x74, 0x68, 0x65, 0x20, 0x6f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69,
|
||||
0x6f, 0x6e, 0x52, 0x07, 0x6c, 0x6f, 0x63, 0x6b, 0x6f, 0x75, 0x74, 0x12, 0x5b, 0x0a, 0x0d, 0x69,
|
||||
0x64, 0x6c, 0x65, 0x4c, 0x6f, 0x67, 0x6f, 0x75, 0x74, 0x4d, 0x69, 0x6e, 0x18, 0x02, 0x20, 0x01,
|
||||
0x28, 0x05, 0x42, 0x35, 0x92, 0x41, 0x32, 0x2a, 0x13, 0x49, 0x64, 0x6c, 0x65, 0x20, 0x4c, 0x6f,
|
||||
0x67, 0x6f, 0x75, 0x74, 0x20, 0x4d, 0x69, 0x6e, 0x75, 0x74, 0x65, 0x73, 0x32, 0x1b, 0x49, 0x64,
|
||||
0x6c, 0x65, 0x20, 0x4c, 0x6f, 0x67, 0x6f, 0x75, 0x74, 0x20, 0x74, 0x69, 0x6d, 0x65, 0x20, 0x69,
|
||||
0x6e, 0x20, 0x6d, 0x69, 0x6e, 0x75, 0x74, 0x65, 0x73, 0x52, 0x0d, 0x69, 0x64, 0x6c, 0x65, 0x4c,
|
||||
0x6f, 0x67, 0x6f, 0x75, 0x74, 0x4d, 0x69, 0x6e, 0x22, 0xa5, 0x09, 0x0a, 0x10, 0x4f, 0x72, 0x67,
|
||||
0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x70, 0x65, 0x63, 0x12, 0x61, 0x0a,
|
||||
0x0e, 0x62, 0x69, 0x6c, 0x6c, 0x69, 0x6e, 0x67, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18,
|
||||
0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x39, 0x92, 0x41, 0x36, 0x2a, 0x0f, 0x42, 0x69, 0x6c, 0x6c,
|
||||
0x69, 0x6e, 0x67, 0x20, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x32, 0x23, 0x42, 0x69, 0x6c,
|
||||
0x6c, 0x69, 0x6e, 0x67, 0x20, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x20, 0x6f, 0x66, 0x20,
|
||||
0x74, 0x68, 0x65, 0x20, 0x6f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e,
|
||||
0x52, 0x0e, 0x62, 0x69, 0x6c, 0x6c, 0x69, 0x6e, 0x67, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73,
|
||||
0x12, 0x4e, 0x0a, 0x06, 0x61, 0x63, 0x74, 0x69, 0x76, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08,
|
||||
0x42, 0x36, 0x92, 0x41, 0x33, 0x2a, 0x06, 0x41, 0x63, 0x74, 0x69, 0x76, 0x65, 0x32, 0x29, 0x52,
|
||||
0x65, 0x70, 0x72, 0x65, 0x73, 0x65, 0x6e, 0x74, 0x73, 0x20, 0x69, 0x66, 0x20, 0x74, 0x68, 0x69,
|
||||
0x73, 0x20, 0x6f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x69,
|
||||
0x73, 0x20, 0x61, 0x63, 0x74, 0x69, 0x76, 0x65, 0x52, 0x06, 0x61, 0x63, 0x74, 0x69, 0x76, 0x65,
|
||||
0x12, 0x46, 0x0a, 0x08, 0x61, 0x70, 0x70, 0x72, 0x6f, 0x76, 0x65, 0x64, 0x18, 0x03, 0x20, 0x01,
|
||||
0x28, 0x08, 0x42, 0x2a, 0x92, 0x41, 0x27, 0x2a, 0x08, 0x41, 0x70, 0x70, 0x72, 0x6f, 0x76, 0x65,
|
||||
0x64, 0x32, 0x1b, 0x49, 0x73, 0x20, 0x74, 0x68, 0x69, 0x73, 0x20, 0x6f, 0x72, 0x67, 0x61, 0x6e,
|
||||
0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x61, 0x63, 0x74, 0x69, 0x76, 0x65, 0x52, 0x08,
|
||||
0x61, 0x70, 0x70, 0x72, 0x6f, 0x76, 0x65, 0x64, 0x12, 0x33, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65,
|
||||
0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x42, 0x1f, 0x92, 0x41, 0x1c, 0x2a, 0x04, 0x54, 0x79, 0x70,
|
||||
0x65, 0x32, 0x14, 0x54, 0x79, 0x70, 0x65, 0x20, 0x6f, 0x66, 0x20, 0x6f, 0x72, 0x67, 0x61, 0x6e,
|
||||
0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x54, 0x0a,
|
||||
0x0c, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x4c, 0x69, 0x6e, 0x65, 0x31, 0x18, 0x05, 0x20,
|
||||
0x01, 0x28, 0x09, 0x42, 0x30, 0x92, 0x41, 0x2d, 0x2a, 0x0e, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73,
|
||||
0x73, 0x20, 0x4c, 0x69, 0x6e, 0x65, 0x20, 0x31, 0x32, 0x1b, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73,
|
||||
0x73, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, 0x20, 0x6f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a,
|
||||
0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0c, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x4c, 0x69,
|
||||
0x6e, 0x65, 0x31, 0x12, 0x54, 0x0a, 0x0c, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x4c, 0x69,
|
||||
0x6e, 0x65, 0x32, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x42, 0x30, 0x92, 0x41, 0x2d, 0x2a, 0x0e,
|
||||
0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x20, 0x4c, 0x69, 0x6e, 0x65, 0x20, 0x32, 0x32, 0x1b,
|
||||
0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, 0x20, 0x6f,
|
||||
0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0c, 0x61, 0x64, 0x64,
|
||||
0x72, 0x65, 0x73, 0x73, 0x4c, 0x69, 0x6e, 0x65, 0x32, 0x12, 0x23, 0x0a, 0x04, 0x63, 0x69, 0x74,
|
||||
0x79, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x42, 0x0f, 0x92, 0x41, 0x0c, 0x2a, 0x04, 0x43, 0x69,
|
||||
0x74, 0x79, 0x32, 0x04, 0x43, 0x69, 0x74, 0x79, 0x52, 0x04, 0x63, 0x69, 0x74, 0x79, 0x12, 0x43,
|
||||
0x0a, 0x07, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x72, 0x79, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x42,
|
||||
0x29, 0x92, 0x41, 0x26, 0x2a, 0x07, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x72, 0x79, 0x32, 0x1b, 0x43,
|
||||
0x6f, 0x75, 0x6e, 0x74, 0x72, 0x79, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, 0x20, 0x6f, 0x72,
|
||||
0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x07, 0x63, 0x6f, 0x75, 0x6e,
|
||||
0x74, 0x72, 0x79, 0x12, 0x42, 0x0a, 0x05, 0x70, 0x68, 0x6f, 0x6e, 0x65, 0x18, 0x09, 0x20, 0x01,
|
||||
0x28, 0x09, 0x42, 0x2c, 0x92, 0x41, 0x29, 0x2a, 0x05, 0x50, 0x68, 0x6f, 0x6e, 0x65, 0x32, 0x20,
|
||||
0x50, 0x68, 0x6f, 0x6e, 0x65, 0x20, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x20, 0x6f, 0x66, 0x20,
|
||||
0x74, 0x68, 0x65, 0x20, 0x6f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e,
|
||||
0x52, 0x05, 0x70, 0x68, 0x6f, 0x6e, 0x65, 0x12, 0x3b, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65,
|
||||
0x18, 0x0a, 0x20, 0x01, 0x28, 0x09, 0x42, 0x25, 0x92, 0x41, 0x22, 0x2a, 0x05, 0x53, 0x74, 0x61,
|
||||
0x74, 0x65, 0x32, 0x19, 0x53, 0x74, 0x61, 0x74, 0x65, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65,
|
||||
0x20, 0x6f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x05, 0x73,
|
||||
0x74, 0x61, 0x74, 0x65, 0x12, 0x2f, 0x0a, 0x07, 0x7a, 0x69, 0x70, 0x63, 0x6f, 0x64, 0x65, 0x18,
|
||||
0x0b, 0x20, 0x01, 0x28, 0x09, 0x42, 0x15, 0x92, 0x41, 0x12, 0x2a, 0x07, 0x5a, 0x69, 0x70, 0x63,
|
||||
0x6f, 0x64, 0x65, 0x32, 0x07, 0x5a, 0x69, 0x70, 0x63, 0x6f, 0x64, 0x65, 0x52, 0x07, 0x7a, 0x69,
|
||||
0x70, 0x63, 0x6f, 0x64, 0x65, 0x12, 0x46, 0x0a, 0x09, 0x69, 0x73, 0x50, 0x72, 0x69, 0x76, 0x61,
|
||||
0x74, 0x65, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x08, 0x42, 0x28, 0x92, 0x41, 0x25, 0x2a, 0x0a, 0x49,
|
||||
0x73, 0x20, 0x50, 0x72, 0x69, 0x76, 0x61, 0x74, 0x65, 0x32, 0x17, 0x49, 0x73, 0x20, 0x50, 0x72,
|
||||
0x69, 0x76, 0x61, 0x74, 0x65, 0x20, 0x4f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69,
|
||||
0x6f, 0x6e, 0x52, 0x09, 0x69, 0x73, 0x50, 0x72, 0x69, 0x76, 0x61, 0x74, 0x65, 0x12, 0x61, 0x0a,
|
||||
0x0d, 0x69, 0x73, 0x54, 0x6f, 0x74, 0x70, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x18, 0x0d,
|
||||
0x20, 0x01, 0x28, 0x08, 0x42, 0x3b, 0x92, 0x41, 0x38, 0x2a, 0x0f, 0x49, 0x73, 0x20, 0x54, 0x4f,
|
||||
0x54, 0x50, 0x20, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x32, 0x25, 0x49, 0x73, 0x20, 0x54,
|
||||
0x4f, 0x54, 0x50, 0x20, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x20, 0x61, 0x74, 0x20, 0x6f,
|
||||
0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x6c, 0x65, 0x76, 0x65,
|
||||
0x6c, 0x52, 0x0d, 0x69, 0x73, 0x54, 0x6f, 0x74, 0x70, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64,
|
||||
0x12, 0x57, 0x0a, 0x11, 0x61, 0x72, 0x65, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x73, 0x53,
|
||||
0x68, 0x61, 0x72, 0x65, 0x64, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x08, 0x42, 0x29, 0x92, 0x41, 0x26,
|
||||
0x2a, 0x0f, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x73, 0x20, 0x53, 0x68, 0x61, 0x72, 0x65,
|
||||
0x64, 0x32, 0x13, 0x41, 0x72, 0x65, 0x20, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x73, 0x20,
|
||||
0x73, 0x68, 0x61, 0x72, 0x65, 0x64, 0x52, 0x11, 0x61, 0x72, 0x65, 0x43, 0x6c, 0x75, 0x73, 0x74,
|
||||
0x65, 0x72, 0x73, 0x53, 0x68, 0x61, 0x72, 0x65, 0x64, 0x12, 0x94, 0x01, 0x0a, 0x08, 0x73, 0x65,
|
||||
0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x18, 0x0f, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2f, 0x2e, 0x72,
|
||||
0x61, 0x66, 0x61, 0x79, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x73,
|
||||
0x79, 0x73, 0x74, 0x65, 0x6d, 0x2e, 0x76, 0x33, 0x2e, 0x4f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a,
|
||||
0x61, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x42, 0x47, 0x92,
|
||||
0x41, 0x44, 0x2a, 0x08, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x32, 0x38, 0x56, 0x61,
|
||||
0x72, 0x69, 0x6f, 0x75, 0x73, 0x20, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x20, 0x6c,
|
||||
0x69, 0x6b, 0x65, 0x20, 0x6c, 0x6f, 0x63, 0x6b, 0x6f, 0x75, 0x74, 0x2c, 0x20, 0x61, 0x75, 0x74,
|
||||
0x6f, 0x2d, 0x6c, 0x6f, 0x67, 0x6f, 0x75, 0x74, 0x20, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75,
|
||||
0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x08, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73,
|
||||
0x22, 0xb1, 0x04, 0x0a, 0x0c, 0x4f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f,
|
||||
0x6e, 0x12, 0x65, 0x0a, 0x0a, 0x61, 0x70, 0x69, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18,
|
||||
0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x45, 0x92, 0x41, 0x42, 0x2a, 0x0b, 0x41, 0x50, 0x49, 0x20,
|
||||
0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x32, 0x1b, 0x41, 0x50, 0x49, 0x20, 0x56, 0x65, 0x72,
|
||||
0x73, 0x69, 0x6f, 0x6e, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, 0x20, 0x72, 0x65, 0x73, 0x6f,
|
||||
0x75, 0x72, 0x63, 0x65, 0x3a, 0x14, 0x73, 0x79, 0x73, 0x74, 0x65, 0x6d, 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, 0x43, 0x0a, 0x04, 0x6b, 0x69, 0x6e, 0x64,
|
||||
0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x2f, 0x92, 0x41, 0x2c, 0x2a, 0x04, 0x4b, 0x69, 0x6e,
|
||||
0x64, 0x32, 0x14, 0x4b, 0x69, 0x6e, 0x64, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, 0x20, 0x72,
|
||||
0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x3a, 0x0c, 0x4f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a,
|
||||
0x61, 0x74, 0x69, 0x6f, 0x6e, 0x40, 0x01, 0x52, 0x04, 0x6b, 0x69, 0x6e, 0x64, 0x12, 0x68, 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, 0x27, 0x92, 0x41, 0x24, 0x2a, 0x08, 0x4d, 0x65, 0x74, 0x61, 0x64,
|
||||
0x61, 0x74, 0x61, 0x32, 0x18, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x20, 0x6f, 0x66,
|
||||
0x20, 0x74, 0x68, 0x65, 0x20, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x08, 0x6d,
|
||||
0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x60, 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, 0x73, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x2e, 0x76,
|
||||
0x33, 0x2e, 0x4f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x70,
|
||||
0x65, 0x63, 0x42, 0x1f, 0x92, 0x41, 0x1c, 0x2a, 0x04, 0x53, 0x70, 0x65, 0x63, 0x32, 0x14, 0x53,
|
||||
0x70, 0x65, 0x63, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 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, 0x47, 0x92, 0x41, 0x44,
|
||||
0x0a, 0x42, 0x2a, 0x0c, 0x4f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e,
|
||||
0x32, 0x0c, 0x4f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 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, 0xa9, 0x03, 0x0a, 0x10, 0x4f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a,
|
||||
0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4c, 0x69, 0x73, 0x74, 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, 0x6c, 0x69, 0x73, 0x74, 0x20, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63,
|
||||
0x65, 0x3a, 0x14, 0x73, 0x79, 0x73, 0x74, 0x65, 0x6d, 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, 0x4c, 0x0a, 0x04, 0x6b, 0x69, 0x6e, 0x64, 0x18, 0x02, 0x20,
|
||||
0x01, 0x28, 0x09, 0x42, 0x38, 0x92, 0x41, 0x35, 0x2a, 0x04, 0x4b, 0x69, 0x6e, 0x64, 0x32, 0x19,
|
||||
0x4b, 0x69, 0x6e, 0x64, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, 0x20, 0x6c, 0x69, 0x73, 0x74,
|
||||
0x20, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x3a, 0x10, 0x4f, 0x72, 0x67, 0x61, 0x6e,
|
||||
0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4c, 0x69, 0x73, 0x74, 0x40, 0x01, 0x52, 0x04, 0x6b,
|
||||
0x69, 0x6e, 0x64, 0x12, 0x77, 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, 0x32,
|
||||
0x92, 0x41, 0x2f, 0x2a, 0x0c, 0x4c, 0x69, 0x73, 0x74, 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, 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, 0x62, 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, 0x73, 0x79,
|
||||
0x73, 0x74, 0x65, 0x6d, 0x2e, 0x76, 0x33, 0x2e, 0x4f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61,
|
||||
0x74, 0x69, 0x6f, 0x6e, 0x42, 0x23, 0x92, 0x41, 0x20, 0x2a, 0x05, 0x49, 0x74, 0x65, 0x6d, 0x73,
|
||||
0x32, 0x15, 0x4c, 0x69, 0x73, 0x74, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, 0x20, 0x72, 0x65,
|
||||
0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x40, 0x01, 0x52, 0x05, 0x69, 0x74, 0x65, 0x6d, 0x73,
|
||||
0x42, 0x95, 0x02, 0x0a, 0x1d, 0x63, 0x6f, 0x6d, 0x2e, 0x72, 0x61, 0x66, 0x61, 0x79, 0x2e, 0x64,
|
||||
0x65, 0x76, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x73, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x2e,
|
||||
0x76, 0x33, 0x42, 0x11, 0x4f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e,
|
||||
0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x58, 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, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x73, 0x72, 0x76,
|
||||
0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2f, 0x73, 0x79, 0x73,
|
||||
0x74, 0x65, 0x6d, 0x70, 0x62, 0x2f, 0x76, 0x33, 0x3b, 0x73, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x76,
|
||||
0x33, 0xa2, 0x02, 0x04, 0x52, 0x44, 0x54, 0x53, 0xaa, 0x02, 0x19, 0x52, 0x61, 0x66, 0x61, 0x79,
|
||||
0x2e, 0x44, 0x65, 0x76, 0x2e, 0x54, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x53, 0x79, 0x73, 0x74, 0x65,
|
||||
0x6d, 0x2e, 0x56, 0x33, 0xca, 0x02, 0x19, 0x52, 0x61, 0x66, 0x61, 0x79, 0x5c, 0x44, 0x65, 0x76,
|
||||
0x5c, 0x54, 0x79, 0x70, 0x65, 0x73, 0x5c, 0x53, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x5c, 0x56, 0x33,
|
||||
0xe2, 0x02, 0x25, 0x52, 0x61, 0x66, 0x61, 0x79, 0x5c, 0x44, 0x65, 0x76, 0x5c, 0x54, 0x79, 0x70,
|
||||
0x65, 0x73, 0x5c, 0x53, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x5c, 0x56, 0x33, 0x5c, 0x47, 0x50, 0x42,
|
||||
0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x1d, 0x52, 0x61, 0x66, 0x61, 0x79,
|
||||
0x3a, 0x3a, 0x44, 0x65, 0x76, 0x3a, 0x3a, 0x54, 0x79, 0x70, 0x65, 0x73, 0x3a, 0x3a, 0x53, 0x79,
|
||||
0x73, 0x74, 0x65, 0x6d, 0x3a, 0x3a, 0x56, 0x33, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
|
||||
}
|
||||
|
||||
var (
|
||||
file_proto_types_systempb_v3_organization_proto_rawDescOnce sync.Once
|
||||
file_proto_types_systempb_v3_organization_proto_rawDescData = file_proto_types_systempb_v3_organization_proto_rawDesc
|
||||
)
|
||||
|
||||
func file_proto_types_systempb_v3_organization_proto_rawDescGZIP() []byte {
|
||||
file_proto_types_systempb_v3_organization_proto_rawDescOnce.Do(func() {
|
||||
file_proto_types_systempb_v3_organization_proto_rawDescData = protoimpl.X.CompressGZIP(file_proto_types_systempb_v3_organization_proto_rawDescData)
|
||||
})
|
||||
return file_proto_types_systempb_v3_organization_proto_rawDescData
|
||||
}
|
||||
|
||||
var file_proto_types_systempb_v3_organization_proto_msgTypes = make([]protoimpl.MessageInfo, 5)
|
||||
var file_proto_types_systempb_v3_organization_proto_goTypes = []interface{}{
|
||||
(*Lockout)(nil), // 0: rafay.dev.types.system.v3.Lockout
|
||||
(*OrganizationSettings)(nil), // 1: rafay.dev.types.system.v3.OrganizationSettings
|
||||
(*OrganizationSpec)(nil), // 2: rafay.dev.types.system.v3.OrganizationSpec
|
||||
(*Organization)(nil), // 3: rafay.dev.types.system.v3.Organization
|
||||
(*OrganizationList)(nil), // 4: rafay.dev.types.system.v3.OrganizationList
|
||||
(*v3.Metadata)(nil), // 5: rafay.dev.types.common.v3.Metadata
|
||||
(*v3.Status)(nil), // 6: rafay.dev.types.common.v3.Status
|
||||
(*v3.ListMetadata)(nil), // 7: rafay.dev.types.common.v3.ListMetadata
|
||||
}
|
||||
var file_proto_types_systempb_v3_organization_proto_depIdxs = []int32{
|
||||
0, // 0: rafay.dev.types.system.v3.OrganizationSettings.lockout:type_name -> rafay.dev.types.system.v3.Lockout
|
||||
1, // 1: rafay.dev.types.system.v3.OrganizationSpec.settings:type_name -> rafay.dev.types.system.v3.OrganizationSettings
|
||||
5, // 2: rafay.dev.types.system.v3.Organization.metadata:type_name -> rafay.dev.types.common.v3.Metadata
|
||||
2, // 3: rafay.dev.types.system.v3.Organization.spec:type_name -> rafay.dev.types.system.v3.OrganizationSpec
|
||||
6, // 4: rafay.dev.types.system.v3.Organization.status:type_name -> rafay.dev.types.common.v3.Status
|
||||
7, // 5: rafay.dev.types.system.v3.OrganizationList.metadata:type_name -> rafay.dev.types.common.v3.ListMetadata
|
||||
3, // 6: rafay.dev.types.system.v3.OrganizationList.items:type_name -> rafay.dev.types.system.v3.Organization
|
||||
7, // [7:7] is the sub-list for method output_type
|
||||
7, // [7:7] is the sub-list for method input_type
|
||||
7, // [7:7] is the sub-list for extension type_name
|
||||
7, // [7:7] is the sub-list for extension extendee
|
||||
0, // [0:7] is the sub-list for field type_name
|
||||
}
|
||||
|
||||
func init() { file_proto_types_systempb_v3_organization_proto_init() }
|
||||
func file_proto_types_systempb_v3_organization_proto_init() {
|
||||
if File_proto_types_systempb_v3_organization_proto != nil {
|
||||
return
|
||||
}
|
||||
if !protoimpl.UnsafeEnabled {
|
||||
file_proto_types_systempb_v3_organization_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*Lockout); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_proto_types_systempb_v3_organization_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*OrganizationSettings); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_proto_types_systempb_v3_organization_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*OrganizationSpec); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_proto_types_systempb_v3_organization_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*Organization); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_proto_types_systempb_v3_organization_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*OrganizationList); 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_systempb_v3_organization_proto_rawDesc,
|
||||
NumEnums: 0,
|
||||
NumMessages: 5,
|
||||
NumExtensions: 0,
|
||||
NumServices: 0,
|
||||
},
|
||||
GoTypes: file_proto_types_systempb_v3_organization_proto_goTypes,
|
||||
DependencyIndexes: file_proto_types_systempb_v3_organization_proto_depIdxs,
|
||||
MessageInfos: file_proto_types_systempb_v3_organization_proto_msgTypes,
|
||||
}.Build()
|
||||
File_proto_types_systempb_v3_organization_proto = out.File
|
||||
file_proto_types_systempb_v3_organization_proto_rawDesc = nil
|
||||
file_proto_types_systempb_v3_organization_proto_goTypes = nil
|
||||
file_proto_types_systempb_v3_organization_proto_depIdxs = nil
|
||||
}
|
||||
183
components/adminsrv/proto/types/systempb/v3/organization.proto
Normal file
183
components/adminsrv/proto/types/systempb/v3/organization.proto
Normal file
@@ -0,0 +1,183 @@
|
||||
syntax = "proto3";
|
||||
package rafay.dev.types.system.v3;
|
||||
|
||||
import "proto/types/commonpb/v3/common.proto";
|
||||
import "protoc-gen-openapiv2/options/annotations.proto";
|
||||
|
||||
message Lockout {
|
||||
bool enabled = 1
|
||||
[ (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
|
||||
title : "Enabled"
|
||||
description : "Is lockout settings enabled?"
|
||||
} ];
|
||||
int32 period_min = 2
|
||||
[ (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
|
||||
title : "Period Minutes"
|
||||
description : "Lockout period in Minutes"
|
||||
} ];
|
||||
int32 attempts = 3
|
||||
[ (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
|
||||
title : "Attempts"
|
||||
description : "Max number of attempts before lockout"
|
||||
} ];
|
||||
}
|
||||
|
||||
message OrganizationSettings {
|
||||
Lockout lockout = 1
|
||||
[ (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
|
||||
title : "Lockout"
|
||||
description : "Lockout settings of the organization"
|
||||
} ];
|
||||
int32 idleLogoutMin = 2
|
||||
[ (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
|
||||
title : "Idle Logout Minutes"
|
||||
description : "Idle Logout time in minutes"
|
||||
} ];
|
||||
}
|
||||
|
||||
message OrganizationSpec {
|
||||
string billingAddress = 1
|
||||
[ (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
|
||||
title : "Billing Address"
|
||||
description : "Billing address of the organization"
|
||||
} ];
|
||||
bool active = 2
|
||||
[ (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
|
||||
title : "Active"
|
||||
description : "Represents if this organization is active"
|
||||
} ];
|
||||
bool approved = 3
|
||||
[ (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
|
||||
title : "Approved"
|
||||
description : "Is this organization active"
|
||||
} ];
|
||||
string type = 4
|
||||
[ (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
|
||||
title : "Type"
|
||||
description : "Type of organization"
|
||||
} ];
|
||||
string addressLine1 = 5
|
||||
[ (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
|
||||
title : "Address Line 1"
|
||||
description : "Address of the organization"
|
||||
} ];
|
||||
string addressLine2 = 6
|
||||
[ (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
|
||||
title : "Address Line 2"
|
||||
description : "Address of the organization"
|
||||
} ];
|
||||
string city = 7
|
||||
[ (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
|
||||
title : "City"
|
||||
description : "City"
|
||||
} ];
|
||||
string country = 8
|
||||
[ (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
|
||||
title : "Country"
|
||||
description : "Country of the organization"
|
||||
} ];
|
||||
string phone = 9
|
||||
[ (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
|
||||
title : "Phone"
|
||||
description : "Phone number of the organization"
|
||||
} ];
|
||||
string state = 10
|
||||
[ (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
|
||||
title : "State"
|
||||
description : "State of the organization"
|
||||
} ];
|
||||
string zipcode = 11
|
||||
[ (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
|
||||
title : "Zipcode"
|
||||
description : "Zipcode"
|
||||
} ];
|
||||
bool isPrivate = 12
|
||||
[ (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
|
||||
title : "Is Private"
|
||||
description : "Is Private Organization"
|
||||
} ];
|
||||
bool isTotpEnabled = 13
|
||||
[ (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
|
||||
title : "Is TOTP Enabled"
|
||||
description : "Is TOTP enabled at organization level"
|
||||
} ];
|
||||
bool areClustersShared = 14
|
||||
[ (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
|
||||
title : "Clusters Shared"
|
||||
description : "Are clusters shared"
|
||||
} ];
|
||||
OrganizationSettings settings = 15
|
||||
[ (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
|
||||
title : "Settings"
|
||||
description : "Various settings like lockout, auto-logout configuration"
|
||||
} ];
|
||||
}
|
||||
|
||||
message Organization {
|
||||
option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_schema) = {
|
||||
json_schema : {
|
||||
title : "Organization"
|
||||
description : "Organization"
|
||||
required : [ "apiVersion", "kind", "metadata", "spec" ]
|
||||
}
|
||||
};
|
||||
string apiVersion = 1
|
||||
[ (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
|
||||
title : "API Version",
|
||||
description : "API Version of the resource"
|
||||
default : "system.k8smgmt.io/v3"
|
||||
read_only : true
|
||||
} ];
|
||||
string kind = 2
|
||||
[ (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
|
||||
title : "Kind",
|
||||
description : "Kind of the resource"
|
||||
default : "Organization"
|
||||
read_only : true
|
||||
} ];
|
||||
rafay.dev.types.common.v3.Metadata metadata = 3
|
||||
[ (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
|
||||
title : "Metadata",
|
||||
description : "Metadata of the resource"
|
||||
} ];
|
||||
OrganizationSpec spec = 4
|
||||
[ (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
|
||||
title : "Spec",
|
||||
description : "Spec of the 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 OrganizationList {
|
||||
string apiVersion = 1
|
||||
[ (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
|
||||
title : "API Version",
|
||||
description : "API Version of the list resource"
|
||||
default : "system.k8smgmt.io/v3"
|
||||
read_only : true
|
||||
} ];
|
||||
string kind = 2
|
||||
[ (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
|
||||
title : "Kind",
|
||||
description : "Kind of the list resource"
|
||||
default : "OrganizationList"
|
||||
read_only : true
|
||||
} ];
|
||||
rafay.dev.types.common.v3.ListMetadata metadata = 3
|
||||
[ (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
|
||||
title : "ListMetadata",
|
||||
description : "Metadata of the list resource"
|
||||
read_only : true
|
||||
} ];
|
||||
repeated Organization items = 4
|
||||
[ (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
|
||||
title : "Items",
|
||||
description : "List of the resources"
|
||||
read_only : true
|
||||
} ];
|
||||
}
|
||||
452
components/adminsrv/proto/types/systempb/v3/partner.pb.go
Normal file
452
components/adminsrv/proto/types/systempb/v3/partner.pb.go
Normal file
@@ -0,0 +1,452 @@
|
||||
// Code generated by protoc-gen-go. DO NOT EDIT.
|
||||
// versions:
|
||||
// protoc-gen-go v1.27.1
|
||||
// protoc (unknown)
|
||||
// source: proto/types/systempb/v3/partner.proto
|
||||
|
||||
package systemv3
|
||||
|
||||
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"
|
||||
structpb "google.golang.org/protobuf/types/known/structpb"
|
||||
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 PartnerSpec struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
Host string `protobuf:"bytes,1,opt,name=host,proto3" json:"host,omitempty"`
|
||||
Domain string `protobuf:"bytes,2,opt,name=domain,proto3" json:"domain,omitempty"`
|
||||
TosLink string `protobuf:"bytes,3,opt,name=tosLink,proto3" json:"tosLink,omitempty"`
|
||||
LogoLink string `protobuf:"bytes,4,opt,name=logoLink,proto3" json:"logoLink,omitempty"`
|
||||
NotificationEmail string `protobuf:"bytes,5,opt,name=notificationEmail,proto3" json:"notificationEmail,omitempty"`
|
||||
HelpdeskEmail string `protobuf:"bytes,6,opt,name=helpdeskEmail,proto3" json:"helpdeskEmail,omitempty"`
|
||||
ProductName string `protobuf:"bytes,7,opt,name=productName,proto3" json:"productName,omitempty"`
|
||||
SupportTeamName string `protobuf:"bytes,8,opt,name=supportTeamName,proto3" json:"supportTeamName,omitempty"`
|
||||
OpsHost string `protobuf:"bytes,9,opt,name=opsHost,proto3" json:"opsHost,omitempty"`
|
||||
FavIconLink string `protobuf:"bytes,10,opt,name=favIconLink,proto3" json:"favIconLink,omitempty"`
|
||||
IsTOTPEnabled bool `protobuf:"varint,11,opt,name=isTOTPEnabled,proto3" json:"isTOTPEnabled,omitempty"`
|
||||
Settings *structpb.Struct `protobuf:"bytes,12,opt,name=settings,proto3" json:"settings,omitempty"`
|
||||
}
|
||||
|
||||
func (x *PartnerSpec) Reset() {
|
||||
*x = PartnerSpec{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_proto_types_systempb_v3_partner_proto_msgTypes[0]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
}
|
||||
|
||||
func (x *PartnerSpec) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*PartnerSpec) ProtoMessage() {}
|
||||
|
||||
func (x *PartnerSpec) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_proto_types_systempb_v3_partner_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 PartnerSpec.ProtoReflect.Descriptor instead.
|
||||
func (*PartnerSpec) Descriptor() ([]byte, []int) {
|
||||
return file_proto_types_systempb_v3_partner_proto_rawDescGZIP(), []int{0}
|
||||
}
|
||||
|
||||
func (x *PartnerSpec) GetHost() string {
|
||||
if x != nil {
|
||||
return x.Host
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *PartnerSpec) GetDomain() string {
|
||||
if x != nil {
|
||||
return x.Domain
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *PartnerSpec) GetTosLink() string {
|
||||
if x != nil {
|
||||
return x.TosLink
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *PartnerSpec) GetLogoLink() string {
|
||||
if x != nil {
|
||||
return x.LogoLink
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *PartnerSpec) GetNotificationEmail() string {
|
||||
if x != nil {
|
||||
return x.NotificationEmail
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *PartnerSpec) GetHelpdeskEmail() string {
|
||||
if x != nil {
|
||||
return x.HelpdeskEmail
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *PartnerSpec) GetProductName() string {
|
||||
if x != nil {
|
||||
return x.ProductName
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *PartnerSpec) GetSupportTeamName() string {
|
||||
if x != nil {
|
||||
return x.SupportTeamName
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *PartnerSpec) GetOpsHost() string {
|
||||
if x != nil {
|
||||
return x.OpsHost
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *PartnerSpec) GetFavIconLink() string {
|
||||
if x != nil {
|
||||
return x.FavIconLink
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *PartnerSpec) GetIsTOTPEnabled() bool {
|
||||
if x != nil {
|
||||
return x.IsTOTPEnabled
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
func (x *PartnerSpec) GetSettings() *structpb.Struct {
|
||||
if x != nil {
|
||||
return x.Settings
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
type Partner 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 *PartnerSpec `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 *Partner) Reset() {
|
||||
*x = Partner{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_proto_types_systempb_v3_partner_proto_msgTypes[1]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
}
|
||||
|
||||
func (x *Partner) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*Partner) ProtoMessage() {}
|
||||
|
||||
func (x *Partner) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_proto_types_systempb_v3_partner_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 Partner.ProtoReflect.Descriptor instead.
|
||||
func (*Partner) Descriptor() ([]byte, []int) {
|
||||
return file_proto_types_systempb_v3_partner_proto_rawDescGZIP(), []int{1}
|
||||
}
|
||||
|
||||
func (x *Partner) GetApiVersion() string {
|
||||
if x != nil {
|
||||
return x.ApiVersion
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *Partner) GetKind() string {
|
||||
if x != nil {
|
||||
return x.Kind
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *Partner) GetMetadata() *v3.Metadata {
|
||||
if x != nil {
|
||||
return x.Metadata
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (x *Partner) GetSpec() *PartnerSpec {
|
||||
if x != nil {
|
||||
return x.Spec
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (x *Partner) GetStatus() *v3.Status {
|
||||
if x != nil {
|
||||
return x.Status
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
var File_proto_types_systempb_v3_partner_proto protoreflect.FileDescriptor
|
||||
|
||||
var file_proto_types_systempb_v3_partner_proto_rawDesc = []byte{
|
||||
0x0a, 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, 0x61, 0x72, 0x74, 0x6e, 0x65,
|
||||
0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x19, 0x72, 0x61, 0x66, 0x61, 0x79, 0x2e, 0x64,
|
||||
0x65, 0x76, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x73, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x2e,
|
||||
0x76, 0x33, 0x1a, 0x1c, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f,
|
||||
0x62, 0x75, 0x66, 0x2f, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f,
|
||||
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, 0xe3, 0x07, 0x0a, 0x0b, 0x50, 0x61, 0x72, 0x74, 0x6e,
|
||||
0x65, 0x72, 0x53, 0x70, 0x65, 0x63, 0x12, 0x32, 0x0a, 0x04, 0x68, 0x6f, 0x73, 0x74, 0x18, 0x01,
|
||||
0x20, 0x01, 0x28, 0x09, 0x42, 0x1e, 0x92, 0x41, 0x1b, 0x2a, 0x04, 0x48, 0x6f, 0x73, 0x74, 0x32,
|
||||
0x13, 0x48, 0x6f, 0x73, 0x74, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, 0x20, 0x70, 0x61, 0x72,
|
||||
0x74, 0x6e, 0x65, 0x72, 0x52, 0x04, 0x68, 0x6f, 0x73, 0x74, 0x12, 0x3a, 0x0a, 0x06, 0x64, 0x6f,
|
||||
0x6d, 0x61, 0x69, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x22, 0x92, 0x41, 0x1f, 0x2a,
|
||||
0x06, 0x44, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x32, 0x15, 0x44, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x20,
|
||||
0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, 0x20, 0x70, 0x61, 0x72, 0x74, 0x6e, 0x65, 0x72, 0x52, 0x06,
|
||||
0x64, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x12, 0x47, 0x0a, 0x07, 0x74, 0x6f, 0x73, 0x4c, 0x69, 0x6e,
|
||||
0x6b, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x42, 0x2d, 0x92, 0x41, 0x2a, 0x2a, 0x03, 0x54, 0x4f,
|
||||
0x53, 0x32, 0x23, 0x54, 0x65, 0x72, 0x6d, 0x73, 0x20, 0x6f, 0x66, 0x20, 0x73, 0x65, 0x72, 0x76,
|
||||
0x69, 0x63, 0x65, 0x20, 0x75, 0x72, 0x6c, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, 0x20, 0x70,
|
||||
0x61, 0x72, 0x74, 0x6e, 0x65, 0x72, 0x52, 0x07, 0x74, 0x6f, 0x73, 0x4c, 0x69, 0x6e, 0x6b, 0x12,
|
||||
0x3e, 0x0a, 0x08, 0x6c, 0x6f, 0x67, 0x6f, 0x4c, 0x69, 0x6e, 0x6b, 0x18, 0x04, 0x20, 0x01, 0x28,
|
||||
0x09, 0x42, 0x22, 0x92, 0x41, 0x1f, 0x2a, 0x04, 0x4c, 0x6f, 0x67, 0x6f, 0x32, 0x17, 0x4c, 0x6f,
|
||||
0x67, 0x6f, 0x20, 0x75, 0x72, 0x6c, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, 0x20, 0x70, 0x61,
|
||||
0x72, 0x74, 0x6e, 0x65, 0x72, 0x52, 0x08, 0x6c, 0x6f, 0x67, 0x6f, 0x4c, 0x69, 0x6e, 0x6b, 0x12,
|
||||
0x68, 0x0a, 0x11, 0x6e, 0x6f, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x45,
|
||||
0x6d, 0x61, 0x69, 0x6c, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x42, 0x3a, 0x92, 0x41, 0x37, 0x2a,
|
||||
0x12, 0x4e, 0x6f, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x45, 0x6d,
|
||||
0x61, 0x69, 0x6c, 0x32, 0x21, 0x4e, 0x6f, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f,
|
||||
0x6e, 0x20, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, 0x20, 0x70,
|
||||
0x61, 0x72, 0x74, 0x6e, 0x65, 0x72, 0x52, 0x11, 0x6e, 0x6f, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61,
|
||||
0x74, 0x69, 0x6f, 0x6e, 0x45, 0x6d, 0x61, 0x69, 0x6c, 0x12, 0x58, 0x0a, 0x0d, 0x68, 0x65, 0x6c,
|
||||
0x70, 0x64, 0x65, 0x73, 0x6b, 0x45, 0x6d, 0x61, 0x69, 0x6c, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09,
|
||||
0x42, 0x32, 0x92, 0x41, 0x2f, 0x2a, 0x0e, 0x48, 0x65, 0x6c, 0x70, 0x64, 0x65, 0x73, 0x6b, 0x20,
|
||||
0x45, 0x6d, 0x61, 0x69, 0x6c, 0x32, 0x1d, 0x48, 0x65, 0x6c, 0x70, 0x64, 0x65, 0x73, 0x6b, 0x20,
|
||||
0x65, 0x6d, 0x61, 0x69, 0x6c, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, 0x20, 0x70, 0x61, 0x72,
|
||||
0x74, 0x6e, 0x65, 0x72, 0x52, 0x0d, 0x68, 0x65, 0x6c, 0x70, 0x64, 0x65, 0x73, 0x6b, 0x45, 0x6d,
|
||||
0x61, 0x69, 0x6c, 0x12, 0x41, 0x0a, 0x0b, 0x70, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74, 0x4e, 0x61,
|
||||
0x6d, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x42, 0x1f, 0x92, 0x41, 0x1c, 0x2a, 0x0c, 0x50,
|
||||
0x72, 0x6f, 0x64, 0x75, 0x63, 0x74, 0x20, 0x4e, 0x61, 0x6d, 0x65, 0x32, 0x0c, 0x50, 0x72, 0x6f,
|
||||
0x64, 0x75, 0x63, 0x74, 0x20, 0x4e, 0x61, 0x6d, 0x65, 0x52, 0x0b, 0x70, 0x72, 0x6f, 0x64, 0x75,
|
||||
0x63, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x53, 0x0a, 0x0f, 0x73, 0x75, 0x70, 0x70, 0x6f, 0x72,
|
||||
0x74, 0x54, 0x65, 0x61, 0x6d, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x42,
|
||||
0x29, 0x92, 0x41, 0x26, 0x2a, 0x11, 0x53, 0x75, 0x70, 0x70, 0x6f, 0x72, 0x74, 0x20, 0x54, 0x65,
|
||||
0x61, 0x6d, 0x20, 0x4e, 0x61, 0x6d, 0x65, 0x32, 0x11, 0x53, 0x75, 0x70, 0x70, 0x6f, 0x72, 0x74,
|
||||
0x20, 0x54, 0x65, 0x61, 0x6d, 0x20, 0x4e, 0x61, 0x6d, 0x65, 0x52, 0x0f, 0x73, 0x75, 0x70, 0x70,
|
||||
0x6f, 0x72, 0x74, 0x54, 0x65, 0x61, 0x6d, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x47, 0x0a, 0x07, 0x6f,
|
||||
0x70, 0x73, 0x48, 0x6f, 0x73, 0x74, 0x18, 0x09, 0x20, 0x01, 0x28, 0x09, 0x42, 0x2d, 0x92, 0x41,
|
||||
0x2a, 0x2a, 0x08, 0x4f, 0x50, 0x53, 0x20, 0x48, 0x6f, 0x73, 0x74, 0x32, 0x1e, 0x4f, 0x70, 0x65,
|
||||
0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x20, 0x68, 0x6f, 0x73, 0x74, 0x20, 0x6f, 0x66, 0x20,
|
||||
0x74, 0x68, 0x65, 0x20, 0x70, 0x61, 0x72, 0x74, 0x6e, 0x65, 0x72, 0x52, 0x07, 0x6f, 0x70, 0x73,
|
||||
0x48, 0x6f, 0x73, 0x74, 0x12, 0x43, 0x0a, 0x0b, 0x66, 0x61, 0x76, 0x49, 0x63, 0x6f, 0x6e, 0x4c,
|
||||
0x69, 0x6e, 0x6b, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x09, 0x42, 0x21, 0x92, 0x41, 0x1e, 0x2a, 0x0d,
|
||||
0x46, 0x61, 0x76, 0x20, 0x49, 0x63, 0x6f, 0x6e, 0x20, 0x4c, 0x69, 0x6e, 0x6b, 0x32, 0x0d, 0x46,
|
||||
0x61, 0x76, 0x20, 0x49, 0x63, 0x6f, 0x6e, 0x20, 0x4c, 0x69, 0x6e, 0x6b, 0x52, 0x0b, 0x66, 0x61,
|
||||
0x76, 0x49, 0x63, 0x6f, 0x6e, 0x4c, 0x69, 0x6e, 0x6b, 0x12, 0x5f, 0x0a, 0x0d, 0x69, 0x73, 0x54,
|
||||
0x4f, 0x54, 0x50, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x08,
|
||||
0x42, 0x39, 0x92, 0x41, 0x36, 0x2a, 0x0c, 0x54, 0x4f, 0x54, 0x50, 0x20, 0x45, 0x6e, 0x61, 0x62,
|
||||
0x6c, 0x65, 0x64, 0x32, 0x26, 0x54, 0x4f, 0x54, 0x50, 0x20, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65,
|
||||
0x64, 0x20, 0x66, 0x6c, 0x61, 0x67, 0x20, 0x61, 0x74, 0x20, 0x74, 0x68, 0x65, 0x20, 0x70, 0x61,
|
||||
0x72, 0x74, 0x6e, 0x65, 0x72, 0x20, 0x6c, 0x65, 0x76, 0x65, 0x6c, 0x52, 0x0d, 0x69, 0x73, 0x54,
|
||||
0x4f, 0x54, 0x50, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x12, 0x5b, 0x0a, 0x08, 0x73, 0x65,
|
||||
0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x67,
|
||||
0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53,
|
||||
0x74, 0x72, 0x75, 0x63, 0x74, 0x42, 0x26, 0x92, 0x41, 0x23, 0x2a, 0x08, 0x53, 0x65, 0x74, 0x74,
|
||||
0x69, 0x6e, 0x67, 0x73, 0x32, 0x17, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x20, 0x6f,
|
||||
0x66, 0x20, 0x74, 0x68, 0x65, 0x20, 0x70, 0x61, 0x72, 0x74, 0x6e, 0x65, 0x72, 0x52, 0x08, 0x73,
|
||||
0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x3a, 0x33, 0x92, 0x41, 0x30, 0x0a, 0x2e, 0x2a, 0x15,
|
||||
0x50, 0x61, 0x72, 0x74, 0x6e, 0x65, 0x72, 0x20, 0x53, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x63,
|
||||
0x61, 0x74, 0x69, 0x6f, 0x6e, 0x32, 0x15, 0x50, 0x61, 0x72, 0x74, 0x6e, 0x65, 0x72, 0x20, 0x53,
|
||||
0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x98, 0x04, 0x0a,
|
||||
0x07, 0x50, 0x61, 0x72, 0x74, 0x6e, 0x65, 0x72, 0x12, 0x65, 0x0a, 0x0a, 0x61, 0x70, 0x69, 0x56,
|
||||
0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x45, 0x92, 0x41,
|
||||
0x42, 0x2a, 0x0b, 0x41, 0x50, 0x49, 0x20, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x32, 0x1b,
|
||||
0x41, 0x50, 0x49, 0x20, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x20, 0x6f, 0x66, 0x20, 0x74,
|
||||
0x68, 0x65, 0x20, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x3a, 0x14, 0x73, 0x79, 0x73,
|
||||
0x74, 0x65, 0x6d, 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,
|
||||
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, 0x14, 0x4b, 0x69, 0x6e, 0x64, 0x20, 0x6f,
|
||||
0x66, 0x20, 0x74, 0x68, 0x65, 0x20, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x3a, 0x07,
|
||||
0x50, 0x61, 0x72, 0x74, 0x6e, 0x65, 0x72, 0x40, 0x01, 0x52, 0x04, 0x6b, 0x69, 0x6e, 0x64, 0x12,
|
||||
0x68, 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, 0x27, 0x92, 0x41, 0x24, 0x2a, 0x08, 0x4d, 0x65, 0x74,
|
||||
0x61, 0x64, 0x61, 0x74, 0x61, 0x32, 0x18, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x20,
|
||||
0x6f, 0x66, 0x20, 0x74, 0x68, 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, 0x26, 0x2e, 0x72, 0x61, 0x66, 0x61, 0x79, 0x2e,
|
||||
0x64, 0x65, 0x76, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x73, 0x79, 0x73, 0x74, 0x65, 0x6d,
|
||||
0x2e, 0x76, 0x33, 0x2e, 0x50, 0x61, 0x72, 0x74, 0x6e, 0x65, 0x72, 0x53, 0x70, 0x65, 0x63, 0x42,
|
||||
0x1f, 0x92, 0x41, 0x1c, 0x2a, 0x04, 0x53, 0x70, 0x65, 0x63, 0x32, 0x14, 0x53, 0x70, 0x65, 0x63,
|
||||
0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 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, 0x3d, 0x92, 0x41, 0x3a, 0x0a, 0x38, 0x2a,
|
||||
0x07, 0x50, 0x61, 0x72, 0x74, 0x6e, 0x65, 0x72, 0x32, 0x07, 0x50, 0x61, 0x72, 0x74, 0x6e, 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, 0x42, 0x90, 0x02, 0x0a, 0x1d, 0x63, 0x6f, 0x6d, 0x2e,
|
||||
0x72, 0x61, 0x66, 0x61, 0x79, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e,
|
||||
0x73, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x2e, 0x76, 0x33, 0x42, 0x0c, 0x50, 0x61, 0x72, 0x74, 0x6e,
|
||||
0x65, 0x72, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x58, 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, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x73,
|
||||
0x72, 0x76, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2f, 0x73,
|
||||
0x79, 0x73, 0x74, 0x65, 0x6d, 0x70, 0x62, 0x2f, 0x76, 0x33, 0x3b, 0x73, 0x79, 0x73, 0x74, 0x65,
|
||||
0x6d, 0x76, 0x33, 0xa2, 0x02, 0x04, 0x52, 0x44, 0x54, 0x53, 0xaa, 0x02, 0x19, 0x52, 0x61, 0x66,
|
||||
0x61, 0x79, 0x2e, 0x44, 0x65, 0x76, 0x2e, 0x54, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x53, 0x79, 0x73,
|
||||
0x74, 0x65, 0x6d, 0x2e, 0x56, 0x33, 0xca, 0x02, 0x19, 0x52, 0x61, 0x66, 0x61, 0x79, 0x5c, 0x44,
|
||||
0x65, 0x76, 0x5c, 0x54, 0x79, 0x70, 0x65, 0x73, 0x5c, 0x53, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x5c,
|
||||
0x56, 0x33, 0xe2, 0x02, 0x25, 0x52, 0x61, 0x66, 0x61, 0x79, 0x5c, 0x44, 0x65, 0x76, 0x5c, 0x54,
|
||||
0x79, 0x70, 0x65, 0x73, 0x5c, 0x53, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x5c, 0x56, 0x33, 0x5c, 0x47,
|
||||
0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x1d, 0x52, 0x61, 0x66,
|
||||
0x61, 0x79, 0x3a, 0x3a, 0x44, 0x65, 0x76, 0x3a, 0x3a, 0x54, 0x79, 0x70, 0x65, 0x73, 0x3a, 0x3a,
|
||||
0x53, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x3a, 0x3a, 0x56, 0x33, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74,
|
||||
0x6f, 0x33,
|
||||
}
|
||||
|
||||
var (
|
||||
file_proto_types_systempb_v3_partner_proto_rawDescOnce sync.Once
|
||||
file_proto_types_systempb_v3_partner_proto_rawDescData = file_proto_types_systempb_v3_partner_proto_rawDesc
|
||||
)
|
||||
|
||||
func file_proto_types_systempb_v3_partner_proto_rawDescGZIP() []byte {
|
||||
file_proto_types_systempb_v3_partner_proto_rawDescOnce.Do(func() {
|
||||
file_proto_types_systempb_v3_partner_proto_rawDescData = protoimpl.X.CompressGZIP(file_proto_types_systempb_v3_partner_proto_rawDescData)
|
||||
})
|
||||
return file_proto_types_systempb_v3_partner_proto_rawDescData
|
||||
}
|
||||
|
||||
var file_proto_types_systempb_v3_partner_proto_msgTypes = make([]protoimpl.MessageInfo, 2)
|
||||
var file_proto_types_systempb_v3_partner_proto_goTypes = []interface{}{
|
||||
(*PartnerSpec)(nil), // 0: rafay.dev.types.system.v3.PartnerSpec
|
||||
(*Partner)(nil), // 1: rafay.dev.types.system.v3.Partner
|
||||
(*structpb.Struct)(nil), // 2: google.protobuf.Struct
|
||||
(*v3.Metadata)(nil), // 3: rafay.dev.types.common.v3.Metadata
|
||||
(*v3.Status)(nil), // 4: rafay.dev.types.common.v3.Status
|
||||
}
|
||||
var file_proto_types_systempb_v3_partner_proto_depIdxs = []int32{
|
||||
2, // 0: rafay.dev.types.system.v3.PartnerSpec.settings:type_name -> google.protobuf.Struct
|
||||
3, // 1: rafay.dev.types.system.v3.Partner.metadata:type_name -> rafay.dev.types.common.v3.Metadata
|
||||
0, // 2: rafay.dev.types.system.v3.Partner.spec:type_name -> rafay.dev.types.system.v3.PartnerSpec
|
||||
4, // 3: rafay.dev.types.system.v3.Partner.status:type_name -> rafay.dev.types.common.v3.Status
|
||||
4, // [4:4] is the sub-list for method output_type
|
||||
4, // [4:4] is the sub-list for method input_type
|
||||
4, // [4:4] is the sub-list for extension type_name
|
||||
4, // [4:4] is the sub-list for extension extendee
|
||||
0, // [0:4] is the sub-list for field type_name
|
||||
}
|
||||
|
||||
func init() { file_proto_types_systempb_v3_partner_proto_init() }
|
||||
func file_proto_types_systempb_v3_partner_proto_init() {
|
||||
if File_proto_types_systempb_v3_partner_proto != nil {
|
||||
return
|
||||
}
|
||||
if !protoimpl.UnsafeEnabled {
|
||||
file_proto_types_systempb_v3_partner_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*PartnerSpec); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_proto_types_systempb_v3_partner_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*Partner); 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_systempb_v3_partner_proto_rawDesc,
|
||||
NumEnums: 0,
|
||||
NumMessages: 2,
|
||||
NumExtensions: 0,
|
||||
NumServices: 0,
|
||||
},
|
||||
GoTypes: file_proto_types_systempb_v3_partner_proto_goTypes,
|
||||
DependencyIndexes: file_proto_types_systempb_v3_partner_proto_depIdxs,
|
||||
MessageInfos: file_proto_types_systempb_v3_partner_proto_msgTypes,
|
||||
}.Build()
|
||||
File_proto_types_systempb_v3_partner_proto = out.File
|
||||
file_proto_types_systempb_v3_partner_proto_rawDesc = nil
|
||||
file_proto_types_systempb_v3_partner_proto_goTypes = nil
|
||||
file_proto_types_systempb_v3_partner_proto_depIdxs = nil
|
||||
}
|
||||
115
components/adminsrv/proto/types/systempb/v3/partner.proto
Normal file
115
components/adminsrv/proto/types/systempb/v3/partner.proto
Normal file
@@ -0,0 +1,115 @@
|
||||
syntax = "proto3";
|
||||
package rafay.dev.types.system.v3;
|
||||
|
||||
import "google/protobuf/struct.proto";
|
||||
import "proto/types/commonpb/v3/common.proto";
|
||||
import "protoc-gen-openapiv2/options/annotations.proto";
|
||||
|
||||
message PartnerSpec {
|
||||
option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_schema) = {
|
||||
json_schema : {
|
||||
title : "Partner Specification"
|
||||
description : "Partner Specification"
|
||||
}
|
||||
};
|
||||
string host = 1
|
||||
[ (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
|
||||
title : "Host"
|
||||
description : "Host of the partner"
|
||||
} ];
|
||||
string domain = 2
|
||||
[ (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
|
||||
title : "Domain"
|
||||
description : "Domain of the partner"
|
||||
} ];
|
||||
string tosLink = 3
|
||||
[ (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
|
||||
title : "TOS"
|
||||
description : "Terms of service url of the partner"
|
||||
} ];
|
||||
string logoLink = 4
|
||||
[ (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
|
||||
title : "Logo"
|
||||
description : "Logo url of the partner"
|
||||
} ];
|
||||
string notificationEmail = 5
|
||||
[ (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
|
||||
title : "Notification Email"
|
||||
description : "Notification email of the partner"
|
||||
} ];
|
||||
string helpdeskEmail = 6
|
||||
[ (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
|
||||
title : "Helpdesk Email"
|
||||
description : "Helpdesk email of the partner"
|
||||
} ];
|
||||
string productName = 7
|
||||
[ (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
|
||||
title : "Product Name"
|
||||
description : "Product Name"
|
||||
} ];
|
||||
string supportTeamName = 8
|
||||
[ (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
|
||||
title : "Support Team Name"
|
||||
description : "Support Team Name"
|
||||
} ];
|
||||
string opsHost = 9
|
||||
[ (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
|
||||
title : "OPS Host"
|
||||
description : "Operations host of the partner"
|
||||
} ];
|
||||
string favIconLink = 10
|
||||
[ (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
|
||||
title : "Fav Icon Link"
|
||||
description : "Fav Icon Link"
|
||||
} ];
|
||||
bool isTOTPEnabled = 11
|
||||
[ (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
|
||||
title : "TOTP Enabled"
|
||||
description : "TOTP Enabled flag at the partner level"
|
||||
} ];
|
||||
google.protobuf.Struct settings = 12
|
||||
[ (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
|
||||
title : "Settings"
|
||||
description : "Settings of the partner"
|
||||
} ];
|
||||
}
|
||||
|
||||
message Partner {
|
||||
option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_schema) = {
|
||||
json_schema : {
|
||||
title : "Partner"
|
||||
description : "Partner"
|
||||
required : [ "apiVersion", "kind", "metadata", "spec" ]
|
||||
}
|
||||
};
|
||||
string apiVersion = 1
|
||||
[ (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
|
||||
title : "API Version",
|
||||
description : "API Version of the resource"
|
||||
default : "system.k8smgmt.io/v3"
|
||||
read_only : true
|
||||
} ];
|
||||
string kind = 2
|
||||
[ (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
|
||||
title : "Kind",
|
||||
description : "Kind of the resource"
|
||||
default : "Partner"
|
||||
read_only : true
|
||||
} ];
|
||||
rafay.dev.types.common.v3.Metadata metadata = 3
|
||||
[ (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
|
||||
title : "Metadata",
|
||||
description : "Metadata of the resource"
|
||||
} ];
|
||||
PartnerSpec spec = 4
|
||||
[ (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
|
||||
title : "Spec",
|
||||
description : "Spec of the 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
|
||||
} ];
|
||||
}
|
||||
425
components/adminsrv/proto/types/systempb/v3/project.pb.go
Normal file
425
components/adminsrv/proto/types/systempb/v3/project.pb.go
Normal file
@@ -0,0 +1,425 @@
|
||||
// Code generated by protoc-gen-go. DO NOT EDIT.
|
||||
// versions:
|
||||
// protoc-gen-go v1.27.1
|
||||
// protoc (unknown)
|
||||
// source: proto/types/systempb/v3/project.proto
|
||||
|
||||
package systemv3
|
||||
|
||||
import (
|
||||
v3 "github.com/RafaySystems/rcloud-base/components/common/proto/types/commonpb/v3"
|
||||
_ "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 ProjectSpec struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
Default bool `protobuf:"varint,1,opt,name=default,proto3" json:"default,omitempty"`
|
||||
}
|
||||
|
||||
func (x *ProjectSpec) Reset() {
|
||||
*x = ProjectSpec{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_proto_types_systempb_v3_project_proto_msgTypes[0]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
}
|
||||
|
||||
func (x *ProjectSpec) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*ProjectSpec) ProtoMessage() {}
|
||||
|
||||
func (x *ProjectSpec) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_proto_types_systempb_v3_project_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 ProjectSpec.ProtoReflect.Descriptor instead.
|
||||
func (*ProjectSpec) Descriptor() ([]byte, []int) {
|
||||
return file_proto_types_systempb_v3_project_proto_rawDescGZIP(), []int{0}
|
||||
}
|
||||
|
||||
func (x *ProjectSpec) GetDefault() bool {
|
||||
if x != nil {
|
||||
return x.Default
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
type Project 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 *ProjectSpec `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 *Project) Reset() {
|
||||
*x = Project{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_proto_types_systempb_v3_project_proto_msgTypes[1]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
}
|
||||
|
||||
func (x *Project) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*Project) ProtoMessage() {}
|
||||
|
||||
func (x *Project) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_proto_types_systempb_v3_project_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 Project.ProtoReflect.Descriptor instead.
|
||||
func (*Project) Descriptor() ([]byte, []int) {
|
||||
return file_proto_types_systempb_v3_project_proto_rawDescGZIP(), []int{1}
|
||||
}
|
||||
|
||||
func (x *Project) GetApiVersion() string {
|
||||
if x != nil {
|
||||
return x.ApiVersion
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *Project) GetKind() string {
|
||||
if x != nil {
|
||||
return x.Kind
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *Project) GetMetadata() *v3.Metadata {
|
||||
if x != nil {
|
||||
return x.Metadata
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (x *Project) GetSpec() *ProjectSpec {
|
||||
if x != nil {
|
||||
return x.Spec
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (x *Project) GetStatus() *v3.Status {
|
||||
if x != nil {
|
||||
return x.Status
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
type ProjectList 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 []*Project `protobuf:"bytes,4,rep,name=items,proto3" json:"items,omitempty"`
|
||||
}
|
||||
|
||||
func (x *ProjectList) Reset() {
|
||||
*x = ProjectList{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_proto_types_systempb_v3_project_proto_msgTypes[2]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
}
|
||||
|
||||
func (x *ProjectList) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*ProjectList) ProtoMessage() {}
|
||||
|
||||
func (x *ProjectList) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_proto_types_systempb_v3_project_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 ProjectList.ProtoReflect.Descriptor instead.
|
||||
func (*ProjectList) Descriptor() ([]byte, []int) {
|
||||
return file_proto_types_systempb_v3_project_proto_rawDescGZIP(), []int{2}
|
||||
}
|
||||
|
||||
func (x *ProjectList) GetApiVersion() string {
|
||||
if x != nil {
|
||||
return x.ApiVersion
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *ProjectList) GetKind() string {
|
||||
if x != nil {
|
||||
return x.Kind
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *ProjectList) GetMetadata() *v3.ListMetadata {
|
||||
if x != nil {
|
||||
return x.Metadata
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (x *ProjectList) GetItems() []*Project {
|
||||
if x != nil {
|
||||
return x.Items
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
var File_proto_types_systempb_v3_project_proto protoreflect.FileDescriptor
|
||||
|
||||
var file_proto_types_systempb_v3_project_proto_rawDesc = []byte{
|
||||
0x0a, 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, 0x12, 0x19, 0x72, 0x61, 0x66, 0x61, 0x79, 0x2e, 0x64,
|
||||
0x65, 0x76, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x73, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x2e,
|
||||
0x76, 0x33, 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, 0x1a, 0x1f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65,
|
||||
0x2f, 0x61, 0x70, 0x69, 0x2f, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x5f, 0x62, 0x65, 0x68, 0x61, 0x76,
|
||||
0x69, 0x6f, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xaf, 0x01, 0x0a, 0x0b, 0x50, 0x72,
|
||||
0x6f, 0x6a, 0x65, 0x63, 0x74, 0x53, 0x70, 0x65, 0x63, 0x12, 0x6b, 0x0a, 0x07, 0x64, 0x65, 0x66,
|
||||
0x61, 0x75, 0x6c, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x42, 0x51, 0x92, 0x41, 0x4e, 0x2a,
|
||||
0x07, 0x44, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x32, 0x43, 0x66, 0x6c, 0x61, 0x67, 0x20, 0x74,
|
||||
0x6f, 0x20, 0x69, 0x6e, 0x64, 0x69, 0x63, 0x61, 0x74, 0x65, 0x20, 0x69, 0x66, 0x20, 0x74, 0x68,
|
||||
0x69, 0x73, 0x20, 0x69, 0x73, 0x20, 0x74, 0x68, 0x65, 0x20, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c,
|
||||
0x74, 0x20, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x20, 0x69, 0x6e, 0x20, 0x74, 0x68, 0x65,
|
||||
0x20, 0x6f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x07, 0x64,
|
||||
0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x3a, 0x33, 0x92, 0x41, 0x30, 0x0a, 0x2e, 0x2a, 0x15, 0x50,
|
||||
0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x20, 0x53, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x63, 0x61,
|
||||
0x74, 0x69, 0x6f, 0x6e, 0x32, 0x15, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x20, 0x73, 0x70,
|
||||
0x65, 0x63, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x98, 0x04, 0x0a, 0x07,
|
||||
0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x12, 0x65, 0x0a, 0x0a, 0x61, 0x70, 0x69, 0x56, 0x65,
|
||||
0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x45, 0x92, 0x41, 0x42,
|
||||
0x2a, 0x0b, 0x41, 0x50, 0x49, 0x20, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x32, 0x1b, 0x41,
|
||||
0x50, 0x49, 0x20, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68,
|
||||
0x65, 0x20, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x3a, 0x14, 0x73, 0x79, 0x73, 0x74,
|
||||
0x65, 0x6d, 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, 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, 0x14, 0x4b, 0x69, 0x6e, 0x64, 0x20, 0x6f, 0x66,
|
||||
0x20, 0x74, 0x68, 0x65, 0x20, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x3a, 0x07, 0x50,
|
||||
0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x40, 0x01, 0x52, 0x04, 0x6b, 0x69, 0x6e, 0x64, 0x12, 0x68,
|
||||
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, 0x27, 0x92, 0x41, 0x24, 0x2a, 0x08, 0x4d, 0x65, 0x74, 0x61,
|
||||
0x64, 0x61, 0x74, 0x61, 0x32, 0x18, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x20, 0x6f,
|
||||
0x66, 0x20, 0x74, 0x68, 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, 0x26, 0x2e, 0x72, 0x61, 0x66, 0x61, 0x79, 0x2e, 0x64,
|
||||
0x65, 0x76, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x73, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x2e,
|
||||
0x76, 0x33, 0x2e, 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x53, 0x70, 0x65, 0x63, 0x42, 0x1f,
|
||||
0x92, 0x41, 0x1c, 0x2a, 0x04, 0x53, 0x70, 0x65, 0x63, 0x32, 0x14, 0x53, 0x70, 0x65, 0x63, 0x20,
|
||||
0x6f, 0x66, 0x20, 0x74, 0x68, 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, 0x3d, 0x92, 0x41, 0x3a, 0x0a, 0x38, 0x2a, 0x07,
|
||||
0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x32, 0x07, 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74,
|
||||
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, 0xb8, 0x03, 0x0a, 0x0b, 0x50, 0x72, 0x6f, 0x6a, 0x65,
|
||||
0x63, 0x74, 0x4c, 0x69, 0x73, 0x74, 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, 0x6c, 0x69, 0x73, 0x74, 0x20, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x3a, 0x14,
|
||||
0x73, 0x79, 0x73, 0x74, 0x65, 0x6d, 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, 0x43, 0x0a, 0x04, 0x6b, 0x69, 0x6e, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09,
|
||||
0x42, 0x2f, 0x92, 0x41, 0x2c, 0x2a, 0x04, 0x4b, 0x69, 0x6e, 0x64, 0x32, 0x19, 0x4b, 0x69, 0x6e,
|
||||
0x64, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, 0x20, 0x6c, 0x69, 0x73, 0x74, 0x20, 0x72, 0x65,
|
||||
0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x3a, 0x07, 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x40,
|
||||
0x01, 0x52, 0x04, 0x6b, 0x69, 0x6e, 0x64, 0x12, 0x77, 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, 0x32, 0x92, 0x41, 0x2f, 0x2a, 0x0c, 0x4c, 0x69, 0x73, 0x74, 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, 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,
|
||||
0x22, 0x2e, 0x72, 0x61, 0x66, 0x61, 0x79, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x74, 0x79, 0x70, 0x65,
|
||||
0x73, 0x2e, 0x73, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x2e, 0x76, 0x33, 0x2e, 0x50, 0x72, 0x6f, 0x6a,
|
||||
0x65, 0x63, 0x74, 0x42, 0x23, 0x92, 0x41, 0x20, 0x2a, 0x05, 0x49, 0x74, 0x65, 0x6d, 0x73, 0x32,
|
||||
0x15, 0x4c, 0x69, 0x73, 0x74, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, 0x20, 0x72, 0x65, 0x73,
|
||||
0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x40, 0x01, 0x52, 0x05, 0x69, 0x74, 0x65, 0x6d, 0x73, 0x3a,
|
||||
0x20, 0x92, 0x41, 0x1d, 0x0a, 0x1b, 0x2a, 0x0b, 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x4c,
|
||||
0x69, 0x73, 0x74, 0x32, 0x0c, 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x20, 0x6c, 0x69, 0x73,
|
||||
0x74, 0x42, 0x90, 0x02, 0x0a, 0x1d, 0x63, 0x6f, 0x6d, 0x2e, 0x72, 0x61, 0x66, 0x61, 0x79, 0x2e,
|
||||
0x64, 0x65, 0x76, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x73, 0x79, 0x73, 0x74, 0x65, 0x6d,
|
||||
0x2e, 0x76, 0x33, 0x42, 0x0c, 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x50, 0x72, 0x6f, 0x74,
|
||||
0x6f, 0x50, 0x01, 0x5a, 0x58, 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, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x73, 0x72, 0x76, 0x2f, 0x70, 0x72, 0x6f,
|
||||
0x74, 0x6f, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2f, 0x73, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x70,
|
||||
0x62, 0x2f, 0x76, 0x33, 0x3b, 0x73, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x76, 0x33, 0xa2, 0x02, 0x04,
|
||||
0x52, 0x44, 0x54, 0x53, 0xaa, 0x02, 0x19, 0x52, 0x61, 0x66, 0x61, 0x79, 0x2e, 0x44, 0x65, 0x76,
|
||||
0x2e, 0x54, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x53, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x2e, 0x56, 0x33,
|
||||
0xca, 0x02, 0x19, 0x52, 0x61, 0x66, 0x61, 0x79, 0x5c, 0x44, 0x65, 0x76, 0x5c, 0x54, 0x79, 0x70,
|
||||
0x65, 0x73, 0x5c, 0x53, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x5c, 0x56, 0x33, 0xe2, 0x02, 0x25, 0x52,
|
||||
0x61, 0x66, 0x61, 0x79, 0x5c, 0x44, 0x65, 0x76, 0x5c, 0x54, 0x79, 0x70, 0x65, 0x73, 0x5c, 0x53,
|
||||
0x79, 0x73, 0x74, 0x65, 0x6d, 0x5c, 0x56, 0x33, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61,
|
||||
0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x1d, 0x52, 0x61, 0x66, 0x61, 0x79, 0x3a, 0x3a, 0x44, 0x65,
|
||||
0x76, 0x3a, 0x3a, 0x54, 0x79, 0x70, 0x65, 0x73, 0x3a, 0x3a, 0x53, 0x79, 0x73, 0x74, 0x65, 0x6d,
|
||||
0x3a, 0x3a, 0x56, 0x33, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
|
||||
}
|
||||
|
||||
var (
|
||||
file_proto_types_systempb_v3_project_proto_rawDescOnce sync.Once
|
||||
file_proto_types_systempb_v3_project_proto_rawDescData = file_proto_types_systempb_v3_project_proto_rawDesc
|
||||
)
|
||||
|
||||
func file_proto_types_systempb_v3_project_proto_rawDescGZIP() []byte {
|
||||
file_proto_types_systempb_v3_project_proto_rawDescOnce.Do(func() {
|
||||
file_proto_types_systempb_v3_project_proto_rawDescData = protoimpl.X.CompressGZIP(file_proto_types_systempb_v3_project_proto_rawDescData)
|
||||
})
|
||||
return file_proto_types_systempb_v3_project_proto_rawDescData
|
||||
}
|
||||
|
||||
var file_proto_types_systempb_v3_project_proto_msgTypes = make([]protoimpl.MessageInfo, 3)
|
||||
var file_proto_types_systempb_v3_project_proto_goTypes = []interface{}{
|
||||
(*ProjectSpec)(nil), // 0: rafay.dev.types.system.v3.ProjectSpec
|
||||
(*Project)(nil), // 1: rafay.dev.types.system.v3.Project
|
||||
(*ProjectList)(nil), // 2: rafay.dev.types.system.v3.ProjectList
|
||||
(*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_systempb_v3_project_proto_depIdxs = []int32{
|
||||
3, // 0: rafay.dev.types.system.v3.Project.metadata:type_name -> rafay.dev.types.common.v3.Metadata
|
||||
0, // 1: rafay.dev.types.system.v3.Project.spec:type_name -> rafay.dev.types.system.v3.ProjectSpec
|
||||
4, // 2: rafay.dev.types.system.v3.Project.status:type_name -> rafay.dev.types.common.v3.Status
|
||||
5, // 3: rafay.dev.types.system.v3.ProjectList.metadata:type_name -> rafay.dev.types.common.v3.ListMetadata
|
||||
1, // 4: rafay.dev.types.system.v3.ProjectList.items:type_name -> rafay.dev.types.system.v3.Project
|
||||
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_systempb_v3_project_proto_init() }
|
||||
func file_proto_types_systempb_v3_project_proto_init() {
|
||||
if File_proto_types_systempb_v3_project_proto != nil {
|
||||
return
|
||||
}
|
||||
if !protoimpl.UnsafeEnabled {
|
||||
file_proto_types_systempb_v3_project_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*ProjectSpec); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_proto_types_systempb_v3_project_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*Project); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_proto_types_systempb_v3_project_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*ProjectList); 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_systempb_v3_project_proto_rawDesc,
|
||||
NumEnums: 0,
|
||||
NumMessages: 3,
|
||||
NumExtensions: 0,
|
||||
NumServices: 0,
|
||||
},
|
||||
GoTypes: file_proto_types_systempb_v3_project_proto_goTypes,
|
||||
DependencyIndexes: file_proto_types_systempb_v3_project_proto_depIdxs,
|
||||
MessageInfos: file_proto_types_systempb_v3_project_proto_msgTypes,
|
||||
}.Build()
|
||||
File_proto_types_systempb_v3_project_proto = out.File
|
||||
file_proto_types_systempb_v3_project_proto_rawDesc = nil
|
||||
file_proto_types_systempb_v3_project_proto_goTypes = nil
|
||||
file_proto_types_systempb_v3_project_proto_depIdxs = nil
|
||||
}
|
||||
100
components/adminsrv/proto/types/systempb/v3/project.proto
Normal file
100
components/adminsrv/proto/types/systempb/v3/project.proto
Normal file
@@ -0,0 +1,100 @@
|
||||
syntax = "proto3";
|
||||
package rafay.dev.types.system.v3;
|
||||
|
||||
import "proto/types/commonpb/v3/common.proto";
|
||||
import "protoc-gen-openapiv2/options/annotations.proto";
|
||||
import "google/api/field_behavior.proto";
|
||||
|
||||
message ProjectSpec {
|
||||
option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_schema) = {
|
||||
json_schema : {
|
||||
title : "Project Specification"
|
||||
description : "project specification"
|
||||
}
|
||||
};
|
||||
|
||||
bool default = 1
|
||||
[ (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
|
||||
title : "Default"
|
||||
description : "flag to indicate if this is the default project in the "
|
||||
"organization"
|
||||
} ];
|
||||
}
|
||||
|
||||
message Project {
|
||||
option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_schema) = {
|
||||
json_schema : {
|
||||
title : "Project"
|
||||
description : "Project"
|
||||
required : [ "apiVersion", "kind", "metadata", "spec" ]
|
||||
}
|
||||
};
|
||||
|
||||
string apiVersion = 1
|
||||
[ (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
|
||||
title : "API Version",
|
||||
description : "API Version of the resource"
|
||||
default : "system.k8smgmt.io/v3"
|
||||
read_only : true
|
||||
|
||||
} ];
|
||||
string kind = 2
|
||||
[ (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
|
||||
title : "Kind",
|
||||
description : "Kind of the resource"
|
||||
default : "Project"
|
||||
read_only : true
|
||||
} ];
|
||||
rafay.dev.types.common.v3.Metadata metadata = 3
|
||||
[ (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
|
||||
title : "Metadata",
|
||||
description : "Metadata of the resource"
|
||||
} ];
|
||||
ProjectSpec spec = 4
|
||||
[ (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
|
||||
title : "Spec",
|
||||
description : "Spec of the 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 ProjectList {
|
||||
option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_schema) = {
|
||||
json_schema : {
|
||||
title : "ProjectList"
|
||||
description : "Project list"
|
||||
}
|
||||
};
|
||||
|
||||
string apiVersion = 1
|
||||
[ (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
|
||||
title : "API Version",
|
||||
description : "API Version of the list resource"
|
||||
read_only : true
|
||||
default : "system.k8smgmt.io/v3"
|
||||
} ];
|
||||
string kind = 2
|
||||
[ (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
|
||||
title : "Kind",
|
||||
description : "Kind of the list resource"
|
||||
read_only : true
|
||||
default : "Project"
|
||||
} ];
|
||||
rafay.dev.types.common.v3.ListMetadata metadata = 3
|
||||
[ (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
|
||||
title : "ListMetadata",
|
||||
description : "Metadata of the list resource"
|
||||
read_only : true
|
||||
} ];
|
||||
repeated Project items = 4
|
||||
[ (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
|
||||
title : "Items",
|
||||
description : "List of the resources"
|
||||
read_only : true
|
||||
} ];
|
||||
}
|
||||
5
components/buf.work.yaml
Normal file
5
components/buf.work.yaml
Normal file
@@ -0,0 +1,5 @@
|
||||
version: v1
|
||||
directories:
|
||||
- common
|
||||
- adminsrv
|
||||
- usermgmt
|
||||
23
components/common/buf.gen.yaml
Normal file
23
components/common/buf.gen.yaml
Normal file
@@ -0,0 +1,23 @@
|
||||
version: v1
|
||||
managed:
|
||||
enabled: true
|
||||
go_package_prefix:
|
||||
default: github.com/RafaySystems/rcloud-base/components/common
|
||||
except:
|
||||
- buf.build/googleapis/googleapis
|
||||
- buf.build/grpc-ecosystem/grpc-gateway
|
||||
- buf.build/gogo/protobuf
|
||||
plugins:
|
||||
- name: go
|
||||
out: .
|
||||
opt: paths=source_relative
|
||||
- name: go-grpc
|
||||
out: .
|
||||
opt:
|
||||
- paths=source_relative
|
||||
- require_unimplemented_servers=false
|
||||
- name: grpc-gateway
|
||||
out: .
|
||||
opt: paths=source_relative
|
||||
- name: openapiv2
|
||||
out: gen/openapi
|
||||
24
components/common/buf.lock
Normal file
24
components/common/buf.lock
Normal file
@@ -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
|
||||
12
components/common/buf.yaml
Normal file
12
components/common/buf.yaml
Normal file
@@ -0,0 +1,12 @@
|
||||
version: v1
|
||||
name: buf.build/nparikh/rafay-common
|
||||
deps:
|
||||
- buf.build/googleapis/googleapis
|
||||
- buf.build/grpc-ecosystem/grpc-gateway
|
||||
- buf.build/gogo/protobuf
|
||||
breaking:
|
||||
use:
|
||||
- FILE
|
||||
lint:
|
||||
use:
|
||||
- DEFAULT
|
||||
275
components/common/gen/openapi/pkg/auth/v3/auth.swagger.json
Normal file
275
components/common/gen/openapi/pkg/auth/v3/auth.swagger.json
Normal file
@@ -0,0 +1,275 @@
|
||||
{
|
||||
"swagger": "2.0",
|
||||
"info": {
|
||||
"title": "pkg/auth/v3/auth.proto",
|
||||
"version": "version not set"
|
||||
},
|
||||
"tags": [
|
||||
{
|
||||
"name": "Auth"
|
||||
}
|
||||
],
|
||||
"consumes": [
|
||||
"application/json"
|
||||
],
|
||||
"produces": [
|
||||
"application/json"
|
||||
],
|
||||
"paths": {},
|
||||
"definitions": {
|
||||
"protobufAny": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"@type": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"additionalProperties": {}
|
||||
},
|
||||
"rpcStatus": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"code": {
|
||||
"type": "integer",
|
||||
"format": "int32"
|
||||
},
|
||||
"message": {
|
||||
"type": "string"
|
||||
},
|
||||
"details": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/definitions/protobufAny"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"v3APIKeyStatus": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"APIKeyNotFound",
|
||||
"APIKeyExists"
|
||||
],
|
||||
"default": "APIKeyNotFound"
|
||||
},
|
||||
"v3AuthType": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"AuthTypeNotSet",
|
||||
"SessionLogin",
|
||||
"APIKey"
|
||||
],
|
||||
"default": "AuthTypeNotSet"
|
||||
},
|
||||
"v3ClientType": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"ClientTypeNotSet",
|
||||
"BROWSER",
|
||||
"CLI"
|
||||
],
|
||||
"default": "ClientTypeNotSet"
|
||||
},
|
||||
"v3GetAPIKeyResponse": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"status": {
|
||||
"$ref": "#/definitions/v3APIKeyStatus"
|
||||
},
|
||||
"reason": {
|
||||
"type": "string"
|
||||
},
|
||||
"secret": {
|
||||
"type": "string"
|
||||
},
|
||||
"data": {
|
||||
"$ref": "#/definitions/v3SessionData"
|
||||
}
|
||||
}
|
||||
},
|
||||
"v3GetSessionResponse": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"status": {
|
||||
"$ref": "#/definitions/v3SessionStatus"
|
||||
},
|
||||
"reason": {
|
||||
"type": "string"
|
||||
},
|
||||
"data": {
|
||||
"$ref": "#/definitions/v3SessionData"
|
||||
}
|
||||
}
|
||||
},
|
||||
"v3IsRequestAllowedResponse": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"status": {
|
||||
"$ref": "#/definitions/v3RequestStatus"
|
||||
},
|
||||
"reason": {
|
||||
"type": "string"
|
||||
},
|
||||
"sessionData": {
|
||||
"$ref": "#/definitions/v3SessionData"
|
||||
}
|
||||
}
|
||||
},
|
||||
"v3NamespaceData": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"projectId": {
|
||||
"type": "string"
|
||||
},
|
||||
"namespaceId": {
|
||||
"type": "string"
|
||||
},
|
||||
"role": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
},
|
||||
"v3ProjectData": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"all": {
|
||||
"type": "boolean"
|
||||
},
|
||||
"list": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/definitions/v3ProjectRole"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"v3ProjectRole": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"projectId": {
|
||||
"type": "string"
|
||||
},
|
||||
"role": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
},
|
||||
"v3RequestStatus": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"RequestAllowed",
|
||||
"RequestNotAuthenticated",
|
||||
"RequestMethodOrURLNotAllowed"
|
||||
],
|
||||
"default": "RequestAllowed"
|
||||
},
|
||||
"v3ResourceURLMethods": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"methods": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"v3SessionData": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"account": {
|
||||
"type": "string"
|
||||
},
|
||||
"organization": {
|
||||
"type": "string"
|
||||
},
|
||||
"partner": {
|
||||
"type": "string"
|
||||
},
|
||||
"role": {
|
||||
"type": "string"
|
||||
},
|
||||
"permissions": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"partnerDomain": {
|
||||
"type": "string"
|
||||
},
|
||||
"username": {
|
||||
"type": "string"
|
||||
},
|
||||
"isSuperAdmin": {
|
||||
"type": "boolean"
|
||||
},
|
||||
"isPartnerAdmin": {
|
||||
"type": "boolean"
|
||||
},
|
||||
"isSsoUser": {
|
||||
"type": "boolean"
|
||||
},
|
||||
"resourceUrls": {
|
||||
"type": "object",
|
||||
"additionalProperties": {
|
||||
"$ref": "#/definitions/v3ResourceURLMethods"
|
||||
}
|
||||
},
|
||||
"ttl": {
|
||||
"type": "string"
|
||||
},
|
||||
"groups": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"authType": {
|
||||
"$ref": "#/definitions/v3AuthType"
|
||||
},
|
||||
"idp": {
|
||||
"type": "string"
|
||||
},
|
||||
"isOrgAdmin": {
|
||||
"type": "object",
|
||||
"additionalProperties": {
|
||||
"type": "boolean"
|
||||
}
|
||||
},
|
||||
"clientType": {
|
||||
"$ref": "#/definitions/v3ClientType"
|
||||
},
|
||||
"isAllNsAccess": {
|
||||
"type": "object",
|
||||
"additionalProperties": {
|
||||
"type": "boolean"
|
||||
}
|
||||
},
|
||||
"namespaces": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/definitions/v3NamespaceData"
|
||||
}
|
||||
},
|
||||
"project": {
|
||||
"$ref": "#/definitions/v3ProjectData"
|
||||
},
|
||||
"isReadonlyOrgAdmin": {
|
||||
"type": "object",
|
||||
"additionalProperties": {
|
||||
"type": "boolean"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"v3SessionStatus": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"SessionNotFound",
|
||||
"SessionExists"
|
||||
],
|
||||
"default": "SessionNotFound"
|
||||
}
|
||||
}
|
||||
}
|
||||
113
components/common/gen/openapi/pkg/gateway/testdata/test.swagger.json
vendored
Normal file
113
components/common/gen/openapi/pkg/gateway/testdata/test.swagger.json
vendored
Normal file
@@ -0,0 +1,113 @@
|
||||
{
|
||||
"swagger": "2.0",
|
||||
"info": {
|
||||
"title": "pkg/gateway/testdata/test.proto",
|
||||
"version": "version not set"
|
||||
},
|
||||
"tags": [
|
||||
{
|
||||
"name": "Test"
|
||||
}
|
||||
],
|
||||
"consumes": [
|
||||
"application/json"
|
||||
],
|
||||
"produces": [
|
||||
"application/json"
|
||||
],
|
||||
"paths": {
|
||||
"/v3/test/{metadata.name}/test/{metadata.name}": {
|
||||
"get": {
|
||||
"operationId": "Test_Get",
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "A successful response.",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/testdataTestObject"
|
||||
}
|
||||
},
|
||||
"default": {
|
||||
"description": "An unexpected error response.",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/rpcStatus"
|
||||
}
|
||||
}
|
||||
},
|
||||
"parameters": [
|
||||
{
|
||||
"name": "metadata.name",
|
||||
"in": "path",
|
||||
"required": true,
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"name": "metadata.name",
|
||||
"in": "path",
|
||||
"required": true,
|
||||
"type": "string"
|
||||
}
|
||||
],
|
||||
"tags": [
|
||||
"Test"
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
"definitions": {
|
||||
"protobufAny": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"@type": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"additionalProperties": {}
|
||||
},
|
||||
"rpcStatus": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"code": {
|
||||
"type": "integer",
|
||||
"format": "int32"
|
||||
},
|
||||
"message": {
|
||||
"type": "string"
|
||||
},
|
||||
"details": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/definitions/protobufAny"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"testdataTestMetadata": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"name": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
},
|
||||
"testdataTestObject": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"metadata": {
|
||||
"$ref": "#/definitions/testdataTestMetadata"
|
||||
},
|
||||
"spec": {
|
||||
"$ref": "#/definitions/testdataTestObjectSpec"
|
||||
},
|
||||
"status": {
|
||||
"$ref": "#/definitions/testdataTestObjectStatus"
|
||||
}
|
||||
}
|
||||
},
|
||||
"testdataTestObjectSpec": {
|
||||
"type": "object"
|
||||
},
|
||||
"testdataTestObjectStatus": {
|
||||
"type": "object"
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,43 @@
|
||||
{
|
||||
"swagger": "2.0",
|
||||
"info": {
|
||||
"title": "proto/types/commonpb/v3/artifacts.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": {}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,43 @@
|
||||
{
|
||||
"swagger": "2.0",
|
||||
"info": {
|
||||
"title": "proto/types/commonpb/v3/common.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": {}
|
||||
}
|
||||
}
|
||||
}
|
||||
31
components/common/go.mod
Normal file
31
components/common/go.mod
Normal file
@@ -0,0 +1,31 @@
|
||||
module github.com/RafaySystems/rcloud-base/components/common
|
||||
|
||||
go 1.17
|
||||
|
||||
require (
|
||||
github.com/gogo/protobuf v1.3.2
|
||||
github.com/grpc-ecosystem/grpc-gateway v1.16.0
|
||||
github.com/grpc-ecosystem/grpc-gateway/v2 v2.7.2
|
||||
github.com/julienschmidt/httprouter v1.3.0
|
||||
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
|
||||
go.uber.org/zap v1.19.1
|
||||
google.golang.org/genproto v0.0.0-20211208223120-3a66f561d7aa
|
||||
google.golang.org/grpc v1.43.0
|
||||
google.golang.org/protobuf v1.27.1
|
||||
sigs.k8s.io/yaml v1.3.0
|
||||
)
|
||||
|
||||
require (
|
||||
github.com/golang/protobuf v1.5.2 // indirect
|
||||
github.com/klauspost/cpuid/v2 v2.0.6 // indirect
|
||||
github.com/pkg/errors v0.9.1 // indirect
|
||||
github.com/segmentio/asm v1.1.0 // indirect
|
||||
go.uber.org/atomic v1.7.0 // indirect
|
||||
go.uber.org/multierr v1.6.0 // indirect
|
||||
golang.org/x/net v0.0.0-20210916014120-12bc252f5db8 // indirect
|
||||
golang.org/x/sys v0.0.0-20210510120138-977fb7262007 // indirect
|
||||
golang.org/x/text v0.3.6 // indirect
|
||||
gopkg.in/yaml.v2 v2.4.0 // indirect
|
||||
)
|
||||
468
components/common/go.sum
Normal file
468
components/common/go.sum
Normal file
@@ -0,0 +1,468 @@
|
||||
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/bigquery v1.0.1/go.mod h1:i/xbL2UlR5RvWAURpBYZTtm/cXjCha9lbfbpx4poX+o=
|
||||
cloud.google.com/go/bigquery v1.3.0/go.mod h1:PjpwJnslEMmckchkHFfq+HTD2DmtT67aNFKH1/VBDHE=
|
||||
cloud.google.com/go/bigquery v1.4.0/go.mod h1:S8dzgnTigyfTmLBfrtrhyYhwRxG72rYxvftPBK2Dvzc=
|
||||
cloud.google.com/go/bigquery v1.5.0/go.mod h1:snEHRnqQbz117VIFhE8bmtwIDY80NLUZUMb4Nv6dBIg=
|
||||
cloud.google.com/go/bigquery v1.7.0/go.mod h1://okPTzCYNXSlb24MZs83e2Do+h+VXtc4gLoIoXIAPc=
|
||||
cloud.google.com/go/bigquery v1.8.0/go.mod h1:J5hqkt3O0uAFnINi6JXValWIb1v0goeZM77hZzJN/fQ=
|
||||
cloud.google.com/go/datastore v1.0.0/go.mod h1:LXYbyblFSglQ5pkeyhO+Qmw7ukd3C+pD7TKLgZqpHYE=
|
||||
cloud.google.com/go/datastore v1.1.0/go.mod h1:umbIZjpQpHh4hmRpGhH4tLFup+FVzqBi1b3c64qFpCk=
|
||||
cloud.google.com/go/pubsub v1.0.1/go.mod h1:R0Gpsv3s54REJCy4fxDixWD93lHJMoZTyQ2kNxGRt3I=
|
||||
cloud.google.com/go/pubsub v1.1.0/go.mod h1:EwwdRX2sKPjnvnqCa270oGRyludottCI76h+R3AArQw=
|
||||
cloud.google.com/go/pubsub v1.2.0/go.mod h1:jhfEVHT8odbXTkndysNHCcx0awwzvfOlguIAii9o8iA=
|
||||
cloud.google.com/go/pubsub v1.3.1/go.mod h1:i+ucay31+CNRpDW4Lu78I4xXG+O1r/MAHgjpRVR+TSU=
|
||||
cloud.google.com/go/storage v1.0.0/go.mod h1:IhtSnM/ZTZV8YYJWCY8RULGVqBDmpoyjwiyrjsg+URw=
|
||||
cloud.google.com/go/storage v1.5.0/go.mod h1:tpKbwo567HUNpVclU5sGELwQWBDZ8gh0ZeosJ0Rtdos=
|
||||
cloud.google.com/go/storage v1.6.0/go.mod h1:N7U0C8pVQ/+NIKOBQyamJIeKQKkZ+mxpohlUTyfDhBk=
|
||||
cloud.google.com/go/storage v1.8.0/go.mod h1:Wv1Oy7z6Yz3DshWRJFhqM/UCfaWIRTdp0RXyy7KQOVs=
|
||||
cloud.google.com/go/storage v1.10.0/go.mod h1:FLPqc6j+Ki4BU591ie1oL6qBQGu2Bl/tZ9ullr3+Kg0=
|
||||
dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU=
|
||||
github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU=
|
||||
github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo=
|
||||
github.com/OneOfOne/xxhash v1.2.2/go.mod h1:HSdplMjZKSmBqAxg5vPj2TmRDmfkzw+cTzAElWljhcU=
|
||||
github.com/antihax/optional v1.0.0/go.mod h1:uupD/76wgC+ih3iEmQUL+0Ugr19nfwCT1kdvxnR2qWY=
|
||||
github.com/benbjohnson/clock v1.1.0 h1:Q92kusRqC1XV2MjkWETPvjJVqKetz1OzxZB7mHJLju8=
|
||||
github.com/benbjohnson/clock v1.1.0/go.mod h1:J11/hYXuz8f4ySSvYwY0FKfm+ezbsZBKZxNJlLklBHA=
|
||||
github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU=
|
||||
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/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWRnGsAI=
|
||||
github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e/go.mod h1:nSuG5e5PlCu98SY8svDHJxuZscDgtXS6KTTbou5AhLI=
|
||||
github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1/go.mod h1:Q3SI9o4m/ZMnBNeIyt5eFwwo7qiLfzFZmjNmxjkiQlU=
|
||||
github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw=
|
||||
github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc=
|
||||
github.com/cncf/udpa/go v0.0.0-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-20211011173535-cb28da3451f1/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs=
|
||||
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
|
||||
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
|
||||
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
|
||||
github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4=
|
||||
github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4=
|
||||
github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1mIlRU8Am5FuJP05cCM98=
|
||||
github.com/envoyproxy/go-control-plane v0.9.9-0.20201210154907-fd9021fe5dad/go.mod h1:cXg6YxExXjJnVBQHBLXeUAgxn2UodCpnH306RInaBQk=
|
||||
github.com/envoyproxy/go-control-plane v0.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/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c=
|
||||
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/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-20190702054246-869f871628b6/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc=
|
||||
github.com/golang/groupcache v0.0.0-20191227052852-215e87163ea7/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc=
|
||||
github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc=
|
||||
github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A=
|
||||
github.com/golang/mock v1.2.0/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A=
|
||||
github.com/golang/mock v1.3.1/go.mod h1:sBzyDLLjw3U8JLTeZvSv8jJB+tU5PVekmnlKIyFUx0Y=
|
||||
github.com/golang/mock v1.4.0/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw=
|
||||
github.com/golang/mock v1.4.1/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw=
|
||||
github.com/golang/mock v1.4.3/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw=
|
||||
github.com/golang/mock v1.4.4/go.mod h1:l3mdAwkq5BuhzHwde/uurv3sEJeZMXNpwsxVWU71h+4=
|
||||
github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U=
|
||||
github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U=
|
||||
github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U=
|
||||
github.com/golang/protobuf v1.3.3/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw=
|
||||
github.com/golang/protobuf v1.3.4/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw=
|
||||
github.com/golang/protobuf v1.3.5/go.mod h1:6O5/vntMXwX2lRkT1hjjk0nAC1IDOTvTlVgjlRvqsdk=
|
||||
github.com/golang/protobuf v1.4.0-rc.1/go.mod h1:ceaxUfeHdC40wWswd/P6IGgMaK3YpKi5j83Wpe3EHw8=
|
||||
github.com/golang/protobuf v1.4.0-rc.1.0.20200221234624-67d41d38c208/go.mod h1:xKAWHe0F5eneWXFV3EuXVDTCmh+JuBKY0li0aMyXATA=
|
||||
github.com/golang/protobuf v1.4.0-rc.2/go.mod h1:LlEzMj4AhA7rCAGe4KMBDvJI+AwstrUpVNzEA03Pprs=
|
||||
github.com/golang/protobuf v1.4.0-rc.4.0.20200313231945-b860323f09d0/go.mod h1:WU3c8KckQ9AFe+yFwt9sWVRKCVIyN9cPHBJSNnbL67w=
|
||||
github.com/golang/protobuf v1.4.0/go.mod h1:jodUvKwWbYaEsadDk5Fwe5c77LiNKVO9IDvqG2KuDX0=
|
||||
github.com/golang/protobuf v1.4.1/go.mod h1:U8fpvMrcmy5pZrNK1lt4xCsGvpyWQ/VVv6QDs8UjoX8=
|
||||
github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI=
|
||||
github.com/golang/protobuf v1.4.3/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI=
|
||||
github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk=
|
||||
github.com/golang/protobuf v1.5.2 h1:ROPKBNFfQgOUMifHyP+KYbvpjbdoFNs+aK7DXlji0Tw=
|
||||
github.com/golang/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY=
|
||||
github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ=
|
||||
github.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ=
|
||||
github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M=
|
||||
github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU=
|
||||
github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU=
|
||||
github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
|
||||
github.com/google/go-cmp v0.4.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
|
||||
github.com/google/go-cmp v0.5.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
|
||||
github.com/google/go-cmp v0.5.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
|
||||
github.com/google/go-cmp v0.5.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/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/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/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI=
|
||||
github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
|
||||
github.com/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+vpHVxEJEs9eg=
|
||||
github.com/googleapis/gax-go/v2 v2.0.5/go.mod h1:DWXyrwAJ9X0FpwwEdw+IPEYBICEFu5mhpdKc/us6bOk=
|
||||
github.com/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/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/ianlancetaylor/demangle v0.0.0-20181102032728-5e5cf60278f6/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc=
|
||||
github.com/jstemmer/go-junit-report v0.0.0-20190106144839-af01ea7f8024/go.mod h1:6v2b51hI/fHJwM22ozAgKL4VKDeJcHhJFhtBdhmNjmU=
|
||||
github.com/jstemmer/go-junit-report v0.9.1/go.mod h1:Brl9GWCQeLvo8nXZwPNNblvFj/XSXhF0NWZEnDohbsk=
|
||||
github.com/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.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/kr/pretty v0.1.0 h1:L/CwN0zerZDmRFUapSPitk6f+Q3+0za1rQkzVuMiMFI=
|
||||
github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo=
|
||||
github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ=
|
||||
github.com/kr/text v0.1.0 h1:45sCR5RtlFHMR4UwH9sdQ5TC8v0qDQCHnXt+kaKSTVE=
|
||||
github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI=
|
||||
github.com/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/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
|
||||
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
|
||||
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_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA=
|
||||
github.com/rogpeppe/fastuuid v1.2.0/go.mod h1:jVj6XXZzXRy/MSR5jhDC/2q6DgLz+nrA6LYCDYWNEvQ=
|
||||
github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4=
|
||||
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/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/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
|
||||
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.7.0 h1:nwc3DEeHmmLAfoZucVR881uASk0Mfjw8xYJ99tb5CcY=
|
||||
github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
|
||||
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=
|
||||
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.opentelemetry.io/proto/otlp v0.7.0/go.mod h1:PqfVotwruBrMGOCsRd/89rSnXhoiJIqeYNgFYFoEGnI=
|
||||
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.11-0.20210813005559-691160354723 h1:sHOAIxRGBp443oHZIPB+HsUGaksVCXVQENPxwTfQdH4=
|
||||
go.uber.org/goleak v1.1.11-0.20210813005559-691160354723/go.mod h1:cwTWslyiVhfpKIDGSZEM2HlOvcqm+tG4zioyIeLoqMQ=
|
||||
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.19.1 h1:ue41HOKd1vGURxrmeKIgELGb3jPW9DMUDGtsinblHwI=
|
||||
go.uber.org/zap v1.19.1/go.mod h1:j3DNczoxDZroyBnOT1L/Q79cfUMGZxlv/9dzN7SM1rI=
|
||||
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-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
|
||||
golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto=
|
||||
golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA=
|
||||
golang.org/x/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/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.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
|
||||
golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
|
||||
golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
|
||||
golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
|
||||
golang.org/x/net v0.0.0-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
|
||||
golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
|
||||
golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
|
||||
golang.org/x/net v0.0.0-20190501004415-9ce7a6920f09/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
|
||||
golang.org/x/net v0.0.0-20190503192946-f4e77d36d62c/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
|
||||
golang.org/x/net v0.0.0-20190603091049-60506f45cf65/go.mod h1:HSz+uSET+XFnRR8LxR5pz3Of3rY3CfYBVs4xY44aLks=
|
||||
golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
|
||||
golang.org/x/net v0.0.0-20190628185345-da137c7871d7/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
|
||||
golang.org/x/net v0.0.0-20190724013045-ca1201d0de80/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
|
||||
golang.org/x/net v0.0.0-20191209160850-c0dbc17a3553/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
|
||||
golang.org/x/net v0.0.0-20200114155413-6afb5195e5aa/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
|
||||
golang.org/x/net v0.0.0-20200202094626-16171245cfb2/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
|
||||
golang.org/x/net v0.0.0-20200222125558-5a598a2470a0/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
|
||||
golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
|
||||
golang.org/x/net v0.0.0-20200301022130-244492dfa37a/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
|
||||
golang.org/x/net v0.0.0-20200324143707-d3edc9973b7e/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A=
|
||||
golang.org/x/net v0.0.0-20200501053045-e0ff5e5a1de5/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A=
|
||||
golang.org/x/net v0.0.0-20200506145744-7e3656a0809f/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A=
|
||||
golang.org/x/net v0.0.0-20200513185701-a91f0712d120/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A=
|
||||
golang.org/x/net v0.0.0-20200520182314-0ba52f642ac2/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A=
|
||||
golang.org/x/net v0.0.0-20200625001655-4c5254603344/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA=
|
||||
golang.org/x/net v0.0.0-20200707034311-ab3426394381/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA=
|
||||
golang.org/x/net v0.0.0-20200822124328-c89045814202/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA=
|
||||
golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU=
|
||||
golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4/go.mod h1:p54w0d4576C0XHj96bSt6lcn1PtDYWL6XObtHCRCNQM=
|
||||
golang.org/x/net v0.0.0-20210916014120-12bc252f5db8 h1:/6y1LfuqNuQdHAm0jjtPtgRcxIxjVZgm5OTu8/QhZvk=
|
||||
golang.org/x/net v0.0.0-20210916014120-12bc252f5db8/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-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-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
||||
golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
|
||||
golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
|
||||
golang.org/x/sys v0.0.0-20190312061237-fead79001313/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20190502145724-3ef323f4f1fd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20190507160741-ecd444e8653b/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20190606165138-5da285871e9c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20190624142023-c5567b49c5d0/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20190726091711-fc99dfbffb4e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20191001151750-bb3f8db39f24/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20191204072324-ce4227a45e2e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20191228213918-04cbcbbfeed8/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20200113162924-86b910548bc1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20200122134326-e047566fdf82/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20200202164722-d101bd2416d5/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20200212091648-12a6c2dcc1e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20200223170610-d5e6a3e2c0ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20200302150141-5c8b2ff67527/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20200331124033-c3d80250170d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20200501052902-10377860bb8e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20200511232937-7e40ca221e25/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20200515095857-1151b9dac4a9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20200523222454-059865788121/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20200803210538-64077c9b5642/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20210330210617-4fbd30eecc44/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20210510120138-977fb7262007 h1:gG67DSER+11cZvqIMb8S8bt0vZtiN6xWYARwirrOSfE=
|
||||
golang.org/x/sys v0.0.0-20210510120138-977fb7262007/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
|
||||
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.5/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
|
||||
golang.org/x/text v0.3.6 h1:aRYxNxv6iGQlyVaZmk6ZgYEDa+Jg18DxebPSrd6bg1M=
|
||||
golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
|
||||
golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
|
||||
golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
|
||||
golang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
|
||||
golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
|
||||
golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
|
||||
golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY=
|
||||
golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs=
|
||||
golang.org/x/tools v0.0.0-20190312151545-0bb0c0a6e846/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs=
|
||||
golang.org/x/tools v0.0.0-20190312170243-e65039ee4138/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs=
|
||||
golang.org/x/tools v0.0.0-20190425150028-36563e24a262/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q=
|
||||
golang.org/x/tools v0.0.0-20190506145303-2d16b83fe98c/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q=
|
||||
golang.org/x/tools v0.0.0-20190524140312-2c0ae7006135/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q=
|
||||
golang.org/x/tools v0.0.0-20190606124116-d0a3d012864b/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc=
|
||||
golang.org/x/tools v0.0.0-20190621195816-6e04913cbbac/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc=
|
||||
golang.org/x/tools v0.0.0-20190628153133-6cdbf07be9d0/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc=
|
||||
golang.org/x/tools v0.0.0-20190816200558-6889da9d5479/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
|
||||
golang.org/x/tools v0.0.0-20190911174233-4f2ddba30aff/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
|
||||
golang.org/x/tools v0.0.0-20191012152004-8de300cfc20a/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
|
||||
golang.org/x/tools v0.0.0-20191113191852-77e3bb0ad9e7/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
|
||||
golang.org/x/tools v0.0.0-20191115202509-3a792d9c32b2/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
|
||||
golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
|
||||
golang.org/x/tools v0.0.0-20191125144606-a911d9008d1f/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
|
||||
golang.org/x/tools v0.0.0-20191130070609-6e064ea0cf2d/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
|
||||
golang.org/x/tools v0.0.0-20191216173652-a0e659d51361/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28=
|
||||
golang.org/x/tools v0.0.0-20191227053925-7b8e75db28f4/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28=
|
||||
golang.org/x/tools v0.0.0-20200117161641-43d50277825c/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28=
|
||||
golang.org/x/tools v0.0.0-20200122220014-bf1340f18c4a/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28=
|
||||
golang.org/x/tools v0.0.0-20200130002326-2f3ba24bd6e7/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28=
|
||||
golang.org/x/tools v0.0.0-20200204074204-1cc6d1ef6c74/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28=
|
||||
golang.org/x/tools v0.0.0-20200207183749-b753a1ba74fa/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28=
|
||||
golang.org/x/tools v0.0.0-20200212150539-ea181f53ac56/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28=
|
||||
golang.org/x/tools v0.0.0-20200224181240-023911ca70b2/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28=
|
||||
golang.org/x/tools v0.0.0-20200227222343-706bc42d1f0d/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28=
|
||||
golang.org/x/tools v0.0.0-20200304193943-95d2e580d8eb/go.mod h1:o4KQGtdN14AW+yjsvvwRTJJuXz8XRtIHtEnmAXLyFUw=
|
||||
golang.org/x/tools v0.0.0-20200312045724-11d5b4c81c7d/go.mod h1:o4KQGtdN14AW+yjsvvwRTJJuXz8XRtIHtEnmAXLyFUw=
|
||||
golang.org/x/tools v0.0.0-20200331025713-a30bf2db82d4/go.mod h1:Sl4aGygMT6LrqrWclx+PTx3U+LnKx/seiNR+3G19Ar8=
|
||||
golang.org/x/tools v0.0.0-20200501065659-ab2804fb9c9d/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE=
|
||||
golang.org/x/tools v0.0.0-20200512131952-2bc93b1c0c88/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE=
|
||||
golang.org/x/tools v0.0.0-20200515010526-7d3b6ebf133d/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE=
|
||||
golang.org/x/tools v0.0.0-20200618134242-20370b0cb4b2/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE=
|
||||
golang.org/x/tools v0.0.0-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-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA=
|
||||
golang.org/x/tools v0.1.5/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk=
|
||||
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=
|
||||
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/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/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc=
|
||||
google.golang.org/genproto v0.0.0-20190307195333-5fe7a883aa19/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE=
|
||||
google.golang.org/genproto v0.0.0-20190418145605-e7d98fc518a7/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE=
|
||||
google.golang.org/genproto v0.0.0-20190425155659-357c62f0e4bb/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE=
|
||||
google.golang.org/genproto v0.0.0-20190502173448-54afdca5d873/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE=
|
||||
google.golang.org/genproto v0.0.0-20190801165951-fa694d86fc64/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc=
|
||||
google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc=
|
||||
google.golang.org/genproto v0.0.0-20190911173649-1774047e7e51/go.mod h1:IbNlFCBrqXvoKpeg0TB2l7cyZUmoaFKYIwrEpbDKLA8=
|
||||
google.golang.org/genproto v0.0.0-20191108220845-16a3f7862a1a/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc=
|
||||
google.golang.org/genproto v0.0.0-20191115194625-c23dd37a84c9/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc=
|
||||
google.golang.org/genproto v0.0.0-20191216164720-4f79533eabd1/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc=
|
||||
google.golang.org/genproto v0.0.0-20191230161307-f3c370f40bfb/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc=
|
||||
google.golang.org/genproto v0.0.0-20200115191322-ca5a22157cba/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc=
|
||||
google.golang.org/genproto v0.0.0-20200122232147-0452cf42e150/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc=
|
||||
google.golang.org/genproto v0.0.0-20200204135345-fa8e72b47b90/go.mod h1:GmwEX6Z4W5gMy59cAlVYjN9JhxgbQH6Gn+gFDQe2lzA=
|
||||
google.golang.org/genproto v0.0.0-20200212174721-66ed5ce911ce/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c=
|
||||
google.golang.org/genproto v0.0.0-20200224152610-e50cd9704f63/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c=
|
||||
google.golang.org/genproto v0.0.0-20200228133532-8c2c7df3a383/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c=
|
||||
google.golang.org/genproto v0.0.0-20200305110556-506484158171/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c=
|
||||
google.golang.org/genproto v0.0.0-20200312145019-da6875a35672/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c=
|
||||
google.golang.org/genproto v0.0.0-20200331122359-1ee6d9798940/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c=
|
||||
google.golang.org/genproto v0.0.0-20200430143042-b979b6f78d84/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c=
|
||||
google.golang.org/genproto v0.0.0-20200511104702-f5ebc3bea380/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c=
|
||||
google.golang.org/genproto v0.0.0-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-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.33.1/go.mod h1:fr5YgcSWrqhRRxogOsw7RzIpsmvOZ6IcH4kBYTpR3n0=
|
||||
google.golang.org/grpc v1.36.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU=
|
||||
google.golang.org/grpc v1.40.0/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/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/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
|
||||
gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127 h1:qIbj1fsPNlZgppZ+VLlY7N33q108Sa+fhmuc+sWQYwY=
|
||||
gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
|
||||
gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI=
|
||||
gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
|
||||
gopkg.in/yaml.v2 v2.2.3/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
|
||||
gopkg.in/yaml.v2 v2.2.8/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-20210107192922-496545a6307b h1:h8qDotaEPuJATrMmW04NCwg7v22aHH28wwpauUhK9Oo=
|
||||
gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
|
||||
honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4=
|
||||
honnef.co/go/tools v0.0.0-20190106161140-3f1c8253044a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4=
|
||||
honnef.co/go/tools v0.0.0-20190418001031-e561f6794a2a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4=
|
||||
honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4=
|
||||
honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg=
|
||||
honnef.co/go/tools v0.0.1-2020.1.3/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k=
|
||||
honnef.co/go/tools v0.0.1-2020.1.4/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k=
|
||||
rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8=
|
||||
rsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0=
|
||||
rsc.io/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA=
|
||||
sigs.k8s.io/yaml v1.3.0 h1:a2VclLzOGrwOHDiV8EfBGhvjHvP46CtW5j6POvhYGGo=
|
||||
sigs.k8s.io/yaml v1.3.0/go.mod h1:GeOyir5tyXNByN85N/dRIT9es5UQNerPYEKK56eTBm8=
|
||||
356
components/common/pkg/auth/interceptors/auth.go
Normal file
356
components/common/pkg/auth/interceptors/auth.go
Normal file
@@ -0,0 +1,356 @@
|
||||
package interceptors
|
||||
|
||||
import (
|
||||
"context"
|
||||
"errors"
|
||||
"fmt"
|
||||
"net/http"
|
||||
"strings"
|
||||
"time"
|
||||
|
||||
authv3 "github.com/RafaySystems/rcloud-base/components/common/pkg/auth/v3"
|
||||
"github.com/RafaySystems/rcloud-base/components/common/pkg/gateway"
|
||||
"github.com/RafaySystems/rcloud-base/components/common/pkg/hashid"
|
||||
logv2 "github.com/RafaySystems/rcloud-base/components/common/pkg/log/v2"
|
||||
commonv3 "github.com/RafaySystems/rcloud-base/components/common/proto/types/commonpb/v3"
|
||||
"github.com/julienschmidt/httprouter"
|
||||
"google.golang.org/grpc"
|
||||
"google.golang.org/grpc/metadata"
|
||||
)
|
||||
|
||||
var _log = logv2.GetLogger()
|
||||
|
||||
var _dummyHandler = func(w http.ResponseWriter, r *http.Request, _ httprouter.Params) {}
|
||||
|
||||
const (
|
||||
cookieHeader = "cookie"
|
||||
apiKeyHeader = "x-rafay-api-keyid"
|
||||
rafaySession = "rsid"
|
||||
)
|
||||
|
||||
func getAPIKey(ctx context.Context) string {
|
||||
md, ok := metadata.FromIncomingContext(ctx)
|
||||
if !ok {
|
||||
return ""
|
||||
}
|
||||
apiKeys, ok := md[apiKeyHeader]
|
||||
if !ok {
|
||||
return ""
|
||||
}
|
||||
return apiKeys[0]
|
||||
}
|
||||
|
||||
func getRsid(ctx context.Context) string {
|
||||
//If rsid is present in the header, use it directly
|
||||
md, ok := metadata.FromIncomingContext(ctx)
|
||||
if !ok {
|
||||
return ""
|
||||
}
|
||||
_log.Debugw("incoming metadta", "md", md)
|
||||
//rsid is part of Cookies
|
||||
cookies, ok := md[cookieHeader]
|
||||
if !ok {
|
||||
return ""
|
||||
}
|
||||
return readCookies(cookies[0], rafaySession)
|
||||
}
|
||||
|
||||
func readCookies(cookies, filter string) string {
|
||||
parts := strings.Split(strings.TrimSpace(cookies), ";")
|
||||
// Per-line attributes
|
||||
for i := 0; i < len(parts); i++ {
|
||||
parts[i] = strings.TrimSpace(parts[i])
|
||||
if len(parts[i]) == 0 {
|
||||
continue
|
||||
}
|
||||
name, val := parts[i], ""
|
||||
if j := strings.Index(name, "="); j >= 0 {
|
||||
name, val = name[:j], name[j+1:]
|
||||
}
|
||||
if filter != "" && filter != name {
|
||||
continue
|
||||
}
|
||||
return val
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func allowRequest(ctx context.Context, opts *options, req interface{}) error {
|
||||
if md, ok := metadata.FromIncomingContext(ctx); ok {
|
||||
isGateway := func() bool {
|
||||
if vals := md.Get(gateway.GatewayRequest); vals != nil {
|
||||
return true
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
url := func() string {
|
||||
if urls, ok := md[gateway.GatewayURL]; ok {
|
||||
return urls[0]
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
rsid := func() string {
|
||||
if rsids, ok := md[gateway.GatewayRSID]; ok {
|
||||
return rsids[0]
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
apiKey := func() string {
|
||||
if apiKeys, ok := md[gateway.GatewayAPIKey]; ok {
|
||||
return apiKeys[0]
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
method := func() string {
|
||||
if methods, ok := md[gateway.GatewayMethod]; ok {
|
||||
return methods[0]
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
excluded := func() bool {
|
||||
if opts.exclude == nil {
|
||||
return false
|
||||
}
|
||||
|
||||
if h, _, _ := opts.exclude.Lookup(method(), url()); h != nil {
|
||||
return true
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
if opts.logRequest {
|
||||
_log.Infow("allowRequest", "url", url(), "isGateway", isGateway(), "rsid", rsid(), "apiKey", apiKey(), "method", method(), "excluded", excluded())
|
||||
}
|
||||
|
||||
// if request originates from gateway and method and path are not in excluded
|
||||
if isGateway() && !excluded() {
|
||||
allowed := func() error {
|
||||
aCtx, cancel := context.WithTimeout(ctx, time.Second*10)
|
||||
defer cancel()
|
||||
|
||||
client, err := opts.pool.NewClient(aCtx)
|
||||
if err != nil {
|
||||
_log.Infow("unable to get new auth client", "error", err.Error())
|
||||
return err
|
||||
}
|
||||
defer client.Close()
|
||||
|
||||
resp, err := client.IsRequestAllowed(aCtx, func() *authv3.IsRequestAllowedRequest {
|
||||
return &authv3.IsRequestAllowedRequest{
|
||||
Url: url(),
|
||||
Method: method(),
|
||||
Rsid: rsid(),
|
||||
ApiKey: apiKey(),
|
||||
}
|
||||
}())
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
if resp.GetStatus() != authv3.RequestStatus_RequestAllowed {
|
||||
err = fmt.Errorf("%s", resp.Reason)
|
||||
return err
|
||||
}
|
||||
|
||||
if resp.SessionData != nil {
|
||||
|
||||
var partnerID int64
|
||||
var organizationID int64
|
||||
|
||||
if _, ok := req.(commonv3.Metadata); ok {
|
||||
_log.Debugw("adding request meta")
|
||||
_, err := hashid.IDFromString(resp.SessionData.Account)
|
||||
if err != nil {
|
||||
_log.Infow("unable to convert account id", "accountID", resp.SessionData.Account, "error", err.Error())
|
||||
return err
|
||||
}
|
||||
partnerID, err = hashid.IDFromString(resp.SessionData.Partner)
|
||||
if err != nil {
|
||||
_log.Infow("unable to convert partner id", "partnerID", resp.SessionData.Partner, "error", err.Error())
|
||||
return err
|
||||
}
|
||||
organizationID, err = hashid.IDFromString(resp.SessionData.Organization)
|
||||
if err != nil {
|
||||
_log.Infow("unable to convert organization id", "organizationID", resp.SessionData.Organization, "error", err.Error())
|
||||
return err
|
||||
}
|
||||
fmt.Println(partnerID)
|
||||
fmt.Println(organizationID)
|
||||
/*rmo.SetAccountID(accountID)
|
||||
rmo.SetPartnerID(partnerID)
|
||||
rmo.SetOrganizationID(organizationID)
|
||||
rmo.SetIsSSOUser(resp.SessionData.IsSsoUser)
|
||||
rmo.SetGroups(resp.SessionData.Groups)
|
||||
rmo.SetUsername(resp.SessionData.Username)
|
||||
rmo.SetAuthType(resp.SessionData.AuthType.String())
|
||||
rmo.SetClientType(resp.SessionData.ClientType.String())
|
||||
rmo.SetIdp(resp.SessionData.Idp)
|
||||
rmo.SetIsAllNsAccess(resp.SessionData.IsAllNsAccess)
|
||||
rmo.SetIsOrgAdmin(resp.SessionData.IsOrgAdmin)
|
||||
rmo.SetIsPartnerAdmin(resp.SessionData.IsPartnerAdmin)
|
||||
rmo.SetIsSuperAdmin(resp.SessionData.IsSuperAdmin)
|
||||
rmo.SetNamespaces(authv3.ConvertFromAuthNamespaces(resp.SessionData.Namespaces))
|
||||
rmo.SetProject(authv3.ConvertFormAuthProject(resp.SessionData.Project))
|
||||
rmo.SetIsReadonlyOrgAdmin(resp.SessionData.IsReadonlyOrgAdmin)*/
|
||||
}
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
if err := allowed(); err != nil {
|
||||
return err
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
}
|
||||
return nil
|
||||
|
||||
}
|
||||
|
||||
func addRequestMeta(ctx context.Context, pool authv3.AuthPool, req interface{}, validateSession bool) error {
|
||||
_log.Debugw("adding request meta")
|
||||
aCtx, cancel := context.WithTimeout(ctx, time.Second*10)
|
||||
defer cancel()
|
||||
|
||||
client, err := pool.NewClient(aCtx)
|
||||
if err != nil {
|
||||
_log.Infow("unable to get new auth client", "error", err.Error())
|
||||
return err
|
||||
}
|
||||
defer client.Close()
|
||||
|
||||
rsid := getRsid(ctx)
|
||||
apiKey := getAPIKey(ctx)
|
||||
|
||||
var data *authv3.SessionData
|
||||
|
||||
if rsid != "" {
|
||||
_log.Debugw("found session", "rsid", rsid)
|
||||
resp, err := client.GetSession(ctx, &authv3.GetSessionRequest{
|
||||
SessionId: rsid,
|
||||
})
|
||||
if err != nil {
|
||||
_log.Infof("unable to get session for id %s", err.Error())
|
||||
return err
|
||||
}
|
||||
|
||||
if resp.Status == authv3.SessionStatus_SessionExists {
|
||||
_log.Debugw("session exists", "rsid", rsid)
|
||||
data = resp.Data
|
||||
}
|
||||
} else if apiKey != "" {
|
||||
resp, err := client.GetAPIKey(ctx, &authv3.GetAPIKeyRequest{
|
||||
ApiKey: apiKey,
|
||||
})
|
||||
|
||||
if err != nil {
|
||||
_log.Infow("unable to get api key", "key", apiKey, "error", err)
|
||||
return err
|
||||
}
|
||||
|
||||
if resp.Status == authv3.APIKeyStatus_APIKeyExists {
|
||||
data = resp.Data
|
||||
}
|
||||
}
|
||||
|
||||
if data != nil {
|
||||
_, err := hashid.IDFromString(data.Partner)
|
||||
if err != nil {
|
||||
_log.Infow("unable to convert partner id", "partnerID", data.Partner, "error", err.Error())
|
||||
return err
|
||||
}
|
||||
_, err = hashid.IDFromString(data.Organization)
|
||||
if err != nil {
|
||||
_log.Infow("unable to convert organization id", "organizationID", data.Organization, "error", err.Error())
|
||||
return err
|
||||
}
|
||||
|
||||
if _, ok := req.(commonv3.Metadata); ok {
|
||||
_log.Debugw("adding request meta")
|
||||
//rmo.SetPartnerID(partnerID)
|
||||
//rmo.SetOrganizationID(organizationID)
|
||||
}
|
||||
}
|
||||
if validateSession {
|
||||
if data == nil {
|
||||
return errors.New("403 Forbidden error")
|
||||
}
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
type options struct {
|
||||
pool authv3.AuthPool
|
||||
exclude *httprouter.Router
|
||||
dummy bool
|
||||
logRequest bool
|
||||
}
|
||||
|
||||
// Option is the functional arg for building auth interceptor
|
||||
type Option func(*options)
|
||||
|
||||
// WithExclude excludes the method and path from enforcing authn/authz
|
||||
func WithExclude(method, path string) Option {
|
||||
return func(opts *options) {
|
||||
if opts.exclude == nil {
|
||||
opts.exclude = httprouter.New()
|
||||
}
|
||||
|
||||
opts.exclude.Handle(method, path, _dummyHandler)
|
||||
}
|
||||
}
|
||||
|
||||
// WithAuthPool adds auth pool
|
||||
func WithAuthPool(pool authv3.AuthPool) Option {
|
||||
return func(opts *options) {
|
||||
opts.pool = pool
|
||||
}
|
||||
}
|
||||
|
||||
// WithDummy creates a dummy auth interceptor
|
||||
func WithDummy() Option {
|
||||
return func(opts *options) {
|
||||
opts.dummy = true
|
||||
}
|
||||
}
|
||||
|
||||
// WithLogRequest logs request info
|
||||
func WithLogRequest() Option {
|
||||
return func(opts *options) {
|
||||
opts.logRequest = true
|
||||
}
|
||||
}
|
||||
|
||||
// authInterceptor implements the Authentication interceptor
|
||||
type authInterceptor struct {
|
||||
opts *options
|
||||
}
|
||||
|
||||
// NewAuthInterceptorWithOptions creates auth interceptor with options
|
||||
func NewAuthInterceptorWithOptions(opts ...Option) grpc.UnaryServerInterceptor {
|
||||
aOpts := &options{}
|
||||
for _, opt := range opts {
|
||||
opt(aOpts)
|
||||
}
|
||||
|
||||
if aOpts.dummy {
|
||||
return func(ctx context.Context, req interface{}, info *grpc.UnaryServerInfo, handler grpc.UnaryHandler) (resp interface{}, err error) {
|
||||
//addDummyMeta(req)
|
||||
return handler(ctx, req)
|
||||
}
|
||||
}
|
||||
|
||||
return func(ctx context.Context, req interface{}, info *grpc.UnaryServerInfo, handler grpc.UnaryHandler) (resp interface{}, err error) {
|
||||
if err := allowRequest(ctx, aOpts, req); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return handler(ctx, req)
|
||||
}
|
||||
}
|
||||
19
components/common/pkg/auth/interceptors/auth_test.go
Normal file
19
components/common/pkg/auth/interceptors/auth_test.go
Normal file
@@ -0,0 +1,19 @@
|
||||
package interceptors
|
||||
|
||||
import (
|
||||
"context"
|
||||
"testing"
|
||||
|
||||
"google.golang.org/grpc/metadata"
|
||||
)
|
||||
|
||||
func TestGetRSID(t *testing.T) {
|
||||
mapWithRsid := make(map[string]string)
|
||||
mapWithRsid[cookieHeader] = "csrftoken=FpkPDGFZ2sAfgB1N7qZuQQfv7swEZb7Xr0q4e9tHlZAncVbt5u1a3rCa93Q2fC5s; rsid=v7eylddj5p2fl0l8q5wb6kton1t3kby5; logo_link=; support_email=support@rafay.co"
|
||||
md := metadata.New(mapWithRsid)
|
||||
ctx := metadata.NewIncomingContext(context.Background(), md)
|
||||
rsid := getRsid(ctx)
|
||||
if rsid != "v7eylddj5p2fl0l8q5wb6kton1t3kby5" {
|
||||
t.Errorf("wrong rsid")
|
||||
}
|
||||
}
|
||||
1645
components/common/pkg/auth/v3/auth.pb.go
Normal file
1645
components/common/pkg/auth/v3/auth.pb.go
Normal file
File diff suppressed because it is too large
Load Diff
140
components/common/pkg/auth/v3/auth.proto
Normal file
140
components/common/pkg/auth/v3/auth.proto
Normal file
@@ -0,0 +1,140 @@
|
||||
syntax = "proto3";
|
||||
package rafay.dev.auth.v3;
|
||||
|
||||
import "gogoproto/gogo.proto";
|
||||
|
||||
enum AuthType {
|
||||
option (gogoproto.goproto_enum_prefix) = false;
|
||||
AuthTypeNotSet = 0;
|
||||
SessionLogin = 1;
|
||||
APIKey = 2;
|
||||
}
|
||||
|
||||
enum ClientType {
|
||||
option (gogoproto.goproto_enum_prefix) = false;
|
||||
ClientTypeNotSet = 0;
|
||||
BROWSER = 1;
|
||||
CLI = 2;
|
||||
}
|
||||
|
||||
|
||||
message GetSessionRequest {
|
||||
string session_id = 1;
|
||||
}
|
||||
|
||||
enum SessionStatus {
|
||||
// disable enum prefix
|
||||
option (gogoproto.goproto_enum_prefix) = false;
|
||||
|
||||
SessionNotFound = 0;
|
||||
SessionExists = 1;
|
||||
}
|
||||
|
||||
message ResourceURLMethods {
|
||||
repeated string methods = 1;
|
||||
}
|
||||
|
||||
message NamespaceData {
|
||||
string project_id = 1;
|
||||
string namespace_id = 2;
|
||||
string role = 3;
|
||||
}
|
||||
|
||||
message ProjectRole {
|
||||
string project_id = 1;
|
||||
string role = 3;
|
||||
}
|
||||
|
||||
message ProjectData {
|
||||
bool all = 1;
|
||||
repeated ProjectRole list = 2 [(gogoproto.nullable) = false];
|
||||
}
|
||||
|
||||
message SessionData {
|
||||
string account = 1;
|
||||
string organization = 2;
|
||||
string partner = 3;
|
||||
string role = 4;
|
||||
repeated string permissions = 5;
|
||||
string partner_domain = 6;
|
||||
string username = 7;
|
||||
bool is_super_admin = 8;
|
||||
bool is_partner_admin = 9;
|
||||
bool is_sso_user = 10;
|
||||
map<string, ResourceURLMethods> resource_urls = 11;
|
||||
string ttl = 12;
|
||||
repeated string groups = 13;
|
||||
AuthType auth_type = 14;
|
||||
string idp = 15;
|
||||
map<string, bool> is_org_admin = 16;
|
||||
ClientType client_type = 17;
|
||||
map<string, bool> is_all_ns_access = 18;
|
||||
repeated NamespaceData namespaces = 19 [(gogoproto.nullable) = false];
|
||||
ProjectData project = 20;
|
||||
map<string, bool> is_readonly_org_admin = 21;
|
||||
}
|
||||
|
||||
message GetSessionResponse {
|
||||
SessionStatus status = 1;
|
||||
string reason = 2;
|
||||
SessionData data = 3;
|
||||
}
|
||||
|
||||
message GetAPIKeyRequest {
|
||||
string api_key = 1;
|
||||
}
|
||||
|
||||
enum APIKeyStatus {
|
||||
// disable enum prefix
|
||||
option (gogoproto.goproto_enum_prefix) = false;
|
||||
|
||||
APIKeyNotFound = 0;
|
||||
APIKeyExists = 1;
|
||||
}
|
||||
|
||||
message GetAPIKeyResponse {
|
||||
APIKeyStatus status = 1;
|
||||
string reason = 2;
|
||||
string secret = 3;
|
||||
SessionData data = 4;
|
||||
}
|
||||
|
||||
|
||||
message IsRequestAllowedRequest {
|
||||
string url = 1;
|
||||
string method = 2;
|
||||
string rsid = 3;
|
||||
string api_key = 4;
|
||||
}
|
||||
|
||||
enum RequestStatus {
|
||||
// disable enum prefix
|
||||
option (gogoproto.goproto_enum_prefix) = false;
|
||||
|
||||
RequestAllowed = 0;
|
||||
RequestNotAuthenticated = 1;
|
||||
RequestMethodOrURLNotAllowed = 2;
|
||||
}
|
||||
|
||||
message IsRequestAllowedResponse {
|
||||
RequestStatus status = 1;
|
||||
string reason = 2;
|
||||
SessionData sessionData = 3;
|
||||
}
|
||||
|
||||
message AuthErrorDetail {
|
||||
string error_code = 1;
|
||||
string detail = 2;
|
||||
string info = 3;
|
||||
}
|
||||
|
||||
message AuthError {
|
||||
sint32 status_code = 1;
|
||||
repeated AuthErrorDetail details = 2;
|
||||
}
|
||||
|
||||
service Auth {
|
||||
rpc IsRequestAllowed(IsRequestAllowedRequest) returns (IsRequestAllowedResponse);
|
||||
rpc GetSession(GetSessionRequest) returns (GetSessionResponse);
|
||||
rpc GetAPIKey(GetAPIKeyRequest) returns (GetAPIKeyResponse);
|
||||
}
|
||||
175
components/common/pkg/auth/v3/auth_grpc.pb.go
Normal file
175
components/common/pkg/auth/v3/auth_grpc.pb.go
Normal file
@@ -0,0 +1,175 @@
|
||||
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
|
||||
// versions:
|
||||
// - protoc-gen-go-grpc v1.2.0
|
||||
// - protoc (unknown)
|
||||
// source: pkg/auth/v3/auth.proto
|
||||
|
||||
package authv3
|
||||
|
||||
import (
|
||||
context "context"
|
||||
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
|
||||
|
||||
// AuthClient is the client API for Auth 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 AuthClient interface {
|
||||
IsRequestAllowed(ctx context.Context, in *IsRequestAllowedRequest, opts ...grpc.CallOption) (*IsRequestAllowedResponse, error)
|
||||
GetSession(ctx context.Context, in *GetSessionRequest, opts ...grpc.CallOption) (*GetSessionResponse, error)
|
||||
GetAPIKey(ctx context.Context, in *GetAPIKeyRequest, opts ...grpc.CallOption) (*GetAPIKeyResponse, error)
|
||||
}
|
||||
|
||||
type authClient struct {
|
||||
cc grpc.ClientConnInterface
|
||||
}
|
||||
|
||||
func NewAuthClient(cc grpc.ClientConnInterface) AuthClient {
|
||||
return &authClient{cc}
|
||||
}
|
||||
|
||||
func (c *authClient) IsRequestAllowed(ctx context.Context, in *IsRequestAllowedRequest, opts ...grpc.CallOption) (*IsRequestAllowedResponse, error) {
|
||||
out := new(IsRequestAllowedResponse)
|
||||
err := c.cc.Invoke(ctx, "/rafay.dev.auth.v3.Auth/IsRequestAllowed", in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *authClient) GetSession(ctx context.Context, in *GetSessionRequest, opts ...grpc.CallOption) (*GetSessionResponse, error) {
|
||||
out := new(GetSessionResponse)
|
||||
err := c.cc.Invoke(ctx, "/rafay.dev.auth.v3.Auth/GetSession", in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *authClient) GetAPIKey(ctx context.Context, in *GetAPIKeyRequest, opts ...grpc.CallOption) (*GetAPIKeyResponse, error) {
|
||||
out := new(GetAPIKeyResponse)
|
||||
err := c.cc.Invoke(ctx, "/rafay.dev.auth.v3.Auth/GetAPIKey", in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
// AuthServer is the server API for Auth service.
|
||||
// All implementations should embed UnimplementedAuthServer
|
||||
// for forward compatibility
|
||||
type AuthServer interface {
|
||||
IsRequestAllowed(context.Context, *IsRequestAllowedRequest) (*IsRequestAllowedResponse, error)
|
||||
GetSession(context.Context, *GetSessionRequest) (*GetSessionResponse, error)
|
||||
GetAPIKey(context.Context, *GetAPIKeyRequest) (*GetAPIKeyResponse, error)
|
||||
}
|
||||
|
||||
// UnimplementedAuthServer should be embedded to have forward compatible implementations.
|
||||
type UnimplementedAuthServer struct {
|
||||
}
|
||||
|
||||
func (UnimplementedAuthServer) IsRequestAllowed(context.Context, *IsRequestAllowedRequest) (*IsRequestAllowedResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method IsRequestAllowed not implemented")
|
||||
}
|
||||
func (UnimplementedAuthServer) GetSession(context.Context, *GetSessionRequest) (*GetSessionResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method GetSession not implemented")
|
||||
}
|
||||
func (UnimplementedAuthServer) GetAPIKey(context.Context, *GetAPIKeyRequest) (*GetAPIKeyResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method GetAPIKey not implemented")
|
||||
}
|
||||
|
||||
// UnsafeAuthServer may be embedded to opt out of forward compatibility for this service.
|
||||
// Use of this interface is not recommended, as added methods to AuthServer will
|
||||
// result in compilation errors.
|
||||
type UnsafeAuthServer interface {
|
||||
mustEmbedUnimplementedAuthServer()
|
||||
}
|
||||
|
||||
func RegisterAuthServer(s grpc.ServiceRegistrar, srv AuthServer) {
|
||||
s.RegisterService(&Auth_ServiceDesc, srv)
|
||||
}
|
||||
|
||||
func _Auth_IsRequestAllowed_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(IsRequestAllowedRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(AuthServer).IsRequestAllowed(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: "/rafay.dev.auth.v3.Auth/IsRequestAllowed",
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(AuthServer).IsRequestAllowed(ctx, req.(*IsRequestAllowedRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _Auth_GetSession_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(GetSessionRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(AuthServer).GetSession(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: "/rafay.dev.auth.v3.Auth/GetSession",
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(AuthServer).GetSession(ctx, req.(*GetSessionRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _Auth_GetAPIKey_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(GetAPIKeyRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(AuthServer).GetAPIKey(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: "/rafay.dev.auth.v3.Auth/GetAPIKey",
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(AuthServer).GetAPIKey(ctx, req.(*GetAPIKeyRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
// Auth_ServiceDesc is the grpc.ServiceDesc for Auth service.
|
||||
// It's only intended for direct use with grpc.RegisterService,
|
||||
// and not to be introspected or modified (even as a copy)
|
||||
var Auth_ServiceDesc = grpc.ServiceDesc{
|
||||
ServiceName: "rafay.dev.auth.v3.Auth",
|
||||
HandlerType: (*AuthServer)(nil),
|
||||
Methods: []grpc.MethodDesc{
|
||||
{
|
||||
MethodName: "IsRequestAllowed",
|
||||
Handler: _Auth_IsRequestAllowed_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "GetSession",
|
||||
Handler: _Auth_GetSession_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "GetAPIKey",
|
||||
Handler: _Auth_GetAPIKey_Handler,
|
||||
},
|
||||
},
|
||||
Streams: []grpc.StreamDesc{},
|
||||
Metadata: "pkg/auth/v3/auth.proto",
|
||||
}
|
||||
59
components/common/pkg/auth/v3/pool.go
Normal file
59
components/common/pkg/auth/v3/pool.go
Normal file
@@ -0,0 +1,59 @@
|
||||
package authv3
|
||||
|
||||
import (
|
||||
"github.com/RafaySystems/rcloud-base/components/common/pkg/pool"
|
||||
|
||||
"context"
|
||||
|
||||
grpcpool "github.com/processout/grpc-go-pool"
|
||||
)
|
||||
|
||||
// AuthPoolClient is the interface for auth pool client
|
||||
type AuthPoolClient interface {
|
||||
Unhealthy()
|
||||
Close() error
|
||||
AuthClient
|
||||
}
|
||||
|
||||
type authPoolClient struct {
|
||||
*grpcpool.ClientConn
|
||||
*authClient
|
||||
}
|
||||
|
||||
var _ AuthPoolClient = (*authPoolClient)(nil)
|
||||
|
||||
// AuthPool maintains pool of grpc connections to auth service
|
||||
type AuthPool interface {
|
||||
Close()
|
||||
NewClient(ctx context.Context) (AuthPoolClient, error)
|
||||
}
|
||||
|
||||
var _ AuthPool = (*authPool)(nil)
|
||||
|
||||
type authPool struct {
|
||||
*pool.GRPCPool
|
||||
}
|
||||
|
||||
func (p *authPool) Close() {
|
||||
if p.GRPCPool != nil {
|
||||
p.GRPCPool.Close()
|
||||
}
|
||||
}
|
||||
|
||||
func (p *authPool) NewClient(ctx context.Context) (AuthPoolClient, error) {
|
||||
cc, err := p.GetConnection(ctx)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return &authPoolClient{
|
||||
cc,
|
||||
&authClient{cc.ClientConn},
|
||||
}, nil
|
||||
}
|
||||
|
||||
// NewAuthPool returns auth pool
|
||||
func NewAuthPool(addr string, maxConn int) AuthPool {
|
||||
return &authPool{
|
||||
GRPCPool: pool.NewGRPCPool(addr, maxConn, nil),
|
||||
}
|
||||
}
|
||||
42
components/common/pkg/gateway/annotator.go
Normal file
42
components/common/pkg/gateway/annotator.go
Normal file
@@ -0,0 +1,42 @@
|
||||
package gateway
|
||||
|
||||
import (
|
||||
"context"
|
||||
"net/http"
|
||||
|
||||
"google.golang.org/grpc/metadata"
|
||||
)
|
||||
|
||||
// Rafay Gateway annotations
|
||||
const (
|
||||
GatewayRequest = "rafay-gateway-request"
|
||||
GatewayURL = "rafay-gateway-url"
|
||||
GatewayRSID = "rafay-gateway-rsid"
|
||||
GatewayAPIKey = "rafay-gateway-apikey"
|
||||
GatewayMethod = "rafay-gateway-method"
|
||||
rafaySessionCookie = "rsid"
|
||||
rafayAPIKeyHeader = "X-RAFAY-API-KEYID"
|
||||
UserAgent = "rafay-gateway-user-agent"
|
||||
Host = "rafay-gateway-host"
|
||||
RemoteAddr = "rafay-gateway-remote-addr"
|
||||
)
|
||||
|
||||
// rafayGatewayAnnotator adds rafay gateway specific annotations
|
||||
var rafayGatewayAnnotator = func(ctx context.Context, r *http.Request) metadata.MD {
|
||||
return metadata.New(map[string]string{
|
||||
GatewayRequest: "true",
|
||||
GatewayURL: r.URL.EscapedPath(),
|
||||
GatewayRSID: func() string {
|
||||
sid, err := r.Cookie(rafaySessionCookie)
|
||||
if err != nil {
|
||||
return ""
|
||||
}
|
||||
return sid.Value
|
||||
}(),
|
||||
GatewayAPIKey: r.Header.Get(rafayAPIKeyHeader),
|
||||
GatewayMethod: r.Method,
|
||||
UserAgent: r.UserAgent(),
|
||||
Host: r.Host,
|
||||
RemoteAddr: r.RemoteAddr,
|
||||
})
|
||||
}
|
||||
29
components/common/pkg/gateway/error.go
Normal file
29
components/common/pkg/gateway/error.go
Normal file
@@ -0,0 +1,29 @@
|
||||
package gateway
|
||||
|
||||
import (
|
||||
"context"
|
||||
"net/http"
|
||||
|
||||
"github.com/grpc-ecosystem/grpc-gateway/runtime"
|
||||
"github.com/segmentio/encoding/json"
|
||||
"google.golang.org/grpc"
|
||||
)
|
||||
|
||||
type errorBody struct {
|
||||
Err string `json:"error,omitempty"`
|
||||
}
|
||||
|
||||
// customErrorHandler implements custom grpc error handler
|
||||
func customErrorHandler(ctx context.Context, _ *runtime.ServeMux, marshaler runtime.Marshaler, w http.ResponseWriter, _ *http.Request, err error) {
|
||||
const fallback = `{"error": "failed to marshal error message"}`
|
||||
|
||||
w.Header().Set("Content-type", marshaler.ContentType())
|
||||
w.WriteHeader(runtime.HTTPStatusFromCode(grpc.Code(err)))
|
||||
jErr := json.NewEncoder(w).Encode(errorBody{
|
||||
Err: grpc.ErrorDesc(err),
|
||||
})
|
||||
|
||||
if jErr != nil {
|
||||
w.Write([]byte(fallback))
|
||||
}
|
||||
}
|
||||
50
components/common/pkg/gateway/gateway.go
Normal file
50
components/common/pkg/gateway/gateway.go
Normal file
@@ -0,0 +1,50 @@
|
||||
package gateway
|
||||
|
||||
import (
|
||||
"context"
|
||||
"errors"
|
||||
"net/http"
|
||||
|
||||
"google.golang.org/grpc"
|
||||
|
||||
"github.com/grpc-ecosystem/grpc-gateway/v2/runtime"
|
||||
)
|
||||
|
||||
// ErrNoHandlers returned when not handlers are passed to gateway
|
||||
var ErrNoHandlers = errors.New("no handlers defined")
|
||||
|
||||
// HandlerFromEndpoint defines the function for registering grpc gateway handlers to grpc endpoint
|
||||
type HandlerFromEndpoint func(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error)
|
||||
|
||||
// NewGateway returns new grpc gateway
|
||||
func NewGateway(ctx context.Context, endpoint string, serveMuxOptions []runtime.ServeMuxOption, handlers ...HandlerFromEndpoint) (http.Handler, error) {
|
||||
|
||||
rafayJSON := NewRafayJSON()
|
||||
rafayYAML := NewRafayYAML()
|
||||
httpBody := NewHTTPBodyMarshaler()
|
||||
serveMuxOptions = append(serveMuxOptions,
|
||||
runtime.WithMarshalerOption(runtime.MIMEWildcard, httpBody),
|
||||
runtime.WithMarshalerOption(jsonContentType, rafayJSON),
|
||||
runtime.WithMarshalerOption(yamlContentType, rafayYAML),
|
||||
//runtime.WithProtoErrorHandler(customErrorHandler),
|
||||
//runtime.WithIncomingHeaderMatcher(customHeaderMatcher),
|
||||
runtime.WithMetadata(rafayGatewayAnnotator),
|
||||
)
|
||||
|
||||
mux := runtime.NewServeMux(serveMuxOptions...)
|
||||
|
||||
if len(handlers) < 1 {
|
||||
return nil, ErrNoHandlers
|
||||
}
|
||||
|
||||
opts := []grpc.DialOption{grpc.WithInsecure()}
|
||||
|
||||
for _, handler := range handlers {
|
||||
err := handler(ctx, mux, endpoint, opts)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
}
|
||||
|
||||
return mux, nil
|
||||
}
|
||||
44
components/common/pkg/gateway/httpbody.go
Normal file
44
components/common/pkg/gateway/httpbody.go
Normal file
@@ -0,0 +1,44 @@
|
||||
package gateway
|
||||
|
||||
import (
|
||||
common "github.com/RafaySystems/rcloud-base/components/common/proto/types/commonpb/v3"
|
||||
"github.com/grpc-ecosystem/grpc-gateway/v2/runtime"
|
||||
)
|
||||
|
||||
// httpBodyMarshaler is a Marshaler which supports marshaling of a
|
||||
// rafay.dev.common.types.v2.HttpBody message as the full response body if it is
|
||||
// the actual message used as the response. If not, then this will
|
||||
// simply fallback to the Marshaler specified as its default Marshaler.
|
||||
type httpBodyMarshaler struct {
|
||||
runtime.Marshaler
|
||||
}
|
||||
|
||||
// NewHTTPBodyMarshaler returns new http body marshaler
|
||||
func NewHTTPBodyMarshaler() runtime.Marshaler {
|
||||
return &httpBodyMarshaler{
|
||||
Marshaler: &rafayJSON{},
|
||||
}
|
||||
}
|
||||
|
||||
// ContentType implementation to keep backwards compatability with marshal interface
|
||||
func (h *httpBodyMarshaler) ContentType(v interface{}) string {
|
||||
return h.ContentTypeFromMessage(nil)
|
||||
}
|
||||
|
||||
// ContentTypeFromMessage in case v is a google.api.HttpBody message it returns
|
||||
// its specified content type otherwise fall back to the default Marshaler.
|
||||
func (h *httpBodyMarshaler) ContentTypeFromMessage(v interface{}) string {
|
||||
if httpBody, ok := v.(*common.HttpBody); ok {
|
||||
return httpBody.GetContentType()
|
||||
}
|
||||
return h.Marshaler.ContentType(v)
|
||||
}
|
||||
|
||||
// Marshal marshals "v" by returning the body bytes if v is a
|
||||
// google.api.HttpBody message, otherwise it falls back to the default Marshaler.
|
||||
func (h *httpBodyMarshaler) Marshal(v interface{}) ([]byte, error) {
|
||||
if httpBody, ok := v.(*common.HttpBody); ok {
|
||||
return httpBody.Data, nil
|
||||
}
|
||||
return h.Marshaler.Marshal(v)
|
||||
}
|
||||
49
components/common/pkg/gateway/json.go
Normal file
49
components/common/pkg/gateway/json.go
Normal file
@@ -0,0 +1,49 @@
|
||||
package gateway
|
||||
|
||||
import (
|
||||
"io"
|
||||
|
||||
"github.com/grpc-ecosystem/grpc-gateway/v2/runtime"
|
||||
"github.com/segmentio/encoding/json"
|
||||
)
|
||||
|
||||
const (
|
||||
jsonContentType string = "application/json"
|
||||
)
|
||||
|
||||
// rafayJSON is the rafay object to json marshaller
|
||||
type rafayJSON struct {
|
||||
}
|
||||
|
||||
// NewRafayJSON returns new grpc gateway rafay json marshaller
|
||||
func NewRafayJSON() runtime.Marshaler {
|
||||
return &rafayJSON{}
|
||||
}
|
||||
|
||||
// Marshal marshals "v" into byte sequence.
|
||||
func (m *rafayJSON) Marshal(v interface{}) ([]byte, error) {
|
||||
|
||||
return json.Marshal(v)
|
||||
}
|
||||
|
||||
// Unmarshal unmarshals "data" into "v".
|
||||
// "v" must be a pointer value.
|
||||
func (m *rafayJSON) Unmarshal(b []byte, v interface{}) error {
|
||||
return json.Unmarshal(b, v)
|
||||
}
|
||||
|
||||
// NewDecoder returns a Decoder which reads byte sequence from "r".
|
||||
func (m *rafayJSON) NewDecoder(r io.Reader) runtime.Decoder {
|
||||
return json.NewDecoder(r)
|
||||
}
|
||||
|
||||
// NewEncoder returns an Encoder which writes bytes sequence into "w".
|
||||
func (m *rafayJSON) NewEncoder(w io.Writer) runtime.Encoder {
|
||||
return json.NewEncoder(w)
|
||||
|
||||
}
|
||||
|
||||
// ContentType returns the Content-Type which this marshaler is responsible for.
|
||||
func (m *rafayJSON) ContentType(v interface{}) string {
|
||||
return jsonContentType
|
||||
}
|
||||
64
components/common/pkg/gateway/json_test.go
Normal file
64
components/common/pkg/gateway/json_test.go
Normal file
@@ -0,0 +1,64 @@
|
||||
package gateway_test
|
||||
|
||||
import (
|
||||
"bytes"
|
||||
"testing"
|
||||
"time"
|
||||
|
||||
"github.com/RafaySystems/rcloud-base/components/common/pkg/gateway"
|
||||
"github.com/RafaySystems/rcloud-base/components/common/pkg/gateway/testdata"
|
||||
)
|
||||
|
||||
func TestRafayJSONMarshaller(t *testing.T) {
|
||||
m := gateway.NewRafayJSON()
|
||||
|
||||
now := time.Now()
|
||||
|
||||
t1 := testdata.TestYAML{
|
||||
Name: "test",
|
||||
Time: &now,
|
||||
Labels: map[string]string{"l1": "l2"},
|
||||
}
|
||||
|
||||
yb, err := m.Marshal(&t1)
|
||||
if err != nil {
|
||||
t.Error(err)
|
||||
return
|
||||
}
|
||||
|
||||
t.Log(string(yb))
|
||||
|
||||
var t2 testdata.TestYAML
|
||||
|
||||
err = m.Unmarshal(yb, &t2)
|
||||
if err != nil {
|
||||
t.Error(err)
|
||||
}
|
||||
|
||||
t.Log(t2)
|
||||
|
||||
bb1 := new(bytes.Buffer)
|
||||
|
||||
bb1.Write(yb)
|
||||
|
||||
dec := m.NewDecoder(bb1)
|
||||
var t3 testdata.TestYAML
|
||||
err = dec.Decode(&t3)
|
||||
if err != nil {
|
||||
t.Error(err)
|
||||
return
|
||||
}
|
||||
t.Log(t2)
|
||||
|
||||
bb2 := new(bytes.Buffer)
|
||||
|
||||
enc := m.NewEncoder(bb2)
|
||||
err = enc.Encode(&t1)
|
||||
if err != nil {
|
||||
t.Error(err)
|
||||
return
|
||||
}
|
||||
|
||||
t.Log(bb2.String())
|
||||
|
||||
}
|
||||
100
components/common/pkg/gateway/testdata/gateway_test.go
vendored
Normal file
100
components/common/pkg/gateway/testdata/gateway_test.go
vendored
Normal file
@@ -0,0 +1,100 @@
|
||||
package testdata
|
||||
|
||||
import (
|
||||
"context"
|
||||
"encoding/json"
|
||||
"fmt"
|
||||
"io/ioutil"
|
||||
"net"
|
||||
"net/http"
|
||||
"testing"
|
||||
|
||||
"github.com/RafaySystems/rcloud-base/components/common/pkg/gateway"
|
||||
"github.com/RafaySystems/rcloud-base/components/common/pkg/grpc"
|
||||
"github.com/grpc-ecosystem/grpc-gateway/runtime"
|
||||
)
|
||||
|
||||
type testServer struct {
|
||||
}
|
||||
|
||||
func (s *testServer) Get(ctx context.Context, o *TestObject) (*TestObject, error) {
|
||||
fmt.Println(o)
|
||||
return o, nil
|
||||
}
|
||||
|
||||
func runServer(stop <-chan struct{}) {
|
||||
|
||||
go func() {
|
||||
lr, err := net.Listen("tcp", ":9998")
|
||||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
|
||||
s, err := grpc.NewServer()
|
||||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
RegisterTestServer(s, &testServer{})
|
||||
|
||||
if err := s.Serve(lr); err != nil {
|
||||
panic(err)
|
||||
}
|
||||
}()
|
||||
|
||||
go func() {
|
||||
mux := http.NewServeMux()
|
||||
|
||||
gwHandler, err := gateway.NewGateway(context.TODO(), ":9998", make([]runtime.ServeMuxOption, 0), RegisterTestHandlerFromEndpoint)
|
||||
|
||||
mux.Handle("/", gwHandler)
|
||||
|
||||
hs := http.Server{
|
||||
Addr: ":9999",
|
||||
Handler: mux,
|
||||
}
|
||||
|
||||
if err = hs.ListenAndServe(); err != nil {
|
||||
panic(err)
|
||||
}
|
||||
}()
|
||||
|
||||
<-stop
|
||||
|
||||
}
|
||||
|
||||
func TestGateway(t *testing.T) {
|
||||
stop := make(chan struct{})
|
||||
|
||||
go runServer(stop)
|
||||
|
||||
defer func() {
|
||||
close(stop)
|
||||
}()
|
||||
|
||||
client := http.Client{}
|
||||
resp, err := client.Get("http://localhost:9999/v2/test/project/rx8099/test/123")
|
||||
if err != nil {
|
||||
t.Error(err)
|
||||
return
|
||||
}
|
||||
|
||||
b, err := ioutil.ReadAll(resp.Body)
|
||||
if err != nil {
|
||||
t.Error(err)
|
||||
return
|
||||
}
|
||||
|
||||
var obj TestObject
|
||||
|
||||
err = json.Unmarshal(b, &obj)
|
||||
if err != nil {
|
||||
t.Error(err)
|
||||
return
|
||||
}
|
||||
|
||||
if obj.UrlScope != "project/rx8099" {
|
||||
t.Error("expected project/rx8099, got", obj.UrlScope)
|
||||
return
|
||||
}
|
||||
|
||||
}
|
||||
464
components/common/pkg/gateway/testdata/test.pb.go
vendored
Normal file
464
components/common/pkg/gateway/testdata/test.pb.go
vendored
Normal file
@@ -0,0 +1,464 @@
|
||||
// Code generated by protoc-gen-go. DO NOT EDIT.
|
||||
// versions:
|
||||
// protoc-gen-go v1.27.1
|
||||
// protoc (unknown)
|
||||
// source: pkg/gateway/testdata/test.proto
|
||||
|
||||
package testdata
|
||||
|
||||
import (
|
||||
_ "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"
|
||||
timestamppb "google.golang.org/protobuf/types/known/timestamppb"
|
||||
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 TestYAML struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
|
||||
Time *timestamppb.Timestamp `protobuf:"bytes,2,opt,name=time,proto3" json:"time,omitempty"`
|
||||
Labels map[string]string `protobuf:"bytes,3,rep,name=labels,proto3" json:"labels,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
|
||||
}
|
||||
|
||||
func (x *TestYAML) Reset() {
|
||||
*x = TestYAML{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_pkg_gateway_testdata_test_proto_msgTypes[0]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
}
|
||||
|
||||
func (x *TestYAML) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*TestYAML) ProtoMessage() {}
|
||||
|
||||
func (x *TestYAML) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_pkg_gateway_testdata_test_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 TestYAML.ProtoReflect.Descriptor instead.
|
||||
func (*TestYAML) Descriptor() ([]byte, []int) {
|
||||
return file_pkg_gateway_testdata_test_proto_rawDescGZIP(), []int{0}
|
||||
}
|
||||
|
||||
func (x *TestYAML) GetName() string {
|
||||
if x != nil {
|
||||
return x.Name
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *TestYAML) GetTime() *timestamppb.Timestamp {
|
||||
if x != nil {
|
||||
return x.Time
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (x *TestYAML) GetLabels() map[string]string {
|
||||
if x != nil {
|
||||
return x.Labels
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
type TestMetadata struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
|
||||
}
|
||||
|
||||
func (x *TestMetadata) Reset() {
|
||||
*x = TestMetadata{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_pkg_gateway_testdata_test_proto_msgTypes[1]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
}
|
||||
|
||||
func (x *TestMetadata) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*TestMetadata) ProtoMessage() {}
|
||||
|
||||
func (x *TestMetadata) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_pkg_gateway_testdata_test_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 TestMetadata.ProtoReflect.Descriptor instead.
|
||||
func (*TestMetadata) Descriptor() ([]byte, []int) {
|
||||
return file_pkg_gateway_testdata_test_proto_rawDescGZIP(), []int{1}
|
||||
}
|
||||
|
||||
func (x *TestMetadata) GetName() string {
|
||||
if x != nil {
|
||||
return x.Name
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
type TestObjectSpec struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
}
|
||||
|
||||
func (x *TestObjectSpec) Reset() {
|
||||
*x = TestObjectSpec{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_pkg_gateway_testdata_test_proto_msgTypes[2]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
}
|
||||
|
||||
func (x *TestObjectSpec) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*TestObjectSpec) ProtoMessage() {}
|
||||
|
||||
func (x *TestObjectSpec) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_pkg_gateway_testdata_test_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 TestObjectSpec.ProtoReflect.Descriptor instead.
|
||||
func (*TestObjectSpec) Descriptor() ([]byte, []int) {
|
||||
return file_pkg_gateway_testdata_test_proto_rawDescGZIP(), []int{2}
|
||||
}
|
||||
|
||||
type TestObjectStatus struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
}
|
||||
|
||||
func (x *TestObjectStatus) Reset() {
|
||||
*x = TestObjectStatus{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_pkg_gateway_testdata_test_proto_msgTypes[3]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
}
|
||||
|
||||
func (x *TestObjectStatus) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*TestObjectStatus) ProtoMessage() {}
|
||||
|
||||
func (x *TestObjectStatus) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_pkg_gateway_testdata_test_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 TestObjectStatus.ProtoReflect.Descriptor instead.
|
||||
func (*TestObjectStatus) Descriptor() ([]byte, []int) {
|
||||
return file_pkg_gateway_testdata_test_proto_rawDescGZIP(), []int{3}
|
||||
}
|
||||
|
||||
type TestObject struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
Metadata *TestMetadata `protobuf:"bytes,1,opt,name=metadata,proto3" json:"metadata,omitempty"`
|
||||
Spec *TestObjectSpec `protobuf:"bytes,2,opt,name=spec,proto3" json:"spec,omitempty"`
|
||||
Status *TestObjectStatus `protobuf:"bytes,3,opt,name=status,proto3" json:"status,omitempty"`
|
||||
}
|
||||
|
||||
func (x *TestObject) Reset() {
|
||||
*x = TestObject{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_pkg_gateway_testdata_test_proto_msgTypes[4]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
}
|
||||
|
||||
func (x *TestObject) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*TestObject) ProtoMessage() {}
|
||||
|
||||
func (x *TestObject) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_pkg_gateway_testdata_test_proto_msgTypes[4]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use TestObject.ProtoReflect.Descriptor instead.
|
||||
func (*TestObject) Descriptor() ([]byte, []int) {
|
||||
return file_pkg_gateway_testdata_test_proto_rawDescGZIP(), []int{4}
|
||||
}
|
||||
|
||||
func (x *TestObject) GetMetadata() *TestMetadata {
|
||||
if x != nil {
|
||||
return x.Metadata
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (x *TestObject) GetSpec() *TestObjectSpec {
|
||||
if x != nil {
|
||||
return x.Spec
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (x *TestObject) GetStatus() *TestObjectStatus {
|
||||
if x != nil {
|
||||
return x.Status
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
var File_pkg_gateway_testdata_test_proto protoreflect.FileDescriptor
|
||||
|
||||
var file_pkg_gateway_testdata_test_proto_rawDesc = []byte{
|
||||
0x0a, 0x1f, 0x70, 0x6b, 0x67, 0x2f, 0x67, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x2f, 0x74, 0x65,
|
||||
0x73, 0x74, 0x64, 0x61, 0x74, 0x61, 0x2f, 0x74, 0x65, 0x73, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74,
|
||||
0x6f, 0x12, 0x08, 0x74, 0x65, 0x73, 0x74, 0x64, 0x61, 0x74, 0x61, 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,
|
||||
0x1f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66,
|
||||
0x2f, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f,
|
||||
0x22, 0xcc, 0x01, 0x0a, 0x08, 0x54, 0x65, 0x73, 0x74, 0x59, 0x41, 0x4d, 0x4c, 0x12, 0x12, 0x0a,
|
||||
0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d,
|
||||
0x65, 0x12, 0x39, 0x0a, 0x04, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32,
|
||||
0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75,
|
||||
0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x42, 0x09, 0x92, 0x41, 0x02,
|
||||
0x40, 0x01, 0x90, 0xdf, 0x1f, 0x01, 0x52, 0x04, 0x74, 0x69, 0x6d, 0x65, 0x12, 0x36, 0x0a, 0x06,
|
||||
0x6c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x74,
|
||||
0x65, 0x73, 0x74, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x54, 0x65, 0x73, 0x74, 0x59, 0x41, 0x4d, 0x4c,
|
||||
0x2e, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x06, 0x6c, 0x61,
|
||||
0x62, 0x65, 0x6c, 0x73, 0x1a, 0x39, 0x0a, 0x0b, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x45, 0x6e,
|
||||
0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09,
|
||||
0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02,
|
||||
0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22,
|
||||
0x22, 0x0a, 0x0c, 0x54, 0x65, 0x73, 0x74, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12,
|
||||
0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e,
|
||||
0x61, 0x6d, 0x65, 0x22, 0x10, 0x0a, 0x0e, 0x54, 0x65, 0x73, 0x74, 0x4f, 0x62, 0x6a, 0x65, 0x63,
|
||||
0x74, 0x53, 0x70, 0x65, 0x63, 0x22, 0x12, 0x0a, 0x10, 0x54, 0x65, 0x73, 0x74, 0x4f, 0x62, 0x6a,
|
||||
0x65, 0x63, 0x74, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x22, 0xcb, 0x01, 0x0a, 0x0a, 0x54, 0x65,
|
||||
0x73, 0x74, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x12, 0x47, 0x0a, 0x08, 0x6d, 0x65, 0x74, 0x61,
|
||||
0x64, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x74, 0x65, 0x73,
|
||||
0x74, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x54, 0x65, 0x73, 0x74, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61,
|
||||
0x74, 0x61, 0x42, 0x13, 0xc8, 0xde, 0x1f, 0x00, 0xd0, 0xde, 0x1f, 0x01, 0xea, 0xde, 0x1f, 0x07,
|
||||
0x2c, 0x69, 0x6e, 0x6c, 0x69, 0x6e, 0x65, 0x52, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74,
|
||||
0x61, 0x12, 0x36, 0x0a, 0x04, 0x73, 0x70, 0x65, 0x63, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32,
|
||||
0x18, 0x2e, 0x74, 0x65, 0x73, 0x74, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x54, 0x65, 0x73, 0x74, 0x4f,
|
||||
0x62, 0x6a, 0x65, 0x63, 0x74, 0x53, 0x70, 0x65, 0x63, 0x42, 0x08, 0xc8, 0xde, 0x1f, 0x00, 0xd0,
|
||||
0xde, 0x1f, 0x01, 0x52, 0x04, 0x73, 0x70, 0x65, 0x63, 0x12, 0x3c, 0x0a, 0x06, 0x73, 0x74, 0x61,
|
||||
0x74, 0x75, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x74, 0x65, 0x73, 0x74,
|
||||
0x64, 0x61, 0x74, 0x61, 0x2e, 0x54, 0x65, 0x73, 0x74, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x53,
|
||||
0x74, 0x61, 0x74, 0x75, 0x73, 0x42, 0x08, 0xc8, 0xde, 0x1f, 0x00, 0xd0, 0xde, 0x1f, 0x01, 0x52,
|
||||
0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x32, 0x70, 0x0a, 0x04, 0x54, 0x65, 0x73, 0x74, 0x12,
|
||||
0x68, 0x0a, 0x03, 0x47, 0x65, 0x74, 0x12, 0x14, 0x2e, 0x74, 0x65, 0x73, 0x74, 0x64, 0x61, 0x74,
|
||||
0x61, 0x2e, 0x54, 0x65, 0x73, 0x74, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x1a, 0x14, 0x2e, 0x74,
|
||||
0x65, 0x73, 0x74, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x54, 0x65, 0x73, 0x74, 0x4f, 0x62, 0x6a, 0x65,
|
||||
0x63, 0x74, 0x22, 0x35, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x2f, 0x12, 0x2d, 0x2f, 0x76, 0x33, 0x2f,
|
||||
0x74, 0x65, 0x73, 0x74, 0x2f, 0x7b, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x6e,
|
||||
0x61, 0x6d, 0x65, 0x7d, 0x2f, 0x74, 0x65, 0x73, 0x74, 0x2f, 0x7b, 0x6d, 0x65, 0x74, 0x61, 0x64,
|
||||
0x61, 0x74, 0x61, 0x2e, 0x6e, 0x61, 0x6d, 0x65, 0x7d, 0x42, 0xae, 0x01, 0x0a, 0x0c, 0x63, 0x6f,
|
||||
0x6d, 0x2e, 0x74, 0x65, 0x73, 0x74, 0x64, 0x61, 0x74, 0x61, 0x42, 0x09, 0x54, 0x65, 0x73, 0x74,
|
||||
0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x3f, 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,
|
||||
0x6d, 0x6f, 0x6e, 0x2f, 0x70, 0x6b, 0x67, 0x2f, 0x67, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x2f,
|
||||
0x74, 0x65, 0x73, 0x74, 0x64, 0x61, 0x74, 0x61, 0xa2, 0x02, 0x03, 0x54, 0x58, 0x58, 0xaa, 0x02,
|
||||
0x08, 0x54, 0x65, 0x73, 0x74, 0x64, 0x61, 0x74, 0x61, 0xca, 0x02, 0x08, 0x54, 0x65, 0x73, 0x74,
|
||||
0x64, 0x61, 0x74, 0x61, 0xe2, 0x02, 0x14, 0x54, 0x65, 0x73, 0x74, 0x64, 0x61, 0x74, 0x61, 0x5c,
|
||||
0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x08, 0x54, 0x65,
|
||||
0x73, 0x74, 0x64, 0x61, 0x74, 0x61, 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_pkg_gateway_testdata_test_proto_rawDescOnce sync.Once
|
||||
file_pkg_gateway_testdata_test_proto_rawDescData = file_pkg_gateway_testdata_test_proto_rawDesc
|
||||
)
|
||||
|
||||
func file_pkg_gateway_testdata_test_proto_rawDescGZIP() []byte {
|
||||
file_pkg_gateway_testdata_test_proto_rawDescOnce.Do(func() {
|
||||
file_pkg_gateway_testdata_test_proto_rawDescData = protoimpl.X.CompressGZIP(file_pkg_gateway_testdata_test_proto_rawDescData)
|
||||
})
|
||||
return file_pkg_gateway_testdata_test_proto_rawDescData
|
||||
}
|
||||
|
||||
var file_pkg_gateway_testdata_test_proto_msgTypes = make([]protoimpl.MessageInfo, 6)
|
||||
var file_pkg_gateway_testdata_test_proto_goTypes = []interface{}{
|
||||
(*TestYAML)(nil), // 0: testdata.TestYAML
|
||||
(*TestMetadata)(nil), // 1: testdata.TestMetadata
|
||||
(*TestObjectSpec)(nil), // 2: testdata.TestObjectSpec
|
||||
(*TestObjectStatus)(nil), // 3: testdata.TestObjectStatus
|
||||
(*TestObject)(nil), // 4: testdata.TestObject
|
||||
nil, // 5: testdata.TestYAML.LabelsEntry
|
||||
(*timestamppb.Timestamp)(nil), // 6: google.protobuf.Timestamp
|
||||
}
|
||||
var file_pkg_gateway_testdata_test_proto_depIdxs = []int32{
|
||||
6, // 0: testdata.TestYAML.time:type_name -> google.protobuf.Timestamp
|
||||
5, // 1: testdata.TestYAML.labels:type_name -> testdata.TestYAML.LabelsEntry
|
||||
1, // 2: testdata.TestObject.metadata:type_name -> testdata.TestMetadata
|
||||
2, // 3: testdata.TestObject.spec:type_name -> testdata.TestObjectSpec
|
||||
3, // 4: testdata.TestObject.status:type_name -> testdata.TestObjectStatus
|
||||
4, // 5: testdata.Test.Get:input_type -> testdata.TestObject
|
||||
4, // 6: testdata.Test.Get:output_type -> testdata.TestObject
|
||||
6, // [6:7] is the sub-list for method output_type
|
||||
5, // [5:6] 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_pkg_gateway_testdata_test_proto_init() }
|
||||
func file_pkg_gateway_testdata_test_proto_init() {
|
||||
if File_pkg_gateway_testdata_test_proto != nil {
|
||||
return
|
||||
}
|
||||
if !protoimpl.UnsafeEnabled {
|
||||
file_pkg_gateway_testdata_test_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*TestYAML); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_pkg_gateway_testdata_test_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*TestMetadata); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_pkg_gateway_testdata_test_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*TestObjectSpec); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_pkg_gateway_testdata_test_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*TestObjectStatus); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_pkg_gateway_testdata_test_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*TestObject); 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_pkg_gateway_testdata_test_proto_rawDesc,
|
||||
NumEnums: 0,
|
||||
NumMessages: 6,
|
||||
NumExtensions: 0,
|
||||
NumServices: 1,
|
||||
},
|
||||
GoTypes: file_pkg_gateway_testdata_test_proto_goTypes,
|
||||
DependencyIndexes: file_pkg_gateway_testdata_test_proto_depIdxs,
|
||||
MessageInfos: file_pkg_gateway_testdata_test_proto_msgTypes,
|
||||
}.Build()
|
||||
File_pkg_gateway_testdata_test_proto = out.File
|
||||
file_pkg_gateway_testdata_test_proto_rawDesc = nil
|
||||
file_pkg_gateway_testdata_test_proto_goTypes = nil
|
||||
file_pkg_gateway_testdata_test_proto_depIdxs = nil
|
||||
}
|
||||
223
components/common/pkg/gateway/testdata/test.pb.gw.go
vendored
Normal file
223
components/common/pkg/gateway/testdata/test.pb.gw.go
vendored
Normal file
@@ -0,0 +1,223 @@
|
||||
// Code generated by protoc-gen-grpc-gateway. DO NOT EDIT.
|
||||
// source: pkg/gateway/testdata/test.proto
|
||||
|
||||
/*
|
||||
Package testdata is a reverse proxy.
|
||||
|
||||
It translates gRPC into RESTful JSON APIs.
|
||||
*/
|
||||
package testdata
|
||||
|
||||
import (
|
||||
"context"
|
||||
"io"
|
||||
"net/http"
|
||||
|
||||
"github.com/grpc-ecosystem/grpc-gateway/v2/runtime"
|
||||
"github.com/grpc-ecosystem/grpc-gateway/v2/utilities"
|
||||
"google.golang.org/grpc"
|
||||
"google.golang.org/grpc/codes"
|
||||
"google.golang.org/grpc/grpclog"
|
||||
"google.golang.org/grpc/metadata"
|
||||
"google.golang.org/grpc/status"
|
||||
"google.golang.org/protobuf/proto"
|
||||
)
|
||||
|
||||
// Suppress "imported and not used" errors
|
||||
var _ codes.Code
|
||||
var _ io.Reader
|
||||
var _ status.Status
|
||||
var _ = runtime.String
|
||||
var _ = utilities.NewDoubleArray
|
||||
var _ = metadata.Join
|
||||
|
||||
var (
|
||||
filter_Test_Get_0 = &utilities.DoubleArray{Encoding: map[string]int{"metadata": 0, "name": 1}, Base: []int{1, 3, 1, 0, 3, 0}, Check: []int{0, 1, 2, 3, 2, 5}}
|
||||
)
|
||||
|
||||
func request_Test_Get_0(ctx context.Context, marshaler runtime.Marshaler, client TestClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
|
||||
var protoReq TestObject
|
||||
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)
|
||||
}
|
||||
|
||||
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_Test_Get_0); err != nil {
|
||||
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
|
||||
}
|
||||
|
||||
msg, err := client.Get(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
|
||||
return msg, metadata, err
|
||||
|
||||
}
|
||||
|
||||
func local_request_Test_Get_0(ctx context.Context, marshaler runtime.Marshaler, server TestServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
|
||||
var protoReq TestObject
|
||||
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)
|
||||
}
|
||||
|
||||
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_Test_Get_0); err != nil {
|
||||
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
|
||||
}
|
||||
|
||||
msg, err := server.Get(ctx, &protoReq)
|
||||
return msg, metadata, err
|
||||
|
||||
}
|
||||
|
||||
// RegisterTestHandlerServer registers the http handlers for service Test to "mux".
|
||||
// UnaryRPC :call TestServer 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 RegisterTestHandlerFromEndpoint instead.
|
||||
func RegisterTestHandlerServer(ctx context.Context, mux *runtime.ServeMux, server TestServer) error {
|
||||
|
||||
mux.Handle("GET", pattern_Test_Get_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, "/testdata.Test/Get", runtime.WithHTTPPathPattern("/v3/test/{metadata.name}/test/{metadata.name}"))
|
||||
if err != nil {
|
||||
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||
return
|
||||
}
|
||||
resp, md, err := local_request_Test_Get_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_Test_Get_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
|
||||
|
||||
})
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
// RegisterTestHandlerFromEndpoint is same as RegisterTestHandler but
|
||||
// automatically dials to "endpoint" and closes the connection when "ctx" gets done.
|
||||
func RegisterTestHandlerFromEndpoint(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 RegisterTestHandler(ctx, mux, conn)
|
||||
}
|
||||
|
||||
// RegisterTestHandler registers the http handlers for service Test to "mux".
|
||||
// The handlers forward requests to the grpc endpoint over "conn".
|
||||
func RegisterTestHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error {
|
||||
return RegisterTestHandlerClient(ctx, mux, NewTestClient(conn))
|
||||
}
|
||||
|
||||
// RegisterTestHandlerClient registers the http handlers for service Test
|
||||
// to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "TestClient".
|
||||
// Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "TestClient"
|
||||
// doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in
|
||||
// "TestClient" to call the correct interceptors.
|
||||
func RegisterTestHandlerClient(ctx context.Context, mux *runtime.ServeMux, client TestClient) error {
|
||||
|
||||
mux.Handle("GET", pattern_Test_Get_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, "/testdata.Test/Get", runtime.WithHTTPPathPattern("/v3/test/{metadata.name}/test/{metadata.name}"))
|
||||
if err != nil {
|
||||
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||
return
|
||||
}
|
||||
resp, md, err := request_Test_Get_0(rctx, inboundMarshaler, client, req, pathParams)
|
||||
ctx = runtime.NewServerMetadataContext(ctx, md)
|
||||
if err != nil {
|
||||
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||
return
|
||||
}
|
||||
|
||||
forward_Test_Get_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
|
||||
|
||||
})
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
var (
|
||||
pattern_Test_Get_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 1, 5, 2, 2, 1, 1, 0, 4, 1, 5, 2}, []string{"v3", "test", "metadata.name"}, ""))
|
||||
)
|
||||
|
||||
var (
|
||||
forward_Test_Get_0 = runtime.ForwardResponseMessage
|
||||
)
|
||||
58
components/common/pkg/gateway/testdata/test.proto
vendored
Normal file
58
components/common/pkg/gateway/testdata/test.proto
vendored
Normal file
@@ -0,0 +1,58 @@
|
||||
syntax = "proto3";
|
||||
|
||||
package testdata;
|
||||
|
||||
import "google/api/annotations.proto";
|
||||
import "gogoproto/gogo.proto";
|
||||
import "protoc-gen-openapiv2/options/annotations.proto";
|
||||
import "google/protobuf/timestamp.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;
|
||||
|
||||
message TestYAML {
|
||||
string name = 1;
|
||||
google.protobuf.Timestamp time = 2 [
|
||||
(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
|
||||
read_only : true
|
||||
},
|
||||
(gogoproto.stdtime) = true
|
||||
];
|
||||
map<string, string> labels = 3;
|
||||
}
|
||||
|
||||
message TestMetadata {
|
||||
string name = 1;
|
||||
}
|
||||
|
||||
message TestObjectSpec {}
|
||||
|
||||
message TestObjectStatus {}
|
||||
|
||||
message TestObject {
|
||||
TestMetadata metadata = 1 [
|
||||
(gogoproto.embed) = true,
|
||||
(gogoproto.nullable) = false,
|
||||
(gogoproto.jsontag) = ",inline"
|
||||
];
|
||||
TestObjectSpec spec = 2
|
||||
[ (gogoproto.nullable) = false, (gogoproto.embed) = true ];
|
||||
TestObjectStatus status = 3
|
||||
[ (gogoproto.nullable) = false, (gogoproto.embed) = true ];
|
||||
}
|
||||
|
||||
service Test {
|
||||
rpc Get(TestObject) returns (TestObject) {
|
||||
option (google.api.http) = {
|
||||
get : "/v3/test/{metadata.name}/test/{metadata.name}"
|
||||
};
|
||||
}
|
||||
}
|
||||
103
components/common/pkg/gateway/testdata/test_grpc.pb.go
vendored
Normal file
103
components/common/pkg/gateway/testdata/test_grpc.pb.go
vendored
Normal file
@@ -0,0 +1,103 @@
|
||||
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
|
||||
// versions:
|
||||
// - protoc-gen-go-grpc v1.2.0
|
||||
// - protoc (unknown)
|
||||
// source: pkg/gateway/testdata/test.proto
|
||||
|
||||
package testdata
|
||||
|
||||
import (
|
||||
context "context"
|
||||
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
|
||||
|
||||
// TestClient is the client API for Test 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 TestClient interface {
|
||||
Get(ctx context.Context, in *TestObject, opts ...grpc.CallOption) (*TestObject, error)
|
||||
}
|
||||
|
||||
type testClient struct {
|
||||
cc grpc.ClientConnInterface
|
||||
}
|
||||
|
||||
func NewTestClient(cc grpc.ClientConnInterface) TestClient {
|
||||
return &testClient{cc}
|
||||
}
|
||||
|
||||
func (c *testClient) Get(ctx context.Context, in *TestObject, opts ...grpc.CallOption) (*TestObject, error) {
|
||||
out := new(TestObject)
|
||||
err := c.cc.Invoke(ctx, "/testdata.Test/Get", in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
// TestServer is the server API for Test service.
|
||||
// All implementations should embed UnimplementedTestServer
|
||||
// for forward compatibility
|
||||
type TestServer interface {
|
||||
Get(context.Context, *TestObject) (*TestObject, error)
|
||||
}
|
||||
|
||||
// UnimplementedTestServer should be embedded to have forward compatible implementations.
|
||||
type UnimplementedTestServer struct {
|
||||
}
|
||||
|
||||
func (UnimplementedTestServer) Get(context.Context, *TestObject) (*TestObject, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method Get not implemented")
|
||||
}
|
||||
|
||||
// UnsafeTestServer may be embedded to opt out of forward compatibility for this service.
|
||||
// Use of this interface is not recommended, as added methods to TestServer will
|
||||
// result in compilation errors.
|
||||
type UnsafeTestServer interface {
|
||||
mustEmbedUnimplementedTestServer()
|
||||
}
|
||||
|
||||
func RegisterTestServer(s grpc.ServiceRegistrar, srv TestServer) {
|
||||
s.RegisterService(&Test_ServiceDesc, srv)
|
||||
}
|
||||
|
||||
func _Test_Get_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(TestObject)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(TestServer).Get(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: "/testdata.Test/Get",
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(TestServer).Get(ctx, req.(*TestObject))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
// Test_ServiceDesc is the grpc.ServiceDesc for Test service.
|
||||
// It's only intended for direct use with grpc.RegisterService,
|
||||
// and not to be introspected or modified (even as a copy)
|
||||
var Test_ServiceDesc = grpc.ServiceDesc{
|
||||
ServiceName: "testdata.Test",
|
||||
HandlerType: (*TestServer)(nil),
|
||||
Methods: []grpc.MethodDesc{
|
||||
{
|
||||
MethodName: "Get",
|
||||
Handler: _Test_Get_Handler,
|
||||
},
|
||||
},
|
||||
Streams: []grpc.StreamDesc{},
|
||||
Metadata: "pkg/gateway/testdata/test.proto",
|
||||
}
|
||||
78
components/common/pkg/gateway/yaml.go
Normal file
78
components/common/pkg/gateway/yaml.go
Normal file
@@ -0,0 +1,78 @@
|
||||
package gateway
|
||||
|
||||
import (
|
||||
"io"
|
||||
"io/ioutil"
|
||||
|
||||
"github.com/grpc-ecosystem/grpc-gateway/v2/runtime"
|
||||
"github.com/segmentio/encoding/json"
|
||||
"sigs.k8s.io/yaml"
|
||||
)
|
||||
|
||||
const (
|
||||
yamlContentType string = "application/yaml"
|
||||
)
|
||||
|
||||
// rafayJSON is the rafay object to YAML marshaller
|
||||
type rafayYAML struct {
|
||||
}
|
||||
|
||||
// NewRafayYAML returns new grpc gateway yaml marshaller
|
||||
func NewRafayYAML() runtime.Marshaler {
|
||||
return &rafayYAML{}
|
||||
}
|
||||
|
||||
// Marshal marshals "v" into byte sequence.
|
||||
func (m *rafayYAML) Marshal(v interface{}) ([]byte, error) {
|
||||
b, err := json.Marshal(v)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
yb, err := yaml.JSONToYAML(b)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
return yb, nil
|
||||
}
|
||||
|
||||
// Unmarshal unmarshals "data" into "v".
|
||||
// "v" must be a pointer value.
|
||||
func (m *rafayYAML) Unmarshal(yb []byte, v interface{}) error {
|
||||
jb, err := yaml.YAMLToJSON(yb)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
err = json.Unmarshal(jb, v)
|
||||
return err
|
||||
}
|
||||
|
||||
// NewDecoder returns a Decoder which reads byte sequence from "r".
|
||||
func (m *rafayYAML) NewDecoder(r io.Reader) runtime.Decoder {
|
||||
return runtime.DecoderFunc(func(v interface{}) error {
|
||||
yb, err := ioutil.ReadAll(r)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
return m.Unmarshal(yb, v)
|
||||
})
|
||||
}
|
||||
|
||||
// NewEncoder returns an Encoder which writes bytes sequence into "w".
|
||||
func (m *rafayYAML) NewEncoder(w io.Writer) runtime.Encoder {
|
||||
return runtime.EncoderFunc(func(v interface{}) error {
|
||||
yb, err := m.Marshal(v)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
_, err = w.Write(yb)
|
||||
|
||||
return err
|
||||
})
|
||||
}
|
||||
|
||||
// ContentType returns the Content-Type which this marshaler is responsible for.
|
||||
func (m *rafayYAML) ContentType(v interface{}) string {
|
||||
return yamlContentType
|
||||
}
|
||||
64
components/common/pkg/gateway/yaml_test.go
Normal file
64
components/common/pkg/gateway/yaml_test.go
Normal file
@@ -0,0 +1,64 @@
|
||||
package gateway_test
|
||||
|
||||
import (
|
||||
"bytes"
|
||||
"testing"
|
||||
"time"
|
||||
|
||||
"github.com/RafaySystems/rcloud-base/components/common/pkg/gateway"
|
||||
"github.com/RafaySystems/rcloud-base/components/common/pkg/gateway/testdata"
|
||||
)
|
||||
|
||||
func TestYamlMarshaller(t *testing.T) {
|
||||
m := gateway.NewRafayYAML()
|
||||
|
||||
now := time.Now()
|
||||
|
||||
t1 := testdata.TestYAML{
|
||||
Name: "test",
|
||||
Time: &now,
|
||||
Labels: map[string]string{"l1": "l2"},
|
||||
}
|
||||
|
||||
yb, err := m.Marshal(&t1)
|
||||
if err != nil {
|
||||
t.Error(err)
|
||||
return
|
||||
}
|
||||
|
||||
t.Log(string(yb))
|
||||
|
||||
var t2 testdata.TestYAML
|
||||
|
||||
err = m.Unmarshal(yb, &t2)
|
||||
if err != nil {
|
||||
t.Error(err)
|
||||
}
|
||||
|
||||
t.Log(t2)
|
||||
|
||||
bb1 := new(bytes.Buffer)
|
||||
|
||||
bb1.Write(yb)
|
||||
|
||||
dec := m.NewDecoder(bb1)
|
||||
var t3 testdata.TestYAML
|
||||
err = dec.Decode(&t3)
|
||||
if err != nil {
|
||||
t.Error(err)
|
||||
return
|
||||
}
|
||||
t.Log(t2)
|
||||
|
||||
bb2 := new(bytes.Buffer)
|
||||
|
||||
enc := m.NewEncoder(bb2)
|
||||
err = enc.Encode(&t1)
|
||||
if err != nil {
|
||||
t.Error(err)
|
||||
return
|
||||
}
|
||||
|
||||
t.Log(bb2.String())
|
||||
|
||||
}
|
||||
89
components/common/pkg/grpc/client.go
Normal file
89
components/common/pkg/grpc/client.go
Normal file
@@ -0,0 +1,89 @@
|
||||
package grpc
|
||||
|
||||
import (
|
||||
"context"
|
||||
"crypto/tls"
|
||||
"crypto/x509"
|
||||
"net"
|
||||
"time"
|
||||
|
||||
"google.golang.org/grpc"
|
||||
"google.golang.org/grpc/credentials"
|
||||
"google.golang.org/grpc/keepalive"
|
||||
)
|
||||
|
||||
var (
|
||||
clientDefaultOpts = []grpc.DialOption{
|
||||
grpc.WithBlock(),
|
||||
grpc.WithKeepaliveParams(keepalive.ClientParameters{
|
||||
Time: time.Second * 30,
|
||||
Timeout: time.Second * 30,
|
||||
PermitWithoutStream: true,
|
||||
}),
|
||||
}
|
||||
)
|
||||
|
||||
// NewSecureClientConn returns new grpc client connection given server host, server port and transport credentials
|
||||
func NewSecureClientConn(ctx context.Context, addr string, creds credentials.TransportCredentials, opts ...grpc.DialOption) (*grpc.ClientConn, error) {
|
||||
nctx, cancel := context.WithTimeout(ctx, time.Second*30)
|
||||
defer cancel()
|
||||
|
||||
opts = append(opts, clientDefaultOpts...)
|
||||
opts = append([]grpc.DialOption{grpc.WithTransportCredentials(creds)}, opts...)
|
||||
|
||||
return grpc.DialContext(nctx, addr, opts...)
|
||||
}
|
||||
|
||||
// NewClientConn returns new grpc client connection given server host and server port
|
||||
func NewClientConn(ctx context.Context, addr string, opts ...grpc.DialOption) (*grpc.ClientConn, error) {
|
||||
nctx, cancel := context.WithTimeout(ctx, time.Second*30)
|
||||
defer cancel()
|
||||
|
||||
opts = append(opts, clientDefaultOpts...)
|
||||
opts = append([]grpc.DialOption{grpc.WithInsecure()}, opts...)
|
||||
|
||||
return grpc.DialContext(nctx, addr, opts...)
|
||||
}
|
||||
|
||||
func newClientTLSConfig(certPEM []byte, keyPEM []byte, caCertPEM []byte, addr string) (*tls.Config, error) {
|
||||
cert, err := tls.X509KeyPair(certPEM, keyPEM)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
var roots *x509.CertPool
|
||||
if len(caCertPEM) > 0 {
|
||||
roots = x509.NewCertPool()
|
||||
if ok := roots.AppendCertsFromPEM(caCertPEM); !ok {
|
||||
return nil, err
|
||||
}
|
||||
}
|
||||
|
||||
host, _, err := net.SplitHostPort(addr)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
return &tls.Config{
|
||||
ServerName: host,
|
||||
Certificates: []tls.Certificate{cert},
|
||||
InsecureSkipVerify: roots == nil,
|
||||
RootCAs: roots,
|
||||
SessionTicketsDisabled: true,
|
||||
MinVersion: tls.VersionTLS12,
|
||||
CipherSuites: []uint16{
|
||||
tls.TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256,
|
||||
tls.TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256},
|
||||
PreferServerCipherSuites: true,
|
||||
}, nil
|
||||
}
|
||||
|
||||
// NewClientTransportCredentials returns grpc client transport credentials
|
||||
func NewClientTransportCredentials(cert, key, caCert []byte, addr string) (credentials.TransportCredentials, error) {
|
||||
tlsConfig, err := newClientTLSConfig(cert, key, caCert, addr)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
return credentials.NewTLS(tlsConfig), nil
|
||||
}
|
||||
113
components/common/pkg/grpc/server.go
Normal file
113
components/common/pkg/grpc/server.go
Normal file
@@ -0,0 +1,113 @@
|
||||
package grpc
|
||||
|
||||
import (
|
||||
"context"
|
||||
"crypto/tls"
|
||||
"crypto/x509"
|
||||
"errors"
|
||||
"fmt"
|
||||
"io/ioutil"
|
||||
"strings"
|
||||
"time"
|
||||
|
||||
"google.golang.org/grpc/peer"
|
||||
|
||||
"google.golang.org/grpc"
|
||||
"google.golang.org/grpc/credentials"
|
||||
"google.golang.org/grpc/keepalive"
|
||||
)
|
||||
|
||||
var (
|
||||
serverDefaultOpts = []grpc.ServerOption{
|
||||
grpc.KeepaliveParams(keepalive.ServerParameters{
|
||||
Time: time.Second * 30, // server initiated keep alive interval
|
||||
Timeout: time.Second * 30, // server initiated keep alive timeout
|
||||
}),
|
||||
grpc.KeepaliveEnforcementPolicy(keepalive.EnforcementPolicy{
|
||||
MinTime: time.Minute, // server enforcement for client keep alive
|
||||
PermitWithoutStream: true, // allow connection without any active ongoing streams
|
||||
}),
|
||||
}
|
||||
|
||||
// ErrInvalidClient is returned when client cert is not present in peer context
|
||||
ErrInvalidClient = errors.New("client has not presented certificate")
|
||||
)
|
||||
|
||||
// NewSecureServerWithPEM creates a secure gRPC service with give PEM encoded cert, key and ca
|
||||
func NewSecureServerWithPEM(cert, key, ca []byte, opts ...grpc.ServerOption) (*grpc.Server, error) {
|
||||
certificate, err := tls.X509KeyPair(cert, key)
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("invalid cert/key pair: %s", err)
|
||||
}
|
||||
certPool := x509.NewCertPool()
|
||||
if ok := certPool.AppendCertsFromPEM(ca); !ok {
|
||||
return nil, fmt.Errorf("failed to append ca cert")
|
||||
}
|
||||
creds := credentials.NewTLS(&tls.Config{
|
||||
ClientAuth: tls.RequireAndVerifyClientCert,
|
||||
Certificates: []tls.Certificate{certificate},
|
||||
ClientCAs: certPool,
|
||||
})
|
||||
opts = append(opts, serverDefaultOpts...)
|
||||
opts = append([]grpc.ServerOption{grpc.Creds(creds)}, opts...)
|
||||
|
||||
return grpc.NewServer(opts...), nil
|
||||
}
|
||||
|
||||
// NewSecureServer returns new grpc server given cert path, key path and ca path
|
||||
func NewSecureServer(certPath, keyPath, caPath string, opts ...grpc.ServerOption) (*grpc.Server, error) {
|
||||
certificate, err := tls.LoadX509KeyPair(certPath, keyPath)
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("unable to load cert/key : %s", err)
|
||||
}
|
||||
certPool := x509.NewCertPool()
|
||||
ca, err := ioutil.ReadFile(caPath)
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("unable to read ca cert: %s", err)
|
||||
}
|
||||
if ok := certPool.AppendCertsFromPEM(ca); !ok {
|
||||
return nil, fmt.Errorf("failed to append ca cert %s", "")
|
||||
}
|
||||
|
||||
creds := credentials.NewTLS(&tls.Config{
|
||||
ClientAuth: tls.RequireAndVerifyClientCert,
|
||||
Certificates: []tls.Certificate{certificate},
|
||||
ClientCAs: certPool,
|
||||
})
|
||||
|
||||
opts = append(opts, serverDefaultOpts...)
|
||||
opts = append([]grpc.ServerOption{grpc.Creds(creds)}, opts...)
|
||||
|
||||
return grpc.NewServer(opts...), nil
|
||||
}
|
||||
|
||||
// NewServer returns new unsecured grpc server
|
||||
func NewServer(opts ...grpc.ServerOption) (*grpc.Server, error) {
|
||||
opts = append(opts, serverDefaultOpts...)
|
||||
return grpc.NewServer(opts...), nil
|
||||
}
|
||||
|
||||
// GetClientName returns client CommonName from client cert
|
||||
func GetClientName(ctx context.Context) (string, error) {
|
||||
if p, ok := peer.FromContext(ctx); ok {
|
||||
tlsInfo := p.AuthInfo.(credentials.TLSInfo)
|
||||
for _, c := range tlsInfo.State.PeerCertificates {
|
||||
return c.Subject.CommonName, nil
|
||||
}
|
||||
}
|
||||
return "", ErrInvalidClient
|
||||
|
||||
}
|
||||
|
||||
// GetClientOU returns client Organization Unit from client cert
|
||||
func GetClientOU(ctx context.Context) (string, error) {
|
||||
if p, ok := peer.FromContext(ctx); ok {
|
||||
tlsInfo := p.AuthInfo.(credentials.TLSInfo)
|
||||
for _, c := range tlsInfo.State.PeerCertificates {
|
||||
if len(c.Subject.OrganizationalUnit) > 0 {
|
||||
return strings.Join(c.Subject.OrganizationalUnit, "-"), nil
|
||||
}
|
||||
}
|
||||
}
|
||||
return "", ErrInvalidClient
|
||||
}
|
||||
39
components/common/pkg/hashid/hashid.go
Normal file
39
components/common/pkg/hashid/hashid.go
Normal file
@@ -0,0 +1,39 @@
|
||||
package hashid
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
|
||||
"github.com/speps/go-hashids"
|
||||
)
|
||||
|
||||
var hd *hashids.HashID
|
||||
|
||||
func init() {
|
||||
hd, _ = hashids.NewWithData(&hashids.HashIDData{
|
||||
Alphabet: "abcdefghijklmnopqrstuvwxyz1234567890",
|
||||
Salt: "***REMOVED***",
|
||||
MinLength: 7,
|
||||
})
|
||||
}
|
||||
|
||||
// IDFromString returns new RafayID for hash id string
|
||||
func IDFromString(hashID string) (int64, error) {
|
||||
ids, err := hd.DecodeInt64WithError(hashID)
|
||||
if err != nil {
|
||||
return -1, err
|
||||
}
|
||||
|
||||
if len(ids) < 1 {
|
||||
return -1, fmt.Errorf("No IDs could be constructed from string %s", hashID)
|
||||
}
|
||||
return ids[0], nil
|
||||
}
|
||||
|
||||
// HashFromInt64 returns new RafayID for hash id string
|
||||
func HashFromInt64(id int64) (string, error) {
|
||||
stringHash, err := hd.EncodeInt64([]int64{id})
|
||||
if err != nil {
|
||||
return "", err
|
||||
}
|
||||
return stringHash, nil
|
||||
}
|
||||
21
components/common/pkg/hashid/test/hashid_test.go
Normal file
21
components/common/pkg/hashid/test/hashid_test.go
Normal file
@@ -0,0 +1,21 @@
|
||||
package hashid_test
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"testing"
|
||||
|
||||
"github.com/RafaySystems/rcloud-base/components/common/pkg/hashid"
|
||||
)
|
||||
|
||||
func TestGetRSID(t *testing.T) {
|
||||
s, e := hashid.HashFromInt64(1)
|
||||
if e != nil || s != "rx28oml" {
|
||||
t.Fatalf("failure")
|
||||
}
|
||||
s, e = hashid.HashFromInt64(140)
|
||||
if e != nil || s != "pkvwv2n" {
|
||||
t.Fatalf("failure")
|
||||
}
|
||||
i, _ := hashid.IDFromString("kgxw87m")
|
||||
fmt.Printf("%d\n", i)
|
||||
}
|
||||
98
components/common/pkg/log/v2/log.go
Normal file
98
components/common/pkg/log/v2/log.go
Normal file
@@ -0,0 +1,98 @@
|
||||
package log
|
||||
|
||||
import (
|
||||
"sync"
|
||||
|
||||
"go.uber.org/zap"
|
||||
"go.uber.org/zap/zapcore"
|
||||
)
|
||||
|
||||
// Level is the level of logging for logger
|
||||
type level string
|
||||
|
||||
// LogLevel constants
|
||||
const (
|
||||
Debug level = "debug"
|
||||
Info level = "info"
|
||||
Warn level = "warn"
|
||||
Error level = "error"
|
||||
)
|
||||
|
||||
func newConfig(l level) zap.Config {
|
||||
var zl zapcore.Level
|
||||
switch l {
|
||||
case Debug:
|
||||
zl = zap.DebugLevel
|
||||
case Warn:
|
||||
zl = zap.WarnLevel
|
||||
case Info:
|
||||
zl = zap.InfoLevel
|
||||
case Error:
|
||||
zl = zap.ErrorLevel
|
||||
default:
|
||||
zl = zap.InfoLevel
|
||||
}
|
||||
|
||||
return zap.Config{
|
||||
Level: zap.NewAtomicLevelAt(zl),
|
||||
Encoding: "json",
|
||||
EncoderConfig: zapcore.EncoderConfig{
|
||||
TimeKey: "ts",
|
||||
LevelKey: "level",
|
||||
NameKey: "logger",
|
||||
MessageKey: "msg",
|
||||
StacktraceKey: "stacktrace",
|
||||
CallerKey: "caller",
|
||||
LineEnding: zapcore.DefaultLineEnding,
|
||||
EncodeLevel: zapcore.LowercaseLevelEncoder,
|
||||
EncodeTime: zapcore.ISO8601TimeEncoder,
|
||||
EncodeDuration: zapcore.SecondsDurationEncoder,
|
||||
EncodeCaller: zapcore.ShortCallerEncoder,
|
||||
},
|
||||
OutputPaths: []string{"stdout"},
|
||||
ErrorOutputPaths: []string{"stdout"},
|
||||
}
|
||||
}
|
||||
|
||||
// Logger is a wrapper around zap sugared logger
|
||||
type Logger struct {
|
||||
*zap.SugaredLogger
|
||||
}
|
||||
|
||||
// ChangeLevel changes the log level of logger
|
||||
func (lg *Logger) ChangeLevel(lc <-chan string) {
|
||||
for {
|
||||
select {
|
||||
case lvl := <-lc:
|
||||
l := level(lvl)
|
||||
cfg := newConfig(l)
|
||||
zl, err := cfg.Build()
|
||||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
|
||||
lg.SugaredLogger = zl.Sugar()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
var zl *Logger
|
||||
var lo sync.Once
|
||||
|
||||
// GetLogger return instance of logger
|
||||
func GetLogger() *Logger {
|
||||
if zl == nil {
|
||||
lo.Do(func() {
|
||||
cfg := newConfig(Info)
|
||||
z, err := cfg.Build()
|
||||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
zl = &Logger{
|
||||
SugaredLogger: z.Sugar(),
|
||||
}
|
||||
|
||||
})
|
||||
}
|
||||
return zl
|
||||
}
|
||||
23
components/common/pkg/log/v2/log_test.go
Normal file
23
components/common/pkg/log/v2/log_test.go
Normal file
@@ -0,0 +1,23 @@
|
||||
package log
|
||||
|
||||
import (
|
||||
"testing"
|
||||
"time"
|
||||
)
|
||||
|
||||
func TestLogger(t *testing.T) {
|
||||
log := GetLogger()
|
||||
|
||||
lc := make(chan string)
|
||||
|
||||
go log.ChangeLevel(lc)
|
||||
|
||||
log.Infow("test ingo", "key", "value")
|
||||
log.Debugw("test debug", "key", "value")
|
||||
log.Warn("changing to debug")
|
||||
lc <- "debug"
|
||||
time.Sleep(time.Second)
|
||||
log.Infow("test ingo", "key", "value")
|
||||
log.Debugw("test debug", "key", "value")
|
||||
|
||||
}
|
||||
109
components/common/pkg/pool/pool.go
Normal file
109
components/common/pkg/pool/pool.go
Normal file
@@ -0,0 +1,109 @@
|
||||
package pool
|
||||
|
||||
import (
|
||||
"context"
|
||||
"sync"
|
||||
"time"
|
||||
|
||||
grpcpool "github.com/processout/grpc-go-pool"
|
||||
"google.golang.org/grpc"
|
||||
"google.golang.org/grpc/credentials"
|
||||
"google.golang.org/grpc/keepalive"
|
||||
)
|
||||
|
||||
// grpc pool constants
|
||||
const (
|
||||
DefaultMaxPoolConn = 20
|
||||
)
|
||||
|
||||
// GRPCPool holds all the shared state for GRPC pool
|
||||
type GRPCPool struct {
|
||||
capacity int
|
||||
creds credentials.TransportCredentials
|
||||
addr string
|
||||
*grpcpool.Pool
|
||||
m sync.Mutex
|
||||
}
|
||||
|
||||
// NewGRPCPool returns new auth pool
|
||||
func NewGRPCPool(addr string, maxConnections int, creds credentials.TransportCredentials) *GRPCPool {
|
||||
// as per https://rafaysystems.atlassian.net/browse/RC-9291 min number of connections for grpc
|
||||
// across all services is set to 20; any service creating a connection pool size < 20 is now defaulted to 20
|
||||
if maxConnections < DefaultMaxPoolConn {
|
||||
maxConnections = DefaultMaxPoolConn
|
||||
}
|
||||
return &GRPCPool{addr: addr, capacity: maxConnections, creds: creds}
|
||||
}
|
||||
|
||||
// GetConnection returns new connection from grpc pool
|
||||
func (gp *GRPCPool) GetConnection(ctx context.Context) (*grpcpool.ClientConn, error) {
|
||||
nCtx, cancel := context.WithTimeout(ctx, time.Second*10)
|
||||
defer cancel()
|
||||
|
||||
if gp.Pool == nil {
|
||||
gp.m.Lock()
|
||||
defer gp.m.Unlock()
|
||||
|
||||
var pool *grpcpool.Pool
|
||||
var err error
|
||||
if gp.creds == nil {
|
||||
pool, err = newPool(gp.addr, gp.capacity)
|
||||
} else {
|
||||
pool, err = newSecurePool(gp.addr, gp.capacity, gp.creds)
|
||||
}
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
gp.Pool = pool
|
||||
}
|
||||
cc, err := gp.Pool.Get(nCtx)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return cc, nil
|
||||
}
|
||||
|
||||
// newPool returns new grpc connection pool for given host port and capacity
|
||||
func newPool(target string, capacity int) (*grpcpool.Pool, error) {
|
||||
pool, err := grpcpool.New(func() (*grpc.ClientConn, error) {
|
||||
ctx, cancel := context.WithTimeout(context.Background(), time.Second*30)
|
||||
defer cancel()
|
||||
cc, err := grpc.DialContext(
|
||||
ctx,
|
||||
target,
|
||||
grpc.WithInsecure(),
|
||||
grpc.WithBlock(),
|
||||
grpc.WithKeepaliveParams(keepalive.ClientParameters{
|
||||
Time: time.Second * 30,
|
||||
Timeout: time.Second * 30,
|
||||
PermitWithoutStream: true,
|
||||
}),
|
||||
)
|
||||
return cc, err
|
||||
}, 1, capacity, time.Second*60)
|
||||
return pool, err
|
||||
}
|
||||
|
||||
// newSecurePool returns new grpc connection pool for given host port and credentials
|
||||
func newSecurePool(target string, capacity int, creds credentials.TransportCredentials) (*grpcpool.Pool, error) {
|
||||
pool, err := grpcpool.New(func() (*grpc.ClientConn, error) {
|
||||
ctx, cancel := context.WithTimeout(context.Background(), time.Second*30)
|
||||
defer cancel()
|
||||
cc, err := grpc.DialContext(
|
||||
ctx,
|
||||
target,
|
||||
grpc.WithTransportCredentials(creds),
|
||||
grpc.WithBlock(),
|
||||
grpc.WithKeepaliveParams(keepalive.ClientParameters{
|
||||
Time: time.Second * 30,
|
||||
Timeout: time.Second * 30,
|
||||
PermitWithoutStream: true,
|
||||
}),
|
||||
)
|
||||
|
||||
return cc, err
|
||||
}, 1, capacity, time.Second*60)
|
||||
return pool, err
|
||||
|
||||
}
|
||||
54
components/common/proto/rpc/config/internal.go
Normal file
54
components/common/proto/rpc/config/internal.go
Normal file
@@ -0,0 +1,54 @@
|
||||
package config
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
"github.com/RafaySystems/rcloud-base/components/common/pkg/pool"
|
||||
grpcpool "github.com/processout/grpc-go-pool"
|
||||
)
|
||||
|
||||
// ConfigClient is the interface which exposes all the RPCs
|
||||
// to internal service
|
||||
type ConfigClient interface {
|
||||
Unhealthy()
|
||||
Close() error
|
||||
}
|
||||
|
||||
type configClient struct {
|
||||
*grpcpool.ClientConn
|
||||
}
|
||||
|
||||
var _ ConfigClient = (*configClient)(nil)
|
||||
|
||||
// ConfigPool maintains pool of grpc connections to config service
|
||||
type ConfigPool interface {
|
||||
Close()
|
||||
NewClient(ctx context.Context) (ConfigClient, error)
|
||||
}
|
||||
|
||||
// NewConfigPool new config pool
|
||||
func NewConfigPool(addr string, maxConn int) ConfigPool {
|
||||
return &configPool{
|
||||
GRPCPool: pool.NewGRPCPool(addr, maxConn, nil),
|
||||
}
|
||||
}
|
||||
|
||||
type configPool struct {
|
||||
*pool.GRPCPool
|
||||
}
|
||||
|
||||
func (p *configPool) Close() {
|
||||
if p.GRPCPool != nil {
|
||||
p.GRPCPool.Close()
|
||||
}
|
||||
}
|
||||
|
||||
func (p *configPool) NewClient(ctx context.Context) (ConfigClient, error) {
|
||||
cc, err := p.GetConnection(ctx)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return &configClient{
|
||||
cc,
|
||||
}, nil
|
||||
}
|
||||
1503
components/common/proto/types/commonpb/v3/artifacts.pb.go
Normal file
1503
components/common/proto/types/commonpb/v3/artifacts.pb.go
Normal file
File diff suppressed because it is too large
Load Diff
379
components/common/proto/types/commonpb/v3/artifacts.proto
Normal file
379
components/common/proto/types/commonpb/v3/artifacts.proto
Normal file
@@ -0,0 +1,379 @@
|
||||
syntax = "proto3";
|
||||
|
||||
package rafay.dev.types.common.v3;
|
||||
|
||||
import "protoc-gen-openapiv2/options/annotations.proto";
|
||||
import "google/api/field_behavior.proto";
|
||||
|
||||
message File {
|
||||
option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_schema) = {
|
||||
json_schema : {
|
||||
title : "File"
|
||||
description : "file represents an file (or a directory) on the File "
|
||||
"System by relative path"
|
||||
required : [ "name" ]
|
||||
}
|
||||
example : "{"
|
||||
"\"name\": \"some-name\","
|
||||
"\"project\": \"defaultproject\""
|
||||
"}"
|
||||
};
|
||||
string name = 1
|
||||
[ (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
|
||||
title : "Name",
|
||||
description : "relative path of a artifact"
|
||||
} ];
|
||||
bytes data = 2
|
||||
[ (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
|
||||
title : "Data",
|
||||
description : "data is the base64 encoded contents of the file"
|
||||
} ];
|
||||
}
|
||||
|
||||
message UploadedYAMLArtifact {
|
||||
option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_schema) = {
|
||||
json_schema : {
|
||||
title : "Uploaded YAML Artifact"
|
||||
description : "represents a list of YAML files"
|
||||
required : [ "paths" ]
|
||||
}
|
||||
example : "{"
|
||||
"\"paths\": [{"
|
||||
"\"name\": \"file://relative/path/to/some/file.yaml\""
|
||||
"}]"
|
||||
"}"
|
||||
};
|
||||
repeated File paths = 1
|
||||
[ (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
|
||||
title : "Paths",
|
||||
description : "list of YAML files represented by their relative path"
|
||||
} ];
|
||||
}
|
||||
|
||||
message UploadedHelmArtifact {
|
||||
option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_schema) = {
|
||||
json_schema : {
|
||||
title : "Uploaded Helm Artifact"
|
||||
description : "represents an Helm chart and zero or more values files"
|
||||
required : [ "chartPath" ]
|
||||
}
|
||||
example : "{"
|
||||
"\"chartPath\": [{"
|
||||
"\"name\": \"file://relative/path/to/some/chart.tgz\""
|
||||
"}]"
|
||||
"}"
|
||||
};
|
||||
File chartPath = 1
|
||||
[ (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
|
||||
title : "ChartPath",
|
||||
description : "represents a Helm Chart by its relative path"
|
||||
} ];
|
||||
repeated File valuesPaths = 2
|
||||
[ (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
|
||||
title : "ValuesPaths",
|
||||
description : "represents a Helm Values by their relative path"
|
||||
} ];
|
||||
}
|
||||
|
||||
message YAMLInGitRepo {
|
||||
option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_schema) = {
|
||||
json_schema : {
|
||||
title : "YAML In Git Repo Artifact"
|
||||
description : "represents YAML files in a Git repo"
|
||||
required : [ "repository", "revision", "paths" ]
|
||||
}
|
||||
example : "{"
|
||||
"\"repository\": \"some-repo\","
|
||||
"\"revision\": \"master\","
|
||||
"\"paths\": [{"
|
||||
"\"name\": \"relative/path/to/some/file.yaml\""
|
||||
"}]"
|
||||
"}"
|
||||
};
|
||||
string repository = 1
|
||||
[ (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
|
||||
title : "Repository",
|
||||
description : "name of the git repository"
|
||||
} ];
|
||||
string revision = 2
|
||||
[ (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
|
||||
title : "Revision",
|
||||
description : "branch or tag in the git repository"
|
||||
} ];
|
||||
repeated File paths = 3
|
||||
[ (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
|
||||
title : "Paths",
|
||||
description : "relative paths to file in the git repository"
|
||||
} ];
|
||||
}
|
||||
|
||||
message HelmInGitRepo {
|
||||
option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_schema) = {
|
||||
json_schema : {
|
||||
title : "Helm in Git Repo Artifact"
|
||||
description : "represents Helm files in a Git repo"
|
||||
required : [ "repository", "revision", "chartPath" ]
|
||||
}
|
||||
example : "{"
|
||||
"\"repository\": \"some-repo\","
|
||||
"\"revision\": \"master\","
|
||||
"\"chartPath\": {"
|
||||
"\"name\": \"relative/path/to/some/chart.tgz\""
|
||||
"}"
|
||||
"}"
|
||||
};
|
||||
string repository = 1
|
||||
[ (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
|
||||
title : "Repository",
|
||||
description : "name of the git repository"
|
||||
} ];
|
||||
string revision = 2
|
||||
[ (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
|
||||
title : "Revision",
|
||||
description : "branch or tag in the git repository"
|
||||
} ];
|
||||
File chartPath = 3
|
||||
[ (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
|
||||
title : "Chart Path",
|
||||
description : "relative path to chart file in the git repository"
|
||||
} ];
|
||||
repeated File valuesPaths = 4
|
||||
[ (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
|
||||
title : "Value Paths",
|
||||
description : "relative paths to value file in the git repository"
|
||||
} ];
|
||||
}
|
||||
|
||||
message HelmInHelmRepo {
|
||||
option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_schema) = {
|
||||
json_schema : {
|
||||
title : "Helm in Helm Repo"
|
||||
description : "represents Helm chart in a Helm repo"
|
||||
required : [ "repository", "chartName", "chartVersion" ]
|
||||
}
|
||||
example : "{"
|
||||
"\"repository\": \"some-repo\","
|
||||
"\"chartName\": \"some-chart\","
|
||||
"\"chartVersion\": \"1.2.3\""
|
||||
"}"
|
||||
};
|
||||
string repository = 1
|
||||
[ (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
|
||||
title : "Repository",
|
||||
description : "name of the helm repository"
|
||||
} ];
|
||||
string chartName = 2
|
||||
[ (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
|
||||
title : "Chart Name",
|
||||
description : "name of the chart"
|
||||
} ];
|
||||
string chartVersion = 3
|
||||
[ (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
|
||||
title : "Chart Version",
|
||||
description : "version of the chart"
|
||||
} ];
|
||||
repeated File valuesPaths = 4
|
||||
[ (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
|
||||
title : "Values Paths",
|
||||
description : "relative paths to values files"
|
||||
} ];
|
||||
}
|
||||
|
||||
message ManagedAlertManager {
|
||||
option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_schema) = {
|
||||
json_schema : {
|
||||
title : "Managed Alert Manager"
|
||||
description : "represents managed alert manager"
|
||||
required : [ "configmap", "secret", "configuration", "statefulset" ]
|
||||
}
|
||||
example : "{"
|
||||
"\"configmap\": {"
|
||||
"\"name\": \"file://path/to/some-configmap.yaml\""
|
||||
"},"
|
||||
"\"secret\": {"
|
||||
"\"name\": \"file://path/to/some-secret.yaml\""
|
||||
"},"
|
||||
"\"configuration\": {"
|
||||
"\"name\": \"file://path/to/some-configuration.yaml\""
|
||||
"},"
|
||||
"\"statefulset\": {"
|
||||
"\"name\": \"file://path/to/some-statefulset.yaml\""
|
||||
"}"
|
||||
"}"
|
||||
};
|
||||
File configmap = 1
|
||||
[ (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
|
||||
title : "Config Map",
|
||||
description : "relative paths to alert manager configmap file"
|
||||
} ];
|
||||
File secret = 2
|
||||
[ (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
|
||||
title : "Secret",
|
||||
description : "relative paths to alert manager secret file"
|
||||
} ];
|
||||
File configuration = 3
|
||||
[ (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
|
||||
title : "Secret",
|
||||
description : "relative paths to alert manager configuration file"
|
||||
} ];
|
||||
File statefulset = 4
|
||||
[ (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
|
||||
title : "Secret",
|
||||
description : "relative paths to alert manager statefulset file"
|
||||
} ];
|
||||
}
|
||||
|
||||
message ArtifactSpec {
|
||||
option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_schema) = {
|
||||
json_schema : {
|
||||
title : "ArtifactSpec"
|
||||
description : "ArtifactSpec"
|
||||
required : [ "type", "artifact" ]
|
||||
}
|
||||
example : "{"
|
||||
"\"type\": \"Helm\","
|
||||
"\"artifact\": {"
|
||||
"\"repository\": \"some-repo\","
|
||||
"\"revision\": \"master\","
|
||||
"\"chartPath\": {"
|
||||
"\"name\": \"relative/path/to/some/chart.tgz\""
|
||||
"}"
|
||||
"}"
|
||||
"}"
|
||||
};
|
||||
string type = 1
|
||||
[ (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
|
||||
title : "Artifact Type",
|
||||
description : "type of the artifact"
|
||||
enum : [ "Helm", "Yaml", "AlertManager" ]
|
||||
} ];
|
||||
|
||||
oneof artifact {
|
||||
UploadedYAMLArtifact uploadedYAML = 10;
|
||||
UploadedHelmArtifact uploadedHelm = 11;
|
||||
YAMLInGitRepo yamlInGitRepo = 12;
|
||||
HelmInGitRepo helmInGitRepo = 13;
|
||||
HelmInHelmRepo helmInHelmRepo = 14;
|
||||
ManagedAlertManager managedAlertManger = 15;
|
||||
}
|
||||
oneof options {
|
||||
HelmOptions helmOptions = 30;
|
||||
YAMLOptions yamlOptions = 31;
|
||||
}
|
||||
}
|
||||
|
||||
// $title: Helm Options
|
||||
// $description: options for deploying Helm artifacts
|
||||
message HelmOptions {
|
||||
option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_schema) = {
|
||||
json_schema : {
|
||||
title : "Helm Options"
|
||||
description : "options for deploying Helm artifacts"
|
||||
}
|
||||
example : "{"
|
||||
"\"atomic\": false,"
|
||||
"\"noHooks\": true,"
|
||||
"\"skipCRDs\": true,"
|
||||
"\"setString\": [\"key1=val1\", \"key2=val2\"]"
|
||||
"}"
|
||||
};
|
||||
bool atomic = 1
|
||||
[ (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
|
||||
title : "Atomic",
|
||||
description : "deploy Helm artifact with atomic flag"
|
||||
} ];
|
||||
bool wait = 2
|
||||
[ (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
|
||||
title : "Wait",
|
||||
description : "deploy Helm artifact with wait flag"
|
||||
} ];
|
||||
bool force = 3
|
||||
[ (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
|
||||
title : "Force",
|
||||
description : "deploy Helm artifact with force flag"
|
||||
} ];
|
||||
bool noHooks = 4
|
||||
[ (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
|
||||
title : "No Hooks",
|
||||
description : "deploy Helm artifact without hooks"
|
||||
} ];
|
||||
sint32 maxHistory = 5
|
||||
[ (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
|
||||
title : "Max History",
|
||||
description : "limit Helm artifact history"
|
||||
} ];
|
||||
bool renderSubChartNotes = 6
|
||||
[ (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
|
||||
title : "Render Sub Chart Notes",
|
||||
description : "render sub chart notes"
|
||||
} ];
|
||||
bool resetValues = 7
|
||||
[ (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
|
||||
title : "Reset Values",
|
||||
description : "reset existing helm values"
|
||||
} ];
|
||||
bool reuseValues = 8
|
||||
[ (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
|
||||
title : "Reuse Values",
|
||||
description : "reuse existing values"
|
||||
} ];
|
||||
repeated string setString = 9
|
||||
[ (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
|
||||
title : "Set String",
|
||||
description : "pass custom helm values as key=value"
|
||||
} ];
|
||||
bool skipCRDs = 10
|
||||
[ (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
|
||||
title : "Skip CRDs",
|
||||
description : "skip deploying crds"
|
||||
} ];
|
||||
string timeout = 11
|
||||
[ (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
|
||||
title : "Timeout",
|
||||
description : "timeout for waiting for the resources to become ready"
|
||||
} ];
|
||||
bool cleanUpOnFail = 12
|
||||
[ (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
|
||||
title : "Cleanup on fail",
|
||||
description : "cleanup deployed resources when chart fails to deploy"
|
||||
} ];
|
||||
string description = 13
|
||||
[ (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
|
||||
title : "Description",
|
||||
description : "custom description for the release"
|
||||
} ];
|
||||
bool disableOpenAPIValidation = 14
|
||||
[ (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
|
||||
title : "Disable OpenAPI Validation",
|
||||
description : "disable OpenAPI validation while deploying the chart"
|
||||
} ];
|
||||
bool keepHistory = 15
|
||||
[ (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
|
||||
title : "Keep History",
|
||||
description : "keep release history after uninstalling"
|
||||
} ];
|
||||
}
|
||||
|
||||
message YAMLOptions {
|
||||
option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_schema) = {
|
||||
json_schema : {
|
||||
title : "YAML Options"
|
||||
description : "options for deploying YAML artifacts"
|
||||
}
|
||||
example : "{"
|
||||
"\"force\": false,"
|
||||
"\"disableOpenAPIValidation\": true"
|
||||
"}"
|
||||
};
|
||||
|
||||
bool force = 1
|
||||
[ (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
|
||||
title : "Force",
|
||||
description : "deploy YAML artifact with force flag"
|
||||
} ];
|
||||
bool disableOpenAPIValidation = 2
|
||||
[ (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
|
||||
title : "Disable OpenAPI Validation",
|
||||
description : "disable OpenAPI validation while deploying the YAML"
|
||||
} ];
|
||||
}
|
||||
1072
components/common/proto/types/commonpb/v3/common.pb.go
Normal file
1072
components/common/proto/types/commonpb/v3/common.pb.go
Normal file
File diff suppressed because it is too large
Load Diff
236
components/common/proto/types/commonpb/v3/common.proto
Normal file
236
components/common/proto/types/commonpb/v3/common.proto
Normal file
@@ -0,0 +1,236 @@
|
||||
syntax = "proto3";
|
||||
package rafay.dev.types.common.v3;
|
||||
|
||||
import "google/protobuf/timestamp.proto";
|
||||
import "google/api/field_behavior.proto";
|
||||
import "protoc-gen-openapiv2/options/annotations.proto";
|
||||
|
||||
message Metadata {
|
||||
option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_schema) = {
|
||||
json_schema : {
|
||||
title : "Metadata"
|
||||
description : "metadata of the resource"
|
||||
required : [ "name", "project" ]
|
||||
}
|
||||
example : "{"
|
||||
"\"name\": \"some-name\","
|
||||
"\"project\": \"defaultproject\""
|
||||
"}"
|
||||
};
|
||||
string name = 1
|
||||
[ (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
|
||||
title : "Name",
|
||||
description : "name of the resource"
|
||||
} ];
|
||||
string description = 2
|
||||
[ (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
|
||||
title : "Description",
|
||||
description : "description of the resource"
|
||||
} ];
|
||||
map<string, string> labels = 3
|
||||
[ (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
|
||||
title : "Lables",
|
||||
description : "labels of the resource"
|
||||
} ];
|
||||
map<string, string> annotations = 4
|
||||
[ (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
|
||||
title : "Annotations",
|
||||
description : "annotations of the resource"
|
||||
} ];
|
||||
string project = 5
|
||||
[ (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
|
||||
title : "Project",
|
||||
description : "Project of the resource"
|
||||
} ];
|
||||
string organization = 6
|
||||
[ (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
|
||||
title : "Organization",
|
||||
description : "Organization to which the resource belongs"
|
||||
} ];
|
||||
string partner = 7
|
||||
[ (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
|
||||
title : "Partner",
|
||||
description : "Partner to which the resource belongs"
|
||||
} ];
|
||||
string id = 8 [ (google.api.field_behavior) = OUTPUT_ONLY ];
|
||||
google.protobuf.Timestamp modifiedAt = 9
|
||||
[ (google.api.field_behavior) = OUTPUT_ONLY ];
|
||||
}
|
||||
|
||||
message ProjectMeta {
|
||||
option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_schema) = {
|
||||
json_schema : {
|
||||
title : "ProjectMeta"
|
||||
description : "metadata of the project"
|
||||
required : [ "name" ]
|
||||
}
|
||||
example : "{\"name\": \"defaultproject\"}"
|
||||
};
|
||||
string name = 1
|
||||
[ (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
|
||||
title : "Name",
|
||||
description : "name of the project"
|
||||
} ];
|
||||
string id = 2 [ (google.api.field_behavior) = OUTPUT_ONLY ];
|
||||
}
|
||||
|
||||
message SharingSpec {
|
||||
option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_schema) = {
|
||||
json_schema : {
|
||||
title : "SharingSpec"
|
||||
description : "sharing specification for a resource"
|
||||
required : [ "enabled" ]
|
||||
}
|
||||
example : "{"
|
||||
"\"enabled\": true,"
|
||||
"\"projects\": [{\"name\": \"some-project\"}]"
|
||||
"}"
|
||||
};
|
||||
bool enabled = 1
|
||||
[ (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
|
||||
title : "Enabled",
|
||||
description : "flag to specify if sharing is enabled for resource"
|
||||
} ];
|
||||
repeated ProjectMeta projects = 2
|
||||
[ (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
|
||||
title : "Projects",
|
||||
description : "list of projects this resource is shared to"
|
||||
} ];
|
||||
}
|
||||
|
||||
message DriftSpec {
|
||||
option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_schema) = {
|
||||
json_schema : {
|
||||
title : "DriftSpec"
|
||||
description : "drift reconcillation specification for a resource"
|
||||
required : [ "enabled" ]
|
||||
}
|
||||
example : "{"
|
||||
"\"enabled\": true,"
|
||||
"\"action\": \"Deny\""
|
||||
"}"
|
||||
};
|
||||
bool enabled = 1
|
||||
[ (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
|
||||
title : "Enabled",
|
||||
description : "flag to specify if drift reconcillation is enabled for "
|
||||
"resource"
|
||||
} ];
|
||||
string action = 2
|
||||
[ (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
|
||||
title : "Action",
|
||||
description : "flag to specify if sharing is enabled for resource"
|
||||
enum : [ "Notify", "Deny" ]
|
||||
} ];
|
||||
}
|
||||
|
||||
// $title: ListMetadata
|
||||
// $description: metadata for a list of resources
|
||||
// $required: enabled
|
||||
message ListMetadata {
|
||||
sint64 count = 1;
|
||||
sint64 offset = 2;
|
||||
sint64 limt = 3;
|
||||
}
|
||||
|
||||
message PlacementLabel {
|
||||
option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_schema) = {
|
||||
json_schema : {
|
||||
title : "PlacementLabel"
|
||||
description : "labels for placement of resource"
|
||||
required : [ "key", "value" ]
|
||||
}
|
||||
example : "{"
|
||||
"\"key\": \"some-key\","
|
||||
"\"value\": \"some-value\""
|
||||
"}"
|
||||
};
|
||||
string key = 1
|
||||
[ (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
|
||||
title : "Key",
|
||||
description : "Key of the placement label"
|
||||
} ];
|
||||
string value = 2
|
||||
[ (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
|
||||
title : "Value",
|
||||
description : "Value of the placement label"
|
||||
} ];
|
||||
;
|
||||
}
|
||||
|
||||
message PlacementSpec {
|
||||
option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_schema) = {
|
||||
json_schema : {
|
||||
title : "PlacementSpec"
|
||||
description : "placement specification for a resource"
|
||||
required : []
|
||||
}
|
||||
example : "{"
|
||||
"\"labels\": [{\"key\": \"some-key\"},{\"key\": \"some-key\"}]"
|
||||
"}"
|
||||
};
|
||||
repeated PlacementLabel labels = 1
|
||||
[ (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
|
||||
title : "Labels",
|
||||
description : "list of labels for placement"
|
||||
} ];
|
||||
string selector = 2
|
||||
[ (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
|
||||
title : "Selector",
|
||||
description : "Kubernetes style label selector"
|
||||
} ];
|
||||
}
|
||||
|
||||
// $title: ConditionStatus
|
||||
// $description: status of a condition for a resource
|
||||
enum ConditionStatus {
|
||||
StatusNotSet = 0;
|
||||
StatusSubmitted = 1;
|
||||
StatusOK = 2;
|
||||
StatusFailed = 3;
|
||||
}
|
||||
|
||||
message Status {
|
||||
option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_schema) = {
|
||||
json_schema : {
|
||||
title : "Status",
|
||||
description : "status of a resource",
|
||||
read_only : true,
|
||||
}
|
||||
};
|
||||
string conditionType = 1
|
||||
[ (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
|
||||
title : "Condition Type",
|
||||
description : "type of the status condition",
|
||||
read_only : true
|
||||
} ];
|
||||
ConditionStatus conditionStatus = 2
|
||||
[ (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
|
||||
title : "Condition Status",
|
||||
description : "status of the condition",
|
||||
read_only : true
|
||||
enum: ["StatusNotSet", "StatusSubmitted", "StatusOK", "StatusFailed"]
|
||||
} ];
|
||||
google.protobuf.Timestamp lastUpdated = 3
|
||||
[ (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
|
||||
title : "Last Updated",
|
||||
description : "when the condition status is last updated",
|
||||
read_only : true
|
||||
} ];
|
||||
string reason = 4
|
||||
[ (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
|
||||
title : "Reason",
|
||||
description : "reason of the last condition status",
|
||||
read_only : true
|
||||
} ];
|
||||
}
|
||||
|
||||
// HttpBody represents arbitrary HTTP Body. It should only be used for
|
||||
// payload formats that can't be represented as JSON
|
||||
message HttpBody {
|
||||
// The HTTP Content-Type header value specifying the content type of the body.
|
||||
string content_type = 1;
|
||||
|
||||
// The HTTP request/response body as raw binary.
|
||||
bytes data = 2;
|
||||
}
|
||||
13
go.mod
Normal file
13
go.mod
Normal file
@@ -0,0 +1,13 @@
|
||||
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
|
||||
)
|
||||
20
go.sum
Normal file
20
go.sum
Normal file
@@ -0,0 +1,20 @@
|
||||
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=
|
||||
@@ -0,0 +1,2 @@
|
||||
DROP TABLE IF EXISTS authsrv_partner;
|
||||
DROP SEQUENCE IF EXISTS authsrv_partner_id_seq;
|
||||
33
persistence/migrations/admindb/000001_authsrv_partner.up.sql
Normal file
33
persistence/migrations/admindb/000001_authsrv_partner.up.sql
Normal file
@@ -0,0 +1,33 @@
|
||||
CREATE TABLE IF NOT EXISTS authsrv_partner (
|
||||
id uuid NOT NULL default uuid_generate_v4(),
|
||||
name character varying(256) NOT NULL,
|
||||
description character varying(512) NOT NULL,
|
||||
created_at timestamp with time zone NOT NULL,
|
||||
modified_at timestamp with time zone NOT NULL,
|
||||
trash boolean NOT NULL,
|
||||
settings jsonb NOT NULL,
|
||||
host character varying(256) NOT NULL,
|
||||
domain character varying(256) NOT NULL,
|
||||
tos_link character varying(256) NOT NULL,
|
||||
logo_link character varying(256) NOT NULL,
|
||||
notification_email character varying(254) NOT NULL,
|
||||
parent_id uuid,
|
||||
partner_helpdesk_email character varying(254) NOT NULL,
|
||||
partner_product_name character varying(256) NOT NULL,
|
||||
support_team_name character varying(256) NOT NULL,
|
||||
ops_host character varying(256) NOT NULL,
|
||||
fav_icon_link character varying(256) NOT NULL,
|
||||
is_totp_enabled boolean NOT NULL,
|
||||
is_synthetic_partner_enabled boolean NOT NULL
|
||||
);
|
||||
|
||||
|
||||
ALTER TABLE authsrv_partner OWNER TO admindbuser;
|
||||
|
||||
ALTER TABLE ONLY authsrv_partner ADD CONSTRAINT authsrv_partner_pkey PRIMARY KEY (id);
|
||||
|
||||
CREATE INDEX authsrv_partner_name_b6a8d21f ON authsrv_partner USING btree (name);
|
||||
|
||||
CREATE INDEX authsrv_partner_name_b6a8d21f_like ON authsrv_partner USING btree (name varchar_pattern_ops);
|
||||
|
||||
CREATE INDEX authsrv_partner_parent_id_5e0680af ON authsrv_partner USING btree (parent_id);
|
||||
@@ -0,0 +1,2 @@
|
||||
DROP TABLE IF EXISTS authsrv_organization;
|
||||
DROP SEQUENCE IF EXISTS authsrv_organization_id_seq;
|
||||
@@ -0,0 +1,46 @@
|
||||
CREATE TABLE IF NOT EXISTS authsrv_organization (
|
||||
id uuid NOT NULL default uuid_generate_v4(),
|
||||
name character varying(256) NOT NULL,
|
||||
description character varying(512) NOT NULL,
|
||||
created_at timestamp with time zone NOT NULL,
|
||||
modified_at timestamp with time zone NOT NULL,
|
||||
trash boolean NOT NULL,
|
||||
settings jsonb NOT NULL,
|
||||
billing_address text NOT NULL,
|
||||
partner_id uuid NOT NULL,
|
||||
active boolean NOT NULL,
|
||||
approved boolean NOT NULL,
|
||||
type character varying(64) NOT NULL,
|
||||
address_line1 text NOT NULL,
|
||||
address_line2 text NOT NULL,
|
||||
city text NOT NULL,
|
||||
country text NOT NULL,
|
||||
phone text NOT NULL,
|
||||
state text NOT NULL,
|
||||
zipcode text NOT NULL,
|
||||
deleted_name character varying(256),
|
||||
is_private boolean,
|
||||
is_totp_enabled boolean NOT NULL,
|
||||
are_clusters_shared boolean NOT NULL,
|
||||
psps_enabled boolean default TRUE,
|
||||
custom_psps_enabled boolean,
|
||||
default_blueprints_enabled boolean default TRUE,
|
||||
referer character varying(30)
|
||||
);
|
||||
|
||||
ALTER TABLE authsrv_organization OWNER TO admindbuser;
|
||||
|
||||
ALTER TABLE ONLY authsrv_organization
|
||||
ADD CONSTRAINT authsrv_organization_name_partner_id_7d1113b9_uniq UNIQUE (name, partner_id);
|
||||
|
||||
ALTER TABLE ONLY authsrv_organization ADD CONSTRAINT authsrv_organization_pkey PRIMARY KEY (id);
|
||||
|
||||
CREATE INDEX authsrv_organization_name_23376e56 ON authsrv_organization USING btree (name);
|
||||
|
||||
CREATE INDEX authsrv_organization_name_23376e56_like ON authsrv_organization USING btree (name varchar_pattern_ops);
|
||||
|
||||
CREATE INDEX authsrv_organization_partner_id_7b55b579 ON authsrv_organization USING btree (partner_id);
|
||||
|
||||
ALTER TABLE ONLY authsrv_organization
|
||||
ADD CONSTRAINT authsrv_organization_partner_id_7b55b579_fk_authsrv_partner_id FOREIGN KEY (partner_id)
|
||||
REFERENCES authsrv_partner(id) DEFERRABLE INITIALLY DEFERRED;
|
||||
@@ -0,0 +1,2 @@
|
||||
DROP TABLE IF EXISTS authsrv_project;
|
||||
DROP SEQUENCE IF EXISTS authsrv_project_id_seq;
|
||||
31
persistence/migrations/admindb/000003_authsrv_project.up.sql
Normal file
31
persistence/migrations/admindb/000003_authsrv_project.up.sql
Normal file
@@ -0,0 +1,31 @@
|
||||
CREATE TABLE IF NOT EXISTS authsrv_project (
|
||||
id uuid NOT NULL default uuid_generate_v4(),
|
||||
name character varying(256) NOT NULL,
|
||||
description character varying(512) NOT NULL,
|
||||
created_at timestamp with time zone NOT NULL,
|
||||
modified_at timestamp with time zone NOT NULL,
|
||||
trash boolean NOT NULL,
|
||||
organization_id uuid,
|
||||
partner_id uuid,
|
||||
"default" boolean NOT NULL
|
||||
);
|
||||
|
||||
ALTER TABLE authsrv_project OWNER TO admindbuser;
|
||||
|
||||
ALTER TABLE ONLY authsrv_project ADD CONSTRAINT authsrv_project_pkey PRIMARY KEY (id);
|
||||
|
||||
CREATE INDEX authsrv_project_name_1b8dd279 ON authsrv_project USING btree (name);
|
||||
|
||||
CREATE INDEX authsrv_project_name_1b8dd279_like ON authsrv_project USING btree (name varchar_pattern_ops);
|
||||
|
||||
CREATE INDEX authsrv_project_organization_id_77437387 ON authsrv_project USING btree (organization_id);
|
||||
|
||||
CREATE INDEX authsrv_project_partner_id_3d505b76 ON authsrv_project USING btree (partner_id);
|
||||
|
||||
ALTER TABLE ONLY authsrv_project
|
||||
ADD CONSTRAINT authsrv_project_organization_id_77437387_fk_authsrv_o FOREIGN KEY (organization_id)
|
||||
REFERENCES authsrv_organization(id) DEFERRABLE INITIALLY DEFERRED;
|
||||
|
||||
ALTER TABLE ONLY authsrv_project
|
||||
ADD CONSTRAINT authsrv_project_partner_id_3d505b76_fk_authsrv_partner_id FOREIGN KEY (partner_id)
|
||||
REFERENCES authsrv_partner(id) DEFERRABLE INITIALLY DEFERRED;
|
||||
@@ -0,0 +1,4 @@
|
||||
DROP TABLE IF EXISTS authsrv_account;
|
||||
DROP SEQUENCE IF EXISTS authsrv_account_id_seq;
|
||||
DROP TABLE IF EXISTS authsrv_ssoaccount;
|
||||
DROP SEQUENCE IF EXISTS authsrv_ssoaccount_id_seq;
|
||||
78
persistence/migrations/admindb/000004_authsrv_account.up.sql
Normal file
78
persistence/migrations/admindb/000004_authsrv_account.up.sql
Normal file
@@ -0,0 +1,78 @@
|
||||
CREATE TABLE IF NOT EXISTS authsrv_account (
|
||||
password character varying(128) NOT NULL,
|
||||
last_login timestamp with time zone,
|
||||
id uuid NOT NULL default uuid_generate_v4(),
|
||||
name character varying(256) NOT NULL,
|
||||
description character varying(512) NOT NULL,
|
||||
created_at timestamp with time zone NOT NULL,
|
||||
modified_at timestamp with time zone NOT NULL,
|
||||
trash boolean NOT NULL,
|
||||
username character varying(256) NOT NULL,
|
||||
phone character varying(36) NOT NULL,
|
||||
first_name character varying(64) NOT NULL,
|
||||
last_name character varying(64) NOT NULL,
|
||||
email_verified boolean NOT NULL,
|
||||
phone_verified boolean NOT NULL,
|
||||
email_verification_attempts integer NOT NULL,
|
||||
require_change_password boolean NOT NULL,
|
||||
deleted_username character varying(256),
|
||||
totp_required boolean NOT NULL,
|
||||
totp_secret character varying(64) NOT NULL,
|
||||
totp_verified boolean NOT NULL,
|
||||
organization_id uuid,
|
||||
user_type character varying(256) default 'CONSOLE'
|
||||
);
|
||||
|
||||
ALTER TABLE authsrv_account OWNER TO admindbuser;
|
||||
|
||||
ALTER TABLE ONLY authsrv_account ADD CONSTRAINT authsrv_account_pkey PRIMARY KEY (id);
|
||||
|
||||
ALTER TABLE ONLY authsrv_account ADD CONSTRAINT authsrv_account_username_key UNIQUE (username);
|
||||
|
||||
CREATE INDEX authsrv_account_name_16ecead7 ON authsrv_account USING btree (name);
|
||||
|
||||
CREATE INDEX authsrv_account_name_16ecead7_like ON authsrv_account USING btree (name varchar_pattern_ops);
|
||||
|
||||
CREATE INDEX authsrv_account_organization_id_abc549fc ON authsrv_account USING btree (organization_id);
|
||||
|
||||
CREATE INDEX authsrv_account_username_1db08261_like ON authsrv_account USING btree (username varchar_pattern_ops);
|
||||
|
||||
ALTER TABLE ONLY authsrv_account
|
||||
ADD CONSTRAINT authsrv_account_organization_id_abc549fc_fk_authsrv_o FOREIGN KEY (organization_id)
|
||||
REFERENCES authsrv_organization(id) DEFERRABLE INITIALLY DEFERRED;
|
||||
|
||||
CREATE TABLE IF NOT EXISTS authsrv_ssoaccount (
|
||||
password character varying(128) NOT NULL,
|
||||
last_login timestamp with time zone,
|
||||
id uuid NOT NULL default uuid_generate_v4(),
|
||||
name character varying(256) NOT NULL,
|
||||
organization_id uuid,
|
||||
description character varying(512) NOT NULL,
|
||||
created_at timestamp with time zone NOT NULL,
|
||||
modified_at timestamp with time zone NOT NULL,
|
||||
trash boolean NOT NULL,
|
||||
username character varying(256) NOT NULL,
|
||||
phone character varying(36) NOT NULL,
|
||||
first_name character varying(64) NOT NULL,
|
||||
last_name character varying(64) NOT NULL,
|
||||
groups jsonb,
|
||||
last_logout timestamp with time zone
|
||||
);
|
||||
|
||||
ALTER TABLE authsrv_ssoaccount OWNER TO admindbuser;
|
||||
|
||||
ALTER TABLE ONLY authsrv_ssoaccount ADD CONSTRAINT authsrv_ssoaccount_pkey PRIMARY KEY (id);
|
||||
|
||||
ALTER TABLE ONLY authsrv_ssoaccount ADD CONSTRAINT authsrv_ssoaccount_username_key UNIQUE (username);
|
||||
|
||||
CREATE INDEX authsrv_ssoaccount_name_4def83cc ON authsrv_ssoaccount USING btree (name);
|
||||
|
||||
CREATE INDEX authsrv_ssoaccount_name_4def83cc_like ON authsrv_ssoaccount USING btree (name varchar_pattern_ops);
|
||||
|
||||
CREATE INDEX authsrv_ssoaccount_organization_id_d2a979a5 ON authsrv_ssoaccount USING btree (organization_id);
|
||||
|
||||
CREATE INDEX authsrv_ssoaccount_username_029374ce_like ON authsrv_ssoaccount USING btree (username varchar_pattern_ops);
|
||||
|
||||
ALTER TABLE ONLY authsrv_ssoaccount
|
||||
ADD CONSTRAINT authsrv_ssoaccount_organization_id_d2a979a5_fk_authsrv_o FOREIGN KEY (organization_id)
|
||||
REFERENCES authsrv_organization(id) DEFERRABLE INITIALLY DEFERRED;
|
||||
@@ -0,0 +1,2 @@
|
||||
DROP TABLE IF EXISTS authsrv_group;
|
||||
DROP SEQUENCE IF EXISTS authsrv_group_id_seq;
|
||||
31
persistence/migrations/admindb/000005_authsrv_group.up.sql
Normal file
31
persistence/migrations/admindb/000005_authsrv_group.up.sql
Normal file
@@ -0,0 +1,31 @@
|
||||
CREATE TABLE IF NOT EXISTS authsrv_group (
|
||||
id uuid NOT NULL default uuid_generate_v4(),
|
||||
name character varying(256) NOT NULL,
|
||||
description character varying(512) NOT NULL,
|
||||
created_at timestamp with time zone NOT NULL,
|
||||
modified_at timestamp with time zone NOT NULL,
|
||||
trash boolean NOT NULL,
|
||||
organization_id uuid NOT NULL,
|
||||
partner_id uuid NOT NULL,
|
||||
type character varying(64) NOT NULL
|
||||
);
|
||||
|
||||
ALTER TABLE authsrv_group OWNER TO admindbuser;
|
||||
|
||||
ALTER TABLE ONLY authsrv_group ADD CONSTRAINT authsrv_group_pkey PRIMARY KEY (id);
|
||||
|
||||
CREATE INDEX authsrv_group_name_d90b4524 ON authsrv_group USING btree (name);
|
||||
|
||||
CREATE INDEX authsrv_group_name_d90b4524_like ON authsrv_group USING btree (name varchar_pattern_ops);
|
||||
|
||||
CREATE INDEX authsrv_group_organization_id_e070e826 ON authsrv_group USING btree (organization_id);
|
||||
|
||||
CREATE INDEX authsrv_group_partner_id_1de9ab46 ON authsrv_group USING btree (partner_id);
|
||||
|
||||
ALTER TABLE ONLY authsrv_group
|
||||
ADD CONSTRAINT authsrv_group_organization_id_e070e826_fk_authsrv_o FOREIGN KEY (organization_id)
|
||||
REFERENCES authsrv_organization(id) DEFERRABLE INITIALLY DEFERRED;
|
||||
|
||||
ALTER TABLE ONLY authsrv_group
|
||||
ADD CONSTRAINT authsrv_group_partner_id_1de9ab46_fk_authsrv_partner_id FOREIGN KEY (partner_id)
|
||||
REFERENCES authsrv_partner(id) DEFERRABLE INITIALLY DEFERRED;
|
||||
@@ -0,0 +1 @@
|
||||
DROP TABLE IF EXISTS authsrv_resource;
|
||||
@@ -0,0 +1,13 @@
|
||||
CREATE TABLE IF NOT EXISTS authsrv_resource (
|
||||
name character varying(256) NOT NULL,
|
||||
base_url character varying(256) NOT NULL,
|
||||
resource_urls jsonb NOT NULL,
|
||||
resource_action_urls jsonb NOT NULL,
|
||||
trash boolean NOT NULL
|
||||
);
|
||||
|
||||
ALTER TABLE authsrv_resource OWNER TO admindbuser;
|
||||
|
||||
ALTER TABLE ONLY authsrv_resource ADD CONSTRAINT authsrv_resource_pkey PRIMARY KEY (name);
|
||||
|
||||
CREATE INDEX authsrv_resource_name_5a29761f_like ON authsrv_resource USING btree (name varchar_pattern_ops);
|
||||
@@ -0,0 +1,2 @@
|
||||
DROP TABLE IF EXISTS authsrv_resourcerole;
|
||||
DROP SEQUENCE IF EXISTS authsrv_resourcerole_id_seq;
|
||||
@@ -0,0 +1,32 @@
|
||||
CREATE TABLE IF NOT EXISTS authsrv_resourcerole (
|
||||
id uuid NOT NULL default uuid_generate_v4(),
|
||||
name character varying(256) NOT NULL,
|
||||
description character varying(512) NOT NULL,
|
||||
created_at timestamp with time zone NOT NULL,
|
||||
modified_at timestamp with time zone NOT NULL,
|
||||
trash boolean NOT NULL,
|
||||
is_global boolean NOT NULL,
|
||||
scope character varying(256) NOT NULL,
|
||||
organization_id uuid,
|
||||
partner_id uuid
|
||||
);
|
||||
|
||||
ALTER TABLE authsrv_resourcerole OWNER TO admindbuser;
|
||||
|
||||
ALTER TABLE ONLY authsrv_resourcerole ADD CONSTRAINT authsrv_resourcerole_pkey PRIMARY KEY (id);
|
||||
|
||||
CREATE INDEX authsrv_resourcerole_name_a93b875a ON authsrv_resourcerole USING btree (name);
|
||||
|
||||
CREATE INDEX authsrv_resourcerole_name_a93b875a_like ON authsrv_resourcerole USING btree (name varchar_pattern_ops);
|
||||
|
||||
CREATE INDEX authsrv_resourcerole_organization_id_9a0a7e7e ON authsrv_resourcerole USING btree (organization_id);
|
||||
|
||||
CREATE INDEX authsrv_resourcerole_partner_id_de49ca91 ON authsrv_resourcerole USING btree (partner_id);
|
||||
|
||||
ALTER TABLE ONLY authsrv_resourcerole
|
||||
ADD CONSTRAINT authsrv_resourcerole_organization_id_9a0a7e7e_fk_authsrv_o FOREIGN KEY (organization_id)
|
||||
REFERENCES authsrv_organization(id) DEFERRABLE INITIALLY DEFERRED;
|
||||
|
||||
ALTER TABLE ONLY authsrv_resourcerole
|
||||
ADD CONSTRAINT authsrv_resourcerole_partner_id_de49ca91_fk_authsrv_partner_id FOREIGN KEY (partner_id)
|
||||
REFERENCES authsrv_partner(id) DEFERRABLE INITIALLY DEFERRED;
|
||||
@@ -0,0 +1,2 @@
|
||||
DROP TABLE IF EXISTS authsrv_resourcepermission;
|
||||
DROP SEQUENCE IF EXISTS authsrv_resourcepermission_id_seq;
|
||||
@@ -0,0 +1,41 @@
|
||||
CREATE TABLE IF NOT EXISTS authsrv_resourcepermission (
|
||||
id uuid NOT NULL default uuid_generate_v4(),
|
||||
name character varying(256) NOT NULL,
|
||||
description character varying(512) NOT NULL,
|
||||
created_at timestamp with time zone NOT NULL,
|
||||
modified_at timestamp with time zone NOT NULL,
|
||||
trash boolean NOT NULL,
|
||||
resource_urls jsonb NOT NULL,
|
||||
resource_action_urls jsonb NOT NULL,
|
||||
organization_id uuid,
|
||||
partner_id uuid,
|
||||
resource_ref_id character varying(256) NOT NULL
|
||||
);
|
||||
|
||||
ALTER TABLE authsrv_resourcepermission OWNER TO admindbuser;
|
||||
|
||||
ALTER TABLE ONLY authsrv_resourcepermission ADD CONSTRAINT authsrv_resourcepermission_pkey PRIMARY KEY (id);
|
||||
|
||||
CREATE INDEX authsrv_resourcepermission_name_97f09d50 ON authsrv_resourcepermission USING btree (name);
|
||||
|
||||
CREATE INDEX authsrv_resourcepermission_name_97f09d50_like ON authsrv_resourcepermission USING btree (name varchar_pattern_ops);
|
||||
|
||||
CREATE INDEX authsrv_resourcepermission_organization_id_daf7465e ON authsrv_resourcepermission USING btree (organization_id);
|
||||
|
||||
CREATE INDEX authsrv_resourcepermission_partner_id_f2ff9ad9 ON authsrv_resourcepermission USING btree (partner_id);
|
||||
|
||||
CREATE INDEX authsrv_resourcepermission_resource_ref_id_a47f8b94 ON authsrv_resourcepermission USING btree (resource_ref_id);
|
||||
|
||||
CREATE INDEX authsrv_resourcepermission_resource_ref_id_a47f8b94_like ON authsrv_resourcepermission USING btree (resource_ref_id varchar_pattern_ops);
|
||||
|
||||
ALTER TABLE ONLY authsrv_resourcepermission
|
||||
ADD CONSTRAINT authsrv_resourceperm_organization_id_daf7465e_fk_authsrv_o FOREIGN KEY (organization_id)
|
||||
REFERENCES authsrv_organization(id) DEFERRABLE INITIALLY DEFERRED;
|
||||
|
||||
ALTER TABLE ONLY authsrv_resourcepermission
|
||||
ADD CONSTRAINT authsrv_resourceperm_partner_id_f2ff9ad9_fk_authsrv_p FOREIGN KEY (partner_id)
|
||||
REFERENCES authsrv_partner(id) DEFERRABLE INITIALLY DEFERRED;
|
||||
|
||||
ALTER TABLE ONLY authsrv_resourcepermission
|
||||
ADD CONSTRAINT authsrv_resourceperm_resource_ref_id_a47f8b94_fk_authsrv_r FOREIGN KEY (resource_ref_id)
|
||||
REFERENCES authsrv_resource(name) DEFERRABLE INITIALLY DEFERRED;
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user