config

package
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: Sep 11, 2024 License: Apache-2.0 Imports: 3 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 {
	ListenAddress          string        // LISTEN_ADDRESS, Address to listen on for incoming connections
	ServerAddress          string        // SERVER_ADDRESS, Address of the arnika server
	Certificate            string        // CERTIFICATE, Path to the client certificate file
	PrivateKey             string        // PRIVATE_KEY, Path to the client key file
	CACertificate          string        // CA_CERTIFICATE, Path to the CA certificate file
	KMSURL                 string        // KMS_URL, URL of the KMS server
	Interval               time.Duration // INTERVAL, Interval between key updates
	WireGuardInterface     string        // WIREGUARD_INTERFACE, Name of the WireGuard interface to configure
	WireguardPeerPublicKey string        // WIREGUARD_PEER_PUBLIC_KEY, Public key of the WireGuard peer
	PQCPSKFile             string        // PQC_PSK_FILE, Path to the PQC PSK file
}

Config contains the configuration values for the arnika service.

func Parse

func Parse() (*Config, error)

Parse parses the configuration values from environment variables and returns a Config pointer.

No parameters. Returns a pointer to a Config struct and an error.

func (*Config) UsePQC

func (c *Config) UsePQC() bool

Use PQC returns a boolean indicating whether the PQC PSK file is set in the Config struct.

No parameters. Returns a boolean value indicating whether the PQC PSK file is set.

Jump to

Keyboard shortcuts

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