rpctypes

package
v1.6.2 Latest Latest
Warning

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

Go to latest
Published: Mar 2, 2021 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AddPeerRequest

type AddPeerRequest struct {
	ID   string
	Addr string
}

AddPeerRequest contains request arguments for Session.AddPeer method.

type AddPeerResponse

type AddPeerResponse struct {
}

AddPeerResponse contains response arguments for Session.AddPeer method.

type AddTorrentOptions

type AddTorrentOptions struct {
	ID                string
	Stopped           bool
	StopAfterDownload bool
}

AddTorrentOptions contains options for adding a new torrent.

type AddTorrentRequest

type AddTorrentRequest struct {
	Torrent string
	AddTorrentOptions
}

AddTorrentRequest contains request arguments for Session.AddTorrent method.

type AddTorrentResponse

type AddTorrentResponse struct {
	Torrent Torrent
}

AddTorrentResponse contains response arguments for Session.AddTorrent method.

type AddTrackerRequest

type AddTrackerRequest struct {
	ID  string
	URL string
}

AddTrackerRequest contains request arguments for Session.AddTracker method.

type AddTrackerResponse

type AddTrackerResponse struct {
}

AddTrackerResponse contains response arguments for Session.AddTracker method.

type AddURIRequest

type AddURIRequest struct {
	URI string
	AddTorrentOptions
}

AddURIRequest contains request arguments for Session.AddURI method.

type AddURIResponse

type AddURIResponse struct {
	Torrent Torrent
}

AddURIResponse contains response arguments for Session.AddURI method.

type AnnounceTorrentRequest

type AnnounceTorrentRequest struct {
	ID string
}

AnnounceTorrentRequest contains request arguments for Session.AnnounceTorrent method.

type AnnounceTorrentResponse

type AnnounceTorrentResponse struct {
}

AnnounceTorrentResponse contains response arguments for Session.AnnounceTorrent method.

type CleanDatabaseRequest

type CleanDatabaseRequest struct {
}

CleanDatabaseRequest contains request arguments for Session.CleanDatabase method.

type CleanDatabaseResponse

type CleanDatabaseResponse struct {
}

CleanDatabaseResponse contains response arguments for Session.CleanDatabase method.

type GetMagnetRequest

type GetMagnetRequest struct {
	ID string
}

GetMagnetRequest contains request arguments for Session.GetMagnet method.

type GetMagnetResponse

type GetMagnetResponse struct {
	Magnet string
}

GetMagnetResponse contains response arguments for Session.GetMagnet method.

type GetSessionStatsRequest

type GetSessionStatsRequest struct {
}

GetSessionStatsRequest contains request arguments for Session.GetSessionStats method.

type GetSessionStatsResponse

type GetSessionStatsResponse struct {
	Stats SessionStats
}

GetSessionStatsResponse contains response arguments for Session.GetSessionStats method.

type GetTorrentPeersRequest

type GetTorrentPeersRequest struct {
	ID string
}

GetTorrentPeersRequest contains request arguments for Session.GetTorrentPeers method.

type GetTorrentPeersResponse

type GetTorrentPeersResponse struct {
	Peers []Peer
}

GetTorrentPeersResponse contains response arguments for Session.GetTorrentPeers method.

type GetTorrentRequest

type GetTorrentRequest struct {
	ID string
}

GetTorrentRequest contains request arguments for Session.GetTorrent method.

type GetTorrentResponse

type GetTorrentResponse struct {
	Torrent string
}

GetTorrentResponse contains response arguments for Session.GetTorrent method.

type GetTorrentStatsRequest

type GetTorrentStatsRequest struct {
	ID string
}

GetTorrentStatsRequest contains request arguments for Session.GetTorrentStats method.

type GetTorrentStatsResponse

type GetTorrentStatsResponse struct {
	Stats Stats
}

GetTorrentStatsResponse contains response arguments for Session.GetTorrentStats method.

type GetTorrentTrackersRequest

type GetTorrentTrackersRequest struct {
	ID string
}

GetTorrentTrackersRequest contains request arguments for Session.GetTorrentTrackers method.

type GetTorrentTrackersResponse

type GetTorrentTrackersResponse struct {
	Trackers []Tracker
}

GetTorrentTrackersResponse contains response arguments for Session.GetTorrentTrackers method.

type GetTorrentWebseedsRequest

type GetTorrentWebseedsRequest struct {
	ID string
}

GetTorrentWebseedsRequest contains request arguments for Session.GetTorrentWebseeds method.

type GetTorrentWebseedsResponse

type GetTorrentWebseedsResponse struct {
	Webseeds []Webseed
}

GetTorrentWebseedsResponse contains response arguments for Session.GetTorrentWebseeds method.

type ListTorrentsRequest

type ListTorrentsRequest struct {
}

ListTorrentsRequest contains request arguments for Session.ListTorrents method.

type ListTorrentsResponse

type ListTorrentsResponse struct {
	Torrents []Torrent
}

ListTorrentsResponse contains response arguments for Session.ListTorrents method.

type MoveTorrentRequest

type MoveTorrentRequest struct {
	ID     string
	Target string
}

MoveTorrentRequest contains request arguments for Session.MoveTorrent method.

type MoveTorrentResponse

type MoveTorrentResponse struct {
}

