Help us shape the future of Go! Take the 2026 Go Developer Survey

composite

package
v1.26.5 Latest Latest
Warning

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

Go to latest
Published: Mar 28, 2023 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

View Source
const (
	BasicBuilderSchema  = "olm.builder.basic"
	SemverBuilderSchema = "olm.builder.semver"
	RawBuilderSchema    = "olm.builder.raw"
	CustomBuilderSchema = "olm.builder.custom"
)
View Source
const (
	CompositeSchema = "olm.composite"
	CatalogSchema   = "olm.composite.catalogs"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type BasicBuilder

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

func NewBasicBuilder

func NewBasicBuilder(builderCfg BuilderConfig) *BasicBuilder

func (*BasicBuilder) Build

func (*BasicBuilder) Validate

func (bb *BasicBuilder) Validate(dir string) error

type BasicConfig

type BasicConfig struct {
	Input  string
	Output string
}

type BuildStrategy

type BuildStrategy struct {
	Name     string
	Template TemplateDefinition
}

type Builder

type Builder interface {
	Build(ctx context.Context, reg image.Registry, dir string, td TemplateDefinition) error
	Validate(dir string) error
}

type BuilderConfig

type BuilderConfig struct {
	ContainerCfg   ContainerConfig
	OutputType     string
	InputDirectory string
}

type BuilderMap

type BuilderMap map[string]Builder

type Catalog

type Catalog struct {
	Name        string
	Destination CatalogDestination
	Builders    []string
}

type CatalogBuilderMap

type CatalogBuilderMap map[string]BuilderMap

type CatalogConfig

type CatalogConfig struct {
	Schema   string
	Catalogs []Catalog
}

type CatalogDestination

type CatalogDestination struct {
	BaseImage  string
	WorkingDir string
}

type Component

type Component struct {
	Name        string
	Destination ComponentDestination
	Strategy    BuildStrategy
}

type ComponentDestination

type ComponentDestination struct {
	Path string
}

type CompositeConfig

type CompositeConfig struct {
	Schema     string
	Components []Component
}

type ContainerConfig

type ContainerConfig struct {
	ContainerTool string
	BaseImage     string
	WorkingDir    string
}

type CustomBuilder

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

func NewCustomBuilder

func NewCustomBuilder(builderCfg BuilderConfig) *CustomBuilder

func (*CustomBuilder) Build

func (*CustomBuilder) Validate

func (cb *CustomBuilder) Validate(dir string) error

type CustomConfig

type CustomConfig struct {
	Command string
	Args    []string
	Output  string
}

type RawBuilder

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

func NewRawBuilder

func NewRawBuilder(builderCfg BuilderConfig) *RawBuilder

func (*RawBuilder) Build

func (*RawBuilder) Validate

func (rb *RawBuilder) Validate(dir string) error

type RawConfig

type RawConfig struct {
	Input  string
	Output string
}

type SemverBuilder

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

func NewSemverBuilder

func NewSemverBuilder(builderCfg BuilderConfig) *SemverBuilder

func (*SemverBuilder) Build

func (*SemverBuilder) Validate

func (sb *SemverBuilder) Validate(dir string) error

type SemverConfig

type SemverConfig struct {
	Input  string
	Output string
}

type Template

type Template struct {
	CatalogBuilders CatalogBuilderMap
	Registry        image.Registry
}

func (*Template) Render

func (t *Template) Render(ctx context.Context, config *CompositeConfig, validate bool) error

TODO(everettraven): do we need the context here? If so, how should it be used?

type TemplateDefinition

type TemplateDefinition struct {
	Schema string
	Config json.RawMessage
}

Jump to

Keyboard shortcuts

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