Documentation
¶
Index ¶
- func NewAppLogger(appName string, appVersion string, logPlugin ambient.LoggingPlugin, ...) (ambient.AppLogger, error)
- type App
- func (app *App) CleanUp()
- func (app *App) Handler() (http.Handler, error)
- func (app *App) ListenAndServe(h http.Handler) error
- func (app *App) PluginSystem() ambient.PluginSystem
- func (app *App) SecureSite() *secureconfig.SecureSite
- func (app *App) SetDebugTemplates(enable bool)
- func (app *App) SetEscapeTemplates(enable bool)
- func (app *App) SetLogLevel(level ambient.LogLevel)
- func (app *App) StopGRPCClients()
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type App ¶
type App struct {
// contains filtered or unexported fields
}
App represents an Ambient app that supports plugins.
func NewApp ¶
func NewApp(appName string, appVersion string, logPlugin ambient.LoggingPlugin, storagePluginGroup ambient.StoragePluginGroup, plugins *ambient.PluginLoader) (*App, ambient.AppLogger, error)
NewApp returns a new Ambient app that supports plugins.
func (*App) CleanUp ¶
func (app *App) CleanUp()
CleanUp runs the final steps to ensure the server shutdown doesn't leave the app in a bad state.
func (*App) ListenAndServe ¶
ListenAndServe will start the web listener on port 8080 or will pull the environment variable from: PORT (GCP), _LAMBDA_SERVER_PORT (AWS), or FUNCTIONS_CUSTOMHANDLER_PORT (Azure).
func (*App) PluginSystem ¶
func (app *App) PluginSystem() ambient.PluginSystem
PluginSystem returns the plugin system.
func (*App) SecureSite ¶
func (app *App) SecureSite() *secureconfig.SecureSite
SecureSite returns the secure site configuration.
func (*App) SetDebugTemplates ¶
SetDebugTemplates sets the injector to enable verbose debug output in templates.
func (*App) SetEscapeTemplates ¶
SetEscapeTemplates sets the injector to disable (enabled by default) escaping templates.
func (*App) SetLogLevel ¶
SetLogLevel sets the log level.
func (*App) StopGRPCClients ¶
func (app *App) StopGRPCClients()
StopGRPCClients stops the gRPC plugins.