Documentation ¶
Index ¶
- Constants
- func GetSonarAddressWithProjectKey(baseAddr, projectKey string) (string, error)
- func GetSonarCETaskID(content string) string
- func GetSonarProjectKeyFromConfig(config string) string
- func GetSonarWorkDir(content string) string
- func PrintSonarConditionTables(conditions []Condition)
- type CETask
- type CETaskInfo
- type CETaskStatus
- type Client
- type Condition
- type ProjectInfo
- type ProjectStatus
- type QualityGateStatus
Constants ¶
View Source
const ( SonarWorkDirKey = "sonar.working.directory" CETaskIDKey = "ceTaskId" )
Variables ¶
This section is empty.
Functions ¶
func GetSonarAddressWithProjectKey ¶
GetSonarAddressWithProjectKey return the corresponding project address according to projectKey If the projectKey is empty or an error occurs, the original baseAddr is returned
func GetSonarCETaskID ¶
func GetSonarWorkDir ¶
func PrintSonarConditionTables ¶
func PrintSonarConditionTables(conditions []Condition)
Types ¶
type CETask ¶
type CETask struct { ID string `json:"id"` Type string `json:"type"` ComponentID string `json:"componentId"` ComponentKey string `json:"componentKey"` AnalysisID string `json:"analysisId"` Status CETaskStatus `json:"status"` SubmitterLogin string `json:"submitterLogin"` WarningCount int `json:"warningCount"` }
type CETaskInfo ¶
type CETaskInfo struct {
Task CETask `json:"task"`
}
type CETaskStatus ¶
type CETaskStatus string
const ( CETaskPending CETaskStatus = "PENDING" CETaskInProgress CETaskStatus = "IN_PROGRESS" CETaskSuccess CETaskStatus = "SUCCESS" CETaskFailed CETaskStatus = "FAILED" CETaskCanceled CETaskStatus = "CANCELED" )
type Client ¶
type Client struct { *httpclient.Client // contains filtered or unexported fields }
func NewSonarClient ¶
func (*Client) GetCETaskInfo ¶
func (c *Client) GetCETaskInfo(taskID string) (*CETaskInfo, error)
func (*Client) GetQualityGateInfo ¶
func (c *Client) GetQualityGateInfo(analysisID string) (*ProjectInfo, error)
type ProjectInfo ¶
type ProjectInfo struct {
ProjectStatus ProjectStatus
}
type ProjectStatus ¶
type ProjectStatus struct { Status QualityGateStatus `json:"status"` Conditions []Condition `json:"conditions"` }
type QualityGateStatus ¶
type QualityGateStatus string
const ( QualityGateError QualityGateStatus = "ERROR" QualityGateOK QualityGateStatus = "OK" QualityGateWarn QualityGateStatus = "WARN" QualityGateNone QualityGateStatus = "None" )
Click to show internal directories.
Click to hide internal directories.