Add reconciliation state foundation
This commit is contained in:
@@ -109,6 +109,18 @@ func (o Output) StateOutputFile() state.OutputFile {
|
||||
}
|
||||
}
|
||||
|
||||
func (o Output) StateOutputProjection() state.OutputProjection {
|
||||
return state.OutputProjection{
|
||||
Path: o.DestinationPath,
|
||||
Kind: o.Kind,
|
||||
SourcePath: o.SourcePath,
|
||||
Transform: o.Transform,
|
||||
URL: o.URL,
|
||||
SHA256: o.SHA256,
|
||||
Size: o.Size,
|
||||
}
|
||||
}
|
||||
|
||||
func (o Output) ManagedPath() string {
|
||||
return o.DestinationPath
|
||||
}
|
||||
@@ -121,6 +133,14 @@ func StateOutputFiles(outputs []Output) []state.OutputFile {
|
||||
return files
|
||||
}
|
||||
|
||||
func StateOutputProjections(outputs []Output) []state.OutputProjection {
|
||||
projections := make([]state.OutputProjection, 0, len(outputs))
|
||||
for _, output := range outputs {
|
||||
projections = append(projections, output.StateOutputProjection())
|
||||
}
|
||||
return projections
|
||||
}
|
||||
|
||||
func ManagedOutputPaths(outputs []Output) []string {
|
||||
paths := make([]string, 0, len(outputs))
|
||||
for _, output := range outputs {
|
||||
|
||||
Reference in New Issue
Block a user