Documentation ¶
Index ¶
- type Factory
- func (this *Factory) NewGCSImageStore(conf map[string]string) ImageStore
- func (this *Factory) NewHashGenerator(store ImageStore) *HashGenerator
- func (this *Factory) NewImageStores() []ImageStore
- func (this *Factory) NewLocalImageStore(conf map[string]string) ImageStore
- func (this *Factory) NewS3ImageStore(conf map[string]string) ImageStore
- func (this *Factory) NewStoreObject(name string, mime string, imgType string) *StoreObject
- type GCSImageStore
- type HashGenerator
- type ImageStore
- type ImageStores
- type LocalImageStore
- type NamePathMapper
- type S3ImageStore
- type StoreObject
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Factory ¶
type Factory struct {
// contains filtered or unexported fields
}
func NewFactory ¶
func NewFactory(conf *config.Configuration) *Factory
func (*Factory) NewGCSImageStore ¶
func (this *Factory) NewGCSImageStore(conf map[string]string) ImageStore
func (*Factory) NewHashGenerator ¶
func (this *Factory) NewHashGenerator(store ImageStore) *HashGenerator
func (*Factory) NewImageStores ¶
func (this *Factory) NewImageStores() []ImageStore
func (*Factory) NewLocalImageStore ¶
func (this *Factory) NewLocalImageStore(conf map[string]string) ImageStore
func (*Factory) NewS3ImageStore ¶
func (this *Factory) NewS3ImageStore(conf map[string]string) ImageStore
func (*Factory) NewStoreObject ¶
func (this *Factory) NewStoreObject(name string, mime string, imgType string) *StoreObject
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 HashGenerator ¶
type HashGenerator struct {
// contains filtered or unexported fields
}
func (*HashGenerator) Get ¶
func (this *HashGenerator) Get() string
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)
Click to show internal directories.
Click to hide internal directories.