cli

package
v1.13.0 Latest Latest
Warning

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

Go to latest
Published: Jun 1, 2025 License: MIT Imports: 16 Imported by: 0

Documentation

Overview

Package cli for basic cli functions

Package cli for basic cli functions

Package cli for basic cli functions

Package cli for basic cli functions

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GenAppVersion

func GenAppVersion() error

GenAppVersion gen app verrsion string

func HandleToken added in v1.12.0

func HandleToken(fs afero.Fs, config *cfg.Config, client *internal.Client, options str.Options)

HandleToken process token check and refresh

func HandleUpgrade added in v1.5.0

func HandleUpgrade(r *str.Response) error

HandleUpgrade parses related headers, and returns upgradeUrl.

func OpenBrowser added in v1.1.0

func OpenBrowser(url string) error

OpenBrowser open browser for url

func PoolNewDeviceCode

func PoolNewDeviceCode(config *cfg.Config, client *internal.Client, options *str.Options) error

PoolNewDeviceCode pool new device code (open browser and wait for correct code activation)

func ReadTokenFromFile

func ReadTokenFromFile(filePath string) (*str.Token, error)

ReadTokenFromFile reads the token from the specified file

func ReadUserSettingsFromFile added in v1.11.0

func ReadUserSettingsFromFile(filePath string) (*str.UserSettings, error)

ReadUserSettingsFromFile reads user settings from the specified file

func RefreshUserSettings added in v1.11.0

func RefreshUserSettings(config *cfg.Config, client *internal.Client, options *str.Options) bool

RefreshUserSettings user settings

func ValidAccessToken

func ValidAccessToken(config *cfg.Config, client *internal.Client, options *str.Options) bool

ValidAccessToken valid if access_token is expired or not, and refresh if expired

Types

This section is empty.

Jump to

Keyboard shortcuts

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