converter

package
v2.0.14 Latest Latest
Warning

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

Go to latest
Published: May 2, 2026 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func JSONValuesToLiterals

func JSONValuesToLiterals(ctx context.Context, variableMap *core.VariableMap, values *structpb.Struct) ([]*task.NamedLiteral, error)

JSONValuesToLiterals converts a raw JSON object (values) into NamedLiterals using the provided type definitions in variableMap. This is a thin wrapper around jsonValueToLiteralWithFieldName that understands Flyte's LiteralType.

  • variableMap: describes the expected inputs (types, names)
  • values: a Struct whose fields are the raw JSON values, e.g.: { "batch_index": 1, "batch_info": { ... }, "output_context": {}, "queue_offset": 1 }

func LaunchFormJsonToLiterals

func LaunchFormJsonToLiterals(ctx context.Context, jsonSchema *structpb.Struct) ([]*task.NamedLiteral, error)

LaunchFormJsonToLiterals converts an RSJF JSON schema to a list of NamedLiterals.

func LiteralsToLaunchFormJson

func LiteralsToLaunchFormJson(ctx context.Context, literals []*task.NamedLiteral, variableMap *core.VariableMap) (*structpb.Struct, error)

LiteralsToLaunchFormJson converts a list of NamedLiterals accompanied by a VariableMap to RSJF-compliant JSON schema format.

func TaskSpecToLaunchFormJson

func TaskSpecToLaunchFormJson(ctx context.Context, taskSpec *task.TaskSpec) (*structpb.Struct, error)

TaskSpecToLaunchFormJson converts a TaskSpec to an RSJF-compliant JSON schema.

Types

This section is empty.

Jump to

Keyboard shortcuts

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