commands

package
v0.0.0-...-3255acc Latest Latest
Warning

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

Go to latest
Published: Apr 27, 2023 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// Builder Type
	Ko     = "ko"
	Docker = "docker"

	// Docker constant variables
	Image                 = "function:latest"
	DockerfilePath        = "Dockerfile"
	BuiltinDockerfilePath = "embed/Dockerfile"

	// Ko constant variables
	KoDockerRepoEnvVar = "KO_DOCKER_REPO"
	KoLocalRepo        = "ko.local"
)
View Source
const (
	DefaultFnPkg   = "https://github.com/GoogleContainerTools/kpt-functions-sdk.git/go/get-started@master"
	DefaultPkgName = "function"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type BuildRunner

type BuildRunner struct {
	Command *cobra.Command

	BuilderType string
	Tag         string
	Ko          *KoBuilder
	Docker      *DockerBuilder
	// contains filtered or unexported fields
}

func NewBuildRunner

func NewBuildRunner(ctx context.Context) *BuildRunner

func (*BuildRunner) RunE

func (r *BuildRunner) RunE(cmd *cobra.Command, args []string) error

type Builder

type Builder interface {
	Build() error
	Validate() error
}

type DockerBuilder

type DockerBuilder struct {
	Image          string
	DockerfilePath string
}

func (*DockerBuilder) Build

func (r *DockerBuilder) Build() error

func (*DockerBuilder) Validate

func (r *DockerBuilder) Validate() error

type InitRunner

type InitRunner struct {
	Command *cobra.Command

	FnName    string
	FnPkgPath string
	// contains filtered or unexported fields
}

InitRunner initializes a KRM function project from a scaffolded `kpt pkg`.

func NewInitRunner

func NewInitRunner(ctx context.Context) *InitRunner

func (*InitRunner) GetFnPackage

func (r *InitRunner) GetFnPackage() error

func (*InitRunner) PreRunE

func (r *InitRunner) PreRunE(cmd *cobra.Command, args []string) error

func (*InitRunner) RunE

func (r *InitRunner) RunE(cmd *cobra.Command, args []string) error

type KoBuilder

type KoBuilder struct {
	Repo string
	Tag  string
}

func (*KoBuilder) Build

func (r *KoBuilder) Build() error

func (*KoBuilder) GuaranteeKoInstalled

func (r *KoBuilder) GuaranteeKoInstalled() error

func (*KoBuilder) Validate

func (r *KoBuilder) Validate() error

Jump to

Keyboard shortcuts

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