model

package
v0.0.31-rc Latest Latest
Warning

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

Go to latest
Published: Jan 25, 2021 License: Apache-2.0, BSD-2-Clause, BSD-3-Clause Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BatchShowPipelinesStatusRequest

type BatchShowPipelinesStatusRequest struct {
	XLanguage   *string `json:"X-Language,omitempty"`
	PipelineIds string  `json:"pipeline_ids"`
}

Request Object

func (BatchShowPipelinesStatusRequest) String

type BatchShowPipelinesStatusResponse

type BatchShowPipelinesStatusResponse struct {
	Body           *[]PipelineExecuteStates `json:"body,omitempty"`
	HttpStatusCode int                      `json:"-"`
}

Response Object

func (BatchShowPipelinesStatusResponse) String

type Constraint

type Constraint struct {
	// 校验规则类型
	Type string `json:"type"`
	// 校验规则
	Value string `json:"value"`
	// 校验失败描述
	Errormsg string `json:"errormsg"`
}

任务参数校验参数

func (Constraint) String

func (o Constraint) String() string

type CreatePipelineByTemplateRequest

type CreatePipelineByTemplateRequest struct {
	XLanguage *string       `json:"X-Language,omitempty"`
	Body      *TemplateCddl `json:"body,omitempty"`
}

Request Object

func (CreatePipelineByTemplateRequest) String

type CreatePipelineByTemplateResponse

type CreatePipelineByTemplateResponse struct {
	// 实例ID
	TaskId         *string `json:"task_id,omitempty"`
	HttpStatusCode int     `json:"-"`
}

Response Object

func (CreatePipelineByTemplateResponse) String

type FlowItem

type FlowItem struct {
}

编排flow详情,描述流水线内各阶段任务的串并行关系。map类型数据,key为阶段名字,默认第一阶段initial,最后阶段为final,其余名字以'state_数字'标识。value为该阶段内任务(以'Task_数字'标识)以及后续阶段的标识。本字段为描述流水线基础编排数据之一,建议可通过流水线真实界面基于模板创建接口中获取

func (FlowItem) String

func (o FlowItem) String() string

type ListPipleineBuildResultRequest

type ListPipleineBuildResultRequest struct {
	XLanguage *string `json:"X-Language,omitempty"`
	ProjectId string  `json:"project_id"`
	StartDate string  `json:"start_date"`
	EndDate   string  `json:"end_date"`
	Offset    int32   `json:"offset"`
	Limit     int32   `json:"limit"`
}

Request Object

func (ListPipleineBuildResultRequest) String

type ListPipleineBuildResultResponse

type ListPipleineBuildResultResponse struct {
	// 偏移量,表示从此偏移量开始查询,offset大于等于0
	Offset *int32 `json:"offset,omitempty"`
	// 每次查询的条目数量
	Limit *int32 `json:"limit,omitempty"`
	// 总条目数量
	Total *int32 `json:"total,omitempty"`
	// 执行状况数据列表
	BuildResults   *[]PipelineBuildResult `json:"build_results,omitempty"`
	HttpStatusCode int                    `json:"-"`
}

Response Object

func (ListPipleineBuildResultResponse) String

type ListTemplatesRequest

type ListTemplatesRequest struct {
	XLanguage    *string `json:"X-Language,omitempty"`
	TemplateType string  `json:"template_type"`
	IsBuildIn    string  `json:"is_build_in"`
	Offset       *int32  `json:"offset,omitempty"`
	Limit        *int32  `json:"limit,omitempty"`
	Name         *string `json:"name,omitempty"`
	Sort         *string `json:"sort,omitempty"`
	Asc          *string `json:"asc,omitempty"`
}

Request Object

func (ListTemplatesRequest) String

func (o ListTemplatesRequest) String() string

type ListTemplatesResponse

