client

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Jan 31, 2025 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Details

type Details struct {
	ClientID     string // ClientID is the OAuth client ID
	ClientSecret string // ClientSecret is the OAuth client secret
}

Details contains the OAuth client ID and secret

type DetailsProvider

type DetailsProvider interface {
	// GetDetails returns the OAuth client ID and secret
	GetDetails(ctx context.Context) (*Details, error)
}

DetailsProvider provides the OAuth client ID and secret

type FlagDetailsProvider

type FlagDetailsProvider struct {
}

FlagDetailsProvider provides the OAuth client ID and secret by reading arguments provided as flags. This reads --oauth-client-id and --oauth-client-secret.

func NewFlagDetailsProvider

func NewFlagDetailsProvider() *FlagDetailsProvider

NewFlagDetailsProvider returns a new FlagDetailsProvider.

func (*FlagDetailsProvider) GetDetails

func (p *FlagDetailsProvider) GetDetails(ctx context.Context) (*Details, error)

type InteractiveDetailsProvider

type InteractiveDetailsProvider struct {
}

InteractiveDetailsProvider prompts the user for the OAuth client ID and secret

func NewInteractiveDetailsProvider

func NewInteractiveDetailsProvider() *InteractiveDetailsProvider

NewInteractiveDetailsProvider returns a new InteractiveDetailsProvider

func (*InteractiveDetailsProvider) GetDetails

func (p *InteractiveDetailsProvider) GetDetails(ctx context.Context) (*Details, error)

Jump to

Keyboard shortcuts

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