transformer

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Jun 15, 2026 License: MPL-2.0 Imports: 7 Imported by: 0

Documentation

Overview

Package transformer transforms a Docker image TAR output to `.zeabur` directory.

Index

Constants

This section is empty.

Variables

View Source
var ErrSkip = errors.New("skip transformer")

ErrSkip is a flag for Transformer to skip the transformation, which is useful for the transformer that doesn't support such plan.

Functions

func Transform

func Transform(ctx *Context) error

Transform runs the transformers in this package.

func TransformNix

func TransformNix(ctx *Context) error

TransformNix push the Nix Docker image output to registry.

Types

type Context

type Context struct {
	PlanType types.PlanType
	PlanMeta types.PlanMeta

	BuildkitPath string
	AppPath      string

	PushImage   bool
	ResultImage string
	LogWriter   io.Writer
}

Context is the context for the transformer.

func (*Context) Log

func (c *Context) Log(format string, args ...interface{})

Log writes a log message to the log writer.

func (*Context) ZeaburPath

func (c *Context) ZeaburPath() string

ZeaburPath returns the `.zeabur` directory of the App path.

type Transformer

type Transformer func(ctx *Context) error

Transformer is the type for the transformer interface.

Jump to

Keyboard shortcuts

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