Documentation ¶
Overview ¶
Package sls handles parsing of Salt Pillar files
Index ¶
- Constants
- func WriteSlsFile(buffer bytes.Buffer, outFilePath string) (int, error)
- type Sls
- func (s *Sls) FormatBuffer(action string) (bytes.Buffer, error)
- func (s *Sls) GetValueFromPath(path string) interface{}
- func (s *Sls) PerformAction(action string) (bytes.Buffer, error)
- func (s *Sls) ProcessValues(vals interface{}, action string) (interface{}, error)
- func (s *Sls) ProcessYaml(secretNames []string, secretValues []string) error
- func (s *Sls) ReadBytes(buf []byte) error
- func (s *Sls) ReadSlsFile() error
- func (s *Sls) ScanForIncludes(reader io.Reader) error
- func (s *Sls) SetValueFromPath(path string, value string) error
Constants ¶
const Decrypt = "decrypt"
Decrypt action
const Encrypt = "encrypt"
Encrypt action
const Rotate = "rotate"
Rotate action
const Validate = "validate"
Validate action (keys)
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Sls ¶
type Sls struct { Error error Yaml *yaml.Yaml Pki *pki.Pki KeyMap map[string]interface{} FilePath string EncryptionPath string KeyMeta string KeyCount int IsInclude bool }
Sls sls data
func (*Sls) FormatBuffer ¶
FormatBuffer returns a formatted .sls buffer with the gpg renderer line
func (*Sls) GetValueFromPath ¶
GetValueFromPath returns the value from a path string
func (*Sls) PerformAction ¶
PerformAction takes an action string (encrypt or decrypt) and applies that action on all items
func (*Sls) ProcessValues ¶
ProcessValues will encrypt or decrypt given values
func (*Sls) ProcessYaml ¶
ProcessYaml encrypts elements matching keys specified on the command line
func (*Sls) ReadSlsFile ¶
ReadSlsFile open and read a yaml file, if the file has include statements we throw an error as the YAML parser will try to act on the include directives
func (*Sls) ScanForIncludes ¶
ScanForIncludes looks for include statements in the given io.Reader