imagestore

package
v0.0.0-...-9537a75 Latest Latest
Warning

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

Go to latest
Published: Mar 19, 2015 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type GCSImageStore

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

func NewGCSImageStore

func NewGCSImageStore(ctx context.Context, bucket string, root string, mapper *NamePathMapper) *GCSImageStore

func (*GCSImageStore) Exists

func (this *GCSImageStore) Exists(obj *StoreObject) (bool, error)

func (*GCSImageStore) Save

func (this *GCSImageStore) Save(src string, obj *StoreObject) (*StoreObject, error)

type ImageStore

type ImageStore interface {
	Save(src string, obj *StoreObject) (*StoreObject, error)
	Exists(obj *StoreObject) (bool, error)
}

type ImageStores

type ImageStores []ImageStore

func (*ImageStores) Exists

func (this *ImageStores) Exists(obj *StoreObject) (bool, error)

func (*ImageStores) Save

func (this *ImageStores) Save(src string, obj *StoreObject)

type LocalImageStore

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

func NewLocalImageStore

func NewLocalImageStore(root string, mapper *NamePathMapper) *LocalImageStore

func (*LocalImageStore) Exists

func (this *LocalImageStore) Exists(obj *StoreObject) (bool, error)

func (*LocalImageStore) Save

func (this *LocalImageStore) Save(src string, obj *StoreObject) (*StoreObject, error)

type NamePathMapper

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

func NewNamePathMapper

func NewNamePathMapper(expr string, mapping string) *NamePathMapper

type S3ImageStore

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

func NewS3ImageStore

func NewS3ImageStore(bucket string, root string, client *s3.S3, mapper *NamePathMapper) *S3ImageStore

func (*S3ImageStore) Exists

func (this *S3ImageStore) Exists(obj *StoreObject) (bool, error)

func (*S3ImageStore) Save

func (this *S3ImageStore) Save(src string, obj *StoreObject) (*StoreObject, error)

type StoreObject

type StoreObject struct {
	Name     string // Unique identifier
	MimeType string // i.e. image/jpg
	Type     string // i.e. thumb
	Url      string // if publicly available
}

Jump to

Keyboard shortcuts

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