variable

package
v0.52.0 Latest Latest
Warning

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

Go to latest
Published: Sep 15, 2025 License: Apache-2.0 Imports: 3 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

View Source
var KindMap = map[Kind]bool{
	KindText: true,
	KindList: true,
}

Functions

This section is empty.

Types

type DefaultValue

type DefaultValue struct {
	SingleValue string
	SliceValues []string
}

func (*DefaultValue) MarshalJSON

func (v *DefaultValue) MarshalJSON() ([]byte, error)

func (*DefaultValue) MarshalYAML

func (v *DefaultValue) MarshalYAML() (any, error)

func (*DefaultValue) UnmarshalJSON

func (v *DefaultValue) UnmarshalJSON(data []byte) error

func (*DefaultValue) UnmarshalYAML

func (v *DefaultValue) UnmarshalYAML(unmarshal func(any) error) error

type Display

type Display struct {
	Name        string `json:"name,omitempty" yaml:"name,omitempty"`
	Description string `json:"description,omitempty" yaml:"description,omitempty"`
	Hidden      bool   `json:"hidden" yaml:"hidden"`
}

type Kind

type Kind string
const (
	KindText Kind = "TextVariable"
	KindList Kind = "ListVariable"
)

func (*Kind) UnmarshalJSON

func (k *Kind) UnmarshalJSON(data []byte) error

func (*Kind) UnmarshalYAML

func (k *Kind) UnmarshalYAML(unmarshal func(any) error) error

type ListSpec

type ListSpec struct {
	Display *Display `json:"display,omitempty" yaml:"display,omitempty"`
	// Value from the list to be selected by default.
	DefaultValue *DefaultValue `json:"defaultValue,omitempty" yaml:"defaultValue,omitempty"`
	// Whether or not to append the "All" value that allows selecting all available values at once.
	AllowAllValue bool `json:"allowAllValue" yaml:"allowAllValue"`
	// Whether or not to allow multi-selection of values.
	AllowMultiple bool `json:"allowMultiple" yaml:"allowMultiple"`
	// CustomAllValue is a custom value that will be used if AllowAllValue is true and if then `all` is selected
	CustomAllValue string `json:"customAllValue,omitempty" yaml:"customAllValue,omitempty"`
	// CapturingRegexp is the regexp used to catch and filter the result of the query.
	// If empty, then nothing is filtered. That's the equivalent of setting CapturingRegexp with (.*)
	CapturingRegexp string `json:"capturingRegexp,omitempty" yaml:"capturingRegexp,omitempty"`
	// Sort method to apply when rendering the list of values
	Sort   *Sort         `json:"sort,omitempty" yaml:"sort,omitempty"`
	Plugin common.Plugin `json:"plugin" yaml:"plugin"`
}

func (*ListSpec) Validate

func (v *ListSpec) Validate() error

type Sort added in v0.42.0

type Sort string
const (
	SortNone                            Sort = "none"
	SortAlphabeticalAsc                 Sort = "alphabetical-asc"
	SortAlphabeticalDesc                Sort = "alphabetical-desc"
	SortNumericalAsc                    Sort = "numerical-asc"
	SortNumericalDesc                   Sort = "numerical-desc"
	SortAlphabeticalCaseInsensitiveAsc  Sort = "alphabetical-ci-asc"
	SortAlphabeticalCaseInsensitiveDesc Sort = "alphabetical-ci-desc"
)

func (*Sort) UnmarshalJSON added in v0.42.0

func (s *Sort) UnmarshalJSON(data []byte) error

func (*Sort) UnmarshalYAML added in v0.42.0

func (s *Sort) UnmarshalYAML(unmarshal func(any) error) error

type TextSpec

type TextSpec struct {
	Display  *Display `json:"display,omitempty" yaml:"display,omitempty"`
	Value    string   `json:"value" yaml:"value"`
	Constant bool     `json:"constant,omitempty" yaml:"constant,omitempty"`
}

func (*TextSpec) Validate

func (v *TextSpec) Validate() error

Jump to

Keyboard shortcuts

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