26
dagger/types.go
Normal file
26
dagger/types.go
Normal 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
|
||||
}
|
Reference in New Issue
Block a user