repository

package
v0.0.0-...-203e069 Latest Latest
Warning

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

Go to latest
Published: May 14, 2022 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 DatabaseRepo

type DatabaseRepo interface {
	AllPreferences() ([]models.Preference, error)
	SetSystemPref(name, value string) error
	InsertOrUpdateSitePreferences(pm map[string]string) error
	UpdateSystemPref(name, value string) error

	GetUserById(id int) (models.User, error)
	InsertUser(u models.User) (int, error)
	UpdateUser(u models.User) error
	DeleteUser(id int) error
	UpdatePassword(id int, newPassword string) error
	Authenticate(email, testPassword string) (int, string, error)
	AllUsers() ([]*models.User, error)
	InsertRememberMeToken(id int, token string) error
	DeleteToken(token string) error
	CheckForToken(id int, token string) bool

	InsertHost(h models.Host) (int, error)
	GetHostByID(id int) (models.Host, error)
	UpdateHost(h models.Host) error
	AllHosts() ([]models.Host, error)
	UpdateHostServiceStatus(hostID, serviceID, active int) error
	GetAllServiceStatusCounts() (int, int, int, int, error)
	GetServicesByStatus(status string) ([]models.HostService, error)
	GetHostServiceByID(id int) (models.HostService, error)
	UpdateHostService(hs models.HostService) error
	GetServicesToMonitor() ([]models.HostService, error)
	GetHostServiceByHostIDServiceID(hostID, serviceID int) (models.HostService, error)
	GetAllEvents() ([]models.Event, error)
	InsertEvent(e models.Event) error
}

DatabaseRepo is the database repository

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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