Documentation ¶
Index ¶
- Variables
- type Torrent
- func (*Torrent) Descriptor() ([]byte, []int)deprecated
- func (x *Torrent) GetConnectedPeers() int64
- func (x *Torrent) GetDownloadBps() int64
- func (x *Torrent) GetFiles() []*Torrent_File
- func (x *Torrent) GetHash() []byte
- func (x *Torrent) GetHashHex() string
- func (x *Torrent) GetName() string
- func (x *Torrent) GetStarted() *timestamppb.Timestamp
- func (x *Torrent) GetState() TorrentState
- func (x *Torrent) GetTotalCompleted() int64
- func (x *Torrent) GetTotalDownload() int64
- func (x *Torrent) GetTotalSize() int64
- func (x *Torrent) GetTotalUpload() int64
- func (x *Torrent) GetUploadBps() int64
- func (*Torrent) ProtoMessage()
- func (x *Torrent) ProtoReflect() protoreflect.Message
- func (x *Torrent) Reset()
- func (x *Torrent) String() string
- type TorrentList
- type TorrentState
- func (TorrentState) Descriptor() protoreflect.EnumDescriptor
- func (x TorrentState) Enum() *TorrentState
- func (TorrentState) EnumDescriptor() ([]byte, []int)deprecated
- func (x TorrentState) Number() protoreflect.EnumNumber
- func (x TorrentState) String() string
- func (TorrentState) Type() protoreflect.EnumType
- type Torrent_File
- func (*Torrent_File) Descriptor() ([]byte, []int)deprecated
- func (x *Torrent_File) GetCompleted() int64
- func (x *Torrent_File) GetPath() string
- func (x *Torrent_File) GetSize() int64
- func (*Torrent_File) ProtoMessage()
- func (x *Torrent_File) ProtoReflect() protoreflect.Message
- func (x *Torrent_File) Reset()
- func (x *Torrent_File) String() string
Constants ¶
This section is empty.
Variables ¶
View Source
var ( TorrentState_name = map[int32]string{ 0: "INITIALIZING", 1: "DOWNLOADING", 2: "SEEDING", 3: "PAUSED", 4: "DELETED", } TorrentState_value = map[string]int32{ "INITIALIZING": 0, "DOWNLOADING": 1, "SEEDING": 2, "PAUSED": 3, "DELETED": 4, } )
Enum value maps for TorrentState.
View Source
var File_pb_api_proto protoreflect.FileDescriptor
Functions ¶
This section is empty.
Types ¶
type Torrent ¶
type Torrent struct { Hash []byte `protobuf:"bytes,1,opt,name=hash,proto3" json:"hash,omitempty"` HashHex string `protobuf:"bytes,2,opt,name=hash_hex,json=hashHex,proto3" json:"hash_hex,omitempty"` Name string `protobuf:"bytes,3,opt,name=name,proto3" json:"name,omitempty"` Started *timestamppb.Timestamp `protobuf:"bytes,4,opt,name=started,proto3" json:"started,omitempty"` State TorrentState `protobuf:"varint,5,opt,name=state,proto3,enum=TorrentState" json:"state,omitempty"` TotalSize int64 `protobuf:"varint,10,opt,name=total_size,json=totalSize,proto3" json:"total_size,omitempty"` TotalCompleted int64 `protobuf:"varint,11,opt,name=total_completed,json=totalCompleted,proto3" json:"total_completed,omitempty"` TotalUpload int64 `protobuf:"varint,12,opt,name=total_upload,json=totalUpload,proto3" json:"total_upload,omitempty"` TotalDownload int64 `protobuf:"varint,13,opt,name=total_download,json=totalDownload,proto3" json:"total_download,omitempty"` UploadBps int64 `protobuf:"varint,14,opt,name=upload_bps,json=uploadBps,proto3" json:"upload_bps,omitempty"` DownloadBps int64 `protobuf:"varint,15,opt,name=download_bps,json=downloadBps,proto3" json:"download_bps,omitempty"` ConnectedPeers int64 `protobuf:"varint,16,opt,name=connected_peers,json=connectedPeers,proto3" json:"connected_peers,omitempty"` Files []*Torrent_File `protobuf:"bytes,20,rep,name=files,proto3" json:"files,omitempty"` // contains filtered or unexported fields }
func (*Torrent) Descriptor
deprecated
func (*Torrent) GetConnectedPeers ¶
func (*Torrent) GetDownloadBps ¶
func (*Torrent) GetFiles ¶
func (x *Torrent) GetFiles() []*Torrent_File
func (*Torrent) GetHashHex ¶
func (*Torrent) GetStarted ¶
func (x *Torrent) GetStarted() *timestamppb.Timestamp
func (*Torrent) GetState ¶
func (x *Torrent) GetState() TorrentState
func (*Torrent) GetTotalCompleted ¶
func (*Torrent) GetTotalDownload ¶
func (*Torrent) GetTotalSize ¶
func (*Torrent) GetTotalUpload ¶
func (*Torrent) GetUploadBps ¶
func (*Torrent) ProtoMessage ¶
func (*Torrent) ProtoMessage()
func (*Torrent) ProtoReflect ¶
func (x *Torrent) ProtoReflect() protoreflect.Message
type TorrentList ¶
type TorrentList struct { Torrents []*Torrent `protobuf:"bytes,1,rep,name=torrents,proto3" json:"torrents,omitempty"` // contains filtered or unexported fields }
func (*TorrentList) Descriptor
deprecated
func (*TorrentList) Descriptor() ([]byte, []int)
Deprecated: Use TorrentList.ProtoReflect.Descriptor instead.
func (*TorrentList) GetTorrents ¶
func (x *TorrentList) GetTorrents() []*Torrent
func (*TorrentList) ProtoMessage ¶
func (*TorrentList) ProtoMessage()
func (*TorrentList) ProtoReflect ¶
func (x *TorrentList) ProtoReflect() protoreflect.Message
func (*TorrentList) Reset ¶
func (x *TorrentList) Reset()
func (*TorrentList) String ¶
func (x *TorrentList) String() string
type TorrentState ¶
type TorrentState int32
const ( TorrentState_INITIALIZING TorrentState = 0 TorrentState_DOWNLOADING TorrentState = 1 TorrentState_SEEDING TorrentState = 2 TorrentState_PAUSED TorrentState = 3 // TODO TorrentState_DELETED TorrentState = 4 )
func (TorrentState) Descriptor ¶
func (TorrentState) Descriptor() protoreflect.EnumDescriptor
func (TorrentState) Enum ¶
func (x TorrentState) Enum() *TorrentState
func (TorrentState) EnumDescriptor
deprecated
func (TorrentState) EnumDescriptor() ([]byte, []int)
Deprecated: Use TorrentState.Descriptor instead.
func (TorrentState) Number ¶
func (x TorrentState) Number() protoreflect.EnumNumber
func (TorrentState) String ¶
func (x TorrentState) String() string
func (TorrentState) Type ¶
func (TorrentState) Type() protoreflect.EnumType
type Torrent_File ¶
type Torrent_File struct { Path string `protobuf:"bytes,1,opt,name=path,proto3" json:"path,omitempty"` Size int64 `protobuf:"varint,2,opt,name=size,proto3" json:"size,omitempty"` Completed int64 `protobuf:"varint,3,opt,name=completed,proto3" json:"completed,omitempty"` // contains filtered or unexported fields }
func (*Torrent_File) Descriptor
deprecated
func (*Torrent_File) Descriptor() ([]byte, []int)
Deprecated: Use Torrent_File.ProtoReflect.Descriptor instead.
func (*Torrent_File) GetCompleted ¶
func (x *Torrent_File) GetCompleted() int64
func (*Torrent_File) GetPath ¶
func (x *Torrent_File) GetPath() string
func (*Torrent_File) GetSize ¶
func (x *Torrent_File) GetSize() int64
func (*Torrent_File) ProtoMessage ¶
func (*Torrent_File) ProtoMessage()
func (*Torrent_File) ProtoReflect ¶
func (x *Torrent_File) ProtoReflect() protoreflect.Message
func (*Torrent_File) Reset ¶
func (x *Torrent_File) Reset()
func (*Torrent_File) String ¶
func (x *Torrent_File) String() string
Click to show internal directories.
Click to hide internal directories.