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 aha.ApiClientAbstract) (*models.SonarqubeApiProject, errors.Error)
- func GetConnection(input *plugin.ApiResourceInput) (*plugin.ApiResourceOutput, errors.Error)
- func GetScope(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, ...) (plugin.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 UpdateScope(input *plugin.ApiResourceInput) (*plugin.ApiResourceOutput, errors.Error)
- type ScopeReq
- type ScopeRes
- type SonarqubeBlueprintSetting
- type SonarqubePipelinePlan
- 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} services.BlueprintProjectPairs "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} api.ScopeRefDoc "References exist to this scope" @Failure 500 {object} shared.ApiBody "Internal Error" @Router /plugins/sonarqube/connections/{connectionId}/scopes/{scopeId} [DELETE]
func GetApiProject ¶
func GetApiProject( projectKey string, apiClient aha.ApiClientAbstract, ) (*models.SonarqubeApiProject, errors.Error)
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} ScopeRes @Failure 400 {object} shared.ApiBody "Bad Request" @Failure 500 {object} shared.ApiBody "Internal Error" @Router /plugins/sonarqube/connections/{connectionId}/scopes/{scopeId} [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 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} []ScopeRes @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 []*plugin.BlueprintScopeV200, syncPolicy *plugin.BlueprintSyncPolicy) (plugin.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)
Proxy proxy api request to upstream sonarqube @Summary proxy api request to upstream sonarqube @Description Proxy HTTP GET request to the sonarqube behind this connection. @Tags plugins/sonarqube @Param connectionId path int false "connection ID" @Param path path string false "API Path" @Success 200 {object} interface{} "Success" @Failure 400 {string} errcode.Error "Bad Request" @Failure 500 {string} errcode.Error "Internal Error" @Router /plugins/sonarqube/connections/{connectionId}/proxy/rest/{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 ScopeReq 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 scope for users @Summary list all available scope for users @Description list all available scope for users @Tags plugins/sonarqube @Accept application/json @Param connectionId path int false "connection ID" @Param pageToken query string false "page Token" @Success 200 {object} api.RemoteScopesOutput @Failure 400 {object} shared.ApiBody "Bad Request" @Failure 500 {object} shared.ApiBody "Internal Error" @Router /plugins/sonarqube/connections/{connectionId}/remote-scopes [GET]
func SearchRemoteScopes ¶
func SearchRemoteScopes(input *plugin.ApiResourceInput) (*plugin.ApiResourceOutput, errors.Error)
SearchRemoteScopes use the Search API and only return project @Summary use the Search API and only return project @Description use the Search API and only return project @Tags plugins/sonarqube @Accept application/json @Param connectionId path int false "connection ID" @Param search query string false "search keyword" @Param page query int false "page number" @Param pageSize query int false "page size per page" @Success 200 {object} api.SearchRemoteScopesOutput @Failure 400 {object} shared.ApiBody "Bad Request" @Failure 500 {object} shared.ApiBody "Internal Error" @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 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 ScopeRes ¶
type ScopeRes struct {
models.SonarqubeProject
}
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 }