publish

package
v0.0.0-...-a6075fc Latest Latest
Warning

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

Go to latest
Published: Nov 13, 2018 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Overview

Package publish defines methods for publishing a v1.Image reference and returning the published digest for embedding back into a Kubernetes yaml.

Index

Constants

View Source
const (
	LocalDomain = "ko.local"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Interface

type Interface interface {
	// Publish uploads the given v1.Image to a registry incorporating the
	// provided string into the image's repository name.  Returns the digest
	// of the published image.
	Publish(v1.Image, string) (name.Reference, error)
}

Interface abstracts different methods for publishing images.

func NewDaemon

func NewDaemon(namer Namer) Interface

NewDaemon returns a new publish.Interface that publishes images to a container daemon.

func NewDefault

func NewDefault(base string, options ...Option) (Interface, error)

NewDefault returns a new publish.Interface that publishes references under the provided base repository using the default keychain to authenticate and the default naming scheme.

type Namer

type Namer func(string) string

Namer is a function from a supported import path to the portion of the resulting image name that follows the "base" repository name.

type Option

type Option func(*defaultOpener) error

func WithAuth

func WithAuth(auth authn.Authenticator) Option

WithAuth is a functional option for overriding the default authenticator on a default publisher.

func WithAuthFromKeychain

func WithAuthFromKeychain(keys authn.Keychain) Option

WithAuthFromKeychain is a functional option for overriding the default authenticator on a default publisher using an authn.Keychain

func WithNamer

func WithNamer(n Namer) Option

WithNamer is a functional option for overriding the image naming behavior in our default publisher.

func WithTransport

func WithTransport(t http.RoundTripper) Option

WithTransport is a functional option for overriding the default transport on a default publisher.

Jump to

Keyboard shortcuts

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