registry

package
v0.0.0-...-eef33a9 Latest Latest
Warning

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

Go to latest
Published: Jun 21, 2019 License: Apache-2.0 Imports: 25 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// HelmChartDefaultTag is the default tag used when storing a chart reference with no tag
	HelmChartDefaultTag = "latest"

	// HelmChartMetaMediaType is the reserved media type for Helm chart metadata
	HelmChartMetaMediaType = "application/vnd.cncf.helm.chart.meta.v1+json"

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

	// HelmChartMetaFileName is the reserved file name for Helm chart metadata
	HelmChartMetaFileName = "chart-meta.json"

	// HelmChartContentFileName is the reserved file name for Helm chart package content
	HelmChartContentFileName = "chart-content.tgz"

	// HelmChartNameAnnotation is the reserved annotation key for Helm chart name
	HelmChartNameAnnotation = "sh.helm.chart.name"

	// HelmChartVersionAnnotation is the reserved annotation key for Helm chart version
	HelmChartVersionAnnotation = "sh.helm.chart.version"
)

Variables

This section is empty.

Functions

func KnownMediaTypes

func KnownMediaTypes() []string

KnownMediaTypes returns a list of layer mediaTypes that the Helm client knows about

Types

type Client

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

Client works with OCI-compliant registries and local Helm chart cache

func NewClient

func NewClient(options *ClientOptions) *Client

NewClient returns a new registry client with config

func (*Client) LoadChart

func (c *Client) LoadChart(ref *Reference) (*chart.Chart, error)

LoadChart retrieves a chart object by reference

func (*Client) PrintChartTable

func (c *Client) PrintChartTable() error

PrintChartTable prints a list of locally stored charts

func (*Client) PullChart

func (c *Client) PullChart(ref *Reference) error

PullChart downloads a chart from a registry

func (*Client) PushChart

func (c *Client) PushChart(ref *Reference) error

PushChart uploads a chart to a registry

func (*Client) RemoveChart

func (c *Client) RemoveChart(ref *Reference) error

RemoveChart deletes a locally saved chart

func (*Client) SaveChart

func (c *Client) SaveChart(ch *chart.Chart, ref *Reference) error

SaveChart stores a copy of chart in local cache

type ClientOptions

type ClientOptions struct {
	Out          io.Writer
	Resolver     Resolver
	CacheRootDir string
}

ClientOptions is used to construct a new client

type Reference

type Reference struct {
	*reference.Spec
	Tag  string
	Repo string
}

Reference defines the main components of a reference specification

func ParseReference

func ParseReference(s string) (*Reference, error)

ParseReference converts a string to a Reference

type Resolver

type Resolver struct {
	remotes.Resolver
}

Resolver provides remotes based on a locator

Jump to

Keyboard shortcuts

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