interfaces

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Aug 13, 2019 License: Apache-2.0 Imports: 0 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Auth

type Auth interface {
	Init()
}

type BaseCredential

type BaseCredential interface {
	Init(cred *BaseCredential) error // Checks and "Initializes" the Credential Struct
	// contains filtered or unexported methods
}

Holds/ Checks and gets needed Credentials/ Informations to communicate with the Registry API

type BaseImage

type BaseImage interface {
	ListImageTags() ([]Tag, error) // List all available Tags of a Image
	FetchAllTags() error           // Fetch _all_ Tags from the Image

	DeleteSignature(*Tag) // Delete the Signature of an Tag from the S3-Server

	GetTags() []Tag     // Return copy of Tag slice
	GetTagsPtr() *[]Tag // Return Pointer to Tags slice
	SetTags([]Tag)      // Overwrite Field 'Tags' with the new Tag slice

	GetName() string // Return Name of the Image

	GetRegistryURI() string // Returns the URI of the Registry
}

An Image represents a **single** Docker Image (with TagName)

type BaseRepository

type BaseRepository interface {
	ListImages() ([]BaseImage, error) // List all available Images
	FetchAllImages() error            // Fetch _all_ Image Informations (Images->Tags) available in the Repository
}

A (Docker) Repository is (for example) the 'atlassian-jira' in 'docker.reg.local/atlassian-jira:v1.0.0'

type Registry

type Registry interface {
	// Initialize Registry (and all required Components (Auth, ...))
	Init() error

	// List all Repositories found in the Registry
	ListRepositories() []BaseRepository

	// TODO
	// Test Authentication, API Version (=> Compatibility)
	CheckRegistry() (bool, error)

	// Fetch _all_ Informations (Repos->Images->Tags) available in the Registry
	FetchAll() error

	// Stats() returns Statistics of the Registry
	Stats() Stats
}

Holds all Informations that are needed to talk with the Registry API

type Stats

type Stats struct {
	// Number of Repositories
	Repos int

	// Number of Images
	Images int

	// Number of Tags
	Tags int

	// Number of Signatures found on the S3 Server
	S3Signatures int
}

Stats contains statistics of a Registry

type Tag

type Tag struct {
	Name          TagName // Image Tag (eg 'v1.0.0')
	ContentDigest string  // Docker Content Digest
	S3SignFound   bool    // Is a Signature found on the S3 Server
}

Describes a Tag of a Image in a Repository Implements the @tag Interface

type TagName

type TagName string // TagName of an Image (for example 'v1.0.0' or '0.1.0-beta')

Jump to

Keyboard shortcuts

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