Documentation ¶
Index ¶
- func LoadFromBash(args []string) (string, cue.Value, error)
- func LoadFromFile(filename string) (string, cue.Value, error)
- func LoadFromHttp(fullurl string) (string, cue.Value, error)
- func LoadFromText(content string) (string, cue.Value, error)
- func LoadRuntime(args []string) (*runtime.Runtime, error)
- type EvalSource
- type SourceConfig
- func (sc *SourceConfig) Decode(input map[string]any) (*SourceConfig, error)
- func (sc *SourceConfig) Encode() (map[string]any, error)
- func (sc *SourceConfig) GetText() (string, error)
- func (sc *SourceConfig) GetValue() (cue.Value, error)
- func (sc *SourceConfig) StopWatch()
- func (sc *SourceConfig) UpdateFrom(action string, args []string, context map[string]any) (bool, error)
- func (sc *SourceConfig) Watch()
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type EvalSource ¶
type EvalSource string
const ( EvalNone EvalSource = "" EvalRuntime EvalSource = "runtime" EvalText EvalSource = "text" EvalFile EvalSource = "file" EvalBash EvalSource = "bash" EvalHttp EvalSource = "http" EvalConn EvalSource = "conn" )
type SourceConfig ¶
type SourceConfig struct { Name string // manual source data Value cue.Value Error error Text string // or how to get the value Source EvalSource Args []string // Path to fill the CUE value // (when used as an input in browser) // this will be filled at Path in another value there Path string ConnGetter func() cue.Value // for handling external changes and updating the Value WatchGlobs []string WatchTime time.Duration WatchQuit chan bool WatchFunc func() // contains filtered or unexported fields }
func CreateFrom ¶
func CreateFrom(args []string, context map[string]any) (*SourceConfig, error)
func (*SourceConfig) Decode ¶
func (sc *SourceConfig) Decode(input map[string]any) (*SourceConfig, error)
func (*SourceConfig) GetText ¶
func (sc *SourceConfig) GetText() (string, error)
func (*SourceConfig) StopWatch ¶
func (sc *SourceConfig) StopWatch()
func (*SourceConfig) UpdateFrom ¶
func (*SourceConfig) Watch ¶
func (sc *SourceConfig) Watch()
Click to show internal directories.
Click to hide internal directories.