cli

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Apr 11, 2019 License: MIT Imports: 31 Imported by: 2

Documentation

Overview

Package cli implements the Sous Command Line Interface. It is a presentation layer, and contains no core logic.

Index

Constants

View Source
const OtplFlagsHelp = `` /* 131-byte string literal not displayed */

Variables

View Source
var (
	// ClusterFilterFlagsHelp just exposes the -cluster flag (for server)
	ClusterFilterFlagsHelp = clusterFlagHelp
	// ManifestFilterFlagsHelp the text/config for selecting manifests
	ManifestFilterFlagsHelp = sourceFlagHelp + repoFlagHelp + offsetFlagHelp + flavorFlagHelp
	// MetadataFilterFlagsHelp the the text/config for metadata commands
	MetadataFilterFlagsHelp = sourceFlagHelp + repoFlagHelp + offsetFlagHelp + flavorFlagHelp + clusterFlagHelp
	// SourceFlagsHelp is the text (and config) for source flags
	SourceFlagsHelp = repoFlagHelp + offsetFlagHelp + flavorFlagHelp + tagFlagHelp + revisionFlagHelp
	// RectifyFilterFlagsHelp is the text (and config) for rectification flags
	RectifyFilterFlagsHelp = repoFlagHelp + offsetFlagHelp + flavorFlagHelp + clusterFlagHelp + allFlagHelp
	// DeployFilterFlagsHelp is the text and config for deploy flags
	DeployFilterFlagsHelp = repoFlagHelp + offsetFlagHelp + flavorFlagHelp + clusterFlagHelp + allFlagHelp + tagFlagHelp
	// NewDeployFilterFlagsHelp is the text and config for deploy flags
	NewDeployFilterFlagsHelp = repoFlagHelp + offsetFlagHelp + flavorFlagHelp + clusterFlagHelp + tagFlagHelp
	// AddArtifactFlagsHelp is the text and config for add artifact flags
	AddArtifactFlagsHelp = repoFlagHelp + offsetFlagHelp + tagFlagHelp
)
View Source
var AddSubcommands = cmdr.Commands{}

AddSubcommands collects the subcommands of `sous add` as they're added

View Source
var ArtifactSubcommands = cmdr.Commands{}

ArtifactSubcommands collects the subcommands of `sous add` as they're added

View Source
var GetSubcommands = cmdr.Commands{}

GetSubcommands collects the subcommands of `sous add` as they're added

View Source
var ManifestSubcommands = cmdr.Commands{}

ManifestSubcommands holds the subcommands of `sous manifest`

View Source
var MetadataSubcommands = cmdr.Commands{}

MetadataSubcommands holds the subcommands of `sous metadata`.

View Source
var PlumbingSubcommands = cmdr.Commands{}

PlumbingSubcommands collects the subcommands of `sous plumbing` as they're added

View Source
var QuerySubcommands = cmdr.Commands{}

QuerySubcommands are the subcommands of 'sous query'.

View Source
var TopLevelCommands = cmdr.Commands{}

TopLevelCommands is populated once per command file (beginning sous_) in this directory.

Functions

func AddFlags

func AddFlags(fs *flag.FlagSet, target interface{}, help string, optDefaults ...map[string]interface{}) error

AddFlags sniffs out struct fields from target and adds them as var flags to the flag set.

func AddVerbosityFlags added in v1.0.1

func AddVerbosityFlags(v *config.Verbosity) func(*flag.FlagSet)

AddVerbosityFlags adds the -s -q -v -d flags to fs, linking them to the provided config.Verbosity pointer v.

func EnsureErrorResult

func EnsureErrorResult(err error) cmdr.ErrorResult

EnsureErrorResult is a convenience for returning from a command.

func GeneralErrorf added in v0.0.3

func GeneralErrorf(format string, a ...interface{}) cmdr.ErrorResult

GeneralErrorf is an convenience method for returning from commands.

func MustAddFlags added in v0.0.2

