-
Notifications
You must be signed in to change notification settings - Fork 3
CAVI Go Tool
The CAVI support program works in conjunction with CAVI scripts to provide https connectivity with modern webservers. Making http(s) requests within the CAVI environment does not provide modern SSL/TLS protocol. Jython scripting within these environments hands-off web requests to the Go executable, with inputs, and the program returns requesting information back to the Jython parent process to finish its work.
The CAVI Go tool provides subcommands for get, git, grid, and extract. The get subcommand is basically a GET request that returns the response as stdout. git is specifically used to update the rtsutils package. Interacting with the Cumulus API is requested using the grid subcommand and proper inputs. Interacting with the water API to extract watershed data is done with extract subcommand and proper inputs.
All subcommands provide the user a couple ways to provide inputs to the running program, either switches or standard input. Standard input is a JSON string.
usage: /path/to/go/tool/cavi
Options:
-after string
After time (StartTime UTC); default=now-7 days (default "2022-03-09T19:12:01Z")
-auth string
Authorization Token
-before string
Before time (EndTime UTC); default=now (default "2022-03-16T19:12:01Z")
-branch string
GitHub repository branch name
-endpoint string
Get response body from endpoint
-host string
URL host; default=localhost (default "localhost")
-id string
UUID
-path string
Path to target repository
-product value
Product List; --product value --product value --product value...
-scheme string
URL scheme; default=https (default "https")
-sub string
Subcommands: extract, grid, and get
-timeout float
Grid download timeout (sec); default=300 (default 300)
GET request example
{
"Scheme": "https",
"host": "some-api.corps.cloud",
"Subcommand": "get",
"StdOut": "true",
"Endpoint": "some_endpoint"
}