Documentation ¶
Overview ¶
Package config manages the configuration
Index ¶
- Constants
- func GetCommonConfig() common.Configuration
- func GetFTPDConfig() ftpd.Configuration
- func GetHTTPConfig() httpclient.Config
- func GetHTTPDConfig() httpd.Conf
- func GetProviderConf() dataprovider.Config
- func GetSFTPDConfig() sftpd.Configuration
- func GetWebDAVDConfig() webdavd.Configuration
- func LoadConfig(configDir, configName string) error
- func SetCommonConfig(config common.Configuration)
- func SetFTPDConfig(config ftpd.Configuration)
- func SetHTTPDConfig(config httpd.Conf)
- func SetProviderConf(config dataprovider.Config)
- func SetSFTPDConfig(config sftpd.Configuration)
- func SetWebDAVDConfig(config webdavd.Configuration)
Constants ¶
const ( // DefaultConfigName defines the name for the default config file. // This is the file name without extension, we use viper and so we // support all the config files format supported by viper DefaultConfigName = "sftpgo" )
Variables ¶
This section is empty.
Functions ¶
func GetCommonConfig ¶ added in v1.1.0
func GetCommonConfig() common.Configuration
GetCommonConfig returns the common protocols configuration
func GetFTPDConfig ¶ added in v1.1.0
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 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 GetWebDAVDConfig ¶ added in v1.1.0
func GetWebDAVDConfig() webdavd.Configuration
GetWebDAVDConfig returns the configuration for the WebDAV server
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. configName is the name of the configuration to search without extension
func SetCommonConfig ¶ added in v1.1.0
func SetCommonConfig(config common.Configuration)
SetCommonConfig sets the common protocols configuration
func SetFTPDConfig ¶ added in v1.1.0
func SetFTPDConfig(config ftpd.Configuration)
SetFTPDConfig sets the configuration for the FTP server
func SetHTTPDConfig ¶
SetHTTPDConfig sets the configuration for the HTTP server
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 SetWebDAVDConfig ¶ added in v1.1.0
func SetWebDAVDConfig(config webdavd.Configuration)
SetWebDAVDConfig sets the configuration for the WebDAV server
Types ¶
This section is empty.