helpers

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Feb 4, 2026 License: MIT Imports: 10 Imported by: 0

Documentation

Index

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 TestExpectedSection struct {
	Name   string                        `yaml:"name"`
	Values map[string]interface{}        `yaml:"values"`
	Logs   map[string][]fields.ParseStep `yaml:"logs"`
}

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"`
}

Jump to

Keyboard shortcuts

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