CompilerBackend now consumes a CompilerOptions

This commit is contained in:
Ettore Di Giacinto
2019-11-08 18:29:51 +01:00
parent 0321973359
commit 300e60984a
2 changed files with 51 additions and 10 deletions

View File

@@ -25,8 +25,18 @@ type Compiler interface {
GetBackend() CompilerBackend
}
type CompilerBackendOptions struct {
ImageName string
SourcePath string
DockerFileName string
Destination string
}
type CompilerBackend interface {
BuildImage(name, path,dockerfileName string) error
BuildImage(CompilerBackendOptions) error
ExportImage(CompilerBackendOptions) error
RemoveImage(CompilerBackendOptions) error
ImageDefinitionToTar(CompilerBackendOptions) error
}
// CompilationSpec represent a compilation specification derived from a package