package
0.0.0-20241217012540-abd8fb1eec7c
Repository: https://github.com/algo7/day-planner-gpt-data-portal.git
Documentation: pkg.go.dev

# Functions

ExchangeCodeForToken handles the redirect from the OAuth2 provider and exchanges the code for a token.
FileExists checks if a file exists and is not a directory before we.
GenerateAPIKey generates an 32 byte API key in Hex format.
GenerateOauthURL prints the URL to visit to authorize the application.
GetOAuth2Config returns the OAuth2 config for the specified provider.
GetTokenFromRefreshToken retrieves a token from a refresh token.
PollToken Poll Google's authorization server to retrieve the token.
RetrieveToken retrieves the OAuth token from redis.
SaveToken saves the token to redis.
UpdateToken updates the token in redis.

# Variables

ValidProviders is a slice of valid OAuth2 providers.

# Structs

OAuth2Config is a struct to hold the OAuth2 configuration.