func MustAddFlags(fs *flag.FlagSet, target interface{}, help string, optDefaults ...map[string]interface{})

MustAddFlags wraps AddFlags and panics if AddFlags returns an error.

func ProduceResult

func ProduceResult(err error) cmdr.Result

ProduceResult converts errors into Results

func SuccessYAML

func SuccessYAML(v interface{}) cmdr.Result

SuccessYAML lets you return YAML on the command line.

Types

type Addable

type Addable interface {
	Add(...interface{})
}

Addable objects are able to receive lists of interface{}, presumably to add them to a DI registry. Abstracts Psyringe's Add()

type BuildFlags

type BuildFlags struct {
	Strict  bool   `flag:"strict"`
	Builder string `flag:"builder"`
}

BuildFlags are CLI flags used to set build options.

type CLI added in v0.0.2

type CLI struct {
	*cmdr.CLI
	LogSink logging.LogSink
	// contains filtered or unexported fields
}

CLI describes the command line interface for Sous

func NewSousCLI

func NewSousCLI(di *graph.SousGraph, s *Sous, earlyLogging logging.LogSink, out, errout io.Writer) (*CLI, error)

NewSousCLI creates a new Sous cli app.

func (*CLI) Invoke added in v1.0.1

func (cli *CLI) Invoke(args []string) cmdr.Result

Invoke wraps the cmdr.CLI Invoke for logging.

type DeployFlags

type DeployFlags struct {
	Deployer   string `flag:"deployer"`
	DryRun     bool   `flag:"dry-run"`
	ForceClone bool   `flag:"force-clone"`
	Cluster    string `flag:"cluster"`
}

DeployFlags are CLI flags used to set deployment context and options.

type Registrant

type Registrant interface {
	RegisterOn(Addable)
}

A Registrant is able to add values to an Addable (implicitly: a Psyringe)

type Sous

type Sous struct {
	// CLI is a reference to the CLI singleton.
	CLI *CLI
	graph.LogSink
	// Version is the version of Sous itself.
	Version semv.Version
	// OS is the OS this Sous is running on.
	OS string `inject:"optional"`
	// Arch is the architecture this Sous is running on.
	Arch string `inject:"optional"`
	// GoVersion is the version of Go this sous was built with.
	GoVersion string `inject:"optional"`
	// contains filtered or unexported fields
}

Sous is the main sous command.

func (*Sous) Execute

func (s *Sous) Execute(args []string) cmdr.Result

Execute exists to present a helpful error to the user, in the case they just run 'sous' with not subcommand.

func (*Sous) Help

func (*Sous) Help() string

Help returns the top-level help for Sous.

func (*Sous) Subcommands

func (s *Sous) Subcommands() cmdr.Commands

Subcommands returns all the top-level sous subcommands.

type SousAdd added in v1.0.1

type SousAdd struct{}

SousAdd is the `sous add` subcommand

func (*SousAdd) Help added in v1.0.1

func (*SousAdd) Help() string

Help implements Command for SousAdd

func (SousAdd) RegisterOn added in v1.0.1

func (SousAdd) RegisterOn(psy Addable)

RegisterOn implements Registrant on SousAdd

func (SousAdd) Subcommands added in v1.0.1

func (SousAdd) Subcommands() cmdr.Commands

Subcommands implements Submcommandor for SousPlumbing

type SousArtifact added in v1.0.1

type SousArtifact struct{}

SousArtifact is the `sous artifact` command

func (*SousArtifact) Execute added in v1.0.1

func (sm *SousArtifact) Execute(args []string) cmdr.Result

Execute implements Executor on SousArtifact

func (*SousArtifact) Help added in v1.0.1

func (*SousArtifact) Help() string

Help implements Command for SousArtifact

func (SousArtifact) Subcommands added in v1.0.1

func (SousArtifact) Subcommands() cmdr.Commands

Subcommands implements Submcommandor on SousArtifact

type SousArtifactAdd added in v1.0.1

