models

package
v0.0.0-...-ae2eaf7 Latest Latest
Warning

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

Go to latest
Published: Nov 4, 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 Action

type Action struct {
	Name string `mapstructure:"name"`
	Tag  string `mapstructure:"tag"`
}

Action - one action

type ChartJS

type ChartJS struct {
	Tag   []string
	Color []string
	Count []int
}

ChartJS - data for charts

type Conf

type Conf struct {
	DB         string
	Host       string
	Port       string
	Theme      string
	BgColor    string
	Icon       string
	ConfPath   string
	ColorPlus  string
	ColorMinus string
	MoodMax    string
	Actions    []Action
	TagMap     map[string]string
	Auth       bool
}

Conf - web gui config

type GuiData

type GuiData struct {
	Config  Conf
	Records []Record
	OneRec  Record
	Themes  []string
	Chart   ChartJS
	Heat    []HeatMap
	Auth    auth.Conf
}

GuiData - web gui data

type HeatMap

type HeatMap struct {
	X string
	Y string
	D string
	V int
}

HeatMap - data for heatmap

type Record

type Record struct {
	ID    int    `db:"ID"`
	Date  string `db:"DATE"`
	Tag   string `db:"TAG"`
	Name  string `db:"NAME"`
	Color string `db:"COLOR"`
	Note  string `db:"NOTE"`
	Minus int    `db:"MINUS"`
	Plus  int    `db:"PLUS"`
	Total int    `db:"TOTAL"`
}

Record - write to DB

type TagType

type TagType struct {
	Name  string `mapstructure:"name"`
	Color string `mapstructure:"color"`
}

TagType - one tag

Jump to

Keyboard shortcuts

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