runtime

package
v0.2.3 Latest Latest
Warning

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

Go to latest
Published: May 17, 2024 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Bun

type Bun struct {
	Log *slog.Logger
}

func (*Bun) GenerateDockerfile

func (d *Bun) GenerateDockerfile(path string) ([]byte, error)

func (*Bun) Match

func (d *Bun) Match(path string) bool

func (*Bun) Name

func (d *Bun) Name() RuntimeName

type Deno

type Deno struct {
	Log *slog.Logger
}

func (*Deno) GenerateDockerfile

func (d *Deno) GenerateDockerfile(path string) ([]byte, error)

func (*Deno) Match

func (d *Deno) Match(path string) bool

func (*Deno) Name

func (d *Deno) Name() RuntimeName

type Elixir

type Elixir struct {
	Log *slog.Logger
}

func (*Elixir) GenerateDockerfile

func (d *Elixir) GenerateDockerfile(path string) ([]byte, error)

func (*Elixir) Match

func (d *Elixir) Match(path string) bool

func (*Elixir) Name

func (d *Elixir) Name() RuntimeName

type Golang

type Golang struct {
	Log *slog.Logger
}

func (*Golang) GenerateDockerfile

func (d *Golang) GenerateDockerfile(path string) ([]byte, error)

func (*Golang) Match

func (d *Golang) Match(path string) bool

func (*Golang) Name

func (d *Golang) Name() RuntimeName

type Java

type Java struct {
	Log *slog.Logger
}

func (*Java) GenerateDockerfile

func (d *Java) GenerateDockerfile(path string) ([]byte, error)

func (*Java) Match

func (d *Java) Match(path string) bool

func (*Java) Name

func (d *Java) Name() RuntimeName

type NextJS

type NextJS struct {
	Log *slog.Logger
}

func (*NextJS) GenerateDockerfile

func (d *NextJS) GenerateDockerfile(path string) ([]byte, error)

func (*NextJS) Match

func (d *NextJS) Match(path string) bool

func (*NextJS) Name

func (d *NextJS) Name() RuntimeName

type Node

type Node struct {
	Log *slog.Logger
}

func (*Node) GenerateDockerfile

func (d *Node) GenerateDockerfile(path string) ([]byte, error)

func (*Node) Match

func (d *Node) Match(path string) bool

func (*Node) Name

func (d *Node) Name() RuntimeName

type PHP

type PHP struct {
	Log *slog.Logger
}

func (*PHP) GenerateDockerfile

func (d *PHP) GenerateDockerfile(path string) ([]byte, error)

func (*PHP) Match

func (d *PHP) Match(path string) bool

func (*PHP) Name

func (d *PHP) Name() RuntimeName

type Python

type Python struct {
	Log *slog.Logger
}

func (*Python) GenerateDockerfile

func (d *Python) GenerateDockerfile(path string) ([]byte, error)

func (*Python) Match

func (d *Python) Match(path string) bool

func (*Python) Name

func (d *Python) Name() RuntimeName

type Ruby

type Ruby struct {
	Log *slog.Logger
}

func (*Ruby) GenerateDockerfile

func (d *Ruby) GenerateDockerfile(path string) ([]byte, error)

func (*Ruby) Match

func (d *Ruby) Match(path string) bool

func (*Ruby) Name

func (d *Ruby) Name() RuntimeName

type Runtime

type Runtime interface {
	// Returns the name of the runtime.
	Name() RuntimeName
	// Returns true if the runtime can be used for the given path.
	Match(path string) bool
	// Generates a Dockerfile for the given path.
	GenerateDockerfile(path string) ([]byte, error)
}

An interface that all runtimes must implement.

type RuntimeName

type RuntimeName string
const (
	RuntimeNameGolang RuntimeName = "Go"
	RuntimeNameRuby   RuntimeName = "Ruby"
	RuntimeNamePython RuntimeName = "Python"
	RuntimeNamePHP    RuntimeName = "PHP"
	RuntimeNameElixir RuntimeName = "Elixir"
	RuntimeNameJava   RuntimeName = "Java"
	RuntimeNameRust   RuntimeName = "Rust"
	RuntimeNameNextJS RuntimeName = "Next.js"
	RuntimeNameBun    RuntimeName = "Bun"
	RuntimeNameDeno   RuntimeName = "Deno"
	RuntimeNameNode   RuntimeName = "Node"
	RuntimeNameStatic RuntimeName = "Static"
)

type Rust

type Rust struct {
	Log *slog.Logger
}

func (*Rust) GenerateDockerfile

func (d *Rust) GenerateDockerfile(path string) ([]byte, error)

func (*Rust) Match

func (d *Rust) Match(path string) bool

func (*Rust) Name

func (d *Rust) Name() RuntimeName

type Static

type Static struct {
	Log *slog.Logger
}

func (*Static) GenerateDockerfile

func (d *Static) GenerateDockerfile(path string) ([]byte, error)

func (*Static) Match

func (d *Static) Match(path string) bool

func (*Static) Name

func (d *Static) Name() RuntimeName

Jump to

Keyboard shortcuts

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