transformer

package
v0.0.0-...-6a68052 Latest Latest
Warning

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

Go to latest
Published: Feb 28, 2025 License: MPL-2.0 Imports: 14 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 TransformGleam

func TransformGleam(ctx *Context) error

TransformGleam transforms the Gleam build output to serverless format.

func TransformGolang

func TransformGolang(ctx *Context) error

TransformGolang transforms Golang functions.

func TransformNix

func TransformNix(ctx *Context) error

TransformNix push the Nix Docker image output to registry.

func TransformNodejsNext

func TransformNodejsNext(ctx *Context) error

TransformNodejsNext transforms Node.js Next.js functions.

func TransformNodejsNuxt

func TransformNodejsNuxt(ctx *Context) error

TransformNodejsNuxt transforms Node.js Nuxt.js framework.

func TransformNodejsRemix

func TransformNodejsRemix(ctx *Context) error

TransformNodejsRemix transforms Node.js Remix.js functions.

func TransformNodejsWaku

func TransformNodejsWaku(ctx *Context) error

TransformNodejsWaku transforms Node.js Waku framework.

func TransformPython

func TransformPython(ctx *Context) error

TransformPython transforms Python functions.

func TransformRust

func TransformRust(ctx *Context) error

TransformRust transforms Rust functions.

func TransformStatic

func TransformStatic(ctx *Context) error

TransformStatic copies the static files from output to .zeabur/output/static and creates a config.json file for SPA

func TransformZeaburDir

func TransformZeaburDir(ctx *Context) error

TransformZeaburDir is a transformer function to copy the .zeabur directory.

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