imgproxy

package
v0.0.0-...-ae3587a Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 24, 2020 License: LGPL-3.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type URLBuilder

type URLBuilder struct {
	// contains filtered or unexported fields
}

URLBuilder simplifies constructing urls for the imgproxy

func New

func New(proxyAddress, key, salt string) (*URLBuilder, error)

New returns a URLBuilder or an error if the salt or key is not hex-encoded

func (*URLBuilder) GetCropURL

func (b *URLBuilder) GetCropURL(x, y, width, height int, sourceURL string) string

GetCropURL returns a url that instructs the imgproxy to crop out the given cordinates of the image with a sourceURL in the form "s3://<bucket_name>/<path_to_image>" the image proxy will download the image from s3

func (*URLBuilder) GetS3Url

func (b *URLBuilder) GetS3Url(bucketName, path string) string

GetS3Url returns a url in the form "s3://<bucket_name>/<path_to_image>"

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL