model

package
v0.0.0-...-1624791 Latest Latest
Warning

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

Go to latest
Published: Mar 19, 2021 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type FilesList

type FilesList struct {
	Header  Header        `json:"header"`
	Content []TorrentFile `json:"content"`
}

func NewFilesList

func NewFilesList(t *torrent.Torrent) *FilesList

func (*FilesList) Render

func (s *FilesList) Render(w http.ResponseWriter, r *http.Request) error
type Header struct {
	Name string `json:"name"`
	Hash string `json:"hash"`
}

type Settings

type Settings struct {
	MaxConnections int64 `json:"max_connections"`
	CacheSize      int64 `json:"cache_size"`
	ReadAheadSize  int64 `json:"read_ahead"`
	MaxActive      int64 `json:"max_active"`
}

func (*Settings) Bind

func (s *Settings) Bind(r *http.Request) error

func (*Settings) Render

func (s *Settings) Render(w http.ResponseWriter, r *http.Request) error

type TorrentFile

type TorrentFile struct {
	Name string   `json:"name"`
	Path []string `json:"path"`
	Size int64    `json:"size"`
}

Jump to

Keyboard shortcuts

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