config

package
v2.0.0-...-83f77b2 Latest Latest
Warning

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

Go to latest
Published: Dec 3, 2022 License: AGPL-3.0 Imports: 25 Imported by: 0

Documentation

Overview

Package config manages the configuration

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetACMEConfig

func GetACMEConfig() acme.Configuration

GetACMEConfig returns the ACME configuration

func GetCommandConfig

func GetCommandConfig() command.Config

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

func GetHTTPDConfig() httpd.Conf

GetHTTPDConfig returns the configuration for the HTTP server

func GetKMSConfig

func GetKMSConfig() kms.Configuration

GetKMSConfig returns the KMS configuration

func GetMFAConfig

func GetMFAConfig() mfa.Config

GetMFAConfig returns multi-factor authentication config

func GetPluginsConfig

func GetPluginsConfig() []plugin.Config

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 GetSMTPConfig

func GetSMTPConfig() smtp.Config

GetSMTPConfig returns the SMTP configuration

func GetTelemetryConfig

func GetTelemetryConfig() telemetry.Conf

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

func LoadConfig(configDir, configFile 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. 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

func SetHTTPDConfig(config httpd.Conf)

SetHTTPDConfig sets the configuration for the HTTP server

func SetKMSConfig

func SetKMSConfig(config kms.Configuration)

SetKMSConfig sets the kms configuration

func SetPluginsConfig

func SetPluginsConfig(config []plugin.Config)

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

func SetTelemetryConfig(config telemetry.Conf)

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.

Jump to

Keyboard shortcuts

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