model

package
v0.0.0-...-ba44971 Latest Latest
Warning

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

Go to latest
Published: Mar 23, 2022 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Data

type Data struct {
	ID                int    `json:"id"`
	Img               string `json:"img"`
	Password          string `json:"password,omitempty"` // omitempty: if empty - don't return
	EncryptedPassword string `json:"-"`                  // no render
	Lifetime          int64  `json:"lifetime"`
}

Data ...

func (*Data) BeforeCreate

func (u *Data) BeforeCreate() error

BeforeCreate ...

func (*Data) ComparePassword

func (u *Data) ComparePassword(password string) bool

ComparePassword ...

func (*Data) IsAlive

func (u *Data) IsAlive() bool

IsAlive ...

func (*Data) Sanitize

func (u *Data) Sanitize()

Sanitize ...

func (*Data) Validate

func (u *Data) Validate() error

Validate ...

Jump to

Keyboard shortcuts

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