type ListTemplatesResponse struct {
	// 总数
	Total *int32 `json:"total,omitempty"`
	// 页码数
	PageNumber *int32 `json:"page_number,omitempty"`
	// 每页显示数
	PageSize *int32 `json:"page_size,omitempty"`
	// 模板数据,list类型数据
	Content        *[]TemplateView `json:"content,omitempty"`
	HttpStatusCode int             `json:"-"`
}

Response Object

func (ListTemplatesResponse) String

func (o ListTemplatesResponse) String() string

type ParamTypeLimits

type ParamTypeLimits struct {
	// 是否废弃
	Disable string `json:"disable"`
	// 语言名字
	Name string `json:"name"`
	// 语言展示名字
	Displayname string `json:"displayname"`
	// 规则集ID
	Id string `json:"id"`
	// 扫描语言
	Language string `json:"language"`
}

CodeCheck任务语言参数

func (ParamTypeLimits) String

func (o ParamTypeLimits) String() string

type PipelineBuildResult

type PipelineBuildResult struct {
	// 执行ID
	BuildId string `json:"build_id"`
	// 运行耗时
	ElapseTime *string `json:"elapse_time,omitempty"`
	// 执行结束时间
	EndTime string `json:"end_time"`
	// 运行结果
	Outcome string `json:"outcome"`
	// 流水线id
	PipelineId string `json:"pipeline_id"`
}

func (PipelineBuildResult) String

func (o PipelineBuildResult) String() string

type PipelineExecuteStates

type PipelineExecuteStates struct {
	// 流水线执行结果
	Result string `json:"result"`
	// 流水线执行状态
	Status string `json:"status"`
	// 阶段执行情况
	Stages []Stages `json:"stages"`
	// 执行人
	Executor string `json:"executor"`
	// 流水线名字
	PipelineName string `json:"pipeline_name"`
	// 流水线ID
	PipelineId string `json:"pipeline_id"`
	// 流水线详情页URL
	DetailUrl string `json:"detail_url"`
	// 流水线编辑页URL
	ModifyUrl string `json:"modify_url"`
	// 开始执行时间
	StartTime string `json:"start_time"`
	// 结束执行时间
	EndTime string `json:"end_time"`
}

流水线执行结果

func (PipelineExecuteStates) String

func (o PipelineExecuteStates) String() string

type PipelineParam

type PipelineParam struct {
	// 流水线参数名字
	Name string `json:"name"`
	// 流水线参数值
	Value string `json:"value"`
	// 流水线参数描述
	Description string `json:"description"`
	// 流水线参数类型
	Paramtype string `json:"paramtype"`
	// 是否静态参数
	IsStatic bool `json:"is_static"`
	// 是否默认参数
	IsDefault bool `json:"is_default"`
}

流水线参数

func (PipelineParam) String

func (o PipelineParam) String() string

type PipelineParameter

type PipelineParameter struct {
	// 参数名称
	Name string `json:"name"`
	// 参数值
	Value string `json:"value"`
}

func (PipelineParameter) String

func (o PipelineParameter) String() string

type PipelineStateStatus

type PipelineStateStatus struct {
	// 阶段或任务标识
	Id string `json:"id"`
	// 阶段或任务名称
	Name string `json:"name"`
	// 类别(阶段/任务)
	Type string `json:"type"`
	// 执行开始时间
	StartTime string `json:"start_time"`
	// 执行结束时间
	EndTime string `json:"end_time"`
	// 运行耗时
	ElapsedTime string `json:"elapsed_time"`
	// 运行状态
	Status string `json:"status"`
	// 运行结果
	Outcome string `json:"outcome"`
	// 错误码
	ErrorCode string `json:"error_code"`
	// 错误信息
	ErrorMsg string `json:"error_msg"`
	// 子任务运行信息(对任务来说是空的)
	Children []PipelineStateStatus `json:"children"`
	// 任务运行记录跳转链接
	DetailUrl string `json:"detail_url"`
}

func (PipelineStateStatus) String

func (o PipelineStateStatus) String() string

type RegisterAgentRequest

type RegisterAgentRequest struct {
	Body *SlaveRegister `json:"body,omitempty"`
}

Request Object