type SousArtifactAdd struct {
	SousGraph *graph.SousGraph
	// contains filtered or unexported fields
}

SousArtifactAdd defines the `sous artifact add` command

func (*SousArtifactAdd) AddFlags added in v1.0.1

func (sa *SousArtifactAdd) AddFlags(fs *flag.FlagSet)

AddFlags adds the flags.

func (*SousArtifactAdd) Execute added in v1.0.1

func (sa *SousArtifactAdd) Execute(args []string) cmdr.Result

Execute defines the behavior of 'sous add artifact'.

func (*SousArtifactAdd) Help added in v1.0.1

func (*SousArtifactAdd) Help() string

Help prints the help.

type SousArtifactGet added in v1.0.1

type SousArtifactGet struct {
	SousGraph *graph.SousGraph
	// contains filtered or unexported fields
}

SousArtifactGet is the description of the `sous add artifacat` command

func (*SousArtifactGet) AddFlags added in v1.0.1

func (sa *SousArtifactGet) AddFlags(fs *flag.FlagSet)

AddFlags adds the flags.

func (*SousArtifactGet) Execute added in v1.0.1

func (sa *SousArtifactGet) Execute(args []string) cmdr.Result

Execute defines the behavior of 'sous add artifact'.

func (*SousArtifactGet) Help added in v1.0.1

func (*SousArtifactGet) Help() string

Help prints the help.

func (*SousArtifactGet) RegisterOn added in v1.0.1

func (sa *SousArtifactGet) RegisterOn(psy Addable)

RegisterOn adds flag-derived values to the graph.

type SousBuild

type SousBuild struct {
	DeployFilterFlags config.DeployFilterFlags `inject:"optional"`
	PolicyFlags       config.PolicyFlags       `inject:"optional"`

	SousGraph *graph.SousGraph
	// contains filtered or unexported fields
}

SousBuild is the command description for `sous build` Implements cmdr.Command, cmdr.Executor and cmdr.AddFlags

func (*SousBuild) AddFlags

func (sb *SousBuild) AddFlags(fs *flag.FlagSet)

AddFlags adds flags to the build command.

func (*SousBuild) Execute

func (sb *SousBuild) Execute(args []string) cmdr.Result

Execute fulfills the cmdr.Executor interface

func (*SousBuild) Help

func (*SousBuild) Help() string

Help returns the help string for this command

func (*SousBuild) RegisterOn

func (sb *SousBuild) RegisterOn(psy Addable)

RegisterOn adds the DeploymentConfig to the psyringe to configure the labeller and registrar

type SousConfig

type SousConfig struct {
	User   config.LocalUser
	Config graph.PossiblyInvalidConfig
}

SousConfig is the sous config command.

func (*SousConfig) Execute

func (sc *SousConfig) Execute(args []string) cmdr.Result

Execute displays or sets config properties.

func (*SousConfig) Help

func (sc *SousConfig) Help() string

Help returns help for 'sous config'.

type SousContext

type SousContext struct {
	config.DeployFilterFlags `inject:"optional"`
	*sous.SourceContext
}

SousContext is the 'sous context' command.

func (*SousContext) AddFlags

func (sc *SousContext) AddFlags(fs *flag.FlagSet)

AddFlags adds flags to the context command.

func (*SousContext) Execute

func (sc *SousContext) Execute(args []string) cmdr.Result

Execute prints the detected sous context.

func (*SousContext) Help

func (*SousContext) Help() string

Help provides help for sous context.

func (*SousContext) RegisterOn

func (sc *SousContext) RegisterOn(psy Addable)

RegisterOn adds the DeploymentConfig to the psyringe to configure the labeller and registrar

type SousDeploy added in v0.0.2

type SousDeploy struct {
	SousGraph *graph.SousGraph
	// contains filtered or unexported fields
}

SousDeploy is the command description for `sous deploy`.

func (*SousDeploy) AddFlags added in v0.0.2

func (sd *SousDeploy) AddFlags(fs *flag.FlagSet)

