parse

package
v1.5.0-rc.4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 13, 2026 License: AGPL-3.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

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

func ParseQueryInvocation(arg string) (string, *resources.QueryArgs, error)

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

type ResourceFactoryFunc func(*hcl.Block, *modconfig.Mod, string) modconfig.HclResource

ResourceFactoryFunc is a function that creates an HclResource from a block.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL