model

package
v0.5.2 Latest Latest
Warning

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

Go to latest
Published: Jul 4, 2024 License: GPL-3.0 Imports: 4 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type JobLogEntry

type JobLogEntry struct {
	ID       uint64
	Email    string
	Time     time.Time
	Pages    int
	JobInfo  string
	HasPDF   bool
	ShareKey string `json:"-"` // just used by the web UI
}

type User

type User struct {
	Email                 string
	PasswordHash          string
	AccessKey             string
	FullName              string
	Admin                 bool
	Verified              bool
	Enabled               bool
	Unlimited             bool
	JobCount              int
	PageCount             int
	LastJob               time.Time
	LastVerificationEmail time.Time
	SignupDate            time.Time
	DisableEmailDelivery  bool
	AllowNuisanceJobs     bool
}

func NewUser

func NewUser(email, password string) User

NewUser is a convenience function to create a new user with the provided email and password.

func (*User) CheckPassword

func (u *User) CheckPassword(password string) bool

CheckPassword will return true if the provided password is valid for the user.

func (*User) GenerateAccessKey

func (u *User) GenerateAccessKey()

GenerateAccessKey generates and sets a new random access key on the user.

func (*User) SetPassword

func (u *User) SetPassword(password string)

Jump to

Keyboard shortcuts

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