models

package
v0.0.0-...-0158979 Latest Latest
Warning

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

Go to latest
Published: Nov 2, 2018 License: AGPL-3.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ImageAuth

type ImageAuth struct {
	ID         int    `gorm:"column:id"`
	Token      string `gorm:"column:token"`
	Value      string `gorm:"column:value"`
	DelFlag    int    `gorm:"column:del_flag"`
	CreateTime int    `gorm:"column:create_time"`
	UpdateTime int    `gorm:"column:update_time"`
	AccessTime int    `gorm:"column:access_time"`
}

func (ImageAuth) ConnectionName

func (ImageAuth) ConnectionName() string

func (ImageAuth) Insert

func (p ImageAuth) Insert(token string, value string) (err error)

C

func (*ImageAuth) TableName

func (i *ImageAuth) TableName() string

TableName sets the insert table name for this struct type

func (ImageAuth) ValidateAuthCode

func (p ImageAuth) ValidateAuthCode(token, value string) (bool, error)

R

func (ImageAuth) ValidateTokenIsExist

func (p ImageAuth) ValidateTokenIsExist(token string) bool

type User

type User struct {
	ID         int    `gorm:"column:id"`
	Username   string `gorm:"column:username"`
	Password   string `gorm:"column:password"`
	DelFlag    int    `gorm:"column:del_flag"`
	AccessTime int64  `gorm:"column:access_time"`
	CreateTime int64  `gorm:"column:create_time"`
	UpdateTime int    `gorm:"column:update_time"`
}

func (User) ConnectionName

func (User) ConnectionName() string

func (User) Insert

func (p User) Insert(username, password string) (int, error)

func (User) SelectByUserID

func (p User) SelectByUserID(userID int) (*User, error)

func (User) SelectByUsername

func (p User) SelectByUsername(username string) (*User, error)

func (*User) TableName

func (u *User) TableName() string

TableName sets the insert table name for this struct type

func (User) Update

func (p User) Update(id int, updateMap map[string]interface{}) error

U

func (User) ValidateUsername

func (p User) ValidateUsername(username string) (bool, error)

R

Jump to

Keyboard shortcuts

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