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. forcount,lookup,recordand 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 thestd::io::Resultrather 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-cliuses. - 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.