builder

package
v0.1.17 Latest Latest
Warning

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

Go to latest
Published: May 14, 2025 License: LGPL-2.1 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func WithBundlerPlugins added in v0.1.6

func WithBundlerPlugins(ctx context.Context, plugins []api.Plugin) context.Context

Types

type BundledContent

type BundledContent[TSettings any] struct {
	Source          []byte                      `json:"source"`
	BundleHash      string                      `json:"hash"`
	Settings        WorkflowSettings[TSettings] `json:"settings"`
	BundlingOptions BundlerOptions[TSettings]   `json:"bundling_options"`
}

type BundlerOptions

type BundlerOptions[TSettings any] struct {
	WorkingFolder       string                                                      `json:"working_folder"`
	EntryPoints         []string                                                    `json:"entry_points"`
	IntrospectionExport string                                                      `json:"introspection_export"`
	OnDiscovered        func(ctx context.Context, bundle *BundlerResult[TSettings]) `json:"-"`
}

type BundlerResult

type BundlerResult[TSettings any] struct {
	Content           BundledContent[TSettings] `json:"bundle"`
	Errors            []string                  `json:"errors"`
	CompilationErrors []interface{}             `json:"compilation_errors"`
	Warnings          []string                  `json:"warnings"`
	DefaultExports    []string                  `json:"default_exports"`
}

func (*BundlerResult[TSettings]) HasOutput

func (br *BundlerResult[TSettings]) HasOutput() bool

type WorkflowBundler

type WorkflowBundler[TSettings any] interface {
	Bundle(ctx context.Context) BundlerResult[TSettings]
}

func NewWorkflowBundler

func NewWorkflowBundler[TSettings any](options BundlerOptions[TSettings]) WorkflowBundler[TSettings]

type WorkflowSettings

type WorkflowSettings[TSettings any] struct {
	Bindings map[string]runtimesRegistry.BindingSettings `json:"bindings"`
	Other    TSettings                                   `json:"other"`
}

func (*WorkflowSettings[TSettings]) UnmarshalJSON added in v0.1.8

func (settings *WorkflowSettings[TSettings]) UnmarshalJSON(data []byte) error

Jump to

Keyboard shortcuts

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