func (RegisterAgentRequest) String

func (o RegisterAgentRequest) String() string

type RegisterAgentResponse

type RegisterAgentResponse struct {
	// 状态信息
	Status *string `json:"status,omitempty"`
	// 返回结果
	Result *interface{} `json:"result,omitempty"`
	// 返回错误
	Error          *interface{} `json:"error,omitempty"`
	HttpStatusCode int          `json:"-"`
}

Response Object

func (RegisterAgentResponse) String

func (o RegisterAgentResponse) String() string

type RemovePipelineRequest

type RemovePipelineRequest struct {
	XLanguage  *string `json:"X-Language,omitempty"`
	PipelineId string  `json:"pipeline_id"`
}

Request Object

func (RemovePipelineRequest) String

func (o RemovePipelineRequest) String() string

type RemovePipelineResponse

type RemovePipelineResponse struct {
	// 流水线ID
	PipelineId *string `json:"pipeline_id,omitempty"`
	// 流水线名字
	PipelineName   *string `json:"pipeline_name,omitempty"`
	HttpStatusCode int     `json:"-"`
}

Response Object

func (RemovePipelineResponse) String

func (o RemovePipelineResponse) String() string

type ShowAgentStatusRequest

type ShowAgentStatusRequest struct {
	XLanguage *string `json:"X-Language,omitempty"`
	AgentId   string  `json:"agent_id"`
}

Request Object

func (ShowAgentStatusRequest) String

func (o ShowAgentStatusRequest) String() string

type ShowAgentStatusResponse

type ShowAgentStatusResponse struct {
	// Agent状态
	Status *string `json:"status,omitempty"`
	// AgentID
	AgentId        *string `json:"agent_id,omitempty"`
	HttpStatusCode int     `json:"-"`
}

Response Object

func (ShowAgentStatusResponse) String

func (o ShowAgentStatusResponse) String() string

type ShowInstanceStatusRequest

type ShowInstanceStatusRequest struct {
	XLanguage *string `json:"X-Language,omitempty"`
	TaskId    string  `json:"task_id"`
}

Request Object

func (ShowInstanceStatusRequest) String

func (o ShowInstanceStatusRequest) String() string

type ShowInstanceStatusResponse

type ShowInstanceStatusResponse struct {
	// 实例ID
	TaskId *string `json:"task_id,omitempty"`
	// 实例创建状态
	TaskStatus *string `json:"task_status,omitempty"`
	// 流水线ID
	PipelineId *string `json:"pipeline_id,omitempty"`
	// 流水线名字
	PipelineName *string `json:"pipeline_name,omitempty"`
	// 流水线详情页面url
	PipelineUrl    *string `json:"pipeline_url,omitempty"`
	HttpStatusCode int     `json:"-"`
}

Response Object

func (ShowInstanceStatusResponse) String

type ShowPipleineStatusRequest

type ShowPipleineStatusRequest struct {
	XLanguage  *string `json:"X-Language,omitempty"`
	PipelineId string  `json:"pipeline_id"`
	BuildId    *string `json:"build_id,omitempty"`
}

Request Object

func (ShowPipleineStatusRequest) String

func (o ShowPipleineStatusRequest) String() string

type ShowPipleineStatusResponse

type ShowPipleineStatusResponse struct {
	// 流水线ID
	PipelineId *string `json:"pipeline_id,omitempty"`
	// 流水线名称
	PipelineName *string `json:"pipeline_name,omitempty"`
	// 执行人
	Executor *string `json:"executor,omitempty"`
	// 流水线执行ID
	BuildId *string `json:"build_id,omitempty"`
	// 开始执行时间
	StartTime *string `json:"start_time,omitempty"`
	// 结束执行时间
	EndTime *string `json:"end_time,omitempty"`
	// 流水线参数
	Parameters *[]PipelineParameter `json:"parameters,omitempty"`
	// 流水线执行情况
	States *[]PipelineStateStatus `json:"states,omitempty"`
	// 执行耗时
	ElapsedTime *string `json:"elapsed_time,omitempty"`
	// 流水线运行状态
	Status *string `json:"status,omitempty"`
	// 流水线执行结果
	Outcome *string `json:"outcome,omitempty"`
	// 流水线详情页地址
	DetailUrl      *string `json:"detail_url,omitempty"`
	HttpStatusCode int     `json:"-"`
}

