Help us shape the future of Go! Take the 2026 Go Developer Survey

datautils

package
v0.83.30 Latest Latest
Warning

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

Go to latest
Published: Apr 21, 2026 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ExtractCorrelationId added in v0.70.4

func ExtractCorrelationId(additionalMetadata string) *string

ExtractCorrelationId extracts correlationId from additionalMetadata if it exists

func JSONBytesToMap

func JSONBytesToMap(jsonBytes []byte) (map[string]interface{}, error)

func RenderTemplateFields

func RenderTemplateFields(data map[string]interface{}, input map[string]interface{}) (map[string]interface{}, error)

RenderTemplateFields recursively processes the input map, rendering any string fields using the data map.

func ToJSONMap

func ToJSONMap(data interface{}) (map[string]interface{}, error)

Types

type DataDecoderValidator

type DataDecoderValidator interface {
	DecodeAndValidate(input, target interface{}) error
}

func NewDataDecoderValidator

func NewDataDecoderValidator(
	f ...DataDecoderValidatorOpt,
) DataDecoderValidator

type DataDecoderValidatorOpt

type DataDecoderValidatorOpt func(*DataDecoderValidatorOpts)

func WithTagName

func WithTagName(t string) DataDecoderValidatorOpt

type DataDecoderValidatorOpts

type DataDecoderValidatorOpts struct {
	// contains filtered or unexported fields
}

type DefaultDataDecoderValidator

type DefaultDataDecoderValidator struct {
	// contains filtered or unexported fields
}

func (*DefaultDataDecoderValidator) DecodeAndValidate

func (j *DefaultDataDecoderValidator) DecodeAndValidate(input, target interface{}) error

type JobRunLookupData

type JobRunLookupData struct {
	Input       map[string]interface{}            `json:"input"`
	TriggeredBy TriggeredBy                       `json:"triggered_by"`
	Steps       map[string]map[string]interface{} `json:"steps,omitempty"`
}

type StepRunData

type StepRunData struct {
	Input       map[string]interface{}            `json:"input"`
	TriggeredBy TriggeredBy                       `json:"triggered_by"`
	Parents     map[string]map[string]interface{} `json:"parents"`

	// custom-set user data for the step
	UserData map[string]interface{} `json:"user_data"`

	// overrides set from the playground
	Overrides map[string]interface{} `json:"overrides"`

	// errors in upstream steps (only used in on-failure step)
	StepRunErrors map[string]string `json:"step_run_errors,omitempty"`
}

type TriggeredBy

type TriggeredBy string
const (
	TriggeredByEvent    TriggeredBy = "event"
	TriggeredByCron     TriggeredBy = "cron"
	TriggeredBySchedule TriggeredBy = "schedule"
	TriggeredByManual   TriggeredBy = "manual"
	TriggeredByParent   TriggeredBy = "parent"
)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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