Documentation ¶
Index ¶
- func GetErrMsg(jobName, jobId, msg string, err error) string
- func GetInfoMsg(jobName, jobId, msg string) string
- type InitOptions
- type Instance
- func (i *Instance) BuildMountDir(client *dagger.Client, mountDir string) (*dagger.Directory, error)
- func (i *Instance) BuildRootDir(client *dagger.Client) (*dagger.Directory, error)
- func (i *Instance) BuildTargetDir(client *dagger.Client, targetDir string) (*dagger.Directory, error)
- func (i *Instance) BuildWorkDir(client *dagger.Client, workDir string) (*dagger.Directory, error)
- func (i *Instance) InitContainer(c *dagger.Client, imageURL string) (*dagger.Container, error)
- func (i *Instance) InitContainerImage() (string, error)
- func (i *Instance) InitDagger() (*dagger.Client, error)
- func (i *Instance) ScanAllEnvVars() (map[string]string, error)
- func (i *Instance) ScanEnvVarsAWSKeys(scanAWSVars bool) (map[string]string, error)
- func (i *Instance) ScanEnvVarsCustom(scanCustomVars []string) (map[string]string, error)
- func (i *Instance) ScanEnvVarsFromDotEnvFile(dotEnvFile string) (map[string]string, error)
- func (i *Instance) ScanEnvVarsFromPrefix(prefixes []string) (map[string]string, error)
- func (i *Instance) ScanEnvVarsTerraform(scanAWSVars bool) (map[string]string, error)
- func (i *Instance) ValidatedEnvVarsPassed(envVarsToSet map[string]string) (map[string]string, error)
- type Job
- type Runner
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetInfoMsg ¶
Types ¶
type InitOptions ¶
type InitOptions struct { Name string Stack string PipelineCfg *pipeline.Config // Directories that the task will use. WorkDir string MountDir string TargetDir string // Scanned Environment variables to resolve, and set. ScanAWSEnvVars bool ScanTerraformEnvVars bool EnvVarsToSet map[string]string EnvVarsToScan []string EnvVarsWithPrefixToScan []string IsScanEnvVarsFromDotEnv bool IsScanEnvVarsFromPrefix bool DotEnvFile string }
type Instance ¶
type Instance struct { InitOptions *InitOptions JobName string JobId string }
func (*Instance) BuildMountDir ¶
func (*Instance) BuildRootDir ¶
BuildRootDir 8. Build root directory.
func (*Instance) BuildTargetDir ¶
func (*Instance) BuildWorkDir ¶
func (*Instance) InitContainer ¶
InitContainer 3. Get the container.
func (*Instance) InitContainerImage ¶
InitContainerImage 2. Get the container image.
func (*Instance) InitDagger ¶
InitDagger 1. Init the job, initialising the Dagger client.
func (*Instance) ScanAllEnvVars ¶ added in v0.2.2
func (*Instance) ScanEnvVarsAWSKeys ¶
ScanEnvVarsAWSKeys 4. Scan (if applicable) AWS keys environment variables.
func (*Instance) ScanEnvVarsCustom ¶
ScanEnvVarsCustom 6. Scan (if applicable) custom environment variables.
func (*Instance) ScanEnvVarsFromDotEnvFile ¶ added in v0.2.2
func (*Instance) ScanEnvVarsFromPrefix ¶ added in v0.2.8
func (*Instance) ScanEnvVarsTerraform ¶
ScanEnvVarsTerraform 5. Scan (if applicable) Terraform environment variables.
type Job ¶
type Job struct { // Identifiers. Id string Name string Stack string // PipelineCfg client. PipelineCfg *pipeline.Config Client *dagger.Client // Dagger directories RootDir *dagger.Directory // Normally should be the same as the workDir WorkDir *dagger.Directory MountDir *dagger.Directory TargetDir *dagger.Directory RootDirPath string WorkDirPath string MountDirPath string TargetDirPath string // Container configuration. ContainerImageURL string ContainerDefault *dagger.Container // Scanned Environment variables to resolve, and set. EnvVarsAWSScanned map[string]string EnvVarsTerraformScanned map[string]string EnvVarsCustomScanned map[string]string EnvVarsAllScanned map[string]string EnvVarsToSet map[string]string EnvVarsFromDotEnvFile map[string]string EnvVarsFromPrefixScanned map[string]string Ctx context.Context }
type Runner ¶
type Runner interface { InitDagger() (*dagger.Client, error) InitContainerImage() (string, error) InitContainer(c *dagger.Client, imageURL string) (*dagger.Container, error) ScanEnvVarsAWSKeys(scanAWSVars bool) (map[string]string, error) ScanEnvVarsTerraform(scanTerraformVars bool) (map[string]string, error) ScanEnvVarsCustom(scanCustomVars []string) (map[string]string, error) ScanAllEnvVars() (map[string]string, error) ScanEnvVarsFromDotEnvFile(dotEnvFile string) (map[string]string, error) ScanEnvVarsFromPrefix(prefixes []string) (map[string]string, error) ValidatedEnvVarsPassed(envVarsToSet map[string]string) (map[string]string, error) BuildRootDir(client *dagger.Client) (*dagger.Directory, error) BuildWorkDir(client *dagger.Client, workDir string) (*dagger.Directory, error) BuildMountDir(client *dagger.Client, mountDir string) (*dagger.Directory, error) BuildTargetDir(client *dagger.Client, targetDir string) (*dagger.Directory, error) }
Click to show internal directories.
Click to hide internal directories.