provider

package
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: Jul 26, 2019 License: MIT Imports: 9 Imported by: 0

Documentation

Overview

Package provider implements specific providers for different Docker container registries.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DockerProvider

type DockerProvider struct {
	// contains filtered or unexported fields
}

DockerProvider authenticates clients against the Docker Hub

func (*DockerProvider) GetClient

func (p *DockerProvider) GetClient(url image.URL, auth string) (*http.Client, error)

GetClient returns a client authenticated with the Docker Hub. Currently there's no support for private repositories and 'auth' is ignored. Note also that the token given by Docker Hub expires after 5 minutes - renewal logic has not been implemented yet.

func (*DockerProvider) Supports

func (p *DockerProvider) Supports(url image.URL) bool

Supports returns true if the URLs host is one of the google cloud registry hosts

type GCRProvider

type GCRProvider struct {
	// contains filtered or unexported fields
}

GCRProvider authenticates clients against the Google Cloud Registry

func (*GCRProvider) GetClient

func (p *GCRProvider) GetClient(url image.URL, auth string) (*http.Client, error)

GetClient returns a client authenticated with the Google Cloud Registry - the auth string is supposed to be the path to a service account json file the required scope is limit to https://www.googleapis.com/auth/devstorage.read_only

func (*GCRProvider) Supports

func (p *GCRProvider) Supports(url image.URL) bool

Supports returns true if the URLs host is one of the google cloud registry hosts

Jump to

Keyboard shortcuts

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