gcp

package
v0.3.17 Latest Latest
Warning

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

Go to latest
Published: Mar 31, 2023 License: MIT Imports: 20 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DefaultLength = 32
	MinLength     = 32
	MaxLength     = 96
)
View Source
const (
	DefaultCredentialsDefaultClientId     = "764086051850-6qr4p6gpi6hn506pt8ejuq83di341hur.apps.googleusercontent.com"
	DefaultCredentialsDefaultClientSecret = "d-FL95Q19q7MQmFpd7hHD0Ty"
)

Client ID from project "usable-auth-library", configured for general purpose API testing, extracted from gcloud sdk sourcecode.

View Source
const AuthorizationEndpoint = "https://accounts.google.com/o/oauth2/v2/auth"

Variables

View Source
var IsGCloud = false

Functions

func Delete

func Delete()

func LoggingClient added in v0.3.15

func LoggingClient(ctx context.Context) (*logging.Client, error)

func OAuth

func OAuth()

Types

type Auth

type Auth struct {
	ClientId     string `json:"client_id"`
	ClientSecret string `json:"client_secret"`
	RefreshToken string `json:"refresh_token"`
	Type         string `json:"type"`
}

func (*Auth) Save

func (a *Auth) Save() error

type CodeVerifier

type CodeVerifier struct {
	Value string
}

func CreateCodeVerifier

func CreateCodeVerifier() (*CodeVerifier, error)

func CreateCodeVerifierFromBytes

func CreateCodeVerifierFromBytes(b []byte) (*CodeVerifier, error)

func CreateCodeVerifierWithLength

func CreateCodeVerifierWithLength(length int) (*CodeVerifier, error)

func (*CodeVerifier) CodeChallengePlain

func (v *CodeVerifier) CodeChallengePlain() string

func (*CodeVerifier) CodeChallengeS256

func (v *CodeVerifier) CodeChallengeS256() string

func (*CodeVerifier) String

func (v *CodeVerifier) String() string

Jump to

Keyboard shortcuts

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