Documentation ¶
Index ¶
- Variables
- func ChangeAccountPassword(username string, oldPassword string, newPassword string) (bool, error)
- func ConnectDatabase(dbPath string) error
- func ConvertSqliteTimestamp(t string) string
- func CreateRole(r Role) (bool, error)
- func CreateUser(p ProposedUser) (bool, error)
- func DeleteRole(roleId int) (bool, error)
- func DeleteUser(username string) (bool, error)
- func GetUserStatus(username string) (string, error)
- func SetUserRoleId(username string, j UserRoleId) (bool, error)
- func SetUserStatus(username string, j UserStatus) (bool, error)
- type FailureMsg
- type HealthCheck
- type InvalidStatusValue
- type PasswordChange
- type PasswordHashMismatch
- type ProposedUser
- type Role
- type RolesList
- type SuccessMsg
- type User
- type UserRoleId
- type UserRoleIdMsg
- type UserStatus
- type UserStatusMsg
- type UsersList
Constants ¶
This section is empty.
Variables ¶
View Source
var DB *sql.DB
Functions ¶
func ChangeAccountPassword ¶
func ConnectDatabase ¶
func ConvertSqliteTimestamp ¶
func CreateRole ¶
func CreateUser ¶
func CreateUser(p ProposedUser) (bool, error)
func DeleteRole ¶
func DeleteUser ¶
func GetUserStatus ¶
func SetUserRoleId ¶
func SetUserRoleId(username string, j UserRoleId) (bool, error)
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 ProposedUser ¶
type Role ¶
type Role struct { Id int `json:"Id"` RoleName string `json:"roleName"` Description string `json:"description"` CreationDate string `json:"creationDate"` }
func GetRoleById ¶
func GetRoleByName ¶
type SuccessMsg ¶
type SuccessMsg struct {
Message string `json:"message"`
}
type User ¶
type User struct { Id int `json:"Id"` UserName string `json:"userName"` FullName string `json:"fullName"` Status string `json:"status"` OrgUnitId int `json:"orgUnitId"` RoleId int `json:"roleId"` PasswordHash string `json:"passwordHash"` CreationDate string `json:"creationDate"` LastPasswordChangedDate string `json:"lastPasswordChangedDate"` }
func GetUserById ¶
func GetUserByUserName ¶
func GetUsersByRoleId ¶
type UserRoleId ¶
type UserRoleId struct {
RoleId int `json:"roleId"`
}
type UserRoleIdMsg ¶
type UserStatus ¶
type UserStatus struct {
Status string `json:"status" enum:"enabled,disabled"`
}
type UserStatusMsg ¶
Click to show internal directories.
Click to hide internal directories.