plugins

package
v0.9.3 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const (
	DEFAULT_FILE_LIMIT = 10_000
	MAX_FILE_LIMIT     = 100_000
)
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 NewContainerPlugin added in v0.6.0

func NewContainerPlugin(pluginContext *types.PluginContext) (any, error)

func NewExecPlugin added in v0.4.0

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

func NewFSPlugin added in v0.4.2

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

func NewHttpPlugin added in v0.4.0

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

func NewProxyPlugin added in v0.6.0

func NewProxyPlugin(pluginContext *types.PluginContext) (any, error)

Types

type ContainerConfig added in v0.6.0

type ContainerConfig struct {
	// Source of the container info. auto means look for Dockerfile/Containerfile. nixpacks means build with nixpacks.
	// string starting with "image:" means use that image. Any other value is the name of the file to use as containerfile
	Source   string
	Lifetime string
	Port     int
	Schema   string
	Health   string
	BuildDir string // directory to use for build context
}

func (ContainerConfig) Attr added in v0.6.0

func (p ContainerConfig) Attr(name string) (starlark.Value, error)

func (ContainerConfig) AttrNames added in v0.6.0

func (p ContainerConfig) AttrNames() []string

func (ContainerConfig) Freeze added in v0.6.0

func (p ContainerConfig) Freeze()

func (ContainerConfig) Hash added in v0.6.0

func (p ContainerConfig) Hash() (uint32, error)

func (ContainerConfig) String added in v0.6.0

func (p ContainerConfig) String() string

func (ContainerConfig) Truth added in v0.6.0

func (p ContainerConfig) Truth() starlark.Bool

func (ContainerConfig) Type added in v0.6.0

func (p ContainerConfig) Type() string

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 ProxyConfig added in v0.6.0

type ProxyConfig struct {
	Url          string
	StripPath    string
	PreserveHost bool
	StripApp     bool
}

func (ProxyConfig) Attr added in v0.6.0

func (p ProxyConfig) Attr(name string) (starlark.Value, error)

func (ProxyConfig) AttrNames added in v0.6.0

func (p ProxyConfig) AttrNames() []string

func (ProxyConfig) Freeze added in v0.6.0

func (p ProxyConfig) Freeze()

func (ProxyConfig) Hash added in v0.6.0

func (p ProxyConfig) Hash() (uint32, error)

func (ProxyConfig) String added in v0.6.0

func (p ProxyConfig) String() string

func (ProxyConfig) Truth added in v0.6.0

func (p ProxyConfig) Truth() starlark.Bool

func (ProxyConfig) Type added in v0.6.0

func (p ProxyConfig) Type() string

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