google

package
v0.0.0-...-deaf358 Latest Latest
Warning

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

Go to latest
Published: Mar 15, 2024 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	UserProfileURL = "https://www.googleapis.com/oauth2/v1/userinfo?access_token=%s"
)

Variables

This section is empty.

Functions

func GetConfig

func GetConfig(ctx context.Context) (*oauth2.Config, error)

func GetUserData

func GetUserData(ctx context.Context, token *oauth2.Token) (*types.UserData, error)

Types

type GoogleUserData

type GoogleUserData struct {
	Email         string `json:"email"`
	GivenName     string `json:"given_name"`
	Locale        string `json:"locale"`
	Name          string `json:"name"`
	Picture       string `json:"picture"`
	VerifiedEmail bool   `json:"verified_email"`
}

Jump to

Keyboard shortcuts

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