user

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Aug 15, 2020 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Entity

type Entity struct {
	ID       int    `json:"id" form:"id"`             // 记录ID
	Name     string `json:"name" form:"name"`         // 用户名
	Phone    string `json:"phone" form:"phone"`       // 手机号码
	Email    string `json:"email" form:"email"`       // 邮箱
	Password string `json:"password" form:"password"` // 密码
}

Entity 实体-对应表结构

func (Entity) Filter

func (e Entity) Filter() interface{}

Filter 过滤器

type IEntity

type IEntity interface{ Filter() interface{} }

type IUser

type IUser interface {
	Add(ctx context.Context, e Entity) (id int, err error)
	GetByID(ctx context.Context, id int) (e Entity, err error)
	GetByName(ctx context.Context, name string) (e Entity, err error)
	GetFirst(ctx context.Context) (e Entity, err error)
	VerifyByNameAndPassword(ctx context.Context, name string, password string) (e Entity, err error)
}

func New

func New() IUser

Jump to

Keyboard shortcuts

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