package common // --------------------------------------------------------------------------- // Default config templates // --------------------------------------------------------------------------- type AppConfig struct { App App `mapstructure:"app" toml:"app"` Certificates Certificates `mapstructure:"certificates" toml:"certificates"` Cloudflare Cloudflare `mapstructure:"cloudflare" toml:"cloudflare"` Git Git `mapstructure:"git" toml:"git"` } type App struct { Mode string `mapstructure:"mode" toml:"mode"` TickRate int `mapstructure:"tick_rate" toml:"tick_rate"` UUID string `mapstructure:"uuid" toml:"uuid"` } type Git struct { Host string `mapstructure:"host" toml:"host"` Server string `mapstructure:"server" toml:"server"` Username string `mapstructure:"username" toml:"username"` APIToken string `mapstructure:"api_token" toml:"api_token"` OrgName string `mapstructure:"org_name" toml:"org_name"` } type Certificates struct { DataRoot string `mapstructure:"data_root" toml:"data_root"` Email string `mapstructure:"email" toml:"email"` CADirURL string `mapstructure:"ca_dir_url" toml:"ca_dir_url"` } type Cloudflare struct { CFEmail string `mapstructure:"cf_email" toml:"cf_email"` CFAPIKey string `mapstructure:"cf_api_key" toml:"cf_api_key"` } type DomainConfig struct { Domain DomainCfg `mapstructure:"domain" toml:"domain"` Certificates DomainCerts `mapstructure:"certificates" toml:"certificates"` Repo Repo `mapstructure:"repo" toml:"repo"` Internal Internal `mapstructure:"shared" toml:"shared"` } type DomainCfg struct { DomainName string `mapstructure:"domain_name" toml:"domain_name"` Enabled bool `mapstructure:"enabled" toml:"enabled"` DNSServer string `mapstructure:"dns_server" toml:"dns_server"` } type DomainCerts struct { DataRoot string `mapstructure:"data_root" toml:"data_root"` RequestMethod string `mapstructure:"request_method" toml:"request_method"` CryptoKey string `mapstructure:"crypto_key" toml:"crypto_key"` Expiry int `mapstructure:"expiry" toml:"expiry"` RenewPeriod int `mapstructure:"renew_period" toml:"renew_period"` SubDomains []string `mapstructure:"sub_domains" toml:"sub_domains"` CertSymlinks []string `mapstructure:"cert_symlinks" toml:"cert_symlinks"` KeySymlinks []string `mapstructure:"key_symlinks" toml:"key_symlinks"` } type Repo struct { RepoSuffix string `mapstructure:"repo_suffix" toml:"repo_suffix"` } type Internal struct { LastIssued int64 `mapstructure:"last_issued" toml:"last_issued"` RepoExists bool `mapstructure:"repo_exists" toml:"repo_exists"` Status string `mapstructure:"status" toml:"status"` }