core

package
v0.25.0 Latest Latest
Warning

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

Go to latest
Published: Jan 29, 2020 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BoolArg

func BoolArg(kwargs []starlark.Tuple, keyToFind string) (bool, error)

Types

type GoValue

type GoValue struct {
	// contains filtered or unexported fields
}

func NewGoValue

func NewGoValue(val interface{}, mapIsStruct bool) GoValue

func (GoValue) AsStarlarkValue

func (e GoValue) AsStarlarkValue() starlark.Value

type GoValueToStarlarkValueConversion

type GoValueToStarlarkValueConversion interface {
	AsStarlarkValue() starlark.Value
}

type StarlarkFunc

type StarlarkFunc func(thread *starlark.Thread, f *starlark.Builtin, args starlark.Tuple, kwargs []starlark.Tuple) (starlark.Value, error)

func ErrDescWrapper added in v0.25.0

func ErrDescWrapper(desc string, wrappedFunc StarlarkFunc) StarlarkFunc

func ErrWrapper

func ErrWrapper(wrappedFunc StarlarkFunc) StarlarkFunc

type StarlarkNoop

type StarlarkNoop struct{}

func (*StarlarkNoop) Freeze

func (s *StarlarkNoop) Freeze()

func (*StarlarkNoop) Hash

func (s *StarlarkNoop) Hash() (uint32, error)

func (*StarlarkNoop) String

func (s *StarlarkNoop) String() string

func (*StarlarkNoop) Truth

func (s *StarlarkNoop) Truth() starlark.Bool

func (*StarlarkNoop) Type

func (s *StarlarkNoop) Type() string

type StarlarkStruct

type StarlarkStruct struct {
	// contains filtered or unexported fields
}

func (*StarlarkStruct) Attr

func (s *StarlarkStruct) Attr(name string) (starlark.Value, error)

returns (nil, nil) if attribute not present

func (*StarlarkStruct) AttrNames

func (s *StarlarkStruct) AttrNames() []string

callers must not modify the result.

func (*StarlarkStruct) Freeze

func (s *StarlarkStruct) Freeze()

func (*StarlarkStruct) Hash

func (s *StarlarkStruct) Hash() (uint32, error)

func (*StarlarkStruct) String

func (s *StarlarkStruct) String() string

func (*StarlarkStruct) Truth

func (s *StarlarkStruct) Truth() starlark.Bool

func (*StarlarkStruct) Type

func (s *StarlarkStruct) Type() string

type StarlarkValue

type StarlarkValue struct {
	// contains filtered or unexported fields
}

func NewStarlarkValue

func NewStarlarkValue(val starlark.Value) StarlarkValue

func (StarlarkValue) AsBool

func (e StarlarkValue) AsBool() (bool, error)

func (StarlarkValue) AsInt64

func (e StarlarkValue) AsInt64() (int64, error)

func (StarlarkValue) AsInterface

func (e StarlarkValue) AsInterface() interface{}

TODO rename AsGoValue()

func (StarlarkValue) AsString

func (e StarlarkValue) AsString() (string, error)

type StarlarkValueToGoValueConversion

type StarlarkValueToGoValueConversion interface {
	AsGoValue() interface{}
}

Jump to

Keyboard shortcuts

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