plugins

package
v0.4.4 Latest Latest
Warning

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

Go to latest
Published: Feb 29, 2024 License: Apache-2.0 Imports: 22 Imported by: 0

Documentation

Index

Constants

View Source
const MAX_BYTES_STDOUT = 100 * 1024 * 1024 // 100MB

Variables

This section is empty.

Functions

func AsString

func AsString(x starlark.Value) (string, error)

AsString unquotes a starlark string value

func NewExecPlugin added in v0.4.0

func NewExecPlugin(_ *utils.PluginContext) (any, error)

func NewFSPlugin added in v0.4.2

func NewFSPlugin(pluginContext *utils.PluginContext) (any, error)

func NewHttpPlugin added in v0.4.0

func NewHttpPlugin(pluginContext *utils.PluginContext) (any, error)

Types

type ExecPlugin added in v0.4.0

type ExecPlugin struct {
}

func (*ExecPlugin) Run added in v0.4.0

func (e *ExecPlugin) Run(thread *starlark.Thread, _ *starlark.Builtin, args starlark.Tuple, kwargs []starlark.Tuple) (starlark.Value, error)

type FileInfo added in v0.4.2

type FileInfo struct {
	Name  string
	Size  int64
	IsDir bool
	Mode  int
}

type Response

type Response struct {
	http.Response
}

Response represents an HTTP response, wrapping a go http.Response with starlark methods

func (*Response) HeadersDict

func (r *Response) HeadersDict() *starlark.Dict

HeadersDict flops

func (*Response) JSON

func (r *Response) JSON(thread *starlark.Thread, _ *starlark.Builtin, args starlark.Tuple, kwargs []starlark.Tuple) (starlark.Value, error)

JSON attempts to parse the response body as JSON

func (*Response) Struct

func (r *Response) Struct() *starlarkstruct.Struct

Struct turns a response into a *starlark.Struct

func (*Response) Text

func (r *Response) Text(thread *starlark.Thread, _ *starlark.Builtin, args starlark.Tuple, kwargs []starlark.Tuple) (starlark.Value, error)

Text returns the raw data as a string

Jump to

Keyboard shortcuts

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