cmd

package
v0.23.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 20, 2026 License: Apache-2.0 Imports: 39 Imported by: 0

Documentation

Index

Constants

View Source
const Version = "0.23.1" // x-release-please-version

Variables

View Source
var (
	Command *cli.Command
)
View Source
var OutputFormats = []string{"auto", "explore", "json", "jsonl", "pretty", "raw", "yaml"}

Functions

func CredentialsPath added in v0.23.0

func CredentialsPath() (string, error)

func DeleteCredentials added in v0.23.0

func DeleteCredentials() error

func GetAccessToken added in v0.23.0

func GetAccessToken() string

func SaveCredentials added in v0.23.0

func SaveCredentials(creds *Credentials) error

func ShowJSON

func ShowJSON(out *os.File, title string, res gjson.Result, format string, transform string) error

Display JSON to the user in various different formats

func ShowJSONIterator added in v0.19.0

func ShowJSONIterator[T any](stdout *os.File, title string, iter jsonview.Iterator[T], format string, transform string) error

For an iterator over different value types, display its values to the user in different formats.

Types

type BodyContentType added in v0.5.0

type BodyContentType int
const (
	EmptyBody BodyContentType = iota
	MultipartFormEncoded
	ApplicationJSON
	ApplicationOctetStream
)

type Credentials added in v0.23.0

type Credentials struct {
	AccessToken  string    `json:"access_token"`
	RefreshToken string    `json:"refresh_token,omitempty"`
	ExpiresAt    time.Time `json:"expires_at,omitempty"`
	TokenType    string    `json:"token_type,omitempty"`
	Scope        string    `json:"scope,omitempty"`
}

func LoadCredentials added in v0.23.0

func LoadCredentials() (*Credentials, error)

func (*Credentials) IsExpired added in v0.23.0

func (c *Credentials) IsExpired() bool

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL