Documentation ¶ Index ¶ type Context type Engine func NewEngine() *Engine func (this *Engine) Charts() []maps.Map func (this *Engine) Output() []string func (this *Engine) RunCode(code string) error func (this *Engine) SetContext(context *Context) func (this *Engine) SetMongo(b bool) Constants ¶ This section is empty. Variables ¶ This section is empty. Functions ¶ This section is empty. Types ¶ type Context ¶ type Context struct { Server *teaconfigs.ServerConfig } type Engine ¶ type Engine struct { // contains filtered or unexported fields } 脚本引擎 func NewEngine ¶ func NewEngine() *Engine 获取新引擎 func (*Engine) Charts ¶ func (this *Engine) Charts() []maps.Map 获取Widget中的图表对象 func (*Engine) Output ¶ func (this *Engine) Output() []string 获取控制台输出 func (*Engine) RunCode ¶ func (this *Engine) RunCode(code string) error 运行Widget代码 func (*Engine) SetContext ¶ func (this *Engine) SetContext(context *Context) 设置上下文信息 func (*Engine) SetMongo ¶ added in v0.1.2 func (this *Engine) SetMongo(b bool) 设置MongoDB是否可用 Source Files ¶ View all Source files context.go engine.go init.go Click to show internal directories. Click to hide internal directories.