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 GetResourceFactoryFuncs() map[string]ResourceFactoryFunc
- 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
- type ResourceFactoryFunc
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 GetResourceFactoryFuncs ¶
func GetResourceFactoryFuncs() map[string]ResourceFactoryFunc
GetResourceFactoryFuncs returns a map of block types to their factory functions. This allows the lazy loader to use the same factory functions as the eager loader, ensuring consistent resource creation across loading strategies.
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
type ResourceFactoryFunc ¶
ResourceFactoryFunc is a function that creates an HclResource from a block.