Categorygithub.com/bryanl/doit
modulepackage
1.0.0-beta1
Repository: https://github.com/bryanl/doit.git
Documentation: pkg.go.dev

# README

doctl

Travis Build Status

doctl is a command line interface for the DigitalOcean API.

Usage:
  doctl [command]

Available Commands:
  account     account commands
  auth        auth commands
  compute     compute commands
  version     show the current version

Flags:
  -t, --access-token string   DigitalOcean API V2 Access Token
  -h, --help                  help for doctl
  -o, --output string         output formt [text|json] (default "text")
  -v, --verbose               verbose output

Use "doctl [command] --help" for more information about a command.

Initialization

To automatically retrieve your access token from DigitalOcean, run doctl auth login. This process will authenticate you with DigitalOcean and retrieve an access token. If your shell does not have access to a web browser (because of a remote Linux shell with no DISPLAY environment variable or you've specified the CLIAUTH=1 flag), doctl will give you a link for offline authentication.

Configuration

By default, doctl will load a configuration file from $HOME/.doctlcfg if found.

Configuration OPTIONS

  • access-token - The DigitalOcean access token. You can generate a token in the Apps & API section of the DigitalOcean control panel or use doctl auth login.
  • output - Type of output to display results in. Choices are json or text. If not supplied, doctl will default to text.

Example:

{
  access-token: MY_TOKEN
  output: text
}

Building and dependencies

doctl's dependencies are managed by gvt. To add dependencies, use gvt fetch.

Releasing

To build doctl for all it's platforms, run script/build.sh <version>. To upload doctl to Github, run script/release.sh <version>. A valid GITHUB_TOKEN environment variable with access to the bryanl/doctl repository is required.

# Packages

No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author

# Functions

NewConfigFile creates an instance of ConfigFile.
NewLiveCommand creates a LiveCommand.
NewMissingArgsErr creates a MissingArgsErr instance.
NewMockCommand createsd a MockCommand.

# Constants

ArgActionAfter is an action after argument.
ArgActionBefore is an action before argument.
ArgActionID is an action id argument.
ArgActionRegion is an action region argument.
ArgActionResourceType is an action resource type argument.
ArgActionStatus is an action status argument.
ArgActionType is an action type argument.
ArgBackups is an enable backups argument.
ArgCommandWait is a wait for a droplet to be created argument.
ArgDomainName is a domain name argument.
ArgDropletID is a droplet id argument.
ArgDropletName is a droplet name argument.
ArgFormat is columns to include in output argment.
ArgImage is an image argument.
ArgImageID is an image id argument.
ArgImageName name is an image name argument.
ArgImagePublic is a public image argument.
ArgImageSlug is an image slug argment.
ArgIPAddress is an IP address argument.
ArgIPv6 is an enable IPv6 argument.
ArgKernelID is a ekrnel id argument.
ArgKey is a key argument.
ArgKeyName is a key name argument.
ArgKeyPublicKey is a public key argument.
ArgKeyPublicKeyFile is a public key file argument.
ArgNoHeader hides the output header.
ArgOutput is an output type argument.
ArgPollTime is how long before the next poll argument.
ArgPrivateNetworking is an enable private networking argument.
ArgRecordData is a record data argument.
ArgRecordID is a record id argument.
ArgRecordName is a record name argument.
ArgRecordPort is a record port argument.
ArgRecordPriority is a record priority argument.
ArgRecordType is a record type argument.
ArgRecordWeight is a record weight argument.
ArgRegionSlug is a region slug argument.
ArgResizeDisk is a resize disk argument.
ArgSizeSlug is a size slug argument.
ArgSnapshotName is a snapshot name arugment.
ArgSSHKeys is a ssh key argument.
ArgSSHUser is a SSH user argument.
ArgsSSHKeyPath is a ssh argument.
ArgsSSHPort is a ssh argument.
ArgUserData is a user data argument.
ArgUserDataFile is a user data file location argument.
LatestReleaseURL is the latest release URL endpoint.
NSRoot is a configuration key that signifies this value is at the root.

# Variables

Build is doit's build tag.
DoitConfig holds the app's current configuration.
DoitVersion is doit's version.
Label is doctl's label.
Major is doctl's major version.
Minor is doctl's minor version.
Patch is doctl's patch version.
TraceHTTP traces http connections.

# Structs

ConfigFile is a doit config file.
GithubLatestVersioner retrieves the latest version from Github.
LiveCommand is a live implementation of Command.
LiveConfig is an implementation of Config for live values.
MissingArgsErr is an error returned when their are too few arguments for a command.
MockCommand is a mock command implementation.
MockRunner is an implemenation of Runner for mocking.
TokenSource holds an oauth token.
Version is the version info for doit.

# Interfaces

Command runs commands.
Config is an interface that represent doit's config.
LatestVersioner an interface for detecting the latest version.