Documentation ¶
Index ¶
- type Adaptor
- type HarborAdaptor
- func (ha *HarborAdaptor) GetNamespace(name string) models.Namespace
- func (ha *HarborAdaptor) GetNamespaces() []models.Namespace
- func (ha *HarborAdaptor) GetRepositories(namespace string) []models.Repository
- func (ha *HarborAdaptor) GetRepository(name string, namespace string) models.Repository
- func (ha *HarborAdaptor) GetTag(name string, repositoryName string, namespace string) models.Tag
- func (ha *HarborAdaptor) GetTags(repositoryName string, namespace string) []models.Tag
- func (ha *HarborAdaptor) Kind() string
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 ¶
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