helpers

package
v0.6.9-alpha.14 Latest Latest
Warning

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

Go to latest
Published: Sep 10, 2023 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

View Source
const (
	EvalNone    = ""
	EvalRuntime = "runtime"
	EvalText    = "text"
	EvalFile    = "file"
	EvalBash    = "bash"
	EvalHttp    = "http"
)

Variables

This section is empty.

Functions

func LoadFromBash

func LoadFromBash(args []string) (string, cue.Value, error)

func LoadFromFile

func LoadFromFile(filename string) (string, cue.Value, error)

func LoadFromHttp

func LoadFromHttp(fullurl string) (string, cue.Value, error)

func LoadFromText

func LoadFromText(content string) (string, cue.Value, error)

func LoadRuntime

func LoadRuntime(args []string) (*runtime.Runtime, error)

Types

type EvalSource

type EvalSource string

type SourceConfig

type SourceConfig struct {
	// manual source data
	Value cue.Value
	Text  string

	// or how to get the value
	Source  EvalSource
	Args    []string
	Watch   bool
	Refresh time.Duration
}

func (SourceConfig) Encode

func (sc SourceConfig) Encode() (map[string]any, error)

func (SourceConfig) GetText

func (sc SourceConfig) GetText() (string, error)

func (SourceConfig) GetValue

func (sc SourceConfig) GetValue() (cue.Value, error)

Jump to

Keyboard shortcuts

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