user

package
v0.0.0-...-7b086e4 Latest Latest
Warning

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

Go to latest
Published: Jan 8, 2024 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Store

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

Store stores the dependencies

func NewUserRepo

func NewUserRepo(db *sqlx.DB) *Store

NewUserRepo stores our dependency

func (*Store) AddUser

func (s *Store) AddUser(ctx context.Context, userParam User) (User, error)

func (*Store) DeleteUser

func (s *Store) DeleteUser(ctx context.Context, userParam User) error

func (*Store) EditUser

func (s *Store) EditUser(ctx context.Context, userParam User) (User, error)

func (*Store) EditUserImage

func (s *Store) EditUserImage(ctx context.Context, userParam User) error

func (*Store) EditUserPassword

func (s *Store) EditUserPassword(ctx context.Context, userParam User, iter, keyLen int) error

func (*Store) GetUser

func (s *Store) GetUser(ctx context.Context, userParam User) (User, error)

func (*Store) GetUsers

func (s *Store) GetUsers(ctx context.Context) ([]User, error)

func (*Store) GetUsersContact

func (s *Store) GetUsersContact(ctx context.Context) ([]User, error)

func (*Store) GetUsersManagersTeam

func (s *Store) GetUsersManagersTeam(ctx context.Context, teamParam team.Team) ([]User, error)

func (*Store) VerifyUser

func (s *Store) VerifyUser(ctx context.Context, userParam User, iter, workFactor, blockSize, parallelismFactor, keyLen int) (User, bool, error)

type User

type User struct {
	ID            int         `db:"id" json:"id"`
	Name          string      `db:"name" json:"name"`
	Email         string      `db:"email" json:"email"`
	Phone         null.String `db:"phone" json:"phone"`
	TeamID        int         `db:"team_id" json:"team_id"`
	TempRole      string      `db:"role" json:"role"`
	Role          role.Role
	FileName      null.String `db:"file_name" json:"file_name"`
	ResetPassword bool        `db:"reset_password" json:"reset_password"`
	Password      null.String `db:"password" json:"password"`
	Hash          null.String `db:"hash" json:"hash"`
	Salt          null.String `db:"salt" json:"salt"`
	Authenticated bool
}

User represents relevant user fields

Jump to

Keyboard shortcuts

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