omodules

package
v0.0.0-...-2f6bcf2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 1, 2024 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const OauthGoogleUrlAPI = "https://www.googleapis.com/oauth2/v2/userinfo?access_token="

Variables

View Source
var GoogleOauthConfig *oauth2.Config

Functions

func GenerateGoogleOauthConfig

func GenerateGoogleOauthConfig() *oauth2.Config

func GenerateStateAuthCookie

func GenerateStateAuthCookie(c *gin.Context) string

func GetUserDataFromGoogle

func GetUserDataFromGoogle(code string) ([]byte, error)

func LoadConfig

func LoadConfig()

Types

type ConfigJSON

type ConfigJSON struct {
	DEBUG       bool   `json:"DEBUG"`
	DB_HOST     string `json:"DB_HOST"`
	DB_ID       string `json:"DB_ID"`
	DB_PW       string `json:"DB_PW"`
	DB_NAME     string `json:"DB_NAME"`
	DB_HOST_DEV string `json:"DB_HOST_DEV"`
}
var CONFIG_JSON ConfigJSON

func GetConfigJSON

func GetConfigJSON() ConfigJSON

type OAuthStruct

type OAuthStruct struct {
	ID             string `json:"id"`
	EMAIL          string `json:"email"`
	VERIFIED_EMAIL bool   `json:"verified_email"`
	PICTURE        string `json:"picture"`
}

type OauthJSON

type OauthJSON struct {
	Web struct {
		ClientID                string   `json:"client_id"`
		ProjectID               string   `json:"project_id"`
		AuthURI                 string   `json:"auth_uri"`
		TokenURI                string   `json:"token_uri"`
		AuthProviderX509CertURL string   `json:"auth_provider_x509_cert_url"`
		ClientSecret            string   `json:"client_secret"`
		RedirectUris            []string `json:"redirect_uris"`
	} `json:"web"`
}
var OAUTH_JSON OauthJSON

func GetOauthJSON

func GetOauthJSON() OauthJSON

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL