Documentation ¶
Index ¶
- Constants
- func Error(ctx iris.Context, status int, msg string, data interface{})
- func NewRequestLogger(app *iris.Application) (h iris.Handler)
- func Ok(ctx iris.Context, msg string, data interface{})
- func Ok_(ctx iris.Context, msg string)
- func OtherClose() func() error
- func RequestClose() func() error
- func Unauthorized(ctx iris.Context, msg string, data interface{})
- type GroupDefine
- type Pagination
- type RoleDefine
Constants ¶
View Source
const ( // key定义 CODE string = "code" MSG string = "msg" DATA string = "data" // msg define Success = "恭喜, 成功" OptionSuccess string = "恭喜, 操作成功" OptionFailur string = "抱歉, 操作失败" ParseParamsFailur string = "解析参数失败" RegisteSuccess string = "恭喜, 注册用户成功" RegisteFailur string = "注册失败" LoginSuccess string = "恭喜, 登录成功" LoginFailur string = "登录失败" DeleteUsersSuccess string = "删除用户成功" DeleteUsersFailur string = "删除用户错误" DepCreateFailur string = "部门创建失败" DeleteRolesSuccess string = "删除角色成功" DeleteRolesFailur string = "删除角色错误" UsernameFailur string = "用户名错误" PasswordFailur string = "密码错误" TokenCreateFailur string = "生成token错误" TokenExactFailur string = "token不存在或header设置不正确" TokenExpire string = "回话已过期" TokenParseFailur string = "token解析错误" TokenParseFailurAndEmpty string = "解析错误,token为空" TokenParseFailurAndInvalid string = "解析错误,token无效" NotFound string = "您请求的url不存在" PermissionsLess string = "权限不足" StatusInternalServerError string = "服务器内部错误" RoleCreateFailur string = "创建角色失败" RoleCreateSuccess string = "创建角色成功" )
Variables ¶
This section is empty.
Functions ¶
func OtherClose ¶
func OtherClose() func() error
func RequestClose ¶
func RequestClose() func() error
func Unauthorized ¶
401 error define
Types ¶
type GroupDefine ¶
用户所属角色组
type Pagination ¶
type Pagination struct { PageNumber int //当前看的是第几页 PageSize int //每页显示多少条数据 // 用于分页设置的参数 Start int Limit int // 时间范围 StartDate string EndDate string Uid int64 // 公用的特殊参数 }
bootstraptable 分页参数
func NewPaginationByForm ¶
func NewPaginationByForm(ctx iris.Context) (*Pagination, error)
func NewPaginationByParam ¶
func NewPaginationByParam(ctx iris.Context) (*Pagination, error)
Click to show internal directories.
Click to hide internal directories.