Documentation
¶
Overview ¶
Package data provides common shared data structures for imageproxy.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Image ¶
type Image struct {
// URL of original remote image.
URL string
// Expires is the cache expiration time for the original image, as
// returned by the remote server.
Expires time.Time
// Etag returned from server when fetching image.
Etag string
// Bytes contains the actual image.
Bytes []byte
}
Image represents a remote image that is being proxied. It tracks where the image was originally retrieved from and how long the image can be cached.
type Options ¶
type Options struct {
Width float64 // requested width, in pixels
Height float64 // requested height, in pixels
// If true, resize the image to fit in the specified dimensions. Image
// will not be cropped, and aspect ratio will be maintained.
Fit bool
// Rotate image the specified degrees counter-clockwise. Valid values are 90, 180, 270.
Rotate int
FlipVertical bool
FlipHorizontal bool
}
Options specifies transformations that can be performed on a requested image.
func ParseOptions ¶
Click to show internal directories.
Click to hide internal directories.