Documentation ¶
Index ¶
- type AccountCtrl
- type AppiumCtrl
- type BaseCtrl
- type BuildCtrl
- type ClusterCtrl
- type ContainerCtrl
- type ContainerImageCtrl
- type DeviceCtrl
- type EnvCtrl
- type FileCtrl
- type InitCtrl
- type PermCtrl
- type PlanCtrl
- type ResCtrl
- type RoleCtrl
- type RpcCtrl
- type TaskCtrl
- type UserCtrl
- func (c *UserCtrl) ChangeAvatar(ctx iris.Context)
- func (c *UserCtrl) CreateUser(ctx iris.Context)
- func (c *UserCtrl) DeleteUser(ctx iris.Context)
- func (c *UserCtrl) GetAdminInfo(ctx iris.Context)
- func (c *UserCtrl) GetAllUsers(ctx iris.Context)
- func (c *UserCtrl) GetProfile(ctx iris.Context)
- func (c *UserCtrl) GetUser(ctx iris.Context)
- func (c *UserCtrl) UpdateUser(ctx iris.Context)
- type VmCtrl
- type VmTemplCtrl
- type WsCtrl
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AccountCtrl ¶
type AccountCtrl struct { UserService *service.UserService `inject:""` UserRepo *repo.UserRepo `inject:""` TokenRepo *repo.TokenRepo `inject:""` RoleRepo *repo.RoleRepo `inject:""` PermRepo *repo.PermRepo `inject:""` }
func NewAccountCtrl ¶
func NewAccountCtrl() *AccountCtrl
func (*AccountCtrl) UserExpire ¶
func (c *AccountCtrl) UserExpire(ctx iris.Context)
* * @api {get} /expire 刷新token * @apiName 刷新token * @apiGroup Users * @apiVersion 1.0.0 * @apiDescription 刷新token * @apiSampleRequest /expire * @apiSuccess {String} msg 消息 * @apiSuccess {bool} state 状态 * @apiSuccess {String} data 返回数据 * @apiPermission null
func (*AccountCtrl) UserLogin ¶
func (c *AccountCtrl) UserLogin(ctx iris.Context)
* * @api {post} /admin/login 用户登陆 * @apiName 用户登陆 * @apiGroup Users * @apiVersion 1.0.0 * @apiDescription 用户登陆 * @apiSampleRequest /admin/login * @apiParam {string} username 用户名 * @apiParam {string} password 密码 * @apiSuccess {String} msg 消息 * @apiSuccess {bool} state 状态 * @apiSuccess {String} data 返回数据 * @apiPermission null
func (*AccountCtrl) UserLogout ¶
func (c *AccountCtrl) UserLogout(ctx iris.Context)
* * @api {get} /logout 用户退出登陆 * @apiName 用户退出登陆 * @apiGroup Users * @apiVersion 1.0.0 * @apiDescription 用户退出登陆 * @apiSampleRequest /logout * @apiSuccess {String} msg 消息 * @apiSuccess {bool} state 状态 * @apiSuccess {String} data 返回数据 * @apiPermission null
type AppiumCtrl ¶
type AppiumCtrl struct { Ctx iris.Context Service *service.AppiumService `inject:""` }
func NewAppiumCtrl ¶
func NewAppiumCtrl() *AppiumCtrl
type BuildCtrl ¶
type BuildCtrl struct { Ctx iris.Context BuildService *service.BuildService `inject:""` ResService *service.ResService `inject:""` BuildRepo *repo.BuildRepo `inject:""` }
func NewBuildCtrl ¶
func NewBuildCtrl() *BuildCtrl
func (*BuildCtrl) BeforeResultSave ¶
func (c *BuildCtrl) BeforeResultSave(ctx iris.Context, file *multipart.FileHeader) bool
func (*BuildCtrl) UpdateResult ¶
func (c *BuildCtrl) UpdateResult(ctx iris.Context)
type ClusterCtrl ¶
type ClusterCtrl struct { Ctx iris.Context ClusterService *service.ClusterService `inject:""` }
func NewClusterCtrl ¶
func NewClusterCtrl() *ClusterCtrl
func (*ClusterCtrl) Get ¶
func (c *ClusterCtrl) Get(ctx iris.Context)
func (*ClusterCtrl) List ¶
func (c *ClusterCtrl) List(ctx iris.Context)
type ContainerCtrl ¶
type ContainerCtrl struct { Ctx iris.Context ContainerService *service.ContainerService `inject:""` }
func NewContainerCtrl ¶
func NewContainerCtrl() *ContainerCtrl
func (*ContainerCtrl) Register ¶
func (c *ContainerCtrl) Register(ctx iris.Context)
type ContainerImageCtrl ¶
type ContainerImageCtrl struct { Ctx iris.Context ImageService *service.DockerImageService `inject:""` }
func NewContainerImageCtrl ¶
func NewContainerImageCtrl() *ContainerImageCtrl
type DeviceCtrl ¶
type DeviceCtrl struct { Ctx iris.Context Service *service.DeviceService `inject:""` }
func NewDeviceCtrl ¶
func NewDeviceCtrl() *DeviceCtrl
func (*DeviceCtrl) PostRegister ¶
func (g *DeviceCtrl) PostRegister() (result _domain.RpcResult)
type EnvCtrl ¶
type EnvCtrl struct { Ctx iris.Context EnvService *service.EnvService `inject:""` }
func NewEnvCtrl ¶
func NewEnvCtrl() *EnvCtrl
type FileCtrl ¶
type FileCtrl struct {
Ctx iris.Context
}
func NewFileCtrl ¶
func NewFileCtrl() *FileCtrl
func (*FileCtrl) PostUpload ¶
func (g *FileCtrl) PostUpload()
type InitCtrl ¶
type InitCtrl struct {
SeederService *service.SeederService `inject:""`
}
func NewInitCtrl ¶
func NewInitCtrl() *InitCtrl
type PermCtrl ¶
func NewPermCtrl ¶
func NewPermCtrl() *PermCtrl
func (*PermCtrl) CreatePermission ¶
func (c *PermCtrl) CreatePermission(ctx iris.Context)
* * @api {post} /admin/permissions/ 新建权限 * @apiName 新建权限 * @apiGroup Permissions * @apiVersion 1.0.0 * @apiDescription 新建权限 * @apiSampleRequest /admin/permissions/ * @apiParam {string} name 权限名 * @apiParam {string} display_name * @apiParam {string} description * @apiParam {string} level * @apiSuccess {String} msg 消息 * @apiSuccess {bool} state 状态 * @apiSuccess {String} data 返回数据 * @apiPermission null
func (*PermCtrl) DeletePermission ¶
func (c *PermCtrl) DeletePermission(ctx iris.Context)
* * @api {delete} /admin/permissions/:id/delete 删除权限 * @apiName 删除权限 * @apiGroup Permissions * @apiVersion 1.0.0 * @apiDescription 删除权限 * @apiSampleRequest /admin/permissions/:id/delete * @apiSuccess {String} msg 消息 * @apiSuccess {bool} state 状态 * @apiSuccess {String} data 返回数据 * @apiPermission null
func (*PermCtrl) GetAllPermissions ¶
func (c *PermCtrl) GetAllPermissions(ctx iris.Context)
* * @api {get} /permissions 获取所有的权限 * @apiName 获取所有的权限 * @apiGroup Permissions * @apiVersion 1.0.0 * @apiDescription 获取所有的权限 * @apiSampleRequest /permissions * @apiSuccess {String} msg 消息 * @apiSuccess {bool} state 状态 * @apiSuccess {String} data 返回数据 * @apiPermission null
func (*PermCtrl) GetPermission ¶
func (c *PermCtrl) GetPermission(ctx iris.Context)
* * @api {get} /admin/permissions/:id 根据id获取权限信息 * @apiName 根据id获取权限信息 * @apiGroup Permissions * @apiVersion 1.0.0 * @apiDescription 根据id获取权限信息 * @apiSampleRequest /admin/permissions/:id * @apiSuccess {String} msg 消息 * @apiSuccess {bool} state 状态 * @apiSuccess {String} data 返回数据 * @apiPermission
func (*PermCtrl) UpdatePermission ¶
func (c *PermCtrl) UpdatePermission(ctx iris.Context)
* * @api {post} /admin/permissions/:id/update 更新权限 * @apiName 更新权限 * @apiGroup Permissions * @apiVersion 1.0.0 * @apiDescription 更新权限 * @apiSampleRequest /admin/permissions/:id/update * @apiParam {string} name 权限名 * @apiParam {string} display_name * @apiParam {string} description * @apiParam {string} level * @apiSuccess {String} msg 消息 * @apiSuccess {bool} state 状态 * @apiSuccess {String} data 返回数据 * @apiPermission null
type PlanCtrl ¶
type PlanCtrl struct { BaseCtrl PlanService *service.PlanService `inject:""` TaskService *service.TaskService `inject:""` }
func NewPlanCtrl ¶
func NewPlanCtrl() *PlanCtrl
type ResCtrl ¶
type ResCtrl struct { Ctx iris.Context ResService *service.ResService `inject:""` }
func NewMachineCtrl ¶
func NewMachineCtrl() *ResCtrl
func (*ResCtrl) ListContainer ¶
func (c *ResCtrl) ListContainer(ctx iris.Context)
type RoleCtrl ¶
type RoleCtrl struct { RoleService *service.RoleService `inject:""` UserRepo *repo.UserRepo `inject:""` RoleRepo *repo.RoleRepo `inject:""` PermRepo *repo.PermRepo `inject:""` }
func NewRoleCtrl ¶
func NewRoleCtrl() *RoleCtrl
func (*RoleCtrl) CreateRole ¶
func (c *RoleCtrl) CreateRole(ctx iris.Context)
* * @api {post} /admin/roles/ 新建角色 * @apiName 新建角色 * @apiGroup Roles * @apiVersion 1.0.0 * @apiDescription 新建角色 * @apiSampleRequest /admin/roles/ * @apiParam {string} name 角色名 * @apiParam {string} display_name * @apiParam {string} description * @apiParam {string} level * @apiSuccess {String} msg 消息 * @apiSuccess {bool} state 状态 * @apiSuccess {String} data 返回数据 * @apiPermission null
func (*RoleCtrl) DeleteRole ¶
func (c *RoleCtrl) DeleteRole(ctx iris.Context)
* * @api {delete} /admin/roles/:id/delete 删除角色 * @apiName 删除角色 * @apiGroup Roles * @apiVersion 1.0.0 * @apiDescription 删除角色 * @apiSampleRequest /admin/roles/:id/delete * @apiSuccess {String} msg 消息 * @apiSuccess {bool} state 状态 * @apiSuccess {String} data 返回数据 * @apiPermission null
func (*RoleCtrl) GetAllRoles ¶
func (c *RoleCtrl) GetAllRoles(ctx iris.Context)
* * @api {get} /roles 获取所有的角色 * @apiName 获取所有的角色 * @apiGroup Roles * @apiVersion 1.0.0 * @apiDescription 获取所有的角色 * @apiSampleRequest /roles * @apiSuccess {String} msg 消息 * @apiSuccess {bool} state 状态 * @apiSuccess {String} data 返回数据 * @apiPermission null
func (*RoleCtrl) GetRole ¶
func (c *RoleCtrl) GetRole(ctx iris.Context)
* * @api {get} /admin/roles/:id 根据id获取角色信息 * @apiName 根据id获取角色信息 * @apiGroup Roles * @apiVersion 1.0.0 * @apiDescription 根据id获取角色信息 * @apiSampleRequest /admin/roles/:id * @apiSuccess {String} msg 消息 * @apiSuccess {bool} state 状态 * @apiSuccess {String} data 返回数据 * @apiPermission
func (*RoleCtrl) UpdateRole ¶
func (c *RoleCtrl) UpdateRole(ctx iris.Context)
* * @api {post} /admin/roles/:id/update 更新角色 * @apiName 更新角色 * @apiGroup Roles * @apiVersion 1.0.0 * @apiDescription 更新角色 * @apiSampleRequest /admin/roles/:id/update * @apiParam {string} name 角色名 * @apiParam {string} display_name * @apiParam {string} description * @apiParam {string} level * @apiSuccess {String} msg 消息 * @apiSuccess {bool} state 状态 * @apiSuccess {String} data 返回数据 * @apiPermission null
type RpcCtrl ¶
type RpcCtrl struct { Ctx iris.Context RpcService *service.RpcService `inject:""` }
func NewRpcCtrl ¶
func NewRpcCtrl() *RpcCtrl
type TaskCtrl ¶
type TaskCtrl struct { Ctx iris.Context TaskService *service.TaskService `inject:""` QueueService *service.QueueService `inject:""` }
func NewTaskCtrl ¶
func NewTaskCtrl() *TaskCtrl
type UserCtrl ¶
type UserCtrl struct { UserService *service.UserService `inject:""` RoleService *service.RoleService `inject:""` UserRepo *repo.UserRepo `inject:""` RoleRepo *repo.RoleRepo `inject:""` }
func NewUserCtrl ¶
func NewUserCtrl() *UserCtrl
func (*UserCtrl) ChangeAvatar ¶
func (c *UserCtrl) ChangeAvatar(ctx iris.Context)
* * @api {get} /admin/change_avatar 修改头像 * @apiName 修改头像 * @apiGroup Users * @apiVersion 1.0.0 * @apiDescription 修改头像 * @apiSampleRequest /admin/change_avatar * @apiSuccess {String} msg 消息 * @apiSuccess {bool} state 状态 * @apiSuccess {String} data 返回数据 * @apiPermission 登陆用户
func (*UserCtrl) CreateUser ¶
func (c *UserCtrl) CreateUser(ctx iris.Context)
* * @api {post} /admin/users/ 新建账号 * @apiName 新建账号 * @apiGroup Users * @apiVersion 1.0.0 * @apiDescription 新建账号 * @apiSampleRequest /admin/users/ * @apiParam {string} username 用户名 * @apiParam {string} password 密码 * @apiSuccess {String} msg 消息 * @apiSuccess {bool} state 状态 * @apiSuccess {String} data 返回数据 * @apiPermission null
func (*UserCtrl) DeleteUser ¶
func (c *UserCtrl) DeleteUser(ctx iris.Context)
* * @api {delete} /admin/users/:id/delete 删除用户 * @apiName 删除用户 * @apiGroup Users * @apiVersion 1.0.0 * @apiDescription 删除用户 * @apiSampleRequest /admin/users/:id/delete * @apiSuccess {String} msg 消息 * @apiSuccess {bool} state 状态 * @apiSuccess {String} data 返回数据 * @apiPermission null
func (*UserCtrl) GetAdminInfo ¶
func (c *UserCtrl) GetAdminInfo(ctx iris.Context)
* * @api {get} /profile 管理员信息 * @apiName 管理员信息 * @apiGroup Users * @apiVersion 1.0.0 * @apiDescription 管理员信息 * @apiSampleRequest /profile * @apiSuccess {String} msg 消息 * @apiSuccess {bool} state 状态 * @apiSuccess {String} data 返回数据 * @apiPermission 登陆用户
func (*UserCtrl) GetAllUsers ¶
func (c *UserCtrl) GetAllUsers(ctx iris.Context)
* * @api {get} /users 获取所有的账号 * @apiName 获取所有的账号 * @apiGroup Users * @apiVersion 1.0.0 * @apiDescription 获取所有的账号 * @apiSampleRequest /users * @apiSuccess {String} msg 消息 * @apiSuccess {bool} state 状态 * @apiSuccess {String} data 返回数据 * @apiPermission null
func (*UserCtrl) GetProfile ¶
func (c *UserCtrl) GetProfile(ctx iris.Context)
* * @api {get} /admin/profile 获取登陆用户信息 * @apiName 获取登陆用户信息 * @apiGroup Users * @apiVersion 1.0.0 * @apiDescription 获取登陆用户信息 * @apiSampleRequest /admin/profile * @apiSuccess {String} msg 消息 * @apiSuccess {bool} state 状态 * @apiSuccess {String} data 返回数据 * @apiPermission 登陆用户
func (*UserCtrl) GetUser ¶
func (c *UserCtrl) GetUser(ctx iris.Context)
* * @api {get} /admin/users/:id 根据id获取用户信息 * @apiName 根据id获取用户信息 * @apiGroup Users * @apiVersion 1.0.0 * @apiDescription 根据id获取用户信息 * @apiSampleRequest /admin/users/:id * @apiSuccess {String} msg 消息 * @apiSuccess {bool} state 状态 * @apiSuccess {String} data 返回数据 * @apiPermission 登陆用户
func (*UserCtrl) UpdateUser ¶
func (c *UserCtrl) UpdateUser(ctx iris.Context)
* * @api {post} /admin/users/:id/update 更新账号 * @apiName 更新账号 * @apiGroup Users * @apiVersion 1.0.0 * @apiDescription 更新账号 * @apiSampleRequest /admin/users/:id/update * @apiParam {string} username 用户名 * @apiParam {string} password 密码 * @apiSuccess {String} msg 消息 * @apiSuccess {bool} state 状态 * @apiSuccess {String} data 返回数据 * @apiPermission null
type VmTemplCtrl ¶
type VmTemplCtrl struct { Ctx iris.Context VmTemplService *service.VmTemplService `inject:""` }
func NewVmTemplCtrl ¶
func NewVmTemplCtrl() *VmTemplCtrl
func (*VmTemplCtrl) Load ¶
func (c *VmTemplCtrl) Load(ctx iris.Context)
func (*VmTemplCtrl) Update ¶
func (c *VmTemplCtrl) Update(ctx iris.Context)