api

package
v0.15.0-rc5 Latest Latest
Warning

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

Go to latest
Published: Jan 31, 2023 License: Apache-2.0, MIT Imports: 21 Imported by: 1

Documentation

Index

Constants

View Source
const (
	TimeOut = 10 * time.Second
)

Variables

This section is empty.

Functions

func CreateTransformationRule added in v0.15.0

func CreateTransformationRule(input *core.ApiResourceInput) (*core.ApiResourceOutput, errors.Error)

CreateTransformationRule create transformation rule for Jenkins @Summary create transformation rule for Jenkins @Description create transformation rule for Jenkins @Tags plugins/jenkins @Accept application/json @Param transformationRule body models.JenkinsTransformationRule true "transformation rule" @Success 200 {object} models.JenkinsTransformationRule @Failure 400 {object} shared.ApiBody "Bad Request" @Failure 500 {object} shared.ApiBody "Internal Error" @Router /plugins/jenkins/transformation_rules [POST]

func DeleteConnection added in v0.12.0

func DeleteConnection(input *core.ApiResourceInput) (*core.ApiResourceOutput, errors.Error)

@Summary delete a jenkins connection @Description Delete a Jenkins connection @Tags plugins/jenkins @Success 200 {object} models.JenkinsConnection @Failure 400 {string} errcode.Error "Bad Request" @Failure 500 {string} errcode.Error "Internel Error" @Router /plugins/jenkins/connections/{connectionId} [DELETE]

func GetAllJobs added in v0.15.0

func GetAllJobs(apiClient helper.ApiClientGetter, path string, beforename string, pageSize int, callback func(job *models.Job, isPath bool) errors.Error) errors.Error

request all jobs

func GetConnection

func GetConnection(input *core.ApiResourceInput) (*core.ApiResourceOutput, errors.Error)

@Summary get jenkins connection detail @Description Get Jenkins connection detail @Tags plugins/jenkins @Success 200 {object} models.JenkinsConnection @Failure 400 {string} errcode.Error "Bad Request" @Failure 500 {string} errcode.Error "Internel Error" @Router /plugins/jenkins/connections/{connectionId} [GET]

func GetJob added in v0.15.0

func GetJob(apiClient helper.ApiClientGetter, path string, name string, fullName string, pageSize int, callback func(job *models.Job, isPath bool) errors.Error) errors.Error

func GetJobs added in v0.15.0

func GetJobs(apiClient helper.ApiClientGetter, path string, pageSize int, callback func(job *models.Job) errors.Error) errors.Error

func GetScope added in v0.15.0

GetScope get one Jenkins job @Summary get one Jenkins job @Description get one Jenkins job @Tags plugins/jenkins @Param connectionId path int false "connection ID" @Param fullName path string false "job's full name" @Success 200 {object} apiJob @Failure 400 {object} shared.ApiBody "Bad Request" @Failure 500 {object} shared.ApiBody "Internal Error" @Router /plugins/jenkins/connections/{connectionId}/scopes/{fullName} [GET]

func GetScopeList added in v0.15.0

func GetScopeList(input *core.ApiResourceInput) (*core.ApiResourceOutput, errors.Error)

GetScopeList get Jenkins jobs @Summary get Jenkins jobs @Description get Jenkins jobs @Tags plugins/jenkins @Param connectionId path int false "connection ID" @Param pageSize query int false "page size, default 50" @Param page query int false "page size, default 1" @Success 200 {object} []apiJob @Failure 400 {object} shared.ApiBody "Bad Request" @Failure 500 {object} shared.ApiBody "Internal Error" @Router /plugins/jenkins/connections/{connectionId}/scopes [GET]

func GetTransformationRule added in v0.15.0

func GetTransformationRule(input *core.ApiResourceInput) (*core.ApiResourceOutput, errors.Error)

GetTransformationRule return one transformation rule @Summary return one transformation rule @Description return one transformation rule @Tags plugins/jenkins @Param id path int true "id" @Success 200 {object} models.JenkinsTransformationRule @Failure 400 {object} shared.ApiBody "Bad Request" @Failure 500 {object} shared.ApiBody "Internal Error" @Router /plugins/jenkins/transformation_rules/{id} [GET]

func GetTransformationRuleList added in v0.15.0

func GetTransformationRuleList(input *core.ApiResourceInput) (*core.ApiResourceOutput, errors.Error)

GetTransformationRuleList return all transformation rules @Summary return all transformation rules @Description return all transformation rules @Tags plugins/jenkins @Param pageSize query int false "page size, default 50" @Param page query int false "page size, default 1" @Success 200 {object} []models.JenkinsTransformationRule @Failure 400 {object} shared.ApiBody "Bad Request" @Failure 500 {object} shared.ApiBody "Internal Error" @Router /plugins/jenkins/transformation_rules [GET]

func Init added in v0.12.0

func Init(br core.BasicRes)

func ListConnections

func ListConnections(input *core.ApiResourceInput) (*core.ApiResourceOutput, errors.Error)

@Summary get all jenkins connections @Description Get all Jenkins connections @Tags plugins/jenkins @Success 200 {object} []models.JenkinsConnection @Failure 400 {string} errcode.Error "Bad Request" @Failure 500 {string} errcode.Error "Internel Error" @Router /plugins/jenkins/connections [GET]

func MakeDataSourcePipelinePlanV200 added in v0.15.0

