ipxsgn

package module
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Nov 13, 2021 License: MIT Imports: 7 Imported by: 0

README

go-ipxsgn

A package to generate signature path for imgproxy

Documentation

Index

Constants

View Source
const (
	// Available resize mode
	ResizeAuto ResizeMode = "auto"
	ResizeFit  ResizeMode = "fit"
	ResizeFill ResizeMode = "fill"

	// Available gravity type
	GravityCenter    Gravity = "ce"
	GravitySmart     Gravity = "sm"
	GravityNorth     Gravity = "no"
	GravitySouth     Gravity = "so"
	GravityWest      Gravity = "we"
	GravityEast      Gravity = "ea"
	GravityNorthWest Gravity = "nowe"
	GravityNorthEast Gravity = "noea"
	GravitySouthWest Gravity = "sowe"
	GravitySouthEast Gravity = "soea"

	ExtPNG  Extension = "png"
	ExtJPG  Extension = "jpg"
	ExtWEBP Extension = "webp"
	ExtAVIF Extension = "avif"
	ExtGIF  Extension = "gif"
	ExtICO  Extension = "ico"
	ExtSVG  Extension = "svg"
	ExtHEIC Extension = "heic"
	ExtBMP  Extension = "bmp"
	ExtTIFF Extension = "tiff"
	ExtPDF  Extension = "pdf"
	ExtMP4  Extension = "mp4"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

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

func NewConfig

func NewConfig(resizeMode ResizeMode, gravityType Gravity, outputExtention Extension, w, h uint, bEnlarge bool) (*Config, error)

func NewDefaultConfig

func NewDefaultConfig() (*Config, error)

type Extension

type Extension string

type Gravity

type Gravity string

type ImgSign

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

func New

func New(key, salt string, keysaltAreEncoded bool) (*ImgSign, error)

func (ImgSign) GetPath

func (i ImgSign) GetPath(c *Config, url string) (string, error)

type ResizeMode

type ResizeMode string

Jump to

Keyboard shortcuts

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