pusher

package
v3.15.0-rc.1 Latest Latest
Warning

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

Go to latest
Published: May 8, 2024 License: Apache-2.0 Imports: 13 Imported by: 11

Documentation

Overview

Package pusher provides a generalized tool for uploading data by scheme. This provides a method by which the plugin system can load arbitrary protocol handlers based upon a URL scheme.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Constructor

type Constructor func(options ...Option) (Pusher, error)

Constructor is the function for every pusher which creates a specific instance according to the configuration

type OCIPusher

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

OCIPusher is the default OCI backend handler

func (*OCIPusher) Push

func (pusher *OCIPusher) Push(chartRef, href string, options ...Option) error

Push performs a Push from repo.Pusher.

type Option

type Option func(*options)

Option allows specifying various settings configurable by the user for overriding the defaults used when performing Push operations with the Pusher.

func WithInsecureSkipTLSVerify added in v3.12.0

func WithInsecureSkipTLSVerify(insecureSkipTLSVerify bool) Option

WithInsecureSkipTLSVerify determines if a TLS Certificate will be checked

func WithPlainHTTP added in v3.13.0

func WithPlainHTTP(plainHTTP bool) Option

func WithRegistryClient

func WithRegistryClient(client *registry.Client) Option

WithRegistryClient sets the registryClient option.

func WithTLSClientConfig added in v3.12.0

func WithTLSClientConfig(certFile, keyFile, caFile string) Option

WithTLSClientConfig sets the client auth with the provided credentials.

type Provider

type Provider struct {
	Schemes []string
	New     Constructor
}

Provider represents any pusher and the schemes that it supports.

func (Provider) Provides

func (p Provider) Provides(scheme string) bool

Provides returns true if the given scheme is supported by this Provider.

type Providers

type Providers []Provider

Providers is a collection of Provider objects.

func All

func All(_ *cli.EnvSettings) Providers

All finds all of the registered pushers as a list of Provider instances. Currently, just the built-in pushers are collected.

func (Providers) ByScheme

func (p Providers) ByScheme(scheme string) (Pusher, error)

ByScheme returns a Provider that handles the given scheme.

If no provider handles this scheme, this will return an error.

type Pusher

type Pusher interface {
	// Push file content by url string
	Push(chartRef, url string, options ...Option) error
}

Pusher is an interface to support upload to the specified URL.

func NewOCIPusher

func NewOCIPusher(ops ...Option) (Pusher, error)

NewOCIPusher constructs a valid OCI client as a Pusher

Jump to

Keyboard shortcuts

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