users

package
v0.0.0-...-8232506 Latest Latest
Warning

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

Go to latest
Published: May 27, 2020 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AuthenticateUser

func AuthenticateUser(ctx context.Context, store store.Driver, email, password string) (*models.User, error)

AuthenticateUser verifies whether the the user is valid

func CreateUser

func CreateUser(ctx context.Context, store store.Driver, email string, roleID int) (models.User, error)

CreateUser creates a new user in the system

func DeleteUser

func DeleteUser(ctx context.Context, store store.Driver, id string) error

DeleteUser deletes a user based on id

func GetAllUsers

func GetAllUsers(ctx context.Context, store store.Driver) ([]*models.User, error)

GetAllUsers gets all users in the system

func GetUserByID

func GetUserByID(ctx context.Context, store store.Driver, id string) (*models.User, error)

GetUserByID gets a user based on id

func RegisterUser

func RegisterUser(ctx context.Context, store store.Driver, id, username, password string) error

RegisterUser updates a user with their registration information post successful sign in at node

Types

type AuthCredentialMismatch

type AuthCredentialMismatch struct{}

AuthCredentialMismatch is the error returned whe nthe credentaisl provided and stored do not match

func (*AuthCredentialMismatch) Error

func (a *AuthCredentialMismatch) Error() string

type PasswordDoesNotMatchPolicy

type PasswordDoesNotMatchPolicy struct{}

PasswordDoesNotMatchPolicy is the error returned when the user password does not match password policy

func (*PasswordDoesNotMatchPolicy) Error

type UserDoesNotExist

type UserDoesNotExist struct{}

UserDoesNotExist is the error returned when the requested user does not exist in the system

func (*UserDoesNotExist) Error

func (u *UserDoesNotExist) Error() string

Jump to

Keyboard shortcuts

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