docker

package
v2.0.0+incompatible Latest Latest
Warning

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

Go to latest
Published: Feb 27, 2017 License: Apache-2.0 Imports: 20 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FullName

func FullName(repo, branch, tag string) (string, error)

FullName returns the complete docker image name, including any branch info

func GetTag

func GetTag(repo, branch, tag string) (string, error)

GetTag returns an image digest for the given tag and branch

func InitECR

func InitECR(c *ECRConfig) error

InitECR initializes the docker registry service

func InitRegistry

func InitRegistry(c *RegistryConfig) error

InitRegistry initializes the docker registry service

Types

type ECRConfig

type ECRConfig struct {
	Region          string
	AccessKeyID     string
	SecretAccessKey string
	Namespace       string
	BranchDelimiter string
	RegistryID      *string
}

ECRConfig is the ECR service configuration

type ECRService

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

ECRService is an implementation of the docker Service interface It fetches docker images

func (*ECRService) FullName

func (s *ECRService) FullName(repo, branch, tag string) (string, error)

FullName implements the Service interface

func (*ECRService) GetRepository

func (s *ECRService) GetRepository(repo string, branches []string) ([]*Image, error)

GetRepository implements the Service interface

func (*ECRService) GetTag

func (s *ECRService) GetTag(repo, branch, tag string) (string, error)

GetTag implements the Service interface

type Image

type Image struct {
	Tag          string    `json:"tag"`
	Branch       string    `json:"branch"`
	Revision     string    `json:"revision"`
	LastModified time.Time `json:"lastModified"`
}

Image represents a docker image in a repository

func GetRepository

func GetRepository(repo string, branches []string) ([]*Image, error)

GetRepository returns the images in the given repository

type NotFoundError

type NotFoundError struct {
}

NotFoundError is raised when a given repository or image tag is not found

func (*NotFoundError) Error

func (e *NotFoundError) Error() string

type RegistryConfig

type RegistryConfig struct {
	BaseURL         string
	Username        string
	Password        string
	Namespace       string
	BranchDelimiter string
}

RegistryConfig is the registry service configuration

type RegistryService

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

RegistryService is an implementation of the docker Service interface It fetches docker images

func (*RegistryService) FullName

func (s *RegistryService) FullName(repo, branch, tag string) (string, error)

FullName implements the Service interface

func (*RegistryService) GetRepository

func (s *RegistryService) GetRepository(repo string, branches []string) ([]*Image, error)

GetRepository implements the Service interface

func (*RegistryService) GetTag

func (s *RegistryService) GetTag(repo, branch, tag string) (string, error)

GetTag implements the Service interface

type Service

type Service interface {
	GetRepository(repo string, branches []string) ([]*Image, error)
	GetTag(repo, branch, tag string) (string, error)
	FullName(repo, branch, tag string) (string, error)
}

Service is a docker service instance that fetches images from a repository

Jump to

Keyboard shortcuts

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