runner

package
v2.3.1 Latest Latest
Warning

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

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

Documentation

Overview

Package runner contains functions for handling containers for schema generation.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type GenerateOptions

type GenerateOptions struct {
	CopyToPath    string
	CopyFromPath  string
	WorkDirectory string
}

GenerateOptions holds optional parameters for Generate.

func DefaultGenerateOptions

func DefaultGenerateOptions() GenerateOptions

DefaultGenerateOptions provides default values.

type Option

type Option func(*GenerateOptions)

Option is a function that modifies GenerateOptions.

func WithCopyFromPath

func WithCopyFromPath(path string) Option

WithCopyFromPath sets the CopyFromPath option.

func WithCopyToPath

func WithCopyToPath(path string) Option

WithCopyToPath sets the CopyToPath option.

func WithWorkDirectory

func WithWorkDirectory(dir string) Option

WithWorkDirectory sets the WorkDirectory option.

type ROption

type ROption func(*RealSchemaRunner)

ROption configures the SchemaRunner.

func WithImageConfig

func WithImageConfig(cfgs []pkgv1beta1.ImageConfig) ROption

WithImageConfig adds image rewriting rules to the SchemaRunner.

type RealSchemaRunner

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

RealSchemaRunner implements the SchemaRunner interface.

func NewRealSchemaRunner

func NewRealSchemaRunner(opts ...ROption) *RealSchemaRunner

NewRealSchemaRunner creates a new RealSchemaRunner.

func (RealSchemaRunner) Generate

func (r RealSchemaRunner) Generate(ctx context.Context, fromFS afero.Fs, baseFolder, basePath, imageName string, command []string, options ...Option) error

Generate runs the containerized language tool for schema generation.

type SchemaRunner

type SchemaRunner interface {
	Generate(ctx context.Context, fs afero.Fs, folder string, basePath string, imageName string, args []string, options ...Option) error
}

SchemaRunner defines an interface for schema generation.

Jump to

Keyboard shortcuts

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