rpctypes

package
v1.12.0 Latest Latest
Warning

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

Go to latest
Published: Oct 22, 2022 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 added in v0.4.0

type AddPeerRequest struct {
	ID   string
	Addr string
}

AddPeerRequest contains request arguments for Session.AddPeer method.

type AddPeerResponse added in v0.4.0

type AddPeerResponse struct {
}

AddPeerResponse contains response arguments for Session.AddPeer method.

type AddTorrentOptions added in v0.8.7

type AddTorrentOptions struct {
	ID                string
	Stopped           bool
	StopAfterDownload bool
	StopAfterMetadata 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 added in v0.4.0

type AddTrackerRequest struct {
	ID  string
	URL string
}

AddTrackerRequest contains request arguments for Session.AddTracker method.

type AddTrackerResponse added in v0.4.0

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 added in v0.10.0

type AnnounceTorrentRequest struct {
	ID string
}

AnnounceTorrentRequest contains request arguments for Session.AnnounceTorrent method.

type AnnounceTorrentResponse added in v0.10.0

type AnnounceTorrentResponse struct {
}

AnnounceTorrentResponse contains response arguments for Session.AnnounceTorrent method.

type CleanDatabaseRequest added in v1.1.0

type CleanDatabaseRequest struct {
}

CleanDatabaseRequest contains request arguments for Session.CleanDatabase method.

type CleanDatabaseResponse added in v1.1.0

type CleanDatabaseResponse struct {
}

CleanDatabaseResponse contains response arguments for Session.CleanDatabase method.

type GetMagnetRequest added in v0.16.0

type GetMagnetRequest struct {
	ID string
}

GetMagnetRequest contains request arguments for Session.GetMagnet method.

type GetMagnetResponse added in v0.16.0

type GetMagnetResponse struct {
	Magnet string
}

GetMagnetResponse contains response arguments for Session.GetMagnet method.

type GetSessionStatsRequest added in v0.3.0

type GetSessionStatsRequest struct {
}

GetSessionStatsRequest contains request arguments for Session.GetSessionStats method.

type GetSessionStatsResponse added in v0.3.0

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 added in v0.16.0

type GetTorrentRequest struct {
	ID string
}

GetTorrentRequest contains request arguments for Session.GetTorrent method.

type GetTorrentResponse added in v0.16.0

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 added in v0.7.0

type GetTorrentWebseedsRequest struct {
	ID string
}

GetTorrentWebseedsRequest contains request arguments for Session.GetTorrentWebseeds method.

type GetTorrentWebseedsResponse added in v0.7.0

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 added in v0.15.0

type MoveTorrentRequest struct {
	ID     string
	Target string
}

MoveTorrentRequest contains request arguments for Session.MoveTorrent method.

type MoveTorrentResponse added in v0.15.0

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 added in v0.3.0

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

	BytesDownloaded int64
	BytesUploaded   int64
	BytesRead       int64
	BytesWritten    int64
}

SessionStats contains statistics about a Session.

type StartAllTorrentsRequest added in v0.4.0

type StartAllTorrentsRequest struct {
}

StartAllTorrentsRequest contains request arguments for Session.StartAllTorrents method.

type StartAllTorrentsResponse added in v0.4.0

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
	FileCount   int
	PieceLength uint32
	SeededFor   uint
	Speed       struct {
		Download int
		Upload   int
	}
	ETA int
}

Stats contains statistics about a Torrent.

type StopAllTorrentsRequest added in v0.4.0

type StopAllTorrentsRequest struct {
}

StopAllTorrentsRequest contains request arguments for Session.StopAllTorrents method.

type StopAllTorrentsResponse added in v0.4.0

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 added in v0.10.0

type VerifyTorrentRequest struct {
	ID string
}

VerifyTorrentRequest contains request arguments for Session.VerifyTorrent method.

type VerifyTorrentResponse added in v0.10.0

type VerifyTorrentResponse struct {
}

VerifyTorrentResponse contains response arguments for Session.VerifyTorrent method.

type Webseed added in v0.7.0

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