bll

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Feb 25, 2020 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type IDemo

type IDemo interface {
	// 查询数据
	Query(ctx context.Context, params schema.DemoQueryParam, opts ...schema.DemoQueryOptions) (*schema.DemoQueryResult, error)
	// 查询指定数据
	Get(ctx context.Context, recordID string, opts ...schema.DemoQueryOptions) (*schema.Demo, error)
	// 创建数据
	Create(ctx context.Context, item schema.Demo) (*schema.Demo, error)
	// 更新数据
	Update(ctx context.Context, recordID string, item schema.Demo) (*schema.Demo, error)
	// 删除数据
	Delete(ctx context.Context, recordID string) error
	// 更新状态
	UpdateStatus(ctx context.Context, recordID string, status int) error
}

IDemo demo业务逻辑接口

type ILogin

type ILogin interface {
	// 获取图形验证码信息
	GetCaptcha(ctx context.Context, length int) (*schema.LoginCaptcha, error)
	// 生成并响应图形验证码
	ResCaptcha(ctx context.Context, w http.ResponseWriter, captchaID string, width, height int) error
	// 登录验证
	Verify(ctx context.Context, userName, password string) (*schema.User, error)
	// 生成令牌
	GenerateToken(ctx context.Context, userID string) (*schema.LoginTokenInfo, error)
	// 销毁令牌
	DestroyToken(ctx context.Context, tokenString string) error
	// 获取用户登录信息
	GetLoginInfo(ctx context.Context, userID string) (*schema.UserLoginInfo, error)
	// 查询用户的权限菜单树
	QueryUserMenuTree(ctx context.Context, userID string) ([]*schema.MenuTree, error)
	// 更新用户登录密码
	UpdatePassword(ctx context.Context, userID string, params schema.UpdatePasswordParam) error
}

ILogin 登录业务逻辑接口

type IMenu

type IMenu interface {
	// 查询数据
	Query(ctx context.Context, params schema.MenuQueryParam, opts ...schema.MenuQueryOptions) (*schema.MenuQueryResult, error)
	// 查询指定数据
	Get(ctx context.Context, recordID string, opts ...schema.MenuQueryOptions) (*schema.Menu, error)
	// 创建数据
	Create(ctx context.Context, item schema.Menu) (*schema.Menu, error)
	// 更新数据
	Update(ctx context.Context, recordID string, item schema.Menu) (*schema.Menu, error)
	// 删除数据
	Delete(ctx context.Context, recordID string) error
}

IMenu 菜单管理业务逻辑接口

type IRole

type IRole interface {
	// 查询数据
	Query(ctx context.Context, params schema.RoleQueryParam, opts ...schema.RoleQueryOptions) (*schema.RoleQueryResult, error)
	// 查询指定数据
	Get(ctx context.Context, recordID string, opts ...schema.RoleQueryOptions) (*schema.Role, error)
	// 创建数据
	Create(ctx context.Context, item schema.Role) (*schema.Role, error)
	// 更新数据
	Update(ctx context.Context, recordID string, item schema.Role) (*schema.Role, error)
	// 删除数据
	Delete(ctx context.Context, recordID string) error
	// 获取资源权限
	GetMenuResources(ctx context.Context, item *schema.Role) (schema.MenuResources, error)
}

IRole 角色管理业务逻辑接口

type ITrans

type ITrans interface {
	// 执行事务
	Exec(ctx context.Context, fn func(context.Context) error) error
}

ITrans 事务管理接口

type IUser

type IUser interface {
	// 查询数据
	Query(ctx context.Context, params schema.UserQueryParam, opts ...schema.UserQueryOptions) (*schema.UserQueryResult, error)
	// 查询显示项数据
	QueryShow(ctx context.Context, params schema.UserQueryParam, opts ...schema.UserQueryOptions) (*schema.UserShowQueryResult, error)
	// 查询指定数据
	Get(ctx context.Context, recordID string, opts ...schema.UserQueryOptions) (*schema.User, error)
	// 创建数据
	Create(ctx context.Context, item schema.User) (*schema.User, error)
	// 更新数据
	Update(ctx context.Context, recordID string, item schema.User) (*schema.User, error)
	// 删除数据
	Delete(ctx context.Context, recordID string) error
	// 更新状态
	UpdateStatus(ctx context.Context, recordID string, status int) error
}

IUser 用户管理业务逻辑接口

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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