Documentation ¶
Index ¶
- func NewBase64Module() *isopod.Module
- func NewHTTPModule() *isopod.Module
- func NewUUIDModule() *isopod.Module
- func Predeclared() starlark.StringDict
- func StructFn(t *starlark.Thread, b *starlark.Builtin, args starlark.Tuple, ...) (starlark.Value, error)
- func WriteJSON(out *bytes.Buffer, v starlark.Value) error
- type Struct
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewBase64Module ¶
NewBase64Module returns a base64 module.
func NewHTTPModule ¶
NewHTTPModule returns new Isopod built-in module for HTTP calls. Supports these methods:
- http.get - Performs HTTP GET call
- http.post - Performs HTTP POST call
- http.put - Performs HTTP PUT call
- http.patch - Performs HTTP PATCH call
- http.delete - Performs HTTP DELETE call
Args: url - required URL to send request to. headers - optional headers provided as Starlark dict. Values can be either
Starlark strings (for single value headers) or lists (for multiple ones).
data - optional data sent in request body (take Starlark string).
Returns: Starlark string of response body. If response body is empty, returns starlark.None.
Errors out on non-2XX response codes.
func Predeclared ¶
func Predeclared() starlark.StringDict
Predeclared returns a starlark.StringDict containing predeclared modules from util:
Types ¶
Click to show internal directories.
Click to hide internal directories.