Documentation ¶
Index ¶
- type Context
- func (c *Context) GetConfig(thread *starlark.Thread, _ *starlark.Builtin, args starlark.Tuple, ...) (starlark.Value, error)
- func (c *Context) GetSecret(thread *starlark.Thread, _ *starlark.Builtin, args starlark.Tuple, ...) (starlark.Value, error)
- func (c *Context) SetResult(name string, value starlark.Value)
- func (c *Context) Struct() *starlarkstruct.Struct
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Context ¶
type Context struct {
// contains filtered or unexported fields
}
Context carries values across function calls in a transformation
func NewContext ¶
NewContext creates a new contex
func (*Context) GetConfig ¶
func (c *Context) GetConfig(thread *starlark.Thread, _ *starlark.Builtin, args starlark.Tuple, kwargs []starlark.Tuple) (starlark.Value, error)
GetConfig returns transformation configuration details TODO - supplying a string argument to qri.get_config('foo') should return the single config value instead of the whole map
func (*Context) GetSecret ¶
func (c *Context) GetSecret(thread *starlark.Thread, _ *starlark.Builtin, args starlark.Tuple, kwargs []starlark.Tuple) (starlark.Value, error)
GetSecret fetches a secret for a given string
func (*Context) SetResult ¶
SetResult places the result of a function call in the results stringDict any results set here will be placed in the context struct field by name
func (*Context) Struct ¶
func (c *Context) Struct() *starlarkstruct.Struct
Struct delivers this context as a starlark struct
Click to show internal directories.
Click to hide internal directories.