config

package
v0.6.2 Latest Latest
Warning

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

Go to latest
Published: Aug 9, 2024 License: MIT Imports: 4 Imported by: 1

Documentation

Index

Constants

View Source
const SecretRefKey = "__SECRET__"

SecretRefKey is the key used to store the secret reference in the keeper config.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	MasterKeeper string                  `yaml:"master"`
	Keepers      map[string]KeeperConfig `yaml:"keepers"`
}

Config is the top-level configuration for ghost. When .ghost.yaml is loaded, this is the structure it must match.

func Instance

func Instance() *Config

Instance returns the singleton instance of the configuration.

func New

func New() *Config

New creates a new, empty configuration.

func (*Config) Load

func (c *Config) Load(requestedPath string) error

Load loads the configuration from the given path. If the path is empty, the default path is used.

func (*Config) Save

func (c *Config) Save(requestedPath string) error

Save saves the configuration to the given path. If the path is empty, the default path is used.

type KeeperConfig

type KeeperConfig map[string]any

KeeperConfig is an unstructured map of configuration values for a keeper.

type SecretRef

type SecretRef struct {
	KeeperName string `mapstructure:"keeper"`
	SecretName string `mapstructure:"secret"`
	Field      string `mapstructure:"field"`
}

SecretRef is a reference to a secret in another keeper.

Jump to

Keyboard shortcuts

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