handler

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Feb 18, 2022 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func MkResponse

func MkResponse(ctx *gin.Context, code int, msg string, data interface{})

Types

type Artifact added in v0.3.0

type Artifact struct {
	TaskId    int    `json:"task_id"`
	ImageName string `json:"image_name"`
}

type ArtifactListRequest added in v0.3.0

type ArtifactListRequest struct {
	ServiceName  string `form:"service_name" binding:"required"`
	WorkflowName string `form:"workflow_name" binding:"required"`
	FileType     string `form:"file_type" binding:"required"`
	PageNum      int    `form:"page_num" binding:"required"`
	PageSize     int    `form:"page_size" binding:"required"`
}

type ArtifactListResponse added in v0.3.0

type ArtifactListResponse struct {
	ArtifactList []Artifact  `json:"artifact_list"`
	Pager        types.Pager `json:"pager"`
}

type CreateIntegrationInfoReq added in v0.3.0

type CreateIntegrationInfoReq struct {
	Host     string `json:"host"`
	Account  string `json:"account"`
	Password string `json:"password"`
	Type     string `json:"type"`
	Operator string `json:"operator"`
}

type DeleteIntegrationReq added in v0.3.0

type DeleteIntegrationReq struct {
	Ids []int64 `json:"ids"`
}

type Instance added in v0.2.0

type Instance struct{}

func (*Instance) Count added in v0.2.0

func (i *Instance) Count(ctx *gin.Context)

func (*Instance) InstanceServiceByIp added in v0.3.0

func (i *Instance) InstanceServiceByIp(ctx *gin.Context)

type InstanceCountReq added in v0.2.0

type InstanceCountReq struct {
	ServiceClusterId   int64  `json:"service_cluster_id" form:"service_cluster_id"`
	ServiceName        string `json:"service_name" form:"service_name"`
	ServiceClusterName string `json:"service_cluster_name" form:"service_cluster_name"`
}

type InstanceReq added in v0.1.1

type InstanceReq struct {
	PageNum        int    `form:"page_num" json:"page_num"`
	PageSize       int    `form:"page_size" json:"page_size"`
	TaskId         int    `form:"task_id" json:"task_id"`
	InstanceStatus string `form:"instance_status" json:"instance_status"`
}

type InstanceServiceByIpReq added in v0.3.0

type InstanceServiceByIpReq struct {
	IpInner string `json:"ip_inner" form:"ip_inner" binding:"required,ip"`
}

type Integration added in v0.3.0

type Integration struct{}

func (*Integration) Create added in v0.3.0

func (i *Integration) Create(ctx *gin.Context)

func (*Integration) Delete added in v0.3.0

func (i *Integration) Delete(ctx *gin.Context)

func (*Integration) List added in v0.3.0

func (i *Integration) List(ctx *gin.Context)

type ListIntegrationReq added in v0.3.0

type ListIntegrationReq struct {
	Type     string `json:"type" form:"type"`
	PageNum  int    `json:"page_num" form:"page_num"`
	PageSize int    `json:"page_size" form:"page_size"`
}

type Pager

type Pager struct {
	PageNumber int `json:"page_num"`
	PageSize   int `json:"page_size"`
	Total      int `json:"total"`
}

type Service

type Service struct{}

func (*Service) BreathRecord

func (h *Service) BreathRecord(ctx *gin.Context)

BreathRecord 查询单个服务扩容历史

func (*Service) ClusterList added in v0.2.0

func (h *Service) ClusterList(ctx *gin.Context)

ClusterList 查询服务关联集群列表

func (*Service) Create

func (h *Service) Create(ctx *gin.Context)

Create 创建服务

func (*Service) Delete added in v0.3.0

func (h *Service) Delete(ctx *gin.Context)

Delete 删除服务

func (*Service) Deploy added in v0.3.0

func (h *Service) Deploy(ctx *gin.Context)

Deploy 服务部署入口

func (*Service) Detail

func (h *Service) Detail(ctx *gin.Context)

Detail 查询服务详情

func (*Service) Expand

func (h *Service) Expand(ctx *gin.Context)

Expand 服务扩容入口

func (*Service) GetWorkflowTasks added in v0.3.0

func (h *Service) GetWorkflowTasks(ctx *gin.Context)

func (*Service) GetWorkflows added in v0.3.0

func (h *Service) GetWorkflows(ctx *gin.Context)

func (*Service) List

func (h *Service) List(ctx *gin.Context)

List 查询服务列表

func (*Service) Scheduling added in v0.2.0

func (h *Service) Scheduling(ctx *gin.Context)

func (*Service) Shrink

func (h *Service) Shrink(ctx *gin.Context)

Shrink 服务缩容入口

func (*Service) Update

func (h *Service) Update(ctx *gin.Context)

Update 更新数据表记录

type ServiceCreateHttpRequest

type ServiceCreateHttpRequest struct {
	ServiceInfo *types.ServiceInfo `json:"service_info"`
}

type ServiceCreateHttpResponse

type ServiceCreateHttpResponse struct {
	ServiceClusterId int64 `json:"service_cluster_id"`
}

type ServiceDeployHttpRequest added in v0.3.0

type ServiceDeployHttpRequest struct {
	ServiceClusterId int64  `form:"service_cluster_id" json:"service_cluster_id"`
	DownloadFileUrl  string `form:"download_file_url" json:"download_file_url"`
	Count            int64  `form:"count" json:"count"`
	ExecType         string `form:"exec_type" json:"exec_type"`
	Rollback         bool   `form:"rollback" json:"rollback"`
}

