images

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Oct 25, 2016 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Thumbnail

func Thumbnail(img image.Image, maxWidth, maxHeight int) *image.NRGBA

Types

type InMemoryStore

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

func NewInMemoryStore

func NewInMemoryStore() *InMemoryStore

func (*InMemoryStore) Get

func (store *InMemoryStore) Get(key string) image.Image

func (*InMemoryStore) Put

func (store *InMemoryStore) Put(key string, img image.Image) (url string, err error)

type S3Store

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

func NewS3Store

func NewS3Store(host, port, accessKey, accessSecret, publicUrl string) *S3Store

func (*S3Store) Get

func (store *S3Store) Get(key string) (img image.Image)

func (*S3Store) Put

func (store *S3Store) Put(key string, img image.Image) (url string, err error)

type Store

type Store interface {
	Put(key string, img image.Image) (url string, err error)
	Get(key string) (img image.Image)
	// contains filtered or unexported methods
}

Jump to

Keyboard shortcuts

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