Documentation ¶
Index ¶
- Constants
- Variables
- func Credentials() (string, string)
- func CredentialsPresent() bool
- func NewCachingTokenSource() (oauth2.TokenSource, error)
- func ReadTokenFromFile() (*oauth2.Token, error)
- func SaveTokenToFile(token *oauth2.Token) error
- func SetCredentials(clientID, clientSecret string)
- func WriteToFile() error
Constants ¶
View Source
const ( ConfigFileName = "config.yaml" TokenFileName = "auth.json" )
Variables ¶
View Source
var ( ConfigDirectory = filepath.Join(xdg.ConfigHome, "bx") ConfigFileFullPath = filepath.Join(ConfigDirectory, ConfigFileName) TokenFileFullPath = filepath.Join(ConfigDirectory, TokenFileName) )
Functions ¶
func Credentials ¶
func CredentialsPresent ¶
func CredentialsPresent() bool
func NewCachingTokenSource ¶
func NewCachingTokenSource() (oauth2.TokenSource, error)
func ReadTokenFromFile ¶
Reads the token from the given json file
func SaveTokenToFile ¶
Saves the token as json into the token file
func SetCredentials ¶
func SetCredentials(clientID, clientSecret string)
func WriteToFile ¶
func WriteToFile() error
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.