func MakeDataSourcePipelinePlanV200(subtaskMetas []core.SubTaskMeta, connectionId uint64, bpScopes []*core.BlueprintScopeV200, syncPolicy *core.BlueprintSyncPolicy) (core.PipelinePlan, []core.Scope, errors.Error)

func MakePipelinePlanV100 added in v0.15.0

func MakePipelinePlanV100(subtaskMetas []core.SubTaskMeta, connectionId uint64, scope []*core.BlueprintScopeV100) (core.PipelinePlan, errors.Error)

func PatchConnection

func PatchConnection(input *core.ApiResourceInput) (*core.ApiResourceOutput, errors.Error)

@Summary patch jenkins connection @Description Patch Jenkins connection @Tags plugins/jenkins @Param body body models.JenkinsConnection true "json body" @Success 200 {object} models.JenkinsConnection @Failure 400 {string} errcode.Error "Bad Request" @Failure 500 {string} errcode.Error "Internel Error" @Router /plugins/jenkins/connections/{connectionId} [PATCH]

func PostConnections added in v0.12.0

func PostConnections(input *core.ApiResourceInput) (*core.ApiResourceOutput, errors.Error)

@Summary create jenkins connection @Description Create Jenkins connection @Tags plugins/jenkins @Param body body models.JenkinsConnection true "json body" @Success 200 {object} models.JenkinsConnection @Failure 400 {string} errcode.Error "Bad Request" @Failure 500 {string} errcode.Error "Internel Error" @Router /plugins/jenkins/connections [POST]

func PostJenkinsBluePrint added in v0.13.0

func PostJenkinsBluePrint(input *core.ApiResourceInput) (*core.ApiResourceOutput, errors.Error)

@Summary blueprints setting for jenkins @Description blueprint setting for jenkins @Tags plugins/jenkins @Accept application/json @Param blueprint body JenkinsBlueprintSetting true "json" @Router /blueprints/jenkins/blueprint-setting [post]

func PostJenkinsPipeline added in v0.13.0

func PostJenkinsPipeline(input *core.ApiResourceInput) (*core.ApiResourceOutput, errors.Error)

@Summary pipelines plan for jenkins @Description pipelines plan for jenkins @Tags plugins/jenkins @Accept application/json @Param blueprint body JenkinsPipelinePlan true "json" @Router /pipelines/jenkins/pipeline-plan [post]

func Proxy added in v0.15.0

func PutScope added in v0.15.0

PutScope create or update jenkins job @Summary create or update jenkins job @Description Create or update jenkins job @Tags plugins/jenkins @Accept application/json @Param connectionId path int false "connection ID" @Param scope body req true "json" @Success 200 {object} []models.JenkinsJob @Failure 400 {object} shared.ApiBody "Bad Request" @Failure 500 {object} shared.ApiBody "Internal Error" @Router /plugins/jenkins/connections/{connectionId}/scopes [PUT]

func TestConnection

func TestConnection(input *core.ApiResourceInput) (*core.ApiResourceOutput, errors.Error)

@Summary test jenkins connection @Description Test Jenkins Connection @Tags plugins/jenkins @Param body body models.TestConnectionRequest true "json body" @Success 200 {object} shared.ApiBody "Success" @Failure 400 {string} errcode.Error "Bad Request" @Failure 500 {string} errcode.Error "Internel Error" @Router /plugins/jenkins/test [POST]

func UpdateScope added in v0.15.0

func UpdateScope(input *core.ApiResourceInput) (*core.ApiResourceOutput, errors.Error)

UpdateScope patch to jenkins job @Summary patch to jenkins job @Description patch to jenkins job @Tags plugins/jenkins @Accept application/json @Param connectionId path int false "connection ID" @Param fullName path string false "job's full name" @Param scope body models.JenkinsJob true "json" @Success 200 {object} models.JenkinsJob @Failure 400 {object} shared.ApiBody "Bad Request" @Failure 500 {object} shared.ApiBody "Internal Error" @Router /plugins/jenkins/connections/{connectionId}/scopes/{fullName} [PATCH]

func UpdateTransformationRule added in v0.15.0

func UpdateTransformationRule(input *core.ApiResourceInput) (*core.ApiResourceOutput, errors.Error)

UpdateTransformationRule update transformation rule for Jenkins @Summary update transformation rule for Jenkins @Description update transformation rule for Jenkins @Tags plugins/jenkins @Accept application/json @Param id path int true "id" @Param transformationRule body models.JenkinsTransformationRule true "transformation rule" @Success 200 {object} models.JenkinsTransformationRule @Failure 400 {object} shared.ApiBody "Bad Request" @Failure 500 {object} shared.ApiBody "Internal Error" @Router /plugins/jenkins/transformation_rules/{id} [PATCH]

Types

type JenkinsBlueprintSetting added in v0.13.0

type JenkinsBlueprintSetting []struct {
	Version     string `json:"version"`
	Connections []struct {
		Plugin       string `json:"plugin"`
		ConnectionID int    `json:"connectionId"`
		Scope        []struct {
			Options struct {
			} `json:"options"`
			Entities []string `json:"entities"`
		} `json:"scope"`
	} `json:"connections"`
}

type JenkinsPipelinePlan added in v0.13.0

type JenkinsPipelinePlan [][]struct {
	Plugin   string   `json:"plugin"`
	Subtasks []string `json:"subtasks"`
	Options  struct {
		ConnectionID int `json:"connectionId"`
	} `json:"options"`
}

Jump to

Keyboard shortcuts

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