Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Config ¶
type Config struct { Version string `yaml:"version" json:"version"` APIKey string `yaml:"api_key" json:"api_key"` Schedule string `yaml:"schedule" json:"schedule" validate:"cron"` Locations []string `yaml:"locations" json:"locations"` Variables variables.Variables `yaml:"variables" json:"variables"` Transactions []transaction.Transaction `yaml:"transactions" json:"transactions" validate:"unique=ID"` }
Config holds the internal representation of the config. It has yaml tags to allow to marshalling
type CronValidator ¶ added in v0.1.6
type CronValidator struct{}
func (CronValidator) Validate ¶ added in v0.1.6
func (c CronValidator) Validate(val interface{}) (bool, error)
type DefaultValidator ¶
type DefaultValidator struct { }
DefaultValidator does not perform any validations.
func (DefaultValidator) Validate ¶
func (v DefaultValidator) Validate(interface{}) (bool, error)
Validate method performs validation and returns result and optional error.
type ExpectBodyValidator ¶
type ExpectBodyValidator struct{}
ExpectBodyValidator validates a step.ExpectBody so that the type and the exact fields make sense together. It also sets the defaults for type and exact
func (ExpectBodyValidator) Validate ¶
func (v ExpectBodyValidator) Validate(val interface{}) (b bool, err error)
type RequiredValidator ¶
type RequiredValidator struct{}
RequiredValidator validates slices and their length
func (RequiredValidator) Validate ¶
func (v RequiredValidator) Validate(val interface{}) (b bool, err error)
Validate method performs validation and returns result and optional error.
type UniqueValidator ¶
type UniqueValidator struct {
// contains filtered or unexported fields
}
UniqueValidator validates all elements in the slice have unique property (defined by the prop)
func (UniqueValidator) Validate ¶
func (v UniqueValidator) Validate(val interface{}) (b bool, err error)
Validate method performs validation and returns result and optional error.
type Validator ¶
type Validator interface { // Validate method performs validation and returns result and optional error. Validate(interface{}) (bool, error) }
Validator iterface for the different types to implement
type VersionValidator ¶
type VersionValidator struct{}
VersionValidator validates string if it is a valid version
func (VersionValidator) Validate ¶
func (v VersionValidator) Validate(val interface{}) (bool, error)
Validate method performs validation and returns result and optional error.