Documentation ¶
Index ¶
- func CountUser(db *sql.DB) (int64, error)
- func DeleteUserWithDependencies(db database.Executer, u *sdk.User) error
- func DeleteUserWithDependenciesByName(db database.QueryExecuter, s string) error
- func FindUserIDByName(db *sql.DB, name string) (int64, error)
- func GeneratePassword() (string, string, error)
- func InsertUser(db database.QueryExecuter, u *sdk.User, a *sdk.Auth) error
- func IsCheckValid(clear, hashField string) bool
- func IsValidEmail(email string) bool
- func LoadGroupPermissions(db *sql.DB, groupID int64) (*sdk.Group, error)
- func LoadUserAndAuth(db *sql.DB, name string) (*sdk.User, error)
- func LoadUserPermissions(db *sql.DB, user *sdk.User) error
- func LoadUserWithoutAuth(db database.Querier, name string) (*sdk.User, error)
- func LoadUserWithoutAuthByID(db *sql.DB, userID int64) (*sdk.User, error)
- func LoadUsers(db *sql.DB) ([]*sdk.User, error)
- func UpdateUser(db *sql.DB, u sdk.User) error
- func UpdateUserAndAuth(db *sql.DB, u sdk.User) error
- func Verify(u *sdk.User, token string) (string, string, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DeleteUserWithDependencies ¶
DeleteUserWithDependencies Delete user and all his dependencies
func DeleteUserWithDependenciesByName ¶ added in v0.4.0
func DeleteUserWithDependenciesByName(db database.QueryExecuter, s string) error
DeleteUserWithDependenciesByName Delete user and all his dependencies
func FindUserIDByName ¶
FindUserIDByName retrieves only user ID in database
func GeneratePassword ¶
GeneratePassword Generate a password/token for the user
func InsertUser ¶
InsertUser Insert new user
func IsCheckValid ¶
IsCheckValid return false if hashedVersion of clar is not equals to hash. Hash contains $sha512$salt$passwordHashed$
func IsValidEmail ¶
IsValidEmail Check if user email address is ok
func LoadGroupPermissions ¶
LoadGroupPermissions retrieves all group memberships
func LoadUserAndAuth ¶
LoadUserAndAuth Load user with auth information
func LoadUserPermissions ¶
LoadUserPermissions retrieves all group memberships
func LoadUserWithoutAuth ¶
LoadUserWithoutAuth load user without auth information
func LoadUserWithoutAuthByID ¶
LoadUserWithoutAuthByID load user information without secret
func UpdateUserAndAuth ¶
UpdateUserAndAuth update given user
Types ¶
This section is empty.