Documentation ¶
Overview ¶
Package config manages the configuration
Index ¶
- func GetACMEConfig() acme.Configuration
- func GetCommandConfig() command.Config
- func GetCommonConfig() common.Configuration
- func GetFTPDConfig() ftpd.Configuration
- func GetHTTPConfig() httpclient.Config
- func GetHTTPDConfig() httpd.Conf
- func GetKMSConfig() kms.Configuration
- func GetMFAConfig() mfa.Config
- func GetPluginsConfig() []plugin.Config
- func GetProviderConf() dataprovider.Config
- func GetSFTPDConfig() sftpd.Configuration
- func GetSMTPConfig() smtp.Config
- func GetTelemetryConfig() telemetry.Conf
- func GetWebDAVDConfig() webdavd.Configuration
- func HasServicesToStart() bool
- func Init()
- func LoadConfig(configDir, configFile string) error
- func SetCommonConfig(config common.Configuration)
- func SetFTPDConfig(config ftpd.Configuration)
- func SetHTTPDConfig(config httpd.Conf)
- func SetKMSConfig(config kms.Configuration)
- func SetPluginsConfig(config []plugin.Config)
- func SetProviderConf(config dataprovider.Config)
- func SetSFTPDConfig(config sftpd.Configuration)
- func SetTelemetryConfig(config telemetry.Conf)
- func SetWebDAVDConfig(config webdavd.Configuration)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetACMEConfig ¶
func GetACMEConfig() acme.Configuration
GetACMEConfig returns the ACME configuration
func GetCommandConfig ¶
GetCommandConfig returns the configuration for external commands
func GetCommonConfig ¶
func GetCommonConfig() common.Configuration
GetCommonConfig returns the common protocols configuration
func GetFTPDConfig ¶
func GetFTPDConfig() ftpd.Configuration
GetFTPDConfig returns the configuration for the FTP server
func GetHTTPConfig ¶
func GetHTTPConfig() httpclient.Config
GetHTTPConfig returns the configuration for HTTP clients
func GetHTTPDConfig ¶
GetHTTPDConfig returns the configuration for the HTTP server
func GetKMSConfig ¶
func GetKMSConfig() kms.Configuration
GetKMSConfig returns the KMS configuration
func GetMFAConfig ¶
GetMFAConfig returns multi-factor authentication config
func GetPluginsConfig ¶
GetPluginsConfig returns the plugins configuration
func GetProviderConf ¶
func GetProviderConf() dataprovider.Config
GetProviderConf returns the configuration for the data provider
func GetSFTPDConfig ¶
func GetSFTPDConfig() sftpd.Configuration
GetSFTPDConfig returns the configuration for the SFTP server
func GetTelemetryConfig ¶
GetTelemetryConfig returns the telemetry configuration
func GetWebDAVDConfig ¶
func GetWebDAVDConfig() webdavd.Configuration
GetWebDAVDConfig returns the configuration for the WebDAV server
func HasServicesToStart ¶
func HasServicesToStart() bool
HasServicesToStart returns true if the config defines at least a service to start. Supported services are SFTP, FTP and WebDAV
func Init ¶
func Init()
Init initializes the global configuration. It is not supposed to be called outside of this package. It is exported to minimize refactoring efforts. Will eventually disappear.
func LoadConfig ¶
LoadConfig loads the configuration configDir will be added to the configuration search paths. The search path contains by default the current directory and on linux it contains $HOME/.config/sftpgo and /etc/sftpgo too. configFile is an absolute or relative path (to the config dir) to the configuration file.
func SetCommonConfig ¶
func SetCommonConfig(config common.Configuration)
SetCommonConfig sets the common protocols configuration
func SetFTPDConfig ¶
func SetFTPDConfig(config ftpd.Configuration)
SetFTPDConfig sets the configuration for the FTP server
func SetHTTPDConfig ¶
SetHTTPDConfig sets the configuration for the HTTP server
func SetKMSConfig ¶
func SetKMSConfig(config kms.Configuration)
SetKMSConfig sets the kms configuration
func SetPluginsConfig ¶
SetPluginsConfig sets the plugin configuration
func SetProviderConf ¶
func SetProviderConf(config dataprovider.Config)
SetProviderConf sets the configuration for the data provider
func SetSFTPDConfig ¶
func SetSFTPDConfig(config sftpd.Configuration)
SetSFTPDConfig sets the configuration for the SFTP server
func SetTelemetryConfig ¶
SetTelemetryConfig sets the telemetry configuration
func SetWebDAVDConfig ¶
func SetWebDAVDConfig(config webdavd.Configuration)
SetWebDAVDConfig sets the configuration for the WebDAV server
Types ¶
This section is empty.