Documentation
¶
Overview ¶
Package cmd contains all of the Torus cli commands
Index ¶
- Variables
- func ConfirmDialogue(ctx *cli.Context, labelOverride, warningOverride *string) error
- func EmailPrompt(defaultValue string) (string, error)
- func FullNamePrompt() (string, error)
- func InviteCodePrompt(defaultValue string) (string, error)
- func NamePrompt(override *string, defaultValue string, autoAccept bool) (string, error)
- func NewAPIClient(ctx *context.Context, client *api.Client) (context.Context, *api.Client, error)
- func PasswordPrompt(shouldConfirm bool) (string, error)
- func SelectAcceptAction() (int, string, error)
- func SelectCreateOrg(c context.Context, client *api.Client, name string) (*api.OrgResult, string, bool, error)
- func SelectCreateProject(c context.Context, client *api.Client, orgID *identity.ID, name string) (*api.ProjectResult, string, bool, error)
- func SelectCreateTeam(c context.Context, client *api.Client, orgID *identity.ID, ...) (*api.TeamResult, string, bool, error)
- func SelectOrgPrompt(orgs []api.OrgResult) (int, string, error)
- func SelectProjectPrompt(projects []api.ProjectResult) (int, string, error)
- func SelectTeamPrompt(teams []api.TeamResult, label string) (int, string, error)
- func UsernamePrompt() (string, error)
- func VerificationPrompt() (string, error)
- func VersionLookup(ctx *cli.Context) error
Constants ¶
This section is empty.
Variables ¶
var Cmds []cli.Command
Cmds is the list of all cli commands
Functions ¶
func ConfirmDialogue ¶ added in v0.15.0
ConfirmDialogue prompts the user to confirm their action
func EmailPrompt ¶
EmailPrompt prompts the user to input an email
func FullNamePrompt ¶
FullNamePrompt prompts the user to input a person's name
func InviteCodePrompt ¶
InviteCodePrompt prompts the user to input an invite code
func NamePrompt ¶
NamePrompt prompts the user to input a person's name
func NewAPIClient ¶ added in v0.13.0
NewAPIClient loads config and creates a new api client
func PasswordPrompt ¶
PasswordPrompt prompts the user to input a password value
func SelectAcceptAction ¶
SelectAcceptAction prompts the user to select an org from a list, or enter a new name
func SelectCreateOrg ¶
func SelectCreateOrg(c context.Context, client *api.Client, 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(c context.Context, client *api.Client, 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 SelectCreateTeam ¶ added in v0.15.0
func SelectCreateTeam(c context.Context, client *api.Client, orgID *identity.ID, teamType, name string) (*api.TeamResult, string, bool, error)
SelectCreateTeam prompts the user to select a team from a list of teams for the given org.
The user may select to create a new team, or they may may preselect a team via a non-empty name parameter.
The type of team can be specified, if no team type is provided then all teams exlcuding machine teams are listed.
It returns the object of the selected team, the name of the selected team, and a boolean indicating if a new team 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 SelectTeamPrompt ¶ added in v0.15.0
SelectTeamPrompt prompts the user to select a team from a list or enter a new name, an optional label can be provided.
func UsernamePrompt ¶
UsernamePrompt prompts the user to input a person's name
func VerificationPrompt ¶ added in v0.13.0
VerificationPrompt prompts the user to input an email verify code
func VersionLookup ¶
VersionLookup ensures the environment is ready and then executes version cmd
Types ¶
This section is empty.
Source Files
¶
- allow.go
- cmd.go
- credential_set.go
- daemon.go
- debug.go
- deny.go
- envs.go
- flags.go
- invites.go
- invites_accept.go
- invites_approve.go
- invites_list.go
- invites_send.go
- keypairs.go
- link.go
- login.go
- logout.go
- ls.go
- machines.go
- middleware.go
- orgs.go
- policies.go
- prefs.go
- projects.go
- prompts.go
- run.go
- services.go
- set.go
- signup.go
- status.go
- teams.go
- unlink.go
- unset.go
- verify.go
- version.go
- view.go
- worklog.go