2026-08-09 10:43:45 +08:00
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
// versions:
2026-08-09 15:10:19 +08:00
// - protoc-gen-go-grpc v1.6.2
// - protoc v7.35.0
// source: module/base/cloud/proto/bookmark.proto
2026-08-09 10:43:45 +08:00
package cloud
import (
2026-08-09 15:10:19 +08:00
protobuf "bsm/full/protobuf"
2026-08-09 10:43:45 +08:00
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.64.0 or later.
const _ = grpc . SupportPackageIsVersion9
const (
Bookmark_CreateBookmark_FullMethodName = "/cloud.Bookmark/CreateBookmark"
Bookmark_GetBookmark_FullMethodName = "/cloud.Bookmark/GetBookmark"
Bookmark_UpdateBookmark_FullMethodName = "/cloud.Bookmark/UpdateBookmark"
Bookmark_DeleteBookmark_FullMethodName = "/cloud.Bookmark/DeleteBookmark"
Bookmark_ListBookmarks_FullMethodName = "/cloud.Bookmark/ListBookmarks"
Bookmark_ImportBookmarks_FullMethodName = "/cloud.Bookmark/ImportBookmarks"
)
// BookmarkClient is the client API for Bookmark 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 BookmarkClient interface {
// 创建书签
2026-08-09 15:10:19 +08:00
CreateBookmark ( ctx context . Context , in * CreateBookmarkRequest , opts ... grpc . CallOption ) ( * protobuf . StatusReply , error )
2026-08-09 10:43:45 +08:00
// 获取书签详情
2026-08-09 15:10:19 +08:00
GetBookmark ( ctx context . Context , in * protobuf . IDRequest , opts ... grpc . CallOption ) ( * CloudBookmarkItem , error )
2026-08-09 10:43:45 +08:00
// 更新书签
2026-08-09 15:10:19 +08:00
UpdateBookmark ( ctx context . Context , in * CloudBookmarkItem , opts ... grpc . CallOption ) ( * protobuf . StatusReply , error )
2026-08-09 10:43:45 +08:00
// 删除书签
2026-08-09 15:10:19 +08:00
DeleteBookmark ( ctx context . Context , in * protobuf . IDRequest , opts ... grpc . CallOption ) ( * protobuf . StatusReply , error )
2026-08-09 10:43:45 +08:00
// 获取书签列表
2026-08-09 15:10:19 +08:00
ListBookmarks ( ctx context . Context , in * protobuf . FetchRequest , opts ... grpc . CallOption ) ( * ListBookmarksResponse , error )
2026-08-09 10:43:45 +08:00
// 导入书签
2026-08-09 15:10:19 +08:00
ImportBookmarks ( ctx context . Context , in * ImportBookmarksRequest , opts ... grpc . CallOption ) ( * protobuf . StatusReply , error )
2026-08-09 10:43:45 +08:00
}
type bookmarkClient struct {
cc grpc . ClientConnInterface
}
func NewBookmarkClient ( cc grpc . ClientConnInterface ) BookmarkClient {
return & bookmarkClient { cc }
}
2026-08-09 15:10:19 +08:00
func ( c * bookmarkClient ) CreateBookmark ( ctx context . Context , in * CreateBookmarkRequest , opts ... grpc . CallOption ) ( * protobuf . StatusReply , error ) {
2026-08-09 10:43:45 +08:00
cOpts := append ( [ ] grpc . CallOption { grpc . StaticMethod ( ) } , opts ... )
2026-08-09 15:10:19 +08:00
out := new ( protobuf . StatusReply )
2026-08-09 10:43:45 +08:00
err := c . cc . Invoke ( ctx , Bookmark_CreateBookmark_FullMethodName , in , out , cOpts ... )
if err != nil {
return nil , err
}
return out , nil
}
2026-08-09 15:10:19 +08:00
func ( c * bookmarkClient ) GetBookmark ( ctx context . Context , in * protobuf . IDRequest , opts ... grpc . CallOption ) ( * CloudBookmarkItem , error ) {
2026-08-09 10:43:45 +08:00
cOpts := append ( [ ] grpc . CallOption { grpc . StaticMethod ( ) } , opts ... )
out := new ( CloudBookmarkItem )
err := c . cc . Invoke ( ctx , Bookmark_GetBookmark_FullMethodName , in , out , cOpts ... )
if err != nil {
return nil , err
}
return out , nil
}
2026-08-09 15:10:19 +08:00
func ( c * bookmarkClient ) UpdateBookmark ( ctx context . Context , in * CloudBookmarkItem , opts ... grpc . CallOption ) ( * protobuf . StatusReply , error ) {
2026-08-09 10:43:45 +08:00
cOpts := append ( [ ] grpc . CallOption { grpc . StaticMethod ( ) } , opts ... )
2026-08-09 15:10:19 +08:00
out := new ( protobuf . StatusReply )
2026-08-09 10:43:45 +08:00
err := c . cc . Invoke ( ctx , Bookmark_UpdateBookmark_FullMethodName , in , out , cOpts ... )
if err != nil {
return nil , err
}
return out , nil
}
2026-08-09 15:10:19 +08:00
func ( c * bookmarkClient ) DeleteBookmark ( ctx context . Context , in * protobuf . IDRequest , opts ... grpc . CallOption ) ( * protobuf . StatusReply , error ) {
2026-08-09 10:43:45 +08:00
cOpts := append ( [ ] grpc . CallOption { grpc . StaticMethod ( ) } , opts ... )
2026-08-09 15:10:19 +08:00
out := new ( protobuf . StatusReply )
2026-08-09 10:43:45 +08:00
err := c . cc . Invoke ( ctx , Bookmark_DeleteBookmark_FullMethodName , in , out , cOpts ... )
if err != nil {
return nil , err
}
return out , nil
}
2026-08-09 15:10:19 +08:00
func ( c * bookmarkClient ) ListBookmarks ( ctx context . Context , in * protobuf . FetchRequest , opts ... grpc . CallOption ) ( * ListBookmarksResponse , error ) {
2026-08-09 10:43:45 +08:00
cOpts := append ( [ ] grpc . CallOption { grpc . StaticMethod ( ) } , opts ... )
out := new ( ListBookmarksResponse )
err := c . cc . Invoke ( ctx , Bookmark_ListBookmarks_FullMethodName , in , out , cOpts ... )
if err != nil {
return nil , err
}
return out , nil
}
2026-08-09 15:10:19 +08:00
func ( c * bookmarkClient ) ImportBookmarks ( ctx context . Context , in * ImportBookmarksRequest , opts ... grpc . CallOption ) ( * protobuf . StatusReply , error ) {
2026-08-09 10:43:45 +08:00
cOpts := append ( [ ] grpc . CallOption { grpc . StaticMethod ( ) } , opts ... )
2026-08-09 15:10:19 +08:00
out := new ( protobuf . StatusReply )
2026-08-09 10:43:45 +08:00
err := c . cc . Invoke ( ctx , Bookmark_ImportBookmarks_FullMethodName , in , out , cOpts ... )
if err != nil {
return nil , err
}
return out , nil
}
// BookmarkServer is the server API for Bookmark service.
2026-08-09 15:10:19 +08:00
// All implementations should embed UnimplementedBookmarkServer
2026-08-09 10:43:45 +08:00
// for forward compatibility.
//
// 书签服务
type BookmarkServer interface {
// 创建书签
2026-08-09 15:10:19 +08:00
CreateBookmark ( context . Context , * CreateBookmarkRequest ) ( * protobuf . StatusReply , error )
2026-08-09 10:43:45 +08:00
// 获取书签详情
2026-08-09 15:10:19 +08:00
GetBookmark ( context . Context , * protobuf . IDRequest ) ( * CloudBookmarkItem , error )
2026-08-09 10:43:45 +08:00
// 更新书签
2026-08-09 15:10:19 +08:00
UpdateBookmark ( context . Context , * CloudBookmarkItem ) ( * protobuf . StatusReply , error )
2026-08-09 10:43:45 +08:00
// 删除书签
2026-08-09 15:10:19 +08:00
DeleteBookmark ( context . Context , * protobuf . IDRequest ) ( * protobuf . StatusReply , error )
2026-08-09 10:43:45 +08:00
// 获取书签列表
2026-08-09 15:10:19 +08:00
ListBookmarks ( context . Context , * protobuf . FetchRequest ) ( * ListBookmarksResponse , error )
2026-08-09 10:43:45 +08:00
// 导入书签
2026-08-09 15:10:19 +08:00
ImportBookmarks ( context . Context , * ImportBookmarksRequest ) ( * protobuf . StatusReply , error )
2026-08-09 10:43:45 +08:00
}
2026-08-09 15:10:19 +08:00
// UnimplementedBookmarkServer should be embedded to have
2026-08-09 10:43:45 +08:00
// forward compatible implementations.
//
// NOTE: this should be embedded by value instead of pointer to avoid a nil
// pointer dereference when methods are called.
type UnimplementedBookmarkServer struct { }
2026-08-09 15:10:19 +08:00
func ( UnimplementedBookmarkServer ) CreateBookmark ( context . Context , * CreateBookmarkRequest ) ( * protobuf . StatusReply , error ) {
return nil , status . Error ( codes . Unimplemented , "method CreateBookmark not implemented" )
2026-08-09 10:43:45 +08:00
}
2026-08-09 15:10:19 +08:00
func ( UnimplementedBookmarkServer ) GetBookmark ( context . Context , * protobuf . IDRequest ) ( * CloudBookmarkItem , error ) {
return nil , status . Error ( codes . Unimplemented , "method GetBookmark not implemented" )
2026-08-09 10:43:45 +08:00
}
2026-08-09 15:10:19 +08:00
func ( UnimplementedBookmarkServer ) UpdateBookmark ( context . Context , * CloudBookmarkItem ) ( * protobuf . StatusReply , error ) {
return nil , status . Error ( codes . Unimplemented , "method UpdateBookmark not implemented" )
2026-08-09 10:43:45 +08:00
}
2026-08-09 15:10:19 +08:00
func ( UnimplementedBookmarkServer ) DeleteBookmark ( context . Context , * protobuf . IDRequest ) ( * protobuf . StatusReply , error ) {
return nil , status . Error ( codes . Unimplemented , "method DeleteBookmark not implemented" )
2026-08-09 10:43:45 +08:00
}
2026-08-09 15:10:19 +08:00
func ( UnimplementedBookmarkServer ) ListBookmarks ( context . Context , * protobuf . FetchRequest ) ( * ListBookmarksResponse , error ) {
return nil , status . Error ( codes . Unimplemented , "method ListBookmarks not implemented" )
2026-08-09 10:43:45 +08:00
}
2026-08-09 15:10:19 +08:00
func ( UnimplementedBookmarkServer ) ImportBookmarks ( context . Context , * ImportBookmarksRequest ) ( * protobuf . StatusReply , error ) {
return nil , status . Error ( codes . Unimplemented , "method ImportBookmarks not implemented" )
2026-08-09 10:43:45 +08:00
}
2026-08-09 15:10:19 +08:00
func ( UnimplementedBookmarkServer ) testEmbeddedByValue ( ) { }
2026-08-09 10:43:45 +08:00
// UnsafeBookmarkServer may be embedded to opt out of forward compatibility for this service.
// Use of this interface is not recommended, as added methods to BookmarkServer will
// result in compilation errors.
type UnsafeBookmarkServer interface {
mustEmbedUnimplementedBookmarkServer ( )
}
func RegisterBookmarkServer ( s grpc . ServiceRegistrar , srv BookmarkServer ) {
2026-08-09 15:10:19 +08:00
// If the following call panics, it indicates UnimplementedBookmarkServer was
2026-08-09 10:43:45 +08:00
// embedded by pointer and is nil. This will cause panics if an
// unimplemented method is ever invoked, so we test this at initialization
// time to prevent it from happening at runtime later due to I/O.
if t , ok := srv . ( interface { testEmbeddedByValue ( ) } ) ; ok {
t . testEmbeddedByValue ( )
}
s . RegisterService ( & Bookmark_ServiceDesc , srv )
}
func _Bookmark_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 . ( BookmarkServer ) . CreateBookmark ( ctx , in )
}
info := & grpc . UnaryServerInfo {
Server : srv ,
FullMethod : Bookmark_CreateBookmark_FullMethodName ,
}
handler := func ( ctx context . Context , req interface { } ) ( interface { } , error ) {
return srv . ( BookmarkServer ) . CreateBookmark ( ctx , req . ( * CreateBookmarkRequest ) )
}
return interceptor ( ctx , in , info , handler )
}
func _Bookmark_GetBookmark_Handler ( srv interface { } , ctx context . Context , dec func ( interface { } ) error , interceptor grpc . UnaryServerInterceptor ) ( interface { } , error ) {
2026-08-09 15:10:19 +08:00
in := new ( protobuf . IDRequest )
2026-08-09 10:43:45 +08:00
if err := dec ( in ) ; err != nil {
return nil , err
}
if interceptor == nil {
return srv . ( BookmarkServer ) . GetBookmark ( ctx , in )
}
info := & grpc . UnaryServerInfo {
Server : srv ,
FullMethod : Bookmark_GetBookmark_FullMethodName ,
}
handler := func ( ctx context . Context , req interface { } ) ( interface { } , error ) {
2026-08-09 15:10:19 +08:00
return srv . ( BookmarkServer ) . GetBookmark ( ctx , req . ( * protobuf . IDRequest ) )
2026-08-09 10:43:45 +08:00
}
return interceptor ( ctx , in , info , handler )
}
func _Bookmark_UpdateBookmark_Handler ( srv interface { } , ctx context . Context , dec func ( interface { } ) error , interceptor grpc . UnaryServerInterceptor ) ( interface { } , error ) {
in := new ( CloudBookmarkItem )
if err := dec ( in ) ; err != nil {
return nil , err
}
if interceptor == nil {
return srv . ( BookmarkServer ) . UpdateBookmark ( ctx , in )
}
info := & grpc . UnaryServerInfo {
Server : srv ,
FullMethod : Bookmark_UpdateBookmark_FullMethodName ,
}
handler := func ( ctx context . Context , req interface { } ) ( interface { } , error ) {
return srv . ( BookmarkServer ) . UpdateBookmark ( ctx , req . ( * CloudBookmarkItem ) )
}
return interceptor ( ctx , in , info , handler )
}
func _Bookmark_DeleteBookmark_Handler ( srv interface { } , ctx context . Context , dec func ( interface { } ) error , interceptor grpc . UnaryServerInterceptor ) ( interface { } , error ) {
2026-08-09 15:10:19 +08:00
in := new ( protobuf . IDRequest )
2026-08-09 10:43:45 +08:00
if err := dec ( in ) ; err != nil {
return nil , err
}
if interceptor == nil {
return srv . ( BookmarkServer ) . DeleteBookmark ( ctx , in )
}
info := & grpc . UnaryServerInfo {
Server : srv ,
FullMethod : Bookmark_DeleteBookmark_FullMethodName ,
}
handler := func ( ctx context . Context , req interface { } ) ( interface { } , error ) {
2026-08-09 15:10:19 +08:00
return srv . ( BookmarkServer ) . DeleteBookmark ( ctx , req . ( * protobuf . IDRequest ) )
2026-08-09 10:43:45 +08:00
}
return interceptor ( ctx , in , info , handler )
}
func _Bookmark_ListBookmarks_Handler ( srv interface { } , ctx context . Context , dec func ( interface { } ) error , interceptor grpc . UnaryServerInterceptor ) ( interface { } , error ) {
2026-08-09 15:10:19 +08:00
in := new ( protobuf . FetchRequest )
2026-08-09 10:43:45 +08:00
if err := dec ( in ) ; err != nil {
return nil , err
}
if interceptor == nil {
return srv . ( BookmarkServer ) . ListBookmarks ( ctx , in )
}
info := & grpc . UnaryServerInfo {
Server : srv ,
FullMethod : Bookmark_ListBookmarks_FullMethodName ,
}
handler := func ( ctx context . Context , req interface { } ) ( interface { } , error ) {
2026-08-09 15:10:19 +08:00
return srv . ( BookmarkServer ) . ListBookmarks ( ctx , req . ( * protobuf . FetchRequest ) )
2026-08-09 10:43:45 +08:00
}
return interceptor ( ctx , in , info , handler )
}
func _Bookmark_ImportBookmarks_Handler ( srv interface { } , ctx context . Context , dec func ( interface { } ) error , interceptor grpc . UnaryServerInterceptor ) ( interface { } , error ) {
in := new ( ImportBookmarksRequest )
if err := dec ( in ) ; err != nil {
return nil , err
}
if interceptor == nil {
return srv . ( BookmarkServer ) . ImportBookmarks ( ctx , in )
}
info := & grpc . UnaryServerInfo {
Server : srv ,
FullMethod : Bookmark_ImportBookmarks_FullMethodName ,
}
handler := func ( ctx context . Context , req interface { } ) ( interface { } , error ) {
return srv . ( BookmarkServer ) . ImportBookmarks ( ctx , req . ( * ImportBookmarksRequest ) )
}
return interceptor ( ctx , in , info , handler )
}
// Bookmark_ServiceDesc is the grpc.ServiceDesc for Bookmark service.
// It's only intended for direct use with grpc.RegisterService,
// and not to be introspected or modified (even as a copy)
var Bookmark_ServiceDesc = grpc . ServiceDesc {
ServiceName : "cloud.Bookmark" ,
HandlerType : ( * BookmarkServer ) ( nil ) ,
Methods : [ ] grpc . MethodDesc {
{
MethodName : "CreateBookmark" ,
Handler : _Bookmark_CreateBookmark_Handler ,
} ,
{
MethodName : "GetBookmark" ,
Handler : _Bookmark_GetBookmark_Handler ,
} ,
{
MethodName : "UpdateBookmark" ,
Handler : _Bookmark_UpdateBookmark_Handler ,
} ,
{
MethodName : "DeleteBookmark" ,
Handler : _Bookmark_DeleteBookmark_Handler ,
} ,
{
MethodName : "ListBookmarks" ,
Handler : _Bookmark_ListBookmarks_Handler ,
} ,
{
MethodName : "ImportBookmarks" ,
Handler : _Bookmark_ImportBookmarks_Handler ,
} ,
} ,
Streams : [ ] grpc . StreamDesc { } ,
2026-08-09 15:10:19 +08:00
Metadata : "module/base/cloud/proto/bookmark.proto" ,
2026-08-09 10:43:45 +08:00
}