runtime

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Oct 20, 2020 License: Apache-2.0 Imports: 20 Imported by: 1

Documentation

Index

Constants

View Source
const DefaultExpirationSeconds = 60
View Source
const (
	ModuleName = "render"
)

Variables

This section is empty.

Functions

func InitCache

func InitCache(c Cache)

func LoadCacheModule

func LoadCacheModule() (starlark.StringDict, error)

func LoadModule

func LoadModule() (starlark.StringDict, error)

Types

type AnimatedPositioned

type AnimatedPositioned struct {
	Widget
	animation.AnimatedPositioned
}

func (AnimatedPositioned) AsRenderWidget

func (ap AnimatedPositioned) AsRenderWidget() render.Widget

func (AnimatedPositioned) Attr

func (ap AnimatedPositioned) Attr(name string) (starlark.Value, error)

func (AnimatedPositioned) AttrNames

func (ap AnimatedPositioned) AttrNames() []string

func (AnimatedPositioned) Freeze

func (ap AnimatedPositioned) Freeze()

func (AnimatedPositioned) Hash

func (ap AnimatedPositioned) Hash() (uint32, error)

func (AnimatedPositioned) String

func (ap AnimatedPositioned) String() string

func (AnimatedPositioned) Truth

func (ap AnimatedPositioned) Truth() starlark.Bool

func (AnimatedPositioned) Type

func (ap AnimatedPositioned) Type() string

type Animation

type Animation struct {
	Widget
	render.Animation
	// contains filtered or unexported fields
}

func (*Animation) AsRenderWidget

func (w *Animation) AsRenderWidget() render.Widget

func (*Animation) Attr

func (w *Animation) Attr(name string) (starlark.Value, error)

func (*Animation) AttrNames

func (w *Animation) AttrNames() []string

func (*Animation) Freeze

func (w *Animation) Freeze()

func (*Animation) Hash

func (w *Animation) Hash() (uint32, error)

func (*Animation) String

func (w *Animation) String() string

func (*Animation) Truth

func (w *Animation) Truth() starlark.Bool

func (*Animation) Type

func (w *Animation) Type() string

type Applet

type Applet struct {
	Filename string
	Id       string
	Globals  starlark.StringDict
	// contains filtered or unexported fields
}

func (*Applet) Call

func (a *Applet) Call(callable *starlark.Function, args starlark.Tuple) (val starlark.Value, err error)

Calls any callable from Applet.Globals. Pass args and receive a starlark Value, or an error if you're unlucky.

func (*Applet) Load

func (a *Applet) Load(filename string, src []byte, loader ModuleLoader) (err error)

Loads an applet. The script filename is used as a descriptor only, and the actual code should be passed in src. Optionally also pass loader to make additional starlark modules available to the script.

func (*Applet) Run

func (a *Applet) Run(config map[string]string) (roots []render.Root, err error)

Runs the applet's main function, passing it configuration as a starlark dict.

type Box

type Box struct {
	Widget
	render.Box
	// contains filtered or unexported fields
}

func (*Box) AsRenderWidget

func (w *Box) AsRenderWidget() render.Widget

func (*Box) Attr

func (w *Box) Attr(name string) (starlark.Value, error)

func (*Box) AttrNames

func (w *Box) AttrNames() []string

func (*Box) Freeze

func (w *Box) Freeze()

func (*Box) Hash

func (w *Box) Hash() (uint32, error)

func (*Box) String

func (w *Box) String() string

func (*Box) Truth

func (w *Box) Truth() starlark.Bool

func (*Box) Type

func (w *Box) Type() string

type Cache

type Cache interface {
	Set(key string, value []byte, ttl int64) error
	Get(key string) ([]byte, bool, error)
}

type Circle

type Circle struct {
	Widget
	render.Circle
	// contains filtered or unexported fields
}

func (*Circle) AsRenderWidget

func (w *Circle) AsRenderWidget() render.Widget

func (*Circle) Attr

func (w *Circle) Attr(name string) (starlark.Value, error)

func (*Circle) AttrNames

func (w *Circle) AttrNames() []string

func (*Circle) Freeze

