refactor: tweak api definition

This commit is contained in:
Steven 2024-04-27 23:14:58 +08:00
parent 9b66ef5e26
commit 92872118b9
20 changed files with 1238 additions and 2522 deletions

View file

@ -562,7 +562,8 @@ paths:
"200":
description: A successful response.
schema:
$ref: '#/definitions/v2DeleteTagResponse'
type: object
properties: {}
default:
description: An unexpected error response.
schema:
@ -588,7 +589,7 @@ paths:
"200":
description: A successful response.
schema:
$ref: '#/definitions/v2UpsertTagResponse'
$ref: '#/definitions/v2Tag'
default:
description: An unexpected error response.
schema:
@ -632,7 +633,8 @@ paths:
"200":
description: A successful response.
schema:
$ref: '#/definitions/v2BatchUpsertTagResponse'
type: object
properties: {}
default:
description: An unexpected error response.
schema:
@ -655,7 +657,8 @@ paths:
"200":
description: A successful response.
schema:
$ref: '#/definitions/v2RenameTagResponse'
type: object
properties: {}
default:
description: An unexpected error response.
schema:
@ -690,7 +693,7 @@ paths:
"200":
description: A successful response.
schema:
$ref: '#/definitions/v2CreateUserResponse'
$ref: '#/definitions/v2User'
default:
description: An unexpected error response.
schema:
@ -754,7 +757,7 @@ paths:
"200":
description: A successful response.
schema:
$ref: '#/definitions/v2CreateWebhookResponse'
$ref: '#/definitions/v2Webhook'
default:
description: An unexpected error response.
schema:
@ -775,7 +778,7 @@ paths:
"200":
description: A successful response.
schema:
$ref: '#/definitions/v2GetWebhookResponse'
$ref: '#/definitions/v2Webhook'
default:
description: An unexpected error response.
schema:
@ -795,7 +798,8 @@ paths:
"200":
description: A successful response.
schema:
$ref: '#/definitions/v2DeleteWebhookResponse'
type: object
properties: {}
default:
description: An unexpected error response.
schema:
@ -816,7 +820,7 @@ paths:
"200":
description: A successful response.
schema:
$ref: '#/definitions/v2UpdateWebhookResponse'
$ref: '#/definitions/v2Webhook'
default:
description: An unexpected error response.
schema:
@ -888,7 +892,7 @@ paths:
"200":
description: A successful response.
schema:
$ref: '#/definitions/v2GetWorkspaceSettingResponse'
$ref: '#/definitions/apiv2WorkspaceSetting'
default:
description: An unexpected error response.
schema:
@ -912,7 +916,7 @@ paths:
"200":
description: A successful response.
schema:
$ref: '#/definitions/v2SetWorkspaceSettingResponse'
$ref: '#/definitions/apiv2WorkspaceSetting'
default:
description: An unexpected error response.
schema:
@ -1285,7 +1289,7 @@ paths:
"200":
description: A successful response.
schema:
$ref: '#/definitions/v2GetUserResponse'
$ref: '#/definitions/v2User'
default:
description: An unexpected error response.
schema:
@ -1308,7 +1312,8 @@ paths:
"200":
description: A successful response.
schema:
$ref: '#/definitions/v2DeleteUserResponse'
type: object
properties: {}
default:
description: An unexpected error response.
schema:
@ -1355,7 +1360,7 @@ paths:
"200":
description: A successful response.
schema:
$ref: '#/definitions/v2CreateUserAccessTokenResponse'
$ref: '#/definitions/v2UserAccessToken'
default:
description: An unexpected error response.
schema:
@ -1384,7 +1389,8 @@ paths:
"200":
description: A successful response.
schema:
$ref: '#/definitions/v2DeleteUserAccessTokenResponse'
type: object
properties: {}
default:
description: An unexpected error response.
schema:
@ -1623,7 +1629,7 @@ paths:
"200":
description: A successful response.
schema:
$ref: '#/definitions/v2GetUserSettingResponse'
$ref: '#/definitions/apiv2UserSetting'
default:
description: An unexpected error response.
schema:
@ -1702,7 +1708,7 @@ paths:
"200":
description: A successful response.
schema:
$ref: '#/definitions/v2UpdateUserSettingResponse'
$ref: '#/definitions/apiv2UserSetting'
default:
description: An unexpected error response.
schema:
@ -1741,7 +1747,7 @@ paths:
"200":
description: A successful response.
schema:
$ref: '#/definitions/v2UpdateUserResponse'
$ref: '#/definitions/v2User'
default:
description: An unexpected error response.
schema:
@ -2130,8 +2136,6 @@ definitions:
items:
type: object
$ref: '#/definitions/v2UpsertTagRequest'
v2BatchUpsertTagResponse:
type: object
v2CreateMemoRequest:
type: object
properties:
@ -2149,16 +2153,6 @@ definitions:
properties:
storage:
$ref: '#/definitions/apiv2Storage'
v2CreateUserAccessTokenResponse:
type: object
properties:
accessToken:
$ref: '#/definitions/v2UserAccessToken'
v2CreateUserResponse:
type: object
properties:
user:
$ref: '#/definitions/v2User'
v2CreateWebhookRequest:
type: object
properties:
@ -2166,21 +2160,8 @@ definitions:
type: string
url:
type: string
v2CreateWebhookResponse:
type: object
properties:
webhook:
$ref: '#/definitions/v2Webhook'
v2DeleteStorageResponse:
type: object
v2DeleteTagResponse:
type: object
v2DeleteUserAccessTokenResponse:
type: object
v2DeleteUserResponse:
type: object
v2DeleteWebhookResponse:
type: object
v2ExportMemosRequest:
type: object
properties:
@ -2221,26 +2202,6 @@ definitions:
description: |-
stats is the stats of memo creating/updating activities.
key is the year-month-day string. e.g. "2020-01-01".
v2GetUserResponse:
type: object
properties:
user:
$ref: '#/definitions/v2User'
v2GetUserSettingResponse:
type: object
properties:
setting:
$ref: '#/definitions/apiv2UserSetting'
v2GetWebhookResponse:
type: object
properties:
webhook:
$ref: '#/definitions/v2Webhook'
v2GetWorkspaceSettingResponse:
type: object
properties:
setting:
$ref: '#/definitions/apiv2WorkspaceSetting'
v2Inbox:
type: object
properties:
@ -2527,11 +2488,6 @@ definitions:
type: string
newName:
type: string
v2RenameTagResponse:
type: object
properties:
tag:
$ref: '#/definitions/v2Tag'
v2Resource:
type: object
properties:
@ -2596,11 +2552,6 @@ definitions:
items:
type: object
$ref: '#/definitions/v2User'
v2SetWorkspaceSettingResponse:
type: object
properties:
setting:
$ref: '#/definitions/apiv2WorkspaceSetting'
v2Tag:
type: object
properties:
@ -2616,31 +2567,11 @@ definitions:
properties:
storage:
$ref: '#/definitions/apiv2Storage'
v2UpdateUserResponse:
type: object
properties:
user:
$ref: '#/definitions/v2User'
v2UpdateUserSettingResponse:
type: object
properties:
setting:
$ref: '#/definitions/apiv2UserSetting'
v2UpdateWebhookResponse:
type: object
properties:
webhook:
$ref: '#/definitions/v2Webhook'
v2UpsertTagRequest:
type: object
properties:
name:
type: string
v2UpsertTagResponse:
type: object
properties:
tag:
$ref: '#/definitions/v2Tag'
v2User:
type: object
properties:

View file

