mirror of
https://github.com/willnorris/imageproxy.git
synced 2026-04-26 13:26:23 +02:00
rename Transform back to Options
This commit is contained in:
parent
402e2c7d83
commit
f6f757a75d
2 changed files with 8 additions and 8 deletions
14
data/data.go
14
data/data.go
|
|
@ -10,19 +10,19 @@ import (
|
|||
"time"
|
||||
)
|
||||
|
||||
// Transform specifies transformations that can be performed on a
|
||||
// Options specifies transformations that can be performed on a
|
||||
// requested image.
|
||||
type Transform struct {
|
||||
type Options struct {
|
||||
Width int // requested width, in pixels
|
||||
Height int // requested height, in pixels
|
||||
}
|
||||
|
||||
func (o Transform) String() string {
|
||||
func (o Options) String() string {
|
||||
return fmt.Sprintf("%dx%d", o.Width, o.Height)
|
||||
}
|
||||
|
||||
func ParseTransform(str string) (*Transform, error) {
|
||||
t := new(Transform)
|
||||
func ParseOptions(str string) (*Options, error) {
|
||||
t := new(Options)
|
||||
var err error
|
||||
var h, w string
|
||||
|
||||
|
|
@ -51,8 +51,8 @@ func ParseTransform(str string) (*Transform, error) {
|
|||
}
|
||||
|
||||
type Request struct {
|
||||
URL *url.URL // URL of the image to proxy
|
||||
Transform *Transform // Image transformation to perform
|
||||
URL *url.URL // URL of the image to proxy
|
||||
Options *Options // Image transformation to perform
|
||||
}
|
||||
|
||||
// Image represents a remote image that is being proxied. It tracks where
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue