Documentation
¶
Overview ¶
Package config provides a way to find and load SOPS configuration files
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FindConfigFile ¶
FindConfigFile looks for a sops config file in the current working directory and on parent directories, up to the limit defined by the maxDepth constant.
Types ¶
type Config ¶
type Config struct {
KeyGroups []sops.KeyGroup
ShamirThreshold int
UnencryptedSuffix string
EncryptedSuffix string
UnencryptedRegex string
EncryptedRegex string
UnencryptedCommentRegex string
EncryptedCommentRegex string
MACOnlyEncrypted bool
Destination publish.Destination
OmitExtensions bool
}
Config is the configuration for a given SOPS file
func LoadCreationRuleForFile ¶
func LoadCreationRuleForFile(confPath string, filePath string, kmsEncryptionContext map[string]*string) (*Config, error)
LoadCreationRuleForFile load the configuration for a given SOPS file from the config file at confPath. A kmsEncryptionContext should be provided for configurations that do not contain key groups, as there's no way to specify context inside a SOPS config file outside of key groups.
func LoadDestinationRuleForFile ¶
func LoadDestinationRuleForFile(confPath string, filePath string, kmsEncryptionContext map[string]*string) (*Config, error)
LoadDestinationRuleForFile works the same as LoadCreationRuleForFile, but gets the "creation_rule" from the matching destination_rule's "recreation_rule".
type ConfigFileResult ¶ added in v3.10.0
ConfigFileResult contains the path to a config file and any warnings
func LookupConfigFile ¶ added in v3.10.0
func LookupConfigFile(start string) (ConfigFileResult, error)
LookupConfigFile looks for a sops config file in the current working directory and on parent directories, up to the maxDepth limit. It returns a result containing the file path and any warnings.
type DotenvStoreConfig ¶ added in v3.9.0
type DotenvStoreConfig struct{}
type INIStoreConfig ¶ added in v3.9.0
type INIStoreConfig struct{}
type JSONBinaryStoreConfig ¶ added in v3.9.0
type JSONBinaryStoreConfig struct {
Indent int `yaml:"indent"`
}
type JSONStoreConfig ¶ added in v3.9.0
type JSONStoreConfig struct {
Indent int `yaml:"indent"`
}
type StoresConfig ¶ added in v3.9.0
type StoresConfig struct {
Dotenv DotenvStoreConfig `yaml:"dotenv"`
INI INIStoreConfig `yaml:"ini"`
JSONBinary JSONBinaryStoreConfig `yaml:"json_binary"`
JSON JSONStoreConfig `yaml:"json"`
YAML YAMLStoreConfig `yaml:"yaml"`
}
func LoadStoresConfig ¶ added in v3.9.0
func LoadStoresConfig(confPath string) (*StoresConfig, error)
func NewStoresConfig ¶ added in v3.9.0
func NewStoresConfig() *StoresConfig
type YAMLStoreConfig ¶ added in v3.9.0
type YAMLStoreConfig struct {
Indent int `yaml:"indent"`
}