meta

package
v0.0.0-...-79d61c7 Latest Latest
Warning

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

Go to latest
Published: Apr 16, 2022 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type FilePieceInfo

type FilePieceInfo struct {
	Index  int
	Offset int
	Hash   []byte
}

type TorrentInfo

type TorrentInfo struct {
	Name        string
	PieceLength int64
	Pieces      [][]byte
	Length      int64
	Files       []*TorrentInfoFile
	MetaVersion int
}

type TorrentInfoFile

type TorrentInfoFile struct {
	Length    int64
	Path      string
	Attr      string
	PieceRoot []byte
}

func (*TorrentInfoFile) FirstPiece

func (m *TorrentInfoFile) FirstPiece(info *TorrentInfo) FilePieceInfo

type TorrentMetaInfo

type TorrentMetaInfo struct {
	InfoBytes    []byte
	Announce     string
	AnnounceList []string
	Nodes        []metainfo.HostAddress
	URLList      []string
	Comment      string
	CreationDate time.Time
	CreatedBy    string
	Encoding     string
	// contains filtered or unexported fields
}

func (*TorrentMetaInfo) Info

func (m *TorrentMetaInfo) Info() (ti *TorrentInfo, err error)

func (*TorrentMetaInfo) InfoHash

func (m *TorrentMetaInfo) InfoHash() string

func (*TorrentMetaInfo) MustInfo

func (m *TorrentMetaInfo) MustInfo() (ti *TorrentInfo)

Jump to

Keyboard shortcuts

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