Documentation ¶
Overview ¶
Package cmd contains all of the Arigato cli commands
Index ¶
- Variables
- func Chain(funcs ...func(*cli.Context) error) func(*cli.Context) error
- func EmailPrompt(defaultValue string) (string, error)
- func EnsureDaemon(ctx *cli.Context) error
- func EnsureSession(ctx *cli.Context) error
- func EnvFlag(usage string, required bool) cli.Flag
- func FullNamePrompt() (string, error)
- func InstanceFlag(usage string, required bool) cli.Flag
- func InviteCodePrompt(defaultValue string) (string, error)
- func LoadDirPrefs(ctx *cli.Context) error
- func LoadPrefDefaults(ctx *cli.Context) error
- func NamePrompt(override *string, defaultValue string) (string, error)
- func OrgFlag(usage string, required bool) cli.Flag
- func PasswordPrompt(shouldConfirm bool) (string, error)
- func ProjectFlag(usage string, required bool) cli.Flag
- func SelectAcceptAction() (int, string, error)
- func SelectCreateOrg(client *api.Client, c context.Context, name string) (*api.OrgResult, string, bool, error)
- func SelectCreateProject(client *api.Client, c context.Context, orgID *identity.ID, name string) (*api.ProjectResult, string, bool, error)
- func SelectOrgPrompt(orgs []api.OrgResult) (int, string, error)
- func SelectProjectPrompt(projects []api.ProjectResult) (int, string, error)
- func ServiceFlag(usage, value string, required bool) cli.Flag
- func SetUserEnv(ctx *cli.Context) error
- func UserFlag(usage string, required bool) cli.Flag
- func UsernamePrompt() (string, error)
- func VersionLookup(ctx *cli.Context) error
Constants ¶
This section is empty.
Variables ¶
var ( StdOrgFlag = OrgFlag("Use this organization.", true) StdProjectFlag = ProjectFlag("Use this project.", true) StdEnvFlag = EnvFlag("Use this environment.", true) StdServiceFlag = ServiceFlag("Use this service.", "", true) StdUserFlag = UserFlag("Use this user.", true) StdInstanceFlag = InstanceFlag("Use this instance.", true) )
Standard flags for path expression parts.
var Cmds []cli.Command
Cmds is the list of all cli commands
Functions ¶
func Chain ¶
Chain allows easy sequential calling of BeforeFuncs and AfterFuncs. Chain will exit on the first error seen. XXX Chain is only public while we need it for passthrough.go
func EmailPrompt ¶
EmailPrompt prompts the user to input an email
func EnsureDaemon ¶
EnsureDaemon ensures that the daemon is running, and is the correct version, before a command is exeucted. the daemon will be started/restarted once, to try and launch the latest version. XXX EnsureDaemon is only public while we need it for passthrough.go
func EnsureSession ¶
EnsureSession ensures that the user is logged in with the daemon and has a valid session. If not, it will attempt to log the user in via environment variables. If they do not exist, of the login fails, it will abort the command. XXX EnsureSession is only public while we need it for passthrough.go
func FullNamePrompt ¶
FullNamePrompt prompts the user to input a person's name
func InstanceFlag ¶
InstanceFlag creates a new --instance cli.Flag with custom usage string.
func InviteCodePrompt ¶
InviteCodePrompt prompts the user to input an invite code
func LoadDirPrefs ¶
LoadDirPrefs loads argument values from the .arigato.json file XXX LoadDirPrefs is only public while we need it for passthrough.go
func LoadPrefDefaults ¶
LoadPrefDefaults loads default argument values from the .arigatorc preferences file defaults section, inserting them into any unset flag values XXX LoadPrefDefaults is only public while we need it for passthrough.go
func NamePrompt ¶
NamePrompt prompts the user to input a person's name
func PasswordPrompt ¶
PasswordPrompt prompts the user to input a password value
func ProjectFlag ¶
ProjectFlag creates a new --project cli.Flag with custom usage string.
func SelectAcceptAction ¶
SelectAcceptAction prompts the user to select an org from a list, or enter a new name
func SelectCreateOrg ¶
func SelectCreateOrg(client *api.Client, c context.Context, name string) (*api.OrgResult, string, bool, error)
SelectCreateOrg prompts the user to select an org from at list of orgs populated via api request.
The user may select to create a new org, or they may preselect an org via a non-empty name parameter.
It returns the object of the selected org (if created a new org was not chosed), the name of the selected org, and a boolean indicating if a new org should be created.
func SelectCreateProject ¶
func SelectCreateProject(client *api.Client, c context.Context, orgID *identity.ID, name string) (*api.ProjectResult, string, bool, error)
SelectCreateProject prompts the user to select a project from at list of projects populated via api request.
The user may select to create a new project, or they may preselect an project via a non-empty name parameter.
It returns the object of the selected project (if created a new project was not chosed), the name of the selected project, and a boolean indicating if a new project should be created.
func SelectOrgPrompt ¶
SelectOrgPrompt prompts the user to select an org from a list, or enter a new name
func SelectProjectPrompt ¶
func SelectProjectPrompt(projects []api.ProjectResult) (int, string, error)
SelectProjectPrompt prompts the user to select an org from a list, or enter a new name
func ServiceFlag ¶
ServiceFlag creates a new --service cli.Flag with custom usage string.
func SetUserEnv ¶
SetUserEnv populates the env argument, if present and unset, with dev-USERNAME XXX SetUserEnv is only public while we need it for passthrough.go
func UsernamePrompt ¶
UsernamePrompt prompts the user to input a person's name
func VersionLookup ¶
VersionLookup ensures the environment is ready and then executes version cmd
Types ¶
This section is empty.