controller

package
v0.0.0-...-89c19b0 Latest Latest
Warning

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

Go to latest
Published: Aug 23, 2020 License: MIT Imports: 20 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetPage

func GetPage(c *gin.Context) (page, pagesize uint)

GetPage 获取每页数量

func RespData

func RespData(c *gin.Context, httpCode, code int, data interface{})

RespData 数据返回

func RespFail

func RespFail(c *gin.Context, httpCode, code int, detail string)

RespFail 返回操作失败

func RespJSON

func RespJSON(c *gin.Context, httpCode int, resp interface{})

RespJSON 返回JSON数据

func RespOk

func RespOk(c *gin.Context, httpCode, code int)

RespOk 返回操作成功

Types

type Application

type Application struct {
	Log     logger.ILogger             `inject:""`
	Service appSvc.IApplicationService `inject:""`
}

Application 注入IApplicationService

func (*Application) AddApplication

func (a *Application) AddApplication(c *gin.Context)

AddApplication 新增Application

func (*Application) DeleteApplication

func (a *Application) DeleteApplication(c *gin.Context)

DeleteApplication 删除Application

func (*Application) GetApplication

func (a *Application) GetApplication(c *gin.Context)

GetApplication 获取单个Application

func (*Application) GetApplications

func (a *Application) GetApplications(c *gin.Context)

GetApplications 获取Applications信息

func (*Application) RecentApplications

func (a *Application) RecentApplications(c *gin.Context)

RecentApplications 获取最近有部署的Applications信息

func (*Application) UpdateApplication

func (a *Application) UpdateApplication(c *gin.Context)

UpdateApplication 修改Application

type Deploy

type Deploy struct {
	Log     logger.ILogger           `inject:""`
	Service deploySvc.IDeployService `inject:""`
}

func (*Deploy) AddDeploy

func (deploy *Deploy) AddDeploy(c *gin.Context)

func (*Deploy) DeleteDeploy

func (deploy *Deploy) DeleteDeploy(c *gin.Context)

func (*Deploy) GetBetweenCount

func (deploy *Deploy) GetBetweenCount(c *gin.Context)

返回dashboard的柱状图

func (*Deploy) GetDeploy

func (deploy *Deploy) GetDeploy(c *gin.Context)

func (*Deploy) GetDeploys

func (deploy *Deploy) GetDeploys(c *gin.Context)

func (*Deploy) GetDockerTag

func (deploy *Deploy) GetDockerTag(c *gin.Context)

func (*Deploy) GetOkErrorCount

func (deploy *Deploy) GetOkErrorCount(c *gin.Context)

返回dashborad的饼状图

func (*Deploy) StatusDeploy

func (deploy *Deploy) StatusDeploy(c *gin.Context)

func (*Deploy) SubmitDeploy

func (deploy *Deploy) SubmitDeploy(c *gin.Context)

func (*Deploy) UpdateDeploy

func (deploy *Deploy) UpdateDeploy(c *gin.Context)

type Environment

type Environment struct {
	Log     logger.ILogger             `inject:""`
	Service envSvc.IEnvironmentService `inject:""`
}

Environment 注入IEnvironmentService

func (*Environment) AddEnvironment

func (environment *Environment) AddEnvironment(c *gin.Context)

AddProject 新增Project

func (*Environment) DeleteEnvironment

func (environment *Environment) DeleteEnvironment(c *gin.Context)

DeleteProject 删除项目

func (*Environment) GetEnvironment

func (environment *Environment) GetEnvironment(c *gin.Context)

GetProject 获取单个Project

func (*Environment) GetEnvironments

func (environment *Environment) GetEnvironments(c *gin.Context)

GetEnvironments 获取项目信息

func (*Environment) UpdateEnvironment

func (environment *Environment) UpdateEnvironment(c *gin.Context)

UpdateProject 修改Project

type K8s

type K8s struct {
	Log     logger.ILogger     `inject:""`
	Service k8sSvc.IK8sService `inject:""`
}

func (*K8s) AddK8s

