config

package
v2.13.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 26, 2025 License: MIT Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DefaultStorage

func DefaultStorage(logger *slog.Logger) model.ConfigurationStorage

DefaultStorage trying to create a default storage with default file

func ImportApps

func ImportApps(filename string, storage model.AppStorage, cleanOldData bool) error

ImportApps imports apps from file.

func ImportManagement added in v2.4.5

func ImportManagement(filename string, storage model.ManagementKeysStorage, cleanOldData bool) error

ImportUsers imports users from file.

func ImportUsers

func ImportUsers(filename string, storage model.UserStorage, cleanOldData bool) error

ImportUsers imports users from file.

func InitConfigurationStorage

func InitConfigurationStorage(
	logger *slog.Logger,
	config model.FileStorageSettings,
) (model.ConfigurationStorage, error)

InitConfigurationStorage initializes configuration storage.

func InitConfigurationStorageFromFlag

func InitConfigurationStorageFromFlag(logger *slog.Logger, configFlag string) (model.ConfigurationStorage, error)

InitConfigurationStorageFromFlag initializes configuration storage from flag. config storage should: load default settings if the originals settings file is unavailable continue check desired config location in case the proper config file appear validate config settings if server settings are invalid - load fallback settings and mark itself ad invalid continue to listen for file location and reload it in case it changed

this means that the location for settings is valid but settings are invalid or unreachable both things could be fixed while the app is running that is why Identifo should run, letting the admin to fix it

func NewConfigWatcher

func NewConfigWatcher(logger *slog.Logger, settings model.FileStorageSettings) (model.ConfigurationWatcher, error)

func NewImpersonationProvider added in v2.9.0

func NewImpersonationProvider(
	logger *slog.Logger,
	settings model.ImpersonationSettings,
) (model.ImpersonationProvider, error)

func NewServer

func NewServer(config model.ConfigurationStorage, restartChan chan<- bool) (model.Server, error)

NewServer creates new server instance from ServerSettings

func NewServerFromFlag

func NewServerFromFlag(logger *slog.Logger, configFlag string, restartChan chan<- bool) (model.Server, error)

func NewTokenService

func NewTokenService(
	logger *slog.Logger,
	settings model.GeneralServerSettings,
	storages model.ServerStorageCollection,
) (model.TokenService, error)

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL