Documentation ¶
Index ¶
- func AddSession(token, username string, expireTime time.Time)
- func ChangePassword(username, currentPassword, newPassword string) bool
- func ChangeUsername(username, newUsername string) bool
- func FindUser(username, password string) (bool, error)
- func GetUsers() (*[]byte, error)
- func InsertUser(username, password string, role UserRole) error
- func LoadUsers(data *[]byte) error
- func RemoveSession(token string)
- func SessionUpdateUsername(oldUsername, newUsername string)
- func UserLoginUpdateTime(username string)
- func VerifySession(token string) (string, bool)
- type AllUsers
- type Session
- type User
- type UserRole
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AddSession ¶
func ChangePassword ¶
func ChangeUsername ¶
func InsertUser ¶
func RemoveSession ¶
func RemoveSession(token string)
func SessionUpdateUsername ¶
func SessionUpdateUsername(oldUsername, newUsername string)
func UserLoginUpdateTime ¶
func UserLoginUpdateTime(username string)
func VerifySession ¶
Types ¶
type AllUsers ¶
type AllUsers struct {
Data []User `json:"data"`
}
func GetAllUsers ¶
func GetAllUsers() AllUsers
Click to show internal directories.
Click to hide internal directories.