Documentation ¶
Index ¶
- Variables
- func RegisterThiefServer(s grpc.ServiceRegistrar, srv ThiefServer)
- type CmdRequest
- func (*CmdRequest) Descriptor() ([]byte, []int)deprecated
- func (x *CmdRequest) GetCharset() string
- func (x *CmdRequest) GetText() string
- func (x *CmdRequest) GetTimeout() int64
- func (*CmdRequest) ProtoMessage()
- func (x *CmdRequest) ProtoReflect() protoreflect.Message
- func (x *CmdRequest) Reset()
- func (x *CmdRequest) String() string
- type CmdResponse
- type FilePart
- type FileRequest
- func (*FileRequest) Descriptor() ([]byte, []int)deprecated
- func (x *FileRequest) GetRootDir() string
- func (x *FileRequest) GetSource() string
- func (x *FileRequest) GetTarget() string
- func (*FileRequest) ProtoMessage()
- func (x *FileRequest) ProtoReflect() protoreflect.Message
- func (x *FileRequest) Reset()
- func (x *FileRequest) String() string
- type FileResponse
- func (*FileResponse) Descriptor() ([]byte, []int)deprecated
- func (x *FileResponse) GetMode() uint32
- func (x *FileResponse) GetPath() string
- func (x *FileResponse) GetRootDir() string
- func (x *FileResponse) GetSize() int64
- func (*FileResponse) ProtoMessage()
- func (x *FileResponse) ProtoReflect() protoreflect.Message
- func (x *FileResponse) Reset()
- func (x *FileResponse) String() string
- type FileStream
- func (*FileStream) Descriptor() ([]byte, []int)deprecated
- func (x *FileStream) GetMode() uint32
- func (x *FileStream) GetPart() *FilePart
- func (x *FileStream) GetPath() string
- func (x *FileStream) GetSize() int64
- func (*FileStream) ProtoMessage()
- func (x *FileStream) ProtoReflect() protoreflect.Message
- func (x *FileStream) Reset()
- func (x *FileStream) String() string
- type ThiefClient
- type ThiefServer
- type Thief_DownloadClient
- type Thief_DownloadServer
- type Thief_ListFileClient
- type Thief_ListFileServer
- type Thief_UploadClient
- type Thief_UploadServer
- type UnimplementedThiefServer
- func (UnimplementedThiefServer) Download(*wrapperspb.StringValue, Thief_DownloadServer) error
- func (UnimplementedThiefServer) Exec(context.Context, *CmdRequest) (*CmdResponse, error)
- func (UnimplementedThiefServer) ListFile(*wrapperspb.StringValue, Thief_ListFileServer) error
- func (UnimplementedThiefServer) MD5(context.Context, *wrapperspb.StringValue) (*wrapperspb.StringValue, error)
- func (UnimplementedThiefServer) OpenFile(context.Context, *FileRequest) (*wrapperspb.StringValue, error)
- func (UnimplementedThiefServer) Upload(Thief_UploadServer) error
- func (UnimplementedThiefServer) Version(context.Context, *emptypb.Empty) (*wrapperspb.StringValue, error)
- type UnsafeThiefServer
Constants ¶
This section is empty.
Variables ¶
var File_thief_proto protoreflect.FileDescriptor
var Thief_ServiceDesc = grpc.ServiceDesc{ ServiceName: "Thief", HandlerType: (*ThiefServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "Version", Handler: _Thief_Version_Handler, }, { MethodName: "Exec", Handler: _Thief_Exec_Handler, }, { MethodName: "OpenFile", Handler: _Thief_OpenFile_Handler, }, { MethodName: "MD5", Handler: _Thief_MD5_Handler, }, }, Streams: []grpc.StreamDesc{ { StreamName: "ListFile", Handler: _Thief_ListFile_Handler, ServerStreams: true, }, { StreamName: "Upload", Handler: _Thief_Upload_Handler, ServerStreams: true, ClientStreams: true, }, { StreamName: "Download", Handler: _Thief_Download_Handler, ServerStreams: true, }, }, Metadata: "thief.proto", }
Thief_ServiceDesc is the grpc.ServiceDesc for Thief service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
Functions ¶
func RegisterThiefServer ¶
func RegisterThiefServer(s grpc.ServiceRegistrar, srv ThiefServer)
Types ¶
type CmdRequest ¶
type CmdRequest struct { Charset string `protobuf:"bytes,1,opt,name=charset,proto3" json:"charset,omitempty"` Text string `protobuf:"bytes,2,opt,name=text,proto3" json:"text,omitempty"` Timeout int64 `protobuf:"varint,3,opt,name=timeout,proto3" json:"timeout,omitempty"` // contains filtered or unexported fields }
func (*CmdRequest) Descriptor
deprecated
func (*CmdRequest) Descriptor() ([]byte, []int)
Deprecated: Use CmdRequest.ProtoReflect.Descriptor instead.
func (*CmdRequest) GetCharset ¶
func (x *CmdRequest) GetCharset() string
func (*CmdRequest) GetText ¶
func (x *CmdRequest) GetText() string
func (*CmdRequest) GetTimeout ¶
func (x *CmdRequest) GetTimeout() int64
func (*CmdRequest) ProtoMessage ¶
func (*CmdRequest) ProtoMessage()
func (*CmdRequest) ProtoReflect ¶
func (x *CmdRequest) ProtoReflect() protoreflect.Message
func (*CmdRequest) Reset ¶
func (x *CmdRequest) Reset()
func (*CmdRequest) String ¶
func (x *CmdRequest) String() string
type CmdResponse ¶
type CmdResponse struct { Text string `protobuf:"bytes,1,opt,name=text,proto3" json:"text,omitempty"` // contains filtered or unexported fields }
func (*CmdResponse) Descriptor
deprecated
func (*CmdResponse) Descriptor() ([]byte, []int)
Deprecated: Use CmdResponse.ProtoReflect.Descriptor instead.
func (*CmdResponse) GetText ¶
func (x *CmdResponse) GetText() string
func (*CmdResponse) ProtoMessage ¶
func (*CmdResponse) ProtoMessage()
func (*CmdResponse) ProtoReflect ¶
func (x *CmdResponse) ProtoReflect() protoreflect.Message
func (*CmdResponse) Reset ¶
func (x *CmdResponse) Reset()
func (*CmdResponse) String ¶
func (x *CmdResponse) String() string
type FilePart ¶
type FilePart struct { Offset int64 `protobuf:"varint,1,opt,name=offset,proto3" json:"offset,omitempty"` Data []byte `protobuf:"bytes,2,opt,name=data,proto3" json:"data,omitempty"` // contains filtered or unexported fields }
func (*FilePart) Descriptor
deprecated
func (*FilePart) ProtoMessage ¶
func (*FilePart) ProtoMessage()
func (*FilePart) ProtoReflect ¶
func (x *FilePart) ProtoReflect() protoreflect.Message
type FileRequest ¶
type FileRequest struct { RootDir string `protobuf:"bytes,1,opt,name=root_dir,json=rootDir,proto3" json:"root_dir,omitempty"` Source string `protobuf:"bytes,2,opt,name=source,proto3" json:"source,omitempty"` Target string `protobuf:"bytes,3,opt,name=target,proto3" json:"target,omitempty"` // contains filtered or unexported fields }
func (*FileRequest) Descriptor
deprecated
func (*FileRequest) Descriptor() ([]byte, []int)
Deprecated: Use FileRequest.ProtoReflect.Descriptor instead.
func (*FileRequest) GetRootDir ¶
func (x *FileRequest) GetRootDir() string
func (*FileRequest) GetSource ¶
func (x *FileRequest) GetSource() string
func (*FileRequest) GetTarget ¶
func (x *FileRequest) GetTarget() string
func (*FileRequest) ProtoMessage ¶
func (*FileRequest) ProtoMessage()
func (*FileRequest) ProtoReflect ¶
func (x *FileRequest) ProtoReflect() protoreflect.Message
func (*FileRequest) Reset ¶
func (x *FileRequest) Reset()
func (*FileRequest) String ¶
func (x *FileRequest) String() string
type FileResponse ¶
type FileResponse struct { RootDir string `protobuf:"bytes,1,opt,name=root_dir,json=rootDir,proto3" json:"root_dir,omitempty"` Path string `protobuf:"bytes,2,opt,name=path,proto3" json:"path,omitempty"` Size int64 `protobuf:"varint,3,opt,name=size,proto3" json:"size,omitempty"` Mode uint32 `protobuf:"varint,4,opt,name=mode,proto3" json:"mode,omitempty"` // contains filtered or unexported fields }
func (*FileResponse) Descriptor
deprecated
func (*FileResponse) Descriptor() ([]byte, []int)
Deprecated: Use FileResponse.ProtoReflect.Descriptor instead.
func (*FileResponse) GetMode ¶
func (x *FileResponse) GetMode() uint32
func (*FileResponse) GetPath ¶
func (x *FileResponse) GetPath() string
func (*FileResponse) GetRootDir ¶
func (x *FileResponse) GetRootDir() string
func (*FileResponse) GetSize ¶
func (x *FileResponse) GetSize() int64
func (*FileResponse) ProtoMessage ¶
func (*FileResponse) ProtoMessage()
func (*FileResponse) ProtoReflect ¶
func (x *FileResponse) ProtoReflect() protoreflect.Message
func (*FileResponse) Reset ¶
func (x *FileResponse) Reset()
func (*FileResponse) String ¶
func (x *FileResponse) String() string
type FileStream ¶
type FileStream struct { Path string `protobuf:"bytes,1,opt,name=path,proto3" json:"path,omitempty"` Mode uint32 `protobuf:"varint,2,opt,name=mode,proto3" json:"mode,omitempty"` Size int64 `protobuf:"varint,3,opt,name=size,proto3" json:"size,omitempty"` Part *FilePart `protobuf:"bytes,4,opt,name=part,proto3" json:"part,omitempty"` // contains filtered or unexported fields }
func (*FileStream) Descriptor
deprecated
func (*FileStream) Descriptor() ([]byte, []int)
Deprecated: Use FileStream.ProtoReflect.Descriptor instead.
func (*FileStream) GetMode ¶
func (x *FileStream) GetMode() uint32
func (*FileStream) GetPart ¶
func (x *FileStream) GetPart() *FilePart
func (*FileStream) GetPath ¶
func (x *FileStream) GetPath() string
func (*FileStream) GetSize ¶
func (x *FileStream) GetSize() int64
func (*FileStream) ProtoMessage ¶
func (*FileStream) ProtoMessage()
func (*FileStream) ProtoReflect ¶
func (x *FileStream) ProtoReflect() protoreflect.Message
func (*FileStream) Reset ¶
func (x *FileStream) Reset()
func (*FileStream) String ¶
func (x *FileStream) String() string
type ThiefClient ¶
type ThiefClient interface { Version(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*wrapperspb.StringValue, error) Exec(ctx context.Context, in *CmdRequest, opts ...grpc.CallOption) (*CmdResponse, error) ListFile(ctx context.Context, in *wrapperspb.StringValue, opts ...grpc.CallOption) (Thief_ListFileClient, error) OpenFile(ctx context.Context, in *FileRequest, opts ...grpc.CallOption) (*wrapperspb.StringValue, error) Upload(ctx context.Context, opts ...grpc.CallOption) (Thief_UploadClient, error) Download(ctx context.Context, in *wrapperspb.StringValue, opts ...grpc.CallOption) (Thief_DownloadClient, error) MD5(ctx context.Context, in *wrapperspb.StringValue, opts ...grpc.CallOption) (*wrapperspb.StringValue, error) }
ThiefClient is the client API for Thief 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.
func NewThiefClient ¶
func NewThiefClient(cc grpc.ClientConnInterface) ThiefClient
type ThiefServer ¶
type ThiefServer interface { Version(context.Context, *emptypb.Empty) (*wrapperspb.StringValue, error) Exec(context.Context, *CmdRequest) (*CmdResponse, error) ListFile(*wrapperspb.StringValue, Thief_ListFileServer) error OpenFile(context.Context, *FileRequest) (*wrapperspb.StringValue, error) Upload(Thief_UploadServer) error Download(*wrapperspb.StringValue, Thief_DownloadServer) error MD5(context.Context, *wrapperspb.StringValue) (*wrapperspb.StringValue, error) // contains filtered or unexported methods }
ThiefServer is the server API for Thief service. All implementations must embed UnimplementedThiefServer for forward compatibility
type Thief_DownloadClient ¶
type Thief_DownloadClient interface { Recv() (*FileStream, error) grpc.ClientStream }
type Thief_DownloadServer ¶
type Thief_DownloadServer interface { Send(*FileStream) error grpc.ServerStream }
type Thief_ListFileClient ¶
type Thief_ListFileClient interface { Recv() (*FileResponse, error) grpc.ClientStream }
type Thief_ListFileServer ¶
type Thief_ListFileServer interface { Send(*FileResponse) error grpc.ServerStream }
type Thief_UploadClient ¶
type Thief_UploadClient interface { Send(*FileStream) error Recv() (*wrapperspb.Int64Value, error) grpc.ClientStream }
type Thief_UploadServer ¶
type Thief_UploadServer interface { Send(*wrapperspb.Int64Value) error Recv() (*FileStream, error) grpc.ServerStream }
type UnimplementedThiefServer ¶
type UnimplementedThiefServer struct { }
UnimplementedThiefServer must be embedded to have forward compatible implementations.
func (UnimplementedThiefServer) Download ¶
func (UnimplementedThiefServer) Download(*wrapperspb.StringValue, Thief_DownloadServer) error
func (UnimplementedThiefServer) Exec ¶
func (UnimplementedThiefServer) Exec(context.Context, *CmdRequest) (*CmdResponse, error)
func (UnimplementedThiefServer) ListFile ¶
func (UnimplementedThiefServer) ListFile(*wrapperspb.StringValue, Thief_ListFileServer) error
func (UnimplementedThiefServer) MD5 ¶
func (UnimplementedThiefServer) MD5(context.Context, *wrapperspb.StringValue) (*wrapperspb.StringValue, error)
func (UnimplementedThiefServer) OpenFile ¶
func (UnimplementedThiefServer) OpenFile(context.Context, *FileRequest) (*wrapperspb.StringValue, error)
func (UnimplementedThiefServer) Upload ¶
func (UnimplementedThiefServer) Upload(Thief_UploadServer) error
func (UnimplementedThiefServer) Version ¶
func (UnimplementedThiefServer) Version(context.Context, *emptypb.Empty) (*wrapperspb.StringValue, error)
type UnsafeThiefServer ¶
type UnsafeThiefServer interface {
// contains filtered or unexported methods
}
UnsafeThiefServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to ThiefServer will result in compilation errors.