variable

package
v0.40.1 Latest Latest
Warning

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

Go to latest
Published: Sep 26, 2023 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() (interface{}, error)

func (*DefaultValue) UnmarshalJSON

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

func (*DefaultValue) UnmarshalYAML

func (v *DefaultValue) UnmarshalYAML(unmarshal func(interface{}) 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(interface{}) error) error

type ListSpec

type ListSpec struct {
	Display       *Display      `json:"display,omitempty" yaml:"display,omitempty"`
	DefaultValue  *DefaultValue `json:"defaultValue,omitempty" yaml:"defaultValue,omitempty"`
	AllowAllValue bool          `json:"allowAllValue" yaml:"allowAllValue"`
	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"`
	Plugin          common.Plugin `json:"plugin" yaml:"plugin"`
}

func (*ListSpec) Validate

func (v *ListSpec) Validate() 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