command

package
v0.64.0 Latest Latest
Warning

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

Go to latest
Published: Apr 24, 2024 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetCommitFromGit

func GetCommitFromGit() (string, error)

GetCommitFromGit runs git in order to get the current commit.

func GetComponentFromGit

func GetComponentFromGit() (string, error)

GetComponentFromGit gets the last part of the git repo name to use as a default component name.

Types

type Failure added in v0.22.0

type Failure int

Failure represents a non-zero exit status without the need for further output.

func (Failure) Error added in v0.22.0

func (Failure) Error() string

Error outputs and empty string - the reason for failure will have already been output to the user.

type GlobalArgs added in v0.3.0

type GlobalArgs struct {
	Command         string
	Component       string
	Commit          string
	NoPullConfig    bool
	NoPullRelease   bool
	NoPullTerraform bool
}

GlobalArgs represents the global (non command specific) arguments.

func ParseArgs

func ParseArgs(args []string) (*GlobalArgs, []string, error)

ParseArgs takes arguments and splits them into global and remaining args.

type GlobalState

type GlobalState struct {
	GlobalArgs        *GlobalArgs
	ConfigFilesFolder string
	Component         string
	Commit            string
	CodeDir           string
	Manifest          *manifest.Manifest
	InputStream       io.Reader
	OutputStream      io.Writer
	ErrorStream       io.Writer
	DockerClient      docker.Iface
	MonitoringClient  *monitoring.DatadogClient
}

GlobalState contains common to all commands.

func GetGlobalState

func GetGlobalState(globalArgs *GlobalArgs, repoShouldExist bool) (*GlobalState, error)

GetGlobalState collects info common to every command.

Jump to

Keyboard shortcuts

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