Documentation
¶
Overview ¶
Package confpar provide the core parameters of the config
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Access ¶
type Access struct {
User string `json:"user"` // User authenticating
Pass string `json:"pass"` // Password used for authentication
Fs string `json:"fs"` // Backend used for accessing file
Params map[string]string `json:"params"` // Backend parameters
Logging Logging `json:"logging"` // Logging parameters
ReadOnly bool `json:"read_only"` // Read-only access
SyncAndDelete *SyncAndDelete `json:"sync_and_delete"` // Local empty directory and synchronization
}
Access provides rules around any access
type AccessesWebhook ¶ added in v0.15.0
type AccessesWebhook struct {
URL string `json:"url"` // URL to call
Headers map[string]string `json:"headers"` // Token to use in the
Timeout Duration `json:"timeout"` // Max time request can take
}
AccessesWebhook defines an optional webhook to get user's access
type Content ¶
type Content struct {
Version int `json:"version"` // File format version
ListenAddress string `json:"listen_address"` // Address to listen on
PublicHost string `json:"public_host"` // Public host to listen on
MaxClients int `json:"max_clients"` // Maximum clients who can connect
HashPlaintextPasswords bool `json:"hash_plaintext_passwords"` // Overwrite plain-text passwords with hashed equivalents
IdleTimeout Duration `json:"idle_timeout"` // Maximum idle time for client connections
Accesses []*Access `json:"accesses"` // Accesses offered to users
PassiveTransferPortRange *PortRange `json:"passive_transfer_port_range"` // Listen port range
Extensions Extensions `json:"extensions"` // Extended features
Logging Logging `json:"logging"` // Logging parameters
TLS *TLS `json:"tls"` // TLS Config
TLSRequired string `json:"tls_required"`
AccessesWebhook *AccessesWebhook `json:"accesses_webhook"` // Webhook to call when accesses are updated
}
Content defines the content of the config file
type Duration ¶ added in v0.15.0
Duration wraps time.Duration to allow unmarshaling from JSON strings in Go duration format (e.g., "5m", "30s", "1h")
func (*Duration) MarshalJSON ¶ added in v0.15.0
func (*Duration) UnmarshalJSON ¶ added in v0.15.0
type Extensions ¶ added in v0.15.0
type Extensions struct {
EnableHASH bool `json:"enable_hash"` // Enable support for calculating hash value of files
}
Extensions define the relevant configurations for extended features
type Logging ¶ added in v0.8.0
type Logging struct {
FtpExchanges bool `json:"ftp_exchanges"` // Log all ftp exchanges
FileAccesses bool `json:"file_accesses"` // Log all file accesses
File string `json:"file"` // Log file
}
Logging defines how we will log accesses
type PortRange ¶
type PortRange struct {
Start int `json:"start"` // Start of the range
End int `json:"end"` // End of the range
}
PortRange defines a port-range ... used only for the passive transfer listening range at this stage.
type ServerCert ¶ added in v0.10.0
type ServerCert struct {
Cert string `json:"cert"` // Public certificate(s)
Key string `json:"key"` // Private key
}
ServerCert defines the TLS server certificate config
type SyncAndDelete ¶ added in v0.10.0
type SyncAndDelete struct {
Enable bool `json:"enable"` // Instant write
Directory string `json:"directory"` // Directory
}
SyncAndDelete provides
type TLS ¶ added in v0.10.0
type TLS struct {
ServerCert *ServerCert `json:"server_cert"` // Server certificates
}
TLS define the TLS Config