user

package
v0.3.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 12, 2017 License: BSD-3-Clause Imports: 18 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CountUser

func CountUser(db *sql.DB) (int64, error)

CountUser Count user table

func DeleteUserWithDependencies

func DeleteUserWithDependencies(db database.Executer, u *sdk.User) error

DeleteUserWithDependencies Delete user and all his dependencies

func FindUserIDByName

func FindUserIDByName(db *sql.DB, name string) (int64, error)

FindUserIDByName retrieves only user ID in database

func GeneratePassword

func GeneratePassword() (string, string, error)

GeneratePassword Generate a password/token for the user

func InsertUser

func InsertUser(db database.QueryExecuter, u *sdk.User, a *sdk.Auth) error

InsertUser Insert new user

func IsCheckValid

func IsCheckValid(clear, hashField string) bool

IsCheckValid return false if hashedVersion of clar is not equals to hash. Hash contains $sha512$salt$passwordHashed$

func IsValidEmail

func IsValidEmail(email string) bool

IsValidEmail Check if user email address is ok

func LoadGroupPermissions

func LoadGroupPermissions(db *sql.DB, groupID int64) (*sdk.Group, error)

LoadGroupPermissions retrieves all group memberships

func LoadUserAndAuth

func LoadUserAndAuth(db *sql.DB, name string) (*sdk.User, error)

LoadUserAndAuth Load user with auth information

func LoadUserPermissions

func LoadUserPermissions(db *sql.DB, user *sdk.User) error

LoadUserPermissions retrieves all group memberships

func LoadUserWithoutAuth

func LoadUserWithoutAuth(db database.Querier, name string) (*sdk.User, error)

LoadUserWithoutAuth load user without auth information

func LoadUserWithoutAuthByID

func LoadUserWithoutAuthByID(db *sql.DB, userID int64) (*sdk.User, error)

LoadUserWithoutAuthByID load user information without secret

func LoadUsers

func LoadUsers(db *sql.DB) ([]*sdk.User, error)

LoadUsers load all users from database

func UpdateUser

func UpdateUser(db *sql.DB, u sdk.User) error

UpdateUser update given user

func UpdateUserAndAuth

func UpdateUserAndAuth(db *sql.DB, u sdk.User) error

UpdateUserAndAuth update given user

func Verify

func Verify(u *sdk.User, token string) (string, string, error)

Verify verify user token

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL