starlarkutils

package module
v0.0.0-...-dd78b8b Latest Latest
Warning

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

Go to latest
Published: May 22, 2022 License: MIT Imports: 5 Imported by: 0

README

starlarkutils

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FromStarlark

func FromStarlark(v starlark.Value, dst interface{}, optFuncs ...func(*fromOpts)) error

func GenSymbol

func GenSymbol(_ *starlark.Thread, bi *starlark.Builtin, args starlark.Tuple, kwargs []starlark.Tuple) (starlark.Value, error)

func ToStarlark

func ToStarlark(x interface{}, optFuncs ...func(*toOpts)) (starlark.Value, error)

func WithFromNameConverter

func WithFromNameConverter(nameCvt func(string) string) func(*fromOpts)

func WithFromPrefix

func WithFromPrefix(p string) func(*fromOpts)

func WithToNameConverter

func WithToNameConverter(nameCvt func(string) string) func(*toOpts)

func WithToPrefix

func WithToPrefix(p string) func(*toOpts)

func WithToValueConverter

func WithToValueConverter(cvt func(interface{}) (interface{}, error)) func(*toOpts)

func WithValCvt

func WithValCvt(cvt func(starlark.Value) (starlark.Value, error)) func(*fromOpts)

Types

type Symbol

type Symbol string

A symbol is a distinct value that acts as a constructor of "branded" struct instances, like a class symbol in Python or a "provider" in Bazel.

func (Symbol) CallInternal

func (sym Symbol) CallInternal(thread *starlark.Thread, args starlark.Tuple, kwargs []starlark.Tuple) (starlark.Value, error)

func (Symbol) Freeze

func (sym Symbol) Freeze()

func (Symbol) Hash

func (sym Symbol) Hash() (uint32, error)

func (Symbol) Name

func (sym Symbol) Name() string

func (Symbol) String

func (sym Symbol) String() string

func (Symbol) Truth

func (sym Symbol) Truth() starlark.Bool

func (Symbol) Type

func (sym Symbol) Type() string

Jump to

Keyboard shortcuts

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