config

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Oct 17, 2026 License: AGPL-3.0 Imports: 9 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package config decodes the plugin_data block SPIRE hands to the openstack_iid plugins (HCL, or JSON), rejecting unknown keys so that typos are never silently ignored, as in the issuer's configuration.

Index

Constants

This section is empty.

Variables

View Source
var ErrInvalid = errors.New("invalid plugin configuration")

ErrInvalid is returned (wrapped) for any configuration error; messages name the offending key.

Functions

func Decode

func Decode(configuration string, v any, known []string) error

Decode parses the configuration into v, a pointer to a struct with hcl tags, after checking that every key is one of known. A block's keys are listed as "block.key" (e.g. "audit_syslog.enabled"), and checked too.

func Duration

func Duration(key, value string, def, min, max time.Duration) (time.Duration, error)

Duration parses the duration set for key, returning def if the value is empty. The result must be at least min and, if max is positive, at most max.

func PluginData

func PluginData(spireConfig []byte, pluginType, name string) (string, error)

PluginData returns the plugin_data block of a plugin in a SPIRE Agent or Server configuration file, e.g. NodeAttestor "openstack_iid", as the HCL that SPIRE hands to the plugin's Configure.

Types

This section is empty.

Jump to

Keyboard shortcuts

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