api

package
v0.0.0-...-1fa52ee Latest Latest
Warning

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

Go to latest
Published: Apr 3, 2024 License: Apache-2.0, BSD-2-Clause, ISC, + 1 more Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateScopeConfig

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

CreateScopeConfig create scope config for Bamboo @Summary create scope config for Bamboo @Description create scope config for Bamboo @Tags plugins/bamboo @Accept application/json @Param connectionId path int true "connectionId" @Param scopeConfig body models.BambooScopeConfig true "scope config" @Success 200 {object} models.BambooScopeConfig @Failure 400 {object} shared.ApiBody "Bad Request" @Failure 500 {object} shared.ApiBody "Internal Error" @Router /plugins/bamboo/connections/{connectionId}/scope-configs [POST]

func DeleteConnection

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

@Summary delete a bamboo connection @Description Delete a bamboo connection @Tags plugins/bamboo @Param connectionId path int true "connection ID" @Success 200 {object} models.BambooConnection @Failure 400 {string} errcode.Error "Bad Request" @Failure 409 {object} services.BlueprintProjectPairs "References exist to this connection" @Failure 500 {string} errcode.Error "Internel Error" @Router /plugins/bamboo/connections/{connectionId} [DELETE]

func DeleteScope

DeleteScope delete plugin data associated with the scope and optionally the scope itself @Summary delete plugin data associated with the scope and optionally the scope itself @Description delete data associated with plugin scope @Tags plugins/bamboo @Param connectionId path int true "connection ID" @Param scopeId path string true "scope ID" @Param delete_data_only query bool false "Only delete the scope data, not the scope itself" @Success 200 @Failure 400 {object} shared.ApiBody "Bad Request" @Failure 409 {object} api.ScopeRefDoc "References exist to this scope" @Failure 500 {object} shared.ApiBody "Internal Error" @Router /plugins/bamboo/connections/{connectionId}/scopes/{scopeId} [DELETE]

func DeleteScopeConfig

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

DeleteScopeConfig delete a scope config @Summary delete a scope config @Description delete a scope config @Tags plugins/bamboo @Param id path int true "id" @Param connectionId path int true "connectionId" @Success 200 @Failure 400 {object} shared.ApiBody "Bad Request" @Failure 500 {object} shared.ApiBody "Internal Error" @Router /plugins/bamboo/connections/{connectionId}/scope-configs/{id} [DELETE]

func GetConnection

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

@Summary get bamboo connection detail @Description Get bamboo connection detail @Tags plugins/bamboo @Param connectionId path int true "connection ID" @Success 200 {object} models.BambooConnection @Failure 400 {string} errcode.Error "Bad Request" @Failure 500 {string} errcode.Error "Internel Error" @Router /plugins/bamboo/connections/{connectionId} [GET]

func GetScope

GetScope get one Bamboo plan @Summary get one Bamboo plan @Description get one Bamboo plan @Tags plugins/bamboo @Param connectionId path int true "connection ID" @Param scopeId path int true "plan key" @Param pageSize query int false "page size, default 50" @Param page query int false "page size, default 1" @Success 200 {object} ScopeDetail @Failure 400 {object} shared.ApiBody "Bad Request" @Failure 500 {object} shared.ApiBody "Internal Error" @Router /plugins/bamboo/connections/{connectionId}/scopes/{scopeId} [GET]

func GetScopeConfig

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

GetScopeConfig return onescope config @Summary return onescope config @Description return onescope config @Tags plugins/bamboo @Param id path int true "id" @Param connectionId path int true "connectionId" @Success 200 {object} models.BambooScopeConfig @Failure 400 {object} shared.ApiBody "Bad Request" @Failure 500 {object} shared.ApiBody "Internal Error" @Router /plugins/bamboo/connections/{connectionId}/scope-configs/{id} [GET]

func GetScopeConfigList

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

GetScopeConfigList return all scope configs @Summary return all scope configs @Description return all scope configs @Tags plugins/bamboo @Param pageSize query int false "page size, default 50" @Param page query int false "page size, default 1" @Param connectionId path int true "connectionId" @Success 200 {object} []models.BambooScopeConfig @Failure 400 {object} shared.ApiBody "Bad Request" @Failure 500 {object} shared.ApiBody "Internal Error" @Router /plugins/bamboo/connections/{connectionId}/scope-configs [GET]

func GetScopeLatestSyncState

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

GetScopeLatestSyncState get one Bamboo plan's latest sync state @Summary get one Bamboo plan's latest sync state @Description get one Bamboo plan's latest sync state @Tags plugins/bamboo @Param connectionId path int true "connection ID" @Param scopeId path string true "scope ID" @Success 200 {object} []models.LatestSyncState @Failure 400 {object} shared.ApiBody "Bad Request" @Failure 500 {object} shared.ApiBody "Internal Error" @Router /plugins/bamboo/connections/{connectionId}/scopes/{scopeId}/latest-sync-state [GET]

func GetScopeList

