fetch

package
Version: v0.0.0-...-9af0977 Latest Latest
Warning

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

Go to latest
Published: Jan 26, 2016 License: MIT Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetRotatedImage

func GetRotatedImage(src io.Reader) (image.Image, string, error)

func ImageData

func ImageData(storage store.ImageStore, gc groupcache.Context) ([]byte, error)

func PickResizer

func PickResizer(src io.Reader, c *CacheContext) (io.Reader, error)

func Resize

func Resize(src io.Reader, c *CacheContext) (io.Reader, error)

func ResizeGif

func ResizeGif(src io.Reader, c *CacheContext) (io.Reader, error)

Types

type CacheContext

type CacheContext struct {
	ImageId string
	Bucket  string
	Width   int
	Crop    bool
}

func RequestContext

func RequestContext(r *http.Request) *CacheContext

func (*CacheContext) CacheKey

func (c *CacheContext) CacheKey() string

func (*CacheContext) ReadModified

func (c *CacheContext) ReadModified(s store.ImageStore) (io.ReadCloser, error)

func (*CacheContext) ReadOriginal

func (c *CacheContext) ReadOriginal(s store.ImageStore) (io.ReadCloser, error)

func (*CacheContext) WriteModified

func (c *CacheContext) WriteModified(buf []byte, s store.ImageStore) error

Jump to

Keyboard shortcuts

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