executor

package
v0.35.2 Latest Latest
Warning

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

Go to latest
Published: Nov 9, 2025 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ExtractImports

func ExtractImports(code string) (imports string, rest string)

func RegisterGlobalFunc

func RegisterGlobalFunc(pkg, name string, fn PackageFunc)

Types

type Context

type Context struct {
	Variables      map[string]interface{}
	Props          map[string]interface{}
	Slots          map[string]string
	Request        interface{}
	Locals         map[string]any
	RedirectURL    string
	RedirectStatus int
	ShouldRedirect bool
	PackageFuncs   map[string]PackageFunc
}

func NewContext

func NewContext() *Context

func (*Context) Clone

func (c *Context) Clone() *Context

func (*Context) Execute

func (c *Context) Execute(code string) error

func (*Context) Get

func (c *Context) Get(name string) (interface{}, bool)

func (*Context) GetLocals

func (c *Context) GetLocals() map[string]any

func (*Context) GetParams

func (c *Context) GetParams() map[string]interface{}

func (*Context) GetProp

func (c *Context) GetProp(name string) (interface{}, bool)

func (*Context) GetRequest

func (c *Context) GetRequest() (interface{}, bool)

func (*Context) RegisterPackageFunc

func (c *Context) RegisterPackageFunc(pkg, name string, fn PackageFunc)

func (*Context) Set

func (c *Context) Set(name string, value interface{})

func (*Context) SetLocals

func (c *Context) SetLocals(locals map[string]any)

func (*Context) SetParams

func (c *Context) SetParams(params map[string]string)

func (*Context) SetProp

func (c *Context) SetProp(name string, value interface{})

func (*Context) SetRequest

func (c *Context) SetRequest(req interface{})

func (*Context) String

func (c *Context) String() string

type GalaxyAPI

type GalaxyAPI struct {
	Params  map[string]interface{}
	Locals  map[string]interface{}
	Content interface{} // ContentAPI wrapper
	// contains filtered or unexported fields
}

func (*GalaxyAPI) Redirect

func (g *GalaxyAPI) Redirect(url string, status int)

type PackageFunc

type PackageFunc func(args ...interface{}) (interface{}, error)

type Tuple

type Tuple struct {
	Values []interface{}
}

Jump to

Keyboard shortcuts

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