Response Object

func (ShowPipleineStatusResponse) String

type ShowTemplateDetailRequest

type ShowTemplateDetailRequest struct {
	XLanguage    *string `json:"X-Language,omitempty"`
	TemplateId   string  `json:"template_id"`
	TemplateType string  `json:"template_type"`
	Source       *string `json:"source,omitempty"`
}

Request Object

func (ShowTemplateDetailRequest) String

func (o ShowTemplateDetailRequest) String() string

type ShowTemplateDetailResponse

type ShowTemplateDetailResponse struct {
	// 模板ID
	TemplateId *string `json:"template_id,omitempty"`
	// 模板名字
	TemplateName *string `json:"template_name,omitempty"`
	// 模板类型
	TemplateType *string `json:"template_type,omitempty"`
	// 模板编辑URL
	TemplateUrl *string `json:"template_url,omitempty"`
	// 用户ID
	UserId *string `json:"user_id,omitempty"`
	// 用户名字
	UserName *string `json:"user_name,omitempty"`
	// 租户ID
	DomainId *string `json:"domain_id,omitempty"`
	// 租户名字
	DomainName *string `json:"domain_name,omitempty"`
	// 是否内置模板
	IsBuildIn *bool `json:"is_build_in,omitempty"`
	// region
	Region *string `json:"region,omitempty"`
	// 项目ID
	ProjectId *string `json:"project_id,omitempty"`
	// 项目名字
	ProjectName *string `json:"project_name,omitempty"`
	// 是否关注
	IsWatch *bool `json:"is_watch,omitempty"`
	// 模板描述
	Description *string `json:"description,omitempty"`
	// 模板参数
	Parameter *[]TemplateParam `json:"parameter,omitempty"`
	// 编排flow,map类型数据
	Flow *interface{} `json:"flow,omitempty"`
	// 子任务states,map类型数据
	States         *interface{} `json:"states,omitempty"`
	HttpStatusCode int          `json:"-"`
}

Response Object

func (ShowTemplateDetailResponse) String

type SlaveRegister

type SlaveRegister struct {
	// cluster ID
	ClusterId string `json:"cluster_id"`
	// Slave名称
	SlaveName string `json:"slave_name"`
	// Slave工作空间
	WorkDir string `json:"work_dir"`
	// Slave label
	Label *string `json:"label,omitempty"`
	// agent版本
	Version *string `json:"version,omitempty"`
	// 是否重试
	Retry *bool `json:"retry,omitempty"`
	// Slave ownerType
	OwnerType *string `json:"owner_type,omitempty"`
}

分页查询对象Query

func (SlaveRegister) String

func (o SlaveRegister) String() string

type Source

type Source struct {
	// 源码仓名字
	CodehubName string `json:"codehub_name"`
	// 触发分支
	Branches []string `json:"branches"`
	// 源码仓来源
	ScmType string `json:"scm_type"`
	// 是否开启触发执行流水线功能
	HookFlag bool `json:"hook_flag"`
	// 触发分支
	Branch string `json:"branch"`
	// 源码仓ssh地址
	GitUrl string `json:"git_url"`
	// 源码仓ID
	CodehubId string `json:"codehub_id"`
	// 源码仓首页url
	WebUrl string `json:"web_url"`
	// 分支列表
	BranchList []string `json:"branch_list"`
	// 初始化ID
	InitId string `json:"init_id"`
	// 是否废弃
	Disable bool `json:"disable"`
}

源码仓库参数

func (Source) String

func (o Source) String() string

type Stages

