add document state transformer interface
This commit is contained in:
parent
614b4426c2
commit
452695c8f5
@ -32,7 +32,12 @@ type DocumentGetter interface {
|
||||
GetDocument() Document
|
||||
}
|
||||
|
||||
type DocumentStateTransformer interface {
|
||||
Apply(overrideState string) error
|
||||
}
|
||||
|
||||
type Document interface {
|
||||
GetURI() string
|
||||
Serializer
|
||||
Loader
|
||||
Validator
|
||||
@ -52,6 +57,7 @@ type Document interface {
|
||||
HasConfig(string) bool
|
||||
GetConfig(string) Block
|
||||
|
||||
Apply(state string) error
|
||||
Len() int
|
||||
ResolveIds(ctx context.Context)
|
||||
Filter(filter DeclarationSelector) []Declaration
|
||||
@ -60,8 +66,11 @@ type Document interface {
|
||||
CheckConstraints() bool
|
||||
Failures() int
|
||||
|
||||
ImportedDocuments() []Document
|
||||
|
||||
ConfigFilter(filter BlockSelector) []Block
|
||||
AppendConfigurations([]Document)
|
||||
Diff(with Document, output io.Writer) (returnOutput string, diffErr error)
|
||||
Diff(with Document, output io.Writer) (returnOutput string, diffErr error)
|
||||
DiffState(output io.Writer) (returnOutput string, diffErr error)
|
||||
Clone() Document
|
||||
}
|
||||
|
@ -42,7 +42,7 @@ type Declaration interface {
|
||||
ResolveId(context.Context) string
|
||||
Loader
|
||||
Validator
|
||||
StateTransformer
|
||||
DocumentStateTransformer
|
||||
Resource() Resource
|
||||
Clone() Declaration
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user