Documentation
¶
Index ¶
- Variables
- func RegisterDownloaderHTTPServer(s *http.Server, srv DownloaderHTTPServer)
- func RegisterDownloaderServer(s grpc.ServiceRegistrar, srv DownloaderServer)
- type AddRequest
- type DeleteRequest
- type DownloaderClient
- type DownloaderHTTPClient
- type DownloaderHTTPClientImpl
- func (c *DownloaderHTTPClientImpl) Add(ctx context.Context, in *AddRequest, opts ...http.CallOption) (*common.Empty, error)
- func (c *DownloaderHTTPClientImpl) Delete(ctx context.Context, in *DeleteRequest, opts ...http.CallOption) (*common.Empty, error)
- func (c *DownloaderHTTPClientImpl) List(ctx context.Context, in *common.Empty, opts ...http.CallOption) (*ListResponse, error)
- func (c *DownloaderHTTPClientImpl) Pause(ctx context.Context, in *PauseRequest, opts ...http.CallOption) (*common.Empty, error)
- func (c *DownloaderHTTPClientImpl) Resume(ctx context.Context, in *ResumeRequest, opts ...http.CallOption) (*common.Empty, error)
- type DownloaderHTTPServer
- type DownloaderServer
- type ListResponse
- type ListResponseTaskInfo
- func (*ListResponseTaskInfo) Descriptor() ([]byte, []int)deprecated
- func (x *ListResponseTaskInfo) GetCreatedTime() string
- func (x *ListResponseTaskInfo) GetId() string
- func (x *ListResponseTaskInfo) GetName() string
- func (x *ListResponseTaskInfo) GetProgress() float32
- func (x *ListResponseTaskInfo) GetSize() int64
- func (x *ListResponseTaskInfo) GetStatus() string
- func (x *ListResponseTaskInfo) GetStorePath() string
- func (*ListResponseTaskInfo) ProtoMessage()
- func (x *ListResponseTaskInfo) ProtoReflect() protoreflect.Message
- func (x *ListResponseTaskInfo) Reset()
- func (x *ListResponseTaskInfo) String() string
- type PauseRequest
- type ResumeRequest
- type UnimplementedDownloaderServer
- func (UnimplementedDownloaderServer) Add(context.Context, *AddRequest) (*common.Empty, error)
- func (UnimplementedDownloaderServer) Delete(context.Context, *DeleteRequest) (*common.Empty, error)
- func (UnimplementedDownloaderServer) List(context.Context, *common.Empty) (*ListResponse, error)
- func (UnimplementedDownloaderServer) Pause(context.Context, *PauseRequest) (*common.Empty, error)
- func (UnimplementedDownloaderServer) Resume(context.Context, *ResumeRequest) (*common.Empty, error)
- type UnsafeDownloaderServer
Constants ¶
This section is empty.
Variables ¶
var Downloader_ServiceDesc = grpc.ServiceDesc{ ServiceName: "api.downloader.v1.Downloader", HandlerType: (*DownloaderServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "Add", Handler: _Downloader_Add_Handler, }, { MethodName: "Delete", Handler: _Downloader_Delete_Handler, }, { MethodName: "List", Handler: _Downloader_List_Handler, }, { MethodName: "Pause", Handler: _Downloader_Pause_Handler, }, { MethodName: "Resume", Handler: _Downloader_Resume_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "api/downloader/v1/downloader.proto", }
Downloader_ServiceDesc is the grpc.ServiceDesc for Downloader service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
var File_api_downloader_v1_downloader_proto protoreflect.FileDescriptor
Functions ¶
func RegisterDownloaderHTTPServer ¶
func RegisterDownloaderHTTPServer(s *http.Server, srv DownloaderHTTPServer)
func RegisterDownloaderServer ¶
func RegisterDownloaderServer(s grpc.ServiceRegistrar, srv DownloaderServer)
Types ¶
type AddRequest ¶
type AddRequest struct { Link string `protobuf:"bytes,1,opt,name=link,proto3" json:"link,omitempty"` StorePath string `protobuf:"bytes,2,opt,name=store_path,json=storePath,proto3" json:"store_path,omitempty"` // contains filtered or unexported fields }
func (*AddRequest) Descriptor
deprecated
func (*AddRequest) Descriptor() ([]byte, []int)
Deprecated: Use AddRequest.ProtoReflect.Descriptor instead.
func (*AddRequest) GetLink ¶
func (x *AddRequest) GetLink() string
func (*AddRequest) GetStorePath ¶
func (x *AddRequest) GetStorePath() string
func (*AddRequest) ProtoMessage ¶
func (*AddRequest) ProtoMessage()
func (*AddRequest) ProtoReflect ¶
func (x *AddRequest) ProtoReflect() protoreflect.Message
func (*AddRequest) Reset ¶
func (x *AddRequest) Reset()
func (*AddRequest) String ¶
func (x *AddRequest) String() string
type DeleteRequest ¶
type DeleteRequest struct { Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` // contains filtered or unexported fields }
func (*DeleteRequest) Descriptor
deprecated
func (*DeleteRequest) Descriptor() ([]byte, []int)
Deprecated: Use DeleteRequest.ProtoReflect.Descriptor instead.
func (*DeleteRequest) GetId ¶
func (x *DeleteRequest) GetId() string
func (*DeleteRequest) ProtoMessage ¶
func (*DeleteRequest) ProtoMessage()
func (*DeleteRequest) ProtoReflect ¶
func (x *DeleteRequest) ProtoReflect() protoreflect.Message
func (*DeleteRequest) Reset ¶
func (x *DeleteRequest) Reset()
func (*DeleteRequest) String ¶
func (x *DeleteRequest) String() string
type DownloaderClient ¶
type DownloaderClient interface { Add(ctx context.Context, in *AddRequest, opts ...grpc.CallOption) (*common.Empty, error) Delete(ctx context.Context, in *DeleteRequest, opts ...grpc.CallOption) (*common.Empty, error) List(ctx context.Context, in *common.Empty, opts ...grpc.CallOption) (*ListResponse, error) Pause(ctx context.Context, in *PauseRequest, opts ...grpc.CallOption) (*common.Empty, error) Resume(ctx context.Context, in *ResumeRequest, opts ...grpc.CallOption) (*common.Empty, error) }
DownloaderClient is the client API for Downloader service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkgo.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
func NewDownloaderClient ¶
func NewDownloaderClient(cc grpc.ClientConnInterface) DownloaderClient
type DownloaderHTTPClient ¶
type DownloaderHTTPClient interface { Add(ctx context.Context, req *AddRequest, opts ...http.CallOption) (rsp *common.Empty, err error) Delete(ctx context.Context, req *DeleteRequest, opts ...http.CallOption) (rsp *common.Empty, err error) List(ctx context.Context, req *common.Empty, opts ...http.CallOption) (rsp *ListResponse, err error) Pause(ctx context.Context, req *PauseRequest, opts ...http.CallOption) (rsp *common.Empty, err error) Resume(ctx context.Context, req *ResumeRequest, opts ...http.CallOption) (rsp *common.Empty, err error) }
func NewDownloaderHTTPClient ¶
func NewDownloaderHTTPClient(client *http.Client) DownloaderHTTPClient
type DownloaderHTTPClientImpl ¶
type DownloaderHTTPClientImpl struct {
// contains filtered or unexported fields
}
func (*DownloaderHTTPClientImpl) Add ¶
func (c *DownloaderHTTPClientImpl) Add(ctx context.Context, in *AddRequest, opts ...http.CallOption) (*common.Empty, error)
func (*DownloaderHTTPClientImpl) Delete ¶
func (c *DownloaderHTTPClientImpl) Delete(ctx context.Context, in *DeleteRequest, opts ...http.CallOption) (*common.Empty, error)
func (*DownloaderHTTPClientImpl) List ¶
func (c *DownloaderHTTPClientImpl) List(ctx context.Context, in *common.Empty, opts ...http.CallOption) (*ListResponse, error)
func (*DownloaderHTTPClientImpl) Pause ¶
func (c *DownloaderHTTPClientImpl) Pause(ctx context.Context, in *PauseRequest, opts ...http.CallOption) (*common.Empty, error)
func (*DownloaderHTTPClientImpl) Resume ¶
func (c *DownloaderHTTPClientImpl) Resume(ctx context.Context, in *ResumeRequest, opts ...http.CallOption) (*common.Empty, error)
type DownloaderHTTPServer ¶
type DownloaderHTTPServer interface { Add(context.Context, *AddRequest) (*common.Empty, error) Delete(context.Context, *DeleteRequest) (*common.Empty, error) List(context.Context, *common.Empty) (*ListResponse, error) Pause(context.Context, *PauseRequest) (*common.Empty, error) Resume(context.Context, *ResumeRequest) (*common.Empty, error) }
type DownloaderServer ¶
type DownloaderServer interface { Add(context.Context, *AddRequest) (*common.Empty, error) Delete(context.Context, *DeleteRequest) (*common.Empty, error) List(context.Context, *common.Empty) (*ListResponse, error) Pause(context.Context, *PauseRequest) (*common.Empty, error) Resume(context.Context, *ResumeRequest) (*common.Empty, error) // contains filtered or unexported methods }
DownloaderServer is the server API for Downloader service. All implementations must embed UnimplementedDownloaderServer for forward compatibility
type ListResponse ¶
type ListResponse struct { TaskInfos []*ListResponseTaskInfo `protobuf:"bytes,1,rep,name=task_infos,json=taskInfos,proto3" json:"task_infos,omitempty"` // contains filtered or unexported fields }
func (*ListResponse) Descriptor
deprecated
func (*ListResponse) Descriptor() ([]byte, []int)
Deprecated: Use ListResponse.ProtoReflect.Descriptor instead.
func (*ListResponse) GetTaskInfos ¶
func (x *ListResponse) GetTaskInfos() []*ListResponseTaskInfo
func (*ListResponse) ProtoMessage ¶
func (*ListResponse) ProtoMessage()
func (*ListResponse) ProtoReflect ¶
func (x *ListResponse) ProtoReflect() protoreflect.Message
func (*ListResponse) Reset ¶
func (x *ListResponse) Reset()
func (*ListResponse) String ¶
func (x *ListResponse) String() string
type ListResponseTaskInfo ¶
type ListResponseTaskInfo struct { Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` Size int64 `protobuf:"varint,2,opt,name=size,proto3" json:"size,omitempty"` // unit: byte StorePath string `protobuf:"bytes,3,opt,name=store_path,json=storePath,proto3" json:"store_path,omitempty"` Progress float32 `protobuf:"fixed32,4,opt,name=progress,proto3" json:"progress,omitempty"` Status string `protobuf:"bytes,5,opt,name=status,proto3" json:"status,omitempty"` CreatedTime string `protobuf:"bytes,6,opt,name=created_time,json=createdTime,proto3" json:"created_time,omitempty"` Id string `protobuf:"bytes,7,opt,name=id,proto3" json:"id,omitempty"` // contains filtered or unexported fields }
func (*ListResponseTaskInfo) Descriptor
deprecated
func (*ListResponseTaskInfo) Descriptor() ([]byte, []int)
Deprecated: Use ListResponseTaskInfo.ProtoReflect.Descriptor instead.
func (*ListResponseTaskInfo) GetCreatedTime ¶
func (x *ListResponseTaskInfo) GetCreatedTime() string
func (*ListResponseTaskInfo) GetId ¶
func (x *ListResponseTaskInfo) GetId() string
func (*ListResponseTaskInfo) GetName ¶
func (x *ListResponseTaskInfo) GetName() string
func (*ListResponseTaskInfo) GetProgress ¶
func (x *ListResponseTaskInfo) GetProgress() float32
func (*ListResponseTaskInfo) GetSize ¶
func (x *ListResponseTaskInfo) GetSize() int64
func (*ListResponseTaskInfo) GetStatus ¶
func (x *ListResponseTaskInfo) GetStatus() string
func (*ListResponseTaskInfo) GetStorePath ¶
func (x *ListResponseTaskInfo) GetStorePath() string
func (*ListResponseTaskInfo) ProtoMessage ¶
func (*ListResponseTaskInfo) ProtoMessage()
func (*ListResponseTaskInfo) ProtoReflect ¶
func (x *ListResponseTaskInfo) ProtoReflect() protoreflect.Message
func (*ListResponseTaskInfo) Reset ¶
func (x *ListResponseTaskInfo) Reset()
func (*ListResponseTaskInfo) String ¶
func (x *ListResponseTaskInfo) String() string
type PauseRequest ¶
type PauseRequest struct { Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` // contains filtered or unexported fields }
func (*PauseRequest) Descriptor
deprecated
func (*PauseRequest) Descriptor() ([]byte, []int)
Deprecated: Use PauseRequest.ProtoReflect.Descriptor instead.
func (*PauseRequest) GetId ¶
func (x *PauseRequest) GetId() string
func (*PauseRequest) ProtoMessage ¶
func (*PauseRequest) ProtoMessage()
func (*PauseRequest) ProtoReflect ¶
func (x *PauseRequest) ProtoReflect() protoreflect.Message
func (*PauseRequest) Reset ¶
func (x *PauseRequest) Reset()
func (*PauseRequest) String ¶
func (x *PauseRequest) String() string
type ResumeRequest ¶
type ResumeRequest struct { Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` // contains filtered or unexported fields }
func (*ResumeRequest) Descriptor
deprecated
func (*ResumeRequest) Descriptor() ([]byte, []int)
Deprecated: Use ResumeRequest.ProtoReflect.Descriptor instead.
func (*ResumeRequest) GetId ¶
func (x *ResumeRequest) GetId() string
func (*ResumeRequest) ProtoMessage ¶
func (*ResumeRequest) ProtoMessage()
func (*ResumeRequest) ProtoReflect ¶
func (x *ResumeRequest) ProtoReflect() protoreflect.Message
func (*ResumeRequest) Reset ¶
func (x *ResumeRequest) Reset()
func (*ResumeRequest) String ¶
func (x *ResumeRequest) String() string
type UnimplementedDownloaderServer ¶
type UnimplementedDownloaderServer struct { }
UnimplementedDownloaderServer must be embedded to have forward compatible implementations.
func (UnimplementedDownloaderServer) Add ¶
func (UnimplementedDownloaderServer) Add(context.Context, *AddRequest) (*common.Empty, error)
func (UnimplementedDownloaderServer) Delete ¶
func (UnimplementedDownloaderServer) Delete(context.Context, *DeleteRequest) (*common.Empty, error)
func (UnimplementedDownloaderServer) List ¶
func (UnimplementedDownloaderServer) List(context.Context, *common.Empty) (*ListResponse, error)
func (UnimplementedDownloaderServer) Pause ¶
func (UnimplementedDownloaderServer) Pause(context.Context, *PauseRequest) (*common.Empty, error)
func (UnimplementedDownloaderServer) Resume ¶
func (UnimplementedDownloaderServer) Resume(context.Context, *ResumeRequest) (*common.Empty, error)
type UnsafeDownloaderServer ¶
type UnsafeDownloaderServer interface {
// contains filtered or unexported methods
}
UnsafeDownloaderServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to DownloaderServer will result in compilation errors.