Documentation ¶
Index ¶
- Constants
- func AccessLimitExceeded(ip string, endpoint string, maxPerMinute int, maxPerHour int) (bool, error)
- func AccessLog(ip string, endpoint string) error
- func Login(loginRequest structs.LoginRequest) ([]byte, error)
- func SetupDatabase()
- func UpdatePassword(updateRequest structs.UpdatePasswordRequest) error
- func UpdateUsername(updateRequest structs.UpdateUsernameRequest) error
Constants ¶
View Source
const DatabaseType = "sqlite3"
DatabaseType describes the Database which is used
Variables ¶
This section is empty.
Functions ¶
func AccessLimitExceeded ¶
func AccessLimitExceeded(ip string, endpoint string, maxPerMinute int, maxPerHour int) (bool, error)
AccessLimitExceeded checks a max access count for a specific ip and endpoint in 60 seconds
func AccessLog ¶
AccessLog creates an access log entry for an endpoint with the ip address of the requester
func Login ¶
func Login(loginRequest structs.LoginRequest) ([]byte, error)
Login checks the login against the database
func UpdatePassword ¶
func UpdatePassword(updateRequest structs.UpdatePasswordRequest) error
UpdatePassword changes the password for the given user with the given password
func UpdateUsername ¶
func UpdateUsername(updateRequest structs.UpdateUsernameRequest) error
UpdateUsername changes the username for the given user with the given username
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.