func (w *Circle) Freeze()

func (*Circle) Hash

func (w *Circle) Hash() (uint32, error)

func (*Circle) String

func (w *Circle) String() string

func (*Circle) Truth

func (w *Circle) Truth() starlark.Bool

func (*Circle) Type

func (w *Circle) Type() string

type Column

type Column struct {
	Widget
	render.Column
	// contains filtered or unexported fields
}

func (*Column) AsRenderWidget

func (w *Column) AsRenderWidget() render.Widget

func (*Column) Attr

func (w *Column) Attr(name string) (starlark.Value, error)

func (*Column) AttrNames

func (w *Column) AttrNames() []string

func (*Column) Freeze

func (w *Column) Freeze()

func (*Column) Hash

func (w *Column) Hash() (uint32, error)

func (*Column) String

func (w *Column) String() string

func (*Column) Truth

func (w *Column) Truth() starlark.Bool

func (*Column) Type

func (w *Column) Type() string

type Image

type Image struct {
	Widget
	render.Image
	// contains filtered or unexported fields
}

func (*Image) AsRenderWidget

func (w *Image) AsRenderWidget() render.Widget

func (*Image) Attr

func (w *Image) Attr(name string) (starlark.Value, error)

func (*Image) AttrNames

func (w *Image) AttrNames() []string

func (*Image) Freeze

func (w *Image) Freeze()

func (*Image) Hash

func (w *Image) Hash() (uint32, error)

func (*Image) String

func (w *Image) String() string

func (*Image) Truth

func (w *Image) Truth() starlark.Bool

func (*Image) Type

func (w *Image) Type() string

type InMemoryCache

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

func NewInMemoryCache

func NewInMemoryCache() *InMemoryCache

func (*InMemoryCache) Get

func (c *InMemoryCache) Get(key string) (value []byte, found bool, err error)

func (*InMemoryCache) Set

func (c *InMemoryCache) Set(key string, value []byte, ttl int64) error

type InMemoryCacheRecord

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

type Marquee

type Marquee struct {
	Widget
	render.Marquee
	// contains filtered or unexported fields
}

func (*Marquee) AsRenderWidget

func (w *Marquee) AsRenderWidget() render.Widget

func (*Marquee) Attr

func (w *Marquee) Attr(name string) (starlark.Value, error)

func (*Marquee) AttrNames

func (w *Marquee) AttrNames() []string

func (*Marquee) Freeze

func (w *Marquee) Freeze()

func (*Marquee) Hash

func (w *Marquee) Hash() (uint32, error)

func (*Marquee) String

func (w *Marquee) String() string

func (*Marquee) Truth

func (w *Marquee) Truth() starlark.Bool

func (*Marquee) Type

func (w *Marquee) Type() string

type ModuleLoader

type ModuleLoader func(*starlark.Thread, string) (starlark.StringDict, error)

type PNG

type PNG struct {
	Widget
	render.PNG
	// contains filtered or unexported fields
}

func (*PNG) AsRenderWidget

func (w *PNG) AsRenderWidget() render.Widget

func (*PNG) Attr

func (w *PNG) Attr(name string) (starlark.Value, error)

func (*PNG) AttrNames

func (w *PNG) AttrNames() []string

func (*PNG) Freeze

func (w *PNG) Freeze()

func (*PNG) Hash

func (w *PNG) Hash() (uint32, error)

func (*PNG) String

func (w *PNG) String() string

func (*PNG) Truth

func (w *PNG) Truth() starlark.Bool

func (*PNG) Type

func (w *PNG) Type() string

type Padding

type Padding struct {
	Widget
	render.Padding
	// contains filtered or unexported fields
}

func (*Padding) AsRenderWidget

func (w *Padding) AsRenderWidget() render.Widget

func (*Padding) Attr

func (w *Padding) Attr(name string) (starlark.Value, error)

func (*Padding) AttrNames

func (w *Padding) AttrNames() []string

func (*Padding) Freeze

func (w *Padding) Freeze()

func (*Padding) Hash

func (w *Padding) Hash() (uint32, error)

func (*Padding) String

func (w *Padding) String() string

func (*Padding) Truth

