Documentation ¶
Index ¶
Constants ¶
View Source
const ( TrimByTopLeft = "top-left" TrimByBottomRight = "bottom-right" HAlignLeft = "left" HAlignRight = "right" VAlignTop = "top" VAlignBottom = "bottom" )
Variables ¶
This section is empty.
Functions ¶
func DefaultEscapeByte ¶ added in v0.8.10
func GenerateUnsafe ¶
GenerateUnsafe generate unsafe Imagor endpoint by Params struct
func Normalize ¶ added in v0.5.15
func Normalize(image string, escapeByte EscapeByte) string
Normalize imagor path to be file path friendly, optional escapeByte func for custom safe characters
Types ¶
type EscapeByte ¶ added in v0.8.10
type Params ¶
type Params struct { Params bool `json:"-"` Path string `json:"path,omitempty"` Image string `json:"image,omitempty"` Unsafe bool `json:"unsafe,omitempty"` Hash string `json:"hash,omitempty"` Meta bool `json:"meta,omitempty"` Trim bool `json:"trim,omitempty"` TrimBy string `json:"trim_by,omitempty"` TrimTolerance int `json:"trim_tolerance,omitempty"` CropLeft float64 `json:"crop_left,omitempty"` CropTop float64 `json:"crop_top,omitempty"` CropRight float64 `json:"crop_right,omitempty"` CropBottom float64 `json:"crop_bottom,omitempty"` FitIn bool `json:"fit_in,omitempty"` Stretch bool `json:"stretch,omitempty"` Width int `json:"width,omitempty"` Height int `json:"height,omitempty"` PaddingLeft int `json:"padding_left,omitempty"` PaddingTop int `json:"padding_top,omitempty"` PaddingRight int `json:"padding_right,omitempty"` PaddingBottom int `json:"padding_bottom,omitempty"` HFlip bool `json:"h_flip,omitempty"` VFlip bool `json:"v_flip,omitempty"` HAlign string `json:"h_align,omitempty"` VAlign string `json:"v_align,omitempty"` Smart bool `json:"smart,omitempty"` Filters Filters `json:"filters,omitempty"` }
Params image endpoint parameters
Click to show internal directories.
Click to hide internal directories.