Documentation ¶
Index ¶
- func DeleteConnection(input *plugin.ApiResourceInput) (*plugin.ApiResourceOutput, errors.Error)
- func DeleteScope(input *plugin.ApiResourceInput) (*plugin.ApiResourceOutput, errors.Error)
- func GetApiProject(projectKey string, apiClient plugin.ApiClient) (*models.SonarqubeApiProject, errors.Error)
- func GetConnection(input *plugin.ApiResourceInput) (*plugin.ApiResourceOutput, errors.Error)
- func GetScope(input *plugin.ApiResourceInput) (*plugin.ApiResourceOutput, errors.Error)
- func GetScopeLatestSyncState(input *plugin.ApiResourceInput) (*plugin.ApiResourceOutput, errors.Error)
- func GetScopeList(input *plugin.ApiResourceInput) (*plugin.ApiResourceOutput, errors.Error)
- func Init(br context.BasicRes, p plugin.PluginMeta)
- func ListConnections(input *plugin.ApiResourceInput) (*plugin.ApiResourceOutput, errors.Error)
- func MakeDataSourcePipelinePlanV200(subtaskMetas []plugin.SubTaskMeta, connectionId uint64, ...) (coreModels.PipelinePlan, []plugin.Scope, errors.Error)
- func PatchConnection(input *plugin.ApiResourceInput) (*plugin.ApiResourceOutput, errors.Error)
- func PostConnections(input *plugin.ApiResourceInput) (*plugin.ApiResourceOutput, errors.Error)
- func Proxy(input *plugin.ApiResourceInput) (*plugin.ApiResourceOutput, errors.Error)
- func PutScope(input *plugin.ApiResourceInput) (*plugin.ApiResourceOutput, errors.Error)
- func RemoteScopes(input *plugin.ApiResourceInput) (*plugin.ApiResourceOutput, errors.Error)
- func SearchRemoteScopes(input *plugin.ApiResourceInput) (*plugin.ApiResourceOutput, errors.Error)
- func TestConnection(input *plugin.ApiResourceInput) (*plugin.ApiResourceOutput, errors.Error)
- func TestExistingConnection(input *plugin.ApiResourceInput) (*plugin.ApiResourceOutput, errors.Error)
- func UpdateScope(input *plugin.ApiResourceInput) (*plugin.ApiResourceOutput, errors.Error)
- type PutScopesReqBody
- type ScopeDetail
- type SonarqubeBlueprintSetting
- type SonarqubePipelinePlan
- type SonarqubeRemotePagination
- type SonarqubeTestConnResponse
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DeleteConnection ¶
func DeleteConnection(input *plugin.ApiResourceInput) (*plugin.ApiResourceOutput, errors.Error)
DeleteConnection delete a sonarqube connection @Summary delete a sonarqube connection @Description Delete a sonarqube connection @Tags plugins/sonarqube @Param connectionId path int false "connection ID" @Success 200 {object} models.SonarqubeConnection @Failure 400 {string} errcode.Error "Bad Request" @Failure 409 {object} srvhelper.DsRefs "References exist to this connection" @Failure 500 {string} errcode.Error "Internal Error" @Router /plugins/sonarqube/connections/{connectionId} [DELETE]
func DeleteScope ¶
func DeleteScope(input *plugin.ApiResourceInput) (*plugin.ApiResourceOutput, errors.Error)
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/sonarqube @Param connectionId path int true "connection ID" @Param scopeId path int 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} srvhelper.DsRefs "References exist to this scope" @Failure 500 {object} shared.ApiBody "Internal Error" @Router /plugins/sonarqube/connections/{connectionId}/scopes/{scopeId} [DELETE]
func GetApiProject ¶
func GetConnection ¶
func GetConnection(input *plugin.ApiResourceInput) (*plugin.ApiResourceOutput, errors.Error)
GetConnection get sonarqube connection detail @Summary get sonarqube connection detail @Description Get sonarqube connection detail @Tags plugins/sonarqube @Param connectionId path int false "connection ID" @Success 200 {object} models.SonarqubeConnection @Failure 400 {string} errcode.Error "Bad Request" @Failure 500 {string} errcode.Error "Internal Error" @Router /plugins/sonarqube/connections/{connectionId} [GET]
func GetScope ¶
func GetScope(input *plugin.ApiResourceInput) (*plugin.ApiResourceOutput, errors.Error)
GetScope get one Sonarqube project @Summary get one Sonarqube project @Description get one Sonarqube project @Tags plugins/sonarqube @Param connectionId path int false "connection ID" @Param scopeId path string false "project key" @Success 200 {object} ScopeDetail @Failure 400 {object} shared.ApiBody "Bad Request" @Failure 500 {object} shared.ApiBody "Internal Error" @Router /plugins/sonarqube/connections/{connectionId}/scopes/{scopeId} [GET]
func GetScopeLatestSyncState ¶
func GetScopeLatestSyncState(input *plugin.ApiResourceInput) (*plugin.ApiResourceOutput, errors.Error)
GetScopeLatestSyncState get one sonarqube project's latest sync state @Summary get one sonarqube project's latest sync state @Description get one sonarqube project's latest sync state @Tags plugins/sonarqube @Param connectionId path int true "connection ID" @Param scopeId path int true "scope ID" @Success 200 {object} []models.LatestSyncState @Failure 400 {object} shared.ApiBody "Bad Request" @Failure 500 {object} shared.ApiBody "Internal Error" @Router /plugins/sonarqube/connections/{connectionId}/scopes/{scopeId}/latest-sync-state [GET]
func GetScopeList ¶
func GetScopeList(input *plugin.ApiResourceInput) (*plugin.ApiResourceOutput, errors.Error)
GetScopeList get Sonarqube projects @Summary get Sonarqube projects @Description get Sonarqube projects @Tags plugins/sonarqube @Param connectionId path int false "connection ID" @Param searchTerm query string false "search term for scope name" @Param pageSize query int false "page size, default 50" @Param page query int false "page size, default 1" @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/sonarqube/connections/{connectionId}/scopes [GET]
func ListConnections ¶
func ListConnections(input *plugin.ApiResourceInput) (*plugin.ApiResourceOutput, errors.Error)
ListConnections get all sonarqube connections @Summary get all sonarqube connections @Description Get all sonarqube connections @Tags plugins/sonarqube @Success 200 {object} []models.SonarqubeConnection @Failure 400 {string} errcode.Error "Bad Request" @Failure 500 {string} errcode.Error "Internal Error" @Router /plugins/sonarqube/connections [GET]
func MakeDataSourcePipelinePlanV200 ¶
func MakeDataSourcePipelinePlanV200( 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)
PatchConnection patch sonarqube connection @Summary patch sonarqube connection @Description Patch sonarqube connection @Tags plugins/sonarqube @Param body body models.SonarqubeConnection true "json body" @Param connectionId path int false "connection ID" @Success 200 {object} models.SonarqubeConnection @Failure 400 {string} errcode.Error "Bad Request" @Failure 500 {string} errcode.Error "Internal Error" @Router /plugins/sonarqube/connections/{connectionId} [PATCH]
func PostConnections ¶
func PostConnections(input *plugin.ApiResourceInput) (*plugin.ApiResourceOutput, errors.Error)
PostConnections create sonarqube connection @Summary create sonarqube connection @Description Create sonarqube connection @Tags plugins/sonarqube @Param body body models.SonarqubeConnection true "json body" @Success 200 {object} models.SonarqubeConnection @Failure 400 {string} errcode.Error "Bad Request" @Failure 500 {string} errcode.Error "Internal Error" @Router /plugins/sonarqube/connections [POST]
func Proxy ¶
func Proxy(input *plugin.ApiResourceInput) (*plugin.ApiResourceOutput, errors.Error)
@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/sonarqube @Router /plugins/sonarqube/connections/{connectionId}/proxy/{path} [GET]
func PutScope ¶
func PutScope(input *plugin.ApiResourceInput) (*plugin.ApiResourceOutput, errors.Error)
PutScope create or update sonarqube project @Summary create or update sonarqube project @Description Create or update sonarqube project @Tags plugins/sonarqube @Accept application/json @Param connectionId path int false "connection ID" @Param scope body PutScopesReqBody true "json" @Success 200 {object} []models.SonarqubeProject @Failure 400 {object} shared.ApiBody "Bad Request" @Failure 500 {object} shared.ApiBody "Internal Error" @Router /plugins/sonarqube/connections/{connectionId}/scopes [PUT]
func RemoteScopes ¶
func RemoteScopes(input *plugin.ApiResourceInput) (*plugin.ApiResourceOutput, errors.Error)
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.SonarqubeProject] @Tags plugins/sonarqube @Router /plugins/sonarqube/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.SonarqubeProject] "the parentIds are always null" @Tags plugins/sonarqube @Router /plugins/sonarqube/connections/{connectionId}/search-remote-scopes [GET]
func TestConnection ¶
func TestConnection(input *plugin.ApiResourceInput) (*plugin.ApiResourceOutput, errors.Error)
TestConnection test sonarqube connection options @Summary test sonarqube connection @Description Test sonarqube Connection @Tags plugins/sonarqube @Param body body models.SonarqubeConn true "json body" @Success 200 {object} SonarqubeTestConnResponse "Success" @Failure 400 {string} errcode.Error "Bad Request" @Failure 500 {string} errcode.Error "Internal Error" @Router /plugins/sonarqube/test [POST]
func TestExistingConnection ¶
func TestExistingConnection(input *plugin.ApiResourceInput) (*plugin.ApiResourceOutput, errors.Error)
TestExistingConnection test sonarqube connection options @Summary test sonarqube connection @Description Test sonarqube Connection @Tags plugins/sonarqube @Param connectionId path int true "connection ID" @Success 200 {object} SonarqubeTestConnResponse "Success" @Failure 400 {string} errcode.Error "Bad Request" @Failure 500 {string} errcode.Error "Internal Error" @Router /plugins/sonarqube/connections/{connectionId}/test [POST]
func UpdateScope ¶
func UpdateScope(input *plugin.ApiResourceInput) (*plugin.ApiResourceOutput, errors.Error)
UpdateScope patch to sonarqube project @Summary patch to sonarqube project @Description patch to sonarqube project @Tags plugins/sonarqube @Accept application/json @Param connectionId path int false "connection ID" @Param scopeId path string false "project Key" @Param scope body models.SonarqubeProject true "json" @Success 200 {object} models.SonarqubeProject @Failure 400 {object} shared.ApiBody "Bad Request" @Failure 500 {object} shared.ApiBody "Internal Error" @Router /plugins/sonarqube/connections/{connectionId}/scopes/{scopeId} [PATCH]
Types ¶
type PutScopesReqBody ¶
type PutScopesReqBody api.PutScopesReqBody[models.SonarqubeProject]
type ScopeDetail ¶
type ScopeDetail api.ScopeDetail[models.SonarqubeProject, srvhelper.NoScopeConfig]
type SonarqubeBlueprintSetting ¶
type SonarqubeBlueprintSetting []struct { Version string `json:"version"` Connections []struct { Plugin string `json:"plugin"` ConnectionID int `json:"connectionId"` Scope []struct { Options struct { ProjectKey string `json:"projectKey"` } `json:"options"` Entities []string `json:"entities"` } `json:"scopes"` } `json:"connections"` }
type SonarqubePipelinePlan ¶
type SonarqubeTestConnResponse ¶
type SonarqubeTestConnResponse struct { shared.ApiBody Connection *models.SonarqubeConn }