config

package
v0.0.0 Latest Latest
Warning

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

Go to latest
Published: Aug 1, 2022 License: BSD-3-Clause Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Init

func Init() error

Types

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

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

func (*Runtime) ConfigSet

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

func (*Runtime) ContextGet

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

func (*Runtime) ContextSet

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

func (R *Runtime) PrintConfig() error

func (*Runtime) PrintSecret

func (R *Runtime) PrintSecret() error

func (*Runtime) SecretGet

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

func (*Runtime) SecretSet

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