AddFlags adds the flags for sous init.

func (*SousDeploy) Execute added in v0.0.2

func (sd *SousDeploy) Execute(args []string) cmdr.Result

Execute fulfills the cmdr.Executor interface.

func (*SousDeploy) Help added in v0.0.2

func (sd *SousDeploy) Help() string

Help returns the help string for this command.

type SousGet added in v1.0.1

type SousGet struct{}

SousAdd is the `sous add` subcommand

func (*SousGet) Help added in v1.0.1

func (*SousGet) Help() string

Help implements Command for SousAdd

func (SousGet) RegisterOn added in v1.0.1

func (SousGet) RegisterOn(psy Addable)

RegisterOn implements Registrant on SousAdd

func (SousGet) Subcommands added in v1.0.1

func (SousGet) Subcommands() cmdr.Commands

Subcommands implements Submcommandor for SousPlumbing

type SousHarvest

type SousHarvest struct {
	StateManager      *graph.ClientStateManager
	Registry          sous.Registry
	ErrWriter         graph.ErrWriter
	DeployFilterFlags config.DeployFilterFlags `inject:"optional"`
}

SousHarvest is the description of the `sous query gdm` command

func (*SousHarvest) AddFlags added in v1.0.1

func (sh *SousHarvest) AddFlags(fs *flag.FlagSet)

AddFlags adds the -cluster flag.

func (*SousHarvest) Execute

func (sh *SousHarvest) Execute(args []string) cmdr.Result

Execute defines the behavior of `sous query gdm`

func (*SousHarvest) Help

func (*SousHarvest) Help() string

Help prints the help

func (*SousHarvest) RegisterOn added in v0.0.3

func (sh *SousHarvest) RegisterOn(psy Addable)

RegisterOn implements Registrar on SousHarvest

type SousHelp

type SousHelp struct {
	CLI  *CLI
	Sous *Sous
}

func (*SousHelp) Execute

func (sh *SousHelp) Execute(subCmdArgs []string) cmdr.Result

func (*SousHelp) Help

func (sh *SousHelp) Help() string

type SousInit

type SousInit struct {
	DeployFilterFlags config.DeployFilterFlags `inject:"optional"`
	Flags             config.OTPLFlags         `inject:"optional"`
	// DryRunFlag prints out the manifest but does not save it.
	DryRunFlag   bool `inject:"optional"`
	Target       graph.TargetManifest
	WD           graph.LocalWorkDirShell
	StateManager *graph.ClientStateManager
	User         sous.User

	graph.LogSink
	// contains filtered or unexported fields
}

SousInit is the command description for `sous init`

func (*SousInit) AddFlags

func (si *SousInit) AddFlags(fs *flag.FlagSet)

AddFlags adds the flags for sous init.

func (*SousInit) Execute

func (si *SousInit) Execute(args []string) cmdr.Result

Execute fulfills the cmdr.Executor interface

func (*SousInit) Help

func (si *SousInit) Help() string

Help returns the help string for this command

func (*SousInit) RegisterOn

func (si *SousInit) RegisterOn(psy Addable)

RegisterOn adds flag sets for sous init to the dependency injector.

type SousJenkins added in v1.0.1

type SousJenkins struct {
	SousGraph *graph.SousGraph
	// contains filtered or unexported fields
}

SousJenkins is the command description for `sous deploy`.

func (*SousJenkins) AddFlags added in v1.0.1

func (sd *SousJenkins) AddFlags(fs *flag.FlagSet)

AddFlags adds the flags for sous init.

func (*SousJenkins) Execute added in v1.0.1

func (sd *SousJenkins) Execute(args []string) cmdr.Result

Execute fulfills the cmdr.Executor interface.

func (*SousJenkins) Help added in v1.0.1

func (sd *SousJenkins) Help() string

Help returns the help string for this command.

type SousManifest added in v0.0.3

type SousManifest struct{}

SousManifest describes the `sous manifest` command

func (*SousManifest) Execute added in v0.0.3

