Documentation
¶
Index ¶
Constants ¶
View Source
const InfohashLength = 20
Variables ¶
This section is empty.
Functions ¶
func InfohashMatchesMetadata ¶
Types ¶
type Infohash ¶
type Infohash []byte
Infohash is a 160 bit (20 byte) value
func GenInfohash ¶
func GenInfohash() (ih Infohash)
func GenerateNeighbour ¶
func InfohashFromString ¶
InfohashFromString converts a 40 digit hexadecimal string to an Infohash
type InfohashStore ¶
type Peer ¶
type Peer struct {
Addr net.Addr `db:"address"`
Infohash Infohash `db:"infohash"`
Created time.Time `db:"created" json:"created"`
Updated time.Time `db:"updated" json:"updated"`
}
Peer on DHT network
type Torrent ¶
type Torrent struct {
ID int `json:"-"`
Infohash Infohash `json:"infohash"`
Name string `json:"name"`
Files []File `json:"files" db:"-"`
Size int `json:"size"`
Updated time.Time `json:"updated"`
Created time.Time `json:"created"`
Tags []string `json:"tags" db:"-"`
}
Data for persistent storage
Click to show internal directories.
Click to hide internal directories.