Documentation
¶
Index ¶
- func EnsureDir(path string, perm fs.FileMode) error
- type AppPlacement
- type Backoff
- type ClassifierConfig
- type ClassifierRule
- type Concurrency
- type Config
- type General
- type LogFile
- type Logging
- type MappingRule
- type MappingTarget
- type Metrics
- type Network
- type Placement
- type PromTextfile
- type ResolverConf
- type SourceNaming
- type SourceWithToken
- type Sources
- type UIOptions
- type Validation
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type AppPlacement ¶
type ClassifierConfig ¶
type ClassifierConfig struct {
Rules []ClassifierRule `yaml:"rules"`
}
type ClassifierRule ¶
type Concurrency ¶
type Config ¶
type Config struct {
Version int `yaml:"version"`
General General `yaml:"general"`
Network Network `yaml:"network"`
Concurrency Concurrency `yaml:"concurrency"`
Sources Sources `yaml:"sources"`
Resolver ResolverConf `yaml:"resolver"`
Placement Placement `yaml:"placement"`
Classifier ClassifierConfig `yaml:"classifier"`
Logging Logging `yaml:"logging"`
Metrics Metrics `yaml:"metrics"`
Validation Validation `yaml:"validation"`
UI UIOptions `yaml:"ui"`
}
Config mirrors the YAML schema. All values should be supplied via YAML; we avoid hard-coded defaults. Minimal validation occurs in Validate().
type General ¶
type General struct {
DataRoot string `yaml:"data_root"`
DownloadRoot string `yaml:"download_root"`
PartialsRoot string `yaml:"partials_root"`
PlacementMode string `yaml:"placement_mode"` // symlink | hardlink | copy
Quarantine bool `yaml:"quarantine"`
AllowOverwrite bool `yaml:"allow_overwrite"`
DryRun bool `yaml:"dry_run"`
// Downloads behavior
StagePartials bool `yaml:"stage_partials"` // if true (default), write .part files under download_root/.parts or partials_root if set
AlwaysNoResume bool `yaml:"always_no_resume"` // if true, do not resume partials unless overridden on CLI
AutoRecoverOnStart bool `yaml:"auto_recover_on_start"` // if true, TUI auto-resumes previously running downloads on startup
}
type MappingRule ¶
type MappingRule struct {
Match string `yaml:"match"`
Targets []MappingTarget `yaml:"targets"`
}
type MappingTarget ¶
type Metrics ¶
type Metrics struct {
PrometheusTextfile PromTextfile `yaml:"prometheus_textfile"`
}
type Network ¶
type Network struct {
TimeoutSeconds int `yaml:"timeout_seconds"`
MaxRedirects int `yaml:"max_redirects"`
TLSVerify bool `yaml:"tls_verify"`
UserAgent string `yaml:"user_agent"`
// When true, respect HTTP 429 Retry-After for retries (chunked and single fallback)
RetryOnRateLimit bool `yaml:"retry_on_rate_limit"`
// Cap the wait derived from Retry-After to avoid excessively long sleeps (seconds)
RateLimitMaxDelaySeconds int `yaml:"rate_limit_max_delay_seconds"`
// When true, skip the early HEAD/0-0 auth preflight in CLI and TUI v2
DisableAuthPreflight bool `yaml:"disable_auth_preflight"`
}
type Placement ¶
type Placement struct {
Apps map[string]AppPlacement `yaml:"apps"`
Mapping []MappingRule `yaml:"mapping"`
}
type PromTextfile ¶
type ResolverConf ¶
type ResolverConf struct {
CacheTTLHours int `yaml:"cache_ttl_hours"`
}
type SourceNaming ¶
type SourceNaming struct {
// Pattern controls default filename generation when dest is omitted.
// Supported tokens vary by resolver:
// - CivitAI: {model_name}, {version_name}, {version_id}, {file_name}, {file_type}
// - HuggingFace: {owner}, {repo}, {path}, {rev}, {file_name}
Pattern string `yaml:"pattern"`
}
type SourceWithToken ¶
type SourceWithToken struct {
Enabled bool `yaml:"enabled"`
TokenEnv string `yaml:"token_env"`
Naming SourceNaming `yaml:"naming"`
}
type Sources ¶
type Sources struct {
HuggingFace SourceWithToken `yaml:"huggingface"`
CivitAI SourceWithToken `yaml:"civitai"`
}
type UIOptions ¶
type UIOptions struct {
// RefreshHz controls the TUI refresh frequency (ticks per second). If 0, defaults to 1.
// Values above 10 are clamped to 10 to avoid excessive CPU usage.
RefreshHz int `yaml:"refresh_hz"`
// ShowURL sets the initial table mode to show URL instead of DEST in the last column.
// Deprecated in favor of ColumnMode but still honored if ColumnMode is empty.
ShowURL bool `yaml:"show_url"`
// ColumnMode controls which field is shown in the last column: dest | url | host
ColumnMode string `yaml:"column_mode"`
// Compact reduces columns in the v2 table (hides SPEED/THR) for a denser view.
Compact bool `yaml:"compact"`
// Theme allows selecting a theme by name from a predefined set (optional).
Theme string `yaml:"theme"`
}
type Validation ¶
Click to show internal directories.
Click to hide internal directories.