integrate

package
v0.8.0-alpha Latest Latest
Warning

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

Go to latest
Published: Nov 29, 2018 License: Apache-2.0 Imports: 2 Imported by: 0

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.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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