func (sm *SousManifest) Execute(args []string) cmdr.Result

Execute implements Executor on SousManifest

func (*SousManifest) Help added in v0.0.3

func (*SousManifest) Help() string

Help implements Command on SousManifest

func (SousManifest) Subcommands added in v0.0.3

func (SousManifest) Subcommands() cmdr.Commands

Subcommands implements Subcommander on SousManifest

type SousManifestEdit added in v1.0.1

type SousManifestEdit struct {
	config.DeployFilterFlags `inject:"optional"`
	SousGraph                *graph.SousGraph
}

SousManifestEdit defines the `sous manifest edit` command.

func (*SousManifestEdit) AddFlags added in v1.0.1

func (sme *SousManifestEdit) AddFlags(fs *flag.FlagSet)

AddFlags implements AddFlagger on SousManifestEdit.

func (*SousManifestEdit) Execute added in v1.0.1

func (sme *SousManifestEdit) Execute(args []string) cmdr.Result

Execute implements Executor on SousManifestEdit.

func (*SousManifestEdit) Help added in v1.0.1

func (*SousManifestEdit) Help() string

Help implements Command on SousManifestEdit.

type SousManifestGet added in v0.0.3

type SousManifestGet struct {
	config.DeployFilterFlags `inject:"optional"`
	SousGraph                *graph.SousGraph
}

SousManifestGet defines the `sous manifest get` command.

func (*SousManifestGet) AddFlags added in v0.0.3

func (smg *SousManifestGet) AddFlags(fs *flag.FlagSet)

AddFlags implements AddFlagger on SousManifestGet.

func (*SousManifestGet) Execute added in v0.0.3

func (smg *SousManifestGet) Execute(args []string) cmdr.Result

Execute implements Executor on SousManifestGet.

func (*SousManifestGet) Help added in v0.0.3

func (*SousManifestGet) Help() string

Help implements Command on SousManifestGet.

type SousManifestSet added in v0.0.3

type SousManifestSet struct {
	config.DeployFilterFlags `inject:"optional"`
	SousGraph                *graph.SousGraph
}

SousManifestSet is the 'sous manifest set' command.

func (*SousManifestSet) AddFlags added in v0.0.3

func (smg *SousManifestSet) AddFlags(fs *flag.FlagSet)

AddFlags implements part of the cmdr interfaces.

func (*SousManifestSet) Execute added in v0.0.3

func (smg *SousManifestSet) Execute(args []string) cmdr.Result

Execute implements part of the cmdr interfaces.

func (*SousManifestSet) Help added in v0.0.3

func (*SousManifestSet) Help() string

Help implements part of the cmdr interfaces.

type SousMetadata added in v0.0.3

type SousMetadata struct{}

SousMetadata describes the `sous metadata` command.

func (*SousMetadata) Execute added in v0.0.3

func (sm *SousMetadata) Execute(args []string) cmdr.Result

Execute implements Executor on SousMetadata.

func (*SousMetadata) Help added in v0.0.3

func (*SousMetadata) Help() string

Help implements Command on SousMetadata.

func (SousMetadata) RegisterOn added in v1.0.1

func (SousMetadata) RegisterOn(psy Addable)

RegisterOn implements Registrant on SousMetadata

func (SousMetadata) Subcommands added in v0.0.3

func (SousMetadata) Subcommands() cmdr.Commands

Subcommands implements Subcommander on SousMetadata.

type SousMetadataGet added in v0.0.3

type SousMetadataGet struct {
	config.DeployFilterFlags `inject:"optional"`
	*sous.ResolveFilter
	TargetManifestID graph.TargetManifestID
	graph.HTTPClient
	graph.OutWriter
}

func (*SousMetadataGet) AddFlags added in v0.0.3

func (smg *SousMetadataGet) AddFlags(fs *flag.FlagSet)

func (*SousMetadataGet) Execute added in v0.0.3

func (smg *SousMetadataGet) Execute(args []string) cmdr.Result