type ServiceDeployHttpResponse added in v0.3.0

type ServiceDeployHttpResponse struct {
	TaskId int64 `json:"task_id"`
}

type ServiceExpandHttpRequest

type ServiceExpandHttpRequest struct {
	ServiceClusterId int64  `form:"service_cluster_id" json:"service_cluster_id"`
	ServiceName      string `form:"service_name" json:"service_name" `
	ServiceCluster   string `form:"service_cluster" json:"service_cluster"`
	Count            int64  `form:"count" json:"count"`
	ExecType         string `form:"exec_type" json:"exec_type"`
}

type ServiceExpandHttpResponse

type ServiceExpandHttpResponse struct {
	TaskId int64 `json:"task_id"`
}

type ServiceInfo

type ServiceInfo struct {
	ServiceName  string `json:"service_name"`
	Description  string `json:"description"`
	Language     string `json:"language"`
	TmplExpandId string `json:"tmpl_expand_id"`
}

type ServiceShrinkHttpRequest

type ServiceShrinkHttpRequest struct {
	ServiceClusterId int64  `form:"service_cluster_id" json:"service_cluster_id"`
	ServiceName      string `json:"service_name" form:"service_name"`
	ServiceCluster   string `json:"service_cluster" form:"service_cluster"`
	Count            int64  `form:"count" json:"count"`
	ExecType         string `form:"exec_type" json:"exec_type"`
}

type ServiceShrinkHttpResponse

type ServiceShrinkHttpResponse struct {
	TaskId int64 `json:"task_id"`
}

type Task added in v0.1.1

type Task struct{}

func (*Task) GetDeployDetail added in v0.3.0

func (h *Task) GetDeployDetail(ctx *gin.Context)

GetDeployDetail 查询部署任务详情

func (*Task) Info added in v0.1.1

func (h *Task) Info(ctx *gin.Context)

Info 查询任务进度信息

func (*Task) InstanceList added in v0.1.1

func (t *Task) InstanceList(ctx *gin.Context)

type TaskInfoRequest added in v0.1.1

type TaskInfoRequest struct {
	TaskId int64 `json:"task_id"`
}

type TaskInfoResponse added in v0.1.1

type TaskInfoResponse struct {
	TaskInfo *types.TaskInfo `json:"task_info"`
}

type TmplDeploy added in v0.3.0

type TmplDeploy struct {
}

func (*TmplDeploy) List added in v0.3.0

func (h *TmplDeploy) List(ctx *gin.Context)

type TmplExpand

type TmplExpand struct {
}

func (*TmplExpand) Create

func (h *TmplExpand) Create(ctx *gin.Context)

Create 模板

func (*TmplExpand) Delete

func (h *TmplExpand) Delete(ctx *gin.Context)

Delete 删除模版信息

func (*TmplExpand) Info

func (h *TmplExpand) Info(ctx *gin.Context)

func (*TmplExpand) List

func (h *TmplExpand) List(ctx *gin.Context)

func (*TmplExpand) Update

func (h *TmplExpand) Update(ctx *gin.Context)

type TmplExpandRequest

type TmplExpandRequest struct {
	EndStep    string             `json:"end_step"`
	TmplInfo   *types.TmpInfo     `json:"tmpl_info"`
	BaseEnv    *types.BaseEnv     `json:"base_env"`
	ServiceEnv *types.ServiceEnv  `json:"service_env"`
	Mount      *types.ParamsMount `json:"mount"`
	DeployInfo *types.DeployInfo  `json:"deploy_info"`
}

type TmplExpandResponse

type TmplExpandResponse struct {
	TmplId       string `json:"tmpl_id"`
	DeployTmplId string `json:"deploy_tmpl_id"`
}

type TmplInfoResponse

type TmplInfoResponse struct {
	TmplInfo   *types.TmpInfo     `json:"tmpl_info"`
	BaseEnv    *types.BaseEnv     `json:"base_env"`
	ServiceEnv *types.ServiceEnv  `json:"service_env"`
	Mount      *types.ParamsMount `json:"mount"`
	DeployInfo *types.DeployInfo  `json:"deploy_info"`
}

type TmplUpdateRequest

type TmplUpdateRequest struct {
	TmplExpandId int64              `json:"tmpl_expand_id"`
	EndStep      string             `json:"end_step"`
	TmplInfo     *types.TmpInfo     `json:"tmpl_info"`
	BaseEnv      *types.BaseEnv     `json:"base_env"`
	ServiceEnv   *types.ServiceEnv  `json:"service_env"`
	Mount        *types.ParamsMount `json:"mount"`
	DeployInfo   *types.DeployInfo  `json:"deploy_info"`
}

type TmplUpdateResponse

type TmplUpdateResponse struct {
	TmplId string `json:"tmpl_id"`
}

type Workflow added in v0.3.0

type Workflow struct {
	WorkflowName string `json:"workflow_name"`
}

type WorkflowListRequest added in v0.3.0

type WorkflowListRequest struct {
	ServiceName string `form:"service_name" binding:"required"`
}

type WorkflowListResponse added in v0.3.0

type WorkflowListResponse struct {
	WorkflowList []Workflow `json:"workflow_list"`
}

Jump to

Keyboard shortcuts

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