cmdutil

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Apr 1, 2021 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var SilentError = errors.New("SilentError")

SilentError is an error that triggers exit code 1 without any error messaging

Functions

func Openbrowser

func Openbrowser(url string)

func StoreAPICreds

func StoreAPICreds(cred *APICred) error

func StoreCreds

func StoreCreds(cred *LoginResponse) error

Types

type APICred

type APICred struct {
	Key    string `json:"Key"`
	Secret string `json:"Secret"`
}

func GetAPICreds

func GetAPICreds() (*APICred, error)

type FlagError

type FlagError struct {
	Err error
}

FlagError is the kind of error raised in flag processing

func (FlagError) Error

func (fe FlagError) Error() string

func (FlagError) Unwrap

func (fe FlagError) Unwrap() error

type LoginResponse

type LoginResponse struct {
	XSign   string `json:"xsign"`
	XToken  string `json:"xtoken"`
	AppName string `json:"app_name"`
}

func GetCreds

func GetCreds() (*LoginResponse, error)

type TempServer

type TempServer struct {
	Port        string
	Server      *http.Server
	RouteName   string
	HandlerFunc func(http.ResponseWriter, *http.Request)
}

func CreateTempServer

func CreateTempServer(t TempServer) *TempServer

func (*TempServer) CloseServer

func (t *TempServer) CloseServer()

type Token

type Token struct {
	AccessToken string `json:"access_token"`
}

Jump to

Keyboard shortcuts

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