Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewTorrent ¶
Types ¶
type FileMetadata ¶
type InfoMetadata ¶
type Metadata ¶
type Metadata struct {
// Foobar []interface{} `bencode:"announce-list"`
Announce string `bencode:"announce"`
AnnounceList [][]string `bencode:"announce-list"`
Comment string `bencode:"comment"`
CreatedBy string `bencode:"created by"`
CreatedAt int64 `bencode:"creation date"`
Info bencode.RawMessage `bencode:"info"`
}
type Torrent ¶
type Torrent struct {
// Announce URL
Announce []string
// Torrent comment
Comment string
// Author
CreatedBy string
// Creation time
CreatedAt time.Time
// Torrent SHA1
InfoHash string
Files []*File
//original data
Metadata *Metadata
}
func ParseFromFile ¶
type TorrentCreate ¶
type TorrentCreate struct {
// Announce URL
Announce string `bencode:"announce"`
AnnounceList []string `bencode:"announce-list"`
InfoField bencode.RawMessage `bencode:"info"`
}
Object for creating a new torrent file with info field intact
Click to show internal directories.
Click to hide internal directories.