amazon

package
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: Feb 21, 2016 License: MIT Imports: 10 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Amazon

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

func New

func New() (amazon *Amazon)

create aws session with credentials

func (*Amazon) Delete

func (a *Amazon) Delete(key string) (err error)

Delete a file from S3

func (*Amazon) Execute

func (a *Amazon) Execute(data LambdaThumbnail) (width, height int, err error)

posts to our api endpoint

func (*Amazon) Save

func (a *Amazon) Save(filepath, filename, mime string, expire bool) (err error)

Upload a file to S3

type LambdaResponse

type LambdaResponse struct {
	Success string `json:"successMessage"`
	Error   string `json:"errorMessage"`
	Width   int    `json:"thumbWidth"`
	Height  int    `json:"thumbHeight"`
}

the format of the lambda context response

type LambdaThumbnail

type LambdaThumbnail struct {
	Bucket    string `json:"bucket"`
	Filename  string `json:"filename"`
	Thumbnail string `json:"thumbnail"`
	MaxWidth  int    `json:"max_width"`
	MaxHeight int    `json:"max_height"`
}

the format for the lambda thumbnail

Jump to

Keyboard shortcuts

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