v3: go.mozilla.org/sops/v3/config Index | Files

package config

import "go.mozilla.org/sops/v3/config"

Package config provides a way to find and load SOPS configuration files

Index

Package Files

config.go

func FindConfigFile Uses

func FindConfigFile(start string) (string, error)

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.

type Config Uses

type Config struct {
    KeyGroups         []sops.KeyGroup
    ShamirThreshold   int
    UnencryptedSuffix string
    EncryptedSuffix   string
    UnencryptedRegex  string
    EncryptedRegex    string
    Destination       publish.Destination
    OmitExtensions    bool
}

Config is the configuration for a given SOPS file

func LoadCreationRuleForFile Uses

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 Uses

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".

Package config imports 15 packages (graph). Updated 2020-10-21. Refresh now. Tools for package owners.