docker

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Jun 29, 2016 License: Apache-2.0 Imports: 9 Imported by: 6

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetTagImageIDs

func GetTagImageIDs(repo, tag string) ([]string, error)

GetTagImageIDs returns a list of image IDs for the given tag

func InitQuay

func InitQuay(c *QuayConfig) error

InitQuay initializes the quay docker service

Types

type Image

type Image struct {
	ID           string    `json:"id"`
	Size         int       `json:"size"`
	Tag          string    `json:"tag"`
	Branch       string    `json:"branch"`
	LastModified time.Time `json:"lastModified"`
}

Image represents a docker image in a repository

func GetRepository

func GetRepository(repo string, withBranches bool) ([]*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 QuayConfig

type QuayConfig struct {
	Token     string
	Namespace string
}

QuayConfig is the quay service configuration

type QuayRepositoryResponse

type QuayRepositoryResponse struct {
	Tags map[string]map[string]interface{} `json:"tags"`
}

QuayRepositoryResponse is the json response for repository requests

type QuayService

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

QuayService is an implementation of the docker Service interface It fetches docker image

func (*QuayService) GetRepository

func (s *QuayService) GetRepository(repo string, withBranches bool) ([]*Image, error)

GetRepository implements the Service interface

func (*QuayService) GetTagImageIDs

func (s *QuayService) GetTagImageIDs(repo, tag string) ([]string, error)

GetTagImageIDs implements the Service interface

type QuayTagImagesResponse

type QuayTagImagesResponse struct {
	Tags []map[string]interface{} `json:"tags"`
}

QuayTagImagesResponse is the json response for tag images requests

type Service

type Service interface {
	GetRepository(repo string, withBranches bool) ([]*Image, error)
	GetTagImageIDs(repo, 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