variable

package
v0.0.0-...-89f0798 Latest Latest
Warning

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

Go to latest
Published: Nov 2, 2026 License: Apache-2.0 Imports: 3 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

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

DEPRECATED: this is replaced by the struct github.com/perses/spec/go/dashboard/variable.SortMap

Functions

This section is empty.

Types

type DefaultValue

type DefaultValue struct {
	SingleValue string
	SliceValues []string
}

DEPRECATED: this is replaced by the struct github.com/perses/spec/go/dashboard/variable.DefaultValue

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

Display DEPRECATED: this is replaced by the struct github.com/perses/spec/go/dashboard/variable.Display

type Kind

type Kind string

Kind DEPRECATED: this is replaced by the struct github.com/perses/spec/go/dashboard/variable.Kind

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

DEPRECATED: this is replaced by the struct github.com/perses/spec/go/dashboard/variable.ListSpec

func (*ListSpec) Validate

func (v *ListSpec) Validate() error

type Sort

type Sort string

DEPRECATED: this is replaced by the struct github.com/perses/spec/go/dashboard/variable.Sort

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

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

func (*Sort) UnmarshalYAML

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