Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var AppContext context.Context
AppContext to be used by Globally required application objects. Warning: this context is essential to Ghast's ability to function correctly. Override values in this context at your own risk.
Functions ¶
This section is empty.
Types ¶
type App ¶
type App struct {
// contains filtered or unexported fields
}
App defines a struct that encapsulates the entire ghast framework + application specific settings generally, you should use the NewApp function instead of creating a struct instance directly, but we have chosen to support creating the struct directly to have better control of the app creation process.
func GetApp ¶
func GetApp(c *ghastContainer.Container) App
GetApp gets the app instance out of a given container
func NewApp ¶
func NewApp() App
NewApp constructor function for ghast app Generally, you'll want to use this over creating a new struct instance directly.
func NewAppWithConfig ¶
func NewAppWithConfig(debugOptions DebugOptions) App
NewAppWithConfig constructor function for ghast app with a separate app config (used for debugging purposes) Note: depending on your config, this can log a LOT of data to STDOUT. You will most likely want `NewApp` for production deployments.
func (App) GetViewSet ¶
GetViewSet Gets the Application's JET view set
func (App) Register ¶
func (a App) Register(key string, fn func(c *ghastContainer.Container) interface{})
Register registers a new key value binding in the Application's DI container
func (App) SetRouter ¶
func (a App) SetRouter(router ghastRouter.Router)
SetRouter sets a user configured ghast router to be used as the application's default router.
func (App) SetServerConfig ¶
SetServerConfig provides the app with a custom use Server configuration
type DebugOptions ¶
type DebugOptions struct {
ShouldDebugConfig bool
}
DebugOptions provides additional options for debugging application creation and start