Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DefaultFilePath ¶
func DefaultFilePath() string
DefaultFilePath returns Bucky's default config file path.
Types ¶
type Config ¶
type Config struct {
Theme string `mapstructure:"theme"` // "dark", "light", "auto"
SortBy string `mapstructure:"sort_by"` // "name", "size", "date" — default "name"
SortOrder string `mapstructure:"sort_order"` // "asc" or "desc" — default "asc"
ShowHidden bool `mapstructure:"show_hidden"` // default false
Sync SyncConfig `mapstructure:"sync"`
Profiles []Profile `mapstructure:"profiles"`
SourcePath string `mapstructure:"-"`
}
Config holds the application configuration.
func Load ¶
Load reads configuration from ~/.config/bucky/config.toml and auto-discovers AWS profiles from ~/.aws/credentials.
func LoadFrom ¶
LoadFrom reads configuration from the given directory. Supports both legacy [[profiles]] arrays and new [profile.<name>] tables. Does NOT auto-discover AWS profiles (use Load for that).
func (*Config) DefaultProfile ¶
DefaultProfile returns the first profile, or an error if none exist.
type Profile ¶
type Profile struct {
Name string `mapstructure:"name"`
Type string `mapstructure:"type"`
Prefix string `mapstructure:"prefix"`
// S3 fields
Bucket string `mapstructure:"bucket"`
Region string `mapstructure:"region"`
AccessKey string `mapstructure:"access_key"`
SecretKey string `mapstructure:"secret_key"`
Endpoint string `mapstructure:"endpoint"`
// AWS shared credentials fields
AWSProfile string `mapstructure:"aws_profile"`
AWSCredentialsFile string `mapstructure:"aws_credentials_file"`
AWSConfigFile string `mapstructure:"aws_config_file"`
// GCS fields
ProjectID string `mapstructure:"project_id"`
GCPCredentialsFile string `mapstructure:"gcp_credentials_file"`
GCPUseADC *bool `mapstructure:"gcp_use_adc"` // pointer so we can detect unset vs false; default true
// SFTP fields
Host string `mapstructure:"host"`
Port int `mapstructure:"port"` // default 22
Username string `mapstructure:"username"`
Password string `mapstructure:"password"`
PrivateKeyPath string `mapstructure:"private_key_path"`
PrivateKeyPassphrase string `mapstructure:"private_key_passphrase"`
KnownHostsPath string `mapstructure:"known_hosts_path"`
InsecureIgnoreHostKey bool `mapstructure:"insecure_ignore_host_key"`
}
Profile represents a connection profile from the config file.
type SyncConfig ¶
type SyncConfig struct {
DryRunDefault *bool `mapstructure:"dry_run_default"`
CompareMode string `mapstructure:"compare_mode"` // "mtime_size", "size_only", "exact_timestamps"
DeleteDefault bool `mapstructure:"delete_default"`
NoOverwriteDefault bool `mapstructure:"no_overwrite_default"`
Concurrency int `mapstructure:"concurrency"` // default 4
}
SyncConfig holds optional defaults for sync setup.
Click to show internal directories.
Click to hide internal directories.