preset

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: 4 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 struct {
	// contains filtered or unexported fields
}

Entry represents an entry in the 'preset' section

func (*Entry) FillPublicFieldsFromPreset

func (e *Entry) FillPublicFieldsFromPreset(target interface{}, ignoredFields ...string) (err error)

FillPublicFieldsFromPreset is a function that will do exactly as the name says

func (*Entry) Get

func (e *Entry) Get(key string) (val interface{}, exists bool)

Get returns the value matching the provided key.

func (*Entry) ID

func (e *Entry) ID() string

ID returns the ID of this entry

func (*Entry) UnmarshalYAML

func (e *Entry) UnmarshalYAML(unmarshal func(interface{}) error) (err error)

UnmarshalYAML unmarshals a Parameter Store

type Store

type Store map[string]*Entry

Store stores a set of preset entries

func NewStore

func NewStore() (s Store)

NewStore creates a new store.

func (Store) Get

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

Get returns the Entry matching the provided id.

func (*Store) InheritFrom

func (s *Store) InheritFrom(other Store)

InheritFrom copies over entries from another Store that do not yet exist in the current Store.

func (*Store) PresetsAreNotContradicting

func (s *Store) PresetsAreNotContradicting(IDs ...string) (err error)

PresetsAreNotContradicting takes an arbitrary number of preset IDs and checks each combination of them on whether they are contradicting or not.

func (*Store) Resolve

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

Resolve resolves inherited values between presets

func (*Store) UnmarshalYAML

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

UnmarshalYAML unmarshals a Parameter Store

Jump to

Keyboard shortcuts

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