Documentation ¶
Overview ¶
Package config manages the configuration. Configuration is loaded from sftpgo.conf file. If sftpgo.conf is not found or cannot be readed or decoded as json the default configuration is used. The default configuration an be found inside the source tree: https://github.com/drakkan/sftpgo/blob/master/sftpgo.conf
Index ¶
- Constants
- func GetHTTPConfig() httpclient.Config
- func GetHTTPDConfig() httpd.Conf
- func GetProviderConf() dataprovider.Config
- func GetSFTPDConfig() sftpd.Configuration
- func LoadConfig(configDir, configName string) error
- func SetHTTPDConfig(config httpd.Conf)
- func SetProviderConf(config dataprovider.Config)
- func SetSFTPDConfig(config sftpd.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 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 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 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
Types ¶
This section is empty.