param

package
v0.0.0-...-71c6e05 Latest Latest
Warning

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

Go to latest
Published: Apr 3, 2021 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Entry

type Entry interface {
	ID() string

	ArgStoreIDs() []string
	Type() string
	Example() string
	Description() string
	AcceptedValues() []string
	Group() string
	// contains filtered or unexported methods
}

Entry defines the interface for all param entries

type Store

type Store map[string]Entry

Store stores a list of parameter descriptions

func NewStore

func NewStore() (s Store)

NewStore creates a new store.

func (*Store) Describe

func (s *Store) Describe(verbose bool) (result string)

Describe returns a short textual description of all parameters contained in this store. It returns the description as a multi-line string.

func (*Store) Get

func (s *Store) Get(id string) (e Entry, exists bool)

Get returns the Entry matching the provided id.

func (*Store) GetExampleArguments

func (s *Store) GetExampleArguments() (result []string)

GetExampleArguments returns an array containing all keys and example values for all parameters. The result can be passed to the ArgStore.

func (*Store) GetGroupsSortedByRank

func (s *Store) GetGroupsSortedByRank() (result []string)

GetGroupsSortedByRank returns the list of groups sorted by rank

func (*Store) GetKeysForGroupSortedByRank

func (s *Store) GetKeysForGroupSortedByRank(group string) (result []string)

GetKeysForGroupSortedByRank returns the list of key IDs contained in the listed group.

func (*Store) GetKeysSortedByName

func (s *Store) GetKeysSortedByName() (result []string)

GetKeysSortedByName returns the list of keys contained in this store as list sorted by rank.

func (*Store) InheritFrom

func (s *Store) InheritFrom(other *Store) (err error)

InheritFrom inherits entries from another param store. An error is returned in case an entry exists in both stores.

func (*Store) IsValid

func (s *Store) IsValid() (err error)

IsValid checks whether all entries are valid.

func (*Store) UnmarshalYAML

func (s *Store) UnmarshalYAML(unmarshal func(interface{}) error) (err error)

UnmarshalYAML unmarshals a Parameter Store

func (*Store) ValidateAndProcessArgs

func (s *Store) ValidateAndProcessArgs(as *args.Store) (err error)

ValidateAndProcessArgs checks whether all arguments in the arg store have a corresponding parameter entry.

Jump to

Keyboard shortcuts

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