registry

package
v0.4.4 Latest Latest
Warning

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

Go to latest
Published: Jul 1, 2021 License: MIT Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Image

type Image struct {
	// The sha256 digest of the image manifest.
	Digest string `json:"digest"`

	// The tag used for the image.
	Tag string `json:"tag"`

	// The image manifest associated with the image.
	Manifest string `json:"manifest"`

	// The name of the repository associated with the image.
	RepositoryName string `json:"repository_name"`

	// When the image was pushed
	PushedAt *time.Time `json:"pushed_at"`
}

Image is a Docker image type

type Registry

type Registry models.Registry

Registry wraps the gorm Registry model

func (*Registry) CreateRepository

func (r *Registry) CreateRepository(
	repo repository.Repository,
	name string,
) error

CreateRepository creates a repository for a registry, if needed (currently only required for ECR)

func (*Registry) GetDockerConfigJSON

func (r *Registry) GetDockerConfigJSON(
	repo repository.Repository,
	doAuth *oauth2.Config,
) ([]byte, error)

GetDockerConfigJSON returns a dockerconfigjson file contents with "auths" populated.

func (*Registry) GetGCRToken

func (r *Registry) GetGCRToken(repo repository.Repository) (*ints.TokenCache, error)

func (*Registry) ListImages

func (r *Registry) ListImages(
	repoName string,
	repo repository.Repository,
	doAuth *oauth2.Config,
) ([]*Image, error)

ListImages lists the images for an image repository

func (*Registry) ListRepositories

func (r *Registry) ListRepositories(
	repo repository.Repository,
	doAuth *oauth2.Config,
) ([]*Repository, error)

ListRepositories lists the repositories for a registry

type Repository

type Repository struct {
	// Name of the repository
	Name string `json:"name"`

	// When the repository was created
	CreatedAt time.Time `json:"created_at,omitempty"`

	// The URI of the repository
	URI string `json:"uri"`
}

Repository is a collection of images

Jump to

Keyboard shortcuts

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