Documentation ¶
Index ¶
- Constants
- func DeleteConnection(input *core.ApiResourceInput) (*core.ApiResourceOutput, error)
- func GetConnection(input *core.ApiResourceInput) (*core.ApiResourceOutput, error)
- func Init(config *viper.Viper, logger core.Logger, database *gorm.DB)
- func ListConnections(input *core.ApiResourceInput) (*core.ApiResourceOutput, error)
- func MakePipelinePlan(subtaskMetas []core.SubTaskMeta, connectionId uint64, ...) (core.PipelinePlan, error)
- func PatchConnection(input *core.ApiResourceInput) (*core.ApiResourceOutput, error)
- func PostConnections(input *core.ApiResourceInput) (*core.ApiResourceOutput, error)
- func PostGitlabPipeline(input *core.ApiResourceInput) (*core.ApiResourceOutput, error)
- func Proxy(input *core.ApiResourceInput) (*core.ApiResourceOutput, error)
- func TestConnection(input *core.ApiResourceInput) (*core.ApiResourceOutput, error)
- type CodeTransformationRules
- type GitlabBlueprintSetting
- type GitlabPipelinePlan
Constants ¶
const (
TimeOut = 10 * time.Second
)
Variables ¶
This section is empty.
Functions ¶
func DeleteConnection ¶ added in v0.12.0
func DeleteConnection(input *core.ApiResourceInput) (*core.ApiResourceOutput, error)
@Summary delete a gitlab connection @Description Delete a gitlab connection @Tags plugins/gitlab @Success 200 {object} models.GitlabConnection @Failure 400 {string} errcode.Error "Bad Request" @Failure 500 {string} errcode.Error "Internel Error" @Router /plugins/gitlab/connections/{connectionId} [DELETE]
func GetConnection ¶
func GetConnection(input *core.ApiResourceInput) (*core.ApiResourceOutput, error)
@Summary get gitlab connection detail @Description Get gitlab connection detail @Tags plugins/gitlab @Success 200 {object} models.GitlabConnection @Failure 400 {string} errcode.Error "Bad Request" @Failure 500 {string} errcode.Error "Internel Error" @Router /plugins/gitlab/connections/{connectionId} [GET]
func ListConnections ¶
func ListConnections(input *core.ApiResourceInput) (*core.ApiResourceOutput, error)
@Summary get all gitlab connections @Description Get all gitlab connections @Tags plugins/gitlab @Success 200 {object} []models.GitlabConnection @Failure 400 {string} errcode.Error "Bad Request" @Failure 500 {string} errcode.Error "Internel Error" @Router /plugins/gitlab/connections [GET]
func MakePipelinePlan ¶ added in v0.12.0
func MakePipelinePlan(subtaskMetas []core.SubTaskMeta, connectionId uint64, scope []*core.BlueprintScopeV100) (core.PipelinePlan, error)
func PatchConnection ¶
func PatchConnection(input *core.ApiResourceInput) (*core.ApiResourceOutput, error)
@Summary patch gitlab connection @Description Patch gitlab connection @Tags plugins/gitlab @Param body body models.GitlabConnection true "json body" @Success 200 {object} models.GitlabConnection @Failure 400 {string} errcode.Error "Bad Request" @Failure 500 {string} errcode.Error "Internel Error" @Router /plugins/gitlab/connections/{connectionId} [PATCH]
func PostConnections ¶ added in v0.12.0
func PostConnections(input *core.ApiResourceInput) (*core.ApiResourceOutput, error)
@Summary create gitlab connection @Description Create gitlab connection @Tags plugins/gitlab @Param body body models.GitlabConnection true "json body" @Success 200 {object} models.GitlabConnection @Failure 400 {string} errcode.Error "Bad Request" @Failure 500 {string} errcode.Error "Internel Error" @Router /plugins/gitlab/connections [POST]
func PostGitlabPipeline ¶ added in v0.13.0
func PostGitlabPipeline(input *core.ApiResourceInput) (*core.ApiResourceOutput, error)
@Summary pipelines plan for gitlab @Description pipelines plan for gitlab @Tags plugins/gitlab @Accept application/json @Param blueprint body GitlabPipelinePlan true "json" @Router /pipelines/gitlab/pipeline-plan [post]
func Proxy ¶ added in v0.13.0
func Proxy(input *core.ApiResourceInput) (*core.ApiResourceOutput, error)
func TestConnection ¶
func TestConnection(input *core.ApiResourceInput) (*core.ApiResourceOutput, error)
@Summary test gitlab connection @Description Test gitlab Connection @Tags plugins/gitlab @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/gitlab/test [POST]
Types ¶
type CodeTransformationRules ¶ added in v0.14.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 GitlabBlueprintSetting ¶ added in v0.14.0
type GitlabBlueprintSetting []struct { Version string `json:"version"` Connections []struct { Plugin string `json:"plugin"` ConnectionID int `json:"connectionId"` Scope []struct { Transformation CodeTransformationRules `json:"transformation"` Options struct { ProjectId int `json:"projectId"` Since string } `json:"options"` Entities []string `json:"entities"` } `json:"scope"` } `json:"connections"` }