secretsyml

package
v0.10.10 Latest Latest
Warning

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

Go to latest
Published: Dec 10, 2025 License: MIT Imports: 5 Imported by: 1

README

github.com/cyberark/summon/pkg/secretsyml

Defines the secret.yml format and provides function to parse it into a map.

Documentation

Overview

Package secretsyml provides functions for parsing a string or file in secrets.yml format.

Index

Constants

This section is empty.

Variables

View Source
var COMMON_SECTIONS = []string{"common", "default"}

Functions

This section is empty.

Types

type SecretSpec

type SecretSpec struct {
	Tags         []YamlTag
	Path         string
	DefaultValue string
}

func (*SecretSpec) IsFile

func (spec *SecretSpec) IsFile() bool

func (*SecretSpec) IsLiteral

func (spec *SecretSpec) IsLiteral() bool

func (*SecretSpec) IsVar

func (spec *SecretSpec) IsVar() bool

func (*SecretSpec) SetYAML

func (spec *SecretSpec) SetYAML(tag string, value interface{}) error

type SecretsMap

type SecretsMap map[string]SecretSpec

func ParseFromFile

func ParseFromFile(filepath, env string, subs map[string]string) (SecretsMap, error)

ParseFromFile parses a file in secrets.yml format to a map.

func ParseFromString

func ParseFromString(content, env string, subs map[string]string) (SecretsMap, error)

ParseFromString parses a string in secrets.yml format to a map.

func (*SecretsMap) UnmarshalYAML

func (secretMap *SecretsMap) UnmarshalYAML(unmarshal func(interface{}) error) error

type YamlTag

type YamlTag uint8
const (
	File YamlTag = iota
	Var
	Literal
)

func (YamlTag) String

func (t YamlTag) String() string

Jump to

Keyboard shortcuts

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