Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Register ¶
func Register(itype api.IntegrationType, p ITGProvider) error
Register registers integration providers.
func ScanCode ¶
func ScanCode(itype api.IntegrationType, url, token string, config *CodeScanConfig) (string, error)
ScanCode execute code analysis.
func SetCodeScanStatus ¶
func SetCodeScanStatus(itype api.IntegrationType, url, token string, projectID string, s *api.CodeScanStageStatus) error
SetCodeScanStatus set status for CodeScanStageStatus, and the CodeScanStageStatus 's' must not be nil.
Types ¶
type CodeScanConfig ¶
type CodeScanConfig struct { SourcePath string `bson:"sourcePath,omitempty" json:"sourcePath,omitempty"` EncodingStyle string `bson:"encodingStyle,omitempty" json:"encodingStyle,omitempty"` Language string `bson:"language,omitempty" json:"language,omitempty"` Threshold string `bson:"threshold,omitempty" json:"threshold,omitempty"` ExtensionAgrs []string `bson:"extensionArgs,omitempty" json:"extensionArgs,omitempty"` ProjectName string `bson:"projectName,omitempty" json:"projectName,omitempty"` ProjectKey string `bson:"projectKey,omitempty" json:"projectKey,omitempty"` }
ScanSonarQubeConfig represents config of sonarqube-type code scan.
type ITGProvider ¶
type ITGProvider interface { // CodeScan execute code analysis. CodeScan(url, token string, config *CodeScanConfig) (string, error) // SetCodeScanStatus sets status for CodeScanStageStatus. SetCodeScanStatus(url, token string, pid string, s *api.CodeScanStageStatus) error }
ITGProvider is an interface for ingetration.
func GetProvider ¶
func GetProvider(itype api.IntegrationType) (ITGProvider, error)
GetProvider gets the integration provider by the type.
Click to show internal directories.
Click to hide internal directories.