parser

package
v0.0.0-...-9946b64 Latest Latest
Warning

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

Go to latest
Published: May 12, 2021 License: MIT Imports: 5 Imported by: 0

README

Parser

A parser for .torrent file written in golang. Parses according to Bittorent specifications

https://wiki.theory.org/BitTorrentSpecification

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetFile

func GetFile(path string) []byte

Types

type Torrent_info

type Torrent_info struct {
	Pieces      string `bencode:"pieces"`
	PieceLength int    `bencode:"piece length"`
	Length      int    `bencode:"length"`
	Name        string `bencode:"name"`
	Hash        [20]byte
	PieceHash   [][20]byte
}

type Torrent_meta

type Torrent_meta struct {
	Announce string       `bencode:"announce"`
	Comment  string       `bencode:"comment"`
	Creation int64        `bencode:"creation date"`
	Info     Torrent_info `bencode:"info"`
}

func Parse

func Parse(data []byte) *Torrent_meta

type Trackers

type Trackers struct {
}

Jump to

Keyboard shortcuts

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