Documentation ¶
Index ¶
- Constants
- Variables
- type AuthorizationChallenge
- type BasicTransport
- type ErrorTransport
- type HttpStatusError
- type ManifestInfo
- type ManifestRequestType
- type Registry
- func (registry *Registry) DownloadLayer(ctx context.Context, repository string, digest digest.Digest) (io.ReadCloser, int64, error)
- func (r *Registry) FetchTagsPaginated(url, repository string) ([]string, error)
- func (registry *Registry) HasLayer(repository string, digest digest.Digest) (bool, error)
- func (r *Registry) ImageConfigSpecV1(ctx context.Context, repository string, reference digest.Digest) (*ManifestInfo, error)
- func (registry *Registry) LayerMetadata(repository string, digest digest.Digest) (distribution.Descriptor, error)
- func (r *Registry) Manifest(ctx context.Context, repository, reference string) (*ManifestInfo, error)
- func (r *Registry) ManifestRequest(ctx context.Context, repository, reference string, schema int, ...) (string, []byte, error)
- func (r *Registry) ManifestV2(ctx context.Context, repository, reference string) (*manifestV2.DeserializedManifest, string, error)
- func (r *Registry) Ping() (uint, error)
- func (r *Registry) Repositories() ([]string, error)
- func (r *Registry) Search(term string, limit int) ([]string, error)
- func (r *Registry) Tags(repository string) ([]string, error)
- func (registry *Registry) UploadLayer(repository string, digest digest.Digest, content io.Reader) error
- type TokenTransport
Constants ¶
View Source
const ( MediaTypeOCIManifest = "application/vnd.oci.image.manifest.v1+json" MediaTypeOCIIndex = "application/vnd.oci.image.index.v1+json" MediaTypeOCIImageConfig = "application/vnd.oci.image.config.v1+json" MediaTypeContainerImage = "application/vnd.docker.container.image.v1+json" MediaTypeOCIMissingManifest = "Accept header does not support OCI manifests" MediaTypeOCIMissingIndex = "Accept header does not support OCI indexes" )
View Source
const ( ErrorNone uint = iota ErrorCertificate ErrorAuthentication ErrorUrl ErrorUnknown )
Variables ¶
View Source
var (
ErrNoMorePages = errors.New("No more pages")
)
Functions ¶
This section is empty.
Types ¶
type AuthorizationChallenge ¶
AuthorizationChallenge carries information from a WWW-Authenticate response header.
type BasicTransport ¶
type BasicTransport struct { Transport http.RoundTripper URL string Username string Password string }
type ErrorTransport ¶
type ErrorTransport struct {
Transport http.RoundTripper
}
type HttpStatusError ¶
type HttpStatusError struct { Response *http.Response Body []byte // Copied from `Response.Body` to avoid problems with unclosed bodies later. Nobody calls `err.Response.Body.Close()`, ever. }
func (*HttpStatusError) Error ¶
func (err *HttpStatusError) Error() string
type ManifestInfo ¶
type ManifestRequestType ¶
type ManifestRequestType int
const ( ManifestRequest_Default ManifestRequestType = iota ManifestRequest_CosignSignature )
type Registry ¶
type Registry struct { URL string Client *httptrace.TraceClient }
func New ¶
func New(registryUrl, token, username, password, proxy string, trace httptrace.HTTPTrace) (*Registry, uint, error)
* Create a new Registry
func (*Registry) DownloadLayer ¶
func (*Registry) FetchTagsPaginated ¶
func (*Registry) ImageConfigSpecV1 ¶
func (*Registry) LayerMetadata ¶
func (registry *Registry) LayerMetadata(repository string, digest digest.Digest) (distribution.Descriptor, error)
func (*Registry) ManifestRequest ¶
func (*Registry) ManifestV2 ¶
func (r *Registry) ManifestV2(ctx context.Context, repository, reference string) (*manifestV2.DeserializedManifest, string, error)
func (*Registry) Repositories ¶
type TokenTransport ¶
type TokenTransport struct { Transport http.RoundTripper Username string Password string Token string }
Click to show internal directories.
Click to hide internal directories.