func (*SousMetadataGet) Help added in v0.0.3

func (*SousMetadataGet) Help() string

func (*SousMetadataGet) RegisterOn added in v0.0.3

func (smg *SousMetadataGet) RegisterOn(psy Addable)

type SousMetadataSet added in v0.0.3

type SousMetadataSet struct {
	config.DeployFilterFlags `inject:"optional"`
	*sous.ResolveFilter
	graph.TargetManifestID
	graph.HTTPClient

	User sous.User
}

func (*SousMetadataSet) AddFlags added in v0.0.3

func (smg *SousMetadataSet) AddFlags(fs *flag.FlagSet)

func (*SousMetadataSet) Execute added in v0.0.3

func (smg *SousMetadataSet) Execute(args []string) cmdr.Result

func (*SousMetadataSet) Help added in v0.0.3

func (*SousMetadataSet) Help() string

func (*SousMetadataSet) RegisterOn added in v0.0.3

func (smg *SousMetadataSet) RegisterOn(psy Addable)

type SousNewDeploy added in v1.0.1

type SousNewDeploy struct {
	SousGraph *graph.SousGraph

	DeployFilterFlags config.DeployFilterFlags `inject:"optional"`
	// contains filtered or unexported fields
}

SousNewDeploy has the same interface as SousDeploy, but uses the new PUT /single-deployment endpoint to begin the deployment, and polls by watching the returned rectification URL.

func (*SousNewDeploy) AddFlags added in v1.0.1

func (sd *SousNewDeploy) AddFlags(fs *flag.FlagSet)

AddFlags adds the flags for sous init.

func (*SousNewDeploy) Execute added in v1.0.1

func (sd *SousNewDeploy) Execute(args []string) cmdr.Result

Execute creates the new deployment.

func (*SousNewDeploy) Help added in v1.0.1

func (sd *SousNewDeploy) Help() string

Help returns the help string for this command.

type SousPlumbing added in v0.0.3

type SousPlumbing struct{}

SousPlumbing is the `sous plumbing` subcommand

func (*SousPlumbing) Help added in v0.0.3

func (*SousPlumbing) Help() string

Help implements Command for SousPlumbing

func (SousPlumbing) RegisterOn added in v1.0.1

func (SousPlumbing) RegisterOn(psy Addable)

RegisterOn implements Registrant on SousPlumbing

func (SousPlumbing) Subcommands added in v0.0.3

func (SousPlumbing) Subcommands() cmdr.Commands

Subcommands implements Submcommandor for SousPlumbing

type SousPlumbingNormalizeGDM added in v1.0.1

type SousPlumbingNormalizeGDM struct {
	SousGraph *graph.SousGraph
}

SousPlumbingNormalizeGDM is the description of the `sous plumbing normalizegdm` command

func (*SousPlumbingNormalizeGDM) Execute added in v1.0.1

func (sqa *SousPlumbingNormalizeGDM) Execute(args []string) cmdr.Result

Execute defines the behavior of `sous plumbing normalizegdm`

func (*SousPlumbingNormalizeGDM) Help added in v1.0.1

Help prints the help

type SousPlumbingStatus added in v0.0.3

type SousPlumbingStatus struct {
	SousGraph *graph.SousGraph
	Config    graph.LocalSousConfig

	DeployFilterFlags config.DeployFilterFlags `inject:"optional"`
}

SousPlumbingStatus is the `sous plumbing status` object.

func (*SousPlumbingStatus) AddFlags added in v0.0.3

func (sps *SousPlumbingStatus) AddFlags(fs *flag.FlagSet)

AddFlags implements cmdr.AddFlags on SousPlumbingStatus.

func (*SousPlumbingStatus) Execute added in v0.0.3

func (sps *SousPlumbingStatus) Execute(args []string) cmdr.Result

Execute implements cmdr.Executor on SousPlumbingStatus.

func (*SousPlumbingStatus) Help added in v0.0.3

