subcmd

package
v0.8.18 Latest Latest
Warning

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

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

Documentation

Overview

Package subcmd defines the various earth CLI subcommands (e.g., build, prune, init, debug) and their specific logic.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Bootstrap

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

Bootstrap encapsulates the bootstrap command logic.

func NewBootstrap

func NewBootstrap(cli CLI) *Bootstrap

NewBootstrap creates a new Bootstrap command.

func (*Bootstrap) Action

func (b *Bootstrap) Action(ctx context.Context, cmd *cli.Command) error

Action handles the bootstrap command.

func (*Bootstrap) Cmds

func (b *Bootstrap) Cmds() []*cli.Command

Cmds returns the list of commands for the bootstrap command.

type Build

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

Build encapsulates the build command logic.

func NewBuild

func NewBuild(cli CLI) *Build

NewBuild creates a new Build command.

func (*Build) Action

func (b *Build) Action(ctx context.Context, cmd *cli.Command) error

Action handles the "build" command.

func (*Build) ActionBuildImp

func (b *Build) ActionBuildImp(ctx context.Context, cmd *cli.Command, flagArgs, nonFlagArgs []string) error

ActionBuildImp handles the "build" command implementation.

func (*Build) Cmds

func (b *Build) Cmds() []*cli.Command

Cmds returns the list of commands for the build command.

func (*Build) HiddenFlags

func (b *Build) HiddenFlags() []cli.Flag

HiddenFlags returns the hidden build flags.

type CLI

type CLI interface {
	App() *cli.Command

	Version() string
	GitSHA() string

	Flags() *flag.Global
	Console() conslogging.ConsoleLogger
	SetConsole(conslogging.ConsoleLogger)

	InitFrontend(context.Context, *cli.Command) error
	Cfg() *config.Config
	SetCommandName(name string)

	GetBuildkitClient(context.Context, *cli.Command) (client *client.Client, err error)

	LogbusSetup() *setup.BusSetup
	Logbus() *logbus.Bus

	AddDeferredFunc(f func())
}

CLI is the interface for the base earth CLI.

type Config

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

Config encapsulates the config command logic.

func NewConfig

func NewConfig(cli CLI) *Config

NewConfig creates a new Config command.

func (*Config) Cmds

func (a *Config) Cmds() []*cli.Command

Cmds returns the list of commands for the config command.

type Debug

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

Debug encapsulates the debug command logic.

func NewDebug

func NewDebug(cli CLI) *Debug

NewDebug creates a new Debug command.

func (*Debug) Cmds

func (a *Debug) Cmds() []*cli.Command

Cmds returns the list of commands for the debug command.

type Doc

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

Doc encapsulates the doc command logic.

func NewDoc

func NewDoc(cli CLI) *Doc

NewDoc creates a new Doc command.

func (*Doc) Cmds

func (a *Doc) Cmds() []*cli.Command

Cmds returns the list of commands for the doc command.

type Doc2Earth

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

Doc2Earth encapsulates the doc2earth command logic.

func NewDoc2Earth

func NewDoc2Earth(cli CLI) *Doc2Earth

NewDoc2Earth creates a new Doc2Earth command.

func (*Doc2Earth) Cmds

func (a *Doc2Earth) Cmds() []*cli.Command

Cmds returns the list of commands for the docker2earth command.

type Init

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

Init encapsulates the init command logic.

func NewInit

func NewInit(cli CLI) *Init

NewInit creates a new Init command.

func (*Init) Cmds

func (a *Init) Cmds() []*cli.Command

Cmds returns the list of commands for the init command.

type List

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

List encapsulates the ls command logic.

func NewList

func NewList(cli CLI) *List

NewList creates a new List command.

func (*List) Cmds

func (a *List) Cmds() []*cli.Command

Cmds returns the list of commands for the list command.

type Prune

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

Prune encapsulates the prune command logic.

func NewPrune

func NewPrune(cli CLI) *Prune

NewPrune creates a new Prune command.

func (*Prune) Cmds

func (a *Prune) Cmds() []*cli.Command

Cmds returns the list of commands for the prune command.

type Root

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

Root encapsulates the root command logic.

func NewRoot

func NewRoot(cli CLI, buildCmd *Build) *Root

NewRoot creates a new Root command.

func (*Root) Cmds

func (a *Root) Cmds() []*cli.Command

Cmds returns the list of commands for the root command.

Jump to

Keyboard shortcuts

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