type Stages struct {
	// 阶段执行结果
	Result string `json:"result"`
	// 阶段执行状态
	Status string `json:"status"`
	// 阶段名字
	Name string `json:"name"`
	// 任务参数
	Parameters *interface{} `json:"parameters"`
	// 阶段顺序
	Order int32 `json:"order"`
	// 阶段类型
	DslMethod string `json:"dsl_method"`
	// 阶段显示名称
	DisplayName string `json:"display_name"`
}

流水线阶段执行信息

func (Stages) String

func (o Stages) String() string

type StartNewPipelineRequest

type StartNewPipelineRequest struct {
	XLanguage  *string                  `json:"X-Language,omitempty"`
	PipelineId string                   `json:"pipeline_id"`
	Body       *StartPipelineParameters `json:"body,omitempty"`
}

Request Object

func (StartNewPipelineRequest) String

func (o StartNewPipelineRequest) String() string

type StartNewPipelineResponse

type StartNewPipelineResponse struct {
	// 流水线ID
	PipelineId *string `json:"pipeline_id,omitempty"`
	// 流水线构建ID
	BuildId        *string `json:"build_id,omitempty"`
	HttpStatusCode int     `json:"-"`
}

Response Object

func (StartNewPipelineResponse) String

func (o StartNewPipelineResponse) String() string

type StartPipelineBuildParams

type StartPipelineBuildParams struct {
	// 构建参数名
	Name string `json:"name"`
	// 构建参数值,最大长度为8192
	Value string `json:"value"`
}

func (StartPipelineBuildParams) String

func (o StartPipelineBuildParams) String() string

type StartPipelineParameters

type StartPipelineParameters struct {
	// 启动流水线时的构建参数
	BuildParams *[]StartPipelineBuildParams `json:"build_params,omitempty"`
}

func (StartPipelineParameters) String

func (o StartPipelineParameters) String() string

type StartPipelineRequest

type StartPipelineRequest struct {
	XLanguage  *string                  `json:"X-Language,omitempty"`
	PipelineId string                   `json:"pipeline_id"`
	Body       *StartPipelineParameters `json:"body,omitempty"`
}

Request Object

func (StartPipelineRequest) String

func (o StartPipelineRequest) String() string

type StartPipelineResponse

type StartPipelineResponse struct {
	// 执行ID
	BuildId *string `json:"build_id,omitempty"`
	// 流水线ID
	PipelineId *string `json:"pipeline_id,omitempty"`
	// 执行时间
	CreateAt *string `json:"create_at,omitempty"`
	// 八爪鱼JobId
	JobId *string `json:"job_id,omitempty"`
	// 八爪鱼JobName
	JobName *string `json:"job_name,omitempty"`
	// 执行人ID
	ExecutorId *string `json:"executor_id,omitempty"`
	// 执行人
	Executor *string `json:"executor,omitempty"`
	// 流水线名字
	PipelineName   *string `json:"pipeline_name,omitempty"`
	HttpStatusCode int     `json:"-"`
}

Response Object

func (StartPipelineResponse) String

func (o StartPipelineResponse) String() string

type StopPipelineRequest

type StopPipelineRequest struct {
	XLanguage  *string `json:"X-Language,omitempty"`
	PipelineId string  `json:"pipeline_id"`
	BuildId    *string `json:"build_id,omitempty"`
}

Request Object

func (StopPipelineRequest) String

func (o StopPipelineRequest) String() string

type StopPipelineResponse

type StopPipelineResponse struct {
	// 流水线ID
	PipelineId *string `json:"pipeline_id,omitempty"`
	// 流水线名字
	PipelineName   *string `json:"pipeline_name,omitempty"`
	HttpStatusCode int     `json:"-"`
}

Response Object

func (StopPipelineResponse) String

func (o StopPipelineResponse) String() string

type TemplateCddl

type TemplateCddl struct {
	Flow *FlowItem `json:"flow"`
	// 子任务states,map类型数据
	States   map[string]TemplateState `json:"states"`
	Workflow *Workflow                `json:"workflow"`
}

创建流水线接口入参

func (TemplateCddl) String

