runtime

package
v0.5.2 Latest Latest
Warning

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

Go to latest
Published: May 20, 2020 License: BSD-3-Clause Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Init

func Init() error

Types

type CueRuntime added in v0.5.0

type CueRuntime struct {
	Entrypoints []string
	Workspace   string
	FS          billy.Filesystem

	CueRuntime     *cue.Runtime
	BuildInstances []*build.Instance
	CueErrors      []error

	CueInstance *cue.Instance
	CueValue    cue.Value
	Value       interface{}
}

func CueRuntimeFromArgs added in v0.5.0

func CueRuntimeFromArgs(args []string) (crt *CueRuntime, err error)

CueRuntimeFromArgs builds up a CueRuntime

by processing the args passed in

func CueRuntimeFromArgsAndFlags added in v0.5.0

func CueRuntimeFromArgsAndFlags(args []string) (crt *CueRuntime, err error)

CueRuntimeFromArgsAndFlags builds up a CueRuntime

by processing the args passed in AND the current flag values

func (*CueRuntime) Load added in v0.5.0

func (CRT *CueRuntime) Load() (err error)

func (*CueRuntime) PrintValue added in v0.5.0

func (CRT *CueRuntime) PrintValue() error

type Runtime

type Runtime struct {
	ContextType  string
	ContextValue cue.Value
	ConfigType   string
	ConfigValue  cue.Value
	SecretType   string
	SecretValue  cue.Value
}

Runtime holds the app config/secrets

func GetRuntime

func GetRuntime() *Runtime

func NewRuntime

func NewRuntime() *Runtime

func (*Runtime) ConfigGet added in v0.5.1

func (R *Runtime) ConfigGet(path string) (cue.Value, error)

func (*Runtime) ConfigSet added in v0.5.1

func (R *Runtime) ConfigSet(expr string) error

func (*Runtime) ContextGet added in v0.5.2

func (R *Runtime) ContextGet(path string) (cue.Value, error)

func (*Runtime) ContextSet added in v0.5.2

func (R *Runtime) ContextSet(expr string) error

func (*Runtime) Init

func (R *Runtime) Init() (err error)

We can safely ignore errors here. If the file exists, cue errors will be printed, otherwise up to the user

func (*Runtime) PrintConfig added in v0.5.1

func (R *Runtime) PrintConfig() error

func (*Runtime) PrintSecret added in v0.5.1

func (R *Runtime) PrintSecret() error

func (*Runtime) SecretGet added in v0.5.1

func (R *Runtime) SecretGet(path string) (cue.Value, error)

func (*Runtime) SecretSet added in v0.5.1

func (R *Runtime) SecretSet(expr string) error

Jump to

Keyboard shortcuts

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