sopsyaml

package
v1.2.1 Latest Latest
Warning

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

Go to latest
Published: May 18, 2023 License: Apache-2.0 Imports: 4 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ExtractConfigEncryptFiles

func ExtractConfigEncryptFiles(data *yaml.MapSlice) ([]string, error)

ExtractConfigEncryptFiles pulls the files we want to manipulate out of the map

func FindConfigFile

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.

func GetConfigEncryptFiles

func GetConfigEncryptFiles(basePath string) ([]string, error)

GetConfigEncryptFiles is a shortcut for getting the file list when no other list data is required

func LoadConfigFile

func LoadConfigFile(confPath string) (*yaml.MapSlice, error)

LoadConfigFile loads a yaml file path into a yaml map

func ReplaceConfigEncryptFiles

func ReplaceConfigEncryptFiles(data *yaml.MapSlice, encFiles []string) (*yaml.MapSlice, error)

ReplaceConfigEncryptFiles pulls the files we want to manipulate out of the map

func WriteConfigFile

func WriteConfigFile(confPath string, yamlMap *yaml.MapSlice) error

WriteConfigFile writes out a yaml file

func WriteEncryptFilesToDisk

func WriteEncryptFilesToDisk(confPath string, data *yaml.MapSlice, encFiles []string) error

WriteEncryptFilesToDisk writes the new files to disk based on existing data

Types

type SopsConfig

type SopsConfig struct {
	Path           string
	Tree           *yaml.MapSlice
	EncryptedFiles []string
}

SopsConfig holds info about an instance of the config file

Jump to

Keyboard shortcuts

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