user

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Aug 9, 2020 License: Apache-2.0 Imports: 5 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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