registry

package
v1.7.1 Latest Latest
Warning

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

Go to latest
Published: Jan 4, 2019 License: Apache-2.0 Imports: 6 Imported by: 92

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Adaptor

type Adaptor interface {
	// Return the unique kind identifier of the adaptor
	Kind() string

	// Get all the namespaces
	GetNamespaces() []models.Namespace

	// Get the namespace with the specified name
	GetNamespace(name string) models.Namespace

	// Get all the repositories under the specified namespace
	GetRepositories(namespace string) []models.Repository

	// Get the repository with the specified name under the specified namespace
	GetRepository(name string, namespace string) models.Repository

	// Get all the tags of the specified repository under the namespace
	GetTags(repositoryName string, namespace string) []models.Tag

	// Get the tag with the specified name of the repository under the namespace
	GetTag(name string, repositoryName string, namespace string) models.Tag
}

Adaptor defines the unified operations for all the supported registries such as Harbor or DockerHub. It's used to adapt the different interfaces provied by the different registry providers. Use external registry with restful api providing as example, these intrefaces may depends on the related restful apis like:

/api/vx/repositories/{namespace}/{repositoryName}/tags/{name}
/api/v0/accounts/{namespace}

type HarborAdaptor

type HarborAdaptor struct{}

HarborAdaptor is defined to adapt the Harbor registry

func (*HarborAdaptor) GetNamespace

func (ha *HarborAdaptor) GetNamespace(name string) models.Namespace

GetNamespace is used to get the namespace with the specified name

func (*HarborAdaptor) GetNamespaces

func (ha *HarborAdaptor) GetNamespaces() []models.Namespace

GetNamespaces is ued to get all the namespaces

func (*HarborAdaptor) GetRepositories

func (ha *HarborAdaptor) GetRepositories(namespace string) []models.Repository

GetRepositories is used to get all the repositories under the specified namespace

func (*HarborAdaptor) GetRepository

func (ha *HarborAdaptor) GetRepository(name string, namespace string) models.Repository

GetRepository is used to get the repository with the specified name under the specified namespace

func (*HarborAdaptor) GetTag

func (ha *HarborAdaptor) GetTag(name string, repositoryName string, namespace string) models.Tag

GetTag is used to get the tag with the specified name of the repository under the namespace

func (*HarborAdaptor) GetTags

func (ha *HarborAdaptor) GetTags(repositoryName string, namespace string) []models.Tag

GetTags is used to get all the tags of the specified repository under the namespace

func (*HarborAdaptor) Kind

func (ha *HarborAdaptor) Kind() string

Kind returns the unique kind identifier of the adaptor

Jump to

Keyboard shortcuts

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