Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ConfigFromPath ¶
func ConfigFromPath(path string, additional ...string) (types.ConfigDetails, error)
ConfigFromPath converts paths to types.ConfigDetails. It only examines readability of paths and makes up types.ConfigDetails from them.
WorkingDir will be set to the parent directory of path. Environment will be os.Environ.
If any path is not readable or points to a non regular file, it stop and returns the first error encountered.
func PreloadConfigDetails ¶
func PreloadConfigDetails(conf types.ConfigDetails) (types.ConfigDetails, error)
PreloadConfigDetails loads content and parse content if each corresponding field is not present in given conf.
func ReloadConfigDetails ¶
func ReloadConfigDetails(conf types.ConfigDetails) (types.ConfigDetails, error)
ReloadConfigDetails is almost identical to PreloadConfigDetails however this function erases each file's Content and Config fields before loading.
Types ¶
type ComposeArchive ¶
type Loader ¶
type Loader struct { Config types.ConfigDetails Options [](func(*loader.Options)) }
type ProjectDir ¶
type ProjectDir[S, H any] struct { // contains filtered or unexported fields }
ProjectDir is handle for a directory that contains compose.yml and all relevant files.
func NewSimpleProjectDir ¶
func NewSimpleProjectDir( dir string, archive ComposeArchive, ) (*ProjectDir[any, any], error)
func PrepareProjectDir ¶
func PrepareProjectDir[S, H any]( dir string, archivePath string, archive ComposeArchive, pathSet S, initialContent any, ) (*ProjectDir[S, H], error)
func (*ProjectDir[S, H]) ComposeYmlPath ¶
func (d *ProjectDir[S, H]) ComposeYmlPath() string
func (*ProjectDir[S, H]) Dir ¶
func (d *ProjectDir[S, H]) Dir() string
func (*ProjectDir[S, H]) PathHandle ¶
func (d *ProjectDir[S, H]) PathHandle() H
func (*ProjectDir[S, H]) PathSet ¶
func (d *ProjectDir[S, H]) PathSet() S