@ -3,19 +3,20 @@ syntax = "proto3";
package memos.api.v2;
import "google/api/annotations.proto";
import "google/protobuf/empty.proto";
option go_package = "gen/api/v2";
service TagService {
// UpsertTag upserts a tag.
rpc UpsertTag(UpsertTagRequest) returns (UpsertTagResponse) {
rpc UpsertTag(UpsertTagRequest) returns (Tag) {
option (google.api.http) = {
post: "/api/v2/tags",
body: "*"
};
}
// BatchUpsertTag upserts multiple tags.
rpc BatchUpsertTag(BatchUpsertTagRequest) returns (BatchUpsertTagResponse) {
rpc BatchUpsertTag(BatchUpsertTagRequest) returns (google.protobuf.Empty) {
option (google.api.http) = {
post: "/api/v2/tags:batchUpsert",
body: "*"
@ -27,14 +28,14 @@ service TagService {
}
// RenameTag renames a tag.
// All related memos will be updated.
rpc RenameTag(RenameTagRequest) returns (RenameTagResponse) {
rpc RenameTag(RenameTagRequest) returns (google.protobuf.Empty) {
option (google.api.http) = {
patch: "/api/v2/tags:rename",
body: "*"
};
}
// DeleteTag deletes a tag.
rpc DeleteTag(DeleteTagRequest) returns (DeleteTagResponse) {
rpc DeleteTag(DeleteTagRequest) returns (google.protobuf.Empty) {
option (google.api.http) = {delete: "/api/v2/tags"};
}
// GetTagSuggestions gets tag suggestions from the user's memos.
@ -54,16 +55,10 @@ message UpsertTagRequest {
string name = 1;
}
message UpsertTagResponse {
Tag tag = 1;
}
message BatchUpsertTagRequest {
repeated UpsertTagRequest requests = 1;
}
message BatchUpsertTagResponse {}
message ListTagsRequest {}
message ListTagsResponse {
@ -78,16 +73,10 @@ message RenameTagRequest {
string new_name = 3;
}
message RenameTagResponse {
Tag tag = 1;
}
message DeleteTagRequest {
Tag tag = 1;
}
message DeleteTagResponse {}
message GetTagSuggestionsRequest {
// The creator of tags.
// Format: users/{id}

View file

@ -6,6 +6,7 @@ import "api/v2/common.proto";
import "google/api/annotations.proto";
import "google/api/client.proto";
import "google/api/field_behavior.proto";
import "google/protobuf/empty.proto";
import "google/protobuf/field_mask.proto";
import "google/protobuf/timestamp.proto";
@ -21,12 +22,12 @@ service UserService {
option (google.api.http) = {get: "/api/v2/users:search"};
}
// GetUser gets a user by name.
rpc GetUser(GetUserRequest) returns (GetUserResponse) {
rpc GetUser(GetUserRequest) returns (User) {
option (google.api.http) = {get: "/api/v2/{name=users/*}"};
option (google.api.method_signature) = "name";
}
// CreateUser creates a new user.
rpc CreateUser(CreateUserRequest) returns (CreateUserResponse) {
rpc CreateUser(CreateUserRequest) returns (User) {
option (google.api.http) = {
post: "/api/v2/users"
body: "user"
@ -34,7 +35,7 @@ service UserService {
option (google.api.method_signature) = "user";
}
// UpdateUser updates a user.
rpc UpdateUser(UpdateUserRequest) returns (UpdateUserResponse) {
rpc UpdateUser(UpdateUserRequest) returns (User) {
option (google.api.http) = {
patch: "/api/v2/{user.name=users/*}"
body: "user"
@ -42,17 +43,17 @@ service UserService {
option (google.api.method_signature) = "user,update_mask";
}
// DeleteUser deletes a user.
rpc DeleteUser(DeleteUserRequest) returns (DeleteUserResponse) {
rpc DeleteUser(DeleteUserRequest) returns (google.protobuf.Empty) {
option (google.api.http) = {delete: "/api/v2/{name=users/*}"};
option (google.api.method_signature) = "name";
}
// GetUserSetting gets the setting of a user.
rpc GetUserSetting(GetUserSettingRequest) returns (GetUserSettingResponse) {
rpc GetUserSetting(GetUserSettingRequest) returns (UserSetting) {
option (google.api.http) = {get: "/api/v2/{name=users/*}/setting"};
option (google.api.method_signature) = "name";
}
// UpdateUserSetting updates the setting of a user.
rpc UpdateUserSetting(UpdateUserSettingRequest) returns (UpdateUserSettingResponse) {
rpc UpdateUserSetting(UpdateUserSettingRequest) returns (UserSetting) {
option (google.api.http) = {
patch: "/api/v2/{setting.name=users/*/setting}"
body: "setting"
@ -65,7 +66,7 @@ service UserService {
option (google.api.method_signature) = "name";
}
// CreateUserAccessToken creates a new access token for a user.
rpc CreateUserAccessToken(CreateUserAccessTokenRequest) returns (CreateUserAccessTokenResponse) {
rpc CreateUserAccessToken(CreateUserAccessTokenRequest) returns (UserAccessToken) {
option (google.api.http) = {
post: "/api/v2/{name=users/*}/access_tokens"
body: "*"
@ -73,7 +74,7 @@ service UserService {
option (google.api.method_signature) = "name";
}
// DeleteUserAccessToken deletes an access token for a user.
rpc DeleteUserAccessToken(DeleteUserAccessTokenRequest) returns (DeleteUserAccessTokenResponse) {
rpc DeleteUserAccessToken(DeleteUserAccessTokenRequest) returns (google.protobuf.Empty) {
option (google.api.http) = {delete: "/api/v2/{name=users/*}/access_tokens/{access_token}"};
option (google.api.method_signature) = "name,access_token";
}
@ -136,36 +137,22 @@ message GetUserRequest {
string name = 1;
}
message GetUserResponse {
User user = 1;
}
message CreateUserRequest {
User user = 1;
}
message CreateUserResponse {
User user = 1;
}
message UpdateUserRequest {
User user = 1 [(google.api.field_behavior) = REQUIRED];
google.protobuf.FieldMask update_mask = 2;
}
message UpdateUserResponse {
User user = 1;
}
message DeleteUserRequest {
// The name of the user.
// Format: users/{id}
string name = 1;
}
message DeleteUserResponse {}
message UserSetting {
// The name of the user.
// Format: users/{id}
@ -184,20 +171,12 @@ message GetUserSettingRequest {
string name = 1;
}
message GetUserSettingResponse {
UserSetting setting = 1;
}
message UpdateUserSettingRequest {
UserSetting setting = 1 [(google.api.field_behavior) = REQUIRED];
google.protobuf.FieldMask update_mask = 2;
}
message UpdateUserSettingResponse {
UserSetting setting = 1;
}
message UserAccessToken {
string access_token = 1;
string description = 2;
@ -225,10 +204,6 @@ message CreateUserAccessTokenRequest {
optional google.protobuf.Timestamp expires_at = 3;
}
message CreateUserAccessTokenResponse {
UserAccessToken access_token = 1;
}
message DeleteUserAccessTokenRequest {
// The name of the user.
// Format: users/{id}
@ -236,5 +211,3 @@ message DeleteUserAccessTokenRequest {
// access_token is the access token to delete.
string access_token = 2;
}
message DeleteUserAccessTokenResponse {}

View file

@ -5,6 +5,7 @@ package memos.api.v2;
import "api/v2/common.proto";
import "google/api/annotations.proto";
import "google/api/client.proto";
import "google/protobuf/empty.proto";
import "google/protobuf/field_mask.proto";
import "google/protobuf/timestamp.proto";
@ -12,14 +13,14 @@ option go_package = "gen/api/v2";
service WebhookService {
// CreateWebhook creates a new webhook.
rpc CreateWebhook(CreateWebhookRequest) returns (CreateWebhookResponse) {
rpc CreateWebhook(CreateWebhookRequest) returns (Webhook) {
option (google.api.http) = {
post: "/api/v2/webhooks"
body: "*"
};
}
// GetWebhook returns a webhook by id.
rpc GetWebhook(GetWebhookRequest) returns (GetWebhookResponse) {
rpc GetWebhook(GetWebhookRequest) returns (Webhook) {
option (google.api.http) = {get: "/api/v2/webhooks/{id}"};
option (google.api.method_signature) = "id";
}
@ -28,7 +29,7 @@ service WebhookService {
option (google.api.http) = {get: "/api/v2/webhooks"};
}
// UpdateWebhook updates a webhook.
rpc UpdateWebhook(UpdateWebhookRequest) returns (UpdateWebhookResponse) {
rpc UpdateWebhook(UpdateWebhookRequest) returns (Webhook) {
option (google.api.http) = {
patch: "/api/v2/webhooks/{webhook.id}"
body: "webhook"
@ -36,7 +37,7 @@ service WebhookService {
option (google.api.method_signature) = "webhook,update_mask";
}
// DeleteWebhook deletes a webhook by id.
rpc DeleteWebhook(DeleteWebhookRequest) returns (DeleteWebhookResponse) {
rpc DeleteWebhook(DeleteWebhookRequest) returns (google.protobuf.Empty) {
option (google.api.http) = {delete: "/api/v2/webhooks/{id}"};
option (google.api.method_signature) = "id";
}
@ -64,18 +65,10 @@ message CreateWebhookRequest {
string url = 2;
}
message CreateWebhookResponse {
Webhook webhook = 1;
}
message GetWebhookRequest {
int32 id = 1;
}
message GetWebhookResponse {
Webhook webhook = 1;
}
message ListWebhooksRequest {
int32 creator_id = 1;
}
@ -90,12 +83,6 @@ message UpdateWebhookRequest {
google.protobuf.FieldMask update_mask = 2;
}
message UpdateWebhookResponse {
Webhook webhook = 1;
}
message DeleteWebhookRequest {
int32 id = 1;
}
message DeleteWebhookResponse {}

View file

@ -14,12 +14,12 @@ service WorkspaceSettingService {
option (google.api.http) = {get: "/api/v2/workspace/settings"};
}
// GetWorkspaceSetting returns the setting by name.
rpc GetWorkspaceSetting(GetWorkspaceSettingRequest) returns (GetWorkspaceSettingResponse) {
rpc GetWorkspaceSetting(GetWorkspaceSettingRequest) returns (WorkspaceSetting) {
option (google.api.http) = {get: "/api/v2/workspace/{name=settings/*}"};
option (google.api.method_signature) = "name";
}
// SetWorkspaceSetting updates the setting.
rpc SetWorkspaceSetting(SetWorkspaceSettingRequest) returns (SetWorkspaceSettingResponse) {
rpc SetWorkspaceSetting(SetWorkspaceSettingRequest) returns (WorkspaceSetting) {
option (google.api.http) = {
patch: "/api/v2/workspace/{setting.name=settings/*}",
body: "setting"
@ -28,31 +28,6 @@ service WorkspaceSettingService {
}
}
message ListWorkspaceSettingsRequest {}
message ListWorkspaceSettingsResponse {
repeated WorkspaceSetting settings = 1;
}
message GetWorkspaceSettingRequest {
// The resource name of the workspace setting.
// Format: settings/{setting}
string name = 1 [(google.api.field_behavior) = REQUIRED];
}
message GetWorkspaceSettingResponse {
WorkspaceSetting setting = 1;
}
message SetWorkspaceSettingRequest {
// setting is the setting to update.
WorkspaceSetting setting = 1;
}
message SetWorkspaceSettingResponse {
WorkspaceSetting setting = 1;
}
message WorkspaceSetting {
// name is the name of the setting.
// Format: settings/{setting}
@ -115,3 +90,20 @@ message WorkspaceMemoRelatedSetting {
// display_with_update_time orders and displays memo with update time.
bool display_with_update_time = 2;
}
message ListWorkspaceSettingsRequest {}
message ListWorkspaceSettingsResponse {
repeated WorkspaceSetting settings = 1;
}
message GetWorkspaceSettingRequest {
// The resource name of the workspace setting.
// Format: settings/{setting}
string name = 1 [(google.api.field_behavior) = REQUIRED];
}
message SetWorkspaceSettingRequest {
// setting is the setting to update.
WorkspaceSetting setting = 1;
}

View file

@ -10,6 +10,7 @@ import (
_ "google.golang.org/genproto/googleapis/api/annotations"
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
emptypb "google.golang.org/protobuf/types/known/emptypb"
reflect "reflect"
sync "sync"
)
@ -125,53 +126,6 @@ func (x *UpsertTagRequest) GetName() string {
return ""
}
type UpsertTagResponse struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Tag *Tag `protobuf:"bytes,1,opt,name=tag,proto3" json:"tag,omitempty"`
}
func (x *UpsertTagResponse) Reset() {
*x = UpsertTagResponse{}
if protoimpl.UnsafeEnabled {
mi := &file_api_v2_tag_service_proto_msgTypes[2]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *UpsertTagResponse) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*UpsertTagResponse) ProtoMessage() {}
func (x *UpsertTagResponse) ProtoReflect() protoreflect.Message {
mi := &file_api_v2_tag_service_proto_msgTypes[2]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use UpsertTagResponse.ProtoReflect.Descriptor instead.
func (*UpsertTagResponse) Descriptor() ([]byte, []int) {
return file_api_v2_tag_service_proto_rawDescGZIP(), []int{2}
}
func (x *UpsertTagResponse) GetTag() *Tag {
if x != nil {
return x.Tag
}
return nil
}
type BatchUpsertTagRequest struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
@ -183,7 +137,7 @@ type BatchUpsertTagRequest struct {
func (x *BatchUpsertTagRequest) Reset() {
*x = BatchUpsertTagRequest{}
if protoimpl.UnsafeEnabled {
mi := &file_api_v2_tag_service_proto_msgTypes[3]
mi := &file_api_v2_tag_service_proto_msgTypes[2]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@ -196,7 +150,7 @@ func (x *BatchUpsertTagRequest) String() string {
func (*BatchUpsertTagRequest) ProtoMessage() {}
func (x *BatchUpsertTagRequest) ProtoReflect() protoreflect.Message {
mi := &file_api_v2_tag_service_proto_msgTypes[3]
mi := &file_api_v2_tag_service_proto_msgTypes[2]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@ -209,7 +163,7 @@ func (x *BatchUpsertTagRequest) ProtoReflect() protoreflect.Message {
// Deprecated: Use BatchUpsertTagRequest.ProtoReflect.Descriptor instead.
func (*BatchUpsertTagRequest) Descriptor() ([]byte, []int) {
return file_api_v2_tag_service_proto_rawDescGZIP(), []int{3}
return file_api_v2_tag_service_proto_rawDescGZIP(), []int{2}
}
func (x *BatchUpsertTagRequest) GetRequests() []*UpsertTagRequest {
@ -219,44 +173,6 @@ func (x *BatchUpsertTagRequest) GetRequests() []*UpsertTagRequest {
return nil
}
type BatchUpsertTagResponse struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
}
func (x *BatchUpsertTagResponse) Reset() {
*x = BatchUpsertTagResponse{}
if protoimpl.UnsafeEnabled {
mi := &file_api_v2_tag_service_proto_msgTypes[4]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *BatchUpsertTagResponse) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*BatchUpsertTagResponse) ProtoMessage() {}
func (x *BatchUpsertTagResponse) ProtoReflect() protoreflect.Message {
mi := &file_api_v2_tag_service_proto_msgTypes[4]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use BatchUpsertTagResponse.ProtoReflect.Descriptor instead.
func (*BatchUpsertTagResponse) Descriptor() ([]byte, []int) {
return file_api_v2_tag_service_proto_rawDescGZIP(), []int{4}
}
type ListTagsRequest struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
@ -266,7 +182,7 @@ type ListTagsRequest struct {
func (x *ListTagsRequest) Reset() {
*x = ListTagsRequest{}
if protoimpl.UnsafeEnabled {
mi := &file_api_v2_tag_service_proto_msgTypes[5]
mi := &file_api_v2_tag_service_proto_msgTypes[3]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@ -279,7 +195,7 @@ func (x *ListTagsRequest) String() string {
func (*ListTagsRequest) ProtoMessage() {}
func (x *ListTagsRequest) ProtoReflect() protoreflect.Message {
mi := &file_api_v2_tag_service_proto_msgTypes[5]
mi := &file_api_v2_tag_service_proto_msgTypes[3]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@ -292,7 +208,7 @@ func (x *ListTagsRequest) ProtoReflect() protoreflect.Message {
// Deprecated: Use ListTagsRequest.ProtoReflect.Descriptor instead.
func (*ListTagsRequest) Descriptor() ([]byte, []int) {
return file_api_v2_tag_service_proto_rawDescGZIP(), []int{5}
return file_api_v2_tag_service_proto_rawDescGZIP(), []int{3}
}
type ListTagsResponse struct {
@ -306,7 +222,7 @@ type ListTagsResponse struct {
func (x *ListTagsResponse) Reset() {
*x = ListTagsResponse{}
if protoimpl.UnsafeEnabled {
mi := &file_api_v2_tag_service_proto_msgTypes[6]
mi := &file_api_v2_tag_service_proto_msgTypes[4]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@ -319,7 +235,7 @@ func (x *ListTagsResponse) String() string {
func (*ListTagsResponse) ProtoMessage() {}
func (x *ListTagsResponse) ProtoReflect() protoreflect.Message {
mi := &file_api_v2_tag_service_proto_msgTypes[6]
mi := &file_api_v2_tag_service_proto_msgTypes[4]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@ -332,7 +248,7 @@ func (x *ListTagsResponse) ProtoReflect() protoreflect.Message {
// Deprecated: Use ListTagsResponse.ProtoReflect.Descriptor instead.
func (*ListTagsResponse) Descriptor() ([]byte, []int) {
return file_api_v2_tag_service_proto_rawDescGZIP(), []int{6}
return file_api_v2_tag_service_proto_rawDescGZIP(), []int{4}
}
func (x *ListTagsResponse) GetTags() []*Tag {
@ -357,7 +273,7 @@ type RenameTagRequest struct {
func (x *RenameTagRequest) Reset() {
*x = RenameTagRequest{}
if protoimpl.UnsafeEnabled {
mi := &file_api_v2_tag_service_proto_msgTypes[7]
mi := &file_api_v2_tag_service_proto_msgTypes[5]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@ -370,7 +286,7 @@ func (x *RenameTagRequest) String() string {
func (*RenameTagRequest) ProtoMessage() {}
func (x *RenameTagRequest) ProtoReflect() protoreflect.Message {
mi := &file_api_v2_tag_service_proto_msgTypes[7]
mi := &file_api_v2_tag_service_proto_msgTypes[5]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@ -383,7 +299,7 @@ func (x *RenameTagRequest) ProtoReflect() protoreflect.Message {
// Deprecated: Use RenameTagRequest.ProtoReflect.Descriptor instead.
func (*RenameTagRequest) Descriptor() ([]byte, []int) {
return file_api_v2_tag_service_proto_rawDescGZIP(), []int{7}
return file_api_v2_tag_service_proto_rawDescGZIP(), []int{5}
}
func (x *RenameTagRequest) GetUser() string {
@ -407,53 +323,6 @@ func (x *RenameTagRequest) GetNewName() string {
return ""
}
type RenameTagResponse struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Tag *Tag `protobuf:"bytes,1,opt,name=tag,proto3" json:"tag,omitempty"`
}
func (x *RenameTagResponse) Reset() {
*x = RenameTagResponse{}
if protoimpl.UnsafeEnabled {
mi := &file_api_v2_tag_service_proto_msgTypes[8]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *RenameTagResponse) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*RenameTagResponse) ProtoMessage() {}
func (x *RenameTagResponse) ProtoReflect() protoreflect.Message {
mi := &file_api_v2_tag_service_proto_msgTypes[8]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use RenameTagResponse.ProtoReflect.Descriptor instead.
func (*RenameTagResponse) Descriptor() ([]byte, []int) {
return file_api_v2_tag_service_proto_rawDescGZIP(), []int{8}
}
func (x *RenameTagResponse) GetTag() *Tag {
if x != nil {
return x.Tag
}
return nil
}
type DeleteTagRequest struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
@ -465,7 +334,7 @@ type DeleteTagRequest struct {
func (x *DeleteTagRequest) Reset() {
*x = DeleteTagRequest{}
if protoimpl.UnsafeEnabled {
mi := &file_api_v2_tag_service_proto_msgTypes[9]
mi := &file_api_v2_tag_service_proto_msgTypes[6]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@ -478,7 +347,7 @@ func (x *DeleteTagRequest) String() string {
func (*DeleteTagRequest) ProtoMessage() {}
func (x *DeleteTagRequest) ProtoReflect() protoreflect.Message {
mi := &file_api_v2_tag_service_proto_msgTypes[9]
mi := &file_api_v2_tag_service_proto_msgTypes[6]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@ -491,7 +360,7 @@ func (x *DeleteTagRequest) ProtoReflect() protoreflect.Message {
// Deprecated: Use DeleteTagRequest.ProtoReflect.Descriptor instead.
func (*DeleteTagRequest) Descriptor() ([]byte, []int) {
return file_api_v2_tag_service_proto_rawDescGZIP(), []int{9}
return file_api_v2_tag_service_proto_rawDescGZIP(), []int{6}
}
func (x *DeleteTagRequest) GetTag() *Tag {
@ -501,44 +370,6 @@ func (x *DeleteTagRequest) GetTag() *Tag {
return nil
}
type DeleteTagResponse struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
}
func (x *DeleteTagResponse) Reset() {
*x = DeleteTagResponse{}
if protoimpl.UnsafeEnabled {
mi := &file_api_v2_tag_service_proto_msgTypes[10]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *DeleteTagResponse) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*DeleteTagResponse) ProtoMessage() {}
func (x *DeleteTagResponse) ProtoReflect() protoreflect.Message {
mi := &file_api_v2_tag_service_proto_msgTypes[10]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use DeleteTagResponse.ProtoReflect.Descriptor instead.
func (*DeleteTagResponse) Descriptor() ([]byte, []int) {
return file_api_v2_tag_service_proto_rawDescGZIP(), []int{10}
}
type GetTagSuggestionsRequest struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
@ -552,7 +383,7 @@ type GetTagSuggestionsRequest struct {
func (x *GetTagSuggestionsRequest) Reset() {
*x = GetTagSuggestionsRequest{}
if protoimpl.UnsafeEnabled {
mi := &file_api_v2_tag_service_proto_msgTypes[11]
mi := &file_api_v2_tag_service_proto_msgTypes[7]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@ -565,7 +396,7 @@ func (x *GetTagSuggestionsRequest) String() string {
func (*GetTagSuggestionsRequest) ProtoMessage() {}
func (x *GetTagSuggestionsRequest) ProtoReflect() protoreflect.Message {
mi := &file_api_v2_tag_service_proto_msgTypes[11]
mi := &file_api_v2_tag_service_proto_msgTypes[7]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@ -578,7 +409,7 @@ func (x *GetTagSuggestionsRequest) ProtoReflect() protoreflect.Message {
// Deprecated: Use GetTagSuggestionsRequest.ProtoReflect.Descriptor instead.
func (*GetTagSuggestionsRequest) Descriptor() ([]byte, []int) {
return file_api_v2_tag_service_proto_rawDescGZIP(), []int{11}
return file_api_v2_tag_service_proto_rawDescGZIP(), []int{7}
}
func (x *GetTagSuggestionsRequest) GetUser() string {
@ -599,7 +430,7 @@ type GetTagSuggestionsResponse struct {
func (x *GetTagSuggestionsResponse) Reset() {
*x = GetTagSuggestionsResponse{}
if protoimpl.UnsafeEnabled {
mi := &file_api_v2_tag_service_proto_msgTypes[12]
mi := &file_api_v2_tag_service_proto_msgTypes[8]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@ -612,7 +443,7 @@ func (x *GetTagSuggestionsResponse) String() string {
func (*GetTagSuggestionsResponse) ProtoMessage() {}
func (x *GetTagSuggestionsResponse) ProtoReflect() protoreflect.Message {
mi := &file_api_v2_tag_service_proto_msgTypes[12]
mi := &file_api_v2_tag_service_proto_msgTypes[8]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@ -625,7 +456,7 @@ func (x *GetTagSuggestionsResponse) ProtoReflect() protoreflect.Message {
// Deprecated: Use GetTagSuggestionsResponse.ProtoReflect.Descriptor instead.
func (*GetTagSuggestionsResponse) Descriptor() ([]byte, []int) {
return file_api_v2_tag_service_proto_rawDescGZIP(), []int{12}
return file_api_v2_tag_service_proto_rawDescGZIP(), []int{8}
}
func (x *GetTagSuggestionsResponse) GetTags() []string {
@ -642,103 +473,92 @@ var file_api_v2_tag_service_proto_rawDesc = []byte{
0x76, 0x69, 0x63, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0c, 0x6d, 0x65, 0x6d, 0x6f,
0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x1a, 0x1c, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65,
0x2f, 0x61, 0x70, 0x69, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73,
0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x33, 0x0a, 0x03, 0x54, 0x61, 0x67, 0x12, 0x12, 0x0a,
0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d,
0x65, 0x12, 0x18, 0x0a, 0x07, 0x63, 0x72, 0x65, 0x61, 0x74, 0x6f, 0x72, 0x18, 0x02, 0x20, 0x01,
0x28, 0x09, 0x52, 0x07, 0x63, 0x72, 0x65, 0x61, 0x74, 0x6f, 0x72, 0x22, 0x26, 0x0a, 0x10, 0x55,
0x70, 0x73, 0x65, 0x72, 0x74, 0x54, 0x61, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12,
0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e,
0x61, 0x6d, 0x65, 0x22, 0x38, 0x0a, 0x11, 0x55, 0x70, 0x73, 0x65, 0x72, 0x74, 0x54, 0x61, 0x67,
0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x23, 0x0a, 0x03, 0x74, 0x61, 0x67, 0x18,
0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70,
0x69, 0x2e, 0x76, 0x32, 0x2e, 0x54, 0x61, 0x67, 0x52, 0x03, 0x74, 0x61, 0x67, 0x22, 0x53, 0x0a,
0x15, 0x42, 0x61, 0x74, 0x63, 0x68, 0x55, 0x70, 0x73, 0x65, 0x72, 0x74, 0x54, 0x61, 0x67, 0x52,
0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x3a, 0x0a, 0x08, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73,
0x74, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73,
0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x55, 0x70, 0x73, 0x65, 0x72, 0x74, 0x54, 0x61,
0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x52, 0x08, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73,
0x74, 0x73, 0x22, 0x18, 0x0a, 0x16, 0x42, 0x61, 0x74, 0x63, 0x68, 0x55, 0x70, 0x73, 0x65, 0x72,
0x74, 0x54, 0x61, 0x67, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x11, 0x0a, 0x0f,
0x4c, 0x69, 0x73, 0x74, 0x54, 0x61, 0x67, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22,
0x39, 0x0a, 0x10, 0x4c, 0x69, 0x73, 0x74, 0x54, 0x61, 0x67, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f,
0x6e, 0x73, 0x65, 0x12, 0x25, 0x0a, 0x04, 0x74, 0x61, 0x67, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28,
0x0b, 0x32, 0x11, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32,
0x2e, 0x54, 0x61, 0x67, 0x52, 0x04, 0x74, 0x61, 0x67, 0x73, 0x22, 0x5c, 0x0a, 0x10, 0x52, 0x65,
0x6e, 0x61, 0x6d, 0x65, 0x54, 0x61, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x12,
0x0a, 0x04, 0x75, 0x73, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x75, 0x73,
0x65, 0x72, 0x12, 0x19, 0x0a, 0x08, 0x6f, 0x6c, 0x64, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02,
0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6f, 0x6c, 0x64, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x19, 0x0a,
0x08, 0x6e, 0x65, 0x77, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52,
0x07, 0x6e, 0x65, 0x77, 0x4e, 0x61, 0x6d, 0x65, 0x22, 0x38, 0x0a, 0x11, 0x52, 0x65, 0x6e, 0x61,
0x6d, 0x65, 0x54, 0x61, 0x67, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x23, 0x0a,
0x03, 0x74, 0x61, 0x67, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x6d, 0x65, 0x6d,
0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x54, 0x61, 0x67, 0x52, 0x03, 0x74,
0x61, 0x67, 0x22, 0x37, 0x0a, 0x10, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x54, 0x61, 0x67, 0x52,
0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x23, 0x0a, 0x03, 0x74, 0x61, 0x67, 0x18, 0x01, 0x20,
0x01, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e,
0x76, 0x32, 0x2e, 0x54, 0x61, 0x67, 0x52, 0x03, 0x74, 0x61, 0x67, 0x22, 0x13, 0x0a, 0x11, 0x44,
0x65, 0x6c, 0x65, 0x74, 0x65, 0x54, 0x61, 0x67, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65,
0x22, 0x2e, 0x0a, 0x18, 0x47, 0x65, 0x74, 0x54, 0x61, 0x67, 0x53, 0x75, 0x67, 0x67, 0x65, 0x73,
0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x12, 0x0a, 0x04,
0x75, 0x73, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x75, 0x73, 0x65, 0x72,
0x22, 0x2f, 0x0a, 0x19, 0x47, 0x65, 0x74, 0x54, 0x61, 0x67, 0x53, 0x75, 0x67, 0x67, 0x65, 0x73,
0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x12, 0x0a,
0x04, 0x74, 0x61, 0x67, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x04, 0x74, 0x61, 0x67,
0x73, 0x32, 0xb1, 0x05, 0x0a, 0x0a, 0x54, 0x61, 0x67, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65,
0x12, 0x65, 0x0a, 0x09, 0x55, 0x70, 0x73, 0x65, 0x72, 0x74, 0x54, 0x61, 0x67, 0x12, 0x1e, 0x2e,
0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x55, 0x70, 0x73,
0x65, 0x72, 0x74, 0x54, 0x61, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1f, 0x2e,
0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x55, 0x70, 0x73,
0x65, 0x72, 0x74, 0x54, 0x61, 0x67, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x17,
0x82, 0xd3, 0xe4, 0x93, 0x02, 0x11, 0x3a, 0x01, 0x2a, 0x22, 0x0c, 0x2f, 0x61, 0x70, 0x69, 0x2f,
0x76, 0x32, 0x2f, 0x74, 0x61, 0x67, 0x73, 0x12, 0x80, 0x01, 0x0a, 0x0e, 0x42, 0x61, 0x74, 0x63,
0x68, 0x55, 0x70, 0x73, 0x65, 0x72, 0x74, 0x54, 0x61, 0x67, 0x12, 0x23, 0x2e, 0x6d, 0x65, 0x6d,
0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x42, 0x61, 0x74, 0x63, 0x68, 0x55,
0x70, 0x73, 0x65, 0x72, 0x74, 0x54, 0x61, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a,
0x24, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x42,
0x61, 0x74, 0x63, 0x68, 0x55, 0x70, 0x73, 0x65, 0x72, 0x74, 0x54, 0x61, 0x67, 0x52, 0x65, 0x73,
0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x23, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1d, 0x3a, 0x01, 0x2a,
0x22, 0x18, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x32, 0x2f, 0x74, 0x61, 0x67, 0x73, 0x3a, 0x62,
0x61, 0x74, 0x63, 0x68, 0x55, 0x70, 0x73, 0x65, 0x72, 0x74, 0x12, 0x5f, 0x0a, 0x08, 0x4c, 0x69,
0x73, 0x74, 0x54, 0x61, 0x67, 0x73, 0x12, 0x1d, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61,
0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x54, 0x61, 0x67, 0x73, 0x52, 0x65,
0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1e, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70,
0x69, 0x2e, 0x76, 0x32, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x54, 0x61, 0x67, 0x73, 0x52, 0x65, 0x73,
0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x14, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x0e, 0x12, 0x0c, 0x2f,
0x61, 0x70, 0x69, 0x2f, 0x76, 0x32, 0x2f, 0x74, 0x61, 0x67, 0x73, 0x12, 0x6c, 0x0a, 0x09, 0x52,
0x65, 0x6e, 0x61, 0x6d, 0x65, 0x54, 0x61, 0x67, 0x12, 0x1e, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73,
0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x52, 0x65, 0x6e, 0x61, 0x6d, 0x65, 0x54, 0x61,
0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1f, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73,
0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x52, 0x65, 0x6e, 0x61, 0x6d, 0x65, 0x54, 0x61,
0x67, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x1e, 0x82, 0xd3, 0xe4, 0x93, 0x02,
0x18, 0x3a, 0x01, 0x2a, 0x32, 0x13, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x32, 0x2f, 0x74, 0x61,
0x67, 0x73, 0x3a, 0x72, 0x65, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x62, 0x0a, 0x09, 0x44, 0x65, 0x6c,
0x65, 0x74, 0x65, 0x54, 0x61, 0x67, 0x12, 0x1e, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61,
0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x54, 0x61, 0x67, 0x52,
0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1f, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61,
0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x54, 0x61, 0x67, 0x52,
0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x14, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x0e, 0x2a,
0x0c, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x32, 0x2f, 0x74, 0x61, 0x67, 0x73, 0x12, 0x85, 0x01,
0x0a, 0x11, 0x47, 0x65, 0x74, 0x54, 0x61, 0x67, 0x53, 0x75, 0x67, 0x67, 0x65, 0x73, 0x74, 0x69,
0x6f, 0x6e, 0x73, 0x12, 0x26, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e,
0x76, 0x32, 0x2e, 0x47, 0x65, 0x74, 0x54, 0x61, 0x67, 0x53, 0x75, 0x67, 0x67, 0x65, 0x73, 0x74,
0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x27, 0x2e, 0x6d, 0x65,
0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x47, 0x65, 0x74, 0x54, 0x61,
0x67, 0x53, 0x75, 0x67, 0x67, 0x65, 0x73, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x70,
0x6f, 0x6e, 0x73, 0x65, 0x22, 0x1f, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x19, 0x12, 0x17, 0x2f, 0x61,
0x70, 0x69, 0x2f, 0x76, 0x32, 0x2f, 0x74, 0x61, 0x67, 0x73, 0x2f, 0x73, 0x75, 0x67, 0x67, 0x65,
0x73, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0xa7, 0x01, 0x0a, 0x10, 0x63, 0x6f, 0x6d, 0x2e, 0x6d, 0x65,
0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x42, 0x0f, 0x54, 0x61, 0x67, 0x53,
0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x30, 0x67,
0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x75, 0x73, 0x65, 0x6d, 0x65, 0x6d,
0x6f, 0x73, 0x2f, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67,
0x65, 0x6e, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x32, 0x3b, 0x61, 0x70, 0x69, 0x76, 0x32, 0xa2,
0x02, 0x03, 0x4d, 0x41, 0x58, 0xaa, 0x02, 0x0c, 0x4d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x41, 0x70,
0x69, 0x2e, 0x56, 0x32, 0xca, 0x02, 0x0c, 0x4d, 0x65, 0x6d, 0x6f, 0x73, 0x5c, 0x41, 0x70, 0x69,
0x5c, 0x56, 0x32, 0xe2, 0x02, 0x18, 0x4d, 0x65, 0x6d, 0x6f, 0x73, 0x5c, 0x41, 0x70, 0x69, 0x5c,
0x56, 0x32, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02,
0x0e, 0x4d, 0x65, 0x6d, 0x6f, 0x73, 0x3a, 0x3a, 0x41, 0x70, 0x69, 0x3a, 0x3a, 0x56, 0x32, 0x62,
0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1b, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70,
0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x65, 0x6d, 0x70, 0x74, 0x79, 0x2e, 0x70, 0x72,
0x6f, 0x74, 0x6f, 0x22, 0x33, 0x0a, 0x03, 0x54, 0x61, 0x67, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61,
0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x18,
0x0a, 0x07, 0x63, 0x72, 0x65, 0x61, 0x74, 0x6f, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52,
0x07, 0x63, 0x72, 0x65, 0x61, 0x74, 0x6f, 0x72, 0x22, 0x26, 0x0a, 0x10, 0x55, 0x70, 0x73, 0x65,
0x72, 0x74, 0x54, 0x61, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x12, 0x0a, 0x04,
0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65,
0x22, 0x53, 0x0a, 0x15, 0x42, 0x61, 0x74, 0x63, 0x68, 0x55, 0x70, 0x73, 0x65, 0x72, 0x74, 0x54,
0x61, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x3a, 0x0a, 0x08, 0x72, 0x65, 0x71,
0x75, 0x65, 0x73, 0x74, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x6d, 0x65,
0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x55, 0x70, 0x73, 0x65, 0x72,
0x74, 0x54, 0x61, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x52, 0x08, 0x72, 0x65, 0x71,
0x75, 0x65, 0x73, 0x74, 0x73, 0x22, 0x11, 0x0a, 0x0f, 0x4c, 0x69, 0x73, 0x74, 0x54, 0x61, 0x67,
0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x39, 0x0a, 0x10, 0x4c, 0x69, 0x73, 0x74,
0x54, 0x61, 0x67, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x25, 0x0a, 0x04,
0x74, 0x61, 0x67, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x6d, 0x65, 0x6d,
0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x54, 0x61, 0x67, 0x52, 0x04, 0x74,
0x61, 0x67, 0x73, 0x22, 0x5c, 0x0a, 0x10, 0x52, 0x65, 0x6e, 0x61, 0x6d, 0x65, 0x54, 0x61, 0x67,
0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x75, 0x73, 0x65, 0x72, 0x18,
0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x75, 0x73, 0x65, 0x72, 0x12, 0x19, 0x0a, 0x08, 0x6f,
0x6c, 0x64, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6f,
0x6c, 0x64, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x19, 0x0a, 0x08, 0x6e, 0x65, 0x77, 0x5f, 0x6e, 0x61,
0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6e, 0x65, 0x77, 0x4e, 0x61, 0x6d,
0x65, 0x22, 0x37, 0x0a, 0x10, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x54, 0x61, 0x67, 0x52, 0x65,
0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x23, 0x0a, 0x03, 0x74, 0x61, 0x67, 0x18, 0x01, 0x20, 0x01,
0x28, 0x0b, 0x32, 0x11, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76,
0x32, 0x2e, 0x54, 0x61, 0x67, 0x52, 0x03, 0x74, 0x61, 0x67, 0x22, 0x2e, 0x0a, 0x18, 0x47, 0x65,
0x74, 0x54, 0x61, 0x67, 0x53, 0x75, 0x67, 0x67, 0x65, 0x73, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52,
0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x75, 0x73, 0x65, 0x72, 0x18, 0x01,
0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x75, 0x73, 0x65, 0x72, 0x22, 0x2f, 0x0a, 0x19, 0x47, 0x65,
0x74, 0x54, 0x61, 0x67, 0x53, 0x75, 0x67, 0x67, 0x65, 0x73, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52,
0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x74, 0x61, 0x67, 0x73, 0x18,
0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x04, 0x74, 0x61, 0x67, 0x73, 0x32, 0x82, 0x05, 0x0a, 0x0a,
0x54, 0x61, 0x67, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x57, 0x0a, 0x09, 0x55, 0x70,
0x73, 0x65, 0x72, 0x74, 0x54, 0x61, 0x67, 0x12, 0x1e, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e,
0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x55, 0x70, 0x73, 0x65, 0x72, 0x74, 0x54, 0x61, 0x67,
0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x11, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e,
0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x54, 0x61, 0x67, 0x22, 0x17, 0x82, 0xd3, 0xe4, 0x93,
0x02, 0x11, 0x3a, 0x01, 0x2a, 0x22, 0x0c, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x32, 0x2f, 0x74,
0x61, 0x67, 0x73, 0x12, 0x72, 0x0a, 0x0e, 0x42, 0x61, 0x74, 0x63, 0x68, 0x55, 0x70, 0x73, 0x65,
0x72, 0x74, 0x54, 0x61, 0x67, 0x12, 0x23, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70,
0x69, 0x2e, 0x76, 0x32, 0x2e, 0x42, 0x61, 0x74, 0x63, 0x68, 0x55, 0x70, 0x73, 0x65, 0x72, 0x74,
0x54, 0x61, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f,
0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70,
0x74, 0x79, 0x22, 0x23, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1d, 0x3a, 0x01, 0x2a, 0x22, 0x18, 0x2f,
0x61, 0x70, 0x69, 0x2f, 0x76, 0x32, 0x2f, 0x74, 0x61, 0x67, 0x73, 0x3a, 0x62, 0x61, 0x74, 0x63,
0x68, 0x55, 0x70, 0x73, 0x65, 0x72, 0x74, 0x12, 0x5f, 0x0a, 0x08, 0x4c, 0x69, 0x73, 0x74, 0x54,
0x61, 0x67, 0x73, 0x12, 0x1d, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e,
0x76, 0x32, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x54, 0x61, 0x67, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65,
0x73, 0x74, 0x1a, 0x1e, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76,
0x32, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x54, 0x61, 0x67, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e,
0x73, 0x65, 0x22, 0x14, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x0e, 0x12, 0x0c, 0x2f, 0x61, 0x70, 0x69,
0x2f, 0x76, 0x32, 0x2f, 0x74, 0x61, 0x67, 0x73, 0x12, 0x63, 0x0a, 0x09, 0x52, 0x65, 0x6e, 0x61,
0x6d, 0x65, 0x54, 0x61, 0x67, 0x12, 0x1e, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70,
0x69, 0x2e, 0x76, 0x32, 0x2e, 0x52, 0x65, 0x6e, 0x61, 0x6d, 0x65, 0x54, 0x61, 0x67, 0x52, 0x65,
0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70,
0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x1e, 0x82,
0xd3, 0xe4, 0x93, 0x02, 0x18, 0x3a, 0x01, 0x2a, 0x32, 0x13, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76,
0x32, 0x2f, 0x74, 0x61, 0x67, 0x73, 0x3a, 0x72, 0x65, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x59, 0x0a,
0x09, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x54, 0x61, 0x67, 0x12, 0x1e, 0x2e, 0x6d, 0x65, 0x6d,
0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65,
0x54, 0x61, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f,
0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70,
0x74, 0x79, 0x22, 0x14, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x0e, 0x2a, 0x0c, 0x2f, 0x61, 0x70, 0x69,
0x2f, 0x76, 0x32, 0x2f, 0x74, 0x61, 0x67, 0x73, 0x12, 0x85, 0x01, 0x0a, 0x11, 0x47, 0x65, 0x74,
0x54, 0x61, 0x67, 0x53, 0x75, 0x67, 0x67, 0x65, 0x73, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x26,
0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x47, 0x65,
0x74, 0x54, 0x61, 0x67, 0x53, 0x75, 0x67, 0x67, 0x65, 0x73, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52,
0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x27, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61,
0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x47, 0x65, 0x74, 0x54, 0x61, 0x67, 0x53, 0x75, 0x67, 0x67,
0x65, 0x73, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22,
0x1f, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x19, 0x12, 0x17, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x32,
0x2f, 0x74, 0x61, 0x67, 0x73, 0x2f, 0x73, 0x75, 0x67, 0x67, 0x65, 0x73, 0x74, 0x69, 0x6f, 0x6e,
0x42, 0xa7, 0x01, 0x0a, 0x10, 0x63, 0x6f, 0x6d, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61,
0x70, 0x69, 0x2e, 0x76, 0x32, 0x42, 0x0f, 0x54, 0x61, 0x67, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63,
0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x30, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62,
0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x75, 0x73, 0x65, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2f, 0x6d, 0x65,
0x6d, 0x6f, 0x73, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x65, 0x6e, 0x2f, 0x61, 0x70,
0x69, 0x2f, 0x76, 0x32, 0x3b, 0x61, 0x70, 0x69, 0x76, 0x32, 0xa2, 0x02, 0x03, 0x4d, 0x41, 0x58,
0xaa, 0x02, 0x0c, 0x4d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x41, 0x70, 0x69, 0x2e, 0x56, 0x32, 0xca,
0x02, 0x0c, 0x4d, 0x65, 0x6d, 0x6f, 0x73, 0x5c, 0x41, 0x70, 0x69, 0x5c, 0x56, 0x32, 0xe2, 0x02,
0x18, 0x4d, 0x65, 0x6d, 0x6f, 0x73, 0x5c, 0x41, 0x70, 0x69, 0x5c, 0x56, 0x32, 0x5c, 0x47, 0x50,
0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x0e, 0x4d, 0x65, 0x6d, 0x6f,
0x73, 0x3a, 0x3a, 0x41, 0x70, 0x69, 0x3a, 0x3a, 0x56, 0x32, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74,
0x6f, 0x33,
}
var (
@ -753,45 +573,40 @@ func file_api_v2_tag_service_proto_rawDescGZIP() []byte {
return file_api_v2_tag_service_proto_rawDescData
}
var file_api_v2_tag_service_proto_msgTypes = make([]protoimpl.MessageInfo, 13)
var file_api_v2_tag_service_proto_msgTypes = make([]protoimpl.MessageInfo, 9)
var file_api_v2_tag_service_proto_goTypes = []interface{}{
(*Tag)(nil), // 0: memos.api.v2.Tag
(*UpsertTagRequest)(nil), // 1: memos.api.v2.UpsertTagRequest
(*UpsertTagResponse)(nil), // 2: memos.api.v2.UpsertTagResponse
(*BatchUpsertTagRequest)(nil), // 3: memos.api.v2.BatchUpsertTagRequest
(*BatchUpsertTagResponse)(nil), // 4: memos.api.v2.BatchUpsertTagResponse
(*ListTagsRequest)(nil), // 5: memos.api.v2.ListTagsRequest
(*ListTagsResponse)(nil), // 6: memos.api.v2.ListTagsResponse
(*RenameTagRequest)(nil), // 7: memos.api.v2.RenameTagRequest
(*RenameTagResponse)(nil), // 8: memos.api.v2.RenameTagResponse
(*DeleteTagRequest)(nil), // 9: memos.api.v2.DeleteTagRequest
(*DeleteTagResponse)(nil), // 10: memos.api.v2.DeleteTagResponse
(*GetTagSuggestionsRequest)(nil), // 11: memos.api.v2.GetTagSuggestionsRequest
(*GetTagSuggestionsResponse)(nil), // 12: memos.api.v2.GetTagSuggestionsResponse
(*BatchUpsertTagRequest)(nil), // 2: memos.api.v2.BatchUpsertTagRequest
(*ListTagsRequest)(nil), // 3: memos.api.v2.ListTagsRequest
(*ListTagsResponse)(nil), // 4: memos.api.v2.ListTagsResponse
(*RenameTagRequest)(nil), // 5: memos.api.v2.RenameTagRequest
(*DeleteTagRequest)(nil), // 6: memos.api.v2.DeleteTagRequest
(*GetTagSuggestionsRequest)(nil), // 7: memos.api.v2.GetTagSuggestionsRequest
(*GetTagSuggestionsResponse)(nil), // 8: memos.api.v2.GetTagSuggestionsResponse
(*emptypb.Empty)(nil), // 9: google.protobuf.Empty
}
var file_api_v2_tag_service_proto_depIdxs = []int32{
0, // 0: memos.api.v2.UpsertTagResponse.tag:type_name -> memos.api.v2.Tag
1, // 1: memos.api.v2.BatchUpsertTagRequest.requests:type_name -> memos.api.v2.UpsertTagRequest
0, // 2: memos.api.v2.ListTagsResponse.tags:type_name -> memos.api.v2.Tag
0, // 3: memos.api.v2.RenameTagResponse.tag:type_name -> memos.api.v2.Tag
0, // 4: memos.api.v2.DeleteTagRequest.tag:type_name -> memos.api.v2.Tag
1, // 5: memos.api.v2.TagService.UpsertTag:input_type -> memos.api.v2.UpsertTagRequest
3, // 6: memos.api.v2.TagService.BatchUpsertTag:input_type -> memos.api.v2.BatchUpsertTagRequest
5, // 7: memos.api.v2.TagService.ListTags:input_type -> memos.api.v2.ListTagsRequest
7, // 8: memos.api.v2.TagService.RenameTag:input_type -> memos.api.v2.RenameTagRequest
9, // 9: memos.api.v2.TagService.DeleteTag:input_type -> memos.api.v2.DeleteTagRequest
11, // 10: memos.api.v2.TagService.GetTagSuggestions:input_type -> memos.api.v2.GetTagSuggestionsRequest
2, // 11: memos.api.v2.TagService.UpsertTag:output_type -> memos.api.v2.UpsertTagResponse
4, // 12: memos.api.v2.TagService.BatchUpsertTag:output_type -> memos.api.v2.BatchUpsertTagResponse
6, // 13: memos.api.v2.TagService.ListTags:output_type -> memos.api.v2.ListTagsResponse
8, // 14: memos.api.v2.TagService.RenameTag:output_type -> memos.api.v2.RenameTagResponse
10, // 15: memos.api.v2.TagService.DeleteTag:output_type -> memos.api.v2.DeleteTagResponse
12, // 16: memos.api.v2.TagService.GetTagSuggestions:output_type -> memos.api.v2.GetTagSuggestionsResponse
11, // [11:17] is the sub-list for method output_type
5, // [5:11] is the sub-list for method input_type
5, // [5:5] is the sub-list for extension type_name
5, // [5:5] is the sub-list for extension extendee
0, // [0:5] is the sub-list for field type_name
1, // 0: memos.api.v2.BatchUpsertTagRequest.requests:type_name -> memos.api.v2.UpsertTagRequest
0, // 1: memos.api.v2.ListTagsResponse.tags:type_name -> memos.api.v2.Tag
0, // 2: memos.api.v2.DeleteTagRequest.tag:type_name -> memos.api.v2.Tag
1, // 3: memos.api.v2.TagService.UpsertTag:input_type -> memos.api.v2.UpsertTagRequest
2, // 4: memos.api.v2.TagService.BatchUpsertTag:input_type -> memos.api.v2.BatchUpsertTagRequest
3, // 5: memos.api.v2.TagService.ListTags:input_type -> memos.api.v2.ListTagsRequest
5, // 6: memos.api.v2.TagService.RenameTag:input_type -> memos.api.v2.RenameTagRequest
6, // 7: memos.api.v2.TagService.DeleteTag:input_type -> memos.api.v2.DeleteTagRequest
7, // 8: memos.api.v2.TagService.GetTagSuggestions:input_type -> memos.api.v2.GetTagSuggestionsRequest
0, // 9: memos.api.v2.TagService.UpsertTag:output_type -> memos.api.v2.Tag
9, // 10: memos.api.v2.TagService.BatchUpsertTag:output_type -> google.protobuf.Empty
4, // 11: memos.api.v2.TagService.ListTags:output_type -> memos.api.v2.ListTagsResponse
9, // 12: memos.api.v2.TagService.RenameTag:output_type -> google.protobuf.Empty
9, // 13: memos.api.v2.TagService.DeleteTag:output_type -> google.protobuf.Empty
8, // 14: memos.api.v2.TagService.GetTagSuggestions:output_type -> memos.api.v2.GetTagSuggestionsResponse
9, // [9:15] is the sub-list for method output_type
3, // [3:9] is the sub-list for method input_type
3, // [3:3] is the sub-list for extension type_name
3, // [3:3] is the sub-list for extension extendee
0, // [0:3] is the sub-list for field type_name
}
func init() { file_api_v2_tag_service_proto_init() }
@ -825,18 +640,6 @@ func file_api_v2_tag_service_proto_init() {
}
}
file_api_v2_tag_service_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*UpsertTagResponse); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_api_v2_tag_service_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*BatchUpsertTagRequest); i {
case 0:
return &v.state
@ -848,19 +651,7 @@ func file_api_v2_tag_service_proto_init() {
return nil
}
}
file_api_v2_tag_service_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*BatchUpsertTagResponse); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_api_v2_tag_service_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} {
file_api_v2_tag_service_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*ListTagsRequest); i {
case 0:
return &v.state
@ -872,7 +663,7 @@ func file_api_v2_tag_service_proto_init() {
return nil
}
}
file_api_v2_tag_service_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} {
file_api_v2_tag_service_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*ListTagsResponse); i {
case 0:
return &v.state
@ -884,7 +675,7 @@ func file_api_v2_tag_service_proto_init() {
return nil
}
}
file_api_v2_tag_service_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} {
file_api_v2_tag_service_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*RenameTagRequest); i {
case 0:
return &v.state
@ -896,19 +687,7 @@ func file_api_v2_tag_service_proto_init() {
return nil
}
}
file_api_v2_tag_service_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*RenameTagResponse); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_api_v2_tag_service_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} {
file_api_v2_tag_service_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*DeleteTagRequest); i {
case 0:
return &v.state
@ -920,19 +699,7 @@ func file_api_v2_tag_service_proto_init() {
return nil
}
}
file_api_v2_tag_service_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*DeleteTagResponse); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_api_v2_tag_service_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} {
file_api_v2_tag_service_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*GetTagSuggestionsRequest); i {
case 0:
return &v.state
@ -944,7 +711,7 @@ func file_api_v2_tag_service_proto_init() {
return nil
}
}
file_api_v2_tag_service_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} {
file_api_v2_tag_service_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*GetTagSuggestionsResponse); i {
case 0:
return &v.state
@ -963,7 +730,7 @@ func file_api_v2_tag_service_proto_init() {
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: file_api_v2_tag_service_proto_rawDesc,
NumEnums: 0,
NumMessages: 13,
NumMessages: 9,
NumExtensions: 0,
NumServices: 1,
},

View file

@ -11,6 +11,7 @@ import (
grpc "google.golang.org/grpc"
codes "google.golang.org/grpc/codes"
status "google.golang.org/grpc/status"
emptypb "google.golang.org/protobuf/types/known/emptypb"
)
// This is a compile-time assertion to ensure that this generated file
@ -32,16 +33,16 @@ const (
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
type TagServiceClient interface {
// UpsertTag upserts a tag.
UpsertTag(ctx context.Context, in *UpsertTagRequest, opts ...grpc.CallOption) (*UpsertTagResponse, error)
UpsertTag(ctx context.Context, in *UpsertTagRequest, opts ...grpc.CallOption) (*Tag, error)
// BatchUpsertTag upserts multiple tags.
BatchUpsertTag(ctx context.Context, in *BatchUpsertTagRequest, opts ...grpc.CallOption) (*BatchUpsertTagResponse, error)
BatchUpsertTag(ctx context.Context, in *BatchUpsertTagRequest, opts ...grpc.CallOption) (*emptypb.Empty, error)
// ListTags lists tags.
ListTags(ctx context.Context, in *ListTagsRequest, opts ...grpc.CallOption) (*ListTagsResponse, error)
// RenameTag renames a tag.
// All related memos will be updated.
RenameTag(ctx context.Context, in *RenameTagRequest, opts ...grpc.CallOption) (*RenameTagResponse, error)
RenameTag(ctx context.Context, in *RenameTagRequest, opts ...grpc.CallOption) (*emptypb.Empty, error)
// DeleteTag deletes a tag.
DeleteTag(ctx context.Context, in *DeleteTagRequest, opts ...grpc.CallOption) (*DeleteTagResponse, error)
DeleteTag(ctx context.Context, in *DeleteTagRequest, opts ...grpc.CallOption) (*emptypb.Empty, error)
// GetTagSuggestions gets tag suggestions from the user's memos.
GetTagSuggestions(ctx context.Context, in *GetTagSuggestionsRequest, opts ...grpc.CallOption) (*GetTagSuggestionsResponse, error)
}
@ -54,8 +55,8 @@ func NewTagServiceClient(cc grpc.ClientConnInterface) TagServiceClient {
return &tagServiceClient{cc}
}
func (c *tagServiceClient) UpsertTag(ctx context.Context, in *UpsertTagRequest, opts ...grpc.CallOption) (*UpsertTagResponse, error) {
out := new(UpsertTagResponse)
func (c *tagServiceClient) UpsertTag(ctx context.Context, in *UpsertTagRequest, opts ...grpc.CallOption) (*Tag, error) {
out := new(Tag)
err := c.cc.Invoke(ctx, TagService_UpsertTag_FullMethodName, in, out, opts...)
if err != nil {
return nil, err
@ -63,8 +64,8 @@ func (c *tagServiceClient) UpsertTag(ctx context.Context, in *UpsertTagRequest,
return out, nil
}
func (c *tagServiceClient) BatchUpsertTag(ctx context.Context, in *BatchUpsertTagRequest, opts ...grpc.CallOption) (*BatchUpsertTagResponse, error) {
out := new(BatchUpsertTagResponse)
func (c *tagServiceClient) BatchUpsertTag(ctx context.Context, in *BatchUpsertTagRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) {
out := new(emptypb.Empty)
err := c.cc.Invoke(ctx, TagService_BatchUpsertTag_FullMethodName, in, out, opts...)
if err != nil {
return nil, err
@ -81,8 +82,8 @@ func (c *tagServiceClient) ListTags(ctx context.Context, in *ListTagsRequest, op
return out, nil
}
func (c *tagServiceClient) RenameTag(ctx context.Context, in *RenameTagRequest, opts ...grpc.CallOption) (*RenameTagResponse, error) {
out := new(RenameTagResponse)
func (c *tagServiceClient) RenameTag(ctx context.Context, in *RenameTagRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) {
out := new(emptypb.Empty)
err := c.cc.Invoke(ctx, TagService_RenameTag_FullMethodName, in, out, opts...)
if err != nil {
return nil, err
@ -90,8 +91,8 @@ func (c *tagServiceClient) RenameTag(ctx context.Context, in *RenameTagRequest,
return out, nil
}
func (c *tagServiceClient) DeleteTag(ctx context.Context, in *DeleteTagRequest, opts ...grpc.CallOption) (*DeleteTagResponse, error) {
out := new(DeleteTagResponse)
func (c *tagServiceClient) DeleteTag(ctx context.Context, in *DeleteTagRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) {
out := new(emptypb.Empty)
err := c.cc.Invoke(ctx, TagService_DeleteTag_FullMethodName, in, out, opts...)
if err != nil {
return nil, err
@ -113,16 +114,16 @@ func (c *tagServiceClient) GetTagSuggestions(ctx context.Context, in *GetTagSugg
// for forward compatibility
type TagServiceServer interface {
// UpsertTag upserts a tag.
UpsertTag(context.Context, *UpsertTagRequest) (*UpsertTagResponse, error)
UpsertTag(context.Context, *UpsertTagRequest) (*Tag, error)
// BatchUpsertTag upserts multiple tags.
BatchUpsertTag(context.Context, *BatchUpsertTagRequest) (*BatchUpsertTagResponse, error)
BatchUpsertTag(context.Context, *BatchUpsertTagRequest) (*emptypb.Empty, error)
// ListTags lists tags.
ListTags(context.Context, *ListTagsRequest) (*ListTagsResponse, error)
// RenameTag renames a tag.
// All related memos will be updated.
RenameTag(context.Context, *RenameTagRequest) (*RenameTagResponse, error)
RenameTag(context.Context, *RenameTagRequest) (*emptypb.Empty, error)
// DeleteTag deletes a tag.
DeleteTag(context.Context, *DeleteTagRequest) (*DeleteTagResponse, error)
DeleteTag(context.Context, *DeleteTagRequest) (*emptypb.Empty, error)
// GetTagSuggestions gets tag suggestions from the user's memos.
GetTagSuggestions(context.Context, *GetTagSuggestionsRequest) (*GetTagSuggestionsResponse, error)
mustEmbedUnimplementedTagServiceServer()
@ -132,19 +133,19 @@ type TagServiceServer interface {
type UnimplementedTagServiceServer struct {
}
func (UnimplementedTagServiceServer) UpsertTag(context.Context, *UpsertTagRequest) (*UpsertTagResponse, error) {
func (UnimplementedTagServiceServer) UpsertTag(context.Context, *UpsertTagRequest) (*Tag, error) {
return nil, status.Errorf(codes.Unimplemented, "method UpsertTag not implemented")
}
func (UnimplementedTagServiceServer) BatchUpsertTag(context.Context, *BatchUpsertTagRequest) (*BatchUpsertTagResponse, error) {
func (UnimplementedTagServiceServer) BatchUpsertTag(context.Context, *BatchUpsertTagRequest) (*emptypb.Empty, error) {
return nil, status.Errorf(codes.Unimplemented, "method BatchUpsertTag not implemented")
}
func (UnimplementedTagServiceServer) ListTags(context.Context, *ListTagsRequest) (*ListTagsResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method ListTags not implemented")
}
func (UnimplementedTagServiceServer) RenameTag(context.Context, *RenameTagRequest) (*RenameTagResponse, error) {
func (UnimplementedTagServiceServer) RenameTag(context.Context, *RenameTagRequest) (*emptypb.Empty, error) {
return nil, status.Errorf(codes.Unimplemented, "method RenameTag not implemented")
}
func (UnimplementedTagServiceServer) DeleteTag(context.Context, *DeleteTagRequest) (*DeleteTagResponse, error) {
func (UnimplementedTagServiceServer) DeleteTag(context.Context, *DeleteTagRequest) (*emptypb.Empty, error) {
return nil, status.Errorf(codes.Unimplemented, "method DeleteTag not implemented")
}
func (UnimplementedTagServiceServer) GetTagSuggestions(context.Context, *GetTagSuggestionsRequest) (*GetTagSuggestionsResponse, error) {

File diff suppressed because it is too large Load diff

View file

@ -11,6 +11,7 @@ import (
grpc "google.golang.org/grpc"
codes "google.golang.org/grpc/codes"
status "google.golang.org/grpc/status"
emptypb "google.golang.org/protobuf/types/known/emptypb"
)
// This is a compile-time assertion to ensure that this generated file
@ -41,23 +42,23 @@ type UserServiceClient interface {
// SearchUsers searches users by filter.
SearchUsers(ctx context.Context, in *SearchUsersRequest, opts ...grpc.CallOption) (*SearchUsersResponse, error)
// GetUser gets a user by name.
GetUser(ctx context.Context, in *GetUserRequest, opts ...grpc.CallOption) (*GetUserResponse, error)
GetUser(ctx context.Context, in *GetUserRequest, opts ...grpc.CallOption) (*User, error)
// CreateUser creates a new user.
CreateUser(ctx context.Context, in *CreateUserRequest, opts ...grpc.CallOption) (*CreateUserResponse, error)
CreateUser(ctx context.Context, in *CreateUserRequest, opts ...grpc.CallOption) (*User, error)
// UpdateUser updates a user.
UpdateUser(ctx context.Context, in *UpdateUserRequest, opts ...grpc.CallOption) (*UpdateUserResponse, error)
UpdateUser(ctx context.Context, in *UpdateUserRequest, opts ...grpc.CallOption) (*User, error)
// DeleteUser deletes a user.
DeleteUser(ctx context.Context, in *DeleteUserRequest, opts ...grpc.CallOption) (*DeleteUserResponse, error)
DeleteUser(ctx context.Context, in *DeleteUserRequest, opts ...grpc.CallOption) (*emptypb.Empty, error)
// GetUserSetting gets the setting of a user.
GetUserSetting(ctx context.Context, in *GetUserSettingRequest, opts ...grpc.CallOption) (*GetUserSettingResponse, error)
GetUserSetting(ctx context.Context, in *GetUserSettingRequest, opts ...grpc.CallOption) (*UserSetting, error)
// UpdateUserSetting updates the setting of a user.
UpdateUserSetting(ctx context.Context, in *UpdateUserSettingRequest, opts ...grpc.CallOption) (*UpdateUserSettingResponse, error)
UpdateUserSetting(ctx context.Context, in *UpdateUserSettingRequest, opts ...grpc.CallOption) (*UserSetting, error)
// ListUserAccessTokens returns a list of access tokens for a user.
ListUserAccessTokens(ctx context.Context, in *ListUserAccessTokensRequest, opts ...grpc.CallOption) (*ListUserAccessTokensResponse, error)
// CreateUserAccessToken creates a new access token for a user.
CreateUserAccessToken(ctx context.Context, in *CreateUserAccessTokenRequest, opts ...grpc.CallOption) (*CreateUserAccessTokenResponse, error)
CreateUserAccessToken(ctx context.Context, in *CreateUserAccessTokenRequest, opts ...grpc.CallOption) (*UserAccessToken, error)
// DeleteUserAccessToken deletes an access token for a user.
DeleteUserAccessToken(ctx context.Context, in *DeleteUserAccessTokenRequest, opts ...grpc.CallOption) (*DeleteUserAccessTokenResponse, error)
DeleteUserAccessToken(ctx context.Context, in *DeleteUserAccessTokenRequest, opts ...grpc.CallOption) (*emptypb.Empty, error)
}
type userServiceClient struct {
@ -86,8 +87,8 @@ func (c *userServiceClient) SearchUsers(ctx context.Context, in *SearchUsersRequ
return out, nil
}
func (c *userServiceClient) GetUser(ctx context.Context, in *GetUserRequest, opts ...grpc.CallOption) (*GetUserResponse, error) {
out := new(GetUserResponse)
func (c *userServiceClient) GetUser(ctx context.Context, in *GetUserRequest, opts ...grpc.CallOption) (*User, error) {
out := new(User)
err := c.cc.Invoke(ctx, UserService_GetUser_FullMethodName, in, out, opts...)
if err != nil {
return nil, err
@ -95,8 +96,8 @@ func (c *userServiceClient) GetUser(ctx context.Context, in *GetUserRequest, opt
return out, nil
}
func (c *userServiceClient) CreateUser(ctx context.Context, in *CreateUserRequest, opts ...grpc.CallOption) (*CreateUserResponse, error) {
out := new(CreateUserResponse)
func (c *userServiceClient) CreateUser(ctx context.Context, in *CreateUserRequest, opts ...grpc.CallOption) (*User, error) {
out := new(User)
err := c.cc.Invoke(ctx, UserService_CreateUser_FullMethodName, in, out, opts...)
if err != nil {
return nil, err
@ -104,8 +105,8 @@ func (c *userServiceClient) CreateUser(ctx context.Context, in *CreateUserReques
return out, nil
}
func (c *userServiceClient) UpdateUser(ctx context.Context, in *UpdateUserRequest, opts ...grpc.CallOption) (*UpdateUserResponse, error) {
out := new(UpdateUserResponse)
func (c *userServiceClient) UpdateUser(ctx context.Context, in *UpdateUserRequest, opts ...grpc.CallOption) (*User, error) {
out := new(User)
err := c.cc.Invoke(ctx, UserService_UpdateUser_FullMethodName, in, out, opts...)
if err != nil {
return nil, err
@ -113,8 +114,8 @@ func (c *userServiceClient) UpdateUser(ctx context.Context, in *UpdateUserReques
return out, nil
}
func (c *userServiceClient) DeleteUser(ctx context.Context, in *DeleteUserRequest, opts ...grpc.CallOption) (*DeleteUserResponse, error) {
out := new(DeleteUserResponse)
func (c *userServiceClient) DeleteUser(ctx context.Context, in *DeleteUserRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) {
out := new(emptypb.Empty)
err := c.cc.Invoke(ctx, UserService_DeleteUser_FullMethodName, in, out, opts...)
if err != nil {
return nil, err
@ -122,8 +123,8 @@ func (c *userServiceClient) DeleteUser(ctx context.Context, in *DeleteUserReques
return out, nil
}
func (c *userServiceClient) GetUserSetting(ctx context.Context, in *GetUserSettingRequest, opts ...grpc.CallOption) (*GetUserSettingResponse, error) {
out := new(GetUserSettingResponse)
func (c *userServiceClient) GetUserSetting(ctx context.Context, in *GetUserSettingRequest, opts ...grpc.CallOption) (*UserSetting, error) {
out := new(UserSetting)
err := c.cc.Invoke(ctx, UserService_GetUserSetting_FullMethodName, in, out, opts...)
if err != nil {
return nil, err
@ -131,8 +132,8 @@ func (c *userServiceClient) GetUserSetting(ctx context.Context, in *GetUserSetti
return out, nil
}
func (c *userServiceClient) UpdateUserSetting(ctx context.Context, in *UpdateUserSettingRequest, opts ...grpc.CallOption) (*UpdateUserSettingResponse, error) {
out := new(UpdateUserSettingResponse)
func (c *userServiceClient) UpdateUserSetting(ctx context.Context, in *UpdateUserSettingRequest, opts ...grpc.CallOption) (*UserSetting, error) {
out := new(UserSetting)
err := c.cc.Invoke(ctx, UserService_UpdateUserSetting_FullMethodName, in, out, opts...)
if err != nil {
return nil, err
@ -149,8 +150,8 @@ func (c *userServiceClient) ListUserAccessTokens(ctx context.Context, in *ListUs
return out, nil
}
func (c *userServiceClient) CreateUserAccessToken(ctx context.Context, in *CreateUserAccessTokenRequest, opts ...grpc.CallOption) (*CreateUserAccessTokenResponse, error) {
out := new(CreateUserAccessTokenResponse)
func (c *userServiceClient) CreateUserAccessToken(ctx context.Context, in *CreateUserAccessTokenRequest, opts ...grpc.CallOption) (*UserAccessToken, error) {
out := new(UserAccessToken)
err := c.cc.Invoke(ctx, UserService_CreateUserAccessToken_FullMethodName, in, out, opts...)
if err != nil {
return nil, err
@ -158,8 +159,8 @@ func (c *userServiceClient) CreateUserAccessToken(ctx context.Context, in *Creat
return out, nil
}
func (c *userServiceClient) DeleteUserAccessToken(ctx context.Context, in *DeleteUserAccessTokenRequest, opts ...grpc.CallOption) (*DeleteUserAccessTokenResponse, error) {
out := new(DeleteUserAccessTokenResponse)
func (c *userServiceClient) DeleteUserAccessToken(ctx context.Context, in *DeleteUserAccessTokenRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) {
out := new(emptypb.Empty)
err := c.cc.Invoke(ctx, UserService_DeleteUserAccessToken_FullMethodName, in, out, opts...)
if err != nil {
return nil, err
@ -176,23 +177,23 @@ type UserServiceServer interface {
// SearchUsers searches users by filter.
SearchUsers(context.Context, *SearchUsersRequest) (*SearchUsersResponse, error)
// GetUser gets a user by name.
GetUser(context.Context, *GetUserRequest) (*GetUserResponse, error)
GetUser(context.Context, *GetUserRequest) (*User, error)
// CreateUser creates a new user.
CreateUser(context.Context, *CreateUserRequest) (*CreateUserResponse, error)
CreateUser(context.Context, *CreateUserRequest) (*User, error)
// UpdateUser updates a user.
UpdateUser(context.Context, *UpdateUserRequest) (*UpdateUserResponse, error)
UpdateUser(context.Context, *UpdateUserRequest) (*User, error)
// DeleteUser deletes a user.
DeleteUser(context.Context, *DeleteUserRequest) (*DeleteUserResponse, error)
DeleteUser(context.Context, *DeleteUserRequest) (*emptypb.Empty, error)
// GetUserSetting gets the setting of a user.
GetUserSetting(context.Context, *GetUserSettingRequest) (*GetUserSettingResponse, error)
GetUserSetting(context.Context, *GetUserSettingRequest) (*UserSetting, error)
// UpdateUserSetting updates the setting of a user.
UpdateUserSetting(context.Context, *UpdateUserSettingRequest) (*UpdateUserSettingResponse, error)
UpdateUserSetting(context.Context, *UpdateUserSettingRequest) (*UserSetting, error)
// ListUserAccessTokens returns a list of access tokens for a user.
ListUserAccessTokens(context.Context, *ListUserAccessTokensRequest) (*ListUserAccessTokensResponse, error)
// CreateUserAccessToken creates a new access token for a user.
CreateUserAccessToken(context.Context, *CreateUserAccessTokenRequest) (*CreateUserAccessTokenResponse, error)
CreateUserAccessToken(context.Context, *CreateUserAccessTokenRequest) (*UserAccessToken, error)
// DeleteUserAccessToken deletes an access token for a user.
DeleteUserAccessToken(context.Context, *DeleteUserAccessTokenRequest) (*DeleteUserAccessTokenResponse, error)
DeleteUserAccessToken(context.Context, *DeleteUserAccessTokenRequest) (*emptypb.Empty, error)
mustEmbedUnimplementedUserServiceServer()
}
@ -206,31 +207,31 @@ func (UnimplementedUserServiceServer) ListUsers(context.Context, *ListUsersReque
func (UnimplementedUserServiceServer) SearchUsers(context.Context, *SearchUsersRequest) (*SearchUsersResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method SearchUsers not implemented")
}
func (UnimplementedUserServiceServer) GetUser(context.Context, *GetUserRequest) (*GetUserResponse, error) {
func (UnimplementedUserServiceServer) GetUser(context.Context, *GetUserRequest) (*User, error) {
return nil, status.Errorf(codes.Unimplemented, "method GetUser not implemented")
}
func (UnimplementedUserServiceServer) CreateUser(context.Context, *CreateUserRequest) (*CreateUserResponse, error) {
func (UnimplementedUserServiceServer) CreateUser(context.Context, *CreateUserRequest) (*User, error) {
return nil, status.Errorf(codes.Unimplemented, "method CreateUser not implemented")
}
func (UnimplementedUserServiceServer) UpdateUser(context.Context, *UpdateUserRequest) (*UpdateUserResponse, error) {
func (UnimplementedUserServiceServer) UpdateUser(context.Context, *UpdateUserRequest) (*User, error) {
return nil, status.Errorf(codes.Unimplemented, "method UpdateUser not implemented")
}
func (UnimplementedUserServiceServer) DeleteUser(context.Context, *DeleteUserRequest) (*DeleteUserResponse, error) {
func (UnimplementedUserServiceServer) DeleteUser(context.Context, *DeleteUserRequest) (*emptypb.Empty, error) {
return nil, status.Errorf(codes.Unimplemented, "method DeleteUser not implemented")
}
func (UnimplementedUserServiceServer) GetUserSetting(context.Context, *GetUserSettingRequest) (*GetUserSettingResponse, error) {
func (UnimplementedUserServiceServer) GetUserSetting(context.Context, *GetUserSettingRequest) (*UserSetting, error) {
return nil, status.Errorf(codes.Unimplemented, "method GetUserSetting not implemented")
}
func (UnimplementedUserServiceServer) UpdateUserSetting(context.Context, *UpdateUserSettingRequest) (*UpdateUserSettingResponse, error) {
func (UnimplementedUserServiceServer) UpdateUserSetting(context.Context, *UpdateUserSettingRequest) (*UserSetting, error) {
return nil, status.Errorf(codes.Unimplemented, "method UpdateUserSetting not implemented")
}
func (UnimplementedUserServiceServer) ListUserAccessTokens(context.Context, *ListUserAccessTokensRequest) (*ListUserAccessTokensResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method ListUserAccessTokens not implemented")
}
func (UnimplementedUserServiceServer) CreateUserAccessToken(context.Context, *CreateUserAccessTokenRequest) (*CreateUserAccessTokenResponse, error) {
func (UnimplementedUserServiceServer) CreateUserAccessToken(context.Context, *CreateUserAccessTokenRequest) (*UserAccessToken, error) {
return nil, status.Errorf(codes.Unimplemented, "method CreateUserAccessToken not implemented")
}
func (UnimplementedUserServiceServer) DeleteUserAccessToken(context.Context, *DeleteUserAccessTokenRequest) (*DeleteUserAccessTokenResponse, error) {
func (UnimplementedUserServiceServer) DeleteUserAccessToken(context.Context, *DeleteUserAccessTokenRequest) (*emptypb.Empty, error) {
return nil, status.Errorf(codes.Unimplemented, "method DeleteUserAccessToken not implemented")
}
func (UnimplementedUserServiceServer) mustEmbedUnimplementedUserServiceServer() {}

View file

@ -10,6 +10,7 @@ import (
_ "google.golang.org/genproto/googleapis/api/annotations"
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
emptypb "google.golang.org/protobuf/types/known/emptypb"
fieldmaskpb "google.golang.org/protobuf/types/known/fieldmaskpb"
timestamppb "google.golang.org/protobuf/types/known/timestamppb"
reflect "reflect"
@ -173,53 +174,6 @@ func (x *CreateWebhookRequest) GetUrl() string {
return ""
}
type CreateWebhookResponse struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Webhook *Webhook `protobuf:"bytes,1,opt,name=webhook,proto3" json:"webhook,omitempty"`
}
func (x *CreateWebhookResponse) Reset() {
*x = CreateWebhookResponse{}
if protoimpl.UnsafeEnabled {
mi := &file_api_v2_webhook_service_proto_msgTypes[2]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *CreateWebhookResponse) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*CreateWebhookResponse) ProtoMessage() {}
func (x *CreateWebhookResponse) ProtoReflect() protoreflect.Message {
mi := &file_api_v2_webhook_service_proto_msgTypes[2]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use CreateWebhookResponse.ProtoReflect.Descriptor instead.
func (*CreateWebhookResponse) Descriptor() ([]byte, []int) {
return file_api_v2_webhook_service_proto_rawDescGZIP(), []int{2}
}
func (x *CreateWebhookResponse) GetWebhook() *Webhook {
if x != nil {
return x.Webhook
}
return nil
}
type GetWebhookRequest struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
@ -231,7 +185,7 @@ type GetWebhookRequest struct {
func (x *GetWebhookRequest) Reset() {
*x = GetWebhookRequest{}
if protoimpl.UnsafeEnabled {
mi := &file_api_v2_webhook_service_proto_msgTypes[3]
mi := &file_api_v2_webhook_service_proto_msgTypes[2]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@ -244,7 +198,7 @@ func (x *GetWebhookRequest) String() string {
func (*GetWebhookRequest) ProtoMessage() {}
func (x *GetWebhookRequest) ProtoReflect() protoreflect.Message {
mi := &file_api_v2_webhook_service_proto_msgTypes[3]
mi := &file_api_v2_webhook_service_proto_msgTypes[2]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@ -257,7 +211,7 @@ func (x *GetWebhookRequest) ProtoReflect() protoreflect.Message {
// Deprecated: Use GetWebhookRequest.ProtoReflect.Descriptor instead.
func (*GetWebhookRequest) Descriptor() ([]byte, []int) {
return file_api_v2_webhook_service_proto_rawDescGZIP(), []int{3}
return file_api_v2_webhook_service_proto_rawDescGZIP(), []int{2}
}
func (x *GetWebhookRequest) GetId() int32 {
@ -267,53 +221,6 @@ func (x *GetWebhookRequest) GetId() int32 {
return 0
}
type GetWebhookResponse struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Webhook *Webhook `protobuf:"bytes,1,opt,name=webhook,proto3" json:"webhook,omitempty"`
}
func (x *GetWebhookResponse) Reset() {
*x = GetWebhookResponse{}
if protoimpl.UnsafeEnabled {
mi := &file_api_v2_webhook_service_proto_msgTypes[4]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *GetWebhookResponse) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*GetWebhookResponse) ProtoMessage() {}
func (x *GetWebhookResponse) ProtoReflect() protoreflect.Message {
mi := &file_api_v2_webhook_service_proto_msgTypes[4]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use GetWebhookResponse.ProtoReflect.Descriptor instead.
func (*GetWebhookResponse) Descriptor() ([]byte, []int) {
return file_api_v2_webhook_service_proto_rawDescGZIP(), []int{4}
}
func (x *GetWebhookResponse) GetWebhook() *Webhook {
if x != nil {
return x.Webhook
}
return nil
}
type ListWebhooksRequest struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
@ -325,7 +232,7 @@ type ListWebhooksRequest struct {
func (x *ListWebhooksRequest) Reset() {
*x = ListWebhooksRequest{}
if protoimpl.UnsafeEnabled {
mi := &file_api_v2_webhook_service_proto_msgTypes[5]
mi := &file_api_v2_webhook_service_proto_msgTypes[3]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@ -338,7 +245,7 @@ func (x *ListWebhooksRequest) String() string {
func (*ListWebhooksRequest) ProtoMessage() {}
func (x *ListWebhooksRequest) ProtoReflect() protoreflect.Message {
mi := &file_api_v2_webhook_service_proto_msgTypes[5]
mi := &file_api_v2_webhook_service_proto_msgTypes[3]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@ -351,7 +258,7 @@ func (x *ListWebhooksRequest) ProtoReflect() protoreflect.Message {
// Deprecated: Use ListWebhooksRequest.ProtoReflect.Descriptor instead.
func (*ListWebhooksRequest) Descriptor() ([]byte, []int) {
return file_api_v2_webhook_service_proto_rawDescGZIP(), []int{5}
return file_api_v2_webhook_service_proto_rawDescGZIP(), []int{3}
}
func (x *ListWebhooksRequest) GetCreatorId() int32 {
@ -372,7 +279,7 @@ type ListWebhooksResponse struct {
func (x *ListWebhooksResponse) Reset() {
*x = ListWebhooksResponse{}
if protoimpl.UnsafeEnabled {
mi := &file_api_v2_webhook_service_proto_msgTypes[6]
mi := &file_api_v2_webhook_service_proto_msgTypes[4]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@ -385,7 +292,7 @@ func (x *ListWebhooksResponse) String() string {
func (*ListWebhooksResponse) ProtoMessage() {}
func (x *ListWebhooksResponse) ProtoReflect() protoreflect.Message {
mi := &file_api_v2_webhook_service_proto_msgTypes[6]
mi := &file_api_v2_webhook_service_proto_msgTypes[4]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@ -398,7 +305,7 @@ func (x *ListWebhooksResponse) ProtoReflect() protoreflect.Message {
// Deprecated: Use ListWebhooksResponse.ProtoReflect.Descriptor instead.
func (*ListWebhooksResponse) Descriptor() ([]byte, []int) {
return file_api_v2_webhook_service_proto_rawDescGZIP(), []int{6}
return file_api_v2_webhook_service_proto_rawDescGZIP(), []int{4}
}
func (x *ListWebhooksResponse) GetWebhooks() []*Webhook {
@ -420,7 +327,7 @@ type UpdateWebhookRequest struct {
func (x *UpdateWebhookRequest) Reset() {
*x = UpdateWebhookRequest{}
if protoimpl.UnsafeEnabled {
mi := &file_api_v2_webhook_service_proto_msgTypes[7]
mi := &file_api_v2_webhook_service_proto_msgTypes[5]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@ -433,7 +340,7 @@ func (x *UpdateWebhookRequest) String() string {
func (*UpdateWebhookRequest) ProtoMessage() {}
func (x *UpdateWebhookRequest) ProtoReflect() protoreflect.Message {
mi := &file_api_v2_webhook_service_proto_msgTypes[7]
mi := &file_api_v2_webhook_service_proto_msgTypes[5]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@ -446,7 +353,7 @@ func (x *UpdateWebhookRequest) ProtoReflect() protoreflect.Message {
// Deprecated: Use UpdateWebhookRequest.ProtoReflect.Descriptor instead.
func (*UpdateWebhookRequest) Descriptor() ([]byte, []int) {
return file_api_v2_webhook_service_proto_rawDescGZIP(), []int{7}
return file_api_v2_webhook_service_proto_rawDescGZIP(), []int{5}
}
func (x *UpdateWebhookRequest) GetWebhook() *Webhook {
@ -463,53 +370,6 @@ func (x *UpdateWebhookRequest) GetUpdateMask() *fieldmaskpb.FieldMask {
return nil
}
type UpdateWebhookResponse struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Webhook *Webhook `protobuf:"bytes,1,opt,name=webhook,proto3" json:"webhook,omitempty"`
}
func (x *UpdateWebhookResponse) Reset() {
*x = UpdateWebhookResponse{}
if protoimpl.UnsafeEnabled {
mi := &file_api_v2_webhook_service_proto_msgTypes[8]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *UpdateWebhookResponse) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*UpdateWebhookResponse) ProtoMessage() {}
func (x *UpdateWebhookResponse) ProtoReflect() protoreflect.Message {
mi := &file_api_v2_webhook_service_proto_msgTypes[8]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use UpdateWebhookResponse.ProtoReflect.Descriptor instead.
func (*UpdateWebhookResponse) Descriptor() ([]byte, []int) {
return file_api_v2_webhook_service_proto_rawDescGZIP(), []int{8}
}
func (x *UpdateWebhookResponse) GetWebhook() *Webhook {
if x != nil {
return x.Webhook
}
return nil
}
type DeleteWebhookRequest struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
@ -521,7 +381,7 @@ type DeleteWebhookRequest struct {
func (x *DeleteWebhookRequest) Reset() {
*x = DeleteWebhookRequest{}
if protoimpl.UnsafeEnabled {
mi := &file_api_v2_webhook_service_proto_msgTypes[9]
mi := &file_api_v2_webhook_service_proto_msgTypes[6]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@ -534,7 +394,7 @@ func (x *DeleteWebhookRequest) String() string {
func (*DeleteWebhookRequest) ProtoMessage() {}
func (x *DeleteWebhookRequest) ProtoReflect() protoreflect.Message {
mi := &file_api_v2_webhook_service_proto_msgTypes[9]
mi := &file_api_v2_webhook_service_proto_msgTypes[6]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@ -547,7 +407,7 @@ func (x *DeleteWebhookRequest) ProtoReflect() protoreflect.Message {
// Deprecated: Use DeleteWebhookRequest.ProtoReflect.Descriptor instead.
func (*DeleteWebhookRequest) Descriptor() ([]byte, []int) {
return file_api_v2_webhook_service_proto_rawDescGZIP(), []int{9}
return file_api_v2_webhook_service_proto_rawDescGZIP(), []int{6}
}
func (x *DeleteWebhookRequest) GetId() int32 {
@ -557,44 +417,6 @@ func (x *DeleteWebhookRequest) GetId() int32 {
return 0
}
type DeleteWebhookResponse struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
}
func (x *DeleteWebhookResponse) Reset() {
*x = DeleteWebhookResponse{}
if protoimpl.UnsafeEnabled {
mi := &file_api_v2_webhook_service_proto_msgTypes[10]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *DeleteWebhookResponse) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*DeleteWebhookResponse) ProtoMessage() {}
func (x *DeleteWebhookResponse) ProtoReflect() protoreflect.Message {
mi := &file_api_v2_webhook_service_proto_msgTypes[10]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use DeleteWebhookResponse.ProtoReflect.Descriptor instead.
func (*DeleteWebhookResponse) Descriptor() ([]byte, []int) {
return file_api_v2_webhook_service_proto_rawDescGZIP(), []int{10}
}
var File_api_v2_webhook_service_proto protoreflect.FileDescriptor
var file_api_v2_webhook_service_proto_rawDesc = []byte{
@ -605,83 +427,68 @@ var file_api_v2_webhook_service_proto_rawDesc = []byte{
0x6f, 0x1a, 0x1c, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x61, 0x6e,
0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a,
0x17, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x63, 0x6c, 0x69, 0x65,
0x6e, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x20, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65,
0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x5f,
0x6d, 0x61, 0x73, 0x6b, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1f, 0x67, 0x6f, 0x6f, 0x67,
0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x74, 0x69, 0x6d, 0x65,
0x73, 0x74, 0x61, 0x6d, 0x70, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x94, 0x02, 0x0a, 0x07,
0x57, 0x65, 0x62, 0x68, 0x6f, 0x6f, 0x6b, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20,
0x01, 0x28, 0x05, 0x52, 0x02, 0x69, 0x64, 0x12, 0x1d, 0x0a, 0x0a, 0x63, 0x72, 0x65, 0x61, 0x74,
0x6f, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x09, 0x63, 0x72, 0x65,
0x61, 0x74, 0x6f, 0x72, 0x49, 0x64, 0x12, 0x3d, 0x0a, 0x0c, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65,
0x64, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67,
0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54,
0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x0b, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65,
0x64, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x3d, 0x0a, 0x0c, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64,
0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f,
0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69,
0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x0b, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64,
0x54, 0x69, 0x6d, 0x65, 0x12, 0x36, 0x0a, 0x0a, 0x72, 0x6f, 0x77, 0x5f, 0x73, 0x74, 0x61, 0x74,
0x75, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x17, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73,
0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x52, 0x6f, 0x77, 0x53, 0x74, 0x61, 0x74, 0x75,
0x73, 0x52, 0x09, 0x72, 0x6f, 0x77, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x12, 0x0a, 0x04,
0x6e, 0x61, 0x6d, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65,
0x12, 0x10, 0x0a, 0x03, 0x75, 0x72, 0x6c, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75,
0x72, 0x6c, 0x22, 0x3c, 0x0a, 0x14, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x57, 0x65, 0x62, 0x68,
0x6f, 0x6f, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61,
0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x10,
0x0a, 0x03, 0x75, 0x72, 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x72, 0x6c,
0x22, 0x48, 0x0a, 0x15, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x57, 0x65, 0x62, 0x68, 0x6f, 0x6f,
0x6b, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x2f, 0x0a, 0x07, 0x77, 0x65, 0x62,
0x68, 0x6f, 0x6f, 0x6b, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x6d, 0x65, 0x6d,
0x6e, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1b, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65,
0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x65, 0x6d, 0x70, 0x74, 0x79, 0x2e,
0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x20, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72,
0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x5f, 0x6d, 0x61, 0x73,
0x6b, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f,
0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61,
0x6d, 0x70, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x94, 0x02, 0x0a, 0x07, 0x57, 0x65, 0x62,
0x68, 0x6f, 0x6f, 0x6b, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05,
0x52, 0x02, 0x69, 0x64, 0x12, 0x1d, 0x0a, 0x0a, 0x63, 0x72, 0x65, 0x61, 0x74, 0x6f, 0x72, 0x5f,
0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x09, 0x63, 0x72, 0x65, 0x61, 0x74, 0x6f,
0x72, 0x49, 0x64, 0x12, 0x3d, 0x0a, 0x0c, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x74,
0x69, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67,
0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65,
0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x0b, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x54, 0x69,
0x6d, 0x65, 0x12, 0x3d, 0x0a, 0x0c, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x74, 0x69,
0x6d, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c,
0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73,
0x74, 0x61, 0x6d, 0x70, 0x52, 0x0b, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x54, 0x69, 0x6d,
0x65, 0x12, 0x36, 0x0a, 0x0a, 0x72, 0x6f, 0x77, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18,
0x05, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x17, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70,
0x69, 0x2e, 0x76, 0x32, 0x2e, 0x52, 0x6f, 0x77, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x09,
0x72, 0x6f, 0x77, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d,
0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x10, 0x0a,
0x03, 0x75, 0x72, 0x6c, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x72, 0x6c, 0x22,
0x3c, 0x0a, 0x14, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x57, 0x65, 0x62, 0x68, 0x6f, 0x6f, 0x6b,
0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18,
0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x75,
0x72, 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x72, 0x6c, 0x22, 0x23, 0x0a,
0x11, 0x47, 0x65, 0x74, 0x57, 0x65, 0x62, 0x68, 0x6f, 0x6f, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65,
0x73, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x02,
0x69, 0x64, 0x22, 0x34, 0x0a, 0x13, 0x4c, 0x69, 0x73, 0x74, 0x57, 0x65, 0x62, 0x68, 0x6f, 0x6f,
0x6b, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1d, 0x0a, 0x0a, 0x63, 0x72, 0x65,
0x61, 0x74, 0x6f, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x09, 0x63,
0x72, 0x65, 0x61, 0x74, 0x6f, 0x72, 0x49, 0x64, 0x22, 0x49, 0x0a, 0x14, 0x4c, 0x69, 0x73, 0x74,
0x57, 0x65, 0x62, 0x68, 0x6f, 0x6f, 0x6b, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65,
0x12, 0x31, 0x0a, 0x08, 0x77, 0x65, 0x62, 0x68, 0x6f, 0x6f, 0x6b, 0x73, 0x18, 0x01, 0x20, 0x03,
0x28, 0x0b, 0x32, 0x15, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76,
0x32, 0x2e, 0x57, 0x65, 0x62, 0x68, 0x6f, 0x6f, 0x6b, 0x52, 0x08, 0x77, 0x65, 0x62, 0x68, 0x6f,
0x6f, 0x6b, 0x73, 0x22, 0x84, 0x01, 0x0a, 0x14, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x57, 0x65,
0x62, 0x68, 0x6f, 0x6f, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x2f, 0x0a, 0x07,
0x77, 0x65, 0x62, 0x68, 0x6f, 0x6f, 0x6b, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e,
0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x57, 0x65, 0x62,
0x68, 0x6f, 0x6f, 0x6b, 0x52, 0x07, 0x77, 0x65, 0x62, 0x68, 0x6f, 0x6f, 0x6b, 0x12, 0x3b, 0x0a,
0x0b, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x5f, 0x6d, 0x61, 0x73, 0x6b, 0x18, 0x02, 0x20, 0x01,
0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74,
0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4d, 0x61, 0x73, 0x6b, 0x52, 0x0a,
0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x4d, 0x61, 0x73, 0x6b, 0x22, 0x26, 0x0a, 0x14, 0x44, 0x65,
0x6c, 0x65, 0x74, 0x65, 0x57, 0x65, 0x62, 0x68, 0x6f, 0x6f, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65,
0x73, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x02,
0x69, 0x64, 0x32, 0xd8, 0x04, 0x0a, 0x0e, 0x57, 0x65, 0x62, 0x68, 0x6f, 0x6f, 0x6b, 0x53, 0x65,
0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x67, 0x0a, 0x0d, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x57,
0x65, 0x62, 0x68, 0x6f, 0x6f, 0x6b, 0x12, 0x22, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61,
0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x57, 0x65, 0x62, 0x68,
0x6f, 0x6f, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x15, 0x2e, 0x6d, 0x65, 0x6d,
0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x57, 0x65, 0x62, 0x68, 0x6f, 0x6f,
0x6b, 0x52, 0x07, 0x77, 0x65, 0x62, 0x68, 0x6f, 0x6f, 0x6b, 0x22, 0x23, 0x0a, 0x11, 0x47, 0x65,
0x74, 0x57, 0x65, 0x62, 0x68, 0x6f, 0x6f, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12,
0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x02, 0x69, 0x64, 0x22,
0x45, 0x0a, 0x12, 0x47, 0x65, 0x74, 0x57, 0x65, 0x62, 0x68, 0x6f, 0x6f, 0x6b, 0x52, 0x65, 0x73,
0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x2f, 0x0a, 0x07, 0x77, 0x65, 0x62, 0x68, 0x6f, 0x6f, 0x6b,
0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61,
0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x57, 0x65, 0x62, 0x68, 0x6f, 0x6f, 0x6b, 0x52, 0x07, 0x77,
0x65, 0x62, 0x68, 0x6f, 0x6f, 0x6b, 0x22, 0x34, 0x0a, 0x13, 0x4c, 0x69, 0x73, 0x74, 0x57, 0x65,
0x62, 0x68, 0x6f, 0x6f, 0x6b, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1d, 0x0a,
0x0a, 0x63, 0x72, 0x65, 0x61, 0x74, 0x6f, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28,
0x05, 0x52, 0x09, 0x63, 0x72, 0x65, 0x61, 0x74, 0x6f, 0x72, 0x49, 0x64, 0x22, 0x49, 0x0a, 0x14,
0x4c, 0x69, 0x73, 0x74, 0x57, 0x65, 0x62, 0x68, 0x6f, 0x6f, 0x6b, 0x73, 0x52, 0x65, 0x73, 0x70,
0x6f, 0x6e, 0x73, 0x65, 0x12, 0x31, 0x0a, 0x08, 0x77, 0x65, 0x62, 0x68, 0x6f, 0x6f, 0x6b, 0x73,
0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61,
0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x57, 0x65, 0x62, 0x68, 0x6f, 0x6f, 0x6b, 0x52, 0x08, 0x77,
0x65, 0x62, 0x68, 0x6f, 0x6f, 0x6b, 0x73, 0x22, 0x84, 0x01, 0x0a, 0x14, 0x55, 0x70, 0x64, 0x61,
0x74, 0x65, 0x57, 0x65, 0x62, 0x68, 0x6f, 0x6f, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74,
0x12, 0x2f, 0x0a, 0x07, 0x77, 0x65, 0x62, 0x68, 0x6f, 0x6f, 0x6b, 0x18, 0x01, 0x20, 0x01, 0x28,
0x0b, 0x32, 0x15, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32,
0x2e, 0x57, 0x65, 0x62, 0x68, 0x6f, 0x6f, 0x6b, 0x52, 0x07, 0x77, 0x65, 0x62, 0x68, 0x6f, 0x6f,
0x6b, 0x12, 0x3b, 0x0a, 0x0b, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x5f, 0x6d, 0x61, 0x73, 0x6b,
0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e,
0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4d, 0x61,
0x73, 0x6b, 0x52, 0x0a, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x4d, 0x61, 0x73, 0x6b, 0x22, 0x48,
0x0a, 0x15, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x57, 0x65, 0x62, 0x68, 0x6f, 0x6f, 0x6b, 0x52,
0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x2f, 0x0a, 0x07, 0x77, 0x65, 0x62, 0x68, 0x6f,
0x6f, 0x6b, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73,
0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x57, 0x65, 0x62, 0x68, 0x6f, 0x6f, 0x6b, 0x52,
0x07, 0x77, 0x65, 0x62, 0x68, 0x6f, 0x6f, 0x6b, 0x22, 0x26, 0x0a, 0x14, 0x44, 0x65, 0x6c, 0x65,
0x74, 0x65, 0x57, 0x65, 0x62, 0x68, 0x6f, 0x6f, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74,
0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x02, 0x69, 0x64,
0x22, 0x17, 0x0a, 0x15, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x57, 0x65, 0x62, 0x68, 0x6f, 0x6f,
0x6b, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x32, 0x8c, 0x05, 0x0a, 0x0e, 0x57, 0x65,
0x62, 0x68, 0x6f, 0x6f, 0x6b, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x75, 0x0a, 0x0d,
0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x57, 0x65, 0x62, 0x68, 0x6f, 0x6f, 0x6b, 0x12, 0x22, 0x2e,
0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x43, 0x72, 0x65,
0x61, 0x74, 0x65, 0x57, 0x65, 0x62, 0x68, 0x6f, 0x6f, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73,
0x74, 0x1a, 0x23, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32,
0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x57, 0x65, 0x62, 0x68, 0x6f, 0x6f, 0x6b, 0x52, 0x65,
0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x1b, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x15, 0x3a, 0x01,
0x2a, 0x22, 0x10, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x32, 0x2f, 0x77, 0x65, 0x62, 0x68, 0x6f,
0x6f, 0x6b, 0x73, 0x12, 0x73, 0x0a, 0x0a, 0x47, 0x65, 0x74, 0x57, 0x65, 0x62, 0x68, 0x6f, 0x6f,
0x6b, 0x12, 0x1f, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32,
0x2e, 0x47, 0x65, 0x74, 0x57, 0x65, 0x62, 0x68, 0x6f, 0x6f, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65,
0x73, 0x74, 0x1a, 0x20, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76,
0x32, 0x2e, 0x47, 0x65, 0x74, 0x57, 0x65, 0x62, 0x68, 0x6f, 0x6f, 0x6b, 0x52, 0x65, 0x73, 0x70,
0x6f, 0x6e, 0x73, 0x65, 0x22, 0x22, 0xda, 0x41, 0x02, 0x69, 0x64, 0x82, 0xd3, 0xe4, 0x93, 0x02,
0x6b, 0x22, 0x1b, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x15, 0x3a, 0x01, 0x2a, 0x22, 0x10, 0x2f, 0x61,
0x70, 0x69, 0x2f, 0x76, 0x32, 0x2f, 0x77, 0x65, 0x62, 0x68, 0x6f, 0x6f, 0x6b, 0x73, 0x12, 0x68,
0x0a, 0x0a, 0x47, 0x65, 0x74, 0x57, 0x65, 0x62, 0x68, 0x6f, 0x6f, 0x6b, 0x12, 0x1f, 0x2e, 0x6d,
0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x47, 0x65, 0x74, 0x57,
0x65, 0x62, 0x68, 0x6f, 0x6f, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x15, 0x2e,
0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x57, 0x65, 0x62,
0x68, 0x6f, 0x6f, 0x6b, 0x22, 0x22, 0xda, 0x41, 0x02, 0x69, 0x64, 0x82, 0xd3, 0xe4, 0x93, 0x02,
0x17, 0x12, 0x15, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x32, 0x2f, 0x77, 0x65, 0x62, 0x68, 0x6f,
0x6f, 0x6b, 0x73, 0x2f, 0x7b, 0x69, 0x64, 0x7d, 0x12, 0x6f, 0x0a, 0x0c, 0x4c, 0x69, 0x73, 0x74,
0x57, 0x65, 0x62, 0x68, 0x6f, 0x6f, 0x6b, 0x73, 0x12, 0x21, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73,
@ -690,36 +497,35 @@ var file_api_v2_webhook_service_proto_rawDesc = []byte{
0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x57,
0x65, 0x62, 0x68, 0x6f, 0x6f, 0x6b, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22,
0x18, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x12, 0x12, 0x10, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x32,
0x2f, 0x77, 0x65, 0x62, 0x68, 0x6f, 0x6f, 0x6b, 0x73, 0x12, 0x9e, 0x01, 0x0a, 0x0d, 0x55, 0x70,
0x2f, 0x77, 0x65, 0x62, 0x68, 0x6f, 0x6f, 0x6b, 0x73, 0x12, 0x90, 0x01, 0x0a, 0x0d, 0x55, 0x70,
0x64, 0x61, 0x74, 0x65, 0x57, 0x65, 0x62, 0x68, 0x6f, 0x6f, 0x6b, 0x12, 0x22, 0x2e, 0x6d, 0x65,
0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74,
0x65, 0x57, 0x65, 0x62, 0x68, 0x6f, 0x6f, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a,
0x23, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x55,
0x70, 0x64, 0x61, 0x74, 0x65, 0x57, 0x65, 0x62, 0x68, 0x6f, 0x6f, 0x6b, 0x52, 0x65, 0x73, 0x70,
0x6f, 0x6e, 0x73, 0x65, 0x22, 0x44, 0xda, 0x41, 0x13, 0x77, 0x65, 0x62, 0x68, 0x6f, 0x6f, 0x6b,
0x2c, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x5f, 0x6d, 0x61, 0x73, 0x6b, 0x82, 0xd3, 0xe4, 0x93,
0x02, 0x28, 0x3a, 0x07, 0x77, 0x65, 0x62, 0x68, 0x6f, 0x6f, 0x6b, 0x32, 0x1d, 0x2f, 0x61, 0x70,
0x69, 0x2f, 0x76, 0x32, 0x2f, 0x77, 0x65, 0x62, 0x68, 0x6f, 0x6f, 0x6b, 0x73, 0x2f, 0x7b, 0x77,
0x65, 0x62, 0x68, 0x6f, 0x6f, 0x6b, 0x2e, 0x69, 0x64, 0x7d, 0x12, 0x7c, 0x0a, 0x0d, 0x44, 0x65,
0x6c, 0x65, 0x74, 0x65, 0x57, 0x65, 0x62, 0x68, 0x6f, 0x6f, 0x6b, 0x12, 0x22, 0x2e, 0x6d, 0x65,
0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74,
0x65, 0x57, 0x65, 0x62, 0x68, 0x6f, 0x6f, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a,
0x23, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x44,
0x65, 0x6c, 0x65, 0x74, 0x65, 0x57, 0x65, 0x62, 0x68, 0x6f, 0x6f, 0x6b, 0x52, 0x65, 0x73, 0x70,
0x6f, 0x6e, 0x73, 0x65, 0x22, 0x22, 0xda, 0x41, 0x02, 0x69, 0x64, 0x82, 0xd3, 0xe4, 0x93, 0x02,
0x17, 0x2a, 0x15, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x32, 0x2f, 0x77, 0x65, 0x62, 0x68, 0x6f,
0x6f, 0x6b, 0x73, 0x2f, 0x7b, 0x69, 0x64, 0x7d, 0x42, 0xab, 0x01, 0x0a, 0x10, 0x63, 0x6f, 0x6d,
0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x42, 0x13, 0x57,
0x65, 0x62, 0x68, 0x6f, 0x6f, 0x6b, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x50, 0x72, 0x6f,
0x74, 0x6f, 0x50, 0x01, 0x5a, 0x30, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d,
0x2f, 0x75, 0x73, 0x65, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2f, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2f,
0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x65, 0x6e, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x32,
0x3b, 0x61, 0x70, 0x69, 0x76, 0x32, 0xa2, 0x02, 0x03, 0x4d, 0x41, 0x58, 0xaa, 0x02, 0x0c, 0x4d,
0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x41, 0x70, 0x69, 0x2e, 0x56, 0x32, 0xca, 0x02, 0x0c, 0x4d, 0x65,
0x6d, 0x6f, 0x73, 0x5c, 0x41, 0x70, 0x69, 0x5c, 0x56, 0x32, 0xe2, 0x02, 0x18, 0x4d, 0x65, 0x6d,
0x6f, 0x73, 0x5c, 0x41, 0x70, 0x69, 0x5c, 0x56, 0x32, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74,
0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x0e, 0x4d, 0x65, 0x6d, 0x6f, 0x73, 0x3a, 0x3a, 0x41,
0x70, 0x69, 0x3a, 0x3a, 0x56, 0x32, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
0x15, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x57,
0x65, 0x62, 0x68, 0x6f, 0x6f, 0x6b, 0x22, 0x44, 0xda, 0x41, 0x13, 0x77, 0x65, 0x62, 0x68, 0x6f,
0x6f, 0x6b, 0x2c, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x5f, 0x6d, 0x61, 0x73, 0x6b, 0x82, 0xd3,
0xe4, 0x93, 0x02, 0x28, 0x3a, 0x07, 0x77, 0x65, 0x62, 0x68, 0x6f, 0x6f, 0x6b, 0x32, 0x1d, 0x2f,
0x61, 0x70, 0x69, 0x2f, 0x76, 0x32, 0x2f, 0x77, 0x65, 0x62, 0x68, 0x6f, 0x6f, 0x6b, 0x73, 0x2f,
0x7b, 0x77, 0x65, 0x62, 0x68, 0x6f, 0x6f, 0x6b, 0x2e, 0x69, 0x64, 0x7d, 0x12, 0x6f, 0x0a, 0x0d,
0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x57, 0x65, 0x62, 0x68, 0x6f, 0x6f, 0x6b, 0x12, 0x22, 0x2e,
0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x44, 0x65, 0x6c,
0x65, 0x74, 0x65, 0x57, 0x65, 0x62, 0x68, 0x6f, 0x6f, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73,
0x74, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f,
0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x22, 0xda, 0x41, 0x02, 0x69, 0x64,
0x82, 0xd3, 0xe4, 0x93, 0x02, 0x17, 0x2a, 0x15, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x32, 0x2f,
0x77, 0x65, 0x62, 0x68, 0x6f, 0x6f, 0x6b, 0x73, 0x2f, 0x7b, 0x69, 0x64, 0x7d, 0x42, 0xab, 0x01,
0x0a, 0x10, 0x63, 0x6f, 0x6d, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e,
0x76, 0x32, 0x42, 0x13, 0x57, 0x65, 0x62, 0x68, 0x6f, 0x6f, 0x6b, 0x53, 0x65, 0x72, 0x76, 0x69,
0x63, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x30, 0x67, 0x69, 0x74, 0x68, 0x75,
0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x75, 0x73, 0x65, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2f, 0x6d,
0x65, 0x6d, 0x6f, 0x73, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x65, 0x6e, 0x2f, 0x61,
0x70, 0x69, 0x2f, 0x76, 0x32, 0x3b, 0x61, 0x70, 0x69, 0x76, 0x32, 0xa2, 0x02, 0x03, 0x4d, 0x41,
0x58, 0xaa, 0x02, 0x0c, 0x4d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x41, 0x70, 0x69, 0x2e, 0x56, 0x32,
0xca, 0x02, 0x0c, 0x4d, 0x65, 0x6d, 0x6f, 0x73, 0x5c, 0x41, 0x70, 0x69, 0x5c, 0x56, 0x32, 0xe2,
0x02, 0x18, 0x4d, 0x65, 0x6d, 0x6f, 0x73, 0x5c, 0x41, 0x70, 0x69, 0x5c, 0x56, 0x32, 0x5c, 0x47,
0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x0e, 0x4d, 0x65, 0x6d,
0x6f, 0x73, 0x3a, 0x3a, 0x41, 0x70, 0x69, 0x3a, 0x3a, 0x56, 0x32, 0x62, 0x06, 0x70, 0x72, 0x6f,
0x74, 0x6f, 0x33,
}
var (
@ -734,48 +540,42 @@ func file_api_v2_webhook_service_proto_rawDescGZIP() []byte {
return file_api_v2_webhook_service_proto_rawDescData
}
var file_api_v2_webhook_service_proto_msgTypes = make([]protoimpl.MessageInfo, 11)
var file_api_v2_webhook_service_proto_msgTypes = make([]protoimpl.MessageInfo, 7)
var file_api_v2_webhook_service_proto_goTypes = []interface{}{
(*Webhook)(nil), // 0: memos.api.v2.Webhook
(*CreateWebhookRequest)(nil), // 1: memos.api.v2.CreateWebhookRequest
(*CreateWebhookResponse)(nil), // 2: memos.api.v2.CreateWebhookResponse
(*GetWebhookRequest)(nil), // 3: memos.api.v2.GetWebhookRequest
(*GetWebhookResponse)(nil), // 4: memos.api.v2.GetWebhookResponse
(*ListWebhooksRequest)(nil), // 5: memos.api.v2.ListWebhooksRequest
(*ListWebhooksResponse)(nil), // 6: memos.api.v2.ListWebhooksResponse
(*UpdateWebhookRequest)(nil), // 7: memos.api.v2.UpdateWebhookRequest
(*UpdateWebhookResponse)(nil), // 8: memos.api.v2.UpdateWebhookResponse
(*DeleteWebhookRequest)(nil), // 9: memos.api.v2.DeleteWebhookRequest
(*DeleteWebhookResponse)(nil), // 10: memos.api.v2.DeleteWebhookResponse
(*timestamppb.Timestamp)(nil), // 11: google.protobuf.Timestamp
(RowStatus)(0), // 12: memos.api.v2.RowStatus
(*fieldmaskpb.FieldMask)(nil), // 13: google.protobuf.FieldMask
(*GetWebhookRequest)(nil), // 2: memos.api.v2.GetWebhookRequest
(*ListWebhooksRequest)(nil), // 3: memos.api.v2.ListWebhooksRequest
(*ListWebhooksResponse)(nil), // 4: memos.api.v2.ListWebhooksResponse
(*UpdateWebhookRequest)(nil), // 5: memos.api.v2.UpdateWebhookRequest
(*DeleteWebhookRequest)(nil), // 6: memos.api.v2.DeleteWebhookRequest
(*timestamppb.Timestamp)(nil), // 7: google.protobuf.Timestamp
(RowStatus)(0), // 8: memos.api.v2.RowStatus
(*fieldmaskpb.FieldMask)(nil), // 9: google.protobuf.FieldMask
(*emptypb.Empty)(nil), // 10: google.protobuf.Empty
}
var file_api_v2_webhook_service_proto_depIdxs = []int32{
11, // 0: memos.api.v2.Webhook.created_time:type_name -> google.protobuf.Timestamp
11, // 1: memos.api.v2.Webhook.updated_time:type_name -> google.protobuf.Timestamp
12, // 2: memos.api.v2.Webhook.row_status:type_name -> memos.api.v2.RowStatus
0, // 3: memos.api.v2.CreateWebhookResponse.webhook:type_name -> memos.api.v2.Webhook
0, // 4: memos.api.v2.GetWebhookResponse.webhook:type_name -> memos.api.v2.Webhook
0, // 5: memos.api.v2.ListWebhooksResponse.webhooks:type_name -> memos.api.v2.Webhook
0, // 6: memos.api.v2.UpdateWebhookRequest.webhook:type_name -> memos.api.v2.Webhook
13, // 7: memos.api.v2.UpdateWebhookRequest.update_mask:type_name -> google.protobuf.FieldMask
0, // 8: memos.api.v2.UpdateWebhookResponse.webhook:type_name -> memos.api.v2.Webhook
1, // 9: memos.api.v2.WebhookService.CreateWebhook:input_type -> memos.api.v2.CreateWebhookRequest
3, // 10: memos.api.v2.WebhookService.GetWebhook:input_type -> memos.api.v2.GetWebhookRequest
5, // 11: memos.api.v2.WebhookService.ListWebhooks:input_type -> memos.api.v2.ListWebhooksRequest
7, // 12: memos.api.v2.WebhookService.UpdateWebhook:input_type -> memos.api.v2.UpdateWebhookRequest
9, // 13: memos.api.v2.WebhookService.DeleteWebhook:input_type -> memos.api.v2.DeleteWebhookRequest
2, // 14: memos.api.v2.WebhookService.CreateWebhook:output_type -> memos.api.v2.CreateWebhookResponse
4, // 15: memos.api.v2.WebhookService.GetWebhook:output_type -> memos.api.v2.GetWebhookResponse
6, // 16: memos.api.v2.WebhookService.ListWebhooks:output_type -> memos.api.v2.ListWebhooksResponse
8, // 17: memos.api.v2.WebhookService.UpdateWebhook:output_type -> memos.api.v2.UpdateWebhookResponse
10, // 18: memos.api.v2.WebhookService.DeleteWebhook:output_type -> memos.api.v2.DeleteWebhookResponse
14, // [14:19] is the sub-list for method output_type
9, // [9:14] is the sub-list for method input_type
9, // [9:9] is the sub-list for extension type_name
9, // [9:9] is the sub-list for extension extendee
0, // [0:9] is the sub-list for field type_name
7, // 0: memos.api.v2.Webhook.created_time:type_name -> google.protobuf.Timestamp
7, // 1: memos.api.v2.Webhook.updated_time:type_name -> google.protobuf.Timestamp
8, // 2: memos.api.v2.Webhook.row_status:type_name -> memos.api.v2.RowStatus
0, // 3: memos.api.v2.ListWebhooksResponse.webhooks:type_name -> memos.api.v2.Webhook
0, // 4: memos.api.v2.UpdateWebhookRequest.webhook:type_name -> memos.api.v2.Webhook
9, // 5: memos.api.v2.UpdateWebhookRequest.update_mask:type_name -> google.protobuf.FieldMask
1, // 6: memos.api.v2.WebhookService.CreateWebhook:input_type -> memos.api.v2.CreateWebhookRequest
2, // 7: memos.api.v2.WebhookService.GetWebhook:input_type -> memos.api.v2.GetWebhookRequest
3, // 8: memos.api.v2.WebhookService.ListWebhooks:input_type -> memos.api.v2.ListWebhooksRequest
5, // 9: memos.api.v2.WebhookService.UpdateWebhook:input_type -> memos.api.v2.UpdateWebhookRequest
6, // 10: memos.api.v2.WebhookService.DeleteWebhook:input_type -> memos.api.v2.DeleteWebhookRequest
0, // 11: memos.api.v2.WebhookService.CreateWebhook:output_type -> memos.api.v2.Webhook
0, // 12: memos.api.v2.WebhookService.GetWebhook:output_type -> memos.api.v2.Webhook
4, // 13: memos.api.v2.WebhookService.ListWebhooks:output_type -> memos.api.v2.ListWebhooksResponse
0, // 14: memos.api.v2.WebhookService.UpdateWebhook:output_type -> memos.api.v2.Webhook
10, // 15: memos.api.v2.WebhookService.DeleteWebhook:output_type -> google.protobuf.Empty
11, // [11:16] is the sub-list for method output_type
6, // [6:11] is the sub-list for method input_type
6, // [6:6] is the sub-list for extension type_name
6, // [6:6] is the sub-list for extension extendee
0, // [0:6] is the sub-list for field type_name
}
func init() { file_api_v2_webhook_service_proto_init() }
@ -810,18 +610,6 @@ func file_api_v2_webhook_service_proto_init() {
}
}
file_api_v2_webhook_service_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*CreateWebhookResponse); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_api_v2_webhook_service_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*GetWebhookRequest); i {
case 0:
return &v.state
@ -833,19 +621,7 @@ func file_api_v2_webhook_service_proto_init() {
return nil
}
}
file_api_v2_webhook_service_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*GetWebhookResponse); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_api_v2_webhook_service_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} {
file_api_v2_webhook_service_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*ListWebhooksRequest); i {
case 0:
return &v.state
@ -857,7 +633,7 @@ func file_api_v2_webhook_service_proto_init() {
return nil
}
}
file_api_v2_webhook_service_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} {
file_api_v2_webhook_service_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*ListWebhooksResponse); i {
case 0:
return &v.state
@ -869,7 +645,7 @@ func file_api_v2_webhook_service_proto_init() {
return nil
}
}
file_api_v2_webhook_service_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} {
file_api_v2_webhook_service_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*UpdateWebhookRequest); i {
case 0:
return &v.state
@ -881,19 +657,7 @@ func file_api_v2_webhook_service_proto_init() {
return nil
}
}
file_api_v2_webhook_service_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*UpdateWebhookResponse); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_api_v2_webhook_service_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} {
file_api_v2_webhook_service_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*DeleteWebhookRequest); i {
case 0:
return &v.state
@ -905,18 +669,6 @@ func file_api_v2_webhook_service_proto_init() {
return nil
}
}
file_api_v2_webhook_service_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*DeleteWebhookResponse); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
}
type x struct{}
out := protoimpl.TypeBuilder{
@ -924,7 +676,7 @@ func file_api_v2_webhook_service_proto_init() {
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: file_api_v2_webhook_service_proto_rawDesc,
NumEnums: 0,
NumMessages: 11,
NumMessages: 7,
NumExtensions: 0,
NumServices: 1,
},

View file

@ -11,6 +11,7 @@ import (
grpc "google.golang.org/grpc"
codes "google.golang.org/grpc/codes"
status "google.golang.org/grpc/status"
emptypb "google.golang.org/protobuf/types/known/emptypb"
)
// This is a compile-time assertion to ensure that this generated file
@ -31,15 +32,15 @@ const (
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
type WebhookServiceClient interface {
// CreateWebhook creates a new webhook.
CreateWebhook(ctx context.Context, in *CreateWebhookRequest, opts ...grpc.CallOption) (*CreateWebhookResponse, error)
CreateWebhook(ctx context.Context, in *CreateWebhookRequest, opts ...grpc.CallOption) (*Webhook, error)
// GetWebhook returns a webhook by id.
GetWebhook(ctx context.Context, in *GetWebhookRequest, opts ...grpc.CallOption) (*GetWebhookResponse, error)
GetWebhook(ctx context.Context, in *GetWebhookRequest, opts ...grpc.CallOption) (*Webhook, error)
// ListWebhooks returns a list of webhooks.
ListWebhooks(ctx context.Context, in *ListWebhooksRequest, opts ...grpc.CallOption) (*ListWebhooksResponse, error)
// UpdateWebhook updates a webhook.
UpdateWebhook(ctx context.Context, in *UpdateWebhookRequest, opts ...grpc.CallOption) (*UpdateWebhookResponse, error)
UpdateWebhook(ctx context.Context, in *UpdateWebhookRequest, opts ...grpc.CallOption) (*Webhook, error)
// DeleteWebhook deletes a webhook by id.
DeleteWebhook(ctx context.Context, in *DeleteWebhookRequest, opts ...grpc.CallOption) (*DeleteWebhookResponse, error)
DeleteWebhook(ctx context.Context, in *DeleteWebhookRequest, opts ...grpc.CallOption) (*emptypb.Empty, error)
}
type webhookServiceClient struct {
@ -50,8 +51,8 @@ func NewWebhookServiceClient(cc grpc.ClientConnInterface) WebhookServiceClient {
return &webhookServiceClient{cc}
}
func (c *webhookServiceClient) CreateWebhook(ctx context.Context, in *CreateWebhookRequest, opts ...grpc.CallOption) (*CreateWebhookResponse, error) {
out := new(CreateWebhookResponse)
func (c *webhookServiceClient) CreateWebhook(ctx context.Context, in *CreateWebhookRequest, opts ...grpc.CallOption) (*Webhook, error) {
out := new(Webhook)
err := c.cc.Invoke(ctx, WebhookService_CreateWebhook_FullMethodName, in, out, opts...)
if err != nil {
return nil, err
@ -59,8 +60,8 @@ func (c *webhookServiceClient) CreateWebhook(ctx context.Context, in *CreateWebh
return out, nil
}
func (c *webhookServiceClient) GetWebhook(ctx context.Context, in *GetWebhookRequest, opts ...grpc.CallOption) (*GetWebhookResponse, error) {
out := new(GetWebhookResponse)
func (c *webhookServiceClient) GetWebhook(ctx context.Context, in *GetWebhookRequest, opts ...grpc.CallOption) (*Webhook, error) {
out := new(Webhook)
err := c.cc.Invoke(ctx, WebhookService_GetWebhook_FullMethodName, in, out, opts...)
if err != nil {
return nil, err
@ -77,8 +78,8 @@ func (c *webhookServiceClient) ListWebhooks(ctx context.Context, in *ListWebhook
return out, nil
}
func (c *webhookServiceClient) UpdateWebhook(ctx context.Context, in *UpdateWebhookRequest, opts ...grpc.CallOption) (*UpdateWebhookResponse, error) {
out := new(UpdateWebhookResponse)
func (c *webhookServiceClient) UpdateWebhook(ctx context.Context, in *UpdateWebhookRequest, opts ...grpc.CallOption) (*Webhook, error) {
out := new(Webhook)
err := c.cc.Invoke(ctx, WebhookService_UpdateWebhook_FullMethodName, in, out, opts...)
if err != nil {
return nil, err
@ -86,8 +87,8 @@ func (c *webhookServiceClient) UpdateWebhook(ctx context.Context, in *UpdateWebh
return out, nil
}
func (c *webhookServiceClient) DeleteWebhook(ctx context.Context, in *DeleteWebhookRequest, opts ...grpc.CallOption) (*DeleteWebhookResponse, error) {
out := new(DeleteWebhookResponse)
func (c *webhookServiceClient) DeleteWebhook(ctx context.Context, in *DeleteWebhookRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) {
out := new(emptypb.Empty)
err := c.cc.Invoke(ctx, WebhookService_DeleteWebhook_FullMethodName, in, out, opts...)
if err != nil {
return nil, err
@ -100,15 +101,15 @@ func (c *webhookServiceClient) DeleteWebhook(ctx context.Context, in *DeleteWebh
// for forward compatibility
type WebhookServiceServer interface {
// CreateWebhook creates a new webhook.
CreateWebhook(context.Context, *CreateWebhookRequest) (*CreateWebhookResponse, error)
CreateWebhook(context.Context, *CreateWebhookRequest) (*Webhook, error)
// GetWebhook returns a webhook by id.
GetWebhook(context.Context, *GetWebhookRequest) (*GetWebhookResponse, error)
GetWebhook(context.Context, *GetWebhookRequest) (*Webhook, error)
// ListWebhooks returns a list of webhooks.
ListWebhooks(context.Context, *ListWebhooksRequest) (*ListWebhooksResponse, error)
// UpdateWebhook updates a webhook.
UpdateWebhook(context.Context, *UpdateWebhookRequest) (*UpdateWebhookResponse, error)
UpdateWebhook(context.Context, *UpdateWebhookRequest) (*Webhook, error)
// DeleteWebhook deletes a webhook by id.
DeleteWebhook(context.Context, *DeleteWebhookRequest) (*DeleteWebhookResponse, error)
DeleteWebhook(context.Context, *DeleteWebhookRequest) (*emptypb.Empty, error)
mustEmbedUnimplementedWebhookServiceServer()
}
@ -116,19 +117,19 @@ type WebhookServiceServer interface {
type UnimplementedWebhookServiceServer struct {
}
func (UnimplementedWebhookServiceServer) CreateWebhook(context.Context, *CreateWebhookRequest) (*CreateWebhookResponse, error) {
func (UnimplementedWebhookServiceServer) CreateWebhook(context.Context, *CreateWebhookRequest) (*Webhook, error) {
return nil, status.Errorf(codes.Unimplemented, "method CreateWebhook not implemented")
}
func (UnimplementedWebhookServiceServer) GetWebhook(context.Context, *GetWebhookRequest) (*GetWebhookResponse, error) {
func (UnimplementedWebhookServiceServer) GetWebhook(context.Context, *GetWebhookRequest) (*Webhook, error) {
return nil, status.Errorf(codes.Unimplemented, "method GetWebhook not implemented")
}
func (UnimplementedWebhookServiceServer) ListWebhooks(context.Context, *ListWebhooksRequest) (*ListWebhooksResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method ListWebhooks not implemented")
}
func (UnimplementedWebhookServiceServer) UpdateWebhook(context.Context, *UpdateWebhookRequest) (*UpdateWebhookResponse, error) {
func (UnimplementedWebhookServiceServer) UpdateWebhook(context.Context, *UpdateWebhookRequest) (*Webhook, error) {
return nil, status.Errorf(codes.Unimplemented, "method UpdateWebhook not implemented")
}
func (UnimplementedWebhookServiceServer) DeleteWebhook(context.Context, *DeleteWebhookRequest) (*DeleteWebhookResponse, error) {
func (UnimplementedWebhookServiceServer) DeleteWebhook(context.Context, *DeleteWebhookRequest) (*emptypb.Empty, error) {
return nil, status.Errorf(codes.Unimplemented, "method DeleteWebhook not implemented")
}
func (UnimplementedWebhookServiceServer) mustEmbedUnimplementedWebhookServiceServer() {}

File diff suppressed because it is too large Load diff

View file

@ -31,9 +31,9 @@ type WorkspaceSettingServiceClient interface {
// ListWorkspaceSetting returns the list of settings.
ListWorkspaceSettings(ctx context.Context, in *ListWorkspaceSettingsRequest, opts ...grpc.CallOption) (*ListWorkspaceSettingsResponse, error)
// GetWorkspaceSetting returns the setting by name.
GetWorkspaceSetting(ctx context.Context, in *GetWorkspaceSettingRequest, opts ...grpc.CallOption) (*GetWorkspaceSettingResponse, error)
GetWorkspaceSetting(ctx context.Context, in *GetWorkspaceSettingRequest, opts ...grpc.CallOption) (*WorkspaceSetting, error)
// SetWorkspaceSetting updates the setting.
SetWorkspaceSetting(ctx context.Context, in *SetWorkspaceSettingRequest, opts ...grpc.CallOption) (*SetWorkspaceSettingResponse, error)
SetWorkspaceSetting(ctx context.Context, in *SetWorkspaceSettingRequest, opts ...grpc.CallOption) (*WorkspaceSetting, error)
}
type workspaceSettingServiceClient struct {
@ -53,8 +53,8 @@ func (c *workspaceSettingServiceClient) ListWorkspaceSettings(ctx context.Contex
return out, nil
}
func (c *workspaceSettingServiceClient) GetWorkspaceSetting(ctx context.Context, in *GetWorkspaceSettingRequest, opts ...grpc.CallOption) (*GetWorkspaceSettingResponse, error) {
out := new(GetWorkspaceSettingResponse)
func (c *workspaceSettingServiceClient) GetWorkspaceSetting(ctx context.Context, in *GetWorkspaceSettingRequest, opts ...grpc.CallOption) (*WorkspaceSetting, error) {
out := new(WorkspaceSetting)
err := c.cc.Invoke(ctx, WorkspaceSettingService_GetWorkspaceSetting_FullMethodName, in, out, opts...)
if err != nil {
return nil, err
@ -62,8 +62,8 @@ func (c *workspaceSettingServiceClient) GetWorkspaceSetting(ctx context.Context,
return out, nil
}
func (c *workspaceSettingServiceClient) SetWorkspaceSetting(ctx context.Context, in *SetWorkspaceSettingRequest, opts ...grpc.CallOption) (*SetWorkspaceSettingResponse, error) {
out := new(SetWorkspaceSettingResponse)
func (c *workspaceSettingServiceClient) SetWorkspaceSetting(ctx context.Context, in *SetWorkspaceSettingRequest, opts ...grpc.CallOption) (*WorkspaceSetting, error) {
out := new(WorkspaceSetting)
err := c.cc.Invoke(ctx, WorkspaceSettingService_SetWorkspaceSetting_FullMethodName, in, out, opts...)
if err != nil {
return nil, err
@ -78,9 +78,9 @@ type WorkspaceSettingServiceServer interface {
// ListWorkspaceSetting returns the list of settings.
ListWorkspaceSettings(context.Context, *ListWorkspaceSettingsRequest) (*ListWorkspaceSettingsResponse, error)
// GetWorkspaceSetting returns the setting by name.
GetWorkspaceSetting(context.Context, *GetWorkspaceSettingRequest) (*GetWorkspaceSettingResponse, error)
GetWorkspaceSetting(context.Context, *GetWorkspaceSettingRequest) (*WorkspaceSetting, error)
// SetWorkspaceSetting updates the setting.
SetWorkspaceSetting(context.Context, *SetWorkspaceSettingRequest) (*SetWorkspaceSettingResponse, error)
SetWorkspaceSetting(context.Context, *SetWorkspaceSettingRequest) (*WorkspaceSetting, error)
mustEmbedUnimplementedWorkspaceSettingServiceServer()
}
@ -91,10 +91,10 @@ type UnimplementedWorkspaceSettingServiceServer struct {
func (UnimplementedWorkspaceSettingServiceServer) ListWorkspaceSettings(context.Context, *ListWorkspaceSettingsRequest) (*ListWorkspaceSettingsResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method ListWorkspaceSettings not implemented")
}
func (UnimplementedWorkspaceSettingServiceServer) GetWorkspaceSetting(context.Context, *GetWorkspaceSettingRequest) (*GetWorkspaceSettingResponse, error) {
func (UnimplementedWorkspaceSettingServiceServer) GetWorkspaceSetting(context.Context, *GetWorkspaceSettingRequest) (*WorkspaceSetting, error) {
return nil, status.Errorf(codes.Unimplemented, "method GetWorkspaceSetting not implemented")
}
func (UnimplementedWorkspaceSettingServiceServer) SetWorkspaceSetting(context.Context, *SetWorkspaceSettingRequest) (*SetWorkspaceSettingResponse, error) {
func (UnimplementedWorkspaceSettingServiceServer) SetWorkspaceSetting(context.Context, *SetWorkspaceSettingRequest) (*WorkspaceSetting, error) {
return nil, status.Errorf(codes.Unimplemented, "method SetWorkspaceSetting not implemented")
}
func (UnimplementedWorkspaceSettingServiceServer) mustEmbedUnimplementedWorkspaceSettingServiceServer() {

View file

@ -13,12 +13,13 @@ import (
"github.com/yourselfhosted/gomark/restore"
"google.golang.org/grpc/codes"
"google.golang.org/grpc/status"
"google.golang.org/protobuf/types/known/emptypb"
apiv2pb "github.com/usememos/memos/proto/gen/api/v2"
"github.com/usememos/memos/store"
)
func (s *APIV2Service) UpsertTag(ctx context.Context, request *apiv2pb.UpsertTagRequest) (*apiv2pb.UpsertTagResponse, error) {
func (s *APIV2Service) UpsertTag(ctx context.Context, request *apiv2pb.UpsertTagRequest) (*apiv2pb.Tag, error) {
user, err := getCurrentUser(ctx, s.Store)
if err != nil {
return nil, status.Errorf(codes.Internal, "failed to get user")
@ -32,22 +33,20 @@ func (s *APIV2Service) UpsertTag(ctx context.Context, request *apiv2pb.UpsertTag
return nil, status.Errorf(codes.Internal, "failed to upsert tag: %v", err)
}
t, err := s.convertTagFromStore(ctx, tag)
tagMessage, err := s.convertTagFromStore(ctx, tag)
if err != nil {
return nil, status.Errorf(codes.Internal, "failed to convert tag: %v", err)
}
return &apiv2pb.UpsertTagResponse{
Tag: t,
}, nil
return tagMessage, nil
}
func (s *APIV2Service) BatchUpsertTag(ctx context.Context, request *apiv2pb.BatchUpsertTagRequest) (*apiv2pb.BatchUpsertTagResponse, error) {
func (s *APIV2Service) BatchUpsertTag(ctx context.Context, request *apiv2pb.BatchUpsertTagRequest) (*emptypb.Empty, error) {
for _, r := range request.Requests {
if _, err := s.UpsertTag(ctx, r); err != nil {
return nil, status.Errorf(codes.Internal, "failed to batch upsert tags: %v", err)
}
}
return &apiv2pb.BatchUpsertTagResponse{}, nil
return &emptypb.Empty{}, nil
}
func (s *APIV2Service) ListTags(ctx context.Context, _ *apiv2pb.ListTagsRequest) (*apiv2pb.ListTagsResponse, error) {
@ -77,7 +76,7 @@ func (s *APIV2Service) ListTags(ctx context.Context, _ *apiv2pb.ListTagsRequest)
return response, nil
}
func (s *APIV2Service) RenameTag(ctx context.Context, request *apiv2pb.RenameTagRequest) (*apiv2pb.RenameTagResponse, error) {
func (s *APIV2Service) RenameTag(ctx context.Context, request *apiv2pb.RenameTagRequest) (*emptypb.Empty, error) {
userID, err := ExtractUserIDFromName(request.User)
if err != nil {
return nil, status.Errorf(codes.InvalidArgument, "invalid user name: %v", err)
@ -127,22 +126,17 @@ func (s *APIV2Service) RenameTag(ctx context.Context, request *apiv2pb.RenameTag
}); err != nil {
return nil, status.Errorf(codes.Internal, "failed to delete tag: %v", err)
}
tag, err := s.Store.UpsertTag(ctx, &store.Tag{
if _, err := s.Store.UpsertTag(ctx, &store.Tag{
CreatorID: user.ID,
Name: request.NewName,
})
if err != nil {
}); err != nil {
return nil, status.Errorf(codes.Internal, "failed to upsert tag: %v", err)
}
tagMessage, err := s.convertTagFromStore(ctx, tag)
if err != nil {
return nil, status.Errorf(codes.Internal, "failed to convert tag: %v", err)
}
return &apiv2pb.RenameTagResponse{Tag: tagMessage}, nil
return &emptypb.Empty{}, nil
}
func (s *APIV2Service) DeleteTag(ctx context.Context, request *apiv2pb.DeleteTagRequest) (*apiv2pb.DeleteTagResponse, error) {
func (s *APIV2Service) DeleteTag(ctx context.Context, request *apiv2pb.DeleteTagRequest) (*emptypb.Empty, error) {
userID, err := ExtractUserIDFromName(request.Tag.Creator)
if err != nil {
return nil, status.Errorf(codes.InvalidArgument, "invalid user name: %v", err)
@ -163,7 +157,7 @@ func (s *APIV2Service) DeleteTag(ctx context.Context, request *apiv2pb.DeleteTag
return nil, status.Errorf(codes.Internal, "failed to delete tag: %v", err)
}
return &apiv2pb.DeleteTagResponse{}, nil
return &emptypb.Empty{}, nil
}
func (s *APIV2Service) GetTagSuggestions(ctx context.Context, request *apiv2pb.GetTagSuggestionsRequest) (*apiv2pb.GetTagSuggestionsResponse, error) {

View file

@ -16,6 +16,7 @@ import (
expr "google.golang.org/genproto/googleapis/api/expr/v1alpha1"
"google.golang.org/grpc/codes"
"google.golang.org/grpc/status"
"google.golang.org/protobuf/types/known/emptypb"
"google.golang.org/protobuf/types/known/timestamppb"
"github.com/usememos/memos/internal/util"
@ -81,7 +82,7 @@ func (s *APIV2Service) SearchUsers(ctx context.Context, request *apiv2pb.SearchU
return response, nil
}
func (s *APIV2Service) GetUser(ctx context.Context, request *apiv2pb.GetUserRequest) (*apiv2pb.GetUserResponse, error) {
func (s *APIV2Service) GetUser(ctx context.Context, request *apiv2pb.GetUserRequest) (*apiv2pb.User, error) {
userID, err := ExtractUserIDFromName(request.Name)
if err != nil {
return nil, status.Errorf(codes.InvalidArgument, "invalid user name: %v", err)
@ -96,14 +97,10 @@ func (s *APIV2Service) GetUser(ctx context.Context, request *apiv2pb.GetUserRequ
return nil, status.Errorf(codes.NotFound, "user not found")
}
userMessage := convertUserFromStore(user)
response := &apiv2pb.GetUserResponse{
User: userMessage,
}
return response, nil
return convertUserFromStore(user), nil
}
func (s *APIV2Service) CreateUser(ctx context.Context, request *apiv2pb.CreateUserRequest) (*apiv2pb.CreateUserResponse, error) {
func (s *APIV2Service) CreateUser(ctx context.Context, request *apiv2pb.CreateUserRequest) (*apiv2pb.User, error) {
currentUser, err := getCurrentUser(ctx, s.Store)
if err != nil {
return nil, status.Errorf(codes.Internal, "failed to get user: %v", err)
@ -130,13 +127,10 @@ func (s *APIV2Service) CreateUser(ctx context.Context, request *apiv2pb.CreateUs
return nil, status.Errorf(codes.Internal, "failed to create user: %v", err)
}
response := &apiv2pb.CreateUserResponse{
User: convertUserFromStore(user),
}
return response, nil
return convertUserFromStore(user), nil
}
func (s *APIV2Service) UpdateUser(ctx context.Context, request *apiv2pb.UpdateUserRequest) (*apiv2pb.UpdateUserResponse, error) {
func (s *APIV2Service) UpdateUser(ctx context.Context, request *apiv2pb.UpdateUserRequest) (*apiv2pb.User, error) {
userID, err := ExtractUserIDFromName(request.User.Name)
if err != nil {
return nil, status.Errorf(codes.InvalidArgument, "invalid user name: %v", err)
@ -202,13 +196,10 @@ func (s *APIV2Service) UpdateUser(ctx context.Context, request *apiv2pb.UpdateUs
return nil, status.Errorf(codes.Internal, "failed to update user: %v", err)
}
response := &apiv2pb.UpdateUserResponse{
User: convertUserFromStore(updatedUser),
}
return response, nil
return convertUserFromStore(updatedUser), nil
}
func (s *APIV2Service) DeleteUser(ctx context.Context, request *apiv2pb.DeleteUserRequest) (*apiv2pb.DeleteUserResponse, error) {
func (s *APIV2Service) DeleteUser(ctx context.Context, request *apiv2pb.DeleteUserRequest) (*emptypb.Empty, error) {
userID, err := ExtractUserIDFromName(request.Name)
if err != nil {
return nil, status.Errorf(codes.InvalidArgument, "invalid user name: %v", err)
@ -235,7 +226,7 @@ func (s *APIV2Service) DeleteUser(ctx context.Context, request *apiv2pb.DeleteUs
return nil, status.Errorf(codes.Internal, "failed to delete user: %v", err)
}
return &apiv2pb.DeleteUserResponse{}, nil
return &emptypb.Empty{}, nil
}
func getDefaultUserSetting() *apiv2pb.UserSetting {
@ -246,7 +237,7 @@ func getDefaultUserSetting() *apiv2pb.UserSetting {
}
}
func (s *APIV2Service) GetUserSetting(ctx context.Context, _ *apiv2pb.GetUserSettingRequest) (*apiv2pb.GetUserSettingResponse, error) {
func (s *APIV2Service) GetUserSetting(ctx context.Context, _ *apiv2pb.GetUserSettingRequest) (*apiv2pb.UserSetting, error) {
user, err := getCurrentUser(ctx, s.Store)
if err != nil {
return nil, status.Errorf(codes.Internal, "failed to get current user: %v", err)
@ -268,12 +259,10 @@ func (s *APIV2Service) GetUserSetting(ctx context.Context, _ *apiv2pb.GetUserSet
userSettingMessage.MemoVisibility = setting.GetMemoVisibility()
}
}
return &apiv2pb.GetUserSettingResponse{
Setting: userSettingMessage,
}, nil
return userSettingMessage, nil
}
func (s *APIV2Service) UpdateUserSetting(ctx context.Context, request *apiv2pb.UpdateUserSettingRequest) (*apiv2pb.UpdateUserSettingResponse, error) {
func (s *APIV2Service) UpdateUserSetting(ctx context.Context, request *apiv2pb.UpdateUserSettingRequest) (*apiv2pb.UserSetting, error) {
user, err := getCurrentUser(ctx, s.Store)
if err != nil {
return nil, status.Errorf(codes.Internal, "failed to get current user: %v", err)
@ -319,13 +308,7 @@ func (s *APIV2Service) UpdateUserSetting(ctx context.Context, request *apiv2pb.U
}
}
userSettingResponse, err := s.GetUserSetting(ctx, &apiv2pb.GetUserSettingRequest{})
if err != nil {
return nil, status.Errorf(codes.Internal, "failed to get user setting: %v", err)
}
return &apiv2pb.UpdateUserSettingResponse{
Setting: userSettingResponse.Setting,
}, nil
return s.GetUserSetting(ctx, &apiv2pb.GetUserSettingRequest{})
}
func (s *APIV2Service) ListUserAccessTokens(ctx context.Context, _ *apiv2pb.ListUserAccessTokensRequest) (*apiv2pb.ListUserAccessTokensResponse, error) {
@ -382,7 +365,7 @@ func (s *APIV2Service) ListUserAccessTokens(ctx context.Context, _ *apiv2pb.List
return response, nil
}
func (s *APIV2Service) CreateUserAccessToken(ctx context.Context, request *apiv2pb.CreateUserAccessTokenRequest) (*apiv2pb.CreateUserAccessTokenResponse, error) {
func (s *APIV2Service) CreateUserAccessToken(ctx context.Context, request *apiv2pb.CreateUserAccessTokenRequest) (*apiv2pb.UserAccessToken, error) {
user, err := getCurrentUser(ctx, s.Store)
if err != nil {
return nil, status.Errorf(codes.Internal, "failed to get current user: %v", err)
@ -427,13 +410,10 @@ func (s *APIV2Service) CreateUserAccessToken(ctx context.Context, request *apiv2
if claims.ExpiresAt != nil {
userAccessToken.ExpiresAt = timestamppb.New(claims.ExpiresAt.Time)
}
response := &apiv2pb.CreateUserAccessTokenResponse{
AccessToken: userAccessToken,
}
return response, nil
return userAccessToken, nil
}
func (s *APIV2Service) DeleteUserAccessToken(ctx context.Context, request *apiv2pb.DeleteUserAccessTokenRequest) (*apiv2pb.DeleteUserAccessTokenResponse, error) {
func (s *APIV2Service) DeleteUserAccessToken(ctx context.Context, request *apiv2pb.DeleteUserAccessTokenRequest) (*emptypb.Empty, error) {
user, err := getCurrentUser(ctx, s.Store)
if err != nil {
return nil, status.Errorf(codes.Internal, "failed to get current user: %v", err)
@ -462,7 +442,7 @@ func (s *APIV2Service) DeleteUserAccessToken(ctx context.Context, request *apiv2
return nil, status.Errorf(codes.Internal, "failed to upsert user setting: %v", err)
}
return &apiv2pb.DeleteUserAccessTokenResponse{}, nil
return &emptypb.Empty{}, nil
}
func (s *APIV2Service) UpsertAccessTokenToStore(ctx context.Context, user *store.User, accessToken, description string) error {

View file

@ -6,13 +6,14 @@ import (
"google.golang.org/grpc/codes"
"google.golang.org/grpc/status"
"google.golang.org/protobuf/types/known/emptypb"
"google.golang.org/protobuf/types/known/timestamppb"
apiv2pb "github.com/usememos/memos/proto/gen/api/v2"
"github.com/usememos/memos/store"
)
func (s *APIV2Service) CreateWebhook(ctx context.Context, request *apiv2pb.CreateWebhookRequest) (*apiv2pb.CreateWebhookResponse, error) {
func (s *APIV2Service) CreateWebhook(ctx context.Context, request *apiv2pb.CreateWebhookRequest) (*apiv2pb.Webhook, error) {
currentUser, err := getCurrentUser(ctx, s.Store)
if err != nil {
return nil, status.Errorf(codes.Internal, "failed to get user: %v", err)
@ -26,9 +27,7 @@ func (s *APIV2Service) CreateWebhook(ctx context.Context, request *apiv2pb.Creat
if err != nil {
return nil, status.Errorf(codes.Internal, "failed to create webhook, error: %+v", err)
}
return &apiv2pb.CreateWebhookResponse{
Webhook: convertWebhookFromStore(webhook),
}, nil
return convertWebhookFromStore(webhook), nil
}
func (s *APIV2Service) ListWebhooks(ctx context.Context, request *apiv2pb.ListWebhooksRequest) (*apiv2pb.ListWebhooksResponse, error) {
@ -48,7 +47,7 @@ func (s *APIV2Service) ListWebhooks(ctx context.Context, request *apiv2pb.ListWe
return response, nil
}
func (s *APIV2Service) GetWebhook(ctx context.Context, request *apiv2pb.GetWebhookRequest) (*apiv2pb.GetWebhookResponse, error) {
func (s *APIV2Service) GetWebhook(ctx context.Context, request *apiv2pb.GetWebhookRequest) (*apiv2pb.Webhook, error) {
currentUser, err := getCurrentUser(ctx, s.Store)
if err != nil {
return nil, status.Errorf(codes.Internal, "failed to get user: %v", err)
@ -64,12 +63,10 @@ func (s *APIV2Service) GetWebhook(ctx context.Context, request *apiv2pb.GetWebho
if webhook == nil {
return nil, status.Errorf(codes.NotFound, "webhook not found")
}
return &apiv2pb.GetWebhookResponse{
Webhook: convertWebhookFromStore(webhook),
}, nil
return convertWebhookFromStore(webhook), nil
}
func (s *APIV2Service) UpdateWebhook(ctx context.Context, request *apiv2pb.UpdateWebhookRequest) (*apiv2pb.UpdateWebhookResponse, error) {
func (s *APIV2Service) UpdateWebhook(ctx context.Context, request *apiv2pb.UpdateWebhookRequest) (*apiv2pb.Webhook, error) {
if request.UpdateMask == nil || len(request.UpdateMask.Paths) == 0 {
return nil, status.Errorf(codes.InvalidArgument, "update_mask is required")
}
@ -91,19 +88,17 @@ func (s *APIV2Service) UpdateWebhook(ctx context.Context, request *apiv2pb.Updat
if err != nil {
return nil, status.Errorf(codes.Internal, "failed to update webhook, error: %+v", err)
}
return &apiv2pb.UpdateWebhookResponse{
Webhook: convertWebhookFromStore(webhook),
}, nil
return convertWebhookFromStore(webhook), nil
}
func (s *APIV2Service) DeleteWebhook(ctx context.Context, request *apiv2pb.DeleteWebhookRequest) (*apiv2pb.DeleteWebhookResponse, error) {
func (s *APIV2Service) DeleteWebhook(ctx context.Context, request *apiv2pb.DeleteWebhookRequest) (*emptypb.Empty, error) {
err := s.Store.DeleteWebhook(ctx, &store.DeleteWebhook{
ID: request.Id,
})
if err != nil {
return nil, status.Errorf(codes.Internal, "failed to delete webhook, error: %+v", err)
}
return &apiv2pb.DeleteWebhookResponse{}, nil
return &emptypb.Empty{}, nil
}
func convertWebhookFromStore(webhook *store.Webhook) *apiv2pb.Webhook {

View file

@ -30,7 +30,7 @@ func (s *APIV2Service) ListWorkspaceSettings(ctx context.Context, _ *apiv2pb.Lis
return response, nil
}
func (s *APIV2Service) GetWorkspaceSetting(ctx context.Context, request *apiv2pb.GetWorkspaceSettingRequest) (*apiv2pb.GetWorkspaceSettingResponse, error) {
func (s *APIV2Service) GetWorkspaceSetting(ctx context.Context, request *apiv2pb.GetWorkspaceSettingRequest) (*apiv2pb.WorkspaceSetting, error) {
settingKeyString, err := ExtractWorkspaceSettingKeyFromName(request.Name)
if err != nil {
return nil, status.Errorf(codes.InvalidArgument, "invalid workspace setting name: %v", err)
@ -46,12 +46,10 @@ func (s *APIV2Service) GetWorkspaceSetting(ctx context.Context, request *apiv2pb
return nil, status.Errorf(codes.NotFound, "workspace setting not found")
}
return &apiv2pb.GetWorkspaceSettingResponse{
Setting: convertWorkspaceSettingFromStore(workspaceSetting),
}, nil
return convertWorkspaceSettingFromStore(workspaceSetting), nil
}
func (s *APIV2Service) SetWorkspaceSetting(ctx context.Context, request *apiv2pb.SetWorkspaceSettingRequest) (*apiv2pb.SetWorkspaceSettingResponse, error) {
func (s *APIV2Service) SetWorkspaceSetting(ctx context.Context, request *apiv2pb.SetWorkspaceSettingRequest) (*apiv2pb.WorkspaceSetting, error) {
if s.Profile.Mode == "demo" {
return nil, status.Errorf(codes.InvalidArgument, "setting workspace setting is not allowed in demo mode")
}
@ -64,11 +62,12 @@ func (s *APIV2Service) SetWorkspaceSetting(ctx context.Context, request *apiv2pb
return nil, status.Errorf(codes.PermissionDenied, "permission denied")
}
if _, err := s.Store.UpsertWorkspaceSetting(ctx, convertWorkspaceSettingToStore(request.Setting)); err != nil {
workspaceSetting, err := s.Store.UpsertWorkspaceSetting(ctx, convertWorkspaceSettingToStore(request.Setting))
if err != nil {
return nil, status.Errorf(codes.Internal, "failed to upsert workspace setting: %v", err)
}
return &apiv2pb.SetWorkspaceSettingResponse{}, nil
return convertWorkspaceSettingFromStore(workspaceSetting), nil
}
func convertWorkspaceSettingFromStore(setting *storepb.WorkspaceSetting) *apiv2pb.WorkspaceSetting {

View file

@ -15,12 +15,12 @@ export const useTagStore = create(
setState: (state: State) => set(state),
getState: () => get(),
fetchTags: async (options?: { skipCache: boolean }) => {
const { tags } = get();
if (tags.size && !options?.skipCache) {
return tags;
const { tags: tagsCache } = get();
if (tagsCache.size && !options?.skipCache) {
return tagsCache;
}
const res = await tagServiceClient.listTags({});
set({ tags: new Set(res.tags.map((tag) => tag.name)) });
const { tags } = await tagServiceClient.listTags({});
set({ tags: new Set(tags.map((tag) => tag.name)) });
return tags;
},
upsertTag: async (tagName: string) => {

View file

@ -52,7 +52,7 @@ export const useUserStore = create(
.getUser({
name: name,
})
.then(({ user }) => user);
.then((user) => user);
requestCache.set(name, promisedUser);
const user = await promisedUser;
if (!user) {
@ -88,13 +88,10 @@ export const useUserStore = create(
return userMap[name];
},
updateUser: async (user: Partial<User>, updateMask: string[]) => {
const { user: updatedUser } = await userServiceClient.updateUser({
const updatedUser = await userServiceClient.updateUser({
user: user,
updateMask: updateMask,
});
if (!updatedUser) {
throw new Error("User not found");
}
const userMap = get().userMapByName;
if (user.name && user.name !== updatedUser.name) {
delete userMap[user.name];
@ -119,7 +116,7 @@ export const useUserStore = create(
const userMap = get().userMapByName;
userMap[user.name] = user;
set({ currentUser: user.name, userMapByName: userMap });
const { setting } = await userServiceClient.getUserSetting({});
const setting = await userServiceClient.getUserSetting({});
set({
userSetting: UserSetting.fromPartial({
...getDefaultUserSetting(),
@ -129,13 +126,10 @@ export const useUserStore = create(
return user;
},
updateUserSetting: async (userSetting: Partial<UserSetting>, updateMask: string[]) => {
const { setting: updatedUserSetting } = await userServiceClient.updateUserSetting({
const updatedUserSetting = await userServiceClient.updateUserSetting({
setting: userSetting,
updateMask: updateMask,
});
if (!updatedUserSetting) {
throw new Error("User setting not found");
}
set({ userSetting: updatedUserSetting });
return updatedUserSetting;
},

View file

@ -23,10 +23,7 @@ export const useWorkspaceSettingStore = create(
set({ workspaceSettingByName: settings.reduce((acc, setting) => ({ ...acc, [setting.name]: setting }), {}) });
},
fetchWorkspaceSetting: async (key: WorkspaceSettingKey) => {
const { setting } = await workspaceSettingServiceClient.getWorkspaceSetting({ name: `${WorkspaceSettingPrefix}${key}` });
if (!setting) {
throw new Error("Workspace setting not found");
}
const setting = await workspaceSettingServiceClient.getWorkspaceSetting({ name: `${WorkspaceSettingPrefix}${key}` });
set({ workspaceSettingByName: { ...get().workspaceSettingByName, [setting.name]: setting } });
},
getWorkspaceSettingByKey: (key: WorkspaceSettingKey): WorkspaceSetting => {