Documentation ¶
Index ¶
- func FromJSONType(data *types.JSON, target interface{}) error
- func MergeMaps(maps ...map[string]interface{}) map[string]interface{}
- func RenderTemplateFields(data map[string]interface{}, input map[string]interface{}) (map[string]interface{}, error)
- func ToJSONMap(data interface{}) (map[string]interface{}, error)
- func ToJSONType(data interface{}) (*types.JSON, error)
- type DataDecoderValidator
- type DataDecoderValidatorOpt
- type DataDecoderValidatorOpts
- type DefaultDataDecoderValidator
- type JobRunLookupData
- type StepData
- type StepRunData
- type TriggeredBy
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FromJSONType ¶
func MergeMaps ¶
MergeMaps merges any number of maps together, with maps later in the slice taking precedent
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 ToJSONType ¶
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 WithAlerter ¶
func WithAlerter(a errors.Alerter) DataDecoderValidatorOpt
func WithLogger ¶
func WithLogger(l *zerolog.Logger) DataDecoderValidatorOpt
func WithTagName ¶
func WithTagName(t string) DataDecoderValidatorOpt
func WithValidator ¶
func WithValidator(v validator.Validator) 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]StepData `json:"steps,omitempty"` }
func GetJobRunLookupData ¶
func GetJobRunLookupData(data *types.JSON) (JobRunLookupData, error)
func NewJobRunLookupData ¶
func NewJobRunLookupData(input map[string]interface{}, triggeredBy TriggeredBy) JobRunLookupData
func NewJobRunLookupDataFromInputBytes ¶
func NewJobRunLookupDataFromInputBytes(input []byte, triggeredBy TriggeredBy) (JobRunLookupData, error)
type StepRunData ¶
type StepRunData struct { Input map[string]interface{} `json:"input"` TriggeredBy TriggeredBy `json:"triggered_by"` Parents map[string]StepData `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"` }
type TriggeredBy ¶
type TriggeredBy string
const ( TriggeredByEvent TriggeredBy = "event" TriggeredByCron TriggeredBy = "cron" TriggeredBySchedule TriggeredBy = "schedule" TriggeredByManual TriggeredBy = "manual" )
Click to show internal directories.
Click to hide internal directories.