func (*SousPlumbingStatus) Help() string

Help implements Command on SousPlumbingStatus.

type SousQuery

type SousQuery struct{}

SousQuery wraps subcommands.

func (*SousQuery) Execute

func (sb *SousQuery) Execute(args []string) cmdr.Result

Execute prints help, as 'sous query' requires a subcommand.

func (*SousQuery) Help

func (*SousQuery) Help() string

Help returns help for 'sous query'

func (SousQuery) Subcommands

func (SousQuery) Subcommands() cmdr.Commands

Subcommands returns the subcommands of 'sous query'.

type SousQueryAds added in v0.0.2

type SousQueryAds struct {
	Deployer     sous.Deployer
	Config       graph.LocalSousConfig
	DockerClient graph.LocalDockerClient
	StateManager *graph.ClientStateManager
	sous.Registry
	// contains filtered or unexported fields
}

SousQueryAds is the description of the `sous query ads` command

func (*SousQueryAds) Execute added in v0.0.2

func (sb *SousQueryAds) Execute(args []string) cmdr.Result

Execute defines the behavior of `sous query ads`

func (*SousQueryAds) Help added in v0.0.2

func (*SousQueryAds) Help() string

Help prints the help

func (*SousQueryAds) RegisterOn added in v0.0.3

func (*SousQueryAds) RegisterOn(psy Addable)

RegisterOn adds stuff to the graph.

type SousQueryArtifacts

type SousQueryArtifacts struct {
	*sous.RegistryDumper
	graph.ErrWriter
}

SousQueryArtifacts is the description of the `sous query gdm` command

func (*SousQueryArtifacts) Execute

func (sqa *SousQueryArtifacts) Execute(args []string) cmdr.Result

Execute defines the behavior of `sous query gdm`

func (*SousQueryArtifacts) Help

func (*SousQueryArtifacts) Help() string

Help prints the help

func (*SousQueryArtifacts) RegisterOn added in v0.0.3

func (*SousQueryArtifacts) RegisterOn(psy Addable)

type SousQueryClusters added in v1.0.1

type SousQueryClusters struct {
	graph.HTTPClient
	// contains filtered or unexported fields
}

SousQueryClusters is the description of the `sous query clusters` command.

func (*SousQueryClusters) AddFlags added in v1.0.1

func (sqc *SousQueryClusters) AddFlags(fs *flag.FlagSet)

AddFlags adds the flags for sous query clusters.

func (*SousQueryClusters) Execute added in v1.0.1

func (sqc *SousQueryClusters) Execute(args []string) cmdr.Result

Execute defines the behavior of `sous query gdm`

func (*SousQueryClusters) Help added in v1.0.1

func (*SousQueryClusters) Help() string

Help prints the help

func (*SousQueryClusters) RegisterOn added in v1.0.1

func (*SousQueryClusters) RegisterOn(psy Addable)

RegisterOn registers items on the DI graph

type SousQueryGDM

type SousQueryGDM struct {
	DeploymentQuery queries.Deployment

	Out graph.OutWriter
	Err graph.ErrWriter
	// contains filtered or unexported fields
}

SousQueryGDM is the description of the `sous query gdm` command

func (*SousQueryGDM) AddFlags added in v1.0.1

func (sb *SousQueryGDM) AddFlags(fs *flag.FlagSet)

AddFlags adds the flags for 'sous query gdm'.

func (*SousQueryGDM) Execute

func (sb *SousQueryGDM) Execute(args []string) cmdr.Result

Execute defines the behavior of `sous query gdm`.

func (*SousQueryGDM) Help

func (*SousQueryGDM) Help() string

Help prints the help

func (*SousQueryGDM) RegisterOn added in v0.0.3

func (*SousQueryGDM) RegisterOn(psy Addable)

RegisterOn adds options set by flags to the injection graph.

type SousRectify

type SousRectify struct {
	Config graph.LocalSousConfig

	SousGraph         *graph.SousGraph
	DeployFilterFlags config.DeployFilterFlags `inject:"optional"`
	SourceHostChooser sous.SourceHostChooser
	// contains filtered or unexported fields
}

