rpctypes

package
v0.2.2 Latest Latest
Warning

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

Go to latest
Published: Jan 31, 2019 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 AddTorrentRequest

type AddTorrentRequest struct {
	Torrent string
}

type AddTorrentResponse

type AddTorrentResponse struct {
	Torrent Torrent
}

type AddURIRequest

type AddURIRequest struct {
	URI string
}

type AddURIResponse

type AddURIResponse struct {
	Torrent Torrent
}

type GetTorrentPeersRequest

type GetTorrentPeersRequest struct {
	ID string
}

type GetTorrentPeersResponse

type GetTorrentPeersResponse struct {
	Peers []Peer
}

type GetTorrentStatsRequest

type GetTorrentStatsRequest struct {
	ID string
}

type GetTorrentStatsResponse

type GetTorrentStatsResponse struct {
	Stats Stats
}

type GetTorrentTrackersRequest

type GetTorrentTrackersRequest struct {
	ID string
}

type GetTorrentTrackersResponse

type GetTorrentTrackersResponse struct {
	Trackers []Tracker
}

type ListTorrentsRequest

type ListTorrentsRequest struct {
}

type ListTorrentsResponse

type ListTorrentsResponse struct {
	Torrents []Torrent
}

type Peer

type Peer struct {
	Addr string
}

type RemoveTorrentRequest

type RemoveTorrentRequest struct {
	ID string
}

type RemoveTorrentResponse

type RemoveTorrentResponse struct {
}

type StartTorrentRequest

type StartTorrentRequest struct {
	ID string
}

type StartTorrentResponse

type StartTorrentResponse struct {
}

type Stats

type Stats struct {
	Status string
	Error  *string
	Pieces struct {
		Checked   uint32
		Have      uint32
		Missing   uint32
		Available uint32
		Total     uint32
	}
	Bytes struct {
		Total      int64
		Allocated  int64
		Complete   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 float64
		Upload   float64
	}
	ETA *uint
}

type StopTorrentRequest

type StopTorrentRequest struct {
	ID string
}

type StopTorrentResponse

type StopTorrentResponse struct {
}

type Time

type Time struct {
	time.Time
}

func (Time) MarshalJSON

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

func (*Time) UnmarshalJSON

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

type Torrent

type Torrent struct {
	ID        string
	Name      string
	InfoHash  string
	Port      uint16
	CreatedAt Time
}

type Tracker

type Tracker struct {
	URL      string
	Status   string
	Leechers int
	Seeders  int
	Error    *string
}

Jump to

Keyboard shortcuts

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