func (w *Padding) Truth() starlark.Bool

func (*Padding) Type

func (w *Padding) Type() string

type Plot

type Plot struct {
	Widget
	render.Plot
	// contains filtered or unexported fields
}

func (Plot) AsRenderWidget

func (p Plot) AsRenderWidget() render.Widget

func (Plot) Attr

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

func (Plot) AttrNames

func (p Plot) AttrNames() []string

func (Plot) Freeze

func (p Plot) Freeze()

func (Plot) Hash

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

func (Plot) String

func (p Plot) String() string

func (Plot) Truth

func (p Plot) Truth() starlark.Bool

func (Plot) Type

func (p Plot) Type() string

type Root

type Root struct {
	render.Root
	// contains filtered or unexported fields
}

func (Root) AsRenderRoot

func (r Root) AsRenderRoot() render.Root

func (Root) Attr

func (r Root) Attr(name string) (starlark.Value, error)

func (Root) AttrNames

func (r Root) AttrNames() []string

func (Root) Freeze

func (r Root) Freeze()

func (Root) Hash

func (r Root) Hash() (uint32, error)

func (Root) String

func (r Root) String() string

func (Root) Truth

func (r Root) Truth() starlark.Bool

func (Root) Type

func (r Root) Type() string

type Row

type Row struct {
	Widget
	render.Row
	// contains filtered or unexported fields
}

func (*Row) AsRenderWidget

func (w *Row) AsRenderWidget() render.Widget

func (*Row) Attr

func (w *Row) Attr(name string) (starlark.Value, error)

func (*Row) AttrNames

func (w *Row) AttrNames() []string

func (*Row) Freeze

func (w *Row) Freeze()

func (*Row) Hash

func (w *Row) Hash() (uint32, error)

func (*Row) String

func (w *Row) String() string

func (*Row) Truth

func (w *Row) Truth() starlark.Bool

func (*Row) Type

func (w *Row) Type() string

type Stack

type Stack struct {
	Widget
	render.Stack
	// contains filtered or unexported fields
}

func (*Stack) AsRenderWidget

func (w *Stack) AsRenderWidget() render.Widget

func (*Stack) Attr

func (w *Stack) Attr(name string) (starlark.Value, error)

func (*Stack) AttrNames

func (w *Stack) AttrNames() []string

func (*Stack) Freeze

func (w *Stack) Freeze()

func (*Stack) Hash

func (w *Stack) Hash() (uint32, error)

func (*Stack) String

func (w *Stack) String() string

func (*Stack) Truth

func (w *Stack) Truth() starlark.Bool

func (*Stack) Type

func (w *Stack) Type() string

type Text

type Text struct {
	Widget
	render.Text
	// contains filtered or unexported fields
}

func (*Text) AsRenderWidget

func (w *Text) AsRenderWidget() render.Widget

func (*Text) Attr

func (w *Text) Attr(name string) (starlark.Value, error)

func (*Text) AttrNames

func (w *Text) AttrNames() []string

func (*Text) Freeze

func (w *Text) Freeze()

func (*Text) Hash

func (w *Text) Hash() (uint32, error)

func (*Text) String

func (w *Text) String() string

func (*Text) Truth

func (w *Text) Truth() starlark.Bool

func (*Text) Type

func (w *Text) Type() string

type Widget

type Widget interface {
	AsRenderWidget() render.Widget
}

type WrappedText

type WrappedText struct {
	Widget
	render.WrappedText
}

func (*WrappedText) AsRenderWidget

func (w *WrappedText) AsRenderWidget() render.Widget

func (*WrappedText) Attr

func (w *WrappedText) Attr(name string) (starlark.Value, error)

func (*WrappedText) AttrNames

func (w *WrappedText) AttrNames() []string

func (*WrappedText) Freeze

func (w *WrappedText) Freeze()

func (*WrappedText) Hash

func (w *WrappedText) Hash() (uint32, error)

func (*WrappedText) String

func (w *WrappedText) String() string

func (*WrappedText) Truth

func (w *WrappedText) Truth() starlark.Bool

func (*WrappedText) Type

func (w *WrappedText) Type() string

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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