user

package
v0.0.0-...-e8f3219 Latest Latest
Warning

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

Go to latest
Published: Sep 29, 2019 License: Unlicense Imports: 15 Imported by: 0

Documentation

Index

Constants

View Source
const BCryptCost = 12

BCryptCost is the ammount of iterations applied to bcrypt

Variables

View Source
var ErrUserAlreadyExists = errors.New("user already exists")

ErrUserAlreadyExists is returned when attempting to create a user that already exists

Functions

func HashPassword

func HashPassword(password string) (string, error)

HashPassword hashes a password

Types

type Handlers

type Handlers struct {
	// contains filtered or unexported fields
}

Handlers defines a handler for user

func NewHandlers

func NewHandlers(logger *log.Logger, db *sql.DB) *Handlers

NewHandlers creates a new handler for sound

func (*Handlers) CreateAccount

func (h *Handlers) CreateAccount(c *gin.Context)

CreateAccount creates a user account

func (*Handlers) CreateNewAccount

func (h *Handlers) CreateNewAccount(ctx context.Context, pAccount prospectAccount) (*models.User, error)

CreateNewAccount creates a new account

func (*Handlers) Retrieve

func (h *Handlers) Retrieve(c *gin.Context)

Retrieve a user from the database in the same organization

func (*Handlers) Routes

func (h *Handlers) Routes(rg *gin.RouterGroup)

Routes initializes the routes for the audio handlers

Jump to

Keyboard shortcuts

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