Skip to content

armgit / memos

Public Imported from GitHub
0

Memos is an open-source, self-hosted note-taking app that brings your everyday thoughts together in a personal timeline. Your data stays yours, and you choose what to keep private or share.

chore: implement storage service

Steven8f51529c78ad
diff --git a/proto/api/v2/idp_service.proto b/proto/api/v2/idp_service.proto
index db2ded42c..c5e4e724d 100644
--- a/proto/api/v2/idp_service.proto
+++ b/proto/api/v2/idp_service.proto
@@ -49,29 +49,29 @@ message IdentityProvider {
string identifier_filter = 4;
- message Config {
- message FieldMapping {
- string identifier = 1;
- string display_name = 2;
- string email = 3;
- }
-
- message OAuth2 {
- string client_id = 1;
- string client_secret = 2;
- string auth_url = 3;
- string token_url = 4;
- string user_info_url = 5;
- repeated string scopes = 6;
- FieldMapping field_mapping = 7;
- }
-
- oneof config {
- OAuth2 oauth2 = 1;
- }
+ IdentityProviderConfig config = 5;
+}
+
+message IdentityProviderConfig {
+ oneof config {
+ OAuth2Config oauth2 = 1;
}
+}
+
+message FieldMapping {
+ string identifier = 1;
+ string display_name = 2;
+ string email = 3;
+}
- Config config = 5;
+message OAuth2Config {
+ string client_id = 1;
+ string client_secret = 2;
+ string auth_url = 3;
+ string token_url = 4;
+ string user_info_url = 5;
+ repeated string scopes = 6;
+ FieldMapping field_mapping = 7;
}
message ListIdentityProvidersRequest {}
diff --git a/proto/api/v2/storage_service.proto b/proto/api/v2/storage_service.proto
new file mode 100644
index 000000000..7601d9634
--- /dev/null
+++ b/proto/api/v2/storage_service.proto
@@ -0,0 +1,109 @@
+syntax = "proto3";
+
+package memos.api.v2;
+
+import "google/api/annotations.proto";
+import "google/api/client.proto";
+import "google/protobuf/field_mask.proto";
+
+option go_package = "gen/api/v2";
+
+service StorageService {
+ // CreateStorage creates a new storage.
+ rpc CreateStorage(CreateStorageRequest) returns (CreateStorageResponse) {
+ option (google.api.http) = {
+ post: "/api/v2/storages"
+ body: "*"
+ };
+ }
+ // GetStorage returns a storage by id.
+ rpc GetStorage(GetStorageRequest) returns (GetStorageResponse) {
+ option (google.api.http) = {get: "/api/v2/storages/{id}"};
+ option (google.api.method_signature) = "id";
+ }
+ // ListStorages returns a list of storages.
+ rpc ListStorages(ListStoragesRequest) returns (ListStoragesResponse) {
+ option (google.api.http) = {get: "/api/v2/storages"};
+ }
+ // UpdateStorage updates a storage.
+ rpc UpdateStorage(UpdateStorageRequest) returns (UpdateStorageResponse) {
+ option (google.api.http) = {
+ patch: "/api/v2/storages/{storage.id}"
+ body: "storage"
+ };
+ option (google.api.method_signature) = "storage,update_mask";
+ }
+ // DeleteStorage deletes a storage by id.
+ rpc DeleteStorage(DeleteStorageRequest) returns (DeleteStorageResponse) {
+ option (google.api.http) = {delete: "/api/v2/storages/{id}"};
+ option (google.api.method_signature) = "id";
+ }
+}
+
+message Storage {
+ int32 id = 1;
+ string title = 2;
+
+ enum Type {
+ TYPE_UNSPECIFIED = 0;
+ S3 = 1;
+ }
+ Type type = 3;
+ StorageConfig config = 4;
+}
+
+message StorageConfig {
+ oneof storage_config {
+ S3Config s3_config = 1;
+ }
+}
+
+message S3Config {
+ string end_point = 1;
+ string path = 2;
+ string region = 3;
+ string access_key = 4;
+ string secret_key = 5;
+ string bucket = 6;
+ string url_prefix = 7;
+ string url_suffix = 8;
+ bool pre_sign = 9;
+}
+
+message CreateStorageRequest {
+ Storage storage = 1;
+}
+
+message CreateStorageResponse {
+ Storage storage = 1;
+}
+
+message GetStorageRequest {
+ int32 id = 1;
+}
+
+message GetStorageResponse {
+ Storage storage = 1;
+}
+
+message ListStoragesRequest {}
+
+message ListStoragesResponse {
+ repeated Storage storages = 1;
+}
+
+message UpdateStorageRequest {
+ Storage storage = 1;
+
+ google.protobuf.FieldMask update_mask = 2;
+}
+
+message UpdateStorageResponse {
+ Storage storage = 1;
+}
+
+message DeleteStorageRequest {
+ int32 id = 1;
+}
+
+message DeleteStorageResponse {}
diff --git a/proto/gen/api/v2/README.md b/proto/gen/api/v2/README.md
index a78588f75..0cf0ed399 100644
--- a/proto/gen/api/v2/README.md
+++ b/proto/gen/api/v2/README.md
@@ -68,14 +68,14 @@
- [CreateIdentityProviderResponse](#memos-api-v2-CreateIdentityProviderResponse)
- [DeleteIdentityProviderRequest](#memos-api-v2-DeleteIdentityProviderRequest)
- [DeleteIdentityProviderResponse](#memos-api-v2-DeleteIdentityProviderResponse)
+ - [FieldMapping](#memos-api-v2-FieldMapping)
- [GetIdentityProviderRequest](#memos-api-v2-GetIdentityProviderRequest)
- [GetIdentityProviderResponse](#memos-api-v2-GetIdentityProviderResponse)
- [IdentityProvider](#memos-api-v2-IdentityProvider)
- - [IdentityProvider.Config](#memos-api-v2-IdentityProvider-Config)
- - [IdentityProvider.Config.FieldMapping](#memos-api-v2-IdentityProvider-Config-FieldMapping)
- - [IdentityProvider.Config.OAuth2](#memos-api-v2-IdentityProvider-Config-OAuth2)
+ - [IdentityProviderConfig](#memos-api-v2-IdentityProviderConfig)
- [ListIdentityProvidersRequest](#memos-api-v2-ListIdentityProvidersRequest)
- [ListIdentityProvidersResponse](#memos-api-v2-ListIdentityProvidersResponse)
+ - [OAuth2Config](#memos-api-v2-OAuth2Config)
- [UpdateIdentityProviderRequest](#memos-api-v2-UpdateIdentityProviderRequest)
- [UpdateIdentityProviderResponse](#memos-api-v2-UpdateIdentityProviderResponse)
@@ -173,6 +173,25 @@
- [MemoService](#memos-api-v2-MemoService)
+- [api/v2/storage_service.proto](#api_v2_storage_service-proto)
+ - [CreateStorageRequest](#memos-api-v2-CreateStorageRequest)
+ - [CreateStorageResponse](#memos-api-v2-CreateStorageResponse)
+ - [DeleteStorageRequest](#memos-api-v2-DeleteStorageRequest)
+ - [DeleteStorageResponse](#memos-api-v2-DeleteStorageResponse)
+ - [GetStorageRequest](#memos-api-v2-GetStorageRequest)
+ - [GetStorageResponse](#memos-api-v2-GetStorageResponse)
+ - [ListStoragesRequest](#memos-api-v2-ListStoragesRequest)
+ - [ListStoragesResponse](#memos-api-v2-ListStoragesResponse)
+ - [S3Config](#memos-api-v2-S3Config)
+ - [Storage](#memos-api-v2-Storage)
+ - [StorageConfig](#memos-api-v2-StorageConfig)
+ - [UpdateStorageRequest](#memos-api-v2-UpdateStorageRequest)
+ - [UpdateStorageResponse](#memos-api-v2-UpdateStorageResponse)
+
+ - [Storage.Type](#memos-api-v2-Storage-Type)
+
+ - [StorageService](#memos-api-v2-StorageService)
+
- [api/v2/tag_service.proto](#api_v2_tag_service-proto)
- [BatchUpsertTagRequest](#memos-api-v2-BatchUpsertTagRequest)
- [BatchUpsertTagResponse](#memos-api-v2-BatchUpsertTagResponse)
@@ -1067,6 +1086,23 @@ Used internally for obfuscating the page token.
+<a name="memos-api-v2-FieldMapping"></a>
+
+### FieldMapping
+
+
+
+| Field | Type | Label | Description |
+| ----- | ---- | ----- | ----------- |
+| identifier | [string](#string) | | |
+| display_name | [string](#string) | | |
+| email | [string](#string) | | |
+
+
+
+
+
+
<a name="memos-api-v2-GetIdentityProviderRequest"></a>
### GetIdentityProviderRequest
@@ -1109,85 +1145,68 @@ Used internally for obfuscating the page token.
| type | [IdentityProvider.Type](#memos-api-v2-IdentityProvider-Type) | | |
| title | [string](#string) | | |
| identifier_filter | [string](#string) | | |
-| config | [IdentityProvider.Config](#memos-api-v2-IdentityProvider-Config) | | |
+| config | [IdentityProviderConfig](#memos-api-v2-IdentityProviderConfig) | | |
-<a name="memos-api-v2-IdentityProvider-Config"></a>
+<a name="memos-api-v2-IdentityProviderConfig"></a>
-### IdentityProvider.Config
+### IdentityProviderConfig
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| oauth2 | [IdentityProvider.Config.OAuth2](#memos-api-v2-IdentityProvider-Config-OAuth2) | | |
+| oauth2 | [OAuth2Config](#memos-api-v2-OAuth2Config) | | |
-<a name="memos-api-v2-IdentityProvider-Config-FieldMapping"></a>
+<a name="memos-api-v2-ListIdentityProvidersRequest"></a>
-### IdentityProvider.Config.FieldMapping
+### ListIdentityProvidersRequest
-| Field | Type | Label | Description |
-| ----- | ---- | ----- | ----------- |
-| identifier | [string](#string) | | |
-| display_name | [string](#string) | | |
-| email | [string](#string) | | |
-
-
-<a name="memos-api-v2-IdentityProvider-Config-OAuth2"></a>
+<a name="memos-api-v2-ListIdentityProvidersResponse"></a>
-### IdentityProvider.Config.OAuth2
+### ListIdentityProvidersResponse
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| client_id | [string](#string) | | |
-| client_secret | [string](#string) | | |
-| auth_url | [string](#string) | | |
-| token_url | [string](#string) | | |
-| user_info_url | [string](#string) | | |
-| scopes | [string](#string) | repeated | |
-| field_mapping | [IdentityProvider.Config.FieldMapping](#memos-api-v2-IdentityProvider-Config-FieldMapping) | | |
-
-
-
-
-
-
-<a name="memos-api-v2-ListIdentityProvidersRequest"></a>
-
-### ListIdentityProvidersRequest
-
+| identity_providers | [IdentityProvider](#memos-api-v2-IdentityProvider) | repeated | |
-<a name="memos-api-v2-ListIdentityProvidersResponse"></a>
+<a name="memos-api-v2-OAuth2Config"></a>
-### ListIdentityProvidersResponse
+### OAuth2Config
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| identity_providers | [IdentityProvider](#memos-api-v2-IdentityProvider) | repeated | |
+| client_id | [string](#string) | | |
+| client_secret | [string](#string) | | |
+| auth_url | [string](#string) | | |
+| token_url | [string](#string) | | |
+| user_info_url | [string](#string) | | |
+| scopes | [string](#string) | repeated | |
+| field_mapping | [FieldMapping](#memos-api-v2-FieldMapping) | | |
@@ -2423,6 +2442,245 @@ Used internally for obfuscating the page token.
+<a name="api_v2_storage_service-proto"></a>
+<p align="right"><a href="#top">Top</a></p>
+
+## api/v2/storage_service.proto
+
+
+
+<a name="memos-api-v2-CreateStorageRequest"></a>
+
+### CreateStorageRequest
+
+
+
+| Field | Type | Label | Description |
+| ----- | ---- | ----- | ----------- |
+| storage | [Storage](#memos-api-v2-Storage) | | |
+
+
+
+
+
+
+<a name="memos-api-v2-CreateStorageResponse"></a>
+
+### CreateStorageResponse
+
+
+
+| Field | Type | Label | Description |
+| ----- | ---- | ----- | ----------- |
+| storage | [Storage](#memos-api-v2-Storage) | | |
+
+
+
+
+
+
+<a name="memos-api-v2-DeleteStorageRequest"></a>
+
+### DeleteStorageRequest
+
+
+
+| Field | Type | Label | Description |
+| ----- | ---- | ----- | ----------- |
+| id | [int32](#int32) | | |
+
+
+
+
+
+
+<a name="memos-api-v2-DeleteStorageResponse"></a>
+
+### DeleteStorageResponse
+
+
+
+
+
+
+
+<a name="memos-api-v2-GetStorageRequest"></a>
+
+### GetStorageRequest
+
+
+
+| Field | Type | Label | Description |
+| ----- | ---- | ----- | ----------- |
+| id | [int32](#int32) | | |
+
+
+
+
+
+
+<a name="memos-api-v2-GetStorageResponse"></a>
+
+### GetStorageResponse
+
+
+
+| Field | Type | Label | Description |
+| ----- | ---- | ----- | ----------- |
+| storage | [Storage](#memos-api-v2-Storage) | | |
+
+
+
+
+
+
+<a name="memos-api-v2-ListStoragesRequest"></a>
+
+### ListStoragesRequest
+
+
+
+
+
+
+
+<a name="memos-api-v2-ListStoragesResponse"></a>
+
+### ListStoragesResponse
+
+
+
+| Field | Type | Label | Description |
+| ----- | ---- | ----- | ----------- |
+| storages | [Storage](#memos-api-v2-Storage) | repeated | |
+
+
+
+
+
+
+<a name="memos-api-v2-S3Config"></a>
+
+### S3Config
+
+
+
+| Field | Type | Label | Description |
+| ----- | ---- | ----- | ----------- |
+| end_point | [string](#string) | | |
+| path | [string](#string) | | |
+| region | [string](#string) | | |
+| access_key | [string](#string) | | |
+| secret_key | [string](#string) | | |
+| bucket | [string](#string) | | |
+| url_prefix | [string](#string) | | |
+| url_suffix | [string](#string) | | |
+| pre_sign | [bool](#bool) | | |
+
+
+
+
+
+
+<a name="memos-api-v2-Storage"></a>
+
+### Storage
+
+
+
+| Field | Type | Label | Description |
+| ----- | ---- | ----- | ----------- |
+| id | [int32](#int32) | | |
+| title | [string](#string) | | |
+| type | [Storage.Type](#memos-api-v2-Storage-Type) | | |
+| config | [StorageConfig](#memos-api-v2-StorageConfig) | | |
+
+
+
+
+
+
+<a name="memos-api-v2-StorageConfig"></a>
+
+### StorageConfig
+
+
+
+| Field | Type | Label | Description |
+| ----- | ---- | ----- | ----------- |
+| s3_config | [S3Config](#memos-api-v2-S3Config) | | |
+
+
+
+
+
+
+<a name="memos-api-v2-UpdateStorageRequest"></a>
+
+### UpdateStorageRequest
+
+
+
+| Field | Type | Label | Description |
+| ----- | ---- | ----- | ----------- |
+| storage | [Storage](#memos-api-v2-Storage) | | |
+| update_mask | [google.protobuf.FieldMask](#google-protobuf-FieldMask) | | |
+
+
+
+
+
+
+<a name="memos-api-v2-UpdateStorageResponse"></a>
+
+### UpdateStorageResponse
+
+
+
+| Field | Type | Label | Description |
+| ----- | ---- | ----- | ----------- |
+| storage | [Storage](#memos-api-v2-Storage) | | |
+
+
+
+
+
+
+
+
+<a name="memos-api-v2-Storage-Type"></a>
+
+### Storage.Type
+
+
+| Name | Number | Description |
+| ---- | ------ | ----------- |
+| TYPE_UNSPECIFIED | 0 | |
+| S3 | 1 | |
+
+
+
+
+
+
+
+<a name="memos-api-v2-StorageService"></a>
+
+### StorageService
+
+
+| Method Name | Request Type | Response Type | Description |
+| ----------- | ------------ | ------------- | ------------|
+| CreateStorage | [CreateStorageRequest](#memos-api-v2-CreateStorageRequest) | [CreateStorageResponse](#memos-api-v2-CreateStorageResponse) | CreateStorage creates a new storage. |
+| GetStorage | [GetStorageRequest](#memos-api-v2-GetStorageRequest) | [GetStorageResponse](#memos-api-v2-GetStorageResponse) | GetStorage returns a storage by id. |
+| ListStorages | [ListStoragesRequest](#memos-api-v2-ListStoragesRequest) | [ListStoragesResponse](#memos-api-v2-ListStoragesResponse) | ListStorages returns a list of storages. |
+| UpdateStorage | [UpdateStorageRequest](#memos-api-v2-UpdateStorageRequest) | [UpdateStorageResponse](#memos-api-v2-UpdateStorageResponse) | UpdateStorage updates a storage. |
+| DeleteStorage | [DeleteStorageRequest](#memos-api-v2-DeleteStorageRequest) | [DeleteStorageResponse](#memos-api-v2-DeleteStorageResponse) | DeleteStorage deletes a storage by id. |
+
+
+
+
+
<a name="api_v2_tag_service-proto"></a>
<p align="right"><a href="#top">Top</a></p>
diff --git a/proto/gen/api/v2/idp_service.pb.go b/proto/gen/api/v2/idp_service.pb.go
index f17a4c3f5..2a1736389 100644
--- a/proto/gen/api/v2/idp_service.pb.go
+++ b/proto/gen/api/v2/idp_service.pb.go
@@ -75,11 +75,11 @@ type IdentityProvider struct {
// The name of the identityProvider.
// Format: identityProviders/{id}
- Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
- Type IdentityProvider_Type `protobuf:"varint,2,opt,name=type,proto3,enum=memos.api.v2.IdentityProvider_Type" json:"type,omitempty"`
- Title string `protobuf:"bytes,3,opt,name=title,proto3" json:"title,omitempty"`
- IdentifierFilter string `protobuf:"bytes,4,opt,name=identifier_filter,json=identifierFilter,proto3" json:"identifier_filter,omitempty"`
- Config *IdentityProvider_Config `protobuf:"bytes,5,opt,name=config,proto3" json:"config,omitempty"`
+ Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
+ Type IdentityProvider_Type `protobuf:"varint,2,opt,name=type,proto3,enum=memos.api.v2.IdentityProvider_Type" json:"type,omitempty"`
+ Title string `protobuf:"bytes,3,opt,name=title,proto3" json:"title,omitempty"`
+ IdentifierFilter string `protobuf:"bytes,4,opt,name=identifier_filter,json=identifierFilter,proto3" json:"identifier_filter,omitempty"`
+ Config *IdentityProviderConfig `protobuf:"bytes,5,opt,name=config,proto3" json:"config,omitempty"`
}
func (x *IdentityProvider) Reset() {
@@ -142,21 +142,26 @@ func (x *IdentityProvider) GetIdentifierFilter() string {
return ""
}
-func (x *IdentityProvider) GetConfig() *IdentityProvider_Config {
+func (x *IdentityProvider) GetConfig() *IdentityProviderConfig {
if x != nil {
return x.Config
}
return nil
}
-type ListIdentityProvidersRequest struct {
+type IdentityProviderConfig struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
+
+ // Types that are assignable to Config:
+ //
+ // *IdentityProviderConfig_Oauth2
+ Config isIdentityProviderConfig_Config `protobuf_oneof:"config"`
}
-func (x *ListIdentityProvidersRequest) Reset() {
- *x = ListIdentityProvidersRequest{}
+func (x *IdentityProviderConfig) Reset() {
+ *x = IdentityProviderConfig{}
if protoimpl.UnsafeEnabled {
mi := &file_api_v2_idp_service_proto_msgTypes[1]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
@@ -164,13 +169,13 @@ func (x *ListIdentityProvidersRequest) Reset() {
}
}
-func (x *ListIdentityProvidersRequest) String() string {
+func (x *IdentityProviderConfig) String() string {
return protoimpl.X.MessageStringOf(x)
}
-func (*ListIdentityProvidersRequest) ProtoMessage() {}
+func (*IdentityProviderConfig) ProtoMessage() {}
-func (x *ListIdentityProvidersRequest) ProtoReflect() protoreflect.Message {
+func (x *IdentityProviderConfig) ProtoReflect() protoreflect.Message {
mi := &file_api_v2_idp_service_proto_msgTypes[1]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
@@ -182,21 +187,47 @@ func (x *ListIdentityProvidersRequest) ProtoReflect() protoreflect.Message {
return mi.MessageOf(x)
}
-// Deprecated: Use ListIdentityProvidersRequest.ProtoReflect.Descriptor instead.
-func (*ListIdentityProvidersRequest) Descriptor() ([]byte, []int) {
+// Deprecated: Use IdentityProviderConfig.ProtoReflect.Descriptor instead.
+func (*IdentityProviderConfig) Descriptor() ([]byte, []int) {
return file_api_v2_idp_service_proto_rawDescGZIP(), []int{1}
}
-type ListIdentityProvidersResponse struct {
+func (m *IdentityProviderConfig) GetConfig() isIdentityProviderConfig_Config {
+ if m != nil {
+ return m.Config
+ }
+ return nil
+}
+
+func (x *IdentityProviderConfig) GetOauth2() *OAuth2Config {
+ if x, ok := x.GetConfig().(*IdentityProviderConfig_Oauth2); ok {
+ return x.Oauth2
+ }
+ return nil
+}
+
+type isIdentityProviderConfig_Config interface {
+ isIdentityProviderConfig_Config()
+}
+
+type IdentityProviderConfig_Oauth2 struct {
+ Oauth2 *OAuth2Config `protobuf:"bytes,1,opt,name=oauth2,proto3,oneof"`
+}
+
+func (*IdentityProviderConfig_Oauth2) isIdentityProviderConfig_Config() {}
+
+type FieldMapping struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
- IdentityProviders []*IdentityProvider `protobuf:"bytes,1,rep,name=identity_providers,json=identityProviders,proto3" json:"identity_providers,omitempty"`
+ Identifier string `protobuf:"bytes,1,opt,name=identifier,proto3" json:"identifier,omitempty"`
+ DisplayName string `protobuf:"bytes,2,opt,name=display_name,json=displayName,proto3" json:"display_name,omitempty"`
+ Email string `protobuf:"bytes,3,opt,name=email,proto3" json:"email,omitempty"`
}
-func (x *ListIdentityProvidersResponse) Reset() {
- *x = ListIdentityProvidersResponse{}
+func (x *FieldMapping) Reset() {
+ *x = FieldMapping{}
if protoimpl.UnsafeEnabled {
mi := &file_api_v2_idp_service_proto_msgTypes[2]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
@@ -204,13 +235,13 @@ func (x *ListIdentityProvidersResponse) Reset() {
}
}
-func (x *ListIdentityProvidersResponse) String() string {
+func (x *FieldMapping) String() string {
return protoimpl.X.MessageStringOf(x)
}
-func (*ListIdentityProvidersResponse) ProtoMessage() {}
+func (*FieldMapping) ProtoMessage() {}
-func (x *ListIdentityProvidersResponse) ProtoReflect() protoreflect.Message {
+func (x *FieldMapping) ProtoReflect() protoreflect.Message {
mi := &file_api_v2_idp_service_proto_msgTypes[2]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
@@ -222,30 +253,48 @@ func (x *ListIdentityProvidersResponse) ProtoReflect() protoreflect.Message {
return mi.MessageOf(x)
}
-// Deprecated: Use ListIdentityProvidersResponse.ProtoReflect.Descriptor instead.
-func (*ListIdentityProvidersResponse) Descriptor() ([]byte, []int) {
+// Deprecated: Use FieldMapping.ProtoReflect.Descriptor instead.
+func (*FieldMapping) Descriptor() ([]byte, []int) {
return file_api_v2_idp_service_proto_rawDescGZIP(), []int{2}
}
-func (x *ListIdentityProvidersResponse) GetIdentityProviders() []*IdentityProvider {
+func (x *FieldMapping) GetIdentifier() string {
if x != nil {
- return x.IdentityProviders
+ return x.Identifier
}
- return nil
+ return ""
}
-type GetIdentityProviderRequest struct {
+func (x *FieldMapping) GetDisplayName() string {
+ if x != nil {
+ return x.DisplayName
+ }
+ return ""
+}
+
+func (x *FieldMapping) GetEmail() string {
+ if x != nil {
+ return x.Email
+ }
+ return ""
+}
+
+type OAuth2Config struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
- // The name of the identityProvider to get.
- // Format: identityProviders/{id}
- Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
+ ClientId string `protobuf:"bytes,1,opt,name=client_id,json=clientId,proto3" json:"client_id,omitempty"`
+ ClientSecret string `protobuf:"bytes,2,opt,name=client_secret,json=clientSecret,proto3" json:"client_secret,omitempty"`
+ AuthUrl string `protobuf:"bytes,3,opt,name=auth_url,json=authUrl,proto3" json:"auth_url,omitempty"`
+ TokenUrl string `protobuf:"bytes,4,opt,name=token_url,json=tokenUrl,proto3" json:"token_url,omitempty"`
+ UserInfoUrl string `protobuf:"bytes,5,opt,name=user_info_url,json=userInfoUrl,proto3" json:"user_info_url,omitempty"`
+ Scopes []string `protobuf:"bytes,6,rep,name=scopes,proto3" json:"scopes,omitempty"`
+ FieldMapping *FieldMapping `protobuf:"bytes,7,opt,name=field_mapping,json=fieldMapping,proto3" json:"field_mapping,omitempty"`
}
-func (x *GetIdentityProviderRequest) Reset() {
- *x = GetIdentityProviderRequest{}
+func (x *OAuth2Config) Reset() {
+ *x = OAuth2Config{}
if protoimpl.UnsafeEnabled {
mi := &file_api_v2_idp_service_proto_msgTypes[3]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
@@ -253,13 +302,13 @@ func (x *GetIdentityProviderRequest) Reset() {
}
}
-func (x *GetIdentityProviderRequest) String() string {
+func (x *OAuth2Config) String() string {
return protoimpl.X.MessageStringOf(x)
}
-func (*GetIdentityProviderRequest) ProtoMessage() {}
+func (*OAuth2Config) ProtoMessage() {}
-func (x *GetIdentityProviderRequest) ProtoReflect() protoreflect.Message {
+func (x *OAuth2Config) ProtoReflect() protoreflect.Message {
mi := &file_api_v2_idp_service_proto_msgTypes[3]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
@@ -271,29 +320,68 @@ func (x *GetIdentityProviderRequest) ProtoReflect() protoreflect.Message {
return mi.MessageOf(x)
}
-// Deprecated: Use GetIdentityProviderRequest.ProtoReflect.Descriptor instead.
-func (*GetIdentityProviderRequest) Descriptor() ([]byte, []int) {
+// Deprecated: Use OAuth2Config.ProtoReflect.Descriptor instead.
+func (*OAuth2Config) Descriptor() ([]byte, []int) {
return file_api_v2_idp_service_proto_rawDescGZIP(), []int{3}
}
-func (x *GetIdentityProviderRequest) GetName() string {
+func (x *OAuth2Config) GetClientId() string {
if x != nil {
- return x.Name
+ return x.ClientId
}
return ""
}
-type GetIdentityProviderResponse struct {
+func (x *OAuth2Config) GetClientSecret() string {
+ if x != nil {
+ return x.ClientSecret
+ }
+ return ""
+}
+
+func (x *OAuth2Config) GetAuthUrl() string {
+ if x != nil {
+ return x.AuthUrl
+ }
+ return ""
+}
+
+func (x *OAuth2Config) GetTokenUrl() string {
+ if x != nil {
+ return x.TokenUrl
+ }
+ return ""
+}
+
+func (x *OAuth2Config) GetUserInfoUrl() string {
+ if x != nil {
+ return x.UserInfoUrl
+ }
+ return ""
+}
+
+func (x *OAuth2Config) GetScopes() []string {
+ if x != nil {
+ return x.Scopes
+ }
+ return nil
+}
+
+func (x *OAuth2Config) GetFieldMapping() *FieldMapping {
+ if x != nil {
+ return x.FieldMapping
+ }
+ return nil
+}
+
+type ListIdentityProvidersRequest struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
-
- // The identityProvider.
- IdentityProvider *IdentityProvider `protobuf:"bytes,1,opt,name=identity_provider,json=identityProvider,proto3" json:"identity_provider,omitempty"`
}
-func (x *GetIdentityProviderResponse) Reset() {
- *x = GetIdentityProviderResponse{}
+func (x *ListIdentityProvidersRequest) Reset() {
+ *x = ListIdentityProvidersRequest{}
if protoimpl.UnsafeEnabled {
mi := &file_api_v2_idp_service_proto_msgTypes[4]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
@@ -301,13 +389,13 @@ func (x *GetIdentityProviderResponse) Reset() {
}
}
-func (x *GetIdentityProviderResponse) String() string {
+func (x *ListIdentityProvidersRequest) String() string {
return protoimpl.X.MessageStringOf(x)
}
-func (*GetIdentityProviderResponse) ProtoMessage() {}
+func (*ListIdentityProvidersRequest) ProtoMessage() {}
-func (x *GetIdentityProviderResponse) ProtoReflect() protoreflect.Message {
+func (x *ListIdentityProvidersRequest) ProtoReflect() protoreflect.Message {
mi := &file_api_v2_idp_service_proto_msgTypes[4]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
@@ -319,29 +407,21 @@ func (x *GetIdentityProviderResponse) ProtoReflect() protoreflect.Message {
return mi.MessageOf(x)
}
-// Deprecated: Use GetIdentityProviderResponse.ProtoReflect.Descriptor instead.
-func (*GetIdentityProviderResponse) Descriptor() ([]byte, []int) {
+// Deprecated: Use ListIdentityProvidersRequest.ProtoReflect.Descriptor instead.
+func (*ListIdentityProvidersRequest) Descriptor() ([]byte, []int) {
return file_api_v2_idp_service_proto_rawDescGZIP(), []int{4}
}
-func (x *GetIdentityProviderResponse) GetIdentityProvider() *IdentityProvider {
- if x != nil {
- return x.IdentityProvider
- }
- return nil
-}
-
-type CreateIdentityProviderRequest struct {
+type ListIdentityProvidersResponse struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
- // The identityProvider to create.
- IdentityProvider *IdentityProvider `protobuf:"bytes,1,opt,name=identity_provider,json=identityProvider,proto3" json:"identity_provider,omitempty"`
+ IdentityProviders []*IdentityProvider `protobuf:"bytes,1,rep,name=identity_providers,json=identityProviders,proto3" json:"identity_providers,omitempty"`
}
-func (x *CreateIdentityProviderRequest) Reset() {
- *x = CreateIdentityProviderRequest{}
+func (x *ListIdentityProvidersResponse) Reset() {
+ *x = ListIdentityProvidersResponse{}
if protoimpl.UnsafeEnabled {
mi := &file_api_v2_idp_service_proto_msgTypes[5]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
@@ -349,13 +429,13 @@ func (x *CreateIdentityProviderRequest) Reset() {
}
}
-func (x *CreateIdentityProviderRequest) String() string {
+func (x *ListIdentityProvidersResponse) String() string {
return protoimpl.X.MessageStringOf(x)
}
-func (*CreateIdentityProviderRequest) ProtoMessage() {}
+func (*ListIdentityProvidersResponse) ProtoMessage() {}
-func (x *CreateIdentityProviderRequest) ProtoReflect() protoreflect.Message {
+func (x *ListIdentityProvidersResponse) ProtoReflect() protoreflect.Message {
mi := &file_api_v2_idp_service_proto_msgTypes[5]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
@@ -367,29 +447,30 @@ func (x *CreateIdentityProviderRequest) ProtoReflect() protoreflect.Message {
return mi.MessageOf(x)
}
-// Deprecated: Use CreateIdentityProviderRequest.ProtoReflect.Descriptor instead.
-func (*CreateIdentityProviderRequest) Descriptor() ([]byte, []int) {
+// Deprecated: Use ListIdentityProvidersResponse.ProtoReflect.Descriptor instead.
+func (*ListIdentityProvidersResponse) Descriptor() ([]byte, []int) {
return file_api_v2_idp_service_proto_rawDescGZIP(), []int{5}
}
-func (x *CreateIdentityProviderRequest) GetIdentityProvider() *IdentityProvider {
+func (x *ListIdentityProvidersResponse) GetIdentityProviders() []*IdentityProvider {
if x != nil {
- return x.IdentityProvider
+ return x.IdentityProviders
}
return nil
}
-type CreateIdentityProviderResponse struct {
+type GetIdentityProviderRequest struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
- // The created identityProvider.
- IdentityProvider *IdentityProvider `protobuf:"bytes,1,opt,name=identity_provider,json=identityProvider,proto3" json:"identity_provider,omitempty"`
+ // The name of the identityProvider to get.
+ // Format: identityProviders/{id}
+ Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
}
-func (x *CreateIdentityProviderResponse) Reset() {
- *x = CreateIdentityProviderResponse{}
+func (x *GetIdentityProviderRequest) Reset() {
+ *x = GetIdentityProviderRequest{}
if protoimpl.UnsafeEnabled {
mi := &file_api_v2_idp_service_proto_msgTypes[6]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
@@ -397,13 +478,13 @@ func (x *CreateIdentityProviderResponse) Reset() {
}
}
-func (x *CreateIdentityProviderResponse) String() string {
+func (x *GetIdentityProviderRequest) String() string {
return protoimpl.X.MessageStringOf(x)
}
-func (*CreateIdentityProviderResponse) ProtoMessage() {}
+func (*GetIdentityProviderRequest) ProtoMessage() {}
-func (x *CreateIdentityProviderResponse) ProtoReflect() protoreflect.Message {
+func (x *GetIdentityProviderRequest) ProtoReflect() protoreflect.Message {
mi := &file_api_v2_idp_service_proto_msgTypes[6]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
@@ -415,32 +496,29 @@ func (x *CreateIdentityProviderResponse) ProtoReflect() protoreflect.Message {
return mi.MessageOf(x)
}
-// Deprecated: Use CreateIdentityProviderResponse.ProtoReflect.Descriptor instead.
-func (*CreateIdentityProviderResponse) Descriptor() ([]byte, []int) {
+// Deprecated: Use GetIdentityProviderRequest.ProtoReflect.Descriptor instead.
+func (*GetIdentityProviderRequest) Descriptor() ([]byte, []int) {
return file_api_v2_idp_service_proto_rawDescGZIP(), []int{6}
}
-func (x *CreateIdentityProviderResponse) GetIdentityProvider() *IdentityProvider {
+func (x *GetIdentityProviderRequest) GetName() string {
if x != nil {
- return x.IdentityProvider
+ return x.Name
}
- return nil
+ return ""
}
-type UpdateIdentityProviderRequest struct {
+type GetIdentityProviderResponse struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
- // The identityProvider to update.
+ // The identityProvider.
IdentityProvider *IdentityProvider `protobuf:"bytes,1,opt,name=identity_provider,json=identityProvider,proto3" json:"identity_provider,omitempty"`
- // The update mask applies to the resource. Only the top level fields of
- // IdentityProvider are supported.
- UpdateMask *fieldmaskpb.FieldMask `protobuf:"bytes,2,opt,name=update_mask,json=updateMask,proto3" json:"update_mask,omitempty"`
}
-func (x *UpdateIdentityProviderRequest) Reset() {
- *x = UpdateIdentityProviderRequest{}
+func (x *GetIdentityProviderResponse) Reset() {
+ *x = GetIdentityProviderResponse{}
if protoimpl.UnsafeEnabled {
mi := &file_api_v2_idp_service_proto_msgTypes[7]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
@@ -448,13 +526,13 @@ func (x *UpdateIdentityProviderRequest) Reset() {
}
}
-func (x *UpdateIdentityProviderRequest) String() string {
+func (x *GetIdentityProviderResponse) String() string {
return protoimpl.X.MessageStringOf(x)
}
-func (*UpdateIdentityProviderRequest) ProtoMessage() {}
+func (*GetIdentityProviderResponse) ProtoMessage() {}
-func (x *UpdateIdentityProviderRequest) ProtoReflect() protoreflect.Message {
+func (x *GetIdentityProviderResponse) ProtoReflect() protoreflect.Message {
mi := &file_api_v2_idp_service_proto_msgTypes[7]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
@@ -466,36 +544,29 @@ func (x *UpdateIdentityProviderRequest) ProtoReflect() protoreflect.Message {
return mi.MessageOf(x)
}
-// Deprecated: Use UpdateIdentityProviderRequest.ProtoReflect.Descriptor instead.
-func (*UpdateIdentityProviderRequest) Descriptor() ([]byte, []int) {
+// Deprecated: Use GetIdentityProviderResponse.ProtoReflect.Descriptor instead.
+func (*GetIdentityProviderResponse) Descriptor() ([]byte, []int) {
return file_api_v2_idp_service_proto_rawDescGZIP(), []int{7}
}
-func (x *UpdateIdentityProviderRequest) GetIdentityProvider() *IdentityProvider {
+func (x *GetIdentityProviderResponse) GetIdentityProvider() *IdentityProvider {
if x != nil {
return x.IdentityProvider
}
return nil
}
-func (x *UpdateIdentityProviderRequest) GetUpdateMask() *fieldmaskpb.FieldMask {
- if x != nil {
- return x.UpdateMask
- }
- return nil
-}
-
-type UpdateIdentityProviderResponse struct {
+type CreateIdentityProviderRequest struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
- // The updated identityProvider.
+ // The identityProvider to create.
IdentityProvider *IdentityProvider `protobuf:"bytes,1,opt,name=identity_provider,json=identityProvider,proto3" json:"identity_provider,omitempty"`
}
-func (x *UpdateIdentityProviderResponse) Reset() {
- *x = UpdateIdentityProviderResponse{}
+func (x *CreateIdentityProviderRequest) Reset() {
+ *x = CreateIdentityProviderRequest{}
if protoimpl.UnsafeEnabled {
mi := &file_api_v2_idp_service_proto_msgTypes[8]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
@@ -503,13 +574,13 @@ func (x *UpdateIdentityProviderResponse) Reset() {
}
}
-func (x *UpdateIdentityProviderResponse) String() string {
+func (x *CreateIdentityProviderRequest) String() string {
return protoimpl.X.MessageStringOf(x)
}
-func (*UpdateIdentityProviderResponse) ProtoMessage() {}
+func (*CreateIdentityProviderRequest) ProtoMessage() {}
-func (x *UpdateIdentityProviderResponse) ProtoReflect() protoreflect.Message {
+func (x *CreateIdentityProviderRequest) ProtoReflect() protoreflect.Message {
mi := &file_api_v2_idp_service_proto_msgTypes[8]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
@@ -521,30 +592,29 @@ func (x *UpdateIdentityProviderResponse) ProtoReflect() protoreflect.Message {
return mi.MessageOf(x)
}
-// Deprecated: Use UpdateIdentityProviderResponse.ProtoReflect.Descriptor instead.
-func (*UpdateIdentityProviderResponse) Descriptor() ([]byte, []int) {
+// Deprecated: Use CreateIdentityProviderRequest.ProtoReflect.Descriptor instead.
+func (*CreateIdentityProviderRequest) Descriptor() ([]byte, []int) {
return file_api_v2_idp_service_proto_rawDescGZIP(), []int{8}
}
-func (x *UpdateIdentityProviderResponse) GetIdentityProvider() *IdentityProvider {
+func (x *CreateIdentityProviderRequest) GetIdentityProvider() *IdentityProvider {
if x != nil {
return x.IdentityProvider
}
return nil
}
-type DeleteIdentityProviderRequest struct {
+type CreateIdentityProviderResponse struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
- // The name of the identityProvider to delete.
- // Format: identityProviders/{id}
- Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
+ // The created identityProvider.
+ IdentityProvider *IdentityProvider `protobuf:"bytes,1,opt,name=identity_provider,json=identityProvider,proto3" json:"identity_provider,omitempty"`
}
-func (x *DeleteIdentityProviderRequest) Reset() {
- *x = DeleteIdentityProviderRequest{}
+func (x *CreateIdentityProviderResponse) Reset() {
+ *x = CreateIdentityProviderResponse{}
if protoimpl.UnsafeEnabled {
mi := &file_api_v2_idp_service_proto_msgTypes[9]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
@@ -552,13 +622,13 @@ func (x *DeleteIdentityProviderRequest) Reset() {
}
}
-func (x *DeleteIdentityProviderRequest) String() string {
+func (x *CreateIdentityProviderResponse) String() string {
return protoimpl.X.MessageStringOf(x)
}
-func (*DeleteIdentityProviderRequest) ProtoMessage() {}
+func (*CreateIdentityProviderResponse) ProtoMessage() {}
-func (x *DeleteIdentityProviderRequest) ProtoReflect() protoreflect.Message {
+func (x *CreateIdentityProviderResponse) ProtoReflect() protoreflect.Message {
mi := &file_api_v2_idp_service_proto_msgTypes[9]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
@@ -570,26 +640,32 @@ func (x *DeleteIdentityProviderRequest) ProtoReflect() protoreflect.Message {
return mi.MessageOf(x)
}
-// Deprecated: Use DeleteIdentityProviderRequest.ProtoReflect.Descriptor instead.
-func (*DeleteIdentityProviderRequest) Descriptor() ([]byte, []int) {
+// Deprecated: Use CreateIdentityProviderResponse.ProtoReflect.Descriptor instead.
+func (*CreateIdentityProviderResponse) Descriptor() ([]byte, []int) {
return file_api_v2_idp_service_proto_rawDescGZIP(), []int{9}
}
-func (x *DeleteIdentityProviderRequest) GetName() string {
+func (x *CreateIdentityProviderResponse) GetIdentityProvider() *IdentityProvider {
if x != nil {
- return x.Name
+ return x.IdentityProvider
}
- return ""
+ return nil
}
-type DeleteIdentityProviderResponse struct {
+type UpdateIdentityProviderRequest struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
+
+ // The identityProvider to update.
+ IdentityProvider *IdentityProvider `protobuf:"bytes,1,opt,name=identity_provider,json=identityProvider,proto3" json:"identity_provider,omitempty"`
+ // The update mask applies to the resource. Only the top level fields of
+ // IdentityProvider are supported.
+ UpdateMask *fieldmaskpb.FieldMask `protobuf:"bytes,2,opt,name=update_mask,json=updateMask,proto3" json:"update_mask,omitempty"`
}
-func (x *DeleteIdentityProviderResponse) Reset() {
- *x = DeleteIdentityProviderResponse{}
+func (x *UpdateIdentityProviderRequest) Reset() {
+ *x = UpdateIdentityProviderRequest{}
if protoimpl.UnsafeEnabled {
mi := &file_api_v2_idp_service_proto_msgTypes[10]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
@@ -597,13 +673,13 @@ func (x *DeleteIdentityProviderResponse) Reset() {
}
}
-func (x *DeleteIdentityProviderResponse) String() string {
+func (x *UpdateIdentityProviderRequest) String() string {
return protoimpl.X.MessageStringOf(x)
}
-func (*DeleteIdentityProviderResponse) ProtoMessage() {}
+func (*UpdateIdentityProviderRequest) ProtoMessage() {}
-func (x *DeleteIdentityProviderResponse) ProtoReflect() protoreflect.Message {
+func (x *UpdateIdentityProviderRequest) ProtoReflect() protoreflect.Message {
mi := &file_api_v2_idp_service_proto_msgTypes[10]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
@@ -615,24 +691,36 @@ func (x *DeleteIdentityProviderResponse) ProtoReflect() protoreflect.Message {
return mi.MessageOf(x)
}
-// Deprecated: Use DeleteIdentityProviderResponse.ProtoReflect.Descriptor instead.
-func (*DeleteIdentityProviderResponse) Descriptor() ([]byte, []int) {
+// Deprecated: Use UpdateIdentityProviderRequest.ProtoReflect.Descriptor instead.
+func (*UpdateIdentityProviderRequest) Descriptor() ([]byte, []int) {
return file_api_v2_idp_service_proto_rawDescGZIP(), []int{10}
}
-type IdentityProvider_Config struct {
+func (x *UpdateIdentityProviderRequest) GetIdentityProvider() *IdentityProvider {
+ if x != nil {
+ return x.IdentityProvider
+ }
+ return nil
+}
+
+func (x *UpdateIdentityProviderRequest) GetUpdateMask() *fieldmaskpb.FieldMask {
+ if x != nil {
+ return x.UpdateMask
+ }
+ return nil
+}
+
+type UpdateIdentityProviderResponse struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
- // Types that are assignable to Config:
- //
- // *IdentityProvider_Config_Oauth2
- Config isIdentityProvider_Config_Config `protobuf_oneof:"config"`
+ // The updated identityProvider.
+ IdentityProvider *IdentityProvider `protobuf:"bytes,1,opt,name=identity_provider,json=identityProvider,proto3" json:"identity_provider,omitempty"`
}
-func (x *IdentityProvider_Config) Reset() {
- *x = IdentityProvider_Config{}
+func (x *UpdateIdentityProviderResponse) Reset() {
+ *x = UpdateIdentityProviderResponse{}
if protoimpl.UnsafeEnabled {
mi := &file_api_v2_idp_service_proto_msgTypes[11]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
@@ -640,13 +728,13 @@ func (x *IdentityProvider_Config) Reset() {
}
}
-func (x *IdentityProvider_Config) String() string {
+func (x *UpdateIdentityProviderResponse) String() string {
return protoimpl.X.MessageStringOf(x)
}
-func (*IdentityProvider_Config) ProtoMessage() {}
+func (*UpdateIdentityProviderResponse) ProtoMessage() {}
-func (x *IdentityProvider_Config) ProtoReflect() protoreflect.Message {
+func (x *UpdateIdentityProviderResponse) ProtoReflect() protoreflect.Message {
mi := &file_api_v2_idp_service_proto_msgTypes[11]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
@@ -658,47 +746,30 @@ func (x *IdentityProvider_Config) ProtoReflect() protoreflect.Message {
return mi.MessageOf(x)
}
-// Deprecated: Use IdentityProvider_Config.ProtoReflect.Descriptor instead.
-func (*IdentityProvider_Config) Descriptor() ([]byte, []int) {
- return file_api_v2_idp_service_proto_rawDescGZIP(), []int{0, 0}
-}
-
-func (m *IdentityProvider_Config) GetConfig() isIdentityProvider_Config_Config {
- if m != nil {
- return m.Config
- }
- return nil
+// Deprecated: Use UpdateIdentityProviderResponse.ProtoReflect.Descriptor instead.
+func (*UpdateIdentityProviderResponse) Descriptor() ([]byte, []int) {
+ return file_api_v2_idp_service_proto_rawDescGZIP(), []int{11}
}
-func (x *IdentityProvider_Config) GetOauth2() *IdentityProvider_Config_OAuth2 {
- if x, ok := x.GetConfig().(*IdentityProvider_Config_Oauth2); ok {
- return x.Oauth2
+func (x *UpdateIdentityProviderResponse) GetIdentityProvider() *IdentityProvider {
+ if x != nil {
+ return x.IdentityProvider
}
return nil
}
-type isIdentityProvider_Config_Config interface {
- isIdentityProvider_Config_Config()
-}
-
-type IdentityProvider_Config_Oauth2 struct {
- Oauth2 *IdentityProvider_Config_OAuth2 `protobuf:"bytes,1,opt,name=oauth2,proto3,oneof"`
-}
-
-func (*IdentityProvider_Config_Oauth2) isIdentityProvider_Config_Config() {}
-
-type IdentityProvider_Config_FieldMapping struct {
+type DeleteIdentityProviderRequest struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
- Identifier string `protobuf:"bytes,1,opt,name=identifier,proto3" json:"identifier,omitempty"`
- DisplayName string `protobuf:"bytes,2,opt,name=display_name,json=displayName,proto3" json:"display_name,omitempty"`
- Email string `protobuf:"bytes,3,opt,name=email,proto3" json:"email,omitempty"`
+ // The name of the identityProvider to delete.
+ // Format: identityProviders/{id}
+ Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
}
-func (x *IdentityProvider_Config_FieldMapping) Reset() {
- *x = IdentityProvider_Config_FieldMapping{}
+func (x *DeleteIdentityProviderRequest) Reset() {
+ *x = DeleteIdentityProviderRequest{}
if protoimpl.UnsafeEnabled {
mi := &file_api_v2_idp_service_proto_msgTypes[12]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
@@ -706,13 +777,13 @@ func (x *IdentityProvider_Config_FieldMapping) Reset() {
}
}
-func (x *IdentityProvider_Config_FieldMapping) String() string {
+func (x *DeleteIdentityProviderRequest) String() string {
return protoimpl.X.MessageStringOf(x)
}
-func (*IdentityProvider_Config_FieldMapping) ProtoMessage() {}
+func (*DeleteIdentityProviderRequest) ProtoMessage() {}
-func (x *IdentityProvider_Config_FieldMapping) ProtoReflect() protoreflect.Message {
+func (x *DeleteIdentityProviderRequest) ProtoReflect() protoreflect.Message {
mi := &file_api_v2_idp_service_proto_msgTypes[12]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
@@ -724,48 +795,26 @@ func (x *IdentityProvider_Config_FieldMapping) ProtoReflect() protoreflect.Messa
return mi.MessageOf(x)
}
-// Deprecated: Use IdentityProvider_Config_FieldMapping.ProtoReflect.Descriptor instead.
-func (*IdentityProvider_Config_FieldMapping) Descriptor() ([]byte, []int) {
- return file_api_v2_idp_service_proto_rawDescGZIP(), []int{0, 0, 0}
-}
-
-func (x *IdentityProvider_Config_FieldMapping) GetIdentifier() string {
- if x != nil {
- return x.Identifier
- }
- return ""
-}
-
-func (x *IdentityProvider_Config_FieldMapping) GetDisplayName() string {
- if x != nil {
- return x.DisplayName
- }
- return ""
+// Deprecated: Use DeleteIdentityProviderRequest.ProtoReflect.Descriptor instead.
+func (*DeleteIdentityProviderRequest) Descriptor() ([]byte, []int) {
+ return file_api_v2_idp_service_proto_rawDescGZIP(), []int{12}
}
-func (x *IdentityProvider_Config_FieldMapping) GetEmail() string {
+func (x *DeleteIdentityProviderRequest) GetName() string {
if x != nil {
- return x.Email
+ return x.Name
}
return ""
}
-type IdentityProvider_Config_OAuth2 struct {
+type DeleteIdentityProviderResponse struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
-
- ClientId string `protobuf:"bytes,1,opt,name=client_id,json=clientId,proto3" json:"client_id,omitempty"`
- ClientSecret string `protobuf:"bytes,2,opt,name=client_secret,json=clientSecret,proto3" json:"client_secret,omitempty"`
- AuthUrl string `protobuf:"bytes,3,opt,name=auth_url,json=authUrl,proto3" json:"auth_url,omitempty"`
- TokenUrl string `protobuf:"bytes,4,opt,name=token_url,json=tokenUrl,proto3" json:"token_url,omitempty"`
- UserInfoUrl string `protobuf:"bytes,5,opt,name=user_info_url,json=userInfoUrl,proto3" json:"user_info_url,omitempty"`
- Scopes []string `protobuf:"bytes,6,rep,name=scopes,proto3" json:"scopes,omitempty"`
- FieldMapping *IdentityProvider_Config_FieldMapping `protobuf:"bytes,7,opt,name=field_mapping,json=fieldMapping,proto3" json:"field_mapping,omitempty"`
}
-func (x *IdentityProvider_Config_OAuth2) Reset() {
- *x = IdentityProvider_Config_OAuth2{}
+func (x *DeleteIdentityProviderResponse) Reset() {
+ *x = DeleteIdentityProviderResponse{}
if protoimpl.UnsafeEnabled {
mi := &file_api_v2_idp_service_proto_msgTypes[13]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
@@ -773,13 +822,13 @@ func (x *IdentityProvider_Config_OAuth2) Reset() {
}
}
-func (x *IdentityProvider_Config_OAuth2) String() string {
+func (x *DeleteIdentityProviderResponse) String() string {
return protoimpl.X.MessageStringOf(x)
}
-func (*IdentityProvider_Config_OAuth2) ProtoMessage() {}
+func (*DeleteIdentityProviderResponse) ProtoMessage() {}
-func (x *IdentityProvider_Config_OAuth2) ProtoReflect() protoreflect.Message {
+func (x *DeleteIdentityProviderResponse) ProtoReflect() protoreflect.Message {
mi := &file_api_v2_idp_service_proto_msgTypes[13]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
@@ -791,58 +840,9 @@ func (x *IdentityProvider_Config_OAuth2) ProtoReflect() protoreflect.Message {
return mi.MessageOf(x)
}
-// Deprecated: Use IdentityProvider_Config_OAuth2.ProtoReflect.Descriptor instead.
-func (*IdentityProvider_Config_OAuth2) Descriptor() ([]byte, []int) {
- return file_api_v2_idp_service_proto_rawDescGZIP(), []int{0, 0, 1}
-}
-
-func (x *IdentityProvider_Config_OAuth2) GetClientId() string {
- if x != nil {
- return x.ClientId
- }
- return ""
-}
-
-func (x *IdentityProvider_Config_OAuth2) GetClientSecret() string {
- if x != nil {
- return x.ClientSecret
- }
- return ""
-}
-
-func (x *IdentityProvider_Config_OAuth2) GetAuthUrl() string {
- if x != nil {
- return x.AuthUrl
- }
- return ""
-}
-
-func (x *IdentityProvider_Config_OAuth2) GetTokenUrl() string {
- if x != nil {
- return x.TokenUrl
- }
- return ""
-}
-
-func (x *IdentityProvider_Config_OAuth2) GetUserInfoUrl() string {
- if x != nil {
- return x.UserInfoUrl
- }
- return ""
-}
-
-func (x *IdentityProvider_Config_OAuth2) GetScopes() []string {
- if x != nil {
- return x.Scopes
- }
- return nil
-}
-
-func (x *IdentityProvider_Config_OAuth2) GetFieldMapping() *IdentityProvider_Config_FieldMapping {
- if x != nil {
- return x.FieldMapping
- }
- return nil
+// Deprecated: Use DeleteIdentityProviderResponse.ProtoReflect.Descriptor instead.
+func (*DeleteIdentityProviderResponse) Descriptor() ([]byte, []int) {
+ return file_api_v2_idp_service_proto_rawDescGZIP(), []int{13}
}
var File_api_v2_idp_service_proto protoreflect.FileDescriptor
@@ -856,7 +856,7 @@ var file_api_v2_idp_service_proto_rawDesc = []byte{
0x70, 0x69, 0x2f, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a,
0x20, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66,
0x2f, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x5f, 0x6d, 0x61, 0x73, 0x6b, 0x2e, 0x70, 0x72, 0x6f, 0x74,
- 0x6f, 0x22, 0xeb, 0x05, 0x0a, 0x10, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x50, 0x72,
+ 0x6f, 0x22, 0x8a, 0x02, 0x0a, 0x10, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x50, 0x72,
0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01,
0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x37, 0x0a, 0x04, 0x74, 0x79,
0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x23, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73,
@@ -866,166 +866,165 @@ var file_api_v2_idp_service_proto_rawDesc = []byte{
0x28, 0x09, 0x52, 0x05, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x12, 0x2b, 0x0a, 0x11, 0x69, 0x64, 0x65,
0x6e, 0x74, 0x69, 0x66, 0x69, 0x65, 0x72, 0x5f, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x18, 0x04,
0x20, 0x01, 0x28, 0x09, 0x52, 0x10, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x66, 0x69, 0x65, 0x72,
- 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x12, 0x3d, 0x0a, 0x06, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67,
- 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61,
+ 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x12, 0x3c, 0x0a, 0x06, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67,
+ 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61,
0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x50, 0x72,
- 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x2e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x06, 0x63,
- 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x1a, 0xdd, 0x03, 0x0a, 0x06, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67,
- 0x12, 0x46, 0x0a, 0x06, 0x6f, 0x61, 0x75, 0x74, 0x68, 0x32, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b,
- 0x32, 0x2c, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e,
- 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72,
- 0x2e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x4f, 0x41, 0x75, 0x74, 0x68, 0x32, 0x48, 0x00,
- 0x52, 0x06, 0x6f, 0x61, 0x75, 0x74, 0x68, 0x32, 0x1a, 0x67, 0x0a, 0x0c, 0x46, 0x69, 0x65, 0x6c,
+ 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x06, 0x63, 0x6f,
+ 0x6e, 0x66, 0x69, 0x67, 0x22, 0x28, 0x0a, 0x04, 0x54, 0x79, 0x70, 0x65, 0x12, 0x14, 0x0a, 0x10,
+ 0x54, 0x59, 0x50, 0x45, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44,
+ 0x10, 0x00, 0x12, 0x0a, 0x0a, 0x06, 0x4f, 0x41, 0x55, 0x54, 0x48, 0x32, 0x10, 0x01, 0x22, 0x58,
+ 0x0a, 0x16, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64,
+ 0x65, 0x72, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x34, 0x0a, 0x06, 0x6f, 0x61, 0x75, 0x74,
+ 0x68, 0x32, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73,
+ 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x4f, 0x41, 0x75, 0x74, 0x68, 0x32, 0x43, 0x6f,
+ 0x6e, 0x66, 0x69, 0x67, 0x48, 0x00, 0x52, 0x06, 0x6f, 0x61, 0x75, 0x74, 0x68, 0x32, 0x42, 0x08,
+ 0x0a, 0x06, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x22, 0x67, 0x0a, 0x0c, 0x46, 0x69, 0x65, 0x6c,
0x64, 0x4d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x12, 0x1e, 0x0a, 0x0a, 0x69, 0x64, 0x65, 0x6e,
0x74, 0x69, 0x66, 0x69, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x69, 0x64,
0x65, 0x6e, 0x74, 0x69, 0x66, 0x69, 0x65, 0x72, 0x12, 0x21, 0x0a, 0x0c, 0x64, 0x69, 0x73, 0x70,
0x6c, 0x61, 0x79, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b,
0x64, 0x69, 0x73, 0x70, 0x6c, 0x61, 0x79, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x65,
0x6d, 0x61, 0x69, 0x6c, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x65, 0x6d, 0x61, 0x69,
- 0x6c, 0x1a, 0x97, 0x02, 0x0a, 0x06, 0x4f, 0x41, 0x75, 0x74, 0x68, 0x32, 0x12, 0x1b, 0x0a, 0x09,
- 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52,
- 0x08, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x49, 0x64, 0x12, 0x23, 0x0a, 0x0d, 0x63, 0x6c, 0x69,
- 0x65, 0x6e, 0x74, 0x5f, 0x73, 0x65, 0x63, 0x72, 0x65, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09,
- 0x52, 0x0c, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x12, 0x19,
- 0x0a, 0x08, 0x61, 0x75, 0x74, 0x68, 0x5f, 0x75, 0x72, 0x6c, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09,
- 0x52, 0x07, 0x61, 0x75, 0x74, 0x68, 0x55, 0x72, 0x6c, 0x12, 0x1b, 0x0a, 0x09, 0x74, 0x6f, 0x6b,
- 0x65, 0x6e, 0x5f, 0x75, 0x72, 0x6c, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x74, 0x6f,
- 0x6b, 0x65, 0x6e, 0x55, 0x72, 0x6c, 0x12, 0x22, 0x0a, 0x0d, 0x75, 0x73, 0x65, 0x72, 0x5f, 0x69,
- 0x6e, 0x66, 0x6f, 0x5f, 0x75, 0x72, 0x6c, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x75,
- 0x73, 0x65, 0x72, 0x49, 0x6e, 0x66, 0x6f, 0x55, 0x72, 0x6c, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x63,
- 0x6f, 0x70, 0x65, 0x73, 0x18, 0x06, 0x20, 0x03, 0x28, 0x09, 0x52, 0x06, 0x73, 0x63, 0x6f, 0x70,
- 0x65, 0x73, 0x12, 0x57, 0x0a, 0x0d, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x5f, 0x6d, 0x61, 0x70, 0x70,
- 0x69, 0x6e, 0x67, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x32, 0x2e, 0x6d, 0x65, 0x6d, 0x6f,
- 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74,
- 0x79, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x2e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67,
- 0x2e, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x52, 0x0c, 0x66,
- 0x69, 0x65, 0x6c, 0x64, 0x4d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x42, 0x08, 0x0a, 0x06, 0x63,
- 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x22, 0x28, 0x0a, 0x04, 0x54, 0x79, 0x70, 0x65, 0x12, 0x14, 0x0a,
- 0x10, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45,
- 0x44, 0x10, 0x00, 0x12, 0x0a, 0x0a, 0x06, 0x4f, 0x41, 0x55, 0x54, 0x48, 0x32, 0x10, 0x01, 0x22,
- 0x1e, 0x0a, 0x1c, 0x4c, 0x69, 0x73, 0x74, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x50,
- 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22,
- 0x6e, 0x0a, 0x1d, 0x4c, 0x69, 0x73, 0x74, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x50,
- 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65,
- 0x12, 0x4d, 0x0a, 0x12, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x5f, 0x70, 0x72, 0x6f,
- 0x76, 0x69, 0x64, 0x65, 0x72, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x6d,
- 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x49, 0x64, 0x65, 0x6e,
- 0x74, 0x69, 0x74, 0x79, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x52, 0x11, 0x69, 0x64,
- 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x73, 0x22,
- 0x30, 0x0a, 0x1a, 0x47, 0x65, 0x74, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x50, 0x72,
- 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x12, 0x0a,
- 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d,
- 0x65, 0x22, 0x6a, 0x0a, 0x1b, 0x47, 0x65, 0x74, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79,
- 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65,
- 0x12, 0x4b, 0x0a, 0x11, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x5f, 0x70, 0x72, 0x6f,
- 0x76, 0x69, 0x64, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x6d, 0x65,
- 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x49, 0x64, 0x65, 0x6e, 0x74,
- 0x69, 0x74, 0x79, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x52, 0x10, 0x69, 0x64, 0x65,
- 0x6e, 0x74, 0x69, 0x74, 0x79, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x22, 0x6c, 0x0a,
- 0x1d, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x50,
- 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x4b,
- 0x0a, 0x11, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x5f, 0x70, 0x72, 0x6f, 0x76, 0x69,
- 0x64, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x6d, 0x65, 0x6d, 0x6f,
- 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74,
- 0x79, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x52, 0x10, 0x69, 0x64, 0x65, 0x6e, 0x74,
- 0x69, 0x74, 0x79, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x22, 0x6d, 0x0a, 0x1e, 0x43,
- 0x72, 0x65, 0x61, 0x74, 0x65, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x50, 0x72, 0x6f,
- 0x76, 0x69, 0x64, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x4b, 0x0a,
- 0x11, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x5f, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64,
- 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73,
- 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79,
- 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x52, 0x10, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69,
- 0x74, 0x79, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x22, 0xa9, 0x01, 0x0a, 0x1d, 0x55,
- 0x70, 0x64, 0x61, 0x74, 0x65, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x50, 0x72, 0x6f,
- 0x76, 0x69, 0x64, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x4b, 0x0a, 0x11,
- 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x5f, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65,
- 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e,
- 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x50,
- 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x52, 0x10, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74,
- 0x79, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x12, 0x3b, 0x0a, 0x0b, 0x75, 0x70, 0x64,
- 0x61, 0x74, 0x65, 0x5f, 0x6d, 0x61, 0x73, 0x6b, 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, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4d, 0x61, 0x73, 0x6b, 0x52, 0x0a, 0x75, 0x70, 0x64, 0x61,
- 0x74, 0x65, 0x4d, 0x61, 0x73, 0x6b, 0x22, 0x6d, 0x0a, 0x1e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65,
+ 0x6c, 0x22, 0x85, 0x02, 0x0a, 0x0c, 0x4f, 0x41, 0x75, 0x74, 0x68, 0x32, 0x43, 0x6f, 0x6e, 0x66,
+ 0x69, 0x67, 0x12, 0x1b, 0x0a, 0x09, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x5f, 0x69, 0x64, 0x18,
+ 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x49, 0x64, 0x12,
+ 0x23, 0x0a, 0x0d, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x5f, 0x73, 0x65, 0x63, 0x72, 0x65, 0x74,
+ 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x53, 0x65,
+ 0x63, 0x72, 0x65, 0x74, 0x12, 0x19, 0x0a, 0x08, 0x61, 0x75, 0x74, 0x68, 0x5f, 0x75, 0x72, 0x6c,
+ 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x61, 0x75, 0x74, 0x68, 0x55, 0x72, 0x6c, 0x12,
+ 0x1b, 0x0a, 0x09, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x5f, 0x75, 0x72, 0x6c, 0x18, 0x04, 0x20, 0x01,
+ 0x28, 0x09, 0x52, 0x08, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x55, 0x72, 0x6c, 0x12, 0x22, 0x0a, 0x0d,
+ 0x75, 0x73, 0x65, 0x72, 0x5f, 0x69, 0x6e, 0x66, 0x6f, 0x5f, 0x75, 0x72, 0x6c, 0x18, 0x05, 0x20,
+ 0x01, 0x28, 0x09, 0x52, 0x0b, 0x75, 0x73, 0x65, 0x72, 0x49, 0x6e, 0x66, 0x6f, 0x55, 0x72, 0x6c,
+ 0x12, 0x16, 0x0a, 0x06, 0x73, 0x63, 0x6f, 0x70, 0x65, 0x73, 0x18, 0x06, 0x20, 0x03, 0x28, 0x09,
+ 0x52, 0x06, 0x73, 0x63, 0x6f, 0x70, 0x65, 0x73, 0x12, 0x3f, 0x0a, 0x0d, 0x66, 0x69, 0x65, 0x6c,
+ 0x64, 0x5f, 0x6d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32,
+ 0x1a, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x46,
+ 0x69, 0x65, 0x6c, 0x64, 0x4d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x52, 0x0c, 0x66, 0x69, 0x65,
+ 0x6c, 0x64, 0x4d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x22, 0x1e, 0x0a, 0x1c, 0x4c, 0x69, 0x73,
+ 0x74, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65,
+ 0x72, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x6e, 0x0a, 0x1d, 0x4c, 0x69, 0x73,
+ 0x74, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65,
+ 0x72, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x4d, 0x0a, 0x12, 0x69, 0x64,
+ 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x5f, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x73,
+ 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61,
+ 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x50, 0x72,
+ 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x52, 0x11, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79,
+ 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x73, 0x22, 0x30, 0x0a, 0x1a, 0x47, 0x65, 0x74,
0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72,
- 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x4b, 0x0a, 0x11, 0x69, 0x64, 0x65, 0x6e,
+ 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18,
+ 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0x6a, 0x0a, 0x1b, 0x47,
+ 0x65, 0x74, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64,
+ 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x4b, 0x0a, 0x11, 0x69, 0x64,
+ 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x5f, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x18,
+ 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70,
+ 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x50, 0x72, 0x6f,
+ 0x76, 0x69, 0x64, 0x65, 0x72, 0x52, 0x10, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x50,
+ 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x22, 0x6c, 0x0a, 0x1d, 0x43, 0x72, 0x65, 0x61, 0x74,
+ 0x65, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65,
+ 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x4b, 0x0a, 0x11, 0x69, 0x64, 0x65, 0x6e,
0x74, 0x69, 0x74, 0x79, 0x5f, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x18, 0x01, 0x20,
0x01, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e,
0x76, 0x32, 0x2e, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x50, 0x72, 0x6f, 0x76, 0x69,
0x64, 0x65, 0x72, 0x52, 0x10, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x50, 0x72, 0x6f,
- 0x76, 0x69, 0x64, 0x65, 0x72, 0x22, 0x33, 0x0a, 0x1d, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x49,
+ 0x76, 0x69, 0x64, 0x65, 0x72, 0x22, 0x6d, 0x0a, 0x1e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x49,
0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x52,
- 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01,
- 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0x20, 0x0a, 0x1e, 0x44, 0x65,
- 0x6c, 0x65, 0x74, 0x65, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x50, 0x72, 0x6f, 0x76,
- 0x69, 0x64, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x32, 0xf8, 0x06, 0x0a,
- 0x17, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65,
- 0x72, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x93, 0x01, 0x0a, 0x15, 0x4c, 0x69, 0x73,
- 0x74, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65,
- 0x72, 0x73, 0x12, 0x2a, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76,
- 0x32, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x50, 0x72,
- 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2b,
- 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x4c, 0x69,
- 0x73, 0x74, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64,
- 0x65, 0x72, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x21, 0x82, 0xd3, 0xe4,
- 0x93, 0x02, 0x1b, 0x12, 0x19, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x32, 0x2f, 0x69, 0x64, 0x65,
- 0x6e, 0x74, 0x69, 0x74, 0x79, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x73, 0x12, 0x9d,
- 0x01, 0x0a, 0x13, 0x47, 0x65, 0x74, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x50, 0x72,
- 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x12, 0x28, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61,
- 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x47, 0x65, 0x74, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74,
+ 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x4b, 0x0a, 0x11, 0x69, 0x64, 0x65, 0x6e, 0x74,
+ 0x69, 0x74, 0x79, 0x5f, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01,
+ 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76,
+ 0x32, 0x2e, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64,
+ 0x65, 0x72, 0x52, 0x10, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x50, 0x72, 0x6f, 0x76,
+ 0x69, 0x64, 0x65, 0x72, 0x22, 0xa9, 0x01, 0x0a, 0x1d, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x49,
+ 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x52,
+ 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x4b, 0x0a, 0x11, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69,
+ 0x74, 0x79, 0x5f, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28,
+ 0x0b, 0x32, 0x1e, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32,
+ 0x2e, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65,
+ 0x72, 0x52, 0x10, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x50, 0x72, 0x6f, 0x76, 0x69,
+ 0x64, 0x65, 0x72, 0x12, 0x3b, 0x0a, 0x0b, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x5f, 0x6d, 0x61,
+ 0x73, 0x6b, 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, 0x46, 0x69, 0x65, 0x6c, 0x64,
+ 0x4d, 0x61, 0x73, 0x6b, 0x52, 0x0a, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x4d, 0x61, 0x73, 0x6b,
+ 0x22, 0x6d, 0x0a, 0x1e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69,
+ 0x74, 0x79, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e,
+ 0x73, 0x65, 0x12, 0x4b, 0x0a, 0x11, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x5f, 0x70,
+ 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1e, 0x2e,
+ 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x49, 0x64, 0x65,
+ 0x6e, 0x74, 0x69, 0x74, 0x79, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x52, 0x10, 0x69,
+ 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x22,
+ 0x33, 0x0a, 0x1d, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74,
0x79, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74,
- 0x1a, 0x29, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e,
+ 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04,
+ 0x6e, 0x61, 0x6d, 0x65, 0x22, 0x20, 0x0a, 0x1e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x49, 0x64,
+ 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x52, 0x65,
+ 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x32, 0xf8, 0x06, 0x0a, 0x17, 0x49, 0x64, 0x65, 0x6e, 0x74,
+ 0x69, 0x74, 0x79, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x53, 0x65, 0x72, 0x76, 0x69,
+ 0x63, 0x65, 0x12, 0x93, 0x01, 0x0a, 0x15, 0x4c, 0x69, 0x73, 0x74, 0x49, 0x64, 0x65, 0x6e, 0x74,
+ 0x69, 0x74, 0x79, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x73, 0x12, 0x2a, 0x2e, 0x6d,
+ 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x4c, 0x69, 0x73, 0x74,
+ 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72,
+ 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2b, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73,
+ 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x49, 0x64, 0x65, 0x6e,
+ 0x74, 0x69, 0x74, 0x79, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x73, 0x52, 0x65, 0x73,
+ 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x21, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1b, 0x12, 0x19, 0x2f,
+ 0x61, 0x70, 0x69, 0x2f, 0x76, 0x32, 0x2f, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x50,
+ 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x73, 0x12, 0x9d, 0x01, 0x0a, 0x13, 0x47, 0x65, 0x74,
+ 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72,
+ 0x12, 0x28, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e,
0x47, 0x65, 0x74, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x50, 0x72, 0x6f, 0x76, 0x69,
- 0x64, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x31, 0xda, 0x41, 0x04,
- 0x6e, 0x61, 0x6d, 0x65, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x24, 0x12, 0x22, 0x2f, 0x61, 0x70, 0x69,
- 0x2f, 0x76, 0x32, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69,
- 0x74, 0x79, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x73, 0x2f, 0x2a, 0x7d, 0x12, 0x96,
- 0x01, 0x0a, 0x16, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74,
- 0x79, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x12, 0x2b, 0x2e, 0x6d, 0x65, 0x6d, 0x6f,
- 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x49,
- 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x52,
- 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2c, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61,
- 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x49, 0x64, 0x65, 0x6e,
- 0x74, 0x69, 0x74, 0x79, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70,
- 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x21, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1b, 0x22, 0x19, 0x2f, 0x61,
- 0x70, 0x69, 0x2f, 0x76, 0x32, 0x2f, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x50, 0x72,
- 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x73, 0x12, 0xe4, 0x01, 0x0a, 0x16, 0x55, 0x70, 0x64, 0x61,
+ 0x64, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x29, 0x2e, 0x6d, 0x65, 0x6d,
+ 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x47, 0x65, 0x74, 0x49, 0x64, 0x65,
+ 0x6e, 0x74, 0x69, 0x74, 0x79, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x52, 0x65, 0x73,
+ 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x31, 0xda, 0x41, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x82, 0xd3,
+ 0xe4, 0x93, 0x02, 0x24, 0x12, 0x22, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x32, 0x2f, 0x7b, 0x6e,
+ 0x61, 0x6d, 0x65, 0x3d, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x50, 0x72, 0x6f, 0x76,
+ 0x69, 0x64, 0x65, 0x72, 0x73, 0x2f, 0x2a, 0x7d, 0x12, 0x96, 0x01, 0x0a, 0x16, 0x43, 0x72, 0x65,
+ 0x61, 0x74, 0x65, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x50, 0x72, 0x6f, 0x76, 0x69,
+ 0x64, 0x65, 0x72, 0x12, 0x2b, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e,
+ 0x76, 0x32, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74,
+ 0x79, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74,
+ 0x1a, 0x2c, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e,
+ 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x50, 0x72,
+ 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x21,
+ 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1b, 0x22, 0x19, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x32, 0x2f,
+ 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72,
+ 0x73, 0x12, 0xe4, 0x01, 0x0a, 0x16, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x49, 0x64, 0x65, 0x6e,
+ 0x74, 0x69, 0x74, 0x79, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x12, 0x2b, 0x2e, 0x6d,
+ 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x55, 0x70, 0x64, 0x61,
0x74, 0x65, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64,
- 0x65, 0x72, 0x12, 0x2b, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76,
- 0x32, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79,
- 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a,
- 0x2c, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x55,
- 0x70, 0x64, 0x61, 0x74, 0x65, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x50, 0x72, 0x6f,
- 0x76, 0x69, 0x64, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x6f, 0xda,
- 0x41, 0x1d, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x5f, 0x70, 0x72, 0x6f, 0x76, 0x69,
- 0x64, 0x65, 0x72, 0x2c, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x5f, 0x6d, 0x61, 0x73, 0x6b, 0x82,
- 0xd3, 0xe4, 0x93, 0x02, 0x49, 0x3a, 0x11, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x5f,
- 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x32, 0x34, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76,
- 0x32, 0x2f, 0x7b, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x5f, 0x70, 0x72, 0x6f, 0x76,
- 0x69, 0x64, 0x65, 0x72, 0x2e, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69,
- 0x74, 0x79, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x73, 0x2f, 0x2a, 0x7d, 0x12, 0xa6,
- 0x01, 0x0a, 0x16, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74,
- 0x79, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x12, 0x2b, 0x2e, 0x6d, 0x65, 0x6d, 0x6f,
- 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x49,
+ 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2c, 0x2e, 0x6d, 0x65, 0x6d, 0x6f,
+ 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x49,
0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x52,
- 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2c, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61,
- 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x49, 0x64, 0x65, 0x6e,
- 0x74, 0x69, 0x74, 0x79, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70,
- 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x31, 0xda, 0x41, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x82, 0xd3, 0xe4,
- 0x93, 0x02, 0x24, 0x2a, 0x22, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x32, 0x2f, 0x7b, 0x6e, 0x61,
- 0x6d, 0x65, 0x3d, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x50, 0x72, 0x6f, 0x76, 0x69,
- 0x64, 0x65, 0x72, 0x73, 0x2f, 0x2a, 0x7d, 0x42, 0xa7, 0x01, 0x0a, 0x10, 0x63, 0x6f, 0x6d, 0x2e,
- 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x42, 0x0f, 0x49, 0x64,
- 0x70, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a,
- 0x30, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x75, 0x73, 0x65, 0x6d,
- 0x65, 0x6d, 0x6f, 0x73, 0x2f, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f,
- 0x2f, 0x67, 0x65, 0x6e, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x32, 0x3b, 0x61, 0x70, 0x69, 0x76,
- 0x32, 0xa2, 0x02, 0x03, 0x4d, 0x41, 0x58, 0xaa, 0x02, 0x0c, 0x4d, 0x65, 0x6d, 0x6f, 0x73, 0x2e,
- 0x41, 0x70, 0x69, 0x2e, 0x56, 0x32, 0xca, 0x02, 0x0c, 0x4d, 0x65, 0x6d, 0x6f, 0x73, 0x5c, 0x41,
- 0x70, 0x69, 0x5c, 0x56, 0x32, 0xe2, 0x02, 0x18, 0x4d, 0x65, 0x6d, 0x6f, 0x73, 0x5c, 0x41, 0x70,
- 0x69, 0x5c, 0x56, 0x32, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61,
- 0xea, 0x02, 0x0e, 0x4d, 0x65, 0x6d, 0x6f, 0x73, 0x3a, 0x3a, 0x41, 0x70, 0x69, 0x3a, 0x3a, 0x56,
- 0x32, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
+ 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x6f, 0xda, 0x41, 0x1d, 0x69, 0x64, 0x65, 0x6e,
+ 0x74, 0x69, 0x74, 0x79, 0x5f, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x2c, 0x75, 0x70,
+ 0x64, 0x61, 0x74, 0x65, 0x5f, 0x6d, 0x61, 0x73, 0x6b, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x49, 0x3a,
+ 0x11, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x5f, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64,
+ 0x65, 0x72, 0x32, 0x34, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x32, 0x2f, 0x7b, 0x69, 0x64, 0x65,
+ 0x6e, 0x74, 0x69, 0x74, 0x79, 0x5f, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x2e, 0x6e,
+ 0x61, 0x6d, 0x65, 0x3d, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x50, 0x72, 0x6f, 0x76,
+ 0x69, 0x64, 0x65, 0x72, 0x73, 0x2f, 0x2a, 0x7d, 0x12, 0xa6, 0x01, 0x0a, 0x16, 0x44, 0x65, 0x6c,
+ 0x65, 0x74, 0x65, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x50, 0x72, 0x6f, 0x76, 0x69,
+ 0x64, 0x65, 0x72, 0x12, 0x2b, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e,
+ 0x76, 0x32, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74,
+ 0x79, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74,
+ 0x1a, 0x2c, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e,
+ 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x50, 0x72,
+ 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x31,
+ 0xda, 0x41, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x24, 0x2a, 0x22, 0x2f,
+ 0x61, 0x70, 0x69, 0x2f, 0x76, 0x32, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x69, 0x64, 0x65,
+ 0x6e, 0x74, 0x69, 0x74, 0x79, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x73, 0x2f, 0x2a,
+ 0x7d, 0x42, 0xa7, 0x01, 0x0a, 0x10, 0x63, 0x6f, 0x6d, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e,
+ 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x42, 0x0f, 0x49, 0x64, 0x70, 0x53, 0x65, 0x72, 0x76, 0x69,
+ 0x63, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x30, 0x67, 0x69, 0x74, 0x68, 0x75,
+ 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x75, 0x73, 0x65, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2f, 0x6d,
+ 0x65, 0x6d, 0x6f, 0x73, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x65, 0x6e, 0x2f, 0x61,
+ 0x70, 0x69, 0x2f, 0x76, 0x32, 0x3b, 0x61, 0x70, 0x69, 0x76, 0x32, 0xa2, 0x02, 0x03, 0x4d, 0x41,
+ 0x58, 0xaa, 0x02, 0x0c, 0x4d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x41, 0x70, 0x69, 0x2e, 0x56, 0x32,
+ 0xca, 0x02, 0x0c, 0x4d, 0x65, 0x6d, 0x6f, 0x73, 0x5c, 0x41, 0x70, 0x69, 0x5c, 0x56, 0x32, 0xe2,
+ 0x02, 0x18, 0x4d, 0x65, 0x6d, 0x6f, 0x73, 0x5c, 0x41, 0x70, 0x69, 0x5c, 0x56, 0x32, 0x5c, 0x47,
+ 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x0e, 0x4d, 0x65, 0x6d,
+ 0x6f, 0x73, 0x3a, 0x3a, 0x41, 0x70, 0x69, 0x3a, 0x3a, 0x56, 0x32, 0x62, 0x06, 0x70, 0x72, 0x6f,
+ 0x74, 0x6f, 0x33,
}
var (
@@ -1043,45 +1042,45 @@ func file_api_v2_idp_service_proto_rawDescGZIP() []byte {
var file_api_v2_idp_service_proto_enumTypes = make([]protoimpl.EnumInfo, 1)
var file_api_v2_idp_service_proto_msgTypes = make([]protoimpl.MessageInfo, 14)
var file_api_v2_idp_service_proto_goTypes = []interface{}{
- (IdentityProvider_Type)(0), // 0: memos.api.v2.IdentityProvider.Type
- (*IdentityProvider)(nil), // 1: memos.api.v2.IdentityProvider
- (*ListIdentityProvidersRequest)(nil), // 2: memos.api.v2.ListIdentityProvidersRequest
- (*ListIdentityProvidersResponse)(nil), // 3: memos.api.v2.ListIdentityProvidersResponse
- (*GetIdentityProviderRequest)(nil), // 4: memos.api.v2.GetIdentityProviderRequest
- (*GetIdentityProviderResponse)(nil), // 5: memos.api.v2.GetIdentityProviderResponse
- (*CreateIdentityProviderRequest)(nil), // 6: memos.api.v2.CreateIdentityProviderRequest
- (*CreateIdentityProviderResponse)(nil), // 7: memos.api.v2.CreateIdentityProviderResponse
- (*UpdateIdentityProviderRequest)(nil), // 8: memos.api.v2.UpdateIdentityProviderRequest
- (*UpdateIdentityProviderResponse)(nil), // 9: memos.api.v2.UpdateIdentityProviderResponse
- (*DeleteIdentityProviderRequest)(nil), // 10: memos.api.v2.DeleteIdentityProviderRequest
- (*DeleteIdentityProviderResponse)(nil), // 11: memos.api.v2.DeleteIdentityProviderResponse
- (*IdentityProvider_Config)(nil), // 12: memos.api.v2.IdentityProvider.Config
- (*IdentityProvider_Config_FieldMapping)(nil), // 13: memos.api.v2.IdentityProvider.Config.FieldMapping
- (*IdentityProvider_Config_OAuth2)(nil), // 14: memos.api.v2.IdentityProvider.Config.OAuth2
- (*fieldmaskpb.FieldMask)(nil), // 15: google.protobuf.FieldMask
+ (IdentityProvider_Type)(0), // 0: memos.api.v2.IdentityProvider.Type
+ (*IdentityProvider)(nil), // 1: memos.api.v2.IdentityProvider
+ (*IdentityProviderConfig)(nil), // 2: memos.api.v2.IdentityProviderConfig
+ (*FieldMapping)(nil), // 3: memos.api.v2.FieldMapping
+ (*OAuth2Config)(nil), // 4: memos.api.v2.OAuth2Config
+ (*ListIdentityProvidersRequest)(nil), // 5: memos.api.v2.ListIdentityProvidersRequest
+ (*ListIdentityProvidersResponse)(nil), // 6: memos.api.v2.ListIdentityProvidersResponse
+ (*GetIdentityProviderRequest)(nil), // 7: memos.api.v2.GetIdentityProviderRequest
+ (*GetIdentityProviderResponse)(nil), // 8: memos.api.v2.GetIdentityProviderResponse
+ (*CreateIdentityProviderRequest)(nil), // 9: memos.api.v2.CreateIdentityProviderRequest
+ (*CreateIdentityProviderResponse)(nil), // 10: memos.api.v2.CreateIdentityProviderResponse
+ (*UpdateIdentityProviderRequest)(nil), // 11: memos.api.v2.UpdateIdentityProviderRequest
+ (*UpdateIdentityProviderResponse)(nil), // 12: memos.api.v2.UpdateIdentityProviderResponse
+ (*DeleteIdentityProviderRequest)(nil), // 13: memos.api.v2.DeleteIdentityProviderRequest
+ (*DeleteIdentityProviderResponse)(nil), // 14: memos.api.v2.DeleteIdentityProviderResponse
+ (*fieldmaskpb.FieldMask)(nil), // 15: google.protobuf.FieldMask
}
var file_api_v2_idp_service_proto_depIdxs = []int32{
0, // 0: memos.api.v2.IdentityProvider.type:type_name -> memos.api.v2.IdentityProvider.Type
- 12, // 1: memos.api.v2.IdentityProvider.config:type_name -> memos.api.v2.IdentityProvider.Config
- 1, // 2: memos.api.v2.ListIdentityProvidersResponse.identity_providers:type_name -> memos.api.v2.IdentityProvider
- 1, // 3: memos.api.v2.GetIdentityProviderResponse.identity_provider:type_name -> memos.api.v2.IdentityProvider
- 1, // 4: memos.api.v2.CreateIdentityProviderRequest.identity_provider:type_name -> memos.api.v2.IdentityProvider
- 1, // 5: memos.api.v2.CreateIdentityProviderResponse.identity_provider:type_name -> memos.api.v2.IdentityProvider
- 1, // 6: memos.api.v2.UpdateIdentityProviderRequest.identity_provider:type_name -> memos.api.v2.IdentityProvider
- 15, // 7: memos.api.v2.UpdateIdentityProviderRequest.update_mask:type_name -> google.protobuf.FieldMask
- 1, // 8: memos.api.v2.UpdateIdentityProviderResponse.identity_provider:type_name -> memos.api.v2.IdentityProvider
- 14, // 9: memos.api.v2.IdentityProvider.Config.oauth2:type_name -> memos.api.v2.IdentityProvider.Config.OAuth2
- 13, // 10: memos.api.v2.IdentityProvider.Config.OAuth2.field_mapping:type_name -> memos.api.v2.IdentityProvider.Config.FieldMapping
- 2, // 11: memos.api.v2.IdentityProviderService.ListIdentityProviders:input_type -> memos.api.v2.ListIdentityProvidersRequest
- 4, // 12: memos.api.v2.IdentityProviderService.GetIdentityProvider:input_type -> memos.api.v2.GetIdentityProviderRequest
- 6, // 13: memos.api.v2.IdentityProviderService.CreateIdentityProvider:input_type -> memos.api.v2.CreateIdentityProviderRequest
- 8, // 14: memos.api.v2.IdentityProviderService.UpdateIdentityProvider:input_type -> memos.api.v2.UpdateIdentityProviderRequest
- 10, // 15: memos.api.v2.IdentityProviderService.DeleteIdentityProvider:input_type -> memos.api.v2.DeleteIdentityProviderRequest
- 3, // 16: memos.api.v2.IdentityProviderService.ListIdentityProviders:output_type -> memos.api.v2.ListIdentityProvidersResponse
- 5, // 17: memos.api.v2.IdentityProviderService.GetIdentityProvider:output_type -> memos.api.v2.GetIdentityProviderResponse
- 7, // 18: memos.api.v2.IdentityProviderService.CreateIdentityProvider:output_type -> memos.api.v2.CreateIdentityProviderResponse
- 9, // 19: memos.api.v2.IdentityProviderService.UpdateIdentityProvider:output_type -> memos.api.v2.UpdateIdentityProviderResponse
- 11, // 20: memos.api.v2.IdentityProviderService.DeleteIdentityProvider:output_type -> memos.api.v2.DeleteIdentityProviderResponse
+ 2, // 1: memos.api.v2.IdentityProvider.config:type_name -> memos.api.v2.IdentityProviderConfig
+ 4, // 2: memos.api.v2.IdentityProviderConfig.oauth2:type_name -> memos.api.v2.OAuth2Config
+ 3, // 3: memos.api.v2.OAuth2Config.field_mapping:type_name -> memos.api.v2.FieldMapping
+ 1, // 4: memos.api.v2.ListIdentityProvidersResponse.identity_providers:type_name -> memos.api.v2.IdentityProvider
+ 1, // 5: memos.api.v2.GetIdentityProviderResponse.identity_provider:type_name -> memos.api.v2.IdentityProvider
+ 1, // 6: memos.api.v2.CreateIdentityProviderRequest.identity_provider:type_name -> memos.api.v2.IdentityProvider
+ 1, // 7: memos.api.v2.CreateIdentityProviderResponse.identity_provider:type_name -> memos.api.v2.IdentityProvider
+ 1, // 8: memos.api.v2.UpdateIdentityProviderRequest.identity_provider:type_name -> memos.api.v2.IdentityProvider
+ 15, // 9: memos.api.v2.UpdateIdentityProviderRequest.update_mask:type_name -> google.protobuf.FieldMask
+ 1, // 10: memos.api.v2.UpdateIdentityProviderResponse.identity_provider:type_name -> memos.api.v2.IdentityProvider
+ 5, // 11: memos.api.v2.IdentityProviderService.ListIdentityProviders:input_type -> memos.api.v2.ListIdentityProvidersRequest
+ 7, // 12: memos.api.v2.IdentityProviderService.GetIdentityProvider:input_type -> memos.api.v2.GetIdentityProviderRequest
+ 9, // 13: memos.api.v2.IdentityProviderService.CreateIdentityProvider:input_type -> memos.api.v2.CreateIdentityProviderRequest
+ 11, // 14: memos.api.v2.IdentityProviderService.UpdateIdentityProvider:input_type -> memos.api.v2.UpdateIdentityProviderRequest
+ 13, // 15: memos.api.v2.IdentityProviderService.DeleteIdentityProvider:input_type -> memos.api.v2.DeleteIdentityProviderRequest
+ 6, // 16: memos.api.v2.IdentityProviderService.ListIdentityProviders:output_type -> memos.api.v2.ListIdentityProvidersResponse
+ 8, // 17: memos.api.v2.IdentityProviderService.GetIdentityProvider:output_type -> memos.api.v2.GetIdentityProviderResponse
+ 10, // 18: memos.api.v2.IdentityProviderService.CreateIdentityProvider:output_type -> memos.api.v2.CreateIdentityProviderResponse
+ 12, // 19: memos.api.v2.IdentityProviderService.UpdateIdentityProvider:output_type -> memos.api.v2.UpdateIdentityProviderResponse
+ 14, // 20: memos.api.v2.IdentityProviderService.DeleteIdentityProvider:output_type -> memos.api.v2.DeleteIdentityProviderResponse
16, // [16:21] is the sub-list for method output_type
11, // [11:16] is the sub-list for method input_type
11, // [11:11] is the sub-list for extension type_name
@@ -1108,7 +1107,7 @@ func file_api_v2_idp_service_proto_init() {
}
}
file_api_v2_idp_service_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*ListIdentityProvidersRequest); i {
+ switch v := v.(*IdentityProviderConfig); i {
case 0:
return &v.state
case 1:
@@ -1120,7 +1119,7 @@ func file_api_v2_idp_service_proto_init() {
}
}
file_api_v2_idp_service_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*ListIdentityProvidersResponse); i {
+ switch v := v.(*FieldMapping); i {
case 0:
return &v.state
case 1:
@@ -1132,7 +1131,7 @@ func file_api_v2_idp_service_proto_init() {
}
}
file_api_v2_idp_service_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*GetIdentityProviderRequest); i {
+ switch v := v.(*OAuth2Config); i {
case 0:
return &v.state
case 1:
@@ -1144,7 +1143,7 @@ func file_api_v2_idp_service_proto_init() {
}
}
file_api_v2_idp_service_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*GetIdentityProviderResponse); i {
+ switch v := v.(*ListIdentityProvidersRequest); i {
case 0:
return &v.state
case 1:
@@ -1156,7 +1155,7 @@ func file_api_v2_idp_service_proto_init() {
}
}
file_api_v2_idp_service_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*CreateIdentityProviderRequest); i {
+ switch v := v.(*ListIdentityProvidersResponse); i {
case 0:
return &v.state
case 1:
@@ -1168,7 +1167,7 @@ func file_api_v2_idp_service_proto_init() {
}
}
file_api_v2_idp_service_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*CreateIdentityProviderResponse); i {
+ switch v := v.(*GetIdentityProviderRequest); i {
case 0:
return &v.state
case 1:
@@ -1180,7 +1179,7 @@ func file_api_v2_idp_service_proto_init() {
}
}
file_api_v2_idp_service_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*UpdateIdentityProviderRequest); i {
+ switch v := v.(*GetIdentityProviderResponse); i {
case 0:
return &v.state
case 1:
@@ -1192,7 +1191,7 @@ func file_api_v2_idp_service_proto_init() {
}
}
file_api_v2_idp_service_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*UpdateIdentityProviderResponse); i {
+ switch v := v.(*CreateIdentityProviderRequest); i {
case 0:
return &v.state
case 1:
@@ -1204,7 +1203,7 @@ func file_api_v2_idp_service_proto_init() {
}
}
file_api_v2_idp_service_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*DeleteIdentityProviderRequest); i {
+ switch v := v.(*CreateIdentityProviderResponse); i {
case 0:
return &v.state
case 1:
@@ -1216,7 +1215,7 @@ func file_api_v2_idp_service_proto_init() {
}
}
file_api_v2_idp_service_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*DeleteIdentityProviderResponse); i {
+ switch v := v.(*UpdateIdentityProviderRequest); i {
case 0:
return &v.state
case 1:
@@ -1228,7 +1227,7 @@ func file_api_v2_idp_service_proto_init() {
}
}
file_api_v2_idp_service_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*IdentityProvider_Config); i {
+ switch v := v.(*UpdateIdentityProviderResponse); i {
case 0:
return &v.state
case 1:
@@ -1240,7 +1239,7 @@ func file_api_v2_idp_service_proto_init() {
}
}
file_api_v2_idp_service_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*IdentityProvider_Config_FieldMapping); i {
+ switch v := v.(*DeleteIdentityProviderRequest); i {
case 0:
return &v.state
case 1:
@@ -1252,7 +1251,7 @@ func file_api_v2_idp_service_proto_init() {
}
}
file_api_v2_idp_service_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*IdentityProvider_Config_OAuth2); i {
+ switch v := v.(*DeleteIdentityProviderResponse); i {
case 0:
return &v.state
case 1:
@@ -1264,8 +1263,8 @@ func file_api_v2_idp_service_proto_init() {
}
}
}
- file_api_v2_idp_service_proto_msgTypes[11].OneofWrappers = []interface{}{
- (*IdentityProvider_Config_Oauth2)(nil),
+ file_api_v2_idp_service_proto_msgTypes[1].OneofWrappers = []interface{}{
+ (*IdentityProviderConfig_Oauth2)(nil),
}
type x struct{}
out := protoimpl.TypeBuilder{
diff --git a/proto/gen/api/v2/storage_service.pb.go b/proto/gen/api/v2/storage_service.pb.go
new file mode 100644
index 000000000..ccde7a0d2
--- /dev/null
+++ b/proto/gen/api/v2/storage_service.pb.go
@@ -0,0 +1,1163 @@
+// Code generated by protoc-gen-go. DO NOT EDIT.
+// versions:
+// protoc-gen-go v1.31.0
+// protoc (unknown)
+// source: api/v2/storage_service.proto
+
+package apiv2
+
+import (
+ _ "google.golang.org/genproto/googleapis/api/annotations"
+ protoreflect "google.golang.org/protobuf/reflect/protoreflect"
+ protoimpl "google.golang.org/protobuf/runtime/protoimpl"
+ fieldmaskpb "google.golang.org/protobuf/types/known/fieldmaskpb"
+ 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 Storage_Type int32
+
+const (
+ Storage_TYPE_UNSPECIFIED Storage_Type = 0
+ Storage_S3 Storage_Type = 1
+)
+
+// Enum value maps for Storage_Type.
+var (
+ Storage_Type_name = map[int32]string{
+ 0: "TYPE_UNSPECIFIED",
+ 1: "S3",
+ }
+ Storage_Type_value = map[string]int32{
+ "TYPE_UNSPECIFIED": 0,
+ "S3": 1,
+ }
+)
+
+func (x Storage_Type) Enum() *Storage_Type {
+ p := new(Storage_Type)
+ *p = x
+ return p
+}
+
+func (x Storage_Type) String() string {
+ return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
+}
+
+func (Storage_Type) Descriptor() protoreflect.EnumDescriptor {
+ return file_api_v2_storage_service_proto_enumTypes[0].Descriptor()
+}
+
+func (Storage_Type) Type() protoreflect.EnumType {
+ return &file_api_v2_storage_service_proto_enumTypes[0]
+}
+
+func (x Storage_Type) Number() protoreflect.EnumNumber {
+ return protoreflect.EnumNumber(x)
+}
+
+// Deprecated: Use Storage_Type.Descriptor instead.
+func (Storage_Type) EnumDescriptor() ([]byte, []int) {
+ return file_api_v2_storage_service_proto_rawDescGZIP(), []int{0, 0}
+}
+
+type Storage struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ Id int32 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
+ Title string `protobuf:"bytes,2,opt,name=title,proto3" json:"title,omitempty"`
+ Type Storage_Type `protobuf:"varint,3,opt,name=type,proto3,enum=memos.api.v2.Storage_Type" json:"type,omitempty"`
+ Config *StorageConfig `protobuf:"bytes,4,opt,name=config,proto3" json:"config,omitempty"`
+}
+
+func (x *Storage) Reset() {
+ *x = Storage{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_api_v2_storage_service_proto_msgTypes[0]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *Storage) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*Storage) ProtoMessage() {}
+
+func (x *Storage) ProtoReflect() protoreflect.Message {
+ mi := &file_api_v2_storage_service_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 Storage.ProtoReflect.Descriptor instead.
+func (*Storage) Descriptor() ([]byte, []int) {
+ return file_api_v2_storage_service_proto_rawDescGZIP(), []int{0}
+}
+
+func (x *Storage) GetId() int32 {
+ if x != nil {
+ return x.Id
+ }
+ return 0
+}
+
+func (x *Storage) GetTitle() string {
+ if x != nil {
+ return x.Title
+ }
+ return ""
+}
+
+func (x *Storage) GetType() Storage_Type {
+ if x != nil {
+ return x.Type
+ }
+ return Storage_TYPE_UNSPECIFIED
+}
+
+func (x *Storage) GetConfig() *StorageConfig {
+ if x != nil {
+ return x.Config
+ }
+ return nil
+}
+
+type StorageConfig struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ // Types that are assignable to StorageConfig:
+ //
+ // *StorageConfig_S3Config
+ StorageConfig isStorageConfig_StorageConfig `protobuf_oneof:"storage_config"`
+}
+
+func (x *StorageConfig) Reset() {
+ *x = StorageConfig{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_api_v2_storage_service_proto_msgTypes[1]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *StorageConfig) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*StorageConfig) ProtoMessage() {}
+
+func (x *StorageConfig) ProtoReflect() protoreflect.Message {
+ mi := &file_api_v2_storage_service_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 StorageConfig.ProtoReflect.Descriptor instead.
+func (*StorageConfig) Descriptor() ([]byte, []int) {
+ return file_api_v2_storage_service_proto_rawDescGZIP(), []int{1}
+}
+
+func (m *StorageConfig) GetStorageConfig() isStorageConfig_StorageConfig {
+ if m != nil {
+ return m.StorageConfig
+ }
+ return nil
+}
+
+func (x *StorageConfig) GetS3Config() *S3Config {
+ if x, ok := x.GetStorageConfig().(*StorageConfig_S3Config); ok {
+ return x.S3Config
+ }
+ return nil
+}
+
+type isStorageConfig_StorageConfig interface {
+ isStorageConfig_StorageConfig()
+}
+
+type StorageConfig_S3Config struct {
+ S3Config *S3Config `protobuf:"bytes,1,opt,name=s3_config,json=s3Config,proto3,oneof"`
+}
+
+func (*StorageConfig_S3Config) isStorageConfig_StorageConfig() {}
+
+type S3Config struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ EndPoint string `protobuf:"bytes,1,opt,name=end_point,json=endPoint,proto3" json:"end_point,omitempty"`
+ Path string `protobuf:"bytes,2,opt,name=path,proto3" json:"path,omitempty"`
+ Region string `protobuf:"bytes,3,opt,name=region,proto3" json:"region,omitempty"`
+ AccessKey string `protobuf:"bytes,4,opt,name=access_key,json=accessKey,proto3" json:"access_key,omitempty"`
+ SecretKey string `protobuf:"bytes,5,opt,name=secret_key,json=secretKey,proto3" json:"secret_key,omitempty"`
+ Bucket string `protobuf:"bytes,6,opt,name=bucket,proto3" json:"bucket,omitempty"`
+ UrlPrefix string `protobuf:"bytes,7,opt,name=url_prefix,json=urlPrefix,proto3" json:"url_prefix,omitempty"`
+ UrlSuffix string `protobuf:"bytes,8,opt,name=url_suffix,json=urlSuffix,proto3" json:"url_suffix,omitempty"`
+ PreSign bool `protobuf:"varint,9,opt,name=pre_sign,json=preSign,proto3" json:"pre_sign,omitempty"`
+}
+
+func (x *S3Config) Reset() {
+ *x = S3Config{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_api_v2_storage_service_proto_msgTypes[2]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *S3Config) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*S3Config) ProtoMessage() {}
+
+func (x *S3Config) ProtoReflect() protoreflect.Message {
+ mi := &file_api_v2_storage_service_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 S3Config.ProtoReflect.Descriptor instead.
+func (*S3Config) Descriptor() ([]byte, []int) {
+ return file_api_v2_storage_service_proto_rawDescGZIP(), []int{2}
+}
+
+func (x *S3Config) GetEndPoint() string {
+ if x != nil {
+ return x.EndPoint
+ }
+ return ""
+}
+
+func (x *S3Config) GetPath() string {
+ if x != nil {
+ return x.Path
+ }
+ return ""
+}
+
+func (x *S3Config) GetRegion() string {
+ if x != nil {
+ return x.Region
+ }
+ return ""
+}
+
+func (x *S3Config) GetAccessKey() string {
+ if x != nil {
+ return x.AccessKey
+ }
+ return ""
+}
+
+func (x *S3Config) GetSecretKey() string {
+ if x != nil {
+ return x.SecretKey
+ }
+ return ""
+}
+
+func (x *S3Config) GetBucket() string {
+ if x != nil {
+ return x.Bucket
+ }
+ return ""
+}
+
+func (x *S3Config) GetUrlPrefix() string {
+ if x != nil {
+ return x.UrlPrefix
+ }
+ return ""
+}
+
+func (x *S3Config) GetUrlSuffix() string {
+ if x != nil {
+ return x.UrlSuffix
+ }
+ return ""
+}
+
+func (x *S3Config) GetPreSign() bool {
+ if x != nil {
+ return x.PreSign
+ }
+ return false
+}
+
+type CreateStorageRequest struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ Storage *Storage `protobuf:"bytes,1,opt,name=storage,proto3" json:"storage,omitempty"`
+}
+
+func (x *CreateStorageRequest) Reset() {
+ *x = CreateStorageRequest{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_api_v2_storage_service_proto_msgTypes[3]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *CreateStorageRequest) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*CreateStorageRequest) ProtoMessage() {}
+
+func (x *CreateStorageRequest) ProtoReflect() protoreflect.Message {
+ mi := &file_api_v2_storage_service_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 CreateStorageRequest.ProtoReflect.Descriptor instead.
+func (*CreateStorageRequest) Descriptor() ([]byte, []int) {
+ return file_api_v2_storage_service_proto_rawDescGZIP(), []int{3}
+}
+
+func (x *CreateStorageRequest) GetStorage() *Storage {
+ if x != nil {
+ return x.Storage
+ }
+ return nil
+}
+
+type CreateStorageResponse struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ Storage *Storage `protobuf:"bytes,1,opt,name=storage,proto3" json:"storage,omitempty"`
+}
+
+func (x *CreateStorageResponse) Reset() {
+ *x = CreateStorageResponse{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_api_v2_storage_service_proto_msgTypes[4]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *CreateStorageResponse) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*CreateStorageResponse) ProtoMessage() {}
+
+func (x *CreateStorageResponse) ProtoReflect() protoreflect.Message {
+ mi := &file_api_v2_storage_service_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 CreateStorageResponse.ProtoReflect.Descriptor instead.
+func (*CreateStorageResponse) Descriptor() ([]byte, []int) {
+ return file_api_v2_storage_service_proto_rawDescGZIP(), []int{4}
+}
+
+func (x *CreateStorageResponse) GetStorage() *Storage {
+ if x != nil {
+ return x.Storage
+ }
+ return nil
+}
+
+type GetStorageRequest struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ Id int32 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
+}
+
+func (x *GetStorageRequest) Reset() {
+ *x = GetStorageRequest{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_api_v2_storage_service_proto_msgTypes[5]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *GetStorageRequest) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*GetStorageRequest) ProtoMessage() {}
+
+func (x *GetStorageRequest) ProtoReflect() protoreflect.Message {
+ mi := &file_api_v2_storage_service_proto_msgTypes[5]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use GetStorageRequest.ProtoReflect.Descriptor instead.
+func (*GetStorageRequest) Descriptor() ([]byte, []int) {
+ return file_api_v2_storage_service_proto_rawDescGZIP(), []int{5}
+}
+
+func (x *GetStorageRequest) GetId() int32 {
+ if x != nil {
+ return x.Id
+ }
+ return 0
+}
+
+type GetStorageResponse struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ Storage *Storage `protobuf:"bytes,1,opt,name=storage,proto3" json:"storage,omitempty"`
+}
+
+func (x *GetStorageResponse) Reset() {
+ *x = GetStorageResponse{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_api_v2_storage_service_proto_msgTypes[6]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *GetStorageResponse) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*GetStorageResponse) ProtoMessage() {}
+
+func (x *GetStorageResponse) ProtoReflect() protoreflect.Message {
+ mi := &file_api_v2_storage_service_proto_msgTypes[6]
+ 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 GetStorageResponse.ProtoReflect.Descriptor instead.
+func (*GetStorageResponse) Descriptor() ([]byte, []int) {
+ return file_api_v2_storage_service_proto_rawDescGZIP(), []int{6}
+}
+
+func (x *GetStorageResponse) GetStorage() *Storage {
+ if x != nil {
+ return x.Storage
+ }
+ return nil
+}
+
+type ListStoragesRequest struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+}
+
+func (x *ListStoragesRequest) Reset() {
+ *x = ListStoragesRequest{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_api_v2_storage_service_proto_msgTypes[7]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *ListStoragesRequest) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*ListStoragesRequest) ProtoMessage() {}
+
+func (x *ListStoragesRequest) ProtoReflect() protoreflect.Message {
+ mi := &file_api_v2_storage_service_proto_msgTypes[7]
+ 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 ListStoragesRequest.ProtoReflect.Descriptor instead.
+func (*ListStoragesRequest) Descriptor() ([]byte, []int) {
+ return file_api_v2_storage_service_proto_rawDescGZIP(), []int{7}
+}
+
+type ListStoragesResponse struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ Storages []*Storage `protobuf:"bytes,1,rep,name=storages,proto3" json:"storages,omitempty"`
+}
+
+func (x *ListStoragesResponse) Reset() {
+ *x = ListStoragesResponse{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_api_v2_storage_service_proto_msgTypes[8]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *ListStoragesResponse) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*ListStoragesResponse) ProtoMessage() {}
+
+func (x *ListStoragesResponse) ProtoReflect() protoreflect.Message {
+ mi := &file_api_v2_storage_service_proto_msgTypes[8]
+ 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 ListStoragesResponse.ProtoReflect.Descriptor instead.
+func (*ListStoragesResponse) Descriptor() ([]byte, []int) {
+ return file_api_v2_storage_service_proto_rawDescGZIP(), []int{8}
+}
+
+func (x *ListStoragesResponse) GetStorages() []*Storage {
+ if x != nil {
+ return x.Storages
+ }
+ return nil
+}
+
+type UpdateStorageRequest struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ Storage *Storage `protobuf:"bytes,1,opt,name=storage,proto3" json:"storage,omitempty"`
+ UpdateMask *fieldmaskpb.FieldMask `protobuf:"bytes,2,opt,name=update_mask,json=updateMask,proto3" json:"update_mask,omitempty"`
+}
+
+func (x *UpdateStorageRequest) Reset() {
+ *x = UpdateStorageRequest{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_api_v2_storage_service_proto_msgTypes[9]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *UpdateStorageRequest) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*UpdateStorageRequest) ProtoMessage() {}
+
+func (x *UpdateStorageRequest) ProtoReflect() protoreflect.Message {
+ mi := &file_api_v2_storage_service_proto_msgTypes[9]
+ 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 UpdateStorageRequest.ProtoReflect.Descriptor instead.
+func (*UpdateStorageRequest) Descriptor() ([]byte, []int) {
+ return file_api_v2_storage_service_proto_rawDescGZIP(), []int{9}
+}
+
+func (x *UpdateStorageRequest) GetStorage() *Storage {
+ if x != nil {
+ return x.Storage
+ }
+ return nil
+}
+
+func (x *UpdateStorageRequest) GetUpdateMask() *fieldmaskpb.FieldMask {
+ if x != nil {
+ return x.UpdateMask
+ }
+ return nil
+}
+
+type UpdateStorageResponse struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ Storage *Storage `protobuf:"bytes,1,opt,name=storage,proto3" json:"storage,omitempty"`
+}
+
+func (x *UpdateStorageResponse) Reset() {
+ *x = UpdateStorageResponse{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_api_v2_storage_service_proto_msgTypes[10]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *UpdateStorageResponse) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*UpdateStorageResponse) ProtoMessage() {}
+
+func (x *UpdateStorageResponse) ProtoReflect() protoreflect.Message {
+ mi := &file_api_v2_storage_service_proto_msgTypes[10]
+ 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 UpdateStorageResponse.ProtoReflect.Descriptor instead.
+func (*UpdateStorageResponse) Descriptor() ([]byte, []int) {
+ return file_api_v2_storage_service_proto_rawDescGZIP(), []int{10}
+}
+
+func (x *UpdateStorageResponse) GetStorage() *Storage {
+ if x != nil {
+ return x.Storage
+ }
+ return nil
+}
+
+type DeleteStorageRequest struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ Id int32 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
+}
+
+func (x *DeleteStorageRequest) Reset() {
+ *x = DeleteStorageRequest{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_api_v2_storage_service_proto_msgTypes[11]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *DeleteStorageRequest) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*DeleteStorageRequest) ProtoMessage() {}
+
+func (x *DeleteStorageRequest) ProtoReflect() protoreflect.Message {
+ mi := &file_api_v2_storage_service_proto_msgTypes[11]
+ 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 DeleteStorageRequest.ProtoReflect.Descriptor instead.
+func (*DeleteStorageRequest) Descriptor() ([]byte, []int) {
+ return file_api_v2_storage_service_proto_rawDescGZIP(), []int{11}
+}
+
+func (x *DeleteStorageRequest) GetId() int32 {
+ if x != nil {
+ return x.Id
+ }
+ return 0
+}
+
+type DeleteStorageResponse struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+}
+
+func (x *DeleteStorageResponse) Reset() {
+ *x = DeleteStorageResponse{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_api_v2_storage_service_proto_msgTypes[12]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *DeleteStorageResponse) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*DeleteStorageResponse) ProtoMessage() {}
+
+func (x *DeleteStorageResponse) ProtoReflect() protoreflect.Message {
+ mi := &file_api_v2_storage_service_proto_msgTypes[12]
+ 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 DeleteStorageResponse.ProtoReflect.Descriptor instead.
+func (*DeleteStorageResponse) Descriptor() ([]byte, []int) {
+ return file_api_v2_storage_service_proto_rawDescGZIP(), []int{12}
+}
+
+var File_api_v2_storage_service_proto protoreflect.FileDescriptor
+
+var file_api_v2_storage_service_proto_rawDesc = []byte{
+ 0x0a, 0x1c, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x32, 0x2f, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65,
+ 0x5f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0c,
+ 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 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, 0x17, 0x67, 0x6f, 0x6f, 0x67,
+ 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x2e, 0x70, 0x72,
+ 0x6f, 0x74, 0x6f, 0x1a, 0x20, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74,
+ 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x5f, 0x6d, 0x61, 0x73, 0x6b, 0x2e,
+ 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xba, 0x01, 0x0a, 0x07, 0x53, 0x74, 0x6f, 0x72, 0x61, 0x67,
+ 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x02, 0x69,
+ 0x64, 0x12, 0x14, 0x0a, 0x05, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09,
+ 0x52, 0x05, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x12, 0x2e, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18,
+ 0x03, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1a, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70,
+ 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x53, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x54, 0x79, 0x70,
+ 0x65, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x33, 0x0a, 0x06, 0x63, 0x6f, 0x6e, 0x66, 0x69,
+ 0x67, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e,
+ 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x53, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x43, 0x6f,
+ 0x6e, 0x66, 0x69, 0x67, 0x52, 0x06, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x22, 0x24, 0x0a, 0x04,
+ 0x54, 0x79, 0x70, 0x65, 0x12, 0x14, 0x0a, 0x10, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x55, 0x4e, 0x53,
+ 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x06, 0x0a, 0x02, 0x53, 0x33,
+ 0x10, 0x01, 0x22, 0x58, 0x0a, 0x0d, 0x53, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x43, 0x6f, 0x6e,
+ 0x66, 0x69, 0x67, 0x12, 0x35, 0x0a, 0x09, 0x73, 0x33, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67,
+ 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61,
+ 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x53, 0x33, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x48, 0x00,
+ 0x52, 0x08, 0x73, 0x33, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x42, 0x10, 0x0a, 0x0e, 0x73, 0x74,
+ 0x6f, 0x72, 0x61, 0x67, 0x65, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x22, 0x82, 0x02, 0x0a,
+ 0x08, 0x53, 0x33, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x1b, 0x0a, 0x09, 0x65, 0x6e, 0x64,
+ 0x5f, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x65, 0x6e,
+ 0x64, 0x50, 0x6f, 0x69, 0x6e, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x70, 0x61, 0x74, 0x68, 0x18, 0x02,
+ 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x70, 0x61, 0x74, 0x68, 0x12, 0x16, 0x0a, 0x06, 0x72, 0x65,
+ 0x67, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x72, 0x65, 0x67, 0x69,
+ 0x6f, 0x6e, 0x12, 0x1d, 0x0a, 0x0a, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x5f, 0x6b, 0x65, 0x79,
+ 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x4b, 0x65,
+ 0x79, 0x12, 0x1d, 0x0a, 0x0a, 0x73, 0x65, 0x63, 0x72, 0x65, 0x74, 0x5f, 0x6b, 0x65, 0x79, 0x18,
+ 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x73, 0x65, 0x63, 0x72, 0x65, 0x74, 0x4b, 0x65, 0x79,
+ 0x12, 0x16, 0x0a, 0x06, 0x62, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09,
+ 0x52, 0x06, 0x62, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x12, 0x1d, 0x0a, 0x0a, 0x75, 0x72, 0x6c, 0x5f,
+ 0x70, 0x72, 0x65, 0x66, 0x69, 0x78, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x75, 0x72,
+ 0x6c, 0x50, 0x72, 0x65, 0x66, 0x69, 0x78, 0x12, 0x1d, 0x0a, 0x0a, 0x75, 0x72, 0x6c, 0x5f, 0x73,
+ 0x75, 0x66, 0x66, 0x69, 0x78, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x75, 0x72, 0x6c,
+ 0x53, 0x75, 0x66, 0x66, 0x69, 0x78, 0x12, 0x19, 0x0a, 0x08, 0x70, 0x72, 0x65, 0x5f, 0x73, 0x69,
+ 0x67, 0x6e, 0x18, 0x09, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x70, 0x72, 0x65, 0x53, 0x69, 0x67,
+ 0x6e, 0x22, 0x47, 0x0a, 0x14, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x53, 0x74, 0x6f, 0x72, 0x61,
+ 0x67, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x2f, 0x0a, 0x07, 0x73, 0x74, 0x6f,
+ 0x72, 0x61, 0x67, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x6d, 0x65, 0x6d,
+ 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x53, 0x74, 0x6f, 0x72, 0x61, 0x67,
+ 0x65, 0x52, 0x07, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x22, 0x48, 0x0a, 0x15, 0x43, 0x72,
+ 0x65, 0x61, 0x74, 0x65, 0x53, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f,
+ 0x6e, 0x73, 0x65, 0x12, 0x2f, 0x0a, 0x07, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x18, 0x01,
+ 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69,
+ 0x2e, 0x76, 0x32, 0x2e, 0x53, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x52, 0x07, 0x73, 0x74, 0x6f,
+ 0x72, 0x61, 0x67, 0x65, 0x22, 0x23, 0x0a, 0x11, 0x47, 0x65, 0x74, 0x53, 0x74, 0x6f, 0x72, 0x61,
+ 0x67, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18,
+ 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x02, 0x69, 0x64, 0x22, 0x45, 0x0a, 0x12, 0x47, 0x65, 0x74,
+ 0x53, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12,
+ 0x2f, 0x0a, 0x07, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b,
+ 0x32, 0x15, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e,
+ 0x53, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x52, 0x07, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65,
+ 0x22, 0x15, 0x0a, 0x13, 0x4c, 0x69, 0x73, 0x74, 0x53, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x73,
+ 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x49, 0x0a, 0x14, 0x4c, 0x69, 0x73, 0x74, 0x53,
+ 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12,
+ 0x31, 0x0a, 0x08, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28,
+ 0x0b, 0x32, 0x15, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32,
+ 0x2e, 0x53, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x52, 0x08, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67,
+ 0x65, 0x73, 0x22, 0x84, 0x01, 0x0a, 0x14, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x53, 0x74, 0x6f,
+ 0x72, 0x61, 0x67, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x2f, 0x0a, 0x07, 0x73,
+ 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x6d,
+ 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x53, 0x74, 0x6f, 0x72,
+ 0x61, 0x67, 0x65, 0x52, 0x07, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x12, 0x3b, 0x0a, 0x0b,
+ 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x5f, 0x6d, 0x61, 0x73, 0x6b, 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, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4d, 0x61, 0x73, 0x6b, 0x52, 0x0a, 0x75,
+ 0x70, 0x64, 0x61, 0x74, 0x65, 0x4d, 0x61, 0x73, 0x6b, 0x22, 0x48, 0x0a, 0x15, 0x55, 0x70, 0x64,
+ 0x61, 0x74, 0x65, 0x53, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e,
+ 0x73, 0x65, 0x12, 0x2f, 0x0a, 0x07, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x18, 0x01, 0x20,
+ 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e,
+ 0x76, 0x32, 0x2e, 0x53, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x52, 0x07, 0x73, 0x74, 0x6f, 0x72,
+ 0x61, 0x67, 0x65, 0x22, 0x26, 0x0a, 0x14, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x53, 0x74, 0x6f,
+ 0x72, 0x61, 0x67, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69,
+ 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x02, 0x69, 0x64, 0x22, 0x17, 0x0a, 0x15, 0x44,
+ 0x65, 0x6c, 0x65, 0x74, 0x65, 0x53, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x52, 0x65, 0x73, 0x70,
+ 0x6f, 0x6e, 0x73, 0x65, 0x32, 0x8c, 0x05, 0x0a, 0x0e, 0x53, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65,
+ 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x75, 0x0a, 0x0d, 0x43, 0x72, 0x65, 0x61, 0x74,
+ 0x65, 0x53, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x12, 0x22, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73,
+ 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x53, 0x74,
+ 0x6f, 0x72, 0x61, 0x67, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x23, 0x2e, 0x6d,
+ 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x43, 0x72, 0x65, 0x61,
+ 0x74, 0x65, 0x53, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73,
+ 0x65, 0x22, 0x1b, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x15, 0x3a, 0x01, 0x2a, 0x22, 0x10, 0x2f, 0x61,
+ 0x70, 0x69, 0x2f, 0x76, 0x32, 0x2f, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x73, 0x12, 0x73,
+ 0x0a, 0x0a, 0x47, 0x65, 0x74, 0x53, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x12, 0x1f, 0x2e, 0x6d,
+ 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x47, 0x65, 0x74, 0x53,
+ 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x20, 0x2e,
+ 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x47, 0x65, 0x74,
+ 0x53, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22,
+ 0x22, 0xda, 0x41, 0x02, 0x69, 0x64, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x17, 0x12, 0x15, 0x2f, 0x61,
+ 0x70, 0x69, 0x2f, 0x76, 0x32, 0x2f, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x73, 0x2f, 0x7b,
+ 0x69, 0x64, 0x7d, 0x12, 0x6f, 0x0a, 0x0c, 0x4c, 0x69, 0x73, 0x74, 0x53, 0x74, 0x6f, 0x72, 0x61,
+ 0x67, 0x65, 0x73, 0x12, 0x21, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e,
+ 0x76, 0x32, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x53, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x73, 0x52,
+ 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x22, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61,
+ 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x53, 0x74, 0x6f, 0x72, 0x61, 0x67,
+ 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x18, 0x82, 0xd3, 0xe4, 0x93,
+ 0x02, 0x12, 0x12, 0x10, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x32, 0x2f, 0x73, 0x74, 0x6f, 0x72,
+ 0x61, 0x67, 0x65, 0x73, 0x12, 0x9e, 0x01, 0x0a, 0x0d, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x53,
+ 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x12, 0x22, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61,
+ 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x53, 0x74, 0x6f, 0x72,
+ 0x61, 0x67, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x23, 0x2e, 0x6d, 0x65, 0x6d,
+ 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65,
+ 0x53, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22,
+ 0x44, 0xda, 0x41, 0x13, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2c, 0x75, 0x70, 0x64, 0x61,
+ 0x74, 0x65, 0x5f, 0x6d, 0x61, 0x73, 0x6b, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x28, 0x3a, 0x07, 0x73,
+ 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x32, 0x1d, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x32, 0x2f,
+ 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x73, 0x2f, 0x7b, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67,
+ 0x65, 0x2e, 0x69, 0x64, 0x7d, 0x12, 0x7c, 0x0a, 0x0d, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x53,
+ 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x12, 0x22, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61,
+ 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x53, 0x74, 0x6f, 0x72,
+ 0x61, 0x67, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x23, 0x2e, 0x6d, 0x65, 0x6d,
+ 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65,
+ 0x53, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22,
+ 0x22, 0xda, 0x41, 0x02, 0x69, 0x64, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x17, 0x2a, 0x15, 0x2f, 0x61,
+ 0x70, 0x69, 0x2f, 0x76, 0x32, 0x2f, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x73, 0x2f, 0x7b,
+ 0x69, 0x64, 0x7d, 0x42, 0xab, 0x01, 0x0a, 0x10, 0x63, 0x6f, 0x6d, 0x2e, 0x6d, 0x65, 0x6d, 0x6f,
+ 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x42, 0x13, 0x53, 0x74, 0x6f, 0x72, 0x61, 0x67,
+ 0x65, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a,
+ 0x30, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x75, 0x73, 0x65, 0x6d,
+ 0x65, 0x6d, 0x6f, 0x73, 0x2f, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f,
+ 0x2f, 0x67, 0x65, 0x6e, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x32, 0x3b, 0x61, 0x70, 0x69, 0x76,
+ 0x32, 0xa2, 0x02, 0x03, 0x4d, 0x41, 0x58, 0xaa, 0x02, 0x0c, 0x4d, 0x65, 0x6d, 0x6f, 0x73, 0x2e,
+ 0x41, 0x70, 0x69, 0x2e, 0x56, 0x32, 0xca, 0x02, 0x0c, 0x4d, 0x65, 0x6d, 0x6f, 0x73, 0x5c, 0x41,
+ 0x70, 0x69, 0x5c, 0x56, 0x32, 0xe2, 0x02, 0x18, 0x4d, 0x65, 0x6d, 0x6f, 0x73, 0x5c, 0x41, 0x70,
+ 0x69, 0x5c, 0x56, 0x32, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61,
+ 0xea, 0x02, 0x0e, 0x4d, 0x65, 0x6d, 0x6f, 0x73, 0x3a, 0x3a, 0x41, 0x70, 0x69, 0x3a, 0x3a, 0x56,
+ 0x32, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
+}
+
+var (
+ file_api_v2_storage_service_proto_rawDescOnce sync.Once
+ file_api_v2_storage_service_proto_rawDescData = file_api_v2_storage_service_proto_rawDesc
+)
+
+func file_api_v2_storage_service_proto_rawDescGZIP() []byte {
+ file_api_v2_storage_service_proto_rawDescOnce.Do(func() {
+ file_api_v2_storage_service_proto_rawDescData = protoimpl.X.CompressGZIP(file_api_v2_storage_service_proto_rawDescData)
+ })
+ return file_api_v2_storage_service_proto_rawDescData
+}
+
+var file_api_v2_storage_service_proto_enumTypes = make([]protoimpl.EnumInfo, 1)
+var file_api_v2_storage_service_proto_msgTypes = make([]protoimpl.MessageInfo, 13)
+var file_api_v2_storage_service_proto_goTypes = []interface{}{
+ (Storage_Type)(0), // 0: memos.api.v2.Storage.Type
+ (*Storage)(nil), // 1: memos.api.v2.Storage
+ (*StorageConfig)(nil), // 2: memos.api.v2.StorageConfig
+ (*S3Config)(nil), // 3: memos.api.v2.S3Config
+ (*CreateStorageRequest)(nil), // 4: memos.api.v2.CreateStorageRequest
+ (*CreateStorageResponse)(nil), // 5: memos.api.v2.CreateStorageResponse
+ (*GetStorageRequest)(nil), // 6: memos.api.v2.GetStorageRequest
+ (*GetStorageResponse)(nil), // 7: memos.api.v2.GetStorageResponse
+ (*ListStoragesRequest)(nil), // 8: memos.api.v2.ListStoragesRequest
+ (*ListStoragesResponse)(nil), // 9: memos.api.v2.ListStoragesResponse
+ (*UpdateStorageRequest)(nil), // 10: memos.api.v2.UpdateStorageRequest
+ (*UpdateStorageResponse)(nil), // 11: memos.api.v2.UpdateStorageResponse
+ (*DeleteStorageRequest)(nil), // 12: memos.api.v2.DeleteStorageRequest
+ (*DeleteStorageResponse)(nil), // 13: memos.api.v2.DeleteStorageResponse
+ (*fieldmaskpb.FieldMask)(nil), // 14: google.protobuf.FieldMask
+}
+var file_api_v2_storage_service_proto_depIdxs = []int32{
+ 0, // 0: memos.api.v2.Storage.type:type_name -> memos.api.v2.Storage.Type
+ 2, // 1: memos.api.v2.Storage.config:type_name -> memos.api.v2.StorageConfig
+ 3, // 2: memos.api.v2.StorageConfig.s3_config:type_name -> memos.api.v2.S3Config
+ 1, // 3: memos.api.v2.CreateStorageRequest.storage:type_name -> memos.api.v2.Storage
+ 1, // 4: memos.api.v2.CreateStorageResponse.storage:type_name -> memos.api.v2.Storage
+ 1, // 5: memos.api.v2.GetStorageResponse.storage:type_name -> memos.api.v2.Storage
+ 1, // 6: memos.api.v2.ListStoragesResponse.storages:type_name -> memos.api.v2.Storage
+ 1, // 7: memos.api.v2.UpdateStorageRequest.storage:type_name -> memos.api.v2.Storage
+ 14, // 8: memos.api.v2.UpdateStorageRequest.update_mask:type_name -> google.protobuf.FieldMask
+ 1, // 9: memos.api.v2.UpdateStorageResponse.storage:type_name -> memos.api.v2.Storage
+ 4, // 10: memos.api.v2.StorageService.CreateStorage:input_type -> memos.api.v2.CreateStorageRequest
+ 6, // 11: memos.api.v2.StorageService.GetStorage:input_type -> memos.api.v2.GetStorageRequest
+ 8, // 12: memos.api.v2.StorageService.ListStorages:input_type -> memos.api.v2.ListStoragesRequest
+ 10, // 13: memos.api.v2.StorageService.UpdateStorage:input_type -> memos.api.v2.UpdateStorageRequest
+ 12, // 14: memos.api.v2.StorageService.DeleteStorage:input_type -> memos.api.v2.DeleteStorageRequest
+ 5, // 15: memos.api.v2.StorageService.CreateStorage:output_type -> memos.api.v2.CreateStorageResponse
+ 7, // 16: memos.api.v2.StorageService.GetStorage:output_type -> memos.api.v2.GetStorageResponse
+ 9, // 17: memos.api.v2.StorageService.ListStorages:output_type -> memos.api.v2.ListStoragesResponse
+ 11, // 18: memos.api.v2.StorageService.UpdateStorage:output_type -> memos.api.v2.UpdateStorageResponse
+ 13, // 19: memos.api.v2.StorageService.DeleteStorage:output_type -> memos.api.v2.DeleteStorageResponse
+ 15, // [15:20] is the sub-list for method output_type
+ 10, // [10:15] is the sub-list for method input_type
+ 10, // [10:10] is the sub-list for extension type_name
+ 10, // [10:10] is the sub-list for extension extendee
+ 0, // [0:10] is the sub-list for field type_name
+}
+
+func init() { file_api_v2_storage_service_proto_init() }
+func file_api_v2_storage_service_proto_init() {
+ if File_api_v2_storage_service_proto != nil {
+ return
+ }
+ if !protoimpl.UnsafeEnabled {
+ file_api_v2_storage_service_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*Storage); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_api_v2_storage_service_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*StorageConfig); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_api_v2_storage_service_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*S3Config); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_api_v2_storage_service_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*CreateStorageRequest); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_api_v2_storage_service_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*CreateStorageResponse); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_api_v2_storage_service_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*GetStorageRequest); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_api_v2_storage_service_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*GetStorageResponse); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_api_v2_storage_service_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*ListStoragesRequest); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_api_v2_storage_service_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*ListStoragesResponse); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_api_v2_storage_service_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*UpdateStorageRequest); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_api_v2_storage_service_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*UpdateStorageResponse); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_api_v2_storage_service_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*DeleteStorageRequest); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_api_v2_storage_service_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*DeleteStorageResponse); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ }
+ file_api_v2_storage_service_proto_msgTypes[1].OneofWrappers = []interface{}{
+ (*StorageConfig_S3Config)(nil),
+ }
+ type x struct{}
+ out := protoimpl.TypeBuilder{
+ File: protoimpl.DescBuilder{
+ GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
+ RawDescriptor: file_api_v2_storage_service_proto_rawDesc,
+ NumEnums: 1,
+ NumMessages: 13,
+ NumExtensions: 0,
+ NumServices: 1,
+ },
+ GoTypes: file_api_v2_storage_service_proto_goTypes,
+ DependencyIndexes: file_api_v2_storage_service_proto_depIdxs,
+ EnumInfos: file_api_v2_storage_service_proto_enumTypes,
+ MessageInfos: file_api_v2_storage_service_proto_msgTypes,
+ }.Build()
+ File_api_v2_storage_service_proto = out.File
+ file_api_v2_storage_service_proto_rawDesc = nil
+ file_api_v2_storage_service_proto_goTypes = nil
+ file_api_v2_storage_service_proto_depIdxs = nil
+}
diff --git a/proto/gen/api/v2/storage_service.pb.gw.go b/proto/gen/api/v2/storage_service.pb.gw.go
new file mode 100644
index 000000000..9a90fceef
--- /dev/null
+++ b/proto/gen/api/v2/storage_service.pb.gw.go
@@ -0,0 +1,597 @@
+// Code generated by protoc-gen-grpc-gateway. DO NOT EDIT.
+// source: api/v2/storage_service.proto
+
+/*
+Package apiv2 is a reverse proxy.
+
+It translates gRPC into RESTful JSON APIs.
+*/
+package apiv2
+
+import (
+ "context"
+ "io"
+ "net/http"
+
+ "github.com/grpc-ecosystem/grpc-gateway/v2/runtime"
+ "github.com/grpc-ecosystem/grpc-gateway/v2/utilities"
+ "google.golang.org/grpc"
+ "google.golang.org/grpc/codes"
+ "google.golang.org/grpc/grpclog"
+ "google.golang.org/grpc/metadata"
+ "google.golang.org/grpc/status"
+ "google.golang.org/protobuf/proto"
+)
+
+// Suppress "imported and not used" errors
+var _ codes.Code
+var _ io.Reader
+var _ status.Status
+var _ = runtime.String
+var _ = utilities.NewDoubleArray
+var _ = metadata.Join
+
+func request_StorageService_CreateStorage_0(ctx context.Context, marshaler runtime.Marshaler, client StorageServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
+ var protoReq CreateStorageRequest
+ 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.CreateStorage(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
+ return msg, metadata, err
+
+}
+
+func local_request_StorageService_CreateStorage_0(ctx context.Context, marshaler runtime.Marshaler, server StorageServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
+ var protoReq CreateStorageRequest
+ 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.CreateStorage(ctx, &protoReq)
+ return msg, metadata, err
+
+}
+
+func request_StorageService_GetStorage_0(ctx context.Context, marshaler runtime.Marshaler, client StorageServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
+ var protoReq GetStorageRequest
+ var metadata runtime.ServerMetadata
+
+ var (
+ val string
+ ok bool
+ err error
+ _ = err
+ )
+
+ val, ok = pathParams["id"]
+ if !ok {
+ return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "id")
+ }
+
+ protoReq.Id, err = runtime.Int32(val)
+ if err != nil {
+ return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "id", err)
+ }
+
+ msg, err := client.GetStorage(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
+ return msg, metadata, err
+
+}
+
+func local_request_StorageService_GetStorage_0(ctx context.Context, marshaler runtime.Marshaler, server StorageServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
+ var protoReq GetStorageRequest
+ var metadata runtime.ServerMetadata
+
+ var (
+ val string
+ ok bool
+ err error
+ _ = err
+ )
+
+ val, ok = pathParams["id"]
+ if !ok {
+ return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "id")
+ }
+
+ protoReq.Id, err = runtime.Int32(val)
+ if err != nil {
+ return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "id", err)
+ }
+
+ msg, err := server.GetStorage(ctx, &protoReq)
+ return msg, metadata, err
+
+}
+
+func request_StorageService_ListStorages_0(ctx context.Context, marshaler runtime.Marshaler, client StorageServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
+ var protoReq ListStoragesRequest
+ var metadata runtime.ServerMetadata
+
+ msg, err := client.ListStorages(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
+ return msg, metadata, err
+
+}
+
+func local_request_StorageService_ListStorages_0(ctx context.Context, marshaler runtime.Marshaler, server StorageServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
+ var protoReq ListStoragesRequest
+ var metadata runtime.ServerMetadata
+
+ msg, err := server.ListStorages(ctx, &protoReq)
+ return msg, metadata, err
+
+}
+
+var (
+ filter_StorageService_UpdateStorage_0 = &utilities.DoubleArray{Encoding: map[string]int{"storage": 0, "id": 1}, Base: []int{1, 4, 5, 2, 0, 0, 0, 0}, Check: []int{0, 1, 1, 2, 4, 2, 2, 3}}
+)
+
+func request_StorageService_UpdateStorage_0(ctx context.Context, marshaler runtime.Marshaler, client StorageServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
+ var protoReq UpdateStorageRequest
+ 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.Storage); err != nil && err != io.EOF {
+ return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
+ }
+ if protoReq.UpdateMask == nil || len(protoReq.UpdateMask.GetPaths()) == 0 {
+ if fieldMask, err := runtime.FieldMaskFromRequestBody(newReader(), protoReq.Storage); err != nil {
+ return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
+ } else {
+ protoReq.UpdateMask = fieldMask
+ }
+ }
+
+ var (
+ val string
+ ok bool
+ err error
+ _ = err
+ )
+
+ val, ok = pathParams["storage.id"]
+ if !ok {
+ return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "storage.id")
+ }
+
+ err = runtime.PopulateFieldFromPath(&protoReq, "storage.id", val)
+ if err != nil {
+ return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "storage.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_StorageService_UpdateStorage_0); err != nil {
+ return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
+ }
+
+ msg, err := client.UpdateStorage(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
+ return msg, metadata, err
+
+}
+
+func local_request_StorageService_UpdateStorage_0(ctx context.Context, marshaler runtime.Marshaler, server StorageServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
+ var protoReq UpdateStorageRequest
+ 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.Storage); err != nil && err != io.EOF {
+ return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
+ }
+ if protoReq.UpdateMask == nil || len(protoReq.UpdateMask.GetPaths()) == 0 {
+ if fieldMask, err := runtime.FieldMaskFromRequestBody(newReader(), protoReq.Storage); err != nil {
+ return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
+ } else {
+ protoReq.UpdateMask = fieldMask
+ }
+ }
+
+ var (
+ val string
+ ok bool
+ err error
+ _ = err
+ )
+
+ val, ok = pathParams["storage.id"]
+ if !ok {
+ return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "storage.id")
+ }
+
+ err = runtime.PopulateFieldFromPath(&protoReq, "storage.id", val)
+ if err != nil {
+ return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "storage.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_StorageService_UpdateStorage_0); err != nil {
+ return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
+ }
+
+ msg, err := server.UpdateStorage(ctx, &protoReq)
+ return msg, metadata, err
+
+}
+
+func request_StorageService_DeleteStorage_0(ctx context.Context, marshaler runtime.Marshaler, client StorageServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
+ var protoReq DeleteStorageRequest
+ var metadata runtime.ServerMetadata
+
+ var (
+ val string
+ ok bool
+ err error
+ _ = err
+ )
+
+ val, ok = pathParams["id"]
+ if !ok {
+ return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "id")
+ }
+
+ protoReq.Id, err = runtime.Int32(val)
+ if err != nil {
+ return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "id", err)
+ }
+
+ msg, err := client.DeleteStorage(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
+ return msg, metadata, err
+
+}
+
+func local_request_StorageService_DeleteStorage_0(ctx context.Context, marshaler runtime.Marshaler, server StorageServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
+ var protoReq DeleteStorageRequest
+ var metadata runtime.ServerMetadata
+
+ var (
+ val string
+ ok bool
+ err error
+ _ = err
+ )
+
+ val, ok = pathParams["id"]
+ if !ok {
+ return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "id")
+ }
+
+ protoReq.Id, err = runtime.Int32(val)
+ if err != nil {
+ return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "id", err)
+ }
+
+ msg, err := server.DeleteStorage(ctx, &protoReq)
+ return msg, metadata, err
+
+}
+
+// RegisterStorageServiceHandlerServer registers the http handlers for service StorageService to "mux".
+// UnaryRPC :call StorageServiceServer 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 RegisterStorageServiceHandlerFromEndpoint instead.
+func RegisterStorageServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server StorageServiceServer) error {
+
+ mux.Handle("POST", pattern_StorageService_CreateStorage_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)
+ var err error
+ var annotatedContext context.Context
+ annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/memos.api.v2.StorageService/CreateStorage", runtime.WithHTTPPathPattern("/api/v2/storages"))
+ if err != nil {
+ runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
+ return
+ }
+ resp, md, err := local_request_StorageService_CreateStorage_0(annotatedContext, inboundMarshaler, server, req, pathParams)
+ md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
+ annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
+ if err != nil {
+ runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
+ return
+ }
+
+ forward_StorageService_CreateStorage_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
+
+ })
+
+ mux.Handle("GET", pattern_StorageService_GetStorage_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)
+ var err error
+ var annotatedContext context.Context
+ annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/memos.api.v2.StorageService/GetStorage", runtime.WithHTTPPathPattern("/api/v2/storages/{id}"))
+ if err != nil {
+ runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
+ return
+ }
+ resp, md, err := local_request_StorageService_GetStorage_0(annotatedContext, inboundMarshaler, server, req, pathParams)
+ md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
+ annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
+ if err != nil {
+ runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
+ return
+ }
+
+ forward_StorageService_GetStorage_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
+
+ })
+
+ mux.Handle("GET", pattern_StorageService_ListStorages_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)
+ var err error
+ var annotatedContext context.Context
+ annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/memos.api.v2.StorageService/ListStorages", runtime.WithHTTPPathPattern("/api/v2/storages"))
+ if err != nil {
+ runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
+ return
+ }
+ resp, md, err := local_request_StorageService_ListStorages_0(annotatedContext, inboundMarshaler, server, req, pathParams)
+ md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
+ annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
+ if err != nil {
+ runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
+ return
+ }
+
+ forward_StorageService_ListStorages_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
+
+ })
+
+ mux.Handle("PATCH", pattern_StorageService_UpdateStorage_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)
+ var err error
+ var annotatedContext context.Context
+ annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/memos.api.v2.StorageService/UpdateStorage", runtime.WithHTTPPathPattern("/api/v2/storages/{storage.id}"))
+ if err != nil {
+ runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
+ return
+ }
+ resp, md, err := local_request_StorageService_UpdateStorage_0(annotatedContext, inboundMarshaler, server, req, pathParams)
+ md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
+ annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
+ if err != nil {
+ runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
+ return
+ }
+
+ forward_StorageService_UpdateStorage_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
+
+ })
+
+ mux.Handle("DELETE", pattern_StorageService_DeleteStorage_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)
+ var err error
+ var annotatedContext context.Context
+ annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/memos.api.v2.StorageService/DeleteStorage", runtime.WithHTTPPathPattern("/api/v2/storages/{id}"))
+ if err != nil {
+ runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
+ return
+ }
+ resp, md, err := local_request_StorageService_DeleteStorage_0(annotatedContext, inboundMarshaler, server, req, pathParams)
+ md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
+ annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
+ if err != nil {
+ runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
+ return
+ }
+
+ forward_StorageService_DeleteStorage_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
+
+ })
+
+ return nil
+}
+
+// RegisterStorageServiceHandlerFromEndpoint is same as RegisterStorageServiceHandler but
+// automatically dials to "endpoint" and closes the connection when "ctx" gets done.
+func RegisterStorageServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error) {
+ conn, err := grpc.DialContext(ctx, 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 RegisterStorageServiceHandler(ctx, mux, conn)
+}
+
+// RegisterStorageServiceHandler registers the http handlers for service StorageService to "mux".
+// The handlers forward requests to the grpc endpoint over "conn".
+func RegisterStorageServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error {
+ return RegisterStorageServiceHandlerClient(ctx, mux, NewStorageServiceClient(conn))
+}
+
+// RegisterStorageServiceHandlerClient registers the http handlers for service StorageService
+// to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "StorageServiceClient".
+// Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "StorageServiceClient"
+// doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in
+// "StorageServiceClient" to call the correct interceptors.
+func RegisterStorageServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client StorageServiceClient) error {
+
+ mux.Handle("POST", pattern_StorageService_CreateStorage_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)
+ var err error
+ var annotatedContext context.Context
+ annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/memos.api.v2.StorageService/CreateStorage", runtime.WithHTTPPathPattern("/api/v2/storages"))
+ if err != nil {
+ runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
+ return
+ }
+ resp, md, err := request_StorageService_CreateStorage_0(annotatedContext, inboundMarshaler, client, req, pathParams)
+ annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
+ if err != nil {
+ runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
+ return
+ }
+
+ forward_StorageService_CreateStorage_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
+
+ })
+
+ mux.Handle("GET", pattern_StorageService_GetStorage_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)
+ var err error
+ var annotatedContext context.Context
+ annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/memos.api.v2.StorageService/GetStorage", runtime.WithHTTPPathPattern("/api/v2/storages/{id}"))
+ if err != nil {
+ runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
+ return
+ }
+ resp, md, err := request_StorageService_GetStorage_0(annotatedContext, inboundMarshaler, client, req, pathParams)
+ annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
+ if err != nil {
+ runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
+ return
+ }
+
+ forward_StorageService_GetStorage_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
+
+ })
+
+ mux.Handle("GET", pattern_StorageService_ListStorages_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)
+ var err error
+ var annotatedContext context.Context
+ annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/memos.api.v2.StorageService/ListStorages", runtime.WithHTTPPathPattern("/api/v2/storages"))
+ if err != nil {
+ runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
+ return
+ }
+ resp, md, err := request_StorageService_ListStorages_0(annotatedContext, inboundMarshaler, client, req, pathParams)
+ annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
+ if err != nil {
+ runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
+ return
+ }
+
+ forward_StorageService_ListStorages_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
+
+ })
+
+ mux.Handle("PATCH", pattern_StorageService_UpdateStorage_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)
+ var err error
+ var annotatedContext context.Context
+ annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/memos.api.v2.StorageService/UpdateStorage", runtime.WithHTTPPathPattern("/api/v2/storages/{storage.id}"))
+ if err != nil {
+ runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
+ return
+ }
+ resp, md, err := request_StorageService_UpdateStorage_0(annotatedContext, inboundMarshaler, client, req, pathParams)
+ annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
+ if err != nil {
+ runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
+ return
+ }
+
+ forward_StorageService_UpdateStorage_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
+
+ })
+
+ mux.Handle("DELETE", pattern_StorageService_DeleteStorage_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)
+ var err error
+ var annotatedContext context.Context
+ annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/memos.api.v2.StorageService/DeleteStorage", runtime.WithHTTPPathPattern("/api/v2/storages/{id}"))
+ if err != nil {
+ runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
+ return
+ }
+ resp, md, err := request_StorageService_DeleteStorage_0(annotatedContext, inboundMarshaler, client, req, pathParams)
+ annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
+ if err != nil {
+ runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
+ return
+ }
+
+ forward_StorageService_DeleteStorage_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
+
+ })
+
+ return nil
+}
+
+var (
+ pattern_StorageService_CreateStorage_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"api", "v2", "storages"}, ""))
+
+ pattern_StorageService_GetStorage_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3}, []string{"api", "v2", "storages", "id"}, ""))
+
+ pattern_StorageService_ListStorages_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"api", "v2", "storages"}, ""))
+
+ pattern_StorageService_UpdateStorage_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3}, []string{"api", "v2", "storages", "storage.id"}, ""))
+
+ pattern_StorageService_DeleteStorage_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3}, []string{"api", "v2", "storages", "id"}, ""))
+)
+
+var (
+ forward_StorageService_CreateStorage_0 = runtime.ForwardResponseMessage
+
+ forward_StorageService_GetStorage_0 = runtime.ForwardResponseMessage
+
+ forward_StorageService_ListStorages_0 = runtime.ForwardResponseMessage
+
+ forward_StorageService_UpdateStorage_0 = runtime.ForwardResponseMessage
+
+ forward_StorageService_DeleteStorage_0 = runtime.ForwardResponseMessage
+)
diff --git a/proto/gen/api/v2/storage_service_grpc.pb.go b/proto/gen/api/v2/storage_service_grpc.pb.go
new file mode 100644
index 000000000..1cee8e42a
--- /dev/null
+++ b/proto/gen/api/v2/storage_service_grpc.pb.go
@@ -0,0 +1,267 @@
+// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
+// versions:
+// - protoc-gen-go-grpc v1.3.0
+// - protoc (unknown)
+// source: api/v2/storage_service.proto
+
+package apiv2
+
+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
+
+const (
+ StorageService_CreateStorage_FullMethodName = "/memos.api.v2.StorageService/CreateStorage"
+ StorageService_GetStorage_FullMethodName = "/memos.api.v2.StorageService/GetStorage"
+ StorageService_ListStorages_FullMethodName = "/memos.api.v2.StorageService/ListStorages"
+ StorageService_UpdateStorage_FullMethodName = "/memos.api.v2.StorageService/UpdateStorage"
+ StorageService_DeleteStorage_FullMethodName = "/memos.api.v2.StorageService/DeleteStorage"
+)
+
+// StorageServiceClient is the client API for StorageService 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 StorageServiceClient interface {
+ // CreateStorage creates a new storage.
+ CreateStorage(ctx context.Context, in *CreateStorageRequest, opts ...grpc.CallOption) (*CreateStorageResponse, error)
+ // GetStorage returns a storage by id.
+ GetStorage(ctx context.Context, in *GetStorageRequest, opts ...grpc.CallOption) (*GetStorageResponse, error)
+ // ListStorages returns a list of storages.
+ ListStorages(ctx context.Context, in *ListStoragesRequest, opts ...grpc.CallOption) (*ListStoragesResponse, error)
+ // UpdateStorage updates a storage.
+ UpdateStorage(ctx context.Context, in *UpdateStorageRequest, opts ...grpc.CallOption) (*UpdateStorageResponse, error)
+ // DeleteStorage deletes a storage by id.
+ DeleteStorage(ctx context.Context, in *DeleteStorageRequest, opts ...grpc.CallOption) (*DeleteStorageResponse, error)
+}
+
+type storageServiceClient struct {
+ cc grpc.ClientConnInterface
+}
+
+func NewStorageServiceClient(cc grpc.ClientConnInterface) StorageServiceClient {
+ return &storageServiceClient{cc}
+}
+
+func (c *storageServiceClient) CreateStorage(ctx context.Context, in *CreateStorageRequest, opts ...grpc.CallOption) (*CreateStorageResponse, error) {
+ out := new(CreateStorageResponse)
+ err := c.cc.Invoke(ctx, StorageService_CreateStorage_FullMethodName, in, out, opts...)
+ if err != nil {
+ return nil, err
+ }
+ return out, nil
+}
+
+func (c *storageServiceClient) GetStorage(ctx context.Context, in *GetStorageRequest, opts ...grpc.CallOption) (*GetStorageResponse, error) {
+ out := new(GetStorageResponse)
+ err := c.cc.Invoke(ctx, StorageService_GetStorage_FullMethodName, in, out, opts...)
+ if err != nil {
+ return nil, err
+ }
+ return out, nil
+}
+
+func (c *storageServiceClient) ListStorages(ctx context.Context, in *ListStoragesRequest, opts ...grpc.CallOption) (*ListStoragesResponse, error) {
+ out := new(ListStoragesResponse)
+ err := c.cc.Invoke(ctx, StorageService_ListStorages_FullMethodName, in, out, opts...)
+ if err != nil {
+ return nil, err
+ }
+ return out, nil
+}
+
+func (c *storageServiceClient) UpdateStorage(ctx context.Context, in *UpdateStorageRequest, opts ...grpc.CallOption) (*UpdateStorageResponse, error) {
+ out := new(UpdateStorageResponse)
+ err := c.cc.Invoke(ctx, StorageService_UpdateStorage_FullMethodName, in, out, opts...)
+ if err != nil {
+ return nil, err
+ }
+ return out, nil
+}
+
+func (c *storageServiceClient) DeleteStorage(ctx context.Context, in *DeleteStorageRequest, opts ...grpc.CallOption) (*DeleteStorageResponse, error) {
+ out := new(DeleteStorageResponse)
+ err := c.cc.Invoke(ctx, StorageService_DeleteStorage_FullMethodName, in, out, opts...)
+ if err != nil {
+ return nil, err
+ }
+ return out, nil
+}
+
+// StorageServiceServer is the server API for StorageService service.
+// All implementations must embed UnimplementedStorageServiceServer
+// for forward compatibility
+type StorageServiceServer interface {
+ // CreateStorage creates a new storage.
+ CreateStorage(context.Context, *CreateStorageRequest) (*CreateStorageResponse, error)
+ // GetStorage returns a storage by id.
+ GetStorage(context.Context, *GetStorageRequest) (*GetStorageResponse, error)
+ // ListStorages returns a list of storages.
+ ListStorages(context.Context, *ListStoragesRequest) (*ListStoragesResponse, error)
+ // UpdateStorage updates a storage.
+ UpdateStorage(context.Context, *UpdateStorageRequest) (*UpdateStorageResponse, error)
+ // DeleteStorage deletes a storage by id.
+ DeleteStorage(context.Context, *DeleteStorageRequest) (*DeleteStorageResponse, error)
+ mustEmbedUnimplementedStorageServiceServer()
+}
+
+// UnimplementedStorageServiceServer must be embedded to have forward compatible implementations.
+type UnimplementedStorageServiceServer struct {
+}
+
+func (UnimplementedStorageServiceServer) CreateStorage(context.Context, *CreateStorageRequest) (*CreateStorageResponse, error) {
+ return nil, status.Errorf(codes.Unimplemented, "method CreateStorage not implemented")
+}
+func (UnimplementedStorageServiceServer) GetStorage(context.Context, *GetStorageRequest) (*GetStorageResponse, error) {
+ return nil, status.Errorf(codes.Unimplemented, "method GetStorage not implemented")
+}
+func (UnimplementedStorageServiceServer) ListStorages(context.Context, *ListStoragesRequest) (*ListStoragesResponse, error) {
+ return nil, status.Errorf(codes.Unimplemented, "method ListStorages not implemented")
+}
+func (UnimplementedStorageServiceServer) UpdateStorage(context.Context, *UpdateStorageRequest) (*UpdateStorageResponse, error) {
+ return nil, status.Errorf(codes.Unimplemented, "method UpdateStorage not implemented")
+}
+func (UnimplementedStorageServiceServer) DeleteStorage(context.Context, *DeleteStorageRequest) (*DeleteStorageResponse, error) {
+ return nil, status.Errorf(codes.Unimplemented, "method DeleteStorage not implemented")
+}
+func (UnimplementedStorageServiceServer) mustEmbedUnimplementedStorageServiceServer() {}
+
+// UnsafeStorageServiceServer may be embedded to opt out of forward compatibility for this service.
+// Use of this interface is not recommended, as added methods to StorageServiceServer will
+// result in compilation errors.
+type UnsafeStorageServiceServer interface {
+ mustEmbedUnimplementedStorageServiceServer()
+}
+
+func RegisterStorageServiceServer(s grpc.ServiceRegistrar, srv StorageServiceServer) {
+ s.RegisterService(&StorageService_ServiceDesc, srv)
+}
+
+func _StorageService_CreateStorage_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
+ in := new(CreateStorageRequest)
+ if err := dec(in); err != nil {
+ return nil, err
+ }
+ if interceptor == nil {
+ return srv.(StorageServiceServer).CreateStorage(ctx, in)
+ }
+ info := &grpc.UnaryServerInfo{
+ Server: srv,
+ FullMethod: StorageService_CreateStorage_FullMethodName,
+ }
+ handler := func(ctx context.Context, req interface{}) (interface{}, error) {
+ return srv.(StorageServiceServer).CreateStorage(ctx, req.(*CreateStorageRequest))
+ }
+ return interceptor(ctx, in, info, handler)
+}
+
+func _StorageService_GetStorage_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
+ in := new(GetStorageRequest)
+ if err := dec(in); err != nil {
+ return nil, err
+ }
+ if interceptor == nil {
+ return srv.(StorageServiceServer).GetStorage(ctx, in)
+ }
+ info := &grpc.UnaryServerInfo{
+ Server: srv,
+ FullMethod: StorageService_GetStorage_FullMethodName,
+ }
+ handler := func(ctx context.Context, req interface{}) (interface{}, error) {
+ return srv.(StorageServiceServer).GetStorage(ctx, req.(*GetStorageRequest))
+ }
+ return interceptor(ctx, in, info, handler)
+}
+
+func _StorageService_ListStorages_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
+ in := new(ListStoragesRequest)
+ if err := dec(in); err != nil {
+ return nil, err
+ }
+ if interceptor == nil {
+ return srv.(StorageServiceServer).ListStorages(ctx, in)
+ }
+ info := &grpc.UnaryServerInfo{
+ Server: srv,
+ FullMethod: StorageService_ListStorages_FullMethodName,
+ }
+ handler := func(ctx context.Context, req interface{}) (interface{}, error) {
+ return srv.(StorageServiceServer).ListStorages(ctx, req.(*ListStoragesRequest))
+ }
+ return interceptor(ctx, in, info, handler)
+}
+
+func _StorageService_UpdateStorage_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
+ in := new(UpdateStorageRequest)
+ if err := dec(in); err != nil {
+ return nil, err
+ }
+ if interceptor == nil {
+ return srv.(StorageServiceServer).UpdateStorage(ctx, in)
+ }
+ info := &grpc.UnaryServerInfo{
+ Server: srv,
+ FullMethod: StorageService_UpdateStorage_FullMethodName,
+ }
+ handler := func(ctx context.Context, req interface{}) (interface{}, error) {
+ return srv.(StorageServiceServer).UpdateStorage(ctx, req.(*UpdateStorageRequest))
+ }
+ return interceptor(ctx, in, info, handler)
+}
+
+func _StorageService_DeleteStorage_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
+ in := new(DeleteStorageRequest)
+ if err := dec(in); err != nil {
+ return nil, err
+ }
+ if interceptor == nil {
+ return srv.(StorageServiceServer).DeleteStorage(ctx, in)
+ }
+ info := &grpc.UnaryServerInfo{
+ Server: srv,
+ FullMethod: StorageService_DeleteStorage_FullMethodName,
+ }
+ handler := func(ctx context.Context, req interface{}) (interface{}, error) {
+ return srv.(StorageServiceServer).DeleteStorage(ctx, req.(*DeleteStorageRequest))
+ }
+ return interceptor(ctx, in, info, handler)
+}
+
+// StorageService_ServiceDesc is the grpc.ServiceDesc for StorageService service.
+// It's only intended for direct use with grpc.RegisterService,
+// and not to be introspected or modified (even as a copy)
+var StorageService_ServiceDesc = grpc.ServiceDesc{
+ ServiceName: "memos.api.v2.StorageService",
+ HandlerType: (*StorageServiceServer)(nil),
+ Methods: []grpc.MethodDesc{
+ {
+ MethodName: "CreateStorage",
+ Handler: _StorageService_CreateStorage_Handler,
+ },
+ {
+ MethodName: "GetStorage",
+ Handler: _StorageService_GetStorage_Handler,
+ },
+ {
+ MethodName: "ListStorages",
+ Handler: _StorageService_ListStorages_Handler,
+ },
+ {
+ MethodName: "UpdateStorage",
+ Handler: _StorageService_UpdateStorage_Handler,
+ },
+ {
+ MethodName: "DeleteStorage",
+ Handler: _StorageService_DeleteStorage_Handler,
+ },
+ },
+ Streams: []grpc.StreamDesc{},
+ Metadata: "api/v2/storage_service.proto",
+}
diff --git a/proto/gen/store/README.md b/proto/gen/store/README.md
index cf20b12be..ee7ad8a6b 100644
--- a/proto/gen/store/README.md
+++ b/proto/gen/store/README.md
@@ -12,9 +12,9 @@
- [RowStatus](#memos-store-RowStatus)
- [store/idp.proto](#store_idp-proto)
+ - [FieldMapping](#memos-store-FieldMapping)
- [IdentityProviderConfig](#memos-store-IdentityProviderConfig)
- - [IdentityProviderConfig.FieldMapping](#memos-store-IdentityProviderConfig-FieldMapping)
- - [IdentityProviderConfig.OAuth2](#memos-store-IdentityProviderConfig-OAuth2)
+ - [OAuth2Config](#memos-store-OAuth2Config)
- [store/inbox.proto](#store_inbox-proto)
- [InboxMessage](#memos-store-InboxMessage)
@@ -158,41 +158,41 @@
-<a name="memos-store-IdentityProviderConfig"></a>
+<a name="memos-store-FieldMapping"></a>
-### IdentityProviderConfig
+### FieldMapping
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| oauth2 | [IdentityProviderConfig.OAuth2](#memos-store-IdentityProviderConfig-OAuth2) | | |
+| identifier | [string](#string) | | |
+| display_name | [string](#string) | | |
+| email | [string](#string) | | |
-<a name="memos-store-IdentityProviderConfig-FieldMapping"></a>
+<a name="memos-store-IdentityProviderConfig"></a>
-### IdentityProviderConfig.FieldMapping
+### IdentityProviderConfig
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| identifier | [string](#string) | | |
-| display_name | [string](#string) | | |
-| email | [string](#string) | | |
+| oauth2 | [OAuth2Config](#memos-store-OAuth2Config) | | |
-<a name="memos-store-IdentityProviderConfig-OAuth2"></a>
+<a name="memos-store-OAuth2Config"></a>
-### IdentityProviderConfig.OAuth2
+### OAuth2Config
@@ -204,7 +204,7 @@
| token_url | [string](#string) | | |
| user_info_url | [string](#string) | | |
| scopes | [string](#string) | repeated | |
-| field_mapping | [IdentityProviderConfig.FieldMapping](#memos-store-IdentityProviderConfig-FieldMapping) | | |
+| field_mapping | [FieldMapping](#memos-store-FieldMapping) | | |
diff --git a/proto/gen/store/idp.pb.go b/proto/gen/store/idp.pb.go
index 318e1cd97..fc8c8e0bf 100644
--- a/proto/gen/store/idp.pb.go
+++ b/proto/gen/store/idp.pb.go
@@ -70,7 +70,7 @@ func (m *IdentityProviderConfig) GetConfig() isIdentityProviderConfig_Config {
return nil
}
-func (x *IdentityProviderConfig) GetOauth2() *IdentityProviderConfig_OAuth2 {
+func (x *IdentityProviderConfig) GetOauth2() *OAuth2Config {
if x, ok := x.GetConfig().(*IdentityProviderConfig_Oauth2); ok {
return x.Oauth2
}
@@ -82,12 +82,12 @@ type isIdentityProviderConfig_Config interface {
}
type IdentityProviderConfig_Oauth2 struct {
- Oauth2 *IdentityProviderConfig_OAuth2 `protobuf:"bytes,1,opt,name=oauth2,proto3,oneof"`
+ Oauth2 *OAuth2Config `protobuf:"bytes,1,opt,name=oauth2,proto3,oneof"`
}
func (*IdentityProviderConfig_Oauth2) isIdentityProviderConfig_Config() {}
-type IdentityProviderConfig_FieldMapping struct {
+type FieldMapping struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
@@ -97,8 +97,8 @@ type IdentityProviderConfig_FieldMapping struct {
Email string `protobuf:"bytes,3,opt,name=email,proto3" json:"email,omitempty"`
}
-func (x *IdentityProviderConfig_FieldMapping) Reset() {
- *x = IdentityProviderConfig_FieldMapping{}
+func (x *FieldMapping) Reset() {
+ *x = FieldMapping{}
if protoimpl.UnsafeEnabled {
mi := &file_store_idp_proto_msgTypes[1]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
@@ -106,13 +106,13 @@ func (x *IdentityProviderConfig_FieldMapping) Reset() {
}
}
-func (x *IdentityProviderConfig_FieldMapping) String() string {
+func (x *FieldMapping) String() string {
return protoimpl.X.MessageStringOf(x)
}
-func (*IdentityProviderConfig_FieldMapping) ProtoMessage() {}
+func (*FieldMapping) ProtoMessage() {}
-func (x *IdentityProviderConfig_FieldMapping) ProtoReflect() protoreflect.Message {
+func (x *FieldMapping) ProtoReflect() protoreflect.Message {
mi := &file_store_idp_proto_msgTypes[1]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
@@ -124,48 +124,48 @@ func (x *IdentityProviderConfig_FieldMapping) ProtoReflect() protoreflect.Messag
return mi.MessageOf(x)
}
-// Deprecated: Use IdentityProviderConfig_FieldMapping.ProtoReflect.Descriptor instead.
-func (*IdentityProviderConfig_FieldMapping) Descriptor() ([]byte, []int) {
- return file_store_idp_proto_rawDescGZIP(), []int{0, 0}
+// Deprecated: Use FieldMapping.ProtoReflect.Descriptor instead.
+func (*FieldMapping) Descriptor() ([]byte, []int) {
+ return file_store_idp_proto_rawDescGZIP(), []int{1}
}
-func (x *IdentityProviderConfig_FieldMapping) GetIdentifier() string {
+func (x *FieldMapping) GetIdentifier() string {
if x != nil {
return x.Identifier
}
return ""
}
-func (x *IdentityProviderConfig_FieldMapping) GetDisplayName() string {
+func (x *FieldMapping) GetDisplayName() string {
if x != nil {
return x.DisplayName
}
return ""
}
-func (x *IdentityProviderConfig_FieldMapping) GetEmail() string {
+func (x *FieldMapping) GetEmail() string {
if x != nil {
return x.Email
}
return ""
}
-type IdentityProviderConfig_OAuth2 struct {
+type OAuth2Config struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
- ClientId string `protobuf:"bytes,1,opt,name=client_id,json=clientId,proto3" json:"client_id,omitempty"`
- ClientSecret string `protobuf:"bytes,2,opt,name=client_secret,json=clientSecret,proto3" json:"client_secret,omitempty"`
- AuthUrl string `protobuf:"bytes,3,opt,name=auth_url,json=authUrl,proto3" json:"auth_url,omitempty"`
- TokenUrl string `protobuf:"bytes,4,opt,name=token_url,json=tokenUrl,proto3" json:"token_url,omitempty"`
- UserInfoUrl string `protobuf:"bytes,5,opt,name=user_info_url,json=userInfoUrl,proto3" json:"user_info_url,omitempty"`
- Scopes []string `protobuf:"bytes,6,rep,name=scopes,proto3" json:"scopes,omitempty"`
- FieldMapping *IdentityProviderConfig_FieldMapping `protobuf:"bytes,7,opt,name=field_mapping,json=fieldMapping,proto3" json:"field_mapping,omitempty"`
+ ClientId string `protobuf:"bytes,1,opt,name=client_id,json=clientId,proto3" json:"client_id,omitempty"`
+ ClientSecret string `protobuf:"bytes,2,opt,name=client_secret,json=clientSecret,proto3" json:"client_secret,omitempty"`
+ AuthUrl string `protobuf:"bytes,3,opt,name=auth_url,json=authUrl,proto3" json:"auth_url,omitempty"`
+ TokenUrl string `protobuf:"bytes,4,opt,name=token_url,json=tokenUrl,proto3" json:"token_url,omitempty"`
+ UserInfoUrl string `protobuf:"bytes,5,opt,name=user_info_url,json=userInfoUrl,proto3" json:"user_info_url,omitempty"`
+ Scopes []string `protobuf:"bytes,6,rep,name=scopes,proto3" json:"scopes,omitempty"`
+ FieldMapping *FieldMapping `protobuf:"bytes,7,opt,name=field_mapping,json=fieldMapping,proto3" json:"field_mapping,omitempty"`
}
-func (x *IdentityProviderConfig_OAuth2) Reset() {
- *x = IdentityProviderConfig_OAuth2{}
+func (x *OAuth2Config) Reset() {
+ *x = OAuth2Config{}
if protoimpl.UnsafeEnabled {
mi := &file_store_idp_proto_msgTypes[2]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
@@ -173,13 +173,13 @@ func (x *IdentityProviderConfig_OAuth2) Reset() {
}
}
-func (x *IdentityProviderConfig_OAuth2) String() string {
+func (x *OAuth2Config) String() string {
return protoimpl.X.MessageStringOf(x)
}
-func (*IdentityProviderConfig_OAuth2) ProtoMessage() {}
+func (*OAuth2Config) ProtoMessage() {}
-func (x *IdentityProviderConfig_OAuth2) ProtoReflect() protoreflect.Message {
+func (x *OAuth2Config) ProtoReflect() protoreflect.Message {
mi := &file_store_idp_proto_msgTypes[2]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
@@ -191,54 +191,54 @@ func (x *IdentityProviderConfig_OAuth2) ProtoReflect() protoreflect.Message {
return mi.MessageOf(x)
}
-// Deprecated: Use IdentityProviderConfig_OAuth2.ProtoReflect.Descriptor instead.
-func (*IdentityProviderConfig_OAuth2) Descriptor() ([]byte, []int) {
- return file_store_idp_proto_rawDescGZIP(), []int{0, 1}
+// Deprecated: Use OAuth2Config.ProtoReflect.Descriptor instead.
+func (*OAuth2Config) Descriptor() ([]byte, []int) {
+ return file_store_idp_proto_rawDescGZIP(), []int{2}
}
-func (x *IdentityProviderConfig_OAuth2) GetClientId() string {
+func (x *OAuth2Config) GetClientId() string {
if x != nil {
return x.ClientId
}
return ""
}
-func (x *IdentityProviderConfig_OAuth2) GetClientSecret() string {
+func (x *OAuth2Config) GetClientSecret() string {
if x != nil {
return x.ClientSecret
}
return ""
}
-func (x *IdentityProviderConfig_OAuth2) GetAuthUrl() string {
+func (x *OAuth2Config) GetAuthUrl() string {
if x != nil {
return x.AuthUrl
}
return ""
}
-func (x *IdentityProviderConfig_OAuth2) GetTokenUrl() string {
+func (x *OAuth2Config) GetTokenUrl() string {
if x != nil {
return x.TokenUrl
}
return ""
}
-func (x *IdentityProviderConfig_OAuth2) GetUserInfoUrl() string {
+func (x *OAuth2Config) GetUserInfoUrl() string {
if x != nil {
return x.UserInfoUrl
}
return ""
}
-func (x *IdentityProviderConfig_OAuth2) GetScopes() []string {
+func (x *OAuth2Config) GetScopes() []string {
if x != nil {
return x.Scopes
}
return nil
}
-func (x *IdentityProviderConfig_OAuth2) GetFieldMapping() *IdentityProviderConfig_FieldMapping {
+func (x *OAuth2Config) GetFieldMapping() *FieldMapping {
if x != nil {
return x.FieldMapping
}
@@ -249,48 +249,46 @@ var File_store_idp_proto protoreflect.FileDescriptor
var file_store_idp_proto_rawDesc = []byte{
0x0a, 0x0f, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x2f, 0x69, 0x64, 0x70, 0x2e, 0x70, 0x72, 0x6f, 0x74,
- 0x6f, 0x12, 0x0b, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x22, 0xe9,
- 0x03, 0x0a, 0x16, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x50, 0x72, 0x6f, 0x76, 0x69,
- 0x64, 0x65, 0x72, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x44, 0x0a, 0x06, 0x6f, 0x61, 0x75,
- 0x74, 0x68, 0x32, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2a, 0x2e, 0x6d, 0x65, 0x6d, 0x6f,
- 0x73, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x2e, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79,
- 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x4f,
- 0x41, 0x75, 0x74, 0x68, 0x32, 0x48, 0x00, 0x52, 0x06, 0x6f, 0x61, 0x75, 0x74, 0x68, 0x32, 0x1a,
- 0x67, 0x0a, 0x0c, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x12,
- 0x1e, 0x0a, 0x0a, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x66, 0x69, 0x65, 0x72, 0x18, 0x01, 0x20,
- 0x01, 0x28, 0x09, 0x52, 0x0a, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x66, 0x69, 0x65, 0x72, 0x12,
- 0x21, 0x0a, 0x0c, 0x64, 0x69, 0x73, 0x70, 0x6c, 0x61, 0x79, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18,
- 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, 0x69, 0x73, 0x70, 0x6c, 0x61, 0x79, 0x4e, 0x61,
- 0x6d, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x18, 0x03, 0x20, 0x01, 0x28,
- 0x09, 0x52, 0x05, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x1a, 0x95, 0x02, 0x0a, 0x06, 0x4f, 0x41, 0x75,
- 0x74, 0x68, 0x32, 0x12, 0x1b, 0x0a, 0x09, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x5f, 0x69, 0x64,
- 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x49, 0x64,
- 0x12, 0x23, 0x0a, 0x0d, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x5f, 0x73, 0x65, 0x63, 0x72, 0x65,
- 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x53,
- 0x65, 0x63, 0x72, 0x65, 0x74, 0x12, 0x19, 0x0a, 0x08, 0x61, 0x75, 0x74, 0x68, 0x5f, 0x75, 0x72,
- 0x6c, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x61, 0x75, 0x74, 0x68, 0x55, 0x72, 0x6c,
- 0x12, 0x1b, 0x0a, 0x09, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x5f, 0x75, 0x72, 0x6c, 0x18, 0x04, 0x20,
- 0x01, 0x28, 0x09, 0x52, 0x08, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x55, 0x72, 0x6c, 0x12, 0x22, 0x0a,
- 0x0d, 0x75, 0x73, 0x65, 0x72, 0x5f, 0x69, 0x6e, 0x66, 0x6f, 0x5f, 0x75, 0x72, 0x6c, 0x18, 0x05,
- 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x75, 0x73, 0x65, 0x72, 0x49, 0x6e, 0x66, 0x6f, 0x55, 0x72,
- 0x6c, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x63, 0x6f, 0x70, 0x65, 0x73, 0x18, 0x06, 0x20, 0x03, 0x28,
- 0x09, 0x52, 0x06, 0x73, 0x63, 0x6f, 0x70, 0x65, 0x73, 0x12, 0x55, 0x0a, 0x0d, 0x66, 0x69, 0x65,
- 0x6c, 0x64, 0x5f, 0x6d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b,
- 0x32, 0x30, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x2e, 0x49,
- 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x43,
- 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4d, 0x61, 0x70, 0x70, 0x69,
- 0x6e, 0x67, 0x52, 0x0c, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x4d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67,
- 0x42, 0x08, 0x0a, 0x06, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x42, 0x93, 0x01, 0x0a, 0x0f, 0x63,
- 0x6f, 0x6d, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x42, 0x08,
- 0x49, 0x64, 0x70, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x29, 0x67, 0x69, 0x74, 0x68,
- 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x75, 0x73, 0x65, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2f,
- 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x65, 0x6e, 0x2f,
- 0x73, 0x74, 0x6f, 0x72, 0x65, 0xa2, 0x02, 0x03, 0x4d, 0x53, 0x58, 0xaa, 0x02, 0x0b, 0x4d, 0x65,
- 0x6d, 0x6f, 0x73, 0x2e, 0x53, 0x74, 0x6f, 0x72, 0x65, 0xca, 0x02, 0x0b, 0x4d, 0x65, 0x6d, 0x6f,
- 0x73, 0x5c, 0x53, 0x74, 0x6f, 0x72, 0x65, 0xe2, 0x02, 0x17, 0x4d, 0x65, 0x6d, 0x6f, 0x73, 0x5c,
- 0x53, 0x74, 0x6f, 0x72, 0x65, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74,
- 0x61, 0xea, 0x02, 0x0c, 0x4d, 0x65, 0x6d, 0x6f, 0x73, 0x3a, 0x3a, 0x53, 0x74, 0x6f, 0x72, 0x65,
- 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
+ 0x6f, 0x12, 0x0b, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x22, 0x57,
+ 0x0a, 0x16, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64,
+ 0x65, 0x72, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x33, 0x0a, 0x06, 0x6f, 0x61, 0x75, 0x74,
+ 0x68, 0x32, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73,
+ 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x2e, 0x4f, 0x41, 0x75, 0x74, 0x68, 0x32, 0x43, 0x6f, 0x6e,
+ 0x66, 0x69, 0x67, 0x48, 0x00, 0x52, 0x06, 0x6f, 0x61, 0x75, 0x74, 0x68, 0x32, 0x42, 0x08, 0x0a,
+ 0x06, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x22, 0x67, 0x0a, 0x0c, 0x46, 0x69, 0x65, 0x6c, 0x64,
+ 0x4d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x12, 0x1e, 0x0a, 0x0a, 0x69, 0x64, 0x65, 0x6e, 0x74,
+ 0x69, 0x66, 0x69, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x69, 0x64, 0x65,
+ 0x6e, 0x74, 0x69, 0x66, 0x69, 0x65, 0x72, 0x12, 0x21, 0x0a, 0x0c, 0x64, 0x69, 0x73, 0x70, 0x6c,
+ 0x61, 0x79, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64,
+ 0x69, 0x73, 0x70, 0x6c, 0x61, 0x79, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x65, 0x6d,
+ 0x61, 0x69, 0x6c, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x65, 0x6d, 0x61, 0x69, 0x6c,
+ 0x22, 0x84, 0x02, 0x0a, 0x0c, 0x4f, 0x41, 0x75, 0x74, 0x68, 0x32, 0x43, 0x6f, 0x6e, 0x66, 0x69,
+ 0x67, 0x12, 0x1b, 0x0a, 0x09, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x01,
+ 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x49, 0x64, 0x12, 0x23,
+ 0x0a, 0x0d, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x5f, 0x73, 0x65, 0x63, 0x72, 0x65, 0x74, 0x18,
+ 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x53, 0x65, 0x63,
+ 0x72, 0x65, 0x74, 0x12, 0x19, 0x0a, 0x08, 0x61, 0x75, 0x74, 0x68, 0x5f, 0x75, 0x72, 0x6c, 0x18,
+ 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x61, 0x75, 0x74, 0x68, 0x55, 0x72, 0x6c, 0x12, 0x1b,
+ 0x0a, 0x09, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x5f, 0x75, 0x72, 0x6c, 0x18, 0x04, 0x20, 0x01, 0x28,
+ 0x09, 0x52, 0x08, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x55, 0x72, 0x6c, 0x12, 0x22, 0x0a, 0x0d, 0x75,
+ 0x73, 0x65, 0x72, 0x5f, 0x69, 0x6e, 0x66, 0x6f, 0x5f, 0x75, 0x72, 0x6c, 0x18, 0x05, 0x20, 0x01,
+ 0x28, 0x09, 0x52, 0x0b, 0x75, 0x73, 0x65, 0x72, 0x49, 0x6e, 0x66, 0x6f, 0x55, 0x72, 0x6c, 0x12,
+ 0x16, 0x0a, 0x06, 0x73, 0x63, 0x6f, 0x70, 0x65, 0x73, 0x18, 0x06, 0x20, 0x03, 0x28, 0x09, 0x52,
+ 0x06, 0x73, 0x63, 0x6f, 0x70, 0x65, 0x73, 0x12, 0x3e, 0x0a, 0x0d, 0x66, 0x69, 0x65, 0x6c, 0x64,
+ 0x5f, 0x6d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19,
+ 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x2e, 0x46, 0x69, 0x65,
+ 0x6c, 0x64, 0x4d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x52, 0x0c, 0x66, 0x69, 0x65, 0x6c, 0x64,
+ 0x4d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x42, 0x93, 0x01, 0x0a, 0x0f, 0x63, 0x6f, 0x6d, 0x2e,
+ 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x42, 0x08, 0x49, 0x64, 0x70,
+ 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x29, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e,
+ 0x63, 0x6f, 0x6d, 0x2f, 0x75, 0x73, 0x65, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2f, 0x6d, 0x65, 0x6d,
+ 0x6f, 0x73, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x65, 0x6e, 0x2f, 0x73, 0x74, 0x6f,
+ 0x72, 0x65, 0xa2, 0x02, 0x03, 0x4d, 0x53, 0x58, 0xaa, 0x02, 0x0b, 0x4d, 0x65, 0x6d, 0x6f, 0x73,
+ 0x2e, 0x53, 0x74, 0x6f, 0x72, 0x65, 0xca, 0x02, 0x0b, 0x4d, 0x65, 0x6d, 0x6f, 0x73, 0x5c, 0x53,
+ 0x74, 0x6f, 0x72, 0x65, 0xe2, 0x02, 0x17, 0x4d, 0x65, 0x6d, 0x6f, 0x73, 0x5c, 0x53, 0x74, 0x6f,
+ 0x72, 0x65, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02,
+ 0x0c, 0x4d, 0x65, 0x6d, 0x6f, 0x73, 0x3a, 0x3a, 0x53, 0x74, 0x6f, 0x72, 0x65, 0x62, 0x06, 0x70,
+ 0x72, 0x6f, 0x74, 0x6f, 0x33,
}
var (
@@ -307,13 +305,13 @@ func file_store_idp_proto_rawDescGZIP() []byte {
var file_store_idp_proto_msgTypes = make([]protoimpl.MessageInfo, 3)
var file_store_idp_proto_goTypes = []interface{}{
- (*IdentityProviderConfig)(nil), // 0: memos.store.IdentityProviderConfig
- (*IdentityProviderConfig_FieldMapping)(nil), // 1: memos.store.IdentityProviderConfig.FieldMapping
- (*IdentityProviderConfig_OAuth2)(nil), // 2: memos.store.IdentityProviderConfig.OAuth2
+ (*IdentityProviderConfig)(nil), // 0: memos.store.IdentityProviderConfig
+ (*FieldMapping)(nil), // 1: memos.store.FieldMapping
+ (*OAuth2Config)(nil), // 2: memos.store.OAuth2Config
}
var file_store_idp_proto_depIdxs = []int32{
- 2, // 0: memos.store.IdentityProviderConfig.oauth2:type_name -> memos.store.IdentityProviderConfig.OAuth2
- 1, // 1: memos.store.IdentityProviderConfig.OAuth2.field_mapping:type_name -> memos.store.IdentityProviderConfig.FieldMapping
+ 2, // 0: memos.store.IdentityProviderConfig.oauth2:type_name -> memos.store.OAuth2Config
+ 1, // 1: memos.store.OAuth2Config.field_mapping:type_name -> memos.store.FieldMapping
2, // [2:2] is the sub-list for method output_type
2, // [2:2] is the sub-list for method input_type
2, // [2:2] is the sub-list for extension type_name
@@ -340,7 +338,7 @@ func file_store_idp_proto_init() {
}
}
file_store_idp_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*IdentityProviderConfig_FieldMapping); i {
+ switch v := v.(*FieldMapping); i {
case 0:
return &v.state
case 1:
@@ -352,7 +350,7 @@ func file_store_idp_proto_init() {
}
}
file_store_idp_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*IdentityProviderConfig_OAuth2); i {
+ switch v := v.(*OAuth2Config); i {
case 0:
return &v.state
case 1:
diff --git a/proto/store/idp.proto b/proto/store/idp.proto
index b60c7ceda..94b9a588e 100644
--- a/proto/store/idp.proto
+++ b/proto/store/idp.proto
@@ -5,23 +5,23 @@ package memos.store;
option go_package = "gen/store";
message IdentityProviderConfig {
- message FieldMapping {
- string identifier = 1;
- string display_name = 2;
- string email = 3;
+ oneof config {
+ OAuth2Config oauth2 = 1;
}
+}
- message OAuth2 {
- string client_id = 1;
- string client_secret = 2;
- string auth_url = 3;
- string token_url = 4;
- string user_info_url = 5;
- repeated string scopes = 6;
- FieldMapping field_mapping = 7;
- }
+message FieldMapping {
+ string identifier = 1;
+ string display_name = 2;
+ string email = 3;
+}
- oneof config {
- OAuth2 oauth2 = 1;
- }
+message OAuth2Config {
+ string client_id = 1;
+ string client_secret = 2;
+ string auth_url = 3;
+ string token_url = 4;
+ string user_info_url = 5;
+ repeated string scopes = 6;
+ FieldMapping field_mapping = 7;
}
diff --git a/server/route/api/v2/apidocs.swagger.yaml b/server/route/api/v2/apidocs.swagger.yaml
index 9ccfb522a..ddd7d9d6b 100644
--- a/server/route/api/v2/apidocs.swagger.yaml
+++ b/server/route/api/v2/apidocs.swagger.yaml
@@ -11,6 +11,7 @@ tags:
- name: LinkService
- name: ResourceService
- name: MemoService
+ - name: StorageService
- name: TagService
- name: WebhookService
- name: WorkspaceService
@@ -515,6 +516,115 @@ paths:
type: string
tags:
- ResourceService
+ /api/v2/storages:
+ get:
+ summary: ListStorages returns a list of storages.
+ operationId: StorageService_ListStorages
+ responses:
+ "200":
+ description: A successful response.
+ schema:
+ $ref: '#/definitions/v2ListStoragesResponse'
+ default:
+ description: An unexpected error response.
+ schema:
+ $ref: '#/definitions/googlerpcStatus'
+ tags:
+ - StorageService
+ post:
+ summary: CreateStorage creates a new storage.
+ operationId: StorageService_CreateStorage
+ responses:
+ "200":
+ description: A successful response.
+ schema:
+ $ref: '#/definitions/v2CreateStorageResponse'
+ default:
+ description: An unexpected error response.
+ schema:
+ $ref: '#/definitions/googlerpcStatus'
+ parameters:
+ - name: body
+ in: body
+ required: true
+ schema:
+ $ref: '#/definitions/v2CreateStorageRequest'
+ tags:
+ - StorageService
+ /api/v2/storages/{id}:
+ get:
+ summary: GetStorage returns a storage by id.
+ operationId: StorageService_GetStorage
+ responses:
+ "200":
+ description: A successful response.
+ schema:
+ $ref: '#/definitions/v2GetStorageResponse'
+ default:
+ description: An unexpected error response.
+ schema:
+ $ref: '#/definitions/googlerpcStatus'
+ parameters:
+ - name: id
+ in: path
+ required: true
+ type: integer
+ format: int32
+ tags:
+ - StorageService
+ delete:
+ summary: DeleteStorage deletes a storage by id.
+ operationId: StorageService_DeleteStorage
+ responses:
+ "200":
+ description: A successful response.
+ schema:
+ $ref: '#/definitions/v2DeleteStorageResponse'
+ default:
+ description: An unexpected error response.
+ schema:
+ $ref: '#/definitions/googlerpcStatus'
+ parameters:
+ - name: id
+ in: path
+ required: true
+ type: integer
+ format: int32
+ tags:
+ - StorageService
+ /api/v2/storages/{storage.id}:
+ patch:
+ summary: UpdateStorage updates a storage.
+ operationId: StorageService_UpdateStorage
+ responses:
+ "200":
+ description: A successful response.
+ schema:
+ $ref: '#/definitions/v2UpdateStorageResponse'
+ default:
+ description: An unexpected error response.
+ schema:
+ $ref: '#/definitions/googlerpcStatus'
+ parameters:
+ - name: storage.id
+ in: path
+ required: true
+ type: integer
+ format: int32
+ - name: storage
+ in: body
+ required: true
+ schema:
+ type: object
+ properties:
+ title:
+ type: string
+ type:
+ $ref: '#/definitions/apiv2StorageType'
+ config:
+ $ref: '#/definitions/apiv2StorageConfig'
+ tags:
+ - StorageService
/api/v2/tags:
get:
summary: ListTags lists tags.
@@ -966,7 +1076,7 @@ paths:
identifierFilter:
type: string
config:
- $ref: '#/definitions/IdentityProviderConfig'
+ $ref: '#/definitions/apiv2IdentityProviderConfig'
title: The identityProvider to update.
tags:
- IdentityProviderService
@@ -1834,39 +1944,6 @@ paths:
tags:
- ActivityService
definitions:
- IdentityProviderConfig:
- type: object
- properties:
- oauth2:
- $ref: '#/definitions/IdentityProviderConfigOAuth2'
- IdentityProviderConfigFieldMapping:
- type: object
- properties:
- identifier:
- type: string
- displayName:
- type: string
- email:
- type: string
- IdentityProviderConfigOAuth2:
- type: object
- properties:
- clientId:
- type: string
- clientSecret:
- type: string
- authUrl:
- type: string
- tokenUrl:
- type: string
- userInfoUrl:
- type: string
- scopes:
- type: array
- items:
- type: string
- fieldMapping:
- $ref: '#/definitions/IdentityProviderConfigFieldMapping'
MemoServiceSetMemoRelationsBody:
type: object
properties:
@@ -1920,6 +1997,39 @@ definitions:
properties:
version:
type: string
+ apiv2FieldMapping:
+ type: object
+ properties:
+ identifier:
+ type: string
+ displayName:
+ type: string
+ email:
+ type: string
+ apiv2IdentityProviderConfig:
+ type: object
+ properties:
+ oauth2:
+ $ref: '#/definitions/apiv2OAuth2Config'
+ apiv2OAuth2Config:
+ type: object
+ properties:
+ clientId:
+ type: string
+ clientSecret:
+ type: string
+ authUrl:
+ type: string
+ tokenUrl:
+ type: string
+ userInfoUrl:
+ type: string
+ scopes:
+ type: array
+ items:
+ type: string
+ fieldMapping:
+ $ref: '#/definitions/apiv2FieldMapping'
apiv2Reaction:
type: object
properties:
@@ -1959,6 +2069,50 @@ definitions:
- ACTIVE
- ARCHIVED
default: ROW_STATUS_UNSPECIFIED
+ apiv2S3Config:
+ type: object
+ properties:
+ endPoint:
+ type: string
+ path:
+ type: string
+ region:
+ type: string
+ accessKey:
+ type: string
+ secretKey:
+ type: string
+ bucket:
+ type: string
+ urlPrefix:
+ type: string
+ urlSuffix:
+ type: string
+ preSign:
+ type: boolean
+ apiv2Storage:
+ type: object
+ properties:
+ id:
+ type: integer
+ format: int32
+ title:
+ type: string
+ type:
+ $ref: '#/definitions/apiv2StorageType'
+ config:
+ $ref: '#/definitions/apiv2StorageConfig'
+ apiv2StorageConfig:
+ type: object
+ properties:
+ s3Config:
+ $ref: '#/definitions/apiv2S3Config'
+ apiv2StorageType:
+ type: string
+ enum:
+ - TYPE_UNSPECIFIED
+ - S3
+ default: TYPE_UNSPECIFIED
apiv2UserSetting:
type: object
properties:
@@ -2163,6 +2317,16 @@ definitions:
properties:
resource:
$ref: '#/definitions/v2Resource'
+ v2CreateStorageRequest:
+ type: object
+ properties:
+ storage:
+ $ref: '#/definitions/apiv2Storage'
+ v2CreateStorageResponse:
+ type: object
+ properties:
+ storage:
+ $ref: '#/definitions/apiv2Storage'
v2CreateUserAccessTokenResponse:
type: object
properties:
@@ -2195,6 +2359,8 @@ definitions:
type: object
v2DeleteResourceResponse:
type: object
+ v2DeleteStorageResponse:
+ type: object
v2DeleteTagResponse:
type: object
v2DeleteUserAccessTokenResponse:
@@ -2240,6 +2406,11 @@ definitions:
properties:
resource:
$ref: '#/definitions/v2Resource'
+ v2GetStorageResponse:
+ type: object
+ properties:
+ storage:
+ $ref: '#/definitions/apiv2Storage'
v2GetTagSuggestionsResponse:
type: object
properties:
@@ -2298,7 +2469,7 @@ definitions:
identifierFilter:
type: string
config:
- $ref: '#/definitions/IdentityProviderConfig'
+ $ref: '#/definitions/apiv2IdentityProviderConfig'
v2IdentityProviderType:
type: string
enum:
@@ -2421,6 +2592,14 @@ definitions:
items:
type: object
$ref: '#/definitions/v2Resource'
+ v2ListStoragesResponse:
+ type: object
+ properties:
+ storages:
+ type: array
+ items:
+ type: object
+ $ref: '#/definitions/apiv2Storage'
v2ListTagsResponse:
type: object
properties:
@@ -2658,6 +2837,11 @@ definitions:
properties:
resource:
$ref: '#/definitions/v2Resource'
+ v2UpdateStorageResponse:
+ type: object
+ properties:
+ storage:
+ $ref: '#/definitions/apiv2Storage'
v2UpdateUserResponse:
type: object
properties:
diff --git a/server/route/api/v2/storage_service.go b/server/route/api/v2/storage_service.go
new file mode 100644
index 000000000..178185dc4
--- /dev/null
+++ b/server/route/api/v2/storage_service.go
@@ -0,0 +1,156 @@
+package v2
+
+import (
+ "context"
+
+ "google.golang.org/grpc/codes"
+ "google.golang.org/grpc/status"
+
+ apiv2pb "github.com/usememos/memos/proto/gen/api/v2"
+ storepb "github.com/usememos/memos/proto/gen/store"
+ "github.com/usememos/memos/store"
+)
+
+func (s *APIV2Service) CreateStorage(ctx context.Context, request *apiv2pb.CreateStorageRequest) (*apiv2pb.CreateStorageResponse, error) {
+ currentUser, err := getCurrentUser(ctx, s.Store)
+ if err != nil {
+ return nil, status.Errorf(codes.Internal, "failed to get user: %v", err)
+ }
+ if currentUser.Role != store.RoleHost {
+ return nil, status.Errorf(codes.PermissionDenied, "permission denied")
+ }
+
+ storage, err := s.Store.CreateStorageV1(ctx, convertStorageToStore(request.Storage))
+ if err != nil {
+ return nil, status.Errorf(codes.Internal, "failed to create storage, error: %+v", err)
+ }
+ return &apiv2pb.CreateStorageResponse{
+ Storage: convertStorageFromStore(storage),
+ }, nil
+}
+
+func (s *APIV2Service) ListStorages(ctx context.Context, _ *apiv2pb.ListStoragesRequest) (*apiv2pb.ListStoragesResponse, error) {
+ storages, err := s.Store.ListStoragesV1(ctx, &store.FindStorage{})
+ if err != nil {
+ return nil, status.Errorf(codes.Internal, "failed to list storages, error: %+v", err)
+ }
+
+ response := &apiv2pb.ListStoragesResponse{
+ Storages: []*apiv2pb.Storage{},
+ }
+ for _, storage := range storages {
+ response.Storages = append(response.Storages, convertStorageFromStore(storage))
+ }
+ return response, nil
+}
+
+func (s *APIV2Service) GetStorage(ctx context.Context, request *apiv2pb.GetStorageRequest) (*apiv2pb.GetStorageResponse, error) {
+ storage, err := s.Store.GetStorageV1(ctx, &store.FindStorage{
+ ID: &request.Id,
+ })
+ if err != nil {
+ return nil, status.Errorf(codes.Internal, "failed to get storage, error: %+v", err)
+ }
+ if storage == nil {
+ return nil, status.Errorf(codes.NotFound, "storage not found")
+ }
+ return &apiv2pb.GetStorageResponse{
+ Storage: convertStorageFromStore(storage),
+ }, nil
+}
+
+func (s *APIV2Service) UpdateStorage(ctx context.Context, request *apiv2pb.UpdateStorageRequest) (*apiv2pb.UpdateStorageResponse, error) {
+ if request.UpdateMask == nil || len(request.UpdateMask.Paths) == 0 {
+ return nil, status.Errorf(codes.InvalidArgument, "update_mask is required")
+ }
+
+ update := &store.UpdateStorageV1{
+ ID: request.Storage.Id,
+ Type: storepb.Storage_Type(storepb.Storage_Type_value[request.Storage.Type.String()]),
+ }
+ for _, field := range request.UpdateMask.Paths {
+ switch field {
+ case "name":
+ update.Name = &request.Storage.Title
+ case "config":
+ update.Config = convertStorageConfigToStore(request.Storage.Type, request.Storage.Config)
+ }
+ }
+
+ storage, err := s.Store.UpdateStorageV1(ctx, update)
+ if err != nil {
+ return nil, status.Errorf(codes.Internal, "failed to update storage, error: %+v", err)
+ }
+ return &apiv2pb.UpdateStorageResponse{
+ Storage: convertStorageFromStore(storage),
+ }, nil
+}
+
+func (s *APIV2Service) DeleteStorage(ctx context.Context, request *apiv2pb.DeleteStorageRequest) (*apiv2pb.DeleteStorageResponse, error) {
+ err := s.Store.DeleteStorage(ctx, &store.DeleteStorage{
+ ID: request.Id,
+ })
+ if err != nil {
+ return nil, status.Errorf(codes.Internal, "failed to delete storage, error: %+v", err)
+ }
+ return &apiv2pb.DeleteStorageResponse{}, nil
+}
+
+func convertStorageFromStore(storage *storepb.Storage) *apiv2pb.Storage {
+ temp := &apiv2pb.Storage{
+ Id: storage.Id,
+ Title: storage.Name,
+ Type: apiv2pb.Storage_Type(apiv2pb.Storage_Type_value[storage.Type.String()]),
+ }
+ if storage.Type == storepb.Storage_S3 {
+ s3Config := storage.Config.GetS3Config()
+ temp.Config = &apiv2pb.StorageConfig{
+ StorageConfig: &apiv2pb.StorageConfig_S3Config{
+ S3Config: &apiv2pb.S3Config{
+ EndPoint: s3Config.EndPoint,
+ Path: s3Config.Path,
+ Region: s3Config.Region,
+ AccessKey: s3Config.AccessKey,
+ SecretKey: s3Config.SecretKey,
+ Bucket: s3Config.Bucket,
+ UrlPrefix: s3Config.UrlPrefix,
+ UrlSuffix: s3Config.UrlSuffix,
+ PreSign: s3Config.PreSign,
+ },
+ },
+ }
+ }
+ return temp
+}
+
+func convertStorageToStore(storage *apiv2pb.Storage) *storepb.Storage {
+ temp := &storepb.Storage{
+ Id: storage.Id,
+ Name: storage.Title,
+ Type: storepb.Storage_Type(storepb.Storage_Type_value[storage.Type.String()]),
+ Config: convertStorageConfigToStore(storage.Type, storage.Config),
+ }
+ return temp
+}
+
+func convertStorageConfigToStore(storageType apiv2pb.Storage_Type, config *apiv2pb.StorageConfig) *storepb.StorageConfig {
+ if storageType == apiv2pb.Storage_S3 {
+ s3Config := config.GetS3Config()
+ return &storepb.StorageConfig{
+ StorageConfig: &storepb.StorageConfig_S3Config{
+ S3Config: &storepb.S3Config{
+ EndPoint: s3Config.EndPoint,
+ Path: s3Config.Path,
+ Region: s3Config.Region,
+ AccessKey: s3Config.AccessKey,
+ SecretKey: s3Config.SecretKey,
+ Bucket: s3Config.Bucket,
+ UrlPrefix: s3Config.UrlPrefix,
+ UrlSuffix: s3Config.UrlSuffix,
+ PreSign: s3Config.PreSign,
+ },
+ },
+ }
+ }
+ return nil
+}
diff --git a/server/route/api/v2/v2.go b/server/route/api/v2/v2.go
index ced8b2f24..e08678289 100644
--- a/server/route/api/v2/v2.go
+++ b/server/route/api/v2/v2.go
@@ -31,6 +31,7 @@ type APIV2Service struct {
apiv2pb.UnimplementedActivityServiceServer
apiv2pb.UnimplementedWebhookServiceServer
apiv2pb.UnimplementedLinkServiceServer
+ apiv2pb.UnimplementedStorageServiceServer
Secret string
Profile *profile.Profile
@@ -68,6 +69,7 @@ func NewAPIV2Service(secret string, profile *profile.Profile, store *store.Store
apiv2pb.RegisterActivityServiceServer(grpcServer, apiv2Service)
apiv2pb.RegisterWebhookServiceServer(grpcServer, apiv2Service)
apiv2pb.RegisterLinkServiceServer(grpcServer, apiv2Service)
+ apiv2pb.RegisterStorageServiceServer(grpcServer, apiv2Service)
reflection.Register(grpcServer)
return apiv2Service
@@ -124,6 +126,9 @@ func (s *APIV2Service) RegisterGateway(ctx context.Context, e *echo.Echo) error
if err := apiv2pb.RegisterLinkServiceHandler(context.Background(), gwMux, conn); err != nil {
return err
}
+ if err := apiv2pb.RegisterStorageServiceHandler(context.Background(), gwMux, conn); err != nil {
+ return err
+ }
e.Any("/api/v2/*", echo.WrapHandler(gwMux))
// GRPC web proxy.
diff --git a/server/route/api/v2/webhook_service.go b/server/route/api/v2/webhook_service.go
index 3beb84068..d508aa6ac 100644
--- a/server/route/api/v2/webhook_service.go
+++ b/server/route/api/v2/webhook_service.go
@@ -55,7 +55,7 @@ func (s *APIV2Service) GetWebhook(ctx context.Context, request *apiv2pb.GetWebho
return nil, status.Errorf(codes.Internal, "failed to get user: %v", err)
}
- webhook, err := s.Store.GetWebhooks(ctx, &store.FindWebhook{
+ webhook, err := s.Store.GetWebhook(ctx, &store.FindWebhook{
ID: &request.Id,
CreatorID: &currentUser.ID,
})
diff --git a/store/storage.go b/store/storage.go
index 57f07d724..44c4bb9c8 100644
--- a/store/storage.go
+++ b/store/storage.go
@@ -162,7 +162,7 @@ func convertStorageConfigFromRaw(storageType storepb.Storage_Type, configRaw str
storageConfig := &storepb.StorageConfig{}
if storageType == storepb.Storage_S3 {
s3Config := &storepb.S3Config{}
- err := proto.Unmarshal([]byte(configRaw), s3Config)
+ err := protojsonUnmarshaler.Unmarshal([]byte(configRaw), s3Config)
if err != nil {
return nil, err
}
diff --git a/store/webhook.go b/store/webhook.go
index 2adf3236b..c261806e9 100644
--- a/store/webhook.go
+++ b/store/webhook.go
@@ -30,7 +30,7 @@ func (s *Store) ListWebhooks(ctx context.Context, find *FindWebhook) ([]*storepb
return s.driver.ListWebhooks(ctx, find)
}
-func (s *Store) GetWebhooks(ctx context.Context, find *FindWebhook) (*storepb.Webhook, error) {
+func (s *Store) GetWebhook(ctx context.Context, find *FindWebhook) (*storepb.Webhook, error) {
list, err := s.ListWebhooks(ctx, find)
if err != nil {
return nil, err
diff --git a/web/src/components/CreateStorageServiceDialog.tsx b/web/src/components/CreateStorageServiceDialog.tsx
index 16d6d2c3c..ecceadbd7 100644
--- a/web/src/components/CreateStorageServiceDialog.tsx
+++ b/web/src/components/CreateStorageServiceDialog.tsx
@@ -1,7 +1,8 @@
import { Button, IconButton, Input, Checkbox, Typography } from "@mui/joy";
import React, { useEffect, useState } from "react";
import { toast } from "react-hot-toast";
-import * as api from "@/helpers/api";
+import { storageServiceClient } from "@/grpcweb";
+import { S3Config, Storage, Storage_Type } from "@/types/proto/api/v2/storage_service";
import { useTranslate } from "@/utils/i18n";
import { generateDialog } from "./Dialog";
import Icon from "./Icon";
@@ -9,7 +10,7 @@ import LearnMore from "./LearnMore";
import RequiredBadge from "./RequiredBadge";
interface Props extends DialogProps {
- storage?: ObjectStorage;
+ storage?: Storage;
confirmCallback?: () => void;
}
@@ -17,10 +18,10 @@ const CreateStorageServiceDialog: React.FC<Props> = (props: Props) => {
const t = useTranslate();
const { destroy, storage, confirmCallback } = props;
const [basicInfo, setBasicInfo] = useState({
- name: "",
+ title: "",
});
- const [type, setType] = useState<StorageType>("S3");
- const [s3Config, setS3Config] = useState<StorageS3Config>({
+ const [type] = useState<Storage_Type>(Storage_Type.S3);
+ const [s3Config, setS3Config] = useState<S3Config>({
endPoint: "",
region: "",
accessKey: "",
@@ -29,18 +30,17 @@ const CreateStorageServiceDialog: React.FC<Props> = (props: Props) => {
bucket: "",
urlPrefix: "",
urlSuffix: "",
- presign: false,
+ preSign: false,
});
const isCreating = storage === undefined;
useEffect(() => {
if (storage) {
setBasicInfo({
- name: storage.name,
+ title: storage.title,
});
- setType(storage.type);
if (storage.type === "S3") {
- setS3Config(storage.config.s3Config);
+ setS3Config(S3Config.fromPartial(storage.config?.s3Config || {}));
}
}
}, []);
@@ -50,7 +50,7 @@ const CreateStorageServiceDialog: React.FC<Props> = (props: Props) => {
};
const allowConfirmAction = () => {
- if (basicInfo.name === "") {
+ if (basicInfo.title === "") {
return false;
}
if (type === "S3") {
@@ -70,21 +70,25 @@ const CreateStorageServiceDialog: React.FC<Props> = (props: Props) => {
const handleConfirmBtnClick = async () => {
try {
if (isCreating) {
- await api.createStorage({
- ...basicInfo,
- type: type,
- config: {
- s3Config: s3Config,
- },
+ await storageServiceClient.createStorage({
+ storage: Storage.fromPartial({
+ title: basicInfo.title,
+ type: type,
+ config: {
+ s3Config: s3Config,
+ },
+ }),
});
} else {
- await api.patchStorage({
- id: storage.id,
- type: type,
- ...basicInfo,
- config: {
- s3Config: s3Config,
- },
+ await storageServiceClient.updateStorage({
+ storage: Storage.fromPartial({
+ title: basicInfo.title,
+ type: type,
+ config: {
+ s3Config: s3Config,
+ },
+ }),
+ updateMask: ["title", "config"],
});
}
} catch (error: any) {
@@ -97,7 +101,7 @@ const CreateStorageServiceDialog: React.FC<Props> = (props: Props) => {
destroy();
};
- const setPartialS3Config = (state: Partial<StorageS3Config>) => {
+ const setPartialS3Config = (state: Partial<S3Config>) => {
setS3Config({
...s3Config,
...state,
@@ -120,11 +124,11 @@ const CreateStorageServiceDialog: React.FC<Props> = (props: Props) => {
<Input
className="mb-2"
placeholder={t("common.name")}
- value={basicInfo.name}
+ value={basicInfo.title}
onChange={(e) =>
setBasicInfo({
...basicInfo,
- name: e.target.value,
+ title: e.target.value,
})
}
fullWidth
@@ -222,8 +226,8 @@ const CreateStorageServiceDialog: React.FC<Props> = (props: Props) => {
<Checkbox
className="mb-2"
label={t("setting.storage-section.presign-placeholder")}
- checked={s3Config.presign}
- onChange={(e) => setPartialS3Config({ presign: e.target.checked })}
+ checked={s3Config.preSign}
+ onChange={(e) => setPartialS3Config({ preSign: e.target.checked })}
/>
<div className="mt-2 w-full flex flex-row justify-end items-center space-x-1">
<Button variant="plain" color="neutral" onClick={handleCloseBtnClick}>
@@ -238,7 +242,7 @@ const CreateStorageServiceDialog: React.FC<Props> = (props: Props) => {
);
};
-function showCreateStorageServiceDialog(storage?: ObjectStorage, confirmCallback?: () => void) {
+function showCreateStorageServiceDialog(storage?: Storage, confirmCallback?: () => void) {
generateDialog(
{
className: "create-storage-service-dialog",
diff --git a/web/src/components/Settings/StorageSection.tsx b/web/src/components/Settings/StorageSection.tsx
index 19c800051..bc09ba80d 100644
--- a/web/src/components/Settings/StorageSection.tsx
+++ b/web/src/components/Settings/StorageSection.tsx
@@ -18,8 +18,9 @@ import { isEqual } from "lodash-es";
import { useEffect, useMemo, useState } from "react";
import { toast } from "react-hot-toast";
import { Link } from "react-router-dom";
-import * as api from "@/helpers/api";
+import { storageServiceClient } from "@/grpcweb";
import { WorkspaceSettingPrefix, useWorkspaceSettingStore } from "@/store/v1";
+import { Storage } from "@/types/proto/api/v2/storage_service";
import { WorkspaceStorageSetting, WorkspaceStorageSetting_StorageType } from "@/types/proto/api/v2/workspace_setting_service";
import { WorkspaceSettingKey } from "@/types/proto/store/workspace_setting";
import { useTranslate } from "@/utils/i18n";
@@ -31,7 +32,7 @@ import LearnMore from "../LearnMore";
const StorageSection = () => {
const t = useTranslate();
const workspaceSettingStore = useWorkspaceSettingStore();
- const [storageList, setStorageList] = useState<ObjectStorage[]>([]);
+ const [storageList, setStorageList] = useState<Storage[]>([]);
const [workspaceStorageSetting, setWorkspaceStorageSetting] = useState<WorkspaceStorageSetting>(
WorkspaceStorageSetting.fromPartial(
workspaceSettingStore.getWorkspaceSettingByKey(WorkspaceSettingKey.WORKSPACE_SETTING_STORAGE)?.storageSetting || {},
@@ -63,8 +64,8 @@ const StorageSection = () => {
}, []);
const fetchStorageList = async () => {
- const { data: storageList } = await api.getStorageList();
- setStorageList(storageList);
+ const { storages } = await storageServiceClient.listStorages({});
+ setStorageList(storages);
};
const handleMaxUploadSizeChanged = async (event: React.FocusEvent<HTMLInputElement>) => {
@@ -111,15 +112,15 @@ const StorageSection = () => {
toast.success("Updated");
};
- const handleDeleteStorage = (storage: ObjectStorage) => {
+ const handleDeleteStorage = (storage: Storage) => {
showCommonDialog({
title: t("setting.storage-section.delete-storage"),
- content: t("setting.storage-section.warning-text", { name: storage.name }),
+ content: t("setting.storage-section.warning-text", { name: storage.title }),
style: "danger",
dialogName: "delete-storage-dialog",
onConfirm: async () => {
try {
- await api.deleteStorage(storage.id);
+ await storageServiceClient.deleteStorage({ id: storage.id });
} catch (error: any) {
console.error(error);
toast.error(error.response.data.message);
@@ -179,7 +180,7 @@ const StorageSection = () => {
>
{storageList.map((storage) => (
<Option key={storage.id} value={storage.id}>
- {storage.name}
+ {storage.title}
</Option>
))}
</Select>
@@ -205,7 +206,7 @@ const StorageSection = () => {
className="py-2 w-full border-t last:border-b dark:border-zinc-700 flex flex-row items-center justify-between"
>
<div className="flex flex-row items-center">
- <p className="ml-2">{storage.name}</p>
+ <p className="ml-2">{storage.title}</p>
</div>
<div className="flex flex-row items-center">
<Dropdown>
diff --git a/web/src/grpcweb.ts b/web/src/grpcweb.ts
index bfbaafe6d..28370cde1 100644
--- a/web/src/grpcweb.ts
+++ b/web/src/grpcweb.ts
@@ -5,6 +5,7 @@ import { InboxServiceDefinition } from "./types/proto/api/v2/inbox_service";
import { LinkServiceDefinition } from "./types/proto/api/v2/link_service";
import { MemoServiceDefinition } from "./types/proto/api/v2/memo_service";
import { ResourceServiceDefinition } from "./types/proto/api/v2/resource_service";
+import { StorageServiceDefinition } from "./types/proto/api/v2/storage_service";
import { TagServiceDefinition } from "./types/proto/api/v2/tag_service";
import { UserServiceDefinition } from "./types/proto/api/v2/user_service";
import { WebhookServiceDefinition } from "./types/proto/api/v2/webhook_service";
@@ -41,3 +42,5 @@ export const activityServiceClient = clientFactory.create(ActivityServiceDefinit
export const webhookServiceClient = clientFactory.create(WebhookServiceDefinition, channel);
export const linkServiceClient = clientFactory.create(LinkServiceDefinition, channel);
+
+export const storageServiceClient = clientFactory.create(StorageServiceDefinition, channel);
diff --git a/web/src/helpers/api.ts b/web/src/helpers/api.ts
index 7d36fa1b7..649043a8f 100644
--- a/web/src/helpers/api.ts
+++ b/web/src/helpers/api.ts
@@ -3,22 +3,6 @@ import axios from "axios";
axios.defaults.baseURL = import.meta.env.VITE_API_BASE_URL || "";
axios.defaults.withCredentials = true;
-export function getStorageList() {
- return axios.get<ObjectStorage[]>(`/api/v1/storage`);
-}
-
-export function createStorage(storageCreate: StorageCreate) {
- return axios.post<ObjectStorage>(`/api/v1/storage`, storageCreate);
-}
-
-export function patchStorage(storagePatch: StoragePatch) {
- return axios.patch<ObjectStorage>(`/api/v1/storage/${storagePatch.id}`, storagePatch);
-}
-
-export function deleteStorage(storageId: StorageId) {
- return axios.delete(`/api/v1/storage/${storageId}`);
-}
-
export function getIdentityProviderList() {
return axios.get<IdentityProvider[]>(`/api/v1/idp`);
}
diff --git a/web/src/types/modules/storage.d.ts b/web/src/types/modules/storage.d.ts
deleted file mode 100644
index fc9a8c540..000000000
--- a/web/src/types/modules/storage.d.ts
+++ /dev/null
@@ -1,40 +0,0 @@
-type StorageId = number;
-
-type StorageType = "S3";
-
-interface StorageS3Config {
- endPoint: string;
- region: string;
- accessKey: string;
- secretKey: string;
- path: string;
- bucket: string;
- urlPrefix: string;
- urlSuffix: string;
- presign: boolean;
-}
-
-interface StorageConfig {
- s3Config: StorageS3Config;
-}
-
-// Note: Storage is a reserved word in TypeScript. So we use ObjectStorage instead.
-interface ObjectStorage {
- id: StorageId;
- name: string;
- type: StorageType;
- config: StorageConfig;
-}
-
-interface StorageCreate {
- name: string;
- type: StorageType;
- config: StorageConfig;
-}
-
-interface StoragePatch {
- id: StorageId;
- name: string;
- type: StorageType;
- config: StorageConfig;
-}