mirror of
https://github.com/authelia/authelia.git
synced 2026-10-28 09:34:52 +08:00
36 lines
758 B
Go
36 lines
758 B
Go
// SPDX-FileCopyrightText: 2026 Authelia
|
|
//
|
|
// SPDX-License-Identifier: Apache-2.0
|
|
|
|
package embed
|
|
|
|
import (
|
|
"fmt"
|
|
|
|
"github.com/authelia/authelia/v4/internal/service"
|
|
)
|
|
|
|
// ProvidersStartupCheck performs the startup checks for all providers given a context.
|
|
func ProvidersStartupCheck(ctx Context, log bool) (err error) {
|
|
providers := ctx.GetProviders()
|
|
|
|
return providers.StartupChecks(ctx, log)
|
|
}
|
|
|
|
// ServiceRunAll runs all services given a context.
|
|
func ServiceRunAll(ctx Context) (err error) {
|
|
if ctx == nil {
|
|
return fmt.Errorf("no context provided")
|
|
}
|
|
|
|
if ctx.GetConfiguration() == nil {
|
|
return fmt.Errorf("no configuration provided")
|
|
}
|
|
|
|
if ctx.GetLogger() == nil {
|
|
return fmt.Errorf("no logger provided")
|
|
}
|
|
|
|
return service.RunAll(ctx)
|
|
}
|