config

package
v1.15.18 Latest Latest
Warning

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

Go to latest
Published: Dec 9, 2023 License: Apache-2.0 Imports: 6 Imported by: 15

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DefaultDecoder

func DefaultDecoder[T TemplateConfig]() func(runConfig Dynamic) (T, error)

Types

type Decoder

type Decoder[T TemplateConfig] func(Dynamic) (T, error)

type Dynamic

type Dynamic struct {
	// contains filtered or unexported fields
}

func (*Dynamic) AsYaml

func (r *Dynamic) AsYaml() (string, error)

func (*Dynamic) Decode

func (r *Dynamic) Decode(into interface{}) error

func (Dynamic) MarshalLogObject

func (r Dynamic) MarshalLogObject(encoder zapcore.ObjectEncoder) error

func (Dynamic) MarshalYAML

func (r Dynamic) MarshalYAML() (interface{}, error)

func (*Dynamic) Merge

func (r *Dynamic) Merge(other Dynamic) error

func (*Dynamic) SetValueIfEmpty added in v1.4.0

func (r *Dynamic) SetValueIfEmpty(key string, value string)

func (*Dynamic) UnmarshalYAML

func (r *Dynamic) UnmarshalYAML(value *yaml.Node) error

type Logic

type Logic struct {
	Source string `yaml:"source"`
}

func (*Logic) SourceVersion

func (c *Logic) SourceVersion() string

func (*Logic) SourceWithoutVersion

func (c *Logic) SourceWithoutVersion() string

type Name

type Name string

func (Name) String

func (n Name) String() string

type Root

type Root struct {
	Children []Logic `yaml:"children,omitempty"`
	Version  int     `yaml:"version"`
	Config   Dynamic `yaml:"config,omitempty"`
	Logic    []Logic `yaml:"logic,omitempty"`
	Syncs    []Syncs `yaml:"syncs,omitempty"`
}

func (*Root) AsYaml

func (r *Root) AsYaml() (string, error)

func (*Root) Merge

func (r *Root) Merge(other *Root) error

type Syncs

type Syncs struct {
	Logic  Name    `yaml:"logic"`
	ID     string  `yaml:"id"`
	Config Dynamic `yaml:"config"`
}

type TemplateConfig

type TemplateConfig interface{}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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