Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func EncodeImageToJpg ¶
encode image to jpeg
func FetchAndResizeImage ¶
func FetchAndResizeImage(p *ResizerParams) (*image.Image, error)
fetch the image from provided url and resize it
func ResizeImage ¶
func ResizeImage(w http.ResponseWriter, r *http.Request)
Cloud Function entry point
Types ¶
type ResizerParams ¶
type ResizerParams struct {
// contains filtered or unexported fields
}
struct containing the initial query params
func NewResizerParams ¶
func NewResizerParams(url string, height int, width int) ResizerParams
ResizerParams factory
func ParseQuery ¶
func ParseQuery(r *http.Request) (*ResizerParams, error)
parse/validate the url params
Click to show internal directories.
Click to hide internal directories.