Documentation
¶
Index ¶
- Constants
- func CurrentDir() string
- func Decode[T any](rdr io.Reader) (T, error)
- func ErrAPI(resp *http.Response) error
- func IsNativeFramework(framework string) bool
- func ParseHost(host string) (string, string, error)
- func ReadString(rdr io.Reader, sizeHint int64) (string, error)
- type TokenSecretData
Constants ¶
View Source
const ( TokenSecretKey = "token" AccountSecretKey = "account" )
Variables ¶
This section is empty.
Functions ¶
func CurrentDir ¶
func CurrentDir() string
func IsNativeFramework ¶
func ParseHost ¶
ParseHost picks a host from a hostname or an URL and detects the scheme.
The default scheme is https. This may be altered by specifying an explicit http://hostname URL.
Types ¶
type TokenSecretData ¶ added in v0.0.9
type TokenSecretData struct {
Account string `mapstructure:"account"`
Token string `mapstructure:"token"`
}
func LoadTokenFromFile ¶ added in v0.0.9
func LoadTokenFromFile(secretPath string) (*TokenSecretData, error)
LoadTokenFromFile loads the token and the account from a file
Click to show internal directories.
Click to hide internal directories.