Documentation
¶
Index ¶
Constants ¶
const DEVSHM = "/dev/shm"
DEVSHM is the default *nix shared-memory directory path
const ENV_FILE_MAGIC = "@SUMMONENVFILE"
const SUMMON_ENV_KEY_NAME = "SUMMON_ENV"
const VERSION = "0.10.0"
VERSION is the version of summon
Variables ¶
This section is empty.
Functions ¶
func DefaultTempPath ¶ added in v0.10.0
func DefaultTempPath() string
DefaultTempPath returns the best possible temp folder path for temp files
func RunSubprocess ¶ added in v0.10.0
func RunSubprocess(sc *SubprocessConfig) (int, error)
RunSubprocess encapsulates the logic of fetching secrets, executing the subprocess with the secrets injected.
Types ¶
type SecretFetcher ¶ added in v0.10.0
SecretFetcher is function signature for fetching a secret
type SubprocessConfig ¶ added in v0.10.0
type SubprocessConfig struct {
Args []string
Provider string
Filepath string
YamlInline string
Subs []string
Ignores []string
IgnoreAll bool
Environment string
RecurseUp bool
ShowProviderVersions bool
FetchSecret SecretFetcher
}
SubprocessConfig is an object that holds all the info needed to run a Summon instance
type TempFactory ¶ added in v0.10.0
type TempFactory struct {
// contains filtered or unexported fields
}
TempFactory handels transient files that require cleaning up after the child process exits.
func NewTempFactory ¶ added in v0.10.0
func NewTempFactory(path string) TempFactory
NewTempFactory creates a new temporary file factory. defer Cleanup() if you want the files removed.
func (*TempFactory) Cleanup ¶ added in v0.10.0
func (tf *TempFactory) Cleanup()
Cleanup removes the temporary files created with this factory.
func (*TempFactory) Push ¶ added in v0.10.0
func (tf *TempFactory) Push(value string) string
Push creates a temp file with given value. Returns the path.