defaultregistry

package
v0.0.15 Latest Latest
Warning

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

Go to latest
Published: Feb 23, 2023 License: Apache-2.0 Imports: 20 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewRegistry

func NewRegistry(auth *authn.AuthConfig, registry *name.Registry, registryCfg *common.RegistryOptions) (interfaces.IRegistry, error)

Types

type CatalogV2Response

type CatalogV2Response struct {
	Repositories []string `json:"repositories"`
}

type DefaultRegistry

type DefaultRegistry struct {
	Registry   *name.Registry
	Auth       *authn.AuthConfig
	Cfg        *common.RegistryOptions
	This       interfaces.IRegistry
	HTTPClient *http.Client
}

this is just a wrapper around the go-container & remote catalog

func (*DefaultRegistry) Catalog

func (reg *DefaultRegistry) Catalog(ctx context.Context, pagination common.PaginationOption, options common.CatalogOption, authenticator authn.Authenticator) ([]string, *common.PaginationOption, error)

this is the default catalog implementation uses remote(for now)

func (*DefaultRegistry) CatalogPage

func (reg *DefaultRegistry) CatalogPage(ctx context.Context, pagination common.PaginationOption, options common.CatalogOption, authenticator authn.Authenticator) ([]string, *common.PaginationOption, error)

func (*DefaultRegistry) GetAuth

func (reg *DefaultRegistry) GetAuth() *authn.AuthConfig

func (*DefaultRegistry) GetLatestTags

func (reg *DefaultRegistry) GetLatestTags(repoName string, depth int, options ...remote.Option) ([]string, error)

GetLatestTags returns the latest tags for a given repository in descending order by the image creation time multiple tags on a single image will be sent as a comma separated string e.g ["latest,v3" ,"v2", "v1"]

func (*DefaultRegistry) GetMaxPageSize

func (reg *DefaultRegistry) GetMaxPageSize() int

func (*DefaultRegistry) GetRegistry

func (reg *DefaultRegistry) GetRegistry() *name.Registry

func (*DefaultRegistry) GetURL

func (reg *DefaultRegistry) GetURL(urlSuffix string) *url.URL

func (*DefaultRegistry) GetV2Token

func (reg *DefaultRegistry) GetV2Token(client *http.Client, url string) (*common.V2TokenResponse, error)

func (*DefaultRegistry) List

func (reg *DefaultRegistry) List(repoName string, pagination common.PaginationOption, options ...remote.Option) ([]string, *common.PaginationOption, error)

Jump to

Keyboard shortcuts

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