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 = "2.0.0" // 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 ¶
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 ¶
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 ¶
type FileEmbedStyle int
const ( // EmbedText reads referenced files fully into memory and substitutes the file's contents back into the // value as a string. Binary files are base64-encoded. Used for JSON request bodies and for headers and // query parameters, where the file contents need to be serialized inline. EmbedText FileEmbedStyle = iota // EmbedIOReader replaces file references with an io.Reader that streams the file's contents. Used for // `multipart/form-data` and `application/octet-stream` request bodies, where files are uploaded as binary // parts rather than embedded into a text value. EmbedIOReader )
type FilePathValue ¶
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 ¶
type ShowJSONOpts struct {
ExplicitFormat bool // true if the user explicitly passed --format
Format string // output format (auto, explore, json, jsonl, pretty, raw, yaml)
RawOutput bool // like jq -r: print strings without JSON quotes
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
¶
- apply.go
- aws.go
- betaagent.go
- betaagentversion.go
- betadeployment.go
- betadeploymentrun.go
- betadream.go
- betaenvironment.go
- betaenvironmentwork.go
- betafile.go
- betamemorystore.go
- betamemorystorememory.go
- betamemorystorememoryversion.go
- betamessage.go
- betamessagebatch.go
- betamodel.go
- betaorganization.go
- betaorganizationanalyticsappchatproject.go
- betaorganizationanalyticsartifact.go
- betaorganizationanalyticsconnector.go
- betaorganizationanalyticscostreport.go
- betaorganizationanalyticsplugin.go
- betaorganizationanalyticsskill.go
- betaorganizationanalyticssummary.go
- betaorganizationanalyticsusagereport.go
- betaorganizationanalyticsuser.go
- betaorganizationanalyticsusercostreport.go
- betaorganizationanalyticsuserusagereport.go
- betaorganizationapikey.go
- betaorganizationcompliancesetting.go
- betaorganizationexternalkey.go
- betaorganizationfederationissuer.go
- betaorganizationfederationrule.go
- betaorganizationfederationruleworkspace.go
- betaorganizationinvite.go
- betaorganizationplugin.go
- betaorganizationplugininstallationsetting.go
- betaorganizationpluginmarketplace.go
- betaorganizationpluginshare.go
- betaorganizationpluginversion.go
- betaorganizationratelimit.go
- betaorganizationrbacgroup.go
- betaorganizationrbacgroupmember.go
- betaorganizationrbacrole.go
- betaorganizationrbacrolepermission.go
- betaorganizationserviceaccount.go
- betaorganizationserviceaccountworkspace.go
- betaorganizationspendlimit.go
- betaorganizationspendlimiteffective.go
- betaorganizationspendlimitincreaserequest.go
- betaorganizationtelemetrydestination.go
- betaorganizationtelemetrydestinationworkspace.go
- betaorganizationuser.go
- betaorganizationwebhook.go
- betaorganizationworkspace.go
- betaorganizationworkspacemember.go
- betaorganizationworkspaceratelimit.go
- betaorganizationworkspaceserviceaccount.go
- betasession.go
- betasessionevent.go
- betasessionresource.go
- betasessionthread.go
- betasessionthreadevent.go
- betaskill.go
- betaskillversion.go
- betatunnel.go
- betatunnelcertificate.go
- betauserprofile.go
- betauserprofileactionurl.go
- betavault.go
- betavaultcredential.go
- cmd.go
- cmd_auth.go
- cmd_profile.go
- cmdutil.go
- cmdutil_unix.go
- credential_stdin.go
- extras.go
- federation.go
- file.go
- flagoptions.go
- google_cloud.go
- message.go
- messagebatch.go
- model.go
- organization.go
- organizationapikey.go
- organizationcompliancesetting.go
- organizationexternalkey.go
- organizationfederationissuer.go
- organizationfederationrule.go
- organizationfederationruleworkspace.go
- organizationinvite.go
- organizationratelimit.go
- organizationserviceaccount.go
- organizationserviceaccountworkspace.go
- organizationuser.go
- organizationworkspace.go
- organizationworkspacemember.go
- organizationworkspaceratelimit.go
- organizationworkspaceserviceaccount.go
- otel.go
- scope_hint.go
- sessionconnect.go
- skill.go
- skillversion.go
- suggest.go
- userprofile.go
- userprofileactionurl.go
- version.go
- worker.go
Click to show internal directories.
Click to hide internal directories.