Documentation ¶
Overview ¶
Package command provides command configuration for SFTPGo hooks
Index ¶
Constants ¶
View Source
const ( HookFsActions = "fs_actions" HookProviderActions = "provider_actions" HookStartup = "startup" HookPostConnect = "post_connect" HookPostDisconnect = "post_disconnect" HookDataRetention = "data_retention" HookCheckPassword = "check_password" HookPreLogin = "pre_login" HookPostLogin = "post_login" HookExternalAuth = "external_auth" HookKeyboardInteractive = "keyboard_interactive" )
Supported hook names
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Command ¶
type Command struct { // Path is the command path as defined in the hook configuration Path string `json:"path" mapstructure:"path"` // Timeout specifies a time limit, in seconds, for the command execution. // This value overrides the global timeout if set. // Do not use variables with the SFTPGO_ prefix to avoid conflicts with env // vars that SFTPGo sets Timeout int `json:"timeout" mapstructure:"timeout"` // Env defines environment variable for the command. // Each entry is of the form "key=value". // These values are added to the global environment variables if any Env []string `json:"env" mapstructure:"env"` // Args defines arguments to pass to the specified command Args []string `json:"args" mapstructure:"args"` // if not empty both command path and hook name must match Hook string `json:"hook" mapstructure:"hook"` }
Command define the configuration for a specific commands
type Config ¶
type Config struct { // Timeout specifies a global time limit, in seconds, for the external commands execution Timeout int `json:"timeout" mapstructure:"timeout"` // Env defines environment variable for the commands. // Each entry is of the form "key=value". // Do not use variables with the SFTPGO_ prefix to avoid conflicts with env // vars that SFTPGo sets Env []string `json:"env" mapstructure:"env"` // Commands defines configuration for specific commands Commands []Command `json:"commands" mapstructure:"commands"` }
Config defines the configuration for external commands such as program based hooks
Click to show internal directories.
Click to hide internal directories.