summon

package
v0.10.0 Latest Latest
Warning

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

Go to latest
Published: Jul 2, 2024 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const DEVSHM = "/dev/shm"

DEVSHM is the default *nix shared-memory directory path

View Source
const ENV_FILE_MAGIC = "@SUMMONENVFILE"
View Source
const SUMMON_ENV_KEY_NAME = "SUMMON_ENV"
View Source
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

type SecretFetcher func(string) ([]byte, error)

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.

Jump to

Keyboard shortcuts

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