config

package
v0.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 11, 2026 License: AGPL-3.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	PublicHostname   string `yaml:"publicHostname"`
	AcmeCacheDir     string `yaml:"acmeCacheDir"`
	AcmeDirectoryURL string `yaml:"acmeDirectoryURL"`
	AcmeCACert       string `yaml:"acmeCACert"`
	ListenAddress    string `yaml:"listenAddress"`
	HTTPAddress      string `yaml:"httpAddress"`

	Database   DatabaseConfig   `yaml:"database"`
	DNS        DNSConfig        `yaml:"dns"`
	PowerDNS   PowerDNSConfig   `yaml:"powerDNS"`
	TPM        TPMConfig        `yaml:"tpm"`
	Nexus      NexusConfig      `yaml:"nexus"`
	Token      TokenConfig      `yaml:"token"`
	Enrollment EnrollmentConfig `yaml:"enrollment"`
	Hostname   HostnameConfig   `yaml:"hostname"`

	AuditRetentionDays int `yaml:"auditRetentionDays"`
}

func Load

func Load(path string) (*Config, error)

func (*Config) HeartbeatInterval

func (c *Config) HeartbeatInterval() time.Duration

func (*Config) InactiveThreshold

func (c *Config) InactiveThreshold() time.Duration

func (*Config) PendingEnrollmentTTL

func (c *Config) PendingEnrollmentTTL() time.Duration

func (*Config) PowerDNSTimeout

func (c *Config) PowerDNSTimeout() time.Duration

func (*Config) TokenTTL

func (c *Config) TokenTTL() time.Duration

type DNSConfig

type DNSConfig struct {
	BaseDomain    string `yaml:"baseDomain"`
	Zone          string `yaml:"zone"`
	RelayHostname string `yaml:"relayHostname"`
}

type DatabaseConfig

type DatabaseConfig struct {
	URL          string `yaml:"url"`
	MaxOpenConns int    `yaml:"maxOpenConns"`
	MaxIdleConns int    `yaml:"maxIdleConns"`
}

type EnrollmentConfig

type EnrollmentConfig struct {
	MaxPending              int `yaml:"maxPending"`
	PendingTTLSeconds       int `yaml:"pendingTTLSeconds"`
	RateLimitPerSecond      int `yaml:"rateLimitPerSecond"`
	RateLimitPerIPPerSecond int `yaml:"rateLimitPerIPPerSecond"`
}

type HostnameConfig

type HostnameConfig struct {
	MaxChangesPerYear    int `yaml:"maxChangesPerYear"`
	CooldownDays         int `yaml:"cooldownDays"`
	ReleasedCooldownDays int `yaml:"releasedCooldownDays"`
}

type NexusConfig

type NexusConfig struct {
	TrustedDomainSuffixes       []string `yaml:"trustedDomainSuffixes"`
	ClientCACertFile            string   `yaml:"clientCACertFile"`
	HeartbeatIntervalSeconds    int      `yaml:"heartbeatIntervalSeconds"`
	InactiveThresholdMultiplier int      `yaml:"inactiveThresholdMultiplier"`
}

type PowerDNSConfig

type PowerDNSConfig struct {
	ApiURL         string `yaml:"apiURL"`
	ApiKey         string `yaml:"apiKey"`
	ServerID       string `yaml:"serverID"`
	TimeoutSeconds int    `yaml:"timeoutSeconds"`
}

func (PowerDNSConfig) Timeout

func (c PowerDNSConfig) Timeout() time.Duration

type TPMConfig

type TPMConfig struct {
	TrustedCACertsDir  string `yaml:"trustedCACertsDir"`
	SoftwareCACertsDir string `yaml:"softwareCACertsDir"`
}

type TokenConfig

type TokenConfig struct {
	TTLSeconds                 int `yaml:"ttlSeconds"`
	DefaultWeight              int `yaml:"defaultWeight"`
	HandshakeMaxAgeSeconds     int `yaml:"handshakeMaxAgeSeconds"`
	ReauthIntervalSeconds      int `yaml:"reauthIntervalSeconds"`
	ReauthGraceSeconds         int `yaml:"reauthGraceSeconds"`
	MaintenanceGraceCapSeconds int `yaml:"maintenanceGraceCapSeconds"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL