summon

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: 12 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"

Variables

View Source
var FullVersionName = fmt.Sprintf("%s-%s", Version, Tag)

FullVersionName is the user-visible aggregation of version and tag of this codebase

View Source
var Tag = "unset"

Tag field denotes the specific build type for the CLI. It may be replaced by compile-time variables if needed to provide the git commit information in the final binary. See `Static long version tags` in the `Building` section of `CONTRIBUTING.md` for more information on this variable.

View Source
var Version = "unset"

Version field is a SemVer that should indicate the baked-in version of the CLI

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