mssql

package
v0.0.0-...-9b07b7c Latest Latest
Warning

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

Go to latest
Published: Jun 3, 2019 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrNotExists = echo.NewHTTPError(http.StatusInternalServerError, "user code not exists.")
)

定义错误

Functions

This section is empty.

Types

type User

type User struct{}

User represents the client for user table

func NewUser

func NewUser() *User

NewUser returns a new user database instance

func (*User) FindByCode

func (u *User) FindByCode(db *gorm.DB, code string) (*schemago.SUser, error)

FindByCode queries for single user by username

func (*User) FindByToken

func (u *User) FindByToken(db *gorm.DB, token string) (*schemago.SUser, error)

FindByToken queries for single user by token

func (*User) Update

func (u *User) Update(db *gorm.DB, user *schemago.SUser) error

Update updates user's info

Jump to

Keyboard shortcuts

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