Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Application ¶
type Application struct {
// contains filtered or unexported fields
}
Application struct
func (*Application) Config ¶
func (d *Application) Config() *viper.Viper
Config returns the viper config for this application
func (*Application) Env ¶
func (d *Application) Env() string
func (*Application) Get ¶
func (d *Application) Get(key Key) Extension
Get the extension at the specified key, return nil when the component doesn't exist
func (*Application) GetOK ¶
func (d *Application) GetOK(key Key) (Extension, bool)
GetOK the extension at the specified key, return false when the component doesn't exist
func (*Application) Init ¶
func (d *Application) Init() error
Init the application and its extensions with the config.
type Extension ¶
type Extension interface { Object() interface{} Application() *Application Init(app *Application) error Close() error }
Extension like db, cache
Click to show internal directories.
Click to hide internal directories.