model

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Oct 28, 2020 License: MIT 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 {
	ID        uuid.UUID
	Login     string
	Email     string
	Password  []byte
	AvatarURL url.URL
	Name      string
	Bio       string
	Location  string
	Company   string
	Birthday  sql.NullTime
	CreatedAt time.Time
	UpdatedAt time.Time
	DeletedAt sql.NullTime
}

User describes account attributes for a registered user.

func (*User) BeforeSave

func (u *User) BeforeSave() error

func (*User) ComparePassword

func (u *User) ComparePassword(v string) error

ComparePassword checks if the given password compares to the current value.

func (*User) SetPassword

func (u *User) SetPassword(v string) error

SetPassword overwrites the current password with hash value generated by the given value.

func (*User) URN

func (u *User) URN() string

URN returns the entity URN

Jump to

Keyboard shortcuts

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