parse

package
v1.6.8 Latest Latest
Warning

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

Go to latest
Published: Jan 4, 2026 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var NullValue struct{} = struct{}{}

Functions

func LoadPICSLabels

func LoadPICSLabels(sdkRoot string) (labels map[string]string, err error)

func ValueFromMapSlice

func ValueFromMapSlice(val yaml.MapSlice, key string) (v any, ok bool)

Types

type StepResponse

type StepResponse struct {
	SaveAs      string                   `yaml:"saveAs,omitempty"`
	Error       string                   `yaml:"error,omitempty"`
	Value       any                      `yaml:"value,omitempty"`
	Values      []any                    `yaml:"values,omitempty"`
	Constraints *StepResponseConstraints `yaml:"constraints,omitempty"`

	Extras yaml.MapSlice
}

func (*StepResponse) UnmarshalMapSlice

func (sr *StepResponse) UnmarshalMapSlice(c yaml.MapSlice) error

type StepResponseConstraints

type StepResponseConstraints struct {
	Type      string `yaml:"type,omitempty"`
	MinLength any    `yaml:"minLength,omitempty"`
	MaxLength any    `yaml:"maxLength,omitempty"`
	MinValue  any    `yaml:"minValue,omitempty"`
	MaxValue  any    `yaml:"maxValue,omitempty"`
	NotValue  any    `yaml:"notValue,omitempty"`
	//	HasValue      bool     `yaml:"hasValue,omitempty"`
	HasMasksSet   []uint64 `yaml:"hasMasksSet,omitempty"`
	HasMasksClear []uint64 `yaml:"hasMasksClear,omitempty"`
	Contains      any      `yaml:"contains,omitempty"`
	AnyOf         any      `yaml:"anyOf,omitempty"`

	Extras yaml.MapSlice
}

func (*StepResponseConstraints) UnmarshalMapSlice

func (src *StepResponseConstraints) UnmarshalMapSlice(c yaml.MapSlice) error

type Test

type Test struct {
	Path string `yaml:"-"`

	Name string   `yaml:"name,omitempty"`
	PICS []string `yaml:"PICS,omitempty"`

	Config TestConfig  `yaml:"config,omitempty"`
	Tests  []*TestStep `yaml:"tests,omitempty"`

	Extras yaml.MapSlice
}

func (*Test) UnmarshalYAML

func (t *Test) UnmarshalYAML(unmarshal func(any) error) (err error)

type TestArgumentValue

type TestArgumentValue struct {
	Name  string `yaml:"name,omitempty"`
	Value string `yaml:"value,omitempty"`
}

type TestArguments

type TestArguments struct {
	Value  any                 `yaml:"value,omitempty"`
	Values TestArgumentsValues `yaml:"values,omitempty"`
}

func (*TestArguments) UnmarshalMapSlice

func (ta *TestArguments) UnmarshalMapSlice(c yaml.MapSlice) error

type TestArgumentsValues

type TestArgumentsValues []any

func (TestArgumentsValues) ToValues

func (tav TestArgumentsValues) ToValues() (values map[string]any)

type TestConfig

type TestConfig struct {
	NodeID                 uint64          `yaml:"nodeId,omitempty"`
	Cluster                string          `yaml:"cluster,omitempty"`
	Endpoint               uint64          `yaml:"endpoint,omitempty"`
	Timeout                uint64          `yaml:"timeout,omitempty"`
	CatalogVendorId        TestConfigValue `yaml:"catalogVendorId,omitempty"`
	ApplicationId          TestConfigValue `yaml:"applicationId,omitempty"`
	Payload                any             `yaml:"payload,omitempty"`
	Discriminator          TestConfigValue `yaml:"discriminator,omitempty"`
	WaitAfterCommissioning TestConfigValue `yaml:"waitAfterCommissioning,omitempty"`
	PakeVerifier           TestConfigValue `yaml:"PakeVerifier,omitempty"`

	Extras yaml.MapSlice
}

func (*TestConfig) UnmarshalMapSlice

func (tc *TestConfig) UnmarshalMapSlice(c yaml.MapSlice) error

type TestConfigValue

type TestConfigValue struct {
	Type         string `yaml:"type,omitempty"`
	DefaultValue any    `yaml:"defaultValue,omitempty"`
}

func (*TestConfigValue) UnmarshalMapSlice

func (tc *TestConfigValue) UnmarshalMapSlice(c yaml.MapSlice) error

type TestStep

type TestStep struct {
	Parent *Test `yaml:"-"`

	Label                     string        `yaml:"label,omitempty"`
	Comments                  []string      `yaml:"-"`
	PICS                      string        `yaml:"PICS,omitempty"`
	Cluster                   string        `yaml:"cluster,omitempty"`
	Endpoint                  uint64        `yaml:"endpoint,omitempty"`
	Command                   string        `yaml:"command,omitempty"`
	Attribute                 string        `yaml:"attribute,omitempty"`    // handled
	Verification              string        `yaml:"verification,omitempty"` // handled
	Arguments                 TestArguments `yaml:"arguments,omitempty"`
	Disabled                  bool          `yaml:"disabled,omitempty"`       // handled
	FabricFiltered            bool          `yaml:"fabricFiltered,omitempty"` //handled
	Response                  StepResponse  `yaml:"response,omitempty"`
	TimedInteractionTimeoutMs uint64        `yaml:"timedInteractionTimeoutMs,omitempty"`
	Event                     string        `yaml:"event,omitempty"`
	EventNumber               string        `yaml:"eventNumber,omitempty"`
	MaxInterval               uint64        `yaml:"maxInterval,omitempty"`
	MinInterval               uint64        `yaml:"minInterval,omitempty"`

	Wait    uint64 `yaml:"wait,omitempty"`
	Timeout uint64 `yaml:"timeout,omitempty"`

	Extras yaml.MapSlice
}

func (*TestStep) UnmarshalMapSlice

func (ts *TestStep) UnmarshalMapSlice(c yaml.MapSlice) error

type TestYamlParser

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

func NewTestYamlParser

func NewTestYamlParser(rootPath string) (TestYamlParser, error)

func (TestYamlParser) Name

func (p TestYamlParser) Name() string

func (TestYamlParser) Process

func (p TestYamlParser) Process(cxt context.Context, input *pipeline.Data[struct{}], index int32, total int32) (outputs []*pipeline.Data[*Test], extras []*pipeline.Data[struct{}], err error)

Jump to

Keyboard shortcuts

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