google

package
v0.0.0-...-e4e1157 Latest Latest
Warning

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

Go to latest
Published: May 22, 2025 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type OAuthClient

type OAuthClient struct{}

func NewOAuthClient

func NewOAuthClient() *OAuthClient

func (*OAuthClient) GetGoogleAuthCodeURL

func (c *OAuthClient) GetGoogleAuthCodeURL(ctx context.Context, state string) (string, error)

func (*OAuthClient) GetGoogleToken

func (c *OAuthClient) GetGoogleToken(ctx context.Context, code string) (*Token, error)

func (*OAuthClient) GetGoogleUserInfo

func (c *OAuthClient) GetGoogleUserInfo(ctx context.Context, tok *Token) (*UserInfo, error)

type Token

type Token struct {
	AccessToken  string
	TokenType    string
	RefreshToken string
	Expiry       time.Time
}

type UserInfo

type UserInfo struct {
	ID         string
	Email      string
	GivenName  string
	FamilyName string
}

Jump to

Keyboard shortcuts

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