torrent

package
v0.0.0-...-9619b5c Latest Latest
Warning

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

Go to latest
Published: Sep 16, 2024 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BencodeInfo

type BencodeInfo struct {
	Files       *[]FileInfo `bencode:"files,omitempty"`
	Name        string      `bencode:"name"`
	Length      *uint64     `bencode:"length,omitempty"`
	Md5sum      *string     `bencode:"md5sum,omitempty"`
	Pieces      string      `bencode:"pieces"`
	PieceLength uint64      `bencode:"piece length"`
	Private     *int        `bencode:"private,omitempty"`
	Source      *string     `bencode:"source,omitempty"`
}

type BencodeTorrent

type BencodeTorrent struct {
	Announce  string      `bencode:"announce"`
	CreatedBy *string     `bencode:"created by,omitempty"`
	CreatedAt *int        `bencode:"creation date,omitempty"`
	Info      BencodeInfo `bencode:"info"`
}

func ReadTorrent

func ReadTorrent(filePath string) (*BencodeTorrent, error)

type FileInfo

type FileInfo struct {
	Length uint64   `bencode:"length"`
	Path   []string `bencode:"path"`
}

Jump to

Keyboard shortcuts

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