mod

package
v0.0.0-...-53b538c Latest Latest
Warning

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

Go to latest
Published: May 5, 2023 License: MIT Imports: 5 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Created

type Created struct {
	DateObj Date `json:"date"`
}

type Date

type Date struct {
	Year  int `json:"year"`
	Month int `json:"month"`
	Day   int `json:"day"`
}

structure for vnstat result

type Day

type Day struct {
	Id      int  `json:"id"`
	DateObj Date `json:"date"`
	RX      int  `json:"rx"`
	TX      int  `json:"tx"`
}

type Hour

type Hour struct {
	Id      int  `json:"id"`
	DateObj Date `json:"date"`
	RX      int  `json:"rx"`
	TX      int  `json:"tx"`
}

type Interfaces

type Interfaces struct {
	Id         string  `json:"id"`
	Nick       string  `json:"nick"`
	CreatedObj Created `json:"created"`
	UpdatedObj Updated `json:"updated"`
	TrafficObj Traffic `json:"traffic"`
}

type Month

type Month struct {
	Id      int  `json:"id"`
	DateObj Date `json:"date"`
	RX      int  `json:"rx"`
	TX      int  `json:"tx"`
}

type NetInfo

type NetInfo struct {
	Status int32 `json:"status"`
}

type NetInterface

type NetInterface struct {
	Index int    `json:"index"`
	MTU   int    `json:"mtu"`
	Name  string `json:"name"`
}

Structure for all network Interfaces

type NetSpeed

type NetSpeed struct {
	BytesSent   uint64 `json:"bytesSent"`   // number of bytes sent
	BytesRecv   uint64 `json:"bytesRecv"`   // number of bytes received
	PacketsSent uint64 `json:"packetsSent"` // number of packets sent
	PacketsRecv uint64 `json:"packetsRecv"` // number of packets received
}

type NodeStat

type NodeStat struct {
	NodeID   int32      `json:"node_id"`
	NodeCode string     `json:"node_code"`
	NodeName string     `json:"node_name"`
	Stat     SystemInfo `json:"stat"`
	Time     int64      `json:"time"`
}

type SystemInfo

type SystemInfo struct {
	MemoryStatus *mem.VirtualMemoryStat `json:"memory_status"`
	AvgLoad      *load.AvgStat          `json:"avg_load"`
	Process      *load.MiscStat         `json:"process"`
	NetSpeed     NetSpeed               `json:"net_speed"`
	CpuCount     int                    `json:"cpu_count"`
	CpuTimesStat cpu.TimesStat          `json:"cpu_times_stat"`
	DiskUsage    *disk.UsageStat        `json:"disk_usage"`
	NetInfo      NetInfo                `json:"net_info"`
	NetStat      net.IOCountersStat     `json:"net_stat"`
}

type Time

type Time struct {
	Hour    int `json:"hour"`
	Minutes int `json:"minutes"`
}

type Total

type Total struct {
	RX int `json:"rx"`
	TX int `json:"tx"`
}

type Traffic

type Traffic struct {
	TotalObj  Total   `json:"total"`
	DaysArr   []Day   `json:"days"`
	MonthsArr []Month `json:"months"`
	HoursArr  []Hour  `json:"hours"`
}

type Updated

type Updated struct {
	DateObj Date `json:"date"`
	TimeObj Time `json:"time"`
}

type VNResult

type VNResult struct {
	VNStatVersion string       `json:"vnstatversion"`
	JSONVersion   string       `json:"jsonversion"`
	InterfacesObj []Interfaces `json:"interfaces"`
}

Jump to

Keyboard shortcuts

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