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: 6

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FullName added in v1.1.0

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

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

func GetTag added in v1.1.0

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

GetTag returns an image digest for the given tag and branch

func InitECR added in v1.1.0

func InitECR(c *ECRConfig) error

InitECR initializes the docker registry service

func InitRegistry added in v1.1.0

func InitRegistry(c *RegistryConfig) error

InitRegistry initializes the docker registry service

Types

type ECRConfig added in v1.1.0

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

ECRConfig is the ECR service configuration

type ECRService added in v1.1.0

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

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

func (*ECRService) FullName added in v1.1.0

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

FullName implements the Service interface

func (*ECRService) GetRepository added in v1.1.0

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

GetRepository implements the Service interface

func (*ECRService) GetTag added in v1.1.0

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 added in v1.1.0

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

RegistryConfig is the registry service configuration

type RegistryService added in v1.1.0

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

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

func (*RegistryService) FullName added in v1.1.0

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

FullName implements the Service interface

func (*RegistryService) GetRepository added in v1.1.0

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

GetRepository implements the Service interface

func (*RegistryService) GetTag added in v1.1.0

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