Documentation
¶
Index ¶
- Variables
- func ComposeDown(ctx context.Context, proj *types.Project, removeVolumes bool) error
- func ComposeLogs(ctx context.Context, projectName string, out io.Writer, follow bool, ...) error
- func ComposePs(ctx context.Context, proj *types.Project, services []string, all bool) ([]api.ContainerSummary, error)
- func ComposeRestart(ctx context.Context, proj *types.Project, services []string) error
- func ComposeUp(ctx context.Context, proj *types.Project, services []string, ...) error
- func DetectComposeFile(dir string) (string, error)
- func ListGlobalComposeContainers(ctx context.Context) ([]container.Summary, error)
- func LoadComposeProject(ctx context.Context, composeFile, projectName, projectsDirectory string, ...) (*composetypes.Project, error)
- func LoadComposeProjectFromDir(ctx context.Context, dir, projectName, projectsDirectory string, ...) (*composetypes.Project, string, error)
- func ValidateIncludePathForWrite(projectDir, includePath string) (string, error)
- func WriteIncludeFile(projectDir, includePath, content string) error
- type Client
- type EnvLoader
- type EnvMap
- type IncludeFile
- type ProgressWriterKey
Constants ¶
This section is empty.
Variables ¶
var ComposeFileCandidates = []string{
"compose.yaml",
"compose.yml",
"docker-compose.yaml",
"docker-compose.yml",
}
Functions ¶
func ComposeDown ¶
func ComposeLogs ¶
func ComposeRestart ¶
func DetectComposeFile ¶
func LoadComposeProject ¶
func LoadComposeProject(ctx context.Context, composeFile, projectName, projectsDirectory string, autoInjectEnv bool, pathMapper *pathmapper.PathMapper) (*composetypes.Project, error)
func LoadComposeProjectFromDir ¶
func LoadComposeProjectFromDir(ctx context.Context, dir, projectName, projectsDirectory string, autoInjectEnv bool, pathMapper *pathmapper.PathMapper) (*composetypes.Project, string, error)
func ValidateIncludePathForWrite ¶
ValidateIncludePathForWrite ensures the include path is safe for write operations Returns the validated absolute path to prevent recomputation after validation Only allows writing within the project directory
func WriteIncludeFile ¶
WriteIncludeFile writes content to an include file path
Types ¶
type EnvLoader ¶
type EnvLoader struct {
// contains filtered or unexported fields
}
func NewEnvLoader ¶
func (*EnvLoader) LoadEnvironment ¶
func (l *EnvLoader) LoadEnvironment(ctx context.Context) (envMap EnvMap, injectionVars EnvMap, err error)
LoadEnvironment loads and merges environment variables from all sources: 1. Process environment 2. Global .env.global file (from projects directory) 3. Project-specific .env file (from workdir)
type IncludeFile ¶
type IncludeFile struct {
Path string `json:"path"`
RelativePath string `json:"relative_path"`
Content string `json:"content"`
}
func ParseIncludes ¶
func ParseIncludes(composeFilePath string) ([]IncludeFile, error)
ParseIncludes reads a compose file and extracts all include directives
type ProgressWriterKey ¶
type ProgressWriterKey struct{}
ProgressWriterKey can be set on a context to enable JSON-line progress updates. The value must be an io.Writer (typically the HTTP response writer).