store

package
v0.0.0-...-1974f2b Latest Latest
Warning

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

Go to latest
Published: May 22, 2016 License: MIT Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DefaultMigrationSource

func DefaultMigrationSource() migrate.MigrationSource

Types

type DateOrderer

type DateOrderer struct {
	Filter    Filter
	Direction Direction
}

func (DateOrderer) Condition

func (f DateOrderer) Condition() string

func (DateOrderer) Values

func (f DateOrderer) Values() valueSlice

type Direction

type Direction bool
const (
	Ascending  Direction = true
	Descending           = false
)

type ExactIdFilter

type ExactIdFilter struct {
	Id string
}

func (ExactIdFilter) Condition

func (f ExactIdFilter) Condition() string

func (ExactIdFilter) Values

func (f ExactIdFilter) Values() valueSlice

type ExportFormat

type ExportFormat struct {
	Creator string
	Images  []ExportedImage
}

type ExportedImage

type ExportedImage struct {
	Id      string
	Url     string
	Tags    []string
	AddedAt string
}

func ParseMetadata

func ParseMetadata(reader io.Reader) ([]ExportedImage, error)

type Filter

type Filter interface {
	Condition() string
	Values() valueSlice
}

type IdOrTagFilter

type IdOrTagFilter struct {
	Id string
}

func (IdOrTagFilter) Condition

func (f IdOrTagFilter) Condition() string

func (IdOrTagFilter) Values

func (f IdOrTagFilter) Values() valueSlice

type Limiter

type Limiter struct {
	Filter Filter
	Limit  int
}

func (Limiter) Condition

func (f Limiter) Condition() string

func (Limiter) Values

func (f Limiter) Values() valueSlice

type LocalFilter

type LocalFilter struct {
	Filter Filter
}

func (LocalFilter) Condition

func (f LocalFilter) Condition() string

func (LocalFilter) Values

func (f LocalFilter) Values() valueSlice

type NullFilter

type NullFilter struct{}

func (NullFilter) Condition

func (f NullFilter) Condition() string

func (NullFilter) Values

func (f NullFilter) Values() valueSlice

type RandomOrderer

type RandomOrderer struct {
	Filter Filter
}

func (RandomOrderer) Condition

func (f RandomOrderer) Condition() string

func (RandomOrderer) Values

func (f RandomOrderer) Values() valueSlice

type RemoteFilter

type RemoteFilter struct {
	Filter Filter
}

func (RemoteFilter) Condition

func (f RemoteFilter) Condition() string

func (RemoteFilter) Values

func (f RemoteFilter) Values() valueSlice

type Store

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

func Default

func Default() (*Store, error)

func New

func New(path string) (*Store, error)

func (*Store) Add

func (store *Store) Add(image *Image) error

func (*Store) Close

func (store *Store) Close() error

func (*Store) Contains

func (store *Store) Contains(image *Image) bool

func (*Store) Export

func (s *Store) Export(writer io.Writer, filter Filter, exportFiles bool) error

func (*Store) Find

func (store *Store) Find(filter Filter) (image *Image, err error)

func (*Store) Get

func (store *Store) Get(imageId string) (*Image, error)

func (*Store) Hydrate

func (s *Store) Hydrate(img *Image) (err error)

func (*Store) Implode

func (s *Store) Implode() (err error)

func (*Store) ImportMetadata

func (s *Store) ImportMetadata(images []ExportedImage) (err error)

func (*Store) List

func (store *Store) List(filter Filter) (result []Image, err error)

func (*Store) ListTags

func (store *Store) ListTags(filter Filter) (result []TagInformation, err error)

func (*Store) Migrate

func (s *Store) Migrate(migrationSource migrate.MigrationSource) (err error)

func (*Store) PathFor

func (store *Store) PathFor(image *Image) string

func (*Store) Prepare

func (s *Store) Prepare(migrationSource migrate.MigrationSource) (err error)

func (*Store) Recreate

func (s *Store) Recreate(migrations migrate.MigrationSource) error

func (*Store) Remove

func (s *Store) Remove(image *Image) error

func (*Store) RemoveAll

func (s *Store) RemoveAll(images []Image) (err error)

func (*Store) ShouldMigrate

func (s *Store) ShouldMigrate(migrations migrate.MigrationSource) (bool, error)

func (*Store) ShouldRecreate

func (s *Store) ShouldRecreate(migrations migrate.MigrationSource) (bool, error)

func (*Store) UpdateTags

func (store *Store) UpdateTags(image *Image, tags []string) error

func (*Store) UpdateUrl

func (store *Store) UpdateUrl(image *Image, url string) error

func (*Store) WriteImage

func (s *Store) WriteImage(img *Image) error

type TagFilter

type TagFilter struct {
	Tag string
}

func (TagFilter) Condition

func (f TagFilter) Condition() string

func (TagFilter) Values

func (f TagFilter) Values() valueSlice

type TagInformation

type TagInformation struct {
	Tag   string
	Count int64
}

type TagPrefixFilter

type TagPrefixFilter struct {
	Prefix string
}

func (TagPrefixFilter) Condition

func (f TagPrefixFilter) Condition() string

func (TagPrefixFilter) Values

func (f TagPrefixFilter) Values() valueSlice

type UntaggedFilter

type UntaggedFilter struct{}

func (UntaggedFilter) Condition

func (f UntaggedFilter) Condition() string

func (UntaggedFilter) Values

func (f UntaggedFilter) Values() valueSlice

type UrlFilter

type UrlFilter struct {
	Url string
}

func (UrlFilter) Condition

func (f UrlFilter) Condition() string

func (UrlFilter) Values

func (f UrlFilter) Values() valueSlice

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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