user

package
v0.2.4 Latest Latest
Warning

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

Go to latest
Published: May 15, 2021 License: Apache-2.0 Imports: 6 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
	ProcedureID 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, procedureID int) (*User, error)

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