Documentation ¶
Overview ¶
Package assets manages imager file asset allocation and deallocation
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // StdJPEG is a JPEG sample image standard struct. Only used in tests. StdJPEG = types.Image{ ImageCommon: types.ImageCommon{ SHA1: "012a2f912c9ee93ceb0ccb8684a29ec571990a94", FileType: types.JPEG, Dims: StdDims["jpeg"], MD5: "60e41092581f7b329b057b8402caa8a7", Size: 300792, }, Name: "sample.jpg", Spoiler: true, } // StdDims contains esulting dimentions after thumbnailing sample images. // Only used in tests. StdDims = map[string][4]uint16{ "jpeg": {0x43c, 0x371, 0x96, 0x79}, "png": {0x500, 0x2d0, 0x96, 0x54}, "gif": {0x248, 0x2d0, 0x7a, 0x96}, } )
Only used in tests, but we still need them exported
Functions ¶
func CreateDirs ¶
func CreateDirs() error
CreateDirs creates directories for processed image storage
func DeleteDirs ¶
func DeleteDirs() error
DeleteDirs recursively deletes the image storage folder. Only used for cleaning up after tests.
func GetFilePaths ¶
GetFilePaths generates file paths of the source file and its thumbnail
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.