test

package
v4.27.0 Latest Latest
Warning

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

Go to latest
Published: Apr 23, 2024 License: MIT Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ConfigSpec

func ConfigSpec() docs.FieldSpec

ConfigSpec returns a configuration spec for a template.

func DocsMarkdown

func DocsMarkdown() ([]byte, error)

DocsMarkdown returns a markdown document for the templates documentation.

Types

type BloblangCondition

type BloblangCondition struct {
	// contains filtered or unexported fields
}

func (*BloblangCondition) Check

func (b *BloblangCondition) Check(fs fs.FS, dir string, p *message.Part) error

type Case

type Case struct {
	Name             string
	Environment      map[string]string
	TargetProcessors string
	TargetMapping    string
	Mocks            map[string]any
	InputBatches     [][]InputConfig
	OutputBatches    [][]OutputConditionsMap
	// contains filtered or unexported fields
}

func CaseFromAny

func CaseFromAny(v any) (Case, error)

func CaseFromParsed

func CaseFromParsed(pConf *docs.ParsedConfig) (c Case, err error)

func FromAny

func FromAny(v any) ([]Case, error)

func FromParsed

func FromParsed(pConf *docs.ParsedConfig) ([]Case, error)

func (*Case) Line

func (c *Case) Line() int

type ContentEqualsCondition

type ContentEqualsCondition string

func (ContentEqualsCondition) Check

func (c ContentEqualsCondition) Check(fs fs.FS, dir string, p *message.Part) error

type ContentJSONContainsCondition

type ContentJSONContainsCondition string

func (ContentJSONContainsCondition) Check

func (c ContentJSONContainsCondition) Check(fs fs.FS, dir string, p *message.Part) error

type ContentJSONEqualsCondition

type ContentJSONEqualsCondition string

func (ContentJSONEqualsCondition) Check

func (c ContentJSONEqualsCondition) Check(fs fs.FS, dir string, p *message.Part) error

type ContentMatchesCondition

type ContentMatchesCondition string

func (ContentMatchesCondition) Check

func (c ContentMatchesCondition) Check(fs fs.FS, dir string, p *message.Part) error

type FileEqualsCondition

type FileEqualsCondition string

func (FileEqualsCondition) Check

func (c FileEqualsCondition) Check(fs fs.FS, dir string, p *message.Part) error

type FileJSONContainsCondition

type FileJSONContainsCondition string

func (FileJSONContainsCondition) Check

func (c FileJSONContainsCondition) Check(fs fs.FS, dir string, p *message.Part) error

type FileJSONEqualsCondition

type FileJSONEqualsCondition string

func (FileJSONEqualsCondition) Check

func (c FileJSONEqualsCondition) Check(fs fs.FS, dir string, p *message.Part) error

type InputConfig

type InputConfig struct {
	Content  string
	Path     string
	Metadata map[string]any
}

func InputFromParsed

func InputFromParsed(pConf *docs.ParsedConfig) (conf InputConfig, err error)

func (InputConfig) ToMessage

func (i InputConfig) ToMessage(fs fs.FS, dir string) (*message.Part, error)

type MetadataEqualsCondition

type MetadataEqualsCondition map[string]any

func (MetadataEqualsCondition) Check

func (m MetadataEqualsCondition) Check(fs fs.FS, dir string, p *message.Part) error

type OutputCondition

type OutputCondition interface {
	Check(fs fs.FS, dir string, part *message.Part) error
}

type OutputConditionsMap

type OutputConditionsMap map[string]OutputCondition

func OutputConditionsFromParsed

func OutputConditionsFromParsed(pConf *docs.ParsedConfig) (m OutputConditionsMap, err error)

func (OutputConditionsMap) CheckAll

func (c OutputConditionsMap) CheckAll(fs fs.FS, dir string, part *message.Part) (errs []error)

Jump to

Keyboard shortcuts

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