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"
Variables ¶
var FullVersionName = fmt.Sprintf("%s-%s", Version, Tag)
FullVersionName is the user-visible aggregation of version and tag of this codebase
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.
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
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.