Documentation ¶
Index ¶
- func GetAppConfig() *config.AppConfig
- func GetAzureCredential() azcore.TokenCredential
- func GetAzureCredentialFunc() func() azcore.TokenCredential
- type App
- type AppBuilder
- func (b *AppBuilder) AddConfig(config *config.AppConfig) *AppBuilder
- func (b *AppBuilder) AddReadinessCheck(check diagnostics.HealthCheck) *AppBuilder
- func (b *AppBuilder) AddRoutes(configure ConfigureRoutesFunc) *AppBuilder
- func (b *AppBuilder) AddService(service BackgroundService) *AppBuilder
- func (b *AppBuilder) AddTask(task tasks.Task) *AppBuilder
- func (b *AppBuilder) Build(configure ConfigureEchoFunc) *App
- type AppStartOptions
- type BackgroundService
- type ConfigureAppConfigFunc
- type ConfigureEchoFunc
- type ConfigureRoutesFunc
- type Route
- type RouteOptions
- type Routes
- type SecurityContext
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetAzureCredential ¶
func GetAzureCredential() azcore.TokenCredential
func GetAzureCredentialFunc ¶
func GetAzureCredentialFunc() func() azcore.TokenCredential
Types ¶
type App ¶
type App struct {
// contains filtered or unexported fields
}
func (*App) GetHealthCheckResults ¶
func (app *App) GetHealthCheckResults() []diagnostics.HealthCheckResult
whether the app is ready
func (*App) Start ¶
func (app *App) Start(options *AppStartOptions) error
Start starts the server port: the port to listen on configure: (optional) a function to configure the echo server
type AppBuilder ¶
type AppBuilder struct {
// contains filtered or unexported fields
}
func NewAppBuilder ¶
func NewAppBuilder(name string) *AppBuilder
func (*AppBuilder) AddConfig ¶
func (b *AppBuilder) AddConfig(config *config.AppConfig) *AppBuilder
func (*AppBuilder) AddReadinessCheck ¶
func (b *AppBuilder) AddReadinessCheck(check diagnostics.HealthCheck) *AppBuilder
adds readiness checks to the app instance when it starts. The order that the checks are added will be the order in which they are executed.
func (*AppBuilder) AddRoutes ¶
func (b *AppBuilder) AddRoutes(configure ConfigureRoutesFunc) *AppBuilder
func (*AppBuilder) AddService ¶
func (b *AppBuilder) AddService(service BackgroundService) *AppBuilder
func (*AppBuilder) AddTask ¶
func (b *AppBuilder) AddTask(task tasks.Task) *AppBuilder
func (*AppBuilder) Build ¶
func (b *AppBuilder) Build(configure ConfigureEchoFunc) *App
type AppStartOptions ¶
type AppStartOptions struct { Port *int ConfigureWebServer ConfigureEchoFunc WebServer bool }
type BackgroundService ¶
type BackgroundService interface { Start() Stop() GetName() string }
service that can be run in the background, started and stopped
type ConfigureAppConfigFunc ¶
type ConfigureAppConfigFunc func(config any)
type ConfigureEchoFunc ¶
type ConfigureEchoFunc func(e *echo.Echo)
type ConfigureRoutesFunc ¶
type ConfigureRoutesFunc func(options *RouteOptions)
type RouteOptions ¶
type SecurityContext ¶
type SecurityContext struct { }
func (*SecurityContext) GetAzureCredential ¶
func (c *SecurityContext) GetAzureCredential() azcore.TokenCredential
Click to show internal directories.
Click to hide internal directories.