Discover Packages
github.com/3devo/feconnector
models
package
Version:
v0.2.0
Opens a new window with list of versions in this module.
Published: Mar 28, 2019
License: GPL-2.0
Opens a new window with license information.
Imports: 6
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
Documentation
Documentation
¶
CreateLogFile creates a new logfile in the database
It also creates a log file and a note file if available on the system
type Axis struct {
Name string `json:"name" validate:"required"`
Title string `json:"title" validate:"required"`
Range []int `json:"range" validate:"min=1"`
Side string `json:"side"`
Overlaying string `json:"overlaying" validate:"oneof y x"`
}
type BlackListedToken struct {
ID int `storm:"id,increment"`
Token string `storm:"unique"`
Expiration int64
}
type Chart struct {
UUID string `storm:"id" json:"uuid" validate:"uuid"`
Title string `json:"title" validate:"required"`
PlotDataInformation []PlotDataInformation `json:"plotDataInformation"`
Axes []Axis `json:"axes"`
HorizontalRulers []HRuler `json:"horizontalRulers"`
VerticalRulers []VRuler `json:"verticalRulers"`
Image string `json:"image" validate:"datauri"`
}
Chart with the needed properties to generate a chart in the frontend
swagger:model Chart
type Config struct {
ID int `storm:"id,increment" json:"id"`
OpenNetwork bool `json:"openNetwork"`
UserCreated bool `json:"userCreated"`
}
Config model that keep tracks of application configuration
swagger:model ConfigResponse
type HRuler struct {
Ruler
Y int `json:"y" validate:"required"`
}
type LogFile struct {
UUID string `storm:"id" json:"uuid"`
Name string `json:"name"`
FileName string `json:"filename"`
Timestamp int64 `json:"timestamp"`
HasNote bool `json:"hasNote"`
}
A logFile database model
This is used to save a logFile in the boltdb
AppendLog appends new information to an already existing log file.
GetFileName returns the filename to use
UpdateLogFile updates the name and notes
type PlotDataInformation struct {
DataName string `json:"dataName" validate:"required"`
PlotName string `json:"plotName" validate:"required"`
Color string `json:"color" validate:"required" validate:"hexcolor"`
Axis string `json:"axis" validate:"oneof y0 y1 y2"`
}
type Ruler struct {
Text string `json:"text" validate:"required"`
Width int `json:"width" validate:"required"`
Color string `json:"color" validate:"hexcolor"`
Filler bool `json:"filler"`
}
type Sheet struct {
UUID string `storm:"id" json:"uuid" validate:"uuid"`
Title string `json:"title" validate:"required"`
Charts []string `json:"charts" validate:"dive,chart-exists"`
}
type User struct {
UUID string `storm:"id" json:"uuid" validate:"uuid"`
Username string `json:"username" storm:"unique" validate:"required,email"`
Password string `json:"password" validate:"required,min=8"`
TrackingAllowed bool `json:"trackingAllowed"`
}
type VRuler struct {
Ruler
X int `json:"x" validate:"required"`
}
type Workspace struct {
UUID string `storm:"id" json:"uuid" validate:"uuid"`
Title string `json:"title" validate:"required"`
Sheets []string `json:"sheets" validate:"dive,sheet-exists"`
}
Source Files
¶
Click to show internal directories.
Click to hide internal directories.