Documentation ¶
Index ¶
Constants ¶
View Source
const (
HashSize = 20
)
Variables ¶
This section is empty.
Functions ¶
func FromContext ¶
Types ¶
type FileInfo ¶
type Info ¶
type Info struct { Hash Hash `bencode:"-"` Files []FileInfo `bencode:"files,omitempty"` PieceLength int `bencode:"piece length"` Pieces []byte `bencode:"pieces"` Name string `bencode:"name,omitempty"` Length int64 `bencode:"length,omitempty"` Private int `bencode:"private,omitempty"` Publisher string `bencode:"publisher"` PublisherUTF8 string `bencode:"publisher.utf-8"` PublisherURL string `bencode:"publisher-url"` PublisherURLUTF8 string `bencode:"publisher-url.utf-8"` }
func (*Info) UnmarshalBencode ¶
type Node ¶
func (*Node) UnmarshalBencode ¶
type Torrent ¶
type Torrent struct { Announce string `bencode:"announce,omitempty"` AnnounceList [][]string `bencode:"announce-list,omitempty"` Comment string `bencode:"comment,omitempty"` CommentUTF8 string `bencode:"comment.utf-8,omitempty"` Created string `bencode:"created by,omitempty"` Date uint `bencode:"creation date,omitempty"` Encoding string `bencode:"encoding,omitempty"` Info Info Nodes []Node `bencode:"node,omitempty"` }
Torrent load a btorrent metofile from file to memory
func (*Torrent) SetDownload ¶
type UnmarshalError ¶
An UnmarshalError describes a fail unmarshal
func (*UnmarshalError) Error ¶
func (e *UnmarshalError) Error() string
Click to show internal directories.
Click to hide internal directories.