Help us shape the future of Go! Take the 2026 Go Developer Survey

datastore

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Aug 30, 2018 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var MultipleMatchErr = errors.New("multiple matches found")
View Source
var NoMatchErr = errors.New("no match found")
View Source
var UnsupportedOperationErr = errors.New("unsupported operation")

Functions

func ArtifactLoader

func ArtifactLoader(index Index) (stemcellversion.Artifact, error)

func GetArtifact

func GetArtifact(index Index, f FilterParams) (stemcellversion.Artifact, error)

Types

type Factory

type Factory interface {
	Create(provider ProviderName, name string, options map[string]interface{}) (Index, error)
}

type FilterParams

type FilterParams struct {
	OSExpected bool
	OS         string

	VersionExpected   bool
	Version           string
	VersionConstraint *semver.Constraints

	IaaSExpected bool
	IaaS         string

	HypervisorExpected bool
	Hypervisor         string

	DiskFormatExpected bool
	DiskFormat         string

	FlavorExpected bool
	Flavor         string

	LabelsExpected bool // TODO unnecessary? implied by len > 0
	Labels         []string
}

func FilterParamsFromArtifact

func FilterParamsFromArtifact(artifact stemcellversion.Artifact) FilterParams

func FilterParamsFromMap

func FilterParamsFromMap(args map[string]interface{}) (FilterParams, error)

func FilterParamsFromReference

func FilterParamsFromReference(ref stemcellversion.Reference) FilterParams

func FilterParamsFromSlug

func FilterParamsFromSlug(slug string) FilterParams

func (*FilterParams) DiskFormatSatisfied

func (f *FilterParams) DiskFormatSatisfied(actual string) bool

func (*FilterParams) FlavorSatisfied

func (f *FilterParams) FlavorSatisfied(actual string) bool

func (*FilterParams) HypervisorSatisfied

func (f *FilterParams) HypervisorSatisfied(actual string) bool

func (*FilterParams) IaaSSatisfied

func (f *FilterParams) IaaSSatisfied(actual string) bool

func (*FilterParams) LabelsSatisfied

func (f *FilterParams) LabelsSatisfied(actuals []string) bool

func (*FilterParams) OSSatisfied

func (f *FilterParams) OSSatisfied(actual string) bool

func (*FilterParams) VersionSatisfied

func (f *FilterParams) VersionSatisfied(actual string) bool

type Index

type Index interface {
	GetName() string
	GetArtifacts(f FilterParams) ([]stemcellversion.Artifact, error)
	FlushCache() error
}

type NamedGetter

type NamedGetter func(name string) (Index, error)

type ProviderName

type ProviderName string

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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