Documentation
¶
Index ¶
- Variables
- func ChangeAccountPassword(username string, oldPassword string, newPassword string) (bool, error)
- func ConnectDatabase(dbPath string) error
- func CreateTodo(p ProposedTodo) (bool, error)
- func CreateUser(p ProposedUser) (bool, error)
- func DeleteTodo(id int) (bool, error)
- func DeleteUser(username string) (bool, error)
- func GetStatusByName(s string) (int, error)
- func GetUserStatus(username string) (string, error)
- func SetUserStatus(username string, j UserStatus) (bool, error)
- type FailureMsg
- type HealthCheck
- type InvalidStatusValue
- type PasswordChange
- type PasswordHashMismatch
- type ProposedTodo
- type ProposedUser
- type SchedulingConflict
- type Status
- type SuccessMsg
- type Todo
- type TodoList
- type User
- type UserStatus
- type UserStatusMsg
- type UsersList
Constants ¶
This section is empty.
Variables ¶
View Source
var DB *sql.DB
Functions ¶
func ChangeAccountPassword ¶
func ConnectDatabase ¶
func CreateTodo ¶
func CreateTodo(p ProposedTodo) (bool, error)
func CreateUser ¶
func CreateUser(p ProposedUser) (bool, error)
func DeleteTodo ¶
func DeleteUser ¶
func GetStatusByName ¶
func GetUserStatus ¶
func SetUserStatus ¶
func SetUserStatus(username string, j UserStatus) (bool, error)
Types ¶
type FailureMsg ¶
type FailureMsg struct {
Error string `json:"error"`
}
type HealthCheck ¶
type InvalidStatusValue ¶
type InvalidStatusValue struct {
Err error
}
func (*InvalidStatusValue) Error ¶
func (i *InvalidStatusValue) Error() string
type PasswordChange ¶
type PasswordHashMismatch ¶
type PasswordHashMismatch struct {
Err error
}
func (*PasswordHashMismatch) Error ¶
func (p *PasswordHashMismatch) Error() string
type ProposedTodo ¶
type ProposedTodo struct {
Description string `json:"description"`
}
type ProposedUser ¶
type SchedulingConflict ¶
type SchedulingConflict struct {
Err error
}
func (*SchedulingConflict) Error ¶
func (s *SchedulingConflict) Error() string
type SuccessMsg ¶
type SuccessMsg struct {
Message string `json:"message"`
}
type Todo ¶
type Todo struct {
Id int `json:"Id"`
Description string `json:"description"`
Status string `json:"status"`
CreationDate string `json:"creationDate"`
}
func GetTodoById ¶
type User ¶
type User struct {
Id int `json:"Id"`
UserName string `json:"userName"`
FullName string `json:"fullName"`
PasswordHash string `json:"passwordHash"`
Status string `json:"status"`
CreationDate string `json:"creationDate"`
LastChangedDate string `json:"lastChangedDate"`
}
func GetUserById ¶
func GetUserByUserName ¶
type UserStatus ¶
type UserStatus struct {
Status string `json:"status" enum:"enabled,disabled"`
}
type UserStatusMsg ¶
Click to show internal directories.
Click to hide internal directories.