70 Star 510 Fork 185

Lyric / gin-admin

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
m_user.go 1.27 KB
一键复制 编辑 原始数据 按行查看 历史
Lyric 提交于 2018-12-03 22:07 . 增加casbin的支持
package model
import (
"context"
"github.com/LyricTian/gin-admin/src/schema"
)
// IUser 用户管理
type IUser interface {
// 查询分页数据
QueryPage(ctx context.Context, params schema.UserQueryParam, pageIndex, pageSize uint) (int64, []*schema.UserQueryResult, error)
// 查询指定数据
Get(ctx context.Context, recordID string, includeRoleIDs bool) (*schema.User, error)
// Check 检查数据是否存在
Check(ctx context.Context, recordID string) (bool, error)
// 检查用户名
CheckUserName(ctx context.Context, userName string) (bool, error)
// 根据用户名查询指定数据
GetByUserName(ctx context.Context, userName string, includeRoleIDs bool) (*schema.User, error)
// 检查角色下是否存在用户
CheckByRoleID(ctx context.Context, roleID string) (bool, error)
// 查询用户角色
QueryUserRoles(ctx context.Context, params schema.UserRoleQueryParam) ([]*schema.UserRole, error)
// 创建数据
Create(ctx context.Context, item *schema.User) error
// 更新数据
Update(ctx context.Context, recordID string, info map[string]interface{}) error
// 更新数据
UpdateWithRoleIDs(ctx context.Context, recordID string, info map[string]interface{}, roleIDs []string) error
// 删除数据
Delete(ctx context.Context, recordID string) error
}
Go
1
https://gitee.com/lyric/gin-admin.git
git@gitee.com:lyric/gin-admin.git
lyric
gin-admin
gin-admin
v1.1.0

搜索帮助