Documentation ¶
Index ¶
- func Content(ctx interface{}, panel types.GetPanelFn)
- func Register(ada adapter.WebFrameWork)
- func User(ci interface{}) (models.UserModel, bool)
- type ConnectionSetter
- type Engine
- func (eng *Engine) AddAdapter(ada adapter.WebFrameWork) *Engine
- func (eng *Engine) AddConfig(cfg config.Config) *Engine
- func (eng *Engine) AddConfigFromINI(path string) *Engine
- func (eng *Engine) AddConfigFromJSON(path string) *Engine
- func (eng *Engine) AddConfigFromYAML(path string) *Engine
- func (eng *Engine) AddPlugins(plugs ...plugins.Plugin) *Engine
- func (eng *Engine) Clone(e *Engine) *Engine
- func (eng *Engine) ClonedBySetter(setter Setter) *Engine
- func (eng *Engine) Content(ctx interface{}, panel types.GetPanelFn)
- func (eng *Engine) DB(driver string) db.Connection
- func (eng *Engine) InitDatabase() *Engine
- func (eng *Engine) MssqlConnection() db.Connection
- func (eng *Engine) MysqlConnection() db.Connection
- func (eng *Engine) PostgresqlConnection() db.Connection
- func (eng *Engine) ResolveConnection(setter ConnectionSetter, driver string) *Engine
- func (eng *Engine) ResolveMssqlConnection(setter ConnectionSetter) *Engine
- func (eng *Engine) ResolveMysqlConnection(setter ConnectionSetter) *Engine
- func (eng *Engine) ResolvePostgresqlConnection(setter ConnectionSetter) *Engine
- func (eng *Engine) ResolveSqliteConnection(setter ConnectionSetter) *Engine
- func (eng *Engine) SqliteConnection() db.Connection
- func (eng *Engine) Use(router interface{}) error
- func (eng *Engine) User(ci interface{}) (models.UserModel, bool)
- type Setter
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Content ¶
func Content(ctx interface{}, panel types.GetPanelFn)
Content call the Content method of defaultAdapter. If defaultAdapter is nil, it will panic.
Types ¶
type ConnectionSetter ¶ added in v1.1.4
type ConnectionSetter func(db.Connection)
type Engine ¶
type Engine struct { PluginList []plugins.Plugin Adapter adapter.WebFrameWork Services service.List // contains filtered or unexported fields }
Engine is the core component 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 (*Engine) AddAdapter ¶
func (eng *Engine) AddAdapter(ada adapter.WebFrameWork) *Engine
AddAdapter add the adapter of engine.
func (*Engine) AddConfigFromINI ¶ added in v1.1.4
AddConfigFromINI set the global config from ini file.
func (*Engine) AddConfigFromJSON ¶ added in v1.1.4
AddConfigFromJSON set the global config from json file.
func (*Engine) AddConfigFromYAML ¶ added in v1.1.4
AddConfigFromYAML set the global config from yaml file.
func (*Engine) AddPlugins ¶
AddPlugins add the plugins and initialize them.
func (*Engine) ClonedBySetter ¶ added in v1.1.4
func (*Engine) Content ¶ added in v1.1.4
func (eng *Engine) Content(ctx interface{}, panel types.GetPanelFn)
Content call the Content method of adapter of engine. If adapter is nil, it will panic.
func (*Engine) DB ¶ added in v1.1.4
func (eng *Engine) DB(driver string) db.Connection
db return the db connection of given driver.
func (*Engine) InitDatabase ¶ added in v1.1.4
InitDatabase initialize all database connection.
func (*Engine) MssqlConnection ¶ added in v1.1.4
func (eng *Engine) MssqlConnection() db.Connection
MssqlConnection return the mssql db connection of given driver.
func (*Engine) MysqlConnection ¶ added in v1.1.4
func (eng *Engine) MysqlConnection() db.Connection
MysqlConnection return the mysql db connection of given driver.
func (*Engine) PostgresqlConnection ¶ added in v1.1.4
func (eng *Engine) PostgresqlConnection() db.Connection
PostgresqlConnection return the postgresql db connection of given driver.
func (*Engine) ResolveConnection ¶ added in v1.1.4
func (eng *Engine) ResolveConnection(setter ConnectionSetter, driver string) *Engine
func (*Engine) ResolveMssqlConnection ¶ added in v1.1.4
func (eng *Engine) ResolveMssqlConnection(setter ConnectionSetter) *Engine
func (*Engine) ResolveMysqlConnection ¶ added in v1.1.4
func (eng *Engine) ResolveMysqlConnection(setter ConnectionSetter) *Engine
func (*Engine) ResolvePostgresqlConnection ¶ added in v1.1.4
func (eng *Engine) ResolvePostgresqlConnection(setter ConnectionSetter) *Engine
func (*Engine) ResolveSqliteConnection ¶ added in v1.1.4
func (eng *Engine) ResolveSqliteConnection(setter ConnectionSetter) *Engine
func (*Engine) SqliteConnection ¶ added in v1.1.4
func (eng *Engine) SqliteConnection() db.Connection
SqliteConnection return the sqlite db connection of given driver.