3
0

Add missing bits from V1, slight touchup

This commit is contained in:
Tomaž Jerman
2023-02-25 11:34:52 +01:00
parent a8b60c6525
commit 2e9ba97dda
37 changed files with 1602 additions and 72 deletions

View File

@@ -10,7 +10,7 @@ type (
}
Datasource interface {
Next(ctx context.Context, out map[string]string) (ident string, more bool, err error)
Next(ctx context.Context, out map[string]string) (ident []string, more bool, err error)
Reset(ctx context.Context) error
SetProvider(Provider) bool
}

View File

@@ -3,6 +3,7 @@ package envoyx
import (
"context"
"fmt"
"strings"
)
type (
@@ -213,3 +214,16 @@ func (p EncodeParams) validate() (err error) {
return
}
func CastMergeAlg(v string) (mergeAlg mergeAlg) {
switch strings.ToLower(v) {
case "replace", "mergeleft":
mergeAlg = OnConflictReplace
case "skip", "mergeright":
mergeAlg = OnConflictSkip
case "panic", "error":
mergeAlg = OnConflictPanic
}
return
}

View File

@@ -19,6 +19,11 @@ type (
// Placeholders are resources which were added to help resolve missing deps
Placeholder bool
Config NodeConfig
}
NodeConfig struct {
MergeAlg mergeAlg
SkipIf string
}
NodeSet []*Node