parse

package
v1.1.0-alpha.202501031703 Latest Latest
Warning

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

Go to latest
Published: Jan 3, 2025 License: AGPL-3.0 Imports: 14 Imported by: 0

Documentation

Index

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

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

Jump to

Keyboard shortcuts

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