config

package
v0.0.0-...-63cfac8 Latest Latest
Warning

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

Go to latest
Published: Aug 30, 2024 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Element

type Element struct {
	Info *tmv1beta1.ConfigElement
	Level
	// contains filtered or unexported fields
}

Element represents a configuration parameter for tests.

func New

func New(configs []tmv1beta1.ConfigElement, level Level) []*Element

New creates new config elements.

func NewElement

func NewElement(config *tmv1beta1.ConfigElement, level Level) *Element

NewElement creates a new config element object.

func (*Element) Name

func (c *Element) Name() string

Name returns the config's unique name which is compatible to argo's parameter name conventions

func (*Element) Volume

func (c *Element) Volume() (*corev1.Volume, error)

Volume returns the pod volume for the current config if the ConfigType is file and a valuefrom is specified.

type Level

type Level int
const (
	LevelTestDefinition Level = 0
	LevelGlobal         Level = 5
	LevelShared         Level = 10
	LevelStep           Level = 15
)

type Set

type Set map[string]*Element

Set is a config element set

func NewSet

func NewSet(elements ...*Element) Set

func (Set) Add

func (s Set) Add(elements ...*Element)

Add adds elements to the set if the element does not exist or the element level is higher than the existing one

func (Set) Copy

func (s Set) Copy() Set

func (Set) Has

func (s Set) Has(e *Element) bool

Has checks if the elemnt is already in the set

func (Set) List

func (s Set) List() []*Element

func (Set) RawList

func (s Set) RawList() []*v1beta1.ConfigElement

func (Set) Set

func (s Set) Set(e *Element)

Set adds an element to the set. If the element already exist this element will be overwritten

Jump to

Keyboard shortcuts

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