func (k8s *K8s) AddK8s(c *gin.Context)

func (*K8s) DeleteK8s

func (k8s *K8s) DeleteK8s(c *gin.Context)

func (*K8s) GetK8s

func (k8s *K8s) GetK8s(c *gin.Context)

func (*K8s) GetK8ss

func (k8s *K8s) GetK8ss(c *gin.Context)

func (*K8s) UpdateK8s

func (k8s *K8s) UpdateK8s(c *gin.Context)

type Pod

type Pod struct {
	Log     logger.ILogger     `inject:""`
	Service podSvc.IPodService `inject:""`
}

func (*Pod) AddPod

func (pod *Pod) AddPod(c *gin.Context)

func (*Pod) DeletePod

func (pod *Pod) DeletePod(c *gin.Context)

func (*Pod) GetPod

func (pod *Pod) GetPod(c *gin.Context)

func (*Pod) GetPods

func (pod *Pod) GetPods(c *gin.Context)

func (*Pod) UpdatePod

func (pod *Pod) UpdatePod(c *gin.Context)

type Project

type Project struct {
	Log     logger.ILogger         `inject:""`
	Service proSvc.IProjectService `inject:""`
}

Project 注入IProjectService

func (*Project) AddProject

func (p *Project) AddProject(c *gin.Context)

AddProject 新增Project

func (*Project) DeleteProject

func (p *Project) DeleteProject(c *gin.Context)

DeleteProject 删除项目

func (*Project) GetProject

func (p *Project) GetProject(c *gin.Context)

GetProject 获取单个Project

func (*Project) GetProjects

func (p *Project) GetProjects(c *gin.Context)

GetProjects 获取项目信息

func (*Project) UpdateProject

func (p *Project) UpdateProject(c *gin.Context)

UpdateProject 修改Project

type ResponseData

type ResponseData struct {
	Code int         `json:"code"`
	Msg  string      `json:"msg"`
	Data interface{} `json:"data"`
}

ResponseData 数据返回结构体

type ResponseFail

type ResponseFail struct {
	Code   int    `json:"code"`
	Msg    string `json:"msg"`
	Detail string `json:"detail"`
}

ResponseFail 返回成功结构体

type ResponseSuccess

type ResponseSuccess struct {
	Code int    `json:"code"`
	Msg  string `json:"msg"`
}

ResponseSuccess 返回成功结构体

type User

type User struct {
	Log     logger.ILogger       `inject:""`
	Service service.IUserService `inject:""`
}

User 注入IUserService

func (*User) AddUser

func (a *User) AddUser(c *gin.Context)

AddUser 新建用户

func (*User) DeleteUser

func (a *User) DeleteUser(c *gin.Context)

DeleteUser 删除用户

func (*User) GetUserInfo

func (a *User) GetUserInfo(c *gin.Context)

GetUserInfo 根据token获取用户信息

func (*User) GetUsers

func (a *User) GetUsers(c *gin.Context)

GetUsers 获取用户信息

func (*User) Logout

func (a *User) Logout(c *gin.Context)

Logout 退出登录

func (*User) RegisterUser

func (a *User) RegisterUser(c *gin.Context)

RegisterUser 注册用户

func (*User) UpdateUser

func (a *User) UpdateUser(c *gin.Context)

UpdateUser 修改用户

type Yaml

type Yaml struct {
	Log     logger.ILogger       `inject:""`
	Service yamlSvc.IYamlService `inject:""`
}

func (*Yaml) AddYaml

func (yaml *Yaml) AddYaml(c *gin.Context)

func (*Yaml) DeleteYaml

func (yaml *Yaml) DeleteYaml(c *gin.Context)

func (*Yaml) GetYaml

func (yaml *Yaml) GetYaml(c *gin.Context)

func (*Yaml) GetYamls

func (yaml *Yaml) GetYamls(c *gin.Context)

func (*Yaml) UpdateYaml

func (yaml *Yaml) UpdateYaml(c *gin.Context)

Jump to

Keyboard shortcuts

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