api

package
v0.0.0-...-7d3b672 Latest Latest
Warning

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

Go to latest
Published: Jul 13, 2023 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DeleteConnection

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

@Summary delete a gitee connection @Description Delete a gitee connection @Tags plugins/gitee @Success 200 {object} models.GiteeConnection @Failure 400 {string} errcode.Error "Bad Request" @Failure 409 {object} services.BlueprintProjectPairs "References exist to this connection" @Failure 500 {string} errcode.Error "Internal Error" @Router /plugins/gitee/connections/{connectionId} [DELETE]

func GetConnection

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

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

func Init

func Init(br context.BasicRes, p plugin.PluginMeta)

func ListConnections

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

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

func PatchConnection

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

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

func PostConnections

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

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

func TestConnection

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

@Summary test gitee connection @Description Test gitee Connection. endpoint: https://gitee.com/api/v5/ @Tags plugins/gitee @Param body body models.GiteeConn true "json body" @Success 200 {object} GiteeTestConnResponse "Success" @Failure 400 {string} errcode.Error "Bad Request" @Failure 500 {string} errcode.Error "Internal Error" @Router /plugins/gitee/test [POST]

Types

type GiteePipelinePlan

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
		ScopeConfig  GiteeScopeConfig `json:"scopeConfig"`
	} `json:"options"`
}

type GiteeScopeConfig

type GiteeScopeConfig 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 GiteeTestConnResponse

type GiteeTestConnResponse struct {
	shared.ApiBody
	Connection *models.GiteeConn
}

Jump to

Keyboard shortcuts

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