disassociate

package
v2.0.0-snapshot...-58e3a78 Latest Latest
Warning

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

Go to latest
Published: Feb 8, 2017 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Cmd = models.Command{
	Name:      "disassociate",
	ShortHelp: "Remove the association with an environment",
	LongHelp: "`disassociate` removes the environment from your list of associated environments but **does not** remove the catalyze git remote on the git repo. " +
		"Disassociate does not have to be run from within a git repo. Here is a sample command\n\n" +
		"```\ncatalyze disassociate myprod\n```",
	CmdFunc: func(settings *models.Settings) func(cmd *cli.Cmd) {
		return func(cmd *cli.Cmd) {
			alias := cmd.StringArg("ENV_ALIAS", "", "The alias of an already associated environment to disassociate")
			cmd.Action = func() {
				err := CmdDisassociate(*alias, New(settings))
				if err != nil {
					logrus.Fatal(err.Error())
				}
			}
			cmd.Spec = "ENV_ALIAS"
		}
	},
}

Cmd is the contract between the user and the CLI. This specifies the command name, arguments, and required/optional arguments and flags for the command.

Functions

func CmdDisassociate

func CmdDisassociate(alias string, id IDisassociate) error

Types

type IDisassociate

type IDisassociate interface {
	Disassociate(alias string) error
}

IDisassociate

func New

func New(settings *models.Settings) IDisassociate

New returns an instance of IDisassociate

type SDisassociate

type SDisassociate struct {
	Settings *models.Settings
}

SDisassociate is a concrete implementation of IDisassociate

func (*SDisassociate) Disassociate

func (d *SDisassociate) Disassociate(alias string) error

Disassociate removes an existing association with the environment. The `catalyze` remote on the local github repo will *NOT* be removed.

Jump to

Keyboard shortcuts

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