Commit 1b291422 authored by Steven's avatar Steven

refactor: api version

parent 8bba7f70
This diff is collapsed.
syntax = "proto3"; syntax = "proto3";
package memos.api.v2; package memos.api.v1;
import "google/api/annotations.proto"; import "google/api/annotations.proto";
import "google/api/client.proto"; import "google/api/client.proto";
import "google/api/field_behavior.proto"; import "google/api/field_behavior.proto";
import "google/protobuf/timestamp.proto"; import "google/protobuf/timestamp.proto";
option go_package = "gen/api/v2"; option go_package = "gen/api/v1";
service ActivityService { service ActivityService {
// GetActivity returns the activity with the given id. // GetActivity returns the activity with the given id.
rpc GetActivity(GetActivityRequest) returns (Activity) { 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"; option (google.api.method_signature) = "id";
} }
} }
......
syntax = "proto3"; 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/api/annotations.proto";
import "google/protobuf/empty.proto"; import "google/protobuf/empty.proto";
option go_package = "gen/api/v2"; option go_package = "gen/api/v1";
service AuthService { service AuthService {
// GetAuthStatus returns the current auth status of the user. // GetAuthStatus returns the current auth status of the user.
rpc GetAuthStatus(GetAuthStatusRequest) returns (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. // SignIn signs in the user with the given username and password.
rpc SignIn(SignInRequest) returns (User) { 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. // SignInWithSSO signs in the user with the given SSO code.
rpc SignInWithSSO(SignInWithSSORequest) returns (User) { 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. // SignUp signs up the user with the given username and password.
rpc SignUp(SignUpRequest) returns (User) { 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. // SignOut signs out the user.
rpc SignOut(SignOutRequest) returns (google.protobuf.Empty) { 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"};
} }
} }
......
syntax = "proto3"; syntax = "proto3";
package memos.api.v2; package memos.api.v1;
option go_package = "gen/api/v2"; option go_package = "gen/api/v1";
enum RowStatus { enum RowStatus {
ROW_STATUS_UNSPECIFIED = 0; ROW_STATUS_UNSPECIFIED = 0;
......
syntax = "proto3"; syntax = "proto3";
package memos.api.v2; package memos.api.v1;
import "google/api/annotations.proto"; import "google/api/annotations.proto";
import "google/api/client.proto"; import "google/api/client.proto";
import "google/protobuf/empty.proto"; import "google/protobuf/empty.proto";
import "google/protobuf/field_mask.proto"; import "google/protobuf/field_mask.proto";
option go_package = "gen/api/v2"; option go_package = "gen/api/v1";
service IdentityProviderService { service IdentityProviderService {
// ListIdentityProviders lists identity providers. // ListIdentityProviders lists identity providers.
rpc ListIdentityProviders(ListIdentityProvidersRequest) returns (ListIdentityProvidersResponse) { 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. // GetIdentityProvider gets an identity provider.
rpc GetIdentityProvider(GetIdentityProviderRequest) returns (IdentityProvider) { 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"; option (google.api.method_signature) = "name";
} }
// CreateIdentityProvider creates an identity provider. // CreateIdentityProvider creates an identity provider.
rpc CreateIdentityProvider(CreateIdentityProviderRequest) returns (IdentityProvider) { rpc CreateIdentityProvider(CreateIdentityProviderRequest) returns (IdentityProvider) {
option (google.api.http) = { option (google.api.http) = {
post: "/api/v2/identityProviders", post: "/api/v1/identityProviders",
body: "identity_provider" body: "identity_provider"
}; };
} }
// UpdateIdentityProvider updates an identity provider. // UpdateIdentityProvider updates an identity provider.
rpc UpdateIdentityProvider(UpdateIdentityProviderRequest) returns (IdentityProvider) { rpc UpdateIdentityProvider(UpdateIdentityProviderRequest) returns (IdentityProvider) {
option (google.api.http) = { option (google.api.http) = {
patch: "/api/v2/{identity_provider.name=identityProviders/*}" patch: "/api/v1/{identity_provider.name=identityProviders/*}"
body: "identity_provider" body: "identity_provider"
}; };
option (google.api.method_signature) = "identity_provider,update_mask"; option (google.api.method_signature) = "identity_provider,update_mask";
} }
// DeleteIdentityProvider deletes an identity provider. // DeleteIdentityProvider deletes an identity provider.
rpc DeleteIdentityProvider(DeleteIdentityProviderRequest) returns (google.protobuf.Empty) { 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"; option (google.api.method_signature) = "name";
} }
} }
......
syntax = "proto3"; syntax = "proto3";
package memos.api.v2; package memos.api.v1;
import "google/api/annotations.proto"; import "google/api/annotations.proto";
import "google/api/client.proto"; import "google/api/client.proto";
...@@ -8,24 +8,24 @@ import "google/protobuf/empty.proto"; ...@@ -8,24 +8,24 @@ import "google/protobuf/empty.proto";
import "google/protobuf/field_mask.proto"; import "google/protobuf/field_mask.proto";
import "google/protobuf/timestamp.proto"; import "google/protobuf/timestamp.proto";
option go_package = "gen/api/v2"; option go_package = "gen/api/v1";
service InboxService { service InboxService {
// ListInboxes lists inboxes for a user. // ListInboxes lists inboxes for a user.
rpc ListInboxes(ListInboxesRequest) returns (ListInboxesResponse) { 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. // UpdateInbox updates an inbox.
rpc UpdateInbox(UpdateInboxRequest) returns (Inbox) { rpc UpdateInbox(UpdateInboxRequest) returns (Inbox) {
option (google.api.http) = { option (google.api.http) = {
patch: "/api/v2/{inbox.name=inboxes/*}" patch: "/api/v1/{inbox.name=inboxes/*}"
body: "inbox" body: "inbox"
}; };
option (google.api.method_signature) = "inbox,update_mask"; option (google.api.method_signature) = "inbox,update_mask";
} }
// DeleteInbox deletes an inbox. // DeleteInbox deletes an inbox.
rpc DeleteInbox(DeleteInboxRequest) returns (google.protobuf.Empty) { 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"; option (google.api.method_signature) = "name";
} }
} }
......
syntax = "proto3"; syntax = "proto3";
package memos.api.v2; package memos.api.v1;
import "google/api/annotations.proto"; import "google/api/annotations.proto";
option go_package = "gen/api/v2"; option go_package = "gen/api/v1";
service LinkService { service LinkService {
// GetLinkMetadata returns metadata for a given link. // GetLinkMetadata returns metadata for a given link.
rpc GetLinkMetadata(GetLinkMetadataRequest) returns (GetLinkMetadataResponse) { rpc GetLinkMetadata(GetLinkMetadataRequest) returns (GetLinkMetadataResponse) {
option (google.api.http) = {get: "/api/v2/linkMetadata"}; option (google.api.http) = {get: "/api/v1/linkMetadata"};
} }
} }
......
syntax = "proto3"; syntax = "proto3";
package memos.api.v2; package memos.api.v1;
option go_package = "gen/api/v2"; option go_package = "gen/api/v1";
message MemoRelation { message MemoRelation {
// The name of memo. // The name of memo.
......
syntax = "proto3"; syntax = "proto3";
package memos.api.v2; package memos.api.v1;
import "api/v2/common.proto"; import "api/v1/common.proto";
import "api/v2/memo_relation_service.proto"; import "api/v1/memo_relation_service.proto";
import "api/v2/reaction_service.proto"; import "api/v1/reaction_service.proto";
import "api/v2/resource_service.proto"; import "api/v1/resource_service.proto";
import "google/api/annotations.proto"; import "google/api/annotations.proto";
import "google/api/client.proto"; import "google/api/client.proto";
import "google/api/field_behavior.proto"; import "google/api/field_behavior.proto";
...@@ -13,109 +13,109 @@ import "google/protobuf/empty.proto"; ...@@ -13,109 +13,109 @@ import "google/protobuf/empty.proto";
import "google/protobuf/field_mask.proto"; import "google/protobuf/field_mask.proto";
import "google/protobuf/timestamp.proto"; import "google/protobuf/timestamp.proto";
option go_package = "gen/api/v2"; option go_package = "gen/api/v1";
service MemoService { service MemoService {
// CreateMemo creates a memo. // CreateMemo creates a memo.
rpc CreateMemo(CreateMemoRequest) returns (Memo) { rpc CreateMemo(CreateMemoRequest) returns (Memo) {
option (google.api.http) = { option (google.api.http) = {
post: "/api/v2/memos" post: "/api/v1/memos"
body: "*" body: "*"
}; };
} }
// ListMemos lists memos with pagination and filter. // ListMemos lists memos with pagination and filter.
rpc ListMemos(ListMemosRequest) returns (ListMemosResponse) { rpc ListMemos(ListMemosRequest) returns (ListMemosResponse) {
option (google.api.http) = {get: "/api/v2/memos"}; option (google.api.http) = {get: "/api/v1/memos"};
} }
// SearchMemos searches memos. // SearchMemos searches memos.
rpc SearchMemos(SearchMemosRequest) returns (SearchMemosResponse) { 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. // GetMemo gets a memo.
rpc GetMemo(GetMemoRequest) returns (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"; option (google.api.method_signature) = "name";
} }
// UpdateMemo updates a memo. // UpdateMemo updates a memo.
rpc UpdateMemo(UpdateMemoRequest) returns (Memo) { rpc UpdateMemo(UpdateMemoRequest) returns (Memo) {
option (google.api.http) = { option (google.api.http) = {
patch: "/api/v2/{memo.name=memos/*}" patch: "/api/v1/{memo.name=memos/*}"
body: "memo" body: "memo"
}; };
option (google.api.method_signature) = "memo,update_mask"; option (google.api.method_signature) = "memo,update_mask";
} }
// DeleteMemo deletes a memo. // DeleteMemo deletes a memo.
rpc DeleteMemo(DeleteMemoRequest) returns (google.protobuf.Empty) { 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"; option (google.api.method_signature) = "name";
} }
// ExportMemos exports memos. // ExportMemos exports memos.
rpc ExportMemos(ExportMemosRequest) returns (ExportMemosResponse) { rpc ExportMemos(ExportMemosRequest) returns (ExportMemosResponse) {
option (google.api.http) = { option (google.api.http) = {
post: "/api/v2/memos:export", post: "/api/v1/memos:export",
body: "*" body: "*"
}; };
} }
// SetMemoResources sets resources for a memo. // SetMemoResources sets resources for a memo.
rpc SetMemoResources(SetMemoResourcesRequest) returns (google.protobuf.Empty) { rpc SetMemoResources(SetMemoResourcesRequest) returns (google.protobuf.Empty) {
option (google.api.http) = { option (google.api.http) = {
patch: "/api/v2/{name=memos/*}/resources" patch: "/api/v1/{name=memos/*}/resources"
body: "*" body: "*"
}; };
option (google.api.method_signature) = "name"; option (google.api.method_signature) = "name";
} }
// ListMemoResources lists resources for a memo. // ListMemoResources lists resources for a memo.
rpc ListMemoResources(ListMemoResourcesRequest) returns (ListMemoResourcesResponse) { 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"; option (google.api.method_signature) = "name";
} }
// SetMemoRelations sets relations for a memo. // SetMemoRelations sets relations for a memo.
rpc SetMemoRelations(SetMemoRelationsRequest) returns (google.protobuf.Empty) { rpc SetMemoRelations(SetMemoRelationsRequest) returns (google.protobuf.Empty) {
option (google.api.http) = { option (google.api.http) = {
patch: "/api/v2/{name=memos/*}/relations" patch: "/api/v1/{name=memos/*}/relations"
body: "*" body: "*"
}; };
option (google.api.method_signature) = "name"; option (google.api.method_signature) = "name";
} }
// ListMemoRelations lists relations for a memo. // ListMemoRelations lists relations for a memo.
rpc ListMemoRelations(ListMemoRelationsRequest) returns (ListMemoRelationsResponse) { 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"; option (google.api.method_signature) = "name";
} }
// CreateMemoComment creates a comment for a memo. // CreateMemoComment creates a comment for a memo.
rpc CreateMemoComment(CreateMemoCommentRequest) returns (Memo) { rpc CreateMemoComment(CreateMemoCommentRequest) returns (Memo) {
option (google.api.http) = { option (google.api.http) = {
post: "/api/v2/{name=memos/*}/comments", post: "/api/v1/{name=memos/*}/comments",
body: "comment" body: "comment"
}; };
option (google.api.method_signature) = "name"; option (google.api.method_signature) = "name";
} }
// ListMemoComments lists comments for a memo. // ListMemoComments lists comments for a memo.
rpc ListMemoComments(ListMemoCommentsRequest) returns (ListMemoCommentsResponse) { 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"; option (google.api.method_signature) = "name";
} }
// GetUserMemosStats gets stats of memos for a user. // GetUserMemosStats gets stats of memos for a user.
rpc GetUserMemosStats(GetUserMemosStatsRequest) returns (GetUserMemosStatsResponse) { 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"; option (google.api.method_signature) = "username";
} }
// ListMemoReactions lists reactions for a memo. // ListMemoReactions lists reactions for a memo.
rpc ListMemoReactions(ListMemoReactionsRequest) returns (ListMemoReactionsResponse) { 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"; option (google.api.method_signature) = "name";
} }
// UpsertMemoReaction upserts a reaction for a memo. // UpsertMemoReaction upserts a reaction for a memo.
rpc UpsertMemoReaction(UpsertMemoReactionRequest) returns (Reaction) { rpc UpsertMemoReaction(UpsertMemoReactionRequest) returns (Reaction) {
option (google.api.http) = { option (google.api.http) = {
post: "/api/v2/{name=memos/*}/reactions", post: "/api/v1/{name=memos/*}/reactions",
body: "*" body: "*"
}; };
option (google.api.method_signature) = "name"; option (google.api.method_signature) = "name";
} }
// DeleteMemoReaction deletes a reaction for a memo. // DeleteMemoReaction deletes a reaction for a memo.
rpc DeleteMemoReaction(DeleteMemoReactionRequest) returns (google.protobuf.Empty) { 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"; option (google.api.method_signature) = "reaction_id";
} }
} }
......
syntax = "proto3"; syntax = "proto3";
package memos.api.v2; package memos.api.v1;
option go_package = "gen/api/v2"; option go_package = "gen/api/v1";
message Reaction { message Reaction {
int32 id = 1; int32 id = 1;
......
syntax = "proto3"; syntax = "proto3";
package memos.api.v2; package memos.api.v1;
import "google/api/annotations.proto"; import "google/api/annotations.proto";
import "google/api/client.proto"; import "google/api/client.proto";
...@@ -9,40 +9,40 @@ import "google/protobuf/empty.proto"; ...@@ -9,40 +9,40 @@ import "google/protobuf/empty.proto";
import "google/protobuf/field_mask.proto"; import "google/protobuf/field_mask.proto";
import "google/protobuf/timestamp.proto"; import "google/protobuf/timestamp.proto";
option go_package = "gen/api/v2"; option go_package = "gen/api/v1";
service ResourceService { service ResourceService {
// CreateResource creates a new resource. // CreateResource creates a new resource.
rpc CreateResource(CreateResourceRequest) returns (Resource) { rpc CreateResource(CreateResourceRequest) returns (Resource) {
option (google.api.http) = { option (google.api.http) = {
post: "/api/v2/resources", post: "/api/v1/resources",
body: "resource" body: "resource"
}; };
} }
// ListResources lists all resources. // ListResources lists all resources.
rpc ListResources(ListResourcesRequest) returns (ListResourcesResponse) { rpc ListResources(ListResourcesRequest) returns (ListResourcesResponse) {
option (google.api.http) = {get: "/api/v2/resources"}; option (google.api.http) = {get: "/api/v1/resources"};
} }
// SearchResources searches memos. // SearchResources searches memos.
rpc SearchResources(SearchResourcesRequest) returns (SearchResourcesResponse) { 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. // GetResource returns a resource by name.
rpc GetResource(GetResourceRequest) returns (Resource) { 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"; option (google.api.method_signature) = "name";
} }
// UpdateResource updates a resource. // UpdateResource updates a resource.
rpc UpdateResource(UpdateResourceRequest) returns (Resource) { rpc UpdateResource(UpdateResourceRequest) returns (Resource) {
option (google.api.http) = { option (google.api.http) = {
patch: "/api/v2/{resource.name=resources/*}", patch: "/api/v1/{resource.name=resources/*}",
body: "resource" body: "resource"
}; };
option (google.api.method_signature) = "resource,update_mask"; option (google.api.method_signature) = "resource,update_mask";
} }
// DeleteResource deletes a resource by name. // DeleteResource deletes a resource by name.
rpc DeleteResource(DeleteResourceRequest) returns (google.protobuf.Empty) { 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"; option (google.api.method_signature) = "name";
} }
} }
......
syntax = "proto3"; syntax = "proto3";
package memos.api.v2; package memos.api.v1;
import "google/api/annotations.proto"; import "google/api/annotations.proto";
import "google/api/client.proto"; import "google/api/client.proto";
import "google/protobuf/field_mask.proto"; import "google/protobuf/field_mask.proto";
option go_package = "gen/api/v2"; option go_package = "gen/api/v1";
service StorageService { service StorageService {
// CreateStorage creates a new storage. // CreateStorage creates a new storage.
rpc CreateStorage(CreateStorageRequest) returns (CreateStorageResponse) { rpc CreateStorage(CreateStorageRequest) returns (CreateStorageResponse) {
option (google.api.http) = { option (google.api.http) = {
post: "/api/v2/storages" post: "/api/v1/storages"
body: "*" body: "*"
}; };
} }
// GetStorage returns a storage by id. // GetStorage returns a storage by id.
rpc GetStorage(GetStorageRequest) returns (GetStorageResponse) { 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"; option (google.api.method_signature) = "id";
} }
// ListStorages returns a list of storages. // ListStorages returns a list of storages.
rpc ListStorages(ListStoragesRequest) returns (ListStoragesResponse) { 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. // UpdateStorage updates a storage.
rpc UpdateStorage(UpdateStorageRequest) returns (UpdateStorageResponse) { rpc UpdateStorage(UpdateStorageRequest) returns (UpdateStorageResponse) {
option (google.api.http) = { option (google.api.http) = {
patch: "/api/v2/storages/{storage.id}" patch: "/api/v1/storages/{storage.id}"
body: "storage" body: "storage"
}; };
option (google.api.method_signature) = "storage,update_mask"; option (google.api.method_signature) = "storage,update_mask";
} }
// DeleteStorage deletes a storage by id. // DeleteStorage deletes a storage by id.
rpc DeleteStorage(DeleteStorageRequest) returns (DeleteStorageResponse) { 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"; option (google.api.method_signature) = "id";
} }
} }
......
syntax = "proto3"; syntax = "proto3";
package memos.api.v2; package memos.api.v1;
import "google/api/annotations.proto"; import "google/api/annotations.proto";
import "google/protobuf/empty.proto"; import "google/protobuf/empty.proto";
option go_package = "gen/api/v2"; option go_package = "gen/api/v1";
service TagService { service TagService {
// UpsertTag upserts a tag. // UpsertTag upserts a tag.
rpc UpsertTag(UpsertTagRequest) returns (Tag) { rpc UpsertTag(UpsertTagRequest) returns (Tag) {
option (google.api.http) = { option (google.api.http) = {
post: "/api/v2/tags", post: "/api/v1/tags",
body: "*" body: "*"
}; };
} }
// BatchUpsertTag upserts multiple tags. // BatchUpsertTag upserts multiple tags.
rpc BatchUpsertTag(BatchUpsertTagRequest) returns (google.protobuf.Empty) { rpc BatchUpsertTag(BatchUpsertTagRequest) returns (google.protobuf.Empty) {
option (google.api.http) = { option (google.api.http) = {
post: "/api/v2/tags:batchUpsert", post: "/api/v1/tags:batchUpsert",
body: "*" body: "*"
}; };
} }
// ListTags lists tags. // ListTags lists tags.
rpc ListTags(ListTagsRequest) returns (ListTagsResponse) { 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. // RenameTag renames a tag.
// All related memos will be updated. // All related memos will be updated.
rpc RenameTag(RenameTagRequest) returns (google.protobuf.Empty) { rpc RenameTag(RenameTagRequest) returns (google.protobuf.Empty) {
option (google.api.http) = { option (google.api.http) = {
patch: "/api/v2/tags:rename", patch: "/api/v1/tags:rename",
body: "*" body: "*"
}; };
} }
// DeleteTag deletes a tag. // DeleteTag deletes a tag.
rpc DeleteTag(DeleteTagRequest) returns (google.protobuf.Empty) { 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. // GetTagSuggestions gets tag suggestions from the user's memos.
rpc GetTagSuggestions(GetTagSuggestionsRequest) returns (GetTagSuggestionsResponse) { rpc GetTagSuggestions(GetTagSuggestionsRequest) returns (GetTagSuggestionsResponse) {
option (google.api.http) = {get: "/api/v2/tags/suggestion"}; option (google.api.http) = {get: "/api/v1/tags/suggestion"};
} }
} }
......
syntax = "proto3"; 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/annotations.proto";
import "google/api/client.proto"; import "google/api/client.proto";
import "google/api/field_behavior.proto"; import "google/api/field_behavior.proto";
...@@ -10,26 +10,26 @@ import "google/protobuf/empty.proto"; ...@@ -10,26 +10,26 @@ import "google/protobuf/empty.proto";
import "google/protobuf/field_mask.proto"; import "google/protobuf/field_mask.proto";
import "google/protobuf/timestamp.proto"; import "google/protobuf/timestamp.proto";
option go_package = "gen/api/v2"; option go_package = "gen/api/v1";
service UserService { service UserService {
// ListUsers returns a list of users. // ListUsers returns a list of users.
rpc ListUsers(ListUsersRequest) returns (ListUsersResponse) { 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. // SearchUsers searches users by filter.
rpc SearchUsers(SearchUsersRequest) returns (SearchUsersResponse) { 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. // GetUser gets a user by name.
rpc GetUser(GetUserRequest) returns (User) { 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"; option (google.api.method_signature) = "name";
} }
// CreateUser creates a new user. // CreateUser creates a new user.
rpc CreateUser(CreateUserRequest) returns (User) { rpc CreateUser(CreateUserRequest) returns (User) {
option (google.api.http) = { option (google.api.http) = {
post: "/api/v2/users" post: "/api/v1/users"
body: "user" body: "user"
}; };
option (google.api.method_signature) = "user"; option (google.api.method_signature) = "user";
...@@ -37,45 +37,45 @@ service UserService { ...@@ -37,45 +37,45 @@ service UserService {
// UpdateUser updates a user. // UpdateUser updates a user.
rpc UpdateUser(UpdateUserRequest) returns (User) { rpc UpdateUser(UpdateUserRequest) returns (User) {
option (google.api.http) = { option (google.api.http) = {
patch: "/api/v2/{user.name=users/*}" patch: "/api/v1/{user.name=users/*}"
body: "user" body: "user"
}; };
option (google.api.method_signature) = "user,update_mask"; option (google.api.method_signature) = "user,update_mask";
} }
// DeleteUser deletes a user. // DeleteUser deletes a user.
rpc DeleteUser(DeleteUserRequest) returns (google.protobuf.Empty) { 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"; option (google.api.method_signature) = "name";
} }
// GetUserSetting gets the setting of a user. // GetUserSetting gets the setting of a user.
rpc GetUserSetting(GetUserSettingRequest) returns (UserSetting) { 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"; option (google.api.method_signature) = "name";
} }
// UpdateUserSetting updates the setting of a user. // UpdateUserSetting updates the setting of a user.
rpc UpdateUserSetting(UpdateUserSettingRequest) returns (UserSetting) { rpc UpdateUserSetting(UpdateUserSettingRequest) returns (UserSetting) {
option (google.api.http) = { option (google.api.http) = {
patch: "/api/v2/{setting.name=users/*/setting}" patch: "/api/v1/{setting.name=users/*/setting}"
body: "setting" body: "setting"
}; };
option (google.api.method_signature) = "setting,update_mask"; option (google.api.method_signature) = "setting,update_mask";
} }
// ListUserAccessTokens returns a list of access tokens for a user. // ListUserAccessTokens returns a list of access tokens for a user.
rpc ListUserAccessTokens(ListUserAccessTokensRequest) returns (ListUserAccessTokensResponse) { 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"; option (google.api.method_signature) = "name";
} }
// CreateUserAccessToken creates a new access token for a user. // CreateUserAccessToken creates a new access token for a user.
rpc CreateUserAccessToken(CreateUserAccessTokenRequest) returns (UserAccessToken) { rpc CreateUserAccessToken(CreateUserAccessTokenRequest) returns (UserAccessToken) {
option (google.api.http) = { option (google.api.http) = {
post: "/api/v2/{name=users/*}/access_tokens" post: "/api/v1/{name=users/*}/access_tokens"
body: "*" body: "*"
}; };
option (google.api.method_signature) = "name"; option (google.api.method_signature) = "name";
} }
// DeleteUserAccessToken deletes an access token for a user. // DeleteUserAccessToken deletes an access token for a user.
rpc DeleteUserAccessToken(DeleteUserAccessTokenRequest) returns (google.protobuf.Empty) { 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"; option (google.api.method_signature) = "name,access_token";
} }
} }
......
syntax = "proto3"; 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/annotations.proto";
import "google/api/client.proto"; import "google/api/client.proto";
import "google/protobuf/empty.proto"; import "google/protobuf/empty.proto";
import "google/protobuf/field_mask.proto"; import "google/protobuf/field_mask.proto";
import "google/protobuf/timestamp.proto"; import "google/protobuf/timestamp.proto";
option go_package = "gen/api/v2"; option go_package = "gen/api/v1";
service WebhookService { service WebhookService {
// CreateWebhook creates a new webhook. // CreateWebhook creates a new webhook.
rpc CreateWebhook(CreateWebhookRequest) returns (Webhook) { rpc CreateWebhook(CreateWebhookRequest) returns (Webhook) {
option (google.api.http) = { option (google.api.http) = {
post: "/api/v2/webhooks" post: "/api/v1/webhooks"
body: "*" body: "*"
}; };
} }
// GetWebhook returns a webhook by id. // GetWebhook returns a webhook by id.
rpc GetWebhook(GetWebhookRequest) returns (Webhook) { 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"; option (google.api.method_signature) = "id";
} }
// ListWebhooks returns a list of webhooks. // ListWebhooks returns a list of webhooks.
rpc ListWebhooks(ListWebhooksRequest) returns (ListWebhooksResponse) { 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. // UpdateWebhook updates a webhook.
rpc UpdateWebhook(UpdateWebhookRequest) returns (Webhook) { rpc UpdateWebhook(UpdateWebhookRequest) returns (Webhook) {
option (google.api.http) = { option (google.api.http) = {
patch: "/api/v2/webhooks/{webhook.id}" patch: "/api/v1/webhooks/{webhook.id}"
body: "webhook" body: "webhook"
}; };
option (google.api.method_signature) = "webhook,update_mask"; option (google.api.method_signature) = "webhook,update_mask";
} }
// DeleteWebhook deletes a webhook by id. // DeleteWebhook deletes a webhook by id.
rpc DeleteWebhook(DeleteWebhookRequest) returns (google.protobuf.Empty) { 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"; option (google.api.method_signature) = "id";
} }
} }
......
syntax = "proto3"; syntax = "proto3";
package memos.api.v2; package memos.api.v1;
import "google/api/annotations.proto"; import "google/api/annotations.proto";
option go_package = "gen/api/v2"; option go_package = "gen/api/v1";
service WorkspaceService { service WorkspaceService {
// GetWorkspaceProfile returns the workspace profile. // GetWorkspaceProfile returns the workspace profile.
rpc GetWorkspaceProfile(GetWorkspaceProfileRequest) returns (WorkspaceProfile) { rpc GetWorkspaceProfile(GetWorkspaceProfileRequest) returns (WorkspaceProfile) {
option (google.api.http) = {get: "/api/v2/workspace/profile"}; option (google.api.http) = {get: "/api/v1/workspace/profile"};
} }
} }
......
syntax = "proto3"; syntax = "proto3";
package memos.api.v2; package memos.api.v1;
import "google/api/annotations.proto"; import "google/api/annotations.proto";
import "google/api/client.proto"; import "google/api/client.proto";
import "google/api/field_behavior.proto"; import "google/api/field_behavior.proto";
option go_package = "gen/api/v2"; option go_package = "gen/api/v1";
service WorkspaceSettingService { service WorkspaceSettingService {
// ListWorkspaceSetting returns the list of settings. // ListWorkspaceSetting returns the list of settings.
rpc ListWorkspaceSettings(ListWorkspaceSettingsRequest) returns (ListWorkspaceSettingsResponse) { 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. // GetWorkspaceSetting returns the setting by name.
rpc GetWorkspaceSetting(GetWorkspaceSettingRequest) returns (WorkspaceSetting) { 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"; option (google.api.method_signature) = "name";
} }
// SetWorkspaceSetting updates the setting. // SetWorkspaceSetting updates the setting.
rpc SetWorkspaceSetting(SetWorkspaceSettingRequest) returns (WorkspaceSetting) { rpc SetWorkspaceSetting(SetWorkspaceSettingRequest) returns (WorkspaceSetting) {
option (google.api.http) = { option (google.api.http) = {
patch: "/api/v2/workspace/{setting.name=settings/*}", patch: "/api/v1/workspace/{setting.name=settings/*}",
body: "setting" body: "setting"
}; };
option (google.api.method_signature) = "setting"; option (google.api.method_signature) = "setting";
......
// Code generated by protoc-gen-grpc-gateway. DO NOT EDIT. // 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. It translates gRPC into RESTful JSON APIs.
*/ */
package apiv2 package apiv1
import ( import (
"context" "context"
...@@ -97,7 +97,7 @@ func RegisterActivityServiceHandlerServer(ctx context.Context, mux *runtime.Serv ...@@ -97,7 +97,7 @@ func RegisterActivityServiceHandlerServer(ctx context.Context, mux *runtime.Serv
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
var err error var err error
var annotatedContext context.Context 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 { if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return return
...@@ -161,7 +161,7 @@ func RegisterActivityServiceHandlerClient(ctx context.Context, mux *runtime.Serv ...@@ -161,7 +161,7 @@ func RegisterActivityServiceHandlerClient(ctx context.Context, mux *runtime.Serv
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
var err error var err error
var annotatedContext context.Context 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 { if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return return
...@@ -181,7 +181,7 @@ func RegisterActivityServiceHandlerClient(ctx context.Context, mux *runtime.Serv ...@@ -181,7 +181,7 @@ func RegisterActivityServiceHandlerClient(ctx context.Context, mux *runtime.Serv
} }
var ( 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 ( var (
......
...@@ -2,9 +2,9 @@ ...@@ -2,9 +2,9 @@
// versions: // versions:
// - protoc-gen-go-grpc v1.3.0 // - protoc-gen-go-grpc v1.3.0
// - protoc (unknown) // - protoc (unknown)
// source: api/v2/activity_service.proto // source: api/v1/activity_service.proto
package apiv2 package apiv1
import ( import (
context "context" context "context"
...@@ -19,7 +19,7 @@ import ( ...@@ -19,7 +19,7 @@ import (
const _ = grpc.SupportPackageIsVersion7 const _ = grpc.SupportPackageIsVersion7
const ( 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. // ActivityServiceClient is the client API for ActivityService service.
...@@ -98,7 +98,7 @@ func _ActivityService_GetActivity_Handler(srv interface{}, ctx context.Context, ...@@ -98,7 +98,7 @@ func _ActivityService_GetActivity_Handler(srv interface{}, ctx context.Context,
// It's only intended for direct use with grpc.RegisterService, // It's only intended for direct use with grpc.RegisterService,
// and not to be introspected or modified (even as a copy) // and not to be introspected or modified (even as a copy)
var ActivityService_ServiceDesc = grpc.ServiceDesc{ var ActivityService_ServiceDesc = grpc.ServiceDesc{
ServiceName: "memos.api.v2.ActivityService", ServiceName: "memos.api.v1.ActivityService",
HandlerType: (*ActivityServiceServer)(nil), HandlerType: (*ActivityServiceServer)(nil),
Methods: []grpc.MethodDesc{ Methods: []grpc.MethodDesc{
{ {
...@@ -107,5 +107,5 @@ var ActivityService_ServiceDesc = grpc.ServiceDesc{ ...@@ -107,5 +107,5 @@ var ActivityService_ServiceDesc = grpc.ServiceDesc{
}, },
}, },
Streams: []grpc.StreamDesc{}, Streams: []grpc.StreamDesc{},
Metadata: "api/v2/activity_service.proto", Metadata: "api/v1/activity_service.proto",
} }
// Code generated by protoc-gen-grpc-gateway. DO NOT EDIT. // 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. It translates gRPC into RESTful JSON APIs.
*/ */
package apiv2 package apiv1
import ( import (
"context" "context"
...@@ -189,7 +189,7 @@ func RegisterAuthServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux ...@@ -189,7 +189,7 @@ func RegisterAuthServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
var err error var err error
var annotatedContext context.Context 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 { if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return return
...@@ -214,7 +214,7 @@ func RegisterAuthServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux ...@@ -214,7 +214,7 @@ func RegisterAuthServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
var err error var err error
var annotatedContext context.Context 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 { if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return return
...@@ -239,7 +239,7 @@ func RegisterAuthServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux ...@@ -239,7 +239,7 @@ func RegisterAuthServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
var err error var err error
var annotatedContext context.Context 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 { if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return return
...@@ -264,7 +264,7 @@ func RegisterAuthServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux ...@@ -264,7 +264,7 @@ func RegisterAuthServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
var err error var err error
var annotatedContext context.Context 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 { if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return return
...@@ -289,7 +289,7 @@ func RegisterAuthServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux ...@@ -289,7 +289,7 @@ func RegisterAuthServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
var err error var err error
var annotatedContext context.Context 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 { if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return return
...@@ -353,7 +353,7 @@ func RegisterAuthServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux ...@@ -353,7 +353,7 @@ func RegisterAuthServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
var err error var err error
var annotatedContext context.Context 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 { if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return return
...@@ -375,7 +375,7 @@ func RegisterAuthServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux ...@@ -375,7 +375,7 @@ func RegisterAuthServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
var err error var err error
var annotatedContext context.Context 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 { if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return return
...@@ -397,7 +397,7 @@ func RegisterAuthServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux ...@@ -397,7 +397,7 @@ func RegisterAuthServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
var err error var err error
var annotatedContext context.Context 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 { if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return return
...@@ -419,7 +419,7 @@ func RegisterAuthServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux ...@@ -419,7 +419,7 @@ func RegisterAuthServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
var err error var err error
var annotatedContext context.Context 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 { if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return return
...@@ -441,7 +441,7 @@ func RegisterAuthServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux ...@@ -441,7 +441,7 @@ func RegisterAuthServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
var err error var err error
var annotatedContext context.Context 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 { if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return return
...@@ -461,15 +461,15 @@ func RegisterAuthServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux ...@@ -461,15 +461,15 @@ func RegisterAuthServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux
} }
var ( 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 ( var (
......
...@@ -2,9 +2,9 @@ ...@@ -2,9 +2,9 @@
// versions: // versions:
// - protoc-gen-go-grpc v1.3.0 // - protoc-gen-go-grpc v1.3.0
// - protoc (unknown) // - protoc (unknown)
// source: api/v2/auth_service.proto // source: api/v1/auth_service.proto
package apiv2 package apiv1
import ( import (
context "context" context "context"
...@@ -20,11 +20,11 @@ import ( ...@@ -20,11 +20,11 @@ import (
const _ = grpc.SupportPackageIsVersion7 const _ = grpc.SupportPackageIsVersion7
const ( const (
AuthService_GetAuthStatus_FullMethodName = "/memos.api.v2.AuthService/GetAuthStatus" AuthService_GetAuthStatus_FullMethodName = "/memos.api.v1.AuthService/GetAuthStatus"
AuthService_SignIn_FullMethodName = "/memos.api.v2.AuthService/SignIn" AuthService_SignIn_FullMethodName = "/memos.api.v1.AuthService/SignIn"
AuthService_SignInWithSSO_FullMethodName = "/memos.api.v2.AuthService/SignInWithSSO" AuthService_SignInWithSSO_FullMethodName = "/memos.api.v1.AuthService/SignInWithSSO"
AuthService_SignUp_FullMethodName = "/memos.api.v2.AuthService/SignUp" AuthService_SignUp_FullMethodName = "/memos.api.v1.AuthService/SignUp"
AuthService_SignOut_FullMethodName = "/memos.api.v2.AuthService/SignOut" AuthService_SignOut_FullMethodName = "/memos.api.v1.AuthService/SignOut"
) )
// AuthServiceClient is the client API for AuthService service. // AuthServiceClient is the client API for AuthService service.
...@@ -239,7 +239,7 @@ func _AuthService_SignOut_Handler(srv interface{}, ctx context.Context, dec func ...@@ -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, // It's only intended for direct use with grpc.RegisterService,
// and not to be introspected or modified (even as a copy) // and not to be introspected or modified (even as a copy)
var AuthService_ServiceDesc = grpc.ServiceDesc{ var AuthService_ServiceDesc = grpc.ServiceDesc{
ServiceName: "memos.api.v2.AuthService", ServiceName: "memos.api.v1.AuthService",
HandlerType: (*AuthServiceServer)(nil), HandlerType: (*AuthServiceServer)(nil),
Methods: []grpc.MethodDesc{ Methods: []grpc.MethodDesc{
{ {
...@@ -264,5 +264,5 @@ var AuthService_ServiceDesc = grpc.ServiceDesc{ ...@@ -264,5 +264,5 @@ var AuthService_ServiceDesc = grpc.ServiceDesc{
}, },
}, },
Streams: []grpc.StreamDesc{}, Streams: []grpc.StreamDesc{},
Metadata: "api/v2/auth_service.proto", Metadata: "api/v1/auth_service.proto",
} }
...@@ -2,9 +2,9 @@ ...@@ -2,9 +2,9 @@
// versions: // versions:
// protoc-gen-go v1.33.0 // protoc-gen-go v1.33.0
// protoc (unknown) // protoc (unknown)
// source: api/v2/common.proto // source: api/v1/common.proto
package apiv2 package apiv1
import ( import (
protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoreflect "google.golang.org/protobuf/reflect/protoreflect"
...@@ -53,11 +53,11 @@ func (x RowStatus) String() string { ...@@ -53,11 +53,11 @@ func (x RowStatus) String() string {
} }
func (RowStatus) Descriptor() protoreflect.EnumDescriptor { 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 { 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 { func (x RowStatus) Number() protoreflect.EnumNumber {
...@@ -66,7 +66,7 @@ func (x RowStatus) Number() protoreflect.EnumNumber { ...@@ -66,7 +66,7 @@ func (x RowStatus) Number() protoreflect.EnumNumber {
// Deprecated: Use RowStatus.Descriptor instead. // Deprecated: Use RowStatus.Descriptor instead.
func (RowStatus) EnumDescriptor() ([]byte, []int) { 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. // Used internally for obfuscating the page token.
...@@ -82,7 +82,7 @@ type PageToken struct { ...@@ -82,7 +82,7 @@ type PageToken struct {
func (x *PageToken) Reset() { func (x *PageToken) Reset() {
*x = PageToken{} *x = PageToken{}
if protoimpl.UnsafeEnabled { 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 := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi) ms.StoreMessageInfo(mi)
} }
...@@ -95,7 +95,7 @@ func (x *PageToken) String() string { ...@@ -95,7 +95,7 @@ func (x *PageToken) String() string {
func (*PageToken) ProtoMessage() {} func (*PageToken) ProtoMessage() {}
func (x *PageToken) ProtoReflect() protoreflect.Message { 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 { if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil { if ms.LoadMessageInfo() == nil {
...@@ -108,7 +108,7 @@ func (x *PageToken) ProtoReflect() protoreflect.Message { ...@@ -108,7 +108,7 @@ func (x *PageToken) ProtoReflect() protoreflect.Message {
// Deprecated: Use PageToken.ProtoReflect.Descriptor instead. // Deprecated: Use PageToken.ProtoReflect.Descriptor instead.
func (*PageToken) Descriptor() ([]byte, []int) { 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 { func (x *PageToken) GetLimit() int32 {
...@@ -125,12 +125,12 @@ func (x *PageToken) GetOffset() int32 { ...@@ -125,12 +125,12 @@ func (x *PageToken) GetOffset() int32 {
return 0 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{ var file_api_v1_common_proto_rawDesc = []byte{
0x0a, 0x13, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x32, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 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, 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, 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, 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, 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{ ...@@ -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, 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, 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, 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, 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, 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, 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, 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, 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, 0x32, 0xe2, 0x02, 0x18, 0x4d, 0x65, 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, 0x32, 0x5c, 0x47, 0x50, 0x42, 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, 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 ( var (
file_api_v2_common_proto_rawDescOnce sync.Once file_api_v1_common_proto_rawDescOnce sync.Once
file_api_v2_common_proto_rawDescData = file_api_v2_common_proto_rawDesc file_api_v1_common_proto_rawDescData = file_api_v1_common_proto_rawDesc
) )
func file_api_v2_common_proto_rawDescGZIP() []byte { func file_api_v1_common_proto_rawDescGZIP() []byte {
file_api_v2_common_proto_rawDescOnce.Do(func() { file_api_v1_common_proto_rawDescOnce.Do(func() {
file_api_v2_common_proto_rawDescData = protoimpl.X.CompressGZIP(file_api_v2_common_proto_rawDescData) 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_v1_common_proto_enumTypes = make([]protoimpl.EnumInfo, 1)
var file_api_v2_common_proto_msgTypes = make([]protoimpl.MessageInfo, 1) var file_api_v1_common_proto_msgTypes = make([]protoimpl.MessageInfo, 1)
var file_api_v2_common_proto_goTypes = []interface{}{ var file_api_v1_common_proto_goTypes = []interface{}{
(RowStatus)(0), // 0: memos.api.v2.RowStatus (RowStatus)(0), // 0: memos.api.v1.RowStatus
(*PageToken)(nil), // 1: memos.api.v2.PageToken (*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 output_type
0, // [0:0] is the sub-list for method input_type 0, // [0:0] is the sub-list for method input_type
0, // [0:0] is the sub-list for extension type_name 0, // [0:0] is the sub-list for extension type_name
...@@ -177,13 +177,13 @@ var file_api_v2_common_proto_depIdxs = []int32{ ...@@ -177,13 +177,13 @@ var file_api_v2_common_proto_depIdxs = []int32{
0, // [0:0] is the sub-list for field type_name 0, // [0:0] is the sub-list for field type_name
} }
func init() { file_api_v2_common_proto_init() } func init() { file_api_v1_common_proto_init() }
func file_api_v2_common_proto_init() { func file_api_v1_common_proto_init() {
if File_api_v2_common_proto != nil { if File_api_v1_common_proto != nil {
return return
} }
if !protoimpl.UnsafeEnabled { 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 { switch v := v.(*PageToken); i {
case 0: case 0:
return &v.state return &v.state
...@@ -200,19 +200,19 @@ func file_api_v2_common_proto_init() { ...@@ -200,19 +200,19 @@ func file_api_v2_common_proto_init() {
out := protoimpl.TypeBuilder{ out := protoimpl.TypeBuilder{
File: protoimpl.DescBuilder{ File: protoimpl.DescBuilder{
GoPackagePath: reflect.TypeOf(x{}).PkgPath(), GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: file_api_v2_common_proto_rawDesc, RawDescriptor: file_api_v1_common_proto_rawDesc,
NumEnums: 1, NumEnums: 1,
NumMessages: 1, NumMessages: 1,
NumExtensions: 0, NumExtensions: 0,
NumServices: 0, NumServices: 0,
}, },
GoTypes: file_api_v2_common_proto_goTypes, GoTypes: file_api_v1_common_proto_goTypes,
DependencyIndexes: file_api_v2_common_proto_depIdxs, DependencyIndexes: file_api_v1_common_proto_depIdxs,
EnumInfos: file_api_v2_common_proto_enumTypes, EnumInfos: file_api_v1_common_proto_enumTypes,
MessageInfos: file_api_v2_common_proto_msgTypes, MessageInfos: file_api_v1_common_proto_msgTypes,
}.Build() }.Build()
File_api_v2_common_proto = out.File File_api_v1_common_proto = out.File
file_api_v2_common_proto_rawDesc = nil file_api_v1_common_proto_rawDesc = nil
file_api_v2_common_proto_goTypes = nil file_api_v1_common_proto_goTypes = nil
file_api_v2_common_proto_depIdxs = nil file_api_v1_common_proto_depIdxs = nil
} }
// Code generated by protoc-gen-grpc-gateway. DO NOT EDIT. // 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. It translates gRPC into RESTful JSON APIs.
*/ */
package apiv2 package apiv1
import ( import (
"context" "context"
...@@ -293,7 +293,7 @@ func RegisterIdentityProviderServiceHandlerServer(ctx context.Context, mux *runt ...@@ -293,7 +293,7 @@ func RegisterIdentityProviderServiceHandlerServer(ctx context.Context, mux *runt
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
var err error var err error
var annotatedContext context.Context 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 { if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return return
...@@ -318,7 +318,7 @@ func RegisterIdentityProviderServiceHandlerServer(ctx context.Context, mux *runt ...@@ -318,7 +318,7 @@ func RegisterIdentityProviderServiceHandlerServer(ctx context.Context, mux *runt
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
var err error var err error
var annotatedContext context.Context 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 { if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return return
...@@ -343,7 +343,7 @@ func RegisterIdentityProviderServiceHandlerServer(ctx context.Context, mux *runt ...@@ -343,7 +343,7 @@ func RegisterIdentityProviderServiceHandlerServer(ctx context.Context, mux *runt
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
var err error var err error
var annotatedContext context.Context 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 { if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return return
...@@ -368,7 +368,7 @@ func RegisterIdentityProviderServiceHandlerServer(ctx context.Context, mux *runt ...@@ -368,7 +368,7 @@ func RegisterIdentityProviderServiceHandlerServer(ctx context.Context, mux *runt
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
var err error var err error
var annotatedContext context.Context 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 { if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return return
...@@ -393,7 +393,7 @@ func RegisterIdentityProviderServiceHandlerServer(ctx context.Context, mux *runt ...@@ -393,7 +393,7 @@ func RegisterIdentityProviderServiceHandlerServer(ctx context.Context, mux *runt
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
var err error var err error
var annotatedContext context.Context 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 { if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return return
...@@ -457,7 +457,7 @@ func RegisterIdentityProviderServiceHandlerClient(ctx context.Context, mux *runt ...@@ -457,7 +457,7 @@ func RegisterIdentityProviderServiceHandlerClient(ctx context.Context, mux *runt
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
var err error var err error
var annotatedContext context.Context 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 { if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return return
...@@ -479,7 +479,7 @@ func RegisterIdentityProviderServiceHandlerClient(ctx context.Context, mux *runt ...@@ -479,7 +479,7 @@ func RegisterIdentityProviderServiceHandlerClient(ctx context.Context, mux *runt
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
var err error var err error
var annotatedContext context.Context 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 { if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return return
...@@ -501,7 +501,7 @@ func RegisterIdentityProviderServiceHandlerClient(ctx context.Context, mux *runt ...@@ -501,7 +501,7 @@ func RegisterIdentityProviderServiceHandlerClient(ctx context.Context, mux *runt
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
var err error var err error
var annotatedContext context.Context 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 { if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return return
...@@ -523,7 +523,7 @@ func RegisterIdentityProviderServiceHandlerClient(ctx context.Context, mux *runt ...@@ -523,7 +523,7 @@ func RegisterIdentityProviderServiceHandlerClient(ctx context.Context, mux *runt
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
var err error var err error
var annotatedContext context.Context 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 { if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return return
...@@ -545,7 +545,7 @@ func RegisterIdentityProviderServiceHandlerClient(ctx context.Context, mux *runt ...@@ -545,7 +545,7 @@ func RegisterIdentityProviderServiceHandlerClient(ctx context.Context, mux *runt
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
var err error var err error
var annotatedContext context.Context 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 { if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return return
...@@ -565,15 +565,15 @@ func RegisterIdentityProviderServiceHandlerClient(ctx context.Context, mux *runt ...@@ -565,15 +565,15 @@ func RegisterIdentityProviderServiceHandlerClient(ctx context.Context, mux *runt
} }
var ( 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 ( var (
......
...@@ -2,9 +2,9 @@ ...@@ -2,9 +2,9 @@
// versions: // versions:
// - protoc-gen-go-grpc v1.3.0 // - protoc-gen-go-grpc v1.3.0
// - protoc (unknown) // - protoc (unknown)
// source: api/v2/idp_service.proto // source: api/v1/idp_service.proto
package apiv2 package apiv1
import ( import (
context "context" context "context"
...@@ -20,11 +20,11 @@ import ( ...@@ -20,11 +20,11 @@ import (
const _ = grpc.SupportPackageIsVersion7 const _ = grpc.SupportPackageIsVersion7
const ( const (
IdentityProviderService_ListIdentityProviders_FullMethodName = "/memos.api.v2.IdentityProviderService/ListIdentityProviders" IdentityProviderService_ListIdentityProviders_FullMethodName = "/memos.api.v1.IdentityProviderService/ListIdentityProviders"
IdentityProviderService_GetIdentityProvider_FullMethodName = "/memos.api.v2.IdentityProviderService/GetIdentityProvider" IdentityProviderService_GetIdentityProvider_FullMethodName = "/memos.api.v1.IdentityProviderService/GetIdentityProvider"
IdentityProviderService_CreateIdentityProvider_FullMethodName = "/memos.api.v2.IdentityProviderService/CreateIdentityProvider" IdentityProviderService_CreateIdentityProvider_FullMethodName = "/memos.api.v1.IdentityProviderService/CreateIdentityProvider"
IdentityProviderService_UpdateIdentityProvider_FullMethodName = "/memos.api.v2.IdentityProviderService/UpdateIdentityProvider" IdentityProviderService_UpdateIdentityProvider_FullMethodName = "/memos.api.v1.IdentityProviderService/UpdateIdentityProvider"
IdentityProviderService_DeleteIdentityProvider_FullMethodName = "/memos.api.v2.IdentityProviderService/DeleteIdentityProvider" IdentityProviderService_DeleteIdentityProvider_FullMethodName = "/memos.api.v1.IdentityProviderService/DeleteIdentityProvider"
) )
// IdentityProviderServiceClient is the client API for IdentityProviderService service. // IdentityProviderServiceClient is the client API for IdentityProviderService service.
...@@ -240,7 +240,7 @@ func _IdentityProviderService_DeleteIdentityProvider_Handler(srv interface{}, ct ...@@ -240,7 +240,7 @@ func _IdentityProviderService_DeleteIdentityProvider_Handler(srv interface{}, ct
// It's only intended for direct use with grpc.RegisterService, // It's only intended for direct use with grpc.RegisterService,
// and not to be introspected or modified (even as a copy) // and not to be introspected or modified (even as a copy)
var IdentityProviderService_ServiceDesc = grpc.ServiceDesc{ var IdentityProviderService_ServiceDesc = grpc.ServiceDesc{
ServiceName: "memos.api.v2.IdentityProviderService", ServiceName: "memos.api.v1.IdentityProviderService",
HandlerType: (*IdentityProviderServiceServer)(nil), HandlerType: (*IdentityProviderServiceServer)(nil),
Methods: []grpc.MethodDesc{ Methods: []grpc.MethodDesc{
{ {
...@@ -265,5 +265,5 @@ var IdentityProviderService_ServiceDesc = grpc.ServiceDesc{ ...@@ -265,5 +265,5 @@ var IdentityProviderService_ServiceDesc = grpc.ServiceDesc{
}, },
}, },
Streams: []grpc.StreamDesc{}, Streams: []grpc.StreamDesc{},
Metadata: "api/v2/idp_service.proto", Metadata: "api/v1/idp_service.proto",
} }
// Code generated by protoc-gen-grpc-gateway. DO NOT EDIT. // 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. It translates gRPC into RESTful JSON APIs.
*/ */
package apiv2 package apiv1
import ( import (
"context" "context"
...@@ -233,7 +233,7 @@ func RegisterInboxServiceHandlerServer(ctx context.Context, mux *runtime.ServeMu ...@@ -233,7 +233,7 @@ func RegisterInboxServiceHandlerServer(ctx context.Context, mux *runtime.ServeMu
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
var err error var err error
var annotatedContext context.Context 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 { if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return return
...@@ -258,7 +258,7 @@ func RegisterInboxServiceHandlerServer(ctx context.Context, mux *runtime.ServeMu ...@@ -258,7 +258,7 @@ func RegisterInboxServiceHandlerServer(ctx context.Context, mux *runtime.ServeMu
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
var err error var err error
var annotatedContext context.Context 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 { if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return return
...@@ -283,7 +283,7 @@ func RegisterInboxServiceHandlerServer(ctx context.Context, mux *runtime.ServeMu ...@@ -283,7 +283,7 @@ func RegisterInboxServiceHandlerServer(ctx context.Context, mux *runtime.ServeMu
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
var err error var err error
var annotatedContext context.Context 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 { if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return return
...@@ -347,7 +347,7 @@ func RegisterInboxServiceHandlerClient(ctx context.Context, mux *runtime.ServeMu ...@@ -347,7 +347,7 @@ func RegisterInboxServiceHandlerClient(ctx context.Context, mux *runtime.ServeMu
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
var err error var err error
var annotatedContext context.Context 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 { if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return return
...@@ -369,7 +369,7 @@ func RegisterInboxServiceHandlerClient(ctx context.Context, mux *runtime.ServeMu ...@@ -369,7 +369,7 @@ func RegisterInboxServiceHandlerClient(ctx context.Context, mux *runtime.ServeMu
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
var err error var err error
var annotatedContext context.Context 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 { if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return return
...@@ -391,7 +391,7 @@ func RegisterInboxServiceHandlerClient(ctx context.Context, mux *runtime.ServeMu ...@@ -391,7 +391,7 @@ func RegisterInboxServiceHandlerClient(ctx context.Context, mux *runtime.ServeMu
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
var err error var err error
var annotatedContext context.Context 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 { if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return return
...@@ -411,11 +411,11 @@ func RegisterInboxServiceHandlerClient(ctx context.Context, mux *runtime.ServeMu ...@@ -411,11 +411,11 @@ func RegisterInboxServiceHandlerClient(ctx context.Context, mux *runtime.ServeMu
} }
var ( 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 ( var (
......
...@@ -2,9 +2,9 @@ ...@@ -2,9 +2,9 @@
// versions: // versions:
// - protoc-gen-go-grpc v1.3.0 // - protoc-gen-go-grpc v1.3.0
// - protoc (unknown) // - protoc (unknown)
// source: api/v2/inbox_service.proto // source: api/v1/inbox_service.proto
package apiv2 package apiv1
import ( import (
context "context" context "context"
...@@ -20,9 +20,9 @@ import ( ...@@ -20,9 +20,9 @@ import (
const _ = grpc.SupportPackageIsVersion7 const _ = grpc.SupportPackageIsVersion7
const ( const (
InboxService_ListInboxes_FullMethodName = "/memos.api.v2.InboxService/ListInboxes" InboxService_ListInboxes_FullMethodName = "/memos.api.v1.InboxService/ListInboxes"
InboxService_UpdateInbox_FullMethodName = "/memos.api.v2.InboxService/UpdateInbox" InboxService_UpdateInbox_FullMethodName = "/memos.api.v1.InboxService/UpdateInbox"
InboxService_DeleteInbox_FullMethodName = "/memos.api.v2.InboxService/DeleteInbox" InboxService_DeleteInbox_FullMethodName = "/memos.api.v1.InboxService/DeleteInbox"
) )
// InboxServiceClient is the client API for InboxService service. // InboxServiceClient is the client API for InboxService service.
...@@ -169,7 +169,7 @@ func _InboxService_DeleteInbox_Handler(srv interface{}, ctx context.Context, dec ...@@ -169,7 +169,7 @@ func _InboxService_DeleteInbox_Handler(srv interface{}, ctx context.Context, dec
// It's only intended for direct use with grpc.RegisterService, // It's only intended for direct use with grpc.RegisterService,
// and not to be introspected or modified (even as a copy) // and not to be introspected or modified (even as a copy)
var InboxService_ServiceDesc = grpc.ServiceDesc{ var InboxService_ServiceDesc = grpc.ServiceDesc{
ServiceName: "memos.api.v2.InboxService", ServiceName: "memos.api.v1.InboxService",
HandlerType: (*InboxServiceServer)(nil), HandlerType: (*InboxServiceServer)(nil),
Methods: []grpc.MethodDesc{ Methods: []grpc.MethodDesc{
{ {
...@@ -186,5 +186,5 @@ var InboxService_ServiceDesc = grpc.ServiceDesc{ ...@@ -186,5 +186,5 @@ var InboxService_ServiceDesc = grpc.ServiceDesc{
}, },
}, },
Streams: []grpc.StreamDesc{}, Streams: []grpc.StreamDesc{},
Metadata: "api/v2/inbox_service.proto", Metadata: "api/v1/inbox_service.proto",
} }
// Code generated by protoc-gen-grpc-gateway. DO NOT EDIT. // 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. It translates gRPC into RESTful JSON APIs.
*/ */
package apiv2 package apiv1
import ( import (
"context" "context"
...@@ -81,7 +81,7 @@ func RegisterLinkServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux ...@@ -81,7 +81,7 @@ func RegisterLinkServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
var err error var err error
var annotatedContext context.Context 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 { if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return return
...@@ -145,7 +145,7 @@ func RegisterLinkServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux ...@@ -145,7 +145,7 @@ func RegisterLinkServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
var err error var err error
var annotatedContext context.Context 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 { if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return return
...@@ -165,7 +165,7 @@ func RegisterLinkServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux ...@@ -165,7 +165,7 @@ func RegisterLinkServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux
} }
var ( 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 ( var (
......
...@@ -2,9 +2,9 @@ ...@@ -2,9 +2,9 @@
// versions: // versions:
// - protoc-gen-go-grpc v1.3.0 // - protoc-gen-go-grpc v1.3.0
// - protoc (unknown) // - protoc (unknown)
// source: api/v2/link_service.proto // source: api/v1/link_service.proto
package apiv2 package apiv1
import ( import (
context "context" context "context"
...@@ -19,7 +19,7 @@ import ( ...@@ -19,7 +19,7 @@ import (
const _ = grpc.SupportPackageIsVersion7 const _ = grpc.SupportPackageIsVersion7
const ( 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. // LinkServiceClient is the client API for LinkService service.
...@@ -98,7 +98,7 @@ func _LinkService_GetLinkMetadata_Handler(srv interface{}, ctx context.Context, ...@@ -98,7 +98,7 @@ func _LinkService_GetLinkMetadata_Handler(srv interface{}, ctx context.Context,
// It's only intended for direct use with grpc.RegisterService, // It's only intended for direct use with grpc.RegisterService,
// and not to be introspected or modified (even as a copy) // and not to be introspected or modified (even as a copy)
var LinkService_ServiceDesc = grpc.ServiceDesc{ var LinkService_ServiceDesc = grpc.ServiceDesc{
ServiceName: "memos.api.v2.LinkService", ServiceName: "memos.api.v1.LinkService",
HandlerType: (*LinkServiceServer)(nil), HandlerType: (*LinkServiceServer)(nil),
Methods: []grpc.MethodDesc{ Methods: []grpc.MethodDesc{
{ {
...@@ -107,5 +107,5 @@ var LinkService_ServiceDesc = grpc.ServiceDesc{ ...@@ -107,5 +107,5 @@ var LinkService_ServiceDesc = grpc.ServiceDesc{
}, },
}, },
Streams: []grpc.StreamDesc{}, Streams: []grpc.StreamDesc{},
Metadata: "api/v2/link_service.proto", Metadata: "api/v1/link_service.proto",
} }
The legacy API is deprecated and has be removed. Please use the v2 API instead.
package v2 package v1
import ( import (
"context" "context"
......
...@@ -46,7 +46,7 @@ func (s *FrontendService) Serve(ctx context.Context, e *echo.Echo) { ...@@ -46,7 +46,7 @@ func (s *FrontendService) Serve(ctx context.Context, e *echo.Echo) {
HTML5: true, HTML5: true,
Filesystem: getFileSystem("dist"), Filesystem: getFileSystem("dist"),
Skipper: func(c echo.Context) bool { 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")
}, },
})) }))
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
import { Resource } from "@/types/proto/api/v2/resource_service"; import { Resource } from "@/types/proto/api/v1/resource_service";
import Icon from "../Icon"; import Icon from "../Icon";
import ResourceIcon from "../ResourceIcon"; import ResourceIcon from "../ResourceIcon";
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment