Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add -output flag to spire-agent api commands #3818

Merged
merged 10 commits into from
Feb 7, 2023
45 changes: 45 additions & 0 deletions cmd/spire-agent/cli/api/api_posix_test.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
//go:build !windows
// +build !windows

package api

const (
fetchJWTUsage = `Usage of fetch jwt:
-audience value
comma separated list of audience values
-format value
deprecated; use -output
-output value
Desired output format (pretty, json); default: pretty.
-socketPath string
Path to the SPIRE Agent API Unix domain socket (default "/tmp/spire-agent/public/api.sock")
-spiffeID string
SPIFFE ID subject (optional)
-timeout value
Time to wait for a response (default 5s)
`
fetchX509Usage = `Usage of fetch x509:
-output value
Desired output format (pretty, json); default: pretty.
-silent
Suppress stdout
-socketPath string
Path to the SPIRE Agent API Unix domain socket (default "/tmp/spire-agent/public/api.sock")
-timeout value
Time to wait for a response (default 5s)
-write string
Write SVID data to the specified path (optional; only available for pretty output format)
`
validateJWTUsage = `Usage of validate jwt:
-audience string
expected audience value
-output value
Desired output format (pretty, json); default: pretty.
-socketPath string
Path to the SPIRE Agent API Unix domain socket (default "/tmp/spire-agent/public/api.sock")
-svid string
JWT SVID
-timeout value
Time to wait for a response (default 5s)
`
)
Loading