Documentation
¶
Index ¶
- func Delete(c *gin.Context)
- func DownloadLogs(c *gin.Context)
- func Get(c *gin.Context)
- func Index(c *gin.Context)
- func Post(c *gin.Context)
- func PostDbtPipeline(input *core.ApiResourceInput) (*core.ApiResourceOutput, error)
- func PostFeishuPipeline(input *core.ApiResourceInput) (*core.ApiResourceOutput, error)
- func PostGiteePipeline(input *core.ApiResourceInput) (*core.ApiResourceOutput, error)
- func PostGitextractorPipeline(input *core.ApiResourceInput) (*core.ApiResourceOutput, error)
- func PostGithubPipeline(input *core.ApiResourceInput) (*core.ApiResourceOutput, error)
- func PostJiraPipeline(input *core.ApiResourceInput) (*core.ApiResourceOutput, error)
- func PostTapdPipelinePlan(input *core.ApiResourceInput) (*core.ApiResourceOutput, error)
- type CodeTransformationRules
- type DbtPipelinePlan
- type FeishuPipelinePlan
- type GiteePipelinePlan
- type GitextractorPipelinePlan
- type GithubPipelinePlan
- type JiraPipelinePlan
- type TapdPipelinePlan
- type TicketTransformationRules
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Delete ¶
Cancel a pending pipeline DELETE /pipelines/:pipelineId
@Cancel a pending pipeline @Description Cancel a pending pipeline @Tags framework/pipelines @Param pipelineId path int true "pipeline ID" @Success 200 @Failure 400 {string} errcode.Error "Bad Request" @Failure 500 {string} errcode.Error "Internel Error" @Router /pipelines/{pipelineId} [delete]
func DownloadLogs ¶ added in v0.13.0
Get download logs of a pipeline GET /pipelines/:pipelineId/logging.tar.gz
download logs of a pipeline @Description GET /pipelines/:pipelineId/logging.tar.gz @Tags framework/pipelines @Param pipelineId path int true "query" @Success 200 "The archive file" @Failure 400 {string} errcode.Error "Bad Request" @Failure 404 {string} errcode.Error "Pipeline not found" @Failure 500 {string} errcode.Error "Internel Error" @Router /pipelines/{pipelineId}/logging.tar.gz [get]
func Get ¶
Get detail of a pipeline GET /pipelines/:pipelineId
{
"id": 1,
"name": "test-pipeline",
...
}
@Get detail of a pipeline @Description GET /pipelines/:pipelineId @Description RETURN SAMPLE @Description { @Description "id": 1, @Description "name": "test-pipeline", @Description ... @Description } @Tags framework/pipelines @Param pipelineId path int true "query" @Success 200 {object} models.Pipeline @Failure 400 {string} errcode.Error "Bad Request" @Failure 500 {string} errcode.Error "Internel Error" @Router /pipelines/{pipelineId} [get]
func Index ¶
@Summary Get list of pipelines @Description GET /pipelines?status=TASK_RUNNING&pending=1&page=1&pagesize=10 @Tags framework/pipelines @Param status query string true "query" @Param pending query int true "query" @Param page query int true "query" @Param pagesize query int true "query" @Success 200 {object} shared.ResponsePipelines @Failure 400 {string} errcode.Error "Bad Request" @Failure 500 {string} errcode.Error "Internel Error" @Router /pipelines [get]
func Post ¶
Create and run a new pipeline POST /pipelines
{
"name": "name-of-pipeline",
"tasks": [
[ {"plugin": "gitlab", ...}, {"plugin": "jira"} ],
[ {"plugin": "github", ...}],
]
}
@Summary Create and run a new pipeline @Description Create and run a new pipeline @Tags framework/pipelines @Accept application/json @Param pipeline body models.NewPipeline true "json" @Success 200 {object} models.Pipeline @Failure 400 {string} errcode.Error "Bad Request" @Failure 500 {string} errcode.Error "Internal Error" @Router /pipelines [post]
func PostDbtPipeline ¶ added in v0.13.0
func PostDbtPipeline(input *core.ApiResourceInput) (*core.ApiResourceOutput, error)
@Summary pipelines plan for dbt @Description pipelines plan for dbt @Tags framework/pipelines @Accept application/json @Param pipeline body DbtPipelinePlan true "json" @Router /pipelines/dbt/pipeline-plan [post]
func PostFeishuPipeline ¶ added in v0.13.0
func PostFeishuPipeline(input *core.ApiResourceInput) (*core.ApiResourceOutput, error)
@Summary pipelines plan for feishu @Description pipelines plan for feishu @Tags framework/pipelines @Accept application/json @Param pipeline body FeishuPipelinePlan true "json" @Router /pipelines/feishu/pipeline-plan [post]
func PostGiteePipeline ¶ added in v0.13.0
func PostGiteePipeline(input *core.ApiResourceInput) (*core.ApiResourceOutput, error)
@Summary pipelines plan for gitee @Description pipelines plan for gitee @Tags framework/pipelines @Accept application/json @Param pipeline body GiteePipelinePlan true "json" @Router /pipelines/gitee/pipeline-plan [post]
func PostGitextractorPipeline ¶ added in v0.13.0
func PostGitextractorPipeline(input *core.ApiResourceInput) (*core.ApiResourceOutput, error)
@Summary pipelines plan for gitextractor @Description pipelines plan for gitextractor @Tags framework/pipelines @Accept application/json @Param pipeline body GitextractorPipelinePlan true "json" @Router /pipelines/gitextractor/pipeline-plan [post]
func PostGithubPipeline ¶ added in v0.13.0
func PostGithubPipeline(input *core.ApiResourceInput) (*core.ApiResourceOutput, error)
@Summary pipelines plan for github @Description pipelines plan for github @Tags framework/pipelines @Accept application/json @Param pipeline body GithubPipelinePlan true "json" @Router /pipelines/github/pipeline-plan [post]
func PostJiraPipeline ¶ added in v0.13.0
func PostJiraPipeline(input *core.ApiResourceInput) (*core.ApiResourceOutput, error)
@Summary pipelines plan for jira @Description pipelines plan for jira @Tags framework/pipelines @Accept application/json @Param pipeline-plan body JiraPipelinePlan true "json" @Router /pipelines/jira/pipeline-plan [post]
func PostTapdPipelinePlan ¶ added in v0.13.0
func PostTapdPipelinePlan(input *core.ApiResourceInput) (*core.ApiResourceOutput, error)
@Summary pipelines plan for tapd @Description pipelines plan for tapd @Tags framework/pipelines @Accept application/json @Param pipeline body TapdPipelinePlan true "json" @Router /pipelines/tapd/pipeline-plan [post]
Types ¶
type CodeTransformationRules ¶ added in v0.13.0
type CodeTransformationRules struct {
PrType string `mapstructure:"prType" json:"prType"`
PrComponent string `mapstructure:"prComponent" json:"prComponent"`
PrBodyClosePattern string `mapstructure:"prBodyClosePattern" json:"prBodyClosePattern"`
IssueSeverity string `mapstructure:"issueSeverity" json:"issueSeverity"`
IssuePriority string `mapstructure:"issuePriority" json:"issuePriority"`
IssueComponent string `mapstructure:"issueComponent" json:"issueComponent"`
IssueTypeBug string `mapstructure:"issueTypeBug" json:"issueTypeBug"`
IssueTypeIncident string `mapstructure:"issueTypeIncident" json:"issueTypeIncident"`
IssueTypeRequirement string `mapstructure:"issueTypeRequirement" json:"issueTypeRequirement"`
}
type DbtPipelinePlan ¶ added in v0.13.0
type DbtPipelinePlan [][]struct {
Plugin string `json:"plugin"`
Options struct {
ProjectPath string `json:"projectPath"`
ProjectName string `json:"projectName"`
ProjectTarget string `json:"projectTarget"`
SelectedModels []string `json:"selectedModels"`
ProjectVars struct {
Demokey1 string `json:"demokey1"`
Demokey2 string `json:"demokey2"`
} `json:"projectVars"`
} `json:"options"`
}
type FeishuPipelinePlan ¶ added in v0.13.0
type FeishuPipelinePlan [][]struct {
Plugin string `json:"plugin"`
Options struct{} `json:"options"`
}
type GiteePipelinePlan ¶ added in v0.13.0
type GiteePipelinePlan [][]struct {
Plugin string `json:"plugin"`
Subtasks []string `json:"subtasks"`
Options struct {
ConnectionID int `json:"connectionId"`
Owner string `json:"owner"`
Repo string `json:"repo"`
Since string
Transformation CodeTransformationRules `json:"transformation"`
} `json:"options"`
}
type GitextractorPipelinePlan ¶ added in v0.13.0
type GithubPipelinePlan ¶ added in v0.13.0
type GithubPipelinePlan [][]struct {
Plugin string `json:"plugin"`
Subtasks []string `json:"subtasks"`
Options struct {
ConnectionID int `json:"connectionId"`
Owner string `json:"owner"`
Repo string `json:"repo"`
Since string
Transformation CodeTransformationRules `json:"transformation"`
} `json:"options"`
}
type JiraPipelinePlan ¶ added in v0.13.0
type JiraPipelinePlan [][]struct {
Plugin string `json:"plugin"`
Subtasks []string `json:"subtasks"`
Options struct {
BoardID int `json:"boardId"`
ConnectionID int `json:"connectionId"`
TransformationRules TicketTransformationRules `json:"transformationRules"`
} `json:"options"`
}
type TapdPipelinePlan ¶ added in v0.13.0
type TicketTransformationRules ¶ added in v0.13.0
type TicketTransformationRules struct {
EpicKeyField string `json:"epicKeyField"`
StoryPointField string `json:"storyPointField"`
RemotelinkCommitShaPattern string `json:"remotelinkCommitShaPattern"`
TypeMappings map[string]struct {
StandardType string `json:"standardType"`
} `json:"typeMappings"`
}