google

package
v1.0.5 Latest Latest
Warning

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

Go to latest
Published: May 16, 2021 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewConfig

func NewConfig(clientId, clientSecret, redirectUrl string) *oauth2.Config

Types

type UserInfo

type UserInfo struct {
	Id            string `json:"id"`
	Email         string `json:"email"`
	VerifiedEmail bool   `json:"verified_email"`
	Name          string `json:"name"`
	GivenName     string `json:"given_name"`
	FamilyName    string `json:"family_name"`
	Picture       string `json:"picture"`
	Gender        string `json:"gender"`
	Locale        string `json:"locale"`
}
{
  "id": "12345678",
  "email": "hchlin@gmail.com",
  "verified_email": true,
  "name": "hu chenglin",
  "given_name": "hu",
  "family_name": "chenglin",
  "picture": "https://lh3.googleusercontent.com/a/AATXAJyLI2vOYsq4bGKu_jp_7UKcvdSIyVFZmZ3sTPIv=s96-c",
  "locale": "zh-CN"
}

func GetUserInfo

func GetUserInfo(accessToken string) (result *UserInfo, err error)

Jump to

Keyboard shortcuts

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