client

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Apr 26, 2023 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewWithAuthToken

func NewWithAuthToken(ctx context.Context) (*registryclient.Client, error)

New creates a new client, specifying the URL directly. The client loads the OAuth2.0 tokens from the system keychain. The client automatically refreshes the access token if it is expired.

Types

type ErrorHandlingClient

type ErrorHandlingClient struct {
	Client    *http.Client
	LoginHint string
}

ErrorHandlingClient checks the response status code and creates an error if the API returns greater than 300.

func (*ErrorHandlingClient) Do

Jump to

Keyboard shortcuts

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