{"modulePath":"github.com/cppfuns/go-admin","version":"v0.0.2","isLatest":true,"isStandardLibrary":false,"goos":"all","goarch":"all","docs":"# package engine\n\n## Variables\n\n```go\nvar DefaultAdapter adapter.WebFrameWork\n```\n\n## Functions\n\n```go\nfunc Content(ctx interface{}, panel types.GetPanel)\n```\n\n```go\nfunc Register(ada adapter.WebFrameWork)\n```\n\n## Types\n\n```go\ntype Engine struct {\n\tPluginList []plugins.Plugin\n\tAdapter    adapter.WebFrameWork\n}\n```\nEngine 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.\n\n```go\nfunc Default() *Engine\n```\nDefault return the default engine instance.\n\n```go\nfunc (eng *Engine) AddAdapter(ada adapter.WebFrameWork) *Engine\n```\nAddAdapter add the adapter of engine.\n\n```go\nfunc (eng *Engine) AddConfig(cfg config.Config) *Engine\n```\nAddConfig set the global config.\n\n```go\nfunc (eng *Engine) AddPlugins(plugs ...plugins.Plugin) *Engine\n```\nAddPlugins add the plugins and initialize them.\n\n```go\nfunc (eng *Engine) Use(router interface{}) error\n```\nUse enable the adapter.\n\n","path":"github.com/cppfuns/go-admin/engine","name":"engine","synopsis":"","isRedistributable":true}
