Documentation
¶
Index ¶
Constants ¶
View Source
const GITHUB = "GITHUB"
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Config ¶
type Config struct {
GitHub GitHub `yaml:"gitHub"`
}
Config for different types of code hosts.
type ExternalService ¶
type ExternalService struct {
// Type of code host, e.g. GITHUB.
Kind string `yaml:"kind"`
// Display name of external service, e.g. sourcegraph-test.
DisplayName string `yaml:"displayName"`
// Configuration for code host.
Config Config `yaml:"config"`
// Maximum retry attempts when cloning test repositories. Defaults to 5 retries.
MaxRetries int `yaml:"maxRetries"`
// Retry timeout in seconds. Defaults to 5 seconds
RetryTimeoutSeconds int `yaml:"retryTimeoutSeconds"`
// Delete code host when test is done. Defaults to true.
DeleteWhenDone bool `yaml:"deleteWhenDone"`
}
type GitHub ¶
type GitHub struct {
// URL used to access your GitHub instance, e.g. https://github.com.
URL string `yaml:"url" json:"url"`
// Auth token used to authenticate to GitHub instance. This should be provided via env var SRC_GITHUB_TOKEN.
Token string `yaml:"token" json:"token"`
// List of organizations.
Orgs []string `yaml:"orgs" json:"orgs"`
// List of repositories to pull.
Repos []string `yaml:"repos" json:"repos"`
}
GitHub configuration parameters.
type ValidationSpec ¶
type ValidationSpec struct {
// Search queries used for validation testing, e.g. "repo:^github\\.com/gorilla/mux$ Router".
SearchQuery []string `yaml:"searchQuery"`
// External Service configuration.
ExternalService ExternalService `yaml:"externalService"`
// Insight used for validation testing.
Insight Insight `yaml:"insight"`
// Executor check configuration
Executor Executor `yaml:"executor"`
//Test SMTP configuration
Smtp Smtp `yaml:"smtp"`
}
func DefaultConfig ¶
func DefaultConfig() *ValidationSpec
DefaultConfig returns a default configuration to be used for testing.
func LoadJsonConfig ¶
func LoadJsonConfig(userConfig []byte) (*ValidationSpec, error)
LoadJsonConfig will unmarshal a JSON configuration file into a ValidationSpec.
func LoadYamlConfig ¶
func LoadYamlConfig(userConfig []byte) (*ValidationSpec, error)
LoadYamlConfig will unmarshal a YAML configuration file into a ValidationSpec.
Click to show internal directories.
Click to hide internal directories.