config

package
v0.0.0-...-ecb32a1 Latest Latest
Warning

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

Go to latest
Published: Dec 13, 2024 License: MIT Imports: 0 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// DefaultQuality is the default quality
	DefaultQuality = 85

	// DefaultPngCompression is the default compression for png.
	DefaultPngCompression = 0

	// DefaultMaxBufferSize is the maximum size of buffer for lilliput
	DefaultMaxBufferSize = 8192

	// DefaultImageBufferSize is the default image buffer size for lilliput
	DefaultImageBufferSize = 50 * 1024 * 1024
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Backend

type Backend struct {
	Weight    int
	Mimetypes []string
}

type Backends

type Backends struct {
	Gifsicle *CommandBackend `mapstructure:"gifsicle"`
	GoImage  *Backend        `mapstructure:"goimage"`
}

type CommandBackend

type CommandBackend struct {
	Path      string
	Mimetypes []string
	Weight    int
}

type Config

type Config struct {
	Backends        *Backends `mapstructure:"backends"`
	DefaultFormat   string    `mapstructure:"default_format"`
	Format          string    `mapstructure:"format"`
	Quality         int       `mapstructure:"quality"`
	MaxBufferSize   int       `mapstructure:"max_buffer_size"`
	ImageBufferSize int       `mapstructure:"image_buffer_size"`
	JpegQuality     int       `mapstructure:"jpeg_quality"`
	PngCompression  int       `mapstructure:"png_compression"`
	WebpQuality     int       `mapstructure:"webp_quality"`
}

Config is the engine config

Jump to

Keyboard shortcuts

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