Documentation ¶
Index ¶
- Constants
- Variables
- func RegisterStorageServer(s grpc.ServiceRegistrar, srv StorageServer)
- type DownloadReply
- type DownloadRequest
- func (*DownloadRequest) Descriptor() ([]byte, []int)deprecated
- func (x *DownloadRequest) GetFid() string
- func (x *DownloadRequest) GetMd5() string
- func (x *DownloadRequest) GetSize() int64
- func (*DownloadRequest) ProtoMessage()
- func (x *DownloadRequest) ProtoReflect() protoreflect.Message
- func (x *DownloadRequest) Reset()
- func (x *DownloadRequest) String() string
- type File
- type FileMeta
- func (*FileMeta) Descriptor() ([]byte, []int)deprecated
- func (x *FileMeta) GetFormat() string
- func (x *FileMeta) GetMd5() string
- func (x *FileMeta) GetModTime() int64
- func (x *FileMeta) GetName() string
- func (x *FileMeta) GetSize() int64
- func (*FileMeta) ProtoMessage()
- func (x *FileMeta) ProtoReflect() protoreflect.Message
- func (x *FileMeta) Reset()
- func (x *FileMeta) String() string
- type ManageReply
- type ManageRequest
- func (*ManageRequest) Descriptor() ([]byte, []int)deprecated
- func (x *ManageRequest) GetMd5() string
- func (x *ManageRequest) GetMethod() string
- func (*ManageRequest) ProtoMessage()
- func (x *ManageRequest) ProtoReflect() protoreflect.Message
- func (x *ManageRequest) Reset()
- func (x *ManageRequest) String() string
- type StorageClient
- type StorageServer
- type SyncReply
- type SyncRequest
- func (*SyncRequest) Descriptor() ([]byte, []int)deprecated
- func (x *SyncRequest) GetFid() string
- func (x *SyncRequest) GetMd5S() []string
- func (x *SyncRequest) GetSessionId() string
- func (x *SyncRequest) GetTarget() []string
- func (*SyncRequest) ProtoMessage()
- func (x *SyncRequest) ProtoReflect() protoreflect.Message
- func (x *SyncRequest) Reset()
- func (x *SyncRequest) String() string
- type UnimplementedStorageServer
- func (UnimplementedStorageServer) Download(context.Context, *DownloadRequest) (*DownloadReply, error)
- func (UnimplementedStorageServer) Manage(context.Context, *ManageRequest) (*ManageReply, error)
- func (UnimplementedStorageServer) Sync(context.Context, *SyncRequest) (*SyncReply, error)
- func (UnimplementedStorageServer) Upload(context.Context, *UploadRequest) (*UploadReply, error)
- type UnsafeStorageServer
- type UploadReply
- type UploadRequest
- func (*UploadRequest) Descriptor() ([]byte, []int)deprecated
- func (x *UploadRequest) GetFid() string
- func (x *UploadRequest) GetMd5() string
- func (x *UploadRequest) GetRawData() []byte
- func (*UploadRequest) ProtoMessage()
- func (x *UploadRequest) ProtoReflect() protoreflect.Message
- func (x *UploadRequest) Reset()
- func (x *UploadRequest) String() string
Constants ¶
const ( Storage_Upload_FullMethodName = "/pb.Storage/Upload" Storage_Manage_FullMethodName = "/pb.Storage/Manage" Storage_Download_FullMethodName = "/pb.Storage/Download" Storage_Sync_FullMethodName = "/pb.Storage/Sync" )
Variables ¶
var File_yun_proto protoreflect.FileDescriptor
var Storage_ServiceDesc = grpc.ServiceDesc{ ServiceName: "pb.Storage", HandlerType: (*StorageServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "Upload", Handler: _Storage_Upload_Handler, }, { MethodName: "Manage", Handler: _Storage_Manage_Handler, }, { MethodName: "Download", Handler: _Storage_Download_Handler, }, { MethodName: "Sync", Handler: _Storage_Sync_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "yun.proto", }
Storage_ServiceDesc is the grpc.ServiceDesc for Storage service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
Functions ¶
func RegisterStorageServer ¶
func RegisterStorageServer(s grpc.ServiceRegistrar, srv StorageServer)
Types ¶
type DownloadReply ¶
type DownloadReply struct { Content []byte `protobuf:"bytes,1,opt,name=content,proto3" json:"content,omitempty"` // contains filtered or unexported fields }
func (*DownloadReply) Descriptor
deprecated
func (*DownloadReply) Descriptor() ([]byte, []int)
Deprecated: Use DownloadReply.ProtoReflect.Descriptor instead.
func (*DownloadReply) GetContent ¶
func (x *DownloadReply) GetContent() []byte
func (*DownloadReply) ProtoMessage ¶
func (*DownloadReply) ProtoMessage()
func (*DownloadReply) ProtoReflect ¶
func (x *DownloadReply) ProtoReflect() protoreflect.Message
func (*DownloadReply) Reset ¶
func (x *DownloadReply) Reset()
func (*DownloadReply) String ¶
func (x *DownloadReply) String() string
type DownloadRequest ¶
type DownloadRequest struct { Fid string `protobuf:"bytes,1,opt,name=fid,proto3" json:"fid,omitempty"` Md5 string `protobuf:"bytes,2,opt,name=md5,proto3" json:"md5,omitempty"` Size int64 `protobuf:"varint,3,opt,name=size,proto3" json:"size,omitempty"` // contains filtered or unexported fields }
func (*DownloadRequest) Descriptor
deprecated
func (*DownloadRequest) Descriptor() ([]byte, []int)
Deprecated: Use DownloadRequest.ProtoReflect.Descriptor instead.
func (*DownloadRequest) GetFid ¶ added in v0.7.5
func (x *DownloadRequest) GetFid() string
func (*DownloadRequest) GetMd5 ¶
func (x *DownloadRequest) GetMd5() string
func (*DownloadRequest) GetSize ¶
func (x *DownloadRequest) GetSize() int64
func (*DownloadRequest) ProtoMessage ¶
func (*DownloadRequest) ProtoMessage()
func (*DownloadRequest) ProtoReflect ¶
func (x *DownloadRequest) ProtoReflect() protoreflect.Message
func (*DownloadRequest) Reset ¶
func (x *DownloadRequest) Reset()
func (*DownloadRequest) String ¶
func (x *DownloadRequest) String() string
type File ¶
type File struct { FileName string `protobuf:"bytes,1,opt,name=fileName,proto3" json:"fileName,omitempty"` Size int64 `protobuf:"varint,2,opt,name=size,proto3" json:"size,omitempty"` Content []byte `protobuf:"bytes,3,opt,name=content,proto3" json:"content,omitempty"` // contains filtered or unexported fields }
func (*File) Descriptor
deprecated
func (*File) GetContent ¶
func (*File) GetFileName ¶
func (*File) ProtoMessage ¶
func (*File) ProtoMessage()
func (*File) ProtoReflect ¶
func (x *File) ProtoReflect() protoreflect.Message
type FileMeta ¶
type FileMeta struct { Size int64 `protobuf:"varint,1,opt,name=size,proto3" json:"size,omitempty"` Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` Format string `protobuf:"bytes,3,opt,name=format,proto3" json:"format,omitempty"` ModTime int64 `protobuf:"varint,4,opt,name=ModTime,proto3" json:"ModTime,omitempty"` Md5 string `protobuf:"bytes,5,opt,name=md5,proto3" json:"md5,omitempty"` // contains filtered or unexported fields }
func (*FileMeta) Descriptor
deprecated
func (*FileMeta) GetModTime ¶
func (*FileMeta) ProtoMessage ¶
func (*FileMeta) ProtoMessage()
func (*FileMeta) ProtoReflect ¶
func (x *FileMeta) ProtoReflect() protoreflect.Message
type ManageReply ¶
type ManageReply struct {
// contains filtered or unexported fields
}
func (*ManageReply) Descriptor
deprecated
func (*ManageReply) Descriptor() ([]byte, []int)
Deprecated: Use ManageReply.ProtoReflect.Descriptor instead.
func (*ManageReply) ProtoMessage ¶
func (*ManageReply) ProtoMessage()
func (*ManageReply) ProtoReflect ¶
func (x *ManageReply) ProtoReflect() protoreflect.Message
func (*ManageReply) Reset ¶
func (x *ManageReply) Reset()
func (*ManageReply) String ¶
func (x *ManageReply) String() string
type ManageRequest ¶
type ManageRequest struct { Md5 string `protobuf:"bytes,1,opt,name=md5,proto3" json:"md5,omitempty"` Method string `protobuf:"bytes,2,opt,name=method,proto3" json:"method,omitempty"` // contains filtered or unexported fields }
func (*ManageRequest) Descriptor
deprecated
func (*ManageRequest) Descriptor() ([]byte, []int)
Deprecated: Use ManageRequest.ProtoReflect.Descriptor instead.
func (*ManageRequest) GetMd5 ¶
func (x *ManageRequest) GetMd5() string
func (*ManageRequest) GetMethod ¶
func (x *ManageRequest) GetMethod() string
func (*ManageRequest) ProtoMessage ¶
func (*ManageRequest) ProtoMessage()
func (*ManageRequest) ProtoReflect ¶
func (x *ManageRequest) ProtoReflect() protoreflect.Message
func (*ManageRequest) Reset ¶
func (x *ManageRequest) Reset()
func (*ManageRequest) String ¶
func (x *ManageRequest) String() string
type StorageClient ¶
type StorageClient interface { // Sends a greeting Upload(ctx context.Context, in *UploadRequest, opts ...grpc.CallOption) (*UploadReply, error) Manage(ctx context.Context, in *ManageRequest, opts ...grpc.CallOption) (*ManageReply, error) Download(ctx context.Context, in *DownloadRequest, opts ...grpc.CallOption) (*DownloadReply, error) Sync(ctx context.Context, in *SyncRequest, opts ...grpc.CallOption) (*SyncReply, error) }
StorageClient is the client API for Storage 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 NewStorageClient ¶
func NewStorageClient(cc grpc.ClientConnInterface) StorageClient
type StorageServer ¶
type StorageServer interface { // Sends a greeting Upload(context.Context, *UploadRequest) (*UploadReply, error) Manage(context.Context, *ManageRequest) (*ManageReply, error) Download(context.Context, *DownloadRequest) (*DownloadReply, error) Sync(context.Context, *SyncRequest) (*SyncReply, error) // contains filtered or unexported methods }
StorageServer is the server API for Storage service. All implementations must embed UnimplementedStorageServer for forward compatibility
type SyncReply ¶ added in v0.7.5
type SyncReply struct { Msg string `protobuf:"bytes,1,opt,name=msg,proto3" json:"msg,omitempty"` // contains filtered or unexported fields }
func (*SyncReply) Descriptor
deprecated
added in
v0.7.5
func (*SyncReply) ProtoMessage ¶ added in v0.7.5
func (*SyncReply) ProtoMessage()
func (*SyncReply) ProtoReflect ¶ added in v0.7.5
func (x *SyncReply) ProtoReflect() protoreflect.Message
type SyncRequest ¶ added in v0.7.5
type SyncRequest struct { SessionId string `protobuf:"bytes,1,opt,name=sessionId,proto3" json:"sessionId,omitempty"` Fid string `protobuf:"bytes,2,opt,name=fid,proto3" json:"fid,omitempty"` Md5S []string `protobuf:"bytes,3,rep,name=md5s,proto3" json:"md5s,omitempty"` Target []string `protobuf:"bytes,4,rep,name=target,proto3" json:"target,omitempty"` // contains filtered or unexported fields }
func (*SyncRequest) Descriptor
deprecated
added in
v0.7.5
func (*SyncRequest) Descriptor() ([]byte, []int)
Deprecated: Use SyncRequest.ProtoReflect.Descriptor instead.
func (*SyncRequest) GetFid ¶ added in v0.7.5
func (x *SyncRequest) GetFid() string
func (*SyncRequest) GetMd5S ¶ added in v0.7.5
func (x *SyncRequest) GetMd5S() []string
func (*SyncRequest) GetSessionId ¶ added in v0.7.5
func (x *SyncRequest) GetSessionId() string
func (*SyncRequest) GetTarget ¶ added in v0.7.5
func (x *SyncRequest) GetTarget() []string
func (*SyncRequest) ProtoMessage ¶ added in v0.7.5
func (*SyncRequest) ProtoMessage()
func (*SyncRequest) ProtoReflect ¶ added in v0.7.5
func (x *SyncRequest) ProtoReflect() protoreflect.Message
func (*SyncRequest) Reset ¶ added in v0.7.5
func (x *SyncRequest) Reset()
func (*SyncRequest) String ¶ added in v0.7.5
func (x *SyncRequest) String() string
type UnimplementedStorageServer ¶
type UnimplementedStorageServer struct { }
UnimplementedStorageServer must be embedded to have forward compatible implementations.
func (UnimplementedStorageServer) Download ¶
func (UnimplementedStorageServer) Download(context.Context, *DownloadRequest) (*DownloadReply, error)
func (UnimplementedStorageServer) Manage ¶
func (UnimplementedStorageServer) Manage(context.Context, *ManageRequest) (*ManageReply, error)
func (UnimplementedStorageServer) Sync ¶ added in v0.7.5
func (UnimplementedStorageServer) Sync(context.Context, *SyncRequest) (*SyncReply, error)
func (UnimplementedStorageServer) Upload ¶
func (UnimplementedStorageServer) Upload(context.Context, *UploadRequest) (*UploadReply, error)
type UnsafeStorageServer ¶
type UnsafeStorageServer interface {
// contains filtered or unexported methods
}
UnsafeStorageServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to StorageServer will result in compilation errors.
type UploadReply ¶
type UploadReply struct { Code int32 `protobuf:"varint,1,opt,name=code,proto3" json:"code,omitempty"` Md5 string `protobuf:"bytes,2,opt,name=md5,proto3" json:"md5,omitempty"` // bytes link= 1; // contains filtered or unexported fields }
func (*UploadReply) Descriptor
deprecated
func (*UploadReply) Descriptor() ([]byte, []int)
Deprecated: Use UploadReply.ProtoReflect.Descriptor instead.
func (*UploadReply) GetCode ¶
func (x *UploadReply) GetCode() int32
func (*UploadReply) GetMd5 ¶
func (x *UploadReply) GetMd5() string
func (*UploadReply) ProtoMessage ¶
func (*UploadReply) ProtoMessage()
func (*UploadReply) ProtoReflect ¶
func (x *UploadReply) ProtoReflect() protoreflect.Message
func (*UploadReply) Reset ¶
func (x *UploadReply) Reset()
func (*UploadReply) String ¶
func (x *UploadReply) String() string
type UploadRequest ¶
type UploadRequest struct { Fid string `protobuf:"bytes,1,opt,name=fid,proto3" json:"fid,omitempty"` Md5 string `protobuf:"bytes,2,opt,name=md5,proto3" json:"md5,omitempty"` RawData []byte `protobuf:"bytes,3,opt,name=rawData,proto3" json:"rawData,omitempty"` // contains filtered or unexported fields }
func (*UploadRequest) Descriptor
deprecated
func (*UploadRequest) Descriptor() ([]byte, []int)
Deprecated: Use UploadRequest.ProtoReflect.Descriptor instead.
func (*UploadRequest) GetFid ¶ added in v0.7.5
func (x *UploadRequest) GetFid() string
func (*UploadRequest) GetMd5 ¶
func (x *UploadRequest) GetMd5() string
func (*UploadRequest) GetRawData ¶
func (x *UploadRequest) GetRawData() []byte
func (*UploadRequest) ProtoMessage ¶
func (*UploadRequest) ProtoMessage()
func (*UploadRequest) ProtoReflect ¶
func (x *UploadRequest) ProtoReflect() protoreflect.Message
func (*UploadRequest) Reset ¶
func (x *UploadRequest) Reset()
func (*UploadRequest) String ¶
func (x *UploadRequest) String() string