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 实体-对应表结构
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) }
Click to show internal directories.
Click to hide internal directories.