Documentation
¶
Index ¶
- Constants
- Variables
- func ShowJSON(res gjson.Result, opts ShowJSONOpts) error
- func ShowJSONIterator[T any](iter jsonview.Iterator[T], itemsToDisplay int64, opts ShowJSONOpts) error
- func ValidateBaseURL(value, source string) error
- type BodyContentType
- type FileEmbedStyle
- type FilePathValue
- type ShowJSONOpts
Constants ¶
View Source
const Version = "0.40.1" // x-release-please-version
Variables ¶
View Source
var ( Command *cli.Command CommandErrorBuffer bytes.Buffer )
View Source
var OutputFormats = []string{"auto", "explore", "json", "jsonl", "pretty", "raw", "yaml"}
Functions ¶
func ShowJSON ¶
func ShowJSON(res gjson.Result, opts ShowJSONOpts) error
ShowJSON displays a single JSON result to the user.
func ShowJSONIterator ¶ added in v0.11.0
func ShowJSONIterator[T any](iter jsonview.Iterator[T], itemsToDisplay int64, opts ShowJSONOpts) error
ShowJSONIterator displays an iterator of values to the user. Use itemsToDisplay = -1 for no limit.
func ValidateBaseURL ¶ added in v0.34.0
ValidateBaseURL checks that a base URL is correctly prefixed with a protocol scheme and produces a better error message than the person would see otherwise if it doesn't.
Types ¶
type BodyContentType ¶
type BodyContentType int
const ( EmptyBody BodyContentType = iota MultipartFormEncoded ApplicationJSON ApplicationOctetStream )
type FileEmbedStyle ¶ added in v0.16.0
type FileEmbedStyle int
const ( EmbedText FileEmbedStyle = iota EmbedIOReader )
type FilePathValue ¶ added in v0.34.0
type FilePathValue string
FilePathValue is a string wrapper that marks a value as a file path whose contents should be read and embedded in the request. Unlike a regular string, embedFilesValue always treats a FilePathValue as a file path without needing the "@" prefix.
type ShowJSONOpts ¶ added in v0.40.1
type ShowJSONOpts struct {
ExplicitFormat bool // true if the user explicitly passed --format
Format string // output format (auto, explore, json, jsonl, pretty, raw, yaml)
Stderr io.Writer // stderr for warnings; injectable for testing; defaults to os.Stderr
Stdout *os.File // stdout (or pager); injectable for testing; defaults to os.Stdout
Title string // display title
Transform string // GJSON path to extract before displaying
}
ShowJSONOpts configures how JSON output is displayed.
Source Files
¶
- apikey.go
- auditlog.go
- cluster.go
- clusteravailability.go
- clustercontroller.go
- clustercontrollervolume.go
- clusterkubeconfig.go
- clusterloadbalancer.go
- clusterpersistentvolumeclaim.go
- clusterpool.go
- clusterpoolavailability.go
- clusterpoolnode.go
- clusterpoolnodevolume.go
- cmd.go
- cmdutil.go
- cmdutil_unix.go
- connectconnection.go
- connectroute.go
- dedicated.go
- dedicatedblockchain.go
- firewallrule.go
- flagoptions.go
- flex.go
- flexblockchain.go
- instancetype.go
- membership.go
- operation.go
- organization.go
- project.go
- region.go
- security.go
- suggest.go
- user.go
- version.go
- vm.go
- vmavailability.go
- vmosimage.go
- vmvolume.go
- volume.go
- volumeavailability.go
- vpc.go
- vpcavailability.go
Click to show internal directories.
Click to hide internal directories.