Documentation
¶
Index ¶
- func HandleDimsStatus(config core.Config, w http.ResponseWriter, r *http.Request)
- func Handler(request RequestContext) error
- type Headers
- type Request
- func (r *Request) Commands() []commands.Command
- func (r *Request) Config() core.Config
- func (r *Request) FetchImage(timeout time.Duration) (*core.Image, error)
- func (r *Request) LoadImage(sourceImage *core.Image) (*vips.ImageRef, error)
- func (r *Request) ProcessImage(image *vips.ImageRef, errorImage bool) (string, []byte, error)
- type RequestContext
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func HandleDimsStatus ¶
func Handler ¶
func Handler(request RequestContext) error
Types ¶
type Request ¶
type Request struct {
URL *url.URL // The URL of the http.
ImageUrl string // The image URL that is being manipulated.
SendContentDisposition bool // The content disposition of the http.
RawCommands string // The commands ('resize/100x100', 'strip/true/format/png', etc).
Signature string // The signature of the request.
SignedParams map[string]string // The query parameters used to sign the request.
SourceImage core.Image // The source image.
// contains filtered or unexported fields
}
func NewRequest ¶ added in v0.5.0
func (*Request) FetchImage ¶
type RequestContext ¶ added in v0.5.0
type RequestContext interface {
Headers
Config() core.Config
Validate() bool
FetchImage(timeout time.Duration) (*core.Image, error)
LoadImage(image *core.Image) (*vips.ImageRef, error)
ProcessImage(img *vips.ImageRef, strip bool) (string, []byte, error)
SendImage(status int, imageFormat string, imageBlob []byte) error
}
Click to show internal directories.
Click to hide internal directories.