Documentation ¶
Index ¶
Constants ¶
View Source
const ( ServerTypeFTP = ServerType("ftp") ServerTypeSFTP = ServerType("sftp") )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Cli ¶
type Cli struct { Version kong.VersionFlag Cfgfile string `kong:"required,name='config',env='CONFIG',help='FTPGrab configuration file.'"` Schedule string `kong:"name='schedule',env='SCHEDULE',help='CRON expression format.'"` Timezone string `kong:"name='timezone',env='TZ',default='UTC',help='Timezone assigned to FTPGrab.'"` LogLevel string `kong:"name='log-level',env='LOG_LEVEL',default='info',help='Set log level.'"` LogJSON bool `kong:"name='log-json',env='LOG_JSON',default='false',help='Enable JSON logging output.'"` LogFile string `kong:"name='log-file',env='LOG_FILE',help='Add logging to a specific file.'"` }
Cli holds command line args, flags and cmds
type Common ¶
type Common struct { Host string `yaml:"host,omitempty"` Port int `yaml:"port,omitempty"` Username string `yaml:"username,omitempty"` Password string `yaml:"password,omitempty"` Sources []string `yaml:"sources,omitempty"` }
Common holds common data server configuration
type Download ¶
type Download struct { Output string `yaml:"output,omitempty"` UID int `yaml:"uid,omitempty"` GID int `yaml:"gid,omitempty"` ChmodFile int `yaml:"chmod_file,omitempty"` ChmodDir int `yaml:"chmod_dir,omitempty"` Include []string `yaml:"include,omitempty"` Exclude []string `yaml:"exclude,omitempty"` Since time.Time `yaml:"since,omitempty"` Retry int `yaml:"retry,omitempty"` HideSkipped bool `yaml:"hide_skipped,omitempty"` CreateBasedir bool `yaml:"create_basedir,omitempty"` }
Download holds download configuration details
type Entry ¶
type Entry struct { File string `json:"file,omitempty"` StatusType string `json:"status_type,omitempty"` StatusText string `json:"status_text,omitempty"` }
Entry represents a journal entry
type FTP ¶
type FTP struct { Host string `yaml:"host,omitempty"` Port int `yaml:"port,omitempty"` Username string `yaml:"username,omitempty"` Password string `yaml:"password,omitempty"` Sources []string `yaml:"sources,omitempty"` Timeout time.Duration `yaml:"timeout,omitempty"` DisableEPSV bool `yaml:"disable_epsv,omitempty"` TLS bool `yaml:"tls,omitempty"` InsecureSkipVerify bool `yaml:"insecure_skip_verify,omitempty"` LogTrace bool `yaml:"log_trace,omitempty"` }
FTP holds data necessary for FTP configuration
type Journal ¶
type Journal struct { Entries []Entry `json:"entries,omitempty"` Count struct { Success int `json:"success,omitempty"` Error int `json:"error,omitempty"` Skip int `json:"skip,omitempty"` } `json:"count,omitempty"` Status string `json:"status,omitempty"` Duration time.Duration `json:"duration,omitempty"` }
Journal holds ftpgrab entries and status
func (Journal) MarshalJSON ¶
type Notif ¶
type Notif struct { Mail NotifMail `yaml:"mail,omitempty"` Slack NotifSlack `yaml:"slack,omitempty"` Webhook NotifWebhook `yaml:"webhook,omitempty"` }
Notif holds data necessary for notification configuration
type NotifMail ¶
type NotifMail struct { Enable bool `yaml:"enable,omitempty"` Host string `yaml:"host,omitempty"` Port int `yaml:"port,omitempty"` SSL bool `yaml:"ssl,omitempty"` InsecureSkipVerify bool `yaml:"insecure_skip_verify,omitempty"` Username string `yaml:"username,omitempty"` Password string `yaml:"password,omitempty"` From string `yaml:"from,omitempty"` To string `yaml:"to,omitempty"` }
Mail holds mail notification configuration details
type NotifSlack ¶
type NotifSlack struct { Enable bool `yaml:"enable,omitempty"` WebhookURL string `yaml:"webhook_url,omitempty"` }
NotifSlack holds slack notification configuration details
type NotifWebhook ¶
type NotifWebhook struct { Enable bool `yaml:"enable,omitempty"` Endpoint string `yaml:"endpoint,omitempty"` Method string `yaml:"method,omitempty"` Headers map[string]string `yaml:"headers,omitempty"` Timeout time.Duration `yaml:"timeout,omitempty"` }
NotifWebhook holds webhook notification configuration details
type SFTP ¶
type SFTP struct { Host string `yaml:"host,omitempty"` Port int `yaml:"port,omitempty"` Username string `yaml:"username,omitempty"` Password string `yaml:"password,omitempty"` Key string `yaml:"key,omitempty"` Sources []string `yaml:"sources,omitempty"` Timeout time.Duration `yaml:"timeout,omitempty"` MaxPacketSize int `yaml:"max_packet_size,omitempty"` }
SFTP holds data necessary for SFTP configuration
type Server ¶
type Server struct { Type ServerType `yaml:"type,omitempty"` FTP FTP `yaml:"ftp,omitempty"` SFTP SFTP `yaml:"sftp,omitempty"` }
Server holds data necessary for server configuration
Source Files ¶
Click to show internal directories.
Click to hide internal directories.