Skip to content

Commit

Permalink
Add -output flag to spire-agent api commands (spiffe#3818)
Browse files Browse the repository at this point in the history
* Add output flag for spire-agent api commands

Signed-off-by: Guilherme Carvalho <[email protected]>

---------

Signed-off-by: Guilherme Carvalho <[email protected]>
  • Loading branch information
guilhermocc authored Feb 7, 2023
1 parent d32054f commit 6a8726b
Show file tree
Hide file tree
Showing 9 changed files with 841 additions and 151 deletions.
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

0 comments on commit 6a8726b

Please sign in to comment.