Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var (
ErrNotLoggedIn = errors.New("you are not logged in")
)
Errors related to user configuration.
Functions ¶
This section is empty.
Types ¶
type User ¶
type User struct { APIKey string `yaml:"api_key,omitempty"` Username string `yaml:"username,omitempty"` PublicAPIKey string `yaml:"public_api_key,omitempty"` PrivateAPIKey string `yaml:"private_api_key,omitempty"` RefreshToken string `yaml:"refresh_token"` AccessToken string `yaml:"access_token"` }
User stores the user's login credentials and some metadata.
func (*User) LoggedIn ¶
LoggedIn returns a boolean representing whether the user is logged in or not
func (*User) RedactedAPIKey ¶
RedactedAPIKey returns a string representing the user's API key with everything but the last portion of the key displayed as "*"
func (*User) TokenIsExpired ¶
TokenIsExpired returns a boolean representing whether or not the token is expired or an error if the token is invalid
Click to show internal directories.
Click to hide internal directories.