project_bundler

package
v0.1.15 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DiscoveryOptions

type DiscoveryOptions[TWorkflowSettings, TPageSettings any] struct {
	StartFolder          string
	OnRootDiscovered     func(ctx context.Context, bundle ProjectConfiguration)
	OnWorkflowDiscovered func(ctx context.Context, bundle *bundler.BundlerResult[TWorkflowSettings])
	OnPageDiscovered     func(ctx context.Context, bundle *bundler.BundlerResult[TPageSettings])
}

DiscoveryOptions is the struct that holds the options for the project discovery.

type KindeEnvironment

type KindeEnvironment[TWorkflowSettings, TPageSettings any] struct {
	Workflows []KindeWorkflow[TWorkflowSettings] `json:"workflows"`
	Pages     []KindePage[TPageSettings]         `json:"pages"`
	// contains filtered or unexported fields
}

KindeEnvironment is the struct that holds the workflows and pages.

type KindePage added in v0.1.8

type KindePage[TSettings any] struct {
	RootDirectory string                           `json:"root_directory"`
	EntryPoints   []string                         `json:"entry_points"`
	Bundle        bundler.BundlerResult[TSettings] `json:"bundle"`
}

KindePage is the struct that holds the page configuration.

type KindeProject

type KindeProject[TWorkflowSettings, TPageSettings any] struct {
	Configuration ProjectConfiguration                               `json:"configuration"`
	Environment   KindeEnvironment[TWorkflowSettings, TPageSettings] `json:"environment"`
}

KindeProject is the struct that holds the project configuration and the environment.

type KindeWorkflow

type KindeWorkflow[TSettings any] struct {
	WorkflowRootDirectory string                           `json:"workflow_root_directory"`
	EntryPoints           []string                         `json:"entry_points"`
	Bundle                bundler.BundlerResult[TSettings] `json:"bundle"`
}

KindeWorkflow is the struct that holds the workflow configuration.

type ProjectBundler

type ProjectBundler[TWorkflowSettings, TPageSettings any] interface {
	Discover(ctx context.Context) (*KindeProject[TWorkflowSettings, TPageSettings], error)
}

ProjectBundler is the interface that wraps the Discover method.

func NewProjectBundler

func NewProjectBundler[TWorkflowSettings, TPageSettings any](discoveryOptions DiscoveryOptions[TWorkflowSettings, TPageSettings]) ProjectBundler[TWorkflowSettings, TPageSettings]

NewProjectBundler returns a new instance of ProjectBundler.

type ProjectConfiguration

type ProjectConfiguration struct {
	Version     string `json:"version"`
	RootDir     string `json:"rootDir"`
	AbsLocation string `json:"location"`
}

ProjectConfiguration is the struct that holds the project configuration.

func GetProjectConfiguration added in v0.1.12

func GetProjectConfiguration(ctx context.Context) *ProjectConfiguration

GetProjectConfiguration returns the project configuration from the context. If the configuration is not found, it returns nil.

Jump to

Keyboard shortcuts

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