config

package
v0.10.4 Latest Latest
Warning

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

Go to latest
Published: Aug 5, 2022 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
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 GitConfig

type GitConfig struct {
	Token     string
	TokenType string
}

GitConfig contains git token

type LambdatestConfig

type LambdatestConfig struct {
	SecretKey string
}

LambdatestConfig contains credentials for lambdatest

type ModeType

type ModeType string

ModeType define type of container repo

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 PullPolicyType

type PullPolicyType string

PullPolicyType defines when to pull docker image

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

Jump to

Keyboard shortcuts

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