client

package
v0.19.0 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	ID       string
	Secret   string
	App      string
	Endpoint oauth2.Endpoint
}

Client represents IAM GCP client

func NewClient

func NewClient(id, secret, app string, endpoint oauth2.Endpoint) *Client

func (*Client) Config

func (c *Client) Config(redirectURL string, scopes ...string) *oauth2.Config

Config creates oauth config

func (*Client) LocalTokenURL

func (c *Client) LocalTokenURL() string

type Option added in v0.18.2

type Option func(c *oauth2.Config)

func WithRedirectURL added in v0.18.2

func WithRedirectURL(url string) Option

func WithScopes added in v0.18.2

func WithScopes(scopes ...string) Option

type Service

type Service struct {
	// contains filtered or unexported fields
}

func New

func New(client *Client) *Service

func (*Service) TokenWithBrowserFlow

func (s *Service) TokenWithBrowserFlow(scopes ...string) (*auth.Token, error)

Jump to

Keyboard shortcuts

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