v2

package
v0.0.0-...-6e26e36 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrNoMorePages = errors.New("No more pages")
)

Functions

func Authtokenmap

func Authtokenmap() *authtokenmap

Types

type APIToken

type APIToken struct {
	// Token   authToken
	Created time.Time
	Expires time.Time

	Token     string  `json:"token"`
	ExpiresIn float64 `json:"expires_in"`
	// contains filtered or unexported fields
}

func (*APIToken) IsExpired

func (token *APIToken) IsExpired() bool

type AuthorizationChallenge

type AuthorizationChallenge struct {
	Scheme     string
	Parameters map[string]string
}

AuthorizationChallenge carries information from a WWW-Authenticate response header.

type ErrorTransport

type ErrorTransport struct {
	Transport http.RoundTripper
}

func (*ErrorTransport) RoundTrip

func (t *ErrorTransport) RoundTrip(request *http.Request) (*http.Response, error)

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 Result

type Result struct {
	Name string
}

type V2registry

type V2registry struct {
	Hostname string
	Org      string
	Username string
	Password string
	Print    util.PrintCallback
	Client   *http.Client
}

func New

func New(url, org, username, password string) (*V2registry, error)

func (*V2registry) DeleteManifest

func (registry *V2registry) DeleteManifest(repository string, digest digest.Digest) error

func (*V2registry) DownloadLayer

func (registry *V2registry) DownloadLayer(repository string, digest digest.Digest) (io.ReadCloser, error)

func (*V2registry) GetImageManifest

func (v2 *V2registry) GetImageManifest(repoName, tag string) (string, error)

func (*V2registry) GetOrCreateToken

func (registry *V2registry) GetOrCreateToken(org string, urlstring string) (APIToken, error)

func (*V2registry) HasLayer

func (registry *V2registry) HasLayer(repository string, digest digest.Digest) (bool, error)

func (*V2registry) Images

func (v2 *V2registry) Images() ([]string, error)

func (*V2registry) ImagesWithManifests

func (v2 *V2registry) ImagesWithManifests() ([]objects.Image, error)

func (*V2registry) LayerMetadata

func (registry *V2registry) LayerMetadata(repository string, digest digest.Digest) (distribution.Descriptor, error)

func (*V2registry) Manifest

func (registry *V2registry) Manifest(repository, reference string) (*manifestV1.SignedManifest, error)

func (*V2registry) ManifestDigest

func (registry *V2registry) ManifestDigest(repository, reference string) (digest.Digest, error)

func (*V2registry) ManifestV2

func (registry *V2registry) ManifestV2(repository, reference string) (*manifestV2.DeserializedManifest, error)

func (*V2registry) Name

func (v2 *V2registry) Name() string

func (*V2registry) Ping

func (v2 *V2registry) Ping() error

func (*V2registry) PutManifest

func (registry *V2registry) PutManifest(repository, reference string, signedManifest *manifestV1.SignedManifest) error

func (*V2registry) RenewToken

func (registry *V2registry) RenewToken(token APIToken) (APIToken, error)

func (*V2registry) Repositories

func (registry *V2registry) Repositories() ([]string, error)

func (*V2registry) Tags

func (v2 *V2registry) Tags(repository string) ([]string, error)

func (*V2registry) UploadLayer

func (registry *V2registry) UploadLayer(repository string, digest digest.Digest, content io.Reader) error

func (*V2registry) UserRepositories

func (registry *V2registry) UserRepositories(user string) ([]string, error)

Jump to

Keyboard shortcuts

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