models

package
v0.0.0-...-d789378 Latest Latest
Warning

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

Go to latest
Published: Jan 5, 2024 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Conf

type Conf struct {
	Iface      string
	DbPath     string
	GuiIP      string
	GuiPort    string
	Timeout    int
	ShoutURL   string
	Theme      string
	Color      string
	IgnoreIP   string
	LogLevel   string
	NodePath   string
	Icon       string
	Auth       bool
	HistDays   string
	ArpTimeout string
}

Conf - app config

type GuiData

type GuiData struct {
	Config  Conf
	Hosts   []Host
	Themes  []string
	Version string
	Auth    auth.Conf
	Hist    []History
}

GuiData - all data sent to html page

type History

type History struct {
	ID    int    `db:"ID"`
	Host  int    `db:"HOST"`
	Name  string `db:"NAME"`
	IP    string `db:"IP"`
	Mac   string `db:"MAC"`
	Hw    string `db:"HW"`
	Date  string `db:"DATE"`
	Known int    `db:"KNOWN"`
	State int    `db:"STATE"`
}

History for hosts

type Host

type Host struct {
	ID    int    `db:"ID"`
	Name  string `db:"NAME"`
	IP    string `db:"IP"`
	Mac   string `db:"MAC"`
	Hw    string `db:"HW"`
	Date  string `db:"DATE"`
	Known int    `db:"KNOWN"`
	Now   int    `db:"NOW"`
}

Host - one host

Jump to

Keyboard shortcuts

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