func (o TemplateCddl) String() string

type TemplateParam

type TemplateParam struct {
	// 是否必须
	Required string `json:"required"`
	// 是否可见
	Visible string `json:"visible"`
	// 流水线参数名字
	Name string `json:"name"`
	// 流水线参数值
	Value string `json:"value"`
	// 流水线参数描述
	Description string `json:"description"`
	// 流水线参数类型
	Paramtype string `json:"paramtype"`
	// 流水线参数展示类型
	DisplayType string `json:"display_type"`
	// 流水线参数展示名字
	DisplayName string `json:"display_name"`
	// 是否静态参数
	IsStatic bool `json:"is_static"`
	// 是否默认参数
	IsDefault bool `json:"is_default"`
	// array类型数据
	Limits []ParamTypeLimits `json:"limits"`
	// array类型数据
	Constraints []Constraint `json:"constraints"`
}

流水线参数

func (TemplateParam) String

func (o TemplateParam) String() string

type TemplateState

type TemplateState struct {
	// 任务类型
	Type string `json:"type"`
	// 任务名字
	Name string `json:"name"`
	// 模板任务ID
	ModuleOrTemplateId string `json:"module_or_template_id"`
	// 模板任务名字
	ModuleOrTemplateName string `json:"module_or_template_name"`
	// 任务在流水线页面展示名字
	DisplayName string `json:"display_name"`
	// 流水线可挂载任务类型
	DslMethod string `json:"dsl_method"`
	// 任务参数,map类型数据
	Parameters *interface{} `json:"parameters"`
	// 是否手动执行
	IsManualExecution bool `json:"is_manual_execution"`
	// 任务参数是否校验
	JobParameterValidate bool `json:"job_parameter_validate"`
	// 是否显示代码仓URL
	IsShowCodehubUrl bool `json:"is_show_codehub_url"`
	// 是否执行
	IsExecute bool `json:"is_execute"`
	// 执行任务ID
	JobId string `json:"job_id"`
	// 执行任务名字
	JobName string `json:"job_name"`
	// 任务所属项目ID
	ProjectId string `json:"project_id"`
	// 执行方式
	ExecutionMode string `json:"execution_mode"`
}

子任务参数

func (TemplateState) String

func (o TemplateState) String() string

type TemplateView

type TemplateView struct {
	// 模板ID
	TemplateId string `json:"template_id"`
	// 模板名字
	TemplateName string `json:"template_name"`
	// 模板类型
	TemplateType string `json:"template_type"`
	// 模板编辑URL
	TemplateUrl string `json:"template_url"`
	// 用户ID
	UserId string `json:"user_id"`
	// 用户名字
	UserName string `json:"user_name"`
	// 租户ID
	DomainId string `json:"domain_id"`
	// 租户名字
	DomainName string `json:"domain_name"`
	// 是否内置模板
	IsBuildIn bool `json:"is_build_in"`
	// region
	Region string `json:"region"`
	// 项目ID
	ProjectId string `json:"project_id"`
	// 项目名字
	ProjectName string `json:"project_name"`
	// 是否关注
	IsWatch bool `json:"is_watch"`
	// 模板描述
	Description string `json:"description"`
	// 模板参数
	Parameter []TemplateParam `json:"parameter"`
	// 编排flow,map类型数据
	Flow *interface{} `json:"flow"`
	// 子任务states,map类型数据
	States *interface{} `json:"states"`
}

流水线创建状态响应体

func (TemplateView) String

func (o TemplateView) String() string

type Workflow

type Workflow struct {
	// 任务类型,list类型数据
	Parameter []PipelineParam `json:"parameter"`
	// 源码仓,list类型数据
	Source []Source `json:"source"`
	// 流水线名字
	Name string `json:"name"`
	// 项目ID
	ProjectId string `json:"project_id"`
	// 项目名字
	ProjectName string `json:"project_name"`
}

流水线参数详情

func (Workflow) String

func (o Workflow) String() string

Jump to

Keyboard shortcuts

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