diff --git a/bin/memos/main.go b/bin/memos/main.go index 0feec6b0..b5ad0c7f 100644 --- a/bin/memos/main.go +++ b/bin/memos/main.go @@ -160,7 +160,7 @@ func initConfig() { var err error instanceProfile, err = profile.GetProfile() if err != nil { - fmt.Printf("failed to get profile, error: %+v\n", err) + slog.Error("failed to get profile", err) return } diff --git a/docs/apidocs.swagger.yaml b/docs/apidocs.swagger.yaml index c5ceb335..9cd3ae31 100644 --- a/docs/apidocs.swagger.yaml +++ b/docs/apidocs.swagger.yaml @@ -8,7 +8,7 @@ tags: - name: AuthService - name: IdentityProviderService - name: InboxService - - name: LinkService + - name: MarkdownService - name: ResourceService - name: MemoService - name: TagService @@ -219,15 +219,15 @@ paths: type: string tags: - InboxService - /api/v1/linkMetadata: + /api/v1/markdown/link:metadata: get: summary: GetLinkMetadata returns metadata for a given link. - operationId: LinkService_GetLinkMetadata + operationId: MarkdownService_GetLinkMetadata responses: "200": description: A successful response. schema: - $ref: '#/definitions/v1GetLinkMetadataResponse' + $ref: '#/definitions/v1LinkMetadata' default: description: An unexpected error response. schema: @@ -238,7 +238,49 @@ paths: required: false type: string tags: - - LinkService + - MarkdownService + /api/v1/markdown/parse: + post: + summary: Parses the given markdown content and returns a list of nodes. + operationId: MarkdownService_ParseMarkdown + responses: + "200": + description: A successful response. + schema: + $ref: '#/definitions/v1ParseMarkdownResponse' + default: + description: An unexpected error response. + schema: + $ref: '#/definitions/googlerpcStatus' + parameters: + - name: body + in: body + required: true + schema: + $ref: '#/definitions/v1ParseMarkdownRequest' + tags: + - MarkdownService + /api/v1/markdown:restore: + post: + summary: Restores the given nodes to markdown content. + operationId: MarkdownService_RestoreMarkdown + responses: + "200": + description: A successful response. + schema: + $ref: '#/definitions/v1RestoreMarkdownResponse' + default: + description: An unexpected error response. + schema: + $ref: '#/definitions/googlerpcStatus' + parameters: + - name: body + in: body + required: true + schema: + $ref: '#/definitions/v1RestoreMarkdownRequest' + tags: + - MarkdownService /api/v1/memos: get: summary: ListMemos lists memos with pagination and filter. @@ -994,6 +1036,12 @@ paths: format: date-time content: type: string + nodes: + type: array + items: + type: object + $ref: '#/definitions/v1Node' + readOnly: true visibility: $ref: '#/definitions/v1Visibility' pinned: @@ -1729,6 +1777,13 @@ definitions: properties: reaction: $ref: '#/definitions/v1Reaction' + TableNodeRow: + type: object + properties: + cells: + type: array + items: + type: string UserRole: type: string enum: @@ -1987,6 +2042,13 @@ definitions: payload: $ref: '#/definitions/apiv1ActivityPayload' description: The payload of the activity. + v1AutoLinkNode: + type: object + properties: + url: + type: string + isRawText: + type: boolean v1BatchUpsertTagRequest: type: object properties: @@ -1995,6 +2057,43 @@ definitions: items: type: object $ref: '#/definitions/v1UpsertTagRequest' + v1BlockquoteNode: + type: object + properties: + children: + type: array + items: + type: object + $ref: '#/definitions/v1Node' + v1BoldItalicNode: + type: object + properties: + symbol: + type: string + content: + type: string + v1BoldNode: + type: object + properties: + symbol: + type: string + children: + type: array + items: + type: object + $ref: '#/definitions/v1Node' + v1CodeBlockNode: + type: object + properties: + language: + type: string + content: + type: string + v1CodeNode: + type: object + properties: + content: + type: string v1CreateMemoRequest: type: object properties: @@ -2009,6 +2108,18 @@ definitions: type: string url: type: string + v1EmbeddedContentNode: + type: object + properties: + resourceName: + type: string + params: + type: string + v1EscapingCharacterNode: + type: object + properties: + symbol: + type: string v1ExportMemosRequest: type: object properties: @@ -2021,11 +2132,6 @@ definitions: content: type: string format: byte - v1GetLinkMetadataResponse: - type: object - properties: - linkMetadata: - $ref: '#/definitions/v1LinkMetadata' v1GetTagSuggestionsResponse: type: object properties: @@ -2044,6 +2150,34 @@ definitions: description: |- stats is the stats of memo creating/updating activities. key is the year-month-day string. e.g. "2020-01-01". + v1HeadingNode: + type: object + properties: + level: + type: integer + format: int32 + children: + type: array + items: + type: object + $ref: '#/definitions/v1Node' + v1HighlightNode: + type: object + properties: + content: + type: string + v1HorizontalRuleNode: + type: object + properties: + symbol: + type: string + v1ImageNode: + type: object + properties: + altText: + type: string + url: + type: string v1Inbox: type: object properties: @@ -2082,6 +2216,15 @@ definitions: - TYPE_MEMO_COMMENT - TYPE_VERSION_UPDATE default: TYPE_UNSPECIFIED + v1ItalicNode: + type: object + properties: + symbol: + type: string + content: + type: string + v1LineBreakNode: + type: object v1LinkMetadata: type: object properties: @@ -2091,6 +2234,13 @@ definitions: type: string image: type: string + v1LinkNode: + type: object + properties: + text: + type: string + url: + type: string v1ListIdentityProvidersResponse: type: object properties: @@ -2200,6 +2350,16 @@ definitions: items: type: object $ref: '#/definitions/apiv1WorkspaceSetting' + v1MathBlockNode: + type: object + properties: + content: + type: string + v1MathNode: + type: object + properties: + content: + type: string v1Memo: type: object properties: @@ -2230,6 +2390,12 @@ definitions: format: date-time content: type: string + nodes: + type: array + items: + type: object + $ref: '#/definitions/v1Node' + readOnly: true visibility: $ref: '#/definitions/v1Visibility' pinned: @@ -2278,6 +2444,137 @@ definitions: - REFERENCE - COMMENT default: TYPE_UNSPECIFIED + v1Node: + type: object + properties: + type: + $ref: '#/definitions/v1NodeType' + lineBreakNode: + $ref: '#/definitions/v1LineBreakNode' + paragraphNode: + $ref: '#/definitions/v1ParagraphNode' + codeBlockNode: + $ref: '#/definitions/v1CodeBlockNode' + headingNode: + $ref: '#/definitions/v1HeadingNode' + horizontalRuleNode: + $ref: '#/definitions/v1HorizontalRuleNode' + blockquoteNode: + $ref: '#/definitions/v1BlockquoteNode' + orderedListNode: + $ref: '#/definitions/v1OrderedListNode' + unorderedListNode: + $ref: '#/definitions/v1UnorderedListNode' + taskListNode: + $ref: '#/definitions/v1TaskListNode' + mathBlockNode: + $ref: '#/definitions/v1MathBlockNode' + tableNode: + $ref: '#/definitions/v1TableNode' + embeddedContentNode: + $ref: '#/definitions/v1EmbeddedContentNode' + textNode: + $ref: '#/definitions/v1TextNode' + boldNode: + $ref: '#/definitions/v1BoldNode' + italicNode: + $ref: '#/definitions/v1ItalicNode' + boldItalicNode: + $ref: '#/definitions/v1BoldItalicNode' + codeNode: + $ref: '#/definitions/v1CodeNode' + imageNode: + $ref: '#/definitions/v1ImageNode' + linkNode: + $ref: '#/definitions/v1LinkNode' + autoLinkNode: + $ref: '#/definitions/v1AutoLinkNode' + tagNode: + $ref: '#/definitions/v1TagNode' + strikethroughNode: + $ref: '#/definitions/v1StrikethroughNode' + escapingCharacterNode: + $ref: '#/definitions/v1EscapingCharacterNode' + mathNode: + $ref: '#/definitions/v1MathNode' + highlightNode: + $ref: '#/definitions/v1HighlightNode' + subscriptNode: + $ref: '#/definitions/v1SubscriptNode' + superscriptNode: + $ref: '#/definitions/v1SuperscriptNode' + referencedContentNode: + $ref: '#/definitions/v1ReferencedContentNode' + spoilerNode: + $ref: '#/definitions/v1SpoilerNode' + v1NodeType: + type: string + enum: + - NODE_UNSPECIFIED + - LINE_BREAK + - PARAGRAPH + - CODE_BLOCK + - HEADING + - HORIZONTAL_RULE + - BLOCKQUOTE + - ORDERED_LIST + - UNORDERED_LIST + - TASK_LIST + - MATH_BLOCK + - TABLE + - EMBEDDED_CONTENT + - TEXT + - BOLD + - ITALIC + - BOLD_ITALIC + - CODE + - IMAGE + - LINK + - AUTO_LINK + - TAG + - STRIKETHROUGH + - ESCAPING_CHARACTER + - MATH + - HIGHLIGHT + - SUBSCRIPT + - SUPERSCRIPT + - REFERENCED_CONTENT + - SPOILER + default: NODE_UNSPECIFIED + v1OrderedListNode: + type: object + properties: + number: + type: string + indent: + type: integer + format: int32 + children: + type: array + items: + type: object + $ref: '#/definitions/v1Node' + v1ParagraphNode: + type: object + properties: + children: + type: array + items: + type: object + $ref: '#/definitions/v1Node' + v1ParseMarkdownRequest: + type: object + properties: + markdown: + type: string + v1ParseMarkdownResponse: + type: object + properties: + nodes: + type: array + items: + type: object + $ref: '#/definitions/v1Node' v1Reaction: type: object properties: @@ -2310,6 +2607,13 @@ definitions: - CLOWN_FACE - QUESTION_MARK default: TYPE_UNSPECIFIED + v1ReferencedContentNode: + type: object + properties: + resourceName: + type: string + params: + type: string v1RenameTagRequest: type: object properties: @@ -2355,6 +2659,19 @@ definitions: title: |- The related memo. Format: memos/{id} + v1RestoreMarkdownRequest: + type: object + properties: + nodes: + type: array + items: + type: object + $ref: '#/definitions/v1Node' + v1RestoreMarkdownResponse: + type: object + properties: + markdown: + type: string v1RowStatus: type: string enum: @@ -2386,6 +2703,42 @@ definitions: items: type: object $ref: '#/definitions/v1User' + v1SpoilerNode: + type: object + properties: + content: + type: string + v1StrikethroughNode: + type: object + properties: + content: + type: string + v1SubscriptNode: + type: object + properties: + content: + type: string + v1SuperscriptNode: + type: object + properties: + content: + type: string + v1TableNode: + type: object + properties: + header: + type: array + items: + type: string + delimiter: + type: array + items: + type: string + rows: + type: array + items: + type: object + $ref: '#/definitions/TableNodeRow' v1Tag: type: object properties: @@ -2396,6 +2749,44 @@ definitions: title: |- The creator of tags. Format: users/{id} + v1TagNode: + type: object + properties: + content: + type: string + v1TaskListNode: + type: object + properties: + symbol: + type: string + indent: + type: integer + format: int32 + complete: + type: boolean + children: + type: array + items: + type: object + $ref: '#/definitions/v1Node' + v1TextNode: + type: object + properties: + content: + type: string + v1UnorderedListNode: + type: object + properties: + symbol: + type: string + indent: + type: integer + format: int32 + children: + type: array + items: + type: object + $ref: '#/definitions/v1Node' v1UpsertTagRequest: type: object properties: diff --git a/plugin/http-getter/html_meta.go b/plugin/http-getter/html_meta.go index 4105ece0..a4c24ef2 100644 --- a/plugin/http-getter/html_meta.go +++ b/plugin/http-getter/html_meta.go @@ -32,7 +32,7 @@ func GetHTMLMeta(urlStr string) (*HTMLMeta, error) { return nil, err } if mediatype != "text/html" { - return nil, errors.New("Wrong website mediatype") + return nil, errors.New("not a HTML page") } htmlMeta := extractHTMLMeta(response.Body) diff --git a/proto/api/v1/link_service.proto b/proto/api/v1/link_service.proto deleted file mode 100644 index f75baa6e..00000000 --- a/proto/api/v1/link_service.proto +++ /dev/null @@ -1,28 +0,0 @@ -syntax = "proto3"; - -package memos.api.v1; - -import "google/api/annotations.proto"; - -option go_package = "gen/api/v1"; - -service LinkService { - // GetLinkMetadata returns metadata for a given link. - rpc GetLinkMetadata(GetLinkMetadataRequest) returns (GetLinkMetadataResponse) { - option (google.api.http) = {get: "/api/v1/linkMetadata"}; - } -} - -message GetLinkMetadataRequest { - string link = 1; -} - -message GetLinkMetadataResponse { - LinkMetadata link_metadata = 1; -} - -message LinkMetadata { - string title = 1; - string description = 2; - string image = 3; -} diff --git a/proto/api/v1/markdown_service.proto b/proto/api/v1/markdown_service.proto new file mode 100644 index 00000000..02235891 --- /dev/null +++ b/proto/api/v1/markdown_service.proto @@ -0,0 +1,259 @@ +syntax = "proto3"; + +package memos.api.v1; + +import "google/api/annotations.proto"; + +option go_package = "gen/api/v1"; + +service MarkdownService { + // Parses the given markdown content and returns a list of nodes. + rpc ParseMarkdown(ParseMarkdownRequest) returns (ParseMarkdownResponse) { + option (google.api.http) = { + post: "/api/v1/markdown/parse" + body: "*" + }; + } + // Restores the given nodes to markdown content. + rpc RestoreMarkdown(RestoreMarkdownRequest) returns (RestoreMarkdownResponse) { + option (google.api.http) = { + post: "/api/v1/markdown:restore" + body: "*" + }; + } + // GetLinkMetadata returns metadata for a given link. + rpc GetLinkMetadata(GetLinkMetadataRequest) returns (LinkMetadata) { + option (google.api.http) = {get: "/api/v1/markdown/link:metadata"}; + } +} + +message ParseMarkdownRequest { + string markdown = 1; +} + +message ParseMarkdownResponse { + repeated Node nodes = 1; +} + +message RestoreMarkdownRequest { + repeated Node nodes = 1; +} + +message RestoreMarkdownResponse { + string markdown = 1; +} + +message GetLinkMetadataRequest { + string link = 1; +} + +message LinkMetadata { + string title = 1; + string description = 2; + string image = 3; +} + +enum NodeType { + NODE_UNSPECIFIED = 0; + LINE_BREAK = 1; + PARAGRAPH = 2; + CODE_BLOCK = 3; + HEADING = 4; + HORIZONTAL_RULE = 5; + BLOCKQUOTE = 6; + ORDERED_LIST = 7; + UNORDERED_LIST = 8; + TASK_LIST = 9; + MATH_BLOCK = 10; + TABLE = 11; + EMBEDDED_CONTENT = 12; + TEXT = 13; + BOLD = 14; + ITALIC = 15; + BOLD_ITALIC = 16; + CODE = 17; + IMAGE = 18; + LINK = 19; + AUTO_LINK = 20; + TAG = 21; + STRIKETHROUGH = 22; + ESCAPING_CHARACTER = 23; + MATH = 24; + HIGHLIGHT = 25; + SUBSCRIPT = 26; + SUPERSCRIPT = 27; + REFERENCED_CONTENT = 28; + SPOILER = 29; +} + +message Node { + NodeType type = 1; + oneof node { + LineBreakNode line_break_node = 2; + ParagraphNode paragraph_node = 3; + CodeBlockNode code_block_node = 4; + HeadingNode heading_node = 5; + HorizontalRuleNode horizontal_rule_node = 6; + BlockquoteNode blockquote_node = 7; + OrderedListNode ordered_list_node = 8; + UnorderedListNode unordered_list_node = 9; + TaskListNode task_list_node = 10; + MathBlockNode math_block_node = 11; + TableNode table_node = 12; + EmbeddedContentNode embedded_content_node = 13; + TextNode text_node = 14; + BoldNode bold_node = 15; + ItalicNode italic_node = 16; + BoldItalicNode bold_italic_node = 17; + CodeNode code_node = 18; + ImageNode image_node = 19; + LinkNode link_node = 20; + AutoLinkNode auto_link_node = 21; + TagNode tag_node = 22; + StrikethroughNode strikethrough_node = 23; + EscapingCharacterNode escaping_character_node = 24; + MathNode math_node = 25; + HighlightNode highlight_node = 26; + SubscriptNode subscript_node = 27; + SuperscriptNode superscript_node = 28; + ReferencedContentNode referenced_content_node = 29; + SpoilerNode spoiler_node = 30; + } +} + +message LineBreakNode {} + +message ParagraphNode { + repeated Node children = 1; +} + +message CodeBlockNode { + string language = 1; + string content = 2; +} + +message HeadingNode { + int32 level = 1; + repeated Node children = 2; +} + +message HorizontalRuleNode { + string symbol = 1; +} + +message BlockquoteNode { + repeated Node children = 1; +} + +message OrderedListNode { + string number = 1; + int32 indent = 2; + repeated Node children = 3; +} + +message UnorderedListNode { + string symbol = 1; + int32 indent = 2; + repeated Node children = 3; +} + +message TaskListNode { + string symbol = 1; + int32 indent = 2; + bool complete = 3; + repeated Node children = 4; +} + +message MathBlockNode { + string content = 1; +} + +message TableNode { + repeated string header = 1; + repeated string delimiter = 2; + + message Row { + repeated string cells = 1; + } + repeated Row rows = 3; +} + +message EmbeddedContentNode { + string resource_name = 1; + string params = 2; +} + +message TextNode { + string content = 1; +} + +message BoldNode { + string symbol = 1; + repeated Node children = 2; +} + +message ItalicNode { + string symbol = 1; + string content = 2; +} + +message BoldItalicNode { + string symbol = 1; + string content = 2; +} + +message CodeNode { + string content = 1; +} + +message ImageNode { + string alt_text = 1; + string url = 2; +} + +message LinkNode { + string text = 1; + string url = 2; +} + +message AutoLinkNode { + string url = 1; + bool is_raw_text = 2; +} + +message TagNode { + string content = 1; +} + +message StrikethroughNode { + string content = 1; +} + +message EscapingCharacterNode { + string symbol = 1; +} + +message MathNode { + string content = 1; +} + +message HighlightNode { + string content = 1; +} + +message SubscriptNode { + string content = 1; +} + +message SuperscriptNode { + string content = 1; +} + +message ReferencedContentNode { + string resource_name = 1; + string params = 2; +} + +message SpoilerNode { + string content = 1; +} diff --git a/proto/api/v1/memo_service.proto b/proto/api/v1/memo_service.proto index 318ccae8..92eb226d 100644 --- a/proto/api/v1/memo_service.proto +++ b/proto/api/v1/memo_service.proto @@ -3,6 +3,7 @@ syntax = "proto3"; package memos.api.v1; import "api/v1/common.proto"; +import "api/v1/markdown_service.proto"; import "api/v1/memo_relation_service.proto"; import "api/v1/reaction_service.proto"; import "api/v1/resource_service.proto"; @@ -146,21 +147,23 @@ message Memo { google.protobuf.Timestamp update_time = 6; - google.protobuf.Timestamp display_time = 78; + google.protobuf.Timestamp display_time = 7; string content = 8; - Visibility visibility = 9; + repeated Node nodes = 9 [(google.api.field_behavior) = OUTPUT_ONLY]; - bool pinned = 10; + Visibility visibility = 10; - optional int32 parent_id = 11 [(google.api.field_behavior) = OUTPUT_ONLY]; + bool pinned = 11; - repeated Resource resources = 12 [(google.api.field_behavior) = OUTPUT_ONLY]; + optional int32 parent_id = 12 [(google.api.field_behavior) = OUTPUT_ONLY]; - repeated MemoRelation relations = 13 [(google.api.field_behavior) = OUTPUT_ONLY]; + repeated Resource resources = 13 [(google.api.field_behavior) = OUTPUT_ONLY]; - repeated Reaction reactions = 14 [(google.api.field_behavior) = OUTPUT_ONLY]; + repeated MemoRelation relations = 14 [(google.api.field_behavior) = OUTPUT_ONLY]; + + repeated Reaction reactions = 15 [(google.api.field_behavior) = OUTPUT_ONLY]; } message CreateMemoRequest { diff --git a/proto/gen/api/v1/link_service.pb.go b/proto/gen/api/v1/link_service.pb.go deleted file mode 100644 index c3badb40..00000000 --- a/proto/gen/api/v1/link_service.pb.go +++ /dev/null @@ -1,315 +0,0 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.33.0 -// protoc (unknown) -// source: api/v1/link_service.proto - -package apiv1 - -import ( - _ "google.golang.org/genproto/googleapis/api/annotations" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - reflect "reflect" - sync "sync" -) - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -type GetLinkMetadataRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Link string `protobuf:"bytes,1,opt,name=link,proto3" json:"link,omitempty"` -} - -func (x *GetLinkMetadataRequest) Reset() { - *x = GetLinkMetadataRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_api_v1_link_service_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *GetLinkMetadataRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GetLinkMetadataRequest) ProtoMessage() {} - -func (x *GetLinkMetadataRequest) ProtoReflect() protoreflect.Message { - mi := &file_api_v1_link_service_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use GetLinkMetadataRequest.ProtoReflect.Descriptor instead. -func (*GetLinkMetadataRequest) Descriptor() ([]byte, []int) { - return file_api_v1_link_service_proto_rawDescGZIP(), []int{0} -} - -func (x *GetLinkMetadataRequest) GetLink() string { - if x != nil { - return x.Link - } - return "" -} - -type GetLinkMetadataResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - LinkMetadata *LinkMetadata `protobuf:"bytes,1,opt,name=link_metadata,json=linkMetadata,proto3" json:"link_metadata,omitempty"` -} - -func (x *GetLinkMetadataResponse) Reset() { - *x = GetLinkMetadataResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_api_v1_link_service_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *GetLinkMetadataResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GetLinkMetadataResponse) ProtoMessage() {} - -func (x *GetLinkMetadataResponse) ProtoReflect() protoreflect.Message { - mi := &file_api_v1_link_service_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use GetLinkMetadataResponse.ProtoReflect.Descriptor instead. -func (*GetLinkMetadataResponse) Descriptor() ([]byte, []int) { - return file_api_v1_link_service_proto_rawDescGZIP(), []int{1} -} - -func (x *GetLinkMetadataResponse) GetLinkMetadata() *LinkMetadata { - if x != nil { - return x.LinkMetadata - } - return nil -} - -type LinkMetadata struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Title string `protobuf:"bytes,1,opt,name=title,proto3" json:"title,omitempty"` - Description string `protobuf:"bytes,2,opt,name=description,proto3" json:"description,omitempty"` - Image string `protobuf:"bytes,3,opt,name=image,proto3" json:"image,omitempty"` -} - -func (x *LinkMetadata) Reset() { - *x = LinkMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_api_v1_link_service_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *LinkMetadata) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*LinkMetadata) ProtoMessage() {} - -func (x *LinkMetadata) ProtoReflect() protoreflect.Message { - mi := &file_api_v1_link_service_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use LinkMetadata.ProtoReflect.Descriptor instead. -func (*LinkMetadata) Descriptor() ([]byte, []int) { - return file_api_v1_link_service_proto_rawDescGZIP(), []int{2} -} - -func (x *LinkMetadata) GetTitle() string { - if x != nil { - return x.Title - } - return "" -} - -func (x *LinkMetadata) GetDescription() string { - if x != nil { - return x.Description - } - return "" -} - -func (x *LinkMetadata) GetImage() string { - if x != nil { - return x.Image - } - return "" -} - -var File_api_v1_link_service_proto protoreflect.FileDescriptor - -var file_api_v1_link_service_proto_rawDesc = []byte{ - 0x0a, 0x19, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, 0x2f, 0x6c, 0x69, 0x6e, 0x6b, 0x5f, 0x73, 0x65, - 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0c, 0x6d, 0x65, 0x6d, - 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x1a, 0x1c, 0x67, 0x6f, 0x6f, 0x67, 0x6c, - 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x2c, 0x0a, 0x16, 0x47, 0x65, 0x74, 0x4c, 0x69, - 0x6e, 0x6b, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x12, 0x12, 0x0a, 0x04, 0x6c, 0x69, 0x6e, 0x6b, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x04, 0x6c, 0x69, 0x6e, 0x6b, 0x22, 0x5a, 0x0a, 0x17, 0x47, 0x65, 0x74, 0x4c, 0x69, 0x6e, 0x6b, - 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x12, 0x3f, 0x0a, 0x0d, 0x6c, 0x69, 0x6e, 0x6b, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, - 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, - 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x69, 0x6e, 0x6b, 0x4d, 0x65, 0x74, 0x61, 0x64, - 0x61, 0x74, 0x61, 0x52, 0x0c, 0x6c, 0x69, 0x6e, 0x6b, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, - 0x61, 0x22, 0x5c, 0x0a, 0x0c, 0x4c, 0x69, 0x6e, 0x6b, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, - 0x61, 0x12, 0x14, 0x0a, 0x05, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x05, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, - 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, 0x65, - 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x14, 0x0a, 0x05, 0x69, 0x6d, 0x61, - 0x67, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x32, - 0x8b, 0x01, 0x0a, 0x0b, 0x4c, 0x69, 0x6e, 0x6b, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, - 0x7c, 0x0a, 0x0f, 0x47, 0x65, 0x74, 0x4c, 0x69, 0x6e, 0x6b, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, - 0x74, 0x61, 0x12, 0x24, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, - 0x31, 0x2e, 0x47, 0x65, 0x74, 0x4c, 0x69, 0x6e, 0x6b, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, - 0x61, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x25, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, - 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x4c, 0x69, 0x6e, 0x6b, 0x4d, - 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, - 0x1c, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x16, 0x12, 0x14, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, - 0x2f, 0x6c, 0x69, 0x6e, 0x6b, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x42, 0xa8, 0x01, - 0x0a, 0x10, 0x63, 0x6f, 0x6d, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, - 0x76, 0x31, 0x42, 0x10, 0x4c, 0x69, 0x6e, 0x6b, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x50, - 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x30, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, - 0x6f, 0x6d, 0x2f, 0x75, 0x73, 0x65, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2f, 0x6d, 0x65, 0x6d, 0x6f, - 0x73, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x65, 0x6e, 0x2f, 0x61, 0x70, 0x69, 0x2f, - 0x76, 0x31, 0x3b, 0x61, 0x70, 0x69, 0x76, 0x31, 0xa2, 0x02, 0x03, 0x4d, 0x41, 0x58, 0xaa, 0x02, - 0x0c, 0x4d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x41, 0x70, 0x69, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x0c, - 0x4d, 0x65, 0x6d, 0x6f, 0x73, 0x5c, 0x41, 0x70, 0x69, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x18, 0x4d, - 0x65, 0x6d, 0x6f, 0x73, 0x5c, 0x41, 0x70, 0x69, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, - 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x0e, 0x4d, 0x65, 0x6d, 0x6f, 0x73, 0x3a, - 0x3a, 0x41, 0x70, 0x69, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} - -var ( - file_api_v1_link_service_proto_rawDescOnce sync.Once - file_api_v1_link_service_proto_rawDescData = file_api_v1_link_service_proto_rawDesc -) - -func file_api_v1_link_service_proto_rawDescGZIP() []byte { - file_api_v1_link_service_proto_rawDescOnce.Do(func() { - file_api_v1_link_service_proto_rawDescData = protoimpl.X.CompressGZIP(file_api_v1_link_service_proto_rawDescData) - }) - return file_api_v1_link_service_proto_rawDescData -} - -var file_api_v1_link_service_proto_msgTypes = make([]protoimpl.MessageInfo, 3) -var file_api_v1_link_service_proto_goTypes = []interface{}{ - (*GetLinkMetadataRequest)(nil), // 0: memos.api.v1.GetLinkMetadataRequest - (*GetLinkMetadataResponse)(nil), // 1: memos.api.v1.GetLinkMetadataResponse - (*LinkMetadata)(nil), // 2: memos.api.v1.LinkMetadata -} -var file_api_v1_link_service_proto_depIdxs = []int32{ - 2, // 0: memos.api.v1.GetLinkMetadataResponse.link_metadata:type_name -> memos.api.v1.LinkMetadata - 0, // 1: memos.api.v1.LinkService.GetLinkMetadata:input_type -> memos.api.v1.GetLinkMetadataRequest - 1, // 2: memos.api.v1.LinkService.GetLinkMetadata:output_type -> memos.api.v1.GetLinkMetadataResponse - 2, // [2:3] is the sub-list for method output_type - 1, // [1:2] is the sub-list for method input_type - 1, // [1:1] is the sub-list for extension type_name - 1, // [1:1] is the sub-list for extension extendee - 0, // [0:1] is the sub-list for field type_name -} - -func init() { file_api_v1_link_service_proto_init() } -func file_api_v1_link_service_proto_init() { - if File_api_v1_link_service_proto != nil { - return - } - if !protoimpl.UnsafeEnabled { - file_api_v1_link_service_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetLinkMetadataRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_api_v1_link_service_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetLinkMetadataResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_api_v1_link_service_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*LinkMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_api_v1_link_service_proto_rawDesc, - NumEnums: 0, - NumMessages: 3, - NumExtensions: 0, - NumServices: 1, - }, - GoTypes: file_api_v1_link_service_proto_goTypes, - DependencyIndexes: file_api_v1_link_service_proto_depIdxs, - MessageInfos: file_api_v1_link_service_proto_msgTypes, - }.Build() - File_api_v1_link_service_proto = out.File - file_api_v1_link_service_proto_rawDesc = nil - file_api_v1_link_service_proto_goTypes = nil - file_api_v1_link_service_proto_depIdxs = nil -} diff --git a/proto/gen/api/v1/link_service.pb.gw.go b/proto/gen/api/v1/link_service.pb.gw.go deleted file mode 100644 index 56d61196..00000000 --- a/proto/gen/api/v1/link_service.pb.gw.go +++ /dev/null @@ -1,173 +0,0 @@ -// Code generated by protoc-gen-grpc-gateway. DO NOT EDIT. -// source: api/v1/link_service.proto - -/* -Package apiv1 is a reverse proxy. - -It translates gRPC into RESTful JSON APIs. -*/ -package apiv1 - -import ( - "context" - "io" - "net/http" - - "github.com/grpc-ecosystem/grpc-gateway/v2/runtime" - "github.com/grpc-ecosystem/grpc-gateway/v2/utilities" - "google.golang.org/grpc" - "google.golang.org/grpc/codes" - "google.golang.org/grpc/grpclog" - "google.golang.org/grpc/metadata" - "google.golang.org/grpc/status" - "google.golang.org/protobuf/proto" -) - -// Suppress "imported and not used" errors -var _ codes.Code -var _ io.Reader -var _ status.Status -var _ = runtime.String -var _ = utilities.NewDoubleArray -var _ = metadata.Join - -var ( - filter_LinkService_GetLinkMetadata_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} -) - -func request_LinkService_GetLinkMetadata_0(ctx context.Context, marshaler runtime.Marshaler, client LinkServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq GetLinkMetadataRequest - var metadata runtime.ServerMetadata - - if err := req.ParseForm(); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_LinkService_GetLinkMetadata_0); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - - msg, err := client.GetLinkMetadata(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err - -} - -func local_request_LinkService_GetLinkMetadata_0(ctx context.Context, marshaler runtime.Marshaler, server LinkServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq GetLinkMetadataRequest - var metadata runtime.ServerMetadata - - if err := req.ParseForm(); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_LinkService_GetLinkMetadata_0); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - - msg, err := server.GetLinkMetadata(ctx, &protoReq) - return msg, metadata, err - -} - -// RegisterLinkServiceHandlerServer registers the http handlers for service LinkService to "mux". -// UnaryRPC :call LinkServiceServer directly. -// StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. -// Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterLinkServiceHandlerFromEndpoint instead. -func RegisterLinkServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server LinkServiceServer) error { - - mux.Handle("GET", pattern_LinkService_GetLinkMetadata_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - var stream runtime.ServerTransportStream - ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/memos.api.v1.LinkService/GetLinkMetadata", runtime.WithHTTPPathPattern("/api/v1/linkMetadata")) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := local_request_LinkService_GetLinkMetadata_0(annotatedContext, inboundMarshaler, server, req, pathParams) - md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) - if err != nil { - runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) - return - } - - forward_LinkService_GetLinkMetadata_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - return nil -} - -// RegisterLinkServiceHandlerFromEndpoint is same as RegisterLinkServiceHandler but -// automatically dials to "endpoint" and closes the connection when "ctx" gets done. -func RegisterLinkServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error) { - conn, err := grpc.DialContext(ctx, endpoint, opts...) - if err != nil { - return err - } - defer func() { - if err != nil { - if cerr := conn.Close(); cerr != nil { - grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr) - } - return - } - go func() { - <-ctx.Done() - if cerr := conn.Close(); cerr != nil { - grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr) - } - }() - }() - - return RegisterLinkServiceHandler(ctx, mux, conn) -} - -// RegisterLinkServiceHandler registers the http handlers for service LinkService to "mux". -// The handlers forward requests to the grpc endpoint over "conn". -func RegisterLinkServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error { - return RegisterLinkServiceHandlerClient(ctx, mux, NewLinkServiceClient(conn)) -} - -// RegisterLinkServiceHandlerClient registers the http handlers for service LinkService -// to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "LinkServiceClient". -// Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "LinkServiceClient" -// doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in -// "LinkServiceClient" to call the correct interceptors. -func RegisterLinkServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client LinkServiceClient) error { - - mux.Handle("GET", pattern_LinkService_GetLinkMetadata_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/memos.api.v1.LinkService/GetLinkMetadata", runtime.WithHTTPPathPattern("/api/v1/linkMetadata")) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := request_LinkService_GetLinkMetadata_0(annotatedContext, inboundMarshaler, client, req, pathParams) - annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) - if err != nil { - runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) - return - } - - forward_LinkService_GetLinkMetadata_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - return nil -} - -var ( - pattern_LinkService_GetLinkMetadata_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"api", "v1", "linkMetadata"}, "")) -) - -var ( - forward_LinkService_GetLinkMetadata_0 = runtime.ForwardResponseMessage -) diff --git a/proto/gen/api/v1/link_service_grpc.pb.go b/proto/gen/api/v1/link_service_grpc.pb.go deleted file mode 100644 index e225baa6..00000000 --- a/proto/gen/api/v1/link_service_grpc.pb.go +++ /dev/null @@ -1,111 +0,0 @@ -// Code generated by protoc-gen-go-grpc. DO NOT EDIT. -// versions: -// - protoc-gen-go-grpc v1.3.0 -// - protoc (unknown) -// source: api/v1/link_service.proto - -package apiv1 - -import ( - context "context" - grpc "google.golang.org/grpc" - codes "google.golang.org/grpc/codes" - status "google.golang.org/grpc/status" -) - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the grpc package it is being compiled against. -// Requires gRPC-Go v1.32.0 or later. -const _ = grpc.SupportPackageIsVersion7 - -const ( - LinkService_GetLinkMetadata_FullMethodName = "/memos.api.v1.LinkService/GetLinkMetadata" -) - -// LinkServiceClient is the client API for LinkService service. -// -// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. -type LinkServiceClient interface { - // GetLinkMetadata returns metadata for a given link. - GetLinkMetadata(ctx context.Context, in *GetLinkMetadataRequest, opts ...grpc.CallOption) (*GetLinkMetadataResponse, error) -} - -type linkServiceClient struct { - cc grpc.ClientConnInterface -} - -func NewLinkServiceClient(cc grpc.ClientConnInterface) LinkServiceClient { - return &linkServiceClient{cc} -} - -func (c *linkServiceClient) GetLinkMetadata(ctx context.Context, in *GetLinkMetadataRequest, opts ...grpc.CallOption) (*GetLinkMetadataResponse, error) { - out := new(GetLinkMetadataResponse) - err := c.cc.Invoke(ctx, LinkService_GetLinkMetadata_FullMethodName, in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -// LinkServiceServer is the server API for LinkService service. -// All implementations must embed UnimplementedLinkServiceServer -// for forward compatibility -type LinkServiceServer interface { - // GetLinkMetadata returns metadata for a given link. - GetLinkMetadata(context.Context, *GetLinkMetadataRequest) (*GetLinkMetadataResponse, error) - mustEmbedUnimplementedLinkServiceServer() -} - -// UnimplementedLinkServiceServer must be embedded to have forward compatible implementations. -type UnimplementedLinkServiceServer struct { -} - -func (UnimplementedLinkServiceServer) GetLinkMetadata(context.Context, *GetLinkMetadataRequest) (*GetLinkMetadataResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetLinkMetadata not implemented") -} -func (UnimplementedLinkServiceServer) mustEmbedUnimplementedLinkServiceServer() {} - -// UnsafeLinkServiceServer may be embedded to opt out of forward compatibility for this service. -// Use of this interface is not recommended, as added methods to LinkServiceServer will -// result in compilation errors. -type UnsafeLinkServiceServer interface { - mustEmbedUnimplementedLinkServiceServer() -} - -func RegisterLinkServiceServer(s grpc.ServiceRegistrar, srv LinkServiceServer) { - s.RegisterService(&LinkService_ServiceDesc, srv) -} - -func _LinkService_GetLinkMetadata_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(GetLinkMetadataRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(LinkServiceServer).GetLinkMetadata(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: LinkService_GetLinkMetadata_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(LinkServiceServer).GetLinkMetadata(ctx, req.(*GetLinkMetadataRequest)) - } - return interceptor(ctx, in, info, handler) -} - -// LinkService_ServiceDesc is the grpc.ServiceDesc for LinkService service. -// It's only intended for direct use with grpc.RegisterService, -// and not to be introspected or modified (even as a copy) -var LinkService_ServiceDesc = grpc.ServiceDesc{ - ServiceName: "memos.api.v1.LinkService", - HandlerType: (*LinkServiceServer)(nil), - Methods: []grpc.MethodDesc{ - { - MethodName: "GetLinkMetadata", - Handler: _LinkService_GetLinkMetadata_Handler, - }, - }, - Streams: []grpc.StreamDesc{}, - Metadata: "api/v1/link_service.proto", -} diff --git a/proto/gen/api/v1/markdown_service.pb.go b/proto/gen/api/v1/markdown_service.pb.go new file mode 100644 index 00000000..e92947e3 --- /dev/null +++ b/proto/gen/api/v1/markdown_service.pb.go @@ -0,0 +1,3430 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.33.0 +// protoc (unknown) +// source: api/v1/markdown_service.proto + +package apiv1 + +import ( + _ "google.golang.org/genproto/googleapis/api/annotations" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +type NodeType int32 + +const ( + NodeType_NODE_UNSPECIFIED NodeType = 0 + NodeType_LINE_BREAK NodeType = 1 + NodeType_PARAGRAPH NodeType = 2 + NodeType_CODE_BLOCK NodeType = 3 + NodeType_HEADING NodeType = 4 + NodeType_HORIZONTAL_RULE NodeType = 5 + NodeType_BLOCKQUOTE NodeType = 6 + NodeType_ORDERED_LIST NodeType = 7 + NodeType_UNORDERED_LIST NodeType = 8 + NodeType_TASK_LIST NodeType = 9 + NodeType_MATH_BLOCK NodeType = 10 + NodeType_TABLE NodeType = 11 + NodeType_EMBEDDED_CONTENT NodeType = 12 + NodeType_TEXT NodeType = 13 + NodeType_BOLD NodeType = 14 + NodeType_ITALIC NodeType = 15 + NodeType_BOLD_ITALIC NodeType = 16 + NodeType_CODE NodeType = 17 + NodeType_IMAGE NodeType = 18 + NodeType_LINK NodeType = 19 + NodeType_AUTO_LINK NodeType = 20 + NodeType_TAG NodeType = 21 + NodeType_STRIKETHROUGH NodeType = 22 + NodeType_ESCAPING_CHARACTER NodeType = 23 + NodeType_MATH NodeType = 24 + NodeType_HIGHLIGHT NodeType = 25 + NodeType_SUBSCRIPT NodeType = 26 + NodeType_SUPERSCRIPT NodeType = 27 + NodeType_REFERENCED_CONTENT NodeType = 28 + NodeType_SPOILER NodeType = 29 +) + +// Enum value maps for NodeType. +var ( + NodeType_name = map[int32]string{ + 0: "NODE_UNSPECIFIED", + 1: "LINE_BREAK", + 2: "PARAGRAPH", + 3: "CODE_BLOCK", + 4: "HEADING", + 5: "HORIZONTAL_RULE", + 6: "BLOCKQUOTE", + 7: "ORDERED_LIST", + 8: "UNORDERED_LIST", + 9: "TASK_LIST", + 10: "MATH_BLOCK", + 11: "TABLE", + 12: "EMBEDDED_CONTENT", + 13: "TEXT", + 14: "BOLD", + 15: "ITALIC", + 16: "BOLD_ITALIC", + 17: "CODE", + 18: "IMAGE", + 19: "LINK", + 20: "AUTO_LINK", + 21: "TAG", + 22: "STRIKETHROUGH", + 23: "ESCAPING_CHARACTER", + 24: "MATH", + 25: "HIGHLIGHT", + 26: "SUBSCRIPT", + 27: "SUPERSCRIPT", + 28: "REFERENCED_CONTENT", + 29: "SPOILER", + } + NodeType_value = map[string]int32{ + "NODE_UNSPECIFIED": 0, + "LINE_BREAK": 1, + "PARAGRAPH": 2, + "CODE_BLOCK": 3, + "HEADING": 4, + "HORIZONTAL_RULE": 5, + "BLOCKQUOTE": 6, + "ORDERED_LIST": 7, + "UNORDERED_LIST": 8, + "TASK_LIST": 9, + "MATH_BLOCK": 10, + "TABLE": 11, + "EMBEDDED_CONTENT": 12, + "TEXT": 13, + "BOLD": 14, + "ITALIC": 15, + "BOLD_ITALIC": 16, + "CODE": 17, + "IMAGE": 18, + "LINK": 19, + "AUTO_LINK": 20, + "TAG": 21, + "STRIKETHROUGH": 22, + "ESCAPING_CHARACTER": 23, + "MATH": 24, + "HIGHLIGHT": 25, + "SUBSCRIPT": 26, + "SUPERSCRIPT": 27, + "REFERENCED_CONTENT": 28, + "SPOILER": 29, + } +) + +func (x NodeType) Enum() *NodeType { + p := new(NodeType) + *p = x + return p +} + +func (x NodeType) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (NodeType) Descriptor() protoreflect.EnumDescriptor { + return file_api_v1_markdown_service_proto_enumTypes[0].Descriptor() +} + +func (NodeType) Type() protoreflect.EnumType { + return &file_api_v1_markdown_service_proto_enumTypes[0] +} + +func (x NodeType) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use NodeType.Descriptor instead. +func (NodeType) EnumDescriptor() ([]byte, []int) { + return file_api_v1_markdown_service_proto_rawDescGZIP(), []int{0} +} + +type ParseMarkdownRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Markdown string `protobuf:"bytes,1,opt,name=markdown,proto3" json:"markdown,omitempty"` +} + +func (x *ParseMarkdownRequest) Reset() { + *x = ParseMarkdownRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_api_v1_markdown_service_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ParseMarkdownRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ParseMarkdownRequest) ProtoMessage() {} + +func (x *ParseMarkdownRequest) ProtoReflect() protoreflect.Message { + mi := &file_api_v1_markdown_service_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ParseMarkdownRequest.ProtoReflect.Descriptor instead. +func (*ParseMarkdownRequest) Descriptor() ([]byte, []int) { + return file_api_v1_markdown_service_proto_rawDescGZIP(), []int{0} +} + +func (x *ParseMarkdownRequest) GetMarkdown() string { + if x != nil { + return x.Markdown + } + return "" +} + +type ParseMarkdownResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Nodes []*Node `protobuf:"bytes,1,rep,name=nodes,proto3" json:"nodes,omitempty"` +} + +func (x *ParseMarkdownResponse) Reset() { + *x = ParseMarkdownResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_api_v1_markdown_service_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ParseMarkdownResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ParseMarkdownResponse) ProtoMessage() {} + +func (x *ParseMarkdownResponse) ProtoReflect() protoreflect.Message { + mi := &file_api_v1_markdown_service_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ParseMarkdownResponse.ProtoReflect.Descriptor instead. +func (*ParseMarkdownResponse) Descriptor() ([]byte, []int) { + return file_api_v1_markdown_service_proto_rawDescGZIP(), []int{1} +} + +func (x *ParseMarkdownResponse) GetNodes() []*Node { + if x != nil { + return x.Nodes + } + return nil +} + +type RestoreMarkdownRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Nodes []*Node `protobuf:"bytes,1,rep,name=nodes,proto3" json:"nodes,omitempty"` +} + +func (x *RestoreMarkdownRequest) Reset() { + *x = RestoreMarkdownRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_api_v1_markdown_service_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *RestoreMarkdownRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*RestoreMarkdownRequest) ProtoMessage() {} + +func (x *RestoreMarkdownRequest) ProtoReflect() protoreflect.Message { + mi := &file_api_v1_markdown_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 RestoreMarkdownRequest.ProtoReflect.Descriptor instead. +func (*RestoreMarkdownRequest) Descriptor() ([]byte, []int) { + return file_api_v1_markdown_service_proto_rawDescGZIP(), []int{2} +} + +func (x *RestoreMarkdownRequest) GetNodes() []*Node { + if x != nil { + return x.Nodes + } + return nil +} + +type RestoreMarkdownResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Markdown string `protobuf:"bytes,1,opt,name=markdown,proto3" json:"markdown,omitempty"` +} + +func (x *RestoreMarkdownResponse) Reset() { + *x = RestoreMarkdownResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_api_v1_markdown_service_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *RestoreMarkdownResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*RestoreMarkdownResponse) ProtoMessage() {} + +func (x *RestoreMarkdownResponse) ProtoReflect() protoreflect.Message { + mi := &file_api_v1_markdown_service_proto_msgTypes[3] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use RestoreMarkdownResponse.ProtoReflect.Descriptor instead. +func (*RestoreMarkdownResponse) Descriptor() ([]byte, []int) { + return file_api_v1_markdown_service_proto_rawDescGZIP(), []int{3} +} + +func (x *RestoreMarkdownResponse) GetMarkdown() string { + if x != nil { + return x.Markdown + } + return "" +} + +type GetLinkMetadataRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Link string `protobuf:"bytes,1,opt,name=link,proto3" json:"link,omitempty"` +} + +func (x *GetLinkMetadataRequest) Reset() { + *x = GetLinkMetadataRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_api_v1_markdown_service_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetLinkMetadataRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetLinkMetadataRequest) ProtoMessage() {} + +func (x *GetLinkMetadataRequest) ProtoReflect() protoreflect.Message { + mi := &file_api_v1_markdown_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 GetLinkMetadataRequest.ProtoReflect.Descriptor instead. +func (*GetLinkMetadataRequest) Descriptor() ([]byte, []int) { + return file_api_v1_markdown_service_proto_rawDescGZIP(), []int{4} +} + +func (x *GetLinkMetadataRequest) GetLink() string { + if x != nil { + return x.Link + } + return "" +} + +type LinkMetadata struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Title string `protobuf:"bytes,1,opt,name=title,proto3" json:"title,omitempty"` + Description string `protobuf:"bytes,2,opt,name=description,proto3" json:"description,omitempty"` + Image string `protobuf:"bytes,3,opt,name=image,proto3" json:"image,omitempty"` +} + +func (x *LinkMetadata) Reset() { + *x = LinkMetadata{} + if protoimpl.UnsafeEnabled { + mi := &file_api_v1_markdown_service_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *LinkMetadata) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*LinkMetadata) ProtoMessage() {} + +func (x *LinkMetadata) ProtoReflect() protoreflect.Message { + mi := &file_api_v1_markdown_service_proto_msgTypes[5] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use LinkMetadata.ProtoReflect.Descriptor instead. +func (*LinkMetadata) Descriptor() ([]byte, []int) { + return file_api_v1_markdown_service_proto_rawDescGZIP(), []int{5} +} + +func (x *LinkMetadata) GetTitle() string { + if x != nil { + return x.Title + } + return "" +} + +func (x *LinkMetadata) GetDescription() string { + if x != nil { + return x.Description + } + return "" +} + +func (x *LinkMetadata) GetImage() string { + if x != nil { + return x.Image + } + return "" +} + +type Node struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Type NodeType `protobuf:"varint,1,opt,name=type,proto3,enum=memos.api.v1.NodeType" json:"type,omitempty"` + // Types that are assignable to Node: + // + // *Node_LineBreakNode + // *Node_ParagraphNode + // *Node_CodeBlockNode + // *Node_HeadingNode + // *Node_HorizontalRuleNode + // *Node_BlockquoteNode + // *Node_OrderedListNode + // *Node_UnorderedListNode + // *Node_TaskListNode + // *Node_MathBlockNode + // *Node_TableNode + // *Node_EmbeddedContentNode + // *Node_TextNode + // *Node_BoldNode + // *Node_ItalicNode + // *Node_BoldItalicNode + // *Node_CodeNode + // *Node_ImageNode + // *Node_LinkNode + // *Node_AutoLinkNode + // *Node_TagNode + // *Node_StrikethroughNode + // *Node_EscapingCharacterNode + // *Node_MathNode + // *Node_HighlightNode + // *Node_SubscriptNode + // *Node_SuperscriptNode + // *Node_ReferencedContentNode + // *Node_SpoilerNode + Node isNode_Node `protobuf_oneof:"node"` +} + +func (x *Node) Reset() { + *x = Node{} + if protoimpl.UnsafeEnabled { + mi := &file_api_v1_markdown_service_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Node) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Node) ProtoMessage() {} + +func (x *Node) ProtoReflect() protoreflect.Message { + mi := &file_api_v1_markdown_service_proto_msgTypes[6] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Node.ProtoReflect.Descriptor instead. +func (*Node) Descriptor() ([]byte, []int) { + return file_api_v1_markdown_service_proto_rawDescGZIP(), []int{6} +} + +func (x *Node) GetType() NodeType { + if x != nil { + return x.Type + } + return NodeType_NODE_UNSPECIFIED +} + +func (m *Node) GetNode() isNode_Node { + if m != nil { + return m.Node + } + return nil +} + +func (x *Node) GetLineBreakNode() *LineBreakNode { + if x, ok := x.GetNode().(*Node_LineBreakNode); ok { + return x.LineBreakNode + } + return nil +} + +func (x *Node) GetParagraphNode() *ParagraphNode { + if x, ok := x.GetNode().(*Node_ParagraphNode); ok { + return x.ParagraphNode + } + return nil +} + +func (x *Node) GetCodeBlockNode() *CodeBlockNode { + if x, ok := x.GetNode().(*Node_CodeBlockNode); ok { + return x.CodeBlockNode + } + return nil +} + +func (x *Node) GetHeadingNode() *HeadingNode { + if x, ok := x.GetNode().(*Node_HeadingNode); ok { + return x.HeadingNode + } + return nil +} + +func (x *Node) GetHorizontalRuleNode() *HorizontalRuleNode { + if x, ok := x.GetNode().(*Node_HorizontalRuleNode); ok { + return x.HorizontalRuleNode + } + return nil +} + +func (x *Node) GetBlockquoteNode() *BlockquoteNode { + if x, ok := x.GetNode().(*Node_BlockquoteNode); ok { + return x.BlockquoteNode + } + return nil +} + +func (x *Node) GetOrderedListNode() *OrderedListNode { + if x, ok := x.GetNode().(*Node_OrderedListNode); ok { + return x.OrderedListNode + } + return nil +} + +func (x *Node) GetUnorderedListNode() *UnorderedListNode { + if x, ok := x.GetNode().(*Node_UnorderedListNode); ok { + return x.UnorderedListNode + } + return nil +} + +func (x *Node) GetTaskListNode() *TaskListNode { + if x, ok := x.GetNode().(*Node_TaskListNode); ok { + return x.TaskListNode + } + return nil +} + +func (x *Node) GetMathBlockNode() *MathBlockNode { + if x, ok := x.GetNode().(*Node_MathBlockNode); ok { + return x.MathBlockNode + } + return nil +} + +func (x *Node) GetTableNode() *TableNode { + if x, ok := x.GetNode().(*Node_TableNode); ok { + return x.TableNode + } + return nil +} + +func (x *Node) GetEmbeddedContentNode() *EmbeddedContentNode { + if x, ok := x.GetNode().(*Node_EmbeddedContentNode); ok { + return x.EmbeddedContentNode + } + return nil +} + +func (x *Node) GetTextNode() *TextNode { + if x, ok := x.GetNode().(*Node_TextNode); ok { + return x.TextNode + } + return nil +} + +func (x *Node) GetBoldNode() *BoldNode { + if x, ok := x.GetNode().(*Node_BoldNode); ok { + return x.BoldNode + } + return nil +} + +func (x *Node) GetItalicNode() *ItalicNode { + if x, ok := x.GetNode().(*Node_ItalicNode); ok { + return x.ItalicNode + } + return nil +} + +func (x *Node) GetBoldItalicNode() *BoldItalicNode { + if x, ok := x.GetNode().(*Node_BoldItalicNode); ok { + return x.BoldItalicNode + } + return nil +} + +func (x *Node) GetCodeNode() *CodeNode { + if x, ok := x.GetNode().(*Node_CodeNode); ok { + return x.CodeNode + } + return nil +} + +func (x *Node) GetImageNode() *ImageNode { + if x, ok := x.GetNode().(*Node_ImageNode); ok { + return x.ImageNode + } + return nil +} + +func (x *Node) GetLinkNode() *LinkNode { + if x, ok := x.GetNode().(*Node_LinkNode); ok { + return x.LinkNode + } + return nil +} + +func (x *Node) GetAutoLinkNode() *AutoLinkNode { + if x, ok := x.GetNode().(*Node_AutoLinkNode); ok { + return x.AutoLinkNode + } + return nil +} + +func (x *Node) GetTagNode() *TagNode { + if x, ok := x.GetNode().(*Node_TagNode); ok { + return x.TagNode + } + return nil +} + +func (x *Node) GetStrikethroughNode() *StrikethroughNode { + if x, ok := x.GetNode().(*Node_StrikethroughNode); ok { + return x.StrikethroughNode + } + return nil +} + +func (x *Node) GetEscapingCharacterNode() *EscapingCharacterNode { + if x, ok := x.GetNode().(*Node_EscapingCharacterNode); ok { + return x.EscapingCharacterNode + } + return nil +} + +func (x *Node) GetMathNode() *MathNode { + if x, ok := x.GetNode().(*Node_MathNode); ok { + return x.MathNode + } + return nil +} + +func (x *Node) GetHighlightNode() *HighlightNode { + if x, ok := x.GetNode().(*Node_HighlightNode); ok { + return x.HighlightNode + } + return nil +} + +func (x *Node) GetSubscriptNode() *SubscriptNode { + if x, ok := x.GetNode().(*Node_SubscriptNode); ok { + return x.SubscriptNode + } + return nil +} + +func (x *Node) GetSuperscriptNode() *SuperscriptNode { + if x, ok := x.GetNode().(*Node_SuperscriptNode); ok { + return x.SuperscriptNode + } + return nil +} + +func (x *Node) GetReferencedContentNode() *ReferencedContentNode { + if x, ok := x.GetNode().(*Node_ReferencedContentNode); ok { + return x.ReferencedContentNode + } + return nil +} + +func (x *Node) GetSpoilerNode() *SpoilerNode { + if x, ok := x.GetNode().(*Node_SpoilerNode); ok { + return x.SpoilerNode + } + return nil +} + +type isNode_Node interface { + isNode_Node() +} + +type Node_LineBreakNode struct { + LineBreakNode *LineBreakNode `protobuf:"bytes,2,opt,name=line_break_node,json=lineBreakNode,proto3,oneof"` +} + +type Node_ParagraphNode struct { + ParagraphNode *ParagraphNode `protobuf:"bytes,3,opt,name=paragraph_node,json=paragraphNode,proto3,oneof"` +} + +type Node_CodeBlockNode struct { + CodeBlockNode *CodeBlockNode `protobuf:"bytes,4,opt,name=code_block_node,json=codeBlockNode,proto3,oneof"` +} + +type Node_HeadingNode struct { + HeadingNode *HeadingNode `protobuf:"bytes,5,opt,name=heading_node,json=headingNode,proto3,oneof"` +} + +type Node_HorizontalRuleNode struct { + HorizontalRuleNode *HorizontalRuleNode `protobuf:"bytes,6,opt,name=horizontal_rule_node,json=horizontalRuleNode,proto3,oneof"` +} + +type Node_BlockquoteNode struct { + BlockquoteNode *BlockquoteNode `protobuf:"bytes,7,opt,name=blockquote_node,json=blockquoteNode,proto3,oneof"` +} + +type Node_OrderedListNode struct { + OrderedListNode *OrderedListNode `protobuf:"bytes,8,opt,name=ordered_list_node,json=orderedListNode,proto3,oneof"` +} + +type Node_UnorderedListNode struct { + UnorderedListNode *UnorderedListNode `protobuf:"bytes,9,opt,name=unordered_list_node,json=unorderedListNode,proto3,oneof"` +} + +type Node_TaskListNode struct { + TaskListNode *TaskListNode `protobuf:"bytes,10,opt,name=task_list_node,json=taskListNode,proto3,oneof"` +} + +type Node_MathBlockNode struct { + MathBlockNode *MathBlockNode `protobuf:"bytes,11,opt,name=math_block_node,json=mathBlockNode,proto3,oneof"` +} + +type Node_TableNode struct { + TableNode *TableNode `protobuf:"bytes,12,opt,name=table_node,json=tableNode,proto3,oneof"` +} + +type Node_EmbeddedContentNode struct { + EmbeddedContentNode *EmbeddedContentNode `protobuf:"bytes,13,opt,name=embedded_content_node,json=embeddedContentNode,proto3,oneof"` +} + +type Node_TextNode struct { + TextNode *TextNode `protobuf:"bytes,14,opt,name=text_node,json=textNode,proto3,oneof"` +} + +type Node_BoldNode struct { + BoldNode *BoldNode `protobuf:"bytes,15,opt,name=bold_node,json=boldNode,proto3,oneof"` +} + +type Node_ItalicNode struct { + ItalicNode *ItalicNode `protobuf:"bytes,16,opt,name=italic_node,json=italicNode,proto3,oneof"` +} + +type Node_BoldItalicNode struct { + BoldItalicNode *BoldItalicNode `protobuf:"bytes,17,opt,name=bold_italic_node,json=boldItalicNode,proto3,oneof"` +} + +type Node_CodeNode struct { + CodeNode *CodeNode `protobuf:"bytes,18,opt,name=code_node,json=codeNode,proto3,oneof"` +} + +type Node_ImageNode struct { + ImageNode *ImageNode `protobuf:"bytes,19,opt,name=image_node,json=imageNode,proto3,oneof"` +} + +type Node_LinkNode struct { + LinkNode *LinkNode `protobuf:"bytes,20,opt,name=link_node,json=linkNode,proto3,oneof"` +} + +type Node_AutoLinkNode struct { + AutoLinkNode *AutoLinkNode `protobuf:"bytes,21,opt,name=auto_link_node,json=autoLinkNode,proto3,oneof"` +} + +type Node_TagNode struct { + TagNode *TagNode `protobuf:"bytes,22,opt,name=tag_node,json=tagNode,proto3,oneof"` +} + +type Node_StrikethroughNode struct { + StrikethroughNode *StrikethroughNode `protobuf:"bytes,23,opt,name=strikethrough_node,json=strikethroughNode,proto3,oneof"` +} + +type Node_EscapingCharacterNode struct { + EscapingCharacterNode *EscapingCharacterNode `protobuf:"bytes,24,opt,name=escaping_character_node,json=escapingCharacterNode,proto3,oneof"` +} + +type Node_MathNode struct { + MathNode *MathNode `protobuf:"bytes,25,opt,name=math_node,json=mathNode,proto3,oneof"` +} + +type Node_HighlightNode struct { + HighlightNode *HighlightNode `protobuf:"bytes,26,opt,name=highlight_node,json=highlightNode,proto3,oneof"` +} + +type Node_SubscriptNode struct { + SubscriptNode *SubscriptNode `protobuf:"bytes,27,opt,name=subscript_node,json=subscriptNode,proto3,oneof"` +} + +type Node_SuperscriptNode struct { + SuperscriptNode *SuperscriptNode `protobuf:"bytes,28,opt,name=superscript_node,json=superscriptNode,proto3,oneof"` +} + +type Node_ReferencedContentNode struct { + ReferencedContentNode *ReferencedContentNode `protobuf:"bytes,29,opt,name=referenced_content_node,json=referencedContentNode,proto3,oneof"` +} + +type Node_SpoilerNode struct { + SpoilerNode *SpoilerNode `protobuf:"bytes,30,opt,name=spoiler_node,json=spoilerNode,proto3,oneof"` +} + +func (*Node_LineBreakNode) isNode_Node() {} + +func (*Node_ParagraphNode) isNode_Node() {} + +func (*Node_CodeBlockNode) isNode_Node() {} + +func (*Node_HeadingNode) isNode_Node() {} + +func (*Node_HorizontalRuleNode) isNode_Node() {} + +func (*Node_BlockquoteNode) isNode_Node() {} + +func (*Node_OrderedListNode) isNode_Node() {} + +func (*Node_UnorderedListNode) isNode_Node() {} + +func (*Node_TaskListNode) isNode_Node() {} + +func (*Node_MathBlockNode) isNode_Node() {} + +func (*Node_TableNode) isNode_Node() {} + +func (*Node_EmbeddedContentNode) isNode_Node() {} + +func (*Node_TextNode) isNode_Node() {} + +func (*Node_BoldNode) isNode_Node() {} + +func (*Node_ItalicNode) isNode_Node() {} + +func (*Node_BoldItalicNode) isNode_Node() {} + +func (*Node_CodeNode) isNode_Node() {} + +func (*Node_ImageNode) isNode_Node() {} + +func (*Node_LinkNode) isNode_Node() {} + +func (*Node_AutoLinkNode) isNode_Node() {} + +func (*Node_TagNode) isNode_Node() {} + +func (*Node_StrikethroughNode) isNode_Node() {} + +func (*Node_EscapingCharacterNode) isNode_Node() {} + +func (*Node_MathNode) isNode_Node() {} + +func (*Node_HighlightNode) isNode_Node() {} + +func (*Node_SubscriptNode) isNode_Node() {} + +func (*Node_SuperscriptNode) isNode_Node() {} + +func (*Node_ReferencedContentNode) isNode_Node() {} + +func (*Node_SpoilerNode) isNode_Node() {} + +type LineBreakNode struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *LineBreakNode) Reset() { + *x = LineBreakNode{} + if protoimpl.UnsafeEnabled { + mi := &file_api_v1_markdown_service_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *LineBreakNode) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*LineBreakNode) ProtoMessage() {} + +func (x *LineBreakNode) ProtoReflect() protoreflect.Message { + mi := &file_api_v1_markdown_service_proto_msgTypes[7] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use LineBreakNode.ProtoReflect.Descriptor instead. +func (*LineBreakNode) Descriptor() ([]byte, []int) { + return file_api_v1_markdown_service_proto_rawDescGZIP(), []int{7} +} + +type ParagraphNode struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Children []*Node `protobuf:"bytes,1,rep,name=children,proto3" json:"children,omitempty"` +} + +func (x *ParagraphNode) Reset() { + *x = ParagraphNode{} + if protoimpl.UnsafeEnabled { + mi := &file_api_v1_markdown_service_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ParagraphNode) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ParagraphNode) ProtoMessage() {} + +func (x *ParagraphNode) ProtoReflect() protoreflect.Message { + mi := &file_api_v1_markdown_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 ParagraphNode.ProtoReflect.Descriptor instead. +func (*ParagraphNode) Descriptor() ([]byte, []int) { + return file_api_v1_markdown_service_proto_rawDescGZIP(), []int{8} +} + +func (x *ParagraphNode) GetChildren() []*Node { + if x != nil { + return x.Children + } + return nil +} + +type CodeBlockNode struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Language string `protobuf:"bytes,1,opt,name=language,proto3" json:"language,omitempty"` + Content string `protobuf:"bytes,2,opt,name=content,proto3" json:"content,omitempty"` +} + +func (x *CodeBlockNode) Reset() { + *x = CodeBlockNode{} + if protoimpl.UnsafeEnabled { + mi := &file_api_v1_markdown_service_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *CodeBlockNode) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CodeBlockNode) ProtoMessage() {} + +func (x *CodeBlockNode) ProtoReflect() protoreflect.Message { + mi := &file_api_v1_markdown_service_proto_msgTypes[9] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use CodeBlockNode.ProtoReflect.Descriptor instead. +func (*CodeBlockNode) Descriptor() ([]byte, []int) { + return file_api_v1_markdown_service_proto_rawDescGZIP(), []int{9} +} + +func (x *CodeBlockNode) GetLanguage() string { + if x != nil { + return x.Language + } + return "" +} + +func (x *CodeBlockNode) GetContent() string { + if x != nil { + return x.Content + } + return "" +} + +type HeadingNode struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Level int32 `protobuf:"varint,1,opt,name=level,proto3" json:"level,omitempty"` + Children []*Node `protobuf:"bytes,2,rep,name=children,proto3" json:"children,omitempty"` +} + +func (x *HeadingNode) Reset() { + *x = HeadingNode{} + if protoimpl.UnsafeEnabled { + mi := &file_api_v1_markdown_service_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *HeadingNode) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*HeadingNode) ProtoMessage() {} + +func (x *HeadingNode) ProtoReflect() protoreflect.Message { + mi := &file_api_v1_markdown_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 HeadingNode.ProtoReflect.Descriptor instead. +func (*HeadingNode) Descriptor() ([]byte, []int) { + return file_api_v1_markdown_service_proto_rawDescGZIP(), []int{10} +} + +func (x *HeadingNode) GetLevel() int32 { + if x != nil { + return x.Level + } + return 0 +} + +func (x *HeadingNode) GetChildren() []*Node { + if x != nil { + return x.Children + } + return nil +} + +type HorizontalRuleNode struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Symbol string `protobuf:"bytes,1,opt,name=symbol,proto3" json:"symbol,omitempty"` +} + +func (x *HorizontalRuleNode) Reset() { + *x = HorizontalRuleNode{} + if protoimpl.UnsafeEnabled { + mi := &file_api_v1_markdown_service_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *HorizontalRuleNode) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*HorizontalRuleNode) ProtoMessage() {} + +func (x *HorizontalRuleNode) ProtoReflect() protoreflect.Message { + mi := &file_api_v1_markdown_service_proto_msgTypes[11] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use HorizontalRuleNode.ProtoReflect.Descriptor instead. +func (*HorizontalRuleNode) Descriptor() ([]byte, []int) { + return file_api_v1_markdown_service_proto_rawDescGZIP(), []int{11} +} + +func (x *HorizontalRuleNode) GetSymbol() string { + if x != nil { + return x.Symbol + } + return "" +} + +type BlockquoteNode struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Children []*Node `protobuf:"bytes,1,rep,name=children,proto3" json:"children,omitempty"` +} + +func (x *BlockquoteNode) Reset() { + *x = BlockquoteNode{} + if protoimpl.UnsafeEnabled { + mi := &file_api_v1_markdown_service_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *BlockquoteNode) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*BlockquoteNode) ProtoMessage() {} + +func (x *BlockquoteNode) ProtoReflect() protoreflect.Message { + mi := &file_api_v1_markdown_service_proto_msgTypes[12] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use BlockquoteNode.ProtoReflect.Descriptor instead. +func (*BlockquoteNode) Descriptor() ([]byte, []int) { + return file_api_v1_markdown_service_proto_rawDescGZIP(), []int{12} +} + +func (x *BlockquoteNode) GetChildren() []*Node { + if x != nil { + return x.Children + } + return nil +} + +type OrderedListNode struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Number string `protobuf:"bytes,1,opt,name=number,proto3" json:"number,omitempty"` + Indent int32 `protobuf:"varint,2,opt,name=indent,proto3" json:"indent,omitempty"` + Children []*Node `protobuf:"bytes,3,rep,name=children,proto3" json:"children,omitempty"` +} + +func (x *OrderedListNode) Reset() { + *x = OrderedListNode{} + if protoimpl.UnsafeEnabled { + mi := &file_api_v1_markdown_service_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *OrderedListNode) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*OrderedListNode) ProtoMessage() {} + +func (x *OrderedListNode) ProtoReflect() protoreflect.Message { + mi := &file_api_v1_markdown_service_proto_msgTypes[13] + 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 OrderedListNode.ProtoReflect.Descriptor instead. +func (*OrderedListNode) Descriptor() ([]byte, []int) { + return file_api_v1_markdown_service_proto_rawDescGZIP(), []int{13} +} + +func (x *OrderedListNode) GetNumber() string { + if x != nil { + return x.Number + } + return "" +} + +func (x *OrderedListNode) GetIndent() int32 { + if x != nil { + return x.Indent + } + return 0 +} + +func (x *OrderedListNode) GetChildren() []*Node { + if x != nil { + return x.Children + } + return nil +} + +type UnorderedListNode struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Symbol string `protobuf:"bytes,1,opt,name=symbol,proto3" json:"symbol,omitempty"` + Indent int32 `protobuf:"varint,2,opt,name=indent,proto3" json:"indent,omitempty"` + Children []*Node `protobuf:"bytes,3,rep,name=children,proto3" json:"children,omitempty"` +} + +func (x *UnorderedListNode) Reset() { + *x = UnorderedListNode{} + if protoimpl.UnsafeEnabled { + mi := &file_api_v1_markdown_service_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *UnorderedListNode) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*UnorderedListNode) ProtoMessage() {} + +func (x *UnorderedListNode) ProtoReflect() protoreflect.Message { + mi := &file_api_v1_markdown_service_proto_msgTypes[14] + 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 UnorderedListNode.ProtoReflect.Descriptor instead. +func (*UnorderedListNode) Descriptor() ([]byte, []int) { + return file_api_v1_markdown_service_proto_rawDescGZIP(), []int{14} +} + +func (x *UnorderedListNode) GetSymbol() string { + if x != nil { + return x.Symbol + } + return "" +} + +func (x *UnorderedListNode) GetIndent() int32 { + if x != nil { + return x.Indent + } + return 0 +} + +func (x *UnorderedListNode) GetChildren() []*Node { + if x != nil { + return x.Children + } + return nil +} + +type TaskListNode struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Symbol string `protobuf:"bytes,1,opt,name=symbol,proto3" json:"symbol,omitempty"` + Indent int32 `protobuf:"varint,2,opt,name=indent,proto3" json:"indent,omitempty"` + Complete bool `protobuf:"varint,3,opt,name=complete,proto3" json:"complete,omitempty"` + Children []*Node `protobuf:"bytes,4,rep,name=children,proto3" json:"children,omitempty"` +} + +func (x *TaskListNode) Reset() { + *x = TaskListNode{} + if protoimpl.UnsafeEnabled { + mi := &file_api_v1_markdown_service_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *TaskListNode) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*TaskListNode) ProtoMessage() {} + +func (x *TaskListNode) ProtoReflect() protoreflect.Message { + mi := &file_api_v1_markdown_service_proto_msgTypes[15] + 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 TaskListNode.ProtoReflect.Descriptor instead. +func (*TaskListNode) Descriptor() ([]byte, []int) { + return file_api_v1_markdown_service_proto_rawDescGZIP(), []int{15} +} + +func (x *TaskListNode) GetSymbol() string { + if x != nil { + return x.Symbol + } + return "" +} + +func (x *TaskListNode) GetIndent() int32 { + if x != nil { + return x.Indent + } + return 0 +} + +func (x *TaskListNode) GetComplete() bool { + if x != nil { + return x.Complete + } + return false +} + +func (x *TaskListNode) GetChildren() []*Node { + if x != nil { + return x.Children + } + return nil +} + +type MathBlockNode struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Content string `protobuf:"bytes,1,opt,name=content,proto3" json:"content,omitempty"` +} + +func (x *MathBlockNode) Reset() { + *x = MathBlockNode{} + if protoimpl.UnsafeEnabled { + mi := &file_api_v1_markdown_service_proto_msgTypes[16] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *MathBlockNode) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MathBlockNode) ProtoMessage() {} + +func (x *MathBlockNode) ProtoReflect() protoreflect.Message { + mi := &file_api_v1_markdown_service_proto_msgTypes[16] + 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 MathBlockNode.ProtoReflect.Descriptor instead. +func (*MathBlockNode) Descriptor() ([]byte, []int) { + return file_api_v1_markdown_service_proto_rawDescGZIP(), []int{16} +} + +func (x *MathBlockNode) GetContent() string { + if x != nil { + return x.Content + } + return "" +} + +type TableNode struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Header []string `protobuf:"bytes,1,rep,name=header,proto3" json:"header,omitempty"` + Delimiter []string `protobuf:"bytes,2,rep,name=delimiter,proto3" json:"delimiter,omitempty"` + Rows []*TableNode_Row `protobuf:"bytes,3,rep,name=rows,proto3" json:"rows,omitempty"` +} + +func (x *TableNode) Reset() { + *x = TableNode{} + if protoimpl.UnsafeEnabled { + mi := &file_api_v1_markdown_service_proto_msgTypes[17] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *TableNode) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*TableNode) ProtoMessage() {} + +func (x *TableNode) ProtoReflect() protoreflect.Message { + mi := &file_api_v1_markdown_service_proto_msgTypes[17] + 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 TableNode.ProtoReflect.Descriptor instead. +func (*TableNode) Descriptor() ([]byte, []int) { + return file_api_v1_markdown_service_proto_rawDescGZIP(), []int{17} +} + +func (x *TableNode) GetHeader() []string { + if x != nil { + return x.Header + } + return nil +} + +func (x *TableNode) GetDelimiter() []string { + if x != nil { + return x.Delimiter + } + return nil +} + +func (x *TableNode) GetRows() []*TableNode_Row { + if x != nil { + return x.Rows + } + return nil +} + +type EmbeddedContentNode struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + ResourceName string `protobuf:"bytes,1,opt,name=resource_name,json=resourceName,proto3" json:"resource_name,omitempty"` + Params string `protobuf:"bytes,2,opt,name=params,proto3" json:"params,omitempty"` +} + +func (x *EmbeddedContentNode) Reset() { + *x = EmbeddedContentNode{} + if protoimpl.UnsafeEnabled { + mi := &file_api_v1_markdown_service_proto_msgTypes[18] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *EmbeddedContentNode) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*EmbeddedContentNode) ProtoMessage() {} + +func (x *EmbeddedContentNode) ProtoReflect() protoreflect.Message { + mi := &file_api_v1_markdown_service_proto_msgTypes[18] + 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 EmbeddedContentNode.ProtoReflect.Descriptor instead. +func (*EmbeddedContentNode) Descriptor() ([]byte, []int) { + return file_api_v1_markdown_service_proto_rawDescGZIP(), []int{18} +} + +func (x *EmbeddedContentNode) GetResourceName() string { + if x != nil { + return x.ResourceName + } + return "" +} + +func (x *EmbeddedContentNode) GetParams() string { + if x != nil { + return x.Params + } + return "" +} + +type TextNode struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Content string `protobuf:"bytes,1,opt,name=content,proto3" json:"content,omitempty"` +} + +func (x *TextNode) Reset() { + *x = TextNode{} + if protoimpl.UnsafeEnabled { + mi := &file_api_v1_markdown_service_proto_msgTypes[19] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *TextNode) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*TextNode) ProtoMessage() {} + +func (x *TextNode) ProtoReflect() protoreflect.Message { + mi := &file_api_v1_markdown_service_proto_msgTypes[19] + 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 TextNode.ProtoReflect.Descriptor instead. +func (*TextNode) Descriptor() ([]byte, []int) { + return file_api_v1_markdown_service_proto_rawDescGZIP(), []int{19} +} + +func (x *TextNode) GetContent() string { + if x != nil { + return x.Content + } + return "" +} + +type BoldNode struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Symbol string `protobuf:"bytes,1,opt,name=symbol,proto3" json:"symbol,omitempty"` + Children []*Node `protobuf:"bytes,2,rep,name=children,proto3" json:"children,omitempty"` +} + +func (x *BoldNode) Reset() { + *x = BoldNode{} + if protoimpl.UnsafeEnabled { + mi := &file_api_v1_markdown_service_proto_msgTypes[20] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *BoldNode) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*BoldNode) ProtoMessage() {} + +func (x *BoldNode) ProtoReflect() protoreflect.Message { + mi := &file_api_v1_markdown_service_proto_msgTypes[20] + 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 BoldNode.ProtoReflect.Descriptor instead. +func (*BoldNode) Descriptor() ([]byte, []int) { + return file_api_v1_markdown_service_proto_rawDescGZIP(), []int{20} +} + +func (x *BoldNode) GetSymbol() string { + if x != nil { + return x.Symbol + } + return "" +} + +func (x *BoldNode) GetChildren() []*Node { + if x != nil { + return x.Children + } + return nil +} + +type ItalicNode struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Symbol string `protobuf:"bytes,1,opt,name=symbol,proto3" json:"symbol,omitempty"` + Content string `protobuf:"bytes,2,opt,name=content,proto3" json:"content,omitempty"` +} + +func (x *ItalicNode) Reset() { + *x = ItalicNode{} + if protoimpl.UnsafeEnabled { + mi := &file_api_v1_markdown_service_proto_msgTypes[21] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ItalicNode) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ItalicNode) ProtoMessage() {} + +func (x *ItalicNode) ProtoReflect() protoreflect.Message { + mi := &file_api_v1_markdown_service_proto_msgTypes[21] + 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 ItalicNode.ProtoReflect.Descriptor instead. +func (*ItalicNode) Descriptor() ([]byte, []int) { + return file_api_v1_markdown_service_proto_rawDescGZIP(), []int{21} +} + +func (x *ItalicNode) GetSymbol() string { + if x != nil { + return x.Symbol + } + return "" +} + +func (x *ItalicNode) GetContent() string { + if x != nil { + return x.Content + } + return "" +} + +type BoldItalicNode struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Symbol string `protobuf:"bytes,1,opt,name=symbol,proto3" json:"symbol,omitempty"` + Content string `protobuf:"bytes,2,opt,name=content,proto3" json:"content,omitempty"` +} + +func (x *BoldItalicNode) Reset() { + *x = BoldItalicNode{} + if protoimpl.UnsafeEnabled { + mi := &file_api_v1_markdown_service_proto_msgTypes[22] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *BoldItalicNode) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*BoldItalicNode) ProtoMessage() {} + +func (x *BoldItalicNode) ProtoReflect() protoreflect.Message { + mi := &file_api_v1_markdown_service_proto_msgTypes[22] + 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 BoldItalicNode.ProtoReflect.Descriptor instead. +func (*BoldItalicNode) Descriptor() ([]byte, []int) { + return file_api_v1_markdown_service_proto_rawDescGZIP(), []int{22} +} + +func (x *BoldItalicNode) GetSymbol() string { + if x != nil { + return x.Symbol + } + return "" +} + +func (x *BoldItalicNode) GetContent() string { + if x != nil { + return x.Content + } + return "" +} + +type CodeNode struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Content string `protobuf:"bytes,1,opt,name=content,proto3" json:"content,omitempty"` +} + +func (x *CodeNode) Reset() { + *x = CodeNode{} + if protoimpl.UnsafeEnabled { + mi := &file_api_v1_markdown_service_proto_msgTypes[23] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *CodeNode) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CodeNode) ProtoMessage() {} + +func (x *CodeNode) ProtoReflect() protoreflect.Message { + mi := &file_api_v1_markdown_service_proto_msgTypes[23] + 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 CodeNode.ProtoReflect.Descriptor instead. +func (*CodeNode) Descriptor() ([]byte, []int) { + return file_api_v1_markdown_service_proto_rawDescGZIP(), []int{23} +} + +func (x *CodeNode) GetContent() string { + if x != nil { + return x.Content + } + return "" +} + +type ImageNode struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + AltText string `protobuf:"bytes,1,opt,name=alt_text,json=altText,proto3" json:"alt_text,omitempty"` + Url string `protobuf:"bytes,2,opt,name=url,proto3" json:"url,omitempty"` +} + +func (x *ImageNode) Reset() { + *x = ImageNode{} + if protoimpl.UnsafeEnabled { + mi := &file_api_v1_markdown_service_proto_msgTypes[24] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ImageNode) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ImageNode) ProtoMessage() {} + +func (x *ImageNode) ProtoReflect() protoreflect.Message { + mi := &file_api_v1_markdown_service_proto_msgTypes[24] + 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 ImageNode.ProtoReflect.Descriptor instead. +func (*ImageNode) Descriptor() ([]byte, []int) { + return file_api_v1_markdown_service_proto_rawDescGZIP(), []int{24} +} + +func (x *ImageNode) GetAltText() string { + if x != nil { + return x.AltText + } + return "" +} + +func (x *ImageNode) GetUrl() string { + if x != nil { + return x.Url + } + return "" +} + +type LinkNode struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Text string `protobuf:"bytes,1,opt,name=text,proto3" json:"text,omitempty"` + Url string `protobuf:"bytes,2,opt,name=url,proto3" json:"url,omitempty"` +} + +func (x *LinkNode) Reset() { + *x = LinkNode{} + if protoimpl.UnsafeEnabled { + mi := &file_api_v1_markdown_service_proto_msgTypes[25] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *LinkNode) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*LinkNode) ProtoMessage() {} + +func (x *LinkNode) ProtoReflect() protoreflect.Message { + mi := &file_api_v1_markdown_service_proto_msgTypes[25] + 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 LinkNode.ProtoReflect.Descriptor instead. +func (*LinkNode) Descriptor() ([]byte, []int) { + return file_api_v1_markdown_service_proto_rawDescGZIP(), []int{25} +} + +func (x *LinkNode) GetText() string { + if x != nil { + return x.Text + } + return "" +} + +func (x *LinkNode) GetUrl() string { + if x != nil { + return x.Url + } + return "" +} + +type AutoLinkNode struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Url string `protobuf:"bytes,1,opt,name=url,proto3" json:"url,omitempty"` + IsRawText bool `protobuf:"varint,2,opt,name=is_raw_text,json=isRawText,proto3" json:"is_raw_text,omitempty"` +} + +func (x *AutoLinkNode) Reset() { + *x = AutoLinkNode{} + if protoimpl.UnsafeEnabled { + mi := &file_api_v1_markdown_service_proto_msgTypes[26] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *AutoLinkNode) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*AutoLinkNode) ProtoMessage() {} + +func (x *AutoLinkNode) ProtoReflect() protoreflect.Message { + mi := &file_api_v1_markdown_service_proto_msgTypes[26] + 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 AutoLinkNode.ProtoReflect.Descriptor instead. +func (*AutoLinkNode) Descriptor() ([]byte, []int) { + return file_api_v1_markdown_service_proto_rawDescGZIP(), []int{26} +} + +func (x *AutoLinkNode) GetUrl() string { + if x != nil { + return x.Url + } + return "" +} + +func (x *AutoLinkNode) GetIsRawText() bool { + if x != nil { + return x.IsRawText + } + return false +} + +type TagNode struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Content string `protobuf:"bytes,1,opt,name=content,proto3" json:"content,omitempty"` +} + +func (x *TagNode) Reset() { + *x = TagNode{} + if protoimpl.UnsafeEnabled { + mi := &file_api_v1_markdown_service_proto_msgTypes[27] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *TagNode) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*TagNode) ProtoMessage() {} + +func (x *TagNode) ProtoReflect() protoreflect.Message { + mi := &file_api_v1_markdown_service_proto_msgTypes[27] + 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 TagNode.ProtoReflect.Descriptor instead. +func (*TagNode) Descriptor() ([]byte, []int) { + return file_api_v1_markdown_service_proto_rawDescGZIP(), []int{27} +} + +func (x *TagNode) GetContent() string { + if x != nil { + return x.Content + } + return "" +} + +type StrikethroughNode struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Content string `protobuf:"bytes,1,opt,name=content,proto3" json:"content,omitempty"` +} + +func (x *StrikethroughNode) Reset() { + *x = StrikethroughNode{} + if protoimpl.UnsafeEnabled { + mi := &file_api_v1_markdown_service_proto_msgTypes[28] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *StrikethroughNode) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*StrikethroughNode) ProtoMessage() {} + +func (x *StrikethroughNode) ProtoReflect() protoreflect.Message { + mi := &file_api_v1_markdown_service_proto_msgTypes[28] + 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 StrikethroughNode.ProtoReflect.Descriptor instead. +func (*StrikethroughNode) Descriptor() ([]byte, []int) { + return file_api_v1_markdown_service_proto_rawDescGZIP(), []int{28} +} + +func (x *StrikethroughNode) GetContent() string { + if x != nil { + return x.Content + } + return "" +} + +type EscapingCharacterNode struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Symbol string `protobuf:"bytes,1,opt,name=symbol,proto3" json:"symbol,omitempty"` +} + +func (x *EscapingCharacterNode) Reset() { + *x = EscapingCharacterNode{} + if protoimpl.UnsafeEnabled { + mi := &file_api_v1_markdown_service_proto_msgTypes[29] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *EscapingCharacterNode) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*EscapingCharacterNode) ProtoMessage() {} + +func (x *EscapingCharacterNode) ProtoReflect() protoreflect.Message { + mi := &file_api_v1_markdown_service_proto_msgTypes[29] + 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 EscapingCharacterNode.ProtoReflect.Descriptor instead. +func (*EscapingCharacterNode) Descriptor() ([]byte, []int) { + return file_api_v1_markdown_service_proto_rawDescGZIP(), []int{29} +} + +func (x *EscapingCharacterNode) GetSymbol() string { + if x != nil { + return x.Symbol + } + return "" +} + +type MathNode struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Content string `protobuf:"bytes,1,opt,name=content,proto3" json:"content,omitempty"` +} + +func (x *MathNode) Reset() { + *x = MathNode{} + if protoimpl.UnsafeEnabled { + mi := &file_api_v1_markdown_service_proto_msgTypes[30] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *MathNode) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MathNode) ProtoMessage() {} + +func (x *MathNode) ProtoReflect() protoreflect.Message { + mi := &file_api_v1_markdown_service_proto_msgTypes[30] + 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 MathNode.ProtoReflect.Descriptor instead. +func (*MathNode) Descriptor() ([]byte, []int) { + return file_api_v1_markdown_service_proto_rawDescGZIP(), []int{30} +} + +func (x *MathNode) GetContent() string { + if x != nil { + return x.Content + } + return "" +} + +type HighlightNode struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Content string `protobuf:"bytes,1,opt,name=content,proto3" json:"content,omitempty"` +} + +func (x *HighlightNode) Reset() { + *x = HighlightNode{} + if protoimpl.UnsafeEnabled { + mi := &file_api_v1_markdown_service_proto_msgTypes[31] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *HighlightNode) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*HighlightNode) ProtoMessage() {} + +func (x *HighlightNode) ProtoReflect() protoreflect.Message { + mi := &file_api_v1_markdown_service_proto_msgTypes[31] + 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 HighlightNode.ProtoReflect.Descriptor instead. +func (*HighlightNode) Descriptor() ([]byte, []int) { + return file_api_v1_markdown_service_proto_rawDescGZIP(), []int{31} +} + +func (x *HighlightNode) GetContent() string { + if x != nil { + return x.Content + } + return "" +} + +type SubscriptNode struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Content string `protobuf:"bytes,1,opt,name=content,proto3" json:"content,omitempty"` +} + +func (x *SubscriptNode) Reset() { + *x = SubscriptNode{} + if protoimpl.UnsafeEnabled { + mi := &file_api_v1_markdown_service_proto_msgTypes[32] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *SubscriptNode) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SubscriptNode) ProtoMessage() {} + +func (x *SubscriptNode) ProtoReflect() protoreflect.Message { + mi := &file_api_v1_markdown_service_proto_msgTypes[32] + 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 SubscriptNode.ProtoReflect.Descriptor instead. +func (*SubscriptNode) Descriptor() ([]byte, []int) { + return file_api_v1_markdown_service_proto_rawDescGZIP(), []int{32} +} + +func (x *SubscriptNode) GetContent() string { + if x != nil { + return x.Content + } + return "" +} + +type SuperscriptNode struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Content string `protobuf:"bytes,1,opt,name=content,proto3" json:"content,omitempty"` +} + +func (x *SuperscriptNode) Reset() { + *x = SuperscriptNode{} + if protoimpl.UnsafeEnabled { + mi := &file_api_v1_markdown_service_proto_msgTypes[33] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *SuperscriptNode) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SuperscriptNode) ProtoMessage() {} + +func (x *SuperscriptNode) ProtoReflect() protoreflect.Message { + mi := &file_api_v1_markdown_service_proto_msgTypes[33] + 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 SuperscriptNode.ProtoReflect.Descriptor instead. +func (*SuperscriptNode) Descriptor() ([]byte, []int) { + return file_api_v1_markdown_service_proto_rawDescGZIP(), []int{33} +} + +func (x *SuperscriptNode) GetContent() string { + if x != nil { + return x.Content + } + return "" +} + +type ReferencedContentNode struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + ResourceName string `protobuf:"bytes,1,opt,name=resource_name,json=resourceName,proto3" json:"resource_name,omitempty"` + Params string `protobuf:"bytes,2,opt,name=params,proto3" json:"params,omitempty"` +} + +func (x *ReferencedContentNode) Reset() { + *x = ReferencedContentNode{} + if protoimpl.UnsafeEnabled { + mi := &file_api_v1_markdown_service_proto_msgTypes[34] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ReferencedContentNode) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ReferencedContentNode) ProtoMessage() {} + +func (x *ReferencedContentNode) ProtoReflect() protoreflect.Message { + mi := &file_api_v1_markdown_service_proto_msgTypes[34] + 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 ReferencedContentNode.ProtoReflect.Descriptor instead. +func (*ReferencedContentNode) Descriptor() ([]byte, []int) { + return file_api_v1_markdown_service_proto_rawDescGZIP(), []int{34} +} + +func (x *ReferencedContentNode) GetResourceName() string { + if x != nil { + return x.ResourceName + } + return "" +} + +func (x *ReferencedContentNode) GetParams() string { + if x != nil { + return x.Params + } + return "" +} + +type SpoilerNode struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Content string `protobuf:"bytes,1,opt,name=content,proto3" json:"content,omitempty"` +} + +func (x *SpoilerNode) Reset() { + *x = SpoilerNode{} + if protoimpl.UnsafeEnabled { + mi := &file_api_v1_markdown_service_proto_msgTypes[35] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *SpoilerNode) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SpoilerNode) ProtoMessage() {} + +func (x *SpoilerNode) ProtoReflect() protoreflect.Message { + mi := &file_api_v1_markdown_service_proto_msgTypes[35] + 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 SpoilerNode.ProtoReflect.Descriptor instead. +func (*SpoilerNode) Descriptor() ([]byte, []int) { + return file_api_v1_markdown_service_proto_rawDescGZIP(), []int{35} +} + +func (x *SpoilerNode) GetContent() string { + if x != nil { + return x.Content + } + return "" +} + +type TableNode_Row struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Cells []string `protobuf:"bytes,1,rep,name=cells,proto3" json:"cells,omitempty"` +} + +func (x *TableNode_Row) Reset() { + *x = TableNode_Row{} + if protoimpl.UnsafeEnabled { + mi := &file_api_v1_markdown_service_proto_msgTypes[36] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *TableNode_Row) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*TableNode_Row) ProtoMessage() {} + +func (x *TableNode_Row) ProtoReflect() protoreflect.Message { + mi := &file_api_v1_markdown_service_proto_msgTypes[36] + 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 TableNode_Row.ProtoReflect.Descriptor instead. +func (*TableNode_Row) Descriptor() ([]byte, []int) { + return file_api_v1_markdown_service_proto_rawDescGZIP(), []int{17, 0} +} + +func (x *TableNode_Row) GetCells() []string { + if x != nil { + return x.Cells + } + return nil +} + +var File_api_v1_markdown_service_proto protoreflect.FileDescriptor + +var file_api_v1_markdown_service_proto_rawDesc = []byte{ + 0x0a, 0x1d, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, 0x2f, 0x6d, 0x61, 0x72, 0x6b, 0x64, 0x6f, 0x77, + 0x6e, 0x5f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, + 0x0c, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x1a, 0x1c, 0x67, + 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x32, 0x0a, 0x14, 0x50, + 0x61, 0x72, 0x73, 0x65, 0x4d, 0x61, 0x72, 0x6b, 0x64, 0x6f, 0x77, 0x6e, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x6d, 0x61, 0x72, 0x6b, 0x64, 0x6f, 0x77, 0x6e, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6d, 0x61, 0x72, 0x6b, 0x64, 0x6f, 0x77, 0x6e, 0x22, + 0x41, 0x0a, 0x15, 0x50, 0x61, 0x72, 0x73, 0x65, 0x4d, 0x61, 0x72, 0x6b, 0x64, 0x6f, 0x77, 0x6e, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x28, 0x0a, 0x05, 0x6e, 0x6f, 0x64, 0x65, + 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, + 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x4e, 0x6f, 0x64, 0x65, 0x52, 0x05, 0x6e, 0x6f, 0x64, + 0x65, 0x73, 0x22, 0x42, 0x0a, 0x16, 0x52, 0x65, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x4d, 0x61, 0x72, + 0x6b, 0x64, 0x6f, 0x77, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x28, 0x0a, 0x05, + 0x6e, 0x6f, 0x64, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x6d, 0x65, + 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x4e, 0x6f, 0x64, 0x65, 0x52, + 0x05, 0x6e, 0x6f, 0x64, 0x65, 0x73, 0x22, 0x35, 0x0a, 0x17, 0x52, 0x65, 0x73, 0x74, 0x6f, 0x72, + 0x65, 0x4d, 0x61, 0x72, 0x6b, 0x64, 0x6f, 0x77, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x6d, 0x61, 0x72, 0x6b, 0x64, 0x6f, 0x77, 0x6e, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x08, 0x6d, 0x61, 0x72, 0x6b, 0x64, 0x6f, 0x77, 0x6e, 0x22, 0x2c, 0x0a, + 0x16, 0x47, 0x65, 0x74, 0x4c, 0x69, 0x6e, 0x6b, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x6c, 0x69, 0x6e, 0x6b, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6c, 0x69, 0x6e, 0x6b, 0x22, 0x5c, 0x0a, 0x0c, 0x4c, + 0x69, 0x6e, 0x6b, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x14, 0x0a, 0x05, 0x74, + 0x69, 0x74, 0x6c, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x74, 0x69, 0x74, 0x6c, + 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, + 0x69, 0x6f, 0x6e, 0x12, 0x14, 0x0a, 0x05, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x18, 0x03, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x05, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x22, 0x9f, 0x10, 0x0a, 0x04, 0x4e, 0x6f, + 0x64, 0x65, 0x12, 0x2a, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, + 0x32, 0x16, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, + 0x4e, 0x6f, 0x64, 0x65, 0x54, 0x79, 0x70, 0x65, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x45, + 0x0a, 0x0f, 0x6c, 0x69, 0x6e, 0x65, 0x5f, 0x62, 0x72, 0x65, 0x61, 0x6b, 0x5f, 0x6e, 0x6f, 0x64, + 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, + 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x69, 0x6e, 0x65, 0x42, 0x72, 0x65, 0x61, 0x6b, + 0x4e, 0x6f, 0x64, 0x65, 0x48, 0x00, 0x52, 0x0d, 0x6c, 0x69, 0x6e, 0x65, 0x42, 0x72, 0x65, 0x61, + 0x6b, 0x4e, 0x6f, 0x64, 0x65, 0x12, 0x44, 0x0a, 0x0e, 0x70, 0x61, 0x72, 0x61, 0x67, 0x72, 0x61, + 0x70, 0x68, 0x5f, 0x6e, 0x6f, 0x64, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, + 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x61, 0x72, + 0x61, 0x67, 0x72, 0x61, 0x70, 0x68, 0x4e, 0x6f, 0x64, 0x65, 0x48, 0x00, 0x52, 0x0d, 0x70, 0x61, + 0x72, 0x61, 0x67, 0x72, 0x61, 0x70, 0x68, 0x4e, 0x6f, 0x64, 0x65, 0x12, 0x45, 0x0a, 0x0f, 0x63, + 0x6f, 0x64, 0x65, 0x5f, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x6e, 0x6f, 0x64, 0x65, 0x18, 0x04, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, + 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x6f, 0x64, 0x65, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x4e, 0x6f, 0x64, + 0x65, 0x48, 0x00, 0x52, 0x0d, 0x63, 0x6f, 0x64, 0x65, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x4e, 0x6f, + 0x64, 0x65, 0x12, 0x3e, 0x0a, 0x0c, 0x68, 0x65, 0x61, 0x64, 0x69, 0x6e, 0x67, 0x5f, 0x6e, 0x6f, + 0x64, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, + 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x48, 0x65, 0x61, 0x64, 0x69, 0x6e, 0x67, 0x4e, + 0x6f, 0x64, 0x65, 0x48, 0x00, 0x52, 0x0b, 0x68, 0x65, 0x61, 0x64, 0x69, 0x6e, 0x67, 0x4e, 0x6f, + 0x64, 0x65, 0x12, 0x54, 0x0a, 0x14, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x6f, 0x6e, 0x74, 0x61, 0x6c, + 0x5f, 0x72, 0x75, 0x6c, 0x65, 0x5f, 0x6e, 0x6f, 0x64, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x20, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, + 0x48, 0x6f, 0x72, 0x69, 0x7a, 0x6f, 0x6e, 0x74, 0x61, 0x6c, 0x52, 0x75, 0x6c, 0x65, 0x4e, 0x6f, + 0x64, 0x65, 0x48, 0x00, 0x52, 0x12, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x6f, 0x6e, 0x74, 0x61, 0x6c, + 0x52, 0x75, 0x6c, 0x65, 0x4e, 0x6f, 0x64, 0x65, 0x12, 0x47, 0x0a, 0x0f, 0x62, 0x6c, 0x6f, 0x63, + 0x6b, 0x71, 0x75, 0x6f, 0x74, 0x65, 0x5f, 0x6e, 0x6f, 0x64, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x1c, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, + 0x2e, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x71, 0x75, 0x6f, 0x74, 0x65, 0x4e, 0x6f, 0x64, 0x65, 0x48, + 0x00, 0x52, 0x0e, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x71, 0x75, 0x6f, 0x74, 0x65, 0x4e, 0x6f, 0x64, + 0x65, 0x12, 0x4b, 0x0a, 0x11, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x65, 0x64, 0x5f, 0x6c, 0x69, 0x73, + 0x74, 0x5f, 0x6e, 0x6f, 0x64, 0x65, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x6d, + 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x4f, 0x72, 0x64, 0x65, + 0x72, 0x65, 0x64, 0x4c, 0x69, 0x73, 0x74, 0x4e, 0x6f, 0x64, 0x65, 0x48, 0x00, 0x52, 0x0f, 0x6f, + 0x72, 0x64, 0x65, 0x72, 0x65, 0x64, 0x4c, 0x69, 0x73, 0x74, 0x4e, 0x6f, 0x64, 0x65, 0x12, 0x51, + 0x0a, 0x13, 0x75, 0x6e, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x65, 0x64, 0x5f, 0x6c, 0x69, 0x73, 0x74, + 0x5f, 0x6e, 0x6f, 0x64, 0x65, 0x18, 0x09, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x6d, 0x65, + 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x6e, 0x6f, 0x72, 0x64, + 0x65, 0x72, 0x65, 0x64, 0x4c, 0x69, 0x73, 0x74, 0x4e, 0x6f, 0x64, 0x65, 0x48, 0x00, 0x52, 0x11, + 0x75, 0x6e, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x65, 0x64, 0x4c, 0x69, 0x73, 0x74, 0x4e, 0x6f, 0x64, + 0x65, 0x12, 0x42, 0x0a, 0x0e, 0x74, 0x61, 0x73, 0x6b, 0x5f, 0x6c, 0x69, 0x73, 0x74, 0x5f, 0x6e, + 0x6f, 0x64, 0x65, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, + 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x61, 0x73, 0x6b, 0x4c, 0x69, 0x73, + 0x74, 0x4e, 0x6f, 0x64, 0x65, 0x48, 0x00, 0x52, 0x0c, 0x74, 0x61, 0x73, 0x6b, 0x4c, 0x69, 0x73, + 0x74, 0x4e, 0x6f, 0x64, 0x65, 0x12, 0x45, 0x0a, 0x0f, 0x6d, 0x61, 0x74, 0x68, 0x5f, 0x62, 0x6c, + 0x6f, 0x63, 0x6b, 0x5f, 0x6e, 0x6f, 0x64, 0x65, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, + 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x61, + 0x74, 0x68, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x4e, 0x6f, 0x64, 0x65, 0x48, 0x00, 0x52, 0x0d, 0x6d, + 0x61, 0x74, 0x68, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x4e, 0x6f, 0x64, 0x65, 0x12, 0x38, 0x0a, 0x0a, + 0x74, 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x6e, 0x6f, 0x64, 0x65, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x17, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, + 0x54, 0x61, 0x62, 0x6c, 0x65, 0x4e, 0x6f, 0x64, 0x65, 0x48, 0x00, 0x52, 0x09, 0x74, 0x61, 0x62, + 0x6c, 0x65, 0x4e, 0x6f, 0x64, 0x65, 0x12, 0x57, 0x0a, 0x15, 0x65, 0x6d, 0x62, 0x65, 0x64, 0x64, + 0x65, 0x64, 0x5f, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x5f, 0x6e, 0x6f, 0x64, 0x65, 0x18, + 0x0d, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, + 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x45, 0x6d, 0x62, 0x65, 0x64, 0x64, 0x65, 0x64, 0x43, 0x6f, 0x6e, + 0x74, 0x65, 0x6e, 0x74, 0x4e, 0x6f, 0x64, 0x65, 0x48, 0x00, 0x52, 0x13, 0x65, 0x6d, 0x62, 0x65, + 0x64, 0x64, 0x65, 0x64, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x4e, 0x6f, 0x64, 0x65, 0x12, + 0x35, 0x0a, 0x09, 0x74, 0x65, 0x78, 0x74, 0x5f, 0x6e, 0x6f, 0x64, 0x65, 0x18, 0x0e, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, + 0x31, 0x2e, 0x54, 0x65, 0x78, 0x74, 0x4e, 0x6f, 0x64, 0x65, 0x48, 0x00, 0x52, 0x08, 0x74, 0x65, + 0x78, 0x74, 0x4e, 0x6f, 0x64, 0x65, 0x12, 0x35, 0x0a, 0x09, 0x62, 0x6f, 0x6c, 0x64, 0x5f, 0x6e, + 0x6f, 0x64, 0x65, 0x18, 0x0f, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, + 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x42, 0x6f, 0x6c, 0x64, 0x4e, 0x6f, 0x64, + 0x65, 0x48, 0x00, 0x52, 0x08, 0x62, 0x6f, 0x6c, 0x64, 0x4e, 0x6f, 0x64, 0x65, 0x12, 0x3b, 0x0a, + 0x0b, 0x69, 0x74, 0x61, 0x6c, 0x69, 0x63, 0x5f, 0x6e, 0x6f, 0x64, 0x65, 0x18, 0x10, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, + 0x31, 0x2e, 0x49, 0x74, 0x61, 0x6c, 0x69, 0x63, 0x4e, 0x6f, 0x64, 0x65, 0x48, 0x00, 0x52, 0x0a, + 0x69, 0x74, 0x61, 0x6c, 0x69, 0x63, 0x4e, 0x6f, 0x64, 0x65, 0x12, 0x48, 0x0a, 0x10, 0x62, 0x6f, + 0x6c, 0x64, 0x5f, 0x69, 0x74, 0x61, 0x6c, 0x69, 0x63, 0x5f, 0x6e, 0x6f, 0x64, 0x65, 0x18, 0x11, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, + 0x2e, 0x76, 0x31, 0x2e, 0x42, 0x6f, 0x6c, 0x64, 0x49, 0x74, 0x61, 0x6c, 0x69, 0x63, 0x4e, 0x6f, + 0x64, 0x65, 0x48, 0x00, 0x52, 0x0e, 0x62, 0x6f, 0x6c, 0x64, 0x49, 0x74, 0x61, 0x6c, 0x69, 0x63, + 0x4e, 0x6f, 0x64, 0x65, 0x12, 0x35, 0x0a, 0x09, 0x63, 0x6f, 0x64, 0x65, 0x5f, 0x6e, 0x6f, 0x64, + 0x65, 0x18, 0x12, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, + 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x6f, 0x64, 0x65, 0x4e, 0x6f, 0x64, 0x65, 0x48, + 0x00, 0x52, 0x08, 0x63, 0x6f, 0x64, 0x65, 0x4e, 0x6f, 0x64, 0x65, 0x12, 0x38, 0x0a, 0x0a, 0x69, + 0x6d, 0x61, 0x67, 0x65, 0x5f, 0x6e, 0x6f, 0x64, 0x65, 0x18, 0x13, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x17, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x49, + 0x6d, 0x61, 0x67, 0x65, 0x4e, 0x6f, 0x64, 0x65, 0x48, 0x00, 0x52, 0x09, 0x69, 0x6d, 0x61, 0x67, + 0x65, 0x4e, 0x6f, 0x64, 0x65, 0x12, 0x35, 0x0a, 0x09, 0x6c, 0x69, 0x6e, 0x6b, 0x5f, 0x6e, 0x6f, + 0x64, 0x65, 0x18, 0x14, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, + 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x69, 0x6e, 0x6b, 0x4e, 0x6f, 0x64, 0x65, + 0x48, 0x00, 0x52, 0x08, 0x6c, 0x69, 0x6e, 0x6b, 0x4e, 0x6f, 0x64, 0x65, 0x12, 0x42, 0x0a, 0x0e, + 0x61, 0x75, 0x74, 0x6f, 0x5f, 0x6c, 0x69, 0x6e, 0x6b, 0x5f, 0x6e, 0x6f, 0x64, 0x65, 0x18, 0x15, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, + 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x75, 0x74, 0x6f, 0x4c, 0x69, 0x6e, 0x6b, 0x4e, 0x6f, 0x64, 0x65, + 0x48, 0x00, 0x52, 0x0c, 0x61, 0x75, 0x74, 0x6f, 0x4c, 0x69, 0x6e, 0x6b, 0x4e, 0x6f, 0x64, 0x65, + 0x12, 0x32, 0x0a, 0x08, 0x74, 0x61, 0x67, 0x5f, 0x6e, 0x6f, 0x64, 0x65, 0x18, 0x16, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, + 0x31, 0x2e, 0x54, 0x61, 0x67, 0x4e, 0x6f, 0x64, 0x65, 0x48, 0x00, 0x52, 0x07, 0x74, 0x61, 0x67, + 0x4e, 0x6f, 0x64, 0x65, 0x12, 0x50, 0x0a, 0x12, 0x73, 0x74, 0x72, 0x69, 0x6b, 0x65, 0x74, 0x68, + 0x72, 0x6f, 0x75, 0x67, 0x68, 0x5f, 0x6e, 0x6f, 0x64, 0x65, 0x18, 0x17, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x1f, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, + 0x53, 0x74, 0x72, 0x69, 0x6b, 0x65, 0x74, 0x68, 0x72, 0x6f, 0x75, 0x67, 0x68, 0x4e, 0x6f, 0x64, + 0x65, 0x48, 0x00, 0x52, 0x11, 0x73, 0x74, 0x72, 0x69, 0x6b, 0x65, 0x74, 0x68, 0x72, 0x6f, 0x75, + 0x67, 0x68, 0x4e, 0x6f, 0x64, 0x65, 0x12, 0x5d, 0x0a, 0x17, 0x65, 0x73, 0x63, 0x61, 0x70, 0x69, + 0x6e, 0x67, 0x5f, 0x63, 0x68, 0x61, 0x72, 0x61, 0x63, 0x74, 0x65, 0x72, 0x5f, 0x6e, 0x6f, 0x64, + 0x65, 0x18, 0x18, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, + 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x45, 0x73, 0x63, 0x61, 0x70, 0x69, 0x6e, 0x67, 0x43, + 0x68, 0x61, 0x72, 0x61, 0x63, 0x74, 0x65, 0x72, 0x4e, 0x6f, 0x64, 0x65, 0x48, 0x00, 0x52, 0x15, + 0x65, 0x73, 0x63, 0x61, 0x70, 0x69, 0x6e, 0x67, 0x43, 0x68, 0x61, 0x72, 0x61, 0x63, 0x74, 0x65, + 0x72, 0x4e, 0x6f, 0x64, 0x65, 0x12, 0x35, 0x0a, 0x09, 0x6d, 0x61, 0x74, 0x68, 0x5f, 0x6e, 0x6f, + 0x64, 0x65, 0x18, 0x19, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, + 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x61, 0x74, 0x68, 0x4e, 0x6f, 0x64, 0x65, + 0x48, 0x00, 0x52, 0x08, 0x6d, 0x61, 0x74, 0x68, 0x4e, 0x6f, 0x64, 0x65, 0x12, 0x44, 0x0a, 0x0e, + 0x68, 0x69, 0x67, 0x68, 0x6c, 0x69, 0x67, 0x68, 0x74, 0x5f, 0x6e, 0x6f, 0x64, 0x65, 0x18, 0x1a, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, + 0x2e, 0x76, 0x31, 0x2e, 0x48, 0x69, 0x67, 0x68, 0x6c, 0x69, 0x67, 0x68, 0x74, 0x4e, 0x6f, 0x64, + 0x65, 0x48, 0x00, 0x52, 0x0d, 0x68, 0x69, 0x67, 0x68, 0x6c, 0x69, 0x67, 0x68, 0x74, 0x4e, 0x6f, + 0x64, 0x65, 0x12, 0x44, 0x0a, 0x0e, 0x73, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x5f, + 0x6e, 0x6f, 0x64, 0x65, 0x18, 0x1b, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x6d, 0x65, 0x6d, + 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x75, 0x62, 0x73, 0x63, 0x72, + 0x69, 0x70, 0x74, 0x4e, 0x6f, 0x64, 0x65, 0x48, 0x00, 0x52, 0x0d, 0x73, 0x75, 0x62, 0x73, 0x63, + 0x72, 0x69, 0x70, 0x74, 0x4e, 0x6f, 0x64, 0x65, 0x12, 0x4a, 0x0a, 0x10, 0x73, 0x75, 0x70, 0x65, + 0x72, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x5f, 0x6e, 0x6f, 0x64, 0x65, 0x18, 0x1c, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, + 0x31, 0x2e, 0x53, 0x75, 0x70, 0x65, 0x72, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x4e, 0x6f, 0x64, + 0x65, 0x48, 0x00, 0x52, 0x0f, 0x73, 0x75, 0x70, 0x65, 0x72, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, + 0x4e, 0x6f, 0x64, 0x65, 0x12, 0x5d, 0x0a, 0x17, 0x72, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, + 0x65, 0x64, 0x5f, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x5f, 0x6e, 0x6f, 0x64, 0x65, 0x18, + 0x1d, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, + 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x64, 0x43, + 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x4e, 0x6f, 0x64, 0x65, 0x48, 0x00, 0x52, 0x15, 0x72, 0x65, + 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x64, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x4e, + 0x6f, 0x64, 0x65, 0x12, 0x3e, 0x0a, 0x0c, 0x73, 0x70, 0x6f, 0x69, 0x6c, 0x65, 0x72, 0x5f, 0x6e, + 0x6f, 0x64, 0x65, 0x18, 0x1e, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, + 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x70, 0x6f, 0x69, 0x6c, 0x65, 0x72, + 0x4e, 0x6f, 0x64, 0x65, 0x48, 0x00, 0x52, 0x0b, 0x73, 0x70, 0x6f, 0x69, 0x6c, 0x65, 0x72, 0x4e, + 0x6f, 0x64, 0x65, 0x42, 0x06, 0x0a, 0x04, 0x6e, 0x6f, 0x64, 0x65, 0x22, 0x0f, 0x0a, 0x0d, 0x4c, + 0x69, 0x6e, 0x65, 0x42, 0x72, 0x65, 0x61, 0x6b, 0x4e, 0x6f, 0x64, 0x65, 0x22, 0x3f, 0x0a, 0x0d, + 0x50, 0x61, 0x72, 0x61, 0x67, 0x72, 0x61, 0x70, 0x68, 0x4e, 0x6f, 0x64, 0x65, 0x12, 0x2e, 0x0a, + 0x08, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x72, 0x65, 0x6e, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, + 0x12, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x4e, + 0x6f, 0x64, 0x65, 0x52, 0x08, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x72, 0x65, 0x6e, 0x22, 0x45, 0x0a, + 0x0d, 0x43, 0x6f, 0x64, 0x65, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x4e, 0x6f, 0x64, 0x65, 0x12, 0x1a, + 0x0a, 0x08, 0x6c, 0x61, 0x6e, 0x67, 0x75, 0x61, 0x67, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x08, 0x6c, 0x61, 0x6e, 0x67, 0x75, 0x61, 0x67, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x63, 0x6f, + 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x63, 0x6f, 0x6e, + 0x74, 0x65, 0x6e, 0x74, 0x22, 0x53, 0x0a, 0x0b, 0x48, 0x65, 0x61, 0x64, 0x69, 0x6e, 0x67, 0x4e, + 0x6f, 0x64, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x6c, 0x65, 0x76, 0x65, 0x6c, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x05, 0x52, 0x05, 0x6c, 0x65, 0x76, 0x65, 0x6c, 0x12, 0x2e, 0x0a, 0x08, 0x63, 0x68, 0x69, + 0x6c, 0x64, 0x72, 0x65, 0x6e, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x6d, 0x65, + 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x4e, 0x6f, 0x64, 0x65, 0x52, + 0x08, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x72, 0x65, 0x6e, 0x22, 0x2c, 0x0a, 0x12, 0x48, 0x6f, 0x72, + 0x69, 0x7a, 0x6f, 0x6e, 0x74, 0x61, 0x6c, 0x52, 0x75, 0x6c, 0x65, 0x4e, 0x6f, 0x64, 0x65, 0x12, + 0x16, 0x0a, 0x06, 0x73, 0x79, 0x6d, 0x62, 0x6f, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x06, 0x73, 0x79, 0x6d, 0x62, 0x6f, 0x6c, 0x22, 0x40, 0x0a, 0x0e, 0x42, 0x6c, 0x6f, 0x63, 0x6b, + 0x71, 0x75, 0x6f, 0x74, 0x65, 0x4e, 0x6f, 0x64, 0x65, 0x12, 0x2e, 0x0a, 0x08, 0x63, 0x68, 0x69, + 0x6c, 0x64, 0x72, 0x65, 0x6e, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x6d, 0x65, + 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x4e, 0x6f, 0x64, 0x65, 0x52, + 0x08, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x72, 0x65, 0x6e, 0x22, 0x71, 0x0a, 0x0f, 0x4f, 0x72, 0x64, + 0x65, 0x72, 0x65, 0x64, 0x4c, 0x69, 0x73, 0x74, 0x4e, 0x6f, 0x64, 0x65, 0x12, 0x16, 0x0a, 0x06, + 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x6e, 0x75, + 0x6d, 0x62, 0x65, 0x72, 0x12, 0x16, 0x0a, 0x06, 0x69, 0x6e, 0x64, 0x65, 0x6e, 0x74, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x69, 0x6e, 0x64, 0x65, 0x6e, 0x74, 0x12, 0x2e, 0x0a, 0x08, + 0x63, 0x68, 0x69, 0x6c, 0x64, 0x72, 0x65, 0x6e, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x12, + 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x4e, 0x6f, + 0x64, 0x65, 0x52, 0x08, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x72, 0x65, 0x6e, 0x22, 0x73, 0x0a, 0x11, + 0x55, 0x6e, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x65, 0x64, 0x4c, 0x69, 0x73, 0x74, 0x4e, 0x6f, 0x64, + 0x65, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x79, 0x6d, 0x62, 0x6f, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x06, 0x73, 0x79, 0x6d, 0x62, 0x6f, 0x6c, 0x12, 0x16, 0x0a, 0x06, 0x69, 0x6e, 0x64, + 0x65, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x69, 0x6e, 0x64, 0x65, 0x6e, + 0x74, 0x12, 0x2e, 0x0a, 0x08, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x72, 0x65, 0x6e, 0x18, 0x03, 0x20, + 0x03, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, + 0x76, 0x31, 0x2e, 0x4e, 0x6f, 0x64, 0x65, 0x52, 0x08, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x72, 0x65, + 0x6e, 0x22, 0x8a, 0x01, 0x0a, 0x0c, 0x54, 0x61, 0x73, 0x6b, 0x4c, 0x69, 0x73, 0x74, 0x4e, 0x6f, + 0x64, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x79, 0x6d, 0x62, 0x6f, 0x6c, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x06, 0x73, 0x79, 0x6d, 0x62, 0x6f, 0x6c, 0x12, 0x16, 0x0a, 0x06, 0x69, 0x6e, + 0x64, 0x65, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x69, 0x6e, 0x64, 0x65, + 0x6e, 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x63, 0x6f, 0x6d, 0x70, 0x6c, 0x65, 0x74, 0x65, 0x18, 0x03, + 0x20, 0x01, 0x28, 0x08, 0x52, 0x08, 0x63, 0x6f, 0x6d, 0x70, 0x6c, 0x65, 0x74, 0x65, 0x12, 0x2e, + 0x0a, 0x08, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x72, 0x65, 0x6e, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, + 0x32, 0x12, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, + 0x4e, 0x6f, 0x64, 0x65, 0x52, 0x08, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x72, 0x65, 0x6e, 0x22, 0x29, + 0x0a, 0x0d, 0x4d, 0x61, 0x74, 0x68, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x4e, 0x6f, 0x64, 0x65, 0x12, + 0x18, 0x0a, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x22, 0x8f, 0x01, 0x0a, 0x09, 0x54, 0x61, + 0x62, 0x6c, 0x65, 0x4e, 0x6f, 0x64, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x68, 0x65, 0x61, 0x64, 0x65, + 0x72, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x06, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x12, + 0x1c, 0x0a, 0x09, 0x64, 0x65, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x65, 0x72, 0x18, 0x02, 0x20, 0x03, + 0x28, 0x09, 0x52, 0x09, 0x64, 0x65, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x65, 0x72, 0x12, 0x2f, 0x0a, + 0x04, 0x72, 0x6f, 0x77, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x6d, 0x65, + 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x61, 0x62, 0x6c, 0x65, + 0x4e, 0x6f, 0x64, 0x65, 0x2e, 0x52, 0x6f, 0x77, 0x52, 0x04, 0x72, 0x6f, 0x77, 0x73, 0x1a, 0x1b, + 0x0a, 0x03, 0x52, 0x6f, 0x77, 0x12, 0x14, 0x0a, 0x05, 0x63, 0x65, 0x6c, 0x6c, 0x73, 0x18, 0x01, + 0x20, 0x03, 0x28, 0x09, 0x52, 0x05, 0x63, 0x65, 0x6c, 0x6c, 0x73, 0x22, 0x52, 0x0a, 0x13, 0x45, + 0x6d, 0x62, 0x65, 0x64, 0x64, 0x65, 0x64, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x4e, 0x6f, + 0x64, 0x65, 0x12, 0x23, 0x0a, 0x0d, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x6e, + 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x72, 0x65, 0x73, 0x6f, 0x75, + 0x72, 0x63, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, + 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x22, + 0x24, 0x0a, 0x08, 0x54, 0x65, 0x78, 0x74, 0x4e, 0x6f, 0x64, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x63, + 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x63, 0x6f, + 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x22, 0x52, 0x0a, 0x08, 0x42, 0x6f, 0x6c, 0x64, 0x4e, 0x6f, 0x64, + 0x65, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x79, 0x6d, 0x62, 0x6f, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x06, 0x73, 0x79, 0x6d, 0x62, 0x6f, 0x6c, 0x12, 0x2e, 0x0a, 0x08, 0x63, 0x68, 0x69, + 0x6c, 0x64, 0x72, 0x65, 0x6e, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x6d, 0x65, + 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x4e, 0x6f, 0x64, 0x65, 0x52, + 0x08, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x72, 0x65, 0x6e, 0x22, 0x3e, 0x0a, 0x0a, 0x49, 0x74, 0x61, + 0x6c, 0x69, 0x63, 0x4e, 0x6f, 0x64, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x79, 0x6d, 0x62, 0x6f, + 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x73, 0x79, 0x6d, 0x62, 0x6f, 0x6c, 0x12, + 0x18, 0x0a, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x22, 0x42, 0x0a, 0x0e, 0x42, 0x6f, 0x6c, + 0x64, 0x49, 0x74, 0x61, 0x6c, 0x69, 0x63, 0x4e, 0x6f, 0x64, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x73, + 0x79, 0x6d, 0x62, 0x6f, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x73, 0x79, 0x6d, + 0x62, 0x6f, 0x6c, 0x12, 0x18, 0x0a, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x22, 0x24, 0x0a, + 0x08, 0x43, 0x6f, 0x64, 0x65, 0x4e, 0x6f, 0x64, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x63, 0x6f, 0x6e, + 0x74, 0x65, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x63, 0x6f, 0x6e, 0x74, + 0x65, 0x6e, 0x74, 0x22, 0x38, 0x0a, 0x09, 0x49, 0x6d, 0x61, 0x67, 0x65, 0x4e, 0x6f, 0x64, 0x65, + 0x12, 0x19, 0x0a, 0x08, 0x61, 0x6c, 0x74, 0x5f, 0x74, 0x65, 0x78, 0x74, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x07, 0x61, 0x6c, 0x74, 0x54, 0x65, 0x78, 0x74, 0x12, 0x10, 0x0a, 0x03, 0x75, + 0x72, 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x72, 0x6c, 0x22, 0x30, 0x0a, + 0x08, 0x4c, 0x69, 0x6e, 0x6b, 0x4e, 0x6f, 0x64, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x74, 0x65, 0x78, + 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x74, 0x65, 0x78, 0x74, 0x12, 0x10, 0x0a, + 0x03, 0x75, 0x72, 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x72, 0x6c, 0x22, + 0x40, 0x0a, 0x0c, 0x41, 0x75, 0x74, 0x6f, 0x4c, 0x69, 0x6e, 0x6b, 0x4e, 0x6f, 0x64, 0x65, 0x12, + 0x10, 0x0a, 0x03, 0x75, 0x72, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x72, + 0x6c, 0x12, 0x1e, 0x0a, 0x0b, 0x69, 0x73, 0x5f, 0x72, 0x61, 0x77, 0x5f, 0x74, 0x65, 0x78, 0x74, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x09, 0x69, 0x73, 0x52, 0x61, 0x77, 0x54, 0x65, 0x78, + 0x74, 0x22, 0x23, 0x0a, 0x07, 0x54, 0x61, 0x67, 0x4e, 0x6f, 0x64, 0x65, 0x12, 0x18, 0x0a, 0x07, + 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x63, + 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x22, 0x2d, 0x0a, 0x11, 0x53, 0x74, 0x72, 0x69, 0x6b, 0x65, + 0x74, 0x68, 0x72, 0x6f, 0x75, 0x67, 0x68, 0x4e, 0x6f, 0x64, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x63, + 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x63, 0x6f, + 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x22, 0x2f, 0x0a, 0x15, 0x45, 0x73, 0x63, 0x61, 0x70, 0x69, 0x6e, + 0x67, 0x43, 0x68, 0x61, 0x72, 0x61, 0x63, 0x74, 0x65, 0x72, 0x4e, 0x6f, 0x64, 0x65, 0x12, 0x16, + 0x0a, 0x06, 0x73, 0x79, 0x6d, 0x62, 0x6f, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, + 0x73, 0x79, 0x6d, 0x62, 0x6f, 0x6c, 0x22, 0x24, 0x0a, 0x08, 0x4d, 0x61, 0x74, 0x68, 0x4e, 0x6f, + 0x64, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x22, 0x29, 0x0a, 0x0d, + 0x48, 0x69, 0x67, 0x68, 0x6c, 0x69, 0x67, 0x68, 0x74, 0x4e, 0x6f, 0x64, 0x65, 0x12, 0x18, 0x0a, + 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, + 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x22, 0x29, 0x0a, 0x0d, 0x53, 0x75, 0x62, 0x73, 0x63, + 0x72, 0x69, 0x70, 0x74, 0x4e, 0x6f, 0x64, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x63, 0x6f, 0x6e, 0x74, + 0x65, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, + 0x6e, 0x74, 0x22, 0x2b, 0x0a, 0x0f, 0x53, 0x75, 0x70, 0x65, 0x72, 0x73, 0x63, 0x72, 0x69, 0x70, + 0x74, 0x4e, 0x6f, 0x64, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x22, + 0x54, 0x0a, 0x15, 0x52, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x64, 0x43, 0x6f, 0x6e, + 0x74, 0x65, 0x6e, 0x74, 0x4e, 0x6f, 0x64, 0x65, 0x12, 0x23, 0x0a, 0x0d, 0x72, 0x65, 0x73, 0x6f, + 0x75, 0x72, 0x63, 0x65, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x0c, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x16, 0x0a, + 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x70, + 0x61, 0x72, 0x61, 0x6d, 0x73, 0x22, 0x27, 0x0a, 0x0b, 0x53, 0x70, 0x6f, 0x69, 0x6c, 0x65, 0x72, + 0x4e, 0x6f, 0x64, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x2a, 0xd8, + 0x03, 0x0a, 0x08, 0x4e, 0x6f, 0x64, 0x65, 0x54, 0x79, 0x70, 0x65, 0x12, 0x14, 0x0a, 0x10, 0x4e, + 0x4f, 0x44, 0x45, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, + 0x00, 0x12, 0x0e, 0x0a, 0x0a, 0x4c, 0x49, 0x4e, 0x45, 0x5f, 0x42, 0x52, 0x45, 0x41, 0x4b, 0x10, + 0x01, 0x12, 0x0d, 0x0a, 0x09, 0x50, 0x41, 0x52, 0x41, 0x47, 0x52, 0x41, 0x50, 0x48, 0x10, 0x02, + 0x12, 0x0e, 0x0a, 0x0a, 0x43, 0x4f, 0x44, 0x45, 0x5f, 0x42, 0x4c, 0x4f, 0x43, 0x4b, 0x10, 0x03, + 0x12, 0x0b, 0x0a, 0x07, 0x48, 0x45, 0x41, 0x44, 0x49, 0x4e, 0x47, 0x10, 0x04, 0x12, 0x13, 0x0a, + 0x0f, 0x48, 0x4f, 0x52, 0x49, 0x5a, 0x4f, 0x4e, 0x54, 0x41, 0x4c, 0x5f, 0x52, 0x55, 0x4c, 0x45, + 0x10, 0x05, 0x12, 0x0e, 0x0a, 0x0a, 0x42, 0x4c, 0x4f, 0x43, 0x4b, 0x51, 0x55, 0x4f, 0x54, 0x45, + 0x10, 0x06, 0x12, 0x10, 0x0a, 0x0c, 0x4f, 0x52, 0x44, 0x45, 0x52, 0x45, 0x44, 0x5f, 0x4c, 0x49, + 0x53, 0x54, 0x10, 0x07, 0x12, 0x12, 0x0a, 0x0e, 0x55, 0x4e, 0x4f, 0x52, 0x44, 0x45, 0x52, 0x45, + 0x44, 0x5f, 0x4c, 0x49, 0x53, 0x54, 0x10, 0x08, 0x12, 0x0d, 0x0a, 0x09, 0x54, 0x41, 0x53, 0x4b, + 0x5f, 0x4c, 0x49, 0x53, 0x54, 0x10, 0x09, 0x12, 0x0e, 0x0a, 0x0a, 0x4d, 0x41, 0x54, 0x48, 0x5f, + 0x42, 0x4c, 0x4f, 0x43, 0x4b, 0x10, 0x0a, 0x12, 0x09, 0x0a, 0x05, 0x54, 0x41, 0x42, 0x4c, 0x45, + 0x10, 0x0b, 0x12, 0x14, 0x0a, 0x10, 0x45, 0x4d, 0x42, 0x45, 0x44, 0x44, 0x45, 0x44, 0x5f, 0x43, + 0x4f, 0x4e, 0x54, 0x45, 0x4e, 0x54, 0x10, 0x0c, 0x12, 0x08, 0x0a, 0x04, 0x54, 0x45, 0x58, 0x54, + 0x10, 0x0d, 0x12, 0x08, 0x0a, 0x04, 0x42, 0x4f, 0x4c, 0x44, 0x10, 0x0e, 0x12, 0x0a, 0x0a, 0x06, + 0x49, 0x54, 0x41, 0x4c, 0x49, 0x43, 0x10, 0x0f, 0x12, 0x0f, 0x0a, 0x0b, 0x42, 0x4f, 0x4c, 0x44, + 0x5f, 0x49, 0x54, 0x41, 0x4c, 0x49, 0x43, 0x10, 0x10, 0x12, 0x08, 0x0a, 0x04, 0x43, 0x4f, 0x44, + 0x45, 0x10, 0x11, 0x12, 0x09, 0x0a, 0x05, 0x49, 0x4d, 0x41, 0x47, 0x45, 0x10, 0x12, 0x12, 0x08, + 0x0a, 0x04, 0x4c, 0x49, 0x4e, 0x4b, 0x10, 0x13, 0x12, 0x0d, 0x0a, 0x09, 0x41, 0x55, 0x54, 0x4f, + 0x5f, 0x4c, 0x49, 0x4e, 0x4b, 0x10, 0x14, 0x12, 0x07, 0x0a, 0x03, 0x54, 0x41, 0x47, 0x10, 0x15, + 0x12, 0x11, 0x0a, 0x0d, 0x53, 0x54, 0x52, 0x49, 0x4b, 0x45, 0x54, 0x48, 0x52, 0x4f, 0x55, 0x47, + 0x48, 0x10, 0x16, 0x12, 0x16, 0x0a, 0x12, 0x45, 0x53, 0x43, 0x41, 0x50, 0x49, 0x4e, 0x47, 0x5f, + 0x43, 0x48, 0x41, 0x52, 0x41, 0x43, 0x54, 0x45, 0x52, 0x10, 0x17, 0x12, 0x08, 0x0a, 0x04, 0x4d, + 0x41, 0x54, 0x48, 0x10, 0x18, 0x12, 0x0d, 0x0a, 0x09, 0x48, 0x49, 0x47, 0x48, 0x4c, 0x49, 0x47, + 0x48, 0x54, 0x10, 0x19, 0x12, 0x0d, 0x0a, 0x09, 0x53, 0x55, 0x42, 0x53, 0x43, 0x52, 0x49, 0x50, + 0x54, 0x10, 0x1a, 0x12, 0x0f, 0x0a, 0x0b, 0x53, 0x55, 0x50, 0x45, 0x52, 0x53, 0x43, 0x52, 0x49, + 0x50, 0x54, 0x10, 0x1b, 0x12, 0x16, 0x0a, 0x12, 0x52, 0x45, 0x46, 0x45, 0x52, 0x45, 0x4e, 0x43, + 0x45, 0x44, 0x5f, 0x43, 0x4f, 0x4e, 0x54, 0x45, 0x4e, 0x54, 0x10, 0x1c, 0x12, 0x0b, 0x0a, 0x07, + 0x53, 0x50, 0x4f, 0x49, 0x4c, 0x45, 0x52, 0x10, 0x1d, 0x32, 0x91, 0x03, 0x0a, 0x0f, 0x4d, 0x61, + 0x72, 0x6b, 0x64, 0x6f, 0x77, 0x6e, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x7b, 0x0a, + 0x0d, 0x50, 0x61, 0x72, 0x73, 0x65, 0x4d, 0x61, 0x72, 0x6b, 0x64, 0x6f, 0x77, 0x6e, 0x12, 0x22, + 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x61, + 0x72, 0x73, 0x65, 0x4d, 0x61, 0x72, 0x6b, 0x64, 0x6f, 0x77, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x1a, 0x23, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, + 0x31, 0x2e, 0x50, 0x61, 0x72, 0x73, 0x65, 0x4d, 0x61, 0x72, 0x6b, 0x64, 0x6f, 0x77, 0x6e, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x21, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1b, 0x3a, + 0x01, 0x2a, 0x22, 0x16, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, 0x2f, 0x6d, 0x61, 0x72, 0x6b, + 0x64, 0x6f, 0x77, 0x6e, 0x2f, 0x70, 0x61, 0x72, 0x73, 0x65, 0x12, 0x83, 0x01, 0x0a, 0x0f, 0x52, + 0x65, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x4d, 0x61, 0x72, 0x6b, 0x64, 0x6f, 0x77, 0x6e, 0x12, 0x24, + 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, + 0x73, 0x74, 0x6f, 0x72, 0x65, 0x4d, 0x61, 0x72, 0x6b, 0x64, 0x6f, 0x77, 0x6e, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x1a, 0x25, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, + 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x4d, 0x61, 0x72, 0x6b, 0x64, + 0x6f, 0x77, 0x6e, 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, 0x31, 0x2f, + 0x6d, 0x61, 0x72, 0x6b, 0x64, 0x6f, 0x77, 0x6e, 0x3a, 0x72, 0x65, 0x73, 0x74, 0x6f, 0x72, 0x65, + 0x12, 0x7b, 0x0a, 0x0f, 0x47, 0x65, 0x74, 0x4c, 0x69, 0x6e, 0x6b, 0x4d, 0x65, 0x74, 0x61, 0x64, + 0x61, 0x74, 0x61, 0x12, 0x24, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, + 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x4c, 0x69, 0x6e, 0x6b, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, + 0x74, 0x61, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1a, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, + 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x69, 0x6e, 0x6b, 0x4d, 0x65, 0x74, + 0x61, 0x64, 0x61, 0x74, 0x61, 0x22, 0x26, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x20, 0x12, 0x1e, 0x2f, + 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, 0x2f, 0x6d, 0x61, 0x72, 0x6b, 0x64, 0x6f, 0x77, 0x6e, 0x2f, + 0x6c, 0x69, 0x6e, 0x6b, 0x3a, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x42, 0xac, 0x01, + 0x0a, 0x10, 0x63, 0x6f, 0x6d, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, + 0x76, 0x31, 0x42, 0x14, 0x4d, 0x61, 0x72, 0x6b, 0x64, 0x6f, 0x77, 0x6e, 0x53, 0x65, 0x72, 0x76, + 0x69, 0x63, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x30, 0x67, 0x69, 0x74, 0x68, + 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x75, 0x73, 0x65, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2f, + 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x65, 0x6e, 0x2f, + 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, 0x3b, 0x61, 0x70, 0x69, 0x76, 0x31, 0xa2, 0x02, 0x03, 0x4d, + 0x41, 0x58, 0xaa, 0x02, 0x0c, 0x4d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x41, 0x70, 0x69, 0x2e, 0x56, + 0x31, 0xca, 0x02, 0x0c, 0x4d, 0x65, 0x6d, 0x6f, 0x73, 0x5c, 0x41, 0x70, 0x69, 0x5c, 0x56, 0x31, + 0xe2, 0x02, 0x18, 0x4d, 0x65, 0x6d, 0x6f, 0x73, 0x5c, 0x41, 0x70, 0x69, 0x5c, 0x56, 0x31, 0x5c, + 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x0e, 0x4d, 0x65, + 0x6d, 0x6f, 0x73, 0x3a, 0x3a, 0x41, 0x70, 0x69, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_api_v1_markdown_service_proto_rawDescOnce sync.Once + file_api_v1_markdown_service_proto_rawDescData = file_api_v1_markdown_service_proto_rawDesc +) + +func file_api_v1_markdown_service_proto_rawDescGZIP() []byte { + file_api_v1_markdown_service_proto_rawDescOnce.Do(func() { + file_api_v1_markdown_service_proto_rawDescData = protoimpl.X.CompressGZIP(file_api_v1_markdown_service_proto_rawDescData) + }) + return file_api_v1_markdown_service_proto_rawDescData +} + +var file_api_v1_markdown_service_proto_enumTypes = make([]protoimpl.EnumInfo, 1) +var file_api_v1_markdown_service_proto_msgTypes = make([]protoimpl.MessageInfo, 37) +var file_api_v1_markdown_service_proto_goTypes = []interface{}{ + (NodeType)(0), // 0: memos.api.v1.NodeType + (*ParseMarkdownRequest)(nil), // 1: memos.api.v1.ParseMarkdownRequest + (*ParseMarkdownResponse)(nil), // 2: memos.api.v1.ParseMarkdownResponse + (*RestoreMarkdownRequest)(nil), // 3: memos.api.v1.RestoreMarkdownRequest + (*RestoreMarkdownResponse)(nil), // 4: memos.api.v1.RestoreMarkdownResponse + (*GetLinkMetadataRequest)(nil), // 5: memos.api.v1.GetLinkMetadataRequest + (*LinkMetadata)(nil), // 6: memos.api.v1.LinkMetadata + (*Node)(nil), // 7: memos.api.v1.Node + (*LineBreakNode)(nil), // 8: memos.api.v1.LineBreakNode + (*ParagraphNode)(nil), // 9: memos.api.v1.ParagraphNode + (*CodeBlockNode)(nil), // 10: memos.api.v1.CodeBlockNode + (*HeadingNode)(nil), // 11: memos.api.v1.HeadingNode + (*HorizontalRuleNode)(nil), // 12: memos.api.v1.HorizontalRuleNode + (*BlockquoteNode)(nil), // 13: memos.api.v1.BlockquoteNode + (*OrderedListNode)(nil), // 14: memos.api.v1.OrderedListNode + (*UnorderedListNode)(nil), // 15: memos.api.v1.UnorderedListNode + (*TaskListNode)(nil), // 16: memos.api.v1.TaskListNode + (*MathBlockNode)(nil), // 17: memos.api.v1.MathBlockNode + (*TableNode)(nil), // 18: memos.api.v1.TableNode + (*EmbeddedContentNode)(nil), // 19: memos.api.v1.EmbeddedContentNode + (*TextNode)(nil), // 20: memos.api.v1.TextNode + (*BoldNode)(nil), // 21: memos.api.v1.BoldNode + (*ItalicNode)(nil), // 22: memos.api.v1.ItalicNode + (*BoldItalicNode)(nil), // 23: memos.api.v1.BoldItalicNode + (*CodeNode)(nil), // 24: memos.api.v1.CodeNode + (*ImageNode)(nil), // 25: memos.api.v1.ImageNode + (*LinkNode)(nil), // 26: memos.api.v1.LinkNode + (*AutoLinkNode)(nil), // 27: memos.api.v1.AutoLinkNode + (*TagNode)(nil), // 28: memos.api.v1.TagNode + (*StrikethroughNode)(nil), // 29: memos.api.v1.StrikethroughNode + (*EscapingCharacterNode)(nil), // 30: memos.api.v1.EscapingCharacterNode + (*MathNode)(nil), // 31: memos.api.v1.MathNode + (*HighlightNode)(nil), // 32: memos.api.v1.HighlightNode + (*SubscriptNode)(nil), // 33: memos.api.v1.SubscriptNode + (*SuperscriptNode)(nil), // 34: memos.api.v1.SuperscriptNode + (*ReferencedContentNode)(nil), // 35: memos.api.v1.ReferencedContentNode + (*SpoilerNode)(nil), // 36: memos.api.v1.SpoilerNode + (*TableNode_Row)(nil), // 37: memos.api.v1.TableNode.Row +} +var file_api_v1_markdown_service_proto_depIdxs = []int32{ + 7, // 0: memos.api.v1.ParseMarkdownResponse.nodes:type_name -> memos.api.v1.Node + 7, // 1: memos.api.v1.RestoreMarkdownRequest.nodes:type_name -> memos.api.v1.Node + 0, // 2: memos.api.v1.Node.type:type_name -> memos.api.v1.NodeType + 8, // 3: memos.api.v1.Node.line_break_node:type_name -> memos.api.v1.LineBreakNode + 9, // 4: memos.api.v1.Node.paragraph_node:type_name -> memos.api.v1.ParagraphNode + 10, // 5: memos.api.v1.Node.code_block_node:type_name -> memos.api.v1.CodeBlockNode + 11, // 6: memos.api.v1.Node.heading_node:type_name -> memos.api.v1.HeadingNode + 12, // 7: memos.api.v1.Node.horizontal_rule_node:type_name -> memos.api.v1.HorizontalRuleNode + 13, // 8: memos.api.v1.Node.blockquote_node:type_name -> memos.api.v1.BlockquoteNode + 14, // 9: memos.api.v1.Node.ordered_list_node:type_name -> memos.api.v1.OrderedListNode + 15, // 10: memos.api.v1.Node.unordered_list_node:type_name -> memos.api.v1.UnorderedListNode + 16, // 11: memos.api.v1.Node.task_list_node:type_name -> memos.api.v1.TaskListNode + 17, // 12: memos.api.v1.Node.math_block_node:type_name -> memos.api.v1.MathBlockNode + 18, // 13: memos.api.v1.Node.table_node:type_name -> memos.api.v1.TableNode + 19, // 14: memos.api.v1.Node.embedded_content_node:type_name -> memos.api.v1.EmbeddedContentNode + 20, // 15: memos.api.v1.Node.text_node:type_name -> memos.api.v1.TextNode + 21, // 16: memos.api.v1.Node.bold_node:type_name -> memos.api.v1.BoldNode + 22, // 17: memos.api.v1.Node.italic_node:type_name -> memos.api.v1.ItalicNode + 23, // 18: memos.api.v1.Node.bold_italic_node:type_name -> memos.api.v1.BoldItalicNode + 24, // 19: memos.api.v1.Node.code_node:type_name -> memos.api.v1.CodeNode + 25, // 20: memos.api.v1.Node.image_node:type_name -> memos.api.v1.ImageNode + 26, // 21: memos.api.v1.Node.link_node:type_name -> memos.api.v1.LinkNode + 27, // 22: memos.api.v1.Node.auto_link_node:type_name -> memos.api.v1.AutoLinkNode + 28, // 23: memos.api.v1.Node.tag_node:type_name -> memos.api.v1.TagNode + 29, // 24: memos.api.v1.Node.strikethrough_node:type_name -> memos.api.v1.StrikethroughNode + 30, // 25: memos.api.v1.Node.escaping_character_node:type_name -> memos.api.v1.EscapingCharacterNode + 31, // 26: memos.api.v1.Node.math_node:type_name -> memos.api.v1.MathNode + 32, // 27: memos.api.v1.Node.highlight_node:type_name -> memos.api.v1.HighlightNode + 33, // 28: memos.api.v1.Node.subscript_node:type_name -> memos.api.v1.SubscriptNode + 34, // 29: memos.api.v1.Node.superscript_node:type_name -> memos.api.v1.SuperscriptNode + 35, // 30: memos.api.v1.Node.referenced_content_node:type_name -> memos.api.v1.ReferencedContentNode + 36, // 31: memos.api.v1.Node.spoiler_node:type_name -> memos.api.v1.SpoilerNode + 7, // 32: memos.api.v1.ParagraphNode.children:type_name -> memos.api.v1.Node + 7, // 33: memos.api.v1.HeadingNode.children:type_name -> memos.api.v1.Node + 7, // 34: memos.api.v1.BlockquoteNode.children:type_name -> memos.api.v1.Node + 7, // 35: memos.api.v1.OrderedListNode.children:type_name -> memos.api.v1.Node + 7, // 36: memos.api.v1.UnorderedListNode.children:type_name -> memos.api.v1.Node + 7, // 37: memos.api.v1.TaskListNode.children:type_name -> memos.api.v1.Node + 37, // 38: memos.api.v1.TableNode.rows:type_name -> memos.api.v1.TableNode.Row + 7, // 39: memos.api.v1.BoldNode.children:type_name -> memos.api.v1.Node + 1, // 40: memos.api.v1.MarkdownService.ParseMarkdown:input_type -> memos.api.v1.ParseMarkdownRequest + 3, // 41: memos.api.v1.MarkdownService.RestoreMarkdown:input_type -> memos.api.v1.RestoreMarkdownRequest + 5, // 42: memos.api.v1.MarkdownService.GetLinkMetadata:input_type -> memos.api.v1.GetLinkMetadataRequest + 2, // 43: memos.api.v1.MarkdownService.ParseMarkdown:output_type -> memos.api.v1.ParseMarkdownResponse + 4, // 44: memos.api.v1.MarkdownService.RestoreMarkdown:output_type -> memos.api.v1.RestoreMarkdownResponse + 6, // 45: memos.api.v1.MarkdownService.GetLinkMetadata:output_type -> memos.api.v1.LinkMetadata + 43, // [43:46] is the sub-list for method output_type + 40, // [40:43] is the sub-list for method input_type + 40, // [40:40] is the sub-list for extension type_name + 40, // [40:40] is the sub-list for extension extendee + 0, // [0:40] is the sub-list for field type_name +} + +func init() { file_api_v1_markdown_service_proto_init() } +func file_api_v1_markdown_service_proto_init() { + if File_api_v1_markdown_service_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_api_v1_markdown_service_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ParseMarkdownRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_api_v1_markdown_service_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ParseMarkdownResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_api_v1_markdown_service_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*RestoreMarkdownRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_api_v1_markdown_service_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*RestoreMarkdownResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_api_v1_markdown_service_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetLinkMetadataRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_api_v1_markdown_service_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*LinkMetadata); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_api_v1_markdown_service_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Node); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_api_v1_markdown_service_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*LineBreakNode); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_api_v1_markdown_service_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ParagraphNode); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_api_v1_markdown_service_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*CodeBlockNode); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_api_v1_markdown_service_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*HeadingNode); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_api_v1_markdown_service_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*HorizontalRuleNode); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_api_v1_markdown_service_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*BlockquoteNode); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_api_v1_markdown_service_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*OrderedListNode); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_api_v1_markdown_service_proto_msgTypes[14].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*UnorderedListNode); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_api_v1_markdown_service_proto_msgTypes[15].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*TaskListNode); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_api_v1_markdown_service_proto_msgTypes[16].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*MathBlockNode); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_api_v1_markdown_service_proto_msgTypes[17].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*TableNode); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_api_v1_markdown_service_proto_msgTypes[18].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*EmbeddedContentNode); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_api_v1_markdown_service_proto_msgTypes[19].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*TextNode); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_api_v1_markdown_service_proto_msgTypes[20].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*BoldNode); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_api_v1_markdown_service_proto_msgTypes[21].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ItalicNode); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_api_v1_markdown_service_proto_msgTypes[22].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*BoldItalicNode); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_api_v1_markdown_service_proto_msgTypes[23].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*CodeNode); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_api_v1_markdown_service_proto_msgTypes[24].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ImageNode); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_api_v1_markdown_service_proto_msgTypes[25].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*LinkNode); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_api_v1_markdown_service_proto_msgTypes[26].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*AutoLinkNode); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_api_v1_markdown_service_proto_msgTypes[27].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*TagNode); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_api_v1_markdown_service_proto_msgTypes[28].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*StrikethroughNode); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_api_v1_markdown_service_proto_msgTypes[29].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*EscapingCharacterNode); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_api_v1_markdown_service_proto_msgTypes[30].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*MathNode); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_api_v1_markdown_service_proto_msgTypes[31].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*HighlightNode); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_api_v1_markdown_service_proto_msgTypes[32].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*SubscriptNode); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_api_v1_markdown_service_proto_msgTypes[33].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*SuperscriptNode); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_api_v1_markdown_service_proto_msgTypes[34].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ReferencedContentNode); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_api_v1_markdown_service_proto_msgTypes[35].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*SpoilerNode); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_api_v1_markdown_service_proto_msgTypes[36].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*TableNode_Row); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + file_api_v1_markdown_service_proto_msgTypes[6].OneofWrappers = []interface{}{ + (*Node_LineBreakNode)(nil), + (*Node_ParagraphNode)(nil), + (*Node_CodeBlockNode)(nil), + (*Node_HeadingNode)(nil), + (*Node_HorizontalRuleNode)(nil), + (*Node_BlockquoteNode)(nil), + (*Node_OrderedListNode)(nil), + (*Node_UnorderedListNode)(nil), + (*Node_TaskListNode)(nil), + (*Node_MathBlockNode)(nil), + (*Node_TableNode)(nil), + (*Node_EmbeddedContentNode)(nil), + (*Node_TextNode)(nil), + (*Node_BoldNode)(nil), + (*Node_ItalicNode)(nil), + (*Node_BoldItalicNode)(nil), + (*Node_CodeNode)(nil), + (*Node_ImageNode)(nil), + (*Node_LinkNode)(nil), + (*Node_AutoLinkNode)(nil), + (*Node_TagNode)(nil), + (*Node_StrikethroughNode)(nil), + (*Node_EscapingCharacterNode)(nil), + (*Node_MathNode)(nil), + (*Node_HighlightNode)(nil), + (*Node_SubscriptNode)(nil), + (*Node_SuperscriptNode)(nil), + (*Node_ReferencedContentNode)(nil), + (*Node_SpoilerNode)(nil), + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_api_v1_markdown_service_proto_rawDesc, + NumEnums: 1, + NumMessages: 37, + NumExtensions: 0, + NumServices: 1, + }, + GoTypes: file_api_v1_markdown_service_proto_goTypes, + DependencyIndexes: file_api_v1_markdown_service_proto_depIdxs, + EnumInfos: file_api_v1_markdown_service_proto_enumTypes, + MessageInfos: file_api_v1_markdown_service_proto_msgTypes, + }.Build() + File_api_v1_markdown_service_proto = out.File + file_api_v1_markdown_service_proto_rawDesc = nil + file_api_v1_markdown_service_proto_goTypes = nil + file_api_v1_markdown_service_proto_depIdxs = nil +} diff --git a/proto/gen/api/v1/markdown_service.pb.gw.go b/proto/gen/api/v1/markdown_service.pb.gw.go new file mode 100644 index 00000000..ee5f04e2 --- /dev/null +++ b/proto/gen/api/v1/markdown_service.pb.gw.go @@ -0,0 +1,327 @@ +// Code generated by protoc-gen-grpc-gateway. DO NOT EDIT. +// source: api/v1/markdown_service.proto + +/* +Package apiv1 is a reverse proxy. + +It translates gRPC into RESTful JSON APIs. +*/ +package apiv1 + +import ( + "context" + "io" + "net/http" + + "github.com/grpc-ecosystem/grpc-gateway/v2/runtime" + "github.com/grpc-ecosystem/grpc-gateway/v2/utilities" + "google.golang.org/grpc" + "google.golang.org/grpc/codes" + "google.golang.org/grpc/grpclog" + "google.golang.org/grpc/metadata" + "google.golang.org/grpc/status" + "google.golang.org/protobuf/proto" +) + +// Suppress "imported and not used" errors +var _ codes.Code +var _ io.Reader +var _ status.Status +var _ = runtime.String +var _ = utilities.NewDoubleArray +var _ = metadata.Join + +func request_MarkdownService_ParseMarkdown_0(ctx context.Context, marshaler runtime.Marshaler, client MarkdownServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq ParseMarkdownRequest + var metadata runtime.ServerMetadata + + if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && err != io.EOF { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := client.ParseMarkdown(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_MarkdownService_ParseMarkdown_0(ctx context.Context, marshaler runtime.Marshaler, server MarkdownServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq ParseMarkdownRequest + var metadata runtime.ServerMetadata + + if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && err != io.EOF { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := server.ParseMarkdown(ctx, &protoReq) + return msg, metadata, err + +} + +func request_MarkdownService_RestoreMarkdown_0(ctx context.Context, marshaler runtime.Marshaler, client MarkdownServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq RestoreMarkdownRequest + var metadata runtime.ServerMetadata + + if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && err != io.EOF { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := client.RestoreMarkdown(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_MarkdownService_RestoreMarkdown_0(ctx context.Context, marshaler runtime.Marshaler, server MarkdownServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq RestoreMarkdownRequest + var metadata runtime.ServerMetadata + + if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && err != io.EOF { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := server.RestoreMarkdown(ctx, &protoReq) + return msg, metadata, err + +} + +var ( + filter_MarkdownService_GetLinkMetadata_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} +) + +func request_MarkdownService_GetLinkMetadata_0(ctx context.Context, marshaler runtime.Marshaler, client MarkdownServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq GetLinkMetadataRequest + var metadata runtime.ServerMetadata + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_MarkdownService_GetLinkMetadata_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := client.GetLinkMetadata(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_MarkdownService_GetLinkMetadata_0(ctx context.Context, marshaler runtime.Marshaler, server MarkdownServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq GetLinkMetadataRequest + var metadata runtime.ServerMetadata + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_MarkdownService_GetLinkMetadata_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := server.GetLinkMetadata(ctx, &protoReq) + return msg, metadata, err + +} + +// RegisterMarkdownServiceHandlerServer registers the http handlers for service MarkdownService to "mux". +// UnaryRPC :call MarkdownServiceServer directly. +// StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. +// Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterMarkdownServiceHandlerFromEndpoint instead. +func RegisterMarkdownServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server MarkdownServiceServer) error { + + mux.Handle("POST", pattern_MarkdownService_ParseMarkdown_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/memos.api.v1.MarkdownService/ParseMarkdown", runtime.WithHTTPPathPattern("/api/v1/markdown/parse")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_MarkdownService_ParseMarkdown_0(annotatedContext, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + if err != nil { + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + return + } + + forward_MarkdownService_ParseMarkdown_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("POST", pattern_MarkdownService_RestoreMarkdown_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/memos.api.v1.MarkdownService/RestoreMarkdown", runtime.WithHTTPPathPattern("/api/v1/markdown:restore")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_MarkdownService_RestoreMarkdown_0(annotatedContext, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + if err != nil { + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + return + } + + forward_MarkdownService_RestoreMarkdown_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_MarkdownService_GetLinkMetadata_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/memos.api.v1.MarkdownService/GetLinkMetadata", runtime.WithHTTPPathPattern("/api/v1/markdown/link:metadata")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_MarkdownService_GetLinkMetadata_0(annotatedContext, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + if err != nil { + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + return + } + + forward_MarkdownService_GetLinkMetadata_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + return nil +} + +// RegisterMarkdownServiceHandlerFromEndpoint is same as RegisterMarkdownServiceHandler but +// automatically dials to "endpoint" and closes the connection when "ctx" gets done. +func RegisterMarkdownServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error) { + conn, err := grpc.DialContext(ctx, endpoint, opts...) + if err != nil { + return err + } + defer func() { + if err != nil { + if cerr := conn.Close(); cerr != nil { + grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr) + } + return + } + go func() { + <-ctx.Done() + if cerr := conn.Close(); cerr != nil { + grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr) + } + }() + }() + + return RegisterMarkdownServiceHandler(ctx, mux, conn) +} + +// RegisterMarkdownServiceHandler registers the http handlers for service MarkdownService to "mux". +// The handlers forward requests to the grpc endpoint over "conn". +func RegisterMarkdownServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error { + return RegisterMarkdownServiceHandlerClient(ctx, mux, NewMarkdownServiceClient(conn)) +} + +// RegisterMarkdownServiceHandlerClient registers the http handlers for service MarkdownService +// to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "MarkdownServiceClient". +// Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "MarkdownServiceClient" +// doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in +// "MarkdownServiceClient" to call the correct interceptors. +func RegisterMarkdownServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client MarkdownServiceClient) error { + + mux.Handle("POST", pattern_MarkdownService_ParseMarkdown_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/memos.api.v1.MarkdownService/ParseMarkdown", runtime.WithHTTPPathPattern("/api/v1/markdown/parse")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_MarkdownService_ParseMarkdown_0(annotatedContext, inboundMarshaler, client, req, pathParams) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + if err != nil { + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + return + } + + forward_MarkdownService_ParseMarkdown_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("POST", pattern_MarkdownService_RestoreMarkdown_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/memos.api.v1.MarkdownService/RestoreMarkdown", runtime.WithHTTPPathPattern("/api/v1/markdown:restore")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_MarkdownService_RestoreMarkdown_0(annotatedContext, inboundMarshaler, client, req, pathParams) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + if err != nil { + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + return + } + + forward_MarkdownService_RestoreMarkdown_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_MarkdownService_GetLinkMetadata_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/memos.api.v1.MarkdownService/GetLinkMetadata", runtime.WithHTTPPathPattern("/api/v1/markdown/link:metadata")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_MarkdownService_GetLinkMetadata_0(annotatedContext, inboundMarshaler, client, req, pathParams) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + if err != nil { + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + return + } + + forward_MarkdownService_GetLinkMetadata_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + return nil +} + +var ( + pattern_MarkdownService_ParseMarkdown_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"api", "v1", "markdown", "parse"}, "")) + + pattern_MarkdownService_RestoreMarkdown_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"api", "v1", "markdown"}, "restore")) + + pattern_MarkdownService_GetLinkMetadata_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"api", "v1", "markdown", "link"}, "metadata")) +) + +var ( + forward_MarkdownService_ParseMarkdown_0 = runtime.ForwardResponseMessage + + forward_MarkdownService_RestoreMarkdown_0 = runtime.ForwardResponseMessage + + forward_MarkdownService_GetLinkMetadata_0 = runtime.ForwardResponseMessage +) diff --git a/proto/gen/api/v1/markdown_service_grpc.pb.go b/proto/gen/api/v1/markdown_service_grpc.pb.go new file mode 100644 index 00000000..daa72a64 --- /dev/null +++ b/proto/gen/api/v1/markdown_service_grpc.pb.go @@ -0,0 +1,189 @@ +// Code generated by protoc-gen-go-grpc. DO NOT EDIT. +// versions: +// - protoc-gen-go-grpc v1.3.0 +// - protoc (unknown) +// source: api/v1/markdown_service.proto + +package apiv1 + +import ( + context "context" + grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" +) + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +// Requires gRPC-Go v1.32.0 or later. +const _ = grpc.SupportPackageIsVersion7 + +const ( + MarkdownService_ParseMarkdown_FullMethodName = "/memos.api.v1.MarkdownService/ParseMarkdown" + MarkdownService_RestoreMarkdown_FullMethodName = "/memos.api.v1.MarkdownService/RestoreMarkdown" + MarkdownService_GetLinkMetadata_FullMethodName = "/memos.api.v1.MarkdownService/GetLinkMetadata" +) + +// MarkdownServiceClient is the client API for MarkdownService service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. +type MarkdownServiceClient interface { + // Parses the given markdown content and returns a list of nodes. + ParseMarkdown(ctx context.Context, in *ParseMarkdownRequest, opts ...grpc.CallOption) (*ParseMarkdownResponse, error) + // Restores the given nodes to markdown content. + RestoreMarkdown(ctx context.Context, in *RestoreMarkdownRequest, opts ...grpc.CallOption) (*RestoreMarkdownResponse, error) + // GetLinkMetadata returns metadata for a given link. + GetLinkMetadata(ctx context.Context, in *GetLinkMetadataRequest, opts ...grpc.CallOption) (*LinkMetadata, error) +} + +type markdownServiceClient struct { + cc grpc.ClientConnInterface +} + +func NewMarkdownServiceClient(cc grpc.ClientConnInterface) MarkdownServiceClient { + return &markdownServiceClient{cc} +} + +func (c *markdownServiceClient) ParseMarkdown(ctx context.Context, in *ParseMarkdownRequest, opts ...grpc.CallOption) (*ParseMarkdownResponse, error) { + out := new(ParseMarkdownResponse) + err := c.cc.Invoke(ctx, MarkdownService_ParseMarkdown_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *markdownServiceClient) RestoreMarkdown(ctx context.Context, in *RestoreMarkdownRequest, opts ...grpc.CallOption) (*RestoreMarkdownResponse, error) { + out := new(RestoreMarkdownResponse) + err := c.cc.Invoke(ctx, MarkdownService_RestoreMarkdown_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *markdownServiceClient) GetLinkMetadata(ctx context.Context, in *GetLinkMetadataRequest, opts ...grpc.CallOption) (*LinkMetadata, error) { + out := new(LinkMetadata) + err := c.cc.Invoke(ctx, MarkdownService_GetLinkMetadata_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// MarkdownServiceServer is the server API for MarkdownService service. +// All implementations must embed UnimplementedMarkdownServiceServer +// for forward compatibility +type MarkdownServiceServer interface { + // Parses the given markdown content and returns a list of nodes. + ParseMarkdown(context.Context, *ParseMarkdownRequest) (*ParseMarkdownResponse, error) + // Restores the given nodes to markdown content. + RestoreMarkdown(context.Context, *RestoreMarkdownRequest) (*RestoreMarkdownResponse, error) + // GetLinkMetadata returns metadata for a given link. + GetLinkMetadata(context.Context, *GetLinkMetadataRequest) (*LinkMetadata, error) + mustEmbedUnimplementedMarkdownServiceServer() +} + +// UnimplementedMarkdownServiceServer must be embedded to have forward compatible implementations. +type UnimplementedMarkdownServiceServer struct { +} + +func (UnimplementedMarkdownServiceServer) ParseMarkdown(context.Context, *ParseMarkdownRequest) (*ParseMarkdownResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method ParseMarkdown not implemented") +} +func (UnimplementedMarkdownServiceServer) RestoreMarkdown(context.Context, *RestoreMarkdownRequest) (*RestoreMarkdownResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method RestoreMarkdown not implemented") +} +func (UnimplementedMarkdownServiceServer) GetLinkMetadata(context.Context, *GetLinkMetadataRequest) (*LinkMetadata, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetLinkMetadata not implemented") +} +func (UnimplementedMarkdownServiceServer) mustEmbedUnimplementedMarkdownServiceServer() {} + +// UnsafeMarkdownServiceServer may be embedded to opt out of forward compatibility for this service. +// Use of this interface is not recommended, as added methods to MarkdownServiceServer will +// result in compilation errors. +type UnsafeMarkdownServiceServer interface { + mustEmbedUnimplementedMarkdownServiceServer() +} + +func RegisterMarkdownServiceServer(s grpc.ServiceRegistrar, srv MarkdownServiceServer) { + s.RegisterService(&MarkdownService_ServiceDesc, srv) +} + +func _MarkdownService_ParseMarkdown_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ParseMarkdownRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MarkdownServiceServer).ParseMarkdown(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: MarkdownService_ParseMarkdown_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MarkdownServiceServer).ParseMarkdown(ctx, req.(*ParseMarkdownRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _MarkdownService_RestoreMarkdown_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(RestoreMarkdownRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MarkdownServiceServer).RestoreMarkdown(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: MarkdownService_RestoreMarkdown_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MarkdownServiceServer).RestoreMarkdown(ctx, req.(*RestoreMarkdownRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _MarkdownService_GetLinkMetadata_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetLinkMetadataRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MarkdownServiceServer).GetLinkMetadata(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: MarkdownService_GetLinkMetadata_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MarkdownServiceServer).GetLinkMetadata(ctx, req.(*GetLinkMetadataRequest)) + } + return interceptor(ctx, in, info, handler) +} + +// MarkdownService_ServiceDesc is the grpc.ServiceDesc for MarkdownService service. +// It's only intended for direct use with grpc.RegisterService, +// and not to be introspected or modified (even as a copy) +var MarkdownService_ServiceDesc = grpc.ServiceDesc{ + ServiceName: "memos.api.v1.MarkdownService", + HandlerType: (*MarkdownServiceServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "ParseMarkdown", + Handler: _MarkdownService_ParseMarkdown_Handler, + }, + { + MethodName: "RestoreMarkdown", + Handler: _MarkdownService_RestoreMarkdown_Handler, + }, + { + MethodName: "GetLinkMetadata", + Handler: _MarkdownService_GetLinkMetadata_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "api/v1/markdown_service.proto", +} diff --git a/proto/gen/api/v1/memo_service.pb.go b/proto/gen/api/v1/memo_service.pb.go index 6fdc9c94..2cb40b93 100644 --- a/proto/gen/api/v1/memo_service.pb.go +++ b/proto/gen/api/v1/memo_service.pb.go @@ -93,14 +93,15 @@ type Memo struct { Creator string `protobuf:"bytes,4,opt,name=creator,proto3" json:"creator,omitempty"` CreateTime *timestamppb.Timestamp `protobuf:"bytes,5,opt,name=create_time,json=createTime,proto3" json:"create_time,omitempty"` UpdateTime *timestamppb.Timestamp `protobuf:"bytes,6,opt,name=update_time,json=updateTime,proto3" json:"update_time,omitempty"` - DisplayTime *timestamppb.Timestamp `protobuf:"bytes,78,opt,name=display_time,json=displayTime,proto3" json:"display_time,omitempty"` + DisplayTime *timestamppb.Timestamp `protobuf:"bytes,7,opt,name=display_time,json=displayTime,proto3" json:"display_time,omitempty"` Content string `protobuf:"bytes,8,opt,name=content,proto3" json:"content,omitempty"` - Visibility Visibility `protobuf:"varint,9,opt,name=visibility,proto3,enum=memos.api.v1.Visibility" json:"visibility,omitempty"` - Pinned bool `protobuf:"varint,10,opt,name=pinned,proto3" json:"pinned,omitempty"` - ParentId *int32 `protobuf:"varint,11,opt,name=parent_id,json=parentId,proto3,oneof" json:"parent_id,omitempty"` - Resources []*Resource `protobuf:"bytes,12,rep,name=resources,proto3" json:"resources,omitempty"` - Relations []*MemoRelation `protobuf:"bytes,13,rep,name=relations,proto3" json:"relations,omitempty"` - Reactions []*Reaction `protobuf:"bytes,14,rep,name=reactions,proto3" json:"reactions,omitempty"` + Nodes []*Node `protobuf:"bytes,9,rep,name=nodes,proto3" json:"nodes,omitempty"` + Visibility Visibility `protobuf:"varint,10,opt,name=visibility,proto3,enum=memos.api.v1.Visibility" json:"visibility,omitempty"` + Pinned bool `protobuf:"varint,11,opt,name=pinned,proto3" json:"pinned,omitempty"` + ParentId *int32 `protobuf:"varint,12,opt,name=parent_id,json=parentId,proto3,oneof" json:"parent_id,omitempty"` + Resources []*Resource `protobuf:"bytes,13,rep,name=resources,proto3" json:"resources,omitempty"` + Relations []*MemoRelation `protobuf:"bytes,14,rep,name=relations,proto3" json:"relations,omitempty"` + Reactions []*Reaction `protobuf:"bytes,15,rep,name=reactions,proto3" json:"reactions,omitempty"` } func (x *Memo) Reset() { @@ -191,6 +192,13 @@ func (x *Memo) GetContent() string { return "" } +func (x *Memo) GetNodes() []*Node { + if x != nil { + return x.Nodes + } + return nil +} + func (x *Memo) GetVisibility() Visibility { if x != nil { return x.Visibility @@ -1540,344 +1548,349 @@ var file_api_v1_memo_service_proto_rawDesc = []byte{ 0x0a, 0x19, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, 0x2f, 0x6d, 0x65, 0x6d, 0x6f, 0x5f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0c, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x1a, 0x13, 0x61, 0x70, 0x69, 0x2f, 0x76, - 0x31, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x22, - 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, 0x2f, 0x6d, 0x65, 0x6d, 0x6f, 0x5f, 0x72, 0x65, 0x6c, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x1a, 0x1d, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, 0x2f, 0x72, 0x65, 0x61, 0x63, 0x74, + 0x31, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1d, + 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, 0x2f, 0x6d, 0x61, 0x72, 0x6b, 0x64, 0x6f, 0x77, 0x6e, 0x5f, + 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x22, 0x61, + 0x70, 0x69, 0x2f, 0x76, 0x31, 0x2f, 0x6d, 0x65, 0x6d, 0x6f, 0x5f, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x1a, 0x1d, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, 0x2f, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, - 0x63, 0x65, 0x5f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x1a, 0x1c, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x61, 0x6e, 0x6e, - 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x17, - 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x63, 0x6c, 0x69, 0x65, 0x6e, - 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, - 0x61, 0x70, 0x69, 0x2f, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x5f, 0x62, 0x65, 0x68, 0x61, 0x76, 0x69, - 0x6f, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 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, 0x8d, 0x05, 0x0a, 0x04, 0x4d, 0x65, 0x6d, - 0x6f, 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, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x03, 0x75, 0x69, 0x64, 0x12, 0x36, 0x0a, 0x0a, 0x72, 0x6f, 0x77, 0x5f, 0x73, - 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x17, 0x2e, 0x6d, 0x65, - 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x6f, 0x77, 0x53, 0x74, - 0x61, 0x74, 0x75, 0x73, 0x52, 0x09, 0x72, 0x6f, 0x77, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, - 0x18, 0x0a, 0x07, 0x63, 0x72, 0x65, 0x61, 0x74, 0x6f, 0x72, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x07, 0x63, 0x72, 0x65, 0x61, 0x74, 0x6f, 0x72, 0x12, 0x3b, 0x0a, 0x0b, 0x63, 0x72, 0x65, - 0x61, 0x74, 0x65, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, - 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, - 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x0a, 0x63, 0x72, 0x65, 0x61, - 0x74, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x3b, 0x0a, 0x0b, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, - 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, - 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, - 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x0a, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x54, - 0x69, 0x6d, 0x65, 0x12, 0x3d, 0x0a, 0x0c, 0x64, 0x69, 0x73, 0x70, 0x6c, 0x61, 0x79, 0x5f, 0x74, - 0x69, 0x6d, 0x65, 0x18, 0x4e, 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, 0x64, 0x69, 0x73, 0x70, 0x6c, 0x61, 0x79, 0x54, 0x69, - 0x6d, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x18, 0x08, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x12, 0x38, 0x0a, 0x0a, - 0x76, 0x69, 0x73, 0x69, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x18, 0x09, 0x20, 0x01, 0x28, 0x0e, - 0x32, 0x18, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, - 0x56, 0x69, 0x73, 0x69, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x52, 0x0a, 0x76, 0x69, 0x73, 0x69, - 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x12, 0x16, 0x0a, 0x06, 0x70, 0x69, 0x6e, 0x6e, 0x65, 0x64, - 0x18, 0x0a, 0x20, 0x01, 0x28, 0x08, 0x52, 0x06, 0x70, 0x69, 0x6e, 0x6e, 0x65, 0x64, 0x12, 0x25, - 0x0a, 0x09, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x0b, 0x20, 0x01, 0x28, - 0x05, 0x42, 0x03, 0xe0, 0x41, 0x03, 0x48, 0x00, 0x52, 0x08, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, - 0x49, 0x64, 0x88, 0x01, 0x01, 0x12, 0x39, 0x0a, 0x09, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, - 0x65, 0x73, 0x18, 0x0c, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, - 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, - 0x42, 0x03, 0xe0, 0x41, 0x03, 0x52, 0x09, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, - 0x12, 0x3d, 0x0a, 0x09, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x0d, 0x20, - 0x03, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, - 0x76, 0x31, 0x2e, 0x4d, 0x65, 0x6d, 0x6f, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, - 0x03, 0xe0, 0x41, 0x03, 0x52, 0x09, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, - 0x39, 0x0a, 0x09, 0x72, 0x65, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x0e, 0x20, 0x03, - 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, - 0x31, 0x2e, 0x52, 0x65, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x03, 0xe0, 0x41, 0x03, 0x52, - 0x09, 0x72, 0x65, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x42, 0x0c, 0x0a, 0x0a, 0x5f, 0x70, - 0x61, 0x72, 0x65, 0x6e, 0x74, 0x5f, 0x69, 0x64, 0x22, 0x67, 0x0a, 0x11, 0x43, 0x72, 0x65, 0x61, - 0x74, 0x65, 0x4d, 0x65, 0x6d, 0x6f, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x18, 0x0a, - 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, - 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x12, 0x38, 0x0a, 0x0a, 0x76, 0x69, 0x73, 0x69, 0x62, - 0x69, 0x6c, 0x69, 0x74, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x18, 0x2e, 0x6d, 0x65, - 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x56, 0x69, 0x73, 0x69, 0x62, - 0x69, 0x6c, 0x69, 0x74, 0x79, 0x52, 0x0a, 0x76, 0x69, 0x73, 0x69, 0x62, 0x69, 0x6c, 0x69, 0x74, - 0x79, 0x22, 0x66, 0x0a, 0x10, 0x4c, 0x69, 0x73, 0x74, 0x4d, 0x65, 0x6d, 0x6f, 0x73, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1b, 0x0a, 0x09, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x73, 0x69, - 0x7a, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x70, 0x61, 0x67, 0x65, 0x53, 0x69, - 0x7a, 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x70, 0x61, 0x67, 0x65, 0x54, 0x6f, 0x6b, 0x65, - 0x6e, 0x12, 0x16, 0x0a, 0x06, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x06, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x22, 0x65, 0x0a, 0x11, 0x4c, 0x69, 0x73, - 0x74, 0x4d, 0x65, 0x6d, 0x6f, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x28, - 0x0a, 0x05, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x12, 0x2e, - 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x65, 0x6d, - 0x6f, 0x52, 0x05, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x12, 0x26, 0x0a, 0x0f, 0x6e, 0x65, 0x78, 0x74, - 0x5f, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x0d, 0x6e, 0x65, 0x78, 0x74, 0x50, 0x61, 0x67, 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, - 0x22, 0x2c, 0x0a, 0x12, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x4d, 0x65, 0x6d, 0x6f, 0x73, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x22, 0x3f, - 0x0a, 0x13, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x4d, 0x65, 0x6d, 0x6f, 0x73, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x28, 0x0a, 0x05, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x18, 0x01, - 0x20, 0x03, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, - 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x65, 0x6d, 0x6f, 0x52, 0x05, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x22, - 0x24, 0x0a, 0x0e, 0x47, 0x65, 0x74, 0x4d, 0x65, 0x6d, 0x6f, 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, 0x78, 0x0a, 0x11, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x4d, - 0x65, 0x6d, 0x6f, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x26, 0x0a, 0x04, 0x6d, 0x65, - 0x6d, 0x6f, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, - 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x65, 0x6d, 0x6f, 0x52, 0x04, 0x6d, 0x65, - 0x6d, 0x6f, 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, - 0x27, 0x0a, 0x11, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x4d, 0x65, 0x6d, 0x6f, 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, 0x2c, 0x0a, 0x12, 0x45, 0x78, 0x70, 0x6f, - 0x72, 0x74, 0x4d, 0x65, 0x6d, 0x6f, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x16, - 0x0a, 0x06, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, - 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x22, 0x2f, 0x0a, 0x13, 0x45, 0x78, 0x70, 0x6f, 0x72, 0x74, - 0x4d, 0x65, 0x6d, 0x6f, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x18, 0x0a, - 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x07, - 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x22, 0x63, 0x0a, 0x17, 0x53, 0x65, 0x74, 0x4d, 0x65, - 0x6d, 0x6f, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 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, 0x34, 0x0a, 0x09, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, - 0x63, 0x65, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, - 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, - 0x65, 0x52, 0x09, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x22, 0x2e, 0x0a, 0x18, - 0x4c, 0x69, 0x73, 0x74, 0x4d, 0x65, 0x6d, 0x6f, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, - 0x73, 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, 0x51, 0x0a, 0x19, - 0x4c, 0x69, 0x73, 0x74, 0x4d, 0x65, 0x6d, 0x6f, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, - 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x34, 0x0a, 0x09, 0x72, 0x65, 0x73, - 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x6d, - 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x73, 0x6f, - 0x75, 0x72, 0x63, 0x65, 0x52, 0x09, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x22, - 0x67, 0x0a, 0x17, 0x53, 0x65, 0x74, 0x4d, 0x65, 0x6d, 0x6f, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x73, 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, 0x38, - 0x0a, 0x09, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, + 0x6f, 0x1a, 0x1d, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, 0x2f, 0x72, 0x65, 0x61, 0x63, 0x74, 0x69, + 0x6f, 0x6e, 0x5f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x1a, 0x1d, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, 0x2f, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, + 0x65, 0x5f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, + 0x1c, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, + 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x17, 0x67, + 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, + 0x70, 0x69, 0x2f, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x5f, 0x62, 0x65, 0x68, 0x61, 0x76, 0x69, 0x6f, + 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 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, 0xbc, 0x05, 0x0a, 0x04, 0x4d, 0x65, 0x6d, 0x6f, + 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, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x03, 0x75, 0x69, 0x64, 0x12, 0x36, 0x0a, 0x0a, 0x72, 0x6f, 0x77, 0x5f, 0x73, 0x74, + 0x61, 0x74, 0x75, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x17, 0x2e, 0x6d, 0x65, 0x6d, + 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x6f, 0x77, 0x53, 0x74, 0x61, + 0x74, 0x75, 0x73, 0x52, 0x09, 0x72, 0x6f, 0x77, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x18, + 0x0a, 0x07, 0x63, 0x72, 0x65, 0x61, 0x74, 0x6f, 0x72, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x07, 0x63, 0x72, 0x65, 0x61, 0x74, 0x6f, 0x72, 0x12, 0x3b, 0x0a, 0x0b, 0x63, 0x72, 0x65, 0x61, + 0x74, 0x65, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, + 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, + 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x0a, 0x63, 0x72, 0x65, 0x61, 0x74, + 0x65, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x3b, 0x0a, 0x0b, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x5f, + 0x74, 0x69, 0x6d, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, + 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x0a, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x54, 0x69, + 0x6d, 0x65, 0x12, 0x3d, 0x0a, 0x0c, 0x64, 0x69, 0x73, 0x70, 0x6c, 0x61, 0x79, 0x5f, 0x74, 0x69, + 0x6d, 0x65, 0x18, 0x07, 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, 0x64, 0x69, 0x73, 0x70, 0x6c, 0x61, 0x79, 0x54, 0x69, 0x6d, + 0x65, 0x12, 0x18, 0x0a, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x18, 0x08, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x12, 0x2d, 0x0a, 0x05, 0x6e, + 0x6f, 0x64, 0x65, 0x73, 0x18, 0x09, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x6d, 0x65, 0x6d, + 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x4e, 0x6f, 0x64, 0x65, 0x42, 0x03, + 0xe0, 0x41, 0x03, 0x52, 0x05, 0x6e, 0x6f, 0x64, 0x65, 0x73, 0x12, 0x38, 0x0a, 0x0a, 0x76, 0x69, + 0x73, 0x69, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x18, + 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x56, 0x69, + 0x73, 0x69, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x52, 0x0a, 0x76, 0x69, 0x73, 0x69, 0x62, 0x69, + 0x6c, 0x69, 0x74, 0x79, 0x12, 0x16, 0x0a, 0x06, 0x70, 0x69, 0x6e, 0x6e, 0x65, 0x64, 0x18, 0x0b, + 0x20, 0x01, 0x28, 0x08, 0x52, 0x06, 0x70, 0x69, 0x6e, 0x6e, 0x65, 0x64, 0x12, 0x25, 0x0a, 0x09, + 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x05, 0x42, + 0x03, 0xe0, 0x41, 0x03, 0x48, 0x00, 0x52, 0x08, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x49, 0x64, + 0x88, 0x01, 0x01, 0x12, 0x39, 0x0a, 0x09, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, + 0x18, 0x0d, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, + 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x42, 0x03, + 0xe0, 0x41, 0x03, 0x52, 0x09, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x12, 0x3d, + 0x0a, 0x09, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x0e, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, - 0x2e, 0x4d, 0x65, 0x6d, 0x6f, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x09, 0x72, - 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0x2e, 0x0a, 0x18, 0x4c, 0x69, 0x73, 0x74, - 0x4d, 0x65, 0x6d, 0x6f, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 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, 0x55, 0x0a, 0x19, 0x4c, 0x69, 0x73, 0x74, - 0x4d, 0x65, 0x6d, 0x6f, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x38, 0x0a, 0x09, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, - 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x65, 0x6d, 0x6f, 0x52, 0x65, 0x6c, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x09, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22, - 0x69, 0x0a, 0x18, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x4d, 0x65, 0x6d, 0x6f, 0x43, 0x6f, 0x6d, - 0x6d, 0x65, 0x6e, 0x74, 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, - 0x39, 0x0a, 0x07, 0x63, 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x1f, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, - 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x4d, 0x65, 0x6d, 0x6f, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x52, 0x07, 0x63, 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x74, 0x22, 0x2d, 0x0a, 0x17, 0x4c, 0x69, - 0x73, 0x74, 0x4d, 0x65, 0x6d, 0x6f, 0x43, 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x74, 0x73, 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, 0x44, 0x0a, 0x18, 0x4c, 0x69, 0x73, - 0x74, 0x4d, 0x65, 0x6d, 0x6f, 0x43, 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x28, 0x0a, 0x05, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x18, 0x01, - 0x20, 0x03, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, - 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x65, 0x6d, 0x6f, 0x52, 0x05, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x22, - 0x62, 0x0a, 0x18, 0x47, 0x65, 0x74, 0x55, 0x73, 0x65, 0x72, 0x4d, 0x65, 0x6d, 0x6f, 0x73, 0x53, - 0x74, 0x61, 0x74, 0x73, 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, - 0x1a, 0x0a, 0x08, 0x74, 0x69, 0x6d, 0x65, 0x7a, 0x6f, 0x6e, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x08, 0x74, 0x69, 0x6d, 0x65, 0x7a, 0x6f, 0x6e, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x66, - 0x69, 0x6c, 0x74, 0x65, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x66, 0x69, 0x6c, - 0x74, 0x65, 0x72, 0x22, 0x9f, 0x01, 0x0a, 0x19, 0x47, 0x65, 0x74, 0x55, 0x73, 0x65, 0x72, 0x4d, - 0x65, 0x6d, 0x6f, 0x73, 0x53, 0x74, 0x61, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x12, 0x48, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x74, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, - 0x32, 0x32, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, - 0x47, 0x65, 0x74, 0x55, 0x73, 0x65, 0x72, 0x4d, 0x65, 0x6d, 0x6f, 0x73, 0x53, 0x74, 0x61, 0x74, - 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x73, 0x45, - 0x6e, 0x74, 0x72, 0x79, 0x52, 0x05, 0x73, 0x74, 0x61, 0x74, 0x73, 0x1a, 0x38, 0x0a, 0x0a, 0x53, - 0x74, 0x61, 0x74, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, - 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, - 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0x2e, 0x0a, 0x18, 0x4c, 0x69, 0x73, 0x74, 0x4d, 0x65, 0x6d, - 0x6f, 0x52, 0x65, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 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, 0x51, 0x0a, 0x19, 0x4c, 0x69, 0x73, 0x74, 0x4d, 0x65, 0x6d, - 0x6f, 0x52, 0x65, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x12, 0x34, 0x0a, 0x09, 0x72, 0x65, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, - 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, - 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x09, 0x72, - 0x65, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0x63, 0x0a, 0x19, 0x55, 0x70, 0x73, 0x65, - 0x72, 0x74, 0x4d, 0x65, 0x6d, 0x6f, 0x52, 0x65, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x32, 0x0a, 0x08, 0x72, 0x65, 0x61, - 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x6d, 0x65, - 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x61, 0x63, 0x74, - 0x69, 0x6f, 0x6e, 0x52, 0x08, 0x72, 0x65, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x3c, 0x0a, - 0x19, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x4d, 0x65, 0x6d, 0x6f, 0x52, 0x65, 0x61, 0x63, 0x74, - 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1f, 0x0a, 0x0b, 0x72, 0x65, - 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, - 0x0a, 0x72, 0x65, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x2a, 0x50, 0x0a, 0x0a, 0x56, - 0x69, 0x73, 0x69, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x12, 0x1a, 0x0a, 0x16, 0x56, 0x49, 0x53, - 0x49, 0x42, 0x49, 0x4c, 0x49, 0x54, 0x59, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, - 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x0b, 0x0a, 0x07, 0x50, 0x52, 0x49, 0x56, 0x41, 0x54, 0x45, - 0x10, 0x01, 0x12, 0x0d, 0x0a, 0x09, 0x50, 0x52, 0x4f, 0x54, 0x45, 0x43, 0x54, 0x45, 0x44, 0x10, - 0x02, 0x12, 0x0a, 0x0a, 0x06, 0x50, 0x55, 0x42, 0x4c, 0x49, 0x43, 0x10, 0x03, 0x32, 0xaa, 0x11, - 0x0a, 0x0b, 0x4d, 0x65, 0x6d, 0x6f, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x5b, 0x0a, - 0x0a, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x4d, 0x65, 0x6d, 0x6f, 0x12, 0x1f, 0x2e, 0x6d, 0x65, - 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, - 0x65, 0x4d, 0x65, 0x6d, 0x6f, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x12, 0x2e, 0x6d, - 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x65, 0x6d, 0x6f, - 0x22, 0x18, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x12, 0x3a, 0x01, 0x2a, 0x22, 0x0d, 0x2f, 0x61, 0x70, - 0x69, 0x2f, 0x76, 0x31, 0x2f, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x12, 0x63, 0x0a, 0x09, 0x4c, 0x69, - 0x73, 0x74, 0x4d, 0x65, 0x6d, 0x6f, 0x73, 0x12, 0x1e, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, - 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x4d, 0x65, 0x6d, 0x6f, 0x73, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1f, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, - 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x4d, 0x65, 0x6d, 0x6f, 0x73, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x15, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x0f, - 0x12, 0x0d, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, 0x2f, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x12, - 0x70, 0x0a, 0x0b, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x4d, 0x65, 0x6d, 0x6f, 0x73, 0x12, 0x20, - 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x65, - 0x61, 0x72, 0x63, 0x68, 0x4d, 0x65, 0x6d, 0x6f, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x1a, 0x21, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, + 0x2e, 0x4d, 0x65, 0x6d, 0x6f, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x03, 0xe0, + 0x41, 0x03, 0x52, 0x09, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x39, 0x0a, + 0x09, 0x72, 0x65, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x0f, 0x20, 0x03, 0x28, 0x0b, + 0x32, 0x16, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, + 0x52, 0x65, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x03, 0xe0, 0x41, 0x03, 0x52, 0x09, 0x72, + 0x65, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x42, 0x0c, 0x0a, 0x0a, 0x5f, 0x70, 0x61, 0x72, + 0x65, 0x6e, 0x74, 0x5f, 0x69, 0x64, 0x22, 0x67, 0x0a, 0x11, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, + 0x4d, 0x65, 0x6d, 0x6f, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x18, 0x0a, 0x07, 0x63, + 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x63, 0x6f, + 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x12, 0x38, 0x0a, 0x0a, 0x76, 0x69, 0x73, 0x69, 0x62, 0x69, 0x6c, + 0x69, 0x74, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x18, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, + 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x56, 0x69, 0x73, 0x69, 0x62, 0x69, 0x6c, + 0x69, 0x74, 0x79, 0x52, 0x0a, 0x76, 0x69, 0x73, 0x69, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x22, + 0x66, 0x0a, 0x10, 0x4c, 0x69, 0x73, 0x74, 0x4d, 0x65, 0x6d, 0x6f, 0x73, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x12, 0x1b, 0x0a, 0x09, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x73, 0x69, 0x7a, 0x65, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x70, 0x61, 0x67, 0x65, 0x53, 0x69, 0x7a, 0x65, + 0x12, 0x1d, 0x0a, 0x0a, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x70, 0x61, 0x67, 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x12, + 0x16, 0x0a, 0x06, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x06, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x22, 0x65, 0x0a, 0x11, 0x4c, 0x69, 0x73, 0x74, 0x4d, + 0x65, 0x6d, 0x6f, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x28, 0x0a, 0x05, + 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x6d, 0x65, + 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x65, 0x6d, 0x6f, 0x52, + 0x05, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x12, 0x26, 0x0a, 0x0f, 0x6e, 0x65, 0x78, 0x74, 0x5f, 0x70, + 0x61, 0x67, 0x65, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x0d, 0x6e, 0x65, 0x78, 0x74, 0x50, 0x61, 0x67, 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x22, 0x2c, + 0x0a, 0x12, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x4d, 0x65, 0x6d, 0x6f, 0x73, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x22, 0x3f, 0x0a, 0x13, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x4d, 0x65, 0x6d, 0x6f, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x22, 0x1c, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x16, 0x12, 0x14, 0x2f, 0x61, 0x70, - 0x69, 0x2f, 0x76, 0x31, 0x2f, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x3a, 0x73, 0x65, 0x61, 0x72, 0x63, - 0x68, 0x12, 0x62, 0x0a, 0x07, 0x47, 0x65, 0x74, 0x4d, 0x65, 0x6d, 0x6f, 0x12, 0x1c, 0x2e, 0x6d, - 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x4d, - 0x65, 0x6d, 0x6f, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x12, 0x2e, 0x6d, 0x65, 0x6d, - 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x65, 0x6d, 0x6f, 0x22, 0x25, - 0xda, 0x41, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x18, 0x12, 0x16, 0x2f, - 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x6d, 0x65, 0x6d, - 0x6f, 0x73, 0x2f, 0x2a, 0x7d, 0x12, 0x7f, 0x0a, 0x0a, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x4d, - 0x65, 0x6d, 0x6f, 0x12, 0x1f, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, - 0x76, 0x31, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x4d, 0x65, 0x6d, 0x6f, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x1a, 0x12, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, - 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x65, 0x6d, 0x6f, 0x22, 0x3c, 0xda, 0x41, 0x10, 0x6d, 0x65, 0x6d, - 0x6f, 0x2c, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x5f, 0x6d, 0x61, 0x73, 0x6b, 0x82, 0xd3, 0xe4, - 0x93, 0x02, 0x23, 0x3a, 0x04, 0x6d, 0x65, 0x6d, 0x6f, 0x32, 0x1b, 0x2f, 0x61, 0x70, 0x69, 0x2f, - 0x76, 0x31, 0x2f, 0x7b, 0x6d, 0x65, 0x6d, 0x6f, 0x2e, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x6d, 0x65, - 0x6d, 0x6f, 0x73, 0x2f, 0x2a, 0x7d, 0x12, 0x6c, 0x0a, 0x0a, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, - 0x4d, 0x65, 0x6d, 0x6f, 0x12, 0x1f, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, - 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x4d, 0x65, 0x6d, 0x6f, 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, 0x25, 0xda, - 0x41, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x18, 0x2a, 0x16, 0x2f, 0x61, - 0x70, 0x69, 0x2f, 0x76, 0x31, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x6d, 0x65, 0x6d, 0x6f, - 0x73, 0x2f, 0x2a, 0x7d, 0x12, 0x73, 0x0a, 0x0b, 0x45, 0x78, 0x70, 0x6f, 0x72, 0x74, 0x4d, 0x65, - 0x6d, 0x6f, 0x73, 0x12, 0x20, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, - 0x76, 0x31, 0x2e, 0x45, 0x78, 0x70, 0x6f, 0x72, 0x74, 0x4d, 0x65, 0x6d, 0x6f, 0x73, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x21, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, - 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x45, 0x78, 0x70, 0x6f, 0x72, 0x74, 0x4d, 0x65, 0x6d, 0x6f, 0x73, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x1f, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x19, - 0x3a, 0x01, 0x2a, 0x22, 0x14, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, 0x2f, 0x6d, 0x65, 0x6d, - 0x6f, 0x73, 0x3a, 0x65, 0x78, 0x70, 0x6f, 0x72, 0x74, 0x12, 0x85, 0x01, 0x0a, 0x10, 0x53, 0x65, - 0x74, 0x4d, 0x65, 0x6d, 0x6f, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x12, 0x25, - 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x65, - 0x74, 0x4d, 0x65, 0x6d, 0x6f, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 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, 0x32, 0xda, - 0x41, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x25, 0x3a, 0x01, 0x2a, 0x32, - 0x20, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x6d, - 0x65, 0x6d, 0x6f, 0x73, 0x2f, 0x2a, 0x7d, 0x2f, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, - 0x73, 0x12, 0x95, 0x01, 0x0a, 0x11, 0x4c, 0x69, 0x73, 0x74, 0x4d, 0x65, 0x6d, 0x6f, 0x52, 0x65, - 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x12, 0x26, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, - 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x4d, 0x65, 0x6d, 0x6f, 0x52, - 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, - 0x27, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x4c, - 0x69, 0x73, 0x74, 0x4d, 0x65, 0x6d, 0x6f, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x2f, 0xda, 0x41, 0x04, 0x6e, 0x61, 0x6d, - 0x65, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x22, 0x12, 0x20, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, - 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2f, 0x2a, 0x7d, 0x2f, - 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x12, 0x85, 0x01, 0x0a, 0x10, 0x53, 0x65, - 0x74, 0x4d, 0x65, 0x6d, 0x6f, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x25, - 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x65, - 0x74, 0x4d, 0x65, 0x6d, 0x6f, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 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, 0x32, 0xda, - 0x41, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x25, 0x3a, 0x01, 0x2a, 0x32, - 0x20, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x6d, - 0x65, 0x6d, 0x6f, 0x73, 0x2f, 0x2a, 0x7d, 0x2f, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x73, 0x12, 0x95, 0x01, 0x0a, 0x11, 0x4c, 0x69, 0x73, 0x74, 0x4d, 0x65, 0x6d, 0x6f, 0x52, 0x65, - 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x26, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, - 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x4d, 0x65, 0x6d, 0x6f, 0x52, - 0x65, 0x6c, 0x61, 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, 0x31, 0x2e, 0x4c, - 0x69, 0x73, 0x74, 0x4d, 0x65, 0x6d, 0x6f, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x2f, 0xda, 0x41, 0x04, 0x6e, 0x61, 0x6d, - 0x65, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x22, 0x12, 0x20, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, - 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2f, 0x2a, 0x7d, 0x2f, - 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x88, 0x01, 0x0a, 0x11, 0x43, 0x72, - 0x65, 0x61, 0x74, 0x65, 0x4d, 0x65, 0x6d, 0x6f, 0x43, 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x74, 0x12, - 0x26, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x43, - 0x72, 0x65, 0x61, 0x74, 0x65, 0x4d, 0x65, 0x6d, 0x6f, 0x43, 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x74, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x12, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, - 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x65, 0x6d, 0x6f, 0x22, 0x37, 0xda, 0x41, 0x04, - 0x6e, 0x61, 0x6d, 0x65, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x2a, 0x3a, 0x07, 0x63, 0x6f, 0x6d, 0x6d, - 0x65, 0x6e, 0x74, 0x22, 0x1f, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, 0x2f, 0x7b, 0x6e, 0x61, - 0x6d, 0x65, 0x3d, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2f, 0x2a, 0x7d, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, - 0x65, 0x6e, 0x74, 0x73, 0x12, 0x91, 0x01, 0x0a, 0x10, 0x4c, 0x69, 0x73, 0x74, 0x4d, 0x65, 0x6d, - 0x6f, 0x43, 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x12, 0x25, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, - 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x4d, 0x65, 0x6d, - 0x6f, 0x43, 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x1a, 0x26, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, - 0x4c, 0x69, 0x73, 0x74, 0x4d, 0x65, 0x6d, 0x6f, 0x43, 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x74, 0x73, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x2e, 0xda, 0x41, 0x04, 0x6e, 0x61, 0x6d, - 0x65, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x21, 0x12, 0x1f, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, - 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2f, 0x2a, 0x7d, 0x2f, - 0x63, 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x12, 0x8c, 0x01, 0x0a, 0x11, 0x47, 0x65, 0x74, - 0x55, 0x73, 0x65, 0x72, 0x4d, 0x65, 0x6d, 0x6f, 0x73, 0x53, 0x74, 0x61, 0x74, 0x73, 0x12, 0x26, + 0x6e, 0x73, 0x65, 0x12, 0x28, 0x0a, 0x05, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x18, 0x01, 0x20, 0x03, + 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, + 0x31, 0x2e, 0x4d, 0x65, 0x6d, 0x6f, 0x52, 0x05, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x22, 0x24, 0x0a, + 0x0e, 0x47, 0x65, 0x74, 0x4d, 0x65, 0x6d, 0x6f, 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, 0x78, 0x0a, 0x11, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x4d, 0x65, 0x6d, + 0x6f, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x26, 0x0a, 0x04, 0x6d, 0x65, 0x6d, 0x6f, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, + 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x65, 0x6d, 0x6f, 0x52, 0x04, 0x6d, 0x65, 0x6d, 0x6f, + 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, 0x27, 0x0a, + 0x11, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x4d, 0x65, 0x6d, 0x6f, 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, 0x2c, 0x0a, 0x12, 0x45, 0x78, 0x70, 0x6f, 0x72, 0x74, + 0x4d, 0x65, 0x6d, 0x6f, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x16, 0x0a, 0x06, + 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x66, 0x69, + 0x6c, 0x74, 0x65, 0x72, 0x22, 0x2f, 0x0a, 0x13, 0x45, 0x78, 0x70, 0x6f, 0x72, 0x74, 0x4d, 0x65, + 0x6d, 0x6f, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x63, + 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x07, 0x63, 0x6f, + 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x22, 0x63, 0x0a, 0x17, 0x53, 0x65, 0x74, 0x4d, 0x65, 0x6d, 0x6f, + 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 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, 0x34, 0x0a, 0x09, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, + 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, + 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, + 0x09, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x22, 0x2e, 0x0a, 0x18, 0x4c, 0x69, + 0x73, 0x74, 0x4d, 0x65, 0x6d, 0x6f, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 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, 0x51, 0x0a, 0x19, 0x4c, 0x69, + 0x73, 0x74, 0x4d, 0x65, 0x6d, 0x6f, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x34, 0x0a, 0x09, 0x72, 0x65, 0x73, 0x6f, 0x75, + 0x72, 0x63, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x6d, 0x65, 0x6d, + 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, + 0x63, 0x65, 0x52, 0x09, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x22, 0x67, 0x0a, + 0x17, 0x53, 0x65, 0x74, 0x4d, 0x65, 0x6d, 0x6f, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x73, 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, 0x38, 0x0a, 0x09, + 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, + 0x1a, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x4d, + 0x65, 0x6d, 0x6f, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x09, 0x72, 0x65, 0x6c, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0x2e, 0x0a, 0x18, 0x4c, 0x69, 0x73, 0x74, 0x4d, 0x65, + 0x6d, 0x6f, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 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, 0x55, 0x0a, 0x19, 0x4c, 0x69, 0x73, 0x74, 0x4d, 0x65, + 0x6d, 0x6f, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x12, 0x38, 0x0a, 0x09, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, + 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, + 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x65, 0x6d, 0x6f, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x52, 0x09, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0x69, 0x0a, + 0x18, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x4d, 0x65, 0x6d, 0x6f, 0x43, 0x6f, 0x6d, 0x6d, 0x65, + 0x6e, 0x74, 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, 0x39, 0x0a, + 0x07, 0x63, 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1f, + 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x72, + 0x65, 0x61, 0x74, 0x65, 0x4d, 0x65, 0x6d, 0x6f, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x52, + 0x07, 0x63, 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x74, 0x22, 0x2d, 0x0a, 0x17, 0x4c, 0x69, 0x73, 0x74, + 0x4d, 0x65, 0x6d, 0x6f, 0x43, 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x74, 0x73, 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, 0x44, 0x0a, 0x18, 0x4c, 0x69, 0x73, 0x74, 0x4d, + 0x65, 0x6d, 0x6f, 0x43, 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x12, 0x28, 0x0a, 0x05, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x18, 0x01, 0x20, 0x03, + 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, + 0x31, 0x2e, 0x4d, 0x65, 0x6d, 0x6f, 0x52, 0x05, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x22, 0x62, 0x0a, + 0x18, 0x47, 0x65, 0x74, 0x55, 0x73, 0x65, 0x72, 0x4d, 0x65, 0x6d, 0x6f, 0x73, 0x53, 0x74, 0x61, + 0x74, 0x73, 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, 0x1a, 0x0a, + 0x08, 0x74, 0x69, 0x6d, 0x65, 0x7a, 0x6f, 0x6e, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x08, 0x74, 0x69, 0x6d, 0x65, 0x7a, 0x6f, 0x6e, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x66, 0x69, 0x6c, + 0x74, 0x65, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x66, 0x69, 0x6c, 0x74, 0x65, + 0x72, 0x22, 0x9f, 0x01, 0x0a, 0x19, 0x47, 0x65, 0x74, 0x55, 0x73, 0x65, 0x72, 0x4d, 0x65, 0x6d, + 0x6f, 0x73, 0x53, 0x74, 0x61, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, + 0x48, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x74, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x32, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x55, 0x73, 0x65, 0x72, 0x4d, 0x65, 0x6d, 0x6f, 0x73, 0x53, 0x74, 0x61, 0x74, 0x73, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x27, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, - 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x55, 0x73, 0x65, 0x72, 0x4d, 0x65, 0x6d, - 0x6f, 0x73, 0x53, 0x74, 0x61, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, - 0x26, 0xda, 0x41, 0x08, 0x75, 0x73, 0x65, 0x72, 0x6e, 0x61, 0x6d, 0x65, 0x82, 0xd3, 0xe4, 0x93, - 0x02, 0x15, 0x12, 0x13, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, 0x2f, 0x6d, 0x65, 0x6d, 0x6f, - 0x73, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x73, 0x12, 0x95, 0x01, 0x0a, 0x11, 0x4c, 0x69, 0x73, 0x74, - 0x4d, 0x65, 0x6d, 0x6f, 0x52, 0x65, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x26, 0x2e, - 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x69, 0x73, - 0x74, 0x4d, 0x65, 0x6d, 0x6f, 0x52, 0x65, 0x61, 0x63, 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, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x4d, 0x65, 0x6d, 0x6f, 0x52, 0x65, 0x61, - 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x2f, - 0xda, 0x41, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x22, 0x12, 0x20, 0x2f, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x73, 0x45, 0x6e, 0x74, + 0x72, 0x79, 0x52, 0x05, 0x73, 0x74, 0x61, 0x74, 0x73, 0x1a, 0x38, 0x0a, 0x0a, 0x53, 0x74, 0x61, + 0x74, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, + 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, + 0x02, 0x38, 0x01, 0x22, 0x2e, 0x0a, 0x18, 0x4c, 0x69, 0x73, 0x74, 0x4d, 0x65, 0x6d, 0x6f, 0x52, + 0x65, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 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, 0x51, 0x0a, 0x19, 0x4c, 0x69, 0x73, 0x74, 0x4d, 0x65, 0x6d, 0x6f, 0x52, + 0x65, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x12, 0x34, 0x0a, 0x09, 0x72, 0x65, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x01, 0x20, + 0x03, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, + 0x76, 0x31, 0x2e, 0x52, 0x65, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x09, 0x72, 0x65, 0x61, + 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0x63, 0x0a, 0x19, 0x55, 0x70, 0x73, 0x65, 0x72, 0x74, + 0x4d, 0x65, 0x6d, 0x6f, 0x52, 0x65, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x32, 0x0a, 0x08, 0x72, 0x65, 0x61, 0x63, 0x74, + 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, + 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x61, 0x63, 0x74, 0x69, 0x6f, + 0x6e, 0x52, 0x08, 0x72, 0x65, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x3c, 0x0a, 0x19, 0x44, + 0x65, 0x6c, 0x65, 0x74, 0x65, 0x4d, 0x65, 0x6d, 0x6f, 0x52, 0x65, 0x61, 0x63, 0x74, 0x69, 0x6f, + 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1f, 0x0a, 0x0b, 0x72, 0x65, 0x61, 0x63, + 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0a, 0x72, + 0x65, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x2a, 0x50, 0x0a, 0x0a, 0x56, 0x69, 0x73, + 0x69, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x12, 0x1a, 0x0a, 0x16, 0x56, 0x49, 0x53, 0x49, 0x42, + 0x49, 0x4c, 0x49, 0x54, 0x59, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, + 0x44, 0x10, 0x00, 0x12, 0x0b, 0x0a, 0x07, 0x50, 0x52, 0x49, 0x56, 0x41, 0x54, 0x45, 0x10, 0x01, + 0x12, 0x0d, 0x0a, 0x09, 0x50, 0x52, 0x4f, 0x54, 0x45, 0x43, 0x54, 0x45, 0x44, 0x10, 0x02, 0x12, + 0x0a, 0x0a, 0x06, 0x50, 0x55, 0x42, 0x4c, 0x49, 0x43, 0x10, 0x03, 0x32, 0xaa, 0x11, 0x0a, 0x0b, + 0x4d, 0x65, 0x6d, 0x6f, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x5b, 0x0a, 0x0a, 0x43, + 0x72, 0x65, 0x61, 0x74, 0x65, 0x4d, 0x65, 0x6d, 0x6f, 0x12, 0x1f, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, + 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x4d, + 0x65, 0x6d, 0x6f, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x12, 0x2e, 0x6d, 0x65, 0x6d, + 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x65, 0x6d, 0x6f, 0x22, 0x18, + 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x12, 0x3a, 0x01, 0x2a, 0x22, 0x0d, 0x2f, 0x61, 0x70, 0x69, 0x2f, + 0x76, 0x31, 0x2f, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x12, 0x63, 0x0a, 0x09, 0x4c, 0x69, 0x73, 0x74, + 0x4d, 0x65, 0x6d, 0x6f, 0x73, 0x12, 0x1e, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, + 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x4d, 0x65, 0x6d, 0x6f, 0x73, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1f, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, + 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x4d, 0x65, 0x6d, 0x6f, 0x73, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x15, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x0f, 0x12, 0x0d, + 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, 0x2f, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x12, 0x70, 0x0a, + 0x0b, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x4d, 0x65, 0x6d, 0x6f, 0x73, 0x12, 0x20, 0x2e, 0x6d, + 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x65, 0x61, 0x72, + 0x63, 0x68, 0x4d, 0x65, 0x6d, 0x6f, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x21, + 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x65, + 0x61, 0x72, 0x63, 0x68, 0x4d, 0x65, 0x6d, 0x6f, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x22, 0x1c, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x16, 0x12, 0x14, 0x2f, 0x61, 0x70, 0x69, 0x2f, + 0x76, 0x31, 0x2f, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x3a, 0x73, 0x65, 0x61, 0x72, 0x63, 0x68, 0x12, + 0x62, 0x0a, 0x07, 0x47, 0x65, 0x74, 0x4d, 0x65, 0x6d, 0x6f, 0x12, 0x1c, 0x2e, 0x6d, 0x65, 0x6d, + 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x4d, 0x65, 0x6d, + 0x6f, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x12, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, + 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x65, 0x6d, 0x6f, 0x22, 0x25, 0xda, 0x41, + 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x18, 0x12, 0x16, 0x2f, 0x61, 0x70, + 0x69, 0x2f, 0x76, 0x31, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x6d, 0x65, 0x6d, 0x6f, 0x73, + 0x2f, 0x2a, 0x7d, 0x12, 0x7f, 0x0a, 0x0a, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x4d, 0x65, 0x6d, + 0x6f, 0x12, 0x1f, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, + 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x4d, 0x65, 0x6d, 0x6f, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x1a, 0x12, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, + 0x31, 0x2e, 0x4d, 0x65, 0x6d, 0x6f, 0x22, 0x3c, 0xda, 0x41, 0x10, 0x6d, 0x65, 0x6d, 0x6f, 0x2c, + 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x5f, 0x6d, 0x61, 0x73, 0x6b, 0x82, 0xd3, 0xe4, 0x93, 0x02, + 0x23, 0x3a, 0x04, 0x6d, 0x65, 0x6d, 0x6f, 0x32, 0x1b, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, + 0x2f, 0x7b, 0x6d, 0x65, 0x6d, 0x6f, 0x2e, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x6d, 0x65, 0x6d, 0x6f, + 0x73, 0x2f, 0x2a, 0x7d, 0x12, 0x6c, 0x0a, 0x0a, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x4d, 0x65, + 0x6d, 0x6f, 0x12, 0x1f, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, + 0x31, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x4d, 0x65, 0x6d, 0x6f, 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, 0x25, 0xda, 0x41, 0x04, + 0x6e, 0x61, 0x6d, 0x65, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x18, 0x2a, 0x16, 0x2f, 0x61, 0x70, 0x69, + 0x2f, 0x76, 0x31, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2f, + 0x2a, 0x7d, 0x12, 0x73, 0x0a, 0x0b, 0x45, 0x78, 0x70, 0x6f, 0x72, 0x74, 0x4d, 0x65, 0x6d, 0x6f, + 0x73, 0x12, 0x20, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, + 0x2e, 0x45, 0x78, 0x70, 0x6f, 0x72, 0x74, 0x4d, 0x65, 0x6d, 0x6f, 0x73, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x1a, 0x21, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, + 0x76, 0x31, 0x2e, 0x45, 0x78, 0x70, 0x6f, 0x72, 0x74, 0x4d, 0x65, 0x6d, 0x6f, 0x73, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x1f, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x19, 0x3a, 0x01, + 0x2a, 0x22, 0x14, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, 0x2f, 0x6d, 0x65, 0x6d, 0x6f, 0x73, + 0x3a, 0x65, 0x78, 0x70, 0x6f, 0x72, 0x74, 0x12, 0x85, 0x01, 0x0a, 0x10, 0x53, 0x65, 0x74, 0x4d, + 0x65, 0x6d, 0x6f, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x12, 0x25, 0x2e, 0x6d, + 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x65, 0x74, 0x4d, + 0x65, 0x6d, 0x6f, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 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, 0x32, 0xda, 0x41, 0x04, + 0x6e, 0x61, 0x6d, 0x65, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x25, 0x3a, 0x01, 0x2a, 0x32, 0x20, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x6d, 0x65, 0x6d, - 0x6f, 0x73, 0x2f, 0x2a, 0x7d, 0x2f, 0x72, 0x65, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, - 0x89, 0x01, 0x0a, 0x12, 0x55, 0x70, 0x73, 0x65, 0x72, 0x74, 0x4d, 0x65, 0x6d, 0x6f, 0x52, 0x65, - 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x27, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, - 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x70, 0x73, 0x65, 0x72, 0x74, 0x4d, 0x65, 0x6d, 0x6f, - 0x52, 0x65, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, - 0x16, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x52, - 0x65, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x32, 0xda, 0x41, 0x04, 0x6e, 0x61, 0x6d, 0x65, - 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x25, 0x3a, 0x01, 0x2a, 0x22, 0x20, 0x2f, 0x61, 0x70, 0x69, 0x2f, - 0x76, 0x31, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2f, 0x2a, - 0x7d, 0x2f, 0x72, 0x65, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x8c, 0x01, 0x0a, 0x12, + 0x6f, 0x73, 0x2f, 0x2a, 0x7d, 0x2f, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x12, + 0x95, 0x01, 0x0a, 0x11, 0x4c, 0x69, 0x73, 0x74, 0x4d, 0x65, 0x6d, 0x6f, 0x52, 0x65, 0x73, 0x6f, + 0x75, 0x72, 0x63, 0x65, 0x73, 0x12, 0x26, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, + 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x4d, 0x65, 0x6d, 0x6f, 0x52, 0x65, 0x73, + 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x27, 0x2e, + 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x69, 0x73, + 0x74, 0x4d, 0x65, 0x6d, 0x6f, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x2f, 0xda, 0x41, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x82, + 0xd3, 0xe4, 0x93, 0x02, 0x22, 0x12, 0x20, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, 0x2f, 0x7b, + 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2f, 0x2a, 0x7d, 0x2f, 0x72, 0x65, + 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x12, 0x85, 0x01, 0x0a, 0x10, 0x53, 0x65, 0x74, 0x4d, + 0x65, 0x6d, 0x6f, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x25, 0x2e, 0x6d, + 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x65, 0x74, 0x4d, + 0x65, 0x6d, 0x6f, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 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, 0x32, 0xda, 0x41, 0x04, + 0x6e, 0x61, 0x6d, 0x65, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x25, 0x3a, 0x01, 0x2a, 0x32, 0x20, 0x2f, + 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x6d, 0x65, 0x6d, + 0x6f, 0x73, 0x2f, 0x2a, 0x7d, 0x2f, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, + 0x95, 0x01, 0x0a, 0x11, 0x4c, 0x69, 0x73, 0x74, 0x4d, 0x65, 0x6d, 0x6f, 0x52, 0x65, 0x6c, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x26, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, + 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x4d, 0x65, 0x6d, 0x6f, 0x52, 0x65, 0x6c, + 0x61, 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, 0x31, 0x2e, 0x4c, 0x69, 0x73, + 0x74, 0x4d, 0x65, 0x6d, 0x6f, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x2f, 0xda, 0x41, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x82, + 0xd3, 0xe4, 0x93, 0x02, 0x22, 0x12, 0x20, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, 0x2f, 0x7b, + 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2f, 0x2a, 0x7d, 0x2f, 0x72, 0x65, + 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x88, 0x01, 0x0a, 0x11, 0x43, 0x72, 0x65, 0x61, + 0x74, 0x65, 0x4d, 0x65, 0x6d, 0x6f, 0x43, 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x26, 0x2e, + 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x72, 0x65, + 0x61, 0x74, 0x65, 0x4d, 0x65, 0x6d, 0x6f, 0x43, 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x12, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, + 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x65, 0x6d, 0x6f, 0x22, 0x37, 0xda, 0x41, 0x04, 0x6e, 0x61, + 0x6d, 0x65, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x2a, 0x3a, 0x07, 0x63, 0x6f, 0x6d, 0x6d, 0x65, 0x6e, + 0x74, 0x22, 0x1f, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, + 0x3d, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2f, 0x2a, 0x7d, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x65, 0x6e, + 0x74, 0x73, 0x12, 0x91, 0x01, 0x0a, 0x10, 0x4c, 0x69, 0x73, 0x74, 0x4d, 0x65, 0x6d, 0x6f, 0x43, + 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x12, 0x25, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, + 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x4d, 0x65, 0x6d, 0x6f, 0x43, + 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x26, + 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x69, + 0x73, 0x74, 0x4d, 0x65, 0x6d, 0x6f, 0x43, 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x2e, 0xda, 0x41, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x82, + 0xd3, 0xe4, 0x93, 0x02, 0x21, 0x12, 0x1f, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, 0x2f, 0x7b, + 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2f, 0x2a, 0x7d, 0x2f, 0x63, 0x6f, + 0x6d, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x12, 0x8c, 0x01, 0x0a, 0x11, 0x47, 0x65, 0x74, 0x55, 0x73, + 0x65, 0x72, 0x4d, 0x65, 0x6d, 0x6f, 0x73, 0x53, 0x74, 0x61, 0x74, 0x73, 0x12, 0x26, 0x2e, 0x6d, + 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x55, + 0x73, 0x65, 0x72, 0x4d, 0x65, 0x6d, 0x6f, 0x73, 0x53, 0x74, 0x61, 0x74, 0x73, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x1a, 0x27, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, + 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x55, 0x73, 0x65, 0x72, 0x4d, 0x65, 0x6d, 0x6f, 0x73, + 0x53, 0x74, 0x61, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x26, 0xda, + 0x41, 0x08, 0x75, 0x73, 0x65, 0x72, 0x6e, 0x61, 0x6d, 0x65, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x15, + 0x12, 0x13, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, 0x2f, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2f, + 0x73, 0x74, 0x61, 0x74, 0x73, 0x12, 0x95, 0x01, 0x0a, 0x11, 0x4c, 0x69, 0x73, 0x74, 0x4d, 0x65, + 0x6d, 0x6f, 0x52, 0x65, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x26, 0x2e, 0x6d, 0x65, + 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x4d, + 0x65, 0x6d, 0x6f, 0x52, 0x65, 0x61, 0x63, 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, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x4d, 0x65, 0x6d, 0x6f, 0x52, 0x65, 0x61, 0x63, 0x74, + 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x2f, 0xda, 0x41, + 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x22, 0x12, 0x20, 0x2f, 0x61, 0x70, + 0x69, 0x2f, 0x76, 0x31, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x6d, 0x65, 0x6d, 0x6f, 0x73, + 0x2f, 0x2a, 0x7d, 0x2f, 0x72, 0x65, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x89, 0x01, + 0x0a, 0x12, 0x55, 0x70, 0x73, 0x65, 0x72, 0x74, 0x4d, 0x65, 0x6d, 0x6f, 0x52, 0x65, 0x61, 0x63, + 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x27, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, + 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x70, 0x73, 0x65, 0x72, 0x74, 0x4d, 0x65, 0x6d, 0x6f, 0x52, 0x65, + 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, + 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x61, + 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x32, 0xda, 0x41, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x82, 0xd3, + 0xe4, 0x93, 0x02, 0x25, 0x3a, 0x01, 0x2a, 0x22, 0x20, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, + 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2f, 0x2a, 0x7d, 0x2f, + 0x72, 0x65, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x8c, 0x01, 0x0a, 0x12, 0x44, 0x65, + 0x6c, 0x65, 0x74, 0x65, 0x4d, 0x65, 0x6d, 0x6f, 0x52, 0x65, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, + 0x12, 0x27, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x4d, 0x65, 0x6d, 0x6f, 0x52, 0x65, 0x61, 0x63, 0x74, 0x69, - 0x6f, 0x6e, 0x12, 0x27, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, - 0x31, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x4d, 0x65, 0x6d, 0x6f, 0x52, 0x65, 0x61, 0x63, - 0x74, 0x69, 0x6f, 0x6e, 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, 0x35, 0xda, 0x41, 0x0b, 0x72, 0x65, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, - 0x5f, 0x69, 0x64, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x21, 0x2a, 0x1f, 0x2f, 0x61, 0x70, 0x69, 0x2f, - 0x76, 0x31, 0x2f, 0x72, 0x65, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x7b, 0x72, 0x65, - 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x7d, 0x42, 0xa8, 0x01, 0x0a, 0x10, 0x63, - 0x6f, 0x6d, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x42, - 0x10, 0x4d, 0x65, 0x6d, 0x6f, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x50, 0x72, 0x6f, 0x74, - 0x6f, 0x50, 0x01, 0x5a, 0x30, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, - 0x75, 0x73, 0x65, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2f, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2f, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x65, 0x6e, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, 0x3b, - 0x61, 0x70, 0x69, 0x76, 0x31, 0xa2, 0x02, 0x03, 0x4d, 0x41, 0x58, 0xaa, 0x02, 0x0c, 0x4d, 0x65, - 0x6d, 0x6f, 0x73, 0x2e, 0x41, 0x70, 0x69, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x0c, 0x4d, 0x65, 0x6d, - 0x6f, 0x73, 0x5c, 0x41, 0x70, 0x69, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x18, 0x4d, 0x65, 0x6d, 0x6f, - 0x73, 0x5c, 0x41, 0x70, 0x69, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, - 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x0e, 0x4d, 0x65, 0x6d, 0x6f, 0x73, 0x3a, 0x3a, 0x41, 0x70, - 0x69, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x6f, 0x6e, 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, 0x35, 0xda, 0x41, 0x0b, 0x72, 0x65, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69, + 0x64, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x21, 0x2a, 0x1f, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, + 0x2f, 0x72, 0x65, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x7b, 0x72, 0x65, 0x61, 0x63, + 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x7d, 0x42, 0xa8, 0x01, 0x0a, 0x10, 0x63, 0x6f, 0x6d, + 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x42, 0x10, 0x4d, + 0x65, 0x6d, 0x6f, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, + 0x01, 0x5a, 0x30, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x75, 0x73, + 0x65, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2f, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2f, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x2f, 0x67, 0x65, 0x6e, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, 0x3b, 0x61, 0x70, + 0x69, 0x76, 0x31, 0xa2, 0x02, 0x03, 0x4d, 0x41, 0x58, 0xaa, 0x02, 0x0c, 0x4d, 0x65, 0x6d, 0x6f, + 0x73, 0x2e, 0x41, 0x70, 0x69, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x0c, 0x4d, 0x65, 0x6d, 0x6f, 0x73, + 0x5c, 0x41, 0x70, 0x69, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x18, 0x4d, 0x65, 0x6d, 0x6f, 0x73, 0x5c, + 0x41, 0x70, 0x69, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, + 0x74, 0x61, 0xea, 0x02, 0x0e, 0x4d, 0x65, 0x6d, 0x6f, 0x73, 0x3a, 0x3a, 0x41, 0x70, 0x69, 0x3a, + 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -1925,74 +1938,76 @@ var file_api_v1_memo_service_proto_goTypes = []interface{}{ nil, // 27: memos.api.v1.GetUserMemosStatsResponse.StatsEntry (RowStatus)(0), // 28: memos.api.v1.RowStatus (*timestamppb.Timestamp)(nil), // 29: google.protobuf.Timestamp - (*Resource)(nil), // 30: memos.api.v1.Resource - (*MemoRelation)(nil), // 31: memos.api.v1.MemoRelation - (*Reaction)(nil), // 32: memos.api.v1.Reaction - (*fieldmaskpb.FieldMask)(nil), // 33: google.protobuf.FieldMask - (*emptypb.Empty)(nil), // 34: google.protobuf.Empty + (*Node)(nil), // 30: memos.api.v1.Node + (*Resource)(nil), // 31: memos.api.v1.Resource + (*MemoRelation)(nil), // 32: memos.api.v1.MemoRelation + (*Reaction)(nil), // 33: memos.api.v1.Reaction + (*fieldmaskpb.FieldMask)(nil), // 34: google.protobuf.FieldMask + (*emptypb.Empty)(nil), // 35: google.protobuf.Empty } var file_api_v1_memo_service_proto_depIdxs = []int32{ 28, // 0: memos.api.v1.Memo.row_status:type_name -> memos.api.v1.RowStatus 29, // 1: memos.api.v1.Memo.create_time:type_name -> google.protobuf.Timestamp 29, // 2: memos.api.v1.Memo.update_time:type_name -> google.protobuf.Timestamp 29, // 3: memos.api.v1.Memo.display_time:type_name -> google.protobuf.Timestamp - 0, // 4: memos.api.v1.Memo.visibility:type_name -> memos.api.v1.Visibility - 30, // 5: memos.api.v1.Memo.resources:type_name -> memos.api.v1.Resource - 31, // 6: memos.api.v1.Memo.relations:type_name -> memos.api.v1.MemoRelation - 32, // 7: memos.api.v1.Memo.reactions:type_name -> memos.api.v1.Reaction - 0, // 8: memos.api.v1.CreateMemoRequest.visibility:type_name -> memos.api.v1.Visibility - 1, // 9: memos.api.v1.ListMemosResponse.memos:type_name -> memos.api.v1.Memo - 1, // 10: memos.api.v1.SearchMemosResponse.memos:type_name -> memos.api.v1.Memo - 1, // 11: memos.api.v1.UpdateMemoRequest.memo:type_name -> memos.api.v1.Memo - 33, // 12: memos.api.v1.UpdateMemoRequest.update_mask:type_name -> google.protobuf.FieldMask - 30, // 13: memos.api.v1.SetMemoResourcesRequest.resources:type_name -> memos.api.v1.Resource - 30, // 14: memos.api.v1.ListMemoResourcesResponse.resources:type_name -> memos.api.v1.Resource - 31, // 15: memos.api.v1.SetMemoRelationsRequest.relations:type_name -> memos.api.v1.MemoRelation - 31, // 16: memos.api.v1.ListMemoRelationsResponse.relations:type_name -> memos.api.v1.MemoRelation - 2, // 17: memos.api.v1.CreateMemoCommentRequest.comment:type_name -> memos.api.v1.CreateMemoRequest - 1, // 18: memos.api.v1.ListMemoCommentsResponse.memos:type_name -> memos.api.v1.Memo - 27, // 19: memos.api.v1.GetUserMemosStatsResponse.stats:type_name -> memos.api.v1.GetUserMemosStatsResponse.StatsEntry - 32, // 20: memos.api.v1.ListMemoReactionsResponse.reactions:type_name -> memos.api.v1.Reaction - 32, // 21: memos.api.v1.UpsertMemoReactionRequest.reaction:type_name -> memos.api.v1.Reaction - 2, // 22: memos.api.v1.MemoService.CreateMemo:input_type -> memos.api.v1.CreateMemoRequest - 3, // 23: memos.api.v1.MemoService.ListMemos:input_type -> memos.api.v1.ListMemosRequest - 5, // 24: memos.api.v1.MemoService.SearchMemos:input_type -> memos.api.v1.SearchMemosRequest - 7, // 25: memos.api.v1.MemoService.GetMemo:input_type -> memos.api.v1.GetMemoRequest - 8, // 26: memos.api.v1.MemoService.UpdateMemo:input_type -> memos.api.v1.UpdateMemoRequest - 9, // 27: memos.api.v1.MemoService.DeleteMemo:input_type -> memos.api.v1.DeleteMemoRequest - 10, // 28: memos.api.v1.MemoService.ExportMemos:input_type -> memos.api.v1.ExportMemosRequest - 12, // 29: memos.api.v1.MemoService.SetMemoResources:input_type -> memos.api.v1.SetMemoResourcesRequest - 13, // 30: memos.api.v1.MemoService.ListMemoResources:input_type -> memos.api.v1.ListMemoResourcesRequest - 15, // 31: memos.api.v1.MemoService.SetMemoRelations:input_type -> memos.api.v1.SetMemoRelationsRequest - 16, // 32: memos.api.v1.MemoService.ListMemoRelations:input_type -> memos.api.v1.ListMemoRelationsRequest - 18, // 33: memos.api.v1.MemoService.CreateMemoComment:input_type -> memos.api.v1.CreateMemoCommentRequest - 19, // 34: memos.api.v1.MemoService.ListMemoComments:input_type -> memos.api.v1.ListMemoCommentsRequest - 21, // 35: memos.api.v1.MemoService.GetUserMemosStats:input_type -> memos.api.v1.GetUserMemosStatsRequest - 23, // 36: memos.api.v1.MemoService.ListMemoReactions:input_type -> memos.api.v1.ListMemoReactionsRequest - 25, // 37: memos.api.v1.MemoService.UpsertMemoReaction:input_type -> memos.api.v1.UpsertMemoReactionRequest - 26, // 38: memos.api.v1.MemoService.DeleteMemoReaction:input_type -> memos.api.v1.DeleteMemoReactionRequest - 1, // 39: memos.api.v1.MemoService.CreateMemo:output_type -> memos.api.v1.Memo - 4, // 40: memos.api.v1.MemoService.ListMemos:output_type -> memos.api.v1.ListMemosResponse - 6, // 41: memos.api.v1.MemoService.SearchMemos:output_type -> memos.api.v1.SearchMemosResponse - 1, // 42: memos.api.v1.MemoService.GetMemo:output_type -> memos.api.v1.Memo - 1, // 43: memos.api.v1.MemoService.UpdateMemo:output_type -> memos.api.v1.Memo - 34, // 44: memos.api.v1.MemoService.DeleteMemo:output_type -> google.protobuf.Empty - 11, // 45: memos.api.v1.MemoService.ExportMemos:output_type -> memos.api.v1.ExportMemosResponse - 34, // 46: memos.api.v1.MemoService.SetMemoResources:output_type -> google.protobuf.Empty - 14, // 47: memos.api.v1.MemoService.ListMemoResources:output_type -> memos.api.v1.ListMemoResourcesResponse - 34, // 48: memos.api.v1.MemoService.SetMemoRelations:output_type -> google.protobuf.Empty - 17, // 49: memos.api.v1.MemoService.ListMemoRelations:output_type -> memos.api.v1.ListMemoRelationsResponse - 1, // 50: memos.api.v1.MemoService.CreateMemoComment:output_type -> memos.api.v1.Memo - 20, // 51: memos.api.v1.MemoService.ListMemoComments:output_type -> memos.api.v1.ListMemoCommentsResponse - 22, // 52: memos.api.v1.MemoService.GetUserMemosStats:output_type -> memos.api.v1.GetUserMemosStatsResponse - 24, // 53: memos.api.v1.MemoService.ListMemoReactions:output_type -> memos.api.v1.ListMemoReactionsResponse - 32, // 54: memos.api.v1.MemoService.UpsertMemoReaction:output_type -> memos.api.v1.Reaction - 34, // 55: memos.api.v1.MemoService.DeleteMemoReaction:output_type -> google.protobuf.Empty - 39, // [39:56] is the sub-list for method output_type - 22, // [22:39] is the sub-list for method input_type - 22, // [22:22] is the sub-list for extension type_name - 22, // [22:22] is the sub-list for extension extendee - 0, // [0:22] is the sub-list for field type_name + 30, // 4: memos.api.v1.Memo.nodes:type_name -> memos.api.v1.Node + 0, // 5: memos.api.v1.Memo.visibility:type_name -> memos.api.v1.Visibility + 31, // 6: memos.api.v1.Memo.resources:type_name -> memos.api.v1.Resource + 32, // 7: memos.api.v1.Memo.relations:type_name -> memos.api.v1.MemoRelation + 33, // 8: memos.api.v1.Memo.reactions:type_name -> memos.api.v1.Reaction + 0, // 9: memos.api.v1.CreateMemoRequest.visibility:type_name -> memos.api.v1.Visibility + 1, // 10: memos.api.v1.ListMemosResponse.memos:type_name -> memos.api.v1.Memo + 1, // 11: memos.api.v1.SearchMemosResponse.memos:type_name -> memos.api.v1.Memo + 1, // 12: memos.api.v1.UpdateMemoRequest.memo:type_name -> memos.api.v1.Memo + 34, // 13: memos.api.v1.UpdateMemoRequest.update_mask:type_name -> google.protobuf.FieldMask + 31, // 14: memos.api.v1.SetMemoResourcesRequest.resources:type_name -> memos.api.v1.Resource + 31, // 15: memos.api.v1.ListMemoResourcesResponse.resources:type_name -> memos.api.v1.Resource + 32, // 16: memos.api.v1.SetMemoRelationsRequest.relations:type_name -> memos.api.v1.MemoRelation + 32, // 17: memos.api.v1.ListMemoRelationsResponse.relations:type_name -> memos.api.v1.MemoRelation + 2, // 18: memos.api.v1.CreateMemoCommentRequest.comment:type_name -> memos.api.v1.CreateMemoRequest + 1, // 19: memos.api.v1.ListMemoCommentsResponse.memos:type_name -> memos.api.v1.Memo + 27, // 20: memos.api.v1.GetUserMemosStatsResponse.stats:type_name -> memos.api.v1.GetUserMemosStatsResponse.StatsEntry + 33, // 21: memos.api.v1.ListMemoReactionsResponse.reactions:type_name -> memos.api.v1.Reaction + 33, // 22: memos.api.v1.UpsertMemoReactionRequest.reaction:type_name -> memos.api.v1.Reaction + 2, // 23: memos.api.v1.MemoService.CreateMemo:input_type -> memos.api.v1.CreateMemoRequest + 3, // 24: memos.api.v1.MemoService.ListMemos:input_type -> memos.api.v1.ListMemosRequest + 5, // 25: memos.api.v1.MemoService.SearchMemos:input_type -> memos.api.v1.SearchMemosRequest + 7, // 26: memos.api.v1.MemoService.GetMemo:input_type -> memos.api.v1.GetMemoRequest + 8, // 27: memos.api.v1.MemoService.UpdateMemo:input_type -> memos.api.v1.UpdateMemoRequest + 9, // 28: memos.api.v1.MemoService.DeleteMemo:input_type -> memos.api.v1.DeleteMemoRequest + 10, // 29: memos.api.v1.MemoService.ExportMemos:input_type -> memos.api.v1.ExportMemosRequest + 12, // 30: memos.api.v1.MemoService.SetMemoResources:input_type -> memos.api.v1.SetMemoResourcesRequest + 13, // 31: memos.api.v1.MemoService.ListMemoResources:input_type -> memos.api.v1.ListMemoResourcesRequest + 15, // 32: memos.api.v1.MemoService.SetMemoRelations:input_type -> memos.api.v1.SetMemoRelationsRequest + 16, // 33: memos.api.v1.MemoService.ListMemoRelations:input_type -> memos.api.v1.ListMemoRelationsRequest + 18, // 34: memos.api.v1.MemoService.CreateMemoComment:input_type -> memos.api.v1.CreateMemoCommentRequest + 19, // 35: memos.api.v1.MemoService.ListMemoComments:input_type -> memos.api.v1.ListMemoCommentsRequest + 21, // 36: memos.api.v1.MemoService.GetUserMemosStats:input_type -> memos.api.v1.GetUserMemosStatsRequest + 23, // 37: memos.api.v1.MemoService.ListMemoReactions:input_type -> memos.api.v1.ListMemoReactionsRequest + 25, // 38: memos.api.v1.MemoService.UpsertMemoReaction:input_type -> memos.api.v1.UpsertMemoReactionRequest + 26, // 39: memos.api.v1.MemoService.DeleteMemoReaction:input_type -> memos.api.v1.DeleteMemoReactionRequest + 1, // 40: memos.api.v1.MemoService.CreateMemo:output_type -> memos.api.v1.Memo + 4, // 41: memos.api.v1.MemoService.ListMemos:output_type -> memos.api.v1.ListMemosResponse + 6, // 42: memos.api.v1.MemoService.SearchMemos:output_type -> memos.api.v1.SearchMemosResponse + 1, // 43: memos.api.v1.MemoService.GetMemo:output_type -> memos.api.v1.Memo + 1, // 44: memos.api.v1.MemoService.UpdateMemo:output_type -> memos.api.v1.Memo + 35, // 45: memos.api.v1.MemoService.DeleteMemo:output_type -> google.protobuf.Empty + 11, // 46: memos.api.v1.MemoService.ExportMemos:output_type -> memos.api.v1.ExportMemosResponse + 35, // 47: memos.api.v1.MemoService.SetMemoResources:output_type -> google.protobuf.Empty + 14, // 48: memos.api.v1.MemoService.ListMemoResources:output_type -> memos.api.v1.ListMemoResourcesResponse + 35, // 49: memos.api.v1.MemoService.SetMemoRelations:output_type -> google.protobuf.Empty + 17, // 50: memos.api.v1.MemoService.ListMemoRelations:output_type -> memos.api.v1.ListMemoRelationsResponse + 1, // 51: memos.api.v1.MemoService.CreateMemoComment:output_type -> memos.api.v1.Memo + 20, // 52: memos.api.v1.MemoService.ListMemoComments:output_type -> memos.api.v1.ListMemoCommentsResponse + 22, // 53: memos.api.v1.MemoService.GetUserMemosStats:output_type -> memos.api.v1.GetUserMemosStatsResponse + 24, // 54: memos.api.v1.MemoService.ListMemoReactions:output_type -> memos.api.v1.ListMemoReactionsResponse + 33, // 55: memos.api.v1.MemoService.UpsertMemoReaction:output_type -> memos.api.v1.Reaction + 35, // 56: memos.api.v1.MemoService.DeleteMemoReaction:output_type -> google.protobuf.Empty + 40, // [40:57] is the sub-list for method output_type + 23, // [23:40] is the sub-list for method input_type + 23, // [23:23] is the sub-list for extension type_name + 23, // [23:23] is the sub-list for extension extendee + 0, // [0:23] is the sub-list for field type_name } func init() { file_api_v1_memo_service_proto_init() } @@ -2001,6 +2016,7 @@ func file_api_v1_memo_service_proto_init() { return } file_api_v1_common_proto_init() + file_api_v1_markdown_service_proto_init() file_api_v1_memo_relation_service_proto_init() file_api_v1_reaction_service_proto_init() file_api_v1_resource_service_proto_init() diff --git a/proto/gen/store/workspace_setting.pb.go b/proto/gen/store/workspace_setting.pb.go index 17e22d15..a8a296cf 100644 --- a/proto/gen/store/workspace_setting.pb.go +++ b/proto/gen/store/workspace_setting.pb.go @@ -256,8 +256,7 @@ type WorkspaceBasicSetting struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - ServerId string `protobuf:"bytes,1,opt,name=server_id,json=serverId,proto3" json:"server_id,omitempty"` - SecretKey string `protobuf:"bytes,2,opt,name=secret_key,json=secretKey,proto3" json:"secret_key,omitempty"` + SecretKey string `protobuf:"bytes,1,opt,name=secret_key,json=secretKey,proto3" json:"secret_key,omitempty"` } func (x *WorkspaceBasicSetting) Reset() { @@ -292,13 +291,6 @@ func (*WorkspaceBasicSetting) Descriptor() ([]byte, []int) { return file_store_workspace_setting_proto_rawDescGZIP(), []int{1} } -func (x *WorkspaceBasicSetting) GetServerId() string { - if x != nil { - return x.ServerId - } - return "" -} - func (x *WorkspaceBasicSetting) GetSecretKey() string { if x != nil { return x.SecretKey @@ -722,110 +714,108 @@ var file_store_workspace_setting_proto_rawDesc = []byte{ 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x4d, 0x65, 0x6d, 0x6f, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x65, 0x64, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x48, 0x00, 0x52, 0x12, 0x6d, 0x65, 0x6d, 0x6f, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x65, 0x64, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, - 0x42, 0x07, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0x53, 0x0a, 0x15, 0x57, 0x6f, 0x72, + 0x42, 0x07, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0x36, 0x0a, 0x15, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x42, 0x61, 0x73, 0x69, 0x63, 0x53, 0x65, 0x74, 0x74, 0x69, - 0x6e, 0x67, 0x12, 0x1b, 0x0a, 0x09, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x49, 0x64, 0x12, - 0x1d, 0x0a, 0x0a, 0x73, 0x65, 0x63, 0x72, 0x65, 0x74, 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x09, 0x73, 0x65, 0x63, 0x72, 0x65, 0x74, 0x4b, 0x65, 0x79, 0x22, 0xc1, - 0x02, 0x0a, 0x17, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x47, 0x65, 0x6e, 0x65, - 0x72, 0x61, 0x6c, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x12, 0x21, 0x0a, 0x0c, 0x69, 0x6e, - 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x5f, 0x75, 0x72, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x0b, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x55, 0x72, 0x6c, 0x12, 0x27, 0x0a, - 0x0f, 0x64, 0x69, 0x73, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x5f, 0x73, 0x69, 0x67, 0x6e, 0x75, 0x70, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0e, 0x64, 0x69, 0x73, 0x61, 0x6c, 0x6c, 0x6f, 0x77, - 0x53, 0x69, 0x67, 0x6e, 0x75, 0x70, 0x12, 0x36, 0x0a, 0x17, 0x64, 0x69, 0x73, 0x61, 0x6c, 0x6c, - 0x6f, 0x77, 0x5f, 0x70, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x5f, 0x6c, 0x6f, 0x67, 0x69, - 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x15, 0x64, 0x69, 0x73, 0x61, 0x6c, 0x6c, 0x6f, - 0x77, 0x50, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x4c, 0x6f, 0x67, 0x69, 0x6e, 0x12, 0x2b, - 0x0a, 0x11, 0x61, 0x64, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x5f, 0x73, 0x63, 0x72, - 0x69, 0x70, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x10, 0x61, 0x64, 0x64, 0x69, 0x74, - 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x53, 0x63, 0x72, 0x69, 0x70, 0x74, 0x12, 0x29, 0x0a, 0x10, 0x61, - 0x64, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x5f, 0x73, 0x74, 0x79, 0x6c, 0x65, 0x18, - 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0f, 0x61, 0x64, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x61, - 0x6c, 0x53, 0x74, 0x79, 0x6c, 0x65, 0x12, 0x4a, 0x0a, 0x0e, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, - 0x5f, 0x70, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x23, - 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x2e, 0x57, 0x6f, 0x72, - 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x43, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x50, 0x72, 0x6f, 0x66, - 0x69, 0x6c, 0x65, 0x52, 0x0d, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x50, 0x72, 0x6f, 0x66, 0x69, - 0x6c, 0x65, 0x22, 0xa3, 0x01, 0x0a, 0x16, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, - 0x43, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x12, 0x14, 0x0a, - 0x05, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x74, 0x69, - 0x74, 0x6c, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, - 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, - 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x19, 0x0a, 0x08, 0x6c, 0x6f, 0x67, 0x6f, 0x5f, 0x75, 0x72, - 0x6c, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6c, 0x6f, 0x67, 0x6f, 0x55, 0x72, 0x6c, - 0x12, 0x16, 0x0a, 0x06, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x06, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x65, 0x12, 0x1e, 0x0a, 0x0a, 0x61, 0x70, 0x70, 0x65, - 0x61, 0x72, 0x61, 0x6e, 0x63, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x61, 0x70, - 0x70, 0x65, 0x61, 0x72, 0x61, 0x6e, 0x63, 0x65, 0x22, 0xb6, 0x04, 0x0a, 0x17, 0x57, 0x6f, 0x72, - 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x53, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x53, 0x65, 0x74, - 0x74, 0x69, 0x6e, 0x67, 0x12, 0x53, 0x0a, 0x0c, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x5f, - 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x30, 0x2e, 0x6d, 0x65, 0x6d, - 0x6f, 0x73, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x2e, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, - 0x63, 0x65, 0x53, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, - 0x2e, 0x53, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x54, 0x79, 0x70, 0x65, 0x52, 0x0b, 0x73, 0x74, - 0x6f, 0x72, 0x61, 0x67, 0x65, 0x54, 0x79, 0x70, 0x65, 0x12, 0x2b, 0x0a, 0x11, 0x66, 0x69, 0x6c, - 0x65, 0x70, 0x61, 0x74, 0x68, 0x5f, 0x74, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x10, 0x66, 0x69, 0x6c, 0x65, 0x70, 0x61, 0x74, 0x68, 0x54, 0x65, - 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x12, 0x2f, 0x0a, 0x14, 0x75, 0x70, 0x6c, 0x6f, 0x61, 0x64, - 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x5f, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x5f, 0x6d, 0x62, 0x18, 0x03, - 0x20, 0x01, 0x28, 0x03, 0x52, 0x11, 0x75, 0x70, 0x6c, 0x6f, 0x61, 0x64, 0x53, 0x69, 0x7a, 0x65, - 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x4d, 0x62, 0x12, 0x4a, 0x0a, 0x09, 0x73, 0x33, 0x5f, 0x63, 0x6f, - 0x6e, 0x66, 0x69, 0x67, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2d, 0x2e, 0x6d, 0x65, 0x6d, - 0x6f, 0x73, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x2e, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, - 0x63, 0x65, 0x53, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, - 0x2e, 0x53, 0x33, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x08, 0x73, 0x33, 0x43, 0x6f, 0x6e, - 0x66, 0x69, 0x67, 0x1a, 0xa6, 0x01, 0x0a, 0x08, 0x53, 0x33, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, - 0x12, 0x22, 0x0a, 0x0d, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x5f, 0x6b, 0x65, 0x79, 0x5f, 0x69, - 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x4b, - 0x65, 0x79, 0x49, 0x64, 0x12, 0x2a, 0x0a, 0x11, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x5f, 0x6b, - 0x65, 0x79, 0x5f, 0x73, 0x65, 0x63, 0x72, 0x65, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x0f, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x4b, 0x65, 0x79, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, - 0x12, 0x1a, 0x0a, 0x08, 0x65, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x08, 0x65, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x12, 0x16, 0x0a, 0x06, - 0x72, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x72, 0x65, - 0x67, 0x69, 0x6f, 0x6e, 0x12, 0x16, 0x0a, 0x06, 0x62, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x18, 0x05, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x62, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x22, 0x73, 0x0a, 0x0b, - 0x53, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x54, 0x79, 0x70, 0x65, 0x12, 0x1c, 0x0a, 0x18, 0x53, - 0x54, 0x4f, 0x52, 0x41, 0x47, 0x45, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x55, 0x4e, 0x53, 0x50, - 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x19, 0x0a, 0x15, 0x53, 0x54, 0x4f, - 0x52, 0x41, 0x47, 0x45, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x44, 0x41, 0x54, 0x41, 0x42, 0x41, - 0x53, 0x45, 0x10, 0x01, 0x12, 0x16, 0x0a, 0x12, 0x53, 0x54, 0x4f, 0x52, 0x41, 0x47, 0x45, 0x5f, - 0x54, 0x59, 0x50, 0x45, 0x5f, 0x4c, 0x4f, 0x43, 0x41, 0x4c, 0x10, 0x02, 0x12, 0x13, 0x0a, 0x0f, - 0x53, 0x54, 0x4f, 0x52, 0x41, 0x47, 0x45, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x53, 0x33, 0x10, - 0x03, 0x22, 0x8e, 0x01, 0x0a, 0x1b, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x4d, - 0x65, 0x6d, 0x6f, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x65, 0x64, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, - 0x67, 0x12, 0x36, 0x0a, 0x17, 0x64, 0x69, 0x73, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x5f, 0x70, 0x75, - 0x62, 0x6c, 0x69, 0x63, 0x5f, 0x76, 0x69, 0x73, 0x69, 0x62, 0x6c, 0x65, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x08, 0x52, 0x15, 0x64, 0x69, 0x73, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x50, 0x75, 0x62, 0x6c, - 0x69, 0x63, 0x56, 0x69, 0x73, 0x69, 0x62, 0x6c, 0x65, 0x12, 0x37, 0x0a, 0x18, 0x64, 0x69, 0x73, - 0x70, 0x6c, 0x61, 0x79, 0x5f, 0x77, 0x69, 0x74, 0x68, 0x5f, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, - 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x15, 0x64, 0x69, 0x73, - 0x70, 0x6c, 0x61, 0x79, 0x57, 0x69, 0x74, 0x68, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x54, 0x69, - 0x6d, 0x65, 0x2a, 0xbb, 0x01, 0x0a, 0x13, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, - 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x4b, 0x65, 0x79, 0x12, 0x25, 0x0a, 0x21, 0x57, 0x4f, - 0x52, 0x4b, 0x53, 0x50, 0x41, 0x43, 0x45, 0x5f, 0x53, 0x45, 0x54, 0x54, 0x49, 0x4e, 0x47, 0x5f, - 0x4b, 0x45, 0x59, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, - 0x00, 0x12, 0x1b, 0x0a, 0x17, 0x57, 0x4f, 0x52, 0x4b, 0x53, 0x50, 0x41, 0x43, 0x45, 0x5f, 0x53, - 0x45, 0x54, 0x54, 0x49, 0x4e, 0x47, 0x5f, 0x42, 0x41, 0x53, 0x49, 0x43, 0x10, 0x01, 0x12, 0x1d, - 0x0a, 0x19, 0x57, 0x4f, 0x52, 0x4b, 0x53, 0x50, 0x41, 0x43, 0x45, 0x5f, 0x53, 0x45, 0x54, 0x54, - 0x49, 0x4e, 0x47, 0x5f, 0x47, 0x45, 0x4e, 0x45, 0x52, 0x41, 0x4c, 0x10, 0x02, 0x12, 0x1d, 0x0a, - 0x19, 0x57, 0x4f, 0x52, 0x4b, 0x53, 0x50, 0x41, 0x43, 0x45, 0x5f, 0x53, 0x45, 0x54, 0x54, 0x49, - 0x4e, 0x47, 0x5f, 0x53, 0x54, 0x4f, 0x52, 0x41, 0x47, 0x45, 0x10, 0x03, 0x12, 0x22, 0x0a, 0x1e, - 0x57, 0x4f, 0x52, 0x4b, 0x53, 0x50, 0x41, 0x43, 0x45, 0x5f, 0x53, 0x45, 0x54, 0x54, 0x49, 0x4e, - 0x47, 0x5f, 0x4d, 0x45, 0x4d, 0x4f, 0x5f, 0x52, 0x45, 0x4c, 0x41, 0x54, 0x45, 0x44, 0x10, 0x04, - 0x42, 0xa0, 0x01, 0x0a, 0x0f, 0x63, 0x6f, 0x6d, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x73, - 0x74, 0x6f, 0x72, 0x65, 0x42, 0x15, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x53, - 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x29, 0x67, - 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x75, 0x73, 0x65, 0x6d, 0x65, 0x6d, - 0x6f, 0x73, 0x2f, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, - 0x65, 0x6e, 0x2f, 0x73, 0x74, 0x6f, 0x72, 0x65, 0xa2, 0x02, 0x03, 0x4d, 0x53, 0x58, 0xaa, 0x02, - 0x0b, 0x4d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x53, 0x74, 0x6f, 0x72, 0x65, 0xca, 0x02, 0x0b, 0x4d, - 0x65, 0x6d, 0x6f, 0x73, 0x5c, 0x53, 0x74, 0x6f, 0x72, 0x65, 0xe2, 0x02, 0x17, 0x4d, 0x65, 0x6d, - 0x6f, 0x73, 0x5c, 0x53, 0x74, 0x6f, 0x72, 0x65, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, - 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x0c, 0x4d, 0x65, 0x6d, 0x6f, 0x73, 0x3a, 0x3a, 0x53, 0x74, - 0x6f, 0x72, 0x65, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x6e, 0x67, 0x12, 0x1d, 0x0a, 0x0a, 0x73, 0x65, 0x63, 0x72, 0x65, 0x74, 0x5f, 0x6b, 0x65, 0x79, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x73, 0x65, 0x63, 0x72, 0x65, 0x74, 0x4b, 0x65, + 0x79, 0x22, 0xc1, 0x02, 0x0a, 0x17, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x47, + 0x65, 0x6e, 0x65, 0x72, 0x61, 0x6c, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x12, 0x21, 0x0a, + 0x0c, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x5f, 0x75, 0x72, 0x6c, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x0b, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x55, 0x72, 0x6c, + 0x12, 0x27, 0x0a, 0x0f, 0x64, 0x69, 0x73, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x5f, 0x73, 0x69, 0x67, + 0x6e, 0x75, 0x70, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0e, 0x64, 0x69, 0x73, 0x61, 0x6c, + 0x6c, 0x6f, 0x77, 0x53, 0x69, 0x67, 0x6e, 0x75, 0x70, 0x12, 0x36, 0x0a, 0x17, 0x64, 0x69, 0x73, + 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x5f, 0x70, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x5f, 0x6c, + 0x6f, 0x67, 0x69, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x15, 0x64, 0x69, 0x73, 0x61, + 0x6c, 0x6c, 0x6f, 0x77, 0x50, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x4c, 0x6f, 0x67, 0x69, + 0x6e, 0x12, 0x2b, 0x0a, 0x11, 0x61, 0x64, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x5f, + 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x10, 0x61, 0x64, + 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x53, 0x63, 0x72, 0x69, 0x70, 0x74, 0x12, 0x29, + 0x0a, 0x10, 0x61, 0x64, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x5f, 0x73, 0x74, 0x79, + 0x6c, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0f, 0x61, 0x64, 0x64, 0x69, 0x74, 0x69, + 0x6f, 0x6e, 0x61, 0x6c, 0x53, 0x74, 0x79, 0x6c, 0x65, 0x12, 0x4a, 0x0a, 0x0e, 0x63, 0x75, 0x73, + 0x74, 0x6f, 0x6d, 0x5f, 0x70, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x23, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x2e, + 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x43, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x50, + 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x52, 0x0d, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x50, 0x72, + 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x22, 0xa3, 0x01, 0x0a, 0x16, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, + 0x61, 0x63, 0x65, 0x43, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, + 0x12, 0x14, 0x0a, 0x05, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x05, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, + 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, 0x65, 0x73, + 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x19, 0x0a, 0x08, 0x6c, 0x6f, 0x67, 0x6f, + 0x5f, 0x75, 0x72, 0x6c, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6c, 0x6f, 0x67, 0x6f, + 0x55, 0x72, 0x6c, 0x12, 0x16, 0x0a, 0x06, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x65, 0x18, 0x04, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x06, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x65, 0x12, 0x1e, 0x0a, 0x0a, 0x61, + 0x70, 0x70, 0x65, 0x61, 0x72, 0x61, 0x6e, 0x63, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x0a, 0x61, 0x70, 0x70, 0x65, 0x61, 0x72, 0x61, 0x6e, 0x63, 0x65, 0x22, 0xb6, 0x04, 0x0a, 0x17, + 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x53, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, + 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x12, 0x53, 0x0a, 0x0c, 0x73, 0x74, 0x6f, 0x72, 0x61, + 0x67, 0x65, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x30, 0x2e, + 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x2e, 0x57, 0x6f, 0x72, 0x6b, + 0x73, 0x70, 0x61, 0x63, 0x65, 0x53, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x53, 0x65, 0x74, 0x74, + 0x69, 0x6e, 0x67, 0x2e, 0x53, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x54, 0x79, 0x70, 0x65, 0x52, + 0x0b, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x54, 0x79, 0x70, 0x65, 0x12, 0x2b, 0x0a, 0x11, + 0x66, 0x69, 0x6c, 0x65, 0x70, 0x61, 0x74, 0x68, 0x5f, 0x74, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, + 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x10, 0x66, 0x69, 0x6c, 0x65, 0x70, 0x61, 0x74, + 0x68, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x12, 0x2f, 0x0a, 0x14, 0x75, 0x70, 0x6c, + 0x6f, 0x61, 0x64, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x5f, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x5f, 0x6d, + 0x62, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x11, 0x75, 0x70, 0x6c, 0x6f, 0x61, 0x64, 0x53, + 0x69, 0x7a, 0x65, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x4d, 0x62, 0x12, 0x4a, 0x0a, 0x09, 0x73, 0x33, + 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2d, 0x2e, + 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x2e, 0x57, 0x6f, 0x72, 0x6b, + 0x73, 0x70, 0x61, 0x63, 0x65, 0x53, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x53, 0x65, 0x74, 0x74, + 0x69, 0x6e, 0x67, 0x2e, 0x53, 0x33, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x08, 0x73, 0x33, + 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x1a, 0xa6, 0x01, 0x0a, 0x08, 0x53, 0x33, 0x43, 0x6f, 0x6e, + 0x66, 0x69, 0x67, 0x12, 0x22, 0x0a, 0x0d, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x5f, 0x6b, 0x65, + 0x79, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x61, 0x63, 0x63, 0x65, + 0x73, 0x73, 0x4b, 0x65, 0x79, 0x49, 0x64, 0x12, 0x2a, 0x0a, 0x11, 0x61, 0x63, 0x63, 0x65, 0x73, + 0x73, 0x5f, 0x6b, 0x65, 0x79, 0x5f, 0x73, 0x65, 0x63, 0x72, 0x65, 0x74, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x0f, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x4b, 0x65, 0x79, 0x53, 0x65, 0x63, + 0x72, 0x65, 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x65, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x18, + 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x65, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x12, + 0x16, 0x0a, 0x06, 0x72, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x06, 0x72, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x12, 0x16, 0x0a, 0x06, 0x62, 0x75, 0x63, 0x6b, 0x65, + 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x62, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x22, + 0x73, 0x0a, 0x0b, 0x53, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x54, 0x79, 0x70, 0x65, 0x12, 0x1c, + 0x0a, 0x18, 0x53, 0x54, 0x4f, 0x52, 0x41, 0x47, 0x45, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x55, + 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x19, 0x0a, 0x15, + 0x53, 0x54, 0x4f, 0x52, 0x41, 0x47, 0x45, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x44, 0x41, 0x54, + 0x41, 0x42, 0x41, 0x53, 0x45, 0x10, 0x01, 0x12, 0x16, 0x0a, 0x12, 0x53, 0x54, 0x4f, 0x52, 0x41, + 0x47, 0x45, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x4c, 0x4f, 0x43, 0x41, 0x4c, 0x10, 0x02, 0x12, + 0x13, 0x0a, 0x0f, 0x53, 0x54, 0x4f, 0x52, 0x41, 0x47, 0x45, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, + 0x53, 0x33, 0x10, 0x03, 0x22, 0x8e, 0x01, 0x0a, 0x1b, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, + 0x63, 0x65, 0x4d, 0x65, 0x6d, 0x6f, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x65, 0x64, 0x53, 0x65, 0x74, + 0x74, 0x69, 0x6e, 0x67, 0x12, 0x36, 0x0a, 0x17, 0x64, 0x69, 0x73, 0x61, 0x6c, 0x6c, 0x6f, 0x77, + 0x5f, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x5f, 0x76, 0x69, 0x73, 0x69, 0x62, 0x6c, 0x65, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x15, 0x64, 0x69, 0x73, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x50, + 0x75, 0x62, 0x6c, 0x69, 0x63, 0x56, 0x69, 0x73, 0x69, 0x62, 0x6c, 0x65, 0x12, 0x37, 0x0a, 0x18, + 0x64, 0x69, 0x73, 0x70, 0x6c, 0x61, 0x79, 0x5f, 0x77, 0x69, 0x74, 0x68, 0x5f, 0x75, 0x70, 0x64, + 0x61, 0x74, 0x65, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x15, + 0x64, 0x69, 0x73, 0x70, 0x6c, 0x61, 0x79, 0x57, 0x69, 0x74, 0x68, 0x55, 0x70, 0x64, 0x61, 0x74, + 0x65, 0x54, 0x69, 0x6d, 0x65, 0x2a, 0xbb, 0x01, 0x0a, 0x13, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, + 0x61, 0x63, 0x65, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x4b, 0x65, 0x79, 0x12, 0x25, 0x0a, + 0x21, 0x57, 0x4f, 0x52, 0x4b, 0x53, 0x50, 0x41, 0x43, 0x45, 0x5f, 0x53, 0x45, 0x54, 0x54, 0x49, + 0x4e, 0x47, 0x5f, 0x4b, 0x45, 0x59, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, + 0x45, 0x44, 0x10, 0x00, 0x12, 0x1b, 0x0a, 0x17, 0x57, 0x4f, 0x52, 0x4b, 0x53, 0x50, 0x41, 0x43, + 0x45, 0x5f, 0x53, 0x45, 0x54, 0x54, 0x49, 0x4e, 0x47, 0x5f, 0x42, 0x41, 0x53, 0x49, 0x43, 0x10, + 0x01, 0x12, 0x1d, 0x0a, 0x19, 0x57, 0x4f, 0x52, 0x4b, 0x53, 0x50, 0x41, 0x43, 0x45, 0x5f, 0x53, + 0x45, 0x54, 0x54, 0x49, 0x4e, 0x47, 0x5f, 0x47, 0x45, 0x4e, 0x45, 0x52, 0x41, 0x4c, 0x10, 0x02, + 0x12, 0x1d, 0x0a, 0x19, 0x57, 0x4f, 0x52, 0x4b, 0x53, 0x50, 0x41, 0x43, 0x45, 0x5f, 0x53, 0x45, + 0x54, 0x54, 0x49, 0x4e, 0x47, 0x5f, 0x53, 0x54, 0x4f, 0x52, 0x41, 0x47, 0x45, 0x10, 0x03, 0x12, + 0x22, 0x0a, 0x1e, 0x57, 0x4f, 0x52, 0x4b, 0x53, 0x50, 0x41, 0x43, 0x45, 0x5f, 0x53, 0x45, 0x54, + 0x54, 0x49, 0x4e, 0x47, 0x5f, 0x4d, 0x45, 0x4d, 0x4f, 0x5f, 0x52, 0x45, 0x4c, 0x41, 0x54, 0x45, + 0x44, 0x10, 0x04, 0x42, 0xa0, 0x01, 0x0a, 0x0f, 0x63, 0x6f, 0x6d, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, + 0x73, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x42, 0x15, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, + 0x63, 0x65, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, + 0x5a, 0x29, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x75, 0x73, 0x65, + 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2f, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2f, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x2f, 0x67, 0x65, 0x6e, 0x2f, 0x73, 0x74, 0x6f, 0x72, 0x65, 0xa2, 0x02, 0x03, 0x4d, 0x53, + 0x58, 0xaa, 0x02, 0x0b, 0x4d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x53, 0x74, 0x6f, 0x72, 0x65, 0xca, + 0x02, 0x0b, 0x4d, 0x65, 0x6d, 0x6f, 0x73, 0x5c, 0x53, 0x74, 0x6f, 0x72, 0x65, 0xe2, 0x02, 0x17, + 0x4d, 0x65, 0x6d, 0x6f, 0x73, 0x5c, 0x53, 0x74, 0x6f, 0x72, 0x65, 0x5c, 0x47, 0x50, 0x42, 0x4d, + 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x0c, 0x4d, 0x65, 0x6d, 0x6f, 0x73, 0x3a, + 0x3a, 0x53, 0x74, 0x6f, 0x72, 0x65, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/proto/store/workspace_setting.proto b/proto/store/workspace_setting.proto index 9061a0e3..092f1f8c 100644 --- a/proto/store/workspace_setting.proto +++ b/proto/store/workspace_setting.proto @@ -27,8 +27,7 @@ message WorkspaceSetting { } message WorkspaceBasicSetting { - string server_id = 1; - string secret_key = 2; + string secret_key = 1; } message WorkspaceGeneralSetting { diff --git a/server/route/api/v1/link_service.go b/server/route/api/v1/link_service.go deleted file mode 100644 index 6f0448e8..00000000 --- a/server/route/api/v1/link_service.go +++ /dev/null @@ -1,23 +0,0 @@ -package v1 - -import ( - "context" - - getter "github.com/usememos/memos/plugin/http-getter" - v1pb "github.com/usememos/memos/proto/gen/api/v1" -) - -func (*APIV1Service) GetLinkMetadata(_ context.Context, request *v1pb.GetLinkMetadataRequest) (*v1pb.GetLinkMetadataResponse, error) { - htmlMeta, err := getter.GetHTMLMeta(request.Link) - if err != nil { - return nil, err - } - - return &v1pb.GetLinkMetadataResponse{ - LinkMetadata: &v1pb.LinkMetadata{ - Title: htmlMeta.Title, - Description: htmlMeta.Description, - Image: htmlMeta.Image, - }, - }, nil -} diff --git a/server/route/api/v1/markdown_service.go b/server/route/api/v1/markdown_service.go new file mode 100644 index 00000000..2b6bfc27 --- /dev/null +++ b/server/route/api/v1/markdown_service.go @@ -0,0 +1,235 @@ +package v1 + +import ( + "context" + + "github.com/pkg/errors" + "github.com/yourselfhosted/gomark/ast" + "github.com/yourselfhosted/gomark/parser" + "github.com/yourselfhosted/gomark/parser/tokenizer" + "github.com/yourselfhosted/gomark/restore" + + getter "github.com/usememos/memos/plugin/http-getter" + v1pb "github.com/usememos/memos/proto/gen/api/v1" +) + +func (*APIV1Service) ParseMarkdown(_ context.Context, request *v1pb.ParseMarkdownRequest) (*v1pb.ParseMarkdownResponse, error) { + rawNodes, err := parser.Parse(tokenizer.Tokenize(request.Markdown)) + if err != nil { + return nil, errors.Wrap(err, "failed to parse memo content") + } + + nodes := convertFromASTNodes(rawNodes) + return &v1pb.ParseMarkdownResponse{ + Nodes: nodes, + }, nil +} + +func (*APIV1Service) RestoreMarkdown(_ context.Context, request *v1pb.RestoreMarkdownRequest) (*v1pb.RestoreMarkdownResponse, error) { + markdown := restore.Restore(convertToASTNodes(request.Nodes)) + return &v1pb.RestoreMarkdownResponse{ + Markdown: markdown, + }, nil +} + +func (*APIV1Service) GetLinkMetadata(_ context.Context, request *v1pb.GetLinkMetadataRequest) (*v1pb.LinkMetadata, error) { + htmlMeta, err := getter.GetHTMLMeta(request.Link) + if err != nil { + return nil, err + } + + return &v1pb.LinkMetadata{ + Title: htmlMeta.Title, + Description: htmlMeta.Description, + Image: htmlMeta.Image, + }, nil +} + +func convertFromASTNode(rawNode ast.Node) *v1pb.Node { + node := &v1pb.Node{ + Type: v1pb.NodeType(v1pb.NodeType_value[string(rawNode.Type())]), + } + + switch n := rawNode.(type) { + case *ast.LineBreak: + node.Node = &v1pb.Node_LineBreakNode{} + case *ast.Paragraph: + children := convertFromASTNodes(n.Children) + node.Node = &v1pb.Node_ParagraphNode{ParagraphNode: &v1pb.ParagraphNode{Children: children}} + case *ast.CodeBlock: + node.Node = &v1pb.Node_CodeBlockNode{CodeBlockNode: &v1pb.CodeBlockNode{Language: n.Language, Content: n.Content}} + case *ast.Heading: + children := convertFromASTNodes(n.Children) + node.Node = &v1pb.Node_HeadingNode{HeadingNode: &v1pb.HeadingNode{Level: int32(n.Level), Children: children}} + case *ast.HorizontalRule: + node.Node = &v1pb.Node_HorizontalRuleNode{HorizontalRuleNode: &v1pb.HorizontalRuleNode{Symbol: n.Symbol}} + case *ast.Blockquote: + children := convertFromASTNodes(n.Children) + node.Node = &v1pb.Node_BlockquoteNode{BlockquoteNode: &v1pb.BlockquoteNode{Children: children}} + case *ast.OrderedList: + children := convertFromASTNodes(n.Children) + node.Node = &v1pb.Node_OrderedListNode{OrderedListNode: &v1pb.OrderedListNode{Number: n.Number, Indent: int32(n.Indent), Children: children}} + case *ast.UnorderedList: + children := convertFromASTNodes(n.Children) + node.Node = &v1pb.Node_UnorderedListNode{UnorderedListNode: &v1pb.UnorderedListNode{Symbol: n.Symbol, Indent: int32(n.Indent), Children: children}} + case *ast.TaskList: + children := convertFromASTNodes(n.Children) + node.Node = &v1pb.Node_TaskListNode{TaskListNode: &v1pb.TaskListNode{Symbol: n.Symbol, Indent: int32(n.Indent), Complete: n.Complete, Children: children}} + case *ast.MathBlock: + node.Node = &v1pb.Node_MathBlockNode{MathBlockNode: &v1pb.MathBlockNode{Content: n.Content}} + case *ast.Table: + node.Node = &v1pb.Node_TableNode{TableNode: convertTableFromASTNode(n)} + case *ast.EmbeddedContent: + node.Node = &v1pb.Node_EmbeddedContentNode{EmbeddedContentNode: &v1pb.EmbeddedContentNode{ResourceName: n.ResourceName, Params: n.Params}} + case *ast.Text: + node.Node = &v1pb.Node_TextNode{TextNode: &v1pb.TextNode{Content: n.Content}} + case *ast.Bold: + children := convertFromASTNodes(n.Children) + node.Node = &v1pb.Node_BoldNode{BoldNode: &v1pb.BoldNode{Symbol: n.Symbol, Children: children}} + case *ast.Italic: + node.Node = &v1pb.Node_ItalicNode{ItalicNode: &v1pb.ItalicNode{Symbol: n.Symbol, Content: n.Content}} + case *ast.BoldItalic: + node.Node = &v1pb.Node_BoldItalicNode{BoldItalicNode: &v1pb.BoldItalicNode{Symbol: n.Symbol, Content: n.Content}} + case *ast.Code: + node.Node = &v1pb.Node_CodeNode{CodeNode: &v1pb.CodeNode{Content: n.Content}} + case *ast.Image: + node.Node = &v1pb.Node_ImageNode{ImageNode: &v1pb.ImageNode{AltText: n.AltText, Url: n.URL}} + case *ast.Link: + node.Node = &v1pb.Node_LinkNode{LinkNode: &v1pb.LinkNode{Text: n.Text, Url: n.URL}} + case *ast.AutoLink: + node.Node = &v1pb.Node_AutoLinkNode{AutoLinkNode: &v1pb.AutoLinkNode{Url: n.URL, IsRawText: n.IsRawText}} + case *ast.Tag: + node.Node = &v1pb.Node_TagNode{TagNode: &v1pb.TagNode{Content: n.Content}} + case *ast.Strikethrough: + node.Node = &v1pb.Node_StrikethroughNode{StrikethroughNode: &v1pb.StrikethroughNode{Content: n.Content}} + case *ast.EscapingCharacter: + node.Node = &v1pb.Node_EscapingCharacterNode{EscapingCharacterNode: &v1pb.EscapingCharacterNode{Symbol: n.Symbol}} + case *ast.Math: + node.Node = &v1pb.Node_MathNode{MathNode: &v1pb.MathNode{Content: n.Content}} + case *ast.Highlight: + node.Node = &v1pb.Node_HighlightNode{HighlightNode: &v1pb.HighlightNode{Content: n.Content}} + case *ast.Subscript: + node.Node = &v1pb.Node_SubscriptNode{SubscriptNode: &v1pb.SubscriptNode{Content: n.Content}} + case *ast.Superscript: + node.Node = &v1pb.Node_SuperscriptNode{SuperscriptNode: &v1pb.SuperscriptNode{Content: n.Content}} + case *ast.ReferencedContent: + node.Node = &v1pb.Node_ReferencedContentNode{ReferencedContentNode: &v1pb.ReferencedContentNode{ResourceName: n.ResourceName, Params: n.Params}} + case *ast.Spoiler: + node.Node = &v1pb.Node_SpoilerNode{SpoilerNode: &v1pb.SpoilerNode{Content: n.Content}} + default: + node.Node = &v1pb.Node_TextNode{TextNode: &v1pb.TextNode{}} + } + return node +} + +func convertFromASTNodes(rawNodes []ast.Node) []*v1pb.Node { + nodes := []*v1pb.Node{} + for _, rawNode := range rawNodes { + node := convertFromASTNode(rawNode) + nodes = append(nodes, node) + } + return nodes +} + +func convertTableFromASTNode(node *ast.Table) *v1pb.TableNode { + table := &v1pb.TableNode{ + Header: node.Header, + Delimiter: node.Delimiter, + } + for _, row := range node.Rows { + table.Rows = append(table.Rows, &v1pb.TableNode_Row{Cells: row}) + } + return table +} + +func convertToASTNode(node *v1pb.Node) ast.Node { + switch n := node.Node.(type) { + case *v1pb.Node_LineBreakNode: + return &ast.LineBreak{} + case *v1pb.Node_ParagraphNode: + children := convertToASTNodes(n.ParagraphNode.Children) + return &ast.Paragraph{Children: children} + case *v1pb.Node_CodeBlockNode: + return &ast.CodeBlock{Language: n.CodeBlockNode.Language, Content: n.CodeBlockNode.Content} + case *v1pb.Node_HeadingNode: + children := convertToASTNodes(n.HeadingNode.Children) + return &ast.Heading{Level: int(n.HeadingNode.Level), Children: children} + case *v1pb.Node_HorizontalRuleNode: + return &ast.HorizontalRule{Symbol: n.HorizontalRuleNode.Symbol} + case *v1pb.Node_BlockquoteNode: + children := convertToASTNodes(n.BlockquoteNode.Children) + return &ast.Blockquote{Children: children} + case *v1pb.Node_OrderedListNode: + children := convertToASTNodes(n.OrderedListNode.Children) + return &ast.OrderedList{Number: n.OrderedListNode.Number, Indent: int(n.OrderedListNode.Indent), Children: children} + case *v1pb.Node_UnorderedListNode: + children := convertToASTNodes(n.UnorderedListNode.Children) + return &ast.UnorderedList{Symbol: n.UnorderedListNode.Symbol, Indent: int(n.UnorderedListNode.Indent), Children: children} + case *v1pb.Node_TaskListNode: + children := convertToASTNodes(n.TaskListNode.Children) + return &ast.TaskList{Symbol: n.TaskListNode.Symbol, Indent: int(n.TaskListNode.Indent), Complete: n.TaskListNode.Complete, Children: children} + case *v1pb.Node_MathBlockNode: + return &ast.MathBlock{Content: n.MathBlockNode.Content} + case *v1pb.Node_TableNode: + return convertTableToASTNode(n.TableNode) + case *v1pb.Node_EmbeddedContentNode: + return &ast.EmbeddedContent{ResourceName: n.EmbeddedContentNode.ResourceName, Params: n.EmbeddedContentNode.Params} + case *v1pb.Node_TextNode: + return &ast.Text{Content: n.TextNode.Content} + case *v1pb.Node_BoldNode: + children := convertToASTNodes(n.BoldNode.Children) + return &ast.Bold{Symbol: n.BoldNode.Symbol, Children: children} + case *v1pb.Node_ItalicNode: + return &ast.Italic{Symbol: n.ItalicNode.Symbol, Content: n.ItalicNode.Content} + case *v1pb.Node_BoldItalicNode: + return &ast.BoldItalic{Symbol: n.BoldItalicNode.Symbol, Content: n.BoldItalicNode.Content} + case *v1pb.Node_CodeNode: + return &ast.Code{Content: n.CodeNode.Content} + case *v1pb.Node_ImageNode: + return &ast.Image{AltText: n.ImageNode.AltText, URL: n.ImageNode.Url} + case *v1pb.Node_LinkNode: + return &ast.Link{Text: n.LinkNode.Text, URL: n.LinkNode.Url} + case *v1pb.Node_AutoLinkNode: + return &ast.AutoLink{URL: n.AutoLinkNode.Url, IsRawText: n.AutoLinkNode.IsRawText} + case *v1pb.Node_TagNode: + return &ast.Tag{Content: n.TagNode.Content} + case *v1pb.Node_StrikethroughNode: + return &ast.Strikethrough{Content: n.StrikethroughNode.Content} + case *v1pb.Node_EscapingCharacterNode: + return &ast.EscapingCharacter{Symbol: n.EscapingCharacterNode.Symbol} + case *v1pb.Node_MathNode: + return &ast.Math{Content: n.MathNode.Content} + case *v1pb.Node_HighlightNode: + return &ast.Highlight{Content: n.HighlightNode.Content} + case *v1pb.Node_SubscriptNode: + return &ast.Subscript{Content: n.SubscriptNode.Content} + case *v1pb.Node_SuperscriptNode: + return &ast.Superscript{Content: n.SuperscriptNode.Content} + case *v1pb.Node_ReferencedContentNode: + return &ast.ReferencedContent{ResourceName: n.ReferencedContentNode.ResourceName, Params: n.ReferencedContentNode.Params} + case *v1pb.Node_SpoilerNode: + return &ast.Spoiler{Content: n.SpoilerNode.Content} + default: + return &ast.Text{} + } +} + +func convertToASTNodes(nodes []*v1pb.Node) []ast.Node { + rawNodes := []ast.Node{} + for _, node := range nodes { + rawNode := convertToASTNode(node) + rawNodes = append(rawNodes, rawNode) + } + return rawNodes +} + +func convertTableToASTNode(node *v1pb.TableNode) *ast.Table { + table := &ast.Table{ + Header: node.Header, + Delimiter: node.Delimiter, + } + for _, row := range node.Rows { + table.Rows = append(table.Rows, row.Cells) + } + return table +} diff --git a/server/route/api/v1/memo_service.go b/server/route/api/v1/memo_service.go index 990f1e93..915b2322 100644 --- a/server/route/api/v1/memo_service.go +++ b/server/route/api/v1/memo_service.go @@ -11,6 +11,8 @@ import ( "github.com/google/cel-go/cel" "github.com/lithammer/shortuuid/v4" "github.com/pkg/errors" + "github.com/yourselfhosted/gomark/parser" + "github.com/yourselfhosted/gomark/parser/tokenizer" expr "google.golang.org/genproto/googleapis/api/expr/v1alpha1" "google.golang.org/grpc/codes" "google.golang.org/grpc/status" @@ -543,6 +545,11 @@ func (s *APIV1Service) convertMemoFromStore(ctx context.Context, memo *store.Mem return nil, errors.Wrap(err, "failed to list memo reactions") } + nodes, err := parser.Parse(tokenizer.Tokenize(memo.Content)) + if err != nil { + return nil, errors.Wrap(err, "failed to parse content") + } + return &v1pb.Memo{ Name: name, Uid: memo.UID, @@ -552,6 +559,7 @@ func (s *APIV1Service) convertMemoFromStore(ctx context.Context, memo *store.Mem UpdateTime: timestamppb.New(time.Unix(memo.UpdatedTs, 0)), DisplayTime: timestamppb.New(time.Unix(displayTs, 0)), Content: memo.Content, + Nodes: convertFromASTNodes(nodes), Visibility: convertVisibilityFromStore(memo.Visibility), Pinned: memo.Pinned, ParentId: memo.ParentID, diff --git a/server/route/api/v1/v1.go b/server/route/api/v1/v1.go index 77a7ec8f..03e4d5ec 100644 --- a/server/route/api/v1/v1.go +++ b/server/route/api/v1/v1.go @@ -27,7 +27,7 @@ type APIV1Service struct { v1pb.UnimplementedInboxServiceServer v1pb.UnimplementedActivityServiceServer v1pb.UnimplementedWebhookServiceServer - v1pb.UnimplementedLinkServiceServer + v1pb.UnimplementedMarkdownServiceServer v1pb.UnimplementedIdentityProviderServiceServer Secret string @@ -55,7 +55,7 @@ func NewAPIV1Service(secret string, profile *profile.Profile, store *store.Store v1pb.RegisterInboxServiceServer(grpcServer, apiv1Service) v1pb.RegisterActivityServiceServer(grpcServer, apiv1Service) v1pb.RegisterWebhookServiceServer(grpcServer, apiv1Service) - v1pb.RegisterLinkServiceServer(grpcServer, apiv1Service) + v1pb.RegisterMarkdownServiceServer(grpcServer, apiv1Service) v1pb.RegisterIdentityProviderServiceServer(grpcServer, apiv1Service) reflection.Register(grpcServer) return apiv1Service @@ -105,7 +105,7 @@ func (s *APIV1Service) RegisterGateway(ctx context.Context, echoServer *echo.Ech if err := v1pb.RegisterWebhookServiceHandler(context.Background(), gwMux, conn); err != nil { return err } - if err := v1pb.RegisterLinkServiceHandler(context.Background(), gwMux, conn); err != nil { + if err := v1pb.RegisterMarkdownServiceHandler(context.Background(), gwMux, conn); err != nil { return err } if err := v1pb.RegisterIdentityProviderServiceHandler(context.Background(), gwMux, conn); err != nil { diff --git a/server/server.go b/server/server.go index 24faa890..94eab97b 100644 --- a/server/server.go +++ b/server/server.go @@ -27,7 +27,6 @@ import ( ) type Server struct { - ID string Secret string Profile *profile.Profile Store *store.Store @@ -60,7 +59,6 @@ func NewServer(ctx context.Context, profile *profile.Profile, store *store.Store if profile.Mode == "prod" { secret = workspaceBasicSetting.SecretKey } - s.ID = workspaceBasicSetting.ServerId s.Secret = secret // Register healthz endpoint. @@ -133,12 +131,12 @@ func (s *Server) Shutdown(ctx context.Context) { ctx, cancel := context.WithTimeout(ctx, 10*time.Second) defer cancel() - // Shutdown echo server + // Shutdown echo server. if err := s.echoServer.Shutdown(ctx); err != nil { fmt.Printf("failed to shutdown server, error: %v\n", err) } - // Close database connection + // Close database connection. if err := s.Store.Close(); err != nil { fmt.Printf("failed to close database, error: %v\n", err) } @@ -156,10 +154,6 @@ func (s *Server) getOrUpsertWorkspaceBasicSetting(ctx context.Context) (*storepb return nil, errors.Wrap(err, "failed to get workspace basic setting") } modified := false - if workspaceBasicSetting.ServerId == "" { - workspaceBasicSetting.ServerId = uuid.NewString() - modified = true - } if workspaceBasicSetting.SecretKey == "" { workspaceBasicSetting.SecretKey = uuid.NewString() modified = true diff --git a/web/src/assets/gomark.wasm b/web/src/assets/gomark.wasm deleted file mode 100755 index aa876e5d..00000000 Binary files a/web/src/assets/gomark.wasm and /dev/null differ diff --git a/web/src/assets/wasm_exec.js b/web/src/assets/wasm_exec.js deleted file mode 100644 index 216bc868..00000000 --- a/web/src/assets/wasm_exec.js +++ /dev/null @@ -1,586 +0,0 @@ -// Copyright 2018 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. -// -// This file has been modified for use by the TinyGo compiler. - -(() => { - // Map multiple JavaScript environments to a single common API, - // preferring web standards over Node.js API. - // - // Environments considered: - // - Browsers - // - Node.js - // - Electron - // - Parcel - - if (typeof global !== "undefined") { - // global already exists - } else if (typeof window !== "undefined") { - window.global = window; - } else if (typeof self !== "undefined") { - self.global = self; - } else { - throw new Error("cannot export Go (neither global, window nor self is defined)"); - } - - if (!global.require && typeof require !== "undefined") { - global.require = require; - } - - if (!global.fs && global.require) { - global.fs = require("fs"); - } - - const enosys = () => { - const err = new Error("not implemented"); - err.code = "ENOSYS"; - return err; - }; - - if (!global.fs) { - let outputBuf = ""; - global.fs = { - constants: { O_WRONLY: -1, O_RDWR: -1, O_CREAT: -1, O_TRUNC: -1, O_APPEND: -1, O_EXCL: -1 }, // unused - writeSync(fd, buf) { - outputBuf += decoder.decode(buf); - const nl = outputBuf.lastIndexOf("\n"); - if (nl != -1) { - console.log(outputBuf.substr(0, nl)); - outputBuf = outputBuf.substr(nl + 1); - } - return buf.length; - }, - write(fd, buf, offset, length, position, callback) { - if (offset !== 0 || length !== buf.length || position !== null) { - callback(enosys()); - return; - } - const n = this.writeSync(fd, buf); - callback(null, n); - }, - chmod(path, mode, callback) { - callback(enosys()); - }, - chown(path, uid, gid, callback) { - callback(enosys()); - }, - close(fd, callback) { - callback(enosys()); - }, - fchmod(fd, mode, callback) { - callback(enosys()); - }, - fchown(fd, uid, gid, callback) { - callback(enosys()); - }, - fstat(fd, callback) { - callback(enosys()); - }, - fsync(fd, callback) { - callback(null); - }, - ftruncate(fd, length, callback) { - callback(enosys()); - }, - lchown(path, uid, gid, callback) { - callback(enosys()); - }, - link(path, link, callback) { - callback(enosys()); - }, - lstat(path, callback) { - callback(enosys()); - }, - mkdir(path, perm, callback) { - callback(enosys()); - }, - open(path, flags, mode, callback) { - callback(enosys()); - }, - read(fd, buffer, offset, length, position, callback) { - callback(enosys()); - }, - readdir(path, callback) { - callback(enosys()); - }, - readlink(path, callback) { - callback(enosys()); - }, - rename(from, to, callback) { - callback(enosys()); - }, - rmdir(path, callback) { - callback(enosys()); - }, - stat(path, callback) { - callback(enosys()); - }, - symlink(path, link, callback) { - callback(enosys()); - }, - truncate(path, length, callback) { - callback(enosys()); - }, - unlink(path, callback) { - callback(enosys()); - }, - utimes(path, atime, mtime, callback) { - callback(enosys()); - }, - }; - } - - if (!global.process) { - global.process = { - getuid() { - return -1; - }, - getgid() { - return -1; - }, - geteuid() { - return -1; - }, - getegid() { - return -1; - }, - getgroups() { - throw enosys(); - }, - pid: -1, - ppid: -1, - umask() { - throw enosys(); - }, - cwd() { - throw enosys(); - }, - chdir() { - throw enosys(); - }, - }; - } - - if (!global.crypto) { - const nodeCrypto = require("crypto"); - global.crypto = { - getRandomValues(b) { - nodeCrypto.randomFillSync(b); - }, - }; - } - - if (!global.performance) { - global.performance = { - now() { - const [sec, nsec] = process.hrtime(); - return sec * 1000 + nsec / 1000000; - }, - }; - } - - if (!global.TextEncoder) { - global.TextEncoder = require("util").TextEncoder; - } - - if (!global.TextDecoder) { - global.TextDecoder = require("util").TextDecoder; - } - - // End of polyfills for common API. - - const encoder = new TextEncoder("utf-8"); - const decoder = new TextDecoder("utf-8"); - let reinterpretBuf = new DataView(new ArrayBuffer(8)); - var logLine = []; - - global.Go = class { - constructor() { - this._callbackTimeouts = new Map(); - this._nextCallbackTimeoutID = 1; - - const mem = () => { - // The buffer may change when requesting more memory. - return new DataView(this._inst.exports.memory.buffer); - }; - - const unboxValue = (v_ref) => { - reinterpretBuf.setBigInt64(0, v_ref, true); - const f = reinterpretBuf.getFloat64(0, true); - if (f === 0) { - return undefined; - } - if (!isNaN(f)) { - return f; - } - - const id = v_ref & 0xffffffffn; - return this._values[id]; - }; - - const loadValue = (addr) => { - let v_ref = mem().getBigUint64(addr, true); - return unboxValue(v_ref); - }; - - const boxValue = (v) => { - const nanHead = 0x7ff80000n; - - if (typeof v === "number") { - if (isNaN(v)) { - return nanHead << 32n; - } - if (v === 0) { - return (nanHead << 32n) | 1n; - } - reinterpretBuf.setFloat64(0, v, true); - return reinterpretBuf.getBigInt64(0, true); - } - - switch (v) { - case undefined: - return 0n; - case null: - return (nanHead << 32n) | 2n; - case true: - return (nanHead << 32n) | 3n; - case false: - return (nanHead << 32n) | 4n; - } - - let id = this._ids.get(v); - if (id === undefined) { - id = this._idPool.pop(); - if (id === undefined) { - id = BigInt(this._values.length); - } - this._values[id] = v; - this._goRefCounts[id] = 0; - this._ids.set(v, id); - } - this._goRefCounts[id]++; - let typeFlag = 1n; - switch (typeof v) { - case "string": - typeFlag = 2n; - break; - case "symbol": - typeFlag = 3n; - break; - case "function": - typeFlag = 4n; - break; - } - return id | ((nanHead | typeFlag) << 32n); - }; - - const storeValue = (addr, v) => { - let v_ref = boxValue(v); - mem().setBigUint64(addr, v_ref, true); - }; - - const loadSlice = (array, len, cap) => { - return new Uint8Array(this._inst.exports.memory.buffer, array, len); - }; - - const loadSliceOfValues = (array, len, cap) => { - const a = new Array(len); - for (let i = 0; i < len; i++) { - a[i] = loadValue(array + i * 8); - } - return a; - }; - - const loadString = (ptr, len) => { - return decoder.decode(new DataView(this._inst.exports.memory.buffer, ptr, len)); - }; - - const timeOrigin = Date.now() - performance.now(); - this.importObject = { - wasi_snapshot_preview1: { - // https://github.com/WebAssembly/WASI/blob/main/phases/snapshot/docs.md#fd_write - fd_write: function (fd, iovs_ptr, iovs_len, nwritten_ptr) { - let nwritten = 0; - if (fd == 1) { - for (let iovs_i = 0; iovs_i < iovs_len; iovs_i++) { - let iov_ptr = iovs_ptr + iovs_i * 8; // assuming wasm32 - let ptr = mem().getUint32(iov_ptr + 0, true); - let len = mem().getUint32(iov_ptr + 4, true); - nwritten += len; - for (let i = 0; i < len; i++) { - let c = mem().getUint8(ptr + i); - if (c == 13) { - // CR - // ignore - } else if (c == 10) { - // LF - // write line - let line = decoder.decode(new Uint8Array(logLine)); - logLine = []; - console.log(line); - } else { - logLine.push(c); - } - } - } - } else { - console.error("invalid file descriptor:", fd); - } - mem().setUint32(nwritten_ptr, nwritten, true); - return 0; - }, - fd_close: () => 0, // dummy - fd_fdstat_get: () => 0, // dummy - fd_seek: () => 0, // dummy - proc_exit: (code) => { - if (global.process) { - // Node.js - process.exit(code); - } else { - // Can't exit in a browser. - throw "trying to exit with code " + code; - } - }, - random_get: (bufPtr, bufLen) => { - crypto.getRandomValues(loadSlice(bufPtr, bufLen)); - return 0; - }, - }, - gojs: { - // func ticks() float64 - "runtime.ticks": () => { - return timeOrigin + performance.now(); - }, - - // func sleepTicks(timeout float64) - "runtime.sleepTicks": (timeout) => { - // Do not sleep, only reactivate scheduler after the given timeout. - setTimeout(this._inst.exports.go_scheduler, timeout); - }, - - // func finalizeRef(v ref) - "syscall/js.finalizeRef": (v_ref) => { - // Note: TinyGo does not support finalizers so this should never be - // called. - }, - - // func stringVal(value string) ref - "syscall/js.stringVal": (value_ptr, value_len) => { - const s = loadString(value_ptr, value_len); - return boxValue(s); - }, - - // func valueGet(v ref, p string) ref - "syscall/js.valueGet": (v_ref, p_ptr, p_len) => { - let prop = loadString(p_ptr, p_len); - let v = unboxValue(v_ref); - let result = Reflect.get(v, prop); - return boxValue(result); - }, - - // func valueSet(v ref, p string, x ref) - "syscall/js.valueSet": (v_ref, p_ptr, p_len, x_ref) => { - const v = unboxValue(v_ref); - const p = loadString(p_ptr, p_len); - const x = unboxValue(x_ref); - Reflect.set(v, p, x); - }, - - // func valueDelete(v ref, p string) - "syscall/js.valueDelete": (v_ref, p_ptr, p_len) => { - const v = unboxValue(v_ref); - const p = loadString(p_ptr, p_len); - Reflect.deleteProperty(v, p); - }, - - // func valueIndex(v ref, i int) ref - "syscall/js.valueIndex": (v_ref, i) => { - return boxValue(Reflect.get(unboxValue(v_ref), i)); - }, - - // valueSetIndex(v ref, i int, x ref) - "syscall/js.valueSetIndex": (v_ref, i, x_ref) => { - Reflect.set(unboxValue(v_ref), i, unboxValue(x_ref)); - }, - - // func valueCall(v ref, m string, args []ref) (ref, bool) - "syscall/js.valueCall": (ret_addr, v_ref, m_ptr, m_len, args_ptr, args_len, args_cap) => { - const v = unboxValue(v_ref); - const name = loadString(m_ptr, m_len); - const args = loadSliceOfValues(args_ptr, args_len, args_cap); - try { - const m = Reflect.get(v, name); - storeValue(ret_addr, Reflect.apply(m, v, args)); - mem().setUint8(ret_addr + 8, 1); - } catch (err) { - storeValue(ret_addr, err); - mem().setUint8(ret_addr + 8, 0); - } - }, - - // func valueInvoke(v ref, args []ref) (ref, bool) - "syscall/js.valueInvoke": (ret_addr, v_ref, args_ptr, args_len, args_cap) => { - try { - const v = unboxValue(v_ref); - const args = loadSliceOfValues(args_ptr, args_len, args_cap); - storeValue(ret_addr, Reflect.apply(v, undefined, args)); - mem().setUint8(ret_addr + 8, 1); - } catch (err) { - storeValue(ret_addr, err); - mem().setUint8(ret_addr + 8, 0); - } - }, - - // func valueNew(v ref, args []ref) (ref, bool) - "syscall/js.valueNew": (ret_addr, v_ref, args_ptr, args_len, args_cap) => { - const v = unboxValue(v_ref); - const args = loadSliceOfValues(args_ptr, args_len, args_cap); - try { - storeValue(ret_addr, Reflect.construct(v, args)); - mem().setUint8(ret_addr + 8, 1); - } catch (err) { - storeValue(ret_addr, err); - mem().setUint8(ret_addr + 8, 0); - } - }, - - // func valueLength(v ref) int - "syscall/js.valueLength": (v_ref) => { - return unboxValue(v_ref).length; - }, - - // valuePrepareString(v ref) (ref, int) - "syscall/js.valuePrepareString": (ret_addr, v_ref) => { - const s = String(unboxValue(v_ref)); - const str = encoder.encode(s); - storeValue(ret_addr, str); - mem().setInt32(ret_addr + 8, str.length, true); - }, - - // valueLoadString(v ref, b []byte) - "syscall/js.valueLoadString": (v_ref, slice_ptr, slice_len, slice_cap) => { - const str = unboxValue(v_ref); - loadSlice(slice_ptr, slice_len, slice_cap).set(str); - }, - - // func valueInstanceOf(v ref, t ref) bool - "syscall/js.valueInstanceOf": (v_ref, t_ref) => { - return unboxValue(v_ref) instanceof unboxValue(t_ref); - }, - - // func copyBytesToGo(dst []byte, src ref) (int, bool) - "syscall/js.copyBytesToGo": (ret_addr, dest_addr, dest_len, dest_cap, src_ref) => { - let num_bytes_copied_addr = ret_addr; - let returned_status_addr = ret_addr + 4; // Address of returned boolean status variable - - const dst = loadSlice(dest_addr, dest_len); - const src = unboxValue(src_ref); - if (!(src instanceof Uint8Array || src instanceof Uint8ClampedArray)) { - mem().setUint8(returned_status_addr, 0); // Return "not ok" status - return; - } - const toCopy = src.subarray(0, dst.length); - dst.set(toCopy); - mem().setUint32(num_bytes_copied_addr, toCopy.length, true); - mem().setUint8(returned_status_addr, 1); // Return "ok" status - }, - - // copyBytesToJS(dst ref, src []byte) (int, bool) - // Originally copied from upstream Go project, then modified: - // https://github.com/golang/go/blob/3f995c3f3b43033013013e6c7ccc93a9b1411ca9/misc/wasm/wasm_exec.js#L404-L416 - "syscall/js.copyBytesToJS": (ret_addr, dst_ref, src_addr, src_len, src_cap) => { - let num_bytes_copied_addr = ret_addr; - let returned_status_addr = ret_addr + 4; // Address of returned boolean status variable - - const dst = unboxValue(dst_ref); - const src = loadSlice(src_addr, src_len); - if (!(dst instanceof Uint8Array || dst instanceof Uint8ClampedArray)) { - mem().setUint8(returned_status_addr, 0); // Return "not ok" status - return; - } - const toCopy = src.subarray(0, dst.length); - dst.set(toCopy); - mem().setUint32(num_bytes_copied_addr, toCopy.length, true); - mem().setUint8(returned_status_addr, 1); // Return "ok" status - }, - }, - }; - - // Go 1.20 uses 'env'. Go 1.21 uses 'gojs'. - // For compatibility, we use both as long as Go 1.20 is supported. - this.importObject.env = this.importObject.gojs; - } - - async run(instance) { - this._inst = instance; - this._values = [ - // JS values that Go currently has references to, indexed by reference id - NaN, - 0, - null, - true, - false, - global, - this, - ]; - this._goRefCounts = []; // number of references that Go has to a JS value, indexed by reference id - this._ids = new Map(); // mapping from JS values to reference ids - this._idPool = []; // unused ids that have been garbage collected - this.exited = false; // whether the Go program has exited - - while (true) { - const callbackPromise = new Promise((resolve) => { - this._resolveCallbackPromise = () => { - if (this.exited) { - throw new Error("bad callback: Go program has already exited"); - } - setTimeout(resolve, 0); // make sure it is asynchronous - }; - }); - this._inst.exports._start(); - if (this.exited) { - break; - } - await callbackPromise; - } - } - - _resume() { - if (this.exited) { - throw new Error("Go program has already exited"); - } - this._inst.exports.resume(); - if (this.exited) { - this._resolveExitPromise(); - } - } - - _makeFuncWrapper(id) { - const go = this; - return function () { - const event = { id: id, this: this, args: arguments }; - go._pendingEvent = event; - go._resume(); - return event.result; - }; - } - }; - - if (global.require && global.require.main === module && global.process && global.process.versions && !global.process.versions.electron) { - if (process.argv.length != 3) { - console.error("usage: go_js_wasm_exec [wasm binary] [arguments]"); - process.exit(1); - } - - const go = new Go(); - WebAssembly.instantiate(fs.readFileSync(process.argv[2]), go.importObject) - .then((result) => { - return go.run(result.instance); - }) - .catch((err) => { - console.error(err); - process.exit(1); - }); - } -})(); diff --git a/web/src/components/MemoContent/Blockquote.tsx b/web/src/components/MemoContent/Blockquote.tsx index c895446f..94386782 100644 --- a/web/src/components/MemoContent/Blockquote.tsx +++ b/web/src/components/MemoContent/Blockquote.tsx @@ -1,4 +1,4 @@ -import { Node } from "@/types/node"; +import { Node } from "@/types/proto/api/v1/markdown_service"; import Renderer from "./Renderer"; import { BaseProps } from "./types"; diff --git a/web/src/components/MemoContent/Bold.tsx b/web/src/components/MemoContent/Bold.tsx index b7651d11..20259a13 100644 --- a/web/src/components/MemoContent/Bold.tsx +++ b/web/src/components/MemoContent/Bold.tsx @@ -1,4 +1,4 @@ -import { Node } from "@/types/node"; +import { Node } from "@/types/proto/api/v1/markdown_service"; import Renderer from "./Renderer"; interface Props { diff --git a/web/src/components/MemoContent/EmbeddedContent/EmbeddedMemo.tsx b/web/src/components/MemoContent/EmbeddedContent/EmbeddedMemo.tsx index 2a3d1270..53a42f14 100644 --- a/web/src/components/MemoContent/EmbeddedContent/EmbeddedMemo.tsx +++ b/web/src/components/MemoContent/EmbeddedContent/EmbeddedMemo.tsx @@ -44,7 +44,7 @@ const EmbeddedMemo = ({ resourceId, params: paramsStr }: Props) => { @@ -62,12 +62,7 @@ const EmbeddedMemo = ({ resourceId, params: paramsStr }: Props) => { - + ); diff --git a/web/src/components/MemoContent/Heading.tsx b/web/src/components/MemoContent/Heading.tsx index a1fbe1a9..1417c0aa 100644 --- a/web/src/components/MemoContent/Heading.tsx +++ b/web/src/components/MemoContent/Heading.tsx @@ -1,4 +1,4 @@ -import { Node } from "@/types/node"; +import { Node } from "@/types/proto/api/v1/markdown_service"; import Renderer from "./Renderer"; import { BaseProps } from "./types"; diff --git a/web/src/components/MemoContent/Link.tsx b/web/src/components/MemoContent/Link.tsx index 8dd455ef..33972799 100644 --- a/web/src/components/MemoContent/Link.tsx +++ b/web/src/components/MemoContent/Link.tsx @@ -1,7 +1,7 @@ import { Link as MLink, Tooltip } from "@mui/joy"; import { useState } from "react"; -import { linkServiceClient } from "@/grpcweb"; -import { LinkMetadata } from "@/types/proto/api/v1/link_service"; +import { markdownServiceClient } from "@/grpcweb"; +import { LinkMetadata } from "@/types/proto/api/v1/markdown_service"; interface Props { url: string; @@ -25,7 +25,7 @@ const Link: React.FC = ({ text, url }: Props) => { const handleMouseEnter = async () => { if (!initialized) { try { - const { linkMetadata } = await linkServiceClient.getLinkMetadata({ link: url }, {}); + const linkMetadata = await markdownServiceClient.getLinkMetadata({ link: url }); setLinkMetadata(linkMetadata); } catch (error) { console.error("Error fetching URL metadata:", error); diff --git a/web/src/components/MemoContent/OrderedList.tsx b/web/src/components/MemoContent/OrderedList.tsx index 75d5f99b..347716dd 100644 --- a/web/src/components/MemoContent/OrderedList.tsx +++ b/web/src/components/MemoContent/OrderedList.tsx @@ -1,5 +1,5 @@ import { repeat } from "lodash-es"; -import { Node } from "@/types/node"; +import { Node } from "@/types/proto/api/v1/markdown_service"; import Renderer from "./Renderer"; import { BaseProps } from "./types"; diff --git a/web/src/components/MemoContent/Paragraph.tsx b/web/src/components/MemoContent/Paragraph.tsx index a0565fce..93ce5af8 100644 --- a/web/src/components/MemoContent/Paragraph.tsx +++ b/web/src/components/MemoContent/Paragraph.tsx @@ -1,4 +1,4 @@ -import { Node } from "@/types/node"; +import { Node } from "@/types/proto/api/v1/markdown_service"; import Renderer from "./Renderer"; import { BaseProps } from "./types"; diff --git a/web/src/components/MemoContent/Renderer.tsx b/web/src/components/MemoContent/Renderer.tsx index 7667e841..0a957e50 100644 --- a/web/src/components/MemoContent/Renderer.tsx +++ b/web/src/components/MemoContent/Renderer.tsx @@ -13,6 +13,7 @@ import { ImageNode, ItalicNode, LinkNode, + MathBlockNode, MathNode, Node, NodeType, @@ -28,7 +29,7 @@ import { TaskListNode, TextNode, UnorderedListNode, -} from "@/types/node"; +} from "@/types/proto/api/v1/markdown_service"; import Blockquote from "./Blockquote"; import Bold from "./Bold"; import BoldItalic from "./BoldItalic"; @@ -67,61 +68,61 @@ const Renderer: React.FC = ({ index, node }: Props) => { case NodeType.LINE_BREAK: return ; case NodeType.PARAGRAPH: - return ; + return ; case NodeType.CODE_BLOCK: - return ; + return ; case NodeType.HEADING: - return ; + return ; case NodeType.HORIZONTAL_RULE: - return ; + return ; case NodeType.BLOCKQUOTE: - return
; + return
; case NodeType.ORDERED_LIST: - return ; + return ; case NodeType.UNORDERED_LIST: - return ; + return ; case NodeType.TASK_LIST: - return ; + return ; case NodeType.MATH_BLOCK: - return ; + return ; case NodeType.TABLE: - return ; + return
; case NodeType.EMBEDDED_CONTENT: - return ; + return ; case NodeType.TEXT: - return ; + return ; case NodeType.BOLD: - return ; + return ; case NodeType.ITALIC: - return ; + return ; case NodeType.BOLD_ITALIC: - return ; + return ; case NodeType.CODE: - return ; + return ; case NodeType.IMAGE: - return ; + return ; case NodeType.LINK: - return ; + return ; case NodeType.AUTO_LINK: - return ; + return ; case NodeType.TAG: - return ; + return ; case NodeType.STRIKETHROUGH: - return ; + return ; case NodeType.MATH: - return ; + return ; case NodeType.HIGHLIGHT: - return ; + return ; case NodeType.ESCAPING_CHARACTER: - return ; + return ; case NodeType.SUBSCRIPT: - return ; + return ; case NodeType.SUPERSCRIPT: - return ; + return ; case NodeType.REFERENCED_CONTENT: - return ; + return ; case NodeType.SPOILER: - return ; + return ; default: return null; } diff --git a/web/src/components/MemoContent/Table.tsx b/web/src/components/MemoContent/Table.tsx index 093a7e9c..3ba184e6 100644 --- a/web/src/components/MemoContent/Table.tsx +++ b/web/src/components/MemoContent/Table.tsx @@ -1,4 +1,4 @@ -import { TableNode_Row } from "@/types/node"; +import { TableNode_Row } from "@/types/proto/api/v1/markdown_service"; interface Props { header: string[]; diff --git a/web/src/components/MemoContent/TaskList.tsx b/web/src/components/MemoContent/TaskList.tsx index 13642c2d..1e95e9d2 100644 --- a/web/src/components/MemoContent/TaskList.tsx +++ b/web/src/components/MemoContent/TaskList.tsx @@ -2,8 +2,9 @@ import { Checkbox } from "@mui/joy"; import clsx from "clsx"; import { repeat } from "lodash-es"; import { useContext, useState } from "react"; +import { markdownServiceClient } from "@/grpcweb"; import { useMemoStore } from "@/store/v1"; -import { Node, NodeType, TaskListNode } from "@/types/node"; +import { Node, NodeType, TaskListNode } from "@/types/proto/api/v1/markdown_service"; import Renderer from "./Renderer"; import { RendererContext } from "./types"; @@ -31,16 +32,16 @@ const TaskList: React.FC = ({ index, indent, complete, children }: Props) } const node = context.nodes[nodeIndex]; - if (node.type !== NodeType.TASK_LIST || !node.value) { + if (node.type !== NodeType.TASK_LIST) { return; } - (node.value as TaskListNode)!.complete = on; - const content = window.restore(context.nodes); + (node.taskListNode as TaskListNode)!.complete = on; + const { markdown } = await markdownServiceClient.restoreMarkdown({ nodes: context.nodes }); await memoStore.updateMemo( { name: context.memoName, - content, + content: markdown, }, ["content"], ); diff --git a/web/src/components/MemoContent/UnorderedList.tsx b/web/src/components/MemoContent/UnorderedList.tsx index a83d8569..acefce3e 100644 --- a/web/src/components/MemoContent/UnorderedList.tsx +++ b/web/src/components/MemoContent/UnorderedList.tsx @@ -1,5 +1,5 @@ import { repeat } from "lodash-es"; -import { Node } from "@/types/node"; +import { Node } from "@/types/proto/api/v1/markdown_service"; import Renderer from "./Renderer"; interface Props { diff --git a/web/src/components/MemoContent/index.tsx b/web/src/components/MemoContent/index.tsx index c02c0898..cbc8311e 100644 --- a/web/src/components/MemoContent/index.tsx +++ b/web/src/components/MemoContent/index.tsx @@ -2,7 +2,7 @@ import clsx from "clsx"; import { memo, useEffect, useRef, useState } from "react"; import useCurrentUser from "@/hooks/useCurrentUser"; import { useMemoStore } from "@/store/v1"; -import { Node, NodeType } from "@/types/node"; +import { Node, NodeType } from "@/types/proto/api/v1/markdown_service"; import { useTranslate } from "@/utils/i18n"; import Renderer from "./Renderer"; import { RendererContext } from "./types"; @@ -11,7 +11,7 @@ import { RendererContext } from "./types"; const MAX_DISPLAY_HEIGHT = 256; interface Props { - content: string; + nodes: Node[]; memoName?: string; compact?: boolean; readonly?: boolean; @@ -24,14 +24,13 @@ interface Props { } const MemoContent: React.FC = (props: Props) => { - const { className, content, memoName, embeddedMemos, onClick } = props; + const { className, nodes, memoName, embeddedMemos, onClick } = props; const t = useTranslate(); const currentUser = useCurrentUser(); const memoStore = useMemoStore(); const memoContentContainerRef = useRef(null); const [showCompactMode, setShowCompactMode] = useState(false); const memo = memoName ? memoStore.getMemoByName(memoName) : null; - const nodes = window.parse(content); const allowEdit = !props.readonly && memo && currentUser?.name === memo.creator; // Initial compact mode. diff --git a/web/src/components/MemoContent/types/context.ts b/web/src/components/MemoContent/types/context.ts index 3ed174b9..e54d5e6a 100644 --- a/web/src/components/MemoContent/types/context.ts +++ b/web/src/components/MemoContent/types/context.ts @@ -1,5 +1,5 @@ import { createContext } from "react"; -import { Node } from "@/types/node"; +import { Node } from "@/types/proto/api/v1/markdown_service"; interface Context { nodes: Node[]; diff --git a/web/src/components/MemoEditor/Editor/index.tsx b/web/src/components/MemoEditor/Editor/index.tsx index ca1281d0..01baa10a 100644 --- a/web/src/components/MemoEditor/Editor/index.tsx +++ b/web/src/components/MemoEditor/Editor/index.tsx @@ -1,7 +1,8 @@ import clsx from "clsx"; import { last } from "lodash-es"; import { forwardRef, ReactNode, useCallback, useEffect, useImperativeHandle, useRef, useState } from "react"; -import { NodeType, OrderedListNode, TaskListNode, UnorderedListNode } from "@/types/node"; +import { markdownServiceClient } from "@/grpcweb"; +import { NodeType, OrderedListNode, TaskListNode, UnorderedListNode } from "@/types/proto/api/v1/markdown_service"; import TagSuggestions from "./TagSuggestions"; export interface EditorRefActions { @@ -149,24 +150,29 @@ const Editor = forwardRef(function Editor(props: Props, ref: React.ForwardedRef< updateEditorHeight(); }, []); - const handleEditorKeyDown = (event: React.KeyboardEvent) => { + const handleEditorKeyDown = async (event: React.KeyboardEvent) => { if (event.key === "Enter" && !isInIME) { + if (event.shiftKey || event.ctrlKey || event.metaKey || event.altKey) { + return; + } + const cursorPosition = editorActions.getCursorPosition(); const prevContent = editorActions.getContent().substring(0, cursorPosition); - const lastNode = last(window.parse(prevContent)); + const { nodes } = await markdownServiceClient.parseMarkdown({ markdown: prevContent }); + const lastNode = last(nodes); if (!lastNode) { return; } let insertText = ""; if (lastNode.type === NodeType.TASK_LIST) { - const { complete } = lastNode.value as TaskListNode; + const { complete } = lastNode.taskListNode as TaskListNode; insertText = complete ? "- [x] " : "- [ ] "; } else if (lastNode.type === NodeType.UNORDERED_LIST) { - const { symbol } = lastNode.value as UnorderedListNode; + const { symbol } = lastNode.unorderedListNode as UnorderedListNode; insertText = `${symbol} `; } else if (lastNode.type === NodeType.ORDERED_LIST) { - const { number } = lastNode.value as OrderedListNode; + const { number } = lastNode.orderedListNode as OrderedListNode; insertText = `${Number(number) + 1}. `; } if (insertText) { diff --git a/web/src/components/MemoEditor/index.tsx b/web/src/components/MemoEditor/index.tsx index ed4efac2..6aa4b2b9 100644 --- a/web/src/components/MemoEditor/index.tsx +++ b/web/src/components/MemoEditor/index.tsx @@ -364,7 +364,7 @@ const MemoEditor = (props: Props) => { } // Batch upsert tags. - const tags = extractTagsFromContent(content); + const tags = await extractTagsFromContent(content); await tagStore.batchUpsertTag(tags); setState((state) => { diff --git a/web/src/components/MemoView.tsx b/web/src/components/MemoView.tsx index 943b44c7..2c91a122 100644 --- a/web/src/components/MemoView.tsx +++ b/web/src/components/MemoView.tsx @@ -148,7 +148,7 @@ const MemoView: React.FC = (props: Props) => { = ({ content, destroy }: Props) => { + const [nodes, setNodes] = useState([]); + + useEffect(() => { + (async () => { + try { + const { nodes } = await markdownServiceClient.parseMarkdown({ markdown: content }); + setNodes(nodes); + } catch (error) { + console.error("Error parsing markdown:", error); + } + })(); + }, [content]); + const handleCloseBtnClick = () => { destroy(); }; @@ -23,7 +39,7 @@ const PreviewMarkdownDialog: React.FC = ({ content, destroy }: Props) =>
- {content !== "" ? :

Nothing to preview

} + {nodes.length > 0 ? :

Nothing to preview

}
); diff --git a/web/src/components/ShareMemoDialog.tsx b/web/src/components/ShareMemoDialog.tsx index d3b323f0..9fd55753 100644 --- a/web/src/components/ShareMemoDialog.tsx +++ b/web/src/components/ShareMemoDialog.tsx @@ -155,7 +155,7 @@ const ShareMemoDialog: React.FC = (props: Props) => { > {getDateTimeString(memo.displayTime)}
- +
diff --git a/web/src/grpcweb.ts b/web/src/grpcweb.ts index d6b521a6..2d3ba8bc 100644 --- a/web/src/grpcweb.ts +++ b/web/src/grpcweb.ts @@ -3,7 +3,7 @@ import { ActivityServiceDefinition } from "./types/proto/api/v1/activity_service import { AuthServiceDefinition } from "./types/proto/api/v1/auth_service"; import { IdentityProviderServiceDefinition } from "./types/proto/api/v1/idp_service"; import { InboxServiceDefinition } from "./types/proto/api/v1/inbox_service"; -import { LinkServiceDefinition } from "./types/proto/api/v1/link_service"; +import { MarkdownServiceDefinition } from "./types/proto/api/v1/markdown_service"; import { MemoServiceDefinition } from "./types/proto/api/v1/memo_service"; import { ResourceServiceDefinition } from "./types/proto/api/v1/resource_service"; import { TagServiceDefinition } from "./types/proto/api/v1/tag_service"; @@ -41,6 +41,6 @@ export const activityServiceClient = clientFactory.create(ActivityServiceDefinit export const webhookServiceClient = clientFactory.create(WebhookServiceDefinition, channel); -export const linkServiceClient = clientFactory.create(LinkServiceDefinition, channel); +export const markdownServiceClient = clientFactory.create(MarkdownServiceDefinition, channel); export const identityProviderServiceClient = clientFactory.create(IdentityProviderServiceDefinition, channel); diff --git a/web/src/main.tsx b/web/src/main.tsx index 242e4d4f..440012b1 100644 --- a/web/src/main.tsx +++ b/web/src/main.tsx @@ -4,8 +4,6 @@ import { createRoot } from "react-dom/client"; import { Toaster } from "react-hot-toast"; import { Provider } from "react-redux"; import { RouterProvider } from "react-router-dom"; -import gomarkWasm from "./assets/gomark.wasm?url"; -import "./assets/wasm_exec.js"; import "./css/global.css"; import "./css/tailwind.css"; import "./helpers/polyfill"; @@ -17,10 +15,6 @@ import store from "./store"; import theme from "./theme"; (async () => { - const go = new window.Go(); - const { instance } = await WebAssembly.instantiateStreaming(fetch(gomarkWasm), go.importObject); - go.run(instance); - const container = document.getElementById("root"); const root = createRoot(container as HTMLElement); root.render( diff --git a/web/src/pages/Archived.tsx b/web/src/pages/Archived.tsx index 1cdc8cc2..755883e6 100644 --- a/web/src/pages/Archived.tsx +++ b/web/src/pages/Archived.tsx @@ -121,7 +121,7 @@ const Archived = () => {
- + ))} {isRequesting ? ( diff --git a/web/src/types/global.d.ts b/web/src/types/global.d.ts deleted file mode 100644 index dd6c6dac..00000000 --- a/web/src/types/global.d.ts +++ /dev/null @@ -1,21 +0,0 @@ -import { Node } from "./node"; - -declare class Go { - argv: string[]; - env: { [envKey: string]: string }; - exit: (code: number) => void; - importObject: WebAssembly.Imports; - exited: boolean; - mem: DataView; - run(instance: WebAssembly.Instance): Promise; -} - -declare global { - interface Window { - Go: typeof Go; - parse: (content: string) => Node[]; - restore: (input: Node[]) => string; - } -} - -export {}; diff --git a/web/src/types/node.ts b/web/src/types/node.ts deleted file mode 100644 index e09d1bb7..00000000 --- a/web/src/types/node.ts +++ /dev/null @@ -1,202 +0,0 @@ -export enum NodeType { - LINE_BREAK = "LINE_BREAK", - PARAGRAPH = "PARAGRAPH", - CODE_BLOCK = "CODE_BLOCK", - HEADING = "HEADING", - HORIZONTAL_RULE = "HORIZONTAL_RULE", - BLOCKQUOTE = "BLOCKQUOTE", - ORDERED_LIST = "ORDERED_LIST", - UNORDERED_LIST = "UNORDERED_LIST", - TASK_LIST = "TASK_LIST", - MATH_BLOCK = "MATH_BLOCK", - TABLE = "TABLE", - EMBEDDED_CONTENT = "EMBEDDED_CONTENT", - TEXT = "TEXT", - BOLD = "BOLD", - ITALIC = "ITALIC", - BOLD_ITALIC = "BOLD_ITALIC", - CODE = "CODE", - IMAGE = "IMAGE", - LINK = "LINK", - AUTO_LINK = "AUTO_LINK", - TAG = "TAG", - STRIKETHROUGH = "STRIKETHROUGH", - ESCAPING_CHARACTER = "ESCAPING_CHARACTER", - MATH = "MATH", - HIGHLIGHT = "HIGHLIGHT", - SUBSCRIPT = "SUBSCRIPT", - SUPERSCRIPT = "SUPERSCRIPT", - REFERENCED_CONTENT = "REFERENCED_CONTENT", - SPOILER = "SPOILER", -} - -export interface Node { - type: NodeType; - value: - | LineBreakNode - | ParagraphNode - | CodeBlockNode - | HeadingNode - | HorizontalRuleNode - | BlockquoteNode - | OrderedListNode - | UnorderedListNode - | TaskListNode - | MathBlockNode - | TableNode - | EmbeddedContentNode - | TextNode - | BoldNode - | ItalicNode - | BoldItalicNode - | CodeNode - | ImageNode - | LinkNode - | AutoLinkNode - | TagNode - | StrikethroughNode - | EscapingCharacterNode - | MathNode - | HighlightNode - | SubscriptNode - | SuperscriptNode - | ReferencedContentNode - | SpoilerNode; -} - -export interface LineBreakNode {} - -export interface ParagraphNode { - children: Node[]; -} - -export interface CodeBlockNode { - language: string; - content: string; -} - -export interface HeadingNode { - level: number; - children: Node[]; -} - -export interface HorizontalRuleNode { - symbol: string; -} - -export interface BlockquoteNode { - children: Node[]; -} - -export interface OrderedListNode { - number: string; - indent: number; - children: Node[]; -} - -export interface UnorderedListNode { - symbol: string; - indent: number; - children: Node[]; -} - -export interface TaskListNode { - symbol: string; - indent: number; - complete: boolean; - children: Node[]; -} - -export interface MathBlockNode { - content: string; -} - -export interface TableNode { - header: string[]; - delimiter: string[]; - rows: TableNode_Row[]; -} - -export interface TableNode_Row { - cells: string[]; -} - -export interface EmbeddedContentNode { - resourceName: string; - params: string; -} - -export interface TextNode { - content: string; -} - -export interface BoldNode { - symbol: string; - children: Node[]; -} - -export interface ItalicNode { - symbol: string; - content: string; -} - -export interface BoldItalicNode { - symbol: string; - content: string; -} - -export interface CodeNode { - content: string; -} - -export interface ImageNode { - altText: string; - url: string; -} - -export interface LinkNode { - text: string; - url: string; -} - -export interface AutoLinkNode { - url: string; - isRawText: boolean; -} - -export interface TagNode { - content: string; -} - -export interface StrikethroughNode { - content: string; -} - -export interface EscapingCharacterNode { - symbol: string; -} - -export interface MathNode { - content: string; -} - -export interface HighlightNode { - content: string; -} - -export interface SubscriptNode { - content: string; -} - -export interface SuperscriptNode { - content: string; -} - -export interface ReferencedContentNode { - resourceName: string; - params: string; -} - -export interface SpoilerNode { - content: string; -} diff --git a/web/src/utils/tag.ts b/web/src/utils/tag.ts index ceb5a2fb..911f8161 100644 --- a/web/src/utils/tag.ts +++ b/web/src/utils/tag.ts @@ -1,10 +1,11 @@ -import { Node, TagNode } from "@/types/node"; +import { markdownServiceClient } from "@/grpcweb"; +import { Node, NodeType, TagNode } from "@/types/proto/api/v1/markdown_service"; export const TAG_REG = /#([^\s#,]+)/; // extractTagsFromContent extracts tags from content. -export const extractTagsFromContent = (content: string) => { - const nodes = window.parse(content); +export const extractTagsFromContent = async (content: string) => { + const { nodes } = await markdownServiceClient.parseMarkdown({ markdown: content }); const tags = new Set(); const traverse = (nodes: Node[], handle: (node: Node) => void) => { @@ -15,7 +16,7 @@ export const extractTagsFromContent = (content: string) => { handle(node); if (node.type === "PARAGRAPH" || node.type === "ORDERED_LIST" || node.type === "UNORDERED_LIST") { - const children = (node.value as any).children; + const children = node.paragraphNode?.children || node.orderedListNode?.children || node.unorderedListNode?.children; if (Array.isArray(children)) { traverse(children, handle); } @@ -24,8 +25,8 @@ export const extractTagsFromContent = (content: string) => { }; traverse(nodes, (node) => { - if (node.type === "TAG" && node.value) { - tags.add((node.value as TagNode).content); + if (node.type === NodeType.TAG && node.tagNode) { + tags.add((node.tagNode as TagNode).content); } });