config

package
v1.2.2 Latest Latest
Warning

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

Go to latest
Published: Nov 18, 2020 License: GPL-3.0 Imports: 13 Imported by: 0

Documentation

Overview

Package config manages the configuration

Index

Constants

View Source
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

func GetHTTPDConfig() httpd.Conf

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

func LoadConfig(configDir, configName string) error

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

func SetHTTPDConfig(config httpd.Conf)

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.

Jump to

Keyboard shortcuts

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