-
Notifications
You must be signed in to change notification settings - Fork 179
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #99 from thoas/refac-engine-config
Refac engine config
- Loading branch information
Showing
7 changed files
with
104 additions
and
50 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
package config | ||
|
||
// Config is the engine config | ||
type Config struct { | ||
Backends []string `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"` | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
package config | ||
|
||
// DefaultQuality is the default quality | ||
const DefaultQuality = 85 | ||
|
||
// DefaultPngCompression is the default compression for png. | ||
const DefaultPngCompression = 0 | ||
|
||
// DefaultMaxBufferSize is the maximum size of buffer for lilliput | ||
const DefaultMaxBufferSize = 8192 | ||
|
||
// DefaultImageBufferSize is the default image buffer size for lilliput | ||
const DefaultImageBufferSize = 50 * 1024 * 1024 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters