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
2026-08-09 18:40:36 +08:00
// - protoc v7.35.1
2026-08-09 15:10:19 +08:00
// source: module/base/cloud/proto/share.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 (
Share_CreateShare_FullMethodName = "/cloud.Share/CreateShare"
Share_GetShare_FullMethodName = "/cloud.Share/GetShare"
Share_DeleteShare_FullMethodName = "/cloud.Share/DeleteShare"
Share_ListShares_FullMethodName = "/cloud.Share/ListShares"
Share_ValidateSharePassword_FullMethodName = "/cloud.Share/ValidateSharePassword"
)
// ShareClient is the client API for Share 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 ShareClient interface {
// 创建分享
2026-08-09 15:10:19 +08:00
CreateShare ( ctx context . Context , in * CreateShareRequest , opts ... grpc . CallOption ) ( * protobuf . StatusReply , error )
2026-08-09 10:43:45 +08:00
// 获取分享详情
2026-08-09 15:10:19 +08:00
GetShare ( ctx context . Context , in * protobuf . IdentRequest , opts ... grpc . CallOption ) ( * CloudShareItem , error )
2026-08-09 10:43:45 +08:00
// 删除分享
2026-08-09 15:10:19 +08:00
DeleteShare ( ctx context . Context , in * protobuf . IdentRequest , opts ... grpc . CallOption ) ( * protobuf . StatusReply , error )
2026-08-09 10:43:45 +08:00
// 获取分享列表
2026-08-09 15:10:19 +08:00
ListShares ( ctx context . Context , in * protobuf . FetchRequest , opts ... grpc . CallOption ) ( * ListSharesResponse , error )
2026-08-09 10:43:45 +08:00
// 验证分享密码
2026-08-09 15:10:19 +08:00
ValidateSharePassword ( ctx context . Context , in * ValidateSharePasswordRequest , opts ... grpc . CallOption ) ( * protobuf . StatusReply , error )
2026-08-09 10:43:45 +08:00
}
type shareClient struct {
cc grpc . ClientConnInterface
}
func NewShareClient ( cc grpc . ClientConnInterface ) ShareClient {
return & shareClient { cc }
}
2026-08-09 15:10:19 +08:00
func ( c * shareClient ) CreateShare ( ctx context . Context , in * CreateShareRequest , 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 , Share_CreateShare_FullMethodName , in , out , cOpts ... )
if err != nil {
return nil , err
}
return out , nil
}
2026-08-09 15:10:19 +08:00
func ( c * shareClient ) GetShare ( ctx context . Context , in * protobuf . IdentRequest , opts ... grpc . CallOption ) ( * CloudShareItem , error ) {
2026-08-09 10:43:45 +08:00
cOpts := append ( [ ] grpc . CallOption { grpc . StaticMethod ( ) } , opts ... )
out := new ( CloudShareItem )
err := c . cc . Invoke ( ctx , Share_GetShare_FullMethodName , in , out , cOpts ... )
if err != nil {
return nil , err
}
return out , nil
}
2026-08-09 15:10:19 +08:00
func ( c * shareClient ) DeleteShare ( ctx context . Context , in * protobuf . IdentRequest , 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 , Share_DeleteShare_FullMethodName , in , out , cOpts ... )
if err != nil {
return nil , err
}
return out , nil
}
2026-08-09 15:10:19 +08:00
func ( c * shareClient ) ListShares ( ctx context . Context , in * protobuf . FetchRequest , opts ... grpc . CallOption ) ( * ListSharesResponse , error ) {
2026-08-09 10:43:45 +08:00
cOpts := append ( [ ] grpc . CallOption { grpc . StaticMethod ( ) } , opts ... )
out := new ( ListSharesResponse )
err := c . cc . Invoke ( ctx , Share_ListShares_FullMethodName , in , out , cOpts ... )
if err != nil {
return nil , err
}
return out , nil
}
2026-08-09 15:10:19 +08:00
func ( c * shareClient ) ValidateSharePassword ( ctx context . Context , in * ValidateSharePasswordRequest , 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 , Share_ValidateSharePassword_FullMethodName , in , out , cOpts ... )
if err != nil {
return nil , err
}
return out , nil
}
// ShareServer is the server API for Share service.
2026-08-09 15:10:19 +08:00
// All implementations should embed UnimplementedShareServer
2026-08-09 10:43:45 +08:00
// for forward compatibility.
//
// 分享服务
type ShareServer interface {
// 创建分享
2026-08-09 15:10:19 +08:00
CreateShare ( context . Context , * CreateShareRequest ) ( * protobuf . StatusReply , error )
2026-08-09 10:43:45 +08:00
// 获取分享详情
2026-08-09 15:10:19 +08:00
GetShare ( context . Context , * protobuf . IdentRequest ) ( * CloudShareItem , error )
2026-08-09 10:43:45 +08:00
// 删除分享
2026-08-09 15:10:19 +08:00
DeleteShare ( context . Context , * protobuf . IdentRequest ) ( * protobuf . StatusReply , error )
2026-08-09 10:43:45 +08:00
// 获取分享列表
2026-08-09 15:10:19 +08:00
ListShares ( context . Context , * protobuf . FetchRequest ) ( * ListSharesResponse , error )
2026-08-09 10:43:45 +08:00
// 验证分享密码
2026-08-09 15:10:19 +08:00
ValidateSharePassword ( context . Context , * ValidateSharePasswordRequest ) ( * protobuf . StatusReply , error )
2026-08-09 10:43:45 +08:00
}
2026-08-09 15:10:19 +08:00
// UnimplementedShareServer 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 UnimplementedShareServer struct { }
2026-08-09 15:10:19 +08:00
func ( UnimplementedShareServer ) CreateShare ( context . Context , * CreateShareRequest ) ( * protobuf . StatusReply , error ) {
return nil , status . Error ( codes . Unimplemented , "method CreateShare not implemented" )
2026-08-09 10:43:45 +08:00
}
2026-08-09 15:10:19 +08:00
func ( UnimplementedShareServer ) GetShare ( context . Context , * protobuf . IdentRequest ) ( * CloudShareItem , error ) {
return nil , status . Error ( codes . Unimplemented , "method GetShare not implemented" )
2026-08-09 10:43:45 +08:00
}
2026-08-09 15:10:19 +08:00
func ( UnimplementedShareServer ) DeleteShare ( context . Context , * protobuf . IdentRequest ) ( * protobuf . StatusReply , error ) {
return nil , status . Error ( codes . Unimplemented , "method DeleteShare not implemented" )
2026-08-09 10:43:45 +08:00
}
2026-08-09 15:10:19 +08:00
func ( UnimplementedShareServer ) ListShares ( context . Context , * protobuf . FetchRequest ) ( * ListSharesResponse , error ) {
return nil , status . Error ( codes . Unimplemented , "method ListShares not implemented" )
2026-08-09 10:43:45 +08:00
}
2026-08-09 15:10:19 +08:00
func ( UnimplementedShareServer ) ValidateSharePassword ( context . Context , * ValidateSharePasswordRequest ) ( * protobuf . StatusReply , error ) {
return nil , status . Error ( codes . Unimplemented , "method ValidateSharePassword not implemented" )
2026-08-09 10:43:45 +08:00
}
2026-08-09 15:10:19 +08:00
func ( UnimplementedShareServer ) testEmbeddedByValue ( ) { }
2026-08-09 10:43:45 +08:00
// UnsafeShareServer may be embedded to opt out of forward compatibility for this service.
// Use of this interface is not recommended, as added methods to ShareServer will
// result in compilation errors.
type UnsafeShareServer interface {
mustEmbedUnimplementedShareServer ( )
}
func RegisterShareServer ( s grpc . ServiceRegistrar , srv ShareServer ) {
2026-08-09 15:10:19 +08:00
// If the following call panics, it indicates UnimplementedShareServer 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 ( & Share_ServiceDesc , srv )
}
func _Share_CreateShare_Handler ( srv interface { } , ctx context . Context , dec func ( interface { } ) error , interceptor grpc . UnaryServerInterceptor ) ( interface { } , error ) {
in := new ( CreateShareRequest )
if err := dec ( in ) ; err != nil {
return nil , err
}
if interceptor == nil {
return srv . ( ShareServer ) . CreateShare ( ctx , in )
}
info := & grpc . UnaryServerInfo {
Server : srv ,
FullMethod : Share_CreateShare_FullMethodName ,
}
handler := func ( ctx context . Context , req interface { } ) ( interface { } , error ) {
return srv . ( ShareServer ) . CreateShare ( ctx , req . ( * CreateShareRequest ) )
}
return interceptor ( ctx , in , info , handler )
}
func _Share_GetShare_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 . IdentRequest )
2026-08-09 10:43:45 +08:00
if err := dec ( in ) ; err != nil {
return nil , err
}
if interceptor == nil {
return srv . ( ShareServer ) . GetShare ( ctx , in )
}
info := & grpc . UnaryServerInfo {
Server : srv ,
FullMethod : Share_GetShare_FullMethodName ,
}
handler := func ( ctx context . Context , req interface { } ) ( interface { } , error ) {
2026-08-09 15:10:19 +08:00
return srv . ( ShareServer ) . GetShare ( ctx , req . ( * protobuf . IdentRequest ) )
2026-08-09 10:43:45 +08:00
}
return interceptor ( ctx , in , info , handler )
}
func _Share_DeleteShare_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 . IdentRequest )
2026-08-09 10:43:45 +08:00
if err := dec ( in ) ; err != nil {
return nil , err
}
if interceptor == nil {
return srv . ( ShareServer ) . DeleteShare ( ctx , in )
}
info := & grpc . UnaryServerInfo {
Server : srv ,
FullMethod : Share_DeleteShare_FullMethodName ,
}
handler := func ( ctx context . Context , req interface { } ) ( interface { } , error ) {
2026-08-09 15:10:19 +08:00
return srv . ( ShareServer ) . DeleteShare ( ctx , req . ( * protobuf . IdentRequest ) )
2026-08-09 10:43:45 +08:00
}
return interceptor ( ctx , in , info , handler )
}
func _Share_ListShares_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 . ( ShareServer ) . ListShares ( ctx , in )
}
info := & grpc . UnaryServerInfo {
Server : srv ,
FullMethod : Share_ListShares_FullMethodName ,
}
handler := func ( ctx context . Context , req interface { } ) ( interface { } , error ) {
2026-08-09 15:10:19 +08:00
return srv . ( ShareServer ) . ListShares ( ctx , req . ( * protobuf . FetchRequest ) )
2026-08-09 10:43:45 +08:00
}
return interceptor ( ctx , in , info , handler )
}
func _Share_ValidateSharePassword_Handler ( srv interface { } , ctx context . Context , dec func ( interface { } ) error , interceptor grpc . UnaryServerInterceptor ) ( interface { } , error ) {
in := new ( ValidateSharePasswordRequest )
if err := dec ( in ) ; err != nil {
return nil , err
}
if interceptor == nil {
return srv . ( ShareServer ) . ValidateSharePassword ( ctx , in )
}
info := & grpc . UnaryServerInfo {
Server : srv ,
FullMethod : Share_ValidateSharePassword_FullMethodName ,
}
handler := func ( ctx context . Context , req interface { } ) ( interface { } , error ) {
return srv . ( ShareServer ) . ValidateSharePassword ( ctx , req . ( * ValidateSharePasswordRequest ) )
}
return interceptor ( ctx , in , info , handler )
}
// Share_ServiceDesc is the grpc.ServiceDesc for Share service.
// It's only intended for direct use with grpc.RegisterService,
// and not to be introspected or modified (even as a copy)
var Share_ServiceDesc = grpc . ServiceDesc {
ServiceName : "cloud.Share" ,
HandlerType : ( * ShareServer ) ( nil ) ,
Methods : [ ] grpc . MethodDesc {
{
MethodName : "CreateShare" ,
Handler : _Share_CreateShare_Handler ,
} ,
{
MethodName : "GetShare" ,
Handler : _Share_GetShare_Handler ,
} ,
{
MethodName : "DeleteShare" ,
Handler : _Share_DeleteShare_Handler ,
} ,
{
MethodName : "ListShares" ,
Handler : _Share_ListShares_Handler ,
} ,
{
MethodName : "ValidateSharePassword" ,
Handler : _Share_ValidateSharePassword_Handler ,
} ,
} ,
Streams : [ ] grpc . StreamDesc { } ,
2026-08-09 15:10:19 +08:00
Metadata : "module/base/cloud/proto/share.proto" ,
2026-08-09 10:43:45 +08:00
}