Documentation
¶
Index ¶
- Constants
- func NewTestSchema(ls []TestSection) *schema.Schema
- func NewTestSection(l TestSection) schema.Section
- func NewTestSectionValues(pl schema.Section, l TestSectionValues) *values.SectionValues
- func NewTestValues(pls *schema.Schema, ls ...TestSectionValues) *values.Values
- func TestExpectedOutputs(t *testing.T, expectedSections []TestExpectedSection, ...)
- type TestExpectedSection
- type TestMiddleware
- type TestMiddlewareName
- type TestMiddlewares
- type TestParseOption
- type TestParseOptionName
- type TestParsedField
- type TestSection
- type TestSectionValues
Constants ¶
View Source
const TestBlacklistSectionFields = "blacklistSectionFields"
View Source
const TestBlacklistSectionFieldsFirst = "blacklistSectionFieldsFirst"
View Source
const TestBlacklistSections = "blacklistSections"
View Source
const TestBlacklistSectionsFirst = "blacklistSectionsFirst"
View Source
const TestMiddlewareSetFromDefaults = "setFromDefaults"
View Source
const TestMiddlewareUpdateFromEnv = "updateFromEnv"
View Source
const TestMiddlewareUpdateFromMap = "updateFromMap"
View Source
const TestMiddlewareUpdateFromMapAsDefault = "updateFromMapAsDefault"
View Source
const TestParseOptionMetadata = "metadata"
View Source
const TestParseOptionSource = "source"
View Source
const TestParseOptionValue = "value"
View Source
const TestWhitelistSectionFields = "whitelistSectionFields"
View Source
const TestWhitelistSectionFieldsFirst = "whitelistSectionFieldsFirst"
View Source
const TestWhitelistSections = "whitelistSections"
View Source
const TestWhitelistSectionsFirst = "whitelistSectionsFirst"
Variables ¶
This section is empty.
Functions ¶
func NewTestSchema ¶ added in v1.0.0
func NewTestSchema(ls []TestSection) *schema.Schema
func NewTestSection ¶ added in v1.0.0
func NewTestSection(l TestSection) schema.Section
NewTestSection is a helper function to create a Section from a definition bundle.
func NewTestSectionValues ¶ added in v1.0.0
func NewTestSectionValues(pl schema.Section, l TestSectionValues) *values.SectionValues
NewTestSectionValues helper function to create Values from TestParsedField.
func NewTestValues ¶ added in v1.0.0
func NewTestValues(pls *schema.Schema, ls ...TestSectionValues) *values.Values
func TestExpectedOutputs ¶
func TestExpectedOutputs(t *testing.T, expectedSections []TestExpectedSection, parsedValues *values.Values)
Types ¶
type TestExpectedSection ¶ added in v1.0.0
type TestMiddleware ¶
type TestMiddleware struct {
Name TestMiddlewareName `yaml:"name"`
Options []TestParseOption `yaml:"options"`
Map *map[string]map[string]interface{} `yaml:"map"`
Prefix *string `yaml:"prefix"`
Sections *[]string `yaml:"sections"`
Fields *map[string][]string `yaml:"fields"`
}
type TestMiddlewareName ¶
type TestMiddlewareName string
type TestMiddlewares ¶
type TestMiddlewares []TestMiddleware
func (TestMiddlewares) ToMiddlewares ¶
func (t TestMiddlewares) ToMiddlewares() ([]sources.Middleware, error)
type TestParseOption ¶ added in v1.0.0
type TestParseOption struct {
Name TestParseOptionName `yaml:"name"`
Value interface{} `yaml:"value"`
}
type TestParseOptionName ¶ added in v1.0.0
type TestParseOptionName string
type TestParsedField ¶ added in v1.0.0
type TestParsedField struct {
Name string `yaml:"name"`
Value interface{} `yaml:"value"`
}
type TestSection ¶ added in v1.0.0
type TestSection struct {
Name string `yaml:"name"`
Definitions []*fields.Definition `yaml:"definitions,omitempty"`
Prefix string `yaml:"prefix"`
}
type TestSectionValues ¶ added in v1.0.0
type TestSectionValues struct {
Name string `yaml:"name"`
Fields []TestParsedField `yaml:"fields"`
}
Click to show internal directories.
Click to hide internal directories.