models

package
v0.0.0-...-8f45697 Latest Latest
Warning

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

Go to latest
Published: Dec 24, 2023 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 {
	Host       string
	Port       string
	Theme      string
	Color      string
	Icon       string
	ConfPath   string
	DBPath     string
	DBTrimDays string
	YamlPath   string
	NodePath   string
	ColorOn    string
	ColorOff   string
	BtnWidth   string
	WebRefresh string
	Auth       bool
	LoggedIn   bool
	Quit       chan bool
}

Conf - web gui config

type GuiData

type GuiData struct {
	Config     Conf
	Themes     []string
	Links      Links
	Panels     map[int]Panel
	CurrentTab string
	TabEdit    int
	UptimeMon  []MonData
	Version    string
	Auth       auth.Conf
	Horiz      bool
}

GuiData - web gui data

type Host

type Host struct {
	Name  string `yaml:"name"`
	Addr  string `yaml:"addr"`
	Port  string `yaml:"port"`
	URL   string `yaml:"url"`
	Icon  string `yaml:"icon"`
	State bool   `yaml:"state"`
}

Host - panel element

type Links struct {
	Tabs   map[int]Tab      `yaml:"tabs"`
	Panels map[string]Panel `yaml:"panels"`
	Uptime Uptime           `yaml:"uptime"`
}

Links - all links

type MonData

type MonData struct {
	ID     int    `db:"ID"`
	Panel  string `db:"PANEL"`
	Host   string `db:"HOST"`
	Addr   string `db:"ADDR"`
	Port   string `db:"PORT"`
	Date   string `db:"DATE"`
	Time   string `db:"TIME"`
	Color  string `db:"COLOR"`
	State  bool   `db:"STATE"`
	Notify string `db:"NOTIFY"`
}

MonData - for monitoring results

type MonPanel

type MonPanel struct {
	Retries int      `yaml:"retries"`
	Notify  []string `yaml:"notify"`
}

MonPanel - uptime element

type Panel

type Panel struct {
	Name    string       `yaml:"name"`
	Scan    bool         `yaml:"scan"`
	Timeout string       `yaml:"timeout"`
	Hosts   map[int]Host `yaml:"hosts"`
}

Panel - tab element

type Tab

type Tab struct {
	Name    string         `yaml:"name"`
	Auth    bool           `yaml:"needs_auth"`
	Refresh string         `yaml:"refresh"`
	Horiz   bool           `yaml:"horiz"`
	Panels  map[int]string `yaml:"panels"`
}

Tab - board element

type Uptime

type Uptime struct {
	Enabled bool                `yaml:"enabled"`
	Auth    bool                `yaml:"needs_auth"`
	Show    int                 `yaml:"show"`
	Notify  map[string]string   `yaml:"notify"`
	Panels  map[string]MonPanel `yaml:"panels"`
}

Uptime - board element

Jump to

Keyboard shortcuts

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