cmd

package
v0.0.0-...-4d88fb3 Latest Latest
Warning

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

Go to latest
Published: May 29, 2024 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DisableHeaders

func DisableHeaders()

DisableHeaders disables the headers on tables.

func EnableMarkdown

func EnableMarkdown()

EnableMarkdown tables are outputted in markdown format, rather than ASCII.

func NewBuildArgsCmd

func NewBuildArgsCmd() *cobra.Command

NewBuildArgsCmd creates a new build args command.

func NewCheckCmd

func NewCheckCmd() *cobra.Command

NewCheckCmd creates a new CheckCmd.

func NewClusterCmd

func NewClusterCmd() *cobra.Command

NewClusterCmd creates a new cluster command.

func NewDiffCmd

func NewDiffCmd() *cobra.Command

NewDiffCmd creates a new diff command.

func NewDiffNamespaceCmd

func NewDiffNamespaceCmd() *cobra.Command

NewDiffNamespaceCmd creates a new diff namespace command.

func NewImageCmd

func NewImageCmd() *cobra.Command

NewImageCmd creates a new ImageCmd.

func NewLabelsCmd

func NewLabelsCmd() *cobra.Command

NewLabelsCmd struct for the labels command.

func ParseRepo

func ParseRepo(in string) (string, string)

ParseRepo splits a full repository reference into repo and tag.

func Raw

func Raw()

Raw enables raw output on all tables.

func Reset

func Reset()

Reset resets all table formatting to the default.

Types

type BaseCmd

type BaseCmd struct {
	CommandRunner util.CommandRunner
	Log           Logger
}

BaseCmd a common type to contain all the git helper methods.

func NewBaseCmd

func NewBaseCmd() BaseCmd

NewBaseCmd returns a new base command.

func (*BaseCmd) BuildDate

func (b *BaseCmd) BuildDate() (string, error)

BuildDate helper to return the current build date.

func (*BaseCmd) GitCommitRev

func (b *BaseCmd) GitCommitRev() (string, error)

GitCommitRev helper to return the git commit rev.

func (*BaseCmd) GitScmURL

func (b *BaseCmd) GitScmURL() (string, error)

GitScmURL helper to return the git scm url.

func (*BaseCmd) GitTreeState

func (b *BaseCmd) GitTreeState() (string, error)

GitTreeState helper to return the current tree state (clean|dirty).

func (*BaseCmd) GoVersion

func (b *BaseCmd) GoVersion() (string, error)

GoVersion helper to return the current go version.

func (*BaseCmd) Println

func (b *BaseCmd) Println(message string)

Println a helper to allow this to be mocked out.

type BuildArgsCmd

type BuildArgsCmd struct {
	BaseCmd
	Cmd              *cobra.Command
	Args             []string
	IncludeGoVersion bool
}

BuildArgsCmd struct for the build args command.

func (*BuildArgsCmd) Run

func (c *BuildArgsCmd) Run() error

Run runs the command.

type CheckCmd

type CheckCmd struct {
	BaseCmd
	Cmd                  *cobra.Command
	Args                 []string
	LabelLister          registry.LabelLister
	FailOnRecommendation bool
}

CheckCmd struct for the check command.

func (*CheckCmd) Run

func (c *CheckCmd) Run() error

Run runs the command.

type ClusterCmd

type ClusterCmd struct {
	BaseCmd
	Cmd         *cobra.Command
	Args        []string
	ImageLister kube.ImageLister
	LabelLister registry.LabelLister

	Namespace string
}

ClusterCmd struct for the cluster command.

func (*ClusterCmd) Run

func (c *ClusterCmd) Run() error

Run runs the command.

type DiffCmd

type DiffCmd struct {
	BaseCmd
	Cmd         *cobra.Command
	Args        []string
	LabelLister registry.LabelLister
}

DiffCmd a struct for the diff command.

func (*DiffCmd) Run

func (c *DiffCmd) Run() error

Run runs the command.

type DiffNamespaceCmd

type DiffNamespaceCmd struct {
	BaseCmd
	Cmd         *cobra.Command
	Args        []string
	LabelLister registry.LabelLister
	ImageLister kube.ImageLister
}

DiffNamespaceCmd a struct for the diff namespace command.

func (*DiffNamespaceCmd) Run

func (c *DiffNamespaceCmd) Run() error

Run runs the command.

type ImageCmd

type ImageCmd struct {
	BaseCmd
	Cmd         *cobra.Command
	Args        []string
	LabelLister registry.LabelLister
}

ImageCmd struct for the image command.

func (*ImageCmd) Run

func (c *ImageCmd) Run() error

Run runs the command.

type LabelsCmd

type LabelsCmd struct {
	BaseCmd
	Cmd  *cobra.Command
	Args []string

	IncludeGoVersion bool
}

LabelsCmd struct for the labels command.

func (*LabelsCmd) Run

func (c *LabelsCmd) Run() error

Run runs the command.

type Logger

type Logger interface {
	Println(message string)
}

Logger an interface to allow mocking out of the Println func.

Jump to

Keyboard shortcuts

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