gcr

package
v0.0.0-...-ca671ec Latest Latest
Warning

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

Go to latest
Published: Jun 30, 2016 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Overview

Package gcr implements revision control of deployment targets on top of Docker images stored in Google Container Registry.

TODO(yugui) Generalize this package to support arbitrary docker registries, DockerHub in particular.

Index

Constants

View Source
const (
	// Scope is the OAuth2 scope necessary to access to Google Container Registry.
	// See also https://cloud.google.com/storage/docs/authentication#oauth
	Scope = "https://www.googleapis.com/auth/devstorage.read_only"
)

Variables

This section is empty.

Functions

func Initialize

func Initialize(ts oauth2.TokenSource)

Initialize initializes the package with a TokenSource to access to Google Container Registry TODO(yugui) Behave on behalf of the current user instead of service account.

func New

func New(srcCtl revision.SourceControl, dcl *docker.Client, ssh ssh.SSH) revision.Control

New returns a new revision.Control which accesses to revisions of Docker images.

Types

type Name

type Name struct {
	// Registry is an optional registry part of the name.
	Registry string
	// NS is an optional namespace of the name.
	NS string
	// Name is the repository name
	Repo string
	// Tag is an optional tag of the name
	Tag string
}

A Name is a name of a docker image.

func (Name) RepoFullName

func (n Name) RepoFullName() string

func (Name) RepoWithNS

func (n Name) RepoWithNS() string

RepoWithNS returns a namespace-prefixed form of the name. It does not contain registry.

func (Name) String

func (n Name) String() string

Jump to

Keyboard shortcuts

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