config

package
v1.9.13 Latest Latest
Warning

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

Go to latest
Published: Nov 23, 2025 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BufferSizes

type BufferSizes struct {
	Websocket        int `yaml:"websocket"`
	CTLog            int `yaml:"ctlog"`
	BroadcastManager int `yaml:"broadcastmanager"`
}

type Config

type Config struct {
	Webserver struct {
		ServerConfig       `yaml:",inline"`
		FullURL            string `yaml:"full_url"`
		LiteURL            string `yaml:"lite_url"`
		DomainsOnlyURL     string `yaml:"domains_only_url"`
		CompressionEnabled bool   `yaml:"compression_enabled"`
	}
	Prometheus struct {
		ServerConfig        `yaml:",inline"`
		Enabled             bool   `yaml:"enabled"`
		MetricsURL          string `yaml:"metrics_url"`
		ExposeSystemMetrics bool   `yaml:"expose_system_metrics"`
	}
	General struct {
		// DisableDefaultLogs indicates whether the default logs used in Google Chrome and provided by Google should be disabled.
		DisableDefaultLogs bool `yaml:"disable_default_logs"`
		// AdditionalLogs contains additional logs provided by the user that can be used in addition to the default logs.
		AdditionalLogs             []LogConfig    `yaml:"additional_logs"`
		BufferSizes                BufferSizes    `yaml:"buffer_sizes"`
		ScannerOptions             ScannerOptions `yaml:"scanner_options"`
		ForceAllLogs               *bool          `yaml:"force_all_logs"`
		DropOldLogs                *bool          `yaml:"drop_old_logs"`
		UseAllLogList              *bool          `yaml:"use_all_log_list"`
		SkipTransparencyLogsBefore *time.Time     `yaml:"skip_transparency_logs_before"`
		Recovery                   struct {
			Enabled     bool   `yaml:"enabled"`
			CTIndexFile string `yaml:"ct_index_file"`
		} `yaml:"recovery"`
	}
}
var (
	AppConfig Config
	Version   = "1.8.1"
)

func ReadConfig

func ReadConfig(configPath string) (Config, error)

ReadConfig reads the config file and returns a filled Config struct.

type LogConfig

type LogConfig struct {
	Operator    string `yaml:"operator"`
	URL         string `yaml:"url"`
	Description string `yaml:"description"`
}

type ScannerOptions added in v1.8.8

type ScannerOptions struct {
	BatchSize     int `yaml:"batch_size"`
	ParallelFetch int `yaml:"parallel_fetch"`
	NumWorkers    int `yaml:"num_workers"`
}

type ServerConfig

type ServerConfig struct {
	ListenAddr  string   `yaml:"listen_addr"`
	ListenPort  int      `yaml:"listen_port"`
	CertPath    string   `yaml:"cert_path"`
	CertKeyPath string   `yaml:"cert_key_path"`
	RealIP      bool     `yaml:"real_ip"`
	Whitelist   []string `yaml:"whitelist"`
}

Jump to

Keyboard shortcuts

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