GetScopes get Bamboo plans @Summary get Bamboo plans @Description get Bamboo plans @Tags plugins/bamboo @Param connectionId path int true "connection ID" @Param searchTerm query string false "search term for scope name" @Param blueprints query bool false "also return blueprints using these scopes as part of the payload" @Success 200 {object} []ScopeDetail @Failure 400 {object} shared.ApiBody "Bad Request" @Failure 500 {object} shared.ApiBody "Internal Error" @Router /plugins/bamboo/connections/{connectionId}/scopes/ [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 bamboo connections @Description Get all bamboo connections @Tags plugins/bamboo @Success 200 {object} []models.BambooConnection @Failure 400 {string} errcode.Error "Bad Request" @Failure 500 {string} errcode.Error "Internel Error" @Router /plugins/bamboo/connections [GET]

func MakePipelinePlanV200

func MakePipelinePlanV200(
	subtaskMetas []plugin.SubTaskMeta,
	connectionId uint64,
	bpScopes []*coreModels.BlueprintScope,
) (coreModels.PipelinePlan, []plugin.Scope, errors.Error)

func PatchConnection

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

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

func PatchScope

PatchScope patch to bamboo plan @Summary patch to bamboo plan @Description patch to bamboo plan @Tags plugins/bamboo @Accept application/json @Param connectionId path int true "connection ID" @Param scopeId path int true "plan key" @Param scope body models.BambooPlan true "json" @Success 200 {object} models.BambooPlan @Failure 400 {object} shared.ApiBody "Bad Request" @Failure 500 {object} shared.ApiBody "Internal Error" @Router /plugins/bamboo/connections/{connectionId}/scopes/{scopeId} [PATCH]

func PatchScopeConfig

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

PatchScopeConfig update scope config for Bamboo @Summary update scope config for Bamboo @Description update scope config for Bamboo @Tags plugins/bamboo @Accept application/json @Param id path int true "id" @Param scopeConfig body models.BambooScopeConfig true "scope config" @Param connectionId path int true "connectionId" @Success 200 {object} models.BambooScopeConfig @Failure 400 {object} shared.ApiBody "Bad Request" @Failure 500 {object} shared.ApiBody "Internal Error" @Router /plugins/bamboo/connections/{connectionId}/scope-configs/{id} [PATCH]

func PostConnections

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

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

func Proxy

@Summary Remote server API proxy @Description Forward API requests to the specified remote server @Param connectionId path int true "connection ID" @Param path path string true "path to a API endpoint" @Tags plugins/bamboo @Router /plugins/bamboo/connections/{connectionId}/proxy/{path} [GET]

func PutScopes

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

func RemoteScopes

RemoteScopes list all available scopes on the remote server @Summary list all available scopes on the remote server @Description list all available scopes on the remote server @Accept application/json @Param connectionId path int false "connection ID" @Param groupId query string false "group ID" @Param pageToken query string false "page Token" @Failure 400 {object} shared.ApiBody "Bad Request" @Failure 500 {object} shared.ApiBody "Internal Error" @Success 200 {object} dsmodels.DsRemoteApiScopeList[models.GithubRepo] @Tags plugins/bamboo @Router /plugins/bamboo/connections/{connectionId}/remote-scopes [GET]

func SearchRemoteScopes

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

SearchRemoteScopes searches scopes on the remote server @Summary searches scopes on the remote server @Description searches scopes on the remote server @Accept application/json @Param connectionId path int false "connection ID" @Param search query string false "search" @Param page query int false "page number" @Param pageSize query int false "page size per page" @Failure 400 {object} shared.ApiBody "Bad Request" @Failure 500 {object} shared.ApiBody "Internal Error" @Success 200 {object} dsmodels.DsRemoteApiScopeList[models.GithubRepo] "the parentIds are always null" @Tags plugins/bamboo @Router /plugins/bamboo/connections/{connectionId}/search-remote-scopes [GET]

func TestConnection

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

TestConnection test bamboo connection @Summary test bamboo connection @Description Test bamboo Connection @Tags plugins/bamboo @Param body body models.BambooConn true "json body" @Success 200 {object} BambooTestConnResponse "Success" @Failure 400 {string} errcode.Error "Bad Request" @Failure 500 {string} errcode.Error "Internal Error" @Router /plugins/bamboo/test [POST]

func TestExistingConnection

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

TestExistingConnection test bamboo connection @Summary test bamboo connection @Description Test bamboo Connection @Tags plugins/bamboo @Param connectionId path int true "connection ID" @Success 200 {object} BambooTestConnResponse "Success" @Failure 400 {string} errcode.Error "Bad Request" @Failure 500 {string} errcode.Error "Internal Error" @Router /plugins/bamboo/connections/{connectionId}/test [POST]

Types

type BambooRemotePagination

type BambooRemotePagination struct {
	MaxResult  int `json:"max-result" validate:"required"`
	StartIndex int `json:"start-index" validate:"required"`
}

type BambooTestConnResponse

type BambooTestConnResponse struct {
	shared.ApiBody
	Connection *models.BambooConn
}

Jump to

Keyboard shortcuts

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