SousRectify is the injectable command object used for `sous rectify`.

func (*SousRectify) AddFlags

func (sr *SousRectify) AddFlags(fs *flag.FlagSet)

AddFlags adds flags for sous rectify.

func (*SousRectify) Execute

func (sr *SousRectify) Execute(args []string) cmdr.Result

Execute fulfils the cmdr.Executor interface.

func (*SousRectify) Help

func (*SousRectify) Help() string

Help returns the help string.

type SousScale added in v1.0.1

type SousScale struct {
	DeployFilterFlags config.DeployFilterFlags `inject:"optional"`
	SousGraph         *graph.SousGraph
}

SousScale defines the `sous manifest edit` command.

func (*SousScale) AddFlags added in v1.0.1

func (ss *SousScale) AddFlags(fs *flag.FlagSet)

AddFlags implements AddFlagger on SousScale.

func (*SousScale) Execute added in v1.0.1

func (ss *SousScale) Execute(args []string) cmdr.Result

Execute implements Executor on SousScale.

func (*SousScale) Help added in v1.0.1

func (*SousScale) Help() string

Help implements Command on SousScale.

type SousServer added in v0.0.3

type SousServer struct {
	SousGraph         *graph.SousGraph
	DeployFilterFlags config.DeployFilterFlags `inject:"optional"`
	// contains filtered or unexported fields
}

A SousServer represents the `sous server` command.

func (*SousServer) AddFlags added in v0.0.3

func (ss *SousServer) AddFlags(fs *flag.FlagSet)

AddFlags is part of the cmdr.Command interfaces(s).

func (*SousServer) Execute added in v0.0.3

func (ss *SousServer) Execute(args []string) cmdr.Result

Execute is part of the cmdr.Command interface(s).

func (*SousServer) Help added in v0.0.3

func (ss *SousServer) Help() string

Help is part of the cmdr.Command interface(s).

type SousSingReqID added in v1.0.1

type SousSingReqID struct {
	SousGraph *graph.SousGraph
	DFF       config.DeployFilterFlags `inject:"optional"`
}

SousSingReqID is the command description for `sous deploy`.

func (*SousSingReqID) AddFlags added in v1.0.1

func (sd *SousSingReqID) AddFlags(fs *flag.FlagSet)

AddFlags adds the flags for sous init.

func (*SousSingReqID) Execute added in v1.0.1

func (sd *SousSingReqID) Execute(args []string) cmdr.Result

Execute fulfills the cmdr.Executor interface.

func (*SousSingReqID) Help added in v1.0.1

func (sd *SousSingReqID) Help() string

Help returns the help string for this command.

type SousUpdate

type SousUpdate struct {
	DeployFilterFlags config.DeployFilterFlags `inject:"optional"`
	OTPLFlags         config.OTPLFlags         `inject:"optional"`
	SousGraph         *graph.SousGraph
}

SousUpdate is the command description for `sous update`

func (*SousUpdate) AddFlags

func (su *SousUpdate) AddFlags(fs *flag.FlagSet)

AddFlags adds the flags for sous init.

func (*SousUpdate) Execute

func (su *SousUpdate) Execute(args []string) cmdr.Result

Execute fulfills the cmdr.Executor interface.

func (*SousUpdate) Help

func (su *SousUpdate) Help() string

Help returns the help string for this command

type SousVersion

type SousVersion struct {
	Sous *Sous
}

SousVersion is the 'sous version' command.

func (*SousVersion) Execute

func (sv *SousVersion) Execute(args []string) cmdr.Result

Execute runs the 'sous version' command.

func (*SousVersion) Help

func (*SousVersion) Help() string

Help returns help for sous version.

Directories

Path Synopsis
Package actions contains the actions that the CLI can take.
Package actions contains the actions that the CLI can take.

Jump to

Keyboard shortcuts

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