rainbond: github.com/goodrain/rainbond/builder/sources/registry Index | Files

package registry

import "github.com/goodrain/rainbond/builder/sources/registry"


Package Files

authchallenge.go basictransport.go errortransport.go json.go manifest.go registry.go repostories.go tag.go tokentransport.go


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

func Log Uses

func Log(format string, args ...interface{})

Log print log

* Pass log messages along to Go's "log" module.

func Quiet Uses

func Quiet(format string, args ...interface{})

Quiet Quiet

* Discard log messages silently.

func WrapTransport Uses

func WrapTransport(transport http.RoundTripper, url, username, password string) http.RoundTripper

* Given an existing http.RoundTripper such as http.DefaultTransport, build the * transport stack necessary to authenticate to the Docker registry API. This * adds in support for OAuth bearer tokens and HTTP Basic auth, and sets up * error handling this library relies on.

type AuthorizationChallenge Uses

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

AuthorizationChallenge carries information from a WWW-Authenticate response header.

type BasicTransport Uses

type BasicTransport struct {
    Transport http.RoundTripper
    URL       string
    Username  string
    Password  string

func (*BasicTransport) RoundTrip Uses

func (t *BasicTransport) RoundTrip(req *http.Request) (*http.Response, error)

type ErrorTransport Uses

type ErrorTransport struct {
    Transport http.RoundTripper

func (*ErrorTransport) RoundTrip Uses

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

type HttpStatusError Uses

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 Uses

func (err *HttpStatusError) Error() string

type LogfCallback Uses

type LogfCallback func(format string, args ...interface{})

LogfCallback LogfCallback

type Registry Uses

type Registry struct {
    URL    string
    Client *http.Client
    Logf   LogfCallback

Registry the client for image repostory

func New Uses

func New(registryURL, username, password string) (*Registry, error)

New new ssl registry client

* Create a new Registry with the given URL and credentials, then Ping()s it
* before returning it to verify that the registry is available.
* You can, alternately, construct a Registry manually by populating the fields.
* This passes http.DefaultTransport to WrapTransport when creating the
* http.Client.

func NewInsecure Uses

func NewInsecure(registryURL, username, password string) (*Registry, error)

NewInsecure new insecure skip verify tls client

* Create a new Registry, as with New, using an http.Transport that disables
* SSL certificate verification.

func (*Registry) DeleteManifest Uses

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

func (*Registry) Manifest Uses

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

func (*Registry) ManifestDigest Uses

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

func (*Registry) ManifestV2 Uses

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

func (*Registry) Ping Uses

func (r *Registry) Ping() error

Ping ping regsstry server

func (*Registry) PutManifest Uses

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

func (*Registry) Repositories Uses

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

func (*Registry) Tags Uses

func (registry *Registry) Tags(repository string) (tags []string, err error)

type TokenTransport Uses

type TokenTransport struct {
    Transport http.RoundTripper
    Username  string
    Password  string

func (*TokenTransport) RoundTrip Uses

func (t *TokenTransport) RoundTrip(req *http.Request) (*http.Response, error)

Package registry imports 14 packages (graph) and is imported by 2 packages. Updated 2018-09-15. Refresh now. Tools for package owners.