pb

package
v0.0.0-...-b9906d2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 11, 2023 License: MIT Imports: 5 Imported by: 0

Documentation

Index

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) Descriptor() ([]byte, []int)

Deprecated: Use Torrent.ProtoReflect.Descriptor instead.

func (*Torrent) GetConnectedPeers

func (x *Torrent) GetConnectedPeers() int64

func (*Torrent) GetDownloadBps

func (x *Torrent) GetDownloadBps() int64

func (*Torrent) GetFiles

func (x *Torrent) GetFiles() []*Torrent_File

func (*Torrent) GetHash

func (x *Torrent) GetHash() []byte

func (*Torrent) GetHashHex

func (x *Torrent) GetHashHex() string

func (*Torrent) GetName

func (x *Torrent) GetName() string

func (*Torrent) GetStarted

func (x *Torrent) GetStarted() *timestamppb.Timestamp

func (*Torrent) GetState

func (x *Torrent) GetState() TorrentState

func (*Torrent) GetTotalCompleted

func (x *Torrent) GetTotalCompleted() int64

func (*Torrent) GetTotalDownload

func (x *Torrent) GetTotalDownload() int64

func (*Torrent) GetTotalSize

func (x *Torrent) GetTotalSize() int64

func (*Torrent) GetTotalUpload

func (x *Torrent) GetTotalUpload() int64

func (*Torrent) GetUploadBps

func (x *Torrent) GetUploadBps() int64

func (*Torrent) ProtoMessage

func (*Torrent) ProtoMessage()

func (*Torrent) ProtoReflect

func (x *Torrent) ProtoReflect() protoreflect.Message

func (*Torrent) Reset

func (x *Torrent) Reset()

func (*Torrent) String

func (x *Torrent) String() string

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) Enum

func (x TorrentState) Enum() *TorrentState

func (TorrentState) EnumDescriptor deprecated

func (TorrentState) EnumDescriptor() ([]byte, []int)

Deprecated: Use TorrentState.Descriptor instead.

func (TorrentState) Number

func (TorrentState) String

func (x TorrentState) String() string

func (TorrentState) Type

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

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL