Documentation ¶
Index ¶
- type Sqlite
- func (s *Sqlite) AddCheck(check gogios.Check, output string) error
- func (s *Sqlite) AddUser(user gogios.User) error
- func (s *Sqlite) DeleteCheck(check gogios.Check, field string) error
- func (s *Sqlite) DeleteUser(user gogios.User) error
- func (s *Sqlite) Description() string
- func (s *Sqlite) GetAllChecks() ([]gogios.Check, error)
- func (s *Sqlite) GetCheck(searchField, searchType string) (gogios.Check, error)
- func (s *Sqlite) GetCheckHistory(check gogios.Check, amount int) ([]gogios.CheckHistory, error)
- func (s *Sqlite) GetUser(user string) (*gogios.User, error)
- func (s *Sqlite) Init() error
- func (s *Sqlite) SampleConfig() string
- func (s *Sqlite) SubConfig() string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Sqlite ¶
type Sqlite struct {
DBFile string `toml:"db_file"`
}
Sqlite only requires a path to the database file
func (*Sqlite) AddCheck ¶
AddCheck makes sure an entry exists for the check and then adds to its history
func (*Sqlite) DeleteCheck ¶
DeleteCheck will remove a row from the check table based on the ID
func (*Sqlite) DeleteUser ¶
DeleteUser sets the DeletedAt value of the user and blanks their password
func (*Sqlite) Description ¶
Description returns a brief explanation of the database
func (*Sqlite) GetAllChecks ¶
GetAllChecks returns all the rows in the check table
func (*Sqlite) GetCheck ¶
GetCheck returns a single row. Searches using field (title or id) and returns the last record that matches
func (*Sqlite) GetCheckHistory ¶
GetCheckHistory returns $amount of rows of history for a check
func (*Sqlite) SampleConfig ¶
SampleConfig returns the default config for Sqlite
Click to show internal directories.
Click to hide internal directories.