Documentation
¶
Index ¶
- func CacheToken(config *oauth2.Config) error
- func Client(ctx context.Context, scopeURL string) (*http.Client, error)
- func ClientConfig(scopeURL string) (*oauth2.Config, error)
- func Token(config *oauth2.Config) (*oauth2.Token, error)
- func WriteSliceToFile(filepath string, values []string) error
- func WriteSliceToStdout(values []string)
- type Sheets
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CacheToken ¶
CacheToken generates a new OAuth2 Token and caches it locally. It will return an error if the caching fails.
func ClientConfig ¶
ClientConfig returns an OAuth2 client config for the given scope.
func Token ¶
Token uses a OAuth2 Config to retrieve a Token for the current user. The token is cached locally. If the caching fails, an error is not returned. If the user's permissions change, the cached token must be deleted in order to create a new one.
func WriteSliceToFile ¶
WriteSliceToFile writes a slice to the file at the filepath. It writes each element of the slice on a separate line.
func WriteSliceToStdout ¶
func WriteSliceToStdout(values []string)
WriteSliceToStdout prints the elements of the slice. Each element is on a new line.
Types ¶
Click to show internal directories.
Click to hide internal directories.