Documentation ¶
Index ¶
- type NewUser
- type Store
- func (s Store) Authenticate(ctx context.Context, now time.Time, email string, password string) (auth.Claims, error)
- func (s Store) Create(ctx context.Context, nu NewUser, now time.Time) (User, error)
- func (s Store) Delete(ctx context.Context, claims auth.Claims, userID string) error
- func (s Store) Query(ctx context.Context, pageNumber int, rowsPerPage int) ([]User, error)
- func (s Store) QueryByEmail(ctx context.Context, claims auth.Claims, email string) (User, error)
- func (s Store) QueryByID(ctx context.Context, claims auth.Claims, userID string) (User, error)
- func (s Store) Update(ctx context.Context, claims auth.Claims, userID string, uu UpdateUser, ...) error
- type UpdateUser
- type User
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type NewUser ¶
type NewUser struct { Name string `json:"name" validate:"required"` Email string `json:"email" validate:"required,email"` Roles []auth.Role `json:"roles" validate:"required"` Password string `json:"password" validate:"required"` PasswordConfirm string `json:"password_confirm" validate:"eqfield=Password"` }
type Store ¶
type Store struct {
// contains filtered or unexported fields
}
func (Store) Authenticate ¶
func (Store) QueryByEmail ¶
type UpdateUser ¶
type User ¶
type User struct { ID string `db:"user_id" json:"id"` Name string `db:"name" json:"name"` Email string `db:"email" json:"email"` Roles string `db:"roles" json:"roles"` PasswordHash []byte `db:"password_hash" json:"-"` DateCreated time.Time `db:"date_created" json:"date_created"` DateUpdated time.Time `db:"date_updated" json:"date_updated"` }
Click to show internal directories.
Click to hide internal directories.