Documentation
¶
Index ¶
- Variables
- func NewRootCmd() (cmd *cobra.Command)
- type CmdCtx
- func (ctx *CmdCtx) AccessControlCheckRunE(cmd *cobra.Command, _ []string) (err error)
- func (ctx *CmdCtx) BuildInfoRunE(cmd *cobra.Command, _ []string) (err error)
- func (ctx *CmdCtx) ChainRunE(cmdRunEs ...CobraRunECmd) CobraRunECmd
- func (ctx *CmdCtx) CheckSchema() (err error)
- func (ctx *CmdCtx) CheckSchemaVersion() (err error)
- func (ctx *CmdCtx) ConfigEnsureExistsRunE(cmd *cobra.Command, _ []string) (err error)
- func (ctx *CmdCtx) ConfigStorageCommandLineConfigRunE(cmd *cobra.Command, _ []string) (err error)
- func (ctx *CmdCtx) ConfigTemplateRunE(cmd *cobra.Command, _ []string) (err error)
- func (ctx *CmdCtx) ConfigValidateLogRunE(_ *cobra.Command, _ []string) (err error)
- func (ctx *CmdCtx) ConfigValidateRunE(cmd *cobra.Command, _ []string) (err error)
- func (ctx *CmdCtx) ConfigValidateSectionPasswordRunE(_ *cobra.Command, _ []string) (err error)
- func (ctx *CmdCtx) ConfigValidateStorageRunE(_ *cobra.Command, _ []string) (err error)
- func (ctx *CmdCtx) CryptoCertificateGenerateRunE(cmd *cobra.Command, _ []string, privateKey any) (err error)
- func (ctx *CmdCtx) CryptoCertificateRequestRunE(cmd *cobra.Command, _ []string) (err error)
- func (ctx *CmdCtx) CryptoGenerateRunE(cmd *cobra.Command, args []string) (err error)
- func (ctx *CmdCtx) CryptoHashGenerateMapFlagsRunE(cmd *cobra.Command, args []string) (err error)
- func (ctx *CmdCtx) CryptoHashGenerateRunE(cmd *cobra.Command, args []string) (err error)
- func (ctx *CmdCtx) CryptoHashValidateRunE(cmd *cobra.Command, args []string) (err error)
- func (ctx *CmdCtx) CryptoPairGenerateRunE(cmd *cobra.Command, _ []string, privateKey any) (err error)
- func (ctx *CmdCtx) CryptoRandRunE(cmd *cobra.Command, args []string) (err error)
- func (ctx *CmdCtx) DebugExpressionRunE(cmd *cobra.Command, args []string) (err error)
- func (ctx *CmdCtx) DebugOIDCClaimsRunE(cmd *cobra.Command, args []string) (err error)
- func (ctx *CmdCtx) DebugTLSRunE(cmd *cobra.Command, args []string) (err error)
- func (ctx *CmdCtx) GetClock() (clock clock.Provider)
- func (ctx *CmdCtx) GetConfiguration() *schema.Configuration
- func (ctx *CmdCtx) GetLogger() *logrus.Entry
- func (ctx *CmdCtx) GetProviders() middlewares.Providers
- func (ctx *CmdCtx) GetRandom() (random random.Provider)
- func (ctx *CmdCtx) HelperConfigLoadRunE(cmd *cobra.Command, _ []string) (err error)
- func (ctx *CmdCtx) HelperConfigSetDefaultsRunE(defaults map[string]any) CobraRunECmd
- func (ctx *CmdCtx) HelperConfigSetFlagsMapRunE(flags *pflag.FlagSet, flagsMap map[string]string, ...) (err error)
- func (ctx *CmdCtx) HelperConfigValidateKeysRunE(_ *cobra.Command, _ []string) (err error)
- func (ctx *CmdCtx) HelperConfigValidateRunE(_ *cobra.Command, _ []string) (err error)
- func (ctx *CmdCtx) LoadProviders() (warns, errs []error)
- func (ctx *CmdCtx) LoadProvidersStorageRunE(cmd *cobra.Command, args []string) (err error)
- func (ctx *CmdCtx) LoadTrustedCertificates() (warns, errs []error)
- func (ctx *CmdCtx) LoadTrustedCertificatesRunE(cmd *cobra.Command, args []string) (err error)
- func (ctx *CmdCtx) LogConfigure(_ *cobra.Command, _ []string) (err error)
- func (ctx *CmdCtx) LogProcessCurrentUserRunE(_ *cobra.Command, _ []string) (err error)
- func (ctx *CmdCtx) NewStorageMigrateListRunE(up bool) func(cmd *cobra.Command, args []string) (err error)
- func (ctx *CmdCtx) NewStorageMigrationRunE(up bool) func(cmd *cobra.Command, args []string) (err error)
- func (ctx *CmdCtx) RootRunE(_ *cobra.Command, _ []string) (err error)
- func (ctx *CmdCtx) StorageBansAddRunE(use string) func(cmd *cobra.Command, args []string) (err error)
- func (ctx *CmdCtx) StorageBansListRunE(use string) func(cmd *cobra.Command, args []string) (err error)
- func (ctx *CmdCtx) StorageBansRevokeRunE(use string) func(cmd *cobra.Command, args []string) (err error)
- func (ctx *CmdCtx) StorageCacheDeleteRunE(name, description string) func(cmd *cobra.Command, args []string) (err error)
- func (ctx *CmdCtx) StorageCacheMDS3DumpRunE(cmd *cobra.Command, args []string) (err error)
- func (ctx *CmdCtx) StorageCacheMDS3StatusRunE(cmd *cobra.Command, args []string) (err error)
- func (ctx *CmdCtx) StorageCacheMDS3UpdateRunE(cmd *cobra.Command, args []string) (err error)
- func (ctx *CmdCtx) StorageMigrateHistoryRunE(cmd *cobra.Command, _ []string) (err error)
- func (ctx *CmdCtx) StorageSchemaEncryptionChangeKeyRunE(cmd *cobra.Command, args []string) (err error)
- func (ctx *CmdCtx) StorageSchemaEncryptionCheckRunE(cmd *cobra.Command, args []string) (err error)
- func (ctx *CmdCtx) StorageSchemaEncryptionRotateRunE(cmd *cobra.Command, args []string) (err error)
- func (ctx *CmdCtx) StorageSchemaInfoRunE(cmd *cobra.Command, _ []string) (err error)
- func (ctx *CmdCtx) StorageUserIdentifiersAddRunE(cmd *cobra.Command, args []string) (err error)
- func (ctx *CmdCtx) StorageUserIdentifiersExportRunE(cmd *cobra.Command, _ []string) (err error)
- func (ctx *CmdCtx) StorageUserIdentifiersGenerateRunE(cmd *cobra.Command, _ []string) (err error)
- func (ctx *CmdCtx) StorageUserIdentifiersImportRunE(cmd *cobra.Command, args []string) (err error)
- func (ctx *CmdCtx) StorageUserTOTPDeleteRunE(cmd *cobra.Command, args []string) (err error)
- func (ctx *CmdCtx) StorageUserTOTPExportCSVRunE(cmd *cobra.Command, _ []string) (err error)
- func (ctx *CmdCtx) StorageUserTOTPExportPNGRunE(cmd *cobra.Command, _ []string) (err error)
- func (ctx *CmdCtx) StorageUserTOTPExportRunE(cmd *cobra.Command, _ []string) (err error)
- func (ctx *CmdCtx) StorageUserTOTPExportURIRunE(cmd *cobra.Command, _ []string) (err error)
- func (ctx *CmdCtx) StorageUserTOTPGenerateRunE(cmd *cobra.Command, args []string) (err error)
- func (ctx *CmdCtx) StorageUserTOTPImportRunE(cmd *cobra.Command, args []string) (err error)
- func (ctx *CmdCtx) StorageUserWebAuthnDeleteRunE(cmd *cobra.Command, args []string) (err error)
- func (ctx *CmdCtx) StorageUserWebAuthnExportRunE(cmd *cobra.Command, _ []string) (err error)
- func (ctx *CmdCtx) StorageUserWebAuthnImportRunE(cmd *cobra.Command, args []string) (err error)
- func (ctx *CmdCtx) StorageUserWebAuthnListAllRunE(cmd *cobra.Command, _ []string) (err error)
- func (ctx *CmdCtx) StorageUserWebAuthnListRunE(cmd *cobra.Command, args []string) (err error)
- func (ctx *CmdCtx) StorageUserWebAuthnVerifyRunE(cmd *cobra.Command, _ []string) (err error)
- type CmdCtxConfig
- type CobraRunECmd
- type XEnvCLIResult
Constants ¶
This section is empty.
Variables ¶
var ErrConfigCreated = errors.New("configuration created")
ErrConfigCreated is returned when the configuration file is created.
var ErrConfirmationMismatch = errors.New("user input didn't match the confirmation prompt")
ErrConfirmationMismatch is returned when user input does not match the confirmation prompt.
var ErrStdinIsNotTerminal = errors.New("stdin is not a terminal")
ErrStdinIsNotTerminal is returned when Stdin is not an interactive terminal.
Functions ¶
Types ¶
type CmdCtx ¶ added in v4.38.0
CmdCtx is a context.Context used for the root command.
func (*CmdCtx) AccessControlCheckRunE ¶ added in v4.38.0
func (*CmdCtx) BuildInfoRunE ¶ added in v4.38.0
BuildInfoRunE is the RunE for the authelia build-info command.
func (*CmdCtx) ChainRunE ¶ added in v4.38.0
func (ctx *CmdCtx) ChainRunE(cmdRunEs ...CobraRunECmd) CobraRunECmd
ChainRunE runs multiple CobraRunECmd funcs one after the other returning errors.
func (*CmdCtx) CheckSchema ¶ added in v4.38.0
CheckSchema is a utility function which checks the schema version and encryption key.
func (*CmdCtx) CheckSchemaVersion ¶ added in v4.38.0
func (*CmdCtx) ConfigEnsureExistsRunE ¶ added in v4.38.0
ConfigEnsureExistsRunE logs the warnings and errors detected during the validations that have ran.
func (*CmdCtx) ConfigStorageCommandLineConfigRunE ¶ added in v4.38.0
ConfigStorageCommandLineConfigRunE configures the storage command mapping.
func (*CmdCtx) ConfigTemplateRunE ¶ added in v4.38.0
ConfigTemplateRunE is the RunE for the authelia validate-config command.
func (*CmdCtx) ConfigValidateLogRunE ¶ added in v4.38.0
ConfigValidateLogRunE logs the warnings and errors detected during the validations that have ran.
func (*CmdCtx) ConfigValidateRunE ¶ added in v4.38.0
ConfigValidateRunE is the RunE for the authelia validate-config command.
func (*CmdCtx) ConfigValidateSectionPasswordRunE ¶ added in v4.38.0
ConfigValidateSectionPasswordRunE validates the configuration (structure, password section).
func (*CmdCtx) ConfigValidateStorageRunE ¶ added in v4.38.0
ConfigValidateStorageRunE validates the storage config before running commands using it.
func (*CmdCtx) CryptoCertificateGenerateRunE ¶ added in v4.38.0
func (ctx *CmdCtx) CryptoCertificateGenerateRunE(cmd *cobra.Command, _ []string, privateKey any) (err error)
CryptoCertificateGenerateRunE is the RunE for the authelia crypto certificate [rsa|ecdsa|ed25519] commands.
func (*CmdCtx) CryptoCertificateRequestRunE ¶ added in v4.38.0
CryptoCertificateRequestRunE is the RunE for the authelia crypto certificate request command.
func (*CmdCtx) CryptoGenerateRunE ¶ added in v4.38.0
CryptoGenerateRunE is the RunE for the authelia crypto [pair|certificate] [rsa|ecdsa|ed25519] commands.
func (*CmdCtx) CryptoHashGenerateMapFlagsRunE ¶ added in v4.38.0
CryptoHashGenerateMapFlagsRunE is the RunE which configures the flags map configuration source for the authelia crypto hash generate commands.
func (*CmdCtx) CryptoHashGenerateRunE ¶ added in v4.38.0
CryptoHashGenerateRunE is the RunE for the authelia crypto hash generate commands.
func (*CmdCtx) CryptoHashValidateRunE ¶ added in v4.38.0
CryptoHashValidateRunE is the RunE for the authelia crypto hash validate command.
func (*CmdCtx) CryptoPairGenerateRunE ¶ added in v4.38.0
func (ctx *CmdCtx) CryptoPairGenerateRunE(cmd *cobra.Command, _ []string, privateKey any) (err error)
CryptoPairGenerateRunE is the RunE for the authelia crypto pair [rsa|ecdsa|ed25519] commands.
func (*CmdCtx) CryptoRandRunE ¶ added in v4.38.0
CryptoRandRunE is the RunE for the authelia crypto rand command.
func (*CmdCtx) DebugExpressionRunE ¶ added in v4.39.2
func (*CmdCtx) DebugOIDCClaimsRunE ¶ added in v4.39.2
func (*CmdCtx) DebugTLSRunE ¶ added in v4.39.2
func (*CmdCtx) GetConfiguration ¶ added in v4.39.0
func (ctx *CmdCtx) GetConfiguration() *schema.Configuration
GetConfiguration returns *schema.Configuration satisfying part of the ServiceCtx.
func (*CmdCtx) GetLogger ¶ added in v4.39.0
GetLogger returns the *logrus.Logger satisfying part of the ServiceCtx.
func (*CmdCtx) GetProviders ¶ added in v4.39.0
func (ctx *CmdCtx) GetProviders() middlewares.Providers
GetProviders returns middlewares.Providers satisfying part of the ServiceCtx.
func (*CmdCtx) HelperConfigLoadRunE ¶ added in v4.38.0
HelperConfigLoadRunE loads the configuration into the CmdCtx.
func (*CmdCtx) HelperConfigSetDefaultsRunE ¶ added in v4.38.0
func (ctx *CmdCtx) HelperConfigSetDefaultsRunE(defaults map[string]any) CobraRunECmd
HelperConfigSetDefaultsRunE adds a defaults configuration source.
func (*CmdCtx) HelperConfigSetFlagsMapRunE ¶ added in v4.38.0
func (ctx *CmdCtx) HelperConfigSetFlagsMapRunE(flags *pflag.FlagSet, flagsMap map[string]string, includeInvalidKeys, includeUnchangedKeys bool) (err error)
HelperConfigSetFlagsMapRunE adds a command line source with flags mapping.
func (*CmdCtx) HelperConfigValidateKeysRunE ¶ added in v4.38.0
HelperConfigValidateKeysRunE validates the configuration (keys).
func (*CmdCtx) HelperConfigValidateRunE ¶ added in v4.38.0
HelperConfigValidateRunE validates the configuration (structure).
func (*CmdCtx) LoadProviders ¶ added in v4.38.0
LoadProviders loads all providers into the CmdCtx.
func (*CmdCtx) LoadProvidersStorageRunE ¶ added in v4.38.0
LoadProvidersStorageRunE is a special PreRunE that loads the storage provider into the CmdCtx.
func (*CmdCtx) LoadTrustedCertificates ¶ added in v4.38.0
LoadTrustedCertificates loads the trusted certificates into the CmdCtx.
func (*CmdCtx) LoadTrustedCertificatesRunE ¶ added in v4.39.2
func (*CmdCtx) LogConfigure ¶ added in v4.38.0
func (*CmdCtx) LogProcessCurrentUserRunE ¶ added in v4.38.0
func (*CmdCtx) NewStorageMigrateListRunE ¶ added in v4.38.0
func (ctx *CmdCtx) NewStorageMigrateListRunE(up bool) func(cmd *cobra.Command, args []string) (err error)
NewStorageMigrateListRunE creates the RunE for the authelia storage migrate list command.
func (*CmdCtx) NewStorageMigrationRunE ¶ added in v4.38.0
func (ctx *CmdCtx) NewStorageMigrationRunE(up bool) func(cmd *cobra.Command, args []string) (err error)
NewStorageMigrationRunE creates the RunE for the authelia storage migrate command.
func (*CmdCtx) StorageBansAddRunE ¶ added in v4.39.0
func (*CmdCtx) StorageBansListRunE ¶ added in v4.39.0
func (*CmdCtx) StorageBansRevokeRunE ¶ added in v4.39.0
func (*CmdCtx) StorageCacheDeleteRunE ¶ added in v4.39.0
func (*CmdCtx) StorageCacheMDS3DumpRunE ¶ added in v4.39.0
func (*CmdCtx) StorageCacheMDS3StatusRunE ¶ added in v4.39.0
func (*CmdCtx) StorageCacheMDS3UpdateRunE ¶ added in v4.39.0
func (*CmdCtx) StorageMigrateHistoryRunE ¶ added in v4.38.0
StorageMigrateHistoryRunE is the RunE for the authelia storage migrate history command.
func (*CmdCtx) StorageSchemaEncryptionChangeKeyRunE ¶ added in v4.38.0
func (ctx *CmdCtx) StorageSchemaEncryptionChangeKeyRunE(cmd *cobra.Command, args []string) (err error)
StorageSchemaEncryptionChangeKeyRunE is the RunE for the authelia storage encryption change-key command.
func (*CmdCtx) StorageSchemaEncryptionCheckRunE ¶ added in v4.38.0
func (*CmdCtx) StorageSchemaEncryptionRotateRunE ¶ added in v4.39.17
StorageSchemaEncryptionRotateRunE is the RunE for the authelia storage encryption rotate commands.
func (*CmdCtx) StorageSchemaInfoRunE ¶ added in v4.38.0
StorageSchemaInfoRunE is the RunE for the authelia storage schema info command.
func (*CmdCtx) StorageUserIdentifiersAddRunE ¶ added in v4.38.0
StorageUserIdentifiersAddRunE is the RunE for the authelia storage user identifiers add command.
func (*CmdCtx) StorageUserIdentifiersExportRunE ¶ added in v4.38.0
StorageUserIdentifiersExportRunE is the RunE for the authelia storage user identifiers export command.
func (*CmdCtx) StorageUserIdentifiersGenerateRunE ¶ added in v4.38.0
StorageUserIdentifiersGenerateRunE is the RunE for the authelia storage user identifiers generate command.
func (*CmdCtx) StorageUserIdentifiersImportRunE ¶ added in v4.38.0
StorageUserIdentifiersImportRunE is the RunE for the authelia storage user identifiers import command.
func (*CmdCtx) StorageUserTOTPDeleteRunE ¶ added in v4.38.0
StorageUserTOTPDeleteRunE is the RunE for the authelia storage user totp delete command.
func (*CmdCtx) StorageUserTOTPExportCSVRunE ¶ added in v4.38.0
func (*CmdCtx) StorageUserTOTPExportPNGRunE ¶ added in v4.38.0
func (*CmdCtx) StorageUserTOTPExportRunE ¶ added in v4.38.0
StorageUserTOTPExportRunE is the RunE for the authelia storage user totp export command.
func (*CmdCtx) StorageUserTOTPExportURIRunE ¶ added in v4.38.0
func (*CmdCtx) StorageUserTOTPGenerateRunE ¶ added in v4.38.0
StorageUserTOTPGenerateRunE is the RunE for the authelia storage user totp generate command.
func (*CmdCtx) StorageUserTOTPImportRunE ¶ added in v4.38.0
func (*CmdCtx) StorageUserWebAuthnDeleteRunE ¶ added in v4.38.0
StorageUserWebAuthnDeleteRunE is the RunE for the authelia storage user webauthn delete command.
func (*CmdCtx) StorageUserWebAuthnExportRunE ¶ added in v4.38.0
func (*CmdCtx) StorageUserWebAuthnImportRunE ¶ added in v4.38.0
func (*CmdCtx) StorageUserWebAuthnListAllRunE ¶ added in v4.38.0
StorageUserWebAuthnListAllRunE is the RunE for the authelia storage user webauthn list command when no args are specified.
func (*CmdCtx) StorageUserWebAuthnListRunE ¶ added in v4.38.0
StorageUserWebAuthnListRunE is the RunE for the authelia storage user webauthn list command.
type CmdCtxConfig ¶ added in v4.38.0
type CmdCtxConfig struct {
// contains filtered or unexported fields
}
CmdCtxConfig is the configuration for the CmdCtx.
func NewCmdCtxConfig ¶ added in v4.38.0
func NewCmdCtxConfig() *CmdCtxConfig
NewCmdCtxConfig returns a new CmdCtxConfig.
type CobraRunECmd ¶ added in v4.38.0
CobraRunECmd describes a function that can be used as a *cobra.Command RunE, PreRunE, or PostRunE.
type XEnvCLIResult ¶ added in v4.38.0
type XEnvCLIResult int
const ( XEnvCLIResultCLIExplicit XEnvCLIResult = iota XEnvCLIResultCLIImplicit XEnvCLIResultEnvironment )