engine

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Sep 19, 2018 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DefaultAdapter adapter.WebFrameWork

Functions

func Content

func Content(ctx interface{}, panel types.GetPanel)

func Register

func Register(ada adapter.WebFrameWork)

Types

type Engine

type Engine struct {
	PluginList []plugins.Plugin
	Adapter    adapter.WebFrameWork
}

Engine is the core components of goAdmin. It has two attributes. PluginList is an array of plugin. Adapter is the adapter of web framework context and goAdmin context. The relationship of adapter and plugin is that the adapter use the plugin which contains routers and controller methods to inject into the framework entity and make it work.

func Default

func Default() *Engine

Default return the default engine instance.

func (*Engine) AddAdapter

func (eng *Engine) AddAdapter(ada adapter.WebFrameWork) *Engine

AddAdapter add the adapter of engine.

func (*Engine) AddConfig

func (eng *Engine) AddConfig(cfg config.Config) *Engine

AddConfig set the global config.

func (*Engine) AddPlugins

func (eng *Engine) AddPlugins(plugs ...plugins.Plugin) *Engine

AddPlugins add the plugins and initialize them.

func (*Engine) Use

func (eng *Engine) Use(router interface{}) error

Use enable the adapter.

Jump to

Keyboard shortcuts

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