Crate goat_cli

Crate goat_cli 

Source
Expand description

goat-cli is a command line interface to query the Genomes on a Tree Open API using an asynchronous tokio runtime.

I’m documenting the code here for others, and for future me.

Modules§

cli
The cli itself The command line interface, defined with clap’s derive API.
client
Shared HTTP client for all GoaT API requests. A shared HTTP client for all GoaT API requests.
count
Query the GoaT count API.
error
The custom error handling
lookup
Query the GoaT lookup API.
output
Output formats and tables. Output formats (--format tsv|csv|json) and a small table type that the CLI builds itself (e.g. for count, lookup, record and reports) and can write in any format.
progress
A module to produce a progress bar.
record
Query the GoaT record API.
report
Query the GoaT report API.
search
Query the GoaT search API.
utils
Collection of utility functions used elsewhere.

Macros§

outln
Like println!, but returns the std::io::Result rather than panicking, so a closed stdout (e.g. goat-cli ... | head) can be handled gracefully.

Structs§

GOAT_URL
The current GoaT URL.
TAXONOMY
The taxonomy that goat-cli uses.
UPPER_CLI_FILE_LIMIT
Upper limit for the number of entries in the file for CLI arg -f.
UPPER_CLI_SIZE_LIMIT
Upper limit for the CLI arg --size.

Enums§

IndexType
The indexes we make searches over in GoaT.
TaxType
The type of result to return in GoaT.