config

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Jul 6, 2020 License: GPL-3.0 Imports: 10 Imported by: 0

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

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

Types

This section is empty.

Jump to

Keyboard shortcuts

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