Documentation
¶
Index ¶
- func FindConfigPath(providedPath string) string
- func Save(cfg *Config, path string) error
- func Set(cfg *Config, key string, raw interface{}) error
- type AIConfig
- type APIConfig
- type AuditConfig
- type AuthConfig
- type BackupConfig
- type BackupDestination
- type CertbotConfig
- type CleanupConfig
- type ClusterConfig
- type Config
- type DomainConfig
- type Entry
- type FilesConfig
- type HealthConfig
- type InfrastructureConfig
- type LoggingConfig
- type MCPConfig
- type NginxConfig
- type PlansConfig
- type PowerDNSConfig
- type SecurityConfig
- type ServiceExecConfig
- type SharedDatabaseConfig
- type SharedRedisConfig
- type SystemTerminalConfig
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FindConfigPath ¶ added in v0.1.5
Types ¶
type AIConfig ¶ added in v0.3.0
type AIConfig struct {
Enabled bool `yaml:"enabled" json:"enabled"`
BaseURL string `yaml:"base_url" json:"base_url"`
APIKey string `yaml:"api_key" json:"api_key"`
Model string `yaml:"model" json:"model"`
Timeout time.Duration `yaml:"timeout" json:"timeout"`
DocsURL string `yaml:"docs_url" json:"docs_url"`
}
type AuditConfig ¶ added in v0.1.5
type AuditConfig struct {
Enabled bool `yaml:"enabled" json:"enabled"`
RetentionDays int `yaml:"retention_days" json:"retention_days"`
CaptureRequestBody bool `yaml:"capture_request_body" json:"capture_request_body"`
ExcludedPaths []string `yaml:"excluded_paths" json:"excluded_paths"`
SensitiveFields []string `yaml:"sensitive_fields" json:"sensitive_fields"`
CleanupInterval time.Duration `yaml:"cleanup_interval" json:"cleanup_interval"`
}
type AuthConfig ¶
type BackupConfig ¶
type BackupConfig struct {
Destinations []BackupDestination `yaml:"destinations" json:"destinations"`
}
type BackupDestination ¶
type BackupDestination struct {
Name string `yaml:"name" json:"name"`
Type string `yaml:"type" json:"type"`
Kind string `yaml:"kind" json:"kind"`
Deployment string `yaml:"deployment,omitempty" json:"deployment,omitempty"`
Endpoint string `yaml:"endpoint" json:"endpoint"`
Region string `yaml:"region" json:"region"`
Bucket string `yaml:"bucket" json:"bucket"`
Prefix string `yaml:"prefix" json:"prefix"`
CredentialID string `yaml:"credential_id" json:"credential_id"`
UsePathStyle bool `yaml:"use_path_style" json:"use_path_style"`
// Pointer so an explicit false survives reloads; nil means enabled.
Enabled *bool `yaml:"enabled" json:"enabled"`
}
BackupDestination is an object store that backups are mirrored to after the local copy is written. Secrets are never stored here: CredentialID references an S3 credential held by the credential manager.
Kind records who runs the store: "external" (a store FlatRun only connects to) or "managed" (a store FlatRun runs itself, deployed from a template). For a managed store, Deployment names the deployment that runs the container. See docs/OBJECT_STORES.md.
func (BackupDestination) IsEnabled ¶
func (d BackupDestination) IsEnabled() bool
func (BackupDestination) StoreKind ¶
func (d BackupDestination) StoreKind() string
StoreKind returns the store kind, defaulting to "external" when unset.
type CertbotConfig ¶
type CertbotConfig struct {
Enabled bool `yaml:"enabled" json:"enabled"`
Image string `yaml:"image" json:"image"`
Email string `yaml:"email" json:"email"`
Staging bool `yaml:"staging" json:"staging"`
CertsPath string `yaml:"certs_path" json:"certs_path"`
WebrootPath string `yaml:"webroot_path" json:"webroot_path"`
ContainerWebrootPath string `yaml:"container_webroot_path" json:"container_webroot_path"`
DNSProvider string `yaml:"dns_provider" json:"dns_provider"`
AutoRenewalEnabled *bool `yaml:"auto_renewal_enabled" json:"auto_renewal_enabled"`
RenewalThresholdDays int `yaml:"renewal_threshold_days" json:"renewal_threshold_days"`
RenewalCheckInterval time.Duration `yaml:"renewal_check_interval" json:"renewal_check_interval"`
}
type CleanupConfig ¶ added in v0.3.0
type ClusterConfig ¶ added in v0.1.5
type Config ¶
type Config struct {
DeploymentsPath string `yaml:"deployments_path"`
SystemFilesRoot string `yaml:"system_files_root"`
DockerSocket string `yaml:"docker_socket"`
DefaultTimeout time.Duration `yaml:"default_timeout"`
API APIConfig `yaml:"api"`
Auth AuthConfig `yaml:"auth"`
Domain DomainConfig `yaml:"domain"`
Nginx NginxConfig `yaml:"nginx"`
Certbot CertbotConfig `yaml:"certbot"`
Logging LoggingConfig `yaml:"logging"`
Health HealthConfig `yaml:"health"`
Infrastructure InfrastructureConfig `yaml:"infrastructure"`
Security SecurityConfig `yaml:"security"`
Audit AuditConfig `yaml:"audit"`
Cluster ClusterConfig `yaml:"cluster"`
SystemTerminal SystemTerminalConfig `yaml:"system_terminal"`
Cleanup CleanupConfig `yaml:"cleanup"`
Plans PlansConfig `yaml:"plans"`
AI AIConfig `yaml:"ai"`
MCP MCPConfig `yaml:"mcp"`
Files FilesConfig `yaml:"files"`
Backup BackupConfig `yaml:"backup"`
}
type DomainConfig ¶
type Entry ¶ added in v0.3.0
type FilesConfig ¶ added in v0.3.0
type FilesConfig struct {
// Pointer so an explicit false survives reloads; nil means "use default" (true).
ShowHidden *bool `yaml:"show_hidden" json:"show_hidden"`
}
type HealthConfig ¶
type InfrastructureConfig ¶ added in v0.1.3
type InfrastructureConfig struct {
DefaultProxyNetwork string `yaml:"default_proxy_network" json:"default_proxy_network"`
DefaultDatabaseNetwork string `yaml:"default_database_network" json:"default_database_network"`
Database SharedDatabaseConfig `yaml:"database" json:"database"`
Redis SharedRedisConfig `yaml:"redis" json:"redis"`
PowerDNS PowerDNSConfig `yaml:"powerdns" json:"powerdns"`
}
type LoggingConfig ¶
type MCPConfig ¶
type MCPConfig struct {
Enabled bool `yaml:"enabled" json:"enabled"`
}
MCPConfig controls the built-in MCP server that exposes the assistant's tool set to external MCP clients. Every call is authenticated and permission-gated exactly as the assistant is, so it is off unless deliberately enabled.
type NginxConfig ¶
type NginxConfig struct {
Enabled bool `yaml:"enabled" json:"enabled"`
Image string `yaml:"image" json:"image"`
ContainerName string `yaml:"container_name" json:"container_name"`
ConfigPath string `yaml:"config_path" json:"config_path"`
ReloadCommand string `yaml:"reload_command" json:"reload_command"`
External bool `yaml:"external" json:"external"`
ContainerWebrootPath string `yaml:"container_webroot_path" json:"container_webroot_path"`
RejectUnknownDomains bool `yaml:"reject_unknown_domains" json:"reject_unknown_domains"`
}
type PlansConfig ¶ added in v0.3.0
type PowerDNSConfig ¶ added in v0.1.5
type PowerDNSConfig struct {
Enabled bool `yaml:"enabled" json:"enabled"`
Container string `yaml:"container" json:"container"`
Image string `yaml:"image" json:"image"`
APIPort int `yaml:"api_port" json:"api_port"`
DNSPort int `yaml:"dns_port" json:"dns_port"`
APIKey string `yaml:"api_key" json:"api_key"`
DataPath string `yaml:"data_path" json:"data_path"`
DefaultSOA string `yaml:"default_soa" json:"default_soa"`
Nameservers string `yaml:"nameservers" json:"nameservers"`
}
type SecurityConfig ¶ added in v0.1.5
type SecurityConfig struct {
Enabled bool `yaml:"enabled" json:"enabled"`
RealtimeCapture bool `yaml:"realtime_capture" json:"realtime_capture"`
ScanInterval time.Duration `yaml:"scan_interval" json:"scan_interval"`
RetentionDays int `yaml:"retention_days" json:"retention_days"`
RateThreshold int `yaml:"rate_threshold" json:"rate_threshold"`
AutoBlockEnabled bool `yaml:"auto_block_enabled" json:"auto_block_enabled"`
AutoBlockThreshold int `yaml:"auto_block_threshold" json:"auto_block_threshold"`
AutoBlockDuration time.Duration `yaml:"auto_block_duration" json:"auto_block_duration"`
// Detection thresholds for autoblock
DetectionWindow time.Duration `yaml:"detection_window" json:"detection_window"`
NotFoundThreshold int `yaml:"not_found_threshold" json:"not_found_threshold"`
AuthFailureThreshold int `yaml:"auth_failure_threshold" json:"auth_failure_threshold"`
UniquePathsThreshold int `yaml:"unique_paths_threshold" json:"unique_paths_threshold"`
RepeatedHitsThreshold int `yaml:"repeated_hits_threshold" json:"repeated_hits_threshold"`
// Internal API token for nginx-to-agent communication (auto-generated if empty)
InternalAPIToken string `yaml:"internal_api_token" json:"-"`
TrustedProxies []string `yaml:"trusted_proxies" json:"trusted_proxies"`
TrustCFHeader bool `yaml:"trust_cf_header" json:"trust_cf_header"`
}
type ServiceExecConfig ¶ added in v0.1.5
type ServiceExecConfig struct {
Image string `yaml:"image" json:"image"`
Container string `yaml:"container" json:"container"`
KeepAlive bool `yaml:"keep_alive" json:"keep_alive"`
RunOnRequest bool `yaml:"run_on_request" json:"run_on_request"`
Volumes []string `yaml:"volumes" json:"volumes"`
Networks []string `yaml:"networks" json:"networks"`
}
func (*ServiceExecConfig) ShouldUseDockerRun ¶ added in v0.1.5
func (c *ServiceExecConfig) ShouldUseDockerRun() bool
type SharedDatabaseConfig ¶ added in v0.1.3
type SharedDatabaseConfig struct {
}
type SharedRedisConfig ¶ added in v0.1.3
type SharedRedisConfig struct {
}
type SystemTerminalConfig ¶ added in v0.2.0
type SystemTerminalConfig struct {
ProtectedMode models.ProtectedModeConfig `yaml:"protected_mode" json:"protected_mode"`
}