context

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Feb 16, 2025 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrProjectDirNotFound     = fmt.Errorf("could not determine project directory")
	ErrWorkDirNotFound        = fmt.Errorf("could not determine current working directory")
	ErrWorkDirNotInProjectDir = fmt.Errorf("workDir must be the projectDir or a subdirectory of projectDir")
)

Functions

func DecodeEnvValue

func DecodeEnvValue(value string) string

func GetCIDEnvironment

func GetCIDEnvironment(configEnv map[string]string, projectDirectory string) (map[string]string, error)

GetCIDEnvironment returns the normalized ci variables

Types

type CIDContext

type CIDContext struct {
	// ProjectDir is the root directory of the project
	ProjectDir string

	// WorkDir is the current working directory, must be a subdirectory of ProjectDir or ProjectDir itself
	WorkDir string

	// Config is the CID configuration for the project
	Config *config.CIDConfig

	// Env holds the resolved environment variables for the project
	Env map[string]string
}

func NewAppContext

func NewAppContext() (*CIDContext, error)

Jump to

Keyboard shortcuts

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