Move internal/core => internal/cli

This commit is contained in:
Tom Wiesing 2022-10-17 16:45:43 +02:00
parent 8d2855fdcb
commit 10df1c3243
No known key found for this signature in database
45 changed files with 113 additions and 143 deletions

View file

@ -20,7 +20,7 @@ type Component interface {
// ComponentBase should be embedded into every component
type ComponentBase struct {
Core // the core of the associated distillery
Core // the underlying stillage of the distillery
}
//lint:ignore U1000 used to implement the private methods of [Component]

View file

@ -4,8 +4,8 @@ import (
"embed"
"path/filepath"
"github.com/FAU-CDI/wisski-distillery/internal/bootstrap"
"github.com/FAU-CDI/wisski-distillery/internal/component"
"github.com/FAU-CDI/wisski-distillery/internal/core"
"github.com/FAU-CDI/wisski-distillery/pkg/environment"
)
@ -46,13 +46,13 @@ func (control *Control) Stack(env environment.Environment) component.StackWithRe
"SELF_RESOLVER_BLOCK_FILE": control.Config.SelfResolverBlockFile,
},
CopyContextFiles: []string{core.Executable},
CopyContextFiles: []string{bootstrap.Executable},
})
return stt
}
func (control Control) Context(parent component.InstallationContext) component.InstallationContext {
return component.InstallationContext{
core.Executable: control.Config.CurrentExecutable(control.Environment), // TODO: Does this make sense?
bootstrap.Executable: control.Config.CurrentExecutable(control.Environment), // TODO: Does this make sense?
}
}

View file

@ -5,7 +5,6 @@ import (
"github.com/FAU-CDI/wisski-distillery/pkg/environment"
)
// Core represents the Core of a WissKI Distillery.
type Core struct {
Environment environment.Environment // environment to use for reading / writing to and from the distillery
Config *config.Config // the configuration of the distillery

View file

@ -14,6 +14,7 @@ var errBootstrapFailedRuntime = exit.Error{
}
// Runtime contains runtime resources to be installed into any instance
//
//go:embed all:runtime
var runtimeResources embed.FS