Documentation ¶
Overview ¶
Package s3 provides a imageserver.Server implementation that gets the Image from an S3 URL.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewS3Server ¶
func NewS3Server(awsRegion, awsAccessKey, awsSecretKey, awsS3Bucket string) (imageserver.Server, error)
NewS3Server takes AWS Region, AccessKey, SecretKey, and S3 Bucket name, and returns a Server or an error.
If the values for Region, AccessKey, or SecretKey are not provided they are read from the well-known environment variable names they are typically stored.
Types ¶
type Server ¶
Server is a imageserver.Server implementation that gets the Image from an S3 URL.
It parses the "source" param as a bucket-relative URL, then does a HEAD followed by a GET request for the item. It returns an error if there are any problems.
func (*Server) Get ¶
func (srv *Server) Get(params imageserver.Params) (*imageserver.Image, error)
Get implements imageserver.Server.
Click to show internal directories.
Click to hide internal directories.