store

package
v1.0.0 Latest Latest
Warning

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

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

Documentation

Overview

Package store impolements a credential store that is capable of storing both plain Docker credentials as well as GCR access and refresh tokens.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type GCRAuth

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

A GCRAuth provides access to tokens from a prior login.

func (*GCRAuth) TokenSource

func (a *GCRAuth) TokenSource(ctx context.Context) oauth2.TokenSource

TokenSource returns an oauth2.TokenSource that retrieve tokens from GCR credentials using the provided context. It will returns the current access token stored in the credentials, and refresh it when it expires, but it won't update the credentials with the new access token.

type GCRCredStore

type GCRCredStore interface {
	GetGCRAuth() (*GCRAuth, error)
	SetGCRAuth(tok *oauth2.Token) error
	DeleteGCRAuth() error

	GetOtherCreds(string) (*credentials.Credentials, error)
	SetOtherCreds(*credentials.Credentials) error
	DeleteOtherCreds(string) error
	AllThirdPartyCreds() (map[string]credentials.Credentials, error)
}

GCRCredStore describes the interface for a store capable of storing both GCR's credentials (OAuth2 access/refresh tokens) as well as generic Docker credentials.

func NewGCRCredStore

func NewGCRCredStore() (GCRCredStore, error)

NewGCRCredStore returns a GCRCredStore which is backed by a file.

Jump to

Keyboard shortcuts

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