starlarkutil

package module
v0.0.0-...-70e8b4b Latest Latest
Warning

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

Go to latest
Published: Nov 30, 2023 License: Apache-2.0 Imports: 8 Imported by: 5

README

starlarkutil

utilities for starlark

Documentation

Index

Constants

This section is empty.

Variables

View Source
var TooManyElements = fmt.Errorf("too many elements")

Functions

func Assign

func Assign(value starlark.Value, target reflect.Value) error

func MakeFunc

func MakeFunc(name string, fn any) *starlark.Builtin

func WithInvalidValue

func WithInvalidValue(str string) e5.WrapFunc

Types

type InvalidTarget

type InvalidTarget struct {
	Type reflect.Type
	Str  string
}

func (*InvalidTarget) Error

func (i *InvalidTarget) Error() string

type InvalidValue

type InvalidValue struct {
	Str string
}

func (*InvalidValue) Error

func (i *InvalidValue) Error() string

type Sink

type Sink = sb.Sink

func Unmarshal

func Unmarshal(target *starlark.Value, cont Sink) Sink

func UnmarshalArray

func UnmarshalArray(list *starlark.List, cont Sink) Sink

func UnmarshalDict

func UnmarshalDict(
	endKind sb.Kind,
	dict *starlark.Dict,
	cont Sink,
) Sink

func UnmarshalTuple

func UnmarshalTuple(
	tuple *starlark.Tuple,
	cont Sink,
) Sink

type Src

type Src = sb.Proc

func Marshal

func Marshal(value starlark.Value, t *reflect.Type, cont Src) *Src

func MarshalValue

func MarshalValue(value starlark.Value, t *reflect.Type, cont Src) Src

Jump to

Keyboard shortcuts

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