config

package
v0.1.6 Latest Latest
Warning

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

Go to latest
Published: Jul 18, 2026 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const InitializationTemporaryPrefix = ".aegis.yaml.init-"

Variables

This section is empty.

Functions

func DefaultPath added in v0.1.4

func DefaultPath() (string, error)

func ResolvePath added in v0.1.4

func ResolvePath(path string) (string, error)

Types

type API

type API struct {
	Listen          string        `mapstructure:"listen" json:"listen"`
	UnixSocket      string        `mapstructure:"unix_socket" json:"unix_socket,omitempty"`
	Token           string        `mapstructure:"token" json:"token"`
	TLSCertFile     string        `mapstructure:"tls_cert_file" json:"tls_cert_file,omitempty"`
	TLSKeyFile      string        `mapstructure:"tls_key_file" json:"tls_key_file,omitempty"`
	ReadTimeout     time.Duration `mapstructure:"read_timeout" json:"read_timeout"`
	WriteTimeout    time.Duration `mapstructure:"write_timeout" json:"write_timeout"`
	ShutdownTimeout time.Duration `mapstructure:"shutdown_timeout" json:"shutdown_timeout"`
	MaxBodyBytes    int64         `mapstructure:"max_body_bytes" json:"max_body_bytes"`
}

type Audit

type Audit struct {
	CheckpointDir string `mapstructure:"checkpoint_dir" json:"checkpoint_dir"`
}

type BrokerDestination

type BrokerDestination struct {
	URL          string   `mapstructure:"url" json:"url"`
	Repositories []string `mapstructure:"repositories" json:"repositories"`
}

type Config

type Config struct {
	StateDir         string      `mapstructure:"state_dir" json:"state_dir"`
	RuntimeDefault   string      `mapstructure:"runtime_default" json:"runtime_default"`
	HermesExecutable string      `mapstructure:"hermes_executable" json:"hermes_executable"`
	Principal        Principal   `mapstructure:"principal" json:"principal"`
	API              API         `mapstructure:"api" json:"api"`
	Retention        Retention   `mapstructure:"retention" json:"retention"`
	Audit            Audit       `mapstructure:"audit" json:"audit"`
	Credentials      Credentials `mapstructure:"credentials" json:"credentials"`
	Manager          Manager     `mapstructure:"manager" json:"manager"`
}

func Defaults

func Defaults() Config

func Load

func Load(path string, flags *pflag.FlagSet) (Config, error)

Load implements: flags > environment > config file > defaults. It creates an isolated Viper instance and returns an immutable typed snapshot.

func Redacted

func Redacted(c Config) Config

func (Config) Validate

func (c Config) Validate() error

type CredentialAuthority

type CredentialAuthority struct {
	Database      string           `mapstructure:"database" json:"database,omitempty"`
	DeploymentID  string           `mapstructure:"deployment_id" json:"deployment_id,omitempty"`
	Custody       string           `mapstructure:"custody" json:"custody,omitempty"`
	KEKCredential string           `mapstructure:"kek_credential" json:"kek_credential,omitempty"`
	KEKFile       string           `mapstructure:"kek_file" json:"kek_file,omitempty"`
	Broker        CredentialBroker `mapstructure:"broker" json:"broker,omitempty"`
}

type CredentialBinding

type CredentialBinding struct {
	Type      string `mapstructure:"type" json:"type"`
	SourceEnv string `mapstructure:"source_env" json:"source_env"`
	TargetEnv string `mapstructure:"target_env" json:"target_env"`
}

type CredentialBroker

type CredentialBroker struct {
	Socket        string                       `mapstructure:"socket" json:"socket,omitempty"`
	AllowedUID    uint32                       `mapstructure:"allowed_uid" json:"allowed_uid,omitempty"`
	AllowedGID    uint32                       `mapstructure:"allowed_gid" json:"allowed_gid,omitempty"`
	CapabilityTTL time.Duration                `mapstructure:"capability_ttl" json:"capability_ttl,omitempty"`
	MaxBodyBytes  int64                        `mapstructure:"max_body_bytes" json:"max_body_bytes,omitempty"`
	Timeout       time.Duration                `mapstructure:"timeout" json:"timeout,omitempty"`
	Destinations  map[string]BrokerDestination `mapstructure:"destinations" json:"destinations,omitempty"`
}

type Credentials

type Credentials struct {
	References     map[string]CredentialBinding `mapstructure:"references" json:"references"`
	ProviderAuth   map[string]CredentialBinding `mapstructure:"provider_auth" json:"provider_auth"`
	DesignProvider string                       `mapstructure:"design_provider" json:"design_provider,omitempty"`
	Authority      CredentialAuthority          `mapstructure:"authority" json:"authority"`
}

