store

package
v0.8.0 Latest Latest
Warning

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

Go to latest
Published: Jun 11, 2019 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// AppConfigDirectory is the Docker App directory name inside Docker config directory
	AppConfigDirectory = "app"
	// BundleStoreDirectory is the bundle store directory name
	BundleStoreDirectory = "bundles"
	// CredentialStoreDirectory is the credential store directory name
	CredentialStoreDirectory = "credentials"
	// InstallationStoreDirectory is the installations store directory name
	InstallationStoreDirectory = "installations"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type ApplicationStore

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

ApplicationStore is the main point to access different stores: - Bundle store persists all bundles built or fetched locally - Credential store persists all the credentials, per context basis - Installation store persists all the installations, per context basis

func NewApplicationStore

func NewApplicationStore(configDir string) (*ApplicationStore, error)

NewApplicationStore creates a new application store, nested inside a docker configuration directory. It will create all the directory hierarchy if anything is missing.

func (ApplicationStore) BundleStore

func (a ApplicationStore) BundleStore() (BundleStore, error)

BundleStore initializes and returns a bundle store

func (ApplicationStore) CredentialStore

func (a ApplicationStore) CredentialStore(context string) (CredentialStore, error)

CredentialStore initializes and returns a context based credential store

func (ApplicationStore) InstallationStore

func (a ApplicationStore) InstallationStore(context string) (InstallationStore, error)

InstallationStore initializes and returns a context based installation store

type BundleStore

type BundleStore interface {
	Store(ref reference.Named, bndle *bundle.Bundle) error
	Read(ref reference.Named) (*bundle.Bundle, error)

	LookupOrPullBundle(ref reference.Named, pullRef bool, config *configfile.ConfigFile, insecureRegistries []string) (*bundle.Bundle, error)
}

type CredentialStore

type CredentialStore interface {
	Store(creds *credentials.CredentialSet) error
	Read(credentialSetName string) (*credentials.CredentialSet, error)
}

CredentialStore persists credential sets to a specific path.

type Installation

type Installation struct {
	claim.Claim
	Reference string `json:"reference,omitempty"`
}

Installation is a CNAB claim with an information of where the bundle comes from. It persists the result of an installation and its parameters and context.

func NewInstallation

func NewInstallation(name string, reference string) (*Installation, error)

type InstallationStore

type InstallationStore interface {
	List() ([]string, error)
	Store(installation *Installation) error
	Read(installationName string) (*Installation, error)
	Delete(installationName string) error
}

InstallationStore is an interface to persist, delete, list and read installations.

Jump to

Keyboard shortcuts

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