Skip to content

Commit

Permalink
test changes
Browse files Browse the repository at this point in the history
  • Loading branch information
dbrian57 committed Aug 14, 2023
1 parent 4a86305 commit 8622a0f
Show file tree
Hide file tree
Showing 4 changed files with 32 additions and 17 deletions.
10 changes: 9 additions & 1 deletion commands/1_clicks.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,16 @@ func OneClicks() *Command {
},
}

cmdOneClickList := CmdBuilder(cmd, RunOneClickList, "list", "Retrieve a list of 1-Click applications", "Use this command to retrieve a list of 1-Click applications. You can narrow it by type, current types: kubernetes, droplet", Writer,
cmdOneClickList := CmdBuilder(cmd, RunOneClickList, "list", "Retrieves a list of available 1-Click applications", "Retrieves a list of 1-Click applications. You can search by type. Available types: kubernetes, droplet", Writer,
aliasOpt("ls"), displayerType(&displayers.OneClick{}))
cmdOneClickList.Example = `
To list Droplet 1-Click applications, run:
` + "`" + `doctl 1-click list --type droplet` + "`" + `
To list Kubernetes 1-Click applications, run:
` + "`" + `doctl 1-click list --type kubernetes` + "`" + ``

AddStringFlag(cmdOneClickList, doctl.ArgOneClickType, "", "", "The 1-Click type. Valid types are one of the following: kubernetes, droplet")

Expand Down
14 changes: 8 additions & 6 deletions commands/account.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,28 +23,30 @@ func Account() *Command {
cmd := &Command{
Command: &cobra.Command{
Use: "account",
Short: "Display commands that retrieve account details",
Short: "Displays commands that retrieve account details",
Long: `The subcommands of ` + "`" + `doctl account` + "`" + ` retrieve information about DigitalOcean accounts.
For example, ` + "`" + `doctl account get` + "`" + ` retrieves account profile details, and ` + "`" + `doctl account ratelimit` + "`" + ` retrieves API usage details.`,
GroupID: manageResourcesGroup,
},
}

CmdBuilder(cmd, RunAccountGet, "get", "Retrieve account profile details", `Retrieve the following details from your account profile:
CmdBuilder(cmd, RunAccountGet, "get", "Retrieves account profile details", `Retrieves the following details from your account profile:
- Email address
- Team
- Account Droplet limit
- Email verification status
- Account status (active or disabled)
- UUID for the account.`, Writer,
- UUID for the account
- Account status (active or disabled).`, Writer,
aliasOpt("g"), displayerType(&displayers.Account{}))

CmdBuilder(cmd, RunAccountRateLimit, "ratelimit", "Retrieve your API usage and the remaining quota", `Retrieve the following details about your account's API usage:

CmdBuilder(cmd, RunAccountRateLimit, "ratelimit", "Retrieves your API usage and the remaining quota", `Retrieve the following details about your account's API usage:
- The current limit on your account for API calls (5,000 per hour per OAuth token)
- The number of API calls you have made in the last hour
- When the API call count is due to reset to zero, which happens hourly
- When the API call count will reset to zero, which happens hourly
Note that these details are per OAuth token and are tied to the token you used when calling `+"`"+`doctl auth init`+"`"+` at setup time.`, Writer,
aliasOpt("rl"), displayerType(&displayers.RateLimit{}))
Expand Down
16 changes: 11 additions & 5 deletions commands/actions.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,9 @@ func Actions() *Command {
Command: &cobra.Command{
Use: "action",
Short: "Display commands for retrieving resource action history",
Long: `The sub-commands of ` + "`" + `doctl compute action` + "`" + ` retrieve the history of actions taken on your resources.
Long: `The sub-commands of ` + "`" + `doctl compute action` + "`" + ` retrieves the history of actions taken on your resources.
This can be filtered to a specific action. For example, while ` + "`" + `doctl compute action list` + "`" + ` will list all of the actions taken on all of the resources in your account, ` + "`" + `doctl compute action get <action-id>` + "`" + ` will retrieve details for a specific action.`,
You can filter to a specific action. For example, while ` + "`" + `doctl compute action list` + "`" + ` lists all of the actions taken on all of the resources in your account, ` + "`" + `doctl compute action get <action-id>` + "`" + ` retrieves details for a specific action.`,
},
}

Expand All @@ -47,22 +47,28 @@ This can be filtered to a specific action. For example, while ` + "`" + `doctl c
- The resource type (Droplet, backend)
- The region in which the action took place (nyc3, sfo2, etc)`

CmdBuilder(cmd, RunCmdActionGet, "get <action-id>", "Retrieve details about a specific action", `This command retrieves the following details about a specific action taken on one of your resources:`+actionDetails, Writer,
CmdBuilder(cmd, RunCmdActionGet, "get <action-id>", "Retrieves details about a specific action", `Retrieves the following details about a specific action taken on one of your resources:`+actionDetails, Writer,
aliasOpt("g"), displayerType(&displayers.Action{}))

cmdActionList := CmdBuilder(cmd, RunCmdActionList, "list", "Retrieve a list of all recent actions taken on your resources", `This command retrieves a list of all actions taken on your resources. The following details are provided:`+actionDetails, Writer,
cmdActionList := CmdBuilder(cmd, RunCmdActionList, "list", "Retrieves a list of all recent actions taken on your resources", `Retrieves a list of all actions taken on your resources. The following details are provided:`+actionDetails, Writer,
aliasOpt("ls"), displayerType(&displayers.Action{}))
AddStringFlag(cmdActionList, doctl.ArgActionResourceType, "", "", "Action resource type")
AddStringFlag(cmdActionList, doctl.ArgActionRegion, "", "", "Action region")
AddStringFlag(cmdActionList, doctl.ArgActionAfter, "", "", "Action completed after in RFC3339 format")
AddStringFlag(cmdActionList, doctl.ArgActionBefore, "", "", "Action completed before in RFC3339 format")
AddStringFlag(cmdActionList, doctl.ArgActionStatus, "", "", "Action status")
AddStringFlag(cmdActionList, doctl.ArgActionType, "", "", "Action type")
cmdActionList.Example = `
To list all actions taken on your account, run:
` + "`" + `doctl compute action list` + "`" + ``

cmdActionWait := CmdBuilder(cmd, RunCmdActionWait, "wait <action-id>", "Block thread until an action completes", `The command blocks the current thread, returning when an action completes.
cmdActionWait := CmdBuilder(cmd, RunCmdActionWait, "wait <action-id>", "Blocks thread until an action completes", `Blocks the current thread, returning when an action completes.
For example, if you find an action when calling `+"`"+`doctl compute action list`+"`"+` that has a status of `+"`"+`in-progress`+"`"+`, you can note the action ID and call `+"`"+`doctl compute action wait <action-id>`+"`"+`, and doctl will appear to "hang" until the action has completed. This can be useful for scripting purposes.`, Writer,
aliasOpt("w"), displayerType(&displayers.Action{}))
cmdActionWait.Example = `
To wait for an action with ID` + "`" + `12345678` + "`" + ` to complete, run:
` + "`" + `doctl compute action wait 12345678` + "`" + ``
AddIntFlag(cmdActionWait, doctl.ArgPollTime, "", 5, "Re-poll time in seconds")

return cmd
Expand Down
9 changes: 4 additions & 5 deletions commands/activations.go
Original file line number Diff line number Diff line change
Expand Up @@ -43,16 +43,15 @@ func Activations() *Command {
cmd := &Command{
Command: &cobra.Command{
Use: "activations",
Short: "Work with activation records",
Long: `The subcommands of ` + "`" + `doctl serverless activations` + "`" + ` will list or retrieve results, logs, or complete
"activation records" which result from invoking functions deployed to your functions namespace.`,
Short: "Retrieve activation records",
Long: `The subcommands of ` + "`" + `doctl serverless activations` + "`" + ` retrieve results, logs, or complete
activation records of functions deployed to your functions namespace.`,
Aliases: []string{"activation", "actv"},
},
}

get := CmdBuilder(cmd, RunActivationsGet, "get [<activationId>]", "Retrieves an Activation",
`Use `+"`"+`doctl serverless activations get`+"`"+` to retrieve the activation record for a previously invoked function.
There are several options for specifying the activation you want. You can limit output to the result
`Retrieves the activation record for a previously invoked function. You can limit output to the result
or the logs. The `+"`"+`doctl serverless activation logs`+"`"+` command has additional advanced capabilities for retrieving
logs.`,
Writer)
Expand Down

0 comments on commit 8622a0f

Please sign in to comment.