config

package
v0.5.1 Latest Latest
Warning

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

Go to latest
Published: Feb 15, 2026 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Overview

Package config loads ShellGuard settings from file and environment.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Timeout          *int       `yaml:"timeout"`
	MaxOutputBytes   *int       `yaml:"max_output_bytes"`
	MaxDownloadBytes *int       `yaml:"max_download_bytes"`
	DownloadDir      *string    `yaml:"download_dir"`
	MaxSleepSeconds  *int       `yaml:"max_sleep_seconds"`
	SSH              *SSHConfig `yaml:"ssh"`
	ManifestDir      *string    `yaml:"manifest_dir"`
}

Config for ShellGuard. Pointer fields; nil = unset.

func Load

func Load() (Config, error)

func LoadFrom

func LoadFrom(path string) (Config, error)

LoadFrom loads config from path. Missing files return zero Config, nil.

type SSHConfig

type SSHConfig struct {
	Mode            *string   `yaml:"mode"`
	ConnectTimeout  *duration `yaml:"connect_timeout"`
	Retries         *int      `yaml:"retries"`
	RetryBackoff    *duration `yaml:"retry_backoff"`
	HostKeyChecking *string   `yaml:"host_key_checking"`
	KnownHostsFile  *string   `yaml:"known_hosts_file"`
}

SSHConfig holds SSH-specific configuration.

Jump to

Keyboard shortcuts

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