Documentation
¶
Index ¶
- Constants
- Variables
- func Close()
- func DeleteProject(name string) error
- func DeleteRecord(id uuid.UUID) error
- func DeleteUser(name string) error
- func GetActiveProject(u string) *models.Project
- func GetAllProjects() ([]models.Project, error)
- func GetAllRecords() ([]models.Record, error)
- func GetAllRecordsForUser(u string) ([]models.Record, error)
- func GetAllUsers() ([]models.User, error)
- func GetProject(name string) (models.Project, error)
- func GetRecord(id uuid.UUID) (models.Record, error)
- func GetReportRecords(req models.DatabaseReportRequest) ([]models.Record, error)
- func GetTodaysRecords() ([]models.Record, error)
- func GetTodaysRecordsForUser(user string) ([]models.Record, error)
- func GetUser(name string) (models.User, error)
- func InitializeDatabase() error
- func SaveProject(p *models.Project) error
- func SaveRecord(r *models.Record) error
- func SaveUser(u *models.User) error
Constants ¶
View Source
const ( // table names USERS_TABLE_NAME = "users" PROJECT_TABLE_NAME = "projects" RECORDS_TABLE_NAME = "records" // sql verbs INIT_DB = "init" CREATE_TABLE = "createtable" INSERT = "insert" DELETE = "delete" DELETE_ALL = "deleteall" FETCH = "fetch" CLOSE_DB = "close" // errors NO_RECORDS = "no results found" )
Variables ¶
View Source
var (
ErrNoResults = errors.New("no results found")
)
Functions ¶
func DeleteProject ¶
func DeleteRecord ¶
func DeleteUser ¶
func GetActiveProject ¶
func GetAllProjects ¶
func GetAllRecords ¶
func GetAllUsers ¶
func GetReportRecords ¶
func GetReportRecords(req models.DatabaseReportRequest) ([]models.Record, error)
func GetTodaysRecords ¶
func InitializeDatabase ¶
func InitializeDatabase() error
func SaveProject ¶
func SaveRecord ¶
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.