Database governance built for humans and agents — controlling changes and access across every major database.
Go cicddata-governancedata-maskingdata-securitydatabase-accessdatabase-governancedevopsdevsecopsflywaygitopsliquibasemongodbmysqloraclepostgresqlschema-migrationssecuritysql-clientsqlservertidb
chore: update (#4816)
h3n4lf290ab0afb9b
diff --git a/frontend/src/types/proto/v1/bookmark_service.ts b/frontend/src/types/proto/v1/bookmark_service.tsnew file mode 100644index 0000000000..bbb5fb46b0--- /dev/null+++ b/frontend/src/types/proto/v1/bookmark_service.ts@@ -0,0 +1,436 @@+/* eslint-disable */+import type { CallContext, CallOptions } from "nice-grpc-common";+import * as _m0 from "protobufjs/minimal";+import { Empty } from "../google/protobuf/empty";++export const protobufPackage = "bytebase.v1";++export interface CreateBookmarkRequest {+ /**+ * The parent resource of the bookmark.+ * Format: users/{user}, user is a server-generated unique IDs.+ */+ parent: string;+ /** The bookmark to create. */+ bookmark?: Bookmark;+}++export interface DeleteBookmarkRequest {+ /**+ * The name of the bookmark to delete.+ * Format: users/{user}/bookmarks/{bookmark}, user and bookmark are server-generated unique IDs.+ */+ name: string;+}++export interface ListBookmarksRequest {+ /**+ * The parent resource of the bookmark.+ * Format: users/{user}, user is a server-generated unique ID.+ */+ parent: string;+ /**+ * Not used. The maximum number of bookmarks to return. The service may return fewer than+ * this value.+ * If unspecified, at most 50 bookmarks will be returned.+ * The maximum value is 1000; values above 1000 will be coerced to 1000.+ */+ pageSize: number;+ /**+ * Not used. A page token, received from a previous `ListBookmarks` call.+ * Provide this to retrieve the subsequent page.+ *+ * When paginating, all other parameters provided to `ListBookmarks` must match+ * the call that provided the page token.+ */+ pageToken: string;+}++export interface ListBookmarksResponse {+ /** The list of bookmarks. */+ bookmarks: Bookmark[];+ /**+ * Not used. A token, which can be sent as `page_token` to retrieve the next page.+ * If this field is omitted, there are no subsequent pages.+ */+ nextPageToken: string;+}++export interface Bookmark {+ /**+ * The name of the bookmark.+ * Format: users/{user}/bookmarks/{bookmark}, user and bookmark are server-generated unique IDs.+ */+ name: string;+ /**+ * The resource link of the bookmark. Only support issue link for now.+ * Format:+ * Issue: /issue/slug(issue_name)-{issue_uid}+ * Example: /issue/start-here-add-email-column-to-employee-table-101+ */+ link: string;+}++function createBaseCreateBookmarkRequest(): CreateBookmarkRequest {+ return { parent: "", bookmark: undefined };+}++export const CreateBookmarkRequest = {+ encode(message: CreateBookmarkRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {+ if (message.parent !== "") {+ writer.uint32(10).string(message.parent);+ }+ if (message.bookmark !== undefined) {+ Bookmark.encode(message.bookmark, writer.uint32(18).fork()).ldelim();+ }+ return writer;+ },++ decode(input: _m0.Reader | Uint8Array, length?: number): CreateBookmarkRequest {+ const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);+ let end = length === undefined ? reader.len : reader.pos + length;+ const message = createBaseCreateBookmarkRequest();+ while (reader.pos < end) {+ const tag = reader.uint32();+ switch (tag >>> 3) {+ case 1:+ message.parent = reader.string();+ break;+ case 2:+ message.bookmark = Bookmark.decode(reader, reader.uint32());+ break;+ default:+ reader.skipType(tag & 7);+ break;+ }+ }+ return message;+ },++ fromJSON(object: any): CreateBookmarkRequest {+ return {+ parent: isSet(object.parent) ? String(object.parent) : "",+ bookmark: isSet(object.bookmark) ? Bookmark.fromJSON(object.bookmark) : undefined,+ };+ },++ toJSON(message: CreateBookmarkRequest): unknown {+ const obj: any = {};+ message.parent !== undefined && (obj.parent = message.parent);+ message.bookmark !== undefined && (obj.bookmark = message.bookmark ? Bookmark.toJSON(message.bookmark) : undefined);+ return obj;+ },++ fromPartial(object: DeepPartial<CreateBookmarkRequest>): CreateBookmarkRequest {+ const message = createBaseCreateBookmarkRequest();+ message.parent = object.parent ?? "";+ message.bookmark = (object.bookmark !== undefined && object.bookmark !== null)+ ? Bookmark.fromPartial(object.bookmark)+ : undefined;+ return message;+ },+};++function createBaseDeleteBookmarkRequest(): DeleteBookmarkRequest {+ return { name: "" };+}++export const DeleteBookmarkRequest = {+ encode(message: DeleteBookmarkRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {+ if (message.name !== "") {+ writer.uint32(10).string(message.name);+ }+ return writer;+ },++ decode(input: _m0.Reader | Uint8Array, length?: number): DeleteBookmarkRequest {+ const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);+ let end = length === undefined ? reader.len : reader.pos + length;+ const message = createBaseDeleteBookmarkRequest();+ while (reader.pos < end) {+ const tag = reader.uint32();+ switch (tag >>> 3) {+ case 1:+ message.name = reader.string();+ break;+ default:+ reader.skipType(tag & 7);+ break;+ }+ }+ return message;+ },++ fromJSON(object: any): DeleteBookmarkRequest {+ return { name: isSet(object.name) ? String(object.name) : "" };+ },++ toJSON(message: DeleteBookmarkRequest): unknown {+ const obj: any = {};+ message.name !== undefined && (obj.name = message.name);+ return obj;+ },++ fromPartial(object: DeepPartial<DeleteBookmarkRequest>): DeleteBookmarkRequest {+ const message = createBaseDeleteBookmarkRequest();+ message.name = object.name ?? "";+ return message;+ },+};++function createBaseListBookmarksRequest(): ListBookmarksRequest {+ return { parent: "", pageSize: 0, pageToken: "" };+}++export const ListBookmarksRequest = {+ encode(message: ListBookmarksRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {+ if (message.parent !== "") {+ writer.uint32(10).string(message.parent);+ }+ if (message.pageSize !== 0) {+ writer.uint32(16).int32(message.pageSize);+ }+ if (message.pageToken !== "") {+ writer.uint32(26).string(message.pageToken);+ }+ return writer;+ },++ decode(input: _m0.Reader | Uint8Array, length?: number): ListBookmarksRequest {+ const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);+ let end = length === undefined ? reader.len : reader.pos + length;+ const message = createBaseListBookmarksRequest();+ while (reader.pos < end) {+ const tag = reader.uint32();+ switch (tag >>> 3) {+ case 1:+ message.parent = reader.string();+ break;+ case 2:+ message.pageSize = reader.int32();+ break;+ case 3:+ message.pageToken = reader.string();+ break;+ default:+ reader.skipType(tag & 7);+ break;+ }+ }+ return message;+ },++ fromJSON(object: any): ListBookmarksRequest {+ return {+ parent: isSet(object.parent) ? String(object.parent) : "",+ pageSize: isSet(object.pageSize) ? Number(object.pageSize) : 0,+ pageToken: isSet(object.pageToken) ? String(object.pageToken) : "",+ };+ },++ toJSON(message: ListBookmarksRequest): unknown {+ const obj: any = {};+ message.parent !== undefined && (obj.parent = message.parent);+ message.pageSize !== undefined && (obj.pageSize = Math.round(message.pageSize));+ message.pageToken !== undefined && (obj.pageToken = message.pageToken);+ return obj;+ },++ fromPartial(object: DeepPartial<ListBookmarksRequest>): ListBookmarksRequest {+ const message = createBaseListBookmarksRequest();+ message.parent = object.parent ?? "";+ message.pageSize = object.pageSize ?? 0;+ message.pageToken = object.pageToken ?? "";+ return message;+ },+};++function createBaseListBookmarksResponse(): ListBookmarksResponse {+ return { bookmarks: [], nextPageToken: "" };+}++export const ListBookmarksResponse = {+ encode(message: ListBookmarksResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {+ for (const v of message.bookmarks) {+ Bookmark.encode(v!, writer.uint32(10).fork()).ldelim();+ }+ if (message.nextPageToken !== "") {+ writer.uint32(18).string(message.nextPageToken);+ }+ return writer;+ },++ decode(input: _m0.Reader | Uint8Array, length?: number): ListBookmarksResponse {+ const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);+ let end = length === undefined ? reader.len : reader.pos + length;+ const message = createBaseListBookmarksResponse();+ while (reader.pos < end) {+ const tag = reader.uint32();+ switch (tag >>> 3) {+ case 1:+ message.bookmarks.push(Bookmark.decode(reader, reader.uint32()));+ break;+ case 2:+ message.nextPageToken = reader.string();+ break;+ default:+ reader.skipType(tag & 7);+ break;+ }+ }+ return message;+ },++ fromJSON(object: any): ListBookmarksResponse {+ return {+ bookmarks: Array.isArray(object?.bookmarks) ? object.bookmarks.map((e: any) => Bookmark.fromJSON(e)) : [],+ nextPageToken: isSet(object.nextPageToken) ? String(object.nextPageToken) : "",+ };+ },++ toJSON(message: ListBookmarksResponse): unknown {+ const obj: any = {};+ if (message.bookmarks) {+ obj.bookmarks = message.bookmarks.map((e) => e ? Bookmark.toJSON(e) : undefined);+ } else {+ obj.bookmarks = [];+ }+ message.nextPageToken !== undefined && (obj.nextPageToken = message.nextPageToken);+ return obj;+ },++ fromPartial(object: DeepPartial<ListBookmarksResponse>): ListBookmarksResponse {+ const message = createBaseListBookmarksResponse();+ message.bookmarks = object.bookmarks?.map((e) => Bookmark.fromPartial(e)) || [];+ message.nextPageToken = object.nextPageToken ?? "";+ return message;+ },+};++function createBaseBookmark(): Bookmark {+ return { name: "", link: "" };+}++export const Bookmark = {+ encode(message: Bookmark, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {+ if (message.name !== "") {+ writer.uint32(10).string(message.name);+ }+ if (message.link !== "") {+ writer.uint32(18).string(message.link);+ }+ return writer;+ },++ decode(input: _m0.Reader | Uint8Array, length?: number): Bookmark {+ const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);+ let end = length === undefined ? reader.len : reader.pos + length;+ const message = createBaseBookmark();+ while (reader.pos < end) {+ const tag = reader.uint32();+ switch (tag >>> 3) {+ case 1:+ message.name = reader.string();+ break;+ case 2:+ message.link = reader.string();+ break;+ default:+ reader.skipType(tag & 7);+ break;+ }+ }+ return message;+ },++ fromJSON(object: any): Bookmark {+ return { name: isSet(object.name) ? String(object.name) : "", link: isSet(object.link) ? String(object.link) : "" };+ },++ toJSON(message: Bookmark): unknown {+ const obj: any = {};+ message.name !== undefined && (obj.name = message.name);+ message.link !== undefined && (obj.link = message.link);+ return obj;+ },++ fromPartial(object: DeepPartial<Bookmark>): Bookmark {+ const message = createBaseBookmark();+ message.name = object.name ?? "";+ message.link = object.link ?? "";+ return message;+ },+};++export type BookmarkServiceDefinition = typeof BookmarkServiceDefinition;+export const BookmarkServiceDefinition = {+ name: "BookmarkService",+ fullName: "bytebase.v1.BookmarkService",+ methods: {+ /** CreateBookmark creates a new bookmark. */+ createBookmark: {+ name: "CreateBookmark",+ requestType: CreateBookmarkRequest,+ requestStream: false,+ responseType: Bookmark,+ responseStream: false,+ options: {},+ },+ /** DeleteBookmark deletes a bookmark. */+ deleteBookmark: {+ name: "DeleteBookmark",+ requestType: DeleteBookmarkRequest,+ requestStream: false,+ responseType: Empty,+ responseStream: false,+ options: {},+ },+ /** ListBookmark lists bookmarks. */+ listBookmarks: {+ name: "ListBookmarks",+ requestType: ListBookmarksRequest,+ requestStream: false,+ responseType: ListBookmarksResponse,+ responseStream: false,+ options: {},+ },+ },+} as const;++export interface BookmarkServiceImplementation<CallContextExt = {}> {+ /** CreateBookmark creates a new bookmark. */+ createBookmark(request: CreateBookmarkRequest, context: CallContext & CallContextExt): Promise<DeepPartial<Bookmark>>;+ /** DeleteBookmark deletes a bookmark. */+ deleteBookmark(request: DeleteBookmarkRequest, context: CallContext & CallContextExt): Promise<DeepPartial<Empty>>;+ /** ListBookmark lists bookmarks. */+ listBookmarks(+ request: ListBookmarksRequest,+ context: CallContext & CallContextExt,+ ): Promise<DeepPartial<ListBookmarksResponse>>;+}++export interface BookmarkServiceClient<CallOptionsExt = {}> {+ /** CreateBookmark creates a new bookmark. */+ createBookmark(+ request: DeepPartial<CreateBookmarkRequest>,+ options?: CallOptions & CallOptionsExt,+ ): Promise<Bookmark>;+ /** DeleteBookmark deletes a bookmark. */+ deleteBookmark(request: DeepPartial<DeleteBookmarkRequest>, options?: CallOptions & CallOptionsExt): Promise<Empty>;+ /** ListBookmark lists bookmarks. */+ listBookmarks(+ request: DeepPartial<ListBookmarksRequest>,+ options?: CallOptions & CallOptionsExt,+ ): Promise<ListBookmarksResponse>;+}++type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined;++export type DeepPartial<T> = T extends Builtin ? T+ : T extends Array<infer U> ? Array<DeepPartial<U>> : T extends ReadonlyArray<infer U> ? ReadonlyArray<DeepPartial<U>>+ : T extends {} ? { [K in keyof T]?: DeepPartial<T[K]> }+ : Partial<T>;++function isSet(value: any): boolean {+ return value !== null && value !== undefined;+}diff --git a/proto/generated-go/v1/bookmark_service.pb.go b/proto/generated-go/v1/bookmark_service.pb.gonew file mode 100644index 0000000000..6eb57825b5--- /dev/null+++ b/proto/generated-go/v1/bookmark_service.pb.go@@ -0,0 +1,527 @@+// Code generated by protoc-gen-go. DO NOT EDIT.+// versions:+// protoc-gen-go v1.28.1+// protoc (unknown)+// source: v1/bookmark_service.proto++package v1++import (+ _ "google.golang.org/genproto/googleapis/api/annotations"+ protoreflect "google.golang.org/protobuf/reflect/protoreflect"+ protoimpl "google.golang.org/protobuf/runtime/protoimpl"+ emptypb "google.golang.org/protobuf/types/known/emptypb"+ _ "google.golang.org/protobuf/types/known/fieldmaskpb"+ _ "google.golang.org/protobuf/types/known/wrapperspb"+ 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 CreateBookmarkRequest struct {+ state protoimpl.MessageState+ sizeCache protoimpl.SizeCache+ unknownFields protoimpl.UnknownFields++ // The parent resource of the bookmark.+ // Format: users/{user}, user is a server-generated unique IDs.+ Parent string `protobuf:"bytes,1,opt,name=parent,proto3" json:"parent,omitempty"`+ // The bookmark to create.+ Bookmark *Bookmark `protobuf:"bytes,2,opt,name=bookmark,proto3" json:"bookmark,omitempty"`+}++func (x *CreateBookmarkRequest) Reset() {+ *x = CreateBookmarkRequest{}+ if protoimpl.UnsafeEnabled {+ mi := &file_v1_bookmark_service_proto_msgTypes[0]+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))+ ms.StoreMessageInfo(mi)+ }+}++func (x *CreateBookmarkRequest) String() string {+ return protoimpl.X.MessageStringOf(x)+}++func (*CreateBookmarkRequest) ProtoMessage() {}++func (x *CreateBookmarkRequest) ProtoReflect() protoreflect.Message {+ mi := &file_v1_bookmark_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 CreateBookmarkRequest.ProtoReflect.Descriptor instead.+func (*CreateBookmarkRequest) Descriptor() ([]byte, []int) {+ return file_v1_bookmark_service_proto_rawDescGZIP(), []int{0}+}++func (x *CreateBookmarkRequest) GetParent() string {+ if x != nil {+ return x.Parent+ }+ return ""+}++func (x *CreateBookmarkRequest) GetBookmark() *Bookmark {+ if x != nil {+ return x.Bookmark+ }+ return nil+}++type DeleteBookmarkRequest struct {+ state protoimpl.MessageState+ sizeCache protoimpl.SizeCache+ unknownFields protoimpl.UnknownFields++ // The name of the bookmark to delete.+ // Format: users/{user}/bookmarks/{bookmark}, user and bookmark are server-generated unique IDs.+ Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`+}++func (x *DeleteBookmarkRequest) Reset() {+ *x = DeleteBookmarkRequest{}+ if protoimpl.UnsafeEnabled {+ mi := &file_v1_bookmark_service_proto_msgTypes[1]+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))+ ms.StoreMessageInfo(mi)+ }+}++func (x *DeleteBookmarkRequest) String() string {+ return protoimpl.X.MessageStringOf(x)+}++func (*DeleteBookmarkRequest) ProtoMessage() {}++func (x *DeleteBookmarkRequest) ProtoReflect() protoreflect.Message {+ mi := &file_v1_bookmark_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 DeleteBookmarkRequest.ProtoReflect.Descriptor instead.+func (*DeleteBookmarkRequest) Descriptor() ([]byte, []int) {+ return file_v1_bookmark_service_proto_rawDescGZIP(), []int{1}+}++func (x *DeleteBookmarkRequest) GetName() string {+ if x != nil {+ return x.Name+ }+ return ""+}++type ListBookmarksRequest struct {+ state protoimpl.MessageState+ sizeCache protoimpl.SizeCache+ unknownFields protoimpl.UnknownFields++ // The parent resource of the bookmark.+ // Format: users/{user}, user is a server-generated unique ID.+ Parent string `protobuf:"bytes,1,opt,name=parent,proto3" json:"parent,omitempty"`+ // Not used. The maximum number of bookmarks to return. The service may return fewer than+ // this value.+ // If unspecified, at most 50 bookmarks will be returned.+ // The maximum value is 1000; values above 1000 will be coerced to 1000.+ PageSize int32 `protobuf:"varint,2,opt,name=page_size,json=pageSize,proto3" json:"page_size,omitempty"`+ // Not used. A page token, received from a previous `ListBookmarks` call.+ // Provide this to retrieve the subsequent page.+ //+ // When paginating, all other parameters provided to `ListBookmarks` must match+ // the call that provided the page token.+ PageToken string `protobuf:"bytes,3,opt,name=page_token,json=pageToken,proto3" json:"page_token,omitempty"`+}++func (x *ListBookmarksRequest) Reset() {+ *x = ListBookmarksRequest{}+ if protoimpl.UnsafeEnabled {+ mi := &file_v1_bookmark_service_proto_msgTypes[2]+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))+ ms.StoreMessageInfo(mi)+ }+}++func (x *ListBookmarksRequest) String() string {+ return protoimpl.X.MessageStringOf(x)+}++func (*ListBookmarksRequest) ProtoMessage() {}++func (x *ListBookmarksRequest) ProtoReflect() protoreflect.Message {+ mi := &file_v1_bookmark_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 ListBookmarksRequest.ProtoReflect.Descriptor instead.+func (*ListBookmarksRequest) Descriptor() ([]byte, []int) {+ return file_v1_bookmark_service_proto_rawDescGZIP(), []int{2}+}++func (x *ListBookmarksRequest) GetParent() string {+ if x != nil {+ return x.Parent+ }+ return ""+}++func (x *ListBookmarksRequest) GetPageSize() int32 {+ if x != nil {+ return x.PageSize+ }+ return 0+}++func (x *ListBookmarksRequest) GetPageToken() string {+ if x != nil {+ return x.PageToken+ }+ return ""+}++type ListBookmarksResponse struct {+ state protoimpl.MessageState+ sizeCache protoimpl.SizeCache+ unknownFields protoimpl.UnknownFields++ // The list of bookmarks.+ Bookmarks []*Bookmark `protobuf:"bytes,1,rep,name=bookmarks,proto3" json:"bookmarks,omitempty"`+ // Not used. A token, which can be sent as `page_token` to retrieve the next page.+ // If this field is omitted, there are no subsequent pages.+ NextPageToken string `protobuf:"bytes,2,opt,name=next_page_token,json=nextPageToken,proto3" json:"next_page_token,omitempty"`+}++func (x *ListBookmarksResponse) Reset() {+ *x = ListBookmarksResponse{}+ if protoimpl.UnsafeEnabled {+ mi := &file_v1_bookmark_service_proto_msgTypes[3]+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))+ ms.StoreMessageInfo(mi)+ }+}++func (x *ListBookmarksResponse) String() string {+ return protoimpl.X.MessageStringOf(x)+}++func (*ListBookmarksResponse) ProtoMessage() {}++func (x *ListBookmarksResponse) ProtoReflect() protoreflect.Message {+ mi := &file_v1_bookmark_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 ListBookmarksResponse.ProtoReflect.Descriptor instead.+func (*ListBookmarksResponse) Descriptor() ([]byte, []int) {+ return file_v1_bookmark_service_proto_rawDescGZIP(), []int{3}+}++func (x *ListBookmarksResponse) GetBookmarks() []*Bookmark {+ if x != nil {+ return x.Bookmarks+ }+ return nil+}++func (x *ListBookmarksResponse) GetNextPageToken() string {+ if x != nil {+ return x.NextPageToken+ }+ return ""+}++type Bookmark struct {+ state protoimpl.MessageState+ sizeCache protoimpl.SizeCache+ unknownFields protoimpl.UnknownFields++ // The name of the bookmark.+ // Format: users/{user}/bookmarks/{bookmark}, user and bookmark are server-generated unique IDs.+ Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`+ // The resource link of the bookmark. Only support issue link for now.+ // Format:+ // Issue: /issue/slug(issue_name)-{issue_uid}+ // Example: /issue/start-here-add-email-column-to-employee-table-101+ Link string `protobuf:"bytes,2,opt,name=link,proto3" json:"link,omitempty"`+}++func (x *Bookmark) Reset() {+ *x = Bookmark{}+ if protoimpl.UnsafeEnabled {+ mi := &file_v1_bookmark_service_proto_msgTypes[4]+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))+ ms.StoreMessageInfo(mi)+ }+}++func (x *Bookmark) String() string {+ return protoimpl.X.MessageStringOf(x)+}++func (*Bookmark) ProtoMessage() {}++func (x *Bookmark) ProtoReflect() protoreflect.Message {+ mi := &file_v1_bookmark_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 Bookmark.ProtoReflect.Descriptor instead.+func (*Bookmark) Descriptor() ([]byte, []int) {+ return file_v1_bookmark_service_proto_rawDescGZIP(), []int{4}+}++func (x *Bookmark) GetName() string {+ if x != nil {+ return x.Name+ }+ return ""+}++func (x *Bookmark) GetLink() string {+ if x != nil {+ return x.Link+ }+ return ""+}++var File_v1_bookmark_service_proto protoreflect.FileDescriptor++var file_v1_bookmark_service_proto_rawDesc = []byte{+ 0x0a, 0x19, 0x76, 0x31, 0x2f, 0x62, 0x6f, 0x6f, 0x6b, 0x6d, 0x61, 0x72, 0x6b, 0x5f, 0x73, 0x65,+ 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0b, 0x62, 0x79, 0x74,+ 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x1a, 0x1c, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65,+ 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73,+ 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x17, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61,+ 0x70, 0x69, 0x2f, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a,+ 0x1f, 0x67, 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,+ 0x1e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66,+ 0x2f, 0x77, 0x72, 0x61, 0x70, 0x70, 0x65, 0x72, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a,+ 0x0f, 0x76, 0x31, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f,+ 0x22, 0x68, 0x0a, 0x15, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x42, 0x6f, 0x6f, 0x6b, 0x6d, 0x61,+ 0x72, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x70, 0x61, 0x72,+ 0x65, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x70, 0x61, 0x72, 0x65, 0x6e,+ 0x74, 0x12, 0x37, 0x0a, 0x08, 0x62, 0x6f, 0x6f, 0x6b, 0x6d, 0x61, 0x72, 0x6b, 0x18, 0x02, 0x20,+ 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76,+ 0x31, 0x2e, 0x42, 0x6f, 0x6f, 0x6b, 0x6d, 0x61, 0x72, 0x6b, 0x42, 0x04, 0xe2, 0x41, 0x01, 0x02,+ 0x52, 0x08, 0x62, 0x6f, 0x6f, 0x6b, 0x6d, 0x61, 0x72, 0x6b, 0x22, 0x31, 0x0a, 0x15, 0x44, 0x65,+ 0x6c, 0x65, 0x74, 0x65, 0x42, 0x6f, 0x6f, 0x6b, 0x6d, 0x61, 0x72, 0x6b, 0x52, 0x65, 0x71, 0x75,+ 0x65, 0x73, 0x74, 0x12, 0x18, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28,+ 0x09, 0x42, 0x04, 0xe2, 0x41, 0x01, 0x02, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0x6a, 0x0a,+ 0x14, 0x4c, 0x69, 0x73, 0x74, 0x42, 0x6f, 0x6f, 0x6b, 0x6d, 0x61, 0x72, 0x6b, 0x73, 0x52, 0x65,+ 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x18,+ 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x12, 0x1b, 0x0a,+ 0x09, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x02, 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, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09,+ 0x70, 0x61, 0x67, 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x22, 0x74, 0x0a, 0x15, 0x4c, 0x69, 0x73,+ 0x74, 0x42, 0x6f, 0x6f, 0x6b, 0x6d, 0x61, 0x72, 0x6b, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e,+ 0x73, 0x65, 0x12, 0x33, 0x0a, 0x09, 0x62, 0x6f, 0x6f, 0x6b, 0x6d, 0x61, 0x72, 0x6b, 0x73, 0x18,+ 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65,+ 0x2e, 0x76, 0x31, 0x2e, 0x42, 0x6f, 0x6f, 0x6b, 0x6d, 0x61, 0x72, 0x6b, 0x52, 0x09, 0x62, 0x6f,+ 0x6f, 0x6b, 0x6d, 0x61, 0x72, 0x6b, 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,+ 0x3e, 0x0a, 0x08, 0x42, 0x6f, 0x6f, 0x6b, 0x6d, 0x61, 0x72, 0x6b, 0x12, 0x18, 0x0a, 0x04, 0x6e,+ 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x04, 0xe2, 0x41, 0x01, 0x03, 0x52,+ 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x18, 0x0a, 0x04, 0x6c, 0x69, 0x6e, 0x6b, 0x18, 0x02, 0x20,+ 0x01, 0x28, 0x09, 0x42, 0x04, 0xe2, 0x41, 0x01, 0x02, 0x52, 0x04, 0x6c, 0x69, 0x6e, 0x6b, 0x32,+ 0xaa, 0x03, 0x0a, 0x0f, 0x42, 0x6f, 0x6f, 0x6b, 0x6d, 0x61, 0x72, 0x6b, 0x53, 0x65, 0x72, 0x76,+ 0x69, 0x63, 0x65, 0x12, 0x8f, 0x01, 0x0a, 0x0e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x42, 0x6f,+ 0x6f, 0x6b, 0x6d, 0x61, 0x72, 0x6b, 0x12, 0x22, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73,+ 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x42, 0x6f, 0x6f, 0x6b, 0x6d,+ 0x61, 0x72, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x15, 0x2e, 0x62, 0x79, 0x74,+ 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x42, 0x6f, 0x6f, 0x6b, 0x6d, 0x61, 0x72,+ 0x6b, 0x22, 0x42, 0xda, 0x41, 0x0f, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x2c, 0x62, 0x6f, 0x6f,+ 0x6b, 0x6d, 0x61, 0x72, 0x6b, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x2a, 0x3a, 0x08, 0x62, 0x6f, 0x6f,+ 0x6b, 0x6d, 0x61, 0x72, 0x6b, 0x22, 0x1e, 0x2f, 0x76, 0x31, 0x2f, 0x7b, 0x70, 0x61, 0x72, 0x65,+ 0x6e, 0x74, 0x3d, 0x75, 0x73, 0x65, 0x72, 0x73, 0x2f, 0x2a, 0x7d, 0x2f, 0x62, 0x6f, 0x6f, 0x6b,+ 0x6d, 0x61, 0x72, 0x6b, 0x73, 0x12, 0x7b, 0x0a, 0x0e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x42,+ 0x6f, 0x6f, 0x6b, 0x6d, 0x61, 0x72, 0x6b, 0x12, 0x22, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61,+ 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x42, 0x6f, 0x6f, 0x6b,+ 0x6d, 0x61, 0x72, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x67, 0x6f,+ 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d,+ 0x70, 0x74, 0x79, 0x22, 0x2d, 0xda, 0x41, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x82, 0xd3, 0xe4, 0x93,+ 0x02, 0x20, 0x2a, 0x1e, 0x2f, 0x76, 0x31, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x75, 0x73,+ 0x65, 0x72, 0x73, 0x2f, 0x2a, 0x2f, 0x62, 0x6f, 0x6f, 0x6b, 0x6d, 0x61, 0x72, 0x6b, 0x73, 0x2f,+ 0x2a, 0x7d, 0x12, 0x87, 0x01, 0x0a, 0x0d, 0x4c, 0x69, 0x73, 0x74, 0x42, 0x6f, 0x6f, 0x6b, 0x6d,+ 0x61, 0x72, 0x6b, 0x73, 0x12, 0x21, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e,+ 0x76, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x42, 0x6f, 0x6f, 0x6b, 0x6d, 0x61, 0x72, 0x6b, 0x73,+ 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x22, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61,+ 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x42, 0x6f, 0x6f, 0x6b, 0x6d, 0x61,+ 0x72, 0x6b, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x2f, 0xda, 0x41, 0x06,+ 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x20, 0x12, 0x1e, 0x2f, 0x76,+ 0x31, 0x2f, 0x7b, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x3d, 0x75, 0x73, 0x65, 0x72, 0x73, 0x2f,+ 0x2a, 0x7d, 0x2f, 0x62, 0x6f, 0x6f, 0x6b, 0x6d, 0x61, 0x72, 0x6b, 0x73, 0x42, 0x11, 0x5a, 0x0f,+ 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2d, 0x67, 0x6f, 0x2f, 0x76, 0x31, 0x62,+ 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,+}++var (+ file_v1_bookmark_service_proto_rawDescOnce sync.Once+ file_v1_bookmark_service_proto_rawDescData = file_v1_bookmark_service_proto_rawDesc+)++func file_v1_bookmark_service_proto_rawDescGZIP() []byte {+ file_v1_bookmark_service_proto_rawDescOnce.Do(func() {+ file_v1_bookmark_service_proto_rawDescData = protoimpl.X.CompressGZIP(file_v1_bookmark_service_proto_rawDescData)+ })+ return file_v1_bookmark_service_proto_rawDescData+}++var file_v1_bookmark_service_proto_msgTypes = make([]protoimpl.MessageInfo, 5)+var file_v1_bookmark_service_proto_goTypes = []interface{}{+ (*CreateBookmarkRequest)(nil), // 0: bytebase.v1.CreateBookmarkRequest+ (*DeleteBookmarkRequest)(nil), // 1: bytebase.v1.DeleteBookmarkRequest+ (*ListBookmarksRequest)(nil), // 2: bytebase.v1.ListBookmarksRequest+ (*ListBookmarksResponse)(nil), // 3: bytebase.v1.ListBookmarksResponse+ (*Bookmark)(nil), // 4: bytebase.v1.Bookmark+ (*emptypb.Empty)(nil), // 5: google.protobuf.Empty+}+var file_v1_bookmark_service_proto_depIdxs = []int32{+ 4, // 0: bytebase.v1.CreateBookmarkRequest.bookmark:type_name -> bytebase.v1.Bookmark+ 4, // 1: bytebase.v1.ListBookmarksResponse.bookmarks:type_name -> bytebase.v1.Bookmark+ 0, // 2: bytebase.v1.BookmarkService.CreateBookmark:input_type -> bytebase.v1.CreateBookmarkRequest+ 1, // 3: bytebase.v1.BookmarkService.DeleteBookmark:input_type -> bytebase.v1.DeleteBookmarkRequest+ 2, // 4: bytebase.v1.BookmarkService.ListBookmarks:input_type -> bytebase.v1.ListBookmarksRequest+ 4, // 5: bytebase.v1.BookmarkService.CreateBookmark:output_type -> bytebase.v1.Bookmark+ 5, // 6: bytebase.v1.BookmarkService.DeleteBookmark:output_type -> google.protobuf.Empty+ 3, // 7: bytebase.v1.BookmarkService.ListBookmarks:output_type -> bytebase.v1.ListBookmarksResponse+ 5, // [5:8] is the sub-list for method output_type+ 2, // [2:5] is the sub-list for method input_type+ 2, // [2:2] is the sub-list for extension type_name+ 2, // [2:2] is the sub-list for extension extendee+ 0, // [0:2] is the sub-list for field type_name+}++func init() { file_v1_bookmark_service_proto_init() }+func file_v1_bookmark_service_proto_init() {+ if File_v1_bookmark_service_proto != nil {+ return+ }+ file_v1_common_proto_init()+ if !protoimpl.UnsafeEnabled {+ file_v1_bookmark_service_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {+ switch v := v.(*CreateBookmarkRequest); i {+ case 0:+ return &v.state+ case 1:+ return &v.sizeCache+ case 2:+ return &v.unknownFields+ default:+ return nil+ }+ }+ file_v1_bookmark_service_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {+ switch v := v.(*DeleteBookmarkRequest); i {+ case 0:+ return &v.state+ case 1:+ return &v.sizeCache+ case 2:+ return &v.unknownFields+ default:+ return nil+ }+ }+ file_v1_bookmark_service_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {+ switch v := v.(*ListBookmarksRequest); i {+ case 0:+ return &v.state+ case 1:+ return &v.sizeCache+ case 2:+ return &v.unknownFields+ default:+ return nil+ }+ }+ file_v1_bookmark_service_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} {+ switch v := v.(*ListBookmarksResponse); i {+ case 0:+ return &v.state+ case 1:+ return &v.sizeCache+ case 2:+ return &v.unknownFields+ default:+ return nil+ }+ }+ file_v1_bookmark_service_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} {+ switch v := v.(*Bookmark); 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_v1_bookmark_service_proto_rawDesc,+ NumEnums: 0,+ NumMessages: 5,+ NumExtensions: 0,+ NumServices: 1,+ },+ GoTypes: file_v1_bookmark_service_proto_goTypes,+ DependencyIndexes: file_v1_bookmark_service_proto_depIdxs,+ MessageInfos: file_v1_bookmark_service_proto_msgTypes,+ }.Build()+ File_v1_bookmark_service_proto = out.File+ file_v1_bookmark_service_proto_rawDesc = nil+ file_v1_bookmark_service_proto_goTypes = nil+ file_v1_bookmark_service_proto_depIdxs = nil+}diff --git a/proto/generated-go/v1/bookmark_service.pb.gw.go b/proto/generated-go/v1/bookmark_service.pb.gw.gonew file mode 100644index 0000000000..21505b4583--- /dev/null+++ b/proto/generated-go/v1/bookmark_service.pb.gw.go@@ -0,0 +1,429 @@+// Code generated by protoc-gen-grpc-gateway. DO NOT EDIT.+// source: v1/bookmark_service.proto++/*+Package v1 is a reverse proxy.++It translates gRPC into RESTful JSON APIs.+*/+package v1++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_BookmarkService_CreateBookmark_0(ctx context.Context, marshaler runtime.Marshaler, client BookmarkServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {+ var protoReq CreateBookmarkRequest+ var metadata runtime.ServerMetadata++ newReader, berr := utilities.IOReaderFactory(req.Body)+ if berr != nil {+ return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr)+ }+ if err := marshaler.NewDecoder(newReader()).Decode(&protoReq.Bookmark); err != nil && err != io.EOF {+ return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)+ }++ var (+ val string+ ok bool+ err error+ _ = err+ )++ val, ok = pathParams["parent"]+ if !ok {+ return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "parent")+ }++ protoReq.Parent, err = runtime.String(val)+ if err != nil {+ return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "parent", err)+ }++ msg, err := client.CreateBookmark(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))+ return msg, metadata, err++}++func local_request_BookmarkService_CreateBookmark_0(ctx context.Context, marshaler runtime.Marshaler, server BookmarkServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {+ var protoReq CreateBookmarkRequest+ var metadata runtime.ServerMetadata++ newReader, berr := utilities.IOReaderFactory(req.Body)+ if berr != nil {+ return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr)+ }+ if err := marshaler.NewDecoder(newReader()).Decode(&protoReq.Bookmark); err != nil && err != io.EOF {+ return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)+ }++ var (+ val string+ ok bool+ err error+ _ = err+ )++ val, ok = pathParams["parent"]+ if !ok {+ return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "parent")+ }++ protoReq.Parent, err = runtime.String(val)+ if err != nil {+ return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "parent", err)+ }++ msg, err := server.CreateBookmark(ctx, &protoReq)+ return msg, metadata, err++}++func request_BookmarkService_DeleteBookmark_0(ctx context.Context, marshaler runtime.Marshaler, client BookmarkServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {+ var protoReq DeleteBookmarkRequest+ var metadata runtime.ServerMetadata++ var (+ val string+ ok bool+ err error+ _ = err+ )++ val, ok = pathParams["name"]+ if !ok {+ return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "name")+ }++ protoReq.Name, err = runtime.String(val)+ if err != nil {+ return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "name", err)+ }++ msg, err := client.DeleteBookmark(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))+ return msg, metadata, err++}++func local_request_BookmarkService_DeleteBookmark_0(ctx context.Context, marshaler runtime.Marshaler, server BookmarkServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {+ var protoReq DeleteBookmarkRequest+ var metadata runtime.ServerMetadata++ var (+ val string+ ok bool+ err error+ _ = err+ )++ val, ok = pathParams["name"]+ if !ok {+ return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "name")+ }++ protoReq.Name, err = runtime.String(val)+ if err != nil {+ return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "name", err)+ }++ msg, err := server.DeleteBookmark(ctx, &protoReq)+ return msg, metadata, err++}++var (+ filter_BookmarkService_ListBookmarks_0 = &utilities.DoubleArray{Encoding: map[string]int{"parent": 0}, Base: []int{1, 2, 0, 0}, Check: []int{0, 1, 2, 2}}+)++func request_BookmarkService_ListBookmarks_0(ctx context.Context, marshaler runtime.Marshaler, client BookmarkServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {+ var protoReq ListBookmarksRequest+ var metadata runtime.ServerMetadata++ var (+ val string+ ok bool+ err error+ _ = err+ )++ val, ok = pathParams["parent"]+ if !ok {+ return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "parent")+ }++ protoReq.Parent, err = runtime.String(val)+ if err != nil {+ return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "parent", err)+ }++ if err := req.ParseForm(); err != nil {+ return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)+ }+ if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_BookmarkService_ListBookmarks_0); err != nil {+ return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)+ }++ msg, err := client.ListBookmarks(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))+ return msg, metadata, err++}++func local_request_BookmarkService_ListBookmarks_0(ctx context.Context, marshaler runtime.Marshaler, server BookmarkServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {+ var protoReq ListBookmarksRequest+ var metadata runtime.ServerMetadata++ var (+ val string+ ok bool+ err error+ _ = err+ )++ val, ok = pathParams["parent"]+ if !ok {+ return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "parent")+ }++ protoReq.Parent, err = runtime.String(val)+ if err != nil {+ return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "parent", err)+ }++ if err := req.ParseForm(); err != nil {+ return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)+ }+ if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_BookmarkService_ListBookmarks_0); err != nil {+ return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)+ }++ msg, err := server.ListBookmarks(ctx, &protoReq)+ return msg, metadata, err++}++// RegisterBookmarkServiceHandlerServer registers the http handlers for service BookmarkService to "mux".+// UnaryRPC :call BookmarkServiceServer 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 RegisterBookmarkServiceHandlerFromEndpoint instead.+func RegisterBookmarkServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server BookmarkServiceServer) error {++ mux.Handle("POST", pattern_BookmarkService_CreateBookmark_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, "/bytebase.v1.BookmarkService/CreateBookmark", runtime.WithHTTPPathPattern("/v1/{parent=users/*}/bookmarks"))+ if err != nil {+ runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)+ return+ }+ resp, md, err := local_request_BookmarkService_CreateBookmark_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_BookmarkService_CreateBookmark_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)++ })++ mux.Handle("DELETE", pattern_BookmarkService_DeleteBookmark_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, "/bytebase.v1.BookmarkService/DeleteBookmark", runtime.WithHTTPPathPattern("/v1/{name=users/*/bookmarks/*}"))+ if err != nil {+ runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)+ return+ }+ resp, md, err := local_request_BookmarkService_DeleteBookmark_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_BookmarkService_DeleteBookmark_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)++ })++ mux.Handle("GET", pattern_BookmarkService_ListBookmarks_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, "/bytebase.v1.BookmarkService/ListBookmarks", runtime.WithHTTPPathPattern("/v1/{parent=users/*}/bookmarks"))+ if err != nil {+ runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)+ return+ }+ resp, md, err := local_request_BookmarkService_ListBookmarks_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_BookmarkService_ListBookmarks_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)++ })++ return nil+}++// RegisterBookmarkServiceHandlerFromEndpoint is same as RegisterBookmarkServiceHandler but+// automatically dials to "endpoint" and closes the connection when "ctx" gets done.+func RegisterBookmarkServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error) {+ conn, err := grpc.Dial(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 RegisterBookmarkServiceHandler(ctx, mux, conn)+}++// RegisterBookmarkServiceHandler registers the http handlers for service BookmarkService to "mux".+// The handlers forward requests to the grpc endpoint over "conn".+func RegisterBookmarkServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error {+ return RegisterBookmarkServiceHandlerClient(ctx, mux, NewBookmarkServiceClient(conn))+}++// RegisterBookmarkServiceHandlerClient registers the http handlers for service BookmarkService+// to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "BookmarkServiceClient".+// Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "BookmarkServiceClient"+// doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in+// "BookmarkServiceClient" to call the correct interceptors.+func RegisterBookmarkServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client BookmarkServiceClient) error {++ mux.Handle("POST", pattern_BookmarkService_CreateBookmark_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, "/bytebase.v1.BookmarkService/CreateBookmark", runtime.WithHTTPPathPattern("/v1/{parent=users/*}/bookmarks"))+ if err != nil {+ runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)+ return+ }+ resp, md, err := request_BookmarkService_CreateBookmark_0(annotatedContext, inboundMarshaler, client, req, pathParams)+ annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)+ if err != nil {+ runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)+ return+ }++ forward_BookmarkService_CreateBookmark_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)++ })++ mux.Handle("DELETE", pattern_BookmarkService_DeleteBookmark_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, "/bytebase.v1.BookmarkService/DeleteBookmark", runtime.WithHTTPPathPattern("/v1/{name=users/*/bookmarks/*}"))+ if err != nil {+ runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)+ return+ }+ resp, md, err := request_BookmarkService_DeleteBookmark_0(annotatedContext, inboundMarshaler, client, req, pathParams)+ annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)+ if err != nil {+ runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)+ return+ }++ forward_BookmarkService_DeleteBookmark_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)++ })++ mux.Handle("GET", pattern_BookmarkService_ListBookmarks_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, "/bytebase.v1.BookmarkService/ListBookmarks", runtime.WithHTTPPathPattern("/v1/{parent=users/*}/bookmarks"))+ if err != nil {+ runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)+ return+ }+ resp, md, err := request_BookmarkService_ListBookmarks_0(annotatedContext, inboundMarshaler, client, req, pathParams)+ annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)+ if err != nil {+ runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)+ return+ }++ forward_BookmarkService_ListBookmarks_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)++ })++ return nil+}++var (+ pattern_BookmarkService_CreateBookmark_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 2, 5, 2, 2, 3}, []string{"v1", "users", "parent", "bookmarks"}, ""))++ pattern_BookmarkService_DeleteBookmark_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 2, 2, 1, 0, 4, 4, 5, 3}, []string{"v1", "users", "bookmarks", "name"}, ""))++ pattern_BookmarkService_ListBookmarks_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 2, 5, 2, 2, 3}, []string{"v1", "users", "parent", "bookmarks"}, ""))+)++var (+ forward_BookmarkService_CreateBookmark_0 = runtime.ForwardResponseMessage++ forward_BookmarkService_DeleteBookmark_0 = runtime.ForwardResponseMessage++ forward_BookmarkService_ListBookmarks_0 = runtime.ForwardResponseMessage+)diff --git a/proto/generated-go/v1/bookmark_service_grpc.pb.go b/proto/generated-go/v1/bookmark_service_grpc.pb.gonew file mode 100644index 0000000000..a235f6f4a1--- /dev/null+++ b/proto/generated-go/v1/bookmark_service_grpc.pb.go@@ -0,0 +1,184 @@+// Code generated by protoc-gen-go-grpc. DO NOT EDIT.+// versions:+// - protoc-gen-go-grpc v1.2.0+// - protoc (unknown)+// source: v1/bookmark_service.proto++package v1++import (+ context "context"+ grpc "google.golang.org/grpc"+ codes "google.golang.org/grpc/codes"+ status "google.golang.org/grpc/status"+ emptypb "google.golang.org/protobuf/types/known/emptypb"+)++// This is a compile-time assertion to ensure that this generated file+// is compatible with the grpc package it is being compiled against.+// Requires gRPC-Go v1.32.0 or later.+const _ = grpc.SupportPackageIsVersion7++// BookmarkServiceClient is the client API for BookmarkService 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 BookmarkServiceClient interface {+ // CreateBookmark creates a new bookmark.+ CreateBookmark(ctx context.Context, in *CreateBookmarkRequest, opts ...grpc.CallOption) (*Bookmark, error)+ // DeleteBookmark deletes a bookmark.+ DeleteBookmark(ctx context.Context, in *DeleteBookmarkRequest, opts ...grpc.CallOption) (*emptypb.Empty, error)+ // ListBookmark lists bookmarks.+ ListBookmarks(ctx context.Context, in *ListBookmarksRequest, opts ...grpc.CallOption) (*ListBookmarksResponse, error)+}++type bookmarkServiceClient struct {+ cc grpc.ClientConnInterface+}++func NewBookmarkServiceClient(cc grpc.ClientConnInterface) BookmarkServiceClient {+ return &bookmarkServiceClient{cc}+}++func (c *bookmarkServiceClient) CreateBookmark(ctx context.Context, in *CreateBookmarkRequest, opts ...grpc.CallOption) (*Bookmark, error) {+ out := new(Bookmark)+ err := c.cc.Invoke(ctx, "/bytebase.v1.BookmarkService/CreateBookmark", in, out, opts...)+ if err != nil {+ return nil, err+ }+ return out, nil+}++func (c *bookmarkServiceClient) DeleteBookmark(ctx context.Context, in *DeleteBookmarkRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) {+ out := new(emptypb.Empty)+ err := c.cc.Invoke(ctx, "/bytebase.v1.BookmarkService/DeleteBookmark", in, out, opts...)+ if err != nil {+ return nil, err+ }+ return out, nil+}++func (c *bookmarkServiceClient) ListBookmarks(ctx context.Context, in *ListBookmarksRequest, opts ...grpc.CallOption) (*ListBookmarksResponse, error) {+ out := new(ListBookmarksResponse)+ err := c.cc.Invoke(ctx, "/bytebase.v1.BookmarkService/ListBookmarks", in, out, opts...)+ if err != nil {+ return nil, err+ }+ return out, nil+}++// BookmarkServiceServer is the server API for BookmarkService service.+// All implementations must embed UnimplementedBookmarkServiceServer+// for forward compatibility+type BookmarkServiceServer interface {+ // CreateBookmark creates a new bookmark.+ CreateBookmark(context.Context, *CreateBookmarkRequest) (*Bookmark, error)+ // DeleteBookmark deletes a bookmark.+ DeleteBookmark(context.Context, *DeleteBookmarkRequest) (*emptypb.Empty, error)+ // ListBookmark lists bookmarks.+ ListBookmarks(context.Context, *ListBookmarksRequest) (*ListBookmarksResponse, error)+ mustEmbedUnimplementedBookmarkServiceServer()+}++// UnimplementedBookmarkServiceServer must be embedded to have forward compatible implementations.+type UnimplementedBookmarkServiceServer struct {+}++func (UnimplementedBookmarkServiceServer) CreateBookmark(context.Context, *CreateBookmarkRequest) (*Bookmark, error) {+ return nil, status.Errorf(codes.Unimplemented, "method CreateBookmark not implemented")+}+func (UnimplementedBookmarkServiceServer) DeleteBookmark(context.Context, *DeleteBookmarkRequest) (*emptypb.Empty, error) {+ return nil, status.Errorf(codes.Unimplemented, "method DeleteBookmark not implemented")+}+func (UnimplementedBookmarkServiceServer) ListBookmarks(context.Context, *ListBookmarksRequest) (*ListBookmarksResponse, error) {+ return nil, status.Errorf(codes.Unimplemented, "method ListBookmarks not implemented")+}+func (UnimplementedBookmarkServiceServer) mustEmbedUnimplementedBookmarkServiceServer() {}++// UnsafeBookmarkServiceServer may be embedded to opt out of forward compatibility for this service.+// Use of this interface is not recommended, as added methods to BookmarkServiceServer will+// result in compilation errors.+type UnsafeBookmarkServiceServer interface {+ mustEmbedUnimplementedBookmarkServiceServer()+}++func RegisterBookmarkServiceServer(s grpc.ServiceRegistrar, srv BookmarkServiceServer) {+ s.RegisterService(&BookmarkService_ServiceDesc, srv)+}++func _BookmarkService_CreateBookmark_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {+ in := new(CreateBookmarkRequest)+ if err := dec(in); err != nil {+ return nil, err+ }+ if interceptor == nil {+ return srv.(BookmarkServiceServer).CreateBookmark(ctx, in)+ }+ info := &grpc.UnaryServerInfo{+ Server: srv,+ FullMethod: "/bytebase.v1.BookmarkService/CreateBookmark",+ }+ handler := func(ctx context.Context, req interface{}) (interface{}, error) {+ return srv.(BookmarkServiceServer).CreateBookmark(ctx, req.(*CreateBookmarkRequest))+ }+ return interceptor(ctx, in, info, handler)+}++func _BookmarkService_DeleteBookmark_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {+ in := new(DeleteBookmarkRequest)+ if err := dec(in); err != nil {+ return nil, err+ }+ if interceptor == nil {+ return srv.(BookmarkServiceServer).DeleteBookmark(ctx, in)+ }+ info := &grpc.UnaryServerInfo{+ Server: srv,+ FullMethod: "/bytebase.v1.BookmarkService/DeleteBookmark",+ }+ handler := func(ctx context.Context, req interface{}) (interface{}, error) {+ return srv.(BookmarkServiceServer).DeleteBookmark(ctx, req.(*DeleteBookmarkRequest))+ }+ return interceptor(ctx, in, info, handler)+}++func _BookmarkService_ListBookmarks_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {+ in := new(ListBookmarksRequest)+ if err := dec(in); err != nil {+ return nil, err+ }+ if interceptor == nil {+ return srv.(BookmarkServiceServer).ListBookmarks(ctx, in)+ }+ info := &grpc.UnaryServerInfo{+ Server: srv,+ FullMethod: "/bytebase.v1.BookmarkService/ListBookmarks",+ }+ handler := func(ctx context.Context, req interface{}) (interface{}, error) {+ return srv.(BookmarkServiceServer).ListBookmarks(ctx, req.(*ListBookmarksRequest))+ }+ return interceptor(ctx, in, info, handler)+}++// BookmarkService_ServiceDesc is the grpc.ServiceDesc for BookmarkService service.+// It's only intended for direct use with grpc.RegisterService,+// and not to be introspected or modified (even as a copy)+var BookmarkService_ServiceDesc = grpc.ServiceDesc{+ ServiceName: "bytebase.v1.BookmarkService",+ HandlerType: (*BookmarkServiceServer)(nil),+ Methods: []grpc.MethodDesc{+ {+ MethodName: "CreateBookmark",+ Handler: _BookmarkService_CreateBookmark_Handler,+ },+ {+ MethodName: "DeleteBookmark",+ Handler: _BookmarkService_DeleteBookmark_Handler,+ },+ {+ MethodName: "ListBookmarks",+ Handler: _BookmarkService_ListBookmarks_Handler,+ },+ },+ Streams: []grpc.StreamDesc{},+ Metadata: "v1/bookmark_service.proto",+}diff --git a/proto/v1/bookmark_service.proto b/proto/v1/bookmark_service.protonew file mode 100644index 0000000000..b3c5bdafb4--- /dev/null+++ b/proto/v1/bookmark_service.proto@@ -0,0 +1,95 @@+syntax = "proto3";++package bytebase.v1;++import "google/api/annotations.proto";+import "google/api/client.proto";+import "google/api/field_behavior.proto";+import "google/protobuf/empty.proto";+import "google/protobuf/field_mask.proto";+import "google/protobuf/wrappers.proto";++import "v1/common.proto";++option go_package = "generated-go/v1";++service BookmarkService {+ // CreateBookmark creates a new bookmark.+ rpc CreateBookmark(CreateBookmarkRequest) returns (Bookmark) {+ option (google.api.http) = {+ post: "/v1/{parent=users/*}/bookmarks"+ body: "bookmark"+ };+ option (google.api.method_signature) = "parent,bookmark";+ }++ // DeleteBookmark deletes a bookmark.+ rpc DeleteBookmark(DeleteBookmarkRequest) returns (google.protobuf.Empty) {+ option (google.api.http) = {+ delete: "/v1/{name=users/*/bookmarks/*}"+ };+ option (google.api.method_signature) = "name";+ }++ // ListBookmark lists bookmarks.+ rpc ListBookmarks(ListBookmarksRequest) returns (ListBookmarksResponse) {+ option (google.api.http) = {+ get: "/v1/{parent=users/*}/bookmarks"+ };+ option (google.api.method_signature) = "parent";+ }+}++message CreateBookmarkRequest {+ // The parent resource of the bookmark.+ // Format: users/{user}, user is a server-generated unique IDs.+ string parent = 1;++ // The bookmark to create.+ Bookmark bookmark = 2 [(google.api.field_behavior) = REQUIRED];+}++message DeleteBookmarkRequest {+ // The name of the bookmark to delete.+ // Format: users/{user}/bookmarks/{bookmark}, user and bookmark are server-generated unique IDs.+ string name = 1 [(google.api.field_behavior) = REQUIRED];+}++message ListBookmarksRequest {+ // The parent resource of the bookmark.+ // Format: users/{user}, user is a server-generated unique ID.+ string parent = 1;++ // Not used. The maximum number of bookmarks to return. The service may return fewer than+ // this value.+ // If unspecified, at most 50 bookmarks will be returned.+ // The maximum value is 1000; values above 1000 will be coerced to 1000.+ int32 page_size = 2;++ // Not used. A page token, received from a previous `ListBookmarks` call.+ // Provide this to retrieve the subsequent page.+ //+ // When paginating, all other parameters provided to `ListBookmarks` must match+ // the call that provided the page token.+ string page_token = 3;+}++message ListBookmarksResponse {+ // The list of bookmarks.+ repeated Bookmark bookmarks = 1;++ // Not used. A token, which can be sent as `page_token` to retrieve the next page.+ // If this field is omitted, there are no subsequent pages.+ string next_page_token = 2;+}++message Bookmark {+ // The name of the bookmark.+ // Format: users/{user}/bookmarks/{bookmark}, user and bookmark are server-generated unique IDs.+ string name = 1 [(google.api.field_behavior) = OUTPUT_ONLY];+ // The resource link of the bookmark. Only support issue link for now.+ // Format:+ // Issue: /issue/slug(issue_name)-{issue_uid}+ // Example: /issue/start-here-add-email-column-to-employee-table-101+ string link = 2 [(google.api.field_behavior) = REQUIRED];+}