func (Credentials) MarshalJSON

func (c Credentials) MarshalJSON() ([]byte, error)

type Inspection added in v0.1.4

type Inspection struct {
	Path        string
	State       State
	Config      Config
	FilePresent bool
	ReasonCode  string
	Err         error
	Partials    []string
}

func Inspect added in v0.1.4

func Inspect(path string) Inspection

Inspect distinguishes absence from every unsafe existing-artifact state.

func (Inspection) Failure added in v0.1.4

func (inspection Inspection) Failure() error

type Manager added in v0.1.1

type Manager struct {
	Enabled         bool              `mapstructure:"enabled" json:"enabled"`
	Runtime         string            `mapstructure:"runtime" json:"runtime"`
	SecurityContext string            `mapstructure:"security_context" json:"security_context"`
	Hermes          ManagerHermes     `mapstructure:"hermes" json:"hermes"`
	Inference       ManagerInference  `mapstructure:"inference" json:"inference"`
	Ingress         ManagerIngress    `mapstructure:"ingress" json:"ingress"`
	Transcript      ManagerTranscript `mapstructure:"transcript" json:"transcript"`
}

type ManagerHermes added in v0.1.1

type ManagerHermes struct {
	ContextLength        int           `mapstructure:"context_length" json:"context_length"`
	GatewayStartTimeout  time.Duration `mapstructure:"gateway_start_timeout" json:"gateway_start_timeout"`
	TurnTimeout          time.Duration `mapstructure:"turn_timeout" json:"turn_timeout"`
	MaximumResponseBytes int64         `mapstructure:"maximum_response_bytes" json:"maximum_response_bytes"`
}

type ManagerInference added in v0.1.1

type ManagerInference struct {
	Runtime              string        `mapstructure:"runtime" json:"runtime"`
	Mode                 string        `mapstructure:"mode" json:"mode"`
	Executable           string        `mapstructure:"executable" json:"executable"`
	Endpoint             string        `mapstructure:"endpoint" json:"endpoint,omitempty"`
	Model                string        `mapstructure:"model" json:"model,omitempty"`
	ModelDigest          string        `mapstructure:"model_digest" json:"model_digest,omitempty"`
	Certification        string        `mapstructure:"certification" json:"certification,omitempty"`
	KeepAlive            time.Duration `mapstructure:"keep_alive" json:"keep_alive"`
	StartTimeout         time.Duration `mapstructure:"start_timeout" json:"start_timeout"`
	RequestTimeout       time.Duration `mapstructure:"request_timeout" json:"request_timeout"`
	MaximumRequestBytes  int64         `mapstructure:"maximum_request_bytes" json:"maximum_request_bytes"`
	MaximumResponseBytes int64         `mapstructure:"maximum_response_bytes" json:"maximum_response_bytes"`
}

type ManagerIngress added in v0.1.1

type ManagerIngress struct {
	MaximumMessageBytes int64         `mapstructure:"maximum_message_bytes" json:"maximum_message_bytes"`
	MaximumMessageRunes int           `mapstructure:"maximum_message_runes" json:"maximum_message_runes"`
	ScanTimeout         time.Duration `mapstructure:"scan_timeout" json:"scan_timeout"`
	BoundedDecodeDepth  int           `mapstructure:"bounded_decode_depth" json:"bounded_decode_depth"`
}

type ManagerTranscript added in v0.1.1

type ManagerTranscript struct {
	Retention string `mapstructure:"retention" json:"retention"`
}

type Principal

type Principal struct {
	ID      string        `mapstructure:"id" json:"id"`
	Name    string        `mapstructure:"name" json:"name"`
	UID     string        `mapstructure:"uid" json:"uid"`
	User    string        `mapstructure:"user" json:"user"`
	AuthTTL time.Duration `mapstructure:"auth_ttl" json:"auth_ttl"`
}

type Retention

type Retention struct {
	DesignHomes  bool `mapstructure:"design_homes" json:"design_homes"`
	SessionHomes bool `mapstructure:"session_homes" json:"session_homes"`
}

type State added in v0.1.4

type State string
const (
	StateAbsent    State = "uninitialized"
	StateValid     State = "valid"
	StateMalformed State = "malformed"
	StateInsecure  State = "insecure_permissions"
	StatePartial   State = "partially_initialized"
	StateAmbiguous State = "ambiguous"
)

Jump to

Keyboard shortcuts

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