repository

package
v1.32.1 Latest Latest
Warning

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

Go to latest
Published: Dec 13, 2023 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Overview

Package repository provides support for building and pushing images to a repository.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ContainerLoginBuildPusher

type ContainerLoginBuildPusher interface {
	Build(ctx context.Context, args *dockerengine.BuildArguments, w io.Writer) error
	Login(uri, username, password string) error
	Push(ctx context.Context, uri string, w io.Writer, tags ...string) (digest string, err error)
	IsEcrCredentialHelperEnabled(uri string) bool
}

ContainerLoginBuildPusher provides support for logging in to repositories, building images and pushing images to repositories.

type Registry

type Registry interface {
	RepositoryURI(name string) (string, error)
	Auth() (string, string, error)
}

Registry gets information of repositories.

type Repository

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

Repository builds and pushes images to a repository.

func New

func New(registry Registry, name string) *Repository

New instantiates a new Repository.

func NewWithURI added in v1.16.0

func NewWithURI(registry Registry, name, uri string) *Repository

NewWithURI instantiates a new Repository with uri being set.

func (*Repository) Build added in v1.30.0

func (r *Repository) Build(ctx context.Context, args *dockerengine.BuildArguments, w io.Writer) (digest string, err error)

Build build the image from Dockerfile

func (*Repository) BuildAndPush

func (r *Repository) BuildAndPush(ctx context.Context, args *dockerengine.BuildArguments, w io.Writer) (digest string, err error)

BuildAndPush builds the image from Dockerfile and pushes it to the repository with tags.

func (*Repository) Login added in v1.28.0

func (r *Repository) Login() (string, error)

Login authenticates with a ECR registry by performing a Docker login, but only if the `credStore` attribute value is not set to `ecr-login`. If the `credStore` value is `ecr-login`, no login is performed. Returns uri of the repository or an error, if any occurs during the login process.

Directories

Path Synopsis
Package mocks is a generated GoMock package.
Package mocks is a generated GoMock package.

Jump to

Keyboard shortcuts

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