add oauth flow routes

This commit is contained in:
Jay
2019-12-28 14:38:38 +00:00
parent 369e8d3f6e
commit 6ff437be99
10 changed files with 367 additions and 13 deletions
+15 -3
View File
@@ -13,13 +13,25 @@ import (
// Google config
type Google struct {
APIKey string `yaml:"api_key" env:"GOOGLE_API_KEY"`
APIKey string `yaml:"api_key" env:"GOOGLE_API_KEY"`
ClientID string `yaml:"client_id" env:"GOOGLE_CLIENT_ID"`
AuthURL string `yaml:"auth_url" env:"GOOGLE_AUTH_URL"`
TokenURL string `yaml:"token_url" env:"GOOGLE_TOKEN_URL"`
ClientSecret string `yaml:"client_secret" env:"GOOGLE_CLIENT_SECRET"`
RedirectURL string `yaml:"redirect_url" env:"GOOGLE_REDIRECT_URL"`
Scopes []string `yaml:"scopes" env:"GOOGLE_SCOPES"`
}
// Storage struct
type Storage struct {
Path string `yaml:"path" env:"STORAGE_FILE_PATH"`
}
// Config main struct
type Config struct {
Port int `yaml:"port" env:"PORT"`
Google Google `yaml:"google"`
Port int `yaml:"port" env:"PORT"`
Google Google `yaml:"google"`
Storage Storage `yaml:"storage"`
}
var conf *Config