 Documentation
      ¶
      Documentation
      ¶
    
    
  
    
  
    Index ¶
- Constants
- func LoadRepoSecrets(cmd *cobra.Command, synapseConfig *SynapseConfig) error
- func ValidateCfg(cfg *SynapseConfig, logger lumber.Logger) error
- type Azure
- type ContainerRegistryConfig
- type GitConfig
- type LambdatestConfig
- type ModeType
- type NucleusConfig
- type PullPolicyType
- type SynapseConfig
Constants ¶
const ( PullAlways PullPolicyType = "always" PullNever PullPolicyType = "never" PrivateMode ModeType = "private" PublicMode ModeType = "public" )
defines constant for docker config
Variables ¶
This section is empty.
Functions ¶
func LoadRepoSecrets ¶
func LoadRepoSecrets(cmd *cobra.Command, synapseConfig *SynapseConfig) error
LoadRepoSecrets loads repo secrets from configuration file
func ValidateCfg ¶
func ValidateCfg(cfg *SynapseConfig, logger lumber.Logger) error
ValidateCfg checks the validity of the config
Types ¶
type Azure ¶
type Azure struct {
	ContainerName      string `env:"CONTAINER_NAME"`
	StorageAccountName string `env:"STORAGE_ACCOUNT"`
	StorageAccessKey   string `env:"STORAGE_ACCESS_KEY"`
}
    Azure providers the storage configuration.
type ContainerRegistryConfig ¶
type ContainerRegistryConfig struct {
	PullPolicy PullPolicyType
	Mode       ModeType
	Username   string
	Password   string
}
    ContainerRegistryConfig contains repo configuration if private repo is used
type LambdatestConfig ¶
type LambdatestConfig struct {
	SecretKey string
}
    LambdatestConfig contains credentials for lambdatest
type NucleusConfig ¶
type NucleusConfig struct {
	Config          string
	Port            string
	PayloadAddress  string `json:"payloadAddress"`
	CollectStats    bool   `json:"collectStats"`
	ConsecutiveRuns int    `json:"consecutiveRuns"`
	LogFile         string
	LogConfig       lumber.LoggingConfig
	CoverageMode    bool   `json:"coverage"`
	DiscoverMode    bool   `json:"discover"`
	ExecuteMode     bool   `json:"execute"`
	FlakyMode       bool   `json:"flaky"`
	TaskID          string `json:"taskID" env:"TASK_ID"`
	BuildID         string `json:"buildID" env:"BUILD_ID"`
	Locators        string `json:"locators"`
	LocatorAddress  string `json:"locatorAddress"`
	Env             string
	Verbose         bool
	Azure           Azure  `env:"AZURE"`
	LocalRunner     bool   `env:"local"`
	SynapseHost     string `env:"synapsehost"`
	SubModule       string `json:"subModule"`
}
    NucleusConfig is the application's configuration
var GlobalNucleusConfig *NucleusConfig
    GlobalNucleusConfig stores the config instance for global use
func LoadNucleusConfig ¶
func LoadNucleusConfig(cmd *cobra.Command) (*NucleusConfig, error)
LoadNucleusConfig loads config from command instance to predefined config variables
type SynapseConfig ¶
type SynapseConfig struct {
	Name              string
	Config            string
	LogFile           string
	LogConfig         lumber.LoggingConfig
	Env               string
	Verbose           bool
	Lambdatest        LambdatestConfig
	Git               GitConfig
	ContainerRegistry ContainerRegistryConfig
	RepoSecrets       map[string]map[string]string
}
    SynapseConfig the application's configuration
var GlobalSynapseConfig *SynapseConfig
    GlobalSynapseConfig store the config instance for synapse global use
func LoadSynapseConfig ¶
func LoadSynapseConfig(cmd *cobra.Command) (*SynapseConfig, error)
LoadSynapseConfig loads config from command instance to predefined config variables