stats

package
v0.1.9 Latest Latest
Warning

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

Go to latest
Published: Mar 8, 2024 License: AGPL-3.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Stat

type Stat struct {
	Ts    int64        `json:"ts"`
	Event int64        `json:"event"`
	Data  *TorrentStat `json:"data"`
}

type StatDb

type StatDb struct {
	// contains filtered or unexported fields
}

func NewDb added in v0.1.1

func NewDb(statFilename string) (*StatDb, error)

func (*StatDb) AddTorrentStat

func (db *StatDb) AddTorrentStat(ts int64, event int64, torrentStat *TorrentStat)

func (*StatDb) ShowTrafficStats

func (db *StatDb) ShowTrafficStats(client string)

type Statistics

type Statistics struct {
	Downloaded int64
	Uploaded   int64
}

type TorrentStat

type TorrentStat struct {
	Client     string `json:"client"`
	Site       string `json:"site"`
	Category   string `json:"category"`
	InfoHash   string `json:"infoHash"`
	Name       string `json:"name"`
	Size       int64  `json:"size"`
	Atime      int64  `json:"atime"`
	Uploaded   int64  `json:"uploaded"`
	Downloaded int64  `json:"downloaded"`
	Msg        string `json:"msg"`
}

type TorrentTraffic

type TorrentTraffic struct {
	Client     string `gorm:"primaryKey"`
	Day        string `gorm:"primaryKey"`
	Site       string `gorm:"primaryKey"`
	Downloaded int64
	Uploaded   int64
}

Jump to

Keyboard shortcuts

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