Documentation ¶
Overview ¶
Package config is config.
Index ¶
- Variables
- func CheckMongodbURI(uri string) (connstring.ConnString, error)
- func CompileTemplate(s string, vars *Vars) ([]byte, error)
- func CopyValue(i interface{}) interface{}
- func IsTemplateCondition(s string) bool
- func LoadDesignContextValue(ctx context.Context, l *Design) error
- func LoadFlagsContextValue(ctx context.Context, l *map[string]interface{}) error
- func LoadLogContextValue(ctx context.Context, l **logging.Logging) error
- func LoadLogDirContextValue(ctx context.Context, l *string) error
- func LoadTestNameContextValue(ctx context.Context, l *string) error
- func LoadVarsContextValue(ctx context.Context, l **Vars) error
- func MergeItem(a, b interface{}) (map[string]interface{}, error)
- func NormalizeVarsKey(s string) string
- func ParseConditionQuery(s string) (bson.M, error)
- func SanitizeVarsMap(m interface{}) interface{}
- func ULID() ulid.ULID
- type Design
- type DesignAction
- type DesignActionYAML
- type DesignCondition
- type DesignConditionYAML
- type DesignHost
- type DesignHostSSH
- type DesignHostSSHYAML
- type DesignHostYAML
- type DesignRegister
- type DesignRegisterType
- type DesignRegisterYAML
- type DesignSequence
- type DesignSequenceYAML
- type DesignYAML
- type Vars
- func (vs *Vars) AddFunc(name string, f interface{}) *Vars
- func (vs *Vars) Clone(m map[string]interface{}) *Vars
- func (vs *Vars) Exists(keys string) bool
- func (vs *Vars) FuncMap() template.FuncMap
- func (vs *Vars) Map() map[string]interface{}
- func (vs *Vars) Set(keys string, value interface{})
- func (vs *Vars) Value(keys string) (interface{}, bool)
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ContextValueTestName util.ContextKey = "test_name" ContextValueLogDir util.ContextKey = "log_dir" ContextValueLog util.ContextKey = "log" ContextValueDesign util.ContextKey = "design" ContextValueVars util.ContextKey = "vars" ContextValueHosts util.ContextKey = "hosts" ContextValueFlags util.ContextKey = "flags" )
View Source
var TranslateWords = map[string]string{
"ssh": "SSH",
"id": "ID",
"url": "URL",
"uri": "URI",
}
Functions ¶
func CheckMongodbURI ¶
func CheckMongodbURI(uri string) (connstring.ConnString, error)
func IsTemplateCondition ¶
func LoadFlagsContextValue ¶
func NormalizeVarsKey ¶
func SanitizeVarsMap ¶
func SanitizeVarsMap(m interface{}) interface{}
Types ¶
type Design ¶
type Design struct { StorageString string Storage connstring.ConnString `json:"-"` Hosts []DesignHost NodeConfig map[string]string CommonNodeConfig string NodesConfig string Sequences []DesignSequence ExitOnError bool Skip bool }
func (*Design) SetDatabase ¶
type DesignAction ¶
func (DesignAction) IsEmpty ¶
func (de DesignAction) IsEmpty() bool
func (*DesignAction) IsValid ¶
func (de *DesignAction) IsValid([]byte) error
type DesignActionYAML ¶
type DesignActionYAML struct { Name *string Args *[]string Extra map[string]interface{} `yaml:",inline"` }
func (DesignActionYAML) Merge ¶
func (de DesignActionYAML) Merge() (DesignAction, error)
type DesignCondition ¶
func (*DesignCondition) IsValid ¶
func (de *DesignCondition) IsValid([]byte) error
type DesignConditionYAML ¶
type DesignConditionYAML struct { Query *string `yaml:"query"` Storage *string `yaml:"storage,omitempty"` Col *string `yaml:"col,omitempty"` }
func (DesignConditionYAML) Merge ¶
func (de DesignConditionYAML) Merge() (DesignCondition, error)
type DesignHost ¶
type DesignHost struct { Weight uint // if 0 weight, this host will be ignored. Host string Local bool SSH DesignHostSSH }
func (*DesignHost) IsValid ¶
func (de *DesignHost) IsValid([]byte) error
type DesignHostSSH ¶
func (*DesignHostSSH) IsValid ¶
func (de *DesignHostSSH) IsValid([]byte) error
type DesignHostSSHYAML ¶
func (DesignHostSSHYAML) Merge ¶
func (de DesignHostSSHYAML) Merge() (DesignHostSSH, error)
type DesignHostYAML ¶
type DesignHostYAML struct { Weight *uint Local *bool Host *string SSH *DesignHostSSHYAML }
func (DesignHostYAML) Merge ¶
func (de DesignHostYAML) Merge() (DesignHost, error)
type DesignRegister ¶
type DesignRegister struct { Type DesignRegisterType To string }
func (DesignRegister) IsEmpty ¶
func (de DesignRegister) IsEmpty() bool
func (*DesignRegister) IsValid ¶
func (de *DesignRegister) IsValid([]byte) error
type DesignRegisterType ¶
type DesignRegisterType string
const (
RegisterLastMatchType DesignRegisterType = "last_match"
)
func (DesignRegisterType) IsValid ¶
func (t DesignRegisterType) IsValid([]byte) error
type DesignRegisterYAML ¶
func (DesignRegisterYAML) Merge ¶
func (de DesignRegisterYAML) Merge() (DesignRegister, error)
type DesignSequence ¶
type DesignSequence struct { Condition DesignCondition Action DesignAction Register DesignRegister }
func (*DesignSequence) IsValid ¶
func (de *DesignSequence) IsValid([]byte) error
type DesignSequenceYAML ¶
type DesignSequenceYAML struct { Condition interface{} Action *DesignActionYAML `yaml:",omitempty"` Register *DesignRegisterYAML `yaml:"register,omitempty"` }
func (DesignSequenceYAML) Merge ¶
func (de DesignSequenceYAML) Merge() (DesignSequence, error)
type DesignYAML ¶
type DesignYAML struct { Storage *string Hosts []*DesignHostYAML NodeConfig map[string]interface{} `yaml:"node-config"` NodesConfig *string `yaml:"nodes-config"` Sequences []*DesignSequenceYAML ExitOnError *bool `yaml:"exit-on-error"` Skip *bool }
func (DesignYAML) Merge ¶
func (de DesignYAML) Merge() (Design, error)
Click to show internal directories.
Click to hide internal directories.