Documentation ¶
Overview ¶
Package torrent is a reverse proxy.
It translates gRPC into RESTful JSON APIs.
Index ¶
- func RegisterTorrentHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
- func RegisterTorrentHandlerClient(ctx context.Context, mux *runtime.ServeMux, client TorrentClient) error
- func RegisterTorrentHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, ...) (err error)
- func RegisterTorrentServer(s *grpc.Server, srv TorrentServer)
- type AddMagnetUriReply
- func (*AddMagnetUriReply) Descriptor() ([]byte, []int)
- func (m *AddMagnetUriReply) GetHash() string
- func (*AddMagnetUriReply) ProtoMessage()
- func (m *AddMagnetUriReply) Reset()
- func (m *AddMagnetUriReply) String() string
- func (m *AddMagnetUriReply) XXX_DiscardUnknown()
- func (m *AddMagnetUriReply) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *AddMagnetUriReply) XXX_Merge(src proto.Message)
- func (m *AddMagnetUriReply) XXX_Size() int
- func (m *AddMagnetUriReply) XXX_Unmarshal(b []byte) error
- type AddMagnetUriRequest
- func (*AddMagnetUriRequest) Descriptor() ([]byte, []int)
- func (m *AddMagnetUriRequest) GetMagnet() string
- func (*AddMagnetUriRequest) ProtoMessage()
- func (m *AddMagnetUriRequest) Reset()
- func (m *AddMagnetUriRequest) String() string
- func (m *AddMagnetUriRequest) XXX_DiscardUnknown()
- func (m *AddMagnetUriRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *AddMagnetUriRequest) XXX_Merge(src proto.Message)
- func (m *AddMagnetUriRequest) XXX_Size() int
- func (m *AddMagnetUriRequest) XXX_Unmarshal(b []byte) error
- type AllTorrentStatusReply
- func (*AllTorrentStatusReply) Descriptor() ([]byte, []int)
- func (m *AllTorrentStatusReply) GetAllTorrentStatus() []*TorrentStatus
- func (*AllTorrentStatusReply) ProtoMessage()
- func (m *AllTorrentStatusReply) Reset()
- func (m *AllTorrentStatusReply) String() string
- func (m *AllTorrentStatusReply) XXX_DiscardUnknown()
- func (m *AllTorrentStatusReply) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *AllTorrentStatusReply) XXX_Merge(src proto.Message)
- func (m *AllTorrentStatusReply) XXX_Size() int
- func (m *AllTorrentStatusReply) XXX_Unmarshal(b []byte) error
- type AllTorrentStatusRequest
- func (*AllTorrentStatusRequest) Descriptor() ([]byte, []int)
- func (*AllTorrentStatusRequest) ProtoMessage()
- func (m *AllTorrentStatusRequest) Reset()
- func (m *AllTorrentStatusRequest) String() string
- func (m *AllTorrentStatusRequest) XXX_DiscardUnknown()
- func (m *AllTorrentStatusRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *AllTorrentStatusRequest) XXX_Merge(src proto.Message)
- func (m *AllTorrentStatusRequest) XXX_Size() int
- func (m *AllTorrentStatusRequest) XXX_Unmarshal(b []byte) error
- type PauseTorrentReply
- func (*PauseTorrentReply) Descriptor() ([]byte, []int)
- func (*PauseTorrentReply) ProtoMessage()
- func (m *PauseTorrentReply) Reset()
- func (m *PauseTorrentReply) String() string
- func (m *PauseTorrentReply) XXX_DiscardUnknown()
- func (m *PauseTorrentReply) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *PauseTorrentReply) XXX_Merge(src proto.Message)
- func (m *PauseTorrentReply) XXX_Size() int
- func (m *PauseTorrentReply) XXX_Unmarshal(b []byte) error
- type PauseTorrentRequest
- func (*PauseTorrentRequest) Descriptor() ([]byte, []int)
- func (m *PauseTorrentRequest) GetHash() string
- func (*PauseTorrentRequest) ProtoMessage()
- func (m *PauseTorrentRequest) Reset()
- func (m *PauseTorrentRequest) String() string
- func (m *PauseTorrentRequest) XXX_DiscardUnknown()
- func (m *PauseTorrentRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *PauseTorrentRequest) XXX_Merge(src proto.Message)
- func (m *PauseTorrentRequest) XXX_Size() int
- func (m *PauseTorrentRequest) XXX_Unmarshal(b []byte) error
- type PingReply
- func (*PingReply) Descriptor() ([]byte, []int)
- func (m *PingReply) GetMessage() string
- func (*PingReply) ProtoMessage()
- func (m *PingReply) Reset()
- func (m *PingReply) String() string
- func (m *PingReply) XXX_DiscardUnknown()
- func (m *PingReply) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *PingReply) XXX_Merge(src proto.Message)
- func (m *PingReply) XXX_Size() int
- func (m *PingReply) XXX_Unmarshal(b []byte) error
- type PingRequest
- func (*PingRequest) Descriptor() ([]byte, []int)
- func (m *PingRequest) GetMessage() string
- func (*PingRequest) ProtoMessage()
- func (m *PingRequest) Reset()
- func (m *PingRequest) String() string
- func (m *PingRequest) XXX_DiscardUnknown()
- func (m *PingRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *PingRequest) XXX_Merge(src proto.Message)
- func (m *PingRequest) XXX_Size() int
- func (m *PingRequest) XXX_Unmarshal(b []byte) error
- type RemoveTorrentReply
- func (*RemoveTorrentReply) Descriptor() ([]byte, []int)
- func (*RemoveTorrentReply) ProtoMessage()
- func (m *RemoveTorrentReply) Reset()
- func (m *RemoveTorrentReply) String() string
- func (m *RemoveTorrentReply) XXX_DiscardUnknown()
- func (m *RemoveTorrentReply) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *RemoveTorrentReply) XXX_Merge(src proto.Message)
- func (m *RemoveTorrentReply) XXX_Size() int
- func (m *RemoveTorrentReply) XXX_Unmarshal(b []byte) error
- type RemoveTorrentRequest
- func (*RemoveTorrentRequest) Descriptor() ([]byte, []int)
- func (m *RemoveTorrentRequest) GetHash() string
- func (*RemoveTorrentRequest) ProtoMessage()
- func (m *RemoveTorrentRequest) Reset()
- func (m *RemoveTorrentRequest) String() string
- func (m *RemoveTorrentRequest) XXX_DiscardUnknown()
- func (m *RemoveTorrentRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *RemoveTorrentRequest) XXX_Merge(src proto.Message)
- func (m *RemoveTorrentRequest) XXX_Size() int
- func (m *RemoveTorrentRequest) XXX_Unmarshal(b []byte) error
- type ResumeTorrentReply
- func (*ResumeTorrentReply) Descriptor() ([]byte, []int)
- func (*ResumeTorrentReply) ProtoMessage()
- func (m *ResumeTorrentReply) Reset()
- func (m *ResumeTorrentReply) String() string
- func (m *ResumeTorrentReply) XXX_DiscardUnknown()
- func (m *ResumeTorrentReply) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *ResumeTorrentReply) XXX_Merge(src proto.Message)
- func (m *ResumeTorrentReply) XXX_Size() int
- func (m *ResumeTorrentReply) XXX_Unmarshal(b []byte) error
- type ResumeTorrentRequest
- func (*ResumeTorrentRequest) Descriptor() ([]byte, []int)
- func (m *ResumeTorrentRequest) GetHash() string
- func (*ResumeTorrentRequest) ProtoMessage()
- func (m *ResumeTorrentRequest) Reset()
- func (m *ResumeTorrentRequest) String() string
- func (m *ResumeTorrentRequest) XXX_DiscardUnknown()
- func (m *ResumeTorrentRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *ResumeTorrentRequest) XXX_Merge(src proto.Message)
- func (m *ResumeTorrentRequest) XXX_Size() int
- func (m *ResumeTorrentRequest) XXX_Unmarshal(b []byte) error
- type ShutdownReply
- func (*ShutdownReply) Descriptor() ([]byte, []int)
- func (m *ShutdownReply) GetMessage() string
- func (*ShutdownReply) ProtoMessage()
- func (m *ShutdownReply) Reset()
- func (m *ShutdownReply) String() string
- func (m *ShutdownReply) XXX_DiscardUnknown()
- func (m *ShutdownReply) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *ShutdownReply) XXX_Merge(src proto.Message)
- func (m *ShutdownReply) XXX_Size() int
- func (m *ShutdownReply) XXX_Unmarshal(b []byte) error
- type ShutdownRequest
- func (*ShutdownRequest) Descriptor() ([]byte, []int)
- func (m *ShutdownRequest) GetMessage() string
- func (*ShutdownRequest) ProtoMessage()
- func (m *ShutdownRequest) Reset()
- func (m *ShutdownRequest) String() string
- func (m *ShutdownRequest) XXX_DiscardUnknown()
- func (m *ShutdownRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *ShutdownRequest) XXX_Merge(src proto.Message)
- func (m *ShutdownRequest) XXX_Size() int
- func (m *ShutdownRequest) XXX_Unmarshal(b []byte) error
- type TorrentClient
- type TorrentServer
- type TorrentStatus
- func (*TorrentStatus) Descriptor() ([]byte, []int)
- func (m *TorrentStatus) GetDownloadRate() int32
- func (m *TorrentStatus) GetHash() string
- func (m *TorrentStatus) GetName() string
- func (m *TorrentStatus) GetPeers() int32
- func (m *TorrentStatus) GetProgress() float32
- func (m *TorrentStatus) GetSeeds() int32
- func (m *TorrentStatus) GetState() string
- func (m *TorrentStatus) GetTotalSize() uint64
- func (m *TorrentStatus) GetUploadRate() int32
- func (*TorrentStatus) ProtoMessage()
- func (m *TorrentStatus) Reset()
- func (m *TorrentStatus) String() string
- func (m *TorrentStatus) XXX_DiscardUnknown()
- func (m *TorrentStatus) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *TorrentStatus) XXX_Merge(src proto.Message)
- func (m *TorrentStatus) XXX_Size() int
- func (m *TorrentStatus) XXX_Unmarshal(b []byte) error
- type Torrent_AllTorrentStatusClient
- type Torrent_AllTorrentStatusServer
- type UnimplementedTorrentServer
- func (*UnimplementedTorrentServer) AddMagnetUri(ctx context.Context, req *AddMagnetUriRequest) (*AddMagnetUriReply, error)
- func (*UnimplementedTorrentServer) AllTorrentStatus(req *AllTorrentStatusRequest, srv Torrent_AllTorrentStatusServer) error
- func (*UnimplementedTorrentServer) PauseTorrent(ctx context.Context, req *PauseTorrentRequest) (*PauseTorrentReply, error)
- func (*UnimplementedTorrentServer) Ping(ctx context.Context, req *PingRequest) (*PingReply, error)
- func (*UnimplementedTorrentServer) RemoveTorrent(ctx context.Context, req *RemoveTorrentRequest) (*RemoveTorrentReply, error)
- func (*UnimplementedTorrentServer) ResumeTorrent(ctx context.Context, req *ResumeTorrentRequest) (*ResumeTorrentReply, error)
- func (*UnimplementedTorrentServer) Shutdown(ctx context.Context, req *ShutdownRequest) (*ShutdownReply, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RegisterTorrentHandler ¶
func RegisterTorrentHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
RegisterTorrentHandler registers the http handlers for service Torrent to "mux". The handlers forward requests to the grpc endpoint over "conn".
func RegisterTorrentHandlerClient ¶
func RegisterTorrentHandlerClient(ctx context.Context, mux *runtime.ServeMux, client TorrentClient) error
RegisterTorrentHandlerClient registers the http handlers for service Torrent to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "TorrentClient". Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "TorrentClient" doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in "TorrentClient" to call the correct interceptors.
func RegisterTorrentHandlerFromEndpoint ¶
func RegisterTorrentHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error)
RegisterTorrentHandlerFromEndpoint is same as RegisterTorrentHandler but automatically dials to "endpoint" and closes the connection when "ctx" gets done.
func RegisterTorrentServer ¶
func RegisterTorrentServer(s *grpc.Server, srv TorrentServer)
Types ¶
type AddMagnetUriReply ¶
type AddMagnetUriReply struct { Hash string `protobuf:"bytes,1,opt,name=hash,proto3" json:"hash,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*AddMagnetUriReply) Descriptor ¶
func (*AddMagnetUriReply) Descriptor() ([]byte, []int)
func (*AddMagnetUriReply) GetHash ¶
func (m *AddMagnetUriReply) GetHash() string
func (*AddMagnetUriReply) ProtoMessage ¶
func (*AddMagnetUriReply) ProtoMessage()
func (*AddMagnetUriReply) Reset ¶
func (m *AddMagnetUriReply) Reset()
func (*AddMagnetUriReply) String ¶
func (m *AddMagnetUriReply) String() string
func (*AddMagnetUriReply) XXX_DiscardUnknown ¶
func (m *AddMagnetUriReply) XXX_DiscardUnknown()
func (*AddMagnetUriReply) XXX_Marshal ¶
func (m *AddMagnetUriReply) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*AddMagnetUriReply) XXX_Merge ¶
func (m *AddMagnetUriReply) XXX_Merge(src proto.Message)
func (*AddMagnetUriReply) XXX_Size ¶
func (m *AddMagnetUriReply) XXX_Size() int
func (*AddMagnetUriReply) XXX_Unmarshal ¶
func (m *AddMagnetUriReply) XXX_Unmarshal(b []byte) error
type AddMagnetUriRequest ¶
type AddMagnetUriRequest struct { Magnet string `protobuf:"bytes,1,opt,name=magnet,proto3" json:"magnet,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*AddMagnetUriRequest) Descriptor ¶
func (*AddMagnetUriRequest) Descriptor() ([]byte, []int)
func (*AddMagnetUriRequest) GetMagnet ¶
func (m *AddMagnetUriRequest) GetMagnet() string
func (*AddMagnetUriRequest) ProtoMessage ¶
func (*AddMagnetUriRequest) ProtoMessage()
func (*AddMagnetUriRequest) Reset ¶
func (m *AddMagnetUriRequest) Reset()
func (*AddMagnetUriRequest) String ¶
func (m *AddMagnetUriRequest) String() string
func (*AddMagnetUriRequest) XXX_DiscardUnknown ¶
func (m *AddMagnetUriRequest) XXX_DiscardUnknown()
func (*AddMagnetUriRequest) XXX_Marshal ¶
func (m *AddMagnetUriRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*AddMagnetUriRequest) XXX_Merge ¶
func (m *AddMagnetUriRequest) XXX_Merge(src proto.Message)
func (*AddMagnetUriRequest) XXX_Size ¶
func (m *AddMagnetUriRequest) XXX_Size() int
func (*AddMagnetUriRequest) XXX_Unmarshal ¶
func (m *AddMagnetUriRequest) XXX_Unmarshal(b []byte) error
type AllTorrentStatusReply ¶
type AllTorrentStatusReply struct { AllTorrentStatus []*TorrentStatus `protobuf:"bytes,1,rep,name=all_torrent_status,json=allTorrentStatus,proto3" json:"all_torrent_status,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*AllTorrentStatusReply) Descriptor ¶
func (*AllTorrentStatusReply) Descriptor() ([]byte, []int)
func (*AllTorrentStatusReply) GetAllTorrentStatus ¶
func (m *AllTorrentStatusReply) GetAllTorrentStatus() []*TorrentStatus
func (*AllTorrentStatusReply) ProtoMessage ¶
func (*AllTorrentStatusReply) ProtoMessage()
func (*AllTorrentStatusReply) Reset ¶
func (m *AllTorrentStatusReply) Reset()
func (*AllTorrentStatusReply) String ¶
func (m *AllTorrentStatusReply) String() string
func (*AllTorrentStatusReply) XXX_DiscardUnknown ¶
func (m *AllTorrentStatusReply) XXX_DiscardUnknown()
func (*AllTorrentStatusReply) XXX_Marshal ¶
func (m *AllTorrentStatusReply) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*AllTorrentStatusReply) XXX_Merge ¶
func (m *AllTorrentStatusReply) XXX_Merge(src proto.Message)
func (*AllTorrentStatusReply) XXX_Size ¶
func (m *AllTorrentStatusReply) XXX_Size() int
func (*AllTorrentStatusReply) XXX_Unmarshal ¶
func (m *AllTorrentStatusReply) XXX_Unmarshal(b []byte) error
type AllTorrentStatusRequest ¶
type AllTorrentStatusRequest struct { XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*AllTorrentStatusRequest) Descriptor ¶
func (*AllTorrentStatusRequest) Descriptor() ([]byte, []int)
func (*AllTorrentStatusRequest) ProtoMessage ¶
func (*AllTorrentStatusRequest) ProtoMessage()
func (*AllTorrentStatusRequest) Reset ¶
func (m *AllTorrentStatusRequest) Reset()
func (*AllTorrentStatusRequest) String ¶
func (m *AllTorrentStatusRequest) String() string
func (*AllTorrentStatusRequest) XXX_DiscardUnknown ¶
func (m *AllTorrentStatusRequest) XXX_DiscardUnknown()
func (*AllTorrentStatusRequest) XXX_Marshal ¶
func (m *AllTorrentStatusRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*AllTorrentStatusRequest) XXX_Merge ¶
func (m *AllTorrentStatusRequest) XXX_Merge(src proto.Message)
func (*AllTorrentStatusRequest) XXX_Size ¶
func (m *AllTorrentStatusRequest) XXX_Size() int
func (*AllTorrentStatusRequest) XXX_Unmarshal ¶
func (m *AllTorrentStatusRequest) XXX_Unmarshal(b []byte) error
type PauseTorrentReply ¶
type PauseTorrentReply struct { XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*PauseTorrentReply) Descriptor ¶
func (*PauseTorrentReply) Descriptor() ([]byte, []int)
func (*PauseTorrentReply) ProtoMessage ¶
func (*PauseTorrentReply) ProtoMessage()
func (*PauseTorrentReply) Reset ¶
func (m *PauseTorrentReply) Reset()
func (*PauseTorrentReply) String ¶
func (m *PauseTorrentReply) String() string
func (*PauseTorrentReply) XXX_DiscardUnknown ¶
func (m *PauseTorrentReply) XXX_DiscardUnknown()
func (*PauseTorrentReply) XXX_Marshal ¶
func (m *PauseTorrentReply) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*PauseTorrentReply) XXX_Merge ¶
func (m *PauseTorrentReply) XXX_Merge(src proto.Message)
func (*PauseTorrentReply) XXX_Size ¶
func (m *PauseTorrentReply) XXX_Size() int
func (*PauseTorrentReply) XXX_Unmarshal ¶
func (m *PauseTorrentReply) XXX_Unmarshal(b []byte) error
type PauseTorrentRequest ¶
type PauseTorrentRequest struct { Hash string `protobuf:"bytes,1,opt,name=hash,proto3" json:"hash,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*PauseTorrentRequest) Descriptor ¶
func (*PauseTorrentRequest) Descriptor() ([]byte, []int)
func (*PauseTorrentRequest) GetHash ¶
func (m *PauseTorrentRequest) GetHash() string
func (*PauseTorrentRequest) ProtoMessage ¶
func (*PauseTorrentRequest) ProtoMessage()
func (*PauseTorrentRequest) Reset ¶
func (m *PauseTorrentRequest) Reset()
func (*PauseTorrentRequest) String ¶
func (m *PauseTorrentRequest) String() string
func (*PauseTorrentRequest) XXX_DiscardUnknown ¶
func (m *PauseTorrentRequest) XXX_DiscardUnknown()
func (*PauseTorrentRequest) XXX_Marshal ¶
func (m *PauseTorrentRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*PauseTorrentRequest) XXX_Merge ¶
func (m *PauseTorrentRequest) XXX_Merge(src proto.Message)
func (*PauseTorrentRequest) XXX_Size ¶
func (m *PauseTorrentRequest) XXX_Size() int
func (*PauseTorrentRequest) XXX_Unmarshal ¶
func (m *PauseTorrentRequest) XXX_Unmarshal(b []byte) error
type PingReply ¶
type PingReply struct { Message string `protobuf:"bytes,1,opt,name=message,proto3" json:"message,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
The response message containing the greetings
func (*PingReply) Descriptor ¶
func (*PingReply) GetMessage ¶
func (*PingReply) ProtoMessage ¶
func (*PingReply) ProtoMessage()
func (*PingReply) XXX_DiscardUnknown ¶
func (m *PingReply) XXX_DiscardUnknown()
func (*PingReply) XXX_Marshal ¶
func (*PingReply) XXX_Unmarshal ¶
type PingRequest ¶
type PingRequest struct { Message string `protobuf:"bytes,1,opt,name=message,proto3" json:"message,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
The ping message containing the user's name.
func (*PingRequest) Descriptor ¶
func (*PingRequest) Descriptor() ([]byte, []int)
func (*PingRequest) GetMessage ¶
func (m *PingRequest) GetMessage() string
func (*PingRequest) ProtoMessage ¶
func (*PingRequest) ProtoMessage()
func (*PingRequest) Reset ¶
func (m *PingRequest) Reset()
func (*PingRequest) String ¶
func (m *PingRequest) String() string
func (*PingRequest) XXX_DiscardUnknown ¶
func (m *PingRequest) XXX_DiscardUnknown()
func (*PingRequest) XXX_Marshal ¶
func (m *PingRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*PingRequest) XXX_Merge ¶
func (m *PingRequest) XXX_Merge(src proto.Message)
func (*PingRequest) XXX_Size ¶
func (m *PingRequest) XXX_Size() int
func (*PingRequest) XXX_Unmarshal ¶
func (m *PingRequest) XXX_Unmarshal(b []byte) error
type RemoveTorrentReply ¶
type RemoveTorrentReply struct { XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*RemoveTorrentReply) Descriptor ¶
func (*RemoveTorrentReply) Descriptor() ([]byte, []int)
func (*RemoveTorrentReply) ProtoMessage ¶
func (*RemoveTorrentReply) ProtoMessage()
func (*RemoveTorrentReply) Reset ¶
func (m *RemoveTorrentReply) Reset()
func (*RemoveTorrentReply) String ¶
func (m *RemoveTorrentReply) String() string
func (*RemoveTorrentReply) XXX_DiscardUnknown ¶
func (m *RemoveTorrentReply) XXX_DiscardUnknown()
func (*RemoveTorrentReply) XXX_Marshal ¶
func (m *RemoveTorrentReply) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*RemoveTorrentReply) XXX_Merge ¶
func (m *RemoveTorrentReply) XXX_Merge(src proto.Message)
func (*RemoveTorrentReply) XXX_Size ¶
func (m *RemoveTorrentReply) XXX_Size() int
func (*RemoveTorrentReply) XXX_Unmarshal ¶
func (m *RemoveTorrentReply) XXX_Unmarshal(b []byte) error
type RemoveTorrentRequest ¶
type RemoveTorrentRequest struct { Hash string `protobuf:"bytes,1,opt,name=hash,proto3" json:"hash,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*RemoveTorrentRequest) Descriptor ¶
func (*RemoveTorrentRequest) Descriptor() ([]byte, []int)
func (*RemoveTorrentRequest) GetHash ¶
func (m *RemoveTorrentRequest) GetHash() string
func (*RemoveTorrentRequest) ProtoMessage ¶
func (*RemoveTorrentRequest) ProtoMessage()
func (*RemoveTorrentRequest) Reset ¶
func (m *RemoveTorrentRequest) Reset()
func (*RemoveTorrentRequest) String ¶
func (m *RemoveTorrentRequest) String() string
func (*RemoveTorrentRequest) XXX_DiscardUnknown ¶
func (m *RemoveTorrentRequest) XXX_DiscardUnknown()
func (*RemoveTorrentRequest) XXX_Marshal ¶
func (m *RemoveTorrentRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*RemoveTorrentRequest) XXX_Merge ¶
func (m *RemoveTorrentRequest) XXX_Merge(src proto.Message)
func (*RemoveTorrentRequest) XXX_Size ¶
func (m *RemoveTorrentRequest) XXX_Size() int
func (*RemoveTorrentRequest) XXX_Unmarshal ¶
func (m *RemoveTorrentRequest) XXX_Unmarshal(b []byte) error
type ResumeTorrentReply ¶
type ResumeTorrentReply struct { XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*ResumeTorrentReply) Descriptor ¶
func (*ResumeTorrentReply) Descriptor() ([]byte, []int)
func (*ResumeTorrentReply) ProtoMessage ¶
func (*ResumeTorrentReply) ProtoMessage()
func (*ResumeTorrentReply) Reset ¶
func (m *ResumeTorrentReply) Reset()
func (*ResumeTorrentReply) String ¶
func (m *ResumeTorrentReply) String() string
func (*ResumeTorrentReply) XXX_DiscardUnknown ¶
func (m *ResumeTorrentReply) XXX_DiscardUnknown()
func (*ResumeTorrentReply) XXX_Marshal ¶
func (m *ResumeTorrentReply) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*ResumeTorrentReply) XXX_Merge ¶
func (m *ResumeTorrentReply) XXX_Merge(src proto.Message)
func (*ResumeTorrentReply) XXX_Size ¶
func (m *ResumeTorrentReply) XXX_Size() int
func (*ResumeTorrentReply) XXX_Unmarshal ¶
func (m *ResumeTorrentReply) XXX_Unmarshal(b []byte) error
type ResumeTorrentRequest ¶
type ResumeTorrentRequest struct { Hash string `protobuf:"bytes,1,opt,name=hash,proto3" json:"hash,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*ResumeTorrentRequest) Descriptor ¶
func (*ResumeTorrentRequest) Descriptor() ([]byte, []int)
func (*ResumeTorrentRequest) GetHash ¶
func (m *ResumeTorrentRequest) GetHash() string
func (*ResumeTorrentRequest) ProtoMessage ¶
func (*ResumeTorrentRequest) ProtoMessage()
func (*ResumeTorrentRequest) Reset ¶
func (m *ResumeTorrentRequest) Reset()
func (*ResumeTorrentRequest) String ¶
func (m *ResumeTorrentRequest) String() string
func (*ResumeTorrentRequest) XXX_DiscardUnknown ¶
func (m *ResumeTorrentRequest) XXX_DiscardUnknown()
func (*ResumeTorrentRequest) XXX_Marshal ¶
func (m *ResumeTorrentRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*ResumeTorrentRequest) XXX_Merge ¶
func (m *ResumeTorrentRequest) XXX_Merge(src proto.Message)
func (*ResumeTorrentRequest) XXX_Size ¶
func (m *ResumeTorrentRequest) XXX_Size() int
func (*ResumeTorrentRequest) XXX_Unmarshal ¶
func (m *ResumeTorrentRequest) XXX_Unmarshal(b []byte) error
type ShutdownReply ¶
type ShutdownReply struct { Message string `protobuf:"bytes,1,opt,name=message,proto3" json:"message,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*ShutdownReply) Descriptor ¶
func (*ShutdownReply) Descriptor() ([]byte, []int)
func (*ShutdownReply) GetMessage ¶
func (m *ShutdownReply) GetMessage() string
func (*ShutdownReply) ProtoMessage ¶
func (*ShutdownReply) ProtoMessage()
func (*ShutdownReply) Reset ¶
func (m *ShutdownReply) Reset()
func (*ShutdownReply) String ¶
func (m *ShutdownReply) String() string
func (*ShutdownReply) XXX_DiscardUnknown ¶
func (m *ShutdownReply) XXX_DiscardUnknown()
func (*ShutdownReply) XXX_Marshal ¶
func (m *ShutdownReply) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*ShutdownReply) XXX_Merge ¶
func (m *ShutdownReply) XXX_Merge(src proto.Message)
func (*ShutdownReply) XXX_Size ¶
func (m *ShutdownReply) XXX_Size() int
func (*ShutdownReply) XXX_Unmarshal ¶
func (m *ShutdownReply) XXX_Unmarshal(b []byte) error
type ShutdownRequest ¶
type ShutdownRequest struct { Message string `protobuf:"bytes,1,opt,name=message,proto3" json:"message,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*ShutdownRequest) Descriptor ¶
func (*ShutdownRequest) Descriptor() ([]byte, []int)
func (*ShutdownRequest) GetMessage ¶
func (m *ShutdownRequest) GetMessage() string
func (*ShutdownRequest) ProtoMessage ¶
func (*ShutdownRequest) ProtoMessage()
func (*ShutdownRequest) Reset ¶
func (m *ShutdownRequest) Reset()
func (*ShutdownRequest) String ¶
func (m *ShutdownRequest) String() string
func (*ShutdownRequest) XXX_DiscardUnknown ¶
func (m *ShutdownRequest) XXX_DiscardUnknown()
func (*ShutdownRequest) XXX_Marshal ¶
func (m *ShutdownRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*ShutdownRequest) XXX_Merge ¶
func (m *ShutdownRequest) XXX_Merge(src proto.Message)
func (*ShutdownRequest) XXX_Size ¶
func (m *ShutdownRequest) XXX_Size() int
func (*ShutdownRequest) XXX_Unmarshal ¶
func (m *ShutdownRequest) XXX_Unmarshal(b []byte) error
type TorrentClient ¶
type TorrentClient interface { Ping(ctx context.Context, in *PingRequest, opts ...grpc.CallOption) (*PingReply, error) Shutdown(ctx context.Context, in *ShutdownRequest, opts ...grpc.CallOption) (*ShutdownReply, error) AddMagnetUri(ctx context.Context, in *AddMagnetUriRequest, opts ...grpc.CallOption) (*AddMagnetUriReply, error) RemoveTorrent(ctx context.Context, in *RemoveTorrentRequest, opts ...grpc.CallOption) (*RemoveTorrentReply, error) PauseTorrent(ctx context.Context, in *PauseTorrentRequest, opts ...grpc.CallOption) (*PauseTorrentReply, error) ResumeTorrent(ctx context.Context, in *ResumeTorrentRequest, opts ...grpc.CallOption) (*ResumeTorrentReply, error) AllTorrentStatus(ctx context.Context, in *AllTorrentStatusRequest, opts ...grpc.CallOption) (Torrent_AllTorrentStatusClient, error) }
TorrentClient is the client API for Torrent service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
func NewTorrentClient ¶
func NewTorrentClient(cc *grpc.ClientConn) TorrentClient
type TorrentServer ¶
type TorrentServer interface { Ping(context.Context, *PingRequest) (*PingReply, error) Shutdown(context.Context, *ShutdownRequest) (*ShutdownReply, error) AddMagnetUri(context.Context, *AddMagnetUriRequest) (*AddMagnetUriReply, error) RemoveTorrent(context.Context, *RemoveTorrentRequest) (*RemoveTorrentReply, error) PauseTorrent(context.Context, *PauseTorrentRequest) (*PauseTorrentReply, error) ResumeTorrent(context.Context, *ResumeTorrentRequest) (*ResumeTorrentReply, error) AllTorrentStatus(*AllTorrentStatusRequest, Torrent_AllTorrentStatusServer) error }
TorrentServer is the server API for Torrent service.
type TorrentStatus ¶
type TorrentStatus struct { Hash string `protobuf:"bytes,1,opt,name=hash,proto3" json:"hash,omitempty"` Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` Progress float32 `protobuf:"fixed32,3,opt,name=progress,proto3" json:"progress,omitempty"` DownloadRate int32 `protobuf:"zigzag32,4,opt,name=download_rate,json=downloadRate,proto3" json:"download_rate,omitempty"` UploadRate int32 `protobuf:"zigzag32,5,opt,name=upload_rate,json=uploadRate,proto3" json:"upload_rate,omitempty"` Peers int32 `protobuf:"zigzag32,6,opt,name=peers,proto3" json:"peers,omitempty"` Seeds int32 `protobuf:"zigzag32,7,opt,name=seeds,proto3" json:"seeds,omitempty"` State string `protobuf:"bytes,8,opt,name=state,proto3" json:"state,omitempty"` TotalSize uint64 `protobuf:"varint,9,opt,name=total_size,json=totalSize,proto3" json:"total_size,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*TorrentStatus) Descriptor ¶
func (*TorrentStatus) Descriptor() ([]byte, []int)
func (*TorrentStatus) GetDownloadRate ¶
func (m *TorrentStatus) GetDownloadRate() int32
func (*TorrentStatus) GetHash ¶
func (m *TorrentStatus) GetHash() string
func (*TorrentStatus) GetName ¶
func (m *TorrentStatus) GetName() string
func (*TorrentStatus) GetPeers ¶
func (m *TorrentStatus) GetPeers() int32
func (*TorrentStatus) GetProgress ¶
func (m *TorrentStatus) GetProgress() float32
func (*TorrentStatus) GetSeeds ¶
func (m *TorrentStatus) GetSeeds() int32
func (*TorrentStatus) GetState ¶
func (m *TorrentStatus) GetState() string
func (*TorrentStatus) GetTotalSize ¶
func (m *TorrentStatus) GetTotalSize() uint64
func (*TorrentStatus) GetUploadRate ¶
func (m *TorrentStatus) GetUploadRate() int32
func (*TorrentStatus) ProtoMessage ¶
func (*TorrentStatus) ProtoMessage()
func (*TorrentStatus) Reset ¶
func (m *TorrentStatus) Reset()
func (*TorrentStatus) String ¶
func (m *TorrentStatus) String() string
func (*TorrentStatus) XXX_DiscardUnknown ¶
func (m *TorrentStatus) XXX_DiscardUnknown()
func (*TorrentStatus) XXX_Marshal ¶
func (m *TorrentStatus) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*TorrentStatus) XXX_Merge ¶
func (m *TorrentStatus) XXX_Merge(src proto.Message)
func (*TorrentStatus) XXX_Size ¶
func (m *TorrentStatus) XXX_Size() int
func (*TorrentStatus) XXX_Unmarshal ¶
func (m *TorrentStatus) XXX_Unmarshal(b []byte) error
type Torrent_AllTorrentStatusClient ¶
type Torrent_AllTorrentStatusClient interface { Recv() (*AllTorrentStatusReply, error) grpc.ClientStream }
type Torrent_AllTorrentStatusServer ¶
type Torrent_AllTorrentStatusServer interface { Send(*AllTorrentStatusReply) error grpc.ServerStream }
type UnimplementedTorrentServer ¶
type UnimplementedTorrentServer struct { }
UnimplementedTorrentServer can be embedded to have forward compatible implementations.
func (*UnimplementedTorrentServer) AddMagnetUri ¶
func (*UnimplementedTorrentServer) AddMagnetUri(ctx context.Context, req *AddMagnetUriRequest) (*AddMagnetUriReply, error)
func (*UnimplementedTorrentServer) AllTorrentStatus ¶
func (*UnimplementedTorrentServer) AllTorrentStatus(req *AllTorrentStatusRequest, srv Torrent_AllTorrentStatusServer) error
func (*UnimplementedTorrentServer) PauseTorrent ¶
func (*UnimplementedTorrentServer) PauseTorrent(ctx context.Context, req *PauseTorrentRequest) (*PauseTorrentReply, error)
func (*UnimplementedTorrentServer) Ping ¶
func (*UnimplementedTorrentServer) Ping(ctx context.Context, req *PingRequest) (*PingReply, error)
func (*UnimplementedTorrentServer) RemoveTorrent ¶
func (*UnimplementedTorrentServer) RemoveTorrent(ctx context.Context, req *RemoveTorrentRequest) (*RemoveTorrentReply, error)
func (*UnimplementedTorrentServer) ResumeTorrent ¶
func (*UnimplementedTorrentServer) ResumeTorrent(ctx context.Context, req *ResumeTorrentRequest) (*ResumeTorrentReply, error)
func (*UnimplementedTorrentServer) Shutdown ¶
func (*UnimplementedTorrentServer) Shutdown(ctx context.Context, req *ShutdownRequest) (*ShutdownReply, error)