mirror of
https://github.com/usememos/memos.git
synced 2024-09-11 03:55:30 +03:00
refactor: api version
This commit is contained in:
parent
8bba7f706e
commit
1b291422e7
File diff suppressed because it is too large
Load Diff
@ -1,18 +1,18 @@
|
||||
syntax = "proto3";
|
||||
|
||||
package memos.api.v2;
|
||||
package memos.api.v1;
|
||||
|
||||
import "google/api/annotations.proto";
|
||||
import "google/api/client.proto";
|
||||
import "google/api/field_behavior.proto";
|
||||
import "google/protobuf/timestamp.proto";
|
||||
|
||||
option go_package = "gen/api/v2";
|
||||
option go_package = "gen/api/v1";
|
||||
|
||||
service ActivityService {
|
||||
// GetActivity returns the activity with the given id.
|
||||
rpc GetActivity(GetActivityRequest) returns (Activity) {
|
||||
option (google.api.http) = {get: "/v2/activities/{id}"};
|
||||
option (google.api.http) = {get: "/api/v1/activities/{id}"};
|
||||
option (google.api.method_signature) = "id";
|
||||
}
|
||||
}
|
@ -1,33 +1,33 @@
|
||||
syntax = "proto3";
|
||||
|
||||
package memos.api.v2;
|
||||
package memos.api.v1;
|
||||
|
||||
import "api/v2/user_service.proto";
|
||||
import "api/v1/user_service.proto";
|
||||
import "google/api/annotations.proto";
|
||||
import "google/protobuf/empty.proto";
|
||||
|
||||
option go_package = "gen/api/v2";
|
||||
option go_package = "gen/api/v1";
|
||||
|
||||
service AuthService {
|
||||
// GetAuthStatus returns the current auth status of the user.
|
||||
rpc GetAuthStatus(GetAuthStatusRequest) returns (User) {
|
||||
option (google.api.http) = {post: "/api/v2/auth/status"};
|
||||
option (google.api.http) = {post: "/api/v1/auth/status"};
|
||||
}
|
||||
// SignIn signs in the user with the given username and password.
|
||||
rpc SignIn(SignInRequest) returns (User) {
|
||||
option (google.api.http) = {post: "/api/v2/auth/signin"};
|
||||
option (google.api.http) = {post: "/api/v1/auth/signin"};
|
||||
}
|
||||
// SignInWithSSO signs in the user with the given SSO code.
|
||||
rpc SignInWithSSO(SignInWithSSORequest) returns (User) {
|
||||
option (google.api.http) = {post: "/api/v2/auth/signin/sso"};
|
||||
option (google.api.http) = {post: "/api/v1/auth/signin/sso"};
|
||||
}
|
||||
// SignUp signs up the user with the given username and password.
|
||||
rpc SignUp(SignUpRequest) returns (User) {
|
||||
option (google.api.http) = {post: "/api/v2/auth/signup"};
|
||||
option (google.api.http) = {post: "/api/v1/auth/signup"};
|
||||
}
|
||||
// SignOut signs out the user.
|
||||
rpc SignOut(SignOutRequest) returns (google.protobuf.Empty) {
|
||||
option (google.api.http) = {post: "/api/v2/auth/signout"};
|
||||
option (google.api.http) = {post: "/api/v1/auth/signout"};
|
||||
}
|
||||
}
|
||||
|
@ -1,8 +1,8 @@
|
||||
syntax = "proto3";
|
||||
|
||||
package memos.api.v2;
|
||||
package memos.api.v1;
|
||||
|
||||
option go_package = "gen/api/v2";
|
||||
option go_package = "gen/api/v1";
|
||||
|
||||
enum RowStatus {
|
||||
ROW_STATUS_UNSPECIFIED = 0;
|
@ -1,42 +1,42 @@
|
||||
syntax = "proto3";
|
||||
|
||||
package memos.api.v2;
|
||||
package memos.api.v1;
|
||||
|
||||
import "google/api/annotations.proto";
|
||||
import "google/api/client.proto";
|
||||
import "google/protobuf/empty.proto";
|
||||
import "google/protobuf/field_mask.proto";
|
||||
|
||||
option go_package = "gen/api/v2";
|
||||
option go_package = "gen/api/v1";
|
||||
|
||||
service IdentityProviderService {
|
||||
// ListIdentityProviders lists identity providers.
|
||||
rpc ListIdentityProviders(ListIdentityProvidersRequest) returns (ListIdentityProvidersResponse) {
|
||||
option (google.api.http) = {get: "/api/v2/identityProviders"};
|
||||
option (google.api.http) = {get: "/api/v1/identityProviders"};
|
||||
}
|
||||
// GetIdentityProvider gets an identity provider.
|
||||
rpc GetIdentityProvider(GetIdentityProviderRequest) returns (IdentityProvider) {
|
||||
option (google.api.http) = {get: "/api/v2/{name=identityProviders/*}"};
|
||||
option (google.api.http) = {get: "/api/v1/{name=identityProviders/*}"};
|
||||
option (google.api.method_signature) = "name";
|
||||
}
|
||||
// CreateIdentityProvider creates an identity provider.
|
||||
rpc CreateIdentityProvider(CreateIdentityProviderRequest) returns (IdentityProvider) {
|
||||
option (google.api.http) = {
|
||||
post: "/api/v2/identityProviders",
|
||||
post: "/api/v1/identityProviders",
|
||||
body: "identity_provider"
|
||||
};
|
||||
}
|
||||
// UpdateIdentityProvider updates an identity provider.
|
||||
rpc UpdateIdentityProvider(UpdateIdentityProviderRequest) returns (IdentityProvider) {
|
||||
option (google.api.http) = {
|
||||
patch: "/api/v2/{identity_provider.name=identityProviders/*}"
|
||||
patch: "/api/v1/{identity_provider.name=identityProviders/*}"
|
||||
body: "identity_provider"
|
||||
};
|
||||
option (google.api.method_signature) = "identity_provider,update_mask";
|
||||
}
|
||||
// DeleteIdentityProvider deletes an identity provider.
|
||||
rpc DeleteIdentityProvider(DeleteIdentityProviderRequest) returns (google.protobuf.Empty) {
|
||||
option (google.api.http) = {delete: "/api/v2/{name=identityProviders/*}"};
|
||||
option (google.api.http) = {delete: "/api/v1/{name=identityProviders/*}"};
|
||||
option (google.api.method_signature) = "name";
|
||||
}
|
||||
}
|
@ -1,6 +1,6 @@
|
||||
syntax = "proto3";
|
||||
|
||||
package memos.api.v2;
|
||||
package memos.api.v1;
|
||||
|
||||
import "google/api/annotations.proto";
|
||||
import "google/api/client.proto";
|
||||
@ -8,24 +8,24 @@ import "google/protobuf/empty.proto";
|
||||
import "google/protobuf/field_mask.proto";
|
||||
import "google/protobuf/timestamp.proto";
|
||||
|
||||
option go_package = "gen/api/v2";
|
||||
option go_package = "gen/api/v1";
|
||||
|
||||
service InboxService {
|
||||
// ListInboxes lists inboxes for a user.
|
||||
rpc ListInboxes(ListInboxesRequest) returns (ListInboxesResponse) {
|
||||
option (google.api.http) = {get: "/api/v2/inboxes"};
|
||||
option (google.api.http) = {get: "/api/v1/inboxes"};
|
||||
}
|
||||
// UpdateInbox updates an inbox.
|
||||
rpc UpdateInbox(UpdateInboxRequest) returns (Inbox) {
|
||||
option (google.api.http) = {
|
||||
patch: "/api/v2/{inbox.name=inboxes/*}"
|
||||
patch: "/api/v1/{inbox.name=inboxes/*}"
|
||||
body: "inbox"
|
||||
};
|
||||
option (google.api.method_signature) = "inbox,update_mask";
|
||||
}
|
||||
// DeleteInbox deletes an inbox.
|
||||
rpc DeleteInbox(DeleteInboxRequest) returns (google.protobuf.Empty) {
|
||||
option (google.api.http) = {delete: "/api/v2/{name=inboxes/*}"};
|
||||
option (google.api.http) = {delete: "/api/v1/{name=inboxes/*}"};
|
||||
option (google.api.method_signature) = "name";
|
||||
}
|
||||
}
|
@ -1,15 +1,15 @@
|
||||
syntax = "proto3";
|
||||
|
||||
package memos.api.v2;
|
||||
package memos.api.v1;
|
||||
|
||||
import "google/api/annotations.proto";
|
||||
|
||||
option go_package = "gen/api/v2";
|
||||
option go_package = "gen/api/v1";
|
||||
|
||||
service LinkService {
|
||||
// GetLinkMetadata returns metadata for a given link.
|
||||
rpc GetLinkMetadata(GetLinkMetadataRequest) returns (GetLinkMetadataResponse) {
|
||||
option (google.api.http) = {get: "/api/v2/linkMetadata"};
|
||||
option (google.api.http) = {get: "/api/v1/linkMetadata"};
|
||||
}
|
||||
}
|
||||
|
@ -1,8 +1,8 @@
|
||||
syntax = "proto3";
|
||||
|
||||
package memos.api.v2;
|
||||
package memos.api.v1;
|
||||
|
||||
option go_package = "gen/api/v2";
|
||||
option go_package = "gen/api/v1";
|
||||
|
||||
message MemoRelation {
|
||||
// The name of memo.
|
@ -1,11 +1,11 @@
|
||||
syntax = "proto3";
|
||||
|
||||
package memos.api.v2;
|
||||
package memos.api.v1;
|
||||
|
||||
import "api/v2/common.proto";
|
||||
import "api/v2/memo_relation_service.proto";
|
||||
import "api/v2/reaction_service.proto";
|
||||
import "api/v2/resource_service.proto";
|
||||
import "api/v1/common.proto";
|
||||
import "api/v1/memo_relation_service.proto";
|
||||
import "api/v1/reaction_service.proto";
|
||||
import "api/v1/resource_service.proto";
|
||||
import "google/api/annotations.proto";
|
||||
import "google/api/client.proto";
|
||||
import "google/api/field_behavior.proto";
|
||||
@ -13,109 +13,109 @@ import "google/protobuf/empty.proto";
|
||||
import "google/protobuf/field_mask.proto";
|
||||
import "google/protobuf/timestamp.proto";
|
||||
|
||||
option go_package = "gen/api/v2";
|
||||
option go_package = "gen/api/v1";
|
||||
|
||||
service MemoService {
|
||||
// CreateMemo creates a memo.
|
||||
rpc CreateMemo(CreateMemoRequest) returns (Memo) {
|
||||
option (google.api.http) = {
|
||||
post: "/api/v2/memos"
|
||||
post: "/api/v1/memos"
|
||||
body: "*"
|
||||
};
|
||||
}
|
||||
// ListMemos lists memos with pagination and filter.
|
||||
rpc ListMemos(ListMemosRequest) returns (ListMemosResponse) {
|
||||
option (google.api.http) = {get: "/api/v2/memos"};
|
||||
option (google.api.http) = {get: "/api/v1/memos"};
|
||||
}
|
||||
// SearchMemos searches memos.
|
||||
rpc SearchMemos(SearchMemosRequest) returns (SearchMemosResponse) {
|
||||
option (google.api.http) = {get: "/api/v2/memos:search"};
|
||||
option (google.api.http) = {get: "/api/v1/memos:search"};
|
||||
}
|
||||
// GetMemo gets a memo.
|
||||
rpc GetMemo(GetMemoRequest) returns (Memo) {
|
||||
option (google.api.http) = {get: "/api/v2/{name=memos/*}"};
|
||||
option (google.api.http) = {get: "/api/v1/{name=memos/*}"};
|
||||
option (google.api.method_signature) = "name";
|
||||
}
|
||||
// UpdateMemo updates a memo.
|
||||
rpc UpdateMemo(UpdateMemoRequest) returns (Memo) {
|
||||
option (google.api.http) = {
|
||||
patch: "/api/v2/{memo.name=memos/*}"
|
||||
patch: "/api/v1/{memo.name=memos/*}"
|
||||
body: "memo"
|
||||
};
|
||||
option (google.api.method_signature) = "memo,update_mask";
|
||||
}
|
||||
// DeleteMemo deletes a memo.
|
||||
rpc DeleteMemo(DeleteMemoRequest) returns (google.protobuf.Empty) {
|
||||
option (google.api.http) = {delete: "/api/v2/{name=memos/*}"};
|
||||
option (google.api.http) = {delete: "/api/v1/{name=memos/*}"};
|
||||
option (google.api.method_signature) = "name";
|
||||
}
|
||||
// ExportMemos exports memos.
|
||||
rpc ExportMemos(ExportMemosRequest) returns (ExportMemosResponse) {
|
||||
option (google.api.http) = {
|
||||
post: "/api/v2/memos:export",
|
||||
post: "/api/v1/memos:export",
|
||||
body: "*"
|
||||
};
|
||||
}
|
||||
// SetMemoResources sets resources for a memo.
|
||||
rpc SetMemoResources(SetMemoResourcesRequest) returns (google.protobuf.Empty) {
|
||||
option (google.api.http) = {
|
||||
patch: "/api/v2/{name=memos/*}/resources"
|
||||
patch: "/api/v1/{name=memos/*}/resources"
|
||||
body: "*"
|
||||
};
|
||||
option (google.api.method_signature) = "name";
|
||||
}
|
||||
// ListMemoResources lists resources for a memo.
|
||||
rpc ListMemoResources(ListMemoResourcesRequest) returns (ListMemoResourcesResponse) {
|
||||
option (google.api.http) = {get: "/api/v2/{name=memos/*}/resources"};
|
||||
option (google.api.http) = {get: "/api/v1/{name=memos/*}/resources"};
|
||||
option (google.api.method_signature) = "name";
|
||||
}
|
||||
// SetMemoRelations sets relations for a memo.
|
||||
rpc SetMemoRelations(SetMemoRelationsRequest) returns (google.protobuf.Empty) {
|
||||
option (google.api.http) = {
|
||||
patch: "/api/v2/{name=memos/*}/relations"
|
||||
patch: "/api/v1/{name=memos/*}/relations"
|
||||
body: "*"
|
||||
};
|
||||
option (google.api.method_signature) = "name";
|
||||
}
|
||||
// ListMemoRelations lists relations for a memo.
|
||||
rpc ListMemoRelations(ListMemoRelationsRequest) returns (ListMemoRelationsResponse) {
|
||||
option (google.api.http) = {get: "/api/v2/{name=memos/*}/relations"};
|
||||
option (google.api.http) = {get: "/api/v1/{name=memos/*}/relations"};
|
||||
option (google.api.method_signature) = "name";
|
||||
}
|
||||
// CreateMemoComment creates a comment for a memo.
|
||||
rpc CreateMemoComment(CreateMemoCommentRequest) returns (Memo) {
|
||||
option (google.api.http) = {
|
||||
post: "/api/v2/{name=memos/*}/comments",
|
||||
post: "/api/v1/{name=memos/*}/comments",
|
||||
body: "comment"
|
||||
};
|
||||
option (google.api.method_signature) = "name";
|
||||
}
|
||||
// ListMemoComments lists comments for a memo.
|
||||
rpc ListMemoComments(ListMemoCommentsRequest) returns (ListMemoCommentsResponse) {
|
||||
option (google.api.http) = {get: "/api/v2/{name=memos/*}/comments"};
|
||||
option (google.api.http) = {get: "/api/v1/{name=memos/*}/comments"};
|
||||
option (google.api.method_signature) = "name";
|
||||
}
|
||||
// GetUserMemosStats gets stats of memos for a user.
|
||||
rpc GetUserMemosStats(GetUserMemosStatsRequest) returns (GetUserMemosStatsResponse) {
|
||||
option (google.api.http) = {get: "/api/v2/memos/stats"};
|
||||
option (google.api.http) = {get: "/api/v1/memos/stats"};
|
||||
option (google.api.method_signature) = "username";
|
||||
}
|
||||
// ListMemoReactions lists reactions for a memo.
|
||||
rpc ListMemoReactions(ListMemoReactionsRequest) returns (ListMemoReactionsResponse) {
|
||||
option (google.api.http) = {get: "/api/v2/{name=memos/*}/reactions"};
|
||||
option (google.api.http) = {get: "/api/v1/{name=memos/*}/reactions"};
|
||||
option (google.api.method_signature) = "name";
|
||||
}
|
||||
// UpsertMemoReaction upserts a reaction for a memo.
|
||||
rpc UpsertMemoReaction(UpsertMemoReactionRequest) returns (Reaction) {
|
||||
option (google.api.http) = {
|
||||
post: "/api/v2/{name=memos/*}/reactions",
|
||||
post: "/api/v1/{name=memos/*}/reactions",
|
||||
body: "*"
|
||||
};
|
||||
option (google.api.method_signature) = "name";
|
||||
}
|
||||
// DeleteMemoReaction deletes a reaction for a memo.
|
||||
rpc DeleteMemoReaction(DeleteMemoReactionRequest) returns (google.protobuf.Empty) {
|
||||
option (google.api.http) = {delete: "/api/v2/reactions/{reaction_id}"};
|
||||
option (google.api.http) = {delete: "/api/v1/reactions/{reaction_id}"};
|
||||
option (google.api.method_signature) = "reaction_id";
|
||||
}
|
||||
}
|
@ -1,8 +1,8 @@
|
||||
syntax = "proto3";
|
||||
|
||||
package memos.api.v2;
|
||||
package memos.api.v1;
|
||||
|
||||
option go_package = "gen/api/v2";
|
||||
option go_package = "gen/api/v1";
|
||||
|
||||
message Reaction {
|
||||
int32 id = 1;
|
@ -1,6 +1,6 @@
|
||||
syntax = "proto3";
|
||||
|
||||
package memos.api.v2;
|
||||
package memos.api.v1;
|
||||
|
||||
import "google/api/annotations.proto";
|
||||
import "google/api/client.proto";
|
||||
@ -9,40 +9,40 @@ import "google/protobuf/empty.proto";
|
||||
import "google/protobuf/field_mask.proto";
|
||||
import "google/protobuf/timestamp.proto";
|
||||
|
||||
option go_package = "gen/api/v2";
|
||||
option go_package = "gen/api/v1";
|
||||
|
||||
service ResourceService {
|
||||
// CreateResource creates a new resource.
|
||||
rpc CreateResource(CreateResourceRequest) returns (Resource) {
|
||||
option (google.api.http) = {
|
||||
post: "/api/v2/resources",
|
||||
post: "/api/v1/resources",
|
||||
body: "resource"
|
||||
};
|
||||
}
|
||||
// ListResources lists all resources.
|
||||
rpc ListResources(ListResourcesRequest) returns (ListResourcesResponse) {
|
||||
option (google.api.http) = {get: "/api/v2/resources"};
|
||||
option (google.api.http) = {get: "/api/v1/resources"};
|
||||
}
|
||||
// SearchResources searches memos.
|
||||
rpc SearchResources(SearchResourcesRequest) returns (SearchResourcesResponse) {
|
||||
option (google.api.http) = {get: "/api/v2/resources:search"};
|
||||
option (google.api.http) = {get: "/api/v1/resources:search"};
|
||||
}
|
||||
// GetResource returns a resource by name.
|
||||
rpc GetResource(GetResourceRequest) returns (Resource) {
|
||||
option (google.api.http) = {get: "/api/v2/{name=resources/*}"};
|
||||
option (google.api.http) = {get: "/api/v1/{name=resources/*}"};
|
||||
option (google.api.method_signature) = "name";
|
||||
}
|
||||
// UpdateResource updates a resource.
|
||||
rpc UpdateResource(UpdateResourceRequest) returns (Resource) {
|
||||
option (google.api.http) = {
|
||||
patch: "/api/v2/{resource.name=resources/*}",
|
||||
patch: "/api/v1/{resource.name=resources/*}",
|
||||
body: "resource"
|
||||
};
|
||||
option (google.api.method_signature) = "resource,update_mask";
|
||||
}
|
||||
// DeleteResource deletes a resource by name.
|
||||
rpc DeleteResource(DeleteResourceRequest) returns (google.protobuf.Empty) {
|
||||
option (google.api.http) = {delete: "/api/v2/{name=resources/*}"};
|
||||
option (google.api.http) = {delete: "/api/v1/{name=resources/*}"};
|
||||
option (google.api.method_signature) = "name";
|
||||
}
|
||||
}
|
@ -1,41 +1,41 @@
|
||||
syntax = "proto3";
|
||||
|
||||
package memos.api.v2;
|
||||
package memos.api.v1;
|
||||
|
||||
import "google/api/annotations.proto";
|
||||
import "google/api/client.proto";
|
||||
import "google/protobuf/field_mask.proto";
|
||||
|
||||
option go_package = "gen/api/v2";
|
||||
option go_package = "gen/api/v1";
|
||||
|
||||
service StorageService {
|
||||
// CreateStorage creates a new storage.
|
||||
rpc CreateStorage(CreateStorageRequest) returns (CreateStorageResponse) {
|
||||
option (google.api.http) = {
|
||||
post: "/api/v2/storages"
|
||||
post: "/api/v1/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.http) = {get: "/api/v1/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"};
|
||||
option (google.api.http) = {get: "/api/v1/storages"};
|
||||
}
|
||||
// UpdateStorage updates a storage.
|
||||
rpc UpdateStorage(UpdateStorageRequest) returns (UpdateStorageResponse) {
|
||||
option (google.api.http) = {
|
||||
patch: "/api/v2/storages/{storage.id}"
|
||||
patch: "/api/v1/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.http) = {delete: "/api/v1/storages/{id}"};
|
||||
option (google.api.method_signature) = "id";
|
||||
}
|
||||
}
|
@ -1,46 +1,46 @@
|
||||
syntax = "proto3";
|
||||
|
||||
package memos.api.v2;
|
||||
package memos.api.v1;
|
||||
|
||||
import "google/api/annotations.proto";
|
||||
import "google/protobuf/empty.proto";
|
||||
|
||||
option go_package = "gen/api/v2";
|
||||
option go_package = "gen/api/v1";
|
||||
|
||||
service TagService {
|
||||
// UpsertTag upserts a tag.
|
||||
rpc UpsertTag(UpsertTagRequest) returns (Tag) {
|
||||
option (google.api.http) = {
|
||||
post: "/api/v2/tags",
|
||||
post: "/api/v1/tags",
|
||||
body: "*"
|
||||
};
|
||||
}
|
||||
// BatchUpsertTag upserts multiple tags.
|
||||
rpc BatchUpsertTag(BatchUpsertTagRequest) returns (google.protobuf.Empty) {
|
||||
option (google.api.http) = {
|
||||
post: "/api/v2/tags:batchUpsert",
|
||||
post: "/api/v1/tags:batchUpsert",
|
||||
body: "*"
|
||||
};
|
||||
}
|
||||
// ListTags lists tags.
|
||||
rpc ListTags(ListTagsRequest) returns (ListTagsResponse) {
|
||||
option (google.api.http) = {get: "/api/v2/tags"};
|
||||
option (google.api.http) = {get: "/api/v1/tags"};
|
||||
}
|
||||
// RenameTag renames a tag.
|
||||
// All related memos will be updated.
|
||||
rpc RenameTag(RenameTagRequest) returns (google.protobuf.Empty) {
|
||||
option (google.api.http) = {
|
||||
patch: "/api/v2/tags:rename",
|
||||
patch: "/api/v1/tags:rename",
|
||||
body: "*"
|
||||
};
|
||||
}
|
||||
// DeleteTag deletes a tag.
|
||||
rpc DeleteTag(DeleteTagRequest) returns (google.protobuf.Empty) {
|
||||
option (google.api.http) = {delete: "/api/v2/tags"};
|
||||
option (google.api.http) = {delete: "/api/v1/tags"};
|
||||
}
|
||||
// GetTagSuggestions gets tag suggestions from the user's memos.
|
||||
rpc GetTagSuggestions(GetTagSuggestionsRequest) returns (GetTagSuggestionsResponse) {
|
||||
option (google.api.http) = {get: "/api/v2/tags/suggestion"};
|
||||
option (google.api.http) = {get: "/api/v1/tags/suggestion"};
|
||||
}
|
||||
}
|
||||
|
@ -1,8 +1,8 @@
|
||||
syntax = "proto3";
|
||||
|
||||
package memos.api.v2;
|
||||
package memos.api.v1;
|
||||
|
||||
import "api/v2/common.proto";
|
||||
import "api/v1/common.proto";
|
||||
import "google/api/annotations.proto";
|
||||
import "google/api/client.proto";
|
||||
import "google/api/field_behavior.proto";
|
||||
@ -10,26 +10,26 @@ import "google/protobuf/empty.proto";
|
||||
import "google/protobuf/field_mask.proto";
|
||||
import "google/protobuf/timestamp.proto";
|
||||
|
||||
option go_package = "gen/api/v2";
|
||||
option go_package = "gen/api/v1";
|
||||
|
||||
service UserService {
|
||||
// ListUsers returns a list of users.
|
||||
rpc ListUsers(ListUsersRequest) returns (ListUsersResponse) {
|
||||
option (google.api.http) = {get: "/api/v2/users"};
|
||||
option (google.api.http) = {get: "/api/v1/users"};
|
||||
}
|
||||
// SearchUsers searches users by filter.
|
||||
rpc SearchUsers(SearchUsersRequest) returns (SearchUsersResponse) {
|
||||
option (google.api.http) = {get: "/api/v2/users:search"};
|
||||
option (google.api.http) = {get: "/api/v1/users:search"};
|
||||
}
|
||||
// GetUser gets a user by name.
|
||||
rpc GetUser(GetUserRequest) returns (User) {
|
||||
option (google.api.http) = {get: "/api/v2/{name=users/*}"};
|
||||
option (google.api.http) = {get: "/api/v1/{name=users/*}"};
|
||||
option (google.api.method_signature) = "name";
|
||||
}
|
||||
// CreateUser creates a new user.
|
||||
rpc CreateUser(CreateUserRequest) returns (User) {
|
||||
option (google.api.http) = {
|
||||
post: "/api/v2/users"
|
||||
post: "/api/v1/users"
|
||||
body: "user"
|
||||
};
|
||||
option (google.api.method_signature) = "user";
|
||||
@ -37,45 +37,45 @@ service UserService {
|
||||
// UpdateUser updates a user.
|
||||
rpc UpdateUser(UpdateUserRequest) returns (User) {
|
||||
option (google.api.http) = {
|
||||
patch: "/api/v2/{user.name=users/*}"
|
||||
patch: "/api/v1/{user.name=users/*}"
|
||||
body: "user"
|
||||
};
|
||||
option (google.api.method_signature) = "user,update_mask";
|
||||
}
|
||||
// DeleteUser deletes a user.
|
||||
rpc DeleteUser(DeleteUserRequest) returns (google.protobuf.Empty) {
|
||||
option (google.api.http) = {delete: "/api/v2/{name=users/*}"};
|
||||
option (google.api.http) = {delete: "/api/v1/{name=users/*}"};
|
||||
option (google.api.method_signature) = "name";
|
||||
}
|
||||
// GetUserSetting gets the setting of a user.
|
||||
rpc GetUserSetting(GetUserSettingRequest) returns (UserSetting) {
|
||||
option (google.api.http) = {get: "/api/v2/{name=users/*}/setting"};
|
||||
option (google.api.http) = {get: "/api/v1/{name=users/*}/setting"};
|
||||
option (google.api.method_signature) = "name";
|
||||
}
|
||||
// UpdateUserSetting updates the setting of a user.
|
||||
rpc UpdateUserSetting(UpdateUserSettingRequest) returns (UserSetting) {
|
||||
option (google.api.http) = {
|
||||
patch: "/api/v2/{setting.name=users/*/setting}"
|
||||
patch: "/api/v1/{setting.name=users/*/setting}"
|
||||
body: "setting"
|
||||
};
|
||||
option (google.api.method_signature) = "setting,update_mask";
|
||||
}
|
||||
// ListUserAccessTokens returns a list of access tokens for a user.
|
||||
rpc ListUserAccessTokens(ListUserAccessTokensRequest) returns (ListUserAccessTokensResponse) {
|
||||
option (google.api.http) = {get: "/api/v2/{name=users/*}/access_tokens"};
|
||||
option (google.api.http) = {get: "/api/v1/{name=users/*}/access_tokens"};
|
||||
option (google.api.method_signature) = "name";
|
||||
}
|
||||
// CreateUserAccessToken creates a new access token for a user.
|
||||
rpc CreateUserAccessToken(CreateUserAccessTokenRequest) returns (UserAccessToken) {
|
||||
option (google.api.http) = {
|
||||
post: "/api/v2/{name=users/*}/access_tokens"
|
||||
post: "/api/v1/{name=users/*}/access_tokens"
|
||||
body: "*"
|
||||
};
|
||||
option (google.api.method_signature) = "name";
|
||||
}
|
||||
// DeleteUserAccessToken deletes an access token for a user.
|
||||
rpc DeleteUserAccessToken(DeleteUserAccessTokenRequest) returns (google.protobuf.Empty) {
|
||||
option (google.api.http) = {delete: "/api/v2/{name=users/*}/access_tokens/{access_token}"};
|
||||
option (google.api.http) = {delete: "/api/v1/{name=users/*}/access_tokens/{access_token}"};
|
||||
option (google.api.method_signature) = "name,access_token";
|
||||
}
|
||||
}
|
@ -1,44 +1,44 @@
|
||||
syntax = "proto3";
|
||||
|
||||
package memos.api.v2;
|
||||
package memos.api.v1;
|
||||
|
||||
import "api/v2/common.proto";
|
||||
import "api/v1/common.proto";
|
||||
import "google/api/annotations.proto";
|
||||
import "google/api/client.proto";
|
||||
import "google/protobuf/empty.proto";
|
||||
import "google/protobuf/field_mask.proto";
|
||||
import "google/protobuf/timestamp.proto";
|
||||
|
||||
option go_package = "gen/api/v2";
|
||||
option go_package = "gen/api/v1";
|
||||
|
||||
service WebhookService {
|
||||
// CreateWebhook creates a new webhook.
|
||||
rpc CreateWebhook(CreateWebhookRequest) returns (Webhook) {
|
||||
option (google.api.http) = {
|
||||
post: "/api/v2/webhooks"
|
||||
post: "/api/v1/webhooks"
|
||||
body: "*"
|
||||
};
|
||||
}
|
||||
// GetWebhook returns a webhook by id.
|
||||
rpc GetWebhook(GetWebhookRequest) returns (Webhook) {
|
||||
option (google.api.http) = {get: "/api/v2/webhooks/{id}"};
|
||||
option (google.api.http) = {get: "/api/v1/webhooks/{id}"};
|
||||
option (google.api.method_signature) = "id";
|
||||
}
|
||||
// ListWebhooks returns a list of webhooks.
|
||||
rpc ListWebhooks(ListWebhooksRequest) returns (ListWebhooksResponse) {
|
||||
option (google.api.http) = {get: "/api/v2/webhooks"};
|
||||
option (google.api.http) = {get: "/api/v1/webhooks"};
|
||||
}
|
||||
// UpdateWebhook updates a webhook.
|
||||
rpc UpdateWebhook(UpdateWebhookRequest) returns (Webhook) {
|
||||
option (google.api.http) = {
|
||||
patch: "/api/v2/webhooks/{webhook.id}"
|
||||
patch: "/api/v1/webhooks/{webhook.id}"
|
||||
body: "webhook"
|
||||
};
|
||||
option (google.api.method_signature) = "webhook,update_mask";
|
||||
}
|
||||
// DeleteWebhook deletes a webhook by id.
|
||||
rpc DeleteWebhook(DeleteWebhookRequest) returns (google.protobuf.Empty) {
|
||||
option (google.api.http) = {delete: "/api/v2/webhooks/{id}"};
|
||||
option (google.api.http) = {delete: "/api/v1/webhooks/{id}"};
|
||||
option (google.api.method_signature) = "id";
|
||||
}
|
||||
}
|
@ -1,15 +1,15 @@
|
||||
syntax = "proto3";
|
||||
|
||||
package memos.api.v2;
|
||||
package memos.api.v1;
|
||||
|
||||
import "google/api/annotations.proto";
|
||||
|
||||
option go_package = "gen/api/v2";
|
||||
option go_package = "gen/api/v1";
|
||||
|
||||
service WorkspaceService {
|
||||
// GetWorkspaceProfile returns the workspace profile.
|
||||
rpc GetWorkspaceProfile(GetWorkspaceProfileRequest) returns (WorkspaceProfile) {
|
||||
option (google.api.http) = {get: "/api/v2/workspace/profile"};
|
||||
option (google.api.http) = {get: "/api/v1/workspace/profile"};
|
||||
}
|
||||
}
|
||||
|
@ -1,27 +1,27 @@
|
||||
syntax = "proto3";
|
||||
|
||||
package memos.api.v2;
|
||||
package memos.api.v1;
|
||||
|
||||
import "google/api/annotations.proto";
|
||||
import "google/api/client.proto";
|
||||
import "google/api/field_behavior.proto";
|
||||
|
||||
option go_package = "gen/api/v2";
|
||||
option go_package = "gen/api/v1";
|
||||
|
||||
service WorkspaceSettingService {
|
||||
// ListWorkspaceSetting returns the list of settings.
|
||||
rpc ListWorkspaceSettings(ListWorkspaceSettingsRequest) returns (ListWorkspaceSettingsResponse) {
|
||||
option (google.api.http) = {get: "/api/v2/workspace/settings"};
|
||||
option (google.api.http) = {get: "/api/v1/workspace/settings"};
|
||||
}
|
||||
// GetWorkspaceSetting returns the setting by name.
|
||||
rpc GetWorkspaceSetting(GetWorkspaceSettingRequest) returns (WorkspaceSetting) {
|
||||
option (google.api.http) = {get: "/api/v2/workspace/{name=settings/*}"};
|
||||
option (google.api.http) = {get: "/api/v1/workspace/{name=settings/*}"};
|
||||
option (google.api.method_signature) = "name";
|
||||
}
|
||||
// SetWorkspaceSetting updates the setting.
|
||||
rpc SetWorkspaceSetting(SetWorkspaceSettingRequest) returns (WorkspaceSetting) {
|
||||
option (google.api.http) = {
|
||||
patch: "/api/v2/workspace/{setting.name=settings/*}",
|
||||
patch: "/api/v1/workspace/{setting.name=settings/*}",
|
||||
body: "setting"
|
||||
};
|
||||
option (google.api.method_signature) = "setting";
|
@ -2,9 +2,9 @@
|
||||
// versions:
|
||||
// protoc-gen-go v1.33.0
|
||||
// protoc (unknown)
|
||||
// source: api/v2/activity_service.proto
|
||||
// source: api/v1/activity_service.proto
|
||||
|
||||
package apiv2
|
||||
package apiv1
|
||||
|
||||
import (
|
||||
_ "google.golang.org/genproto/googleapis/api/annotations"
|
||||
@ -44,7 +44,7 @@ type Activity struct {
|
||||
func (x *Activity) Reset() {
|
||||
*x = Activity{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_api_v2_activity_service_proto_msgTypes[0]
|
||||
mi := &file_api_v1_activity_service_proto_msgTypes[0]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
@ -57,7 +57,7 @@ func (x *Activity) String() string {
|
||||
func (*Activity) ProtoMessage() {}
|
||||
|
||||
func (x *Activity) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_api_v2_activity_service_proto_msgTypes[0]
|
||||
mi := &file_api_v1_activity_service_proto_msgTypes[0]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
@ -70,7 +70,7 @@ func (x *Activity) ProtoReflect() protoreflect.Message {
|
||||
|
||||
// Deprecated: Use Activity.ProtoReflect.Descriptor instead.
|
||||
func (*Activity) Descriptor() ([]byte, []int) {
|
||||
return file_api_v2_activity_service_proto_rawDescGZIP(), []int{0}
|
||||
return file_api_v1_activity_service_proto_rawDescGZIP(), []int{0}
|
||||
}
|
||||
|
||||
func (x *Activity) GetId() int32 {
|
||||
@ -130,7 +130,7 @@ type ActivityMemoCommentPayload struct {
|
||||
func (x *ActivityMemoCommentPayload) Reset() {
|
||||
*x = ActivityMemoCommentPayload{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_api_v2_activity_service_proto_msgTypes[1]
|
||||
mi := &file_api_v1_activity_service_proto_msgTypes[1]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
@ -143,7 +143,7 @@ func (x *ActivityMemoCommentPayload) String() string {
|
||||
func (*ActivityMemoCommentPayload) ProtoMessage() {}
|
||||
|
||||
func (x *ActivityMemoCommentPayload) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_api_v2_activity_service_proto_msgTypes[1]
|
||||
mi := &file_api_v1_activity_service_proto_msgTypes[1]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
@ -156,7 +156,7 @@ func (x *ActivityMemoCommentPayload) ProtoReflect() protoreflect.Message {
|
||||
|
||||
// Deprecated: Use ActivityMemoCommentPayload.ProtoReflect.Descriptor instead.
|
||||
func (*ActivityMemoCommentPayload) Descriptor() ([]byte, []int) {
|
||||
return file_api_v2_activity_service_proto_rawDescGZIP(), []int{1}
|
||||
return file_api_v1_activity_service_proto_rawDescGZIP(), []int{1}
|
||||
}
|
||||
|
||||
func (x *ActivityMemoCommentPayload) GetMemoId() int32 {
|
||||
@ -185,7 +185,7 @@ type ActivityVersionUpdatePayload struct {
|
||||
func (x *ActivityVersionUpdatePayload) Reset() {
|
||||
*x = ActivityVersionUpdatePayload{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_api_v2_activity_service_proto_msgTypes[2]
|
||||
mi := &file_api_v1_activity_service_proto_msgTypes[2]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
@ -198,7 +198,7 @@ func (x *ActivityVersionUpdatePayload) String() string {
|
||||
func (*ActivityVersionUpdatePayload) ProtoMessage() {}
|
||||
|
||||
func (x *ActivityVersionUpdatePayload) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_api_v2_activity_service_proto_msgTypes[2]
|
||||
mi := &file_api_v1_activity_service_proto_msgTypes[2]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
@ -211,7 +211,7 @@ func (x *ActivityVersionUpdatePayload) ProtoReflect() protoreflect.Message {
|
||||
|
||||
// Deprecated: Use ActivityVersionUpdatePayload.ProtoReflect.Descriptor instead.
|
||||
func (*ActivityVersionUpdatePayload) Descriptor() ([]byte, []int) {
|
||||
return file_api_v2_activity_service_proto_rawDescGZIP(), []int{2}
|
||||
return file_api_v1_activity_service_proto_rawDescGZIP(), []int{2}
|
||||
}
|
||||
|
||||
func (x *ActivityVersionUpdatePayload) GetVersion() string {
|
||||
@ -233,7 +233,7 @@ type ActivityPayload struct {
|
||||
func (x *ActivityPayload) Reset() {
|
||||
*x = ActivityPayload{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_api_v2_activity_service_proto_msgTypes[3]
|
||||
mi := &file_api_v1_activity_service_proto_msgTypes[3]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
@ -246,7 +246,7 @@ func (x *ActivityPayload) String() string {
|
||||
func (*ActivityPayload) ProtoMessage() {}
|
||||
|
||||
func (x *ActivityPayload) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_api_v2_activity_service_proto_msgTypes[3]
|
||||
mi := &file_api_v1_activity_service_proto_msgTypes[3]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
@ -259,7 +259,7 @@ func (x *ActivityPayload) ProtoReflect() protoreflect.Message {
|
||||
|
||||
// Deprecated: Use ActivityPayload.ProtoReflect.Descriptor instead.
|
||||
func (*ActivityPayload) Descriptor() ([]byte, []int) {
|
||||
return file_api_v2_activity_service_proto_rawDescGZIP(), []int{3}
|
||||
return file_api_v1_activity_service_proto_rawDescGZIP(), []int{3}
|
||||
}
|
||||
|
||||
func (x *ActivityPayload) GetMemoComment() *ActivityMemoCommentPayload {
|
||||
@ -288,7 +288,7 @@ type GetActivityRequest struct {
|
||||
func (x *GetActivityRequest) Reset() {
|
||||
*x = GetActivityRequest{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_api_v2_activity_service_proto_msgTypes[4]
|
||||
mi := &file_api_v1_activity_service_proto_msgTypes[4]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
@ -301,7 +301,7 @@ func (x *GetActivityRequest) String() string {
|
||||
func (*GetActivityRequest) ProtoMessage() {}
|
||||
|
||||
func (x *GetActivityRequest) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_api_v2_activity_service_proto_msgTypes[4]
|
||||
mi := &file_api_v1_activity_service_proto_msgTypes[4]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
@ -314,7 +314,7 @@ func (x *GetActivityRequest) ProtoReflect() protoreflect.Message {
|
||||
|
||||
// Deprecated: Use GetActivityRequest.ProtoReflect.Descriptor instead.
|
||||
func (*GetActivityRequest) Descriptor() ([]byte, []int) {
|
||||
return file_api_v2_activity_service_proto_rawDescGZIP(), []int{4}
|
||||
return file_api_v1_activity_service_proto_rawDescGZIP(), []int{4}
|
||||
}
|
||||
|
||||
func (x *GetActivityRequest) GetId() int32 {
|
||||
@ -324,12 +324,12 @@ func (x *GetActivityRequest) GetId() int32 {
|
||||
return 0
|
||||
}
|
||||
|
||||
var File_api_v2_activity_service_proto protoreflect.FileDescriptor
|
||||
var File_api_v1_activity_service_proto protoreflect.FileDescriptor
|
||||
|
||||
var file_api_v2_activity_service_proto_rawDesc = []byte{
|
||||
0x0a, 0x1d, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x32, 0x2f, 0x61, 0x63, 0x74, 0x69, 0x76, 0x69, 0x74,
|
||||
var file_api_v1_activity_service_proto_rawDesc = []byte{
|
||||
0x0a, 0x1d, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, 0x2f, 0x61, 0x63, 0x74, 0x69, 0x76, 0x69, 0x74,
|
||||
0x79, 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,
|
||||
0x0c, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 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,
|
||||
@ -349,7 +349,7 @@ var file_api_v2_activity_service_proto_rawDesc = []byte{
|
||||
0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x42, 0x03, 0xe0,
|
||||
0x41, 0x03, 0x52, 0x0a, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x37,
|
||||
0x0a, 0x07, 0x70, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32,
|
||||
0x1d, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x41,
|
||||
0x1d, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x41,
|
||||
0x63, 0x74, 0x69, 0x76, 0x69, 0x74, 0x79, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x52, 0x07,
|
||||
0x70, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x22, 0x5d, 0x0a, 0x1a, 0x41, 0x63, 0x74, 0x69, 0x76,
|
||||
0x69, 0x74, 0x79, 0x4d, 0x65, 0x6d, 0x6f, 0x43, 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x74, 0x50, 0x61,
|
||||
@ -364,66 +364,67 @@ var file_api_v2_activity_service_proto_rawDesc = []byte{
|
||||
0x22, 0xb1, 0x01, 0x0a, 0x0f, 0x41, 0x63, 0x74, 0x69, 0x76, 0x69, 0x74, 0x79, 0x50, 0x61, 0x79,
|
||||
0x6c, 0x6f, 0x61, 0x64, 0x12, 0x4b, 0x0a, 0x0c, 0x6d, 0x65, 0x6d, 0x6f, 0x5f, 0x63, 0x6f, 0x6d,
|
||||
0x6d, 0x65, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x28, 0x2e, 0x6d, 0x65, 0x6d,
|
||||
0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x41, 0x63, 0x74, 0x69, 0x76, 0x69,
|
||||
0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x63, 0x74, 0x69, 0x76, 0x69,
|
||||
0x74, 0x79, 0x4d, 0x65, 0x6d, 0x6f, 0x43, 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x74, 0x50, 0x61, 0x79,
|
||||
0x6c, 0x6f, 0x61, 0x64, 0x52, 0x0b, 0x6d, 0x65, 0x6d, 0x6f, 0x43, 0x6f, 0x6d, 0x6d, 0x65, 0x6e,
|
||||
0x74, 0x12, 0x51, 0x0a, 0x0e, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x75, 0x70, 0x64,
|
||||
0x61, 0x74, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2a, 0x2e, 0x6d, 0x65, 0x6d, 0x6f,
|
||||
0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x41, 0x63, 0x74, 0x69, 0x76, 0x69, 0x74,
|
||||
0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x63, 0x74, 0x69, 0x76, 0x69, 0x74,
|
||||
0x79, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x61,
|
||||
0x79, 0x6c, 0x6f, 0x61, 0x64, 0x52, 0x0d, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x55, 0x70,
|
||||
0x64, 0x61, 0x74, 0x65, 0x22, 0x24, 0x0a, 0x12, 0x47, 0x65, 0x74, 0x41, 0x63, 0x74, 0x69, 0x76,
|
||||
0x69, 0x74, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64,
|
||||
0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x02, 0x69, 0x64, 0x32, 0x7c, 0x0a, 0x0f, 0x41, 0x63,
|
||||
0x74, 0x69, 0x76, 0x69, 0x74, 0x79, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x69, 0x0a,
|
||||
0x0b, 0x47, 0x65, 0x74, 0x41, 0x63, 0x74, 0x69, 0x76, 0x69, 0x74, 0x79, 0x12, 0x20, 0x2e, 0x6d,
|
||||
0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x47, 0x65, 0x74, 0x41,
|
||||
0x63, 0x74, 0x69, 0x76, 0x69, 0x74, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16,
|
||||
0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x41, 0x63,
|
||||
0x74, 0x69, 0x76, 0x69, 0x74, 0x79, 0x22, 0x20, 0xda, 0x41, 0x02, 0x69, 0x64, 0x82, 0xd3, 0xe4,
|
||||
0x93, 0x02, 0x15, 0x12, 0x13, 0x2f, 0x76, 0x32, 0x2f, 0x61, 0x63, 0x74, 0x69, 0x76, 0x69, 0x74,
|
||||
0x69, 0x65, 0x73, 0x2f, 0x7b, 0x69, 0x64, 0x7d, 0x42, 0xac, 0x01, 0x0a, 0x10, 0x63, 0x6f, 0x6d,
|
||||
0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x42, 0x14, 0x41,
|
||||
0x63, 0x74, 0x69, 0x76, 0x69, 0x74, 0x79, 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,
|
||||
0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x02, 0x69, 0x64, 0x32, 0x80, 0x01, 0x0a, 0x0f, 0x41,
|
||||
0x63, 0x74, 0x69, 0x76, 0x69, 0x74, 0x79, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x6d,
|
||||
0x0a, 0x0b, 0x47, 0x65, 0x74, 0x41, 0x63, 0x74, 0x69, 0x76, 0x69, 0x74, 0x79, 0x12, 0x20, 0x2e,
|
||||
0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74,
|
||||
0x41, 0x63, 0x74, 0x69, 0x76, 0x69, 0x74, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a,
|
||||
0x16, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x41,
|
||||
0x63, 0x74, 0x69, 0x76, 0x69, 0x74, 0x79, 0x22, 0x24, 0xda, 0x41, 0x02, 0x69, 0x64, 0x82, 0xd3,
|
||||
0xe4, 0x93, 0x02, 0x19, 0x12, 0x17, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, 0x2f, 0x61, 0x63,
|
||||
0x74, 0x69, 0x76, 0x69, 0x74, 0x69, 0x65, 0x73, 0x2f, 0x7b, 0x69, 0x64, 0x7d, 0x42, 0xac, 0x01,
|
||||
0x0a, 0x10, 0x63, 0x6f, 0x6d, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e,
|
||||
0x76, 0x31, 0x42, 0x14, 0x41, 0x63, 0x74, 0x69, 0x76, 0x69, 0x74, 0x79, 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, 0x31, 0x3b, 0x61, 0x70, 0x69, 0x76, 0x31, 0xa2, 0x02, 0x03, 0x4d,
|
||||
0x41, 0x58, 0xaa, 0x02, 0x0c, 0x4d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x41, 0x70, 0x69, 0x2e, 0x56,
|
||||
0x31, 0xca, 0x02, 0x0c, 0x4d, 0x65, 0x6d, 0x6f, 0x73, 0x5c, 0x41, 0x70, 0x69, 0x5c, 0x56, 0x31,
|
||||
0xe2, 0x02, 0x18, 0x4d, 0x65, 0x6d, 0x6f, 0x73, 0x5c, 0x41, 0x70, 0x69, 0x5c, 0x56, 0x31, 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, 0x31, 0x62, 0x06, 0x70, 0x72,
|
||||
0x6f, 0x74, 0x6f, 0x33,
|
||||
}
|
||||
|
||||
var (
|
||||
file_api_v2_activity_service_proto_rawDescOnce sync.Once
|
||||
file_api_v2_activity_service_proto_rawDescData = file_api_v2_activity_service_proto_rawDesc
|
||||
file_api_v1_activity_service_proto_rawDescOnce sync.Once
|
||||
file_api_v1_activity_service_proto_rawDescData = file_api_v1_activity_service_proto_rawDesc
|
||||
)
|
||||
|
||||
func file_api_v2_activity_service_proto_rawDescGZIP() []byte {
|
||||
file_api_v2_activity_service_proto_rawDescOnce.Do(func() {
|
||||
file_api_v2_activity_service_proto_rawDescData = protoimpl.X.CompressGZIP(file_api_v2_activity_service_proto_rawDescData)
|
||||
func file_api_v1_activity_service_proto_rawDescGZIP() []byte {
|
||||
file_api_v1_activity_service_proto_rawDescOnce.Do(func() {
|
||||
file_api_v1_activity_service_proto_rawDescData = protoimpl.X.CompressGZIP(file_api_v1_activity_service_proto_rawDescData)
|
||||
})
|
||||
return file_api_v2_activity_service_proto_rawDescData
|
||||
return file_api_v1_activity_service_proto_rawDescData
|
||||
}
|
||||
|
||||
var file_api_v2_activity_service_proto_msgTypes = make([]protoimpl.MessageInfo, 5)
|
||||
var file_api_v2_activity_service_proto_goTypes = []interface{}{
|
||||
(*Activity)(nil), // 0: memos.api.v2.Activity
|
||||
(*ActivityMemoCommentPayload)(nil), // 1: memos.api.v2.ActivityMemoCommentPayload
|
||||
(*ActivityVersionUpdatePayload)(nil), // 2: memos.api.v2.ActivityVersionUpdatePayload
|
||||
(*ActivityPayload)(nil), // 3: memos.api.v2.ActivityPayload
|
||||
(*GetActivityRequest)(nil), // 4: memos.api.v2.GetActivityRequest
|
||||
var file_api_v1_activity_service_proto_msgTypes = make([]protoimpl.MessageInfo, 5)
|
||||
var file_api_v1_activity_service_proto_goTypes = []interface{}{
|
||||
(*Activity)(nil), // 0: memos.api.v1.Activity
|
||||
(*ActivityMemoCommentPayload)(nil), // 1: memos.api.v1.ActivityMemoCommentPayload
|
||||
(*ActivityVersionUpdatePayload)(nil), // 2: memos.api.v1.ActivityVersionUpdatePayload
|
||||
(*ActivityPayload)(nil), // 3: memos.api.v1.ActivityPayload
|
||||
(*GetActivityRequest)(nil), // 4: memos.api.v1.GetActivityRequest
|
||||
(*timestamppb.Timestamp)(nil), // 5: google.protobuf.Timestamp
|
||||
}
|
||||
var file_api_v2_activity_service_proto_depIdxs = []int32{
|
||||
5, // 0: memos.api.v2.Activity.create_time:type_name -> google.protobuf.Timestamp
|
||||
3, // 1: memos.api.v2.Activity.payload:type_name -> memos.api.v2.ActivityPayload
|
||||
1, // 2: memos.api.v2.ActivityPayload.memo_comment:type_name -> memos.api.v2.ActivityMemoCommentPayload
|
||||
2, // 3: memos.api.v2.ActivityPayload.version_update:type_name -> memos.api.v2.ActivityVersionUpdatePayload
|
||||
4, // 4: memos.api.v2.ActivityService.GetActivity:input_type -> memos.api.v2.GetActivityRequest
|
||||
0, // 5: memos.api.v2.ActivityService.GetActivity:output_type -> memos.api.v2.Activity
|
||||
var file_api_v1_activity_service_proto_depIdxs = []int32{
|
||||
5, // 0: memos.api.v1.Activity.create_time:type_name -> google.protobuf.Timestamp
|
||||
3, // 1: memos.api.v1.Activity.payload:type_name -> memos.api.v1.ActivityPayload
|
||||
1, // 2: memos.api.v1.ActivityPayload.memo_comment:type_name -> memos.api.v1.ActivityMemoCommentPayload
|
||||
2, // 3: memos.api.v1.ActivityPayload.version_update:type_name -> memos.api.v1.ActivityVersionUpdatePayload
|
||||
4, // 4: memos.api.v1.ActivityService.GetActivity:input_type -> memos.api.v1.GetActivityRequest
|
||||
0, // 5: memos.api.v1.ActivityService.GetActivity:output_type -> memos.api.v1.Activity
|
||||
5, // [5:6] is the sub-list for method output_type
|
||||
4, // [4:5] is the sub-list for method input_type
|
||||
4, // [4:4] is the sub-list for extension type_name
|
||||
@ -431,13 +432,13 @@ var file_api_v2_activity_service_proto_depIdxs = []int32{
|
||||
0, // [0:4] is the sub-list for field type_name
|
||||
}
|
||||
|
||||
func init() { file_api_v2_activity_service_proto_init() }
|
||||
func file_api_v2_activity_service_proto_init() {
|
||||
if File_api_v2_activity_service_proto != nil {
|
||||
func init() { file_api_v1_activity_service_proto_init() }
|
||||
func file_api_v1_activity_service_proto_init() {
|
||||
if File_api_v1_activity_service_proto != nil {
|
||||
return
|
||||
}
|
||||
if !protoimpl.UnsafeEnabled {
|
||||
file_api_v2_activity_service_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
|
||||
file_api_v1_activity_service_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*Activity); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
@ -449,7 +450,7 @@ func file_api_v2_activity_service_proto_init() {
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_api_v2_activity_service_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
|
||||
file_api_v1_activity_service_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*ActivityMemoCommentPayload); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
@ -461,7 +462,7 @@ func file_api_v2_activity_service_proto_init() {
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_api_v2_activity_service_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
|
||||
file_api_v1_activity_service_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*ActivityVersionUpdatePayload); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
@ -473,7 +474,7 @@ func file_api_v2_activity_service_proto_init() {
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_api_v2_activity_service_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} {
|
||||
file_api_v1_activity_service_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*ActivityPayload); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
@ -485,7 +486,7 @@ func file_api_v2_activity_service_proto_init() {
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_api_v2_activity_service_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} {
|
||||
file_api_v1_activity_service_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*GetActivityRequest); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
@ -502,18 +503,18 @@ func file_api_v2_activity_service_proto_init() {
|
||||
out := protoimpl.TypeBuilder{
|
||||
File: protoimpl.DescBuilder{
|
||||
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
|
||||
RawDescriptor: file_api_v2_activity_service_proto_rawDesc,
|
||||
RawDescriptor: file_api_v1_activity_service_proto_rawDesc,
|
||||
NumEnums: 0,
|
||||
NumMessages: 5,
|
||||
NumExtensions: 0,
|
||||
NumServices: 1,
|
||||
},
|
||||
GoTypes: file_api_v2_activity_service_proto_goTypes,
|
||||
DependencyIndexes: file_api_v2_activity_service_proto_depIdxs,
|
||||
MessageInfos: file_api_v2_activity_service_proto_msgTypes,
|
||||
GoTypes: file_api_v1_activity_service_proto_goTypes,
|
||||
DependencyIndexes: file_api_v1_activity_service_proto_depIdxs,
|
||||
MessageInfos: file_api_v1_activity_service_proto_msgTypes,
|
||||
}.Build()
|
||||
File_api_v2_activity_service_proto = out.File
|
||||
file_api_v2_activity_service_proto_rawDesc = nil
|
||||
file_api_v2_activity_service_proto_goTypes = nil
|
||||
file_api_v2_activity_service_proto_depIdxs = nil
|
||||
File_api_v1_activity_service_proto = out.File
|
||||
file_api_v1_activity_service_proto_rawDesc = nil
|
||||
file_api_v1_activity_service_proto_goTypes = nil
|
||||
file_api_v1_activity_service_proto_depIdxs = nil
|
||||
}
|
@ -1,12 +1,12 @@
|
||||
// Code generated by protoc-gen-grpc-gateway. DO NOT EDIT.
|
||||
// source: api/v2/activity_service.proto
|
||||
// source: api/v1/activity_service.proto
|
||||
|
||||
/*
|
||||
Package apiv2 is a reverse proxy.
|
||||
Package apiv1 is a reverse proxy.
|
||||
|
||||
It translates gRPC into RESTful JSON APIs.
|
||||
*/
|
||||
package apiv2
|
||||
package apiv1
|
||||
|
||||
import (
|
||||
"context"
|
||||
@ -97,7 +97,7 @@ func RegisterActivityServiceHandlerServer(ctx context.Context, mux *runtime.Serv
|
||||
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
||||
var err error
|
||||
var annotatedContext context.Context
|
||||
annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/memos.api.v2.ActivityService/GetActivity", runtime.WithHTTPPathPattern("/v2/activities/{id}"))
|
||||
annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/memos.api.v1.ActivityService/GetActivity", runtime.WithHTTPPathPattern("/api/v1/activities/{id}"))
|
||||
if err != nil {
|
||||
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||
return
|
||||
@ -161,7 +161,7 @@ func RegisterActivityServiceHandlerClient(ctx context.Context, mux *runtime.Serv
|
||||
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
||||
var err error
|
||||
var annotatedContext context.Context
|
||||
annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/memos.api.v2.ActivityService/GetActivity", runtime.WithHTTPPathPattern("/v2/activities/{id}"))
|
||||
annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/memos.api.v1.ActivityService/GetActivity", runtime.WithHTTPPathPattern("/api/v1/activities/{id}"))
|
||||
if err != nil {
|
||||
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||
return
|
||||
@ -181,7 +181,7 @@ func RegisterActivityServiceHandlerClient(ctx context.Context, mux *runtime.Serv
|
||||
}
|
||||
|
||||
var (
|
||||
pattern_ActivityService_GetActivity_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 1, 5, 2}, []string{"v2", "activities", "id"}, ""))
|
||||
pattern_ActivityService_GetActivity_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3}, []string{"api", "v1", "activities", "id"}, ""))
|
||||
)
|
||||
|
||||
var (
|
@ -2,9 +2,9 @@
|
||||
// versions:
|
||||
// - protoc-gen-go-grpc v1.3.0
|
||||
// - protoc (unknown)
|
||||
// source: api/v2/activity_service.proto
|
||||
// source: api/v1/activity_service.proto
|
||||
|
||||
package apiv2
|
||||
package apiv1
|
||||
|
||||
import (
|
||||
context "context"
|
||||
@ -19,7 +19,7 @@ import (
|
||||
const _ = grpc.SupportPackageIsVersion7
|
||||
|
||||
const (
|
||||
ActivityService_GetActivity_FullMethodName = "/memos.api.v2.ActivityService/GetActivity"
|
||||
ActivityService_GetActivity_FullMethodName = "/memos.api.v1.ActivityService/GetActivity"
|
||||
)
|
||||
|
||||
// ActivityServiceClient is the client API for ActivityService service.
|
||||
@ -98,7 +98,7 @@ func _ActivityService_GetActivity_Handler(srv interface{}, ctx context.Context,
|
||||
// It's only intended for direct use with grpc.RegisterService,
|
||||
// and not to be introspected or modified (even as a copy)
|
||||
var ActivityService_ServiceDesc = grpc.ServiceDesc{
|
||||
ServiceName: "memos.api.v2.ActivityService",
|
||||
ServiceName: "memos.api.v1.ActivityService",
|
||||
HandlerType: (*ActivityServiceServer)(nil),
|
||||
Methods: []grpc.MethodDesc{
|
||||
{
|
||||
@ -107,5 +107,5 @@ var ActivityService_ServiceDesc = grpc.ServiceDesc{
|
||||
},
|
||||
},
|
||||
Streams: []grpc.StreamDesc{},
|
||||
Metadata: "api/v2/activity_service.proto",
|
||||
Metadata: "api/v1/activity_service.proto",
|
||||
}
|
@ -2,9 +2,9 @@
|
||||
// versions:
|
||||
// protoc-gen-go v1.33.0
|
||||
// protoc (unknown)
|
||||
// source: api/v2/auth_service.proto
|
||||
// source: api/v1/auth_service.proto
|
||||
|
||||
package apiv2
|
||||
package apiv1
|
||||
|
||||
import (
|
||||
_ "google.golang.org/genproto/googleapis/api/annotations"
|
||||
@ -31,7 +31,7 @@ type GetAuthStatusRequest struct {
|
||||
func (x *GetAuthStatusRequest) Reset() {
|
||||
*x = GetAuthStatusRequest{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_api_v2_auth_service_proto_msgTypes[0]
|
||||
mi := &file_api_v1_auth_service_proto_msgTypes[0]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
@ -44,7 +44,7 @@ func (x *GetAuthStatusRequest) String() string {
|
||||
func (*GetAuthStatusRequest) ProtoMessage() {}
|
||||
|
||||
func (x *GetAuthStatusRequest) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_api_v2_auth_service_proto_msgTypes[0]
|
||||
mi := &file_api_v1_auth_service_proto_msgTypes[0]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
@ -57,7 +57,7 @@ func (x *GetAuthStatusRequest) ProtoReflect() protoreflect.Message {
|
||||
|
||||
// Deprecated: Use GetAuthStatusRequest.ProtoReflect.Descriptor instead.
|
||||
func (*GetAuthStatusRequest) Descriptor() ([]byte, []int) {
|
||||
return file_api_v2_auth_service_proto_rawDescGZIP(), []int{0}
|
||||
return file_api_v1_auth_service_proto_rawDescGZIP(), []int{0}
|
||||
}
|
||||
|
||||
type GetAuthStatusResponse struct {
|
||||
@ -71,7 +71,7 @@ type GetAuthStatusResponse struct {
|
||||
func (x *GetAuthStatusResponse) Reset() {
|
||||
*x = GetAuthStatusResponse{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_api_v2_auth_service_proto_msgTypes[1]
|
||||
mi := &file_api_v1_auth_service_proto_msgTypes[1]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
@ -84,7 +84,7 @@ func (x *GetAuthStatusResponse) String() string {
|
||||
func (*GetAuthStatusResponse) ProtoMessage() {}
|
||||
|
||||
func (x *GetAuthStatusResponse) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_api_v2_auth_service_proto_msgTypes[1]
|
||||
mi := &file_api_v1_auth_service_proto_msgTypes[1]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
@ -97,7 +97,7 @@ func (x *GetAuthStatusResponse) ProtoReflect() protoreflect.Message {
|
||||
|
||||
// Deprecated: Use GetAuthStatusResponse.ProtoReflect.Descriptor instead.
|
||||
func (*GetAuthStatusResponse) Descriptor() ([]byte, []int) {
|
||||
return file_api_v2_auth_service_proto_rawDescGZIP(), []int{1}
|
||||
return file_api_v1_auth_service_proto_rawDescGZIP(), []int{1}
|
||||
}
|
||||
|
||||
func (x *GetAuthStatusResponse) GetUser() *User {
|
||||
@ -123,7 +123,7 @@ type SignInRequest struct {
|
||||
func (x *SignInRequest) Reset() {
|
||||
*x = SignInRequest{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_api_v2_auth_service_proto_msgTypes[2]
|
||||
mi := &file_api_v1_auth_service_proto_msgTypes[2]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
@ -136,7 +136,7 @@ func (x *SignInRequest) String() string {
|
||||
func (*SignInRequest) ProtoMessage() {}
|
||||
|
||||
func (x *SignInRequest) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_api_v2_auth_service_proto_msgTypes[2]
|
||||
mi := &file_api_v1_auth_service_proto_msgTypes[2]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
@ -149,7 +149,7 @@ func (x *SignInRequest) ProtoReflect() protoreflect.Message {
|
||||
|
||||
// Deprecated: Use SignInRequest.ProtoReflect.Descriptor instead.
|
||||
func (*SignInRequest) Descriptor() ([]byte, []int) {
|
||||
return file_api_v2_auth_service_proto_rawDescGZIP(), []int{2}
|
||||
return file_api_v1_auth_service_proto_rawDescGZIP(), []int{2}
|
||||
}
|
||||
|
||||
func (x *SignInRequest) GetUsername() string {
|
||||
@ -189,7 +189,7 @@ type SignInWithSSORequest struct {
|
||||
func (x *SignInWithSSORequest) Reset() {
|
||||
*x = SignInWithSSORequest{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_api_v2_auth_service_proto_msgTypes[3]
|
||||
mi := &file_api_v1_auth_service_proto_msgTypes[3]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
@ -202,7 +202,7 @@ func (x *SignInWithSSORequest) String() string {
|
||||
func (*SignInWithSSORequest) ProtoMessage() {}
|
||||
|
||||
func (x *SignInWithSSORequest) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_api_v2_auth_service_proto_msgTypes[3]
|
||||
mi := &file_api_v1_auth_service_proto_msgTypes[3]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
@ -215,7 +215,7 @@ func (x *SignInWithSSORequest) ProtoReflect() protoreflect.Message {
|
||||
|
||||
// Deprecated: Use SignInWithSSORequest.ProtoReflect.Descriptor instead.
|
||||
func (*SignInWithSSORequest) Descriptor() ([]byte, []int) {
|
||||
return file_api_v2_auth_service_proto_rawDescGZIP(), []int{3}
|
||||
return file_api_v1_auth_service_proto_rawDescGZIP(), []int{3}
|
||||
}
|
||||
|
||||
func (x *SignInWithSSORequest) GetIdpId() int32 {
|
||||
@ -253,7 +253,7 @@ type SignUpRequest struct {
|
||||
func (x *SignUpRequest) Reset() {
|
||||
*x = SignUpRequest{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_api_v2_auth_service_proto_msgTypes[4]
|
||||
mi := &file_api_v1_auth_service_proto_msgTypes[4]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
@ -266,7 +266,7 @@ func (x *SignUpRequest) String() string {
|
||||
func (*SignUpRequest) ProtoMessage() {}
|
||||
|
||||
func (x *SignUpRequest) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_api_v2_auth_service_proto_msgTypes[4]
|
||||
mi := &file_api_v1_auth_service_proto_msgTypes[4]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
@ -279,7 +279,7 @@ func (x *SignUpRequest) ProtoReflect() protoreflect.Message {
|
||||
|
||||
// Deprecated: Use SignUpRequest.ProtoReflect.Descriptor instead.
|
||||
func (*SignUpRequest) Descriptor() ([]byte, []int) {
|
||||
return file_api_v2_auth_service_proto_rawDescGZIP(), []int{4}
|
||||
return file_api_v1_auth_service_proto_rawDescGZIP(), []int{4}
|
||||
}
|
||||
|
||||
func (x *SignUpRequest) GetUsername() string {
|
||||
@ -305,7 +305,7 @@ type SignOutRequest struct {
|
||||
func (x *SignOutRequest) Reset() {
|
||||
*x = SignOutRequest{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_api_v2_auth_service_proto_msgTypes[5]
|
||||
mi := &file_api_v1_auth_service_proto_msgTypes[5]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
@ -318,7 +318,7 @@ func (x *SignOutRequest) String() string {
|
||||
func (*SignOutRequest) ProtoMessage() {}
|
||||
|
||||
func (x *SignOutRequest) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_api_v2_auth_service_proto_msgTypes[5]
|
||||
mi := &file_api_v1_auth_service_proto_msgTypes[5]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
@ -331,16 +331,16 @@ func (x *SignOutRequest) ProtoReflect() protoreflect.Message {
|
||||
|
||||
// Deprecated: Use SignOutRequest.ProtoReflect.Descriptor instead.
|
||||
func (*SignOutRequest) Descriptor() ([]byte, []int) {
|
||||
return file_api_v2_auth_service_proto_rawDescGZIP(), []int{5}
|
||||
return file_api_v1_auth_service_proto_rawDescGZIP(), []int{5}
|
||||
}
|
||||
|
||||
var File_api_v2_auth_service_proto protoreflect.FileDescriptor
|
||||
var File_api_v1_auth_service_proto protoreflect.FileDescriptor
|
||||
|
||||
var file_api_v2_auth_service_proto_rawDesc = []byte{
|
||||
0x0a, 0x19, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x32, 0x2f, 0x61, 0x75, 0x74, 0x68, 0x5f, 0x73, 0x65,
|
||||
var file_api_v1_auth_service_proto_rawDesc = []byte{
|
||||
0x0a, 0x19, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, 0x2f, 0x61, 0x75, 0x74, 0x68, 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, 0x19, 0x61, 0x70, 0x69, 0x2f, 0x76,
|
||||
0x32, 0x2f, 0x75, 0x73, 0x65, 0x72, 0x5f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x70,
|
||||
0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x1a, 0x19, 0x61, 0x70, 0x69, 0x2f, 0x76,
|
||||
0x31, 0x2f, 0x75, 0x73, 0x65, 0x72, 0x5f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x70,
|
||||
0x72, 0x6f, 0x74, 0x6f, 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, 0x1b, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f,
|
||||
@ -349,7 +349,7 @@ var file_api_v2_auth_service_proto_rawDesc = []byte{
|
||||
0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x3f, 0x0a, 0x15, 0x47, 0x65, 0x74, 0x41, 0x75,
|
||||
0x74, 0x68, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65,
|
||||
0x12, 0x26, 0x0a, 0x04, 0x75, 0x73, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12,
|
||||
0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x55, 0x73,
|
||||
0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x73,
|
||||
0x65, 0x72, 0x52, 0x04, 0x75, 0x73, 0x65, 0x72, 0x22, 0x6a, 0x0a, 0x0d, 0x53, 0x69, 0x67, 0x6e,
|
||||
0x49, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x75, 0x73, 0x65,
|
||||
0x72, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x75, 0x73, 0x65,
|
||||
@ -372,83 +372,83 @@ var file_api_v2_auth_service_proto_rawDesc = []byte{
|
||||
0x71, 0x75, 0x65, 0x73, 0x74, 0x32, 0xec, 0x03, 0x0a, 0x0b, 0x41, 0x75, 0x74, 0x68, 0x53, 0x65,
|
||||
0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x64, 0x0a, 0x0d, 0x47, 0x65, 0x74, 0x41, 0x75, 0x74, 0x68,
|
||||
0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x22, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61,
|
||||
0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x47, 0x65, 0x74, 0x41, 0x75, 0x74, 0x68, 0x53, 0x74, 0x61,
|
||||
0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x41, 0x75, 0x74, 0x68, 0x53, 0x74, 0x61,
|
||||
0x74, 0x75, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x12, 0x2e, 0x6d, 0x65, 0x6d,
|
||||
0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x22, 0x1b,
|
||||
0x82, 0xd3, 0xe4, 0x93, 0x02, 0x15, 0x22, 0x13, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x32, 0x2f,
|
||||
0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x22, 0x1b,
|
||||
0x82, 0xd3, 0xe4, 0x93, 0x02, 0x15, 0x22, 0x13, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, 0x2f,
|
||||
0x61, 0x75, 0x74, 0x68, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x56, 0x0a, 0x06, 0x53,
|
||||
0x69, 0x67, 0x6e, 0x49, 0x6e, 0x12, 0x1b, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70,
|
||||
0x69, 0x2e, 0x76, 0x32, 0x2e, 0x53, 0x69, 0x67, 0x6e, 0x49, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65,
|
||||
0x69, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x69, 0x67, 0x6e, 0x49, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65,
|
||||
0x73, 0x74, 0x1a, 0x12, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76,
|
||||
0x32, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x22, 0x1b, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x15, 0x22, 0x13,
|
||||
0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x32, 0x2f, 0x61, 0x75, 0x74, 0x68, 0x2f, 0x73, 0x69, 0x67,
|
||||
0x31, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x22, 0x1b, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x15, 0x22, 0x13,
|
||||
0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, 0x2f, 0x61, 0x75, 0x74, 0x68, 0x2f, 0x73, 0x69, 0x67,
|
||||
0x6e, 0x69, 0x6e, 0x12, 0x68, 0x0a, 0x0d, 0x53, 0x69, 0x67, 0x6e, 0x49, 0x6e, 0x57, 0x69, 0x74,
|
||||
0x68, 0x53, 0x53, 0x4f, 0x12, 0x22, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69,
|
||||
0x2e, 0x76, 0x32, 0x2e, 0x53, 0x69, 0x67, 0x6e, 0x49, 0x6e, 0x57, 0x69, 0x74, 0x68, 0x53, 0x53,
|
||||
0x2e, 0x76, 0x31, 0x2e, 0x53, 0x69, 0x67, 0x6e, 0x49, 0x6e, 0x57, 0x69, 0x74, 0x68, 0x53, 0x53,
|
||||
0x4f, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x12, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73,
|
||||
0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x22, 0x1f, 0x82, 0xd3,
|
||||
0xe4, 0x93, 0x02, 0x19, 0x22, 0x17, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x32, 0x2f, 0x61, 0x75,
|
||||
0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x22, 0x1f, 0x82, 0xd3,
|
||||
0xe4, 0x93, 0x02, 0x19, 0x22, 0x17, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, 0x2f, 0x61, 0x75,
|
||||
0x74, 0x68, 0x2f, 0x73, 0x69, 0x67, 0x6e, 0x69, 0x6e, 0x2f, 0x73, 0x73, 0x6f, 0x12, 0x56, 0x0a,
|
||||
0x06, 0x53, 0x69, 0x67, 0x6e, 0x55, 0x70, 0x12, 0x1b, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e,
|
||||
0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x53, 0x69, 0x67, 0x6e, 0x55, 0x70, 0x52, 0x65, 0x71,
|
||||
0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x69, 0x67, 0x6e, 0x55, 0x70, 0x52, 0x65, 0x71,
|
||||
0x75, 0x65, 0x73, 0x74, 0x1a, 0x12, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69,
|
||||
0x2e, 0x76, 0x32, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x22, 0x1b, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x15,
|
||||
0x22, 0x13, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x32, 0x2f, 0x61, 0x75, 0x74, 0x68, 0x2f, 0x73,
|
||||
0x2e, 0x76, 0x31, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x22, 0x1b, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x15,
|
||||
0x22, 0x13, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, 0x2f, 0x61, 0x75, 0x74, 0x68, 0x2f, 0x73,
|
||||
0x69, 0x67, 0x6e, 0x75, 0x70, 0x12, 0x5d, 0x0a, 0x07, 0x53, 0x69, 0x67, 0x6e, 0x4f, 0x75, 0x74,
|
||||
0x12, 0x1c, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e,
|
||||
0x12, 0x1c, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e,
|
||||
0x53, 0x69, 0x67, 0x6e, 0x4f, 0x75, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16,
|
||||
0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66,
|
||||
0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x1c, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x16, 0x22, 0x14,
|
||||
0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x32, 0x2f, 0x61, 0x75, 0x74, 0x68, 0x2f, 0x73, 0x69, 0x67,
|
||||
0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, 0x2f, 0x61, 0x75, 0x74, 0x68, 0x2f, 0x73, 0x69, 0x67,
|
||||
0x6e, 0x6f, 0x75, 0x74, 0x42, 0xa8, 0x01, 0x0a, 0x10, 0x63, 0x6f, 0x6d, 0x2e, 0x6d, 0x65, 0x6d,
|
||||
0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x42, 0x10, 0x41, 0x75, 0x74, 0x68, 0x53,
|
||||
0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x42, 0x10, 0x41, 0x75, 0x74, 0x68, 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,
|
||||
0x65, 0x6e, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, 0x3b, 0x61, 0x70, 0x69, 0x76, 0x31, 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,
|
||||
0x69, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x0c, 0x4d, 0x65, 0x6d, 0x6f, 0x73, 0x5c, 0x41, 0x70, 0x69,
|
||||
0x5c, 0x56, 0x31, 0xe2, 0x02, 0x18, 0x4d, 0x65, 0x6d, 0x6f, 0x73, 0x5c, 0x41, 0x70, 0x69, 0x5c,
|
||||
0x56, 0x31, 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, 0x31, 0x62,
|
||||
0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
|
||||
}
|
||||
|
||||
var (
|
||||
file_api_v2_auth_service_proto_rawDescOnce sync.Once
|
||||
file_api_v2_auth_service_proto_rawDescData = file_api_v2_auth_service_proto_rawDesc
|
||||
file_api_v1_auth_service_proto_rawDescOnce sync.Once
|
||||
file_api_v1_auth_service_proto_rawDescData = file_api_v1_auth_service_proto_rawDesc
|
||||
)
|
||||
|
||||
func file_api_v2_auth_service_proto_rawDescGZIP() []byte {
|
||||
file_api_v2_auth_service_proto_rawDescOnce.Do(func() {
|
||||
file_api_v2_auth_service_proto_rawDescData = protoimpl.X.CompressGZIP(file_api_v2_auth_service_proto_rawDescData)
|
||||
func file_api_v1_auth_service_proto_rawDescGZIP() []byte {
|
||||
file_api_v1_auth_service_proto_rawDescOnce.Do(func() {
|
||||
file_api_v1_auth_service_proto_rawDescData = protoimpl.X.CompressGZIP(file_api_v1_auth_service_proto_rawDescData)
|
||||
})
|
||||
return file_api_v2_auth_service_proto_rawDescData
|
||||
return file_api_v1_auth_service_proto_rawDescData
|
||||
}
|
||||
|
||||
var file_api_v2_auth_service_proto_msgTypes = make([]protoimpl.MessageInfo, 6)
|
||||
var file_api_v2_auth_service_proto_goTypes = []interface{}{
|
||||
(*GetAuthStatusRequest)(nil), // 0: memos.api.v2.GetAuthStatusRequest
|
||||
(*GetAuthStatusResponse)(nil), // 1: memos.api.v2.GetAuthStatusResponse
|
||||
(*SignInRequest)(nil), // 2: memos.api.v2.SignInRequest
|
||||
(*SignInWithSSORequest)(nil), // 3: memos.api.v2.SignInWithSSORequest
|
||||
(*SignUpRequest)(nil), // 4: memos.api.v2.SignUpRequest
|
||||
(*SignOutRequest)(nil), // 5: memos.api.v2.SignOutRequest
|
||||
(*User)(nil), // 6: memos.api.v2.User
|
||||
var file_api_v1_auth_service_proto_msgTypes = make([]protoimpl.MessageInfo, 6)
|
||||
var file_api_v1_auth_service_proto_goTypes = []interface{}{
|
||||
(*GetAuthStatusRequest)(nil), // 0: memos.api.v1.GetAuthStatusRequest
|
||||
(*GetAuthStatusResponse)(nil), // 1: memos.api.v1.GetAuthStatusResponse
|
||||
(*SignInRequest)(nil), // 2: memos.api.v1.SignInRequest
|
||||
(*SignInWithSSORequest)(nil), // 3: memos.api.v1.SignInWithSSORequest
|
||||
(*SignUpRequest)(nil), // 4: memos.api.v1.SignUpRequest
|
||||
(*SignOutRequest)(nil), // 5: memos.api.v1.SignOutRequest
|
||||
(*User)(nil), // 6: memos.api.v1.User
|
||||
(*emptypb.Empty)(nil), // 7: google.protobuf.Empty
|
||||
}
|
||||
var file_api_v2_auth_service_proto_depIdxs = []int32{
|
||||
6, // 0: memos.api.v2.GetAuthStatusResponse.user:type_name -> memos.api.v2.User
|
||||
0, // 1: memos.api.v2.AuthService.GetAuthStatus:input_type -> memos.api.v2.GetAuthStatusRequest
|
||||
2, // 2: memos.api.v2.AuthService.SignIn:input_type -> memos.api.v2.SignInRequest
|
||||
3, // 3: memos.api.v2.AuthService.SignInWithSSO:input_type -> memos.api.v2.SignInWithSSORequest
|
||||
4, // 4: memos.api.v2.AuthService.SignUp:input_type -> memos.api.v2.SignUpRequest
|
||||
5, // 5: memos.api.v2.AuthService.SignOut:input_type -> memos.api.v2.SignOutRequest
|
||||
6, // 6: memos.api.v2.AuthService.GetAuthStatus:output_type -> memos.api.v2.User
|
||||
6, // 7: memos.api.v2.AuthService.SignIn:output_type -> memos.api.v2.User
|
||||
6, // 8: memos.api.v2.AuthService.SignInWithSSO:output_type -> memos.api.v2.User
|
||||
6, // 9: memos.api.v2.AuthService.SignUp:output_type -> memos.api.v2.User
|
||||
7, // 10: memos.api.v2.AuthService.SignOut:output_type -> google.protobuf.Empty
|
||||
var file_api_v1_auth_service_proto_depIdxs = []int32{
|
||||
6, // 0: memos.api.v1.GetAuthStatusResponse.user:type_name -> memos.api.v1.User
|
||||
0, // 1: memos.api.v1.AuthService.GetAuthStatus:input_type -> memos.api.v1.GetAuthStatusRequest
|
||||
2, // 2: memos.api.v1.AuthService.SignIn:input_type -> memos.api.v1.SignInRequest
|
||||
3, // 3: memos.api.v1.AuthService.SignInWithSSO:input_type -> memos.api.v1.SignInWithSSORequest
|
||||
4, // 4: memos.api.v1.AuthService.SignUp:input_type -> memos.api.v1.SignUpRequest
|
||||
5, // 5: memos.api.v1.AuthService.SignOut:input_type -> memos.api.v1.SignOutRequest
|
||||
6, // 6: memos.api.v1.AuthService.GetAuthStatus:output_type -> memos.api.v1.User
|
||||
6, // 7: memos.api.v1.AuthService.SignIn:output_type -> memos.api.v1.User
|
||||
6, // 8: memos.api.v1.AuthService.SignInWithSSO:output_type -> memos.api.v1.User
|
||||
6, // 9: memos.api.v1.AuthService.SignUp:output_type -> memos.api.v1.User
|
||||
7, // 10: memos.api.v1.AuthService.SignOut:output_type -> google.protobuf.Empty
|
||||
6, // [6:11] is the sub-list for method output_type
|
||||
1, // [1:6] is the sub-list for method input_type
|
||||
1, // [1:1] is the sub-list for extension type_name
|
||||
@ -456,14 +456,14 @@ var file_api_v2_auth_service_proto_depIdxs = []int32{
|
||||
0, // [0:1] is the sub-list for field type_name
|
||||
}
|
||||
|
||||
func init() { file_api_v2_auth_service_proto_init() }
|
||||
func file_api_v2_auth_service_proto_init() {
|
||||
if File_api_v2_auth_service_proto != nil {
|
||||
func init() { file_api_v1_auth_service_proto_init() }
|
||||
func file_api_v1_auth_service_proto_init() {
|
||||
if File_api_v1_auth_service_proto != nil {
|
||||
return
|
||||
}
|
||||
file_api_v2_user_service_proto_init()
|
||||
file_api_v1_user_service_proto_init()
|
||||
if !protoimpl.UnsafeEnabled {
|
||||
file_api_v2_auth_service_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
|
||||
file_api_v1_auth_service_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*GetAuthStatusRequest); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
@ -475,7 +475,7 @@ func file_api_v2_auth_service_proto_init() {
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_api_v2_auth_service_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
|
||||
file_api_v1_auth_service_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*GetAuthStatusResponse); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
@ -487,7 +487,7 @@ func file_api_v2_auth_service_proto_init() {
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_api_v2_auth_service_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
|
||||
file_api_v1_auth_service_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*SignInRequest); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
@ -499,7 +499,7 @@ func file_api_v2_auth_service_proto_init() {
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_api_v2_auth_service_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} {
|
||||
file_api_v1_auth_service_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*SignInWithSSORequest); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
@ -511,7 +511,7 @@ func file_api_v2_auth_service_proto_init() {
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_api_v2_auth_service_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} {
|
||||
file_api_v1_auth_service_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*SignUpRequest); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
@ -523,7 +523,7 @@ func file_api_v2_auth_service_proto_init() {
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_api_v2_auth_service_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} {
|
||||
file_api_v1_auth_service_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*SignOutRequest); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
@ -540,18 +540,18 @@ func file_api_v2_auth_service_proto_init() {
|
||||
out := protoimpl.TypeBuilder{
|
||||
File: protoimpl.DescBuilder{
|
||||
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
|
||||
RawDescriptor: file_api_v2_auth_service_proto_rawDesc,
|
||||
RawDescriptor: file_api_v1_auth_service_proto_rawDesc,
|
||||
NumEnums: 0,
|
||||
NumMessages: 6,
|
||||
NumExtensions: 0,
|
||||
NumServices: 1,
|
||||
},
|
||||
GoTypes: file_api_v2_auth_service_proto_goTypes,
|
||||
DependencyIndexes: file_api_v2_auth_service_proto_depIdxs,
|
||||
MessageInfos: file_api_v2_auth_service_proto_msgTypes,
|
||||
GoTypes: file_api_v1_auth_service_proto_goTypes,
|
||||
DependencyIndexes: file_api_v1_auth_service_proto_depIdxs,
|
||||
MessageInfos: file_api_v1_auth_service_proto_msgTypes,
|
||||
}.Build()
|
||||
File_api_v2_auth_service_proto = out.File
|
||||
file_api_v2_auth_service_proto_rawDesc = nil
|
||||
file_api_v2_auth_service_proto_goTypes = nil
|
||||
file_api_v2_auth_service_proto_depIdxs = nil
|
||||
File_api_v1_auth_service_proto = out.File
|
||||
file_api_v1_auth_service_proto_rawDesc = nil
|
||||
file_api_v1_auth_service_proto_goTypes = nil
|
||||
file_api_v1_auth_service_proto_depIdxs = nil
|
||||
}
|
@ -1,12 +1,12 @@
|
||||
// Code generated by protoc-gen-grpc-gateway. DO NOT EDIT.
|
||||
// source: api/v2/auth_service.proto
|
||||
// source: api/v1/auth_service.proto
|
||||
|
||||
/*
|
||||
Package apiv2 is a reverse proxy.
|
||||
Package apiv1 is a reverse proxy.
|
||||
|
||||
It translates gRPC into RESTful JSON APIs.
|
||||
*/
|
||||
package apiv2
|
||||
package apiv1
|
||||
|
||||
import (
|
||||
"context"
|
||||
@ -189,7 +189,7 @@ func RegisterAuthServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux
|
||||
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
||||
var err error
|
||||
var annotatedContext context.Context
|
||||
annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/memos.api.v2.AuthService/GetAuthStatus", runtime.WithHTTPPathPattern("/api/v2/auth/status"))
|
||||
annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/memos.api.v1.AuthService/GetAuthStatus", runtime.WithHTTPPathPattern("/api/v1/auth/status"))
|
||||
if err != nil {
|
||||
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||
return
|
||||
@ -214,7 +214,7 @@ func RegisterAuthServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux
|
||||
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
||||
var err error
|
||||
var annotatedContext context.Context
|
||||
annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/memos.api.v2.AuthService/SignIn", runtime.WithHTTPPathPattern("/api/v2/auth/signin"))
|
||||
annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/memos.api.v1.AuthService/SignIn", runtime.WithHTTPPathPattern("/api/v1/auth/signin"))
|
||||
if err != nil {
|
||||
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||
return
|
||||
@ -239,7 +239,7 @@ func RegisterAuthServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux
|
||||
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
||||
var err error
|
||||
var annotatedContext context.Context
|
||||
annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/memos.api.v2.AuthService/SignInWithSSO", runtime.WithHTTPPathPattern("/api/v2/auth/signin/sso"))
|
||||
annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/memos.api.v1.AuthService/SignInWithSSO", runtime.WithHTTPPathPattern("/api/v1/auth/signin/sso"))
|
||||
if err != nil {
|
||||
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||
return
|
||||
@ -264,7 +264,7 @@ func RegisterAuthServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux
|
||||
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
||||
var err error
|
||||
var annotatedContext context.Context
|
||||
annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/memos.api.v2.AuthService/SignUp", runtime.WithHTTPPathPattern("/api/v2/auth/signup"))
|
||||
annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/memos.api.v1.AuthService/SignUp", runtime.WithHTTPPathPattern("/api/v1/auth/signup"))
|
||||
if err != nil {
|
||||
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||
return
|
||||
@ -289,7 +289,7 @@ func RegisterAuthServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux
|
||||
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
||||
var err error
|
||||
var annotatedContext context.Context
|
||||
annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/memos.api.v2.AuthService/SignOut", runtime.WithHTTPPathPattern("/api/v2/auth/signout"))
|
||||
annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/memos.api.v1.AuthService/SignOut", runtime.WithHTTPPathPattern("/api/v1/auth/signout"))
|
||||
if err != nil {
|
||||
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||
return
|
||||
@ -353,7 +353,7 @@ func RegisterAuthServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux
|
||||
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
||||
var err error
|
||||
var annotatedContext context.Context
|
||||
annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/memos.api.v2.AuthService/GetAuthStatus", runtime.WithHTTPPathPattern("/api/v2/auth/status"))
|
||||
annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/memos.api.v1.AuthService/GetAuthStatus", runtime.WithHTTPPathPattern("/api/v1/auth/status"))
|
||||
if err != nil {
|
||||
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||
return
|
||||
@ -375,7 +375,7 @@ func RegisterAuthServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux
|
||||
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
||||
var err error
|
||||
var annotatedContext context.Context
|
||||
annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/memos.api.v2.AuthService/SignIn", runtime.WithHTTPPathPattern("/api/v2/auth/signin"))
|
||||
annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/memos.api.v1.AuthService/SignIn", runtime.WithHTTPPathPattern("/api/v1/auth/signin"))
|
||||
if err != nil {
|
||||
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||
return
|
||||
@ -397,7 +397,7 @@ func RegisterAuthServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux
|
||||
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
||||
var err error
|
||||
var annotatedContext context.Context
|
||||
annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/memos.api.v2.AuthService/SignInWithSSO", runtime.WithHTTPPathPattern("/api/v2/auth/signin/sso"))
|
||||
annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/memos.api.v1.AuthService/SignInWithSSO", runtime.WithHTTPPathPattern("/api/v1/auth/signin/sso"))
|
||||
if err != nil {
|
||||
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||
return
|
||||
@ -419,7 +419,7 @@ func RegisterAuthServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux
|
||||
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
||||
var err error
|
||||
var annotatedContext context.Context
|
||||
annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/memos.api.v2.AuthService/SignUp", runtime.WithHTTPPathPattern("/api/v2/auth/signup"))
|
||||
annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/memos.api.v1.AuthService/SignUp", runtime.WithHTTPPathPattern("/api/v1/auth/signup"))
|
||||
if err != nil {
|
||||
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||
return
|
||||
@ -441,7 +441,7 @@ func RegisterAuthServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux
|
||||
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
||||
var err error
|
||||
var annotatedContext context.Context
|
||||
annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/memos.api.v2.AuthService/SignOut", runtime.WithHTTPPathPattern("/api/v2/auth/signout"))
|
||||
annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/memos.api.v1.AuthService/SignOut", runtime.WithHTTPPathPattern("/api/v1/auth/signout"))
|
||||
if err != nil {
|
||||
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||
return
|
||||
@ -461,15 +461,15 @@ func RegisterAuthServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux
|
||||
}
|
||||
|
||||
var (
|
||||
pattern_AuthService_GetAuthStatus_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"api", "v2", "auth", "status"}, ""))
|
||||
pattern_AuthService_GetAuthStatus_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"api", "v1", "auth", "status"}, ""))
|
||||
|
||||
pattern_AuthService_SignIn_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"api", "v2", "auth", "signin"}, ""))
|
||||
pattern_AuthService_SignIn_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"api", "v1", "auth", "signin"}, ""))
|
||||
|
||||
pattern_AuthService_SignInWithSSO_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4}, []string{"api", "v2", "auth", "signin", "sso"}, ""))
|
||||
pattern_AuthService_SignInWithSSO_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4}, []string{"api", "v1", "auth", "signin", "sso"}, ""))
|
||||
|
||||
pattern_AuthService_SignUp_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"api", "v2", "auth", "signup"}, ""))
|
||||
pattern_AuthService_SignUp_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"api", "v1", "auth", "signup"}, ""))
|
||||
|
||||
pattern_AuthService_SignOut_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"api", "v2", "auth", "signout"}, ""))
|
||||
pattern_AuthService_SignOut_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"api", "v1", "auth", "signout"}, ""))
|
||||
)
|
||||
|
||||
var (
|
@ -2,9 +2,9 @@
|
||||
// versions:
|
||||
// - protoc-gen-go-grpc v1.3.0
|
||||
// - protoc (unknown)
|
||||
// source: api/v2/auth_service.proto
|
||||
// source: api/v1/auth_service.proto
|
||||
|
||||
package apiv2
|
||||
package apiv1
|
||||
|
||||
import (
|
||||
context "context"
|
||||
@ -20,11 +20,11 @@ import (
|
||||
const _ = grpc.SupportPackageIsVersion7
|
||||
|
||||
const (
|
||||
AuthService_GetAuthStatus_FullMethodName = "/memos.api.v2.AuthService/GetAuthStatus"
|
||||
AuthService_SignIn_FullMethodName = "/memos.api.v2.AuthService/SignIn"
|
||||
AuthService_SignInWithSSO_FullMethodName = "/memos.api.v2.AuthService/SignInWithSSO"
|
||||
AuthService_SignUp_FullMethodName = "/memos.api.v2.AuthService/SignUp"
|
||||
AuthService_SignOut_FullMethodName = "/memos.api.v2.AuthService/SignOut"
|
||||
AuthService_GetAuthStatus_FullMethodName = "/memos.api.v1.AuthService/GetAuthStatus"
|
||||
AuthService_SignIn_FullMethodName = "/memos.api.v1.AuthService/SignIn"
|
||||
AuthService_SignInWithSSO_FullMethodName = "/memos.api.v1.AuthService/SignInWithSSO"
|
||||
AuthService_SignUp_FullMethodName = "/memos.api.v1.AuthService/SignUp"
|
||||
AuthService_SignOut_FullMethodName = "/memos.api.v1.AuthService/SignOut"
|
||||
)
|
||||
|
||||
// AuthServiceClient is the client API for AuthService service.
|
||||
@ -239,7 +239,7 @@ func _AuthService_SignOut_Handler(srv interface{}, ctx context.Context, dec func
|
||||
// It's only intended for direct use with grpc.RegisterService,
|
||||
// and not to be introspected or modified (even as a copy)
|
||||
var AuthService_ServiceDesc = grpc.ServiceDesc{
|
||||
ServiceName: "memos.api.v2.AuthService",
|
||||
ServiceName: "memos.api.v1.AuthService",
|
||||
HandlerType: (*AuthServiceServer)(nil),
|
||||
Methods: []grpc.MethodDesc{
|
||||
{
|
||||
@ -264,5 +264,5 @@ var AuthService_ServiceDesc = grpc.ServiceDesc{
|
||||
},
|
||||
},
|
||||
Streams: []grpc.StreamDesc{},
|
||||
Metadata: "api/v2/auth_service.proto",
|
||||
Metadata: "api/v1/auth_service.proto",
|
||||
}
|
@ -2,9 +2,9 @@
|
||||
// versions:
|
||||
// protoc-gen-go v1.33.0
|
||||
// protoc (unknown)
|
||||
// source: api/v2/common.proto
|
||||
// source: api/v1/common.proto
|
||||
|
||||
package apiv2
|
||||
package apiv1
|
||||
|
||||
import (
|
||||
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
|
||||
@ -53,11 +53,11 @@ func (x RowStatus) String() string {
|
||||
}
|
||||
|
||||
func (RowStatus) Descriptor() protoreflect.EnumDescriptor {
|
||||
return file_api_v2_common_proto_enumTypes[0].Descriptor()
|
||||
return file_api_v1_common_proto_enumTypes[0].Descriptor()
|
||||
}
|
||||
|
||||
func (RowStatus) Type() protoreflect.EnumType {
|
||||
return &file_api_v2_common_proto_enumTypes[0]
|
||||
return &file_api_v1_common_proto_enumTypes[0]
|
||||
}
|
||||
|
||||
func (x RowStatus) Number() protoreflect.EnumNumber {
|
||||
@ -66,7 +66,7 @@ func (x RowStatus) Number() protoreflect.EnumNumber {
|
||||
|
||||
// Deprecated: Use RowStatus.Descriptor instead.
|
||||
func (RowStatus) EnumDescriptor() ([]byte, []int) {
|
||||
return file_api_v2_common_proto_rawDescGZIP(), []int{0}
|
||||
return file_api_v1_common_proto_rawDescGZIP(), []int{0}
|
||||
}
|
||||
|
||||
// Used internally for obfuscating the page token.
|
||||
@ -82,7 +82,7 @@ type PageToken struct {
|
||||
func (x *PageToken) Reset() {
|
||||
*x = PageToken{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_api_v2_common_proto_msgTypes[0]
|
||||
mi := &file_api_v1_common_proto_msgTypes[0]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
@ -95,7 +95,7 @@ func (x *PageToken) String() string {
|
||||
func (*PageToken) ProtoMessage() {}
|
||||
|
||||
func (x *PageToken) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_api_v2_common_proto_msgTypes[0]
|
||||
mi := &file_api_v1_common_proto_msgTypes[0]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
@ -108,7 +108,7 @@ func (x *PageToken) ProtoReflect() protoreflect.Message {
|
||||
|
||||
// Deprecated: Use PageToken.ProtoReflect.Descriptor instead.
|
||||
func (*PageToken) Descriptor() ([]byte, []int) {
|
||||
return file_api_v2_common_proto_rawDescGZIP(), []int{0}
|
||||
return file_api_v1_common_proto_rawDescGZIP(), []int{0}
|
||||
}
|
||||
|
||||
func (x *PageToken) GetLimit() int32 {
|
||||
@ -125,12 +125,12 @@ func (x *PageToken) GetOffset() int32 {
|
||||
return 0
|
||||
}
|
||||
|
||||
var File_api_v2_common_proto protoreflect.FileDescriptor
|
||||
var File_api_v1_common_proto protoreflect.FileDescriptor
|
||||
|
||||
var file_api_v2_common_proto_rawDesc = []byte{
|
||||
0x0a, 0x13, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x32, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e,
|
||||
var file_api_v1_common_proto_rawDesc = []byte{
|
||||
0x0a, 0x13, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e,
|
||||
0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0c, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69,
|
||||
0x2e, 0x76, 0x32, 0x22, 0x39, 0x0a, 0x09, 0x50, 0x61, 0x67, 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e,
|
||||
0x2e, 0x76, 0x31, 0x22, 0x39, 0x0a, 0x09, 0x50, 0x61, 0x67, 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e,
|
||||
0x12, 0x14, 0x0a, 0x05, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52,
|
||||
0x05, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74,
|
||||
0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x2a, 0x41,
|
||||
@ -139,37 +139,37 @@ var file_api_v2_common_proto_rawDesc = []byte{
|
||||
0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x0a, 0x0a, 0x06, 0x41, 0x43, 0x54, 0x49, 0x56,
|
||||
0x45, 0x10, 0x01, 0x12, 0x0c, 0x0a, 0x08, 0x41, 0x52, 0x43, 0x48, 0x49, 0x56, 0x45, 0x44, 0x10,
|
||||
0x02, 0x42, 0xa3, 0x01, 0x0a, 0x10, 0x63, 0x6f, 0x6d, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e,
|
||||
0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x42, 0x0b, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x50, 0x72,
|
||||
0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x42, 0x0b, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 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,
|
||||
0x31, 0x3b, 0x61, 0x70, 0x69, 0x76, 0x31, 0xa2, 0x02, 0x03, 0x4d, 0x41, 0x58, 0xaa, 0x02, 0x0c,
|
||||
0x4d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x41, 0x70, 0x69, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x0c, 0x4d,
|
||||
0x65, 0x6d, 0x6f, 0x73, 0x5c, 0x41, 0x70, 0x69, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x18, 0x4d, 0x65,
|
||||
0x6d, 0x6f, 0x73, 0x5c, 0x41, 0x70, 0x69, 0x5c, 0x56, 0x31, 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,
|
||||
0x41, 0x70, 0x69, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
|
||||
}
|
||||
|
||||
var (
|
||||
file_api_v2_common_proto_rawDescOnce sync.Once
|
||||
file_api_v2_common_proto_rawDescData = file_api_v2_common_proto_rawDesc
|
||||
file_api_v1_common_proto_rawDescOnce sync.Once
|
||||
file_api_v1_common_proto_rawDescData = file_api_v1_common_proto_rawDesc
|
||||
)
|
||||
|
||||
func file_api_v2_common_proto_rawDescGZIP() []byte {
|
||||
file_api_v2_common_proto_rawDescOnce.Do(func() {
|
||||
file_api_v2_common_proto_rawDescData = protoimpl.X.CompressGZIP(file_api_v2_common_proto_rawDescData)
|
||||
func file_api_v1_common_proto_rawDescGZIP() []byte {
|
||||
file_api_v1_common_proto_rawDescOnce.Do(func() {
|
||||
file_api_v1_common_proto_rawDescData = protoimpl.X.CompressGZIP(file_api_v1_common_proto_rawDescData)
|
||||
})
|
||||
return file_api_v2_common_proto_rawDescData
|
||||
return file_api_v1_common_proto_rawDescData
|
||||
}
|
||||
|
||||
var file_api_v2_common_proto_enumTypes = make([]protoimpl.EnumInfo, 1)
|
||||
var file_api_v2_common_proto_msgTypes = make([]protoimpl.MessageInfo, 1)
|
||||
var file_api_v2_common_proto_goTypes = []interface{}{
|
||||
(RowStatus)(0), // 0: memos.api.v2.RowStatus
|
||||
(*PageToken)(nil), // 1: memos.api.v2.PageToken
|
||||
var file_api_v1_common_proto_enumTypes = make([]protoimpl.EnumInfo, 1)
|
||||
var file_api_v1_common_proto_msgTypes = make([]protoimpl.MessageInfo, 1)
|
||||
var file_api_v1_common_proto_goTypes = []interface{}{
|
||||
(RowStatus)(0), // 0: memos.api.v1.RowStatus
|
||||
(*PageToken)(nil), // 1: memos.api.v1.PageToken
|
||||
}
|
||||
var file_api_v2_common_proto_depIdxs = []int32{
|
||||
var file_api_v1_common_proto_depIdxs = []int32{
|
||||
0, // [0:0] is the sub-list for method output_type
|
||||
0, // [0:0] is the sub-list for method input_type
|
||||
0, // [0:0] is the sub-list for extension type_name
|
||||
@ -177,13 +177,13 @@ var file_api_v2_common_proto_depIdxs = []int32{
|
||||
0, // [0:0] is the sub-list for field type_name
|
||||
}
|
||||
|
||||
func init() { file_api_v2_common_proto_init() }
|
||||
func file_api_v2_common_proto_init() {
|
||||
if File_api_v2_common_proto != nil {
|
||||
func init() { file_api_v1_common_proto_init() }
|
||||
func file_api_v1_common_proto_init() {
|
||||
if File_api_v1_common_proto != nil {
|
||||
return
|
||||
}
|
||||
if !protoimpl.UnsafeEnabled {
|
||||
file_api_v2_common_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
|
||||
file_api_v1_common_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*PageToken); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
@ -200,19 +200,19 @@ func file_api_v2_common_proto_init() {
|
||||
out := protoimpl.TypeBuilder{
|
||||
File: protoimpl.DescBuilder{
|
||||
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
|
||||
RawDescriptor: file_api_v2_common_proto_rawDesc,
|
||||
RawDescriptor: file_api_v1_common_proto_rawDesc,
|
||||
NumEnums: 1,
|
||||
NumMessages: 1,
|
||||
NumExtensions: 0,
|
||||
NumServices: 0,
|
||||
},
|
||||
GoTypes: file_api_v2_common_proto_goTypes,
|
||||
DependencyIndexes: file_api_v2_common_proto_depIdxs,
|
||||
EnumInfos: file_api_v2_common_proto_enumTypes,
|
||||
MessageInfos: file_api_v2_common_proto_msgTypes,
|
||||
GoTypes: file_api_v1_common_proto_goTypes,
|
||||
DependencyIndexes: file_api_v1_common_proto_depIdxs,
|
||||
EnumInfos: file_api_v1_common_proto_enumTypes,
|
||||
MessageInfos: file_api_v1_common_proto_msgTypes,
|
||||
}.Build()
|
||||
File_api_v2_common_proto = out.File
|
||||
file_api_v2_common_proto_rawDesc = nil
|
||||
file_api_v2_common_proto_goTypes = nil
|
||||
file_api_v2_common_proto_depIdxs = nil
|
||||
File_api_v1_common_proto = out.File
|
||||
file_api_v1_common_proto_rawDesc = nil
|
||||
file_api_v1_common_proto_goTypes = nil
|
||||
file_api_v1_common_proto_depIdxs = nil
|
||||
}
|
@ -2,9 +2,9 @@
|
||||
// versions:
|
||||
// protoc-gen-go v1.33.0
|
||||
// protoc (unknown)
|
||||
// source: api/v2/idp_service.proto
|
||||
// source: api/v1/idp_service.proto
|
||||
|
||||
package apiv2
|
||||
package apiv1
|
||||
|
||||
import (
|
||||
_ "google.golang.org/genproto/googleapis/api/annotations"
|
||||
@ -53,11 +53,11 @@ func (x IdentityProvider_Type) String() string {
|
||||
}
|
||||
|
||||
func (IdentityProvider_Type) Descriptor() protoreflect.EnumDescriptor {
|
||||
return file_api_v2_idp_service_proto_enumTypes[0].Descriptor()
|
||||
return file_api_v1_idp_service_proto_enumTypes[0].Descriptor()
|
||||
}
|
||||
|
||||
func (IdentityProvider_Type) Type() protoreflect.EnumType {
|
||||
return &file_api_v2_idp_service_proto_enumTypes[0]
|
||||
return &file_api_v1_idp_service_proto_enumTypes[0]
|
||||
}
|
||||
|
||||
func (x IdentityProvider_Type) Number() protoreflect.EnumNumber {
|
||||
@ -66,7 +66,7 @@ func (x IdentityProvider_Type) Number() protoreflect.EnumNumber {
|
||||
|
||||
// Deprecated: Use IdentityProvider_Type.Descriptor instead.
|
||||
func (IdentityProvider_Type) EnumDescriptor() ([]byte, []int) {
|
||||
return file_api_v2_idp_service_proto_rawDescGZIP(), []int{0, 0}
|
||||
return file_api_v1_idp_service_proto_rawDescGZIP(), []int{0, 0}
|
||||
}
|
||||
|
||||
type IdentityProvider struct {
|
||||
@ -77,7 +77,7 @@ 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"`
|
||||
Type IdentityProvider_Type `protobuf:"varint,2,opt,name=type,proto3,enum=memos.api.v1.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"`
|
||||
@ -86,7 +86,7 @@ type IdentityProvider struct {
|
||||
func (x *IdentityProvider) Reset() {
|
||||
*x = IdentityProvider{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_api_v2_idp_service_proto_msgTypes[0]
|
||||
mi := &file_api_v1_idp_service_proto_msgTypes[0]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
@ -99,7 +99,7 @@ func (x *IdentityProvider) String() string {
|
||||
func (*IdentityProvider) ProtoMessage() {}
|
||||
|
||||
func (x *IdentityProvider) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_api_v2_idp_service_proto_msgTypes[0]
|
||||
mi := &file_api_v1_idp_service_proto_msgTypes[0]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
@ -112,7 +112,7 @@ func (x *IdentityProvider) ProtoReflect() protoreflect.Message {
|
||||
|
||||
// Deprecated: Use IdentityProvider.ProtoReflect.Descriptor instead.
|
||||
func (*IdentityProvider) Descriptor() ([]byte, []int) {
|
||||
return file_api_v2_idp_service_proto_rawDescGZIP(), []int{0}
|
||||
return file_api_v1_idp_service_proto_rawDescGZIP(), []int{0}
|
||||
}
|
||||
|
||||
func (x *IdentityProvider) GetName() string {
|
||||
@ -164,7 +164,7 @@ type IdentityProviderConfig struct {
|
||||
func (x *IdentityProviderConfig) Reset() {
|
||||
*x = IdentityProviderConfig{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_api_v2_idp_service_proto_msgTypes[1]
|
||||
mi := &file_api_v1_idp_service_proto_msgTypes[1]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
@ -177,7 +177,7 @@ func (x *IdentityProviderConfig) String() string {
|
||||
func (*IdentityProviderConfig) ProtoMessage() {}
|
||||
|
||||
func (x *IdentityProviderConfig) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_api_v2_idp_service_proto_msgTypes[1]
|
||||
mi := &file_api_v1_idp_service_proto_msgTypes[1]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
@ -190,7 +190,7 @@ func (x *IdentityProviderConfig) ProtoReflect() protoreflect.Message {
|
||||
|
||||
// Deprecated: Use IdentityProviderConfig.ProtoReflect.Descriptor instead.
|
||||
func (*IdentityProviderConfig) Descriptor() ([]byte, []int) {
|
||||
return file_api_v2_idp_service_proto_rawDescGZIP(), []int{1}
|
||||
return file_api_v1_idp_service_proto_rawDescGZIP(), []int{1}
|
||||
}
|
||||
|
||||
func (m *IdentityProviderConfig) GetConfig() isIdentityProviderConfig_Config {
|
||||
@ -230,7 +230,7 @@ type FieldMapping struct {
|
||||
func (x *FieldMapping) Reset() {
|
||||
*x = FieldMapping{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_api_v2_idp_service_proto_msgTypes[2]
|
||||
mi := &file_api_v1_idp_service_proto_msgTypes[2]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
@ -243,7 +243,7 @@ func (x *FieldMapping) String() string {
|
||||
func (*FieldMapping) ProtoMessage() {}
|
||||
|
||||
func (x *FieldMapping) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_api_v2_idp_service_proto_msgTypes[2]
|
||||
mi := &file_api_v1_idp_service_proto_msgTypes[2]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
@ -256,7 +256,7 @@ func (x *FieldMapping) ProtoReflect() protoreflect.Message {
|
||||
|
||||
// Deprecated: Use FieldMapping.ProtoReflect.Descriptor instead.
|
||||
func (*FieldMapping) Descriptor() ([]byte, []int) {
|
||||
return file_api_v2_idp_service_proto_rawDescGZIP(), []int{2}
|
||||
return file_api_v1_idp_service_proto_rawDescGZIP(), []int{2}
|
||||
}
|
||||
|
||||
func (x *FieldMapping) GetIdentifier() string {
|
||||
@ -297,7 +297,7 @@ type OAuth2Config struct {
|
||||
func (x *OAuth2Config) Reset() {
|
||||
*x = OAuth2Config{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_api_v2_idp_service_proto_msgTypes[3]
|
||||
mi := &file_api_v1_idp_service_proto_msgTypes[3]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
@ -310,7 +310,7 @@ func (x *OAuth2Config) String() string {
|
||||
func (*OAuth2Config) ProtoMessage() {}
|
||||
|
||||
func (x *OAuth2Config) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_api_v2_idp_service_proto_msgTypes[3]
|
||||
mi := &file_api_v1_idp_service_proto_msgTypes[3]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
@ -323,7 +323,7 @@ func (x *OAuth2Config) ProtoReflect() protoreflect.Message {
|
||||
|
||||
// Deprecated: Use OAuth2Config.ProtoReflect.Descriptor instead.
|
||||
func (*OAuth2Config) Descriptor() ([]byte, []int) {
|
||||
return file_api_v2_idp_service_proto_rawDescGZIP(), []int{3}
|
||||
return file_api_v1_idp_service_proto_rawDescGZIP(), []int{3}
|
||||
}
|
||||
|
||||
func (x *OAuth2Config) GetClientId() string {
|
||||
@ -384,7 +384,7 @@ type ListIdentityProvidersRequest struct {
|
||||
func (x *ListIdentityProvidersRequest) Reset() {
|
||||
*x = ListIdentityProvidersRequest{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_api_v2_idp_service_proto_msgTypes[4]
|
||||
mi := &file_api_v1_idp_service_proto_msgTypes[4]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
@ -397,7 +397,7 @@ func (x *ListIdentityProvidersRequest) String() string {
|
||||
func (*ListIdentityProvidersRequest) ProtoMessage() {}
|
||||
|
||||
func (x *ListIdentityProvidersRequest) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_api_v2_idp_service_proto_msgTypes[4]
|
||||
mi := &file_api_v1_idp_service_proto_msgTypes[4]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
@ -410,7 +410,7 @@ func (x *ListIdentityProvidersRequest) ProtoReflect() protoreflect.Message {
|
||||
|
||||
// Deprecated: Use ListIdentityProvidersRequest.ProtoReflect.Descriptor instead.
|
||||
func (*ListIdentityProvidersRequest) Descriptor() ([]byte, []int) {
|
||||
return file_api_v2_idp_service_proto_rawDescGZIP(), []int{4}
|
||||
return file_api_v1_idp_service_proto_rawDescGZIP(), []int{4}
|
||||
}
|
||||
|
||||
type ListIdentityProvidersResponse struct {
|
||||
@ -424,7 +424,7 @@ type ListIdentityProvidersResponse struct {
|
||||
func (x *ListIdentityProvidersResponse) Reset() {
|
||||
*x = ListIdentityProvidersResponse{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_api_v2_idp_service_proto_msgTypes[5]
|
||||
mi := &file_api_v1_idp_service_proto_msgTypes[5]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
@ -437,7 +437,7 @@ func (x *ListIdentityProvidersResponse) String() string {
|
||||
func (*ListIdentityProvidersResponse) ProtoMessage() {}
|
||||
|
||||
func (x *ListIdentityProvidersResponse) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_api_v2_idp_service_proto_msgTypes[5]
|
||||
mi := &file_api_v1_idp_service_proto_msgTypes[5]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
@ -450,7 +450,7 @@ func (x *ListIdentityProvidersResponse) ProtoReflect() protoreflect.Message {
|
||||
|
||||
// Deprecated: Use ListIdentityProvidersResponse.ProtoReflect.Descriptor instead.
|
||||
func (*ListIdentityProvidersResponse) Descriptor() ([]byte, []int) {
|
||||
return file_api_v2_idp_service_proto_rawDescGZIP(), []int{5}
|
||||
return file_api_v1_idp_service_proto_rawDescGZIP(), []int{5}
|
||||
}
|
||||
|
||||
func (x *ListIdentityProvidersResponse) GetIdentityProviders() []*IdentityProvider {
|
||||
@ -473,7 +473,7 @@ type GetIdentityProviderRequest struct {
|
||||
func (x *GetIdentityProviderRequest) Reset() {
|
||||
*x = GetIdentityProviderRequest{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_api_v2_idp_service_proto_msgTypes[6]
|
||||
mi := &file_api_v1_idp_service_proto_msgTypes[6]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
@ -486,7 +486,7 @@ func (x *GetIdentityProviderRequest) String() string {
|
||||
func (*GetIdentityProviderRequest) ProtoMessage() {}
|
||||
|
||||
func (x *GetIdentityProviderRequest) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_api_v2_idp_service_proto_msgTypes[6]
|
||||
mi := &file_api_v1_idp_service_proto_msgTypes[6]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
@ -499,7 +499,7 @@ func (x *GetIdentityProviderRequest) ProtoReflect() protoreflect.Message {
|
||||
|
||||
// Deprecated: Use GetIdentityProviderRequest.ProtoReflect.Descriptor instead.
|
||||
func (*GetIdentityProviderRequest) Descriptor() ([]byte, []int) {
|
||||
return file_api_v2_idp_service_proto_rawDescGZIP(), []int{6}
|
||||
return file_api_v1_idp_service_proto_rawDescGZIP(), []int{6}
|
||||
}
|
||||
|
||||
func (x *GetIdentityProviderRequest) GetName() string {
|
||||
@ -521,7 +521,7 @@ type CreateIdentityProviderRequest struct {
|
||||
func (x *CreateIdentityProviderRequest) Reset() {
|
||||
*x = CreateIdentityProviderRequest{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_api_v2_idp_service_proto_msgTypes[7]
|
||||
mi := &file_api_v1_idp_service_proto_msgTypes[7]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
@ -534,7 +534,7 @@ func (x *CreateIdentityProviderRequest) String() string {
|
||||
func (*CreateIdentityProviderRequest) ProtoMessage() {}
|
||||
|
||||
func (x *CreateIdentityProviderRequest) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_api_v2_idp_service_proto_msgTypes[7]
|
||||
mi := &file_api_v1_idp_service_proto_msgTypes[7]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
@ -547,7 +547,7 @@ func (x *CreateIdentityProviderRequest) ProtoReflect() protoreflect.Message {
|
||||
|
||||
// Deprecated: Use CreateIdentityProviderRequest.ProtoReflect.Descriptor instead.
|
||||
func (*CreateIdentityProviderRequest) Descriptor() ([]byte, []int) {
|
||||
return file_api_v2_idp_service_proto_rawDescGZIP(), []int{7}
|
||||
return file_api_v1_idp_service_proto_rawDescGZIP(), []int{7}
|
||||
}
|
||||
|
||||
func (x *CreateIdentityProviderRequest) GetIdentityProvider() *IdentityProvider {
|
||||
@ -572,7 +572,7 @@ type UpdateIdentityProviderRequest struct {
|
||||
func (x *UpdateIdentityProviderRequest) Reset() {
|
||||
*x = UpdateIdentityProviderRequest{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_api_v2_idp_service_proto_msgTypes[8]
|
||||
mi := &file_api_v1_idp_service_proto_msgTypes[8]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
@ -585,7 +585,7 @@ func (x *UpdateIdentityProviderRequest) String() string {
|
||||
func (*UpdateIdentityProviderRequest) ProtoMessage() {}
|
||||
|
||||
func (x *UpdateIdentityProviderRequest) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_api_v2_idp_service_proto_msgTypes[8]
|
||||
mi := &file_api_v1_idp_service_proto_msgTypes[8]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
@ -598,7 +598,7 @@ func (x *UpdateIdentityProviderRequest) ProtoReflect() protoreflect.Message {
|
||||
|
||||
// Deprecated: Use UpdateIdentityProviderRequest.ProtoReflect.Descriptor instead.
|
||||
func (*UpdateIdentityProviderRequest) Descriptor() ([]byte, []int) {
|
||||
return file_api_v2_idp_service_proto_rawDescGZIP(), []int{8}
|
||||
return file_api_v1_idp_service_proto_rawDescGZIP(), []int{8}
|
||||
}
|
||||
|
||||
func (x *UpdateIdentityProviderRequest) GetIdentityProvider() *IdentityProvider {
|
||||
@ -628,7 +628,7 @@ type DeleteIdentityProviderRequest struct {
|
||||
func (x *DeleteIdentityProviderRequest) Reset() {
|
||||
*x = DeleteIdentityProviderRequest{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_api_v2_idp_service_proto_msgTypes[9]
|
||||
mi := &file_api_v1_idp_service_proto_msgTypes[9]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
@ -641,7 +641,7 @@ func (x *DeleteIdentityProviderRequest) String() string {
|
||||
func (*DeleteIdentityProviderRequest) ProtoMessage() {}
|
||||
|
||||
func (x *DeleteIdentityProviderRequest) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_api_v2_idp_service_proto_msgTypes[9]
|
||||
mi := &file_api_v1_idp_service_proto_msgTypes[9]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
@ -654,7 +654,7 @@ func (x *DeleteIdentityProviderRequest) ProtoReflect() protoreflect.Message {
|
||||
|
||||
// Deprecated: Use DeleteIdentityProviderRequest.ProtoReflect.Descriptor instead.
|
||||
func (*DeleteIdentityProviderRequest) Descriptor() ([]byte, []int) {
|
||||
return file_api_v2_idp_service_proto_rawDescGZIP(), []int{9}
|
||||
return file_api_v1_idp_service_proto_rawDescGZIP(), []int{9}
|
||||
}
|
||||
|
||||
func (x *DeleteIdentityProviderRequest) GetName() string {
|
||||
@ -664,12 +664,12 @@ func (x *DeleteIdentityProviderRequest) GetName() string {
|
||||
return ""
|
||||
}
|
||||
|
||||
var File_api_v2_idp_service_proto protoreflect.FileDescriptor
|
||||
var File_api_v1_idp_service_proto protoreflect.FileDescriptor
|
||||
|
||||
var file_api_v2_idp_service_proto_rawDesc = []byte{
|
||||
0x0a, 0x18, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x32, 0x2f, 0x69, 0x64, 0x70, 0x5f, 0x73, 0x65, 0x72,
|
||||
var file_api_v1_idp_service_proto_rawDesc = []byte{
|
||||
0x0a, 0x18, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, 0x2f, 0x69, 0x64, 0x70, 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,
|
||||
0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 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,
|
||||
@ -681,7 +681,7 @@ var file_api_v2_idp_service_proto_rawDesc = []byte{
|
||||
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, 0x2e, 0x61, 0x70,
|
||||
0x69, 0x2e, 0x76, 0x32, 0x2e, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x50, 0x72, 0x6f,
|
||||
0x69, 0x2e, 0x76, 0x31, 0x2e, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x50, 0x72, 0x6f,
|
||||
0x76, 0x69, 0x64, 0x65, 0x72, 0x2e, 0x54, 0x79, 0x70, 0x65, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65,
|
||||
0x12, 0x14, 0x0a, 0x05, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52,
|
||||
0x05, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x12, 0x2b, 0x0a, 0x11, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69,
|
||||
@ -689,7 +689,7 @@ var file_api_v2_idp_service_proto_rawDesc = []byte{
|
||||
0x09, 0x52, 0x10, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x66, 0x69, 0x65, 0x72, 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,
|
||||
0x76, 0x31, 0x2e, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x50, 0x72, 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,
|
||||
@ -697,7 +697,7 @@ var file_api_v2_idp_service_proto_rawDesc = []byte{
|
||||
0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x43,
|
||||
0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x41, 0x0a, 0x0d, 0x6f, 0x61, 0x75, 0x74, 0x68, 0x32, 0x5f,
|
||||
0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 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,
|
||||
0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x4f, 0x41, 0x75, 0x74,
|
||||
0x68, 0x32, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x48, 0x00, 0x52, 0x0c, 0x6f, 0x61, 0x75, 0x74,
|
||||
0x68, 0x32, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x42, 0x08, 0x0a, 0x06, 0x63, 0x6f, 0x6e, 0x66,
|
||||
0x69, 0x67, 0x22, 0x67, 0x0a, 0x0c, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4d, 0x61, 0x70, 0x70, 0x69,
|
||||
@ -721,7 +721,7 @@ var file_api_v2_idp_service_proto_rawDesc = []byte{
|
||||
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,
|
||||
0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 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,
|
||||
@ -729,7 +729,7 @@ var file_api_v2_idp_service_proto_rawDesc = []byte{
|
||||
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,
|
||||
0x32, 0x1e, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 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,
|
||||
@ -739,14 +739,14 @@ var file_api_v2_idp_service_proto_rawDesc = []byte{
|
||||
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,
|
||||
0x0b, 0x32, 0x1e, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31,
|
||||
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,
|
||||
0x32, 0x1e, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 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,
|
||||
@ -760,117 +760,117 @@ var file_api_v2_idp_service_proto_rawDesc = []byte{
|
||||
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,
|
||||
0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 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,
|
||||
0x70, 0x69, 0x2e, 0x76, 0x31, 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,
|
||||
0x69, 0x2f, 0x76, 0x31, 0x2f, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x50, 0x72, 0x6f,
|
||||
0x76, 0x69, 0x64, 0x65, 0x72, 0x73, 0x12, 0x92, 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,
|
||||
0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 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, 0x1a, 0x1e, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73,
|
||||
0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79,
|
||||
0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79,
|
||||
0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x22, 0x31, 0xda, 0x41, 0x04, 0x6e, 0x61, 0x6d,
|
||||
0x65, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x24, 0x12, 0x22, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x32,
|
||||
0x65, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x24, 0x12, 0x22, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31,
|
||||
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, 0x9b, 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,
|
||||
0x70, 0x69, 0x2e, 0x76, 0x31, 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, 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,
|
||||
0x76, 0x31, 0x2e, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x50, 0x72, 0x6f, 0x76, 0x69,
|
||||
0x64, 0x65, 0x72, 0x22, 0x34, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x2e, 0x3a, 0x11, 0x69, 0x64, 0x65,
|
||||
0x6e, 0x74, 0x69, 0x74, 0x79, 0x5f, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x22, 0x19,
|
||||
0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x32, 0x2f, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79,
|
||||
0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, 0x2f, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79,
|
||||
0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x73, 0x12, 0xd6, 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,
|
||||
0x2e, 0x76, 0x31, 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, 0x1e, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32,
|
||||
0x74, 0x1a, 0x1e, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31,
|
||||
0x2e, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65,
|
||||
0x72, 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, 0x69, 0x2f, 0x76, 0x31, 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, 0x90, 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,
|
||||
0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 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, 0x16, 0x2e, 0x67, 0x6f, 0x6f,
|
||||
0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70,
|
||||
0x74, 0x79, 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,
|
||||
0x24, 0x2a, 0x22, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, 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,
|
||||
0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 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,
|
||||
0x65, 0x6e, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, 0x3b, 0x61, 0x70, 0x69, 0x76, 0x31, 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,
|
||||
0x69, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x0c, 0x4d, 0x65, 0x6d, 0x6f, 0x73, 0x5c, 0x41, 0x70, 0x69,
|
||||
0x5c, 0x56, 0x31, 0xe2, 0x02, 0x18, 0x4d, 0x65, 0x6d, 0x6f, 0x73, 0x5c, 0x41, 0x70, 0x69, 0x5c,
|
||||
0x56, 0x31, 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, 0x31, 0x62,
|
||||
0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
|
||||
}
|
||||
|
||||
var (
|
||||
file_api_v2_idp_service_proto_rawDescOnce sync.Once
|
||||
file_api_v2_idp_service_proto_rawDescData = file_api_v2_idp_service_proto_rawDesc
|
||||
file_api_v1_idp_service_proto_rawDescOnce sync.Once
|
||||
file_api_v1_idp_service_proto_rawDescData = file_api_v1_idp_service_proto_rawDesc
|
||||
)
|
||||
|
||||
func file_api_v2_idp_service_proto_rawDescGZIP() []byte {
|
||||
file_api_v2_idp_service_proto_rawDescOnce.Do(func() {
|
||||
file_api_v2_idp_service_proto_rawDescData = protoimpl.X.CompressGZIP(file_api_v2_idp_service_proto_rawDescData)
|
||||
func file_api_v1_idp_service_proto_rawDescGZIP() []byte {
|
||||
file_api_v1_idp_service_proto_rawDescOnce.Do(func() {
|
||||
file_api_v1_idp_service_proto_rawDescData = protoimpl.X.CompressGZIP(file_api_v1_idp_service_proto_rawDescData)
|
||||
})
|
||||
return file_api_v2_idp_service_proto_rawDescData
|
||||
return file_api_v1_idp_service_proto_rawDescData
|
||||
}
|
||||
|
||||
var file_api_v2_idp_service_proto_enumTypes = make([]protoimpl.EnumInfo, 1)
|
||||
var file_api_v2_idp_service_proto_msgTypes = make([]protoimpl.MessageInfo, 10)
|
||||
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
|
||||
(*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
|
||||
(*CreateIdentityProviderRequest)(nil), // 8: memos.api.v2.CreateIdentityProviderRequest
|
||||
(*UpdateIdentityProviderRequest)(nil), // 9: memos.api.v2.UpdateIdentityProviderRequest
|
||||
(*DeleteIdentityProviderRequest)(nil), // 10: memos.api.v2.DeleteIdentityProviderRequest
|
||||
var file_api_v1_idp_service_proto_enumTypes = make([]protoimpl.EnumInfo, 1)
|
||||
var file_api_v1_idp_service_proto_msgTypes = make([]protoimpl.MessageInfo, 10)
|
||||
var file_api_v1_idp_service_proto_goTypes = []interface{}{
|
||||
(IdentityProvider_Type)(0), // 0: memos.api.v1.IdentityProvider.Type
|
||||
(*IdentityProvider)(nil), // 1: memos.api.v1.IdentityProvider
|
||||
(*IdentityProviderConfig)(nil), // 2: memos.api.v1.IdentityProviderConfig
|
||||
(*FieldMapping)(nil), // 3: memos.api.v1.FieldMapping
|
||||
(*OAuth2Config)(nil), // 4: memos.api.v1.OAuth2Config
|
||||
(*ListIdentityProvidersRequest)(nil), // 5: memos.api.v1.ListIdentityProvidersRequest
|
||||
(*ListIdentityProvidersResponse)(nil), // 6: memos.api.v1.ListIdentityProvidersResponse
|
||||
(*GetIdentityProviderRequest)(nil), // 7: memos.api.v1.GetIdentityProviderRequest
|
||||
(*CreateIdentityProviderRequest)(nil), // 8: memos.api.v1.CreateIdentityProviderRequest
|
||||
(*UpdateIdentityProviderRequest)(nil), // 9: memos.api.v1.UpdateIdentityProviderRequest
|
||||
(*DeleteIdentityProviderRequest)(nil), // 10: memos.api.v1.DeleteIdentityProviderRequest
|
||||
(*fieldmaskpb.FieldMask)(nil), // 11: google.protobuf.FieldMask
|
||||
(*emptypb.Empty)(nil), // 12: google.protobuf.Empty
|
||||
}
|
||||
var file_api_v2_idp_service_proto_depIdxs = []int32{
|
||||
0, // 0: memos.api.v2.IdentityProvider.type:type_name -> memos.api.v2.IdentityProvider.Type
|
||||
2, // 1: memos.api.v2.IdentityProvider.config:type_name -> memos.api.v2.IdentityProviderConfig
|
||||
4, // 2: memos.api.v2.IdentityProviderConfig.oauth2_config: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.CreateIdentityProviderRequest.identity_provider:type_name -> memos.api.v2.IdentityProvider
|
||||
1, // 6: memos.api.v2.UpdateIdentityProviderRequest.identity_provider:type_name -> memos.api.v2.IdentityProvider
|
||||
11, // 7: memos.api.v2.UpdateIdentityProviderRequest.update_mask:type_name -> google.protobuf.FieldMask
|
||||
5, // 8: memos.api.v2.IdentityProviderService.ListIdentityProviders:input_type -> memos.api.v2.ListIdentityProvidersRequest
|
||||
7, // 9: memos.api.v2.IdentityProviderService.GetIdentityProvider:input_type -> memos.api.v2.GetIdentityProviderRequest
|
||||
8, // 10: memos.api.v2.IdentityProviderService.CreateIdentityProvider:input_type -> memos.api.v2.CreateIdentityProviderRequest
|
||||
9, // 11: memos.api.v2.IdentityProviderService.UpdateIdentityProvider:input_type -> memos.api.v2.UpdateIdentityProviderRequest
|
||||
10, // 12: memos.api.v2.IdentityProviderService.DeleteIdentityProvider:input_type -> memos.api.v2.DeleteIdentityProviderRequest
|
||||
6, // 13: memos.api.v2.IdentityProviderService.ListIdentityProviders:output_type -> memos.api.v2.ListIdentityProvidersResponse
|
||||
1, // 14: memos.api.v2.IdentityProviderService.GetIdentityProvider:output_type -> memos.api.v2.IdentityProvider
|
||||
1, // 15: memos.api.v2.IdentityProviderService.CreateIdentityProvider:output_type -> memos.api.v2.IdentityProvider
|
||||
1, // 16: memos.api.v2.IdentityProviderService.UpdateIdentityProvider:output_type -> memos.api.v2.IdentityProvider
|
||||
12, // 17: memos.api.v2.IdentityProviderService.DeleteIdentityProvider:output_type -> google.protobuf.Empty
|
||||
var file_api_v1_idp_service_proto_depIdxs = []int32{
|
||||
0, // 0: memos.api.v1.IdentityProvider.type:type_name -> memos.api.v1.IdentityProvider.Type
|
||||
2, // 1: memos.api.v1.IdentityProvider.config:type_name -> memos.api.v1.IdentityProviderConfig
|
||||
4, // 2: memos.api.v1.IdentityProviderConfig.oauth2_config:type_name -> memos.api.v1.OAuth2Config
|
||||
3, // 3: memos.api.v1.OAuth2Config.field_mapping:type_name -> memos.api.v1.FieldMapping
|
||||
1, // 4: memos.api.v1.ListIdentityProvidersResponse.identity_providers:type_name -> memos.api.v1.IdentityProvider
|
||||
1, // 5: memos.api.v1.CreateIdentityProviderRequest.identity_provider:type_name -> memos.api.v1.IdentityProvider
|
||||
1, // 6: memos.api.v1.UpdateIdentityProviderRequest.identity_provider:type_name -> memos.api.v1.IdentityProvider
|
||||
11, // 7: memos.api.v1.UpdateIdentityProviderRequest.update_mask:type_name -> google.protobuf.FieldMask
|
||||
5, // 8: memos.api.v1.IdentityProviderService.ListIdentityProviders:input_type -> memos.api.v1.ListIdentityProvidersRequest
|
||||
7, // 9: memos.api.v1.IdentityProviderService.GetIdentityProvider:input_type -> memos.api.v1.GetIdentityProviderRequest
|
||||
8, // 10: memos.api.v1.IdentityProviderService.CreateIdentityProvider:input_type -> memos.api.v1.CreateIdentityProviderRequest
|
||||
9, // 11: memos.api.v1.IdentityProviderService.UpdateIdentityProvider:input_type -> memos.api.v1.UpdateIdentityProviderRequest
|
||||
10, // 12: memos.api.v1.IdentityProviderService.DeleteIdentityProvider:input_type -> memos.api.v1.DeleteIdentityProviderRequest
|
||||
6, // 13: memos.api.v1.IdentityProviderService.ListIdentityProviders:output_type -> memos.api.v1.ListIdentityProvidersResponse
|
||||
1, // 14: memos.api.v1.IdentityProviderService.GetIdentityProvider:output_type -> memos.api.v1.IdentityProvider
|
||||
1, // 15: memos.api.v1.IdentityProviderService.CreateIdentityProvider:output_type -> memos.api.v1.IdentityProvider
|
||||
1, // 16: memos.api.v1.IdentityProviderService.UpdateIdentityProvider:output_type -> memos.api.v1.IdentityProvider
|
||||
12, // 17: memos.api.v1.IdentityProviderService.DeleteIdentityProvider:output_type -> google.protobuf.Empty
|
||||
13, // [13:18] is the sub-list for method output_type
|
||||
8, // [8:13] is the sub-list for method input_type
|
||||
8, // [8:8] is the sub-list for extension type_name
|
||||
@ -878,13 +878,13 @@ var file_api_v2_idp_service_proto_depIdxs = []int32{
|
||||
0, // [0:8] is the sub-list for field type_name
|
||||
}
|
||||
|
||||
func init() { file_api_v2_idp_service_proto_init() }
|
||||
func file_api_v2_idp_service_proto_init() {
|
||||
if File_api_v2_idp_service_proto != nil {
|
||||
func init() { file_api_v1_idp_service_proto_init() }
|
||||
func file_api_v1_idp_service_proto_init() {
|
||||
if File_api_v1_idp_service_proto != nil {
|
||||
return
|
||||
}
|
||||
if !protoimpl.UnsafeEnabled {
|
||||
file_api_v2_idp_service_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
|
||||
file_api_v1_idp_service_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*IdentityProvider); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
@ -896,7 +896,7 @@ func file_api_v2_idp_service_proto_init() {
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_api_v2_idp_service_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
|
||||
file_api_v1_idp_service_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*IdentityProviderConfig); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
@ -908,7 +908,7 @@ func file_api_v2_idp_service_proto_init() {
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_api_v2_idp_service_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
|
||||
file_api_v1_idp_service_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*FieldMapping); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
@ -920,7 +920,7 @@ func file_api_v2_idp_service_proto_init() {
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_api_v2_idp_service_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} {
|
||||
file_api_v1_idp_service_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*OAuth2Config); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
@ -932,7 +932,7 @@ func file_api_v2_idp_service_proto_init() {
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_api_v2_idp_service_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} {
|
||||
file_api_v1_idp_service_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*ListIdentityProvidersRequest); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
@ -944,7 +944,7 @@ func file_api_v2_idp_service_proto_init() {
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_api_v2_idp_service_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} {
|
||||
file_api_v1_idp_service_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*ListIdentityProvidersResponse); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
@ -956,7 +956,7 @@ func file_api_v2_idp_service_proto_init() {
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_api_v2_idp_service_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} {
|
||||
file_api_v1_idp_service_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*GetIdentityProviderRequest); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
@ -968,7 +968,7 @@ func file_api_v2_idp_service_proto_init() {
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_api_v2_idp_service_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} {
|
||||
file_api_v1_idp_service_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*CreateIdentityProviderRequest); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
@ -980,7 +980,7 @@ func file_api_v2_idp_service_proto_init() {
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_api_v2_idp_service_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} {
|
||||
file_api_v1_idp_service_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*UpdateIdentityProviderRequest); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
@ -992,7 +992,7 @@ func file_api_v2_idp_service_proto_init() {
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_api_v2_idp_service_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} {
|
||||
file_api_v1_idp_service_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*DeleteIdentityProviderRequest); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
@ -1005,26 +1005,26 @@ func file_api_v2_idp_service_proto_init() {
|
||||
}
|
||||
}
|
||||
}
|
||||
file_api_v2_idp_service_proto_msgTypes[1].OneofWrappers = []interface{}{
|
||||
file_api_v1_idp_service_proto_msgTypes[1].OneofWrappers = []interface{}{
|
||||
(*IdentityProviderConfig_Oauth2Config)(nil),
|
||||
}
|
||||
type x struct{}
|
||||
out := protoimpl.TypeBuilder{
|
||||
File: protoimpl.DescBuilder{
|
||||
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
|
||||
RawDescriptor: file_api_v2_idp_service_proto_rawDesc,
|
||||
RawDescriptor: file_api_v1_idp_service_proto_rawDesc,
|
||||
NumEnums: 1,
|
||||
NumMessages: 10,
|
||||
NumExtensions: 0,
|
||||
NumServices: 1,
|
||||
},
|
||||
GoTypes: file_api_v2_idp_service_proto_goTypes,
|
||||
DependencyIndexes: file_api_v2_idp_service_proto_depIdxs,
|
||||
EnumInfos: file_api_v2_idp_service_proto_enumTypes,
|
||||
MessageInfos: file_api_v2_idp_service_proto_msgTypes,
|
||||
GoTypes: file_api_v1_idp_service_proto_goTypes,
|
||||
DependencyIndexes: file_api_v1_idp_service_proto_depIdxs,
|
||||
EnumInfos: file_api_v1_idp_service_proto_enumTypes,
|
||||
MessageInfos: file_api_v1_idp_service_proto_msgTypes,
|
||||
}.Build()
|
||||
File_api_v2_idp_service_proto = out.File
|
||||
file_api_v2_idp_service_proto_rawDesc = nil
|
||||
file_api_v2_idp_service_proto_goTypes = nil
|
||||
file_api_v2_idp_service_proto_depIdxs = nil
|
||||
File_api_v1_idp_service_proto = out.File
|
||||
file_api_v1_idp_service_proto_rawDesc = nil
|
||||
file_api_v1_idp_service_proto_goTypes = nil
|
||||
file_api_v1_idp_service_proto_depIdxs = nil
|
||||
}
|
@ -1,12 +1,12 @@
|
||||
// Code generated by protoc-gen-grpc-gateway. DO NOT EDIT.
|
||||
// source: api/v2/idp_service.proto
|
||||
// source: api/v1/idp_service.proto
|
||||
|
||||
/*
|
||||
Package apiv2 is a reverse proxy.
|
||||
Package apiv1 is a reverse proxy.
|
||||
|
||||
It translates gRPC into RESTful JSON APIs.
|
||||
*/
|
||||
package apiv2
|
||||
package apiv1
|
||||
|
||||
import (
|
||||
"context"
|
||||
@ -293,7 +293,7 @@ func RegisterIdentityProviderServiceHandlerServer(ctx context.Context, mux *runt
|
||||
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
||||
var err error
|
||||
var annotatedContext context.Context
|
||||
annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/memos.api.v2.IdentityProviderService/ListIdentityProviders", runtime.WithHTTPPathPattern("/api/v2/identityProviders"))
|
||||
annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/memos.api.v1.IdentityProviderService/ListIdentityProviders", runtime.WithHTTPPathPattern("/api/v1/identityProviders"))
|
||||
if err != nil {
|
||||
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||
return
|
||||
@ -318,7 +318,7 @@ func RegisterIdentityProviderServiceHandlerServer(ctx context.Context, mux *runt
|
||||
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
||||
var err error
|
||||
var annotatedContext context.Context
|
||||
annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/memos.api.v2.IdentityProviderService/GetIdentityProvider", runtime.WithHTTPPathPattern("/api/v2/{name=identityProviders/*}"))
|
||||
annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/memos.api.v1.IdentityProviderService/GetIdentityProvider", runtime.WithHTTPPathPattern("/api/v1/{name=identityProviders/*}"))
|
||||
if err != nil {
|
||||
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||
return
|
||||
@ -343,7 +343,7 @@ func RegisterIdentityProviderServiceHandlerServer(ctx context.Context, mux *runt
|
||||
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
||||
var err error
|
||||
var annotatedContext context.Context
|
||||
annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/memos.api.v2.IdentityProviderService/CreateIdentityProvider", runtime.WithHTTPPathPattern("/api/v2/identityProviders"))
|
||||
annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/memos.api.v1.IdentityProviderService/CreateIdentityProvider", runtime.WithHTTPPathPattern("/api/v1/identityProviders"))
|
||||
if err != nil {
|
||||
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||
return
|
||||
@ -368,7 +368,7 @@ func RegisterIdentityProviderServiceHandlerServer(ctx context.Context, mux *runt
|
||||
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
||||
var err error
|
||||
var annotatedContext context.Context
|
||||
annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/memos.api.v2.IdentityProviderService/UpdateIdentityProvider", runtime.WithHTTPPathPattern("/api/v2/{identity_provider.name=identityProviders/*}"))
|
||||
annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/memos.api.v1.IdentityProviderService/UpdateIdentityProvider", runtime.WithHTTPPathPattern("/api/v1/{identity_provider.name=identityProviders/*}"))
|
||||
if err != nil {
|
||||
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||
return
|
||||
@ -393,7 +393,7 @@ func RegisterIdentityProviderServiceHandlerServer(ctx context.Context, mux *runt
|
||||
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
||||
var err error
|
||||
var annotatedContext context.Context
|
||||
annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/memos.api.v2.IdentityProviderService/DeleteIdentityProvider", runtime.WithHTTPPathPattern("/api/v2/{name=identityProviders/*}"))
|
||||
annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/memos.api.v1.IdentityProviderService/DeleteIdentityProvider", runtime.WithHTTPPathPattern("/api/v1/{name=identityProviders/*}"))
|
||||
if err != nil {
|
||||
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||
return
|
||||
@ -457,7 +457,7 @@ func RegisterIdentityProviderServiceHandlerClient(ctx context.Context, mux *runt
|
||||
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
||||
var err error
|
||||
var annotatedContext context.Context
|
||||
annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/memos.api.v2.IdentityProviderService/ListIdentityProviders", runtime.WithHTTPPathPattern("/api/v2/identityProviders"))
|
||||
annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/memos.api.v1.IdentityProviderService/ListIdentityProviders", runtime.WithHTTPPathPattern("/api/v1/identityProviders"))
|
||||
if err != nil {
|
||||
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||
return
|
||||
@ -479,7 +479,7 @@ func RegisterIdentityProviderServiceHandlerClient(ctx context.Context, mux *runt
|
||||
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
||||
var err error
|
||||
var annotatedContext context.Context
|
||||
annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/memos.api.v2.IdentityProviderService/GetIdentityProvider", runtime.WithHTTPPathPattern("/api/v2/{name=identityProviders/*}"))
|
||||
annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/memos.api.v1.IdentityProviderService/GetIdentityProvider", runtime.WithHTTPPathPattern("/api/v1/{name=identityProviders/*}"))
|
||||
if err != nil {
|
||||
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||
return
|
||||
@ -501,7 +501,7 @@ func RegisterIdentityProviderServiceHandlerClient(ctx context.Context, mux *runt
|
||||
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
||||
var err error
|
||||
var annotatedContext context.Context
|
||||
annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/memos.api.v2.IdentityProviderService/CreateIdentityProvider", runtime.WithHTTPPathPattern("/api/v2/identityProviders"))
|
||||
annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/memos.api.v1.IdentityProviderService/CreateIdentityProvider", runtime.WithHTTPPathPattern("/api/v1/identityProviders"))
|
||||
if err != nil {
|
||||
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||
return
|
||||
@ -523,7 +523,7 @@ func RegisterIdentityProviderServiceHandlerClient(ctx context.Context, mux *runt
|
||||
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
||||
var err error
|
||||
var annotatedContext context.Context
|
||||
annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/memos.api.v2.IdentityProviderService/UpdateIdentityProvider", runtime.WithHTTPPathPattern("/api/v2/{identity_provider.name=identityProviders/*}"))
|
||||
annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/memos.api.v1.IdentityProviderService/UpdateIdentityProvider", runtime.WithHTTPPathPattern("/api/v1/{identity_provider.name=identityProviders/*}"))
|
||||
if err != nil {
|
||||
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||
return
|
||||
@ -545,7 +545,7 @@ func RegisterIdentityProviderServiceHandlerClient(ctx context.Context, mux *runt
|
||||
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
||||
var err error
|
||||
var annotatedContext context.Context
|
||||
annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/memos.api.v2.IdentityProviderService/DeleteIdentityProvider", runtime.WithHTTPPathPattern("/api/v2/{name=identityProviders/*}"))
|
||||
annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/memos.api.v1.IdentityProviderService/DeleteIdentityProvider", runtime.WithHTTPPathPattern("/api/v1/{name=identityProviders/*}"))
|
||||
if err != nil {
|
||||
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||
return
|
||||
@ -565,15 +565,15 @@ func RegisterIdentityProviderServiceHandlerClient(ctx context.Context, mux *runt
|
||||
}
|
||||
|
||||
var (
|
||||
pattern_IdentityProviderService_ListIdentityProviders_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"api", "v2", "identityProviders"}, ""))
|
||||
pattern_IdentityProviderService_ListIdentityProviders_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"api", "v1", "identityProviders"}, ""))
|
||||
|
||||
pattern_IdentityProviderService_GetIdentityProvider_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 2, 5, 3}, []string{"api", "v2", "identityProviders", "name"}, ""))
|
||||
pattern_IdentityProviderService_GetIdentityProvider_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 2, 5, 3}, []string{"api", "v1", "identityProviders", "name"}, ""))
|
||||
|
||||
pattern_IdentityProviderService_CreateIdentityProvider_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"api", "v2", "identityProviders"}, ""))
|
||||
pattern_IdentityProviderService_CreateIdentityProvider_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"api", "v1", "identityProviders"}, ""))
|
||||
|
||||
pattern_IdentityProviderService_UpdateIdentityProvider_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 2, 5, 3}, []string{"api", "v2", "identityProviders", "identity_provider.name"}, ""))
|
||||
pattern_IdentityProviderService_UpdateIdentityProvider_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 2, 5, 3}, []string{"api", "v1", "identityProviders", "identity_provider.name"}, ""))
|
||||
|
||||
pattern_IdentityProviderService_DeleteIdentityProvider_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 2, 5, 3}, []string{"api", "v2", "identityProviders", "name"}, ""))
|
||||
pattern_IdentityProviderService_DeleteIdentityProvider_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 2, 5, 3}, []string{"api", "v1", "identityProviders", "name"}, ""))
|
||||
)
|
||||
|
||||
var (
|
@ -2,9 +2,9 @@
|
||||
// versions:
|
||||
// - protoc-gen-go-grpc v1.3.0
|
||||
// - protoc (unknown)
|
||||
// source: api/v2/idp_service.proto
|
||||
// source: api/v1/idp_service.proto
|
||||
|
||||
package apiv2
|
||||
package apiv1
|
||||
|
||||
import (
|
||||
context "context"
|
||||
@ -20,11 +20,11 @@ import (
|
||||
const _ = grpc.SupportPackageIsVersion7
|
||||
|
||||
const (
|
||||
IdentityProviderService_ListIdentityProviders_FullMethodName = "/memos.api.v2.IdentityProviderService/ListIdentityProviders"
|
||||
IdentityProviderService_GetIdentityProvider_FullMethodName = "/memos.api.v2.IdentityProviderService/GetIdentityProvider"
|
||||
IdentityProviderService_CreateIdentityProvider_FullMethodName = "/memos.api.v2.IdentityProviderService/CreateIdentityProvider"
|
||||
IdentityProviderService_UpdateIdentityProvider_FullMethodName = "/memos.api.v2.IdentityProviderService/UpdateIdentityProvider"
|
||||
IdentityProviderService_DeleteIdentityProvider_FullMethodName = "/memos.api.v2.IdentityProviderService/DeleteIdentityProvider"
|
||||
IdentityProviderService_ListIdentityProviders_FullMethodName = "/memos.api.v1.IdentityProviderService/ListIdentityProviders"
|
||||
IdentityProviderService_GetIdentityProvider_FullMethodName = "/memos.api.v1.IdentityProviderService/GetIdentityProvider"
|
||||
IdentityProviderService_CreateIdentityProvider_FullMethodName = "/memos.api.v1.IdentityProviderService/CreateIdentityProvider"
|
||||
IdentityProviderService_UpdateIdentityProvider_FullMethodName = "/memos.api.v1.IdentityProviderService/UpdateIdentityProvider"
|
||||
IdentityProviderService_DeleteIdentityProvider_FullMethodName = "/memos.api.v1.IdentityProviderService/DeleteIdentityProvider"
|
||||
)
|
||||
|
||||
// IdentityProviderServiceClient is the client API for IdentityProviderService service.
|
||||
@ -240,7 +240,7 @@ func _IdentityProviderService_DeleteIdentityProvider_Handler(srv interface{}, ct
|
||||
// It's only intended for direct use with grpc.RegisterService,
|
||||
// and not to be introspected or modified (even as a copy)
|
||||
var IdentityProviderService_ServiceDesc = grpc.ServiceDesc{
|
||||
ServiceName: "memos.api.v2.IdentityProviderService",
|
||||
ServiceName: "memos.api.v1.IdentityProviderService",
|
||||
HandlerType: (*IdentityProviderServiceServer)(nil),
|
||||
Methods: []grpc.MethodDesc{
|
||||
{
|
||||
@ -265,5 +265,5 @@ var IdentityProviderService_ServiceDesc = grpc.ServiceDesc{
|
||||
},
|
||||
},
|
||||
Streams: []grpc.StreamDesc{},
|
||||
Metadata: "api/v2/idp_service.proto",
|
||||
Metadata: "api/v1/idp_service.proto",
|
||||
}
|
@ -2,9 +2,9 @@
|
||||
// versions:
|
||||
// protoc-gen-go v1.33.0
|
||||
// protoc (unknown)
|
||||
// source: api/v2/inbox_service.proto
|
||||
// source: api/v1/inbox_service.proto
|
||||
|
||||
package apiv2
|
||||
package apiv1
|
||||
|
||||
import (
|
||||
_ "google.golang.org/genproto/googleapis/api/annotations"
|
||||
@ -57,11 +57,11 @@ func (x Inbox_Status) String() string {
|
||||
}
|
||||
|
||||
func (Inbox_Status) Descriptor() protoreflect.EnumDescriptor {
|
||||
return file_api_v2_inbox_service_proto_enumTypes[0].Descriptor()
|
||||
return file_api_v1_inbox_service_proto_enumTypes[0].Descriptor()
|
||||
}
|
||||
|
||||
func (Inbox_Status) Type() protoreflect.EnumType {
|
||||
return &file_api_v2_inbox_service_proto_enumTypes[0]
|
||||
return &file_api_v1_inbox_service_proto_enumTypes[0]
|
||||
}
|
||||
|
||||
func (x Inbox_Status) Number() protoreflect.EnumNumber {
|
||||
@ -70,7 +70,7 @@ func (x Inbox_Status) Number() protoreflect.EnumNumber {
|
||||
|
||||
// Deprecated: Use Inbox_Status.Descriptor instead.
|
||||
func (Inbox_Status) EnumDescriptor() ([]byte, []int) {
|
||||
return file_api_v2_inbox_service_proto_rawDescGZIP(), []int{0, 0}
|
||||
return file_api_v1_inbox_service_proto_rawDescGZIP(), []int{0, 0}
|
||||
}
|
||||
|
||||
type Inbox_Type int32
|
||||
@ -106,11 +106,11 @@ func (x Inbox_Type) String() string {
|
||||
}
|
||||
|
||||
func (Inbox_Type) Descriptor() protoreflect.EnumDescriptor {
|
||||
return file_api_v2_inbox_service_proto_enumTypes[1].Descriptor()
|
||||
return file_api_v1_inbox_service_proto_enumTypes[1].Descriptor()
|
||||
}
|
||||
|
||||
func (Inbox_Type) Type() protoreflect.EnumType {
|
||||
return &file_api_v2_inbox_service_proto_enumTypes[1]
|
||||
return &file_api_v1_inbox_service_proto_enumTypes[1]
|
||||
}
|
||||
|
||||
func (x Inbox_Type) Number() protoreflect.EnumNumber {
|
||||
@ -119,7 +119,7 @@ func (x Inbox_Type) Number() protoreflect.EnumNumber {
|
||||
|
||||
// Deprecated: Use Inbox_Type.Descriptor instead.
|
||||
func (Inbox_Type) EnumDescriptor() ([]byte, []int) {
|
||||
return file_api_v2_inbox_service_proto_rawDescGZIP(), []int{0, 1}
|
||||
return file_api_v1_inbox_service_proto_rawDescGZIP(), []int{0, 1}
|
||||
}
|
||||
|
||||
type Inbox struct {
|
||||
@ -134,16 +134,16 @@ type Inbox struct {
|
||||
Sender string `protobuf:"bytes,2,opt,name=sender,proto3" json:"sender,omitempty"`
|
||||
// Format: users/{id}
|
||||
Receiver string `protobuf:"bytes,3,opt,name=receiver,proto3" json:"receiver,omitempty"`
|
||||
Status Inbox_Status `protobuf:"varint,4,opt,name=status,proto3,enum=memos.api.v2.Inbox_Status" json:"status,omitempty"`
|
||||
Status Inbox_Status `protobuf:"varint,4,opt,name=status,proto3,enum=memos.api.v1.Inbox_Status" json:"status,omitempty"`
|
||||
CreateTime *timestamppb.Timestamp `protobuf:"bytes,5,opt,name=create_time,json=createTime,proto3" json:"create_time,omitempty"`
|
||||
Type Inbox_Type `protobuf:"varint,6,opt,name=type,proto3,enum=memos.api.v2.Inbox_Type" json:"type,omitempty"`
|
||||
Type Inbox_Type `protobuf:"varint,6,opt,name=type,proto3,enum=memos.api.v1.Inbox_Type" json:"type,omitempty"`
|
||||
ActivityId *int32 `protobuf:"varint,7,opt,name=activity_id,json=activityId,proto3,oneof" json:"activity_id,omitempty"`
|
||||
}
|
||||
|
||||
func (x *Inbox) Reset() {
|
||||
*x = Inbox{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_api_v2_inbox_service_proto_msgTypes[0]
|
||||
mi := &file_api_v1_inbox_service_proto_msgTypes[0]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
@ -156,7 +156,7 @@ func (x *Inbox) String() string {
|
||||
func (*Inbox) ProtoMessage() {}
|
||||
|
||||
func (x *Inbox) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_api_v2_inbox_service_proto_msgTypes[0]
|
||||
mi := &file_api_v1_inbox_service_proto_msgTypes[0]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
@ -169,7 +169,7 @@ func (x *Inbox) ProtoReflect() protoreflect.Message {
|
||||
|
||||
// Deprecated: Use Inbox.ProtoReflect.Descriptor instead.
|
||||
func (*Inbox) Descriptor() ([]byte, []int) {
|
||||
return file_api_v2_inbox_service_proto_rawDescGZIP(), []int{0}
|
||||
return file_api_v1_inbox_service_proto_rawDescGZIP(), []int{0}
|
||||
}
|
||||
|
||||
func (x *Inbox) GetName() string {
|
||||
@ -233,7 +233,7 @@ type ListInboxesRequest struct {
|
||||
func (x *ListInboxesRequest) Reset() {
|
||||
*x = ListInboxesRequest{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_api_v2_inbox_service_proto_msgTypes[1]
|
||||
mi := &file_api_v1_inbox_service_proto_msgTypes[1]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
@ -246,7 +246,7 @@ func (x *ListInboxesRequest) String() string {
|
||||
func (*ListInboxesRequest) ProtoMessage() {}
|
||||
|
||||
func (x *ListInboxesRequest) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_api_v2_inbox_service_proto_msgTypes[1]
|
||||
mi := &file_api_v1_inbox_service_proto_msgTypes[1]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
@ -259,7 +259,7 @@ func (x *ListInboxesRequest) ProtoReflect() protoreflect.Message {
|
||||
|
||||
// Deprecated: Use ListInboxesRequest.ProtoReflect.Descriptor instead.
|
||||
func (*ListInboxesRequest) Descriptor() ([]byte, []int) {
|
||||
return file_api_v2_inbox_service_proto_rawDescGZIP(), []int{1}
|
||||
return file_api_v1_inbox_service_proto_rawDescGZIP(), []int{1}
|
||||
}
|
||||
|
||||
func (x *ListInboxesRequest) GetUser() string {
|
||||
@ -280,7 +280,7 @@ type ListInboxesResponse struct {
|
||||
func (x *ListInboxesResponse) Reset() {
|
||||
*x = ListInboxesResponse{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_api_v2_inbox_service_proto_msgTypes[2]
|
||||
mi := &file_api_v1_inbox_service_proto_msgTypes[2]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
@ -293,7 +293,7 @@ func (x *ListInboxesResponse) String() string {
|
||||
func (*ListInboxesResponse) ProtoMessage() {}
|
||||
|
||||
func (x *ListInboxesResponse) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_api_v2_inbox_service_proto_msgTypes[2]
|
||||
mi := &file_api_v1_inbox_service_proto_msgTypes[2]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
@ -306,7 +306,7 @@ func (x *ListInboxesResponse) ProtoReflect() protoreflect.Message {
|
||||
|
||||
// Deprecated: Use ListInboxesResponse.ProtoReflect.Descriptor instead.
|
||||
func (*ListInboxesResponse) Descriptor() ([]byte, []int) {
|
||||
return file_api_v2_inbox_service_proto_rawDescGZIP(), []int{2}
|
||||
return file_api_v1_inbox_service_proto_rawDescGZIP(), []int{2}
|
||||
}
|
||||
|
||||
func (x *ListInboxesResponse) GetInboxes() []*Inbox {
|
||||
@ -328,7 +328,7 @@ type UpdateInboxRequest struct {
|
||||
func (x *UpdateInboxRequest) Reset() {
|
||||
*x = UpdateInboxRequest{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_api_v2_inbox_service_proto_msgTypes[3]
|
||||
mi := &file_api_v1_inbox_service_proto_msgTypes[3]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
@ -341,7 +341,7 @@ func (x *UpdateInboxRequest) String() string {
|
||||
func (*UpdateInboxRequest) ProtoMessage() {}
|
||||
|
||||
func (x *UpdateInboxRequest) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_api_v2_inbox_service_proto_msgTypes[3]
|
||||
mi := &file_api_v1_inbox_service_proto_msgTypes[3]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
@ -354,7 +354,7 @@ func (x *UpdateInboxRequest) ProtoReflect() protoreflect.Message {
|
||||
|
||||
// Deprecated: Use UpdateInboxRequest.ProtoReflect.Descriptor instead.
|
||||
func (*UpdateInboxRequest) Descriptor() ([]byte, []int) {
|
||||
return file_api_v2_inbox_service_proto_rawDescGZIP(), []int{3}
|
||||
return file_api_v1_inbox_service_proto_rawDescGZIP(), []int{3}
|
||||
}
|
||||
|
||||
func (x *UpdateInboxRequest) GetInbox() *Inbox {
|
||||
@ -384,7 +384,7 @@ type DeleteInboxRequest struct {
|
||||
func (x *DeleteInboxRequest) Reset() {
|
||||
*x = DeleteInboxRequest{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_api_v2_inbox_service_proto_msgTypes[4]
|
||||
mi := &file_api_v1_inbox_service_proto_msgTypes[4]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
@ -397,7 +397,7 @@ func (x *DeleteInboxRequest) String() string {
|
||||
func (*DeleteInboxRequest) ProtoMessage() {}
|
||||
|
||||
func (x *DeleteInboxRequest) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_api_v2_inbox_service_proto_msgTypes[4]
|
||||
mi := &file_api_v1_inbox_service_proto_msgTypes[4]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
@ -410,7 +410,7 @@ func (x *DeleteInboxRequest) ProtoReflect() protoreflect.Message {
|
||||
|
||||
// Deprecated: Use DeleteInboxRequest.ProtoReflect.Descriptor instead.
|
||||
func (*DeleteInboxRequest) Descriptor() ([]byte, []int) {
|
||||
return file_api_v2_inbox_service_proto_rawDescGZIP(), []int{4}
|
||||
return file_api_v1_inbox_service_proto_rawDescGZIP(), []int{4}
|
||||
}
|
||||
|
||||
func (x *DeleteInboxRequest) GetName() string {
|
||||
@ -420,12 +420,12 @@ func (x *DeleteInboxRequest) GetName() string {
|
||||
return ""
|
||||
}
|
||||
|
||||
var File_api_v2_inbox_service_proto protoreflect.FileDescriptor
|
||||
var File_api_v1_inbox_service_proto protoreflect.FileDescriptor
|
||||
|
||||
var file_api_v2_inbox_service_proto_rawDesc = []byte{
|
||||
0x0a, 0x1a, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x32, 0x2f, 0x69, 0x6e, 0x62, 0x6f, 0x78, 0x5f, 0x73,
|
||||
var file_api_v1_inbox_service_proto_rawDesc = []byte{
|
||||
0x0a, 0x1a, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, 0x2f, 0x69, 0x6e, 0x62, 0x6f, 0x78, 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,
|
||||
0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 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,
|
||||
@ -442,14 +442,14 @@ var file_api_v2_inbox_service_proto_rawDesc = []byte{
|
||||
0x76, 0x65, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x72, 0x65, 0x63, 0x65, 0x69,
|
||||
0x76, 0x65, 0x72, 0x12, 0x32, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x04, 0x20,
|
||||
0x01, 0x28, 0x0e, 0x32, 0x1a, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e,
|
||||
0x76, 0x32, 0x2e, 0x49, 0x6e, 0x62, 0x6f, 0x78, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52,
|
||||
0x76, 0x31, 0x2e, 0x49, 0x6e, 0x62, 0x6f, 0x78, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52,
|
||||
0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x3b, 0x0a, 0x0b, 0x63, 0x72, 0x65, 0x61, 0x74,
|
||||
0x65, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67,
|
||||
0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54,
|
||||
0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x0a, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65,
|
||||
0x54, 0x69, 0x6d, 0x65, 0x12, 0x2c, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x06, 0x20, 0x01,
|
||||
0x28, 0x0e, 0x32, 0x18, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76,
|
||||
0x32, 0x2e, 0x49, 0x6e, 0x62, 0x6f, 0x78, 0x2e, 0x54, 0x79, 0x70, 0x65, 0x52, 0x04, 0x74, 0x79,
|
||||
0x31, 0x2e, 0x49, 0x6e, 0x62, 0x6f, 0x78, 0x2e, 0x54, 0x79, 0x70, 0x65, 0x52, 0x04, 0x74, 0x79,
|
||||
0x70, 0x65, 0x12, 0x24, 0x0a, 0x0b, 0x61, 0x63, 0x74, 0x69, 0x76, 0x69, 0x74, 0x79, 0x5f, 0x69,
|
||||
0x64, 0x18, 0x07, 0x20, 0x01, 0x28, 0x05, 0x48, 0x00, 0x52, 0x0a, 0x61, 0x63, 0x74, 0x69, 0x76,
|
||||
0x69, 0x74, 0x79, 0x49, 0x64, 0x88, 0x01, 0x01, 0x22, 0x3a, 0x0a, 0x06, 0x53, 0x74, 0x61, 0x74,
|
||||
@ -468,11 +468,11 @@ var file_api_v2_inbox_service_proto_rawDesc = []byte{
|
||||
0x4c, 0x69, 0x73, 0x74, 0x49, 0x6e, 0x62, 0x6f, 0x78, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f,
|
||||
0x6e, 0x73, 0x65, 0x12, 0x2d, 0x0a, 0x07, 0x69, 0x6e, 0x62, 0x6f, 0x78, 0x65, 0x73, 0x18, 0x01,
|
||||
0x20, 0x03, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69,
|
||||
0x2e, 0x76, 0x32, 0x2e, 0x49, 0x6e, 0x62, 0x6f, 0x78, 0x52, 0x07, 0x69, 0x6e, 0x62, 0x6f, 0x78,
|
||||
0x2e, 0x76, 0x31, 0x2e, 0x49, 0x6e, 0x62, 0x6f, 0x78, 0x52, 0x07, 0x69, 0x6e, 0x62, 0x6f, 0x78,
|
||||
0x65, 0x73, 0x22, 0x7c, 0x0a, 0x12, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x49, 0x6e, 0x62, 0x6f,
|
||||
0x78, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x29, 0x0a, 0x05, 0x69, 0x6e, 0x62, 0x6f,
|
||||
0x78, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e,
|
||||
0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x49, 0x6e, 0x62, 0x6f, 0x78, 0x52, 0x05, 0x69, 0x6e,
|
||||
0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x49, 0x6e, 0x62, 0x6f, 0x78, 0x52, 0x05, 0x69, 0x6e,
|
||||
0x62, 0x6f, 0x78, 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,
|
||||
@ -482,80 +482,80 @@ var file_api_v2_inbox_service_proto_rawDesc = []byte{
|
||||
0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x32, 0xf7, 0x02, 0x0a, 0x0c, 0x49,
|
||||
0x6e, 0x62, 0x6f, 0x78, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x6b, 0x0a, 0x0b, 0x4c,
|
||||
0x69, 0x73, 0x74, 0x49, 0x6e, 0x62, 0x6f, 0x78, 0x65, 0x73, 0x12, 0x20, 0x2e, 0x6d, 0x65, 0x6d,
|
||||
0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x49, 0x6e,
|
||||
0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x49, 0x6e,
|
||||
0x62, 0x6f, 0x78, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x21, 0x2e, 0x6d,
|
||||
0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x4c, 0x69, 0x73, 0x74,
|
||||
0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74,
|
||||
0x49, 0x6e, 0x62, 0x6f, 0x78, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22,
|
||||
0x17, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x11, 0x12, 0x0f, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x32,
|
||||
0x17, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x11, 0x12, 0x0f, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31,
|
||||
0x2f, 0x69, 0x6e, 0x62, 0x6f, 0x78, 0x65, 0x73, 0x12, 0x87, 0x01, 0x0a, 0x0b, 0x55, 0x70, 0x64,
|
||||
0x61, 0x74, 0x65, 0x49, 0x6e, 0x62, 0x6f, 0x78, 0x12, 0x20, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73,
|
||||
0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x49, 0x6e,
|
||||
0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x49, 0x6e,
|
||||
0x62, 0x6f, 0x78, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x13, 0x2e, 0x6d, 0x65, 0x6d,
|
||||
0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x49, 0x6e, 0x62, 0x6f, 0x78, 0x22,
|
||||
0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x49, 0x6e, 0x62, 0x6f, 0x78, 0x22,
|
||||
0x41, 0xda, 0x41, 0x11, 0x69, 0x6e, 0x62, 0x6f, 0x78, 0x2c, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65,
|
||||
0x5f, 0x6d, 0x61, 0x73, 0x6b, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x27, 0x3a, 0x05, 0x69, 0x6e, 0x62,
|
||||
0x6f, 0x78, 0x32, 0x1e, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x32, 0x2f, 0x7b, 0x69, 0x6e, 0x62,
|
||||
0x6f, 0x78, 0x32, 0x1e, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, 0x2f, 0x7b, 0x69, 0x6e, 0x62,
|
||||
0x6f, 0x78, 0x2e, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x69, 0x6e, 0x62, 0x6f, 0x78, 0x65, 0x73, 0x2f,
|
||||
0x2a, 0x7d, 0x12, 0x70, 0x0a, 0x0b, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x49, 0x6e, 0x62, 0x6f,
|
||||
0x78, 0x12, 0x20, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32,
|
||||
0x78, 0x12, 0x20, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31,
|
||||
0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x49, 0x6e, 0x62, 0x6f, 0x78, 0x52, 0x65, 0x71, 0x75,
|
||||
0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f,
|
||||
0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x27, 0xda, 0x41, 0x04,
|
||||
0x6e, 0x61, 0x6d, 0x65, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1a, 0x2a, 0x18, 0x2f, 0x61, 0x70, 0x69,
|
||||
0x2f, 0x76, 0x32, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x69, 0x6e, 0x62, 0x6f, 0x78, 0x65,
|
||||
0x2f, 0x76, 0x31, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x69, 0x6e, 0x62, 0x6f, 0x78, 0x65,
|
||||
0x73, 0x2f, 0x2a, 0x7d, 0x42, 0xa9, 0x01, 0x0a, 0x10, 0x63, 0x6f, 0x6d, 0x2e, 0x6d, 0x65, 0x6d,
|
||||
0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x42, 0x11, 0x49, 0x6e, 0x62, 0x6f, 0x78,
|
||||
0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x42, 0x11, 0x49, 0x6e, 0x62, 0x6f, 0x78,
|
||||
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,
|
||||
0x67, 0x65, 0x6e, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, 0x3b, 0x61, 0x70, 0x69, 0x76, 0x31,
|
||||
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,
|
||||
0x70, 0x69, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x0c, 0x4d, 0x65, 0x6d, 0x6f, 0x73, 0x5c, 0x41, 0x70,
|
||||
0x69, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x18, 0x4d, 0x65, 0x6d, 0x6f, 0x73, 0x5c, 0x41, 0x70, 0x69,
|
||||
0x5c, 0x56, 0x31, 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, 0x31,
|
||||
0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
|
||||
}
|
||||
|
||||
var (
|
||||
file_api_v2_inbox_service_proto_rawDescOnce sync.Once
|
||||
file_api_v2_inbox_service_proto_rawDescData = file_api_v2_inbox_service_proto_rawDesc
|
||||
file_api_v1_inbox_service_proto_rawDescOnce sync.Once
|
||||
file_api_v1_inbox_service_proto_rawDescData = file_api_v1_inbox_service_proto_rawDesc
|
||||
)
|
||||
|
||||
func file_api_v2_inbox_service_proto_rawDescGZIP() []byte {
|
||||
file_api_v2_inbox_service_proto_rawDescOnce.Do(func() {
|
||||
file_api_v2_inbox_service_proto_rawDescData = protoimpl.X.CompressGZIP(file_api_v2_inbox_service_proto_rawDescData)
|
||||
func file_api_v1_inbox_service_proto_rawDescGZIP() []byte {
|
||||
file_api_v1_inbox_service_proto_rawDescOnce.Do(func() {
|
||||
file_api_v1_inbox_service_proto_rawDescData = protoimpl.X.CompressGZIP(file_api_v1_inbox_service_proto_rawDescData)
|
||||
})
|
||||
return file_api_v2_inbox_service_proto_rawDescData
|
||||
return file_api_v1_inbox_service_proto_rawDescData
|
||||
}
|
||||
|
||||
var file_api_v2_inbox_service_proto_enumTypes = make([]protoimpl.EnumInfo, 2)
|
||||
var file_api_v2_inbox_service_proto_msgTypes = make([]protoimpl.MessageInfo, 5)
|
||||
var file_api_v2_inbox_service_proto_goTypes = []interface{}{
|
||||
(Inbox_Status)(0), // 0: memos.api.v2.Inbox.Status
|
||||
(Inbox_Type)(0), // 1: memos.api.v2.Inbox.Type
|
||||
(*Inbox)(nil), // 2: memos.api.v2.Inbox
|
||||
(*ListInboxesRequest)(nil), // 3: memos.api.v2.ListInboxesRequest
|
||||
(*ListInboxesResponse)(nil), // 4: memos.api.v2.ListInboxesResponse
|
||||
(*UpdateInboxRequest)(nil), // 5: memos.api.v2.UpdateInboxRequest
|
||||
(*DeleteInboxRequest)(nil), // 6: memos.api.v2.DeleteInboxRequest
|
||||
var file_api_v1_inbox_service_proto_enumTypes = make([]protoimpl.EnumInfo, 2)
|
||||
var file_api_v1_inbox_service_proto_msgTypes = make([]protoimpl.MessageInfo, 5)
|
||||
var file_api_v1_inbox_service_proto_goTypes = []interface{}{
|
||||
(Inbox_Status)(0), // 0: memos.api.v1.Inbox.Status
|
||||
(Inbox_Type)(0), // 1: memos.api.v1.Inbox.Type
|
||||
(*Inbox)(nil), // 2: memos.api.v1.Inbox
|
||||
(*ListInboxesRequest)(nil), // 3: memos.api.v1.ListInboxesRequest
|
||||
(*ListInboxesResponse)(nil), // 4: memos.api.v1.ListInboxesResponse
|
||||
(*UpdateInboxRequest)(nil), // 5: memos.api.v1.UpdateInboxRequest
|
||||
(*DeleteInboxRequest)(nil), // 6: memos.api.v1.DeleteInboxRequest
|
||||
(*timestamppb.Timestamp)(nil), // 7: google.protobuf.Timestamp
|
||||
(*fieldmaskpb.FieldMask)(nil), // 8: google.protobuf.FieldMask
|
||||
(*emptypb.Empty)(nil), // 9: google.protobuf.Empty
|
||||
}
|
||||
var file_api_v2_inbox_service_proto_depIdxs = []int32{
|
||||
0, // 0: memos.api.v2.Inbox.status:type_name -> memos.api.v2.Inbox.Status
|
||||
7, // 1: memos.api.v2.Inbox.create_time:type_name -> google.protobuf.Timestamp
|
||||
1, // 2: memos.api.v2.Inbox.type:type_name -> memos.api.v2.Inbox.Type
|
||||
2, // 3: memos.api.v2.ListInboxesResponse.inboxes:type_name -> memos.api.v2.Inbox
|
||||
2, // 4: memos.api.v2.UpdateInboxRequest.inbox:type_name -> memos.api.v2.Inbox
|
||||
8, // 5: memos.api.v2.UpdateInboxRequest.update_mask:type_name -> google.protobuf.FieldMask
|
||||
3, // 6: memos.api.v2.InboxService.ListInboxes:input_type -> memos.api.v2.ListInboxesRequest
|
||||
5, // 7: memos.api.v2.InboxService.UpdateInbox:input_type -> memos.api.v2.UpdateInboxRequest
|
||||
6, // 8: memos.api.v2.InboxService.DeleteInbox:input_type -> memos.api.v2.DeleteInboxRequest
|
||||
4, // 9: memos.api.v2.InboxService.ListInboxes:output_type -> memos.api.v2.ListInboxesResponse
|
||||
2, // 10: memos.api.v2.InboxService.UpdateInbox:output_type -> memos.api.v2.Inbox
|
||||
9, // 11: memos.api.v2.InboxService.DeleteInbox:output_type -> google.protobuf.Empty
|
||||
var file_api_v1_inbox_service_proto_depIdxs = []int32{
|
||||
0, // 0: memos.api.v1.Inbox.status:type_name -> memos.api.v1.Inbox.Status
|
||||
7, // 1: memos.api.v1.Inbox.create_time:type_name -> google.protobuf.Timestamp
|
||||
1, // 2: memos.api.v1.Inbox.type:type_name -> memos.api.v1.Inbox.Type
|
||||
2, // 3: memos.api.v1.ListInboxesResponse.inboxes:type_name -> memos.api.v1.Inbox
|
||||
2, // 4: memos.api.v1.UpdateInboxRequest.inbox:type_name -> memos.api.v1.Inbox
|
||||
8, // 5: memos.api.v1.UpdateInboxRequest.update_mask:type_name -> google.protobuf.FieldMask
|
||||
3, // 6: memos.api.v1.InboxService.ListInboxes:input_type -> memos.api.v1.ListInboxesRequest
|
||||
5, // 7: memos.api.v1.InboxService.UpdateInbox:input_type -> memos.api.v1.UpdateInboxRequest
|
||||
6, // 8: memos.api.v1.InboxService.DeleteInbox:input_type -> memos.api.v1.DeleteInboxRequest
|
||||
4, // 9: memos.api.v1.InboxService.ListInboxes:output_type -> memos.api.v1.ListInboxesResponse
|
||||
2, // 10: memos.api.v1.InboxService.UpdateInbox:output_type -> memos.api.v1.Inbox
|
||||
9, // 11: memos.api.v1.InboxService.DeleteInbox:output_type -> google.protobuf.Empty
|
||||
9, // [9:12] is the sub-list for method output_type
|
||||
6, // [6:9] is the sub-list for method input_type
|
||||
6, // [6:6] is the sub-list for extension type_name
|
||||
@ -563,13 +563,13 @@ var file_api_v2_inbox_service_proto_depIdxs = []int32{
|
||||
0, // [0:6] is the sub-list for field type_name
|
||||
}
|
||||
|
||||
func init() { file_api_v2_inbox_service_proto_init() }
|
||||
func file_api_v2_inbox_service_proto_init() {
|
||||
if File_api_v2_inbox_service_proto != nil {
|
||||
func init() { file_api_v1_inbox_service_proto_init() }
|
||||
func file_api_v1_inbox_service_proto_init() {
|
||||
if File_api_v1_inbox_service_proto != nil {
|
||||
return
|
||||
}
|
||||
if !protoimpl.UnsafeEnabled {
|
||||
file_api_v2_inbox_service_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
|
||||
file_api_v1_inbox_service_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*Inbox); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
@ -581,7 +581,7 @@ func file_api_v2_inbox_service_proto_init() {
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_api_v2_inbox_service_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
|
||||
file_api_v1_inbox_service_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*ListInboxesRequest); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
@ -593,7 +593,7 @@ func file_api_v2_inbox_service_proto_init() {
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_api_v2_inbox_service_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
|
||||
file_api_v1_inbox_service_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*ListInboxesResponse); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
@ -605,7 +605,7 @@ func file_api_v2_inbox_service_proto_init() {
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_api_v2_inbox_service_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} {
|
||||
file_api_v1_inbox_service_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*UpdateInboxRequest); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
@ -617,7 +617,7 @@ func file_api_v2_inbox_service_proto_init() {
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_api_v2_inbox_service_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} {
|
||||
file_api_v1_inbox_service_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*DeleteInboxRequest); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
@ -630,24 +630,24 @@ func file_api_v2_inbox_service_proto_init() {
|
||||
}
|
||||
}
|
||||
}
|
||||
file_api_v2_inbox_service_proto_msgTypes[0].OneofWrappers = []interface{}{}
|
||||
file_api_v1_inbox_service_proto_msgTypes[0].OneofWrappers = []interface{}{}
|
||||
type x struct{}
|
||||
out := protoimpl.TypeBuilder{
|
||||
File: protoimpl.DescBuilder{
|
||||
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
|
||||
RawDescriptor: file_api_v2_inbox_service_proto_rawDesc,
|
||||
RawDescriptor: file_api_v1_inbox_service_proto_rawDesc,
|
||||
NumEnums: 2,
|
||||
NumMessages: 5,
|
||||
NumExtensions: 0,
|
||||
NumServices: 1,
|
||||
},
|
||||
GoTypes: file_api_v2_inbox_service_proto_goTypes,
|
||||
DependencyIndexes: file_api_v2_inbox_service_proto_depIdxs,
|
||||
EnumInfos: file_api_v2_inbox_service_proto_enumTypes,
|
||||
MessageInfos: file_api_v2_inbox_service_proto_msgTypes,
|
||||
GoTypes: file_api_v1_inbox_service_proto_goTypes,
|
||||
DependencyIndexes: file_api_v1_inbox_service_proto_depIdxs,
|
||||
EnumInfos: file_api_v1_inbox_service_proto_enumTypes,
|
||||
MessageInfos: file_api_v1_inbox_service_proto_msgTypes,
|
||||
}.Build()
|
||||
File_api_v2_inbox_service_proto = out.File
|
||||
file_api_v2_inbox_service_proto_rawDesc = nil
|
||||
file_api_v2_inbox_service_proto_goTypes = nil
|
||||
file_api_v2_inbox_service_proto_depIdxs = nil
|
||||
File_api_v1_inbox_service_proto = out.File
|
||||
file_api_v1_inbox_service_proto_rawDesc = nil
|
||||
file_api_v1_inbox_service_proto_goTypes = nil
|
||||
file_api_v1_inbox_service_proto_depIdxs = nil
|
||||
}
|
@ -1,12 +1,12 @@
|
||||
// Code generated by protoc-gen-grpc-gateway. DO NOT EDIT.
|
||||
// source: api/v2/inbox_service.proto
|
||||
// source: api/v1/inbox_service.proto
|
||||
|
||||
/*
|
||||
Package apiv2 is a reverse proxy.
|
||||
Package apiv1 is a reverse proxy.
|
||||
|
||||
It translates gRPC into RESTful JSON APIs.
|
||||
*/
|
||||
package apiv2
|
||||
package apiv1
|
||||
|
||||
import (
|
||||
"context"
|
||||
@ -233,7 +233,7 @@ func RegisterInboxServiceHandlerServer(ctx context.Context, mux *runtime.ServeMu
|
||||
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
||||
var err error
|
||||
var annotatedContext context.Context
|
||||
annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/memos.api.v2.InboxService/ListInboxes", runtime.WithHTTPPathPattern("/api/v2/inboxes"))
|
||||
annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/memos.api.v1.InboxService/ListInboxes", runtime.WithHTTPPathPattern("/api/v1/inboxes"))
|
||||
if err != nil {
|
||||
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||
return
|
||||
@ -258,7 +258,7 @@ func RegisterInboxServiceHandlerServer(ctx context.Context, mux *runtime.ServeMu
|
||||
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
||||
var err error
|
||||
var annotatedContext context.Context
|
||||
annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/memos.api.v2.InboxService/UpdateInbox", runtime.WithHTTPPathPattern("/api/v2/{inbox.name=inboxes/*}"))
|
||||
annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/memos.api.v1.InboxService/UpdateInbox", runtime.WithHTTPPathPattern("/api/v1/{inbox.name=inboxes/*}"))
|
||||
if err != nil {
|
||||
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||
return
|
||||
@ -283,7 +283,7 @@ func RegisterInboxServiceHandlerServer(ctx context.Context, mux *runtime.ServeMu
|
||||
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
||||
var err error
|
||||
var annotatedContext context.Context
|
||||
annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/memos.api.v2.InboxService/DeleteInbox", runtime.WithHTTPPathPattern("/api/v2/{name=inboxes/*}"))
|
||||
annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/memos.api.v1.InboxService/DeleteInbox", runtime.WithHTTPPathPattern("/api/v1/{name=inboxes/*}"))
|
||||
if err != nil {
|
||||
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||
return
|
||||
@ -347,7 +347,7 @@ func RegisterInboxServiceHandlerClient(ctx context.Context, mux *runtime.ServeMu
|
||||
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
||||
var err error
|
||||
var annotatedContext context.Context
|
||||
annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/memos.api.v2.InboxService/ListInboxes", runtime.WithHTTPPathPattern("/api/v2/inboxes"))
|
||||
annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/memos.api.v1.InboxService/ListInboxes", runtime.WithHTTPPathPattern("/api/v1/inboxes"))
|
||||
if err != nil {
|
||||
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||
return
|
||||
@ -369,7 +369,7 @@ func RegisterInboxServiceHandlerClient(ctx context.Context, mux *runtime.ServeMu
|
||||
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
||||
var err error
|
||||
var annotatedContext context.Context
|
||||
annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/memos.api.v2.InboxService/UpdateInbox", runtime.WithHTTPPathPattern("/api/v2/{inbox.name=inboxes/*}"))
|
||||
annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/memos.api.v1.InboxService/UpdateInbox", runtime.WithHTTPPathPattern("/api/v1/{inbox.name=inboxes/*}"))
|
||||
if err != nil {
|
||||
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||
return
|
||||
@ -391,7 +391,7 @@ func RegisterInboxServiceHandlerClient(ctx context.Context, mux *runtime.ServeMu
|
||||
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
||||
var err error
|
||||
var annotatedContext context.Context
|
||||
annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/memos.api.v2.InboxService/DeleteInbox", runtime.WithHTTPPathPattern("/api/v2/{name=inboxes/*}"))
|
||||
annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/memos.api.v1.InboxService/DeleteInbox", runtime.WithHTTPPathPattern("/api/v1/{name=inboxes/*}"))
|
||||
if err != nil {
|
||||
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||
return
|
||||
@ -411,11 +411,11 @@ func RegisterInboxServiceHandlerClient(ctx context.Context, mux *runtime.ServeMu
|
||||
}
|
||||
|
||||
var (
|
||||
pattern_InboxService_ListInboxes_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"api", "v2", "inboxes"}, ""))
|
||||
pattern_InboxService_ListInboxes_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"api", "v1", "inboxes"}, ""))
|
||||
|
||||
pattern_InboxService_UpdateInbox_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 2, 5, 3}, []string{"api", "v2", "inboxes", "inbox.name"}, ""))
|
||||
pattern_InboxService_UpdateInbox_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 2, 5, 3}, []string{"api", "v1", "inboxes", "inbox.name"}, ""))
|
||||
|
||||
pattern_InboxService_DeleteInbox_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 2, 5, 3}, []string{"api", "v2", "inboxes", "name"}, ""))
|
||||
pattern_InboxService_DeleteInbox_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 2, 5, 3}, []string{"api", "v1", "inboxes", "name"}, ""))
|
||||
)
|
||||
|
||||
var (
|
@ -2,9 +2,9 @@
|
||||
// versions:
|
||||
// - protoc-gen-go-grpc v1.3.0
|
||||
// - protoc (unknown)
|
||||
// source: api/v2/inbox_service.proto
|
||||
// source: api/v1/inbox_service.proto
|
||||
|
||||
package apiv2
|
||||
package apiv1
|
||||
|
||||
import (
|
||||
context "context"
|
||||
@ -20,9 +20,9 @@ import (
|
||||
const _ = grpc.SupportPackageIsVersion7
|
||||
|
||||
const (
|
||||
InboxService_ListInboxes_FullMethodName = "/memos.api.v2.InboxService/ListInboxes"
|
||||
InboxService_UpdateInbox_FullMethodName = "/memos.api.v2.InboxService/UpdateInbox"
|
||||
InboxService_DeleteInbox_FullMethodName = "/memos.api.v2.InboxService/DeleteInbox"
|
||||
InboxService_ListInboxes_FullMethodName = "/memos.api.v1.InboxService/ListInboxes"
|
||||
InboxService_UpdateInbox_FullMethodName = "/memos.api.v1.InboxService/UpdateInbox"
|
||||
InboxService_DeleteInbox_FullMethodName = "/memos.api.v1.InboxService/DeleteInbox"
|
||||
)
|
||||
|
||||
// InboxServiceClient is the client API for InboxService service.
|
||||
@ -169,7 +169,7 @@ func _InboxService_DeleteInbox_Handler(srv interface{}, ctx context.Context, dec
|
||||
// It's only intended for direct use with grpc.RegisterService,
|
||||
// and not to be introspected or modified (even as a copy)
|
||||
var InboxService_ServiceDesc = grpc.ServiceDesc{
|
||||
ServiceName: "memos.api.v2.InboxService",
|
||||
ServiceName: "memos.api.v1.InboxService",
|
||||
HandlerType: (*InboxServiceServer)(nil),
|
||||
Methods: []grpc.MethodDesc{
|
||||
{
|
||||
@ -186,5 +186,5 @@ var InboxService_ServiceDesc = grpc.ServiceDesc{
|
||||
},
|
||||
},
|
||||
Streams: []grpc.StreamDesc{},
|
||||
Metadata: "api/v2/inbox_service.proto",
|
||||
Metadata: "api/v1/inbox_service.proto",
|
||||
}
|
@ -2,9 +2,9 @@
|
||||
// versions:
|
||||
// protoc-gen-go v1.33.0
|
||||
// protoc (unknown)
|
||||
// source: api/v2/link_service.proto
|
||||
// source: api/v1/link_service.proto
|
||||
|
||||
package apiv2
|
||||
package apiv1
|
||||
|
||||
import (
|
||||
_ "google.golang.org/genproto/googleapis/api/annotations"
|
||||
@ -32,7 +32,7 @@ type GetLinkMetadataRequest struct {
|
||||
func (x *GetLinkMetadataRequest) Reset() {
|
||||
*x = GetLinkMetadataRequest{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_api_v2_link_service_proto_msgTypes[0]
|
||||
mi := &file_api_v1_link_service_proto_msgTypes[0]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
@ -45,7 +45,7 @@ func (x *GetLinkMetadataRequest) String() string {
|
||||
func (*GetLinkMetadataRequest) ProtoMessage() {}
|
||||
|
||||
func (x *GetLinkMetadataRequest) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_api_v2_link_service_proto_msgTypes[0]
|
||||
mi := &file_api_v1_link_service_proto_msgTypes[0]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
@ -58,7 +58,7 @@ func (x *GetLinkMetadataRequest) ProtoReflect() protoreflect.Message {
|
||||
|
||||
// Deprecated: Use GetLinkMetadataRequest.ProtoReflect.Descriptor instead.
|
||||
func (*GetLinkMetadataRequest) Descriptor() ([]byte, []int) {
|
||||
return file_api_v2_link_service_proto_rawDescGZIP(), []int{0}
|
||||
return file_api_v1_link_service_proto_rawDescGZIP(), []int{0}
|
||||
}
|
||||
|
||||
func (x *GetLinkMetadataRequest) GetLink() string {
|
||||
@ -79,7 +79,7 @@ type GetLinkMetadataResponse struct {
|
||||
func (x *GetLinkMetadataResponse) Reset() {
|
||||
*x = GetLinkMetadataResponse{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_api_v2_link_service_proto_msgTypes[1]
|
||||
mi := &file_api_v1_link_service_proto_msgTypes[1]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
@ -92,7 +92,7 @@ func (x *GetLinkMetadataResponse) String() string {
|
||||
func (*GetLinkMetadataResponse) ProtoMessage() {}
|
||||
|
||||
func (x *GetLinkMetadataResponse) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_api_v2_link_service_proto_msgTypes[1]
|
||||
mi := &file_api_v1_link_service_proto_msgTypes[1]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
@ -105,7 +105,7 @@ func (x *GetLinkMetadataResponse) ProtoReflect() protoreflect.Message {
|
||||
|
||||
// Deprecated: Use GetLinkMetadataResponse.ProtoReflect.Descriptor instead.
|
||||
func (*GetLinkMetadataResponse) Descriptor() ([]byte, []int) {
|
||||
return file_api_v2_link_service_proto_rawDescGZIP(), []int{1}
|
||||
return file_api_v1_link_service_proto_rawDescGZIP(), []int{1}
|
||||
}
|
||||
|
||||
func (x *GetLinkMetadataResponse) GetLinkMetadata() *LinkMetadata {
|
||||
@ -128,7 +128,7 @@ type LinkMetadata struct {
|
||||
func (x *LinkMetadata) Reset() {
|
||||
*x = LinkMetadata{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_api_v2_link_service_proto_msgTypes[2]
|
||||
mi := &file_api_v1_link_service_proto_msgTypes[2]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
@ -141,7 +141,7 @@ func (x *LinkMetadata) String() string {
|
||||
func (*LinkMetadata) ProtoMessage() {}
|
||||
|
||||
func (x *LinkMetadata) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_api_v2_link_service_proto_msgTypes[2]
|
||||
mi := &file_api_v1_link_service_proto_msgTypes[2]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
@ -154,7 +154,7 @@ func (x *LinkMetadata) ProtoReflect() protoreflect.Message {
|
||||
|
||||
// Deprecated: Use LinkMetadata.ProtoReflect.Descriptor instead.
|
||||
func (*LinkMetadata) Descriptor() ([]byte, []int) {
|
||||
return file_api_v2_link_service_proto_rawDescGZIP(), []int{2}
|
||||
return file_api_v1_link_service_proto_rawDescGZIP(), []int{2}
|
||||
}
|
||||
|
||||
func (x *LinkMetadata) GetTitle() string {
|
||||
@ -178,12 +178,12 @@ func (x *LinkMetadata) GetImage() string {
|
||||
return ""
|
||||
}
|
||||
|
||||
var File_api_v2_link_service_proto protoreflect.FileDescriptor
|
||||
var File_api_v1_link_service_proto protoreflect.FileDescriptor
|
||||
|
||||
var file_api_v2_link_service_proto_rawDesc = []byte{
|
||||
0x0a, 0x19, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x32, 0x2f, 0x6c, 0x69, 0x6e, 0x6b, 0x5f, 0x73, 0x65,
|
||||
var file_api_v1_link_service_proto_rawDesc = []byte{
|
||||
0x0a, 0x19, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, 0x2f, 0x6c, 0x69, 0x6e, 0x6b, 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,
|
||||
0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 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, 0x22, 0x2c, 0x0a, 0x16, 0x47, 0x65, 0x74, 0x4c, 0x69,
|
||||
0x6e, 0x6b, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73,
|
||||
@ -192,7 +192,7 @@ var file_api_v2_link_service_proto_rawDesc = []byte{
|
||||
0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65,
|
||||
0x12, 0x3f, 0x0a, 0x0d, 0x6c, 0x69, 0x6e, 0x6b, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74,
|
||||
0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e,
|
||||
0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x4c, 0x69, 0x6e, 0x6b, 0x4d, 0x65, 0x74, 0x61, 0x64,
|
||||
0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x69, 0x6e, 0x6b, 0x4d, 0x65, 0x74, 0x61, 0x64,
|
||||
0x61, 0x74, 0x61, 0x52, 0x0c, 0x6c, 0x69, 0x6e, 0x6b, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74,
|
||||
0x61, 0x22, 0x5c, 0x0a, 0x0c, 0x4c, 0x69, 0x6e, 0x6b, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74,
|
||||
0x61, 0x12, 0x14, 0x0a, 0x05, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09,
|
||||
@ -203,47 +203,47 @@ var file_api_v2_link_service_proto_rawDesc = []byte{
|
||||
0x8b, 0x01, 0x0a, 0x0b, 0x4c, 0x69, 0x6e, 0x6b, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12,
|
||||
0x7c, 0x0a, 0x0f, 0x47, 0x65, 0x74, 0x4c, 0x69, 0x6e, 0x6b, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61,
|
||||
0x74, 0x61, 0x12, 0x24, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76,
|
||||
0x32, 0x2e, 0x47, 0x65, 0x74, 0x4c, 0x69, 0x6e, 0x6b, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74,
|
||||
0x31, 0x2e, 0x47, 0x65, 0x74, 0x4c, 0x69, 0x6e, 0x6b, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74,
|
||||
0x61, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x25, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73,
|
||||
0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x47, 0x65, 0x74, 0x4c, 0x69, 0x6e, 0x6b, 0x4d,
|
||||
0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x4c, 0x69, 0x6e, 0x6b, 0x4d,
|
||||
0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22,
|
||||
0x1c, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x16, 0x12, 0x14, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x32,
|
||||
0x1c, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x16, 0x12, 0x14, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31,
|
||||
0x2f, 0x6c, 0x69, 0x6e, 0x6b, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x42, 0xa8, 0x01,
|
||||
0x0a, 0x10, 0x63, 0x6f, 0x6d, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e,
|
||||
0x76, 0x32, 0x42, 0x10, 0x4c, 0x69, 0x6e, 0x6b, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x50,
|
||||
0x76, 0x31, 0x42, 0x10, 0x4c, 0x69, 0x6e, 0x6b, 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,
|
||||
0x76, 0x31, 0x3b, 0x61, 0x70, 0x69, 0x76, 0x31, 0xa2, 0x02, 0x03, 0x4d, 0x41, 0x58, 0xaa, 0x02,
|
||||
0x0c, 0x4d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x41, 0x70, 0x69, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x0c,
|
||||
0x4d, 0x65, 0x6d, 0x6f, 0x73, 0x5c, 0x41, 0x70, 0x69, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x18, 0x4d,
|
||||
0x65, 0x6d, 0x6f, 0x73, 0x5c, 0x41, 0x70, 0x69, 0x5c, 0x56, 0x31, 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,
|
||||
0x3a, 0x41, 0x70, 0x69, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
|
||||
}
|
||||
|
||||
var (
|
||||
file_api_v2_link_service_proto_rawDescOnce sync.Once
|
||||
file_api_v2_link_service_proto_rawDescData = file_api_v2_link_service_proto_rawDesc
|
||||
file_api_v1_link_service_proto_rawDescOnce sync.Once
|
||||
file_api_v1_link_service_proto_rawDescData = file_api_v1_link_service_proto_rawDesc
|
||||
)
|
||||
|
||||
func file_api_v2_link_service_proto_rawDescGZIP() []byte {
|
||||
file_api_v2_link_service_proto_rawDescOnce.Do(func() {
|
||||
file_api_v2_link_service_proto_rawDescData = protoimpl.X.CompressGZIP(file_api_v2_link_service_proto_rawDescData)
|
||||
func file_api_v1_link_service_proto_rawDescGZIP() []byte {
|
||||
file_api_v1_link_service_proto_rawDescOnce.Do(func() {
|
||||
file_api_v1_link_service_proto_rawDescData = protoimpl.X.CompressGZIP(file_api_v1_link_service_proto_rawDescData)
|
||||
})
|
||||
return file_api_v2_link_service_proto_rawDescData
|
||||
return file_api_v1_link_service_proto_rawDescData
|
||||
}
|
||||
|
||||
var file_api_v2_link_service_proto_msgTypes = make([]protoimpl.MessageInfo, 3)
|
||||
var file_api_v2_link_service_proto_goTypes = []interface{}{
|
||||
(*GetLinkMetadataRequest)(nil), // 0: memos.api.v2.GetLinkMetadataRequest
|
||||
(*GetLinkMetadataResponse)(nil), // 1: memos.api.v2.GetLinkMetadataResponse
|
||||
(*LinkMetadata)(nil), // 2: memos.api.v2.LinkMetadata
|
||||
var file_api_v1_link_service_proto_msgTypes = make([]protoimpl.MessageInfo, 3)
|
||||
var file_api_v1_link_service_proto_goTypes = []interface{}{
|
||||
(*GetLinkMetadataRequest)(nil), // 0: memos.api.v1.GetLinkMetadataRequest
|
||||
(*GetLinkMetadataResponse)(nil), // 1: memos.api.v1.GetLinkMetadataResponse
|
||||
(*LinkMetadata)(nil), // 2: memos.api.v1.LinkMetadata
|
||||
}
|
||||
var file_api_v2_link_service_proto_depIdxs = []int32{
|
||||
2, // 0: memos.api.v2.GetLinkMetadataResponse.link_metadata:type_name -> memos.api.v2.LinkMetadata
|
||||
0, // 1: memos.api.v2.LinkService.GetLinkMetadata:input_type -> memos.api.v2.GetLinkMetadataRequest
|
||||
1, // 2: memos.api.v2.LinkService.GetLinkMetadata:output_type -> memos.api.v2.GetLinkMetadataResponse
|
||||
var file_api_v1_link_service_proto_depIdxs = []int32{
|
||||
2, // 0: memos.api.v1.GetLinkMetadataResponse.link_metadata:type_name -> memos.api.v1.LinkMetadata
|
||||
0, // 1: memos.api.v1.LinkService.GetLinkMetadata:input_type -> memos.api.v1.GetLinkMetadataRequest
|
||||
1, // 2: memos.api.v1.LinkService.GetLinkMetadata:output_type -> memos.api.v1.GetLinkMetadataResponse
|
||||
2, // [2:3] is the sub-list for method output_type
|
||||
1, // [1:2] is the sub-list for method input_type
|
||||
1, // [1:1] is the sub-list for extension type_name
|
||||
@ -251,13 +251,13 @@ var file_api_v2_link_service_proto_depIdxs = []int32{
|
||||
0, // [0:1] is the sub-list for field type_name
|
||||
}
|
||||
|
||||
func init() { file_api_v2_link_service_proto_init() }
|
||||
func file_api_v2_link_service_proto_init() {
|
||||
if File_api_v2_link_service_proto != nil {
|
||||
func init() { file_api_v1_link_service_proto_init() }
|
||||
func file_api_v1_link_service_proto_init() {
|
||||
if File_api_v1_link_service_proto != nil {
|
||||
return
|
||||
}
|
||||
if !protoimpl.UnsafeEnabled {
|
||||
file_api_v2_link_service_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
|
||||
file_api_v1_link_service_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*GetLinkMetadataRequest); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
@ -269,7 +269,7 @@ func file_api_v2_link_service_proto_init() {
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_api_v2_link_service_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
|
||||
file_api_v1_link_service_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*GetLinkMetadataResponse); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
@ -281,7 +281,7 @@ func file_api_v2_link_service_proto_init() {
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_api_v2_link_service_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
|
||||
file_api_v1_link_service_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*LinkMetadata); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
@ -298,18 +298,18 @@ func file_api_v2_link_service_proto_init() {
|
||||
out := protoimpl.TypeBuilder{
|
||||
File: protoimpl.DescBuilder{
|
||||
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
|
||||
RawDescriptor: file_api_v2_link_service_proto_rawDesc,
|
||||
RawDescriptor: file_api_v1_link_service_proto_rawDesc,
|
||||
NumEnums: 0,
|
||||
NumMessages: 3,
|
||||
NumExtensions: 0,
|
||||
NumServices: 1,
|
||||
},
|
||||
GoTypes: file_api_v2_link_service_proto_goTypes,
|
||||
DependencyIndexes: file_api_v2_link_service_proto_depIdxs,
|
||||
MessageInfos: file_api_v2_link_service_proto_msgTypes,
|
||||
GoTypes: file_api_v1_link_service_proto_goTypes,
|
||||
DependencyIndexes: file_api_v1_link_service_proto_depIdxs,
|
||||
MessageInfos: file_api_v1_link_service_proto_msgTypes,
|
||||
}.Build()
|
||||
File_api_v2_link_service_proto = out.File
|
||||
file_api_v2_link_service_proto_rawDesc = nil
|
||||
file_api_v2_link_service_proto_goTypes = nil
|
||||
file_api_v2_link_service_proto_depIdxs = nil
|
||||
File_api_v1_link_service_proto = out.File
|
||||
file_api_v1_link_service_proto_rawDesc = nil
|
||||
file_api_v1_link_service_proto_goTypes = nil
|
||||
file_api_v1_link_service_proto_depIdxs = nil
|
||||
}
|
@ -1,12 +1,12 @@
|
||||
// Code generated by protoc-gen-grpc-gateway. DO NOT EDIT.
|
||||
// source: api/v2/link_service.proto
|
||||
// source: api/v1/link_service.proto
|
||||
|
||||
/*
|
||||
Package apiv2 is a reverse proxy.
|
||||
Package apiv1 is a reverse proxy.
|
||||
|
||||
It translates gRPC into RESTful JSON APIs.
|
||||
*/
|
||||
package apiv2
|
||||
package apiv1
|
||||
|
||||
import (
|
||||
"context"
|
||||
@ -81,7 +81,7 @@ func RegisterLinkServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux
|
||||
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
||||
var err error
|
||||
var annotatedContext context.Context
|
||||
annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/memos.api.v2.LinkService/GetLinkMetadata", runtime.WithHTTPPathPattern("/api/v2/linkMetadata"))
|
||||
annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/memos.api.v1.LinkService/GetLinkMetadata", runtime.WithHTTPPathPattern("/api/v1/linkMetadata"))
|
||||
if err != nil {
|
||||
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||
return
|
||||
@ -145,7 +145,7 @@ func RegisterLinkServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux
|
||||
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
||||
var err error
|
||||
var annotatedContext context.Context
|
||||
annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/memos.api.v2.LinkService/GetLinkMetadata", runtime.WithHTTPPathPattern("/api/v2/linkMetadata"))
|
||||
annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/memos.api.v1.LinkService/GetLinkMetadata", runtime.WithHTTPPathPattern("/api/v1/linkMetadata"))
|
||||
if err != nil {
|
||||
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||
return
|
||||
@ -165,7 +165,7 @@ func RegisterLinkServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux
|
||||
}
|
||||
|
||||
var (
|
||||
pattern_LinkService_GetLinkMetadata_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"api", "v2", "linkMetadata"}, ""))
|
||||
pattern_LinkService_GetLinkMetadata_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"api", "v1", "linkMetadata"}, ""))
|
||||
)
|
||||
|
||||
var (
|
@ -2,9 +2,9 @@
|
||||
// versions:
|
||||
// - protoc-gen-go-grpc v1.3.0
|
||||
// - protoc (unknown)
|
||||
// source: api/v2/link_service.proto
|
||||
// source: api/v1/link_service.proto
|
||||
|
||||
package apiv2
|
||||
package apiv1
|
||||
|
||||
import (
|
||||
context "context"
|
||||
@ -19,7 +19,7 @@ import (
|
||||
const _ = grpc.SupportPackageIsVersion7
|
||||
|
||||
const (
|
||||
LinkService_GetLinkMetadata_FullMethodName = "/memos.api.v2.LinkService/GetLinkMetadata"
|
||||
LinkService_GetLinkMetadata_FullMethodName = "/memos.api.v1.LinkService/GetLinkMetadata"
|
||||
)
|
||||
|
||||
// LinkServiceClient is the client API for LinkService service.
|
||||
@ -98,7 +98,7 @@ func _LinkService_GetLinkMetadata_Handler(srv interface{}, ctx context.Context,
|
||||
// It's only intended for direct use with grpc.RegisterService,
|
||||
// and not to be introspected or modified (even as a copy)
|
||||
var LinkService_ServiceDesc = grpc.ServiceDesc{
|
||||
ServiceName: "memos.api.v2.LinkService",
|
||||
ServiceName: "memos.api.v1.LinkService",
|
||||
HandlerType: (*LinkServiceServer)(nil),
|
||||
Methods: []grpc.MethodDesc{
|
||||
{
|
||||
@ -107,5 +107,5 @@ var LinkService_ServiceDesc = grpc.ServiceDesc{
|
||||
},
|
||||
},
|
||||
Streams: []grpc.StreamDesc{},
|
||||
Metadata: "api/v2/link_service.proto",
|
||||
Metadata: "api/v1/link_service.proto",
|
||||
}
|
@ -2,9 +2,9 @@
|
||||
// versions:
|
||||
// protoc-gen-go v1.33.0
|
||||
// protoc (unknown)
|
||||
// source: api/v2/memo_relation_service.proto
|
||||
// source: api/v1/memo_relation_service.proto
|
||||
|
||||
package apiv2
|
||||
package apiv1
|
||||
|
||||
import (
|
||||
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
|
||||
@ -53,11 +53,11 @@ func (x MemoRelation_Type) String() string {
|
||||
}
|
||||
|
||||
func (MemoRelation_Type) Descriptor() protoreflect.EnumDescriptor {
|
||||
return file_api_v2_memo_relation_service_proto_enumTypes[0].Descriptor()
|
||||
return file_api_v1_memo_relation_service_proto_enumTypes[0].Descriptor()
|
||||
}
|
||||
|
||||
func (MemoRelation_Type) Type() protoreflect.EnumType {
|
||||
return &file_api_v2_memo_relation_service_proto_enumTypes[0]
|
||||
return &file_api_v1_memo_relation_service_proto_enumTypes[0]
|
||||
}
|
||||
|
||||
func (x MemoRelation_Type) Number() protoreflect.EnumNumber {
|
||||
@ -66,7 +66,7 @@ func (x MemoRelation_Type) Number() protoreflect.EnumNumber {
|
||||
|
||||
// Deprecated: Use MemoRelation_Type.Descriptor instead.
|
||||
func (MemoRelation_Type) EnumDescriptor() ([]byte, []int) {
|
||||
return file_api_v2_memo_relation_service_proto_rawDescGZIP(), []int{0, 0}
|
||||
return file_api_v1_memo_relation_service_proto_rawDescGZIP(), []int{0, 0}
|
||||
}
|
||||
|
||||
type MemoRelation struct {
|
||||
@ -80,13 +80,13 @@ type MemoRelation struct {
|
||||
// The name of related memo.
|
||||
// Format: "memos/{uid}"
|
||||
RelatedMemo string `protobuf:"bytes,2,opt,name=related_memo,json=relatedMemo,proto3" json:"related_memo,omitempty"`
|
||||
Type MemoRelation_Type `protobuf:"varint,3,opt,name=type,proto3,enum=memos.api.v2.MemoRelation_Type" json:"type,omitempty"`
|
||||
Type MemoRelation_Type `protobuf:"varint,3,opt,name=type,proto3,enum=memos.api.v1.MemoRelation_Type" json:"type,omitempty"`
|
||||
}
|
||||
|
||||
func (x *MemoRelation) Reset() {
|
||||
*x = MemoRelation{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_api_v2_memo_relation_service_proto_msgTypes[0]
|
||||
mi := &file_api_v1_memo_relation_service_proto_msgTypes[0]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
@ -99,7 +99,7 @@ func (x *MemoRelation) String() string {
|
||||
func (*MemoRelation) ProtoMessage() {}
|
||||
|
||||
func (x *MemoRelation) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_api_v2_memo_relation_service_proto_msgTypes[0]
|
||||
mi := &file_api_v1_memo_relation_service_proto_msgTypes[0]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
@ -112,7 +112,7 @@ func (x *MemoRelation) ProtoReflect() protoreflect.Message {
|
||||
|
||||
// Deprecated: Use MemoRelation.ProtoReflect.Descriptor instead.
|
||||
func (*MemoRelation) Descriptor() ([]byte, []int) {
|
||||
return file_api_v2_memo_relation_service_proto_rawDescGZIP(), []int{0}
|
||||
return file_api_v1_memo_relation_service_proto_rawDescGZIP(), []int{0}
|
||||
}
|
||||
|
||||
func (x *MemoRelation) GetMemo() string {
|
||||
@ -136,58 +136,58 @@ func (x *MemoRelation) GetType() MemoRelation_Type {
|
||||
return MemoRelation_TYPE_UNSPECIFIED
|
||||
}
|
||||
|
||||
var File_api_v2_memo_relation_service_proto protoreflect.FileDescriptor
|
||||
var File_api_v1_memo_relation_service_proto protoreflect.FileDescriptor
|
||||
|
||||
var file_api_v2_memo_relation_service_proto_rawDesc = []byte{
|
||||
0x0a, 0x22, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x32, 0x2f, 0x6d, 0x65, 0x6d, 0x6f, 0x5f, 0x72, 0x65,
|
||||
var file_api_v1_memo_relation_service_proto_rawDesc = []byte{
|
||||
0x0a, 0x22, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, 0x2f, 0x6d, 0x65, 0x6d, 0x6f, 0x5f, 0x72, 0x65,
|
||||
0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 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, 0x22, 0xb4, 0x01, 0x0a, 0x0c, 0x4d, 0x65, 0x6d, 0x6f, 0x52, 0x65, 0x6c, 0x61, 0x74,
|
||||
0x76, 0x31, 0x22, 0xb4, 0x01, 0x0a, 0x0c, 0x4d, 0x65, 0x6d, 0x6f, 0x52, 0x65, 0x6c, 0x61, 0x74,
|
||||
0x69, 0x6f, 0x6e, 0x12, 0x12, 0x0a, 0x04, 0x6d, 0x65, 0x6d, 0x6f, 0x18, 0x01, 0x20, 0x01, 0x28,
|
||||
0x09, 0x52, 0x04, 0x6d, 0x65, 0x6d, 0x6f, 0x12, 0x21, 0x0a, 0x0c, 0x72, 0x65, 0x6c, 0x61, 0x74,
|
||||
0x65, 0x64, 0x5f, 0x6d, 0x65, 0x6d, 0x6f, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x72,
|
||||
0x65, 0x6c, 0x61, 0x74, 0x65, 0x64, 0x4d, 0x65, 0x6d, 0x6f, 0x12, 0x33, 0x0a, 0x04, 0x74, 0x79,
|
||||
0x70, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1f, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73,
|
||||
0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x4d, 0x65, 0x6d, 0x6f, 0x52, 0x65, 0x6c, 0x61,
|
||||
0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x65, 0x6d, 0x6f, 0x52, 0x65, 0x6c, 0x61,
|
||||
0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x54, 0x79, 0x70, 0x65, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x22,
|
||||
0x38, 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, 0x0d, 0x0a,
|
||||
0x09, 0x52, 0x45, 0x46, 0x45, 0x52, 0x45, 0x4e, 0x43, 0x45, 0x10, 0x01, 0x12, 0x0b, 0x0a, 0x07,
|
||||
0x43, 0x4f, 0x4d, 0x4d, 0x45, 0x4e, 0x54, 0x10, 0x02, 0x42, 0xb0, 0x01, 0x0a, 0x10, 0x63, 0x6f,
|
||||
0x6d, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x42, 0x18,
|
||||
0x6d, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x42, 0x18,
|
||||
0x4d, 0x65, 0x6d, 0x6f, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 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,
|
||||
0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, 0x3b, 0x61, 0x70, 0x69, 0x76, 0x31, 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,
|
||||
0x31, 0xca, 0x02, 0x0c, 0x4d, 0x65, 0x6d, 0x6f, 0x73, 0x5c, 0x41, 0x70, 0x69, 0x5c, 0x56, 0x31,
|
||||
0xe2, 0x02, 0x18, 0x4d, 0x65, 0x6d, 0x6f, 0x73, 0x5c, 0x41, 0x70, 0x69, 0x5c, 0x56, 0x31, 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,
|
||||
0x6d, 0x6f, 0x73, 0x3a, 0x3a, 0x41, 0x70, 0x69, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72,
|
||||
0x6f, 0x74, 0x6f, 0x33,
|
||||
}
|
||||
|
||||
var (
|
||||
file_api_v2_memo_relation_service_proto_rawDescOnce sync.Once
|
||||
file_api_v2_memo_relation_service_proto_rawDescData = file_api_v2_memo_relation_service_proto_rawDesc
|
||||
file_api_v1_memo_relation_service_proto_rawDescOnce sync.Once
|
||||
file_api_v1_memo_relation_service_proto_rawDescData = file_api_v1_memo_relation_service_proto_rawDesc
|
||||
)
|
||||
|
||||
func file_api_v2_memo_relation_service_proto_rawDescGZIP() []byte {
|
||||
file_api_v2_memo_relation_service_proto_rawDescOnce.Do(func() {
|
||||
file_api_v2_memo_relation_service_proto_rawDescData = protoimpl.X.CompressGZIP(file_api_v2_memo_relation_service_proto_rawDescData)
|
||||
func file_api_v1_memo_relation_service_proto_rawDescGZIP() []byte {
|
||||
file_api_v1_memo_relation_service_proto_rawDescOnce.Do(func() {
|
||||
file_api_v1_memo_relation_service_proto_rawDescData = protoimpl.X.CompressGZIP(file_api_v1_memo_relation_service_proto_rawDescData)
|
||||
})
|
||||
return file_api_v2_memo_relation_service_proto_rawDescData
|
||||
return file_api_v1_memo_relation_service_proto_rawDescData
|
||||
}
|
||||
|
||||
var file_api_v2_memo_relation_service_proto_enumTypes = make([]protoimpl.EnumInfo, 1)
|
||||
var file_api_v2_memo_relation_service_proto_msgTypes = make([]protoimpl.MessageInfo, 1)
|
||||
var file_api_v2_memo_relation_service_proto_goTypes = []interface{}{
|
||||
(MemoRelation_Type)(0), // 0: memos.api.v2.MemoRelation.Type
|
||||
(*MemoRelation)(nil), // 1: memos.api.v2.MemoRelation
|
||||
var file_api_v1_memo_relation_service_proto_enumTypes = make([]protoimpl.EnumInfo, 1)
|
||||
var file_api_v1_memo_relation_service_proto_msgTypes = make([]protoimpl.MessageInfo, 1)
|
||||
var file_api_v1_memo_relation_service_proto_goTypes = []interface{}{
|
||||
(MemoRelation_Type)(0), // 0: memos.api.v1.MemoRelation.Type
|
||||
(*MemoRelation)(nil), // 1: memos.api.v1.MemoRelation
|
||||
}
|
||||
var file_api_v2_memo_relation_service_proto_depIdxs = []int32{
|
||||
0, // 0: memos.api.v2.MemoRelation.type:type_name -> memos.api.v2.MemoRelation.Type
|
||||
var file_api_v1_memo_relation_service_proto_depIdxs = []int32{
|
||||
0, // 0: memos.api.v1.MemoRelation.type:type_name -> memos.api.v1.MemoRelation.Type
|
||||
1, // [1:1] is the sub-list for method output_type
|
||||
1, // [1:1] is the sub-list for method input_type
|
||||
1, // [1:1] is the sub-list for extension type_name
|
||||
@ -195,13 +195,13 @@ var file_api_v2_memo_relation_service_proto_depIdxs = []int32{
|
||||
0, // [0:1] is the sub-list for field type_name
|
||||
}
|
||||
|
||||
func init() { file_api_v2_memo_relation_service_proto_init() }
|
||||
func file_api_v2_memo_relation_service_proto_init() {
|
||||
if File_api_v2_memo_relation_service_proto != nil {
|
||||
func init() { file_api_v1_memo_relation_service_proto_init() }
|
||||
func file_api_v1_memo_relation_service_proto_init() {
|
||||
if File_api_v1_memo_relation_service_proto != nil {
|
||||
return
|
||||
}
|
||||
if !protoimpl.UnsafeEnabled {
|
||||
file_api_v2_memo_relation_service_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
|
||||
file_api_v1_memo_relation_service_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*MemoRelation); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
@ -218,19 +218,19 @@ func file_api_v2_memo_relation_service_proto_init() {
|
||||
out := protoimpl.TypeBuilder{
|
||||
File: protoimpl.DescBuilder{
|
||||
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
|
||||
RawDescriptor: file_api_v2_memo_relation_service_proto_rawDesc,
|
||||
RawDescriptor: file_api_v1_memo_relation_service_proto_rawDesc,
|
||||
NumEnums: 1,
|
||||
NumMessages: 1,
|
||||
NumExtensions: 0,
|
||||
NumServices: 0,
|
||||
},
|
||||
GoTypes: file_api_v2_memo_relation_service_proto_goTypes,
|
||||
DependencyIndexes: file_api_v2_memo_relation_service_proto_depIdxs,
|
||||
EnumInfos: file_api_v2_memo_relation_service_proto_enumTypes,
|
||||
MessageInfos: file_api_v2_memo_relation_service_proto_msgTypes,
|
||||
GoTypes: file_api_v1_memo_relation_service_proto_goTypes,
|
||||
DependencyIndexes: file_api_v1_memo_relation_service_proto_depIdxs,
|
||||
EnumInfos: file_api_v1_memo_relation_service_proto_enumTypes,
|
||||
MessageInfos: file_api_v1_memo_relation_service_proto_msgTypes,
|
||||
}.Build()
|
||||
File_api_v2_memo_relation_service_proto = out.File
|
||||
file_api_v2_memo_relation_service_proto_rawDesc = nil
|
||||
file_api_v2_memo_relation_service_proto_goTypes = nil
|
||||
file_api_v2_memo_relation_service_proto_depIdxs = nil
|
||||
File_api_v1_memo_relation_service_proto = out.File
|
||||
file_api_v1_memo_relation_service_proto_rawDesc = nil
|
||||
file_api_v1_memo_relation_service_proto_goTypes = nil
|
||||
file_api_v1_memo_relation_service_proto_depIdxs = nil
|
||||
}
|
File diff suppressed because it is too large
Load Diff
@ -1,12 +1,12 @@
|
||||
// Code generated by protoc-gen-grpc-gateway. DO NOT EDIT.
|
||||
// source: api/v2/memo_service.proto
|
||||
// source: api/v1/memo_service.proto
|
||||
|
||||
/*
|
||||
Package apiv2 is a reverse proxy.
|
||||
Package apiv1 is a reverse proxy.
|
||||
|
||||
It translates gRPC into RESTful JSON APIs.
|
||||
*/
|
||||
package apiv2
|
||||
package apiv1
|
||||
|
||||
import (
|
||||
"context"
|
||||
@ -909,7 +909,7 @@ func RegisterMemoServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux
|
||||
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
||||
var err error
|
||||
var annotatedContext context.Context
|
||||
annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/memos.api.v2.MemoService/CreateMemo", runtime.WithHTTPPathPattern("/api/v2/memos"))
|
||||
annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/memos.api.v1.MemoService/CreateMemo", runtime.WithHTTPPathPattern("/api/v1/memos"))
|
||||
if err != nil {
|
||||
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||
return
|
||||
@ -934,7 +934,7 @@ func RegisterMemoServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux
|
||||
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
||||
var err error
|
||||
var annotatedContext context.Context
|
||||
annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/memos.api.v2.MemoService/ListMemos", runtime.WithHTTPPathPattern("/api/v2/memos"))
|
||||
annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/memos.api.v1.MemoService/ListMemos", runtime.WithHTTPPathPattern("/api/v1/memos"))
|
||||
if err != nil {
|
||||
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||
return
|
||||
@ -959,7 +959,7 @@ func RegisterMemoServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux
|
||||
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
||||
var err error
|
||||
var annotatedContext context.Context
|
||||
annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/memos.api.v2.MemoService/SearchMemos", runtime.WithHTTPPathPattern("/api/v2/memos:search"))
|
||||
annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/memos.api.v1.MemoService/SearchMemos", runtime.WithHTTPPathPattern("/api/v1/memos:search"))
|
||||
if err != nil {
|
||||
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||
return
|
||||
@ -984,7 +984,7 @@ func RegisterMemoServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux
|
||||
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
||||
var err error
|
||||
var annotatedContext context.Context
|
||||
annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/memos.api.v2.MemoService/GetMemo", runtime.WithHTTPPathPattern("/api/v2/{name=memos/*}"))
|
||||
annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/memos.api.v1.MemoService/GetMemo", runtime.WithHTTPPathPattern("/api/v1/{name=memos/*}"))
|
||||
if err != nil {
|
||||
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||
return
|
||||
@ -1009,7 +1009,7 @@ func RegisterMemoServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux
|
||||
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
||||
var err error
|
||||
var annotatedContext context.Context
|
||||
annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/memos.api.v2.MemoService/UpdateMemo", runtime.WithHTTPPathPattern("/api/v2/{memo.name=memos/*}"))
|
||||
annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/memos.api.v1.MemoService/UpdateMemo", runtime.WithHTTPPathPattern("/api/v1/{memo.name=memos/*}"))
|
||||
if err != nil {
|
||||
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||
return
|
||||
@ -1034,7 +1034,7 @@ func RegisterMemoServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux
|
||||
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
||||
var err error
|
||||
var annotatedContext context.Context
|
||||
annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/memos.api.v2.MemoService/DeleteMemo", runtime.WithHTTPPathPattern("/api/v2/{name=memos/*}"))
|
||||
annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/memos.api.v1.MemoService/DeleteMemo", runtime.WithHTTPPathPattern("/api/v1/{name=memos/*}"))
|
||||
if err != nil {
|
||||
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||
return
|
||||
@ -1059,7 +1059,7 @@ func RegisterMemoServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux
|
||||
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
||||
var err error
|
||||
var annotatedContext context.Context
|
||||
annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/memos.api.v2.MemoService/ExportMemos", runtime.WithHTTPPathPattern("/api/v2/memos:export"))
|
||||
annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/memos.api.v1.MemoService/ExportMemos", runtime.WithHTTPPathPattern("/api/v1/memos:export"))
|
||||
if err != nil {
|
||||
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||
return
|
||||
@ -1084,7 +1084,7 @@ func RegisterMemoServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux
|
||||
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
||||
var err error
|
||||
var annotatedContext context.Context
|
||||
annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/memos.api.v2.MemoService/SetMemoResources", runtime.WithHTTPPathPattern("/api/v2/{name=memos/*}/resources"))
|
||||
annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/memos.api.v1.MemoService/SetMemoResources", runtime.WithHTTPPathPattern("/api/v1/{name=memos/*}/resources"))
|
||||
if err != nil {
|
||||
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||
return
|
||||
@ -1109,7 +1109,7 @@ func RegisterMemoServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux
|
||||
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
||||
var err error
|
||||
var annotatedContext context.Context
|
||||
annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/memos.api.v2.MemoService/ListMemoResources", runtime.WithHTTPPathPattern("/api/v2/{name=memos/*}/resources"))
|
||||
annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/memos.api.v1.MemoService/ListMemoResources", runtime.WithHTTPPathPattern("/api/v1/{name=memos/*}/resources"))
|
||||
if err != nil {
|
||||
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||
return
|
||||
@ -1134,7 +1134,7 @@ func RegisterMemoServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux
|
||||
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
||||
var err error
|
||||
var annotatedContext context.Context
|
||||
annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/memos.api.v2.MemoService/SetMemoRelations", runtime.WithHTTPPathPattern("/api/v2/{name=memos/*}/relations"))
|
||||
annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/memos.api.v1.MemoService/SetMemoRelations", runtime.WithHTTPPathPattern("/api/v1/{name=memos/*}/relations"))
|
||||
if err != nil {
|
||||
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||
return
|
||||
@ -1159,7 +1159,7 @@ func RegisterMemoServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux
|
||||
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
||||
var err error
|
||||
var annotatedContext context.Context
|
||||
annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/memos.api.v2.MemoService/ListMemoRelations", runtime.WithHTTPPathPattern("/api/v2/{name=memos/*}/relations"))
|
||||
annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/memos.api.v1.MemoService/ListMemoRelations", runtime.WithHTTPPathPattern("/api/v1/{name=memos/*}/relations"))
|
||||
if err != nil {
|
||||
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||
return
|
||||
@ -1184,7 +1184,7 @@ func RegisterMemoServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux
|
||||
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
||||
var err error
|
||||
var annotatedContext context.Context
|
||||
annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/memos.api.v2.MemoService/CreateMemoComment", runtime.WithHTTPPathPattern("/api/v2/{name=memos/*}/comments"))
|
||||
annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/memos.api.v1.MemoService/CreateMemoComment", runtime.WithHTTPPathPattern("/api/v1/{name=memos/*}/comments"))
|
||||
if err != nil {
|
||||
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||
return
|
||||
@ -1209,7 +1209,7 @@ func RegisterMemoServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux
|
||||
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
||||
var err error
|
||||
var annotatedContext context.Context
|
||||
annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/memos.api.v2.MemoService/ListMemoComments", runtime.WithHTTPPathPattern("/api/v2/{name=memos/*}/comments"))
|
||||
annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/memos.api.v1.MemoService/ListMemoComments", runtime.WithHTTPPathPattern("/api/v1/{name=memos/*}/comments"))
|
||||
if err != nil {
|
||||
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||
return
|
||||
@ -1234,7 +1234,7 @@ func RegisterMemoServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux
|
||||
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
||||
var err error
|
||||
var annotatedContext context.Context
|
||||
annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/memos.api.v2.MemoService/GetUserMemosStats", runtime.WithHTTPPathPattern("/api/v2/memos/stats"))
|
||||
annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/memos.api.v1.MemoService/GetUserMemosStats", runtime.WithHTTPPathPattern("/api/v1/memos/stats"))
|
||||
if err != nil {
|
||||
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||
return
|
||||
@ -1259,7 +1259,7 @@ func RegisterMemoServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux
|
||||
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
||||
var err error
|
||||
var annotatedContext context.Context
|
||||
annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/memos.api.v2.MemoService/ListMemoReactions", runtime.WithHTTPPathPattern("/api/v2/{name=memos/*}/reactions"))
|
||||
annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/memos.api.v1.MemoService/ListMemoReactions", runtime.WithHTTPPathPattern("/api/v1/{name=memos/*}/reactions"))
|
||||
if err != nil {
|
||||
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||
return
|
||||
@ -1284,7 +1284,7 @@ func RegisterMemoServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux
|
||||
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
||||
var err error
|
||||
var annotatedContext context.Context
|
||||
annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/memos.api.v2.MemoService/UpsertMemoReaction", runtime.WithHTTPPathPattern("/api/v2/{name=memos/*}/reactions"))
|
||||
annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/memos.api.v1.MemoService/UpsertMemoReaction", runtime.WithHTTPPathPattern("/api/v1/{name=memos/*}/reactions"))
|
||||
if err != nil {
|
||||
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||
return
|
||||
@ -1309,7 +1309,7 @@ func RegisterMemoServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux
|
||||
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
||||
var err error
|
||||
var annotatedContext context.Context
|
||||
annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/memos.api.v2.MemoService/DeleteMemoReaction", runtime.WithHTTPPathPattern("/api/v2/reactions/{reaction_id}"))
|
||||
annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/memos.api.v1.MemoService/DeleteMemoReaction", runtime.WithHTTPPathPattern("/api/v1/reactions/{reaction_id}"))
|
||||
if err != nil {
|
||||
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||
return
|
||||
@ -1373,7 +1373,7 @@ func RegisterMemoServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux
|
||||
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
||||
var err error
|
||||
var annotatedContext context.Context
|
||||
annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/memos.api.v2.MemoService/CreateMemo", runtime.WithHTTPPathPattern("/api/v2/memos"))
|
||||
annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/memos.api.v1.MemoService/CreateMemo", runtime.WithHTTPPathPattern("/api/v1/memos"))
|
||||
if err != nil {
|
||||
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||
return
|
||||
@ -1395,7 +1395,7 @@ func RegisterMemoServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux
|
||||
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
||||
var err error
|
||||
var annotatedContext context.Context
|
||||
annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/memos.api.v2.MemoService/ListMemos", runtime.WithHTTPPathPattern("/api/v2/memos"))
|
||||
annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/memos.api.v1.MemoService/ListMemos", runtime.WithHTTPPathPattern("/api/v1/memos"))
|
||||
if err != nil {
|
||||
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||
return
|
||||
@ -1417,7 +1417,7 @@ func RegisterMemoServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux
|
||||
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
||||
var err error
|
||||
var annotatedContext context.Context
|
||||
annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/memos.api.v2.MemoService/SearchMemos", runtime.WithHTTPPathPattern("/api/v2/memos:search"))
|
||||
annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/memos.api.v1.MemoService/SearchMemos", runtime.WithHTTPPathPattern("/api/v1/memos:search"))
|
||||
if err != nil {
|
||||
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||
return
|
||||
@ -1439,7 +1439,7 @@ func RegisterMemoServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux
|
||||
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
||||
var err error
|
||||
var annotatedContext context.Context
|
||||
annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/memos.api.v2.MemoService/GetMemo", runtime.WithHTTPPathPattern("/api/v2/{name=memos/*}"))
|
||||
annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/memos.api.v1.MemoService/GetMemo", runtime.WithHTTPPathPattern("/api/v1/{name=memos/*}"))
|
||||
if err != nil {
|
||||
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||
return
|
||||
@ -1461,7 +1461,7 @@ func RegisterMemoServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux
|
||||
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
||||
var err error
|
||||
var annotatedContext context.Context
|
||||
annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/memos.api.v2.MemoService/UpdateMemo", runtime.WithHTTPPathPattern("/api/v2/{memo.name=memos/*}"))
|
||||
annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/memos.api.v1.MemoService/UpdateMemo", runtime.WithHTTPPathPattern("/api/v1/{memo.name=memos/*}"))
|
||||
if err != nil {
|
||||
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||
return
|
||||
@ -1483,7 +1483,7 @@ func RegisterMemoServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux
|
||||
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
||||
var err error
|
||||
var annotatedContext context.Context
|
||||
annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/memos.api.v2.MemoService/DeleteMemo", runtime.WithHTTPPathPattern("/api/v2/{name=memos/*}"))
|
||||
annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/memos.api.v1.MemoService/DeleteMemo", runtime.WithHTTPPathPattern("/api/v1/{name=memos/*}"))
|
||||
if err != nil {
|
||||
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||
return
|
||||
@ -1505,7 +1505,7 @@ func RegisterMemoServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux
|
||||
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
||||
var err error
|
||||
var annotatedContext context.Context
|
||||
annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/memos.api.v2.MemoService/ExportMemos", runtime.WithHTTPPathPattern("/api/v2/memos:export"))
|
||||
annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/memos.api.v1.MemoService/ExportMemos", runtime.WithHTTPPathPattern("/api/v1/memos:export"))
|
||||
if err != nil {
|
||||
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||
return
|
||||
@ -1527,7 +1527,7 @@ func RegisterMemoServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux
|
||||
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
||||
var err error
|
||||
var annotatedContext context.Context
|
||||
annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/memos.api.v2.MemoService/SetMemoResources", runtime.WithHTTPPathPattern("/api/v2/{name=memos/*}/resources"))
|
||||
annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/memos.api.v1.MemoService/SetMemoResources", runtime.WithHTTPPathPattern("/api/v1/{name=memos/*}/resources"))
|
||||
if err != nil {
|
||||
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||
return
|
||||
@ -1549,7 +1549,7 @@ func RegisterMemoServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux
|
||||
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
||||
var err error
|
||||
var annotatedContext context.Context
|
||||
annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/memos.api.v2.MemoService/ListMemoResources", runtime.WithHTTPPathPattern("/api/v2/{name=memos/*}/resources"))
|
||||
annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/memos.api.v1.MemoService/ListMemoResources", runtime.WithHTTPPathPattern("/api/v1/{name=memos/*}/resources"))
|
||||
if err != nil {
|
||||
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||
return
|
||||
@ -1571,7 +1571,7 @@ func RegisterMemoServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux
|
||||
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
||||
var err error
|
||||
var annotatedContext context.Context
|
||||
annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/memos.api.v2.MemoService/SetMemoRelations", runtime.WithHTTPPathPattern("/api/v2/{name=memos/*}/relations"))
|
||||
annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/memos.api.v1.MemoService/SetMemoRelations", runtime.WithHTTPPathPattern("/api/v1/{name=memos/*}/relations"))
|
||||
if err != nil {
|
||||
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||
return
|
||||
@ -1593,7 +1593,7 @@ func RegisterMemoServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux
|
||||
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
||||
var err error
|
||||
var annotatedContext context.Context
|
||||
annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/memos.api.v2.MemoService/ListMemoRelations", runtime.WithHTTPPathPattern("/api/v2/{name=memos/*}/relations"))
|
||||
annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/memos.api.v1.MemoService/ListMemoRelations", runtime.WithHTTPPathPattern("/api/v1/{name=memos/*}/relations"))
|
||||
if err != nil {
|
||||
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||
return
|
||||
@ -1615,7 +1615,7 @@ func RegisterMemoServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux
|
||||
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
||||
var err error
|
||||
var annotatedContext context.Context
|
||||
annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/memos.api.v2.MemoService/CreateMemoComment", runtime.WithHTTPPathPattern("/api/v2/{name=memos/*}/comments"))
|
||||
annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/memos.api.v1.MemoService/CreateMemoComment", runtime.WithHTTPPathPattern("/api/v1/{name=memos/*}/comments"))
|
||||
if err != nil {
|
||||
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||
return
|
||||
@ -1637,7 +1637,7 @@ func RegisterMemoServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux
|
||||
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
||||
var err error
|
||||
var annotatedContext context.Context
|
||||
annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/memos.api.v2.MemoService/ListMemoComments", runtime.WithHTTPPathPattern("/api/v2/{name=memos/*}/comments"))
|
||||
annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/memos.api.v1.MemoService/ListMemoComments", runtime.WithHTTPPathPattern("/api/v1/{name=memos/*}/comments"))
|
||||
if err != nil {
|
||||
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||
return
|
||||
@ -1659,7 +1659,7 @@ func RegisterMemoServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux
|
||||
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
||||
var err error
|
||||
var annotatedContext context.Context
|
||||
annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/memos.api.v2.MemoService/GetUserMemosStats", runtime.WithHTTPPathPattern("/api/v2/memos/stats"))
|
||||
annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/memos.api.v1.MemoService/GetUserMemosStats", runtime.WithHTTPPathPattern("/api/v1/memos/stats"))
|
||||
if err != nil {
|
||||
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||
return
|
||||
@ -1681,7 +1681,7 @@ func RegisterMemoServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux
|
||||
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
||||
var err error
|
||||
var annotatedContext context.Context
|
||||
annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/memos.api.v2.MemoService/ListMemoReactions", runtime.WithHTTPPathPattern("/api/v2/{name=memos/*}/reactions"))
|
||||
annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/memos.api.v1.MemoService/ListMemoReactions", runtime.WithHTTPPathPattern("/api/v1/{name=memos/*}/reactions"))
|
||||
if err != nil {
|
||||
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||
return
|
||||
@ -1703,7 +1703,7 @@ func RegisterMemoServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux
|
||||
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
||||
var err error
|
||||
var annotatedContext context.Context
|
||||
annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/memos.api.v2.MemoService/UpsertMemoReaction", runtime.WithHTTPPathPattern("/api/v2/{name=memos/*}/reactions"))
|
||||
annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/memos.api.v1.MemoService/UpsertMemoReaction", runtime.WithHTTPPathPattern("/api/v1/{name=memos/*}/reactions"))
|
||||
if err != nil {
|
||||
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||
return
|
||||
@ -1725,7 +1725,7 @@ func RegisterMemoServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux
|
||||
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
||||
var err error
|
||||
var annotatedContext context.Context
|
||||
annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/memos.api.v2.MemoService/DeleteMemoReaction", runtime.WithHTTPPathPattern("/api/v2/reactions/{reaction_id}"))
|
||||
annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/memos.api.v1.MemoService/DeleteMemoReaction", runtime.WithHTTPPathPattern("/api/v1/reactions/{reaction_id}"))
|
||||
if err != nil {
|
||||
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||
return
|
||||
@ -1745,39 +1745,39 @@ func RegisterMemoServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux
|
||||
}
|
||||
|
||||
var (
|
||||
pattern_MemoService_CreateMemo_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"api", "v2", "memos"}, ""))
|
||||
pattern_MemoService_CreateMemo_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"api", "v1", "memos"}, ""))
|
||||
|
||||
pattern_MemoService_ListMemos_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"api", "v2", "memos"}, ""))
|
||||
pattern_MemoService_ListMemos_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"api", "v1", "memos"}, ""))
|
||||
|
||||
pattern_MemoService_SearchMemos_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"api", "v2", "memos"}, "search"))
|
||||
pattern_MemoService_SearchMemos_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"api", "v1", "memos"}, "search"))
|
||||
|
||||
pattern_MemoService_GetMemo_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 2, 5, 3}, []string{"api", "v2", "memos", "name"}, ""))
|
||||
pattern_MemoService_GetMemo_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 2, 5, 3}, []string{"api", "v1", "memos", "name"}, ""))
|
||||
|
||||
pattern_MemoService_UpdateMemo_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 2, 5, 3}, []string{"api", "v2", "memos", "memo.name"}, ""))
|
||||
pattern_MemoService_UpdateMemo_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 2, 5, 3}, []string{"api", "v1", "memos", "memo.name"}, ""))
|
||||
|
||||
pattern_MemoService_DeleteMemo_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 2, 5, 3}, []string{"api", "v2", "memos", "name"}, ""))
|
||||
pattern_MemoService_DeleteMemo_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 2, 5, 3}, []string{"api", "v1", "memos", "name"}, ""))
|
||||
|
||||
pattern_MemoService_ExportMemos_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"api", "v2", "memos"}, "export"))
|
||||
pattern_MemoService_ExportMemos_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"api", "v1", "memos"}, "export"))
|
||||
|
||||
pattern_MemoService_SetMemoResources_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 2, 5, 3, 2, 4}, []string{"api", "v2", "memos", "name", "resources"}, ""))
|
||||
pattern_MemoService_SetMemoResources_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 2, 5, 3, 2, 4}, []string{"api", "v1", "memos", "name", "resources"}, ""))
|
||||
|
||||
pattern_MemoService_ListMemoResources_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 2, 5, 3, 2, 4}, []string{"api", "v2", "memos", "name", "resources"}, ""))
|
||||
pattern_MemoService_ListMemoResources_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 2, 5, 3, 2, 4}, []string{"api", "v1", "memos", "name", "resources"}, ""))
|
||||
|
||||
pattern_MemoService_SetMemoRelations_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 2, 5, 3, 2, 4}, []string{"api", "v2", "memos", "name", "relations"}, ""))
|
||||
pattern_MemoService_SetMemoRelations_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 2, 5, 3, 2, 4}, []string{"api", "v1", "memos", "name", "relations"}, ""))
|
||||
|
||||
pattern_MemoService_ListMemoRelations_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 2, 5, 3, 2, 4}, []string{"api", "v2", "memos", "name", "relations"}, ""))
|
||||
pattern_MemoService_ListMemoRelations_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 2, 5, 3, 2, 4}, []string{"api", "v1", "memos", "name", "relations"}, ""))
|
||||
|
||||
pattern_MemoService_CreateMemoComment_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 2, 5, 3, 2, 4}, []string{"api", "v2", "memos", "name", "comments"}, ""))
|
||||
pattern_MemoService_CreateMemoComment_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 2, 5, 3, 2, 4}, []string{"api", "v1", "memos", "name", "comments"}, ""))
|
||||
|
||||
pattern_MemoService_ListMemoComments_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 2, 5, 3, 2, 4}, []string{"api", "v2", "memos", "name", "comments"}, ""))
|
||||
pattern_MemoService_ListMemoComments_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 2, 5, 3, 2, 4}, []string{"api", "v1", "memos", "name", "comments"}, ""))
|
||||
|
||||
pattern_MemoService_GetUserMemosStats_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"api", "v2", "memos", "stats"}, ""))
|
||||
pattern_MemoService_GetUserMemosStats_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"api", "v1", "memos", "stats"}, ""))
|
||||
|
||||
pattern_MemoService_ListMemoReactions_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 2, 5, 3, 2, 4}, []string{"api", "v2", "memos", "name", "reactions"}, ""))
|
||||
pattern_MemoService_ListMemoReactions_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 2, 5, 3, 2, 4}, []string{"api", "v1", "memos", "name", "reactions"}, ""))
|
||||
|
||||
pattern_MemoService_UpsertMemoReaction_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 2, 5, 3, 2, 4}, []string{"api", "v2", "memos", "name", "reactions"}, ""))
|
||||
pattern_MemoService_UpsertMemoReaction_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 2, 5, 3, 2, 4}, []string{"api", "v1", "memos", "name", "reactions"}, ""))
|
||||
|
||||
pattern_MemoService_DeleteMemoReaction_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3}, []string{"api", "v2", "reactions", "reaction_id"}, ""))
|
||||
pattern_MemoService_DeleteMemoReaction_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3}, []string{"api", "v1", "reactions", "reaction_id"}, ""))
|
||||
)
|
||||
|
||||
var (
|
@ -2,9 +2,9 @@
|
||||
// versions:
|
||||
// - protoc-gen-go-grpc v1.3.0
|
||||
// - protoc (unknown)
|
||||
// source: api/v2/memo_service.proto
|
||||
// source: api/v1/memo_service.proto
|
||||
|
||||
package apiv2
|
||||
package apiv1
|
||||
|
||||
import (
|
||||
context "context"
|
||||
@ -20,23 +20,23 @@ import (
|
||||
const _ = grpc.SupportPackageIsVersion7
|
||||
|
||||
const (
|
||||
MemoService_CreateMemo_FullMethodName = "/memos.api.v2.MemoService/CreateMemo"
|
||||
MemoService_ListMemos_FullMethodName = "/memos.api.v2.MemoService/ListMemos"
|
||||
MemoService_SearchMemos_FullMethodName = "/memos.api.v2.MemoService/SearchMemos"
|
||||
MemoService_GetMemo_FullMethodName = "/memos.api.v2.MemoService/GetMemo"
|
||||
MemoService_UpdateMemo_FullMethodName = "/memos.api.v2.MemoService/UpdateMemo"
|
||||
MemoService_DeleteMemo_FullMethodName = "/memos.api.v2.MemoService/DeleteMemo"
|
||||
MemoService_ExportMemos_FullMethodName = "/memos.api.v2.MemoService/ExportMemos"
|
||||
MemoService_SetMemoResources_FullMethodName = "/memos.api.v2.MemoService/SetMemoResources"
|
||||
MemoService_ListMemoResources_FullMethodName = "/memos.api.v2.MemoService/ListMemoResources"
|
||||
MemoService_SetMemoRelations_FullMethodName = "/memos.api.v2.MemoService/SetMemoRelations"
|
||||
MemoService_ListMemoRelations_FullMethodName = "/memos.api.v2.MemoService/ListMemoRelations"
|
||||
MemoService_CreateMemoComment_FullMethodName = "/memos.api.v2.MemoService/CreateMemoComment"
|
||||
MemoService_ListMemoComments_FullMethodName = "/memos.api.v2.MemoService/ListMemoComments"
|
||||
MemoService_GetUserMemosStats_FullMethodName = "/memos.api.v2.MemoService/GetUserMemosStats"
|
||||
MemoService_ListMemoReactions_FullMethodName = "/memos.api.v2.MemoService/ListMemoReactions"
|
||||
MemoService_UpsertMemoReaction_FullMethodName = "/memos.api.v2.MemoService/UpsertMemoReaction"
|
||||
MemoService_DeleteMemoReaction_FullMethodName = "/memos.api.v2.MemoService/DeleteMemoReaction"
|
||||
MemoService_CreateMemo_FullMethodName = "/memos.api.v1.MemoService/CreateMemo"
|
||||
MemoService_ListMemos_FullMethodName = "/memos.api.v1.MemoService/ListMemos"
|
||||
MemoService_SearchMemos_FullMethodName = "/memos.api.v1.MemoService/SearchMemos"
|
||||
MemoService_GetMemo_FullMethodName = "/memos.api.v1.MemoService/GetMemo"
|
||||
MemoService_UpdateMemo_FullMethodName = "/memos.api.v1.MemoService/UpdateMemo"
|
||||
MemoService_DeleteMemo_FullMethodName = "/memos.api.v1.MemoService/DeleteMemo"
|
||||
MemoService_ExportMemos_FullMethodName = "/memos.api.v1.MemoService/ExportMemos"
|
||||
MemoService_SetMemoResources_FullMethodName = "/memos.api.v1.MemoService/SetMemoResources"
|
||||
MemoService_ListMemoResources_FullMethodName = "/memos.api.v1.MemoService/ListMemoResources"
|
||||
MemoService_SetMemoRelations_FullMethodName = "/memos.api.v1.MemoService/SetMemoRelations"
|
||||
MemoService_ListMemoRelations_FullMethodName = "/memos.api.v1.MemoService/ListMemoRelations"
|
||||
MemoService_CreateMemoComment_FullMethodName = "/memos.api.v1.MemoService/CreateMemoComment"
|
||||
MemoService_ListMemoComments_FullMethodName = "/memos.api.v1.MemoService/ListMemoComments"
|
||||
MemoService_GetUserMemosStats_FullMethodName = "/memos.api.v1.MemoService/GetUserMemosStats"
|
||||
MemoService_ListMemoReactions_FullMethodName = "/memos.api.v1.MemoService/ListMemoReactions"
|
||||
MemoService_UpsertMemoReaction_FullMethodName = "/memos.api.v1.MemoService/UpsertMemoReaction"
|
||||
MemoService_DeleteMemoReaction_FullMethodName = "/memos.api.v1.MemoService/DeleteMemoReaction"
|
||||
)
|
||||
|
||||
// MemoServiceClient is the client API for MemoService service.
|
||||
@ -659,7 +659,7 @@ func _MemoService_DeleteMemoReaction_Handler(srv interface{}, ctx context.Contex
|
||||
// It's only intended for direct use with grpc.RegisterService,
|
||||
// and not to be introspected or modified (even as a copy)
|
||||
var MemoService_ServiceDesc = grpc.ServiceDesc{
|
||||
ServiceName: "memos.api.v2.MemoService",
|
||||
ServiceName: "memos.api.v1.MemoService",
|
||||
HandlerType: (*MemoServiceServer)(nil),
|
||||
Methods: []grpc.MethodDesc{
|
||||
{
|
||||
@ -732,5 +732,5 @@ var MemoService_ServiceDesc = grpc.ServiceDesc{
|
||||
},
|
||||
},
|
||||
Streams: []grpc.StreamDesc{},
|
||||
Metadata: "api/v2/memo_service.proto",
|
||||
Metadata: "api/v1/memo_service.proto",
|
||||
}
|
@ -2,9 +2,9 @@
|
||||
// versions:
|
||||
// protoc-gen-go v1.33.0
|
||||
// protoc (unknown)
|
||||
// source: api/v2/reaction_service.proto
|
||||
// source: api/v1/reaction_service.proto
|
||||
|
||||
package apiv2
|
||||
package apiv1
|
||||
|
||||
import (
|
||||
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
|
||||
@ -83,11 +83,11 @@ func (x Reaction_Type) String() string {
|
||||
}
|
||||
|
||||
func (Reaction_Type) Descriptor() protoreflect.EnumDescriptor {
|
||||
return file_api_v2_reaction_service_proto_enumTypes[0].Descriptor()
|
||||
return file_api_v1_reaction_service_proto_enumTypes[0].Descriptor()
|
||||
}
|
||||
|
||||
func (Reaction_Type) Type() protoreflect.EnumType {
|
||||
return &file_api_v2_reaction_service_proto_enumTypes[0]
|
||||
return &file_api_v1_reaction_service_proto_enumTypes[0]
|
||||
}
|
||||
|
||||
func (x Reaction_Type) Number() protoreflect.EnumNumber {
|
||||
@ -96,7 +96,7 @@ func (x Reaction_Type) Number() protoreflect.EnumNumber {
|
||||
|
||||
// Deprecated: Use Reaction_Type.Descriptor instead.
|
||||
func (Reaction_Type) EnumDescriptor() ([]byte, []int) {
|
||||
return file_api_v2_reaction_service_proto_rawDescGZIP(), []int{0, 0}
|
||||
return file_api_v1_reaction_service_proto_rawDescGZIP(), []int{0, 0}
|
||||
}
|
||||
|
||||
type Reaction struct {
|
||||
@ -109,13 +109,13 @@ type Reaction struct {
|
||||
// Format: users/{id}
|
||||
Creator string `protobuf:"bytes,2,opt,name=creator,proto3" json:"creator,omitempty"`
|
||||
ContentId string `protobuf:"bytes,3,opt,name=content_id,json=contentId,proto3" json:"content_id,omitempty"`
|
||||
ReactionType Reaction_Type `protobuf:"varint,4,opt,name=reaction_type,json=reactionType,proto3,enum=memos.api.v2.Reaction_Type" json:"reaction_type,omitempty"`
|
||||
ReactionType Reaction_Type `protobuf:"varint,4,opt,name=reaction_type,json=reactionType,proto3,enum=memos.api.v1.Reaction_Type" json:"reaction_type,omitempty"`
|
||||
}
|
||||
|
||||
func (x *Reaction) Reset() {
|
||||
*x = Reaction{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_api_v2_reaction_service_proto_msgTypes[0]
|
||||
mi := &file_api_v1_reaction_service_proto_msgTypes[0]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
@ -128,7 +128,7 @@ func (x *Reaction) String() string {
|
||||
func (*Reaction) ProtoMessage() {}
|
||||
|
||||
func (x *Reaction) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_api_v2_reaction_service_proto_msgTypes[0]
|
||||
mi := &file_api_v1_reaction_service_proto_msgTypes[0]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
@ -141,7 +141,7 @@ func (x *Reaction) ProtoReflect() protoreflect.Message {
|
||||
|
||||
// Deprecated: Use Reaction.ProtoReflect.Descriptor instead.
|
||||
func (*Reaction) Descriptor() ([]byte, []int) {
|
||||
return file_api_v2_reaction_service_proto_rawDescGZIP(), []int{0}
|
||||
return file_api_v1_reaction_service_proto_rawDescGZIP(), []int{0}
|
||||
}
|
||||
|
||||
func (x *Reaction) GetId() int32 {
|
||||
@ -172,12 +172,12 @@ func (x *Reaction) GetReactionType() Reaction_Type {
|
||||
return Reaction_TYPE_UNSPECIFIED
|
||||
}
|
||||
|
||||
var File_api_v2_reaction_service_proto protoreflect.FileDescriptor
|
||||
var File_api_v1_reaction_service_proto protoreflect.FileDescriptor
|
||||
|
||||
var file_api_v2_reaction_service_proto_rawDesc = []byte{
|
||||
0x0a, 0x1d, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x32, 0x2f, 0x72, 0x65, 0x61, 0x63, 0x74, 0x69, 0x6f,
|
||||
var file_api_v1_reaction_service_proto_rawDesc = []byte{
|
||||
0x0a, 0x1d, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, 0x2f, 0x72, 0x65, 0x61, 0x63, 0x74, 0x69, 0x6f,
|
||||
0x6e, 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, 0x22, 0xe1, 0x02,
|
||||
0x0c, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x22, 0xe1, 0x02,
|
||||
0x0a, 0x08, 0x52, 0x65, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64,
|
||||
0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x02, 0x69, 0x64, 0x12, 0x18, 0x0a, 0x07, 0x63, 0x72,
|
||||
0x65, 0x61, 0x74, 0x6f, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x63, 0x72, 0x65,
|
||||
@ -185,7 +185,7 @@ var file_api_v2_reaction_service_proto_rawDesc = []byte{
|
||||
0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e,
|
||||
0x74, 0x49, 0x64, 0x12, 0x40, 0x0a, 0x0d, 0x72, 0x65, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f,
|
||||
0x74, 0x79, 0x70, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1b, 0x2e, 0x6d, 0x65, 0x6d,
|
||||
0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x52, 0x65, 0x61, 0x63, 0x74, 0x69,
|
||||
0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x61, 0x63, 0x74, 0x69,
|
||||
0x6f, 0x6e, 0x2e, 0x54, 0x79, 0x70, 0x65, 0x52, 0x0c, 0x72, 0x65, 0x61, 0x63, 0x74, 0x69, 0x6f,
|
||||
0x6e, 0x54, 0x79, 0x70, 0x65, 0x22, 0xc9, 0x01, 0x0a, 0x04, 0x54, 0x79, 0x70, 0x65, 0x12, 0x14,
|
||||
0x0a, 0x10, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49,
|
||||
@ -201,39 +201,39 @@ var file_api_v2_reaction_service_proto_rawDesc = []byte{
|
||||
0x0a, 0x0a, 0x43, 0x4c, 0x4f, 0x57, 0x4e, 0x5f, 0x46, 0x41, 0x43, 0x45, 0x10, 0x0b, 0x12, 0x11,
|
||||
0x0a, 0x0d, 0x51, 0x55, 0x45, 0x53, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x4d, 0x41, 0x52, 0x4b, 0x10,
|
||||
0x0c, 0x42, 0xac, 0x01, 0x0a, 0x10, 0x63, 0x6f, 0x6d, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e,
|
||||
0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x42, 0x14, 0x52, 0x65, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e,
|
||||
0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x42, 0x14, 0x52, 0x65, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e,
|
||||
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,
|
||||
0x67, 0x65, 0x6e, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, 0x3b, 0x61, 0x70, 0x69, 0x76, 0x31,
|
||||
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,
|
||||
0x70, 0x69, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x0c, 0x4d, 0x65, 0x6d, 0x6f, 0x73, 0x5c, 0x41, 0x70,
|
||||
0x69, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x18, 0x4d, 0x65, 0x6d, 0x6f, 0x73, 0x5c, 0x41, 0x70, 0x69,
|
||||
0x5c, 0x56, 0x31, 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, 0x31,
|
||||
0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
|
||||
}
|
||||
|
||||
var (
|
||||
file_api_v2_reaction_service_proto_rawDescOnce sync.Once
|
||||
file_api_v2_reaction_service_proto_rawDescData = file_api_v2_reaction_service_proto_rawDesc
|
||||
file_api_v1_reaction_service_proto_rawDescOnce sync.Once
|
||||
file_api_v1_reaction_service_proto_rawDescData = file_api_v1_reaction_service_proto_rawDesc
|
||||
)
|
||||
|
||||
func file_api_v2_reaction_service_proto_rawDescGZIP() []byte {
|
||||
file_api_v2_reaction_service_proto_rawDescOnce.Do(func() {
|
||||
file_api_v2_reaction_service_proto_rawDescData = protoimpl.X.CompressGZIP(file_api_v2_reaction_service_proto_rawDescData)
|
||||
func file_api_v1_reaction_service_proto_rawDescGZIP() []byte {
|
||||
file_api_v1_reaction_service_proto_rawDescOnce.Do(func() {
|
||||
file_api_v1_reaction_service_proto_rawDescData = protoimpl.X.CompressGZIP(file_api_v1_reaction_service_proto_rawDescData)
|
||||
})
|
||||
return file_api_v2_reaction_service_proto_rawDescData
|
||||
return file_api_v1_reaction_service_proto_rawDescData
|
||||
}
|
||||
|
||||
var file_api_v2_reaction_service_proto_enumTypes = make([]protoimpl.EnumInfo, 1)
|
||||
var file_api_v2_reaction_service_proto_msgTypes = make([]protoimpl.MessageInfo, 1)
|
||||
var file_api_v2_reaction_service_proto_goTypes = []interface{}{
|
||||
(Reaction_Type)(0), // 0: memos.api.v2.Reaction.Type
|
||||
(*Reaction)(nil), // 1: memos.api.v2.Reaction
|
||||
var file_api_v1_reaction_service_proto_enumTypes = make([]protoimpl.EnumInfo, 1)
|
||||
var file_api_v1_reaction_service_proto_msgTypes = make([]protoimpl.MessageInfo, 1)
|
||||
var file_api_v1_reaction_service_proto_goTypes = []interface{}{
|
||||
(Reaction_Type)(0), // 0: memos.api.v1.Reaction.Type
|
||||
(*Reaction)(nil), // 1: memos.api.v1.Reaction
|
||||
}
|
||||
var file_api_v2_reaction_service_proto_depIdxs = []int32{
|
||||
0, // 0: memos.api.v2.Reaction.reaction_type:type_name -> memos.api.v2.Reaction.Type
|
||||
var file_api_v1_reaction_service_proto_depIdxs = []int32{
|
||||
0, // 0: memos.api.v1.Reaction.reaction_type:type_name -> memos.api.v1.Reaction.Type
|
||||
1, // [1:1] is the sub-list for method output_type
|
||||
1, // [1:1] is the sub-list for method input_type
|
||||
1, // [1:1] is the sub-list for extension type_name
|
||||
@ -241,13 +241,13 @@ var file_api_v2_reaction_service_proto_depIdxs = []int32{
|
||||
0, // [0:1] is the sub-list for field type_name
|
||||
}
|
||||
|
||||
func init() { file_api_v2_reaction_service_proto_init() }
|
||||
func file_api_v2_reaction_service_proto_init() {
|
||||
if File_api_v2_reaction_service_proto != nil {
|
||||
func init() { file_api_v1_reaction_service_proto_init() }
|
||||
func file_api_v1_reaction_service_proto_init() {
|
||||
if File_api_v1_reaction_service_proto != nil {
|
||||
return
|
||||
}
|
||||
if !protoimpl.UnsafeEnabled {
|
||||
file_api_v2_reaction_service_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
|
||||
file_api_v1_reaction_service_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*Reaction); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
@ -264,19 +264,19 @@ func file_api_v2_reaction_service_proto_init() {
|
||||
out := protoimpl.TypeBuilder{
|
||||
File: protoimpl.DescBuilder{
|
||||
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
|
||||
RawDescriptor: file_api_v2_reaction_service_proto_rawDesc,
|
||||
RawDescriptor: file_api_v1_reaction_service_proto_rawDesc,
|
||||
NumEnums: 1,
|
||||
NumMessages: 1,
|
||||
NumExtensions: 0,
|
||||
NumServices: 0,
|
||||
},
|
||||
GoTypes: file_api_v2_reaction_service_proto_goTypes,
|
||||
DependencyIndexes: file_api_v2_reaction_service_proto_depIdxs,
|
||||
EnumInfos: file_api_v2_reaction_service_proto_enumTypes,
|
||||
MessageInfos: file_api_v2_reaction_service_proto_msgTypes,
|
||||
GoTypes: file_api_v1_reaction_service_proto_goTypes,
|
||||
DependencyIndexes: file_api_v1_reaction_service_proto_depIdxs,
|
||||
EnumInfos: file_api_v1_reaction_service_proto_enumTypes,
|
||||
MessageInfos: file_api_v1_reaction_service_proto_msgTypes,
|
||||
}.Build()
|
||||
File_api_v2_reaction_service_proto = out.File
|
||||
file_api_v2_reaction_service_proto_rawDesc = nil
|
||||
file_api_v2_reaction_service_proto_goTypes = nil
|
||||
file_api_v2_reaction_service_proto_depIdxs = nil
|
||||
File_api_v1_reaction_service_proto = out.File
|
||||
file_api_v1_reaction_service_proto_rawDesc = nil
|
||||
file_api_v1_reaction_service_proto_goTypes = nil
|
||||
file_api_v1_reaction_service_proto_depIdxs = nil
|
||||
}
|
@ -2,9 +2,9 @@
|
||||
// versions:
|
||||
// protoc-gen-go v1.33.0
|
||||
// protoc (unknown)
|
||||
// source: api/v2/resource_service.proto
|
||||
// source: api/v1/resource_service.proto
|
||||
|
||||
package apiv2
|
||||
package apiv1
|
||||
|
||||
import (
|
||||
_ "google.golang.org/genproto/googleapis/api/annotations"
|
||||
@ -49,7 +49,7 @@ type Resource struct {
|
||||
func (x *Resource) Reset() {
|
||||
*x = Resource{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_api_v2_resource_service_proto_msgTypes[0]
|
||||
mi := &file_api_v1_resource_service_proto_msgTypes[0]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
@ -62,7 +62,7 @@ func (x *Resource) String() string {
|
||||
func (*Resource) ProtoMessage() {}
|
||||
|
||||
func (x *Resource) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_api_v2_resource_service_proto_msgTypes[0]
|
||||
mi := &file_api_v1_resource_service_proto_msgTypes[0]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
@ -75,7 +75,7 @@ func (x *Resource) ProtoReflect() protoreflect.Message {
|
||||
|
||||
// Deprecated: Use Resource.ProtoReflect.Descriptor instead.
|
||||
func (*Resource) Descriptor() ([]byte, []int) {
|
||||
return file_api_v2_resource_service_proto_rawDescGZIP(), []int{0}
|
||||
return file_api_v1_resource_service_proto_rawDescGZIP(), []int{0}
|
||||
}
|
||||
|
||||
func (x *Resource) GetName() string {
|
||||
@ -152,7 +152,7 @@ type CreateResourceRequest struct {
|
||||
func (x *CreateResourceRequest) Reset() {
|
||||
*x = CreateResourceRequest{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_api_v2_resource_service_proto_msgTypes[1]
|
||||
mi := &file_api_v1_resource_service_proto_msgTypes[1]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
@ -165,7 +165,7 @@ func (x *CreateResourceRequest) String() string {
|
||||
func (*CreateResourceRequest) ProtoMessage() {}
|
||||
|
||||
func (x *CreateResourceRequest) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_api_v2_resource_service_proto_msgTypes[1]
|
||||
mi := &file_api_v1_resource_service_proto_msgTypes[1]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
@ -178,7 +178,7 @@ func (x *CreateResourceRequest) ProtoReflect() protoreflect.Message {
|
||||
|
||||
// Deprecated: Use CreateResourceRequest.ProtoReflect.Descriptor instead.
|
||||
func (*CreateResourceRequest) Descriptor() ([]byte, []int) {
|
||||
return file_api_v2_resource_service_proto_rawDescGZIP(), []int{1}
|
||||
return file_api_v1_resource_service_proto_rawDescGZIP(), []int{1}
|
||||
}
|
||||
|
||||
func (x *CreateResourceRequest) GetResource() *Resource {
|
||||
@ -197,7 +197,7 @@ type ListResourcesRequest struct {
|
||||
func (x *ListResourcesRequest) Reset() {
|
||||
*x = ListResourcesRequest{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_api_v2_resource_service_proto_msgTypes[2]
|
||||
mi := &file_api_v1_resource_service_proto_msgTypes[2]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
@ -210,7 +210,7 @@ func (x *ListResourcesRequest) String() string {
|
||||
func (*ListResourcesRequest) ProtoMessage() {}
|
||||
|
||||
func (x *ListResourcesRequest) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_api_v2_resource_service_proto_msgTypes[2]
|
||||
mi := &file_api_v1_resource_service_proto_msgTypes[2]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
@ -223,7 +223,7 @@ func (x *ListResourcesRequest) ProtoReflect() protoreflect.Message {
|
||||
|
||||
// Deprecated: Use ListResourcesRequest.ProtoReflect.Descriptor instead.
|
||||
func (*ListResourcesRequest) Descriptor() ([]byte, []int) {
|
||||
return file_api_v2_resource_service_proto_rawDescGZIP(), []int{2}
|
||||
return file_api_v1_resource_service_proto_rawDescGZIP(), []int{2}
|
||||
}
|
||||
|
||||
type ListResourcesResponse struct {
|
||||
@ -237,7 +237,7 @@ type ListResourcesResponse struct {
|
||||
func (x *ListResourcesResponse) Reset() {
|
||||
*x = ListResourcesResponse{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_api_v2_resource_service_proto_msgTypes[3]
|
||||
mi := &file_api_v1_resource_service_proto_msgTypes[3]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
@ -250,7 +250,7 @@ func (x *ListResourcesResponse) String() string {
|
||||
func (*ListResourcesResponse) ProtoMessage() {}
|
||||
|
||||
func (x *ListResourcesResponse) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_api_v2_resource_service_proto_msgTypes[3]
|
||||
mi := &file_api_v1_resource_service_proto_msgTypes[3]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
@ -263,7 +263,7 @@ func (x *ListResourcesResponse) ProtoReflect() protoreflect.Message {
|
||||
|
||||
// Deprecated: Use ListResourcesResponse.ProtoReflect.Descriptor instead.
|
||||
func (*ListResourcesResponse) Descriptor() ([]byte, []int) {
|
||||
return file_api_v2_resource_service_proto_rawDescGZIP(), []int{3}
|
||||
return file_api_v1_resource_service_proto_rawDescGZIP(), []int{3}
|
||||
}
|
||||
|
||||
func (x *ListResourcesResponse) GetResources() []*Resource {
|
||||
@ -284,7 +284,7 @@ type SearchResourcesRequest struct {
|
||||
func (x *SearchResourcesRequest) Reset() {
|
||||
*x = SearchResourcesRequest{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_api_v2_resource_service_proto_msgTypes[4]
|
||||
mi := &file_api_v1_resource_service_proto_msgTypes[4]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
@ -297,7 +297,7 @@ func (x *SearchResourcesRequest) String() string {
|
||||
func (*SearchResourcesRequest) ProtoMessage() {}
|
||||
|
||||
func (x *SearchResourcesRequest) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_api_v2_resource_service_proto_msgTypes[4]
|
||||
mi := &file_api_v1_resource_service_proto_msgTypes[4]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
@ -310,7 +310,7 @@ func (x *SearchResourcesRequest) ProtoReflect() protoreflect.Message {
|
||||
|
||||
// Deprecated: Use SearchResourcesRequest.ProtoReflect.Descriptor instead.
|
||||
func (*SearchResourcesRequest) Descriptor() ([]byte, []int) {
|
||||
return file_api_v2_resource_service_proto_rawDescGZIP(), []int{4}
|
||||
return file_api_v1_resource_service_proto_rawDescGZIP(), []int{4}
|
||||
}
|
||||
|
||||
func (x *SearchResourcesRequest) GetFilter() string {
|
||||
@ -331,7 +331,7 @@ type SearchResourcesResponse struct {
|
||||
func (x *SearchResourcesResponse) Reset() {
|
||||
*x = SearchResourcesResponse{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_api_v2_resource_service_proto_msgTypes[5]
|
||||
mi := &file_api_v1_resource_service_proto_msgTypes[5]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
@ -344,7 +344,7 @@ func (x *SearchResourcesResponse) String() string {
|
||||
func (*SearchResourcesResponse) ProtoMessage() {}
|
||||
|
||||
func (x *SearchResourcesResponse) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_api_v2_resource_service_proto_msgTypes[5]
|
||||
mi := &file_api_v1_resource_service_proto_msgTypes[5]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
@ -357,7 +357,7 @@ func (x *SearchResourcesResponse) ProtoReflect() protoreflect.Message {
|
||||
|
||||
// Deprecated: Use SearchResourcesResponse.ProtoReflect.Descriptor instead.
|
||||
func (*SearchResourcesResponse) Descriptor() ([]byte, []int) {
|
||||
return file_api_v2_resource_service_proto_rawDescGZIP(), []int{5}
|
||||
return file_api_v1_resource_service_proto_rawDescGZIP(), []int{5}
|
||||
}
|
||||
|
||||
func (x *SearchResourcesResponse) GetResources() []*Resource {
|
||||
@ -381,7 +381,7 @@ type GetResourceRequest struct {
|
||||
func (x *GetResourceRequest) Reset() {
|
||||
*x = GetResourceRequest{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_api_v2_resource_service_proto_msgTypes[6]
|
||||
mi := &file_api_v1_resource_service_proto_msgTypes[6]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
@ -394,7 +394,7 @@ func (x *GetResourceRequest) String() string {
|
||||
func (*GetResourceRequest) ProtoMessage() {}
|
||||
|
||||
func (x *GetResourceRequest) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_api_v2_resource_service_proto_msgTypes[6]
|
||||
mi := &file_api_v1_resource_service_proto_msgTypes[6]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
@ -407,7 +407,7 @@ func (x *GetResourceRequest) ProtoReflect() protoreflect.Message {
|
||||
|
||||
// Deprecated: Use GetResourceRequest.ProtoReflect.Descriptor instead.
|
||||
func (*GetResourceRequest) Descriptor() ([]byte, []int) {
|
||||
return file_api_v2_resource_service_proto_rawDescGZIP(), []int{6}
|
||||
return file_api_v1_resource_service_proto_rawDescGZIP(), []int{6}
|
||||
}
|
||||
|
||||
func (x *GetResourceRequest) GetName() string {
|
||||
@ -429,7 +429,7 @@ type UpdateResourceRequest struct {
|
||||
func (x *UpdateResourceRequest) Reset() {
|
||||
*x = UpdateResourceRequest{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_api_v2_resource_service_proto_msgTypes[7]
|
||||
mi := &file_api_v1_resource_service_proto_msgTypes[7]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
@ -442,7 +442,7 @@ func (x *UpdateResourceRequest) String() string {
|
||||
func (*UpdateResourceRequest) ProtoMessage() {}
|
||||
|
||||
func (x *UpdateResourceRequest) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_api_v2_resource_service_proto_msgTypes[7]
|
||||
mi := &file_api_v1_resource_service_proto_msgTypes[7]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
@ -455,7 +455,7 @@ func (x *UpdateResourceRequest) ProtoReflect() protoreflect.Message {
|
||||
|
||||
// Deprecated: Use UpdateResourceRequest.ProtoReflect.Descriptor instead.
|
||||
func (*UpdateResourceRequest) Descriptor() ([]byte, []int) {
|
||||
return file_api_v2_resource_service_proto_rawDescGZIP(), []int{7}
|
||||
return file_api_v1_resource_service_proto_rawDescGZIP(), []int{7}
|
||||
}
|
||||
|
||||
func (x *UpdateResourceRequest) GetResource() *Resource {
|
||||
@ -486,7 +486,7 @@ type DeleteResourceRequest struct {
|
||||
func (x *DeleteResourceRequest) Reset() {
|
||||
*x = DeleteResourceRequest{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_api_v2_resource_service_proto_msgTypes[8]
|
||||
mi := &file_api_v1_resource_service_proto_msgTypes[8]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
@ -499,7 +499,7 @@ func (x *DeleteResourceRequest) String() string {
|
||||
func (*DeleteResourceRequest) ProtoMessage() {}
|
||||
|
||||
func (x *DeleteResourceRequest) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_api_v2_resource_service_proto_msgTypes[8]
|
||||
mi := &file_api_v1_resource_service_proto_msgTypes[8]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
@ -512,7 +512,7 @@ func (x *DeleteResourceRequest) ProtoReflect() protoreflect.Message {
|
||||
|
||||
// Deprecated: Use DeleteResourceRequest.ProtoReflect.Descriptor instead.
|
||||
func (*DeleteResourceRequest) Descriptor() ([]byte, []int) {
|
||||
return file_api_v2_resource_service_proto_rawDescGZIP(), []int{8}
|
||||
return file_api_v1_resource_service_proto_rawDescGZIP(), []int{8}
|
||||
}
|
||||
|
||||
func (x *DeleteResourceRequest) GetName() string {
|
||||
@ -522,12 +522,12 @@ func (x *DeleteResourceRequest) GetName() string {
|
||||
return ""
|
||||
}
|
||||
|
||||
var File_api_v2_resource_service_proto protoreflect.FileDescriptor
|
||||
var File_api_v1_resource_service_proto protoreflect.FileDescriptor
|
||||
|
||||
var file_api_v2_resource_service_proto_rawDesc = []byte{
|
||||
0x0a, 0x1d, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x32, 0x2f, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63,
|
||||
var file_api_v1_resource_service_proto_rawDesc = []byte{
|
||||
0x0a, 0x1d, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, 0x2f, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63,
|
||||
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,
|
||||
0x0c, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 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,
|
||||
@ -560,14 +560,14 @@ var file_api_v2_resource_service_proto_rawDesc = []byte{
|
||||
0x6d, 0x65, 0x6d, 0x6f, 0x22, 0x4b, 0x0a, 0x15, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x52, 0x65,
|
||||
0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x32, 0x0a,
|
||||
0x08, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32,
|
||||
0x16, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x52,
|
||||
0x16, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x52,
|
||||
0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x08, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63,
|
||||
0x65, 0x22, 0x16, 0x0a, 0x14, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63,
|
||||
0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x4d, 0x0a, 0x15, 0x4c, 0x69, 0x73,
|
||||
0x74, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e,
|
||||
0x73, 0x65, 0x12, 0x34, 0x0a, 0x09, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x18,
|
||||
0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70,
|
||||
0x69, 0x2e, 0x76, 0x32, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x09, 0x72,
|
||||
0x69, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x09, 0x72,
|
||||
0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x22, 0x30, 0x0a, 0x16, 0x53, 0x65, 0x61, 0x72,
|
||||
0x63, 0x68, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65,
|
||||
0x73, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01,
|
||||
@ -575,14 +575,14 @@ var file_api_v2_resource_service_proto_rawDesc = []byte{
|
||||
0x61, 0x72, 0x63, 0x68, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x52, 0x65, 0x73,
|
||||
0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x34, 0x0a, 0x09, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63,
|
||||
0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73,
|
||||
0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65,
|
||||
0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65,
|
||||
0x52, 0x09, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x22, 0x28, 0x0a, 0x12, 0x47,
|
||||
0x65, 0x74, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 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, 0x88, 0x01, 0x0a, 0x15, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65,
|
||||
0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12,
|
||||
0x32, 0x0a, 0x08, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28,
|
||||
0x0b, 0x32, 0x16, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32,
|
||||
0x0b, 0x32, 0x16, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31,
|
||||
0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x08, 0x72, 0x65, 0x73, 0x6f, 0x75,
|
||||
0x72, 0x63, 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,
|
||||
@ -594,111 +594,111 @@ var file_api_v2_resource_service_proto_rawDesc = []byte{
|
||||
0x0a, 0x0f, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63,
|
||||
0x65, 0x12, 0x72, 0x0a, 0x0e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x6f, 0x75,
|
||||
0x72, 0x63, 0x65, 0x12, 0x23, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e,
|
||||
0x76, 0x32, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63,
|
||||
0x76, 0x31, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63,
|
||||
0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73,
|
||||
0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65,
|
||||
0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65,
|
||||
0x22, 0x23, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1d, 0x3a, 0x08, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72,
|
||||
0x63, 0x65, 0x22, 0x11, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x32, 0x2f, 0x72, 0x65, 0x73, 0x6f,
|
||||
0x63, 0x65, 0x22, 0x11, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, 0x2f, 0x72, 0x65, 0x73, 0x6f,
|
||||
0x75, 0x72, 0x63, 0x65, 0x73, 0x12, 0x73, 0x0a, 0x0d, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x73,
|
||||
0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x12, 0x22, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61,
|
||||
0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72,
|
||||
0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72,
|
||||
0x63, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x23, 0x2e, 0x6d, 0x65, 0x6d,
|
||||
0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65,
|
||||
0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65,
|
||||
0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22,
|
||||
0x19, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x13, 0x12, 0x11, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x32,
|
||||
0x19, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x13, 0x12, 0x11, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31,
|
||||
0x2f, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x12, 0x80, 0x01, 0x0a, 0x0f, 0x53,
|
||||
0x65, 0x61, 0x72, 0x63, 0x68, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x12, 0x24,
|
||||
0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x53, 0x65,
|
||||
0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x65,
|
||||
0x61, 0x72, 0x63, 0x68, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x52, 0x65, 0x71,
|
||||
0x75, 0x65, 0x73, 0x74, 0x1a, 0x25, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69,
|
||||
0x2e, 0x76, 0x32, 0x2e, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72,
|
||||
0x2e, 0x76, 0x31, 0x2e, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72,
|
||||
0x63, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x20, 0x82, 0xd3, 0xe4,
|
||||
0x93, 0x02, 0x1a, 0x12, 0x18, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x32, 0x2f, 0x72, 0x65, 0x73,
|
||||
0x93, 0x02, 0x1a, 0x12, 0x18, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, 0x2f, 0x72, 0x65, 0x73,
|
||||
0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x3a, 0x73, 0x65, 0x61, 0x72, 0x63, 0x68, 0x12, 0x72, 0x0a,
|
||||
0x0b, 0x47, 0x65, 0x74, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x20, 0x2e, 0x6d,
|
||||
0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x47, 0x65, 0x74, 0x52,
|
||||
0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x52,
|
||||
0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16,
|
||||
0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x52, 0x65,
|
||||
0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65,
|
||||
0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x22, 0x29, 0xda, 0x41, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x82,
|
||||
0xd3, 0xe4, 0x93, 0x02, 0x1c, 0x12, 0x1a, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x32, 0x2f, 0x7b,
|
||||
0xd3, 0xe4, 0x93, 0x02, 0x1c, 0x12, 0x1a, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, 0x2f, 0x7b,
|
||||
0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x2f, 0x2a,
|
||||
0x7d, 0x12, 0x9b, 0x01, 0x0a, 0x0e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x6f,
|
||||
0x75, 0x72, 0x63, 0x65, 0x12, 0x23, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69,
|
||||
0x2e, 0x76, 0x32, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72,
|
||||
0x2e, 0x76, 0x31, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72,
|
||||
0x63, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x6d, 0x65, 0x6d, 0x6f,
|
||||
0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63,
|
||||
0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63,
|
||||
0x65, 0x22, 0x4c, 0xda, 0x41, 0x14, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x2c, 0x75,
|
||||
0x70, 0x64, 0x61, 0x74, 0x65, 0x5f, 0x6d, 0x61, 0x73, 0x6b, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x2f,
|
||||
0x3a, 0x08, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x32, 0x23, 0x2f, 0x61, 0x70, 0x69,
|
||||
0x2f, 0x76, 0x32, 0x2f, 0x7b, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x2e, 0x6e, 0x61,
|
||||
0x2f, 0x76, 0x31, 0x2f, 0x7b, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x2e, 0x6e, 0x61,
|
||||
0x6d, 0x65, 0x3d, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x2f, 0x2a, 0x7d, 0x12,
|
||||
0x78, 0x0a, 0x0e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63,
|
||||
0x65, 0x12, 0x23, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32,
|
||||
0x65, 0x12, 0x23, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31,
|
||||
0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52,
|
||||
0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e,
|
||||
0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x29,
|
||||
0xda, 0x41, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1c, 0x2a, 0x1a, 0x2f,
|
||||
0x61, 0x70, 0x69, 0x2f, 0x76, 0x32, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x72, 0x65, 0x73,
|
||||
0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x72, 0x65, 0x73,
|
||||
0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x2f, 0x2a, 0x7d, 0x42, 0xac, 0x01, 0x0a, 0x10, 0x63, 0x6f,
|
||||
0x6d, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x42, 0x14,
|
||||
0x6d, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x42, 0x14,
|
||||
0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 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,
|
||||
0x76, 0x31, 0x3b, 0x61, 0x70, 0x69, 0x76, 0x31, 0xa2, 0x02, 0x03, 0x4d, 0x41, 0x58, 0xaa, 0x02,
|
||||
0x0c, 0x4d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x41, 0x70, 0x69, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x0c,
|
||||
0x4d, 0x65, 0x6d, 0x6f, 0x73, 0x5c, 0x41, 0x70, 0x69, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x18, 0x4d,
|
||||
0x65, 0x6d, 0x6f, 0x73, 0x5c, 0x41, 0x70, 0x69, 0x5c, 0x56, 0x31, 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,
|
||||
0x3a, 0x41, 0x70, 0x69, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
|
||||
}
|
||||
|
||||
var (
|
||||
file_api_v2_resource_service_proto_rawDescOnce sync.Once
|
||||
file_api_v2_resource_service_proto_rawDescData = file_api_v2_resource_service_proto_rawDesc
|
||||
file_api_v1_resource_service_proto_rawDescOnce sync.Once
|
||||
file_api_v1_resource_service_proto_rawDescData = file_api_v1_resource_service_proto_rawDesc
|
||||
)
|
||||
|
||||
func file_api_v2_resource_service_proto_rawDescGZIP() []byte {
|
||||
file_api_v2_resource_service_proto_rawDescOnce.Do(func() {
|
||||
file_api_v2_resource_service_proto_rawDescData = protoimpl.X.CompressGZIP(file_api_v2_resource_service_proto_rawDescData)
|
||||
func file_api_v1_resource_service_proto_rawDescGZIP() []byte {
|
||||
file_api_v1_resource_service_proto_rawDescOnce.Do(func() {
|
||||
file_api_v1_resource_service_proto_rawDescData = protoimpl.X.CompressGZIP(file_api_v1_resource_service_proto_rawDescData)
|
||||
})
|
||||
return file_api_v2_resource_service_proto_rawDescData
|
||||
return file_api_v1_resource_service_proto_rawDescData
|
||||
}
|
||||
|
||||
var file_api_v2_resource_service_proto_msgTypes = make([]protoimpl.MessageInfo, 9)
|
||||
var file_api_v2_resource_service_proto_goTypes = []interface{}{
|
||||
(*Resource)(nil), // 0: memos.api.v2.Resource
|
||||
(*CreateResourceRequest)(nil), // 1: memos.api.v2.CreateResourceRequest
|
||||
(*ListResourcesRequest)(nil), // 2: memos.api.v2.ListResourcesRequest
|
||||
(*ListResourcesResponse)(nil), // 3: memos.api.v2.ListResourcesResponse
|
||||
(*SearchResourcesRequest)(nil), // 4: memos.api.v2.SearchResourcesRequest
|
||||
(*SearchResourcesResponse)(nil), // 5: memos.api.v2.SearchResourcesResponse
|
||||
(*GetResourceRequest)(nil), // 6: memos.api.v2.GetResourceRequest
|
||||
(*UpdateResourceRequest)(nil), // 7: memos.api.v2.UpdateResourceRequest
|
||||
(*DeleteResourceRequest)(nil), // 8: memos.api.v2.DeleteResourceRequest
|
||||
var file_api_v1_resource_service_proto_msgTypes = make([]protoimpl.MessageInfo, 9)
|
||||
var file_api_v1_resource_service_proto_goTypes = []interface{}{
|
||||
(*Resource)(nil), // 0: memos.api.v1.Resource
|
||||
(*CreateResourceRequest)(nil), // 1: memos.api.v1.CreateResourceRequest
|
||||
(*ListResourcesRequest)(nil), // 2: memos.api.v1.ListResourcesRequest
|
||||
(*ListResourcesResponse)(nil), // 3: memos.api.v1.ListResourcesResponse
|
||||
(*SearchResourcesRequest)(nil), // 4: memos.api.v1.SearchResourcesRequest
|
||||
(*SearchResourcesResponse)(nil), // 5: memos.api.v1.SearchResourcesResponse
|
||||
(*GetResourceRequest)(nil), // 6: memos.api.v1.GetResourceRequest
|
||||
(*UpdateResourceRequest)(nil), // 7: memos.api.v1.UpdateResourceRequest
|
||||
(*DeleteResourceRequest)(nil), // 8: memos.api.v1.DeleteResourceRequest
|
||||
(*timestamppb.Timestamp)(nil), // 9: google.protobuf.Timestamp
|
||||
(*fieldmaskpb.FieldMask)(nil), // 10: google.protobuf.FieldMask
|
||||
(*emptypb.Empty)(nil), // 11: google.protobuf.Empty
|
||||
}
|
||||
var file_api_v2_resource_service_proto_depIdxs = []int32{
|
||||
9, // 0: memos.api.v2.Resource.create_time:type_name -> google.protobuf.Timestamp
|
||||
0, // 1: memos.api.v2.CreateResourceRequest.resource:type_name -> memos.api.v2.Resource
|
||||
0, // 2: memos.api.v2.ListResourcesResponse.resources:type_name -> memos.api.v2.Resource
|
||||
0, // 3: memos.api.v2.SearchResourcesResponse.resources:type_name -> memos.api.v2.Resource
|
||||
0, // 4: memos.api.v2.UpdateResourceRequest.resource:type_name -> memos.api.v2.Resource
|
||||
10, // 5: memos.api.v2.UpdateResourceRequest.update_mask:type_name -> google.protobuf.FieldMask
|
||||
1, // 6: memos.api.v2.ResourceService.CreateResource:input_type -> memos.api.v2.CreateResourceRequest
|
||||
2, // 7: memos.api.v2.ResourceService.ListResources:input_type -> memos.api.v2.ListResourcesRequest
|
||||
4, // 8: memos.api.v2.ResourceService.SearchResources:input_type -> memos.api.v2.SearchResourcesRequest
|
||||
6, // 9: memos.api.v2.ResourceService.GetResource:input_type -> memos.api.v2.GetResourceRequest
|
||||
7, // 10: memos.api.v2.ResourceService.UpdateResource:input_type -> memos.api.v2.UpdateResourceRequest
|
||||
8, // 11: memos.api.v2.ResourceService.DeleteResource:input_type -> memos.api.v2.DeleteResourceRequest
|
||||
0, // 12: memos.api.v2.ResourceService.CreateResource:output_type -> memos.api.v2.Resource
|
||||
3, // 13: memos.api.v2.ResourceService.ListResources:output_type -> memos.api.v2.ListResourcesResponse
|
||||
5, // 14: memos.api.v2.ResourceService.SearchResources:output_type -> memos.api.v2.SearchResourcesResponse
|
||||
0, // 15: memos.api.v2.ResourceService.GetResource:output_type -> memos.api.v2.Resource
|
||||
0, // 16: memos.api.v2.ResourceService.UpdateResource:output_type -> memos.api.v2.Resource
|
||||
11, // 17: memos.api.v2.ResourceService.DeleteResource:output_type -> google.protobuf.Empty
|
||||
var file_api_v1_resource_service_proto_depIdxs = []int32{
|
||||
9, // 0: memos.api.v1.Resource.create_time:type_name -> google.protobuf.Timestamp
|
||||
0, // 1: memos.api.v1.CreateResourceRequest.resource:type_name -> memos.api.v1.Resource
|
||||
0, // 2: memos.api.v1.ListResourcesResponse.resources:type_name -> memos.api.v1.Resource
|
||||
0, // 3: memos.api.v1.SearchResourcesResponse.resources:type_name -> memos.api.v1.Resource
|
||||
0, // 4: memos.api.v1.UpdateResourceRequest.resource:type_name -> memos.api.v1.Resource
|
||||
10, // 5: memos.api.v1.UpdateResourceRequest.update_mask:type_name -> google.protobuf.FieldMask
|
||||
1, // 6: memos.api.v1.ResourceService.CreateResource:input_type -> memos.api.v1.CreateResourceRequest
|
||||
2, // 7: memos.api.v1.ResourceService.ListResources:input_type -> memos.api.v1.ListResourcesRequest
|
||||
4, // 8: memos.api.v1.ResourceService.SearchResources:input_type -> memos.api.v1.SearchResourcesRequest
|
||||
6, // 9: memos.api.v1.ResourceService.GetResource:input_type -> memos.api.v1.GetResourceRequest
|
||||
7, // 10: memos.api.v1.ResourceService.UpdateResource:input_type -> memos.api.v1.UpdateResourceRequest
|
||||
8, // 11: memos.api.v1.ResourceService.DeleteResource:input_type -> memos.api.v1.DeleteResourceRequest
|
||||
0, // 12: memos.api.v1.ResourceService.CreateResource:output_type -> memos.api.v1.Resource
|
||||
3, // 13: memos.api.v1.ResourceService.ListResources:output_type -> memos.api.v1.ListResourcesResponse
|
||||
5, // 14: memos.api.v1.ResourceService.SearchResources:output_type -> memos.api.v1.SearchResourcesResponse
|
||||
0, // 15: memos.api.v1.ResourceService.GetResource:output_type -> memos.api.v1.Resource
|
||||
0, // 16: memos.api.v1.ResourceService.UpdateResource:output_type -> memos.api.v1.Resource
|
||||
11, // 17: memos.api.v1.ResourceService.DeleteResource:output_type -> google.protobuf.Empty
|
||||
12, // [12:18] is the sub-list for method output_type
|
||||
6, // [6:12] is the sub-list for method input_type
|
||||
6, // [6:6] is the sub-list for extension type_name
|
||||
@ -706,13 +706,13 @@ var file_api_v2_resource_service_proto_depIdxs = []int32{
|
||||
0, // [0:6] is the sub-list for field type_name
|
||||
}
|
||||
|
||||
func init() { file_api_v2_resource_service_proto_init() }
|
||||
func file_api_v2_resource_service_proto_init() {
|
||||
if File_api_v2_resource_service_proto != nil {
|
||||
func init() { file_api_v1_resource_service_proto_init() }
|
||||
func file_api_v1_resource_service_proto_init() {
|
||||
if File_api_v1_resource_service_proto != nil {
|
||||
return
|
||||
}
|
||||
if !protoimpl.UnsafeEnabled {
|
||||
file_api_v2_resource_service_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
|
||||
file_api_v1_resource_service_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*Resource); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
@ -724,7 +724,7 @@ func file_api_v2_resource_service_proto_init() {
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_api_v2_resource_service_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
|
||||
file_api_v1_resource_service_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*CreateResourceRequest); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
@ -736,7 +736,7 @@ func file_api_v2_resource_service_proto_init() {
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_api_v2_resource_service_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
|
||||
file_api_v1_resource_service_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*ListResourcesRequest); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
@ -748,7 +748,7 @@ func file_api_v2_resource_service_proto_init() {
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_api_v2_resource_service_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} {
|
||||
file_api_v1_resource_service_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*ListResourcesResponse); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
@ -760,7 +760,7 @@ func file_api_v2_resource_service_proto_init() {
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_api_v2_resource_service_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} {
|
||||
file_api_v1_resource_service_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*SearchResourcesRequest); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
@ -772,7 +772,7 @@ func file_api_v2_resource_service_proto_init() {
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_api_v2_resource_service_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} {
|
||||
file_api_v1_resource_service_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*SearchResourcesResponse); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
@ -784,7 +784,7 @@ func file_api_v2_resource_service_proto_init() {
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_api_v2_resource_service_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} {
|
||||
file_api_v1_resource_service_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*GetResourceRequest); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
@ -796,7 +796,7 @@ func file_api_v2_resource_service_proto_init() {
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_api_v2_resource_service_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} {
|
||||
file_api_v1_resource_service_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*UpdateResourceRequest); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
@ -808,7 +808,7 @@ func file_api_v2_resource_service_proto_init() {
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_api_v2_resource_service_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} {
|
||||
file_api_v1_resource_service_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*DeleteResourceRequest); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
@ -821,23 +821,23 @@ func file_api_v2_resource_service_proto_init() {
|
||||
}
|
||||
}
|
||||
}
|
||||
file_api_v2_resource_service_proto_msgTypes[0].OneofWrappers = []interface{}{}
|
||||
file_api_v1_resource_service_proto_msgTypes[0].OneofWrappers = []interface{}{}
|
||||
type x struct{}
|
||||
out := protoimpl.TypeBuilder{
|
||||
File: protoimpl.DescBuilder{
|
||||
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
|
||||
RawDescriptor: file_api_v2_resource_service_proto_rawDesc,
|
||||
RawDescriptor: file_api_v1_resource_service_proto_rawDesc,
|
||||
NumEnums: 0,
|
||||
NumMessages: 9,
|
||||
NumExtensions: 0,
|
||||
NumServices: 1,
|
||||
},
|
||||
GoTypes: file_api_v2_resource_service_proto_goTypes,
|
||||
DependencyIndexes: file_api_v2_resource_service_proto_depIdxs,
|
||||
MessageInfos: file_api_v2_resource_service_proto_msgTypes,
|
||||
GoTypes: file_api_v1_resource_service_proto_goTypes,
|
||||
DependencyIndexes: file_api_v1_resource_service_proto_depIdxs,
|
||||
MessageInfos: file_api_v1_resource_service_proto_msgTypes,
|
||||
}.Build()
|
||||
File_api_v2_resource_service_proto = out.File
|
||||
file_api_v2_resource_service_proto_rawDesc = nil
|
||||
file_api_v2_resource_service_proto_goTypes = nil
|
||||
file_api_v2_resource_service_proto_depIdxs = nil
|
||||
File_api_v1_resource_service_proto = out.File
|
||||
file_api_v1_resource_service_proto_rawDesc = nil
|
||||
file_api_v1_resource_service_proto_goTypes = nil
|
||||
file_api_v1_resource_service_proto_depIdxs = nil
|
||||
}
|
@ -1,12 +1,12 @@
|
||||
// Code generated by protoc-gen-grpc-gateway. DO NOT EDIT.
|
||||
// source: api/v2/resource_service.proto
|
||||
// source: api/v1/resource_service.proto
|
||||
|
||||
/*
|
||||
Package apiv2 is a reverse proxy.
|
||||
Package apiv1 is a reverse proxy.
|
||||
|
||||
It translates gRPC into RESTful JSON APIs.
|
||||
*/
|
||||
package apiv2
|
||||
package apiv1
|
||||
|
||||
import (
|
||||
"context"
|
||||
@ -329,7 +329,7 @@ func RegisterResourceServiceHandlerServer(ctx context.Context, mux *runtime.Serv
|
||||
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
||||
var err error
|
||||
var annotatedContext context.Context
|
||||
annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/memos.api.v2.ResourceService/CreateResource", runtime.WithHTTPPathPattern("/api/v2/resources"))
|
||||
annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/memos.api.v1.ResourceService/CreateResource", runtime.WithHTTPPathPattern("/api/v1/resources"))
|
||||
if err != nil {
|
||||
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||
return
|
||||
@ -354,7 +354,7 @@ func RegisterResourceServiceHandlerServer(ctx context.Context, mux *runtime.Serv
|
||||
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
||||
var err error
|
||||
var annotatedContext context.Context
|
||||
annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/memos.api.v2.ResourceService/ListResources", runtime.WithHTTPPathPattern("/api/v2/resources"))
|
||||
annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/memos.api.v1.ResourceService/ListResources", runtime.WithHTTPPathPattern("/api/v1/resources"))
|
||||
if err != nil {
|
||||
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||
return
|
||||
@ -379,7 +379,7 @@ func RegisterResourceServiceHandlerServer(ctx context.Context, mux *runtime.Serv
|
||||
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
||||
var err error
|
||||
var annotatedContext context.Context
|
||||
annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/memos.api.v2.ResourceService/SearchResources", runtime.WithHTTPPathPattern("/api/v2/resources:search"))
|
||||
annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/memos.api.v1.ResourceService/SearchResources", runtime.WithHTTPPathPattern("/api/v1/resources:search"))
|
||||
if err != nil {
|
||||
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||
return
|
||||
@ -404,7 +404,7 @@ func RegisterResourceServiceHandlerServer(ctx context.Context, mux *runtime.Serv
|
||||
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
||||
var err error
|
||||
var annotatedContext context.Context
|
||||
annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/memos.api.v2.ResourceService/GetResource", runtime.WithHTTPPathPattern("/api/v2/{name=resources/*}"))
|
||||
annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/memos.api.v1.ResourceService/GetResource", runtime.WithHTTPPathPattern("/api/v1/{name=resources/*}"))
|
||||
if err != nil {
|
||||
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||
return
|
||||
@ -429,7 +429,7 @@ func RegisterResourceServiceHandlerServer(ctx context.Context, mux *runtime.Serv
|
||||
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
||||
var err error
|
||||
var annotatedContext context.Context
|
||||
annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/memos.api.v2.ResourceService/UpdateResource", runtime.WithHTTPPathPattern("/api/v2/{resource.name=resources/*}"))
|
||||
annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/memos.api.v1.ResourceService/UpdateResource", runtime.WithHTTPPathPattern("/api/v1/{resource.name=resources/*}"))
|
||||
if err != nil {
|
||||
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||
return
|
||||
@ -454,7 +454,7 @@ func RegisterResourceServiceHandlerServer(ctx context.Context, mux *runtime.Serv
|
||||
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
||||
var err error
|
||||
var annotatedContext context.Context
|
||||
annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/memos.api.v2.ResourceService/DeleteResource", runtime.WithHTTPPathPattern("/api/v2/{name=resources/*}"))
|
||||
annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/memos.api.v1.ResourceService/DeleteResource", runtime.WithHTTPPathPattern("/api/v1/{name=resources/*}"))
|
||||
if err != nil {
|
||||
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||
return
|
||||
@ -518,7 +518,7 @@ func RegisterResourceServiceHandlerClient(ctx context.Context, mux *runtime.Serv
|
||||
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
||||
var err error
|
||||
var annotatedContext context.Context
|
||||
annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/memos.api.v2.ResourceService/CreateResource", runtime.WithHTTPPathPattern("/api/v2/resources"))
|
||||
annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/memos.api.v1.ResourceService/CreateResource", runtime.WithHTTPPathPattern("/api/v1/resources"))
|
||||
if err != nil {
|
||||
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||
return
|
||||
@ -540,7 +540,7 @@ func RegisterResourceServiceHandlerClient(ctx context.Context, mux *runtime.Serv
|
||||
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
||||
var err error
|
||||
var annotatedContext context.Context
|
||||
annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/memos.api.v2.ResourceService/ListResources", runtime.WithHTTPPathPattern("/api/v2/resources"))
|
||||
annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/memos.api.v1.ResourceService/ListResources", runtime.WithHTTPPathPattern("/api/v1/resources"))
|
||||
if err != nil {
|
||||
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||
return
|
||||
@ -562,7 +562,7 @@ func RegisterResourceServiceHandlerClient(ctx context.Context, mux *runtime.Serv
|
||||
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
||||
var err error
|
||||
var annotatedContext context.Context
|
||||
annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/memos.api.v2.ResourceService/SearchResources", runtime.WithHTTPPathPattern("/api/v2/resources:search"))
|
||||
annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/memos.api.v1.ResourceService/SearchResources", runtime.WithHTTPPathPattern("/api/v1/resources:search"))
|
||||
if err != nil {
|
||||
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||
return
|
||||
@ -584,7 +584,7 @@ func RegisterResourceServiceHandlerClient(ctx context.Context, mux *runtime.Serv
|
||||
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
||||
var err error
|
||||
var annotatedContext context.Context
|
||||
annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/memos.api.v2.ResourceService/GetResource", runtime.WithHTTPPathPattern("/api/v2/{name=resources/*}"))
|
||||
annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/memos.api.v1.ResourceService/GetResource", runtime.WithHTTPPathPattern("/api/v1/{name=resources/*}"))
|
||||
if err != nil {
|
||||
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||
return
|
||||
@ -606,7 +606,7 @@ func RegisterResourceServiceHandlerClient(ctx context.Context, mux *runtime.Serv
|
||||
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
||||
var err error
|
||||
var annotatedContext context.Context
|
||||
annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/memos.api.v2.ResourceService/UpdateResource", runtime.WithHTTPPathPattern("/api/v2/{resource.name=resources/*}"))
|
||||
annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/memos.api.v1.ResourceService/UpdateResource", runtime.WithHTTPPathPattern("/api/v1/{resource.name=resources/*}"))
|
||||
if err != nil {
|
||||
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||
return
|
||||
@ -628,7 +628,7 @@ func RegisterResourceServiceHandlerClient(ctx context.Context, mux *runtime.Serv
|
||||
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
||||
var err error
|
||||
var annotatedContext context.Context
|
||||
annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/memos.api.v2.ResourceService/DeleteResource", runtime.WithHTTPPathPattern("/api/v2/{name=resources/*}"))
|
||||
annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/memos.api.v1.ResourceService/DeleteResource", runtime.WithHTTPPathPattern("/api/v1/{name=resources/*}"))
|
||||
if err != nil {
|
||||
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||
return
|
||||
@ -648,17 +648,17 @@ func RegisterResourceServiceHandlerClient(ctx context.Context, mux *runtime.Serv
|
||||
}
|
||||
|
||||
var (
|
||||
pattern_ResourceService_CreateResource_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"api", "v2", "resources"}, ""))
|
||||
pattern_ResourceService_CreateResource_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"api", "v1", "resources"}, ""))
|
||||
|
||||
pattern_ResourceService_ListResources_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"api", "v2", "resources"}, ""))
|
||||
pattern_ResourceService_ListResources_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"api", "v1", "resources"}, ""))
|
||||
|
||||
pattern_ResourceService_SearchResources_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"api", "v2", "resources"}, "search"))
|
||||
pattern_ResourceService_SearchResources_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"api", "v1", "resources"}, "search"))
|
||||
|
||||
pattern_ResourceService_GetResource_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 2, 5, 3}, []string{"api", "v2", "resources", "name"}, ""))
|
||||
pattern_ResourceService_GetResource_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 2, 5, 3}, []string{"api", "v1", "resources", "name"}, ""))
|
||||
|
||||
pattern_ResourceService_UpdateResource_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 2, 5, 3}, []string{"api", "v2", "resources", "resource.name"}, ""))
|
||||
pattern_ResourceService_UpdateResource_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 2, 5, 3}, []string{"api", "v1", "resources", "resource.name"}, ""))
|
||||
|
||||
pattern_ResourceService_DeleteResource_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 2, 5, 3}, []string{"api", "v2", "resources", "name"}, ""))
|
||||
pattern_ResourceService_DeleteResource_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 2, 5, 3}, []string{"api", "v1", "resources", "name"}, ""))
|
||||
)
|
||||
|
||||
var (
|
@ -2,9 +2,9 @@
|
||||
// versions:
|
||||
// - protoc-gen-go-grpc v1.3.0
|
||||
// - protoc (unknown)
|
||||
// source: api/v2/resource_service.proto
|
||||
// source: api/v1/resource_service.proto
|
||||
|
||||
package apiv2
|
||||
package apiv1
|
||||
|
||||
import (
|
||||
context "context"
|
||||
@ -20,12 +20,12 @@ import (
|
||||
const _ = grpc.SupportPackageIsVersion7
|
||||
|
||||
const (
|
||||
ResourceService_CreateResource_FullMethodName = "/memos.api.v2.ResourceService/CreateResource"
|
||||
ResourceService_ListResources_FullMethodName = "/memos.api.v2.ResourceService/ListResources"
|
||||
ResourceService_SearchResources_FullMethodName = "/memos.api.v2.ResourceService/SearchResources"
|
||||
ResourceService_GetResource_FullMethodName = "/memos.api.v2.ResourceService/GetResource"
|
||||
ResourceService_UpdateResource_FullMethodName = "/memos.api.v2.ResourceService/UpdateResource"
|
||||
ResourceService_DeleteResource_FullMethodName = "/memos.api.v2.ResourceService/DeleteResource"
|
||||
ResourceService_CreateResource_FullMethodName = "/memos.api.v1.ResourceService/CreateResource"
|
||||
ResourceService_ListResources_FullMethodName = "/memos.api.v1.ResourceService/ListResources"
|
||||
ResourceService_SearchResources_FullMethodName = "/memos.api.v1.ResourceService/SearchResources"
|
||||
ResourceService_GetResource_FullMethodName = "/memos.api.v1.ResourceService/GetResource"
|
||||
ResourceService_UpdateResource_FullMethodName = "/memos.api.v1.ResourceService/UpdateResource"
|
||||
ResourceService_DeleteResource_FullMethodName = "/memos.api.v1.ResourceService/DeleteResource"
|
||||
)
|
||||
|
||||
// ResourceServiceClient is the client API for ResourceService service.
|
||||
@ -274,7 +274,7 @@ func _ResourceService_DeleteResource_Handler(srv interface{}, ctx context.Contex
|
||||
// It's only intended for direct use with grpc.RegisterService,
|
||||
// and not to be introspected or modified (even as a copy)
|
||||
var ResourceService_ServiceDesc = grpc.ServiceDesc{
|
||||
ServiceName: "memos.api.v2.ResourceService",
|
||||
ServiceName: "memos.api.v1.ResourceService",
|
||||
HandlerType: (*ResourceServiceServer)(nil),
|
||||
Methods: []grpc.MethodDesc{
|
||||
{
|
||||
@ -303,5 +303,5 @@ var ResourceService_ServiceDesc = grpc.ServiceDesc{
|
||||
},
|
||||
},
|
||||
Streams: []grpc.StreamDesc{},
|
||||
Metadata: "api/v2/resource_service.proto",
|
||||
Metadata: "api/v1/resource_service.proto",
|
||||
}
|
@ -2,9 +2,9 @@
|
||||
// versions:
|
||||
// protoc-gen-go v1.33.0
|
||||
// protoc (unknown)
|
||||
// source: api/v2/storage_service.proto
|
||||
// source: api/v1/storage_service.proto
|
||||
|
||||
package apiv2
|
||||
package apiv1
|
||||
|
||||
import (
|
||||
_ "google.golang.org/genproto/googleapis/api/annotations"
|
||||
@ -52,11 +52,11 @@ func (x Storage_Type) String() string {
|
||||
}
|
||||
|
||||
func (Storage_Type) Descriptor() protoreflect.EnumDescriptor {
|
||||
return file_api_v2_storage_service_proto_enumTypes[0].Descriptor()
|
||||
return file_api_v1_storage_service_proto_enumTypes[0].Descriptor()
|
||||
}
|
||||
|
||||
func (Storage_Type) Type() protoreflect.EnumType {
|
||||
return &file_api_v2_storage_service_proto_enumTypes[0]
|
||||
return &file_api_v1_storage_service_proto_enumTypes[0]
|
||||
}
|
||||
|
||||
func (x Storage_Type) Number() protoreflect.EnumNumber {
|
||||
@ -65,7 +65,7 @@ func (x Storage_Type) Number() protoreflect.EnumNumber {
|
||||
|
||||
// Deprecated: Use Storage_Type.Descriptor instead.
|
||||
func (Storage_Type) EnumDescriptor() ([]byte, []int) {
|
||||
return file_api_v2_storage_service_proto_rawDescGZIP(), []int{0, 0}
|
||||
return file_api_v1_storage_service_proto_rawDescGZIP(), []int{0, 0}
|
||||
}
|
||||
|
||||
type Storage struct {
|
||||
@ -75,14 +75,14 @@ type Storage struct {
|
||||
|
||||
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"`
|
||||
Type Storage_Type `protobuf:"varint,3,opt,name=type,proto3,enum=memos.api.v1.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]
|
||||
mi := &file_api_v1_storage_service_proto_msgTypes[0]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
@ -95,7 +95,7 @@ func (x *Storage) String() string {
|
||||
func (*Storage) ProtoMessage() {}
|
||||
|
||||
func (x *Storage) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_api_v2_storage_service_proto_msgTypes[0]
|
||||
mi := &file_api_v1_storage_service_proto_msgTypes[0]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
@ -108,7 +108,7 @@ func (x *Storage) ProtoReflect() protoreflect.Message {
|
||||
|
||||
// Deprecated: Use Storage.ProtoReflect.Descriptor instead.
|
||||
func (*Storage) Descriptor() ([]byte, []int) {
|
||||
return file_api_v2_storage_service_proto_rawDescGZIP(), []int{0}
|
||||
return file_api_v1_storage_service_proto_rawDescGZIP(), []int{0}
|
||||
}
|
||||
|
||||
func (x *Storage) GetId() int32 {
|
||||
@ -153,7 +153,7 @@ type StorageConfig struct {
|
||||
func (x *StorageConfig) Reset() {
|
||||
*x = StorageConfig{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_api_v2_storage_service_proto_msgTypes[1]
|
||||
mi := &file_api_v1_storage_service_proto_msgTypes[1]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
@ -166,7 +166,7 @@ func (x *StorageConfig) String() string {
|
||||
func (*StorageConfig) ProtoMessage() {}
|
||||
|
||||
func (x *StorageConfig) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_api_v2_storage_service_proto_msgTypes[1]
|
||||
mi := &file_api_v1_storage_service_proto_msgTypes[1]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
@ -179,7 +179,7 @@ func (x *StorageConfig) ProtoReflect() protoreflect.Message {
|
||||
|
||||
// Deprecated: Use StorageConfig.ProtoReflect.Descriptor instead.
|
||||
func (*StorageConfig) Descriptor() ([]byte, []int) {
|
||||
return file_api_v2_storage_service_proto_rawDescGZIP(), []int{1}
|
||||
return file_api_v1_storage_service_proto_rawDescGZIP(), []int{1}
|
||||
}
|
||||
|
||||
func (m *StorageConfig) GetConfig() isStorageConfig_Config {
|
||||
@ -225,7 +225,7 @@ type S3Config struct {
|
||||
func (x *S3Config) Reset() {
|
||||
*x = S3Config{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_api_v2_storage_service_proto_msgTypes[2]
|
||||
mi := &file_api_v1_storage_service_proto_msgTypes[2]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
@ -238,7 +238,7 @@ func (x *S3Config) String() string {
|
||||
func (*S3Config) ProtoMessage() {}
|
||||
|
||||
func (x *S3Config) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_api_v2_storage_service_proto_msgTypes[2]
|
||||
mi := &file_api_v1_storage_service_proto_msgTypes[2]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
@ -251,7 +251,7 @@ func (x *S3Config) ProtoReflect() protoreflect.Message {
|
||||
|
||||
// Deprecated: Use S3Config.ProtoReflect.Descriptor instead.
|
||||
func (*S3Config) Descriptor() ([]byte, []int) {
|
||||
return file_api_v2_storage_service_proto_rawDescGZIP(), []int{2}
|
||||
return file_api_v1_storage_service_proto_rawDescGZIP(), []int{2}
|
||||
}
|
||||
|
||||
func (x *S3Config) GetEndPoint() string {
|
||||
@ -328,7 +328,7 @@ type CreateStorageRequest struct {
|
||||
func (x *CreateStorageRequest) Reset() {
|
||||
*x = CreateStorageRequest{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_api_v2_storage_service_proto_msgTypes[3]
|
||||
mi := &file_api_v1_storage_service_proto_msgTypes[3]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
@ -341,7 +341,7 @@ func (x *CreateStorageRequest) String() string {
|
||||
func (*CreateStorageRequest) ProtoMessage() {}
|
||||
|
||||
func (x *CreateStorageRequest) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_api_v2_storage_service_proto_msgTypes[3]
|
||||
mi := &file_api_v1_storage_service_proto_msgTypes[3]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
@ -354,7 +354,7 @@ func (x *CreateStorageRequest) ProtoReflect() protoreflect.Message {
|
||||
|
||||
// Deprecated: Use CreateStorageRequest.ProtoReflect.Descriptor instead.
|
||||
func (*CreateStorageRequest) Descriptor() ([]byte, []int) {
|
||||
return file_api_v2_storage_service_proto_rawDescGZIP(), []int{3}
|
||||
return file_api_v1_storage_service_proto_rawDescGZIP(), []int{3}
|
||||
}
|
||||
|
||||
func (x *CreateStorageRequest) GetStorage() *Storage {
|
||||
@ -375,7 +375,7 @@ type CreateStorageResponse struct {
|
||||
func (x *CreateStorageResponse) Reset() {
|
||||
*x = CreateStorageResponse{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_api_v2_storage_service_proto_msgTypes[4]
|
||||
mi := &file_api_v1_storage_service_proto_msgTypes[4]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
@ -388,7 +388,7 @@ func (x *CreateStorageResponse) String() string {
|
||||
func (*CreateStorageResponse) ProtoMessage() {}
|
||||
|
||||
func (x *CreateStorageResponse) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_api_v2_storage_service_proto_msgTypes[4]
|
||||
mi := &file_api_v1_storage_service_proto_msgTypes[4]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
@ -401,7 +401,7 @@ func (x *CreateStorageResponse) ProtoReflect() protoreflect.Message {
|
||||
|
||||
// Deprecated: Use CreateStorageResponse.ProtoReflect.Descriptor instead.
|
||||
func (*CreateStorageResponse) Descriptor() ([]byte, []int) {
|
||||
return file_api_v2_storage_service_proto_rawDescGZIP(), []int{4}
|
||||
return file_api_v1_storage_service_proto_rawDescGZIP(), []int{4}
|
||||
}
|
||||
|
||||
func (x *CreateStorageResponse) GetStorage() *Storage {
|
||||
@ -422,7 +422,7 @@ type GetStorageRequest struct {
|
||||
func (x *GetStorageRequest) Reset() {
|
||||
*x = GetStorageRequest{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_api_v2_storage_service_proto_msgTypes[5]
|
||||
mi := &file_api_v1_storage_service_proto_msgTypes[5]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
@ -435,7 +435,7 @@ func (x *GetStorageRequest) String() string {
|
||||
func (*GetStorageRequest) ProtoMessage() {}
|
||||
|
||||
func (x *GetStorageRequest) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_api_v2_storage_service_proto_msgTypes[5]
|
||||
mi := &file_api_v1_storage_service_proto_msgTypes[5]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
@ -448,7 +448,7 @@ func (x *GetStorageRequest) ProtoReflect() protoreflect.Message {
|
||||
|
||||
// Deprecated: Use GetStorageRequest.ProtoReflect.Descriptor instead.
|
||||
func (*GetStorageRequest) Descriptor() ([]byte, []int) {
|
||||
return file_api_v2_storage_service_proto_rawDescGZIP(), []int{5}
|
||||
return file_api_v1_storage_service_proto_rawDescGZIP(), []int{5}
|
||||
}
|
||||
|
||||
func (x *GetStorageRequest) GetId() int32 {
|
||||
@ -469,7 +469,7 @@ type GetStorageResponse struct {
|
||||
func (x *GetStorageResponse) Reset() {
|
||||
*x = GetStorageResponse{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_api_v2_storage_service_proto_msgTypes[6]
|
||||
mi := &file_api_v1_storage_service_proto_msgTypes[6]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
@ -482,7 +482,7 @@ func (x *GetStorageResponse) String() string {
|
||||
func (*GetStorageResponse) ProtoMessage() {}
|
||||
|
||||
func (x *GetStorageResponse) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_api_v2_storage_service_proto_msgTypes[6]
|
||||
mi := &file_api_v1_storage_service_proto_msgTypes[6]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
@ -495,7 +495,7 @@ func (x *GetStorageResponse) ProtoReflect() protoreflect.Message {
|
||||
|
||||
// Deprecated: Use GetStorageResponse.ProtoReflect.Descriptor instead.
|
||||
func (*GetStorageResponse) Descriptor() ([]byte, []int) {
|
||||
return file_api_v2_storage_service_proto_rawDescGZIP(), []int{6}
|
||||
return file_api_v1_storage_service_proto_rawDescGZIP(), []int{6}
|
||||
}
|
||||
|
||||
func (x *GetStorageResponse) GetStorage() *Storage {
|
||||
@ -514,7 +514,7 @@ type ListStoragesRequest struct {
|
||||
func (x *ListStoragesRequest) Reset() {
|
||||
*x = ListStoragesRequest{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_api_v2_storage_service_proto_msgTypes[7]
|
||||
mi := &file_api_v1_storage_service_proto_msgTypes[7]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
@ -527,7 +527,7 @@ func (x *ListStoragesRequest) String() string {
|
||||
func (*ListStoragesRequest) ProtoMessage() {}
|
||||
|
||||
func (x *ListStoragesRequest) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_api_v2_storage_service_proto_msgTypes[7]
|
||||
mi := &file_api_v1_storage_service_proto_msgTypes[7]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
@ -540,7 +540,7 @@ func (x *ListStoragesRequest) ProtoReflect() protoreflect.Message {
|
||||
|
||||
// Deprecated: Use ListStoragesRequest.ProtoReflect.Descriptor instead.
|
||||
func (*ListStoragesRequest) Descriptor() ([]byte, []int) {
|
||||
return file_api_v2_storage_service_proto_rawDescGZIP(), []int{7}
|
||||
return file_api_v1_storage_service_proto_rawDescGZIP(), []int{7}
|
||||
}
|
||||
|
||||
type ListStoragesResponse struct {
|
||||
@ -554,7 +554,7 @@ type ListStoragesResponse struct {
|
||||
func (x *ListStoragesResponse) Reset() {
|
||||
*x = ListStoragesResponse{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_api_v2_storage_service_proto_msgTypes[8]
|
||||
mi := &file_api_v1_storage_service_proto_msgTypes[8]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
@ -567,7 +567,7 @@ func (x *ListStoragesResponse) String() string {
|
||||
func (*ListStoragesResponse) ProtoMessage() {}
|
||||
|
||||
func (x *ListStoragesResponse) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_api_v2_storage_service_proto_msgTypes[8]
|
||||
mi := &file_api_v1_storage_service_proto_msgTypes[8]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
@ -580,7 +580,7 @@ func (x *ListStoragesResponse) ProtoReflect() protoreflect.Message {
|
||||
|
||||
// Deprecated: Use ListStoragesResponse.ProtoReflect.Descriptor instead.
|
||||
func (*ListStoragesResponse) Descriptor() ([]byte, []int) {
|
||||
return file_api_v2_storage_service_proto_rawDescGZIP(), []int{8}
|
||||
return file_api_v1_storage_service_proto_rawDescGZIP(), []int{8}
|
||||
}
|
||||
|
||||
func (x *ListStoragesResponse) GetStorages() []*Storage {
|
||||
@ -602,7 +602,7 @@ type UpdateStorageRequest struct {
|
||||
func (x *UpdateStorageRequest) Reset() {
|
||||
*x = UpdateStorageRequest{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_api_v2_storage_service_proto_msgTypes[9]
|
||||
mi := &file_api_v1_storage_service_proto_msgTypes[9]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
@ -615,7 +615,7 @@ func (x *UpdateStorageRequest) String() string {
|
||||
func (*UpdateStorageRequest) ProtoMessage() {}
|
||||
|
||||
func (x *UpdateStorageRequest) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_api_v2_storage_service_proto_msgTypes[9]
|
||||
mi := &file_api_v1_storage_service_proto_msgTypes[9]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
@ -628,7 +628,7 @@ func (x *UpdateStorageRequest) ProtoReflect() protoreflect.Message {
|
||||
|
||||
// Deprecated: Use UpdateStorageRequest.ProtoReflect.Descriptor instead.
|
||||
func (*UpdateStorageRequest) Descriptor() ([]byte, []int) {
|
||||
return file_api_v2_storage_service_proto_rawDescGZIP(), []int{9}
|
||||
return file_api_v1_storage_service_proto_rawDescGZIP(), []int{9}
|
||||
}
|
||||
|
||||
func (x *UpdateStorageRequest) GetStorage() *Storage {
|
||||
@ -656,7 +656,7 @@ type UpdateStorageResponse struct {
|
||||
func (x *UpdateStorageResponse) Reset() {
|
||||
*x = UpdateStorageResponse{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_api_v2_storage_service_proto_msgTypes[10]
|
||||
mi := &file_api_v1_storage_service_proto_msgTypes[10]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
@ -669,7 +669,7 @@ func (x *UpdateStorageResponse) String() string {
|
||||
func (*UpdateStorageResponse) ProtoMessage() {}
|
||||
|
||||
func (x *UpdateStorageResponse) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_api_v2_storage_service_proto_msgTypes[10]
|
||||
mi := &file_api_v1_storage_service_proto_msgTypes[10]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
@ -682,7 +682,7 @@ func (x *UpdateStorageResponse) ProtoReflect() protoreflect.Message {
|
||||
|
||||
// Deprecated: Use UpdateStorageResponse.ProtoReflect.Descriptor instead.
|
||||
func (*UpdateStorageResponse) Descriptor() ([]byte, []int) {
|
||||
return file_api_v2_storage_service_proto_rawDescGZIP(), []int{10}
|
||||
return file_api_v1_storage_service_proto_rawDescGZIP(), []int{10}
|
||||
}
|
||||
|
||||
func (x *UpdateStorageResponse) GetStorage() *Storage {
|
||||
@ -703,7 +703,7 @@ type DeleteStorageRequest struct {
|
||||
func (x *DeleteStorageRequest) Reset() {
|
||||
*x = DeleteStorageRequest{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_api_v2_storage_service_proto_msgTypes[11]
|
||||
mi := &file_api_v1_storage_service_proto_msgTypes[11]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
@ -716,7 +716,7 @@ func (x *DeleteStorageRequest) String() string {
|
||||
func (*DeleteStorageRequest) ProtoMessage() {}
|
||||
|
||||
func (x *DeleteStorageRequest) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_api_v2_storage_service_proto_msgTypes[11]
|
||||
mi := &file_api_v1_storage_service_proto_msgTypes[11]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
@ -729,7 +729,7 @@ func (x *DeleteStorageRequest) ProtoReflect() protoreflect.Message {
|
||||
|
||||
// Deprecated: Use DeleteStorageRequest.ProtoReflect.Descriptor instead.
|
||||
func (*DeleteStorageRequest) Descriptor() ([]byte, []int) {
|
||||
return file_api_v2_storage_service_proto_rawDescGZIP(), []int{11}
|
||||
return file_api_v1_storage_service_proto_rawDescGZIP(), []int{11}
|
||||
}
|
||||
|
||||
func (x *DeleteStorageRequest) GetId() int32 {
|
||||
@ -748,7 +748,7 @@ type DeleteStorageResponse struct {
|
||||
func (x *DeleteStorageResponse) Reset() {
|
||||
*x = DeleteStorageResponse{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_api_v2_storage_service_proto_msgTypes[12]
|
||||
mi := &file_api_v1_storage_service_proto_msgTypes[12]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
@ -761,7 +761,7 @@ func (x *DeleteStorageResponse) String() string {
|
||||
func (*DeleteStorageResponse) ProtoMessage() {}
|
||||
|
||||
func (x *DeleteStorageResponse) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_api_v2_storage_service_proto_msgTypes[12]
|
||||
mi := &file_api_v1_storage_service_proto_msgTypes[12]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
@ -774,15 +774,15 @@ func (x *DeleteStorageResponse) ProtoReflect() protoreflect.Message {
|
||||
|
||||
// Deprecated: Use DeleteStorageResponse.ProtoReflect.Descriptor instead.
|
||||
func (*DeleteStorageResponse) Descriptor() ([]byte, []int) {
|
||||
return file_api_v2_storage_service_proto_rawDescGZIP(), []int{12}
|
||||
return file_api_v1_storage_service_proto_rawDescGZIP(), []int{12}
|
||||
}
|
||||
|
||||
var File_api_v2_storage_service_proto protoreflect.FileDescriptor
|
||||
var File_api_v1_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,
|
||||
var file_api_v1_storage_service_proto_rawDesc = []byte{
|
||||
0x0a, 0x1c, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, 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,
|
||||
0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 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,
|
||||
@ -793,17 +793,17 @@ var file_api_v2_storage_service_proto_rawDesc = []byte{
|
||||
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,
|
||||
0x69, 0x2e, 0x76, 0x31, 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,
|
||||
0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 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, 0x50, 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,
|
||||
0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x33, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x48, 0x00,
|
||||
0x52, 0x08, 0x73, 0x33, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x42, 0x08, 0x0a, 0x06, 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,
|
||||
@ -825,29 +825,29 @@ var file_api_v2_storage_service_proto_rawDesc = []byte{
|
||||
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,
|
||||
0x31, 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,
|
||||
0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 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,
|
||||
0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 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,
|
||||
0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 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,
|
||||
0x2e, 0x76, 0x31, 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,
|
||||
@ -855,7 +855,7 @@ var file_api_v2_storage_service_proto_rawDesc = []byte{
|
||||
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,
|
||||
0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 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,
|
||||
@ -863,111 +863,111 @@ var file_api_v2_storage_service_proto_rawDesc = []byte{
|
||||
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,
|
||||
0x12, 0x22, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 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,
|
||||
0x2e, 0x76, 0x31, 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,
|
||||
0x15, 0x3a, 0x01, 0x2a, 0x22, 0x10, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, 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,
|
||||
0x2e, 0x76, 0x31, 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,
|
||||
0x69, 0x2e, 0x76, 0x31, 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,
|
||||
0xe4, 0x93, 0x02, 0x17, 0x12, 0x15, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, 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,
|
||||
0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 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,
|
||||
0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 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,
|
||||
0x2f, 0x76, 0x31, 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,
|
||||
0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 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,
|
||||
0x31, 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, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, 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,
|
||||
0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 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,
|
||||
0x31, 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,
|
||||
0xe4, 0x93, 0x02, 0x17, 0x2a, 0x15, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, 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,
|
||||
0x63, 0x6f, 0x6d, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31,
|
||||
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,
|
||||
0x2f, 0x76, 0x31, 0x3b, 0x61, 0x70, 0x69, 0x76, 0x31, 0xa2, 0x02, 0x03, 0x4d, 0x41, 0x58, 0xaa,
|
||||
0x02, 0x0c, 0x4d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x41, 0x70, 0x69, 0x2e, 0x56, 0x31, 0xca, 0x02,
|
||||
0x0c, 0x4d, 0x65, 0x6d, 0x6f, 0x73, 0x5c, 0x41, 0x70, 0x69, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x18,
|
||||
0x4d, 0x65, 0x6d, 0x6f, 0x73, 0x5c, 0x41, 0x70, 0x69, 0x5c, 0x56, 0x31, 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,
|
||||
0x3a, 0x3a, 0x41, 0x70, 0x69, 0x3a, 0x3a, 0x56, 0x31, 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
|
||||
file_api_v1_storage_service_proto_rawDescOnce sync.Once
|
||||
file_api_v1_storage_service_proto_rawDescData = file_api_v1_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)
|
||||
func file_api_v1_storage_service_proto_rawDescGZIP() []byte {
|
||||
file_api_v1_storage_service_proto_rawDescOnce.Do(func() {
|
||||
file_api_v1_storage_service_proto_rawDescData = protoimpl.X.CompressGZIP(file_api_v1_storage_service_proto_rawDescData)
|
||||
})
|
||||
return file_api_v2_storage_service_proto_rawDescData
|
||||
return file_api_v1_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
|
||||
var file_api_v1_storage_service_proto_enumTypes = make([]protoimpl.EnumInfo, 1)
|
||||
var file_api_v1_storage_service_proto_msgTypes = make([]protoimpl.MessageInfo, 13)
|
||||
var file_api_v1_storage_service_proto_goTypes = []interface{}{
|
||||
(Storage_Type)(0), // 0: memos.api.v1.Storage.Type
|
||||
(*Storage)(nil), // 1: memos.api.v1.Storage
|
||||
(*StorageConfig)(nil), // 2: memos.api.v1.StorageConfig
|
||||
(*S3Config)(nil), // 3: memos.api.v1.S3Config
|
||||
(*CreateStorageRequest)(nil), // 4: memos.api.v1.CreateStorageRequest
|
||||
(*CreateStorageResponse)(nil), // 5: memos.api.v1.CreateStorageResponse
|
||||
(*GetStorageRequest)(nil), // 6: memos.api.v1.GetStorageRequest
|
||||
(*GetStorageResponse)(nil), // 7: memos.api.v1.GetStorageResponse
|
||||
(*ListStoragesRequest)(nil), // 8: memos.api.v1.ListStoragesRequest
|
||||
(*ListStoragesResponse)(nil), // 9: memos.api.v1.ListStoragesResponse
|
||||
(*UpdateStorageRequest)(nil), // 10: memos.api.v1.UpdateStorageRequest
|
||||
(*UpdateStorageResponse)(nil), // 11: memos.api.v1.UpdateStorageResponse
|
||||
(*DeleteStorageRequest)(nil), // 12: memos.api.v1.DeleteStorageRequest
|
||||
(*DeleteStorageResponse)(nil), // 13: memos.api.v1.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
|
||||
var file_api_v1_storage_service_proto_depIdxs = []int32{
|
||||
0, // 0: memos.api.v1.Storage.type:type_name -> memos.api.v1.Storage.Type
|
||||
2, // 1: memos.api.v1.Storage.config:type_name -> memos.api.v1.StorageConfig
|
||||
3, // 2: memos.api.v1.StorageConfig.s3_config:type_name -> memos.api.v1.S3Config
|
||||
1, // 3: memos.api.v1.CreateStorageRequest.storage:type_name -> memos.api.v1.Storage
|
||||
1, // 4: memos.api.v1.CreateStorageResponse.storage:type_name -> memos.api.v1.Storage
|
||||
1, // 5: memos.api.v1.GetStorageResponse.storage:type_name -> memos.api.v1.Storage
|
||||
1, // 6: memos.api.v1.ListStoragesResponse.storages:type_name -> memos.api.v1.Storage
|
||||
1, // 7: memos.api.v1.UpdateStorageRequest.storage:type_name -> memos.api.v1.Storage
|
||||
14, // 8: memos.api.v1.UpdateStorageRequest.update_mask:type_name -> google.protobuf.FieldMask
|
||||
1, // 9: memos.api.v1.UpdateStorageResponse.storage:type_name -> memos.api.v1.Storage
|
||||
4, // 10: memos.api.v1.StorageService.CreateStorage:input_type -> memos.api.v1.CreateStorageRequest
|
||||
6, // 11: memos.api.v1.StorageService.GetStorage:input_type -> memos.api.v1.GetStorageRequest
|
||||
8, // 12: memos.api.v1.StorageService.ListStorages:input_type -> memos.api.v1.ListStoragesRequest
|
||||
10, // 13: memos.api.v1.StorageService.UpdateStorage:input_type -> memos.api.v1.UpdateStorageRequest
|
||||
12, // 14: memos.api.v1.StorageService.DeleteStorage:input_type -> memos.api.v1.DeleteStorageRequest
|
||||
5, // 15: memos.api.v1.StorageService.CreateStorage:output_type -> memos.api.v1.CreateStorageResponse
|
||||
7, // 16: memos.api.v1.StorageService.GetStorage:output_type -> memos.api.v1.GetStorageResponse
|
||||
9, // 17: memos.api.v1.StorageService.ListStorages:output_type -> memos.api.v1.ListStoragesResponse
|
||||
11, // 18: memos.api.v1.StorageService.UpdateStorage:output_type -> memos.api.v1.UpdateStorageResponse
|
||||
13, // 19: memos.api.v1.StorageService.DeleteStorage:output_type -> memos.api.v1.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
|
||||
@ -975,13 +975,13 @@ var file_api_v2_storage_service_proto_depIdxs = []int32{
|
||||
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 {
|
||||
func init() { file_api_v1_storage_service_proto_init() }
|
||||
func file_api_v1_storage_service_proto_init() {
|
||||
if File_api_v1_storage_service_proto != nil {
|
||||
return
|
||||
}
|
||||
if !protoimpl.UnsafeEnabled {
|
||||
file_api_v2_storage_service_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
|
||||
file_api_v1_storage_service_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*Storage); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
@ -993,7 +993,7 @@ func file_api_v2_storage_service_proto_init() {
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_api_v2_storage_service_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
|
||||
file_api_v1_storage_service_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*StorageConfig); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
@ -1005,7 +1005,7 @@ func file_api_v2_storage_service_proto_init() {
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_api_v2_storage_service_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
|
||||
file_api_v1_storage_service_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*S3Config); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
@ -1017,7 +1017,7 @@ func file_api_v2_storage_service_proto_init() {
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_api_v2_storage_service_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} {
|
||||
file_api_v1_storage_service_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*CreateStorageRequest); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
@ -1029,7 +1029,7 @@ func file_api_v2_storage_service_proto_init() {
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_api_v2_storage_service_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} {
|
||||
file_api_v1_storage_service_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*CreateStorageResponse); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
@ -1041,7 +1041,7 @@ func file_api_v2_storage_service_proto_init() {
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_api_v2_storage_service_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} {
|
||||
file_api_v1_storage_service_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*GetStorageRequest); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
@ -1053,7 +1053,7 @@ func file_api_v2_storage_service_proto_init() {
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_api_v2_storage_service_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} {
|
||||
file_api_v1_storage_service_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*GetStorageResponse); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
@ -1065,7 +1065,7 @@ func file_api_v2_storage_service_proto_init() {
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_api_v2_storage_service_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} {
|
||||
file_api_v1_storage_service_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*ListStoragesRequest); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
@ -1077,7 +1077,7 @@ func file_api_v2_storage_service_proto_init() {
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_api_v2_storage_service_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} {
|
||||
file_api_v1_storage_service_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*ListStoragesResponse); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
@ -1089,7 +1089,7 @@ func file_api_v2_storage_service_proto_init() {
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_api_v2_storage_service_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} {
|
||||
file_api_v1_storage_service_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*UpdateStorageRequest); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
@ -1101,7 +1101,7 @@ func file_api_v2_storage_service_proto_init() {
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_api_v2_storage_service_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} {
|
||||
file_api_v1_storage_service_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*UpdateStorageResponse); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
@ -1113,7 +1113,7 @@ func file_api_v2_storage_service_proto_init() {
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_api_v2_storage_service_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} {
|
||||
file_api_v1_storage_service_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*DeleteStorageRequest); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
@ -1125,7 +1125,7 @@ func file_api_v2_storage_service_proto_init() {
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_api_v2_storage_service_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} {
|
||||
file_api_v1_storage_service_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*DeleteStorageResponse); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
@ -1138,26 +1138,26 @@ func file_api_v2_storage_service_proto_init() {
|
||||
}
|
||||
}
|
||||
}
|
||||
file_api_v2_storage_service_proto_msgTypes[1].OneofWrappers = []interface{}{
|
||||
file_api_v1_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,
|
||||
RawDescriptor: file_api_v1_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,
|
||||
GoTypes: file_api_v1_storage_service_proto_goTypes,
|
||||
DependencyIndexes: file_api_v1_storage_service_proto_depIdxs,
|
||||
EnumInfos: file_api_v1_storage_service_proto_enumTypes,
|
||||
MessageInfos: file_api_v1_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
|
||||
File_api_v1_storage_service_proto = out.File
|
||||
file_api_v1_storage_service_proto_rawDesc = nil
|
||||
file_api_v1_storage_service_proto_goTypes = nil
|
||||
file_api_v1_storage_service_proto_depIdxs = nil
|
||||
}
|
@ -1,12 +1,12 @@
|
||||
// Code generated by protoc-gen-grpc-gateway. DO NOT EDIT.
|
||||
// source: api/v2/storage_service.proto
|
||||
// source: api/v1/storage_service.proto
|
||||
|
||||
/*
|
||||
Package apiv2 is a reverse proxy.
|
||||
Package apiv1 is a reverse proxy.
|
||||
|
||||
It translates gRPC into RESTful JSON APIs.
|
||||
*/
|
||||
package apiv2
|
||||
package apiv1
|
||||
|
||||
import (
|
||||
"context"
|
||||
@ -293,7 +293,7 @@ func RegisterStorageServiceHandlerServer(ctx context.Context, mux *runtime.Serve
|
||||
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"))
|
||||
annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/memos.api.v1.StorageService/CreateStorage", runtime.WithHTTPPathPattern("/api/v1/storages"))
|
||||
if err != nil {
|
||||
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||
return
|
||||
@ -318,7 +318,7 @@ func RegisterStorageServiceHandlerServer(ctx context.Context, mux *runtime.Serve
|
||||
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}"))
|
||||
annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/memos.api.v1.StorageService/GetStorage", runtime.WithHTTPPathPattern("/api/v1/storages/{id}"))
|
||||
if err != nil {
|
||||
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||
return
|
||||
@ -343,7 +343,7 @@ func RegisterStorageServiceHandlerServer(ctx context.Context, mux *runtime.Serve
|
||||
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"))
|
||||
annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/memos.api.v1.StorageService/ListStorages", runtime.WithHTTPPathPattern("/api/v1/storages"))
|
||||
if err != nil {
|
||||
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||
return
|
||||
@ -368,7 +368,7 @@ func RegisterStorageServiceHandlerServer(ctx context.Context, mux *runtime.Serve
|
||||
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}"))
|
||||
annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/memos.api.v1.StorageService/UpdateStorage", runtime.WithHTTPPathPattern("/api/v1/storages/{storage.id}"))
|
||||
if err != nil {
|
||||
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||
return
|
||||
@ -393,7 +393,7 @@ func RegisterStorageServiceHandlerServer(ctx context.Context, mux *runtime.Serve
|
||||
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}"))
|
||||
annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/memos.api.v1.StorageService/DeleteStorage", runtime.WithHTTPPathPattern("/api/v1/storages/{id}"))
|
||||
if err != nil {
|
||||
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||
return
|
||||
@ -457,7 +457,7 @@ func RegisterStorageServiceHandlerClient(ctx context.Context, mux *runtime.Serve
|
||||
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"))
|
||||
annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/memos.api.v1.StorageService/CreateStorage", runtime.WithHTTPPathPattern("/api/v1/storages"))
|
||||
if err != nil {
|
||||
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||
return
|
||||
@ -479,7 +479,7 @@ func RegisterStorageServiceHandlerClient(ctx context.Context, mux *runtime.Serve
|
||||
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}"))
|
||||
annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/memos.api.v1.StorageService/GetStorage", runtime.WithHTTPPathPattern("/api/v1/storages/{id}"))
|
||||
if err != nil {
|
||||
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||
return
|
||||
@ -501,7 +501,7 @@ func RegisterStorageServiceHandlerClient(ctx context.Context, mux *runtime.Serve
|
||||
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"))
|
||||
annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/memos.api.v1.StorageService/ListStorages", runtime.WithHTTPPathPattern("/api/v1/storages"))
|
||||
if err != nil {
|
||||
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||
return
|
||||
@ -523,7 +523,7 @@ func RegisterStorageServiceHandlerClient(ctx context.Context, mux *runtime.Serve
|
||||
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}"))
|
||||
annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/memos.api.v1.StorageService/UpdateStorage", runtime.WithHTTPPathPattern("/api/v1/storages/{storage.id}"))
|
||||
if err != nil {
|
||||
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||
return
|
||||
@ -545,7 +545,7 @@ func RegisterStorageServiceHandlerClient(ctx context.Context, mux *runtime.Serve
|
||||
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}"))
|
||||
annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/memos.api.v1.StorageService/DeleteStorage", runtime.WithHTTPPathPattern("/api/v1/storages/{id}"))
|
||||
if err != nil {
|
||||
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||
return
|
||||
@ -565,15 +565,15 @@ func RegisterStorageServiceHandlerClient(ctx context.Context, mux *runtime.Serve
|
||||
}
|
||||
|
||||
var (
|
||||
pattern_StorageService_CreateStorage_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"api", "v2", "storages"}, ""))
|
||||
pattern_StorageService_CreateStorage_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"api", "v1", "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_GetStorage_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3}, []string{"api", "v1", "storages", "id"}, ""))
|
||||
|
||||
pattern_StorageService_ListStorages_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"api", "v2", "storages"}, ""))
|
||||
pattern_StorageService_ListStorages_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"api", "v1", "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_UpdateStorage_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3}, []string{"api", "v1", "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"}, ""))
|
||||
pattern_StorageService_DeleteStorage_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3}, []string{"api", "v1", "storages", "id"}, ""))
|
||||
)
|
||||
|
||||
var (
|
@ -2,9 +2,9 @@
|
||||
// versions:
|
||||
// - protoc-gen-go-grpc v1.3.0
|
||||
// - protoc (unknown)
|
||||
// source: api/v2/storage_service.proto
|
||||
// source: api/v1/storage_service.proto
|
||||
|
||||
package apiv2
|
||||
package apiv1
|
||||
|
||||
import (
|
||||
context "context"
|
||||
@ -19,11 +19,11 @@ import (
|
||||
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"
|
||||
StorageService_CreateStorage_FullMethodName = "/memos.api.v1.StorageService/CreateStorage"
|
||||
StorageService_GetStorage_FullMethodName = "/memos.api.v1.StorageService/GetStorage"
|
||||
StorageService_ListStorages_FullMethodName = "/memos.api.v1.StorageService/ListStorages"
|
||||
StorageService_UpdateStorage_FullMethodName = "/memos.api.v1.StorageService/UpdateStorage"
|
||||
StorageService_DeleteStorage_FullMethodName = "/memos.api.v1.StorageService/DeleteStorage"
|
||||
)
|
||||
|
||||
// StorageServiceClient is the client API for StorageService service.
|
||||
@ -238,7 +238,7 @@ func _StorageService_DeleteStorage_Handler(srv interface{}, ctx context.Context,
|
||||
// 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",
|
||||
ServiceName: "memos.api.v1.StorageService",
|
||||
HandlerType: (*StorageServiceServer)(nil),
|
||||
Methods: []grpc.MethodDesc{
|
||||
{
|
||||
@ -263,5 +263,5 @@ var StorageService_ServiceDesc = grpc.ServiceDesc{
|
||||
},
|
||||
},
|
||||
Streams: []grpc.StreamDesc{},
|
||||
Metadata: "api/v2/storage_service.proto",
|
||||
Metadata: "api/v1/storage_service.proto",
|
||||
}
|
@ -2,9 +2,9 @@
|
||||
// versions:
|
||||
// protoc-gen-go v1.33.0
|
||||
// protoc (unknown)
|
||||
// source: api/v2/tag_service.proto
|
||||
// source: api/v1/tag_service.proto
|
||||
|
||||
package apiv2
|
||||
package apiv1
|
||||
|
||||
import (
|
||||
_ "google.golang.org/genproto/googleapis/api/annotations"
|
||||
@ -36,7 +36,7 @@ type Tag struct {
|
||||
func (x *Tag) Reset() {
|
||||
*x = Tag{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_api_v2_tag_service_proto_msgTypes[0]
|
||||
mi := &file_api_v1_tag_service_proto_msgTypes[0]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
@ -49,7 +49,7 @@ func (x *Tag) String() string {
|
||||
func (*Tag) ProtoMessage() {}
|
||||
|
||||
func (x *Tag) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_api_v2_tag_service_proto_msgTypes[0]
|
||||
mi := &file_api_v1_tag_service_proto_msgTypes[0]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
@ -62,7 +62,7 @@ func (x *Tag) ProtoReflect() protoreflect.Message {
|
||||
|
||||
// Deprecated: Use Tag.ProtoReflect.Descriptor instead.
|
||||
func (*Tag) Descriptor() ([]byte, []int) {
|
||||
return file_api_v2_tag_service_proto_rawDescGZIP(), []int{0}
|
||||
return file_api_v1_tag_service_proto_rawDescGZIP(), []int{0}
|
||||
}
|
||||
|
||||
func (x *Tag) GetName() string {
|
||||
@ -90,7 +90,7 @@ type UpsertTagRequest struct {
|
||||
func (x *UpsertTagRequest) Reset() {
|
||||
*x = UpsertTagRequest{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_api_v2_tag_service_proto_msgTypes[1]
|
||||
mi := &file_api_v1_tag_service_proto_msgTypes[1]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
@ -103,7 +103,7 @@ func (x *UpsertTagRequest) String() string {
|
||||
func (*UpsertTagRequest) ProtoMessage() {}
|
||||
|
||||
func (x *UpsertTagRequest) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_api_v2_tag_service_proto_msgTypes[1]
|
||||
mi := &file_api_v1_tag_service_proto_msgTypes[1]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
@ -116,7 +116,7 @@ func (x *UpsertTagRequest) ProtoReflect() protoreflect.Message {
|
||||
|
||||
// Deprecated: Use UpsertTagRequest.ProtoReflect.Descriptor instead.
|
||||
func (*UpsertTagRequest) Descriptor() ([]byte, []int) {
|
||||
return file_api_v2_tag_service_proto_rawDescGZIP(), []int{1}
|
||||
return file_api_v1_tag_service_proto_rawDescGZIP(), []int{1}
|
||||
}
|
||||
|
||||
func (x *UpsertTagRequest) GetName() string {
|
||||
@ -137,7 +137,7 @@ type BatchUpsertTagRequest struct {
|
||||
func (x *BatchUpsertTagRequest) Reset() {
|
||||
*x = BatchUpsertTagRequest{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_api_v2_tag_service_proto_msgTypes[2]
|
||||
mi := &file_api_v1_tag_service_proto_msgTypes[2]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
@ -150,7 +150,7 @@ func (x *BatchUpsertTagRequest) String() string {
|
||||
func (*BatchUpsertTagRequest) ProtoMessage() {}
|
||||
|
||||
func (x *BatchUpsertTagRequest) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_api_v2_tag_service_proto_msgTypes[2]
|
||||
mi := &file_api_v1_tag_service_proto_msgTypes[2]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
@ -163,7 +163,7 @@ func (x *BatchUpsertTagRequest) ProtoReflect() protoreflect.Message {
|
||||
|
||||
// Deprecated: Use BatchUpsertTagRequest.ProtoReflect.Descriptor instead.
|
||||
func (*BatchUpsertTagRequest) Descriptor() ([]byte, []int) {
|
||||
return file_api_v2_tag_service_proto_rawDescGZIP(), []int{2}
|
||||
return file_api_v1_tag_service_proto_rawDescGZIP(), []int{2}
|
||||
}
|
||||
|
||||
func (x *BatchUpsertTagRequest) GetRequests() []*UpsertTagRequest {
|
||||
@ -182,7 +182,7 @@ type ListTagsRequest struct {
|
||||
func (x *ListTagsRequest) Reset() {
|
||||
*x = ListTagsRequest{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_api_v2_tag_service_proto_msgTypes[3]
|
||||
mi := &file_api_v1_tag_service_proto_msgTypes[3]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
@ -195,7 +195,7 @@ func (x *ListTagsRequest) String() string {
|
||||
func (*ListTagsRequest) ProtoMessage() {}
|
||||
|
||||
func (x *ListTagsRequest) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_api_v2_tag_service_proto_msgTypes[3]
|
||||
mi := &file_api_v1_tag_service_proto_msgTypes[3]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
@ -208,7 +208,7 @@ func (x *ListTagsRequest) ProtoReflect() protoreflect.Message {
|
||||
|
||||
// Deprecated: Use ListTagsRequest.ProtoReflect.Descriptor instead.
|
||||
func (*ListTagsRequest) Descriptor() ([]byte, []int) {
|
||||
return file_api_v2_tag_service_proto_rawDescGZIP(), []int{3}
|
||||
return file_api_v1_tag_service_proto_rawDescGZIP(), []int{3}
|
||||
}
|
||||
|
||||
type ListTagsResponse struct {
|
||||
@ -222,7 +222,7 @@ type ListTagsResponse struct {
|
||||
func (x *ListTagsResponse) Reset() {
|
||||
*x = ListTagsResponse{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_api_v2_tag_service_proto_msgTypes[4]
|
||||
mi := &file_api_v1_tag_service_proto_msgTypes[4]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
@ -235,7 +235,7 @@ func (x *ListTagsResponse) String() string {
|
||||
func (*ListTagsResponse) ProtoMessage() {}
|
||||
|
||||
func (x *ListTagsResponse) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_api_v2_tag_service_proto_msgTypes[4]
|
||||
mi := &file_api_v1_tag_service_proto_msgTypes[4]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
@ -248,7 +248,7 @@ func (x *ListTagsResponse) ProtoReflect() protoreflect.Message {
|
||||
|
||||
// Deprecated: Use ListTagsResponse.ProtoReflect.Descriptor instead.
|
||||
func (*ListTagsResponse) Descriptor() ([]byte, []int) {
|
||||
return file_api_v2_tag_service_proto_rawDescGZIP(), []int{4}
|
||||
return file_api_v1_tag_service_proto_rawDescGZIP(), []int{4}
|
||||
}
|
||||
|
||||
func (x *ListTagsResponse) GetTags() []*Tag {
|
||||
@ -273,7 +273,7 @@ type RenameTagRequest struct {
|
||||
func (x *RenameTagRequest) Reset() {
|
||||
*x = RenameTagRequest{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_api_v2_tag_service_proto_msgTypes[5]
|
||||
mi := &file_api_v1_tag_service_proto_msgTypes[5]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
@ -286,7 +286,7 @@ func (x *RenameTagRequest) String() string {
|
||||
func (*RenameTagRequest) ProtoMessage() {}
|
||||
|
||||
func (x *RenameTagRequest) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_api_v2_tag_service_proto_msgTypes[5]
|
||||
mi := &file_api_v1_tag_service_proto_msgTypes[5]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
@ -299,7 +299,7 @@ func (x *RenameTagRequest) ProtoReflect() protoreflect.Message {
|
||||
|
||||
// Deprecated: Use RenameTagRequest.ProtoReflect.Descriptor instead.
|
||||
func (*RenameTagRequest) Descriptor() ([]byte, []int) {
|
||||
return file_api_v2_tag_service_proto_rawDescGZIP(), []int{5}
|
||||
return file_api_v1_tag_service_proto_rawDescGZIP(), []int{5}
|
||||
}
|
||||
|
||||
func (x *RenameTagRequest) GetUser() string {
|
||||
@ -334,7 +334,7 @@ type DeleteTagRequest struct {
|
||||
func (x *DeleteTagRequest) Reset() {
|
||||
*x = DeleteTagRequest{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_api_v2_tag_service_proto_msgTypes[6]
|
||||
mi := &file_api_v1_tag_service_proto_msgTypes[6]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
@ -347,7 +347,7 @@ func (x *DeleteTagRequest) String() string {
|
||||
func (*DeleteTagRequest) ProtoMessage() {}
|
||||
|
||||
func (x *DeleteTagRequest) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_api_v2_tag_service_proto_msgTypes[6]
|
||||
mi := &file_api_v1_tag_service_proto_msgTypes[6]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
@ -360,7 +360,7 @@ func (x *DeleteTagRequest) ProtoReflect() protoreflect.Message {
|
||||
|
||||
// Deprecated: Use DeleteTagRequest.ProtoReflect.Descriptor instead.
|
||||
func (*DeleteTagRequest) Descriptor() ([]byte, []int) {
|
||||
return file_api_v2_tag_service_proto_rawDescGZIP(), []int{6}
|
||||
return file_api_v1_tag_service_proto_rawDescGZIP(), []int{6}
|
||||
}
|
||||
|
||||
func (x *DeleteTagRequest) GetTag() *Tag {
|
||||
@ -383,7 +383,7 @@ type GetTagSuggestionsRequest struct {
|
||||
func (x *GetTagSuggestionsRequest) Reset() {
|
||||
*x = GetTagSuggestionsRequest{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_api_v2_tag_service_proto_msgTypes[7]
|
||||
mi := &file_api_v1_tag_service_proto_msgTypes[7]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
@ -396,7 +396,7 @@ func (x *GetTagSuggestionsRequest) String() string {
|
||||
func (*GetTagSuggestionsRequest) ProtoMessage() {}
|
||||
|
||||
func (x *GetTagSuggestionsRequest) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_api_v2_tag_service_proto_msgTypes[7]
|
||||
mi := &file_api_v1_tag_service_proto_msgTypes[7]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
@ -409,7 +409,7 @@ func (x *GetTagSuggestionsRequest) ProtoReflect() protoreflect.Message {
|
||||
|
||||
// Deprecated: Use GetTagSuggestionsRequest.ProtoReflect.Descriptor instead.
|
||||
func (*GetTagSuggestionsRequest) Descriptor() ([]byte, []int) {
|
||||
return file_api_v2_tag_service_proto_rawDescGZIP(), []int{7}
|
||||
return file_api_v1_tag_service_proto_rawDescGZIP(), []int{7}
|
||||
}
|
||||
|
||||
func (x *GetTagSuggestionsRequest) GetUser() string {
|
||||
@ -430,7 +430,7 @@ type GetTagSuggestionsResponse struct {
|
||||
func (x *GetTagSuggestionsResponse) Reset() {
|
||||
*x = GetTagSuggestionsResponse{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_api_v2_tag_service_proto_msgTypes[8]
|
||||
mi := &file_api_v1_tag_service_proto_msgTypes[8]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
@ -443,7 +443,7 @@ func (x *GetTagSuggestionsResponse) String() string {
|
||||
func (*GetTagSuggestionsResponse) ProtoMessage() {}
|
||||
|
||||
func (x *GetTagSuggestionsResponse) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_api_v2_tag_service_proto_msgTypes[8]
|
||||
mi := &file_api_v1_tag_service_proto_msgTypes[8]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
@ -456,7 +456,7 @@ func (x *GetTagSuggestionsResponse) ProtoReflect() protoreflect.Message {
|
||||
|
||||
// Deprecated: Use GetTagSuggestionsResponse.ProtoReflect.Descriptor instead.
|
||||
func (*GetTagSuggestionsResponse) Descriptor() ([]byte, []int) {
|
||||
return file_api_v2_tag_service_proto_rawDescGZIP(), []int{8}
|
||||
return file_api_v1_tag_service_proto_rawDescGZIP(), []int{8}
|
||||
}
|
||||
|
||||
func (x *GetTagSuggestionsResponse) GetTags() []string {
|
||||
@ -466,12 +466,12 @@ func (x *GetTagSuggestionsResponse) GetTags() []string {
|
||||
return nil
|
||||
}
|
||||
|
||||
var File_api_v2_tag_service_proto protoreflect.FileDescriptor
|
||||
var File_api_v1_tag_service_proto protoreflect.FileDescriptor
|
||||
|
||||
var file_api_v2_tag_service_proto_rawDesc = []byte{
|
||||
0x0a, 0x18, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x32, 0x2f, 0x74, 0x61, 0x67, 0x5f, 0x73, 0x65, 0x72,
|
||||
var file_api_v1_tag_service_proto_rawDesc = []byte{
|
||||
0x0a, 0x18, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, 0x2f, 0x74, 0x61, 0x67, 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,
|
||||
0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 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, 0x1b, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70,
|
||||
0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x65, 0x6d, 0x70, 0x74, 0x79, 0x2e, 0x70, 0x72,
|
||||
@ -484,13 +484,13 @@ var file_api_v2_tag_service_proto_rawDesc = []byte{
|
||||
0x22, 0x53, 0x0a, 0x15, 0x42, 0x61, 0x74, 0x63, 0x68, 0x55, 0x70, 0x73, 0x65, 0x72, 0x74, 0x54,
|
||||
0x61, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x3a, 0x0a, 0x08, 0x72, 0x65, 0x71,
|
||||
0x75, 0x65, 0x73, 0x74, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x6d, 0x65,
|
||||
0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x55, 0x70, 0x73, 0x65, 0x72,
|
||||
0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x70, 0x73, 0x65, 0x72,
|
||||
0x74, 0x54, 0x61, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x52, 0x08, 0x72, 0x65, 0x71,
|
||||
0x75, 0x65, 0x73, 0x74, 0x73, 0x22, 0x11, 0x0a, 0x0f, 0x4c, 0x69, 0x73, 0x74, 0x54, 0x61, 0x67,
|
||||
0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x39, 0x0a, 0x10, 0x4c, 0x69, 0x73, 0x74,
|
||||
0x54, 0x61, 0x67, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x25, 0x0a, 0x04,
|
||||
0x74, 0x61, 0x67, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x6d, 0x65, 0x6d,
|
||||
0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x54, 0x61, 0x67, 0x52, 0x04, 0x74,
|
||||
0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x61, 0x67, 0x52, 0x04, 0x74,
|
||||
0x61, 0x67, 0x73, 0x22, 0x5c, 0x0a, 0x10, 0x52, 0x65, 0x6e, 0x61, 0x6d, 0x65, 0x54, 0x61, 0x67,
|
||||
0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x75, 0x73, 0x65, 0x72, 0x18,
|
||||
0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x75, 0x73, 0x65, 0x72, 0x12, 0x19, 0x0a, 0x08, 0x6f,
|
||||
@ -500,7 +500,7 @@ var file_api_v2_tag_service_proto_rawDesc = []byte{
|
||||
0x65, 0x22, 0x37, 0x0a, 0x10, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x54, 0x61, 0x67, 0x52, 0x65,
|
||||
0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x23, 0x0a, 0x03, 0x74, 0x61, 0x67, 0x18, 0x01, 0x20, 0x01,
|
||||
0x28, 0x0b, 0x32, 0x11, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76,
|
||||
0x32, 0x2e, 0x54, 0x61, 0x67, 0x52, 0x03, 0x74, 0x61, 0x67, 0x22, 0x2e, 0x0a, 0x18, 0x47, 0x65,
|
||||
0x31, 0x2e, 0x54, 0x61, 0x67, 0x52, 0x03, 0x74, 0x61, 0x67, 0x22, 0x2e, 0x0a, 0x18, 0x47, 0x65,
|
||||
0x74, 0x54, 0x61, 0x67, 0x53, 0x75, 0x67, 0x67, 0x65, 0x73, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52,
|
||||
0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x75, 0x73, 0x65, 0x72, 0x18, 0x01,
|
||||
0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x75, 0x73, 0x65, 0x72, 0x22, 0x2f, 0x0a, 0x19, 0x47, 0x65,
|
||||
@ -509,99 +509,99 @@ var file_api_v2_tag_service_proto_rawDesc = []byte{
|
||||
0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x04, 0x74, 0x61, 0x67, 0x73, 0x32, 0x82, 0x05, 0x0a, 0x0a,
|
||||
0x54, 0x61, 0x67, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x57, 0x0a, 0x09, 0x55, 0x70,
|
||||
0x73, 0x65, 0x72, 0x74, 0x54, 0x61, 0x67, 0x12, 0x1e, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e,
|
||||
0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x55, 0x70, 0x73, 0x65, 0x72, 0x74, 0x54, 0x61, 0x67,
|
||||
0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x70, 0x73, 0x65, 0x72, 0x74, 0x54, 0x61, 0x67,
|
||||
0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x11, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e,
|
||||
0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x54, 0x61, 0x67, 0x22, 0x17, 0x82, 0xd3, 0xe4, 0x93,
|
||||
0x02, 0x11, 0x3a, 0x01, 0x2a, 0x22, 0x0c, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x32, 0x2f, 0x74,
|
||||
0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x61, 0x67, 0x22, 0x17, 0x82, 0xd3, 0xe4, 0x93,
|
||||
0x02, 0x11, 0x3a, 0x01, 0x2a, 0x22, 0x0c, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, 0x2f, 0x74,
|
||||
0x61, 0x67, 0x73, 0x12, 0x72, 0x0a, 0x0e, 0x42, 0x61, 0x74, 0x63, 0x68, 0x55, 0x70, 0x73, 0x65,
|
||||
0x72, 0x74, 0x54, 0x61, 0x67, 0x12, 0x23, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70,
|
||||
0x69, 0x2e, 0x76, 0x32, 0x2e, 0x42, 0x61, 0x74, 0x63, 0x68, 0x55, 0x70, 0x73, 0x65, 0x72, 0x74,
|
||||
0x69, 0x2e, 0x76, 0x31, 0x2e, 0x42, 0x61, 0x74, 0x63, 0x68, 0x55, 0x70, 0x73, 0x65, 0x72, 0x74,
|
||||
0x54, 0x61, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f,
|
||||
0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70,
|
||||
0x74, 0x79, 0x22, 0x23, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1d, 0x3a, 0x01, 0x2a, 0x22, 0x18, 0x2f,
|
||||
0x61, 0x70, 0x69, 0x2f, 0x76, 0x32, 0x2f, 0x74, 0x61, 0x67, 0x73, 0x3a, 0x62, 0x61, 0x74, 0x63,
|
||||
0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, 0x2f, 0x74, 0x61, 0x67, 0x73, 0x3a, 0x62, 0x61, 0x74, 0x63,
|
||||
0x68, 0x55, 0x70, 0x73, 0x65, 0x72, 0x74, 0x12, 0x5f, 0x0a, 0x08, 0x4c, 0x69, 0x73, 0x74, 0x54,
|
||||
0x61, 0x67, 0x73, 0x12, 0x1d, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e,
|
||||
0x76, 0x32, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x54, 0x61, 0x67, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65,
|
||||
0x76, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x54, 0x61, 0x67, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65,
|
||||
0x73, 0x74, 0x1a, 0x1e, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76,
|
||||
0x32, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x54, 0x61, 0x67, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e,
|
||||
0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x54, 0x61, 0x67, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e,
|
||||
0x73, 0x65, 0x22, 0x14, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x0e, 0x12, 0x0c, 0x2f, 0x61, 0x70, 0x69,
|
||||
0x2f, 0x76, 0x32, 0x2f, 0x74, 0x61, 0x67, 0x73, 0x12, 0x63, 0x0a, 0x09, 0x52, 0x65, 0x6e, 0x61,
|
||||
0x2f, 0x76, 0x31, 0x2f, 0x74, 0x61, 0x67, 0x73, 0x12, 0x63, 0x0a, 0x09, 0x52, 0x65, 0x6e, 0x61,
|
||||
0x6d, 0x65, 0x54, 0x61, 0x67, 0x12, 0x1e, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70,
|
||||
0x69, 0x2e, 0x76, 0x32, 0x2e, 0x52, 0x65, 0x6e, 0x61, 0x6d, 0x65, 0x54, 0x61, 0x67, 0x52, 0x65,
|
||||
0x69, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x6e, 0x61, 0x6d, 0x65, 0x54, 0x61, 0x67, 0x52, 0x65,
|
||||
0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70,
|
||||
0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x1e, 0x82,
|
||||
0xd3, 0xe4, 0x93, 0x02, 0x18, 0x3a, 0x01, 0x2a, 0x32, 0x13, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76,
|
||||
0x32, 0x2f, 0x74, 0x61, 0x67, 0x73, 0x3a, 0x72, 0x65, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x59, 0x0a,
|
||||
0x31, 0x2f, 0x74, 0x61, 0x67, 0x73, 0x3a, 0x72, 0x65, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x59, 0x0a,
|
||||
0x09, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x54, 0x61, 0x67, 0x12, 0x1e, 0x2e, 0x6d, 0x65, 0x6d,
|
||||
0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65,
|
||||
0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65,
|
||||
0x54, 0x61, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f,
|
||||
0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70,
|
||||
0x74, 0x79, 0x22, 0x14, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x0e, 0x2a, 0x0c, 0x2f, 0x61, 0x70, 0x69,
|
||||
0x2f, 0x76, 0x32, 0x2f, 0x74, 0x61, 0x67, 0x73, 0x12, 0x85, 0x01, 0x0a, 0x11, 0x47, 0x65, 0x74,
|
||||
0x2f, 0x76, 0x31, 0x2f, 0x74, 0x61, 0x67, 0x73, 0x12, 0x85, 0x01, 0x0a, 0x11, 0x47, 0x65, 0x74,
|
||||
0x54, 0x61, 0x67, 0x53, 0x75, 0x67, 0x67, 0x65, 0x73, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x26,
|
||||
0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x47, 0x65,
|
||||
0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65,
|
||||
0x74, 0x54, 0x61, 0x67, 0x53, 0x75, 0x67, 0x67, 0x65, 0x73, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52,
|
||||
0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x27, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61,
|
||||
0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x47, 0x65, 0x74, 0x54, 0x61, 0x67, 0x53, 0x75, 0x67, 0x67,
|
||||
0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x54, 0x61, 0x67, 0x53, 0x75, 0x67, 0x67,
|
||||
0x65, 0x73, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22,
|
||||
0x1f, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x19, 0x12, 0x17, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x32,
|
||||
0x1f, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x19, 0x12, 0x17, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31,
|
||||
0x2f, 0x74, 0x61, 0x67, 0x73, 0x2f, 0x73, 0x75, 0x67, 0x67, 0x65, 0x73, 0x74, 0x69, 0x6f, 0x6e,
|
||||
0x42, 0xa7, 0x01, 0x0a, 0x10, 0x63, 0x6f, 0x6d, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61,
|
||||
0x70, 0x69, 0x2e, 0x76, 0x32, 0x42, 0x0f, 0x54, 0x61, 0x67, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63,
|
||||
0x70, 0x69, 0x2e, 0x76, 0x31, 0x42, 0x0f, 0x54, 0x61, 0x67, 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,
|
||||
0x69, 0x2f, 0x76, 0x31, 0x3b, 0x61, 0x70, 0x69, 0x76, 0x31, 0xa2, 0x02, 0x03, 0x4d, 0x41, 0x58,
|
||||
0xaa, 0x02, 0x0c, 0x4d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x41, 0x70, 0x69, 0x2e, 0x56, 0x31, 0xca,
|
||||
0x02, 0x0c, 0x4d, 0x65, 0x6d, 0x6f, 0x73, 0x5c, 0x41, 0x70, 0x69, 0x5c, 0x56, 0x31, 0xe2, 0x02,
|
||||
0x18, 0x4d, 0x65, 0x6d, 0x6f, 0x73, 0x5c, 0x41, 0x70, 0x69, 0x5c, 0x56, 0x31, 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,
|
||||
0x73, 0x3a, 0x3a, 0x41, 0x70, 0x69, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74,
|
||||
0x6f, 0x33,
|
||||
}
|
||||
|
||||
var (
|
||||
file_api_v2_tag_service_proto_rawDescOnce sync.Once
|
||||
file_api_v2_tag_service_proto_rawDescData = file_api_v2_tag_service_proto_rawDesc
|
||||
file_api_v1_tag_service_proto_rawDescOnce sync.Once
|
||||
file_api_v1_tag_service_proto_rawDescData = file_api_v1_tag_service_proto_rawDesc
|
||||
)
|
||||
|
||||
func file_api_v2_tag_service_proto_rawDescGZIP() []byte {
|
||||
file_api_v2_tag_service_proto_rawDescOnce.Do(func() {
|
||||
file_api_v2_tag_service_proto_rawDescData = protoimpl.X.CompressGZIP(file_api_v2_tag_service_proto_rawDescData)
|
||||
func file_api_v1_tag_service_proto_rawDescGZIP() []byte {
|
||||
file_api_v1_tag_service_proto_rawDescOnce.Do(func() {
|
||||
file_api_v1_tag_service_proto_rawDescData = protoimpl.X.CompressGZIP(file_api_v1_tag_service_proto_rawDescData)
|
||||
})
|
||||
return file_api_v2_tag_service_proto_rawDescData
|
||||
return file_api_v1_tag_service_proto_rawDescData
|
||||
}
|
||||
|
||||
var file_api_v2_tag_service_proto_msgTypes = make([]protoimpl.MessageInfo, 9)
|
||||
var file_api_v2_tag_service_proto_goTypes = []interface{}{
|
||||
(*Tag)(nil), // 0: memos.api.v2.Tag
|
||||
(*UpsertTagRequest)(nil), // 1: memos.api.v2.UpsertTagRequest
|
||||
(*BatchUpsertTagRequest)(nil), // 2: memos.api.v2.BatchUpsertTagRequest
|
||||
(*ListTagsRequest)(nil), // 3: memos.api.v2.ListTagsRequest
|
||||
(*ListTagsResponse)(nil), // 4: memos.api.v2.ListTagsResponse
|
||||
(*RenameTagRequest)(nil), // 5: memos.api.v2.RenameTagRequest
|
||||
(*DeleteTagRequest)(nil), // 6: memos.api.v2.DeleteTagRequest
|
||||
(*GetTagSuggestionsRequest)(nil), // 7: memos.api.v2.GetTagSuggestionsRequest
|
||||
(*GetTagSuggestionsResponse)(nil), // 8: memos.api.v2.GetTagSuggestionsResponse
|
||||
var file_api_v1_tag_service_proto_msgTypes = make([]protoimpl.MessageInfo, 9)
|
||||
var file_api_v1_tag_service_proto_goTypes = []interface{}{
|
||||
(*Tag)(nil), // 0: memos.api.v1.Tag
|
||||
(*UpsertTagRequest)(nil), // 1: memos.api.v1.UpsertTagRequest
|
||||
(*BatchUpsertTagRequest)(nil), // 2: memos.api.v1.BatchUpsertTagRequest
|
||||
(*ListTagsRequest)(nil), // 3: memos.api.v1.ListTagsRequest
|
||||
(*ListTagsResponse)(nil), // 4: memos.api.v1.ListTagsResponse
|
||||
(*RenameTagRequest)(nil), // 5: memos.api.v1.RenameTagRequest
|
||||
(*DeleteTagRequest)(nil), // 6: memos.api.v1.DeleteTagRequest
|
||||
(*GetTagSuggestionsRequest)(nil), // 7: memos.api.v1.GetTagSuggestionsRequest
|
||||
(*GetTagSuggestionsResponse)(nil), // 8: memos.api.v1.GetTagSuggestionsResponse
|
||||
(*emptypb.Empty)(nil), // 9: google.protobuf.Empty
|
||||
}
|
||||
var file_api_v2_tag_service_proto_depIdxs = []int32{
|
||||
1, // 0: memos.api.v2.BatchUpsertTagRequest.requests:type_name -> memos.api.v2.UpsertTagRequest
|
||||
0, // 1: memos.api.v2.ListTagsResponse.tags:type_name -> memos.api.v2.Tag
|
||||
0, // 2: memos.api.v2.DeleteTagRequest.tag:type_name -> memos.api.v2.Tag
|
||||
1, // 3: memos.api.v2.TagService.UpsertTag:input_type -> memos.api.v2.UpsertTagRequest
|
||||
2, // 4: memos.api.v2.TagService.BatchUpsertTag:input_type -> memos.api.v2.BatchUpsertTagRequest
|
||||
3, // 5: memos.api.v2.TagService.ListTags:input_type -> memos.api.v2.ListTagsRequest
|
||||
5, // 6: memos.api.v2.TagService.RenameTag:input_type -> memos.api.v2.RenameTagRequest
|
||||
6, // 7: memos.api.v2.TagService.DeleteTag:input_type -> memos.api.v2.DeleteTagRequest
|
||||
7, // 8: memos.api.v2.TagService.GetTagSuggestions:input_type -> memos.api.v2.GetTagSuggestionsRequest
|
||||
0, // 9: memos.api.v2.TagService.UpsertTag:output_type -> memos.api.v2.Tag
|
||||
9, // 10: memos.api.v2.TagService.BatchUpsertTag:output_type -> google.protobuf.Empty
|
||||
4, // 11: memos.api.v2.TagService.ListTags:output_type -> memos.api.v2.ListTagsResponse
|
||||
9, // 12: memos.api.v2.TagService.RenameTag:output_type -> google.protobuf.Empty
|
||||
9, // 13: memos.api.v2.TagService.DeleteTag:output_type -> google.protobuf.Empty
|
||||
8, // 14: memos.api.v2.TagService.GetTagSuggestions:output_type -> memos.api.v2.GetTagSuggestionsResponse
|
||||
var file_api_v1_tag_service_proto_depIdxs = []int32{
|
||||
1, // 0: memos.api.v1.BatchUpsertTagRequest.requests:type_name -> memos.api.v1.UpsertTagRequest
|
||||
0, // 1: memos.api.v1.ListTagsResponse.tags:type_name -> memos.api.v1.Tag
|
||||
0, // 2: memos.api.v1.DeleteTagRequest.tag:type_name -> memos.api.v1.Tag
|
||||
1, // 3: memos.api.v1.TagService.UpsertTag:input_type -> memos.api.v1.UpsertTagRequest
|
||||
2, // 4: memos.api.v1.TagService.BatchUpsertTag:input_type -> memos.api.v1.BatchUpsertTagRequest
|
||||
3, // 5: memos.api.v1.TagService.ListTags:input_type -> memos.api.v1.ListTagsRequest
|
||||
5, // 6: memos.api.v1.TagService.RenameTag:input_type -> memos.api.v1.RenameTagRequest
|
||||
6, // 7: memos.api.v1.TagService.DeleteTag:input_type -> memos.api.v1.DeleteTagRequest
|
||||
7, // 8: memos.api.v1.TagService.GetTagSuggestions:input_type -> memos.api.v1.GetTagSuggestionsRequest
|
||||
0, // 9: memos.api.v1.TagService.UpsertTag:output_type -> memos.api.v1.Tag
|
||||
9, // 10: memos.api.v1.TagService.BatchUpsertTag:output_type -> google.protobuf.Empty
|
||||
4, // 11: memos.api.v1.TagService.ListTags:output_type -> memos.api.v1.ListTagsResponse
|
||||
9, // 12: memos.api.v1.TagService.RenameTag:output_type -> google.protobuf.Empty
|
||||
9, // 13: memos.api.v1.TagService.DeleteTag:output_type -> google.protobuf.Empty
|
||||
8, // 14: memos.api.v1.TagService.GetTagSuggestions:output_type -> memos.api.v1.GetTagSuggestionsResponse
|
||||
9, // [9:15] is the sub-list for method output_type
|
||||
3, // [3:9] is the sub-list for method input_type
|
||||
3, // [3:3] is the sub-list for extension type_name
|
||||
@ -609,13 +609,13 @@ var file_api_v2_tag_service_proto_depIdxs = []int32{
|
||||
0, // [0:3] is the sub-list for field type_name
|
||||
}
|
||||
|
||||
func init() { file_api_v2_tag_service_proto_init() }
|
||||
func file_api_v2_tag_service_proto_init() {
|
||||
if File_api_v2_tag_service_proto != nil {
|
||||
func init() { file_api_v1_tag_service_proto_init() }
|
||||
func file_api_v1_tag_service_proto_init() {
|
||||
if File_api_v1_tag_service_proto != nil {
|
||||
return
|
||||
}
|
||||
if !protoimpl.UnsafeEnabled {
|
||||
file_api_v2_tag_service_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
|
||||
file_api_v1_tag_service_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*Tag); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
@ -627,7 +627,7 @@ func file_api_v2_tag_service_proto_init() {
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_api_v2_tag_service_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
|
||||
file_api_v1_tag_service_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*UpsertTagRequest); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
@ -639,7 +639,7 @@ func file_api_v2_tag_service_proto_init() {
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_api_v2_tag_service_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
|
||||
file_api_v1_tag_service_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*BatchUpsertTagRequest); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
@ -651,7 +651,7 @@ func file_api_v2_tag_service_proto_init() {
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_api_v2_tag_service_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} {
|
||||
file_api_v1_tag_service_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*ListTagsRequest); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
@ -663,7 +663,7 @@ func file_api_v2_tag_service_proto_init() {
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_api_v2_tag_service_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} {
|
||||
file_api_v1_tag_service_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*ListTagsResponse); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
@ -675,7 +675,7 @@ func file_api_v2_tag_service_proto_init() {
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_api_v2_tag_service_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} {
|
||||
file_api_v1_tag_service_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*RenameTagRequest); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
@ -687,7 +687,7 @@ func file_api_v2_tag_service_proto_init() {
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_api_v2_tag_service_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} {
|
||||
file_api_v1_tag_service_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*DeleteTagRequest); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
@ -699,7 +699,7 @@ func file_api_v2_tag_service_proto_init() {
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_api_v2_tag_service_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} {
|
||||
file_api_v1_tag_service_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*GetTagSuggestionsRequest); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
@ -711,7 +711,7 @@ func file_api_v2_tag_service_proto_init() {
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_api_v2_tag_service_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} {
|
||||
file_api_v1_tag_service_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*GetTagSuggestionsResponse); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
@ -728,18 +728,18 @@ func file_api_v2_tag_service_proto_init() {
|
||||
out := protoimpl.TypeBuilder{
|
||||
File: protoimpl.DescBuilder{
|
||||
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
|
||||
RawDescriptor: file_api_v2_tag_service_proto_rawDesc,
|
||||
RawDescriptor: file_api_v1_tag_service_proto_rawDesc,
|
||||
NumEnums: 0,
|
||||
NumMessages: 9,
|
||||
NumExtensions: 0,
|
||||
NumServices: 1,
|
||||
},
|
||||
GoTypes: file_api_v2_tag_service_proto_goTypes,
|
||||
DependencyIndexes: file_api_v2_tag_service_proto_depIdxs,
|
||||
MessageInfos: file_api_v2_tag_service_proto_msgTypes,
|
||||
GoTypes: file_api_v1_tag_service_proto_goTypes,
|
||||
DependencyIndexes: file_api_v1_tag_service_proto_depIdxs,
|
||||
MessageInfos: file_api_v1_tag_service_proto_msgTypes,
|
||||
}.Build()
|
||||
File_api_v2_tag_service_proto = out.File
|
||||
file_api_v2_tag_service_proto_rawDesc = nil
|
||||
file_api_v2_tag_service_proto_goTypes = nil
|
||||
file_api_v2_tag_service_proto_depIdxs = nil
|
||||
File_api_v1_tag_service_proto = out.File
|
||||
file_api_v1_tag_service_proto_rawDesc = nil
|
||||
file_api_v1_tag_service_proto_goTypes = nil
|
||||
file_api_v1_tag_service_proto_depIdxs = nil
|
||||
}
|
@ -1,12 +1,12 @@
|
||||
// Code generated by protoc-gen-grpc-gateway. DO NOT EDIT.
|
||||
// source: api/v2/tag_service.proto
|
||||
// source: api/v1/tag_service.proto
|
||||
|
||||
/*
|
||||
Package apiv2 is a reverse proxy.
|
||||
Package apiv1 is a reverse proxy.
|
||||
|
||||
It translates gRPC into RESTful JSON APIs.
|
||||
*/
|
||||
package apiv2
|
||||
package apiv1
|
||||
|
||||
import (
|
||||
"context"
|
||||
@ -213,7 +213,7 @@ func RegisterTagServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux,
|
||||
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
||||
var err error
|
||||
var annotatedContext context.Context
|
||||
annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/memos.api.v2.TagService/UpsertTag", runtime.WithHTTPPathPattern("/api/v2/tags"))
|
||||
annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/memos.api.v1.TagService/UpsertTag", runtime.WithHTTPPathPattern("/api/v1/tags"))
|
||||
if err != nil {
|
||||
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||
return
|
||||
@ -238,7 +238,7 @@ func RegisterTagServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux,
|
||||
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
||||
var err error
|
||||
var annotatedContext context.Context
|
||||
annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/memos.api.v2.TagService/BatchUpsertTag", runtime.WithHTTPPathPattern("/api/v2/tags:batchUpsert"))
|
||||
annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/memos.api.v1.TagService/BatchUpsertTag", runtime.WithHTTPPathPattern("/api/v1/tags:batchUpsert"))
|
||||
if err != nil {
|
||||
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||
return
|
||||
@ -263,7 +263,7 @@ func RegisterTagServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux,
|
||||
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
||||
var err error
|
||||
var annotatedContext context.Context
|
||||
annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/memos.api.v2.TagService/ListTags", runtime.WithHTTPPathPattern("/api/v2/tags"))
|
||||
annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/memos.api.v1.TagService/ListTags", runtime.WithHTTPPathPattern("/api/v1/tags"))
|
||||
if err != nil {
|
||||
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||
return
|
||||
@ -288,7 +288,7 @@ func RegisterTagServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux,
|
||||
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
||||
var err error
|
||||
var annotatedContext context.Context
|
||||
annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/memos.api.v2.TagService/RenameTag", runtime.WithHTTPPathPattern("/api/v2/tags:rename"))
|
||||
annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/memos.api.v1.TagService/RenameTag", runtime.WithHTTPPathPattern("/api/v1/tags:rename"))
|
||||
if err != nil {
|
||||
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||
return
|
||||
@ -313,7 +313,7 @@ func RegisterTagServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux,
|
||||
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
||||
var err error
|
||||
var annotatedContext context.Context
|
||||
annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/memos.api.v2.TagService/DeleteTag", runtime.WithHTTPPathPattern("/api/v2/tags"))
|
||||
annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/memos.api.v1.TagService/DeleteTag", runtime.WithHTTPPathPattern("/api/v1/tags"))
|
||||
if err != nil {
|
||||
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||
return
|
||||
@ -338,7 +338,7 @@ func RegisterTagServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux,
|
||||
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
||||
var err error
|
||||
var annotatedContext context.Context
|
||||
annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/memos.api.v2.TagService/GetTagSuggestions", runtime.WithHTTPPathPattern("/api/v2/tags/suggestion"))
|
||||
annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/memos.api.v1.TagService/GetTagSuggestions", runtime.WithHTTPPathPattern("/api/v1/tags/suggestion"))
|
||||
if err != nil {
|
||||
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||
return
|
||||
@ -402,7 +402,7 @@ func RegisterTagServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux,
|
||||
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
||||
var err error
|
||||
var annotatedContext context.Context
|
||||
annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/memos.api.v2.TagService/UpsertTag", runtime.WithHTTPPathPattern("/api/v2/tags"))
|
||||
annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/memos.api.v1.TagService/UpsertTag", runtime.WithHTTPPathPattern("/api/v1/tags"))
|
||||
if err != nil {
|
||||
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||
return
|
||||
@ -424,7 +424,7 @@ func RegisterTagServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux,
|
||||
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
||||
var err error
|
||||
var annotatedContext context.Context
|
||||
annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/memos.api.v2.TagService/BatchUpsertTag", runtime.WithHTTPPathPattern("/api/v2/tags:batchUpsert"))
|
||||
annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/memos.api.v1.TagService/BatchUpsertTag", runtime.WithHTTPPathPattern("/api/v1/tags:batchUpsert"))
|
||||
if err != nil {
|
||||
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||
return
|
||||
@ -446,7 +446,7 @@ func RegisterTagServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux,
|
||||
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
||||
var err error
|
||||
var annotatedContext context.Context
|
||||
annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/memos.api.v2.TagService/ListTags", runtime.WithHTTPPathPattern("/api/v2/tags"))
|
||||
annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/memos.api.v1.TagService/ListTags", runtime.WithHTTPPathPattern("/api/v1/tags"))
|
||||
if err != nil {
|
||||
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||
return
|
||||
@ -468,7 +468,7 @@ func RegisterTagServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux,
|
||||
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
||||
var err error
|
||||
var annotatedContext context.Context
|
||||
annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/memos.api.v2.TagService/RenameTag", runtime.WithHTTPPathPattern("/api/v2/tags:rename"))
|
||||
annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/memos.api.v1.TagService/RenameTag", runtime.WithHTTPPathPattern("/api/v1/tags:rename"))
|
||||
if err != nil {
|
||||
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||
return
|
||||
@ -490,7 +490,7 @@ func RegisterTagServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux,
|
||||
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
||||
var err error
|
||||
var annotatedContext context.Context
|
||||
annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/memos.api.v2.TagService/DeleteTag", runtime.WithHTTPPathPattern("/api/v2/tags"))
|
||||
annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/memos.api.v1.TagService/DeleteTag", runtime.WithHTTPPathPattern("/api/v1/tags"))
|
||||
if err != nil {
|
||||
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||
return
|
||||
@ -512,7 +512,7 @@ func RegisterTagServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux,
|
||||
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
||||
var err error
|
||||
var annotatedContext context.Context
|
||||
annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/memos.api.v2.TagService/GetTagSuggestions", runtime.WithHTTPPathPattern("/api/v2/tags/suggestion"))
|
||||
annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/memos.api.v1.TagService/GetTagSuggestions", runtime.WithHTTPPathPattern("/api/v1/tags/suggestion"))
|
||||
if err != nil {
|
||||
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||
return
|
||||
@ -532,17 +532,17 @@ func RegisterTagServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux,
|
||||
}
|
||||
|
||||
var (
|
||||
pattern_TagService_UpsertTag_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"api", "v2", "tags"}, ""))
|
||||
pattern_TagService_UpsertTag_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"api", "v1", "tags"}, ""))
|
||||
|
||||
pattern_TagService_BatchUpsertTag_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"api", "v2", "tags"}, "batchUpsert"))
|
||||
pattern_TagService_BatchUpsertTag_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"api", "v1", "tags"}, "batchUpsert"))
|
||||
|
||||
pattern_TagService_ListTags_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"api", "v2", "tags"}, ""))
|
||||
pattern_TagService_ListTags_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"api", "v1", "tags"}, ""))
|
||||
|
||||
pattern_TagService_RenameTag_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"api", "v2", "tags"}, "rename"))
|
||||
pattern_TagService_RenameTag_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"api", "v1", "tags"}, "rename"))
|
||||
|
||||
pattern_TagService_DeleteTag_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"api", "v2", "tags"}, ""))
|
||||
pattern_TagService_DeleteTag_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"api", "v1", "tags"}, ""))
|
||||
|
||||
pattern_TagService_GetTagSuggestions_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"api", "v2", "tags", "suggestion"}, ""))
|
||||
pattern_TagService_GetTagSuggestions_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"api", "v1", "tags", "suggestion"}, ""))
|
||||
)
|
||||
|
||||
var (
|
@ -2,9 +2,9 @@
|
||||
// versions:
|
||||
// - protoc-gen-go-grpc v1.3.0
|
||||
// - protoc (unknown)
|
||||
// source: api/v2/tag_service.proto
|
||||
// source: api/v1/tag_service.proto
|
||||
|
||||
package apiv2
|
||||
package apiv1
|
||||
|
||||
import (
|
||||
context "context"
|
||||
@ -20,12 +20,12 @@ import (
|
||||
const _ = grpc.SupportPackageIsVersion7
|
||||
|
||||
const (
|
||||
TagService_UpsertTag_FullMethodName = "/memos.api.v2.TagService/UpsertTag"
|
||||
TagService_BatchUpsertTag_FullMethodName = "/memos.api.v2.TagService/BatchUpsertTag"
|
||||
TagService_ListTags_FullMethodName = "/memos.api.v2.TagService/ListTags"
|
||||
TagService_RenameTag_FullMethodName = "/memos.api.v2.TagService/RenameTag"
|
||||
TagService_DeleteTag_FullMethodName = "/memos.api.v2.TagService/DeleteTag"
|
||||
TagService_GetTagSuggestions_FullMethodName = "/memos.api.v2.TagService/GetTagSuggestions"
|
||||
TagService_UpsertTag_FullMethodName = "/memos.api.v1.TagService/UpsertTag"
|
||||
TagService_BatchUpsertTag_FullMethodName = "/memos.api.v1.TagService/BatchUpsertTag"
|
||||
TagService_ListTags_FullMethodName = "/memos.api.v1.TagService/ListTags"
|
||||
TagService_RenameTag_FullMethodName = "/memos.api.v1.TagService/RenameTag"
|
||||
TagService_DeleteTag_FullMethodName = "/memos.api.v1.TagService/DeleteTag"
|
||||
TagService_GetTagSuggestions_FullMethodName = "/memos.api.v1.TagService/GetTagSuggestions"
|
||||
)
|
||||
|
||||
// TagServiceClient is the client API for TagService service.
|
||||
@ -276,7 +276,7 @@ func _TagService_GetTagSuggestions_Handler(srv interface{}, ctx context.Context,
|
||||
// It's only intended for direct use with grpc.RegisterService,
|
||||
// and not to be introspected or modified (even as a copy)
|
||||
var TagService_ServiceDesc = grpc.ServiceDesc{
|
||||
ServiceName: "memos.api.v2.TagService",
|
||||
ServiceName: "memos.api.v1.TagService",
|
||||
HandlerType: (*TagServiceServer)(nil),
|
||||
Methods: []grpc.MethodDesc{
|
||||
{
|
||||
@ -305,5 +305,5 @@ var TagService_ServiceDesc = grpc.ServiceDesc{
|
||||
},
|
||||
},
|
||||
Streams: []grpc.StreamDesc{},
|
||||
Metadata: "api/v2/tag_service.proto",
|
||||
Metadata: "api/v1/tag_service.proto",
|
||||
}
|
File diff suppressed because it is too large
Load Diff
@ -1,12 +1,12 @@
|
||||
// Code generated by protoc-gen-grpc-gateway. DO NOT EDIT.
|
||||
// source: api/v2/user_service.proto
|
||||
// source: api/v1/user_service.proto
|
||||
|
||||
/*
|
||||
Package apiv2 is a reverse proxy.
|
||||
Package apiv1 is a reverse proxy.
|
||||
|
||||
It translates gRPC into RESTful JSON APIs.
|
||||
*/
|
||||
package apiv2
|
||||
package apiv1
|
||||
|
||||
import (
|
||||
"context"
|
||||
@ -665,7 +665,7 @@ func RegisterUserServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux
|
||||
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
||||
var err error
|
||||
var annotatedContext context.Context
|
||||
annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/memos.api.v2.UserService/ListUsers", runtime.WithHTTPPathPattern("/api/v2/users"))
|
||||
annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/memos.api.v1.UserService/ListUsers", runtime.WithHTTPPathPattern("/api/v1/users"))
|
||||
if err != nil {
|
||||
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||
return
|
||||
@ -690,7 +690,7 @@ func RegisterUserServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux
|
||||
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
||||
var err error
|
||||
var annotatedContext context.Context
|
||||
annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/memos.api.v2.UserService/SearchUsers", runtime.WithHTTPPathPattern("/api/v2/users:search"))
|
||||
annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/memos.api.v1.UserService/SearchUsers", runtime.WithHTTPPathPattern("/api/v1/users:search"))
|
||||
if err != nil {
|
||||
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||
return
|
||||
@ -715,7 +715,7 @@ func RegisterUserServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux
|
||||
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
||||
var err error
|
||||
var annotatedContext context.Context
|
||||
annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/memos.api.v2.UserService/GetUser", runtime.WithHTTPPathPattern("/api/v2/{name=users/*}"))
|
||||
annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/memos.api.v1.UserService/GetUser", runtime.WithHTTPPathPattern("/api/v1/{name=users/*}"))
|
||||
if err != nil {
|
||||
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||
return
|
||||
@ -740,7 +740,7 @@ func RegisterUserServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux
|
||||
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
||||
var err error
|
||||
var annotatedContext context.Context
|
||||
annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/memos.api.v2.UserService/CreateUser", runtime.WithHTTPPathPattern("/api/v2/users"))
|
||||
annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/memos.api.v1.UserService/CreateUser", runtime.WithHTTPPathPattern("/api/v1/users"))
|
||||
if err != nil {
|
||||
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||
return
|
||||
@ -765,7 +765,7 @@ func RegisterUserServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux
|
||||
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
||||
var err error
|
||||
var annotatedContext context.Context
|
||||
annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/memos.api.v2.UserService/UpdateUser", runtime.WithHTTPPathPattern("/api/v2/{user.name=users/*}"))
|
||||
annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/memos.api.v1.UserService/UpdateUser", runtime.WithHTTPPathPattern("/api/v1/{user.name=users/*}"))
|
||||
if err != nil {
|
||||
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||
return
|
||||
@ -790,7 +790,7 @@ func RegisterUserServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux
|
||||
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
||||
var err error
|
||||
var annotatedContext context.Context
|
||||
annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/memos.api.v2.UserService/DeleteUser", runtime.WithHTTPPathPattern("/api/v2/{name=users/*}"))
|
||||
annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/memos.api.v1.UserService/DeleteUser", runtime.WithHTTPPathPattern("/api/v1/{name=users/*}"))
|
||||
if err != nil {
|
||||
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||
return
|
||||
@ -815,7 +815,7 @@ func RegisterUserServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux
|
||||
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
||||
var err error
|
||||
var annotatedContext context.Context
|
||||
annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/memos.api.v2.UserService/GetUserSetting", runtime.WithHTTPPathPattern("/api/v2/{name=users/*}/setting"))
|
||||
annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/memos.api.v1.UserService/GetUserSetting", runtime.WithHTTPPathPattern("/api/v1/{name=users/*}/setting"))
|
||||
if err != nil {
|
||||
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||
return
|
||||
@ -840,7 +840,7 @@ func RegisterUserServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux
|
||||
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
||||
var err error
|
||||
var annotatedContext context.Context
|
||||
annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/memos.api.v2.UserService/UpdateUserSetting", runtime.WithHTTPPathPattern("/api/v2/{setting.name=users/*/setting}"))
|
||||
annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/memos.api.v1.UserService/UpdateUserSetting", runtime.WithHTTPPathPattern("/api/v1/{setting.name=users/*/setting}"))
|
||||
if err != nil {
|
||||
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||
return
|
||||
@ -865,7 +865,7 @@ func RegisterUserServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux
|
||||
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
||||
var err error
|
||||
var annotatedContext context.Context
|
||||
annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/memos.api.v2.UserService/ListUserAccessTokens", runtime.WithHTTPPathPattern("/api/v2/{name=users/*}/access_tokens"))
|
||||
annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/memos.api.v1.UserService/ListUserAccessTokens", runtime.WithHTTPPathPattern("/api/v1/{name=users/*}/access_tokens"))
|
||||
if err != nil {
|
||||
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||
return
|
||||
@ -890,7 +890,7 @@ func RegisterUserServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux
|
||||
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
||||
var err error
|
||||
var annotatedContext context.Context
|
||||
annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/memos.api.v2.UserService/CreateUserAccessToken", runtime.WithHTTPPathPattern("/api/v2/{name=users/*}/access_tokens"))
|
||||
annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/memos.api.v1.UserService/CreateUserAccessToken", runtime.WithHTTPPathPattern("/api/v1/{name=users/*}/access_tokens"))
|
||||
if err != nil {
|
||||
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||
return
|
||||
@ -915,7 +915,7 @@ func RegisterUserServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux
|
||||
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
||||
var err error
|
||||
var annotatedContext context.Context
|
||||
annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/memos.api.v2.UserService/DeleteUserAccessToken", runtime.WithHTTPPathPattern("/api/v2/{name=users/*}/access_tokens/{access_token}"))
|
||||
annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/memos.api.v1.UserService/DeleteUserAccessToken", runtime.WithHTTPPathPattern("/api/v1/{name=users/*}/access_tokens/{access_token}"))
|
||||
if err != nil {
|
||||
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||
return
|
||||
@ -979,7 +979,7 @@ func RegisterUserServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux
|
||||
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
||||
var err error
|
||||
var annotatedContext context.Context
|
||||
annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/memos.api.v2.UserService/ListUsers", runtime.WithHTTPPathPattern("/api/v2/users"))
|
||||
annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/memos.api.v1.UserService/ListUsers", runtime.WithHTTPPathPattern("/api/v1/users"))
|
||||
if err != nil {
|
||||
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||
return
|
||||
@ -1001,7 +1001,7 @@ func RegisterUserServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux
|
||||
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
||||
var err error
|
||||
var annotatedContext context.Context
|
||||
annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/memos.api.v2.UserService/SearchUsers", runtime.WithHTTPPathPattern("/api/v2/users:search"))
|
||||
annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/memos.api.v1.UserService/SearchUsers", runtime.WithHTTPPathPattern("/api/v1/users:search"))
|
||||
if err != nil {
|
||||
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||
return
|
||||
@ -1023,7 +1023,7 @@ func RegisterUserServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux
|
||||
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
||||
var err error
|
||||
var annotatedContext context.Context
|
||||
annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/memos.api.v2.UserService/GetUser", runtime.WithHTTPPathPattern("/api/v2/{name=users/*}"))
|
||||
annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/memos.api.v1.UserService/GetUser", runtime.WithHTTPPathPattern("/api/v1/{name=users/*}"))
|
||||
if err != nil {
|
||||
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||
return
|
||||
@ -1045,7 +1045,7 @@ func RegisterUserServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux
|
||||
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
||||
var err error
|
||||
var annotatedContext context.Context
|
||||
annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/memos.api.v2.UserService/CreateUser", runtime.WithHTTPPathPattern("/api/v2/users"))
|
||||
annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/memos.api.v1.UserService/CreateUser", runtime.WithHTTPPathPattern("/api/v1/users"))
|
||||
if err != nil {
|
||||
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||
return
|
||||
@ -1067,7 +1067,7 @@ func RegisterUserServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux
|
||||
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
||||
var err error
|
||||
var annotatedContext context.Context
|
||||
annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/memos.api.v2.UserService/UpdateUser", runtime.WithHTTPPathPattern("/api/v2/{user.name=users/*}"))
|
||||
annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/memos.api.v1.UserService/UpdateUser", runtime.WithHTTPPathPattern("/api/v1/{user.name=users/*}"))
|
||||
if err != nil {
|
||||
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||
return
|
||||
@ -1089,7 +1089,7 @@ func RegisterUserServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux
|
||||
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
||||
var err error
|
||||
var annotatedContext context.Context
|
||||
annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/memos.api.v2.UserService/DeleteUser", runtime.WithHTTPPathPattern("/api/v2/{name=users/*}"))
|
||||
annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/memos.api.v1.UserService/DeleteUser", runtime.WithHTTPPathPattern("/api/v1/{name=users/*}"))
|
||||
if err != nil {
|
||||
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||
return
|
||||
@ -1111,7 +1111,7 @@ func RegisterUserServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux
|
||||
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
||||
var err error
|
||||
var annotatedContext context.Context
|
||||
annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/memos.api.v2.UserService/GetUserSetting", runtime.WithHTTPPathPattern("/api/v2/{name=users/*}/setting"))
|
||||
annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/memos.api.v1.UserService/GetUserSetting", runtime.WithHTTPPathPattern("/api/v1/{name=users/*}/setting"))
|
||||
if err != nil {
|
||||
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||
return
|
||||
@ -1133,7 +1133,7 @@ func RegisterUserServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux
|
||||
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
||||
var err error
|
||||
var annotatedContext context.Context
|
||||
annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/memos.api.v2.UserService/UpdateUserSetting", runtime.WithHTTPPathPattern("/api/v2/{setting.name=users/*/setting}"))
|
||||
annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/memos.api.v1.UserService/UpdateUserSetting", runtime.WithHTTPPathPattern("/api/v1/{setting.name=users/*/setting}"))
|
||||
if err != nil {
|
||||
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||
return
|
||||
@ -1155,7 +1155,7 @@ func RegisterUserServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux
|
||||
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
||||
var err error
|
||||
var annotatedContext context.Context
|
||||
annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/memos.api.v2.UserService/ListUserAccessTokens", runtime.WithHTTPPathPattern("/api/v2/{name=users/*}/access_tokens"))
|
||||
annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/memos.api.v1.UserService/ListUserAccessTokens", runtime.WithHTTPPathPattern("/api/v1/{name=users/*}/access_tokens"))
|
||||
if err != nil {
|
||||
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||
return
|
||||
@ -1177,7 +1177,7 @@ func RegisterUserServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux
|
||||
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
||||
var err error
|
||||
var annotatedContext context.Context
|
||||
annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/memos.api.v2.UserService/CreateUserAccessToken", runtime.WithHTTPPathPattern("/api/v2/{name=users/*}/access_tokens"))
|
||||
annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/memos.api.v1.UserService/CreateUserAccessToken", runtime.WithHTTPPathPattern("/api/v1/{name=users/*}/access_tokens"))
|
||||
if err != nil {
|
||||
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||
return
|
||||
@ -1199,7 +1199,7 @@ func RegisterUserServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux
|
||||
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
||||
var err error
|
||||
var annotatedContext context.Context
|
||||
annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/memos.api.v2.UserService/DeleteUserAccessToken", runtime.WithHTTPPathPattern("/api/v2/{name=users/*}/access_tokens/{access_token}"))
|
||||
annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/memos.api.v1.UserService/DeleteUserAccessToken", runtime.WithHTTPPathPattern("/api/v1/{name=users/*}/access_tokens/{access_token}"))
|
||||
if err != nil {
|
||||
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||
return
|
||||
@ -1219,27 +1219,27 @@ func RegisterUserServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux
|
||||
}
|
||||
|
||||
var (
|
||||
pattern_UserService_ListUsers_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"api", "v2", "users"}, ""))
|
||||
pattern_UserService_ListUsers_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"api", "v1", "users"}, ""))
|
||||
|
||||
pattern_UserService_SearchUsers_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"api", "v2", "users"}, "search"))
|
||||
pattern_UserService_SearchUsers_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"api", "v1", "users"}, "search"))
|
||||
|
||||
pattern_UserService_GetUser_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 2, 5, 3}, []string{"api", "v2", "users", "name"}, ""))
|
||||
pattern_UserService_GetUser_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 2, 5, 3}, []string{"api", "v1", "users", "name"}, ""))
|
||||
|
||||
pattern_UserService_CreateUser_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"api", "v2", "users"}, ""))
|
||||
pattern_UserService_CreateUser_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"api", "v1", "users"}, ""))
|
||||
|
||||
pattern_UserService_UpdateUser_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 2, 5, 3}, []string{"api", "v2", "users", "user.name"}, ""))
|
||||
pattern_UserService_UpdateUser_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 2, 5, 3}, []string{"api", "v1", "users", "user.name"}, ""))
|
||||
|
||||
pattern_UserService_DeleteUser_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 2, 5, 3}, []string{"api", "v2", "users", "name"}, ""))
|
||||
pattern_UserService_DeleteUser_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 2, 5, 3}, []string{"api", "v1", "users", "name"}, ""))
|
||||
|
||||
pattern_UserService_GetUserSetting_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 2, 5, 3, 2, 4}, []string{"api", "v2", "users", "name", "setting"}, ""))
|
||||
pattern_UserService_GetUserSetting_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 2, 5, 3, 2, 4}, []string{"api", "v1", "users", "name", "setting"}, ""))
|
||||
|
||||
pattern_UserService_UpdateUserSetting_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 2, 3, 4, 3, 5, 4}, []string{"api", "v2", "users", "setting", "setting.name"}, ""))
|
||||
pattern_UserService_UpdateUserSetting_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 2, 3, 4, 3, 5, 4}, []string{"api", "v1", "users", "setting", "setting.name"}, ""))
|
||||
|
||||
pattern_UserService_ListUserAccessTokens_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 2, 5, 3, 2, 4}, []string{"api", "v2", "users", "name", "access_tokens"}, ""))
|
||||
pattern_UserService_ListUserAccessTokens_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 2, 5, 3, 2, 4}, []string{"api", "v1", "users", "name", "access_tokens"}, ""))
|
||||
|
||||
pattern_UserService_CreateUserAccessToken_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 2, 5, 3, 2, 4}, []string{"api", "v2", "users", "name", "access_tokens"}, ""))
|
||||
pattern_UserService_CreateUserAccessToken_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 2, 5, 3, 2, 4}, []string{"api", "v1", "users", "name", "access_tokens"}, ""))
|
||||
|
||||
pattern_UserService_DeleteUserAccessToken_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 2, 5, 3, 2, 4, 1, 0, 4, 1, 5, 5}, []string{"api", "v2", "users", "name", "access_tokens", "access_token"}, ""))
|
||||
pattern_UserService_DeleteUserAccessToken_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 2, 5, 3, 2, 4, 1, 0, 4, 1, 5, 5}, []string{"api", "v1", "users", "name", "access_tokens", "access_token"}, ""))
|
||||
)
|
||||
|
||||
var (
|
@ -2,9 +2,9 @@
|
||||
// versions:
|
||||
// - protoc-gen-go-grpc v1.3.0
|
||||
// - protoc (unknown)
|
||||
// source: api/v2/user_service.proto
|
||||
// source: api/v1/user_service.proto
|
||||
|
||||
package apiv2
|
||||
package apiv1
|
||||
|
||||
import (
|
||||
context "context"
|
||||
@ -20,17 +20,17 @@ import (
|
||||
const _ = grpc.SupportPackageIsVersion7
|
||||
|
||||
const (
|
||||
UserService_ListUsers_FullMethodName = "/memos.api.v2.UserService/ListUsers"
|
||||
UserService_SearchUsers_FullMethodName = "/memos.api.v2.UserService/SearchUsers"
|
||||
UserService_GetUser_FullMethodName = "/memos.api.v2.UserService/GetUser"
|
||||
UserService_CreateUser_FullMethodName = "/memos.api.v2.UserService/CreateUser"
|
||||
UserService_UpdateUser_FullMethodName = "/memos.api.v2.UserService/UpdateUser"
|
||||
UserService_DeleteUser_FullMethodName = "/memos.api.v2.UserService/DeleteUser"
|
||||
UserService_GetUserSetting_FullMethodName = "/memos.api.v2.UserService/GetUserSetting"
|
||||
UserService_UpdateUserSetting_FullMethodName = "/memos.api.v2.UserService/UpdateUserSetting"
|
||||
UserService_ListUserAccessTokens_FullMethodName = "/memos.api.v2.UserService/ListUserAccessTokens"
|
||||
UserService_CreateUserAccessToken_FullMethodName = "/memos.api.v2.UserService/CreateUserAccessToken"
|
||||
UserService_DeleteUserAccessToken_FullMethodName = "/memos.api.v2.UserService/DeleteUserAccessToken"
|
||||
UserService_ListUsers_FullMethodName = "/memos.api.v1.UserService/ListUsers"
|
||||
UserService_SearchUsers_FullMethodName = "/memos.api.v1.UserService/SearchUsers"
|
||||
UserService_GetUser_FullMethodName = "/memos.api.v1.UserService/GetUser"
|
||||
UserService_CreateUser_FullMethodName = "/memos.api.v1.UserService/CreateUser"
|
||||
UserService_UpdateUser_FullMethodName = "/memos.api.v1.UserService/UpdateUser"
|
||||
UserService_DeleteUser_FullMethodName = "/memos.api.v1.UserService/DeleteUser"
|
||||
UserService_GetUserSetting_FullMethodName = "/memos.api.v1.UserService/GetUserSetting"
|
||||
UserService_UpdateUserSetting_FullMethodName = "/memos.api.v1.UserService/UpdateUserSetting"
|
||||
UserService_ListUserAccessTokens_FullMethodName = "/memos.api.v1.UserService/ListUserAccessTokens"
|
||||
UserService_CreateUserAccessToken_FullMethodName = "/memos.api.v1.UserService/CreateUserAccessToken"
|
||||
UserService_DeleteUserAccessToken_FullMethodName = "/memos.api.v1.UserService/DeleteUserAccessToken"
|
||||
)
|
||||
|
||||
// UserServiceClient is the client API for UserService service.
|
||||
@ -449,7 +449,7 @@ func _UserService_DeleteUserAccessToken_Handler(srv interface{}, ctx context.Con
|
||||
// It's only intended for direct use with grpc.RegisterService,
|
||||
// and not to be introspected or modified (even as a copy)
|
||||
var UserService_ServiceDesc = grpc.ServiceDesc{
|
||||
ServiceName: "memos.api.v2.UserService",
|
||||
ServiceName: "memos.api.v1.UserService",
|
||||
HandlerType: (*UserServiceServer)(nil),
|
||||
Methods: []grpc.MethodDesc{
|
||||
{
|
||||
@ -498,5 +498,5 @@ var UserService_ServiceDesc = grpc.ServiceDesc{
|
||||
},
|
||||
},
|
||||
Streams: []grpc.StreamDesc{},
|
||||
Metadata: "api/v2/user_service.proto",
|
||||
Metadata: "api/v1/user_service.proto",
|
||||
}
|
@ -2,9 +2,9 @@
|
||||
// versions:
|
||||
// protoc-gen-go v1.33.0
|
||||
// protoc (unknown)
|
||||
// source: api/v2/webhook_service.proto
|
||||
// source: api/v1/webhook_service.proto
|
||||
|
||||
package apiv2
|
||||
package apiv1
|
||||
|
||||
import (
|
||||
_ "google.golang.org/genproto/googleapis/api/annotations"
|
||||
@ -33,7 +33,7 @@ type Webhook struct {
|
||||
CreatorId int32 `protobuf:"varint,2,opt,name=creator_id,json=creatorId,proto3" json:"creator_id,omitempty"`
|
||||
CreatedTime *timestamppb.Timestamp `protobuf:"bytes,3,opt,name=created_time,json=createdTime,proto3" json:"created_time,omitempty"`
|
||||
UpdatedTime *timestamppb.Timestamp `protobuf:"bytes,4,opt,name=updated_time,json=updatedTime,proto3" json:"updated_time,omitempty"`
|
||||
RowStatus RowStatus `protobuf:"varint,5,opt,name=row_status,json=rowStatus,proto3,enum=memos.api.v2.RowStatus" json:"row_status,omitempty"`
|
||||
RowStatus RowStatus `protobuf:"varint,5,opt,name=row_status,json=rowStatus,proto3,enum=memos.api.v1.RowStatus" json:"row_status,omitempty"`
|
||||
Name string `protobuf:"bytes,6,opt,name=name,proto3" json:"name,omitempty"`
|
||||
Url string `protobuf:"bytes,7,opt,name=url,proto3" json:"url,omitempty"`
|
||||
}
|
||||
@ -41,7 +41,7 @@ type Webhook struct {
|
||||
func (x *Webhook) Reset() {
|
||||
*x = Webhook{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_api_v2_webhook_service_proto_msgTypes[0]
|
||||
mi := &file_api_v1_webhook_service_proto_msgTypes[0]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
@ -54,7 +54,7 @@ func (x *Webhook) String() string {
|
||||
func (*Webhook) ProtoMessage() {}
|
||||
|
||||
func (x *Webhook) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_api_v2_webhook_service_proto_msgTypes[0]
|
||||
mi := &file_api_v1_webhook_service_proto_msgTypes[0]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
@ -67,7 +67,7 @@ func (x *Webhook) ProtoReflect() protoreflect.Message {
|
||||
|
||||
// Deprecated: Use Webhook.ProtoReflect.Descriptor instead.
|
||||
func (*Webhook) Descriptor() ([]byte, []int) {
|
||||
return file_api_v2_webhook_service_proto_rawDescGZIP(), []int{0}
|
||||
return file_api_v1_webhook_service_proto_rawDescGZIP(), []int{0}
|
||||
}
|
||||
|
||||
func (x *Webhook) GetId() int32 {
|
||||
@ -131,7 +131,7 @@ type CreateWebhookRequest struct {
|
||||
func (x *CreateWebhookRequest) Reset() {
|
||||
*x = CreateWebhookRequest{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_api_v2_webhook_service_proto_msgTypes[1]
|
||||
mi := &file_api_v1_webhook_service_proto_msgTypes[1]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
@ -144,7 +144,7 @@ func (x *CreateWebhookRequest) String() string {
|
||||
func (*CreateWebhookRequest) ProtoMessage() {}
|
||||
|
||||
func (x *CreateWebhookRequest) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_api_v2_webhook_service_proto_msgTypes[1]
|
||||
mi := &file_api_v1_webhook_service_proto_msgTypes[1]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
@ -157,7 +157,7 @@ func (x *CreateWebhookRequest) ProtoReflect() protoreflect.Message {
|
||||
|
||||
// Deprecated: Use CreateWebhookRequest.ProtoReflect.Descriptor instead.
|
||||
func (*CreateWebhookRequest) Descriptor() ([]byte, []int) {
|
||||
return file_api_v2_webhook_service_proto_rawDescGZIP(), []int{1}
|
||||
return file_api_v1_webhook_service_proto_rawDescGZIP(), []int{1}
|
||||
}
|
||||
|
||||
func (x *CreateWebhookRequest) GetName() string {
|
||||
@ -185,7 +185,7 @@ type GetWebhookRequest struct {
|
||||
func (x *GetWebhookRequest) Reset() {
|
||||
*x = GetWebhookRequest{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_api_v2_webhook_service_proto_msgTypes[2]
|
||||
mi := &file_api_v1_webhook_service_proto_msgTypes[2]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
@ -198,7 +198,7 @@ func (x *GetWebhookRequest) String() string {
|
||||
func (*GetWebhookRequest) ProtoMessage() {}
|
||||
|
||||
func (x *GetWebhookRequest) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_api_v2_webhook_service_proto_msgTypes[2]
|
||||
mi := &file_api_v1_webhook_service_proto_msgTypes[2]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
@ -211,7 +211,7 @@ func (x *GetWebhookRequest) ProtoReflect() protoreflect.Message {
|
||||
|
||||
// Deprecated: Use GetWebhookRequest.ProtoReflect.Descriptor instead.
|
||||
func (*GetWebhookRequest) Descriptor() ([]byte, []int) {
|
||||
return file_api_v2_webhook_service_proto_rawDescGZIP(), []int{2}
|
||||
return file_api_v1_webhook_service_proto_rawDescGZIP(), []int{2}
|
||||
}
|
||||
|
||||
func (x *GetWebhookRequest) GetId() int32 {
|
||||
@ -232,7 +232,7 @@ type ListWebhooksRequest struct {
|
||||
func (x *ListWebhooksRequest) Reset() {
|
||||
*x = ListWebhooksRequest{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_api_v2_webhook_service_proto_msgTypes[3]
|
||||
mi := &file_api_v1_webhook_service_proto_msgTypes[3]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
@ -245,7 +245,7 @@ func (x *ListWebhooksRequest) String() string {
|
||||
func (*ListWebhooksRequest) ProtoMessage() {}
|
||||
|
||||
func (x *ListWebhooksRequest) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_api_v2_webhook_service_proto_msgTypes[3]
|
||||
mi := &file_api_v1_webhook_service_proto_msgTypes[3]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
@ -258,7 +258,7 @@ func (x *ListWebhooksRequest) ProtoReflect() protoreflect.Message {
|
||||
|
||||
// Deprecated: Use ListWebhooksRequest.ProtoReflect.Descriptor instead.
|
||||
func (*ListWebhooksRequest) Descriptor() ([]byte, []int) {
|
||||
return file_api_v2_webhook_service_proto_rawDescGZIP(), []int{3}
|
||||
return file_api_v1_webhook_service_proto_rawDescGZIP(), []int{3}
|
||||
}
|
||||
|
||||
func (x *ListWebhooksRequest) GetCreatorId() int32 {
|
||||
@ -279,7 +279,7 @@ type ListWebhooksResponse struct {
|
||||
func (x *ListWebhooksResponse) Reset() {
|
||||
*x = ListWebhooksResponse{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_api_v2_webhook_service_proto_msgTypes[4]
|
||||
mi := &file_api_v1_webhook_service_proto_msgTypes[4]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
@ -292,7 +292,7 @@ func (x *ListWebhooksResponse) String() string {
|
||||
func (*ListWebhooksResponse) ProtoMessage() {}
|
||||
|
||||
func (x *ListWebhooksResponse) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_api_v2_webhook_service_proto_msgTypes[4]
|
||||
mi := &file_api_v1_webhook_service_proto_msgTypes[4]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
@ -305,7 +305,7 @@ func (x *ListWebhooksResponse) ProtoReflect() protoreflect.Message {
|
||||
|
||||
// Deprecated: Use ListWebhooksResponse.ProtoReflect.Descriptor instead.
|
||||
func (*ListWebhooksResponse) Descriptor() ([]byte, []int) {
|
||||
return file_api_v2_webhook_service_proto_rawDescGZIP(), []int{4}
|
||||
return file_api_v1_webhook_service_proto_rawDescGZIP(), []int{4}
|
||||
}
|
||||
|
||||
func (x *ListWebhooksResponse) GetWebhooks() []*Webhook {
|
||||
@ -327,7 +327,7 @@ type UpdateWebhookRequest struct {
|
||||
func (x *UpdateWebhookRequest) Reset() {
|
||||
*x = UpdateWebhookRequest{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_api_v2_webhook_service_proto_msgTypes[5]
|
||||
mi := &file_api_v1_webhook_service_proto_msgTypes[5]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
@ -340,7 +340,7 @@ func (x *UpdateWebhookRequest) String() string {
|
||||
func (*UpdateWebhookRequest) ProtoMessage() {}
|
||||
|
||||
func (x *UpdateWebhookRequest) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_api_v2_webhook_service_proto_msgTypes[5]
|
||||
mi := &file_api_v1_webhook_service_proto_msgTypes[5]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
@ -353,7 +353,7 @@ func (x *UpdateWebhookRequest) ProtoReflect() protoreflect.Message {
|
||||
|
||||
// Deprecated: Use UpdateWebhookRequest.ProtoReflect.Descriptor instead.
|
||||
func (*UpdateWebhookRequest) Descriptor() ([]byte, []int) {
|
||||
return file_api_v2_webhook_service_proto_rawDescGZIP(), []int{5}
|
||||
return file_api_v1_webhook_service_proto_rawDescGZIP(), []int{5}
|
||||
}
|
||||
|
||||
func (x *UpdateWebhookRequest) GetWebhook() *Webhook {
|
||||
@ -381,7 +381,7 @@ type DeleteWebhookRequest struct {
|
||||
func (x *DeleteWebhookRequest) Reset() {
|
||||
*x = DeleteWebhookRequest{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_api_v2_webhook_service_proto_msgTypes[6]
|
||||
mi := &file_api_v1_webhook_service_proto_msgTypes[6]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
@ -394,7 +394,7 @@ func (x *DeleteWebhookRequest) String() string {
|
||||
func (*DeleteWebhookRequest) ProtoMessage() {}
|
||||
|
||||
func (x *DeleteWebhookRequest) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_api_v2_webhook_service_proto_msgTypes[6]
|
||||
mi := &file_api_v1_webhook_service_proto_msgTypes[6]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
@ -407,7 +407,7 @@ func (x *DeleteWebhookRequest) ProtoReflect() protoreflect.Message {
|
||||
|
||||
// Deprecated: Use DeleteWebhookRequest.ProtoReflect.Descriptor instead.
|
||||
func (*DeleteWebhookRequest) Descriptor() ([]byte, []int) {
|
||||
return file_api_v2_webhook_service_proto_rawDescGZIP(), []int{6}
|
||||
return file_api_v1_webhook_service_proto_rawDescGZIP(), []int{6}
|
||||
}
|
||||
|
||||
func (x *DeleteWebhookRequest) GetId() int32 {
|
||||
@ -417,13 +417,13 @@ func (x *DeleteWebhookRequest) GetId() int32 {
|
||||
return 0
|
||||
}
|
||||
|
||||
var File_api_v2_webhook_service_proto protoreflect.FileDescriptor
|
||||
var File_api_v1_webhook_service_proto protoreflect.FileDescriptor
|
||||
|
||||
var file_api_v2_webhook_service_proto_rawDesc = []byte{
|
||||
0x0a, 0x1c, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x32, 0x2f, 0x77, 0x65, 0x62, 0x68, 0x6f, 0x6f, 0x6b,
|
||||
var file_api_v1_webhook_service_proto_rawDesc = []byte{
|
||||
0x0a, 0x1c, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, 0x2f, 0x77, 0x65, 0x62, 0x68, 0x6f, 0x6f, 0x6b,
|
||||
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, 0x13, 0x61, 0x70,
|
||||
0x69, 0x2f, 0x76, 0x32, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74,
|
||||
0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x1a, 0x13, 0x61, 0x70,
|
||||
0x69, 0x2f, 0x76, 0x31, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74,
|
||||
0x6f, 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,
|
||||
@ -447,7 +447,7 @@ var file_api_v2_webhook_service_proto_rawDesc = []byte{
|
||||
0x74, 0x61, 0x6d, 0x70, 0x52, 0x0b, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x54, 0x69, 0x6d,
|
||||
0x65, 0x12, 0x36, 0x0a, 0x0a, 0x72, 0x6f, 0x77, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18,
|
||||
0x05, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x17, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70,
|
||||
0x69, 0x2e, 0x76, 0x32, 0x2e, 0x52, 0x6f, 0x77, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x09,
|
||||
0x69, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x6f, 0x77, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x09,
|
||||
0x72, 0x6f, 0x77, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d,
|
||||
0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x10, 0x0a,
|
||||
0x03, 0x75, 0x72, 0x6c, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x72, 0x6c, 0x22,
|
||||
@ -464,11 +464,11 @@ var file_api_v2_webhook_service_proto_rawDesc = []byte{
|
||||
0x57, 0x65, 0x62, 0x68, 0x6f, 0x6f, 0x6b, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65,
|
||||
0x12, 0x31, 0x0a, 0x08, 0x77, 0x65, 0x62, 0x68, 0x6f, 0x6f, 0x6b, 0x73, 0x18, 0x01, 0x20, 0x03,
|
||||
0x28, 0x0b, 0x32, 0x15, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76,
|
||||
0x32, 0x2e, 0x57, 0x65, 0x62, 0x68, 0x6f, 0x6f, 0x6b, 0x52, 0x08, 0x77, 0x65, 0x62, 0x68, 0x6f,
|
||||
0x31, 0x2e, 0x57, 0x65, 0x62, 0x68, 0x6f, 0x6f, 0x6b, 0x52, 0x08, 0x77, 0x65, 0x62, 0x68, 0x6f,
|
||||
0x6f, 0x6b, 0x73, 0x22, 0x84, 0x01, 0x0a, 0x14, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x57, 0x65,
|
||||
0x62, 0x68, 0x6f, 0x6f, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x2f, 0x0a, 0x07,
|
||||
0x77, 0x65, 0x62, 0x68, 0x6f, 0x6f, 0x6b, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e,
|
||||
0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x57, 0x65, 0x62,
|
||||
0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x57, 0x65, 0x62,
|
||||
0x68, 0x6f, 0x6f, 0x6b, 0x52, 0x07, 0x77, 0x65, 0x62, 0x68, 0x6f, 0x6f, 0x6b, 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,
|
||||
@ -479,98 +479,98 @@ var file_api_v2_webhook_service_proto_rawDesc = []byte{
|
||||
0x69, 0x64, 0x32, 0xd8, 0x04, 0x0a, 0x0e, 0x57, 0x65, 0x62, 0x68, 0x6f, 0x6f, 0x6b, 0x53, 0x65,
|
||||
0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x67, 0x0a, 0x0d, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x57,
|
||||
0x65, 0x62, 0x68, 0x6f, 0x6f, 0x6b, 0x12, 0x22, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61,
|
||||
0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x57, 0x65, 0x62, 0x68,
|
||||
0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x57, 0x65, 0x62, 0x68,
|
||||
0x6f, 0x6f, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x15, 0x2e, 0x6d, 0x65, 0x6d,
|
||||
0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x57, 0x65, 0x62, 0x68, 0x6f, 0x6f,
|
||||
0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x57, 0x65, 0x62, 0x68, 0x6f, 0x6f,
|
||||
0x6b, 0x22, 0x1b, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x15, 0x3a, 0x01, 0x2a, 0x22, 0x10, 0x2f, 0x61,
|
||||
0x70, 0x69, 0x2f, 0x76, 0x32, 0x2f, 0x77, 0x65, 0x62, 0x68, 0x6f, 0x6f, 0x6b, 0x73, 0x12, 0x68,
|
||||
0x70, 0x69, 0x2f, 0x76, 0x31, 0x2f, 0x77, 0x65, 0x62, 0x68, 0x6f, 0x6f, 0x6b, 0x73, 0x12, 0x68,
|
||||
0x0a, 0x0a, 0x47, 0x65, 0x74, 0x57, 0x65, 0x62, 0x68, 0x6f, 0x6f, 0x6b, 0x12, 0x1f, 0x2e, 0x6d,
|
||||
0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x47, 0x65, 0x74, 0x57,
|
||||
0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x57,
|
||||
0x65, 0x62, 0x68, 0x6f, 0x6f, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x15, 0x2e,
|
||||
0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x57, 0x65, 0x62,
|
||||
0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x57, 0x65, 0x62,
|
||||
0x68, 0x6f, 0x6f, 0x6b, 0x22, 0x22, 0xda, 0x41, 0x02, 0x69, 0x64, 0x82, 0xd3, 0xe4, 0x93, 0x02,
|
||||
0x17, 0x12, 0x15, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x32, 0x2f, 0x77, 0x65, 0x62, 0x68, 0x6f,
|
||||
0x17, 0x12, 0x15, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, 0x2f, 0x77, 0x65, 0x62, 0x68, 0x6f,
|
||||
0x6f, 0x6b, 0x73, 0x2f, 0x7b, 0x69, 0x64, 0x7d, 0x12, 0x6f, 0x0a, 0x0c, 0x4c, 0x69, 0x73, 0x74,
|
||||
0x57, 0x65, 0x62, 0x68, 0x6f, 0x6f, 0x6b, 0x73, 0x12, 0x21, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73,
|
||||
0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x57, 0x65, 0x62, 0x68,
|
||||
0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x57, 0x65, 0x62, 0x68,
|
||||
0x6f, 0x6f, 0x6b, 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, 0x57,
|
||||
0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x57,
|
||||
0x65, 0x62, 0x68, 0x6f, 0x6f, 0x6b, 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,
|
||||
0x18, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x12, 0x12, 0x10, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31,
|
||||
0x2f, 0x77, 0x65, 0x62, 0x68, 0x6f, 0x6f, 0x6b, 0x73, 0x12, 0x90, 0x01, 0x0a, 0x0d, 0x55, 0x70,
|
||||
0x64, 0x61, 0x74, 0x65, 0x57, 0x65, 0x62, 0x68, 0x6f, 0x6f, 0x6b, 0x12, 0x22, 0x2e, 0x6d, 0x65,
|
||||
0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74,
|
||||
0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74,
|
||||
0x65, 0x57, 0x65, 0x62, 0x68, 0x6f, 0x6f, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a,
|
||||
0x15, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x57,
|
||||
0x15, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x57,
|
||||
0x65, 0x62, 0x68, 0x6f, 0x6f, 0x6b, 0x22, 0x44, 0xda, 0x41, 0x13, 0x77, 0x65, 0x62, 0x68, 0x6f,
|
||||
0x6f, 0x6b, 0x2c, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x5f, 0x6d, 0x61, 0x73, 0x6b, 0x82, 0xd3,
|
||||
0xe4, 0x93, 0x02, 0x28, 0x3a, 0x07, 0x77, 0x65, 0x62, 0x68, 0x6f, 0x6f, 0x6b, 0x32, 0x1d, 0x2f,
|
||||
0x61, 0x70, 0x69, 0x2f, 0x76, 0x32, 0x2f, 0x77, 0x65, 0x62, 0x68, 0x6f, 0x6f, 0x6b, 0x73, 0x2f,
|
||||
0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, 0x2f, 0x77, 0x65, 0x62, 0x68, 0x6f, 0x6f, 0x6b, 0x73, 0x2f,
|
||||
0x7b, 0x77, 0x65, 0x62, 0x68, 0x6f, 0x6f, 0x6b, 0x2e, 0x69, 0x64, 0x7d, 0x12, 0x6f, 0x0a, 0x0d,
|
||||
0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x57, 0x65, 0x62, 0x68, 0x6f, 0x6f, 0x6b, 0x12, 0x22, 0x2e,
|
||||
0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x44, 0x65, 0x6c,
|
||||
0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x65, 0x6c,
|
||||
0x65, 0x74, 0x65, 0x57, 0x65, 0x62, 0x68, 0x6f, 0x6f, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73,
|
||||
0x74, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f,
|
||||
0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x22, 0xda, 0x41, 0x02, 0x69, 0x64,
|
||||
0x82, 0xd3, 0xe4, 0x93, 0x02, 0x17, 0x2a, 0x15, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x32, 0x2f,
|
||||
0x82, 0xd3, 0xe4, 0x93, 0x02, 0x17, 0x2a, 0x15, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, 0x2f,
|
||||
0x77, 0x65, 0x62, 0x68, 0x6f, 0x6f, 0x6b, 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, 0x57, 0x65, 0x62, 0x68, 0x6f, 0x6f, 0x6b, 0x53, 0x65, 0x72, 0x76, 0x69,
|
||||
0x76, 0x31, 0x42, 0x13, 0x57, 0x65, 0x62, 0x68, 0x6f, 0x6f, 0x6b, 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,
|
||||
0x70, 0x69, 0x2f, 0x76, 0x31, 0x3b, 0x61, 0x70, 0x69, 0x76, 0x31, 0xa2, 0x02, 0x03, 0x4d, 0x41,
|
||||
0x58, 0xaa, 0x02, 0x0c, 0x4d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x41, 0x70, 0x69, 0x2e, 0x56, 0x31,
|
||||
0xca, 0x02, 0x0c, 0x4d, 0x65, 0x6d, 0x6f, 0x73, 0x5c, 0x41, 0x70, 0x69, 0x5c, 0x56, 0x31, 0xe2,
|
||||
0x02, 0x18, 0x4d, 0x65, 0x6d, 0x6f, 0x73, 0x5c, 0x41, 0x70, 0x69, 0x5c, 0x56, 0x31, 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,
|
||||
0x6f, 0x73, 0x3a, 0x3a, 0x41, 0x70, 0x69, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f,
|
||||
0x74, 0x6f, 0x33,
|
||||
}
|
||||
|
||||
var (
|
||||
file_api_v2_webhook_service_proto_rawDescOnce sync.Once
|
||||
file_api_v2_webhook_service_proto_rawDescData = file_api_v2_webhook_service_proto_rawDesc
|
||||
file_api_v1_webhook_service_proto_rawDescOnce sync.Once
|
||||
file_api_v1_webhook_service_proto_rawDescData = file_api_v1_webhook_service_proto_rawDesc
|
||||
)
|
||||
|
||||
func file_api_v2_webhook_service_proto_rawDescGZIP() []byte {
|
||||
file_api_v2_webhook_service_proto_rawDescOnce.Do(func() {
|
||||
file_api_v2_webhook_service_proto_rawDescData = protoimpl.X.CompressGZIP(file_api_v2_webhook_service_proto_rawDescData)
|
||||
func file_api_v1_webhook_service_proto_rawDescGZIP() []byte {
|
||||
file_api_v1_webhook_service_proto_rawDescOnce.Do(func() {
|
||||
file_api_v1_webhook_service_proto_rawDescData = protoimpl.X.CompressGZIP(file_api_v1_webhook_service_proto_rawDescData)
|
||||
})
|
||||
return file_api_v2_webhook_service_proto_rawDescData
|
||||
return file_api_v1_webhook_service_proto_rawDescData
|
||||
}
|
||||
|
||||
var file_api_v2_webhook_service_proto_msgTypes = make([]protoimpl.MessageInfo, 7)
|
||||
var file_api_v2_webhook_service_proto_goTypes = []interface{}{
|
||||
(*Webhook)(nil), // 0: memos.api.v2.Webhook
|
||||
(*CreateWebhookRequest)(nil), // 1: memos.api.v2.CreateWebhookRequest
|
||||
(*GetWebhookRequest)(nil), // 2: memos.api.v2.GetWebhookRequest
|
||||
(*ListWebhooksRequest)(nil), // 3: memos.api.v2.ListWebhooksRequest
|
||||
(*ListWebhooksResponse)(nil), // 4: memos.api.v2.ListWebhooksResponse
|
||||
(*UpdateWebhookRequest)(nil), // 5: memos.api.v2.UpdateWebhookRequest
|
||||
(*DeleteWebhookRequest)(nil), // 6: memos.api.v2.DeleteWebhookRequest
|
||||
var file_api_v1_webhook_service_proto_msgTypes = make([]protoimpl.MessageInfo, 7)
|
||||
var file_api_v1_webhook_service_proto_goTypes = []interface{}{
|
||||
(*Webhook)(nil), // 0: memos.api.v1.Webhook
|
||||
(*CreateWebhookRequest)(nil), // 1: memos.api.v1.CreateWebhookRequest
|
||||
(*GetWebhookRequest)(nil), // 2: memos.api.v1.GetWebhookRequest
|
||||
(*ListWebhooksRequest)(nil), // 3: memos.api.v1.ListWebhooksRequest
|
||||
(*ListWebhooksResponse)(nil), // 4: memos.api.v1.ListWebhooksResponse
|
||||
(*UpdateWebhookRequest)(nil), // 5: memos.api.v1.UpdateWebhookRequest
|
||||
(*DeleteWebhookRequest)(nil), // 6: memos.api.v1.DeleteWebhookRequest
|
||||
(*timestamppb.Timestamp)(nil), // 7: google.protobuf.Timestamp
|
||||
(RowStatus)(0), // 8: memos.api.v2.RowStatus
|
||||
(RowStatus)(0), // 8: memos.api.v1.RowStatus
|
||||
(*fieldmaskpb.FieldMask)(nil), // 9: google.protobuf.FieldMask
|
||||
(*emptypb.Empty)(nil), // 10: google.protobuf.Empty
|
||||
}
|
||||
var file_api_v2_webhook_service_proto_depIdxs = []int32{
|
||||
7, // 0: memos.api.v2.Webhook.created_time:type_name -> google.protobuf.Timestamp
|
||||
7, // 1: memos.api.v2.Webhook.updated_time:type_name -> google.protobuf.Timestamp
|
||||
8, // 2: memos.api.v2.Webhook.row_status:type_name -> memos.api.v2.RowStatus
|
||||
0, // 3: memos.api.v2.ListWebhooksResponse.webhooks:type_name -> memos.api.v2.Webhook
|
||||
0, // 4: memos.api.v2.UpdateWebhookRequest.webhook:type_name -> memos.api.v2.Webhook
|
||||
9, // 5: memos.api.v2.UpdateWebhookRequest.update_mask:type_name -> google.protobuf.FieldMask
|
||||
1, // 6: memos.api.v2.WebhookService.CreateWebhook:input_type -> memos.api.v2.CreateWebhookRequest
|
||||
2, // 7: memos.api.v2.WebhookService.GetWebhook:input_type -> memos.api.v2.GetWebhookRequest
|
||||
3, // 8: memos.api.v2.WebhookService.ListWebhooks:input_type -> memos.api.v2.ListWebhooksRequest
|
||||
5, // 9: memos.api.v2.WebhookService.UpdateWebhook:input_type -> memos.api.v2.UpdateWebhookRequest
|
||||
6, // 10: memos.api.v2.WebhookService.DeleteWebhook:input_type -> memos.api.v2.DeleteWebhookRequest
|
||||
0, // 11: memos.api.v2.WebhookService.CreateWebhook:output_type -> memos.api.v2.Webhook
|
||||
0, // 12: memos.api.v2.WebhookService.GetWebhook:output_type -> memos.api.v2.Webhook
|
||||
4, // 13: memos.api.v2.WebhookService.ListWebhooks:output_type -> memos.api.v2.ListWebhooksResponse
|
||||
0, // 14: memos.api.v2.WebhookService.UpdateWebhook:output_type -> memos.api.v2.Webhook
|
||||
10, // 15: memos.api.v2.WebhookService.DeleteWebhook:output_type -> google.protobuf.Empty
|
||||
var file_api_v1_webhook_service_proto_depIdxs = []int32{
|
||||
7, // 0: memos.api.v1.Webhook.created_time:type_name -> google.protobuf.Timestamp
|
||||
7, // 1: memos.api.v1.Webhook.updated_time:type_name -> google.protobuf.Timestamp
|
||||
8, // 2: memos.api.v1.Webhook.row_status:type_name -> memos.api.v1.RowStatus
|
||||
0, // 3: memos.api.v1.ListWebhooksResponse.webhooks:type_name -> memos.api.v1.Webhook
|
||||
0, // 4: memos.api.v1.UpdateWebhookRequest.webhook:type_name -> memos.api.v1.Webhook
|
||||
9, // 5: memos.api.v1.UpdateWebhookRequest.update_mask:type_name -> google.protobuf.FieldMask
|
||||
1, // 6: memos.api.v1.WebhookService.CreateWebhook:input_type -> memos.api.v1.CreateWebhookRequest
|
||||
2, // 7: memos.api.v1.WebhookService.GetWebhook:input_type -> memos.api.v1.GetWebhookRequest
|
||||
3, // 8: memos.api.v1.WebhookService.ListWebhooks:input_type -> memos.api.v1.ListWebhooksRequest
|
||||
5, // 9: memos.api.v1.WebhookService.UpdateWebhook:input_type -> memos.api.v1.UpdateWebhookRequest
|
||||
6, // 10: memos.api.v1.WebhookService.DeleteWebhook:input_type -> memos.api.v1.DeleteWebhookRequest
|
||||
0, // 11: memos.api.v1.WebhookService.CreateWebhook:output_type -> memos.api.v1.Webhook
|
||||
0, // 12: memos.api.v1.WebhookService.GetWebhook:output_type -> memos.api.v1.Webhook
|
||||
4, // 13: memos.api.v1.WebhookService.ListWebhooks:output_type -> memos.api.v1.ListWebhooksResponse
|
||||
0, // 14: memos.api.v1.WebhookService.UpdateWebhook:output_type -> memos.api.v1.Webhook
|
||||
10, // 15: memos.api.v1.WebhookService.DeleteWebhook:output_type -> google.protobuf.Empty
|
||||
11, // [11:16] is the sub-list for method output_type
|
||||
6, // [6:11] is the sub-list for method input_type
|
||||
6, // [6:6] is the sub-list for extension type_name
|
||||
@ -578,14 +578,14 @@ var file_api_v2_webhook_service_proto_depIdxs = []int32{
|
||||
0, // [0:6] is the sub-list for field type_name
|
||||
}
|
||||
|
||||
func init() { file_api_v2_webhook_service_proto_init() }
|
||||
func file_api_v2_webhook_service_proto_init() {
|
||||
if File_api_v2_webhook_service_proto != nil {
|
||||
func init() { file_api_v1_webhook_service_proto_init() }
|
||||
func file_api_v1_webhook_service_proto_init() {
|
||||
if File_api_v1_webhook_service_proto != nil {
|
||||
return
|
||||
}
|
||||
file_api_v2_common_proto_init()
|
||||
file_api_v1_common_proto_init()
|
||||
if !protoimpl.UnsafeEnabled {
|
||||
file_api_v2_webhook_service_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
|
||||
file_api_v1_webhook_service_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*Webhook); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
@ -597,7 +597,7 @@ func file_api_v2_webhook_service_proto_init() {
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_api_v2_webhook_service_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
|
||||
file_api_v1_webhook_service_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*CreateWebhookRequest); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
@ -609,7 +609,7 @@ func file_api_v2_webhook_service_proto_init() {
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_api_v2_webhook_service_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
|
||||
file_api_v1_webhook_service_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*GetWebhookRequest); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
@ -621,7 +621,7 @@ func file_api_v2_webhook_service_proto_init() {
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_api_v2_webhook_service_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} {
|
||||
file_api_v1_webhook_service_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*ListWebhooksRequest); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
@ -633,7 +633,7 @@ func file_api_v2_webhook_service_proto_init() {
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_api_v2_webhook_service_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} {
|
||||
file_api_v1_webhook_service_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*ListWebhooksResponse); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
@ -645,7 +645,7 @@ func file_api_v2_webhook_service_proto_init() {
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_api_v2_webhook_service_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} {
|
||||
file_api_v1_webhook_service_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*UpdateWebhookRequest); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
@ -657,7 +657,7 @@ func file_api_v2_webhook_service_proto_init() {
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_api_v2_webhook_service_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} {
|
||||
file_api_v1_webhook_service_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*DeleteWebhookRequest); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
@ -674,18 +674,18 @@ func file_api_v2_webhook_service_proto_init() {
|
||||
out := protoimpl.TypeBuilder{
|
||||
File: protoimpl.DescBuilder{
|
||||
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
|
||||
RawDescriptor: file_api_v2_webhook_service_proto_rawDesc,
|
||||
RawDescriptor: file_api_v1_webhook_service_proto_rawDesc,
|
||||
NumEnums: 0,
|
||||
NumMessages: 7,
|
||||
NumExtensions: 0,
|
||||
NumServices: 1,
|
||||
},
|
||||
GoTypes: file_api_v2_webhook_service_proto_goTypes,
|
||||
DependencyIndexes: file_api_v2_webhook_service_proto_depIdxs,
|
||||
MessageInfos: file_api_v2_webhook_service_proto_msgTypes,
|
||||
GoTypes: file_api_v1_webhook_service_proto_goTypes,
|
||||
DependencyIndexes: file_api_v1_webhook_service_proto_depIdxs,
|
||||
MessageInfos: file_api_v1_webhook_service_proto_msgTypes,
|
||||
}.Build()
|
||||
File_api_v2_webhook_service_proto = out.File
|
||||
file_api_v2_webhook_service_proto_rawDesc = nil
|
||||
file_api_v2_webhook_service_proto_goTypes = nil
|
||||
file_api_v2_webhook_service_proto_depIdxs = nil
|
||||
File_api_v1_webhook_service_proto = out.File
|
||||
file_api_v1_webhook_service_proto_rawDesc = nil
|
||||
file_api_v1_webhook_service_proto_goTypes = nil
|
||||
file_api_v1_webhook_service_proto_depIdxs = nil
|
||||
}
|
@ -1,12 +1,12 @@
|
||||
// Code generated by protoc-gen-grpc-gateway. DO NOT EDIT.
|
||||
// source: api/v2/webhook_service.proto
|
||||
// source: api/v1/webhook_service.proto
|
||||
|
||||
/*
|
||||
Package apiv2 is a reverse proxy.
|
||||
Package apiv1 is a reverse proxy.
|
||||
|
||||
It translates gRPC into RESTful JSON APIs.
|
||||
*/
|
||||
package apiv2
|
||||
package apiv1
|
||||
|
||||
import (
|
||||
"context"
|
||||
@ -311,7 +311,7 @@ func RegisterWebhookServiceHandlerServer(ctx context.Context, mux *runtime.Serve
|
||||
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
||||
var err error
|
||||
var annotatedContext context.Context
|
||||
annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/memos.api.v2.WebhookService/CreateWebhook", runtime.WithHTTPPathPattern("/api/v2/webhooks"))
|
||||
annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/memos.api.v1.WebhookService/CreateWebhook", runtime.WithHTTPPathPattern("/api/v1/webhooks"))
|
||||
if err != nil {
|
||||
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||
return
|
||||
@ -336,7 +336,7 @@ func RegisterWebhookServiceHandlerServer(ctx context.Context, mux *runtime.Serve
|
||||
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
||||
var err error
|
||||
var annotatedContext context.Context
|
||||
annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/memos.api.v2.WebhookService/GetWebhook", runtime.WithHTTPPathPattern("/api/v2/webhooks/{id}"))
|
||||
annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/memos.api.v1.WebhookService/GetWebhook", runtime.WithHTTPPathPattern("/api/v1/webhooks/{id}"))
|
||||
if err != nil {
|
||||
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||
return
|
||||
@ -361,7 +361,7 @@ func RegisterWebhookServiceHandlerServer(ctx context.Context, mux *runtime.Serve
|
||||
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
||||
var err error
|
||||
var annotatedContext context.Context
|
||||
annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/memos.api.v2.WebhookService/ListWebhooks", runtime.WithHTTPPathPattern("/api/v2/webhooks"))
|
||||
annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/memos.api.v1.WebhookService/ListWebhooks", runtime.WithHTTPPathPattern("/api/v1/webhooks"))
|
||||
if err != nil {
|
||||
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||
return
|
||||
@ -386,7 +386,7 @@ func RegisterWebhookServiceHandlerServer(ctx context.Context, mux *runtime.Serve
|
||||
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
||||
var err error
|
||||
var annotatedContext context.Context
|
||||
annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/memos.api.v2.WebhookService/UpdateWebhook", runtime.WithHTTPPathPattern("/api/v2/webhooks/{webhook.id}"))
|
||||
annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/memos.api.v1.WebhookService/UpdateWebhook", runtime.WithHTTPPathPattern("/api/v1/webhooks/{webhook.id}"))
|
||||
if err != nil {
|
||||
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||
return
|
||||
@ -411,7 +411,7 @@ func RegisterWebhookServiceHandlerServer(ctx context.Context, mux *runtime.Serve
|
||||
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
||||
var err error
|
||||
var annotatedContext context.Context
|
||||
annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/memos.api.v2.WebhookService/DeleteWebhook", runtime.WithHTTPPathPattern("/api/v2/webhooks/{id}"))
|
||||
annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/memos.api.v1.WebhookService/DeleteWebhook", runtime.WithHTTPPathPattern("/api/v1/webhooks/{id}"))
|
||||
if err != nil {
|
||||
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||
return
|
||||
@ -475,7 +475,7 @@ func RegisterWebhookServiceHandlerClient(ctx context.Context, mux *runtime.Serve
|
||||
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
||||
var err error
|
||||
var annotatedContext context.Context
|
||||
annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/memos.api.v2.WebhookService/CreateWebhook", runtime.WithHTTPPathPattern("/api/v2/webhooks"))
|
||||
annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/memos.api.v1.WebhookService/CreateWebhook", runtime.WithHTTPPathPattern("/api/v1/webhooks"))
|
||||
if err != nil {
|
||||
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||
return
|
||||
@ -497,7 +497,7 @@ func RegisterWebhookServiceHandlerClient(ctx context.Context, mux *runtime.Serve
|
||||
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
||||
var err error
|
||||
var annotatedContext context.Context
|
||||
annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/memos.api.v2.WebhookService/GetWebhook", runtime.WithHTTPPathPattern("/api/v2/webhooks/{id}"))
|
||||
annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/memos.api.v1.WebhookService/GetWebhook", runtime.WithHTTPPathPattern("/api/v1/webhooks/{id}"))
|
||||
if err != nil {
|
||||
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||
return
|
||||
@ -519,7 +519,7 @@ func RegisterWebhookServiceHandlerClient(ctx context.Context, mux *runtime.Serve
|
||||
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
||||
var err error
|
||||
var annotatedContext context.Context
|
||||
annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/memos.api.v2.WebhookService/ListWebhooks", runtime.WithHTTPPathPattern("/api/v2/webhooks"))
|
||||
annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/memos.api.v1.WebhookService/ListWebhooks", runtime.WithHTTPPathPattern("/api/v1/webhooks"))
|
||||
if err != nil {
|
||||
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||
return
|
||||
@ -541,7 +541,7 @@ func RegisterWebhookServiceHandlerClient(ctx context.Context, mux *runtime.Serve
|
||||
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
||||
var err error
|
||||
var annotatedContext context.Context
|
||||
annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/memos.api.v2.WebhookService/UpdateWebhook", runtime.WithHTTPPathPattern("/api/v2/webhooks/{webhook.id}"))
|
||||
annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/memos.api.v1.WebhookService/UpdateWebhook", runtime.WithHTTPPathPattern("/api/v1/webhooks/{webhook.id}"))
|
||||
if err != nil {
|
||||
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||
return
|
||||
@ -563,7 +563,7 @@ func RegisterWebhookServiceHandlerClient(ctx context.Context, mux *runtime.Serve
|
||||
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
||||
var err error
|
||||
var annotatedContext context.Context
|
||||
annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/memos.api.v2.WebhookService/DeleteWebhook", runtime.WithHTTPPathPattern("/api/v2/webhooks/{id}"))
|
||||
annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/memos.api.v1.WebhookService/DeleteWebhook", runtime.WithHTTPPathPattern("/api/v1/webhooks/{id}"))
|
||||
if err != nil {
|
||||
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||
return
|
||||
@ -583,15 +583,15 @@ func RegisterWebhookServiceHandlerClient(ctx context.Context, mux *runtime.Serve
|
||||
}
|
||||
|
||||
var (
|
||||
pattern_WebhookService_CreateWebhook_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"api", "v2", "webhooks"}, ""))
|
||||
pattern_WebhookService_CreateWebhook_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"api", "v1", "webhooks"}, ""))
|
||||
|
||||
pattern_WebhookService_GetWebhook_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3}, []string{"api", "v2", "webhooks", "id"}, ""))
|
||||
pattern_WebhookService_GetWebhook_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3}, []string{"api", "v1", "webhooks", "id"}, ""))
|
||||
|
||||
pattern_WebhookService_ListWebhooks_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"api", "v2", "webhooks"}, ""))
|
||||
pattern_WebhookService_ListWebhooks_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"api", "v1", "webhooks"}, ""))
|
||||
|
||||
pattern_WebhookService_UpdateWebhook_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3}, []string{"api", "v2", "webhooks", "webhook.id"}, ""))
|
||||
pattern_WebhookService_UpdateWebhook_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3}, []string{"api", "v1", "webhooks", "webhook.id"}, ""))
|
||||
|
||||
pattern_WebhookService_DeleteWebhook_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3}, []string{"api", "v2", "webhooks", "id"}, ""))
|
||||
pattern_WebhookService_DeleteWebhook_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3}, []string{"api", "v1", "webhooks", "id"}, ""))
|
||||
)
|
||||
|
||||
var (
|
@ -2,9 +2,9 @@
|
||||
// versions:
|
||||
// - protoc-gen-go-grpc v1.3.0
|
||||
// - protoc (unknown)
|
||||
// source: api/v2/webhook_service.proto
|
||||
// source: api/v1/webhook_service.proto
|
||||
|
||||
package apiv2
|
||||
package apiv1
|
||||
|
||||
import (
|
||||
context "context"
|
||||
@ -20,11 +20,11 @@ import (
|
||||
const _ = grpc.SupportPackageIsVersion7
|
||||
|
||||
const (
|
||||
WebhookService_CreateWebhook_FullMethodName = "/memos.api.v2.WebhookService/CreateWebhook"
|
||||
WebhookService_GetWebhook_FullMethodName = "/memos.api.v2.WebhookService/GetWebhook"
|
||||
WebhookService_ListWebhooks_FullMethodName = "/memos.api.v2.WebhookService/ListWebhooks"
|
||||
WebhookService_UpdateWebhook_FullMethodName = "/memos.api.v2.WebhookService/UpdateWebhook"
|
||||
WebhookService_DeleteWebhook_FullMethodName = "/memos.api.v2.WebhookService/DeleteWebhook"
|
||||
WebhookService_CreateWebhook_FullMethodName = "/memos.api.v1.WebhookService/CreateWebhook"
|
||||
WebhookService_GetWebhook_FullMethodName = "/memos.api.v1.WebhookService/GetWebhook"
|
||||
WebhookService_ListWebhooks_FullMethodName = "/memos.api.v1.WebhookService/ListWebhooks"
|
||||
WebhookService_UpdateWebhook_FullMethodName = "/memos.api.v1.WebhookService/UpdateWebhook"
|
||||
WebhookService_DeleteWebhook_FullMethodName = "/memos.api.v1.WebhookService/DeleteWebhook"
|
||||
)
|
||||
|
||||
// WebhookServiceClient is the client API for WebhookService service.
|
||||
@ -239,7 +239,7 @@ func _WebhookService_DeleteWebhook_Handler(srv interface{}, ctx context.Context,
|
||||
// It's only intended for direct use with grpc.RegisterService,
|
||||
// and not to be introspected or modified (even as a copy)
|
||||
var WebhookService_ServiceDesc = grpc.ServiceDesc{
|
||||
ServiceName: "memos.api.v2.WebhookService",
|
||||
ServiceName: "memos.api.v1.WebhookService",
|
||||
HandlerType: (*WebhookServiceServer)(nil),
|
||||
Methods: []grpc.MethodDesc{
|
||||
{
|
||||
@ -264,5 +264,5 @@ var WebhookService_ServiceDesc = grpc.ServiceDesc{
|
||||
},
|
||||
},
|
||||
Streams: []grpc.StreamDesc{},
|
||||
Metadata: "api/v2/webhook_service.proto",
|
||||
Metadata: "api/v1/webhook_service.proto",
|
||||
}
|
@ -2,9 +2,9 @@
|
||||
// versions:
|
||||
// protoc-gen-go v1.33.0
|
||||
// protoc (unknown)
|
||||
// source: api/v2/workspace_service.proto
|
||||
// source: api/v1/workspace_service.proto
|
||||
|
||||
package apiv2
|
||||
package apiv1
|
||||
|
||||
import (
|
||||
_ "google.golang.org/genproto/googleapis/api/annotations"
|
||||
@ -38,7 +38,7 @@ type WorkspaceProfile struct {
|
||||
func (x *WorkspaceProfile) Reset() {
|
||||
*x = WorkspaceProfile{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_api_v2_workspace_service_proto_msgTypes[0]
|
||||
mi := &file_api_v1_workspace_service_proto_msgTypes[0]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
@ -51,7 +51,7 @@ func (x *WorkspaceProfile) String() string {
|
||||
func (*WorkspaceProfile) ProtoMessage() {}
|
||||
|
||||
func (x *WorkspaceProfile) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_api_v2_workspace_service_proto_msgTypes[0]
|
||||
mi := &file_api_v1_workspace_service_proto_msgTypes[0]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
@ -64,7 +64,7 @@ func (x *WorkspaceProfile) ProtoReflect() protoreflect.Message {
|
||||
|
||||
// Deprecated: Use WorkspaceProfile.ProtoReflect.Descriptor instead.
|
||||
func (*WorkspaceProfile) Descriptor() ([]byte, []int) {
|
||||
return file_api_v2_workspace_service_proto_rawDescGZIP(), []int{0}
|
||||
return file_api_v1_workspace_service_proto_rawDescGZIP(), []int{0}
|
||||
}
|
||||
|
||||
func (x *WorkspaceProfile) GetOwner() string {
|
||||
@ -97,7 +97,7 @@ type GetWorkspaceProfileRequest struct {
|
||||
func (x *GetWorkspaceProfileRequest) Reset() {
|
||||
*x = GetWorkspaceProfileRequest{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_api_v2_workspace_service_proto_msgTypes[1]
|
||||
mi := &file_api_v1_workspace_service_proto_msgTypes[1]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
@ -110,7 +110,7 @@ func (x *GetWorkspaceProfileRequest) String() string {
|
||||
func (*GetWorkspaceProfileRequest) ProtoMessage() {}
|
||||
|
||||
func (x *GetWorkspaceProfileRequest) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_api_v2_workspace_service_proto_msgTypes[1]
|
||||
mi := &file_api_v1_workspace_service_proto_msgTypes[1]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
@ -123,15 +123,15 @@ func (x *GetWorkspaceProfileRequest) ProtoReflect() protoreflect.Message {
|
||||
|
||||
// Deprecated: Use GetWorkspaceProfileRequest.ProtoReflect.Descriptor instead.
|
||||
func (*GetWorkspaceProfileRequest) Descriptor() ([]byte, []int) {
|
||||
return file_api_v2_workspace_service_proto_rawDescGZIP(), []int{1}
|
||||
return file_api_v1_workspace_service_proto_rawDescGZIP(), []int{1}
|
||||
}
|
||||
|
||||
var File_api_v2_workspace_service_proto protoreflect.FileDescriptor
|
||||
var File_api_v1_workspace_service_proto protoreflect.FileDescriptor
|
||||
|
||||
var file_api_v2_workspace_service_proto_rawDesc = []byte{
|
||||
0x0a, 0x1e, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x32, 0x2f, 0x77, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61,
|
||||
var file_api_v1_workspace_service_proto_rawDesc = []byte{
|
||||
0x0a, 0x1e, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, 0x2f, 0x77, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61,
|
||||
0x63, 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,
|
||||
0x12, 0x0c, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 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, 0x22, 0x56, 0x0a, 0x10,
|
||||
0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65,
|
||||
@ -144,47 +144,47 @@ var file_api_v2_workspace_service_proto_rawDesc = []byte{
|
||||
0x73, 0x74, 0x32, 0x97, 0x01, 0x0a, 0x10, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65,
|
||||
0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x82, 0x01, 0x0a, 0x13, 0x47, 0x65, 0x74, 0x57,
|
||||
0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x12,
|
||||
0x28, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x47,
|
||||
0x28, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x47,
|
||||
0x65, 0x74, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x50, 0x72, 0x6f, 0x66, 0x69,
|
||||
0x6c, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1e, 0x2e, 0x6d, 0x65, 0x6d, 0x6f,
|
||||
0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61,
|
||||
0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61,
|
||||
0x63, 0x65, 0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x22, 0x21, 0x82, 0xd3, 0xe4, 0x93, 0x02,
|
||||
0x1b, 0x12, 0x19, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x32, 0x2f, 0x77, 0x6f, 0x72, 0x6b, 0x73,
|
||||
0x1b, 0x12, 0x19, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, 0x2f, 0x77, 0x6f, 0x72, 0x6b, 0x73,
|
||||
0x70, 0x61, 0x63, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x42, 0xad, 0x01, 0x0a,
|
||||
0x10, 0x63, 0x6f, 0x6d, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76,
|
||||
0x32, 0x42, 0x15, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x53, 0x65, 0x72, 0x76,
|
||||
0x31, 0x42, 0x15, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 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,
|
||||
0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, 0x3b, 0x61, 0x70, 0x69, 0x76, 0x31, 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,
|
||||
0x31, 0xca, 0x02, 0x0c, 0x4d, 0x65, 0x6d, 0x6f, 0x73, 0x5c, 0x41, 0x70, 0x69, 0x5c, 0x56, 0x31,
|
||||
0xe2, 0x02, 0x18, 0x4d, 0x65, 0x6d, 0x6f, 0x73, 0x5c, 0x41, 0x70, 0x69, 0x5c, 0x56, 0x31, 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,
|
||||
0x6d, 0x6f, 0x73, 0x3a, 0x3a, 0x41, 0x70, 0x69, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72,
|
||||
0x6f, 0x74, 0x6f, 0x33,
|
||||
}
|
||||
|
||||
var (
|
||||
file_api_v2_workspace_service_proto_rawDescOnce sync.Once
|
||||
file_api_v2_workspace_service_proto_rawDescData = file_api_v2_workspace_service_proto_rawDesc
|
||||
file_api_v1_workspace_service_proto_rawDescOnce sync.Once
|
||||
file_api_v1_workspace_service_proto_rawDescData = file_api_v1_workspace_service_proto_rawDesc
|
||||
)
|
||||
|
||||
func file_api_v2_workspace_service_proto_rawDescGZIP() []byte {
|
||||
file_api_v2_workspace_service_proto_rawDescOnce.Do(func() {
|
||||
file_api_v2_workspace_service_proto_rawDescData = protoimpl.X.CompressGZIP(file_api_v2_workspace_service_proto_rawDescData)
|
||||
func file_api_v1_workspace_service_proto_rawDescGZIP() []byte {
|
||||
file_api_v1_workspace_service_proto_rawDescOnce.Do(func() {
|
||||
file_api_v1_workspace_service_proto_rawDescData = protoimpl.X.CompressGZIP(file_api_v1_workspace_service_proto_rawDescData)
|
||||
})
|
||||
return file_api_v2_workspace_service_proto_rawDescData
|
||||
return file_api_v1_workspace_service_proto_rawDescData
|
||||
}
|
||||
|
||||
var file_api_v2_workspace_service_proto_msgTypes = make([]protoimpl.MessageInfo, 2)
|
||||
var file_api_v2_workspace_service_proto_goTypes = []interface{}{
|
||||
(*WorkspaceProfile)(nil), // 0: memos.api.v2.WorkspaceProfile
|
||||
(*GetWorkspaceProfileRequest)(nil), // 1: memos.api.v2.GetWorkspaceProfileRequest
|
||||
var file_api_v1_workspace_service_proto_msgTypes = make([]protoimpl.MessageInfo, 2)
|
||||
var file_api_v1_workspace_service_proto_goTypes = []interface{}{
|
||||
(*WorkspaceProfile)(nil), // 0: memos.api.v1.WorkspaceProfile
|
||||
(*GetWorkspaceProfileRequest)(nil), // 1: memos.api.v1.GetWorkspaceProfileRequest
|
||||
}
|
||||
var file_api_v2_workspace_service_proto_depIdxs = []int32{
|
||||
1, // 0: memos.api.v2.WorkspaceService.GetWorkspaceProfile:input_type -> memos.api.v2.GetWorkspaceProfileRequest
|
||||
0, // 1: memos.api.v2.WorkspaceService.GetWorkspaceProfile:output_type -> memos.api.v2.WorkspaceProfile
|
||||
var file_api_v1_workspace_service_proto_depIdxs = []int32{
|
||||
1, // 0: memos.api.v1.WorkspaceService.GetWorkspaceProfile:input_type -> memos.api.v1.GetWorkspaceProfileRequest
|
||||
0, // 1: memos.api.v1.WorkspaceService.GetWorkspaceProfile:output_type -> memos.api.v1.WorkspaceProfile
|
||||
1, // [1:2] is the sub-list for method output_type
|
||||
0, // [0:1] is the sub-list for method input_type
|
||||
0, // [0:0] is the sub-list for extension type_name
|
||||
@ -192,13 +192,13 @@ var file_api_v2_workspace_service_proto_depIdxs = []int32{
|
||||
0, // [0:0] is the sub-list for field type_name
|
||||
}
|
||||
|
||||
func init() { file_api_v2_workspace_service_proto_init() }
|
||||
func file_api_v2_workspace_service_proto_init() {
|
||||
if File_api_v2_workspace_service_proto != nil {
|
||||
func init() { file_api_v1_workspace_service_proto_init() }
|
||||
func file_api_v1_workspace_service_proto_init() {
|
||||
if File_api_v1_workspace_service_proto != nil {
|
||||
return
|
||||
}
|
||||
if !protoimpl.UnsafeEnabled {
|
||||
file_api_v2_workspace_service_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
|
||||
file_api_v1_workspace_service_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*WorkspaceProfile); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
@ -210,7 +210,7 @@ func file_api_v2_workspace_service_proto_init() {
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_api_v2_workspace_service_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
|
||||
file_api_v1_workspace_service_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*GetWorkspaceProfileRequest); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
@ -227,18 +227,18 @@ func file_api_v2_workspace_service_proto_init() {
|
||||
out := protoimpl.TypeBuilder{
|
||||
File: protoimpl.DescBuilder{
|
||||
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
|
||||
RawDescriptor: file_api_v2_workspace_service_proto_rawDesc,
|
||||
RawDescriptor: file_api_v1_workspace_service_proto_rawDesc,
|
||||
NumEnums: 0,
|
||||
NumMessages: 2,
|
||||
NumExtensions: 0,
|
||||
NumServices: 1,
|
||||
},
|
||||
GoTypes: file_api_v2_workspace_service_proto_goTypes,
|
||||
DependencyIndexes: file_api_v2_workspace_service_proto_depIdxs,
|
||||
MessageInfos: file_api_v2_workspace_service_proto_msgTypes,
|
||||
GoTypes: file_api_v1_workspace_service_proto_goTypes,
|
||||
DependencyIndexes: file_api_v1_workspace_service_proto_depIdxs,
|
||||
MessageInfos: file_api_v1_workspace_service_proto_msgTypes,
|
||||
}.Build()
|
||||
File_api_v2_workspace_service_proto = out.File
|
||||
file_api_v2_workspace_service_proto_rawDesc = nil
|
||||
file_api_v2_workspace_service_proto_goTypes = nil
|
||||
file_api_v2_workspace_service_proto_depIdxs = nil
|
||||
File_api_v1_workspace_service_proto = out.File
|
||||
file_api_v1_workspace_service_proto_rawDesc = nil
|
||||
file_api_v1_workspace_service_proto_goTypes = nil
|
||||
file_api_v1_workspace_service_proto_depIdxs = nil
|
||||
}
|
@ -1,12 +1,12 @@
|
||||
// Code generated by protoc-gen-grpc-gateway. DO NOT EDIT.
|
||||
// source: api/v2/workspace_service.proto
|
||||
// source: api/v1/workspace_service.proto
|
||||
|
||||
/*
|
||||
Package apiv2 is a reverse proxy.
|
||||
Package apiv1 is a reverse proxy.
|
||||
|
||||
It translates gRPC into RESTful JSON APIs.
|
||||
*/
|
||||
package apiv2
|
||||
package apiv1
|
||||
|
||||
import (
|
||||
"context"
|
||||
@ -63,7 +63,7 @@ func RegisterWorkspaceServiceHandlerServer(ctx context.Context, mux *runtime.Ser
|
||||
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
||||
var err error
|
||||
var annotatedContext context.Context
|
||||
annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/memos.api.v2.WorkspaceService/GetWorkspaceProfile", runtime.WithHTTPPathPattern("/api/v2/workspace/profile"))
|
||||
annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/memos.api.v1.WorkspaceService/GetWorkspaceProfile", runtime.WithHTTPPathPattern("/api/v1/workspace/profile"))
|
||||
if err != nil {
|
||||
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||
return
|
||||
@ -127,7 +127,7 @@ func RegisterWorkspaceServiceHandlerClient(ctx context.Context, mux *runtime.Ser
|
||||
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
||||
var err error
|
||||
var annotatedContext context.Context
|
||||
annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/memos.api.v2.WorkspaceService/GetWorkspaceProfile", runtime.WithHTTPPathPattern("/api/v2/workspace/profile"))
|
||||
annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/memos.api.v1.WorkspaceService/GetWorkspaceProfile", runtime.WithHTTPPathPattern("/api/v1/workspace/profile"))
|
||||
if err != nil {
|
||||
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||
return
|
||||
@ -147,7 +147,7 @@ func RegisterWorkspaceServiceHandlerClient(ctx context.Context, mux *runtime.Ser
|
||||
}
|
||||
|
||||
var (
|
||||
pattern_WorkspaceService_GetWorkspaceProfile_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"api", "v2", "workspace", "profile"}, ""))
|
||||
pattern_WorkspaceService_GetWorkspaceProfile_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"api", "v1", "workspace", "profile"}, ""))
|
||||
)
|
||||
|
||||
var (
|
@ -2,9 +2,9 @@
|
||||
// versions:
|
||||
// - protoc-gen-go-grpc v1.3.0
|
||||
// - protoc (unknown)
|
||||
// source: api/v2/workspace_service.proto
|
||||
// source: api/v1/workspace_service.proto
|
||||
|
||||
package apiv2
|
||||
package apiv1
|
||||
|
||||
import (
|
||||
context "context"
|
||||
@ -19,7 +19,7 @@ import (
|
||||
const _ = grpc.SupportPackageIsVersion7
|
||||
|
||||
const (
|
||||
WorkspaceService_GetWorkspaceProfile_FullMethodName = "/memos.api.v2.WorkspaceService/GetWorkspaceProfile"
|
||||
WorkspaceService_GetWorkspaceProfile_FullMethodName = "/memos.api.v1.WorkspaceService/GetWorkspaceProfile"
|
||||
)
|
||||
|
||||
// WorkspaceServiceClient is the client API for WorkspaceService service.
|
||||
@ -98,7 +98,7 @@ func _WorkspaceService_GetWorkspaceProfile_Handler(srv interface{}, ctx context.
|
||||
// It's only intended for direct use with grpc.RegisterService,
|
||||
// and not to be introspected or modified (even as a copy)
|
||||
var WorkspaceService_ServiceDesc = grpc.ServiceDesc{
|
||||
ServiceName: "memos.api.v2.WorkspaceService",
|
||||
ServiceName: "memos.api.v1.WorkspaceService",
|
||||
HandlerType: (*WorkspaceServiceServer)(nil),
|
||||
Methods: []grpc.MethodDesc{
|
||||
{
|
||||
@ -107,5 +107,5 @@ var WorkspaceService_ServiceDesc = grpc.ServiceDesc{
|
||||
},
|
||||
},
|
||||
Streams: []grpc.StreamDesc{},
|
||||
Metadata: "api/v2/workspace_service.proto",
|
||||
Metadata: "api/v1/workspace_service.proto",
|
||||
}
|
@ -2,9 +2,9 @@
|
||||
// versions:
|
||||
// protoc-gen-go v1.33.0
|
||||
// protoc (unknown)
|
||||
// source: api/v2/workspace_setting_service.proto
|
||||
// source: api/v1/workspace_setting_service.proto
|
||||
|
||||
package apiv2
|
||||
package apiv1
|
||||
|
||||
import (
|
||||
_ "google.golang.org/genproto/googleapis/api/annotations"
|
||||
@ -60,11 +60,11 @@ func (x WorkspaceStorageSetting_StorageType) String() string {
|
||||
}
|
||||
|
||||
func (WorkspaceStorageSetting_StorageType) Descriptor() protoreflect.EnumDescriptor {
|
||||
return file_api_v2_workspace_setting_service_proto_enumTypes[0].Descriptor()
|
||||
return file_api_v1_workspace_setting_service_proto_enumTypes[0].Descriptor()
|
||||
}
|
||||
|
||||
func (WorkspaceStorageSetting_StorageType) Type() protoreflect.EnumType {
|
||||
return &file_api_v2_workspace_setting_service_proto_enumTypes[0]
|
||||
return &file_api_v1_workspace_setting_service_proto_enumTypes[0]
|
||||
}
|
||||
|
||||
func (x WorkspaceStorageSetting_StorageType) Number() protoreflect.EnumNumber {
|
||||
@ -73,7 +73,7 @@ func (x WorkspaceStorageSetting_StorageType) Number() protoreflect.EnumNumber {
|
||||
|
||||
// Deprecated: Use WorkspaceStorageSetting_StorageType.Descriptor instead.
|
||||
func (WorkspaceStorageSetting_StorageType) EnumDescriptor() ([]byte, []int) {
|
||||
return file_api_v2_workspace_setting_service_proto_rawDescGZIP(), []int{3, 0}
|
||||
return file_api_v1_workspace_setting_service_proto_rawDescGZIP(), []int{3, 0}
|
||||
}
|
||||
|
||||
type WorkspaceSetting struct {
|
||||
@ -95,7 +95,7 @@ type WorkspaceSetting struct {
|
||||
func (x *WorkspaceSetting) Reset() {
|
||||
*x = WorkspaceSetting{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_api_v2_workspace_setting_service_proto_msgTypes[0]
|
||||
mi := &file_api_v1_workspace_setting_service_proto_msgTypes[0]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
@ -108,7 +108,7 @@ func (x *WorkspaceSetting) String() string {
|
||||
func (*WorkspaceSetting) ProtoMessage() {}
|
||||
|
||||
func (x *WorkspaceSetting) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_api_v2_workspace_setting_service_proto_msgTypes[0]
|
||||
mi := &file_api_v1_workspace_setting_service_proto_msgTypes[0]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
@ -121,7 +121,7 @@ func (x *WorkspaceSetting) ProtoReflect() protoreflect.Message {
|
||||
|
||||
// Deprecated: Use WorkspaceSetting.ProtoReflect.Descriptor instead.
|
||||
func (*WorkspaceSetting) Descriptor() ([]byte, []int) {
|
||||
return file_api_v2_workspace_setting_service_proto_rawDescGZIP(), []int{0}
|
||||
return file_api_v1_workspace_setting_service_proto_rawDescGZIP(), []int{0}
|
||||
}
|
||||
|
||||
func (x *WorkspaceSetting) GetName() string {
|
||||
@ -203,7 +203,7 @@ type WorkspaceGeneralSetting struct {
|
||||
func (x *WorkspaceGeneralSetting) Reset() {
|
||||
*x = WorkspaceGeneralSetting{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_api_v2_workspace_setting_service_proto_msgTypes[1]
|
||||
mi := &file_api_v1_workspace_setting_service_proto_msgTypes[1]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
@ -216,7 +216,7 @@ func (x *WorkspaceGeneralSetting) String() string {
|
||||
func (*WorkspaceGeneralSetting) ProtoMessage() {}
|
||||
|
||||
func (x *WorkspaceGeneralSetting) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_api_v2_workspace_setting_service_proto_msgTypes[1]
|
||||
mi := &file_api_v1_workspace_setting_service_proto_msgTypes[1]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
@ -229,7 +229,7 @@ func (x *WorkspaceGeneralSetting) ProtoReflect() protoreflect.Message {
|
||||
|
||||
// Deprecated: Use WorkspaceGeneralSetting.ProtoReflect.Descriptor instead.
|
||||
func (*WorkspaceGeneralSetting) Descriptor() ([]byte, []int) {
|
||||
return file_api_v2_workspace_setting_service_proto_rawDescGZIP(), []int{1}
|
||||
return file_api_v1_workspace_setting_service_proto_rawDescGZIP(), []int{1}
|
||||
}
|
||||
|
||||
func (x *WorkspaceGeneralSetting) GetInstanceUrl() string {
|
||||
@ -289,7 +289,7 @@ type WorkspaceCustomProfile struct {
|
||||
func (x *WorkspaceCustomProfile) Reset() {
|
||||
*x = WorkspaceCustomProfile{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_api_v2_workspace_setting_service_proto_msgTypes[2]
|
||||
mi := &file_api_v1_workspace_setting_service_proto_msgTypes[2]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
@ -302,7 +302,7 @@ func (x *WorkspaceCustomProfile) String() string {
|
||||
func (*WorkspaceCustomProfile) ProtoMessage() {}
|
||||
|
||||
func (x *WorkspaceCustomProfile) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_api_v2_workspace_setting_service_proto_msgTypes[2]
|
||||
mi := &file_api_v1_workspace_setting_service_proto_msgTypes[2]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
@ -315,7 +315,7 @@ func (x *WorkspaceCustomProfile) ProtoReflect() protoreflect.Message {
|
||||
|
||||
// Deprecated: Use WorkspaceCustomProfile.ProtoReflect.Descriptor instead.
|
||||
func (*WorkspaceCustomProfile) Descriptor() ([]byte, []int) {
|
||||
return file_api_v2_workspace_setting_service_proto_rawDescGZIP(), []int{2}
|
||||
return file_api_v1_workspace_setting_service_proto_rawDescGZIP(), []int{2}
|
||||
}
|
||||
|
||||
func (x *WorkspaceCustomProfile) GetTitle() string {
|
||||
@ -359,7 +359,7 @@ type WorkspaceStorageSetting struct {
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
// storage_type is the storage type.
|
||||
StorageType WorkspaceStorageSetting_StorageType `protobuf:"varint,1,opt,name=storage_type,json=storageType,proto3,enum=memos.api.v2.WorkspaceStorageSetting_StorageType" json:"storage_type,omitempty"`
|
||||
StorageType WorkspaceStorageSetting_StorageType `protobuf:"varint,1,opt,name=storage_type,json=storageType,proto3,enum=memos.api.v1.WorkspaceStorageSetting_StorageType" json:"storage_type,omitempty"`
|
||||
// The id of actived external storage.
|
||||
ActivedExternalStorageId *int32 `protobuf:"varint,2,opt,name=actived_external_storage_id,json=activedExternalStorageId,proto3,oneof" json:"actived_external_storage_id,omitempty"`
|
||||
// The template of local storage path.
|
||||
@ -372,7 +372,7 @@ type WorkspaceStorageSetting struct {
|
||||
func (x *WorkspaceStorageSetting) Reset() {
|
||||
*x = WorkspaceStorageSetting{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_api_v2_workspace_setting_service_proto_msgTypes[3]
|
||||
mi := &file_api_v1_workspace_setting_service_proto_msgTypes[3]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
@ -385,7 +385,7 @@ func (x *WorkspaceStorageSetting) String() string {
|
||||
func (*WorkspaceStorageSetting) ProtoMessage() {}
|
||||
|
||||
func (x *WorkspaceStorageSetting) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_api_v2_workspace_setting_service_proto_msgTypes[3]
|
||||
mi := &file_api_v1_workspace_setting_service_proto_msgTypes[3]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
@ -398,7 +398,7 @@ func (x *WorkspaceStorageSetting) ProtoReflect() protoreflect.Message {
|
||||
|
||||
// Deprecated: Use WorkspaceStorageSetting.ProtoReflect.Descriptor instead.
|
||||
func (*WorkspaceStorageSetting) Descriptor() ([]byte, []int) {
|
||||
return file_api_v2_workspace_setting_service_proto_rawDescGZIP(), []int{3}
|
||||
return file_api_v1_workspace_setting_service_proto_rawDescGZIP(), []int{3}
|
||||
}
|
||||
|
||||
func (x *WorkspaceStorageSetting) GetStorageType() WorkspaceStorageSetting_StorageType {
|
||||
@ -443,7 +443,7 @@ type WorkspaceMemoRelatedSetting struct {
|
||||
func (x *WorkspaceMemoRelatedSetting) Reset() {
|
||||
*x = WorkspaceMemoRelatedSetting{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_api_v2_workspace_setting_service_proto_msgTypes[4]
|
||||
mi := &file_api_v1_workspace_setting_service_proto_msgTypes[4]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
@ -456,7 +456,7 @@ func (x *WorkspaceMemoRelatedSetting) String() string {
|
||||
func (*WorkspaceMemoRelatedSetting) ProtoMessage() {}
|
||||
|
||||
func (x *WorkspaceMemoRelatedSetting) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_api_v2_workspace_setting_service_proto_msgTypes[4]
|
||||
mi := &file_api_v1_workspace_setting_service_proto_msgTypes[4]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
@ -469,7 +469,7 @@ func (x *WorkspaceMemoRelatedSetting) ProtoReflect() protoreflect.Message {
|
||||
|
||||
// Deprecated: Use WorkspaceMemoRelatedSetting.ProtoReflect.Descriptor instead.
|
||||
func (*WorkspaceMemoRelatedSetting) Descriptor() ([]byte, []int) {
|
||||
return file_api_v2_workspace_setting_service_proto_rawDescGZIP(), []int{4}
|
||||
return file_api_v1_workspace_setting_service_proto_rawDescGZIP(), []int{4}
|
||||
}
|
||||
|
||||
func (x *WorkspaceMemoRelatedSetting) GetDisallowPublicVisible() bool {
|
||||
@ -495,7 +495,7 @@ type ListWorkspaceSettingsRequest struct {
|
||||
func (x *ListWorkspaceSettingsRequest) Reset() {
|
||||
*x = ListWorkspaceSettingsRequest{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_api_v2_workspace_setting_service_proto_msgTypes[5]
|
||||
mi := &file_api_v1_workspace_setting_service_proto_msgTypes[5]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
@ -508,7 +508,7 @@ func (x *ListWorkspaceSettingsRequest) String() string {
|
||||
func (*ListWorkspaceSettingsRequest) ProtoMessage() {}
|
||||
|
||||
func (x *ListWorkspaceSettingsRequest) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_api_v2_workspace_setting_service_proto_msgTypes[5]
|
||||
mi := &file_api_v1_workspace_setting_service_proto_msgTypes[5]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
@ -521,7 +521,7 @@ func (x *ListWorkspaceSettingsRequest) ProtoReflect() protoreflect.Message {
|
||||
|
||||
// Deprecated: Use ListWorkspaceSettingsRequest.ProtoReflect.Descriptor instead.
|
||||
func (*ListWorkspaceSettingsRequest) Descriptor() ([]byte, []int) {
|
||||
return file_api_v2_workspace_setting_service_proto_rawDescGZIP(), []int{5}
|
||||
return file_api_v1_workspace_setting_service_proto_rawDescGZIP(), []int{5}
|
||||
}
|
||||
|
||||
type ListWorkspaceSettingsResponse struct {
|
||||
@ -535,7 +535,7 @@ type ListWorkspaceSettingsResponse struct {
|
||||
func (x *ListWorkspaceSettingsResponse) Reset() {
|
||||
*x = ListWorkspaceSettingsResponse{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_api_v2_workspace_setting_service_proto_msgTypes[6]
|
||||
mi := &file_api_v1_workspace_setting_service_proto_msgTypes[6]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
@ -548,7 +548,7 @@ func (x *ListWorkspaceSettingsResponse) String() string {
|
||||
func (*ListWorkspaceSettingsResponse) ProtoMessage() {}
|
||||
|
||||
func (x *ListWorkspaceSettingsResponse) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_api_v2_workspace_setting_service_proto_msgTypes[6]
|
||||
mi := &file_api_v1_workspace_setting_service_proto_msgTypes[6]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
@ -561,7 +561,7 @@ func (x *ListWorkspaceSettingsResponse) ProtoReflect() protoreflect.Message {
|
||||
|
||||
// Deprecated: Use ListWorkspaceSettingsResponse.ProtoReflect.Descriptor instead.
|
||||
func (*ListWorkspaceSettingsResponse) Descriptor() ([]byte, []int) {
|
||||
return file_api_v2_workspace_setting_service_proto_rawDescGZIP(), []int{6}
|
||||
return file_api_v1_workspace_setting_service_proto_rawDescGZIP(), []int{6}
|
||||
}
|
||||
|
||||
func (x *ListWorkspaceSettingsResponse) GetSettings() []*WorkspaceSetting {
|
||||
@ -584,7 +584,7 @@ type GetWorkspaceSettingRequest struct {
|
||||
func (x *GetWorkspaceSettingRequest) Reset() {
|
||||
*x = GetWorkspaceSettingRequest{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_api_v2_workspace_setting_service_proto_msgTypes[7]
|
||||
mi := &file_api_v1_workspace_setting_service_proto_msgTypes[7]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
@ -597,7 +597,7 @@ func (x *GetWorkspaceSettingRequest) String() string {
|
||||
func (*GetWorkspaceSettingRequest) ProtoMessage() {}
|
||||
|
||||
func (x *GetWorkspaceSettingRequest) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_api_v2_workspace_setting_service_proto_msgTypes[7]
|
||||
mi := &file_api_v1_workspace_setting_service_proto_msgTypes[7]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
@ -610,7 +610,7 @@ func (x *GetWorkspaceSettingRequest) ProtoReflect() protoreflect.Message {
|
||||
|
||||
// Deprecated: Use GetWorkspaceSettingRequest.ProtoReflect.Descriptor instead.
|
||||
func (*GetWorkspaceSettingRequest) Descriptor() ([]byte, []int) {
|
||||
return file_api_v2_workspace_setting_service_proto_rawDescGZIP(), []int{7}
|
||||
return file_api_v1_workspace_setting_service_proto_rawDescGZIP(), []int{7}
|
||||
}
|
||||
|
||||
func (x *GetWorkspaceSettingRequest) GetName() string {
|
||||
@ -632,7 +632,7 @@ type SetWorkspaceSettingRequest struct {
|
||||
func (x *SetWorkspaceSettingRequest) Reset() {
|
||||
*x = SetWorkspaceSettingRequest{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_api_v2_workspace_setting_service_proto_msgTypes[8]
|
||||
mi := &file_api_v1_workspace_setting_service_proto_msgTypes[8]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
@ -645,7 +645,7 @@ func (x *SetWorkspaceSettingRequest) String() string {
|
||||
func (*SetWorkspaceSettingRequest) ProtoMessage() {}
|
||||
|
||||
func (x *SetWorkspaceSettingRequest) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_api_v2_workspace_setting_service_proto_msgTypes[8]
|
||||
mi := &file_api_v1_workspace_setting_service_proto_msgTypes[8]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
@ -658,7 +658,7 @@ func (x *SetWorkspaceSettingRequest) ProtoReflect() protoreflect.Message {
|
||||
|
||||
// Deprecated: Use SetWorkspaceSettingRequest.ProtoReflect.Descriptor instead.
|
||||
func (*SetWorkspaceSettingRequest) Descriptor() ([]byte, []int) {
|
||||
return file_api_v2_workspace_setting_service_proto_rawDescGZIP(), []int{8}
|
||||
return file_api_v1_workspace_setting_service_proto_rawDescGZIP(), []int{8}
|
||||
}
|
||||
|
||||
func (x *SetWorkspaceSettingRequest) GetSetting() *WorkspaceSetting {
|
||||
@ -668,13 +668,13 @@ func (x *SetWorkspaceSettingRequest) GetSetting() *WorkspaceSetting {
|
||||
return nil
|
||||
}
|
||||
|
||||
var File_api_v2_workspace_setting_service_proto protoreflect.FileDescriptor
|
||||
var File_api_v1_workspace_setting_service_proto protoreflect.FileDescriptor
|
||||
|
||||
var file_api_v2_workspace_setting_service_proto_rawDesc = []byte{
|
||||
0x0a, 0x26, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x32, 0x2f, 0x77, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61,
|
||||
var file_api_v1_workspace_setting_service_proto_rawDesc = []byte{
|
||||
0x0a, 0x26, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, 0x2f, 0x77, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61,
|
||||
0x63, 0x65, 0x5f, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 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,
|
||||
0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 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, 0x1f, 0x67,
|
||||
@ -684,18 +684,18 @@ var file_api_v2_workspace_setting_service_proto_rawDesc = []byte{
|
||||
0x69, 0x6e, 0x67, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28,
|
||||
0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x50, 0x0a, 0x0f, 0x67, 0x65, 0x6e, 0x65, 0x72,
|
||||
0x61, 0x6c, 0x5f, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b,
|
||||
0x32, 0x25, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e,
|
||||
0x32, 0x25, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e,
|
||||
0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x6c,
|
||||
0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x48, 0x00, 0x52, 0x0e, 0x67, 0x65, 0x6e, 0x65, 0x72,
|
||||
0x61, 0x6c, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x12, 0x50, 0x0a, 0x0f, 0x73, 0x74, 0x6f,
|
||||
0x72, 0x61, 0x67, 0x65, 0x5f, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x18, 0x03, 0x20, 0x01,
|
||||
0x28, 0x0b, 0x32, 0x25, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76,
|
||||
0x32, 0x2e, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x53, 0x74, 0x6f, 0x72, 0x61,
|
||||
0x31, 0x2e, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x53, 0x74, 0x6f, 0x72, 0x61,
|
||||
0x67, 0x65, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x48, 0x00, 0x52, 0x0e, 0x73, 0x74, 0x6f,
|
||||
0x72, 0x61, 0x67, 0x65, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x12, 0x5d, 0x0a, 0x14, 0x6d,
|
||||
0x65, 0x6d, 0x6f, 0x5f, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x73, 0x65, 0x74, 0x74,
|
||||
0x69, 0x6e, 0x67, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x29, 0x2e, 0x6d, 0x65, 0x6d, 0x6f,
|
||||
0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61,
|
||||
0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61,
|
||||
0x63, 0x65, 0x4d, 0x65, 0x6d, 0x6f, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x65, 0x64, 0x53, 0x65, 0x74,
|
||||
0x74, 0x69, 0x6e, 0x67, 0x48, 0x00, 0x52, 0x12, 0x6d, 0x65, 0x6d, 0x6f, 0x52, 0x65, 0x6c, 0x61,
|
||||
0x74, 0x65, 0x64, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x42, 0x07, 0x0a, 0x05, 0x76, 0x61,
|
||||
@ -717,7 +717,7 @@ var file_api_v2_workspace_setting_service_proto_rawDesc = []byte{
|
||||
0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x53, 0x74, 0x79, 0x6c, 0x65, 0x12, 0x4b, 0x0a, 0x0e, 0x63,
|
||||
0x75, 0x73, 0x74, 0x6f, 0x6d, 0x5f, 0x70, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x18, 0x06, 0x20,
|
||||
0x01, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e,
|
||||
0x76, 0x32, 0x2e, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x43, 0x75, 0x73, 0x74,
|
||||
0x76, 0x31, 0x2e, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x43, 0x75, 0x73, 0x74,
|
||||
0x6f, 0x6d, 0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x52, 0x0d, 0x63, 0x75, 0x73, 0x74, 0x6f,
|
||||
0x6d, 0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x22, 0xa3, 0x01, 0x0a, 0x16, 0x57, 0x6f, 0x72,
|
||||
0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x43, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x50, 0x72, 0x6f, 0x66,
|
||||
@ -733,7 +733,7 @@ var file_api_v2_workspace_setting_service_proto_rawDesc = []byte{
|
||||
0x03, 0x0a, 0x17, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x53, 0x74, 0x6f, 0x72,
|
||||
0x61, 0x67, 0x65, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x12, 0x54, 0x0a, 0x0c, 0x73, 0x74,
|
||||
0x6f, 0x72, 0x61, 0x67, 0x65, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e,
|
||||
0x32, 0x31, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e,
|
||||
0x32, 0x31, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e,
|
||||
0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x53, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65,
|
||||
0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x2e, 0x53, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x54,
|
||||
0x79, 0x70, 0x65, 0x52, 0x0b, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x54, 0x79, 0x70, 0x65,
|
||||
@ -773,7 +773,7 @@ var file_api_v2_workspace_setting_service_proto_rawDesc = []byte{
|
||||
0x65, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73,
|
||||
0x65, 0x12, 0x3a, 0x0a, 0x08, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x18, 0x01, 0x20,
|
||||
0x03, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e,
|
||||
0x76, 0x32, 0x2e, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x53, 0x65, 0x74, 0x74,
|
||||
0x76, 0x31, 0x2e, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x53, 0x65, 0x74, 0x74,
|
||||
0x69, 0x6e, 0x67, 0x52, 0x08, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x22, 0x35, 0x0a,
|
||||
0x1a, 0x47, 0x65, 0x74, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x53, 0x65, 0x74,
|
||||
0x74, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x17, 0x0a, 0x04, 0x6e,
|
||||
@ -782,93 +782,93 @@ var file_api_v2_workspace_setting_service_proto_rawDesc = []byte{
|
||||
0x70, 0x61, 0x63, 0x65, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65,
|
||||
0x73, 0x74, 0x12, 0x38, 0x0a, 0x07, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x18, 0x01, 0x20,
|
||||
0x01, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e,
|
||||
0x76, 0x32, 0x2e, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x53, 0x65, 0x74, 0x74,
|
||||
0x76, 0x31, 0x2e, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x53, 0x65, 0x74, 0x74,
|
||||
0x69, 0x6e, 0x67, 0x52, 0x07, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x32, 0xf0, 0x03, 0x0a,
|
||||
0x17, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e,
|
||||
0x67, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x94, 0x01, 0x0a, 0x15, 0x4c, 0x69, 0x73,
|
||||
0x74, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e,
|
||||
0x67, 0x73, 0x12, 0x2a, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76,
|
||||
0x32, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x53,
|
||||
0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x53,
|
||||
0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 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,
|
||||
0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x69,
|
||||
0x73, 0x74, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x53, 0x65, 0x74, 0x74, 0x69,
|
||||
0x6e, 0x67, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x22, 0x82, 0xd3, 0xe4,
|
||||
0x93, 0x02, 0x1c, 0x12, 0x1a, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x32, 0x2f, 0x77, 0x6f, 0x72,
|
||||
0x93, 0x02, 0x1c, 0x12, 0x1a, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, 0x2f, 0x77, 0x6f, 0x72,
|
||||
0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x2f, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x12,
|
||||
0x93, 0x01, 0x0a, 0x13, 0x47, 0x65, 0x74, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65,
|
||||
0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x12, 0x28, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e,
|
||||
0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x47, 0x65, 0x74, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70,
|
||||
0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70,
|
||||
0x61, 0x63, 0x65, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73,
|
||||
0x74, 0x1a, 0x1e, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32,
|
||||
0x74, 0x1a, 0x1e, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31,
|
||||
0x2e, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e,
|
||||
0x67, 0x22, 0x32, 0xda, 0x41, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x25,
|
||||
0x12, 0x23, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x32, 0x2f, 0x77, 0x6f, 0x72, 0x6b, 0x73, 0x70,
|
||||
0x12, 0x23, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, 0x2f, 0x77, 0x6f, 0x72, 0x6b, 0x73, 0x70,
|
||||
0x61, 0x63, 0x65, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e,
|
||||
0x67, 0x73, 0x2f, 0x2a, 0x7d, 0x12, 0xa7, 0x01, 0x0a, 0x13, 0x53, 0x65, 0x74, 0x57, 0x6f, 0x72,
|
||||
0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x12, 0x28, 0x2e,
|
||||
0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x53, 0x65, 0x74,
|
||||
0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x65, 0x74,
|
||||
0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67,
|
||||
0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1e, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e,
|
||||
0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65,
|
||||
0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65,
|
||||
0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x22, 0x46, 0xda, 0x41, 0x07, 0x73, 0x65, 0x74, 0x74,
|
||||
0x69, 0x6e, 0x67, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x36, 0x3a, 0x07, 0x73, 0x65, 0x74, 0x74, 0x69,
|
||||
0x6e, 0x67, 0x32, 0x2b, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x32, 0x2f, 0x77, 0x6f, 0x72, 0x6b,
|
||||
0x6e, 0x67, 0x32, 0x2b, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, 0x2f, 0x77, 0x6f, 0x72, 0x6b,
|
||||
0x73, 0x70, 0x61, 0x63, 0x65, 0x2f, 0x7b, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x2e, 0x6e,
|
||||
0x61, 0x6d, 0x65, 0x3d, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x2f, 0x2a, 0x7d, 0x42,
|
||||
0xb4, 0x01, 0x0a, 0x10, 0x63, 0x6f, 0x6d, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70,
|
||||
0x69, 0x2e, 0x76, 0x32, 0x42, 0x1c, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x53,
|
||||
0x69, 0x2e, 0x76, 0x31, 0x42, 0x1c, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x53,
|
||||
0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 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,
|
||||
0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x65, 0x6e, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31,
|
||||
0x3b, 0x61, 0x70, 0x69, 0x76, 0x31, 0xa2, 0x02, 0x03, 0x4d, 0x41, 0x58, 0xaa, 0x02, 0x0c, 0x4d,
|
||||
0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x41, 0x70, 0x69, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x0c, 0x4d, 0x65,
|
||||
0x6d, 0x6f, 0x73, 0x5c, 0x41, 0x70, 0x69, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x18, 0x4d, 0x65, 0x6d,
|
||||
0x6f, 0x73, 0x5c, 0x41, 0x70, 0x69, 0x5c, 0x56, 0x31, 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,
|
||||
0x70, 0x69, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
|
||||
}
|
||||
|
||||
var (
|
||||
file_api_v2_workspace_setting_service_proto_rawDescOnce sync.Once
|
||||
file_api_v2_workspace_setting_service_proto_rawDescData = file_api_v2_workspace_setting_service_proto_rawDesc
|
||||
file_api_v1_workspace_setting_service_proto_rawDescOnce sync.Once
|
||||
file_api_v1_workspace_setting_service_proto_rawDescData = file_api_v1_workspace_setting_service_proto_rawDesc
|
||||
)
|
||||
|
||||
func file_api_v2_workspace_setting_service_proto_rawDescGZIP() []byte {
|
||||
file_api_v2_workspace_setting_service_proto_rawDescOnce.Do(func() {
|
||||
file_api_v2_workspace_setting_service_proto_rawDescData = protoimpl.X.CompressGZIP(file_api_v2_workspace_setting_service_proto_rawDescData)
|
||||
func file_api_v1_workspace_setting_service_proto_rawDescGZIP() []byte {
|
||||
file_api_v1_workspace_setting_service_proto_rawDescOnce.Do(func() {
|
||||
file_api_v1_workspace_setting_service_proto_rawDescData = protoimpl.X.CompressGZIP(file_api_v1_workspace_setting_service_proto_rawDescData)
|
||||
})
|
||||
return file_api_v2_workspace_setting_service_proto_rawDescData
|
||||
return file_api_v1_workspace_setting_service_proto_rawDescData
|
||||
}
|
||||
|
||||
var file_api_v2_workspace_setting_service_proto_enumTypes = make([]protoimpl.EnumInfo, 1)
|
||||
var file_api_v2_workspace_setting_service_proto_msgTypes = make([]protoimpl.MessageInfo, 9)
|
||||
var file_api_v2_workspace_setting_service_proto_goTypes = []interface{}{
|
||||
(WorkspaceStorageSetting_StorageType)(0), // 0: memos.api.v2.WorkspaceStorageSetting.StorageType
|
||||
(*WorkspaceSetting)(nil), // 1: memos.api.v2.WorkspaceSetting
|
||||
(*WorkspaceGeneralSetting)(nil), // 2: memos.api.v2.WorkspaceGeneralSetting
|
||||
(*WorkspaceCustomProfile)(nil), // 3: memos.api.v2.WorkspaceCustomProfile
|
||||
(*WorkspaceStorageSetting)(nil), // 4: memos.api.v2.WorkspaceStorageSetting
|
||||
(*WorkspaceMemoRelatedSetting)(nil), // 5: memos.api.v2.WorkspaceMemoRelatedSetting
|
||||
(*ListWorkspaceSettingsRequest)(nil), // 6: memos.api.v2.ListWorkspaceSettingsRequest
|
||||
(*ListWorkspaceSettingsResponse)(nil), // 7: memos.api.v2.ListWorkspaceSettingsResponse
|
||||
(*GetWorkspaceSettingRequest)(nil), // 8: memos.api.v2.GetWorkspaceSettingRequest
|
||||
(*SetWorkspaceSettingRequest)(nil), // 9: memos.api.v2.SetWorkspaceSettingRequest
|
||||
var file_api_v1_workspace_setting_service_proto_enumTypes = make([]protoimpl.EnumInfo, 1)
|
||||
var file_api_v1_workspace_setting_service_proto_msgTypes = make([]protoimpl.MessageInfo, 9)
|
||||
var file_api_v1_workspace_setting_service_proto_goTypes = []interface{}{
|
||||
(WorkspaceStorageSetting_StorageType)(0), // 0: memos.api.v1.WorkspaceStorageSetting.StorageType
|
||||
(*WorkspaceSetting)(nil), // 1: memos.api.v1.WorkspaceSetting
|
||||
(*WorkspaceGeneralSetting)(nil), // 2: memos.api.v1.WorkspaceGeneralSetting
|
||||
(*WorkspaceCustomProfile)(nil), // 3: memos.api.v1.WorkspaceCustomProfile
|
||||
(*WorkspaceStorageSetting)(nil), // 4: memos.api.v1.WorkspaceStorageSetting
|
||||
(*WorkspaceMemoRelatedSetting)(nil), // 5: memos.api.v1.WorkspaceMemoRelatedSetting
|
||||
(*ListWorkspaceSettingsRequest)(nil), // 6: memos.api.v1.ListWorkspaceSettingsRequest
|
||||
(*ListWorkspaceSettingsResponse)(nil), // 7: memos.api.v1.ListWorkspaceSettingsResponse
|
||||
(*GetWorkspaceSettingRequest)(nil), // 8: memos.api.v1.GetWorkspaceSettingRequest
|
||||
(*SetWorkspaceSettingRequest)(nil), // 9: memos.api.v1.SetWorkspaceSettingRequest
|
||||
}
|
||||
var file_api_v2_workspace_setting_service_proto_depIdxs = []int32{
|
||||
2, // 0: memos.api.v2.WorkspaceSetting.general_setting:type_name -> memos.api.v2.WorkspaceGeneralSetting
|
||||
4, // 1: memos.api.v2.WorkspaceSetting.storage_setting:type_name -> memos.api.v2.WorkspaceStorageSetting
|
||||
5, // 2: memos.api.v2.WorkspaceSetting.memo_related_setting:type_name -> memos.api.v2.WorkspaceMemoRelatedSetting
|
||||
3, // 3: memos.api.v2.WorkspaceGeneralSetting.custom_profile:type_name -> memos.api.v2.WorkspaceCustomProfile
|
||||
0, // 4: memos.api.v2.WorkspaceStorageSetting.storage_type:type_name -> memos.api.v2.WorkspaceStorageSetting.StorageType
|
||||
1, // 5: memos.api.v2.ListWorkspaceSettingsResponse.settings:type_name -> memos.api.v2.WorkspaceSetting
|
||||
1, // 6: memos.api.v2.SetWorkspaceSettingRequest.setting:type_name -> memos.api.v2.WorkspaceSetting
|
||||
6, // 7: memos.api.v2.WorkspaceSettingService.ListWorkspaceSettings:input_type -> memos.api.v2.ListWorkspaceSettingsRequest
|
||||
8, // 8: memos.api.v2.WorkspaceSettingService.GetWorkspaceSetting:input_type -> memos.api.v2.GetWorkspaceSettingRequest
|
||||
9, // 9: memos.api.v2.WorkspaceSettingService.SetWorkspaceSetting:input_type -> memos.api.v2.SetWorkspaceSettingRequest
|
||||
7, // 10: memos.api.v2.WorkspaceSettingService.ListWorkspaceSettings:output_type -> memos.api.v2.ListWorkspaceSettingsResponse
|
||||
1, // 11: memos.api.v2.WorkspaceSettingService.GetWorkspaceSetting:output_type -> memos.api.v2.WorkspaceSetting
|
||||
1, // 12: memos.api.v2.WorkspaceSettingService.SetWorkspaceSetting:output_type -> memos.api.v2.WorkspaceSetting
|
||||
var file_api_v1_workspace_setting_service_proto_depIdxs = []int32{
|
||||
2, // 0: memos.api.v1.WorkspaceSetting.general_setting:type_name -> memos.api.v1.WorkspaceGeneralSetting
|
||||
4, // 1: memos.api.v1.WorkspaceSetting.storage_setting:type_name -> memos.api.v1.WorkspaceStorageSetting
|
||||
5, // 2: memos.api.v1.WorkspaceSetting.memo_related_setting:type_name -> memos.api.v1.WorkspaceMemoRelatedSetting
|
||||
3, // 3: memos.api.v1.WorkspaceGeneralSetting.custom_profile:type_name -> memos.api.v1.WorkspaceCustomProfile
|
||||
0, // 4: memos.api.v1.WorkspaceStorageSetting.storage_type:type_name -> memos.api.v1.WorkspaceStorageSetting.StorageType
|
||||
1, // 5: memos.api.v1.ListWorkspaceSettingsResponse.settings:type_name -> memos.api.v1.WorkspaceSetting
|
||||
1, // 6: memos.api.v1.SetWorkspaceSettingRequest.setting:type_name -> memos.api.v1.WorkspaceSetting
|
||||
6, // 7: memos.api.v1.WorkspaceSettingService.ListWorkspaceSettings:input_type -> memos.api.v1.ListWorkspaceSettingsRequest
|
||||
8, // 8: memos.api.v1.WorkspaceSettingService.GetWorkspaceSetting:input_type -> memos.api.v1.GetWorkspaceSettingRequest
|
||||
9, // 9: memos.api.v1.WorkspaceSettingService.SetWorkspaceSetting:input_type -> memos.api.v1.SetWorkspaceSettingRequest
|
||||
7, // 10: memos.api.v1.WorkspaceSettingService.ListWorkspaceSettings:output_type -> memos.api.v1.ListWorkspaceSettingsResponse
|
||||
1, // 11: memos.api.v1.WorkspaceSettingService.GetWorkspaceSetting:output_type -> memos.api.v1.WorkspaceSetting
|
||||
1, // 12: memos.api.v1.WorkspaceSettingService.SetWorkspaceSetting:output_type -> memos.api.v1.WorkspaceSetting
|
||||
10, // [10:13] is the sub-list for method output_type
|
||||
7, // [7:10] is the sub-list for method input_type
|
||||
7, // [7:7] is the sub-list for extension type_name
|
||||
@ -876,13 +876,13 @@ var file_api_v2_workspace_setting_service_proto_depIdxs = []int32{
|
||||
0, // [0:7] is the sub-list for field type_name
|
||||
}
|
||||
|
||||
func init() { file_api_v2_workspace_setting_service_proto_init() }
|
||||
func file_api_v2_workspace_setting_service_proto_init() {
|
||||
if File_api_v2_workspace_setting_service_proto != nil {
|
||||
func init() { file_api_v1_workspace_setting_service_proto_init() }
|
||||
func file_api_v1_workspace_setting_service_proto_init() {
|
||||
if File_api_v1_workspace_setting_service_proto != nil {
|
||||
return
|
||||
}
|
||||
if !protoimpl.UnsafeEnabled {
|
||||
file_api_v2_workspace_setting_service_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
|
||||
file_api_v1_workspace_setting_service_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*WorkspaceSetting); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
@ -894,7 +894,7 @@ func file_api_v2_workspace_setting_service_proto_init() {
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_api_v2_workspace_setting_service_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
|
||||
file_api_v1_workspace_setting_service_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*WorkspaceGeneralSetting); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
@ -906,7 +906,7 @@ func file_api_v2_workspace_setting_service_proto_init() {
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_api_v2_workspace_setting_service_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
|
||||
file_api_v1_workspace_setting_service_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*WorkspaceCustomProfile); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
@ -918,7 +918,7 @@ func file_api_v2_workspace_setting_service_proto_init() {
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_api_v2_workspace_setting_service_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} {
|
||||
file_api_v1_workspace_setting_service_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*WorkspaceStorageSetting); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
@ -930,7 +930,7 @@ func file_api_v2_workspace_setting_service_proto_init() {
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_api_v2_workspace_setting_service_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} {
|
||||
file_api_v1_workspace_setting_service_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*WorkspaceMemoRelatedSetting); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
@ -942,7 +942,7 @@ func file_api_v2_workspace_setting_service_proto_init() {
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_api_v2_workspace_setting_service_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} {
|
||||
file_api_v1_workspace_setting_service_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*ListWorkspaceSettingsRequest); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
@ -954,7 +954,7 @@ func file_api_v2_workspace_setting_service_proto_init() {
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_api_v2_workspace_setting_service_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} {
|
||||
file_api_v1_workspace_setting_service_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*ListWorkspaceSettingsResponse); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
@ -966,7 +966,7 @@ func file_api_v2_workspace_setting_service_proto_init() {
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_api_v2_workspace_setting_service_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} {
|
||||
file_api_v1_workspace_setting_service_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*GetWorkspaceSettingRequest); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
@ -978,7 +978,7 @@ func file_api_v2_workspace_setting_service_proto_init() {
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_api_v2_workspace_setting_service_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} {
|
||||
file_api_v1_workspace_setting_service_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*SetWorkspaceSettingRequest); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
@ -991,29 +991,29 @@ func file_api_v2_workspace_setting_service_proto_init() {
|
||||
}
|
||||
}
|
||||
}
|
||||
file_api_v2_workspace_setting_service_proto_msgTypes[0].OneofWrappers = []interface{}{
|
||||
file_api_v1_workspace_setting_service_proto_msgTypes[0].OneofWrappers = []interface{}{
|
||||
(*WorkspaceSetting_GeneralSetting)(nil),
|
||||
(*WorkspaceSetting_StorageSetting)(nil),
|
||||
(*WorkspaceSetting_MemoRelatedSetting)(nil),
|
||||
}
|
||||
file_api_v2_workspace_setting_service_proto_msgTypes[3].OneofWrappers = []interface{}{}
|
||||
file_api_v1_workspace_setting_service_proto_msgTypes[3].OneofWrappers = []interface{}{}
|
||||
type x struct{}
|
||||
out := protoimpl.TypeBuilder{
|
||||
File: protoimpl.DescBuilder{
|
||||
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
|
||||
RawDescriptor: file_api_v2_workspace_setting_service_proto_rawDesc,
|
||||
RawDescriptor: file_api_v1_workspace_setting_service_proto_rawDesc,
|
||||
NumEnums: 1,
|
||||
NumMessages: 9,
|
||||
NumExtensions: 0,
|
||||
NumServices: 1,
|
||||
},
|
||||
GoTypes: file_api_v2_workspace_setting_service_proto_goTypes,
|
||||
DependencyIndexes: file_api_v2_workspace_setting_service_proto_depIdxs,
|
||||
EnumInfos: file_api_v2_workspace_setting_service_proto_enumTypes,
|
||||
MessageInfos: file_api_v2_workspace_setting_service_proto_msgTypes,
|
||||
GoTypes: file_api_v1_workspace_setting_service_proto_goTypes,
|
||||
DependencyIndexes: file_api_v1_workspace_setting_service_proto_depIdxs,
|
||||
EnumInfos: file_api_v1_workspace_setting_service_proto_enumTypes,
|
||||
MessageInfos: file_api_v1_workspace_setting_service_proto_msgTypes,
|
||||
}.Build()
|
||||
File_api_v2_workspace_setting_service_proto = out.File
|
||||
file_api_v2_workspace_setting_service_proto_rawDesc = nil
|
||||
file_api_v2_workspace_setting_service_proto_goTypes = nil
|
||||
file_api_v2_workspace_setting_service_proto_depIdxs = nil
|
||||
File_api_v1_workspace_setting_service_proto = out.File
|
||||
file_api_v1_workspace_setting_service_proto_rawDesc = nil
|
||||
file_api_v1_workspace_setting_service_proto_goTypes = nil
|
||||
file_api_v1_workspace_setting_service_proto_depIdxs = nil
|
||||
}
|
@ -1,12 +1,12 @@
|
||||
// Code generated by protoc-gen-grpc-gateway. DO NOT EDIT.
|
||||
// source: api/v2/workspace_setting_service.proto
|
||||
// source: api/v1/workspace_setting_service.proto
|
||||
|
||||
/*
|
||||
Package apiv2 is a reverse proxy.
|
||||
Package apiv1 is a reverse proxy.
|
||||
|
||||
It translates gRPC into RESTful JSON APIs.
|
||||
*/
|
||||
package apiv2
|
||||
package apiv1
|
||||
|
||||
import (
|
||||
"context"
|
||||
@ -175,7 +175,7 @@ func RegisterWorkspaceSettingServiceHandlerServer(ctx context.Context, mux *runt
|
||||
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
||||
var err error
|
||||
var annotatedContext context.Context
|
||||
annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/memos.api.v2.WorkspaceSettingService/ListWorkspaceSettings", runtime.WithHTTPPathPattern("/api/v2/workspace/settings"))
|
||||
annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/memos.api.v1.WorkspaceSettingService/ListWorkspaceSettings", runtime.WithHTTPPathPattern("/api/v1/workspace/settings"))
|
||||
if err != nil {
|
||||
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||
return
|
||||
@ -200,7 +200,7 @@ func RegisterWorkspaceSettingServiceHandlerServer(ctx context.Context, mux *runt
|
||||
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
||||
var err error
|
||||
var annotatedContext context.Context
|
||||
annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/memos.api.v2.WorkspaceSettingService/GetWorkspaceSetting", runtime.WithHTTPPathPattern("/api/v2/workspace/{name=settings/*}"))
|
||||
annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/memos.api.v1.WorkspaceSettingService/GetWorkspaceSetting", runtime.WithHTTPPathPattern("/api/v1/workspace/{name=settings/*}"))
|
||||
if err != nil {
|
||||
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||
return
|
||||
@ -225,7 +225,7 @@ func RegisterWorkspaceSettingServiceHandlerServer(ctx context.Context, mux *runt
|
||||
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
||||
var err error
|
||||
var annotatedContext context.Context
|
||||
annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/memos.api.v2.WorkspaceSettingService/SetWorkspaceSetting", runtime.WithHTTPPathPattern("/api/v2/workspace/{setting.name=settings/*}"))
|
||||
annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/memos.api.v1.WorkspaceSettingService/SetWorkspaceSetting", runtime.WithHTTPPathPattern("/api/v1/workspace/{setting.name=settings/*}"))
|
||||
if err != nil {
|
||||
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||
return
|
||||
@ -289,7 +289,7 @@ func RegisterWorkspaceSettingServiceHandlerClient(ctx context.Context, mux *runt
|
||||
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
||||
var err error
|
||||
var annotatedContext context.Context
|
||||
annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/memos.api.v2.WorkspaceSettingService/ListWorkspaceSettings", runtime.WithHTTPPathPattern("/api/v2/workspace/settings"))
|
||||
annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/memos.api.v1.WorkspaceSettingService/ListWorkspaceSettings", runtime.WithHTTPPathPattern("/api/v1/workspace/settings"))
|
||||
if err != nil {
|
||||
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||
return
|
||||
@ -311,7 +311,7 @@ func RegisterWorkspaceSettingServiceHandlerClient(ctx context.Context, mux *runt
|
||||
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
||||
var err error
|
||||
var annotatedContext context.Context
|
||||
annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/memos.api.v2.WorkspaceSettingService/GetWorkspaceSetting", runtime.WithHTTPPathPattern("/api/v2/workspace/{name=settings/*}"))
|
||||
annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/memos.api.v1.WorkspaceSettingService/GetWorkspaceSetting", runtime.WithHTTPPathPattern("/api/v1/workspace/{name=settings/*}"))
|
||||
if err != nil {
|
||||
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||
return
|
||||
@ -333,7 +333,7 @@ func RegisterWorkspaceSettingServiceHandlerClient(ctx context.Context, mux *runt
|
||||
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
||||
var err error
|
||||
var annotatedContext context.Context
|
||||
annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/memos.api.v2.WorkspaceSettingService/SetWorkspaceSetting", runtime.WithHTTPPathPattern("/api/v2/workspace/{setting.name=settings/*}"))
|
||||
annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/memos.api.v1.WorkspaceSettingService/SetWorkspaceSetting", runtime.WithHTTPPathPattern("/api/v1/workspace/{setting.name=settings/*}"))
|
||||
if err != nil {
|
||||
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||
return
|
||||
@ -353,11 +353,11 @@ func RegisterWorkspaceSettingServiceHandlerClient(ctx context.Context, mux *runt
|
||||
}
|
||||
|
||||
var (
|
||||
pattern_WorkspaceSettingService_ListWorkspaceSettings_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"api", "v2", "workspace", "settings"}, ""))
|
||||
pattern_WorkspaceSettingService_ListWorkspaceSettings_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"api", "v1", "workspace", "settings"}, ""))
|
||||
|
||||
pattern_WorkspaceSettingService_GetWorkspaceSetting_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 1, 0, 4, 2, 5, 4}, []string{"api", "v2", "workspace", "settings", "name"}, ""))
|
||||
pattern_WorkspaceSettingService_GetWorkspaceSetting_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 1, 0, 4, 2, 5, 4}, []string{"api", "v1", "workspace", "settings", "name"}, ""))
|
||||
|
||||
pattern_WorkspaceSettingService_SetWorkspaceSetting_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 1, 0, 4, 2, 5, 4}, []string{"api", "v2", "workspace", "settings", "setting.name"}, ""))
|
||||
pattern_WorkspaceSettingService_SetWorkspaceSetting_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 1, 0, 4, 2, 5, 4}, []string{"api", "v1", "workspace", "settings", "setting.name"}, ""))
|
||||
)
|
||||
|
||||
var (
|
@ -2,9 +2,9 @@
|
||||
// versions:
|
||||
// - protoc-gen-go-grpc v1.3.0
|
||||
// - protoc (unknown)
|
||||
// source: api/v2/workspace_setting_service.proto
|
||||
// source: api/v1/workspace_setting_service.proto
|
||||
|
||||
package apiv2
|
||||
package apiv1
|
||||
|
||||
import (
|
||||
context "context"
|
||||
@ -19,9 +19,9 @@ import (
|
||||
const _ = grpc.SupportPackageIsVersion7
|
||||
|
||||
const (
|
||||
WorkspaceSettingService_ListWorkspaceSettings_FullMethodName = "/memos.api.v2.WorkspaceSettingService/ListWorkspaceSettings"
|
||||
WorkspaceSettingService_GetWorkspaceSetting_FullMethodName = "/memos.api.v2.WorkspaceSettingService/GetWorkspaceSetting"
|
||||
WorkspaceSettingService_SetWorkspaceSetting_FullMethodName = "/memos.api.v2.WorkspaceSettingService/SetWorkspaceSetting"
|
||||
WorkspaceSettingService_ListWorkspaceSettings_FullMethodName = "/memos.api.v1.WorkspaceSettingService/ListWorkspaceSettings"
|
||||
WorkspaceSettingService_GetWorkspaceSetting_FullMethodName = "/memos.api.v1.WorkspaceSettingService/GetWorkspaceSetting"
|
||||
WorkspaceSettingService_SetWorkspaceSetting_FullMethodName = "/memos.api.v1.WorkspaceSettingService/SetWorkspaceSetting"
|
||||
)
|
||||
|
||||
// WorkspaceSettingServiceClient is the client API for WorkspaceSettingService service.
|
||||
@ -169,7 +169,7 @@ func _WorkspaceSettingService_SetWorkspaceSetting_Handler(srv interface{}, ctx c
|
||||
// It's only intended for direct use with grpc.RegisterService,
|
||||
// and not to be introspected or modified (even as a copy)
|
||||
var WorkspaceSettingService_ServiceDesc = grpc.ServiceDesc{
|
||||
ServiceName: "memos.api.v2.WorkspaceSettingService",
|
||||
ServiceName: "memos.api.v1.WorkspaceSettingService",
|
||||
HandlerType: (*WorkspaceSettingServiceServer)(nil),
|
||||
Methods: []grpc.MethodDesc{
|
||||
{
|
||||
@ -186,5 +186,5 @@ var WorkspaceSettingService_ServiceDesc = grpc.ServiceDesc{
|
||||
},
|
||||
},
|
||||
Streams: []grpc.StreamDesc{},
|
||||
Metadata: "api/v2/workspace_setting_service.proto",
|
||||
Metadata: "api/v1/workspace_setting_service.proto",
|
||||
}
|
@ -1 +0,0 @@
|
||||
The legacy API is deprecated and has be removed. Please use the v2 API instead.
|
@ -1,4 +1,4 @@
|
||||
package v2
|
||||
package v1
|
||||
|
||||
import (
|
||||
"context"
|
37
server/route/api/v1/acl_config.go
Normal file
37
server/route/api/v1/acl_config.go
Normal file
@ -0,0 +1,37 @@
|
||||
package v1
|
||||
|
||||
var authenticationAllowlistMethods = map[string]bool{
|
||||
"/memos.api.v1.WorkspaceService/GetWorkspaceProfile": true,
|
||||
"/memos.api.v1.WorkspaceSettingService/GetWorkspaceSetting": true,
|
||||
"/memos.api.v1.WorkspaceSettingService/ListWorkspaceSettings": true,
|
||||
"/memos.api.v1.IdentityProviderService/ListIdentityProviders": true,
|
||||
"/memos.api.v1.IdentityProviderService/GetIdentityProvider": true,
|
||||
"/memos.api.v1.AuthService/GetAuthStatus": true,
|
||||
"/memos.api.v1.AuthService/SignIn": true,
|
||||
"/memos.api.v1.AuthService/SignInWithSSO": true,
|
||||
"/memos.api.v1.AuthService/SignOut": true,
|
||||
"/memos.api.v1.AuthService/SignUp": true,
|
||||
"/memos.api.v1.UserService/GetUser": true,
|
||||
"/memos.api.v1.UserService/SearchUsers": true,
|
||||
"/memos.api.v1.MemoService/ListMemos": true,
|
||||
"/memos.api.v1.MemoService/GetMemo": true,
|
||||
"/memos.api.v1.MemoService/SearchMemos": true,
|
||||
"/memos.api.v1.MemoService/ListMemoResources": true,
|
||||
"/memos.api.v1.MemoService/ListMemoRelations": true,
|
||||
"/memos.api.v1.MemoService/ListMemoComments": true,
|
||||
"/memos.api.v1.LinkService/GetLinkMetadata": true,
|
||||
}
|
||||
|
||||
// isUnauthorizeAllowedMethod returns whether the method is exempted from authentication.
|
||||
func isUnauthorizeAllowedMethod(fullMethodName string) bool {
|
||||
return authenticationAllowlistMethods[fullMethodName]
|
||||
}
|
||||
|
||||
var allowedMethodsOnlyForAdmin = map[string]bool{
|
||||
"/memos.api.v1.UserService/CreateUser": true,
|
||||
}
|
||||
|
||||
// isOnlyForAdminAllowedMethod returns true if the method is allowed to be called only by admin.
|
||||
func isOnlyForAdminAllowedMethod(methodName string) bool {
|
||||
return allowedMethodsOnlyForAdmin[methodName]
|
||||
}
|
@ -1,4 +1,4 @@
|
||||
package v2
|
||||
package v1
|
||||
|
||||
import (
|
||||
"context"
|
||||
@ -8,12 +8,12 @@ import (
|
||||
"google.golang.org/grpc/status"
|
||||
"google.golang.org/protobuf/types/known/timestamppb"
|
||||
|
||||
apiv2pb "github.com/usememos/memos/proto/gen/api/v2"
|
||||
v1pb "github.com/usememos/memos/proto/gen/api/v1"
|
||||
storepb "github.com/usememos/memos/proto/gen/store"
|
||||
"github.com/usememos/memos/store"
|
||||
)
|
||||
|
||||
func (s *APIV2Service) GetActivity(ctx context.Context, request *apiv2pb.GetActivityRequest) (*apiv2pb.Activity, error) {
|
||||
func (s *APIV1Service) GetActivity(ctx context.Context, request *v1pb.GetActivityRequest) (*v1pb.Activity, error) {
|
||||
activity, err := s.Store.GetActivity(ctx, &store.FindActivity{
|
||||
ID: &request.Id,
|
||||
})
|
||||
@ -28,8 +28,8 @@ func (s *APIV2Service) GetActivity(ctx context.Context, request *apiv2pb.GetActi
|
||||
return activityMessage, nil
|
||||
}
|
||||
|
||||
func (*APIV2Service) convertActivityFromStore(_ context.Context, activity *store.Activity) (*apiv2pb.Activity, error) {
|
||||
return &apiv2pb.Activity{
|
||||
func (*APIV1Service) convertActivityFromStore(_ context.Context, activity *store.Activity) (*v1pb.Activity, error) {
|
||||
return &v1pb.Activity{
|
||||
Id: activity.ID,
|
||||
CreatorId: activity.CreatorID,
|
||||
Type: activity.Type.String(),
|
||||
@ -39,16 +39,16 @@ func (*APIV2Service) convertActivityFromStore(_ context.Context, activity *store
|
||||
}, nil
|
||||
}
|
||||
|
||||
func convertActivityPayloadFromStore(payload *storepb.ActivityPayload) *apiv2pb.ActivityPayload {
|
||||
v2Payload := &apiv2pb.ActivityPayload{}
|
||||
func convertActivityPayloadFromStore(payload *storepb.ActivityPayload) *v1pb.ActivityPayload {
|
||||
v2Payload := &v1pb.ActivityPayload{}
|
||||
if payload.MemoComment != nil {
|
||||
v2Payload.MemoComment = &apiv2pb.ActivityMemoCommentPayload{
|
||||
v2Payload.MemoComment = &v1pb.ActivityMemoCommentPayload{
|
||||
MemoId: payload.MemoComment.MemoId,
|
||||
RelatedMemoId: payload.MemoComment.RelatedMemoId,
|
||||
}
|
||||
}
|
||||
if payload.VersionUpdate != nil {
|
||||
v2Payload.VersionUpdate = &apiv2pb.ActivityVersionUpdatePayload{
|
||||
v2Payload.VersionUpdate = &v1pb.ActivityVersionUpdatePayload{
|
||||
Version: payload.VersionUpdate.Version,
|
||||
}
|
||||
}
|
@ -1,4 +1,4 @@
|
||||
package v2
|
||||
package v1
|
||||
|
||||
import (
|
||||
"context"
|
||||
@ -18,13 +18,13 @@ import (
|
||||
"github.com/usememos/memos/internal/util"
|
||||
"github.com/usememos/memos/plugin/idp"
|
||||
"github.com/usememos/memos/plugin/idp/oauth2"
|
||||
apiv2pb "github.com/usememos/memos/proto/gen/api/v2"
|
||||
v1pb "github.com/usememos/memos/proto/gen/api/v1"
|
||||
storepb "github.com/usememos/memos/proto/gen/store"
|
||||
"github.com/usememos/memos/server/route/api/auth"
|
||||
"github.com/usememos/memos/store"
|
||||
)
|
||||
|
||||
func (s *APIV2Service) GetAuthStatus(ctx context.Context, _ *apiv2pb.GetAuthStatusRequest) (*apiv2pb.User, error) {
|
||||
func (s *APIV1Service) GetAuthStatus(ctx context.Context, _ *v1pb.GetAuthStatusRequest) (*v1pb.User, error) {
|
||||
user, err := getCurrentUser(ctx, s.Store)
|
||||
if err != nil {
|
||||
return nil, status.Errorf(codes.Unauthenticated, "failed to get current user: %v", err)
|
||||
@ -39,7 +39,7 @@ func (s *APIV2Service) GetAuthStatus(ctx context.Context, _ *apiv2pb.GetAuthStat
|
||||
return convertUserFromStore(user), nil
|
||||
}
|
||||
|
||||
func (s *APIV2Service) SignIn(ctx context.Context, request *apiv2pb.SignInRequest) (*apiv2pb.User, error) {
|
||||
func (s *APIV1Service) SignIn(ctx context.Context, request *v1pb.SignInRequest) (*v1pb.User, error) {
|
||||
user, err := s.Store.GetUser(ctx, &store.FindUser{
|
||||
Username: &request.Username,
|
||||
})
|
||||
@ -68,7 +68,7 @@ func (s *APIV2Service) SignIn(ctx context.Context, request *apiv2pb.SignInReques
|
||||
return convertUserFromStore(user), nil
|
||||
}
|
||||
|
||||
func (s *APIV2Service) SignInWithSSO(ctx context.Context, request *apiv2pb.SignInWithSSORequest) (*apiv2pb.User, error) {
|
||||
func (s *APIV1Service) SignInWithSSO(ctx context.Context, request *v1pb.SignInWithSSORequest) (*v1pb.User, error) {
|
||||
identityProvider, err := s.Store.GetIdentityProvider(ctx, &store.FindIdentityProvider{
|
||||
ID: &request.IdpId,
|
||||
})
|
||||
@ -144,7 +144,7 @@ func (s *APIV2Service) SignInWithSSO(ctx context.Context, request *apiv2pb.SignI
|
||||
return convertUserFromStore(user), nil
|
||||
}
|
||||
|
||||
func (s *APIV2Service) doSignIn(ctx context.Context, user *store.User, expireTime time.Time) error {
|
||||
func (s *APIV1Service) doSignIn(ctx context.Context, user *store.User, expireTime time.Time) error {
|
||||
accessToken, err := auth.GenerateAccessToken(user.Email, user.ID, expireTime, []byte(s.Secret))
|
||||
if err != nil {
|
||||
return status.Errorf(codes.Internal, fmt.Sprintf("failed to generate tokens, err: %s", err))
|
||||
@ -166,7 +166,7 @@ func (s *APIV2Service) doSignIn(ctx context.Context, user *store.User, expireTim
|
||||
return nil
|
||||
}
|
||||
|
||||
func (s *APIV2Service) SignUp(ctx context.Context, request *apiv2pb.SignUpRequest) (*apiv2pb.User, error) {
|
||||
func (s *APIV1Service) SignUp(ctx context.Context, request *v1pb.SignUpRequest) (*v1pb.User, error) {
|
||||
workspaceGeneralSetting, err := s.Store.GetWorkspaceGeneralSetting(ctx)
|
||||
if err != nil {
|
||||
return nil, status.Errorf(codes.Internal, fmt.Sprintf("failed to get workspace setting, err: %s", err))
|
||||
@ -214,14 +214,14 @@ func (s *APIV2Service) SignUp(ctx context.Context, request *apiv2pb.SignUpReques
|
||||
return convertUserFromStore(user), nil
|
||||
}
|
||||
|
||||
func (s *APIV2Service) SignOut(ctx context.Context, _ *apiv2pb.SignOutRequest) (*emptypb.Empty, error) {
|
||||
func (s *APIV1Service) SignOut(ctx context.Context, _ *v1pb.SignOutRequest) (*emptypb.Empty, error) {
|
||||
if err := s.clearAccessTokenCookie(ctx); err != nil {
|
||||
return nil, status.Errorf(codes.Internal, "failed to set grpc header, error: %v", err)
|
||||
}
|
||||
return &emptypb.Empty{}, nil
|
||||
}
|
||||
|
||||
func (s *APIV2Service) clearAccessTokenCookie(ctx context.Context) error {
|
||||
func (s *APIV1Service) clearAccessTokenCookie(ctx context.Context) error {
|
||||
cookie, err := s.buildAccessTokenCookie(ctx, "", time.Time{})
|
||||
if err != nil {
|
||||
return errors.Wrap(err, "failed to build access token cookie")
|
||||
@ -234,7 +234,7 @@ func (s *APIV2Service) clearAccessTokenCookie(ctx context.Context) error {
|
||||
return nil
|
||||
}
|
||||
|
||||
func (*APIV2Service) buildAccessTokenCookie(ctx context.Context, accessToken string, expireTime time.Time) (string, error) {
|
||||
func (*APIV1Service) buildAccessTokenCookie(ctx context.Context, accessToken string, expireTime time.Time) (string, error) {
|
||||
attrs := []string{
|
||||
fmt.Sprintf("%s=%s", auth.AccessTokenCookieName, accessToken),
|
||||
"Path=/",
|
@ -1,4 +1,4 @@
|
||||
package v2
|
||||
package v1
|
||||
|
||||
import (
|
||||
"context"
|
||||
@ -7,26 +7,26 @@ import (
|
||||
"github.com/pkg/errors"
|
||||
"google.golang.org/protobuf/proto"
|
||||
|
||||
apiv2pb "github.com/usememos/memos/proto/gen/api/v2"
|
||||
v1pb "github.com/usememos/memos/proto/gen/api/v1"
|
||||
"github.com/usememos/memos/store"
|
||||
)
|
||||
|
||||
func convertRowStatusFromStore(rowStatus store.RowStatus) apiv2pb.RowStatus {
|
||||
func convertRowStatusFromStore(rowStatus store.RowStatus) v1pb.RowStatus {
|
||||
switch rowStatus {
|
||||
case store.Normal:
|
||||
return apiv2pb.RowStatus_ACTIVE
|
||||
return v1pb.RowStatus_ACTIVE
|
||||
case store.Archived:
|
||||
return apiv2pb.RowStatus_ARCHIVED
|
||||
return v1pb.RowStatus_ARCHIVED
|
||||
default:
|
||||
return apiv2pb.RowStatus_ROW_STATUS_UNSPECIFIED
|
||||
return v1pb.RowStatus_ROW_STATUS_UNSPECIFIED
|
||||
}
|
||||
}
|
||||
|
||||
func convertRowStatusToStore(rowStatus apiv2pb.RowStatus) store.RowStatus {
|
||||
func convertRowStatusToStore(rowStatus v1pb.RowStatus) store.RowStatus {
|
||||
switch rowStatus {
|
||||
case apiv2pb.RowStatus_ACTIVE:
|
||||
case v1pb.RowStatus_ACTIVE:
|
||||
return store.Normal
|
||||
case apiv2pb.RowStatus_ARCHIVED:
|
||||
case v1pb.RowStatus_ARCHIVED:
|
||||
return store.Archived
|
||||
default:
|
||||
return store.Normal
|
||||
@ -48,13 +48,13 @@ func getCurrentUser(ctx context.Context, s *store.Store) (*store.User, error) {
|
||||
}
|
||||
|
||||
func getPageToken(limit int, offset int) (string, error) {
|
||||
return marshalPageToken(&apiv2pb.PageToken{
|
||||
return marshalPageToken(&v1pb.PageToken{
|
||||
Limit: int32(limit),
|
||||
Offset: int32(offset),
|
||||
})
|
||||
}
|
||||
|
||||
func marshalPageToken(pageToken *apiv2pb.PageToken) (string, error) {
|
||||
func marshalPageToken(pageToken *v1pb.PageToken) (string, error) {
|
||||
b, err := proto.Marshal(pageToken)
|
||||
if err != nil {
|
||||
return "", errors.Wrapf(err, "failed to marshal page token")
|
||||
@ -62,7 +62,7 @@ func marshalPageToken(pageToken *apiv2pb.PageToken) (string, error) {
|
||||
return base64.StdEncoding.EncodeToString(b), nil
|
||||
}
|
||||
|
||||
func unmarshalPageToken(s string, pageToken *apiv2pb.PageToken) error {
|
||||
func unmarshalPageToken(s string, pageToken *v1pb.PageToken) error {
|
||||
b, err := base64.StdEncoding.DecodeString(s)
|
||||
if err != nil {
|
||||
return errors.Wrapf(err, "failed to decode page token")
|
@ -1,4 +1,4 @@
|
||||
package v2
|
||||
package v1
|
||||
|
||||
import (
|
||||
"context"
|
||||
@ -8,12 +8,12 @@ import (
|
||||
"google.golang.org/grpc/status"
|
||||
"google.golang.org/protobuf/types/known/emptypb"
|
||||
|
||||
apiv2pb "github.com/usememos/memos/proto/gen/api/v2"
|
||||
v1pb "github.com/usememos/memos/proto/gen/api/v1"
|
||||
storepb "github.com/usememos/memos/proto/gen/store"
|
||||
"github.com/usememos/memos/store"
|
||||
)
|
||||
|
||||
func (s *APIV2Service) CreateIdentityProvider(ctx context.Context, request *apiv2pb.CreateIdentityProviderRequest) (*apiv2pb.IdentityProvider, error) {
|
||||
func (s *APIV1Service) CreateIdentityProvider(ctx context.Context, request *v1pb.CreateIdentityProviderRequest) (*v1pb.IdentityProvider, error) {
|
||||
currentUser, err := getCurrentUser(ctx, s.Store)
|
||||
if err != nil {
|
||||
return nil, status.Errorf(codes.Internal, "failed to get user: %v", err)
|
||||
@ -29,14 +29,14 @@ func (s *APIV2Service) CreateIdentityProvider(ctx context.Context, request *apiv
|
||||
return convertIdentityProviderFromStore(identityProvider), nil
|
||||
}
|
||||
|
||||
func (s *APIV2Service) ListIdentityProviders(ctx context.Context, _ *apiv2pb.ListIdentityProvidersRequest) (*apiv2pb.ListIdentityProvidersResponse, error) {
|
||||
func (s *APIV1Service) ListIdentityProviders(ctx context.Context, _ *v1pb.ListIdentityProvidersRequest) (*v1pb.ListIdentityProvidersResponse, error) {
|
||||
identityProviders, err := s.Store.ListIdentityProviders(ctx, &store.FindIdentityProvider{})
|
||||
if err != nil {
|
||||
return nil, status.Errorf(codes.Internal, "failed to list identity providers, error: %+v", err)
|
||||
}
|
||||
|
||||
response := &apiv2pb.ListIdentityProvidersResponse{
|
||||
IdentityProviders: []*apiv2pb.IdentityProvider{},
|
||||
response := &v1pb.ListIdentityProvidersResponse{
|
||||
IdentityProviders: []*v1pb.IdentityProvider{},
|
||||
}
|
||||
for _, identityProvider := range identityProviders {
|
||||
response.IdentityProviders = append(response.IdentityProviders, convertIdentityProviderFromStore(identityProvider))
|
||||
@ -44,7 +44,7 @@ func (s *APIV2Service) ListIdentityProviders(ctx context.Context, _ *apiv2pb.Lis
|
||||
return response, nil
|
||||
}
|
||||
|
||||
func (s *APIV2Service) GetIdentityProvider(ctx context.Context, request *apiv2pb.GetIdentityProviderRequest) (*apiv2pb.IdentityProvider, error) {
|
||||
func (s *APIV1Service) GetIdentityProvider(ctx context.Context, request *v1pb.GetIdentityProviderRequest) (*v1pb.IdentityProvider, error) {
|
||||
id, err := ExtractIdentityProviderIDFromName(request.Name)
|
||||
if err != nil {
|
||||
return nil, status.Errorf(codes.InvalidArgument, "invalid identity provider name: %v", err)
|
||||
@ -61,7 +61,7 @@ func (s *APIV2Service) GetIdentityProvider(ctx context.Context, request *apiv2pb
|
||||
return convertIdentityProviderFromStore(identityProvider), nil
|
||||
}
|
||||
|
||||
func (s *APIV2Service) UpdateIdentityProvider(ctx context.Context, request *apiv2pb.UpdateIdentityProviderRequest) (*apiv2pb.IdentityProvider, error) {
|
||||
func (s *APIV1Service) UpdateIdentityProvider(ctx context.Context, request *v1pb.UpdateIdentityProviderRequest) (*v1pb.IdentityProvider, error) {
|
||||
if request.UpdateMask == nil || len(request.UpdateMask.Paths) == 0 {
|
||||
return nil, status.Errorf(codes.InvalidArgument, "update_mask is required")
|
||||
}
|
||||
@ -90,7 +90,7 @@ func (s *APIV2Service) UpdateIdentityProvider(ctx context.Context, request *apiv
|
||||
return convertIdentityProviderFromStore(identityProvider), nil
|
||||
}
|
||||
|
||||
func (s *APIV2Service) DeleteIdentityProvider(ctx context.Context, request *apiv2pb.DeleteIdentityProviderRequest) (*emptypb.Empty, error) {
|
||||
func (s *APIV1Service) DeleteIdentityProvider(ctx context.Context, request *v1pb.DeleteIdentityProviderRequest) (*emptypb.Empty, error) {
|
||||
id, err := ExtractIdentityProviderIDFromName(request.Name)
|
||||
if err != nil {
|
||||
return nil, status.Errorf(codes.InvalidArgument, "invalid identity provider name: %v", err)
|
||||
@ -101,25 +101,25 @@ func (s *APIV2Service) DeleteIdentityProvider(ctx context.Context, request *apiv
|
||||
return &emptypb.Empty{}, nil
|
||||
}
|
||||
|
||||
func convertIdentityProviderFromStore(identityProvider *storepb.IdentityProvider) *apiv2pb.IdentityProvider {
|
||||
temp := &apiv2pb.IdentityProvider{
|
||||
func convertIdentityProviderFromStore(identityProvider *storepb.IdentityProvider) *v1pb.IdentityProvider {
|
||||
temp := &v1pb.IdentityProvider{
|
||||
Name: fmt.Sprintf("%s%d", IdentityProviderNamePrefix, identityProvider.Id),
|
||||
Title: identityProvider.Name,
|
||||
IdentifierFilter: identityProvider.IdentifierFilter,
|
||||
Type: apiv2pb.IdentityProvider_Type(apiv2pb.IdentityProvider_Type_value[identityProvider.Type.String()]),
|
||||
Type: v1pb.IdentityProvider_Type(v1pb.IdentityProvider_Type_value[identityProvider.Type.String()]),
|
||||
}
|
||||
if identityProvider.Type == storepb.IdentityProvider_OAUTH2 {
|
||||
oauth2Config := identityProvider.Config.GetOauth2Config()
|
||||
temp.Config = &apiv2pb.IdentityProviderConfig{
|
||||
Config: &apiv2pb.IdentityProviderConfig_Oauth2Config{
|
||||
Oauth2Config: &apiv2pb.OAuth2Config{
|
||||
temp.Config = &v1pb.IdentityProviderConfig{
|
||||
Config: &v1pb.IdentityProviderConfig_Oauth2Config{
|
||||
Oauth2Config: &v1pb.OAuth2Config{
|
||||
ClientId: oauth2Config.ClientId,
|
||||
ClientSecret: oauth2Config.ClientSecret,
|
||||
AuthUrl: oauth2Config.AuthUrl,
|
||||
TokenUrl: oauth2Config.TokenUrl,
|
||||
UserInfoUrl: oauth2Config.UserInfoUrl,
|
||||
Scopes: oauth2Config.Scopes,
|
||||
FieldMapping: &apiv2pb.FieldMapping{
|
||||
FieldMapping: &v1pb.FieldMapping{
|
||||
Identifier: oauth2Config.FieldMapping.Identifier,
|
||||
DisplayName: oauth2Config.FieldMapping.DisplayName,
|
||||
Email: oauth2Config.FieldMapping.Email,
|
||||
@ -131,7 +131,7 @@ func convertIdentityProviderFromStore(identityProvider *storepb.IdentityProvider
|
||||
return temp
|
||||
}
|
||||
|
||||
func convertIdentityProviderToStore(identityProvider *apiv2pb.IdentityProvider) *storepb.IdentityProvider {
|
||||
func convertIdentityProviderToStore(identityProvider *v1pb.IdentityProvider) *storepb.IdentityProvider {
|
||||
id, _ := ExtractIdentityProviderIDFromName(identityProvider.Name)
|
||||
|
||||
temp := &storepb.IdentityProvider{
|
||||
@ -144,8 +144,8 @@ func convertIdentityProviderToStore(identityProvider *apiv2pb.IdentityProvider)
|
||||
return temp
|
||||
}
|
||||
|
||||
func convertIdentityProviderConfigToStore(identityProviderType apiv2pb.IdentityProvider_Type, config *apiv2pb.IdentityProviderConfig) *storepb.IdentityProviderConfig {
|
||||
if identityProviderType == apiv2pb.IdentityProvider_OAUTH2 {
|
||||
func convertIdentityProviderConfigToStore(identityProviderType v1pb.IdentityProvider_Type, config *v1pb.IdentityProviderConfig) *storepb.IdentityProviderConfig {
|
||||
if identityProviderType == v1pb.IdentityProvider_OAUTH2 {
|
||||
oauth2Config := config.GetOauth2Config()
|
||||
return &storepb.IdentityProviderConfig{
|
||||
Config: &storepb.IdentityProviderConfig_Oauth2Config{
|
@ -1,4 +1,4 @@
|
||||
package v2
|
||||
package v1
|
||||
|
||||
import (
|
||||
"context"
|
||||
@ -10,11 +10,11 @@ import (
|
||||
"google.golang.org/protobuf/types/known/emptypb"
|
||||
"google.golang.org/protobuf/types/known/timestamppb"
|
||||
|
||||
apiv2pb "github.com/usememos/memos/proto/gen/api/v2"
|
||||
v1pb "github.com/usememos/memos/proto/gen/api/v1"
|
||||
"github.com/usememos/memos/store"
|
||||
)
|
||||
|
||||
func (s *APIV2Service) ListInboxes(ctx context.Context, _ *apiv2pb.ListInboxesRequest) (*apiv2pb.ListInboxesResponse, error) {
|
||||
func (s *APIV1Service) ListInboxes(ctx context.Context, _ *v1pb.ListInboxesRequest) (*v1pb.ListInboxesResponse, error) {
|
||||
user, err := getCurrentUser(ctx, s.Store)
|
||||
if err != nil {
|
||||
return nil, status.Errorf(codes.Internal, "failed to get user")
|
||||
@ -27,8 +27,8 @@ func (s *APIV2Service) ListInboxes(ctx context.Context, _ *apiv2pb.ListInboxesRe
|
||||
return nil, status.Errorf(codes.Internal, "failed to list inbox: %v", err)
|
||||
}
|
||||
|
||||
response := &apiv2pb.ListInboxesResponse{
|
||||
Inboxes: []*apiv2pb.Inbox{},
|
||||
response := &v1pb.ListInboxesResponse{
|
||||
Inboxes: []*v1pb.Inbox{},
|
||||
}
|
||||
for _, inbox := range inboxes {
|
||||
response.Inboxes = append(response.Inboxes, convertInboxFromStore(inbox))
|
||||
@ -37,7 +37,7 @@ func (s *APIV2Service) ListInboxes(ctx context.Context, _ *apiv2pb.ListInboxesRe
|
||||
return response, nil
|
||||
}
|
||||
|
||||
func (s *APIV2Service) UpdateInbox(ctx context.Context, request *apiv2pb.UpdateInboxRequest) (*apiv2pb.Inbox, error) {
|
||||
func (s *APIV1Service) UpdateInbox(ctx context.Context, request *v1pb.UpdateInboxRequest) (*v1pb.Inbox, error) {
|
||||
if request.UpdateMask == nil || len(request.UpdateMask.Paths) == 0 {
|
||||
return nil, status.Errorf(codes.InvalidArgument, "update mask is required")
|
||||
}
|
||||
@ -51,7 +51,7 @@ func (s *APIV2Service) UpdateInbox(ctx context.Context, request *apiv2pb.UpdateI
|
||||
}
|
||||
for _, field := range request.UpdateMask.Paths {
|
||||
if field == "status" {
|
||||
if request.Inbox.Status == apiv2pb.Inbox_STATUS_UNSPECIFIED {
|
||||
if request.Inbox.Status == v1pb.Inbox_STATUS_UNSPECIFIED {
|
||||
return nil, status.Errorf(codes.InvalidArgument, "status is required")
|
||||
}
|
||||
update.Status = convertInboxStatusToStore(request.Inbox.Status)
|
||||
@ -66,7 +66,7 @@ func (s *APIV2Service) UpdateInbox(ctx context.Context, request *apiv2pb.UpdateI
|
||||
return convertInboxFromStore(inbox), nil
|
||||
}
|
||||
|
||||
func (s *APIV2Service) DeleteInbox(ctx context.Context, request *apiv2pb.DeleteInboxRequest) (*emptypb.Empty, error) {
|
||||
func (s *APIV1Service) DeleteInbox(ctx context.Context, request *v1pb.DeleteInboxRequest) (*emptypb.Empty, error) {
|
||||
inboxID, err := ExtractInboxIDFromName(request.Name)
|
||||
if err != nil {
|
||||
return nil, status.Errorf(codes.InvalidArgument, "invalid inbox name: %v", err)
|
||||
@ -80,34 +80,34 @@ func (s *APIV2Service) DeleteInbox(ctx context.Context, request *apiv2pb.DeleteI
|
||||
return &emptypb.Empty{}, nil
|
||||
}
|
||||
|
||||
func convertInboxFromStore(inbox *store.Inbox) *apiv2pb.Inbox {
|
||||
return &apiv2pb.Inbox{
|
||||
func convertInboxFromStore(inbox *store.Inbox) *v1pb.Inbox {
|
||||
return &v1pb.Inbox{
|
||||
Name: fmt.Sprintf("%s%d", InboxNamePrefix, inbox.ID),
|
||||
Sender: fmt.Sprintf("%s%d", UserNamePrefix, inbox.SenderID),
|
||||
Receiver: fmt.Sprintf("%s%d", UserNamePrefix, inbox.ReceiverID),
|
||||
Status: convertInboxStatusFromStore(inbox.Status),
|
||||
CreateTime: timestamppb.New(time.Unix(inbox.CreatedTs, 0)),
|
||||
Type: apiv2pb.Inbox_Type(inbox.Message.Type),
|
||||
Type: v1pb.Inbox_Type(inbox.Message.Type),
|
||||
ActivityId: inbox.Message.ActivityId,
|
||||
}
|
||||
}
|
||||
|
||||
func convertInboxStatusFromStore(status store.InboxStatus) apiv2pb.Inbox_Status {
|
||||
func convertInboxStatusFromStore(status store.InboxStatus) v1pb.Inbox_Status {
|
||||
switch status {
|
||||
case store.UNREAD:
|
||||
return apiv2pb.Inbox_UNREAD
|
||||
return v1pb.Inbox_UNREAD
|
||||
case store.ARCHIVED:
|
||||
return apiv2pb.Inbox_ARCHIVED
|
||||
return v1pb.Inbox_ARCHIVED
|
||||
default:
|
||||
return apiv2pb.Inbox_STATUS_UNSPECIFIED
|
||||
return v1pb.Inbox_STATUS_UNSPECIFIED
|
||||
}
|
||||
}
|
||||
|
||||
func convertInboxStatusToStore(status apiv2pb.Inbox_Status) store.InboxStatus {
|
||||
func convertInboxStatusToStore(status v1pb.Inbox_Status) store.InboxStatus {
|
||||
switch status {
|
||||
case apiv2pb.Inbox_UNREAD:
|
||||
case v1pb.Inbox_UNREAD:
|
||||
return store.UNREAD
|
||||
case apiv2pb.Inbox_ARCHIVED:
|
||||
case v1pb.Inbox_ARCHIVED:
|
||||
return store.ARCHIVED
|
||||
default:
|
||||
return store.UNREAD
|
@ -1,20 +1,20 @@
|
||||
package v2
|
||||
package v1
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
getter "github.com/usememos/memos/plugin/http-getter"
|
||||
apiv2pb "github.com/usememos/memos/proto/gen/api/v2"
|
||||
v1pb "github.com/usememos/memos/proto/gen/api/v1"
|
||||
)
|
||||
|
||||
func (*APIV2Service) GetLinkMetadata(_ context.Context, request *apiv2pb.GetLinkMetadataRequest) (*apiv2pb.GetLinkMetadataResponse, error) {
|
||||
func (*APIV1Service) GetLinkMetadata(_ context.Context, request *v1pb.GetLinkMetadataRequest) (*v1pb.GetLinkMetadataResponse, error) {
|
||||
htmlMeta, err := getter.GetHTMLMeta(request.Link)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
return &apiv2pb.GetLinkMetadataResponse{
|
||||
LinkMetadata: &apiv2pb.LinkMetadata{
|
||||
return &v1pb.GetLinkMetadataResponse{
|
||||
LinkMetadata: &v1pb.LinkMetadata{
|
||||
Title: htmlMeta.Title,
|
||||
Description: htmlMeta.Description,
|
||||
Image: htmlMeta.Image,
|
@ -1,4 +1,4 @@
|
||||
package v2
|
||||
package v1
|
||||
|
||||
import (
|
||||
"context"
|
@ -1,4 +1,4 @@
|
||||
package v2
|
||||
package v1
|
||||
|
||||
import (
|
||||
"context"
|
||||
@ -8,11 +8,11 @@ import (
|
||||
"google.golang.org/grpc/status"
|
||||
"google.golang.org/protobuf/types/known/emptypb"
|
||||
|
||||
apiv2pb "github.com/usememos/memos/proto/gen/api/v2"
|
||||
v1pb "github.com/usememos/memos/proto/gen/api/v1"
|
||||
"github.com/usememos/memos/store"
|
||||
)
|
||||
|
||||
func (s *APIV2Service) SetMemoRelations(ctx context.Context, request *apiv2pb.SetMemoRelationsRequest) (*emptypb.Empty, error) {
|
||||
func (s *APIV1Service) SetMemoRelations(ctx context.Context, request *v1pb.SetMemoRelationsRequest) (*emptypb.Empty, error) {
|
||||
id, err := ExtractMemoIDFromName(request.Name)
|
||||
if err != nil {
|
||||
return nil, status.Errorf(codes.InvalidArgument, "invalid memo name: %v", err)
|
||||
@ -33,7 +33,7 @@ func (s *APIV2Service) SetMemoRelations(ctx context.Context, request *apiv2pb.Se
|
||||
}
|
||||
// Ignore comment relations as there's no need to update a comment's relation.
|
||||
// Inserting/Deleting a comment is handled elsewhere.
|
||||
if relation.Type == apiv2pb.MemoRelation_COMMENT {
|
||||
if relation.Type == v1pb.MemoRelation_COMMENT {
|
||||
continue
|
||||
}
|
||||
relatedMemoID, err := ExtractMemoIDFromName(relation.RelatedMemo)
|
||||
@ -52,12 +52,12 @@ func (s *APIV2Service) SetMemoRelations(ctx context.Context, request *apiv2pb.Se
|
||||
return &emptypb.Empty{}, nil
|
||||
}
|
||||
|
||||
func (s *APIV2Service) ListMemoRelations(ctx context.Context, request *apiv2pb.ListMemoRelationsRequest) (*apiv2pb.ListMemoRelationsResponse, error) {
|
||||
func (s *APIV1Service) ListMemoRelations(ctx context.Context, request *v1pb.ListMemoRelationsRequest) (*v1pb.ListMemoRelationsResponse, error) {
|
||||
id, err := ExtractMemoIDFromName(request.Name)
|
||||
if err != nil {
|
||||
return nil, status.Errorf(codes.InvalidArgument, "invalid memo name: %v", err)
|
||||
}
|
||||
relationList := []*apiv2pb.MemoRelation{}
|
||||
relationList := []*v1pb.MemoRelation{}
|
||||
tempList, err := s.Store.ListMemoRelations(ctx, &store.FindMemoRelation{
|
||||
MemoID: &id,
|
||||
})
|
||||
@ -77,36 +77,36 @@ func (s *APIV2Service) ListMemoRelations(ctx context.Context, request *apiv2pb.L
|
||||
relationList = append(relationList, convertMemoRelationFromStore(relation))
|
||||
}
|
||||
|
||||
response := &apiv2pb.ListMemoRelationsResponse{
|
||||
response := &v1pb.ListMemoRelationsResponse{
|
||||
Relations: relationList,
|
||||
}
|
||||
return response, nil
|
||||
}
|
||||
|
||||
func convertMemoRelationFromStore(memoRelation *store.MemoRelation) *apiv2pb.MemoRelation {
|
||||
return &apiv2pb.MemoRelation{
|
||||
func convertMemoRelationFromStore(memoRelation *store.MemoRelation) *v1pb.MemoRelation {
|
||||
return &v1pb.MemoRelation{
|
||||
Memo: fmt.Sprintf("%s%d", MemoNamePrefix, memoRelation.MemoID),
|
||||
RelatedMemo: fmt.Sprintf("%s%d", MemoNamePrefix, memoRelation.RelatedMemoID),
|
||||
Type: convertMemoRelationTypeFromStore(memoRelation.Type),
|
||||
}
|
||||
}
|
||||
|
||||
func convertMemoRelationTypeFromStore(relationType store.MemoRelationType) apiv2pb.MemoRelation_Type {
|
||||
func convertMemoRelationTypeFromStore(relationType store.MemoRelationType) v1pb.MemoRelation_Type {
|
||||
switch relationType {
|
||||
case store.MemoRelationReference:
|
||||
return apiv2pb.MemoRelation_REFERENCE
|
||||
return v1pb.MemoRelation_REFERENCE
|
||||
case store.MemoRelationComment:
|
||||
return apiv2pb.MemoRelation_COMMENT
|
||||
return v1pb.MemoRelation_COMMENT
|
||||
default:
|
||||
return apiv2pb.MemoRelation_TYPE_UNSPECIFIED
|
||||
return v1pb.MemoRelation_TYPE_UNSPECIFIED
|
||||
}
|
||||
}
|
||||
|
||||
func convertMemoRelationTypeToStore(relationType apiv2pb.MemoRelation_Type) store.MemoRelationType {
|
||||
func convertMemoRelationTypeToStore(relationType v1pb.MemoRelation_Type) store.MemoRelationType {
|
||||
switch relationType {
|
||||
case apiv2pb.MemoRelation_REFERENCE:
|
||||
case v1pb.MemoRelation_REFERENCE:
|
||||
return store.MemoRelationReference
|
||||
case apiv2pb.MemoRelation_COMMENT:
|
||||
case v1pb.MemoRelation_COMMENT:
|
||||
return store.MemoRelationComment
|
||||
default:
|
||||
return store.MemoRelationReference
|
@ -1,4 +1,4 @@
|
||||
package v2
|
||||
package v1
|
||||
|
||||
import (
|
||||
"context"
|
||||
@ -9,11 +9,11 @@ import (
|
||||
"google.golang.org/grpc/status"
|
||||
"google.golang.org/protobuf/types/known/emptypb"
|
||||
|
||||
apiv2pb "github.com/usememos/memos/proto/gen/api/v2"
|
||||
v1pb "github.com/usememos/memos/proto/gen/api/v1"
|
||||
"github.com/usememos/memos/store"
|
||||
)
|
||||
|
||||
func (s *APIV2Service) SetMemoResources(ctx context.Context, request *apiv2pb.SetMemoResourcesRequest) (*emptypb.Empty, error) {
|
||||
func (s *APIV1Service) SetMemoResources(ctx context.Context, request *v1pb.SetMemoResourcesRequest) (*emptypb.Empty, error) {
|
||||
memoID, err := ExtractMemoIDFromName(request.Name)
|
||||
if err != nil {
|
||||
return nil, status.Errorf(codes.InvalidArgument, "invalid memo name: %v", err)
|
||||
@ -64,7 +64,7 @@ func (s *APIV2Service) SetMemoResources(ctx context.Context, request *apiv2pb.Se
|
||||
return &emptypb.Empty{}, nil
|
||||
}
|
||||
|
||||
func (s *APIV2Service) ListMemoResources(ctx context.Context, request *apiv2pb.ListMemoResourcesRequest) (*apiv2pb.ListMemoResourcesResponse, error) {
|
||||
func (s *APIV1Service) ListMemoResources(ctx context.Context, request *v1pb.ListMemoResourcesRequest) (*v1pb.ListMemoResourcesResponse, error) {
|
||||
id, err := ExtractMemoIDFromName(request.Name)
|
||||
if err != nil {
|
||||
return nil, status.Errorf(codes.InvalidArgument, "invalid memo name: %v", err)
|
||||
@ -76,8 +76,8 @@ func (s *APIV2Service) ListMemoResources(ctx context.Context, request *apiv2pb.L
|
||||
return nil, status.Errorf(codes.Internal, "failed to list resources")
|
||||
}
|
||||
|
||||
response := &apiv2pb.ListMemoResourcesResponse{
|
||||
Resources: []*apiv2pb.Resource{},
|
||||
response := &v1pb.ListMemoResourcesResponse{
|
||||
Resources: []*v1pb.Resource{},
|
||||
}
|
||||
for _, resource := range resources {
|
||||
response.Resources = append(response.Resources, s.convertResourceFromStore(ctx, resource))
|
@ -1,4 +1,4 @@
|
||||
package v2
|
||||
package v1
|
||||
|
||||
import (
|
||||
"archive/zip"
|
||||
@ -19,7 +19,7 @@ import (
|
||||
|
||||
"github.com/usememos/memos/internal/util"
|
||||
"github.com/usememos/memos/plugin/webhook"
|
||||
apiv2pb "github.com/usememos/memos/proto/gen/api/v2"
|
||||
v1pb "github.com/usememos/memos/proto/gen/api/v1"
|
||||
storepb "github.com/usememos/memos/proto/gen/store"
|
||||
"github.com/usememos/memos/store"
|
||||
)
|
||||
@ -30,7 +30,7 @@ const (
|
||||
ChunkSize = 64 * 1024 // 64 KiB
|
||||
)
|
||||
|
||||
func (s *APIV2Service) CreateMemo(ctx context.Context, request *apiv2pb.CreateMemoRequest) (*apiv2pb.Memo, error) {
|
||||
func (s *APIV1Service) CreateMemo(ctx context.Context, request *v1pb.CreateMemoRequest) (*v1pb.Memo, error) {
|
||||
user, err := getCurrentUser(ctx, s.Store)
|
||||
if err != nil {
|
||||
return nil, status.Errorf(codes.Internal, "failed to get user")
|
||||
@ -73,7 +73,7 @@ func (s *APIV2Service) CreateMemo(ctx context.Context, request *apiv2pb.CreateMe
|
||||
return memoMessage, nil
|
||||
}
|
||||
|
||||
func (s *APIV2Service) ListMemos(ctx context.Context, request *apiv2pb.ListMemosRequest) (*apiv2pb.ListMemosResponse, error) {
|
||||
func (s *APIV1Service) ListMemos(ctx context.Context, request *v1pb.ListMemosRequest) (*v1pb.ListMemosResponse, error) {
|
||||
memoFind := &store.FindMemo{
|
||||
// Exclude comments by default.
|
||||
ExcludeComments: true,
|
||||
@ -84,7 +84,7 @@ func (s *APIV2Service) ListMemos(ctx context.Context, request *apiv2pb.ListMemos
|
||||
|
||||
var limit, offset int
|
||||
if request.PageToken != "" {
|
||||
var pageToken apiv2pb.PageToken
|
||||
var pageToken v1pb.PageToken
|
||||
if err := unmarshalPageToken(request.PageToken, &pageToken); err != nil {
|
||||
return nil, status.Errorf(codes.InvalidArgument, "invalid page token: %v", err)
|
||||
}
|
||||
@ -104,7 +104,7 @@ func (s *APIV2Service) ListMemos(ctx context.Context, request *apiv2pb.ListMemos
|
||||
return nil, status.Errorf(codes.Internal, "failed to list memos: %v", err)
|
||||
}
|
||||
|
||||
memoMessages := []*apiv2pb.Memo{}
|
||||
memoMessages := []*v1pb.Memo{}
|
||||
nextPageToken := ""
|
||||
if len(memos) == limitPlusOne {
|
||||
memos = memos[:limit]
|
||||
@ -121,14 +121,14 @@ func (s *APIV2Service) ListMemos(ctx context.Context, request *apiv2pb.ListMemos
|
||||
memoMessages = append(memoMessages, memoMessage)
|
||||
}
|
||||
|
||||
response := &apiv2pb.ListMemosResponse{
|
||||
response := &v1pb.ListMemosResponse{
|
||||
Memos: memoMessages,
|
||||
NextPageToken: nextPageToken,
|
||||
}
|
||||
return response, nil
|
||||
}
|
||||
|
||||
func (s *APIV2Service) SearchMemos(ctx context.Context, request *apiv2pb.SearchMemosRequest) (*apiv2pb.SearchMemosResponse, error) {
|
||||
func (s *APIV1Service) SearchMemos(ctx context.Context, request *v1pb.SearchMemosRequest) (*v1pb.SearchMemosResponse, error) {
|
||||
defaultSearchLimit := 10
|
||||
memoFind := &store.FindMemo{
|
||||
// Exclude comments by default.
|
||||
@ -145,7 +145,7 @@ func (s *APIV2Service) SearchMemos(ctx context.Context, request *apiv2pb.SearchM
|
||||
return nil, status.Errorf(codes.Internal, "failed to search memos")
|
||||
}
|
||||
|
||||
memoMessages := []*apiv2pb.Memo{}
|
||||
memoMessages := []*v1pb.Memo{}
|
||||
for _, memo := range memos {
|
||||
memoMessage, err := s.convertMemoFromStore(ctx, memo)
|
||||
if err != nil {
|
||||
@ -154,13 +154,13 @@ func (s *APIV2Service) SearchMemos(ctx context.Context, request *apiv2pb.SearchM
|
||||
memoMessages = append(memoMessages, memoMessage)
|
||||
}
|
||||
|
||||
response := &apiv2pb.SearchMemosResponse{
|
||||
response := &v1pb.SearchMemosResponse{
|
||||
Memos: memoMessages,
|
||||
}
|
||||
return response, nil
|
||||
}
|
||||
|
||||
func (s *APIV2Service) GetMemo(ctx context.Context, request *apiv2pb.GetMemoRequest) (*apiv2pb.Memo, error) {
|
||||
func (s *APIV1Service) GetMemo(ctx context.Context, request *v1pb.GetMemoRequest) (*v1pb.Memo, error) {
|
||||
id, err := ExtractMemoIDFromName(request.Name)
|
||||
if err != nil {
|
||||
return nil, status.Errorf(codes.InvalidArgument, "invalid memo name: %v", err)
|
||||
@ -194,7 +194,7 @@ func (s *APIV2Service) GetMemo(ctx context.Context, request *apiv2pb.GetMemoRequ
|
||||
return memoMessage, nil
|
||||
}
|
||||
|
||||
func (s *APIV2Service) UpdateMemo(ctx context.Context, request *apiv2pb.UpdateMemoRequest) (*apiv2pb.Memo, error) {
|
||||
func (s *APIV1Service) UpdateMemo(ctx context.Context, request *v1pb.UpdateMemoRequest) (*v1pb.Memo, error) {
|
||||
id, err := ExtractMemoIDFromName(request.Memo.Name)
|
||||
if err != nil {
|
||||
return nil, status.Errorf(codes.InvalidArgument, "invalid memo name: %v", err)
|
||||
@ -281,7 +281,7 @@ func (s *APIV2Service) UpdateMemo(ctx context.Context, request *apiv2pb.UpdateMe
|
||||
return memoMessage, nil
|
||||
}
|
||||
|
||||
func (s *APIV2Service) DeleteMemo(ctx context.Context, request *apiv2pb.DeleteMemoRequest) (*emptypb.Empty, error) {
|
||||
func (s *APIV1Service) DeleteMemo(ctx context.Context, request *v1pb.DeleteMemoRequest) (*emptypb.Empty, error) {
|
||||
id, err := ExtractMemoIDFromName(request.Name)
|
||||
if err != nil {
|
||||
return nil, status.Errorf(codes.InvalidArgument, "invalid memo name: %v", err)
|
||||
@ -315,7 +315,7 @@ func (s *APIV2Service) DeleteMemo(ctx context.Context, request *apiv2pb.DeleteMe
|
||||
return &emptypb.Empty{}, nil
|
||||
}
|
||||
|
||||
func (s *APIV2Service) CreateMemoComment(ctx context.Context, request *apiv2pb.CreateMemoCommentRequest) (*apiv2pb.Memo, error) {
|
||||
func (s *APIV1Service) CreateMemoComment(ctx context.Context, request *v1pb.CreateMemoCommentRequest) (*v1pb.Memo, error) {
|
||||
id, err := ExtractMemoIDFromName(request.Name)
|
||||
if err != nil {
|
||||
return nil, status.Errorf(codes.InvalidArgument, "invalid memo name: %v", err)
|
||||
@ -348,7 +348,7 @@ func (s *APIV2Service) CreateMemoComment(ctx context.Context, request *apiv2pb.C
|
||||
if err != nil {
|
||||
return nil, status.Errorf(codes.InvalidArgument, "invalid memo creator")
|
||||
}
|
||||
if memo.Visibility != apiv2pb.Visibility_PRIVATE && creatorID != relatedMemo.CreatorID {
|
||||
if memo.Visibility != v1pb.Visibility_PRIVATE && creatorID != relatedMemo.CreatorID {
|
||||
activity, err := s.Store.CreateActivity(ctx, &store.Activity{
|
||||
CreatorID: creatorID,
|
||||
Type: store.ActivityTypeMemoComment,
|
||||
@ -379,7 +379,7 @@ func (s *APIV2Service) CreateMemoComment(ctx context.Context, request *apiv2pb.C
|
||||
return memo, nil
|
||||
}
|
||||
|
||||
func (s *APIV2Service) ListMemoComments(ctx context.Context, request *apiv2pb.ListMemoCommentsRequest) (*apiv2pb.ListMemoCommentsResponse, error) {
|
||||
func (s *APIV1Service) ListMemoComments(ctx context.Context, request *v1pb.ListMemoCommentsRequest) (*v1pb.ListMemoCommentsResponse, error) {
|
||||
id, err := ExtractMemoIDFromName(request.Name)
|
||||
if err != nil {
|
||||
return nil, status.Errorf(codes.InvalidArgument, "invalid memo name: %v", err)
|
||||
@ -393,7 +393,7 @@ func (s *APIV2Service) ListMemoComments(ctx context.Context, request *apiv2pb.Li
|
||||
return nil, status.Errorf(codes.Internal, "failed to list memo relations")
|
||||
}
|
||||
|
||||
var memos []*apiv2pb.Memo
|
||||
var memos []*v1pb.Memo
|
||||
for _, memoRelation := range memoRelations {
|
||||
memo, err := s.Store.GetMemo(ctx, &store.FindMemo{
|
||||
ID: &memoRelation.MemoID,
|
||||
@ -410,13 +410,13 @@ func (s *APIV2Service) ListMemoComments(ctx context.Context, request *apiv2pb.Li
|
||||
}
|
||||
}
|
||||
|
||||
response := &apiv2pb.ListMemoCommentsResponse{
|
||||
response := &v1pb.ListMemoCommentsResponse{
|
||||
Memos: memos,
|
||||
}
|
||||
return response, nil
|
||||
}
|
||||
|
||||
func (s *APIV2Service) GetUserMemosStats(ctx context.Context, request *apiv2pb.GetUserMemosStatsRequest) (*apiv2pb.GetUserMemosStatsResponse, error) {
|
||||
func (s *APIV1Service) GetUserMemosStats(ctx context.Context, request *v1pb.GetUserMemosStatsRequest) (*v1pb.GetUserMemosStatsResponse, error) {
|
||||
userID, err := ExtractUserIDFromName(request.Name)
|
||||
if err != nil {
|
||||
return nil, errors.Wrap(err, "invalid user name")
|
||||
@ -465,13 +465,13 @@ func (s *APIV2Service) GetUserMemosStats(ctx context.Context, request *apiv2pb.G
|
||||
stats[time.Unix(displayTs, 0).In(location).Format("2006-01-02")]++
|
||||
}
|
||||
|
||||
response := &apiv2pb.GetUserMemosStatsResponse{
|
||||
response := &v1pb.GetUserMemosStatsResponse{
|
||||
Stats: stats,
|
||||
}
|
||||
return response, nil
|
||||
}
|
||||
|
||||
func (s *APIV2Service) ExportMemos(ctx context.Context, request *apiv2pb.ExportMemosRequest) (*apiv2pb.ExportMemosResponse, error) {
|
||||
func (s *APIV1Service) ExportMemos(ctx context.Context, request *v1pb.ExportMemosRequest) (*v1pb.ExportMemosResponse, error) {
|
||||
normalRowStatus := store.Normal
|
||||
memoFind := &store.FindMemo{
|
||||
RowStatus: &normalRowStatus,
|
||||
@ -507,12 +507,12 @@ func (s *APIV2Service) ExportMemos(ctx context.Context, request *apiv2pb.ExportM
|
||||
return nil, status.Errorf(codes.Internal, "Failed to close zip file writer")
|
||||
}
|
||||
|
||||
return &apiv2pb.ExportMemosResponse{
|
||||
return &v1pb.ExportMemosResponse{
|
||||
Content: buf.Bytes(),
|
||||
}, nil
|
||||
}
|
||||
|
||||
func (s *APIV2Service) convertMemoFromStore(ctx context.Context, memo *store.Memo) (*apiv2pb.Memo, error) {
|
||||
func (s *APIV1Service) convertMemoFromStore(ctx context.Context, memo *store.Memo) (*v1pb.Memo, error) {
|
||||
displayTs := memo.CreatedTs
|
||||
workspaceMemoRelatedSetting, err := s.Store.GetWorkspaceMemoRelatedSetting(ctx)
|
||||
if err != nil {
|
||||
@ -528,22 +528,22 @@ func (s *APIV2Service) convertMemoFromStore(ctx context.Context, memo *store.Mem
|
||||
}
|
||||
|
||||
name := fmt.Sprintf("%s%d", MemoNamePrefix, memo.ID)
|
||||
listMemoRelationsResponse, err := s.ListMemoRelations(ctx, &apiv2pb.ListMemoRelationsRequest{Name: name})
|
||||
listMemoRelationsResponse, err := s.ListMemoRelations(ctx, &v1pb.ListMemoRelationsRequest{Name: name})
|
||||
if err != nil {
|
||||
return nil, errors.Wrap(err, "failed to list memo relations")
|
||||
}
|
||||
|
||||
listMemoResourcesResponse, err := s.ListMemoResources(ctx, &apiv2pb.ListMemoResourcesRequest{Name: name})
|
||||
listMemoResourcesResponse, err := s.ListMemoResources(ctx, &v1pb.ListMemoResourcesRequest{Name: name})
|
||||
if err != nil {
|
||||
return nil, errors.Wrap(err, "failed to list memo resources")
|
||||
}
|
||||
|
||||
listMemoReactionsResponse, err := s.ListMemoReactions(ctx, &apiv2pb.ListMemoReactionsRequest{Name: name})
|
||||
listMemoReactionsResponse, err := s.ListMemoReactions(ctx, &v1pb.ListMemoReactionsRequest{Name: name})
|
||||
if err != nil {
|
||||
return nil, errors.Wrap(err, "failed to list memo reactions")
|
||||
}
|
||||
|
||||
return &apiv2pb.Memo{
|
||||
return &v1pb.Memo{
|
||||
Name: name,
|
||||
Uid: memo.UID,
|
||||
RowStatus: convertRowStatusFromStore(memo.RowStatus),
|
||||
@ -561,33 +561,33 @@ func (s *APIV2Service) convertMemoFromStore(ctx context.Context, memo *store.Mem
|
||||
}, nil
|
||||
}
|
||||
|
||||
func convertVisibilityFromStore(visibility store.Visibility) apiv2pb.Visibility {
|
||||
func convertVisibilityFromStore(visibility store.Visibility) v1pb.Visibility {
|
||||
switch visibility {
|
||||
case store.Private:
|
||||
return apiv2pb.Visibility_PRIVATE
|
||||
return v1pb.Visibility_PRIVATE
|
||||
case store.Protected:
|
||||
return apiv2pb.Visibility_PROTECTED
|
||||
return v1pb.Visibility_PROTECTED
|
||||
case store.Public:
|
||||
return apiv2pb.Visibility_PUBLIC
|
||||
return v1pb.Visibility_PUBLIC
|
||||
default:
|
||||
return apiv2pb.Visibility_VISIBILITY_UNSPECIFIED
|
||||
return v1pb.Visibility_VISIBILITY_UNSPECIFIED
|
||||
}
|
||||
}
|
||||
|
||||
func convertVisibilityToStore(visibility apiv2pb.Visibility) store.Visibility {
|
||||
func convertVisibilityToStore(visibility v1pb.Visibility) store.Visibility {
|
||||
switch visibility {
|
||||
case apiv2pb.Visibility_PRIVATE:
|
||||
case v1pb.Visibility_PRIVATE:
|
||||
return store.Private
|
||||
case apiv2pb.Visibility_PROTECTED:
|
||||
case v1pb.Visibility_PROTECTED:
|
||||
return store.Protected
|
||||
case apiv2pb.Visibility_PUBLIC:
|
||||
case v1pb.Visibility_PUBLIC:
|
||||
return store.Public
|
||||
default:
|
||||
return store.Private
|
||||
}
|
||||
}
|
||||
|
||||
func (s *APIV2Service) buildMemoFindWithFilter(ctx context.Context, find *store.FindMemo, filter string) error {
|
||||
func (s *APIV1Service) buildMemoFindWithFilter(ctx context.Context, find *store.FindMemo, filter string) error {
|
||||
user, _ := getCurrentUser(ctx, s.Store)
|
||||
if find == nil {
|
||||
find = &store.FindMemo{}
|
||||
@ -789,21 +789,21 @@ func findSearchMemosField(callExpr *expr.Expr_Call, filter *SearchMemosFilter) {
|
||||
}
|
||||
|
||||
// DispatchMemoCreatedWebhook dispatches webhook when memo is created.
|
||||
func (s *APIV2Service) DispatchMemoCreatedWebhook(ctx context.Context, memo *apiv2pb.Memo) error {
|
||||
func (s *APIV1Service) DispatchMemoCreatedWebhook(ctx context.Context, memo *v1pb.Memo) error {
|
||||
return s.dispatchMemoRelatedWebhook(ctx, memo, "memos.memo.created")
|
||||
}
|
||||
|
||||
// DispatchMemoUpdatedWebhook dispatches webhook when memo is updated.
|
||||
func (s *APIV2Service) DispatchMemoUpdatedWebhook(ctx context.Context, memo *apiv2pb.Memo) error {
|
||||
func (s *APIV1Service) DispatchMemoUpdatedWebhook(ctx context.Context, memo *v1pb.Memo) error {
|
||||
return s.dispatchMemoRelatedWebhook(ctx, memo, "memos.memo.updated")
|
||||
}
|
||||
|
||||
// DispatchMemoDeletedWebhook dispatches webhook when memo is deleted.
|
||||
func (s *APIV2Service) DispatchMemoDeletedWebhook(ctx context.Context, memo *apiv2pb.Memo) error {
|
||||
func (s *APIV1Service) DispatchMemoDeletedWebhook(ctx context.Context, memo *v1pb.Memo) error {
|
||||
return s.dispatchMemoRelatedWebhook(ctx, memo, "memos.memo.deleted")
|
||||
}
|
||||
|
||||
func (s *APIV2Service) dispatchMemoRelatedWebhook(ctx context.Context, memo *apiv2pb.Memo, activityType string) error {
|
||||
func (s *APIV1Service) dispatchMemoRelatedWebhook(ctx context.Context, memo *v1pb.Memo, activityType string) error {
|
||||
creatorID, err := ExtractUserIDFromName(memo.Creator)
|
||||
if err != nil {
|
||||
return status.Errorf(codes.InvalidArgument, "invalid memo creator")
|
||||
@ -828,7 +828,7 @@ func (s *APIV2Service) dispatchMemoRelatedWebhook(ctx context.Context, memo *api
|
||||
return nil
|
||||
}
|
||||
|
||||
func convertMemoToWebhookPayload(memo *apiv2pb.Memo) (*webhook.WebhookPayload, error) {
|
||||
func convertMemoToWebhookPayload(memo *v1pb.Memo) (*webhook.WebhookPayload, error) {
|
||||
creatorID, err := ExtractUserIDFromName(memo.Creator)
|
||||
if err != nil {
|
||||
return nil, errors.Wrap(err, "invalid memo creator")
|
@ -1,4 +1,4 @@
|
||||
package v2
|
||||
package v1
|
||||
|
||||
import (
|
||||
"context"
|
||||
@ -8,12 +8,12 @@ import (
|
||||
"google.golang.org/grpc/status"
|
||||
"google.golang.org/protobuf/types/known/emptypb"
|
||||
|
||||
apiv2pb "github.com/usememos/memos/proto/gen/api/v2"
|
||||
v1pb "github.com/usememos/memos/proto/gen/api/v1"
|
||||
storepb "github.com/usememos/memos/proto/gen/store"
|
||||
"github.com/usememos/memos/store"
|
||||
)
|
||||
|
||||
func (s *APIV2Service) ListMemoReactions(ctx context.Context, request *apiv2pb.ListMemoReactionsRequest) (*apiv2pb.ListMemoReactionsResponse, error) {
|
||||
func (s *APIV1Service) ListMemoReactions(ctx context.Context, request *v1pb.ListMemoReactionsRequest) (*v1pb.ListMemoReactionsResponse, error) {
|
||||
reactions, err := s.Store.ListReactions(ctx, &store.FindReaction{
|
||||
ContentID: &request.Name,
|
||||
})
|
||||
@ -21,8 +21,8 @@ func (s *APIV2Service) ListMemoReactions(ctx context.Context, request *apiv2pb.L
|
||||
return nil, status.Errorf(codes.Internal, "failed to list reactions")
|
||||
}
|
||||
|
||||
response := &apiv2pb.ListMemoReactionsResponse{
|
||||
Reactions: []*apiv2pb.Reaction{},
|
||||
response := &v1pb.ListMemoReactionsResponse{
|
||||
Reactions: []*v1pb.Reaction{},
|
||||
}
|
||||
for _, reaction := range reactions {
|
||||
reactionMessage, err := s.convertReactionFromStore(ctx, reaction)
|
||||
@ -34,7 +34,7 @@ func (s *APIV2Service) ListMemoReactions(ctx context.Context, request *apiv2pb.L
|
||||
return response, nil
|
||||
}
|
||||
|
||||
func (s *APIV2Service) UpsertMemoReaction(ctx context.Context, request *apiv2pb.UpsertMemoReactionRequest) (*apiv2pb.Reaction, error) {
|
||||
func (s *APIV1Service) UpsertMemoReaction(ctx context.Context, request *v1pb.UpsertMemoReactionRequest) (*v1pb.Reaction, error) {
|
||||
user, err := getCurrentUser(ctx, s.Store)
|
||||
if err != nil {
|
||||
return nil, status.Errorf(codes.Internal, "failed to get current user")
|
||||
@ -55,7 +55,7 @@ func (s *APIV2Service) UpsertMemoReaction(ctx context.Context, request *apiv2pb.
|
||||
return reactionMessage, nil
|
||||
}
|
||||
|
||||
func (s *APIV2Service) DeleteMemoReaction(ctx context.Context, request *apiv2pb.DeleteMemoReactionRequest) (*emptypb.Empty, error) {
|
||||
func (s *APIV1Service) DeleteMemoReaction(ctx context.Context, request *v1pb.DeleteMemoReactionRequest) (*emptypb.Empty, error) {
|
||||
if err := s.Store.DeleteReaction(ctx, &store.DeleteReaction{
|
||||
ID: request.ReactionId,
|
||||
}); err != nil {
|
||||
@ -65,17 +65,17 @@ func (s *APIV2Service) DeleteMemoReaction(ctx context.Context, request *apiv2pb.
|
||||
return &emptypb.Empty{}, nil
|
||||
}
|
||||
|
||||
func (s *APIV2Service) convertReactionFromStore(ctx context.Context, reaction *store.Reaction) (*apiv2pb.Reaction, error) {
|
||||
func (s *APIV1Service) convertReactionFromStore(ctx context.Context, reaction *store.Reaction) (*v1pb.Reaction, error) {
|
||||
creator, err := s.Store.GetUser(ctx, &store.FindUser{
|
||||
ID: &reaction.CreatorID,
|
||||
})
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return &apiv2pb.Reaction{
|
||||
return &v1pb.Reaction{
|
||||
Id: reaction.ID,
|
||||
Creator: fmt.Sprintf("%s%d", UserNamePrefix, creator.ID),
|
||||
ContentId: reaction.ContentID,
|
||||
ReactionType: apiv2pb.Reaction_Type(reaction.ReactionType),
|
||||
ReactionType: v1pb.Reaction_Type(reaction.ReactionType),
|
||||
}, nil
|
||||
}
|
@ -1,4 +1,4 @@
|
||||
package v2
|
||||
package v1
|
||||
|
||||
import (
|
||||
"fmt"
|
@ -1,4 +1,4 @@
|
||||
package v2
|
||||
package v1
|
||||
|
||||
import (
|
||||
"bytes"
|
||||
@ -23,7 +23,7 @@ import (
|
||||
|
||||
"github.com/usememos/memos/internal/util"
|
||||
"github.com/usememos/memos/plugin/storage/s3"
|
||||
apiv2pb "github.com/usememos/memos/proto/gen/api/v2"
|
||||
v1pb "github.com/usememos/memos/proto/gen/api/v1"
|
||||
storepb "github.com/usememos/memos/proto/gen/store"
|
||||
"github.com/usememos/memos/store"
|
||||
)
|
||||
@ -36,7 +36,7 @@ const (
|
||||
MebiByte = 1024 * 1024
|
||||
)
|
||||
|
||||
func (s *APIV2Service) CreateResource(ctx context.Context, request *apiv2pb.CreateResourceRequest) (*apiv2pb.Resource, error) {
|
||||
func (s *APIV1Service) CreateResource(ctx context.Context, request *v1pb.CreateResourceRequest) (*v1pb.Resource, error) {
|
||||
user, err := getCurrentUser(ctx, s.Store)
|
||||
if err != nil {
|
||||
return nil, status.Errorf(codes.Internal, "failed to get current user: %v", err)
|
||||
@ -93,7 +93,7 @@ func (s *APIV2Service) CreateResource(ctx context.Context, request *apiv2pb.Crea
|
||||
return s.convertResourceFromStore(ctx, resource), nil
|
||||
}
|
||||
|
||||
func (s *APIV2Service) ListResources(ctx context.Context, _ *apiv2pb.ListResourcesRequest) (*apiv2pb.ListResourcesResponse, error) {
|
||||
func (s *APIV1Service) ListResources(ctx context.Context, _ *v1pb.ListResourcesRequest) (*v1pb.ListResourcesResponse, error) {
|
||||
user, err := getCurrentUser(ctx, s.Store)
|
||||
if err != nil {
|
||||
return nil, status.Errorf(codes.Internal, "failed to get current user: %v", err)
|
||||
@ -105,14 +105,14 @@ func (s *APIV2Service) ListResources(ctx context.Context, _ *apiv2pb.ListResourc
|
||||
return nil, status.Errorf(codes.Internal, "failed to list resources: %v", err)
|
||||
}
|
||||
|
||||
response := &apiv2pb.ListResourcesResponse{}
|
||||
response := &v1pb.ListResourcesResponse{}
|
||||
for _, resource := range resources {
|
||||
response.Resources = append(response.Resources, s.convertResourceFromStore(ctx, resource))
|
||||
}
|
||||
return response, nil
|
||||
}
|
||||
|
||||
func (s *APIV2Service) SearchResources(ctx context.Context, request *apiv2pb.SearchResourcesRequest) (*apiv2pb.SearchResourcesResponse, error) {
|
||||
func (s *APIV1Service) SearchResources(ctx context.Context, request *v1pb.SearchResourcesRequest) (*v1pb.SearchResourcesResponse, error) {
|
||||
if request.Filter == "" {
|
||||
return nil, status.Errorf(codes.InvalidArgument, "filter is empty")
|
||||
}
|
||||
@ -134,14 +134,14 @@ func (s *APIV2Service) SearchResources(ctx context.Context, request *apiv2pb.Sea
|
||||
return nil, status.Errorf(codes.Internal, "failed to search resources: %v", err)
|
||||
}
|
||||
|
||||
response := &apiv2pb.SearchResourcesResponse{}
|
||||
response := &v1pb.SearchResourcesResponse{}
|
||||
for _, resource := range resources {
|
||||
response.Resources = append(response.Resources, s.convertResourceFromStore(ctx, resource))
|
||||
}
|
||||
return response, nil
|
||||
}
|
||||
|
||||
func (s *APIV2Service) GetResource(ctx context.Context, request *apiv2pb.GetResourceRequest) (*apiv2pb.Resource, error) {
|
||||
func (s *APIV1Service) GetResource(ctx context.Context, request *v1pb.GetResourceRequest) (*v1pb.Resource, error) {
|
||||
id, err := ExtractResourceIDFromName(request.Name)
|
||||
if err != nil {
|
||||
return nil, status.Errorf(codes.InvalidArgument, "invalid resource id: %v", err)
|
||||
@ -159,7 +159,7 @@ func (s *APIV2Service) GetResource(ctx context.Context, request *apiv2pb.GetReso
|
||||
return s.convertResourceFromStore(ctx, resource), nil
|
||||
}
|
||||
|
||||
func (s *APIV2Service) UpdateResource(ctx context.Context, request *apiv2pb.UpdateResourceRequest) (*apiv2pb.Resource, error) {
|
||||
func (s *APIV1Service) UpdateResource(ctx context.Context, request *v1pb.UpdateResourceRequest) (*v1pb.Resource, error) {
|
||||
id, err := ExtractResourceIDFromName(request.Resource.Name)
|
||||
if err != nil {
|
||||
return nil, status.Errorf(codes.InvalidArgument, "invalid resource id: %v", err)
|
||||
@ -195,7 +195,7 @@ func (s *APIV2Service) UpdateResource(ctx context.Context, request *apiv2pb.Upda
|
||||
return s.convertResourceFromStore(ctx, resource), nil
|
||||
}
|
||||
|
||||
func (s *APIV2Service) DeleteResource(ctx context.Context, request *apiv2pb.DeleteResourceRequest) (*emptypb.Empty, error) {
|
||||
func (s *APIV1Service) DeleteResource(ctx context.Context, request *v1pb.DeleteResourceRequest) (*emptypb.Empty, error) {
|
||||
id, err := ExtractResourceIDFromName(request.Name)
|
||||
if err != nil {
|
||||
return nil, status.Errorf(codes.InvalidArgument, "invalid resource id: %v", err)
|
||||
@ -223,8 +223,8 @@ func (s *APIV2Service) DeleteResource(ctx context.Context, request *apiv2pb.Dele
|
||||
return &emptypb.Empty{}, nil
|
||||
}
|
||||
|
||||
func (s *APIV2Service) convertResourceFromStore(ctx context.Context, resource *store.Resource) *apiv2pb.Resource {
|
||||
resourceMessage := &apiv2pb.Resource{
|
||||
func (s *APIV1Service) convertResourceFromStore(ctx context.Context, resource *store.Resource) *v1pb.Resource {
|
||||
resourceMessage := &v1pb.Resource{
|
||||
Name: fmt.Sprintf("%s%d", ResourceNamePrefix, resource.ID),
|
||||
Uid: resource.UID,
|
||||
CreateTime: timestamppb.New(time.Unix(resource.CreatedTs, 0)),
|
@ -1,4 +1,4 @@
|
||||
package v2
|
||||
package v1
|
||||
|
||||
import (
|
||||
"context"
|
||||
@ -6,12 +6,12 @@ import (
|
||||
"google.golang.org/grpc/codes"
|
||||
"google.golang.org/grpc/status"
|
||||
|
||||
apiv2pb "github.com/usememos/memos/proto/gen/api/v2"
|
||||
v1pb "github.com/usememos/memos/proto/gen/api/v1"
|
||||
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) {
|
||||
func (s *APIV1Service) CreateStorage(ctx context.Context, request *v1pb.CreateStorageRequest) (*v1pb.CreateStorageResponse, error) {
|
||||
currentUser, err := getCurrentUser(ctx, s.Store)
|
||||
if err != nil {
|
||||
return nil, status.Errorf(codes.Internal, "failed to get user: %v", err)
|
||||
@ -24,19 +24,19 @@ func (s *APIV2Service) CreateStorage(ctx context.Context, request *apiv2pb.Creat
|
||||
if err != nil {
|
||||
return nil, status.Errorf(codes.Internal, "failed to create storage, error: %+v", err)
|
||||
}
|
||||
return &apiv2pb.CreateStorageResponse{
|
||||
return &v1pb.CreateStorageResponse{
|
||||
Storage: ConvertStorageFromStore(storage),
|
||||
}, nil
|
||||
}
|
||||
|
||||
func (s *APIV2Service) ListStorages(ctx context.Context, _ *apiv2pb.ListStoragesRequest) (*apiv2pb.ListStoragesResponse, error) {
|
||||
func (s *APIV1Service) ListStorages(ctx context.Context, _ *v1pb.ListStoragesRequest) (*v1pb.ListStoragesResponse, error) {
|
||||
storages, err := s.Store.ListStorages(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{},
|
||||
response := &v1pb.ListStoragesResponse{
|
||||
Storages: []*v1pb.Storage{},
|
||||
}
|
||||
for _, storage := range storages {
|
||||
response.Storages = append(response.Storages, ConvertStorageFromStore(storage))
|
||||
@ -44,7 +44,7 @@ func (s *APIV2Service) ListStorages(ctx context.Context, _ *apiv2pb.ListStorages
|
||||
return response, nil
|
||||
}
|
||||
|
||||
func (s *APIV2Service) GetStorage(ctx context.Context, request *apiv2pb.GetStorageRequest) (*apiv2pb.GetStorageResponse, error) {
|
||||
func (s *APIV1Service) GetStorage(ctx context.Context, request *v1pb.GetStorageRequest) (*v1pb.GetStorageResponse, error) {
|
||||
storage, err := s.Store.GetStorage(ctx, &store.FindStorage{
|
||||
ID: &request.Id,
|
||||
})
|
||||
@ -54,12 +54,12 @@ func (s *APIV2Service) GetStorage(ctx context.Context, request *apiv2pb.GetStora
|
||||
if storage == nil {
|
||||
return nil, status.Errorf(codes.NotFound, "storage not found")
|
||||
}
|
||||
return &apiv2pb.GetStorageResponse{
|
||||
return &v1pb.GetStorageResponse{
|
||||
Storage: ConvertStorageFromStore(storage),
|
||||
}, nil
|
||||
}
|
||||
|
||||
func (s *APIV2Service) UpdateStorage(ctx context.Context, request *apiv2pb.UpdateStorageRequest) (*apiv2pb.UpdateStorageResponse, error) {
|
||||
func (s *APIV1Service) UpdateStorage(ctx context.Context, request *v1pb.UpdateStorageRequest) (*v1pb.UpdateStorageResponse, error) {
|
||||
if request.UpdateMask == nil || len(request.UpdateMask.Paths) == 0 {
|
||||
return nil, status.Errorf(codes.InvalidArgument, "update_mask is required")
|
||||
}
|
||||
@ -81,32 +81,32 @@ func (s *APIV2Service) UpdateStorage(ctx context.Context, request *apiv2pb.Updat
|
||||
if err != nil {
|
||||
return nil, status.Errorf(codes.Internal, "failed to update storage, error: %+v", err)
|
||||
}
|
||||
return &apiv2pb.UpdateStorageResponse{
|
||||
return &v1pb.UpdateStorageResponse{
|
||||
Storage: ConvertStorageFromStore(storage),
|
||||
}, nil
|
||||
}
|
||||
|
||||
func (s *APIV2Service) DeleteStorage(ctx context.Context, request *apiv2pb.DeleteStorageRequest) (*apiv2pb.DeleteStorageResponse, error) {
|
||||
func (s *APIV1Service) DeleteStorage(ctx context.Context, request *v1pb.DeleteStorageRequest) (*v1pb.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
|
||||
return &v1pb.DeleteStorageResponse{}, nil
|
||||
}
|
||||
|
||||
func ConvertStorageFromStore(storage *storepb.Storage) *apiv2pb.Storage {
|
||||
temp := &apiv2pb.Storage{
|
||||
func ConvertStorageFromStore(storage *storepb.Storage) *v1pb.Storage {
|
||||
temp := &v1pb.Storage{
|
||||
Id: storage.Id,
|
||||
Title: storage.Name,
|
||||
Type: apiv2pb.Storage_Type(apiv2pb.Storage_Type_value[storage.Type.String()]),
|
||||
Type: v1pb.Storage_Type(v1pb.Storage_Type_value[storage.Type.String()]),
|
||||
}
|
||||
if storage.Type == storepb.Storage_S3 {
|
||||
s3Config := storage.Config.GetS3Config()
|
||||
temp.Config = &apiv2pb.StorageConfig{
|
||||
Config: &apiv2pb.StorageConfig_S3Config{
|
||||
S3Config: &apiv2pb.S3Config{
|
||||
temp.Config = &v1pb.StorageConfig{
|
||||
Config: &v1pb.StorageConfig_S3Config{
|
||||
S3Config: &v1pb.S3Config{
|
||||
EndPoint: s3Config.EndPoint,
|
||||
Path: s3Config.Path,
|
||||
Region: s3Config.Region,
|
||||
@ -123,7 +123,7 @@ func ConvertStorageFromStore(storage *storepb.Storage) *apiv2pb.Storage {
|
||||
return temp
|
||||
}
|
||||
|
||||
func convertStorageToStore(storage *apiv2pb.Storage) *storepb.Storage {
|
||||
func convertStorageToStore(storage *v1pb.Storage) *storepb.Storage {
|
||||
temp := &storepb.Storage{
|
||||
Id: storage.Id,
|
||||
Name: storage.Title,
|
||||
@ -133,8 +133,8 @@ func convertStorageToStore(storage *apiv2pb.Storage) *storepb.Storage {
|
||||
return temp
|
||||
}
|
||||
|
||||
func convertStorageConfigToStore(storageType apiv2pb.Storage_Type, config *apiv2pb.StorageConfig) *storepb.StorageConfig {
|
||||
if storageType == apiv2pb.Storage_S3 {
|
||||
func convertStorageConfigToStore(storageType v1pb.Storage_Type, config *v1pb.StorageConfig) *storepb.StorageConfig {
|
||||
if storageType == v1pb.Storage_S3 {
|
||||
s3Config := config.GetS3Config()
|
||||
return &storepb.StorageConfig{
|
||||
StorageConfig: &storepb.StorageConfig_S3Config{
|
@ -1,4 +1,4 @@
|
||||
package v2
|
||||
package v1
|
||||
|
||||
import (
|
||||
"context"
|
||||
@ -15,11 +15,11 @@ import (
|
||||
"google.golang.org/grpc/status"
|
||||
"google.golang.org/protobuf/types/known/emptypb"
|
||||
|
||||
apiv2pb "github.com/usememos/memos/proto/gen/api/v2"
|
||||
v1pb "github.com/usememos/memos/proto/gen/api/v1"
|
||||
"github.com/usememos/memos/store"
|
||||
)
|
||||
|
||||
func (s *APIV2Service) UpsertTag(ctx context.Context, request *apiv2pb.UpsertTagRequest) (*apiv2pb.Tag, error) {
|
||||
func (s *APIV1Service) UpsertTag(ctx context.Context, request *v1pb.UpsertTagRequest) (*v1pb.Tag, error) {
|
||||
user, err := getCurrentUser(ctx, s.Store)
|
||||
if err != nil {
|
||||
return nil, status.Errorf(codes.Internal, "failed to get user")
|
||||
@ -40,7 +40,7 @@ func (s *APIV2Service) UpsertTag(ctx context.Context, request *apiv2pb.UpsertTag
|
||||
return tagMessage, nil
|
||||
}
|
||||
|
||||
func (s *APIV2Service) BatchUpsertTag(ctx context.Context, request *apiv2pb.BatchUpsertTagRequest) (*emptypb.Empty, error) {
|
||||
func (s *APIV1Service) BatchUpsertTag(ctx context.Context, request *v1pb.BatchUpsertTagRequest) (*emptypb.Empty, error) {
|
||||
for _, r := range request.Requests {
|
||||
if _, err := s.UpsertTag(ctx, r); err != nil {
|
||||
return nil, status.Errorf(codes.Internal, "failed to batch upsert tags: %v", err)
|
||||
@ -49,7 +49,7 @@ func (s *APIV2Service) BatchUpsertTag(ctx context.Context, request *apiv2pb.Batc
|
||||
return &emptypb.Empty{}, nil
|
||||
}
|
||||
|
||||
func (s *APIV2Service) ListTags(ctx context.Context, _ *apiv2pb.ListTagsRequest) (*apiv2pb.ListTagsResponse, error) {
|
||||
func (s *APIV1Service) ListTags(ctx context.Context, _ *v1pb.ListTagsRequest) (*v1pb.ListTagsResponse, error) {
|
||||
user, err := getCurrentUser(ctx, s.Store)
|
||||
if err != nil {
|
||||
return nil, status.Errorf(codes.Internal, "failed to get user")
|
||||
@ -65,7 +65,7 @@ func (s *APIV2Service) ListTags(ctx context.Context, _ *apiv2pb.ListTagsRequest)
|
||||
return nil, status.Errorf(codes.Internal, "failed to list tags: %v", err)
|
||||
}
|
||||
|
||||
response := &apiv2pb.ListTagsResponse{}
|
||||
response := &v1pb.ListTagsResponse{}
|
||||
for _, tag := range tags {
|
||||
t, err := s.convertTagFromStore(ctx, tag)
|
||||
if err != nil {
|
||||
@ -76,7 +76,7 @@ func (s *APIV2Service) ListTags(ctx context.Context, _ *apiv2pb.ListTagsRequest)
|
||||
return response, nil
|
||||
}
|
||||
|
||||
func (s *APIV2Service) RenameTag(ctx context.Context, request *apiv2pb.RenameTagRequest) (*emptypb.Empty, error) {
|
||||
func (s *APIV1Service) RenameTag(ctx context.Context, request *v1pb.RenameTagRequest) (*emptypb.Empty, error) {
|
||||
userID, err := ExtractUserIDFromName(request.User)
|
||||
if err != nil {
|
||||
return nil, status.Errorf(codes.InvalidArgument, "invalid user name: %v", err)
|
||||
@ -136,7 +136,7 @@ func (s *APIV2Service) RenameTag(ctx context.Context, request *apiv2pb.RenameTag
|
||||
return &emptypb.Empty{}, nil
|
||||
}
|
||||
|
||||
func (s *APIV2Service) DeleteTag(ctx context.Context, request *apiv2pb.DeleteTagRequest) (*emptypb.Empty, error) {
|
||||
func (s *APIV1Service) DeleteTag(ctx context.Context, request *v1pb.DeleteTagRequest) (*emptypb.Empty, error) {
|
||||
userID, err := ExtractUserIDFromName(request.Tag.Creator)
|
||||
if err != nil {
|
||||
return nil, status.Errorf(codes.InvalidArgument, "invalid user name: %v", err)
|
||||
@ -160,7 +160,7 @@ func (s *APIV2Service) DeleteTag(ctx context.Context, request *apiv2pb.DeleteTag
|
||||
return &emptypb.Empty{}, nil
|
||||
}
|
||||
|
||||
func (s *APIV2Service) GetTagSuggestions(ctx context.Context, request *apiv2pb.GetTagSuggestionsRequest) (*apiv2pb.GetTagSuggestionsResponse, error) {
|
||||
func (s *APIV1Service) GetTagSuggestions(ctx context.Context, request *v1pb.GetTagSuggestionsRequest) (*v1pb.GetTagSuggestionsResponse, error) {
|
||||
userID, err := ExtractUserIDFromName(request.User)
|
||||
if err != nil {
|
||||
return nil, status.Errorf(codes.InvalidArgument, "invalid user name: %v", err)
|
||||
@ -219,19 +219,19 @@ func (s *APIV2Service) GetTagSuggestions(ctx context.Context, request *apiv2pb.G
|
||||
}
|
||||
sort.Strings(suggestions)
|
||||
|
||||
return &apiv2pb.GetTagSuggestionsResponse{
|
||||
return &v1pb.GetTagSuggestionsResponse{
|
||||
Tags: suggestions,
|
||||
}, nil
|
||||
}
|
||||
|
||||
func (s *APIV2Service) convertTagFromStore(ctx context.Context, tag *store.Tag) (*apiv2pb.Tag, error) {
|
||||
func (s *APIV1Service) convertTagFromStore(ctx context.Context, tag *store.Tag) (*v1pb.Tag, error) {
|
||||
user, err := s.Store.GetUser(ctx, &store.FindUser{
|
||||
ID: &tag.CreatorID,
|
||||
})
|
||||
if err != nil {
|
||||
return nil, errors.Wrap(err, "failed to get user")
|
||||
}
|
||||
return &apiv2pb.Tag{
|
||||
return &v1pb.Tag{
|
||||
Name: tag.Name,
|
||||
Creator: fmt.Sprintf("%s%d", UserNamePrefix, user.ID),
|
||||
}, nil
|
@ -1,4 +1,4 @@
|
||||
package v2
|
||||
package v1
|
||||
|
||||
import (
|
||||
"context"
|
||||
@ -20,13 +20,13 @@ import (
|
||||
"google.golang.org/protobuf/types/known/timestamppb"
|
||||
|
||||
"github.com/usememos/memos/internal/util"
|
||||
apiv2pb "github.com/usememos/memos/proto/gen/api/v2"
|
||||
v1pb "github.com/usememos/memos/proto/gen/api/v1"
|
||||
storepb "github.com/usememos/memos/proto/gen/store"
|
||||
"github.com/usememos/memos/server/route/api/auth"
|
||||
"github.com/usememos/memos/store"
|
||||
)
|
||||
|
||||
func (s *APIV2Service) ListUsers(ctx context.Context, _ *apiv2pb.ListUsersRequest) (*apiv2pb.ListUsersResponse, error) {
|
||||
func (s *APIV1Service) ListUsers(ctx context.Context, _ *v1pb.ListUsersRequest) (*v1pb.ListUsersResponse, error) {
|
||||
currentUser, err := getCurrentUser(ctx, s.Store)
|
||||
if err != nil {
|
||||
return nil, status.Errorf(codes.Internal, "failed to get user: %v", err)
|
||||
@ -40,8 +40,8 @@ func (s *APIV2Service) ListUsers(ctx context.Context, _ *apiv2pb.ListUsersReques
|
||||
return nil, status.Errorf(codes.Internal, "failed to list users: %v", err)
|
||||
}
|
||||
|
||||
response := &apiv2pb.ListUsersResponse{
|
||||
Users: []*apiv2pb.User{},
|
||||
response := &v1pb.ListUsersResponse{
|
||||
Users: []*v1pb.User{},
|
||||
}
|
||||
for _, user := range users {
|
||||
response.Users = append(response.Users, convertUserFromStore(user))
|
||||
@ -49,7 +49,7 @@ func (s *APIV2Service) ListUsers(ctx context.Context, _ *apiv2pb.ListUsersReques
|
||||
return response, nil
|
||||
}
|
||||
|
||||
func (s *APIV2Service) SearchUsers(ctx context.Context, request *apiv2pb.SearchUsersRequest) (*apiv2pb.SearchUsersResponse, error) {
|
||||
func (s *APIV1Service) SearchUsers(ctx context.Context, request *v1pb.SearchUsersRequest) (*v1pb.SearchUsersResponse, error) {
|
||||
if request.Filter == "" {
|
||||
return nil, status.Errorf(codes.InvalidArgument, "filter is empty")
|
||||
}
|
||||
@ -73,8 +73,8 @@ func (s *APIV2Service) SearchUsers(ctx context.Context, request *apiv2pb.SearchU
|
||||
return nil, status.Errorf(codes.Internal, "failed to search users: %v", err)
|
||||
}
|
||||
|
||||
response := &apiv2pb.SearchUsersResponse{
|
||||
Users: []*apiv2pb.User{},
|
||||
response := &v1pb.SearchUsersResponse{
|
||||
Users: []*v1pb.User{},
|
||||
}
|
||||
for _, user := range users {
|
||||
response.Users = append(response.Users, convertUserFromStore(user))
|
||||
@ -82,7 +82,7 @@ func (s *APIV2Service) SearchUsers(ctx context.Context, request *apiv2pb.SearchU
|
||||
return response, nil
|
||||
}
|
||||
|
||||
func (s *APIV2Service) GetUser(ctx context.Context, request *apiv2pb.GetUserRequest) (*apiv2pb.User, error) {
|
||||
func (s *APIV1Service) GetUser(ctx context.Context, request *v1pb.GetUserRequest) (*v1pb.User, error) {
|
||||
userID, err := ExtractUserIDFromName(request.Name)
|
||||
if err != nil {
|
||||
return nil, status.Errorf(codes.InvalidArgument, "invalid user name: %v", err)
|
||||
@ -100,7 +100,7 @@ func (s *APIV2Service) GetUser(ctx context.Context, request *apiv2pb.GetUserRequ
|
||||
return convertUserFromStore(user), nil
|
||||
}
|
||||
|
||||
func (s *APIV2Service) CreateUser(ctx context.Context, request *apiv2pb.CreateUserRequest) (*apiv2pb.User, error) {
|
||||
func (s *APIV1Service) CreateUser(ctx context.Context, request *v1pb.CreateUserRequest) (*v1pb.User, error) {
|
||||
currentUser, err := getCurrentUser(ctx, s.Store)
|
||||
if err != nil {
|
||||
return nil, status.Errorf(codes.Internal, "failed to get user: %v", err)
|
||||
@ -130,7 +130,7 @@ func (s *APIV2Service) CreateUser(ctx context.Context, request *apiv2pb.CreateUs
|
||||
return convertUserFromStore(user), nil
|
||||
}
|
||||
|
||||
func (s *APIV2Service) UpdateUser(ctx context.Context, request *apiv2pb.UpdateUserRequest) (*apiv2pb.User, error) {
|
||||
func (s *APIV1Service) UpdateUser(ctx context.Context, request *v1pb.UpdateUserRequest) (*v1pb.User, error) {
|
||||
userID, err := ExtractUserIDFromName(request.User.Name)
|
||||
if err != nil {
|
||||
return nil, status.Errorf(codes.InvalidArgument, "invalid user name: %v", err)
|
||||
@ -199,7 +199,7 @@ func (s *APIV2Service) UpdateUser(ctx context.Context, request *apiv2pb.UpdateUs
|
||||
return convertUserFromStore(updatedUser), nil
|
||||
}
|
||||
|
||||
func (s *APIV2Service) DeleteUser(ctx context.Context, request *apiv2pb.DeleteUserRequest) (*emptypb.Empty, error) {
|
||||
func (s *APIV1Service) DeleteUser(ctx context.Context, request *v1pb.DeleteUserRequest) (*emptypb.Empty, error) {
|
||||
userID, err := ExtractUserIDFromName(request.Name)
|
||||
if err != nil {
|
||||
return nil, status.Errorf(codes.InvalidArgument, "invalid user name: %v", err)
|
||||
@ -229,15 +229,15 @@ func (s *APIV2Service) DeleteUser(ctx context.Context, request *apiv2pb.DeleteUs
|
||||
return &emptypb.Empty{}, nil
|
||||
}
|
||||
|
||||
func getDefaultUserSetting() *apiv2pb.UserSetting {
|
||||
return &apiv2pb.UserSetting{
|
||||
func getDefaultUserSetting() *v1pb.UserSetting {
|
||||
return &v1pb.UserSetting{
|
||||
Locale: "en",
|
||||
Appearance: "system",
|
||||
MemoVisibility: "PRIVATE",
|
||||
}
|
||||
}
|
||||
|
||||
func (s *APIV2Service) GetUserSetting(ctx context.Context, _ *apiv2pb.GetUserSettingRequest) (*apiv2pb.UserSetting, error) {
|
||||
func (s *APIV1Service) GetUserSetting(ctx context.Context, _ *v1pb.GetUserSettingRequest) (*v1pb.UserSetting, error) {
|
||||
user, err := getCurrentUser(ctx, s.Store)
|
||||
if err != nil {
|
||||
return nil, status.Errorf(codes.Internal, "failed to get current user: %v", err)
|
||||
@ -262,7 +262,7 @@ func (s *APIV2Service) GetUserSetting(ctx context.Context, _ *apiv2pb.GetUserSet
|
||||
return userSettingMessage, nil
|
||||
}
|
||||
|
||||
func (s *APIV2Service) UpdateUserSetting(ctx context.Context, request *apiv2pb.UpdateUserSettingRequest) (*apiv2pb.UserSetting, error) {
|
||||
func (s *APIV1Service) UpdateUserSetting(ctx context.Context, request *v1pb.UpdateUserSettingRequest) (*v1pb.UserSetting, error) {
|
||||
user, err := getCurrentUser(ctx, s.Store)
|
||||
if err != nil {
|
||||
return nil, status.Errorf(codes.Internal, "failed to get current user: %v", err)
|
||||
@ -308,10 +308,10 @@ func (s *APIV2Service) UpdateUserSetting(ctx context.Context, request *apiv2pb.U
|
||||
}
|
||||
}
|
||||
|
||||
return s.GetUserSetting(ctx, &apiv2pb.GetUserSettingRequest{})
|
||||
return s.GetUserSetting(ctx, &v1pb.GetUserSettingRequest{})
|
||||
}
|
||||
|
||||
func (s *APIV2Service) ListUserAccessTokens(ctx context.Context, _ *apiv2pb.ListUserAccessTokensRequest) (*apiv2pb.ListUserAccessTokensResponse, error) {
|
||||
func (s *APIV1Service) ListUserAccessTokens(ctx context.Context, _ *v1pb.ListUserAccessTokensRequest) (*v1pb.ListUserAccessTokensResponse, error) {
|
||||
currentUser, err := getCurrentUser(ctx, s.Store)
|
||||
if err != nil {
|
||||
return nil, status.Errorf(codes.Internal, "failed to get current user: %v", err)
|
||||
@ -325,7 +325,7 @@ func (s *APIV2Service) ListUserAccessTokens(ctx context.Context, _ *apiv2pb.List
|
||||
return nil, status.Errorf(codes.Internal, "failed to list access tokens: %v", err)
|
||||
}
|
||||
|
||||
accessTokens := []*apiv2pb.UserAccessToken{}
|
||||
accessTokens := []*v1pb.UserAccessToken{}
|
||||
for _, userAccessToken := range userAccessTokens {
|
||||
claims := &auth.ClaimsMessage{}
|
||||
_, err := jwt.ParseWithClaims(userAccessToken.AccessToken, claims, func(t *jwt.Token) (any, error) {
|
||||
@ -344,7 +344,7 @@ func (s *APIV2Service) ListUserAccessTokens(ctx context.Context, _ *apiv2pb.List
|
||||
continue
|
||||
}
|
||||
|
||||
userAccessToken := &apiv2pb.UserAccessToken{
|
||||
userAccessToken := &v1pb.UserAccessToken{
|
||||
AccessToken: userAccessToken.AccessToken,
|
||||
Description: userAccessToken.Description,
|
||||
IssuedAt: timestamppb.New(claims.IssuedAt.Time),
|
||||
@ -356,16 +356,16 @@ func (s *APIV2Service) ListUserAccessTokens(ctx context.Context, _ *apiv2pb.List
|
||||
}
|
||||
|
||||
// Sort by issued time in descending order.
|
||||
slices.SortFunc(accessTokens, func(i, j *apiv2pb.UserAccessToken) int {
|
||||
slices.SortFunc(accessTokens, func(i, j *v1pb.UserAccessToken) int {
|
||||
return int(i.IssuedAt.Seconds - j.IssuedAt.Seconds)
|
||||
})
|
||||
response := &apiv2pb.ListUserAccessTokensResponse{
|
||||
response := &v1pb.ListUserAccessTokensResponse{
|
||||
AccessTokens: accessTokens,
|
||||
}
|
||||
return response, nil
|
||||
}
|
||||
|
||||
func (s *APIV2Service) CreateUserAccessToken(ctx context.Context, request *apiv2pb.CreateUserAccessTokenRequest) (*apiv2pb.UserAccessToken, error) {
|
||||
func (s *APIV1Service) CreateUserAccessToken(ctx context.Context, request *v1pb.CreateUserAccessTokenRequest) (*v1pb.UserAccessToken, error) {
|
||||
user, err := getCurrentUser(ctx, s.Store)
|
||||
if err != nil {
|
||||
return nil, status.Errorf(codes.Internal, "failed to get current user: %v", err)
|
||||
@ -402,7 +402,7 @@ func (s *APIV2Service) CreateUserAccessToken(ctx context.Context, request *apiv2
|
||||
return nil, status.Errorf(codes.Internal, "failed to upsert access token to store: %v", err)
|
||||
}
|
||||
|
||||
userAccessToken := &apiv2pb.UserAccessToken{
|
||||
userAccessToken := &v1pb.UserAccessToken{
|
||||
AccessToken: accessToken,
|
||||
Description: request.Description,
|
||||
IssuedAt: timestamppb.New(claims.IssuedAt.Time),
|
||||
@ -413,7 +413,7 @@ func (s *APIV2Service) CreateUserAccessToken(ctx context.Context, request *apiv2
|
||||
return userAccessToken, nil
|
||||
}
|
||||
|
||||
func (s *APIV2Service) DeleteUserAccessToken(ctx context.Context, request *apiv2pb.DeleteUserAccessTokenRequest) (*emptypb.Empty, error) {
|
||||
func (s *APIV1Service) DeleteUserAccessToken(ctx context.Context, request *v1pb.DeleteUserAccessTokenRequest) (*emptypb.Empty, error) {
|
||||
user, err := getCurrentUser(ctx, s.Store)
|
||||
if err != nil {
|
||||
return nil, status.Errorf(codes.Internal, "failed to get current user: %v", err)
|
||||
@ -445,7 +445,7 @@ func (s *APIV2Service) DeleteUserAccessToken(ctx context.Context, request *apiv2
|
||||
return &emptypb.Empty{}, nil
|
||||
}
|
||||
|
||||
func (s *APIV2Service) UpsertAccessTokenToStore(ctx context.Context, user *store.User, accessToken, description string) error {
|
||||
func (s *APIV1Service) UpsertAccessTokenToStore(ctx context.Context, user *store.User, accessToken, description string) error {
|
||||
userAccessTokens, err := s.Store.GetUserAccessTokens(ctx, user.ID)
|
||||
if err != nil {
|
||||
return errors.Wrap(err, "failed to get user access tokens")
|
||||
@ -469,8 +469,8 @@ func (s *APIV2Service) UpsertAccessTokenToStore(ctx context.Context, user *store
|
||||
return nil
|
||||
}
|
||||
|
||||
func convertUserFromStore(user *store.User) *apiv2pb.User {
|
||||
return &apiv2pb.User{
|
||||
func convertUserFromStore(user *store.User) *v1pb.User {
|
||||
return &v1pb.User{
|
||||
Name: fmt.Sprintf("%s%d", UserNamePrefix, user.ID),
|
||||
Id: user.ID,
|
||||
RowStatus: convertRowStatusFromStore(user.RowStatus),
|
||||
@ -485,26 +485,26 @@ func convertUserFromStore(user *store.User) *apiv2pb.User {
|
||||
}
|
||||
}
|
||||
|
||||
func convertUserRoleFromStore(role store.Role) apiv2pb.User_Role {
|
||||
func convertUserRoleFromStore(role store.Role) v1pb.User_Role {
|
||||
switch role {
|
||||
case store.RoleHost:
|
||||
return apiv2pb.User_HOST
|
||||
return v1pb.User_HOST
|
||||
case store.RoleAdmin:
|
||||
return apiv2pb.User_ADMIN
|
||||
return v1pb.User_ADMIN
|
||||
case store.RoleUser:
|
||||
return apiv2pb.User_USER
|
||||
return v1pb.User_USER
|
||||
default:
|
||||
return apiv2pb.User_ROLE_UNSPECIFIED
|
||||
return v1pb.User_ROLE_UNSPECIFIED
|
||||
}
|
||||
}
|
||||
|
||||
func convertUserRoleToStore(role apiv2pb.User_Role) store.Role {
|
||||
func convertUserRoleToStore(role v1pb.User_Role) store.Role {
|
||||
switch role {
|
||||
case apiv2pb.User_HOST:
|
||||
case v1pb.User_HOST:
|
||||
return store.RoleHost
|
||||
case apiv2pb.User_ADMIN:
|
||||
case v1pb.User_ADMIN:
|
||||
return store.RoleAdmin
|
||||
case apiv2pb.User_USER:
|
||||
case v1pb.User_USER:
|
||||
return store.RoleUser
|
||||
default:
|
||||
return store.RoleUser
|
132
server/route/api/v1/v1.go
Normal file
132
server/route/api/v1/v1.go
Normal file
@ -0,0 +1,132 @@
|
||||
package v1
|
||||
|
||||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
|
||||
"github.com/grpc-ecosystem/grpc-gateway/v2/runtime"
|
||||
"github.com/improbable-eng/grpc-web/go/grpcweb"
|
||||
"github.com/labstack/echo/v4"
|
||||
"google.golang.org/grpc"
|
||||
"google.golang.org/grpc/credentials/insecure"
|
||||
"google.golang.org/grpc/reflection"
|
||||
|
||||
v1pb "github.com/usememos/memos/proto/gen/api/v1"
|
||||
"github.com/usememos/memos/server/profile"
|
||||
"github.com/usememos/memos/store"
|
||||
)
|
||||
|
||||
type APIV1Service struct {
|
||||
v1pb.UnimplementedWorkspaceServiceServer
|
||||
v1pb.UnimplementedWorkspaceSettingServiceServer
|
||||
v1pb.UnimplementedAuthServiceServer
|
||||
v1pb.UnimplementedUserServiceServer
|
||||
v1pb.UnimplementedMemoServiceServer
|
||||
v1pb.UnimplementedResourceServiceServer
|
||||
v1pb.UnimplementedTagServiceServer
|
||||
v1pb.UnimplementedInboxServiceServer
|
||||
v1pb.UnimplementedActivityServiceServer
|
||||
v1pb.UnimplementedWebhookServiceServer
|
||||
v1pb.UnimplementedLinkServiceServer
|
||||
v1pb.UnimplementedStorageServiceServer
|
||||
v1pb.UnimplementedIdentityProviderServiceServer
|
||||
|
||||
Secret string
|
||||
Profile *profile.Profile
|
||||
Store *store.Store
|
||||
|
||||
grpcServer *grpc.Server
|
||||
}
|
||||
|
||||
func NewAPIV1Service(secret string, profile *profile.Profile, store *store.Store, grpcServer *grpc.Server) *APIV1Service {
|
||||
grpc.EnableTracing = true
|
||||
apiv1Service := &APIV1Service{
|
||||
Secret: secret,
|
||||
Profile: profile,
|
||||
Store: store,
|
||||
grpcServer: grpcServer,
|
||||
}
|
||||
v1pb.RegisterWorkspaceServiceServer(grpcServer, apiv1Service)
|
||||
v1pb.RegisterWorkspaceSettingServiceServer(grpcServer, apiv1Service)
|
||||
v1pb.RegisterAuthServiceServer(grpcServer, apiv1Service)
|
||||
v1pb.RegisterUserServiceServer(grpcServer, apiv1Service)
|
||||
v1pb.RegisterMemoServiceServer(grpcServer, apiv1Service)
|
||||
v1pb.RegisterTagServiceServer(grpcServer, apiv1Service)
|
||||
v1pb.RegisterResourceServiceServer(grpcServer, apiv1Service)
|
||||
v1pb.RegisterInboxServiceServer(grpcServer, apiv1Service)
|
||||
v1pb.RegisterActivityServiceServer(grpcServer, apiv1Service)
|
||||
v1pb.RegisterWebhookServiceServer(grpcServer, apiv1Service)
|
||||
v1pb.RegisterLinkServiceServer(grpcServer, apiv1Service)
|
||||
v1pb.RegisterStorageServiceServer(grpcServer, apiv1Service)
|
||||
v1pb.RegisterIdentityProviderServiceServer(grpcServer, apiv1Service)
|
||||
reflection.Register(grpcServer)
|
||||
return apiv1Service
|
||||
}
|
||||
|
||||
// RegisterGateway registers the gRPC-Gateway with the given Echo instance.
|
||||
func (s *APIV1Service) RegisterGateway(ctx context.Context, echoServer *echo.Echo) error {
|
||||
// Create a client connection to the gRPC Server we just started.
|
||||
// This is where the gRPC-Gateway proxies the requests.
|
||||
conn, err := grpc.DialContext(
|
||||
ctx,
|
||||
fmt.Sprintf(":%d", s.Profile.Port),
|
||||
grpc.WithTransportCredentials(insecure.NewCredentials()),
|
||||
)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
gwMux := runtime.NewServeMux()
|
||||
if err := v1pb.RegisterWorkspaceServiceHandler(context.Background(), gwMux, conn); err != nil {
|
||||
return err
|
||||
}
|
||||
if err := v1pb.RegisterWorkspaceSettingServiceHandler(context.Background(), gwMux, conn); err != nil {
|
||||
return err
|
||||
}
|
||||
if err := v1pb.RegisterAuthServiceHandler(context.Background(), gwMux, conn); err != nil {
|
||||
return err
|
||||
}
|
||||
if err := v1pb.RegisterUserServiceHandler(context.Background(), gwMux, conn); err != nil {
|
||||
return err
|
||||
}
|
||||
if err := v1pb.RegisterMemoServiceHandler(context.Background(), gwMux, conn); err != nil {
|
||||
return err
|
||||
}
|
||||
if err := v1pb.RegisterTagServiceHandler(context.Background(), gwMux, conn); err != nil {
|
||||
return err
|
||||
}
|
||||
if err := v1pb.RegisterResourceServiceHandler(context.Background(), gwMux, conn); err != nil {
|
||||
return err
|
||||
}
|
||||
if err := v1pb.RegisterInboxServiceHandler(context.Background(), gwMux, conn); err != nil {
|
||||
return err
|
||||
}
|
||||
if err := v1pb.RegisterActivityServiceHandler(context.Background(), gwMux, conn); err != nil {
|
||||
return err
|
||||
}
|
||||
if err := v1pb.RegisterWebhookServiceHandler(context.Background(), gwMux, conn); err != nil {
|
||||
return err
|
||||
}
|
||||
if err := v1pb.RegisterLinkServiceHandler(context.Background(), gwMux, conn); err != nil {
|
||||
return err
|
||||
}
|
||||
if err := v1pb.RegisterStorageServiceHandler(context.Background(), gwMux, conn); err != nil {
|
||||
return err
|
||||
}
|
||||
if err := v1pb.RegisterIdentityProviderServiceHandler(context.Background(), gwMux, conn); err != nil {
|
||||
return err
|
||||
}
|
||||
echoServer.Any("/api/v1/*", echo.WrapHandler(gwMux))
|
||||
|
||||
// GRPC web proxy.
|
||||
options := []grpcweb.Option{
|
||||
grpcweb.WithCorsForRegisteredEndpointsOnly(false),
|
||||
grpcweb.WithOriginFunc(func(origin string) bool {
|
||||
return true
|
||||
}),
|
||||
}
|
||||
wrappedGrpc := grpcweb.WrapServer(s.grpcServer, options...)
|
||||
echoServer.Any("/memos.api.v1.*", echo.WrapHandler(wrappedGrpc))
|
||||
|
||||
return nil
|
||||
}
|
@ -1,4 +1,4 @@
|
||||
package v2
|
||||
package v1
|
||||
|
||||
import (
|
||||
"context"
|
||||
@ -9,11 +9,11 @@ import (
|
||||
"google.golang.org/protobuf/types/known/emptypb"
|
||||
"google.golang.org/protobuf/types/known/timestamppb"
|
||||
|
||||
apiv2pb "github.com/usememos/memos/proto/gen/api/v2"
|
||||
v1pb "github.com/usememos/memos/proto/gen/api/v1"
|
||||
"github.com/usememos/memos/store"
|
||||
)
|
||||
|
||||
func (s *APIV2Service) CreateWebhook(ctx context.Context, request *apiv2pb.CreateWebhookRequest) (*apiv2pb.Webhook, error) {
|
||||
func (s *APIV1Service) CreateWebhook(ctx context.Context, request *v1pb.CreateWebhookRequest) (*v1pb.Webhook, error) {
|
||||
currentUser, err := getCurrentUser(ctx, s.Store)
|
||||
if err != nil {
|
||||
return nil, status.Errorf(codes.Internal, "failed to get user: %v", err)
|
||||
@ -30,7 +30,7 @@ func (s *APIV2Service) CreateWebhook(ctx context.Context, request *apiv2pb.Creat
|
||||
return convertWebhookFromStore(webhook), nil
|
||||
}
|
||||
|
||||
func (s *APIV2Service) ListWebhooks(ctx context.Context, request *apiv2pb.ListWebhooksRequest) (*apiv2pb.ListWebhooksResponse, error) {
|
||||
func (s *APIV1Service) ListWebhooks(ctx context.Context, request *v1pb.ListWebhooksRequest) (*v1pb.ListWebhooksResponse, error) {
|
||||
webhooks, err := s.Store.ListWebhooks(ctx, &store.FindWebhook{
|
||||
CreatorID: &request.CreatorId,
|
||||
})
|
||||
@ -38,8 +38,8 @@ func (s *APIV2Service) ListWebhooks(ctx context.Context, request *apiv2pb.ListWe
|
||||
return nil, status.Errorf(codes.Internal, "failed to list webhooks, error: %+v", err)
|
||||
}
|
||||
|
||||
response := &apiv2pb.ListWebhooksResponse{
|
||||
Webhooks: []*apiv2pb.Webhook{},
|
||||
response := &v1pb.ListWebhooksResponse{
|
||||
Webhooks: []*v1pb.Webhook{},
|
||||
}
|
||||
for _, webhook := range webhooks {
|
||||
response.Webhooks = append(response.Webhooks, convertWebhookFromStore(webhook))
|
||||
@ -47,7 +47,7 @@ func (s *APIV2Service) ListWebhooks(ctx context.Context, request *apiv2pb.ListWe
|
||||
return response, nil
|
||||
}
|
||||
|
||||
func (s *APIV2Service) GetWebhook(ctx context.Context, request *apiv2pb.GetWebhookRequest) (*apiv2pb.Webhook, error) {
|
||||
func (s *APIV1Service) GetWebhook(ctx context.Context, request *v1pb.GetWebhookRequest) (*v1pb.Webhook, error) {
|
||||
currentUser, err := getCurrentUser(ctx, s.Store)
|
||||
if err != nil {
|
||||
return nil, status.Errorf(codes.Internal, "failed to get user: %v", err)
|
||||
@ -66,7 +66,7 @@ func (s *APIV2Service) GetWebhook(ctx context.Context, request *apiv2pb.GetWebho
|
||||
return convertWebhookFromStore(webhook), nil
|
||||
}
|
||||
|
||||
func (s *APIV2Service) UpdateWebhook(ctx context.Context, request *apiv2pb.UpdateWebhookRequest) (*apiv2pb.Webhook, error) {
|
||||
func (s *APIV1Service) UpdateWebhook(ctx context.Context, request *v1pb.UpdateWebhookRequest) (*v1pb.Webhook, error) {
|
||||
if request.UpdateMask == nil || len(request.UpdateMask.Paths) == 0 {
|
||||
return nil, status.Errorf(codes.InvalidArgument, "update_mask is required")
|
||||
}
|
||||
@ -91,7 +91,7 @@ func (s *APIV2Service) UpdateWebhook(ctx context.Context, request *apiv2pb.Updat
|
||||
return convertWebhookFromStore(webhook), nil
|
||||
}
|
||||
|
||||
func (s *APIV2Service) DeleteWebhook(ctx context.Context, request *apiv2pb.DeleteWebhookRequest) (*emptypb.Empty, error) {
|
||||
func (s *APIV1Service) DeleteWebhook(ctx context.Context, request *v1pb.DeleteWebhookRequest) (*emptypb.Empty, error) {
|
||||
err := s.Store.DeleteWebhook(ctx, &store.DeleteWebhook{
|
||||
ID: request.Id,
|
||||
})
|
||||
@ -101,8 +101,8 @@ func (s *APIV2Service) DeleteWebhook(ctx context.Context, request *apiv2pb.Delet
|
||||
return &emptypb.Empty{}, nil
|
||||
}
|
||||
|
||||
func convertWebhookFromStore(webhook *store.Webhook) *apiv2pb.Webhook {
|
||||
return &apiv2pb.Webhook{
|
||||
func convertWebhookFromStore(webhook *store.Webhook) *v1pb.Webhook {
|
||||
return &v1pb.Webhook{
|
||||
Id: webhook.ID,
|
||||
CreatedTime: timestamppb.New(time.Unix(webhook.CreatedTs, 0)),
|
||||
UpdatedTime: timestamppb.New(time.Unix(webhook.UpdatedTs, 0)),
|
@ -1,4 +1,4 @@
|
||||
package v2
|
||||
package v1
|
||||
|
||||
import (
|
||||
"context"
|
||||
@ -7,14 +7,14 @@ import (
|
||||
"google.golang.org/grpc/codes"
|
||||
"google.golang.org/grpc/status"
|
||||
|
||||
apiv2pb "github.com/usememos/memos/proto/gen/api/v2"
|
||||
v1pb "github.com/usememos/memos/proto/gen/api/v1"
|
||||
"github.com/usememos/memos/store"
|
||||
)
|
||||
|
||||
var ownerCache *apiv2pb.User
|
||||
var ownerCache *v1pb.User
|
||||
|
||||
func (s *APIV2Service) GetWorkspaceProfile(ctx context.Context, _ *apiv2pb.GetWorkspaceProfileRequest) (*apiv2pb.WorkspaceProfile, error) {
|
||||
workspaceProfile := &apiv2pb.WorkspaceProfile{
|
||||
func (s *APIV1Service) GetWorkspaceProfile(ctx context.Context, _ *v1pb.GetWorkspaceProfileRequest) (*v1pb.WorkspaceProfile, error) {
|
||||
workspaceProfile := &v1pb.WorkspaceProfile{
|
||||
Version: s.Profile.Version,
|
||||
Mode: s.Profile.Mode,
|
||||
}
|
||||
@ -28,7 +28,7 @@ func (s *APIV2Service) GetWorkspaceProfile(ctx context.Context, _ *apiv2pb.GetWo
|
||||
return workspaceProfile, nil
|
||||
}
|
||||
|
||||
func (s *APIV2Service) GetInstanceOwner(ctx context.Context) (*apiv2pb.User, error) {
|
||||
func (s *APIV1Service) GetInstanceOwner(ctx context.Context) (*v1pb.User, error) {
|
||||
if ownerCache != nil {
|
||||
return ownerCache, nil
|
||||
}
|
@ -1,4 +1,4 @@
|
||||
package v2
|
||||
package v1
|
||||
|
||||
import (
|
||||
"context"
|
||||
@ -7,19 +7,19 @@ import (
|
||||
"google.golang.org/grpc/codes"
|
||||
"google.golang.org/grpc/status"
|
||||
|
||||
apiv2pb "github.com/usememos/memos/proto/gen/api/v2"
|
||||
v1pb "github.com/usememos/memos/proto/gen/api/v1"
|
||||
storepb "github.com/usememos/memos/proto/gen/store"
|
||||
"github.com/usememos/memos/store"
|
||||
)
|
||||
|
||||
func (s *APIV2Service) ListWorkspaceSettings(ctx context.Context, _ *apiv2pb.ListWorkspaceSettingsRequest) (*apiv2pb.ListWorkspaceSettingsResponse, error) {
|
||||
func (s *APIV1Service) ListWorkspaceSettings(ctx context.Context, _ *v1pb.ListWorkspaceSettingsRequest) (*v1pb.ListWorkspaceSettingsResponse, error) {
|
||||
workspaceSettings, err := s.Store.ListWorkspaceSettings(ctx, &store.FindWorkspaceSetting{})
|
||||
if err != nil {
|
||||
return nil, status.Errorf(codes.Internal, "failed to get workspace setting: %v", err)
|
||||
}
|
||||
|
||||
response := &apiv2pb.ListWorkspaceSettingsResponse{
|
||||
Settings: []*apiv2pb.WorkspaceSetting{},
|
||||
response := &v1pb.ListWorkspaceSettingsResponse{
|
||||
Settings: []*v1pb.WorkspaceSetting{},
|
||||
}
|
||||
for _, workspaceSetting := range workspaceSettings {
|
||||
if workspaceSetting.Key == storepb.WorkspaceSettingKey_WORKSPACE_SETTING_BASIC {
|
||||
@ -30,7 +30,7 @@ func (s *APIV2Service) ListWorkspaceSettings(ctx context.Context, _ *apiv2pb.Lis
|
||||
return response, nil
|
||||
}
|
||||
|
||||
func (s *APIV2Service) GetWorkspaceSetting(ctx context.Context, request *apiv2pb.GetWorkspaceSettingRequest) (*apiv2pb.WorkspaceSetting, error) {
|
||||
func (s *APIV1Service) GetWorkspaceSetting(ctx context.Context, request *v1pb.GetWorkspaceSettingRequest) (*v1pb.WorkspaceSetting, error) {
|
||||
settingKeyString, err := ExtractWorkspaceSettingKeyFromName(request.Name)
|
||||
if err != nil {
|
||||
return nil, status.Errorf(codes.InvalidArgument, "invalid workspace setting name: %v", err)
|
||||
@ -49,7 +49,7 @@ func (s *APIV2Service) GetWorkspaceSetting(ctx context.Context, request *apiv2pb
|
||||
return convertWorkspaceSettingFromStore(workspaceSetting), nil
|
||||
}
|
||||
|
||||
func (s *APIV2Service) SetWorkspaceSetting(ctx context.Context, request *apiv2pb.SetWorkspaceSettingRequest) (*apiv2pb.WorkspaceSetting, error) {
|
||||
func (s *APIV1Service) SetWorkspaceSetting(ctx context.Context, request *v1pb.SetWorkspaceSettingRequest) (*v1pb.WorkspaceSetting, error) {
|
||||
if s.Profile.Mode == "demo" {
|
||||
return nil, status.Errorf(codes.InvalidArgument, "setting workspace setting is not allowed in demo mode")
|
||||
}
|
||||
@ -70,28 +70,28 @@ func (s *APIV2Service) SetWorkspaceSetting(ctx context.Context, request *apiv2pb
|
||||
return convertWorkspaceSettingFromStore(workspaceSetting), nil
|
||||
}
|
||||
|
||||
func convertWorkspaceSettingFromStore(setting *storepb.WorkspaceSetting) *apiv2pb.WorkspaceSetting {
|
||||
workspaceSetting := &apiv2pb.WorkspaceSetting{
|
||||
func convertWorkspaceSettingFromStore(setting *storepb.WorkspaceSetting) *v1pb.WorkspaceSetting {
|
||||
workspaceSetting := &v1pb.WorkspaceSetting{
|
||||
Name: fmt.Sprintf("%s%s", WorkspaceSettingNamePrefix, setting.Key.String()),
|
||||
}
|
||||
switch setting.Value.(type) {
|
||||
case *storepb.WorkspaceSetting_GeneralSetting:
|
||||
workspaceSetting.Value = &apiv2pb.WorkspaceSetting_GeneralSetting{
|
||||
workspaceSetting.Value = &v1pb.WorkspaceSetting_GeneralSetting{
|
||||
GeneralSetting: convertWorkspaceGeneralSettingFromStore(setting.GetGeneralSetting()),
|
||||
}
|
||||
case *storepb.WorkspaceSetting_StorageSetting:
|
||||
workspaceSetting.Value = &apiv2pb.WorkspaceSetting_StorageSetting{
|
||||
workspaceSetting.Value = &v1pb.WorkspaceSetting_StorageSetting{
|
||||
StorageSetting: convertWorkspaceStorageSettingFromStore(setting.GetStorageSetting()),
|
||||
}
|
||||
case *storepb.WorkspaceSetting_MemoRelatedSetting:
|
||||
workspaceSetting.Value = &apiv2pb.WorkspaceSetting_MemoRelatedSetting{
|
||||
workspaceSetting.Value = &v1pb.WorkspaceSetting_MemoRelatedSetting{
|
||||
MemoRelatedSetting: convertWorkspaceMemoRelatedSettingFromStore(setting.GetMemoRelatedSetting()),
|
||||
}
|
||||
}
|
||||
return workspaceSetting
|
||||
}
|
||||
|
||||
func convertWorkspaceSettingToStore(setting *apiv2pb.WorkspaceSetting) *storepb.WorkspaceSetting {
|
||||
func convertWorkspaceSettingToStore(setting *v1pb.WorkspaceSetting) *storepb.WorkspaceSetting {
|
||||
settingKeyString, _ := ExtractWorkspaceSettingKeyFromName(setting.Name)
|
||||
workspaceSetting := &storepb.WorkspaceSetting{
|
||||
Key: storepb.WorkspaceSettingKey(storepb.WorkspaceSettingKey_value[settingKeyString]),
|
||||
@ -116,11 +116,11 @@ func convertWorkspaceSettingToStore(setting *apiv2pb.WorkspaceSetting) *storepb.
|
||||
return workspaceSetting
|
||||
}
|
||||
|
||||
func convertWorkspaceGeneralSettingFromStore(setting *storepb.WorkspaceGeneralSetting) *apiv2pb.WorkspaceGeneralSetting {
|
||||
func convertWorkspaceGeneralSettingFromStore(setting *storepb.WorkspaceGeneralSetting) *v1pb.WorkspaceGeneralSetting {
|
||||
if setting == nil {
|
||||
return nil
|
||||
}
|
||||
generalSetting := &apiv2pb.WorkspaceGeneralSetting{
|
||||
generalSetting := &v1pb.WorkspaceGeneralSetting{
|
||||
InstanceUrl: setting.InstanceUrl,
|
||||
DisallowSignup: setting.DisallowSignup,
|
||||
DisallowPasswordLogin: setting.DisallowPasswordLogin,
|
||||
@ -128,7 +128,7 @@ func convertWorkspaceGeneralSettingFromStore(setting *storepb.WorkspaceGeneralSe
|
||||
AdditionalStyle: setting.AdditionalStyle,
|
||||
}
|
||||
if setting.CustomProfile != nil {
|
||||
generalSetting.CustomProfile = &apiv2pb.WorkspaceCustomProfile{
|
||||
generalSetting.CustomProfile = &v1pb.WorkspaceCustomProfile{
|
||||
Title: setting.CustomProfile.Title,
|
||||
Description: setting.CustomProfile.Description,
|
||||
LogoUrl: setting.CustomProfile.LogoUrl,
|
||||
@ -139,7 +139,7 @@ func convertWorkspaceGeneralSettingFromStore(setting *storepb.WorkspaceGeneralSe
|
||||
return generalSetting
|
||||
}
|
||||
|
||||
func convertWorkspaceGeneralSettingToStore(setting *apiv2pb.WorkspaceGeneralSetting) *storepb.WorkspaceGeneralSetting {
|
||||
func convertWorkspaceGeneralSettingToStore(setting *v1pb.WorkspaceGeneralSetting) *storepb.WorkspaceGeneralSetting {
|
||||
if setting == nil {
|
||||
return nil
|
||||
}
|
||||
@ -162,19 +162,19 @@ func convertWorkspaceGeneralSettingToStore(setting *apiv2pb.WorkspaceGeneralSett
|
||||
return generalSetting
|
||||
}
|
||||
|
||||
func convertWorkspaceStorageSettingFromStore(setting *storepb.WorkspaceStorageSetting) *apiv2pb.WorkspaceStorageSetting {
|
||||
func convertWorkspaceStorageSettingFromStore(setting *storepb.WorkspaceStorageSetting) *v1pb.WorkspaceStorageSetting {
|
||||
if setting == nil {
|
||||
return nil
|
||||
}
|
||||
return &apiv2pb.WorkspaceStorageSetting{
|
||||
StorageType: apiv2pb.WorkspaceStorageSetting_StorageType(setting.StorageType),
|
||||
return &v1pb.WorkspaceStorageSetting{
|
||||
StorageType: v1pb.WorkspaceStorageSetting_StorageType(setting.StorageType),
|
||||
LocalStoragePathTemplate: setting.LocalStoragePathTemplate,
|
||||
UploadSizeLimitMb: setting.UploadSizeLimitMb,
|
||||
ActivedExternalStorageId: setting.ActivedExternalStorageId,
|
||||
}
|
||||
}
|
||||
|
||||
func convertWorkspaceStorageSettingToStore(setting *apiv2pb.WorkspaceStorageSetting) *storepb.WorkspaceStorageSetting {
|
||||
func convertWorkspaceStorageSettingToStore(setting *v1pb.WorkspaceStorageSetting) *storepb.WorkspaceStorageSetting {
|
||||
if setting == nil {
|
||||
return nil
|
||||
}
|
||||
@ -186,17 +186,17 @@ func convertWorkspaceStorageSettingToStore(setting *apiv2pb.WorkspaceStorageSett
|
||||
}
|
||||
}
|
||||
|
||||
func convertWorkspaceMemoRelatedSettingFromStore(setting *storepb.WorkspaceMemoRelatedSetting) *apiv2pb.WorkspaceMemoRelatedSetting {
|
||||
func convertWorkspaceMemoRelatedSettingFromStore(setting *storepb.WorkspaceMemoRelatedSetting) *v1pb.WorkspaceMemoRelatedSetting {
|
||||
if setting == nil {
|
||||
return nil
|
||||
}
|
||||
return &apiv2pb.WorkspaceMemoRelatedSetting{
|
||||
return &v1pb.WorkspaceMemoRelatedSetting{
|
||||
DisallowPublicVisible: setting.DisallowPublicVisible,
|
||||
DisplayWithUpdateTime: setting.DisplayWithUpdateTime,
|
||||
}
|
||||
}
|
||||
|
||||
func convertWorkspaceMemoRelatedSettingToStore(setting *apiv2pb.WorkspaceMemoRelatedSetting) *storepb.WorkspaceMemoRelatedSetting {
|
||||
func convertWorkspaceMemoRelatedSettingToStore(setting *v1pb.WorkspaceMemoRelatedSetting) *storepb.WorkspaceMemoRelatedSetting {
|
||||
if setting == nil {
|
||||
return nil
|
||||
}
|
@ -1,37 +0,0 @@
|
||||
package v2
|
||||
|
||||
var authenticationAllowlistMethods = map[string]bool{
|
||||
"/memos.api.v2.WorkspaceService/GetWorkspaceProfile": true,
|
||||
"/memos.api.v2.WorkspaceSettingService/GetWorkspaceSetting": true,
|
||||
"/memos.api.v2.WorkspaceSettingService/ListWorkspaceSettings": true,
|
||||
"/memos.api.v2.IdentityProviderService/ListIdentityProviders": true,
|
||||
"/memos.api.v2.IdentityProviderService/GetIdentityProvider": true,
|
||||
"/memos.api.v2.AuthService/GetAuthStatus": true,
|
||||
"/memos.api.v2.AuthService/SignIn": true,
|
||||
"/memos.api.v2.AuthService/SignInWithSSO": true,
|
||||
"/memos.api.v2.AuthService/SignOut": true,
|
||||
"/memos.api.v2.AuthService/SignUp": true,
|
||||
"/memos.api.v2.UserService/GetUser": true,
|
||||
"/memos.api.v2.UserService/SearchUsers": true,
|
||||
"/memos.api.v2.MemoService/ListMemos": true,
|
||||
"/memos.api.v2.MemoService/GetMemo": true,
|
||||
"/memos.api.v2.MemoService/SearchMemos": true,
|
||||
"/memos.api.v2.MemoService/ListMemoResources": true,
|
||||
"/memos.api.v2.MemoService/ListMemoRelations": true,
|
||||
"/memos.api.v2.MemoService/ListMemoComments": true,
|
||||
"/memos.api.v2.LinkService/GetLinkMetadata": true,
|
||||
}
|
||||
|
||||
// isUnauthorizeAllowedMethod returns whether the method is exempted from authentication.
|
||||
func isUnauthorizeAllowedMethod(fullMethodName string) bool {
|
||||
return authenticationAllowlistMethods[fullMethodName]
|
||||
}
|
||||
|
||||
var allowedMethodsOnlyForAdmin = map[string]bool{
|
||||
"/memos.api.v2.UserService/CreateUser": true,
|
||||
}
|
||||
|
||||
// isOnlyForAdminAllowedMethod returns true if the method is allowed to be called only by admin.
|
||||
func isOnlyForAdminAllowedMethod(methodName string) bool {
|
||||
return allowedMethodsOnlyForAdmin[methodName]
|
||||
}
|
@ -1,132 +0,0 @@
|
||||
package v2
|
||||
|
||||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
|
||||
"github.com/grpc-ecosystem/grpc-gateway/v2/runtime"
|
||||
"github.com/improbable-eng/grpc-web/go/grpcweb"
|
||||
"github.com/labstack/echo/v4"
|
||||
"google.golang.org/grpc"
|
||||
"google.golang.org/grpc/credentials/insecure"
|
||||
"google.golang.org/grpc/reflection"
|
||||
|
||||
apiv2pb "github.com/usememos/memos/proto/gen/api/v2"
|
||||
"github.com/usememos/memos/server/profile"
|
||||
"github.com/usememos/memos/store"
|
||||
)
|
||||
|
||||
type APIV2Service struct {
|
||||
apiv2pb.UnimplementedWorkspaceServiceServer
|
||||
apiv2pb.UnimplementedWorkspaceSettingServiceServer
|
||||
apiv2pb.UnimplementedAuthServiceServer
|
||||
apiv2pb.UnimplementedUserServiceServer
|
||||
apiv2pb.UnimplementedMemoServiceServer
|
||||
apiv2pb.UnimplementedResourceServiceServer
|
||||
apiv2pb.UnimplementedTagServiceServer
|
||||
apiv2pb.UnimplementedInboxServiceServer
|
||||
apiv2pb.UnimplementedActivityServiceServer
|
||||
apiv2pb.UnimplementedWebhookServiceServer
|
||||
apiv2pb.UnimplementedLinkServiceServer
|
||||
apiv2pb.UnimplementedStorageServiceServer
|
||||
apiv2pb.UnimplementedIdentityProviderServiceServer
|
||||
|
||||
Secret string
|
||||
Profile *profile.Profile
|
||||
Store *store.Store
|
||||
|
||||
grpcServer *grpc.Server
|
||||
}
|
||||
|
||||
func NewAPIV2Service(secret string, profile *profile.Profile, store *store.Store, grpcServer *grpc.Server) *APIV2Service {
|
||||
grpc.EnableTracing = true
|
||||
apiv2Service := &APIV2Service{
|
||||
Secret: secret,
|
||||
Profile: profile,
|
||||
Store: store,
|
||||
grpcServer: grpcServer,
|
||||
}
|
||||
apiv2pb.RegisterWorkspaceServiceServer(grpcServer, apiv2Service)
|
||||
apiv2pb.RegisterWorkspaceSettingServiceServer(grpcServer, apiv2Service)
|
||||
apiv2pb.RegisterAuthServiceServer(grpcServer, apiv2Service)
|
||||
apiv2pb.RegisterUserServiceServer(grpcServer, apiv2Service)
|
||||
apiv2pb.RegisterMemoServiceServer(grpcServer, apiv2Service)
|
||||
apiv2pb.RegisterTagServiceServer(grpcServer, apiv2Service)
|
||||
apiv2pb.RegisterResourceServiceServer(grpcServer, apiv2Service)
|
||||
apiv2pb.RegisterInboxServiceServer(grpcServer, apiv2Service)
|
||||
apiv2pb.RegisterActivityServiceServer(grpcServer, apiv2Service)
|
||||
apiv2pb.RegisterWebhookServiceServer(grpcServer, apiv2Service)
|
||||
apiv2pb.RegisterLinkServiceServer(grpcServer, apiv2Service)
|
||||
apiv2pb.RegisterStorageServiceServer(grpcServer, apiv2Service)
|
||||
apiv2pb.RegisterIdentityProviderServiceServer(grpcServer, apiv2Service)
|
||||
reflection.Register(grpcServer)
|
||||
return apiv2Service
|
||||
}
|
||||
|
||||
// RegisterGateway registers the gRPC-Gateway with the given Echo instance.
|
||||
func (s *APIV2Service) RegisterGateway(ctx context.Context, echoServer *echo.Echo) error {
|
||||
// Create a client connection to the gRPC Server we just started.
|
||||
// This is where the gRPC-Gateway proxies the requests.
|
||||
conn, err := grpc.DialContext(
|
||||
ctx,
|
||||
fmt.Sprintf(":%d", s.Profile.Port),
|
||||
grpc.WithTransportCredentials(insecure.NewCredentials()),
|
||||
)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
gwMux := runtime.NewServeMux()
|
||||
if err := apiv2pb.RegisterWorkspaceServiceHandler(context.Background(), gwMux, conn); err != nil {
|
||||
return err
|
||||
}
|
||||
if err := apiv2pb.RegisterWorkspaceSettingServiceHandler(context.Background(), gwMux, conn); err != nil {
|
||||
return err
|
||||
}
|
||||
if err := apiv2pb.RegisterAuthServiceHandler(context.Background(), gwMux, conn); err != nil {
|
||||
return err
|
||||
}
|
||||
if err := apiv2pb.RegisterUserServiceHandler(context.Background(), gwMux, conn); err != nil {
|
||||
return err
|
||||
}
|
||||
if err := apiv2pb.RegisterMemoServiceHandler(context.Background(), gwMux, conn); err != nil {
|
||||
return err
|
||||
}
|
||||
if err := apiv2pb.RegisterTagServiceHandler(context.Background(), gwMux, conn); err != nil {
|
||||
return err
|
||||
}
|
||||
if err := apiv2pb.RegisterResourceServiceHandler(context.Background(), gwMux, conn); err != nil {
|
||||
return err
|
||||
}
|
||||
if err := apiv2pb.RegisterInboxServiceHandler(context.Background(), gwMux, conn); err != nil {
|
||||
return err
|
||||
}
|
||||
if err := apiv2pb.RegisterActivityServiceHandler(context.Background(), gwMux, conn); err != nil {
|
||||
return err
|
||||
}
|
||||
if err := apiv2pb.RegisterWebhookServiceHandler(context.Background(), gwMux, conn); err != nil {
|
||||
return err
|
||||
}
|
||||
if err := apiv2pb.RegisterLinkServiceHandler(context.Background(), gwMux, conn); err != nil {
|
||||
return err
|
||||
}
|
||||
if err := apiv2pb.RegisterStorageServiceHandler(context.Background(), gwMux, conn); err != nil {
|
||||
return err
|
||||
}
|
||||
if err := apiv2pb.RegisterIdentityProviderServiceHandler(context.Background(), gwMux, conn); err != nil {
|
||||
return err
|
||||
}
|
||||
echoServer.Any("/api/v2/*", echo.WrapHandler(gwMux))
|
||||
|
||||
// GRPC web proxy.
|
||||
options := []grpcweb.Option{
|
||||
grpcweb.WithCorsForRegisteredEndpointsOnly(false),
|
||||
grpcweb.WithOriginFunc(func(origin string) bool {
|
||||
return true
|
||||
}),
|
||||
}
|
||||
wrappedGrpc := grpcweb.WrapServer(s.grpcServer, options...)
|
||||
echoServer.Any("/memos.api.v2.*", echo.WrapHandler(wrappedGrpc))
|
||||
|
||||
return nil
|
||||
}
|
@ -46,7 +46,7 @@ func (s *FrontendService) Serve(ctx context.Context, e *echo.Echo) {
|
||||
HTML5: true,
|
||||
Filesystem: getFileSystem("dist"),
|
||||
Skipper: func(c echo.Context) bool {
|
||||
return util.HasPrefixes(c.Path(), "/api", "/memos.api.v2", "/robots.txt", "/sitemap.xml", "/m/:name")
|
||||
return util.HasPrefixes(c.Path(), "/api", "/memos.api.v1", "/robots.txt", "/sitemap.xml", "/m/:name")
|
||||
},
|
||||
}))
|
||||
|
||||
|
@ -18,7 +18,7 @@ import (
|
||||
storepb "github.com/usememos/memos/proto/gen/store"
|
||||
"github.com/usememos/memos/server/profile"
|
||||
"github.com/usememos/memos/server/route/api/auth"
|
||||
apiv2 "github.com/usememos/memos/server/route/api/v2"
|
||||
apiv1 "github.com/usememos/memos/server/route/api/v1"
|
||||
"github.com/usememos/memos/server/route/frontend"
|
||||
"github.com/usememos/memos/server/route/resource"
|
||||
"github.com/usememos/memos/server/route/rss"
|
||||
@ -90,14 +90,14 @@ func NewServer(ctx context.Context, profile *profile.Profile, store *store.Store
|
||||
rss.NewRSSService(s.Profile, s.Store).RegisterRoutes(rootGroup)
|
||||
|
||||
grpcServer := grpc.NewServer(grpc.ChainUnaryInterceptor(
|
||||
apiv2.NewLoggerInterceptor().LoggerInterceptor,
|
||||
apiv2.NewGRPCAuthInterceptor(store, secret).AuthenticationInterceptor,
|
||||
apiv1.NewLoggerInterceptor().LoggerInterceptor,
|
||||
apiv1.NewGRPCAuthInterceptor(store, secret).AuthenticationInterceptor,
|
||||
))
|
||||
s.grpcServer = grpcServer
|
||||
|
||||
apiV2Service := apiv2.NewAPIV2Service(s.Secret, profile, store, grpcServer)
|
||||
// Register gRPC gateway as api v2.
|
||||
if err := apiV2Service.RegisterGateway(ctx, echoServer); err != nil {
|
||||
apiV1Service := apiv1.NewAPIV1Service(s.Secret, profile, store, grpcServer)
|
||||
// Register gRPC gateway as api v1.
|
||||
if err := apiV1Service.RegisterGateway(ctx, echoServer); err != nil {
|
||||
return nil, errors.Wrap(err, "failed to register gRPC gateway")
|
||||
}
|
||||
|
||||
@ -180,7 +180,7 @@ func (s *Server) getOrUpsertWorkspaceBasicSetting(ctx context.Context) (*storepb
|
||||
}
|
||||
|
||||
func grpcRequestSkipper(c echo.Context) bool {
|
||||
return strings.HasPrefix(c.Request().URL.Path, "/memos.api.v2.")
|
||||
return strings.HasPrefix(c.Request().URL.Path, "/memos.api.v1.")
|
||||
}
|
||||
|
||||
func CORSMiddleware(origins []string) echo.MiddlewareFunc {
|
||||
|
@ -2,7 +2,7 @@ import { Button, IconButton, Input } from "@mui/joy";
|
||||
import { useEffect, useState } from "react";
|
||||
import { toast } from "react-hot-toast";
|
||||
import { useUserStore } from "@/store/v1";
|
||||
import { User } from "@/types/proto/api/v2/user_service";
|
||||
import { User } from "@/types/proto/api/v1/user_service";
|
||||
import { useTranslate } from "@/utils/i18n";
|
||||
import { generateDialog } from "./Dialog";
|
||||
import Icon from "./Icon";
|
||||
|
@ -3,7 +3,7 @@ import { useEffect, useState } from "react";
|
||||
import { toast } from "react-hot-toast";
|
||||
import { identityProviderServiceClient } from "@/grpcweb";
|
||||
import { absolutifyLink } from "@/helpers/utils";
|
||||
import { FieldMapping, IdentityProvider, IdentityProvider_Type, OAuth2Config } from "@/types/proto/api/v2/idp_service";
|
||||
import { FieldMapping, IdentityProvider, IdentityProvider_Type, OAuth2Config } from "@/types/proto/api/v1/idp_service";
|
||||
import { useTranslate } from "@/utils/i18n";
|
||||
import { generateDialog } from "./Dialog";
|
||||
import Icon from "./Icon";
|
||||
|
@ -6,7 +6,7 @@ import { memoServiceClient } from "@/grpcweb";
|
||||
import { DEFAULT_LIST_MEMOS_PAGE_SIZE } from "@/helpers/consts";
|
||||
import { getDateTimeString } from "@/helpers/datetime";
|
||||
import useCurrentUser from "@/hooks/useCurrentUser";
|
||||
import { Memo } from "@/types/proto/api/v2/memo_service";
|
||||
import { Memo } from "@/types/proto/api/v1/memo_service";
|
||||
import { useTranslate } from "@/utils/i18n";
|
||||
import { generateDialog } from "./Dialog";
|
||||
import Icon from "./Icon";
|
||||
|
@ -2,7 +2,7 @@ import { Autocomplete, Button, IconButton, Input, List, ListItem, Option, Select
|
||||
import React, { useRef, useState } from "react";
|
||||
import { toast } from "react-hot-toast";
|
||||
import { useResourceStore } from "@/store/v1";
|
||||
import { Resource } from "@/types/proto/api/v2/resource_service";
|
||||
import { Resource } from "@/types/proto/api/v1/resource_service";
|
||||
import { useTranslate } from "@/utils/i18n";
|
||||
import { generateDialog } from "./Dialog";
|
||||
import Icon from "./Icon";
|
||||
|
@ -2,7 +2,7 @@ import { Button, IconButton, Input, Checkbox, Typography } from "@mui/joy";
|
||||
import React, { useEffect, useState } from "react";
|
||||
import { toast } from "react-hot-toast";
|
||||
import { storageServiceClient } from "@/grpcweb";
|
||||
import { S3Config, Storage, Storage_Type } from "@/types/proto/api/v2/storage_service";
|
||||
import { S3Config, Storage, Storage_Type } from "@/types/proto/api/v1/storage_service";
|
||||
import { useTranslate } from "@/utils/i18n";
|
||||
import { generateDialog } from "./Dialog";
|
||||
import Icon from "./Icon";
|
||||
|
@ -2,7 +2,7 @@ import { Button, IconButton, Input } from "@mui/joy";
|
||||
import { useState } from "react";
|
||||
import { toast } from "react-hot-toast";
|
||||
import { WorkspaceSettingPrefix, useWorkspaceSettingStore } from "@/store/v1";
|
||||
import { WorkspaceGeneralSetting } from "@/types/proto/api/v2/workspace_setting_service";
|
||||
import { WorkspaceGeneralSetting } from "@/types/proto/api/v1/workspace_setting_service";
|
||||
import { WorkspaceSettingKey } from "@/types/proto/store/workspace_setting";
|
||||
import { useTranslate } from "@/utils/i18n";
|
||||
import { generateDialog } from "./Dialog";
|
||||
|
@ -1,7 +1,7 @@
|
||||
import { useEffect, useState } from "react";
|
||||
import { Link } from "react-router-dom";
|
||||
import { useUserStore } from "@/store/v1";
|
||||
import { User } from "@/types/proto/api/v2/user_service";
|
||||
import { User } from "@/types/proto/api/v1/user_service";
|
||||
import Icon from "../Icon";
|
||||
import UserAvatar from "../UserAvatar";
|
||||
|
||||
|
@ -5,9 +5,9 @@ import toast from "react-hot-toast";
|
||||
import { activityServiceClient } from "@/grpcweb";
|
||||
import useNavigateTo from "@/hooks/useNavigateTo";
|
||||
import { MemoNamePrefix, useInboxStore, useMemoStore, useUserStore } from "@/store/v1";
|
||||
import { Inbox, Inbox_Status } from "@/types/proto/api/v2/inbox_service";
|
||||
import { Memo } from "@/types/proto/api/v2/memo_service";
|
||||
import { User } from "@/types/proto/api/v2/user_service";
|
||||
import { Inbox, Inbox_Status } from "@/types/proto/api/v1/inbox_service";
|
||||
import { Memo } from "@/types/proto/api/v1/memo_service";
|
||||
import { User } from "@/types/proto/api/v1/user_service";
|
||||
import { useTranslate } from "@/utils/i18n";
|
||||
import Icon from "../Icon";
|
||||
|
||||
|
@ -4,8 +4,8 @@ import { useEffect, useState } from "react";
|
||||
import toast from "react-hot-toast";
|
||||
import { activityServiceClient } from "@/grpcweb";
|
||||
import { useInboxStore } from "@/store/v1";
|
||||
import { Activity } from "@/types/proto/api/v2/activity_service";
|
||||
import { Inbox, Inbox_Status } from "@/types/proto/api/v2/inbox_service";
|
||||
import { Activity } from "@/types/proto/api/v1/activity_service";
|
||||
import { Inbox, Inbox_Status } from "@/types/proto/api/v1/inbox_service";
|
||||
import { useTranslate } from "@/utils/i18n";
|
||||
import Icon from "../Icon";
|
||||
|
||||
|
@ -5,8 +5,8 @@ import { useLocation } from "react-router-dom";
|
||||
import Icon from "@/components/Icon";
|
||||
import useNavigateTo from "@/hooks/useNavigateTo";
|
||||
import { extractMemoIdFromName, useMemoStore } from "@/store/v1";
|
||||
import { RowStatus } from "@/types/proto/api/v2/common";
|
||||
import { Memo } from "@/types/proto/api/v2/memo_service";
|
||||
import { RowStatus } from "@/types/proto/api/v1/common";
|
||||
import { Memo } from "@/types/proto/api/v1/memo_service";
|
||||
import { useTranslate } from "@/utils/i18n";
|
||||
import { showCommonDialog } from "./Dialog/CommonDialog";
|
||||
import showMemoEditorDialog from "./MemoEditor/MemoEditorDialog";
|
||||
|
@ -1,7 +1,7 @@
|
||||
import { Link as MLink, Tooltip } from "@mui/joy";
|
||||
import { useState } from "react";
|
||||
import { linkServiceClient } from "@/grpcweb";
|
||||
import { LinkMetadata } from "@/types/proto/api/v2/link_service";
|
||||
import { LinkMetadata } from "@/types/proto/api/v1/link_service";
|
||||
|
||||
interface Props {
|
||||
url: string;
|
||||
|
@ -4,7 +4,7 @@ import { useContext } from "react";
|
||||
import toast from "react-hot-toast";
|
||||
import showCreateMemoRelationDialog from "@/components/CreateMemoRelationDialog";
|
||||
import Icon from "@/components/Icon";
|
||||
import { MemoRelation_Type } from "@/types/proto/api/v2/memo_relation_service";
|
||||
import { MemoRelation_Type } from "@/types/proto/api/v1/memo_relation_service";
|
||||
import { useTranslate } from "@/utils/i18n";
|
||||
import { EditorRefActions } from "../Editor";
|
||||
import { MemoEditorContext } from "../types";
|
||||
|
@ -1,7 +1,7 @@
|
||||
import { IconButton } from "@mui/joy";
|
||||
import { useEffect } from "react";
|
||||
import { useTagStore } from "@/store/v1";
|
||||
import { MemoRelation } from "@/types/proto/api/v2/memo_relation_service";
|
||||
import { MemoRelation } from "@/types/proto/api/v1/memo_relation_service";
|
||||
import MemoEditor from ".";
|
||||
import { generateDialog } from "../Dialog";
|
||||
import Icon from "../Icon";
|
||||
|
@ -1,7 +1,7 @@
|
||||
import { useEffect, useState } from "react";
|
||||
import { useMemoStore } from "@/store/v1";
|
||||
import { MemoRelation, MemoRelation_Type } from "@/types/proto/api/v2/memo_relation_service";
|
||||
import { Memo } from "@/types/proto/api/v2/memo_service";
|
||||
import { MemoRelation, MemoRelation_Type } from "@/types/proto/api/v1/memo_relation_service";
|
||||
import { Memo } from "@/types/proto/api/v1/memo_service";
|
||||
import Icon from "../Icon";
|
||||
|
||||
interface Props {
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user