registry

package
v3.7.1 Latest Latest
Warning

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

Go to latest
Published: Oct 13, 2021 License: Apache-2.0 Imports: 21 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// OCIScheme is the URL scheme for OCI-based requests
	OCIScheme = "oci"

	// CredentialsFileBasename is the filename for auth credentials file
	CredentialsFileBasename = "registry.json"

	// ConfigMediaType is the reserved media type for the Helm chart manifest config
	ConfigMediaType = "application/vnd.cncf.helm.config.v1+json"

	// ChartLayerMediaType is the reserved media type for Helm chart package content
	ChartLayerMediaType = "application/vnd.cncf.helm.chart.content.v1.tar+gzip"

	// ProvLayerMediaType is the reserved media type for Helm chart provenance files
	ProvLayerMediaType = "application/vnd.cncf.helm.chart.provenance.v1.prov"

	// LegacyChartLayerMediaType is the legacy reserved media type for Helm chart package content.
	LegacyChartLayerMediaType = "application/tar+gzip"
)

Variables

This section is empty.

Functions

func IsOCI added in v3.7.0

func IsOCI(url string) bool

IsOCI determines whether or not a URL is to be treated as an OCI URL

Types

type Client

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

Client works with OCI-compliant registries

func NewClient

func NewClient(options ...ClientOption) (*Client, error)

NewClient returns a new registry client with config

func (*Client) Login

func (c *Client) Login(host string, options ...LoginOption) error

Login logs into a registry

func (*Client) Logout

func (c *Client) Logout(host string, opts ...LogoutOption) error

Logout logs out of a registry

func (*Client) Pull added in v3.7.0

func (c *Client) Pull(ref string, options ...PullOption) (*PullResult, error)

Pull downloads a chart from a registry

func (*Client) Push added in v3.7.0

func (c *Client) Push(data []byte, ref string, options ...PushOption) (*PushResult, error)

Push uploads a chart to a registry.

type ClientOption

type ClientOption func(*Client)

ClientOption allows specifying various settings configurable by the user for overriding the defaults used when creating a new default client

func ClientOptCredentialsFile added in v3.3.0

func ClientOptCredentialsFile(credentialsFile string) ClientOption

ClientOptCredentialsFile returns a function that sets the credentialsFile setting on a client options set

func ClientOptDebug

func ClientOptDebug(debug bool) ClientOption

ClientOptDebug returns a function that sets the debug setting on client options set

func ClientOptWriter

func ClientOptWriter(out io.Writer) ClientOption

ClientOptWriter returns a function that sets the writer setting on client options set

type LoginOption added in v3.7.0

type LoginOption func(*loginOperation)

LoginOption allows specifying various settings on login

func LoginOptBasicAuth added in v3.7.0

func LoginOptBasicAuth(username string, password string) LoginOption

LoginOptBasicAuth returns a function that sets the username/password settings on login

func LoginOptInsecure added in v3.7.0

func LoginOptInsecure(insecure bool) LoginOption

LoginOptInsecure returns a function that sets the insecure setting on login

type LogoutOption added in v3.7.0

type LogoutOption func(*logoutOperation)

LogoutOption allows specifying various settings on logout

type PullOption added in v3.7.0

type PullOption func(*pullOperation)

PullOption allows specifying various settings on pull

func PullOptIgnoreMissingProv added in v3.7.0

func PullOptIgnoreMissingProv(ignoreMissingProv bool) PullOption

PullOptIgnoreMissingProv returns a function that sets the ignoreMissingProv setting on pull

func PullOptWithChart added in v3.7.0

func PullOptWithChart(withChart bool) PullOption

PullOptWithChart returns a function that sets the withChart setting on pull

func PullOptWithProv added in v3.7.0

func PullOptWithProv(withProv bool) PullOption

PullOptWithProv returns a function that sets the withProv setting on pull

type PullResult added in v3.7.0

type PullResult struct {
	Manifest *descriptorPullSummary         `json:"manifest"`
	Config   *descriptorPullSummary         `json:"config"`
	Chart    *descriptorPullSummaryWithMeta `json:"chart"`
	Prov     *descriptorPullSummary         `json:"prov"`
	Ref      string                         `json:"ref"`
}

PullResult is the result returned upon successful pull.

type PushOption added in v3.7.0

type PushOption func(*pushOperation)

PushOption allows specifying various settings on push

func PushOptProvData added in v3.7.0

func PushOptProvData(provData []byte) PushOption

PushOptProvData returns a function that sets the prov bytes setting on push

func PushOptStrictMode added in v3.7.0

func PushOptStrictMode(strictMode bool) PushOption

PushOptStrictMode returns a function that sets the strictMode setting on push

type PushResult added in v3.7.0

type PushResult struct {
	Manifest *descriptorPushSummary         `json:"manifest"`
	Config   *descriptorPushSummary         `json:"config"`
	Chart    *descriptorPushSummaryWithMeta `json:"chart"`
	Prov     *descriptorPushSummary         `json:"prov"`
	Ref      string                         `json:"ref"`
}

PushResult is the result returned upon successful push.

Jump to

Keyboard shortcuts

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