Documentation
¶
Index ¶
- func ExtractImports(code string) (imports string, rest string)
- func RegisterGlobalFunc(pkg, name string, fn PackageFunc)
- type Context
- func (c *Context) Clone() *Context
- func (c *Context) Execute(code string) error
- func (c *Context) Get(name string) (interface{}, bool)
- func (c *Context) GetLocals() map[string]any
- func (c *Context) GetParams() map[string]interface{}
- func (c *Context) GetProp(name string) (interface{}, bool)
- func (c *Context) GetRequest() (interface{}, bool)
- func (c *Context) RegisterPackageFunc(pkg, name string, fn PackageFunc)
- func (c *Context) Set(name string, value interface{})
- func (c *Context) SetLocals(locals map[string]any)
- func (c *Context) SetParams(params map[string]string)
- func (c *Context) SetProp(name string, value interface{})
- func (c *Context) SetRequest(req interface{})
- func (c *Context) String() string
- type GalaxyAPI
- type PackageFunc
- type Tuple
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ExtractImports ¶
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) GetRequest ¶
func (*Context) RegisterPackageFunc ¶
func (c *Context) RegisterPackageFunc(pkg, name string, fn PackageFunc)
func (*Context) SetRequest ¶
func (c *Context) SetRequest(req interface{})
type GalaxyAPI ¶
type PackageFunc ¶
type PackageFunc func(args ...interface{}) (interface{}, error)
Click to show internal directories.
Click to hide internal directories.