Signed-off-by: Solomon Hykes <sh.github.6811@hykes.org>
This commit is contained in:
Solomon Hykes
2021-01-05 00:37:29 -08:00
parent 22500ad9db
commit 3162ca0991
25 changed files with 1664 additions and 1296 deletions

26
dagger/types.go Normal file
View File

@@ -0,0 +1,26 @@
package dagger
import (
"context"
)
// Implemented by Component, Script, Op
type Executable interface {
Execute(context.Context, FS, Fillable) (FS, error)
Walk(func(*Op) error) error
}
// Something which can be filled in-place with a cue value
type Fillable interface {
Fill(interface{}) error
}
func Discard() Fillable {
return discard{}
}
type discard struct{}
func (d discard) Fill(x interface{}) error {
return nil
}