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>"
Click to show internal directories.
Click to hide internal directories.