gorm

package
v1.0.5 Latest Latest
Warning

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

Go to latest
Published: Nov 17, 2021 License: MIT Imports: 6 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrInvalidIDField = errors.New("[auth - gorm] invalid id field")
View Source
var ErrInvalidPasswordHashField = errors.New("[auth - gorm] invalid password hash field")
View Source
var ErrInvalidUsernameField = errors.New("[auth - gorm] invalid username field")
View Source
var ErrNilDB = errors.New("[auth - gorm] db is nil")
View Source
var ErrNilUserModel = errors.New("[auth - gorm] user model is nil")
View Source
var ErrNilUserTableDoesNotExist = errors.New("[auth - gorm] user table does not exist")

Functions

This section is empty.

Types

type GormAuthDatasource

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

func NewGormAuthDatasoruce

func NewGormAuthDatasoruce(opts GormAuthDatasourceOptions) *GormAuthDatasource

func (*GormAuthDatasource) FindPIDByEmail

func (gads *GormAuthDatasource) FindPIDByEmail(email string) (authcore.PID, error)

func (*GormAuthDatasource) FindPIDByValidCredentials

func (gads *GormAuthDatasource) FindPIDByValidCredentials(username string, password string) (authcore.PID, error)

func (*GormAuthDatasource) ResetPassword

func (gads *GormAuthDatasource) ResetPassword(pid authcore.PID, password string) error

type GormAuthDatasourceOptions

type GormAuthDatasourceOptions struct {
	DB                *gorm.DB
	UserModel         interface{}
	IDField           string
	UsernameField     string
	EmailField        string
	PasswordHashField string
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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