client

package
v0.0.0-...-5ce31cb Latest Latest
Warning

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

Go to latest
Published: Feb 29, 2024 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func URL

func URL(scheme string, host string, format string, a ...interface{}) string

Types

type BasicCredentials

type BasicCredentials struct {
	Username string
	Password string
}

func (*BasicCredentials) Basic

func (c *BasicCredentials) Basic(url *url.URL) (string, string)

func (*BasicCredentials) RefreshToken

func (c *BasicCredentials) RefreshToken(url *url.URL, service string) string

func (*BasicCredentials) SetRefreshToken

func (c *BasicCredentials) SetRefreshToken(url *url.URL, service string, token string)

type Client

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

func New

func New(ref string, insecure bool, transport http.RoundTripper) (*Client, error)

func (*Client) Auth

func (c *Client) Auth(creds auth.CredentialStore, scope string, actions ...string) error

func (*Client) DeleteManifest

func (c *Client) DeleteManifest(name string) (*http.Response, error)

func (*Client) Do

func (c *Client) Do(req *http.Request) (*http.Response, error)

func (*Client) GetBlob

func (c *Client) GetBlob(name string) (*http.Response, error)

func (*Client) GetManifest

func (c *Client) GetManifest(name string, opts GetManifestOptions) (*http.Response, error)

func (*Client) Named

func (c *Client) Named() reference.Named

func (*Client) Scope

func (c *Client) Scope() string

func (*Client) URL

func (c *Client) URL(format string, a ...interface{}) string

type GetManifestOptions

type GetManifestOptions struct {
	AcceptKnown         bool
	AcceptSchema1       bool
	AcceptSchema1Signed bool
	AcceptSchema2       bool
	AcceptManifestList  bool
	AcceptOCISchema     bool
	AcceptOCIIndex      bool
	MediaTypes          []string
}

func (*GetManifestOptions) AddToFlagSet

func (o *GetManifestOptions) AddToFlagSet(fs *flag.FlagSet)

Jump to

Keyboard shortcuts

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