user

package
v0.4.2 Latest Latest
Warning

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

Go to latest
Published: Jul 23, 2021 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type User

type User struct {
	gorm.Model
	UserID       string `gorm:"uniqueIndex"`
	Password     string // formatted with hash, see storageFormat in passwords.go
	OTPSecret    string
	OrgID        string
	ProcedureSet int
}

func Fetch

func Fetch(dbHandle *gorm.DB, userID string) (*User, error)

Fetch retrieves the user with the given UserID The returned user is not valid if the error is not nil.

func New

func New(dbHandle *gorm.DB, orgID string, allowedProcedureTypes []credential.Type) (*User, error)

func (*User) ProcedureTypeAllowed added in v0.2.6

func (u *User) ProcedureTypeAllowed(procedureType credential.Type) bool

func (*User) Save

func (u *User) Save(dbHandle *gorm.DB) error

Jump to

Keyboard shortcuts

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