Documentation ¶
Overview ¶
Copyright 2019 - now The https://github.com/fuhsicloud/fuhsi-next Authors Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Copyright 2019 - now The https://github.com/fuhsicloud/fuhsi-next Authors Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Index ¶
- type AppController
- func (t *AppController) AdminList()
- func (t *AppController) Branches()
- func (t *AppController) Create()
- func (t *AppController) Delete()
- func (t *AppController) Detail()
- func (t *AppController) List()
- func (t *AppController) ListAppAndEnv()
- func (t *AppController) ListAppAndEnvByAppId()
- func (t *AppController) Update()
- func (t *AppController) UpdateCmd()
- type AuditController
- type BaseAuthController
- type BaseController
- func (this *BaseController) FailJson(err errs.ErrStr, extMsg ...string)
- func (this *BaseController) GetActionId() string
- func (this *BaseController) Prepare()
- func (t *BaseController) ReadRequestJson(entity interface{}) error
- func (t *BaseController) RequestBody() []byte
- func (this *BaseController) SuccJson(data ...interface{})
- type BuildController
- type ClusterController
- type DeploymentController
- type EnvController
- type EventController
- type JobController
- type JobStepController
- type MemberController
- type PkgController
- type ProjectController
- type ProjectRoleController
- type ProjectRolePermController
- type RespData
- type SiteController
- type SystemController
- type UserController
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AppController ¶
type AppController struct {
BaseAuthController
}
App Api
func (*AppController) AdminList ¶
func (t *AppController) AdminList()
@Title Get app list @router /admin/ [get]
func (*AppController) Branches ¶
func (t *AppController) Branches()
@Title View app branches @router /:app_id/branches [get]
func (*AppController) Delete ¶
func (t *AppController) Delete()
@Title Delete app @router /:app_id [delete]
func (*AppController) Detail ¶
func (t *AppController) Detail()
@Title Get detail of app @router /:app_id [get]
func (*AppController) List ¶
func (t *AppController) List()
@Title Get app list of user's project @router /project/:project_id [get]
func (*AppController) ListAppAndEnv ¶
func (t *AppController) ListAppAndEnv()
@Title Get app list of user's project @router /app-and-envs/project/:project_id [get]
func (*AppController) ListAppAndEnvByAppId ¶
func (t *AppController) ListAppAndEnvByAppId()
@Title Get app's env and cluster @router /app-and-envs/app/:app_id [get]
func (*AppController) Update ¶
func (t *AppController) Update()
@Title Update app @router /:app_id [put]
func (*AppController) UpdateCmd ¶
func (t *AppController) UpdateCmd()
@Title update commands @router /:app_id/commands [put]
type AuditController ¶
type AuditController struct {
BaseAuthController
}
func (*AuditController) Cancel ¶
func (t *AuditController) Cancel()
@Title cancel audit @router /:audit_id/cancel [put]
func (*AuditController) GetWaitCount ¶
func (t *AuditController) GetWaitCount()
@Title get audit list waiting num @router /wait-num [get]
func (*AuditController) ListAudited ¶
func (t *AuditController) ListAudited()
@Title get audit list of audited @router /audited [get]
func (*AuditController) ListByStatus ¶
func (t *AuditController) ListByStatus()
@Title get audit list waiting to deal @router /admin/status/:status [get]
func (*AuditController) ListMine ¶
func (t *AuditController) ListMine()
@Title get audit list of mine @router /mine [get]
func (*AuditController) ListWait ¶
func (t *AuditController) ListWait()
@Title get audit list waiting to deal @router /wait [get]
func (*AuditController) Pass ¶
func (t *AuditController) Pass()
@Title pass audit @router /:audit_id/pass [put]
func (*AuditController) Reject ¶
func (t *AuditController) Reject()
@Title reject audit @router /:audit_id/reject [put]
type BaseAuthController ¶
type BaseAuthController struct { BaseController // contains filtered or unexported fields }
需要登录后才能访问的 Controller 只需要组合该 BaseAuthController
func (*BaseAuthController) Prepare ¶
func (t *BaseAuthController) Prepare()
func (*BaseAuthController) UcInfo ¶
func (t *BaseAuthController) UcInfo() *auth.UCInfo
type BaseController ¶
type BaseController struct { beego.Controller // 返回信息 Msg map[string]interface{} }
func (*BaseController) FailJson ¶
func (this *BaseController) FailJson(err errs.ErrStr, extMsg ...string)
设置错误信息
func (*BaseController) ReadRequestJson ¶
func (t *BaseController) ReadRequestJson(entity interface{}) error
获取 HTTP 请求体 JSON entity 是期望的结构的实例指针
type BuildController ¶
type BuildController struct {
BaseAuthController
}
func (*BuildController) Create ¶
func (t *BuildController) Create()
@Title Crate build @router / [post]
func (*BuildController) Detail ¶
func (t *BuildController) Detail()
@Title View build detail @router /:build_id [get]
func (*BuildController) List ¶
func (t *BuildController) List()
@Title View build list @router /project/:project_id [get]
type ClusterController ¶
type ClusterController struct {
BaseAuthController
}
func (*ClusterController) Create ¶
func (t *ClusterController) Create()
@Title Create cluster @router / [post]
func (*ClusterController) Delete ¶
func (t *ClusterController) Delete()
@Title Delete cluster @router /:cluster_id [delete]
func (*ClusterController) Detail ¶
func (t *ClusterController) Detail()
@Title Get cluster @router /:cluster_id [get]
func (*ClusterController) List ¶
func (t *ClusterController) List()
@Title Get env clusters @router /env/:env_id [get]
func (*ClusterController) Update ¶
func (t *ClusterController) Update()
@Title Update cluster @router /:cluster_id [put]
type DeploymentController ¶
type DeploymentController struct {
BaseAuthController
}
func (*DeploymentController) Audit ¶
func (t *DeploymentController) Audit()
@Title @TODO audit deployment @router /audit/:deployment_id [put]
func (*DeploymentController) Create ¶
func (t *DeploymentController) Create()
@Title Create deployment @router / [post]
func (*DeploymentController) List ¶
func (t *DeploymentController) List()
@Title Get page of deployments @router /project/:project_id [get]
type EnvController ¶
type EnvController struct {
BaseAuthController
}
func (*EnvController) Create ¶
func (t *EnvController) Create()
@Title Create app environment @router / [post]
func (*EnvController) Delete ¶
func (t *EnvController) Delete()
@Title Delete app environment @router /:env_id [delete]
func (*EnvController) Detail ¶
func (t *EnvController) Detail()
@Title Get app environment detail @router /:env_id [get]
func (*EnvController) List ¶
func (t *EnvController) List()
@Title Get app environment list @router /app/:app_id [get]
func (*EnvController) Update ¶
func (t *EnvController) Update()
@Title Update app environment @router /:env_id [put]
type EventController ¶
type EventController struct {
BaseAuthController
}
func (*EventController) Delete ¶
func (t *EventController) Delete()
@Title 删除事件 @router /:event_id [delete]
func (*EventController) Detail ¶
func (t *EventController) Detail()
@Title 查看事件详情 @router /:event_id [put]
func (*EventController) List ¶
func (t *EventController) List()
@Title 查看事件列表 @router /user/:uid [get]
func (*EventController) Update ¶
func (t *EventController) Update()
@Title 修改事件 @router /:event_id [put]
type JobController ¶
type JobController struct {
BaseAuthController
}
func (*JobController) StartJob ¶
func (t *JobController) StartJob()
@Title start job @router /:job_id/start [put]
type JobStepController ¶
type JobStepController struct {
BaseAuthController
}
func (*JobStepController) List ¶
func (t *JobStepController) List()
@Title get job steps of job @router /job/:job_id [get]
type MemberController ¶
type MemberController struct {
BaseAuthController
}
func (*MemberController) Add ¶
func (t *MemberController) Add()
@Title Add member to project @router / [post]
func (*MemberController) Delete ¶
func (t *MemberController) Delete()
@Title Remove project member @router /:member_id [delete]
func (*MemberController) List ¶
func (t *MemberController) List()
@Title Get project member list @router /project/:project_id [get]
func (*MemberController) UpdateRole ¶
func (t *MemberController) UpdateRole()
@Title Modify member role @router /:member_id/role [put]
type PkgController ¶
type PkgController struct {
BaseAuthController
}
func (*PkgController) List ¶
func (t *PkgController) List()
@Title get latest {limit} package records @router /env/:env_id [get]
type ProjectController ¶
type ProjectController struct {
BaseAuthController
}
func (*ProjectController) AdminList ¶
func (t *ProjectController) AdminList()
@Title get projects @router /admin/
func (*ProjectController) Create ¶
func (t *ProjectController) Create()
@Title Create new project @router / [post]
func (*ProjectController) Delete ¶
func (t *ProjectController) Delete()
@Title Delete project @router /:project_id [delete]
func (*ProjectController) Detail ¶
func (t *ProjectController) Detail()
@Title Get detail info of project @router /:project_id [get]
func (*ProjectController) List ¶
func (t *ProjectController) List()
@Title get user related projects @router /
func (*ProjectController) Update ¶
func (t *ProjectController) Update()
@Title Update project @router /:project_id [put]
type ProjectRoleController ¶
type ProjectRoleController struct {
BaseAuthController
}
func (*ProjectRoleController) Create ¶
func (t *ProjectRoleController) Create()
@Title Create new project role @router /admin/ [post]
func (*ProjectRoleController) Delete ¶
func (t *ProjectRoleController) Delete()
@Title Delete project role @router /:project_role_id [delete]
func (*ProjectRoleController) Detail ¶
func (t *ProjectRoleController) Detail()
@Title Get project role detail @router /:project_role_id [put]
func (*ProjectRoleController) List ¶
func (t *ProjectRoleController) List()
@Title Get all project roles @router / [get]
func (*ProjectRoleController) Update ¶
func (t *ProjectRoleController) Update()
@Title Update project role @router /admin/:project_role_id [put]
type ProjectRolePermController ¶
type ProjectRolePermController struct {
BaseAuthController
}
func (*ProjectRolePermController) All ¶
func (t *ProjectRolePermController) All()
@Title get all perms @router /admin/ [get]
func (*ProjectRolePermController) BatchCreate ¶
func (t *ProjectRolePermController) BatchCreate()
@Title Batch create to project role permissions @router /admin/batch-create [post]
func (*ProjectRolePermController) BatchUpdate ¶
func (t *ProjectRolePermController) BatchUpdate()
@Title Batch update to project role @router /admin/batch-update [post]
func (*ProjectRolePermController) Create ¶
func (t *ProjectRolePermController) Create()
@Title Add perm to role @router /admin/ [post]
func (*ProjectRolePermController) ProjectRolePermList ¶
func (t *ProjectRolePermController) ProjectRolePermList()
@Title List all perm of project role @router /project-roles/:project_role_id [get]
type SiteController ¶
type SiteController struct {
BaseController
}
func (*SiteController) GetUserByToken ¶
func (t *SiteController) GetUserByToken()
@Title Get user by token @router /token/user [get]
func (*SiteController) Index ¶
func (t *SiteController) Index()
@Title TODO Site index @router / [get]
func (*SiteController) Login ¶
func (t *SiteController) Login()
@Title User login @router /login [post]
func (*SiteController) Register ¶
func (t *SiteController) Register()
@Title User register @router /register [post]
type SystemController ¶
type SystemController struct {
BaseAuthController
}
func (*SystemController) Get ¶
func (t *SystemController) Get()
@Title Get system config @router / [get]
type UserController ¶
type UserController struct {
BaseAuthController
}
func (*UserController) Detail ¶
func (t *UserController) Detail()
@Title get user detail by fuhsi-token @router /detail [get]
func (*UserController) List ¶
func (t *UserController) List()
@Title get user list @router /admin/ [get]
func (*UserController) UpdateRole ¶
func (t *UserController) UpdateRole()
@Title update user role @router /admin/role [put]
Source Files ¶
- app.go
- app_admin.go
- audit.go
- audit_admin.go
- base.go
- base_auth.go
- build.go
- cluster.go
- deployment.go
- env.go
- event.go
- job.go
- job_step.go
- member.go
- pkg.go
- project.go
- project_admin.go
- project_role.go
- project_role_admin.go
- project_role_perm.go
- project_role_perm_admin.go
- site.go
- system.go
- user.go
- user_admin.go