Documentation ¶
Index ¶
- func DecodeArgs(attr *hcl.Attribute, evalCtx *hcl.EvalContext, ...) (*resources.QueryArgs, []*resources.RuntimeDependency, hcl.Diagnostics)
- func DecodeParam(block *hcl.Block, parseCtx *parse.ModParseContext) (*modconfig.ParamDef, []*resources.RuntimeDependency, hcl.Diagnostics)
- func GetResourceSchema(resource modconfig.HclResource, res *hcl.BodySchema) *hcl.BodySchema
- func NewPowerpipeModDecoder(opts ...parse.DecoderOption) parse.Decoder
- func ParseQueryInvocation(arg string) (string, *resources.QueryArgs, error)
- type PowerpipeModDecoder
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DecodeArgs ¶
func DecodeArgs(attr *hcl.Attribute, evalCtx *hcl.EvalContext, resource resources.QueryProvider) (*resources.QueryArgs, []*resources.RuntimeDependency, hcl.Diagnostics)
func DecodeParam ¶
func DecodeParam(block *hcl.Block, parseCtx *parse.ModParseContext) (*modconfig.ParamDef, []*resources.RuntimeDependency, hcl.Diagnostics)
func GetResourceSchema ¶
func GetResourceSchema(resource modconfig.HclResource, res *hcl.BodySchema) *hcl.BodySchema
GetResourceSchema adds any app specific blocks to the existing resource schema
func NewPowerpipeModDecoder ¶
func NewPowerpipeModDecoder(opts ...parse.DecoderOption) parse.Decoder
func ParseQueryInvocation ¶
ParseQueryInvocation parses a query invocation and extracts the args (if any) supported formats are:
1) positional args query.my_query("val1","val2")
2) named args query.my_query(my_arg1 => "test", my_arg2 => "test2")
Types ¶
type PowerpipeModDecoder ¶
type PowerpipeModDecoder struct {
parse.DecoderImpl
}
func (*PowerpipeModDecoder) ShouldAddToMod ¶
func (d *PowerpipeModDecoder) ShouldAddToMod(resource modconfig.HclResource, block *hcl.Block, parseCtx *parse.ModParseContext) bool
ShouldAddToMod determines whether the resource should be added to the mod this may be overridden by the app specific decoder to add app-specific resourc elogic
func (*PowerpipeModDecoder) ValidateResource ¶
func (d *PowerpipeModDecoder) ValidateResource(resource modconfig.HclResource) hcl.Diagnostics
validate the resource
Click to show internal directories.
Click to hide internal directories.