MoveTorrentResponse contains response arguments for Session.MoveTorrent method.

type Peer

type Peer struct {
	ID                 string
	Client             string
	Addr               string
	Source             string
	ConnectedAt        Time
	Downloading        bool
	ClientInterested   bool
	ClientChoking      bool
	PeerInterested     bool
	PeerChoking        bool
	OptimisticUnchoked bool
	Snubbed            bool
	EncryptedHandshake bool
	EncryptedStream    bool
	DownloadSpeed      int
	UploadSpeed        int
}

Peer of a Torrent.

type RemoveTorrentRequest

type RemoveTorrentRequest struct {
	ID string
}

RemoveTorrentRequest contains request arguments for Session.RemoveTorrent method.

type RemoveTorrentResponse

type RemoveTorrentResponse struct {
}

RemoveTorrentResponse contains response arguments for Session.RemoveTorrent method.

type SessionStats

type SessionStats struct {
	Uptime         int
	Torrents       int
	Peers          int
	PortsAvailable int

	BlockListRules   int
	BlockListRecency int

	ReadCacheObjects     int
	ReadCacheSize        int64
	ReadCacheUtilization int

	ReadsPerSecond int
	ReadsActive    int
	ReadsPending   int

	WriteCacheObjects     int
	WriteCacheSize        int64
	WriteCachePendingKeys int

	WritesPerSecond int
	WritesActive    int
	WritesPending   int

	SpeedDownload int
	SpeedUpload   int
	SpeedRead     int
	SpeedWrite    int
}

SessionStats contains statistics about a Session.

type StartAllTorrentsRequest

type StartAllTorrentsRequest struct {
}

StartAllTorrentsRequest contains request arguments for Session.StartAllTorrents method.

type StartAllTorrentsResponse

type StartAllTorrentsResponse struct {
}

StartAllTorrentsResponse contains response arguments for Session.StartAllTorrents method.

type StartTorrentRequest

type StartTorrentRequest struct {
	ID string
}

StartTorrentRequest contains request arguments for Session.StartTorrent method.

type StartTorrentResponse

type StartTorrentResponse struct {
}

StartTorrentResponse contains response arguments for Session.StartTorrent method.

type Stats

type Stats struct {
	InfoHash string
	Port     int
	Status   string
	Error    string
	Pieces   struct {
		Checked   uint32
		Have      uint32
		Missing   uint32
		Available uint32
		Total     uint32
	}
	Bytes struct {
		Total      int64
		Allocated  int64
		Completed  int64
		Incomplete int64
		Downloaded int64
		Uploaded   int64
		Wasted     int64
	}
	Peers struct {
		Total    int
		Incoming int
		Outgoing int
	}
	Handshakes struct {
		Total    int
		Incoming int
		Outgoing int
	}
	Addresses struct {
		Total   int
		Tracker int
		DHT     int
		PEX     int
	}
	Downloads struct {
		Total   int
		Running int
		Snubbed int
		Choked  int
	}
	MetadataDownloads struct {
		Total   int
		Snubbed int
		Running int
	}
	Name        string
	Private     bool
	PieceLength uint32
	SeededFor   uint
	Speed       struct {
		Download int
		Upload   int
	}
	ETA int
}

Stats contains statistics about a Torrent.

type StopAllTorrentsRequest

type StopAllTorrentsRequest struct {
}

StopAllTorrentsRequest contains request arguments for Session.StopAllTorrents method.

type StopAllTorrentsResponse

type StopAllTorrentsResponse struct {
}

StopAllTorrentsResponse contains response arguments for Session.StopAllTorrents method.

type StopTorrentRequest

type StopTorrentRequest struct {
	ID string
}

StopTorrentRequest contains request arguments for Session.StopTorrent method.

type StopTorrentResponse

type StopTorrentResponse struct {
}

StopTorrentResponse contains response arguments for Session.StopTorrent method.

type Time

type Time struct {
	time.Time
}

Time is a wrapper around time.Time. Serialized as RFC3339 string.

func (Time) MarshalJSON

func (t Time) MarshalJSON() ([]byte, error)

MarshalJSON converts the time into RFC3339 string.

func (*Time) UnmarshalJSON

func (t *Time) UnmarshalJSON(b []byte) error

UnmarshalJSON sets the time from a RFC3339 string.

type Torrent

type Torrent struct {
	ID       string
	Name     string
	InfoHash string
	Port     int
	AddedAt  Time
}

Torrent in a Session.

type Tracker

type Tracker struct {
	URL           string
	Status        string
	Leechers      int
	Seeders       int
	Warning       string
	Error         string
	ErrorUnknown  bool
	ErrorInternal string
	LastAnnounce  Time
	NextAnnounce  Time
}

Tracker of a Torrent.

type VerifyTorrentRequest

type VerifyTorrentRequest struct {
	ID string
}

VerifyTorrentRequest contains request arguments for Session.VerifyTorrent method.

type VerifyTorrentResponse

type VerifyTorrentResponse struct {
}

VerifyTorrentResponse contains response arguments for Session.VerifyTorrent method.

type Webseed

type Webseed struct {
	URL           string
	Error         string
	DownloadSpeed int
}

Webseed source of a Torrent.

Jump to

Keyboard shortcuts

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