parse

package
v1.1.0-timing.5-beta.2... Latest Latest
Warning

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

Go to latest
Published: Dec 20, 2024 License: AGPL-3.0 Imports: 26 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CoerceParams

func CoerceParams(p resources.ResourceWithParam, inputParams map[string]string, evalCtx *hcl.EvalContext) (map[string]interface{}, []error)

This is inefficient because we are coercing the value from string -> Go using Cty (because that's how the pipeline is defined) and again we convert from Go -> Cty when we're executing the pipeline to build EvalContext when we're evaluating data are not resolved during parse time.

func DecodeIntegration

func DecodeIntegration(configPath string, block *hcl.Block) (resources.Integration, hcl.Diagnostics)

func DecodeNotifier

func DecodeNotifier(configPath string, block *hcl.Block, evalCtx *hcl.EvalContext) (*resources.NotifierImpl, hcl.Diagnostics)

func GetIntegrationBlockSchema

func GetIntegrationBlockSchema(integrationType string) *hcl.BodySchema

func GetPipelineStepBlockSchema

func GetPipelineStepBlockSchema(stepType string) *hcl.BodySchema

func GetTriggerBlockSchema

func GetTriggerBlockSchema(triggerType string) *hcl.BodySchema

func LoadPipelines

func LoadPipelines(ctx context.Context, configPath string) (map[string]*resources.Pipeline, map[string]*resources.Trigger, error)

Convenient function to support testing

The automated tests were initially created before the concept of Mod is introduced in Flowpipe

We can potentially remove this function, but we have to refactor all our test cases

func LoadPipelinesReturningItsMod

func LoadPipelinesReturningItsMod(ctx context.Context, configPath string) (*modconfig.Mod, error)

TODO update this to NOT use deprecated LoadModWithFileName

func NewFlowpipeModDecoder

func NewFlowpipeModDecoder(opts ...parse.DecoderOption) parse.Decoder

func ToError

func ToError(val interface{}) error

ToError formats the supplied value as an error (or just returns it if already an error)

func ValidateParams

func ValidateParams(p resources.ResourceWithParam, inputParams map[string]interface{}, evalCtx *hcl.EvalContext) []error

func WithCredentials

func WithCredentials(credentials map[string]credential.Credential) parse.DecoderOption

flowpipe decoder options

Types

type FlowpipeModDecoder

type FlowpipeModDecoder struct {
	parse.DecoderImpl
	Credentials map[string]credential.Credential
}

Jump to

Keyboard shortcuts

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