Documentation ¶
Overview ¶
Package utils provides utilities for handlers
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GenerateAvatar ¶
GenerateAvatar this will create a random avatar
func LoginCounter ¶
LoginCounter will increment a counter in redis to limit login attempts
Types ¶
type FileUploader ¶
type FileUploader interface { // struct integrity IsValid() bool IsValidPost() bool // image processing SaveImage() (err error) // avatar functions SaveAvatar() (err error) // contains filtered or unexported methods }
FileUploader defines the file processing functions
type ImageType ¶
type ImageType struct { File multipart.File Header *multipart.FileHeader Ib uint Filename string Thumbnail string Filepath string Thumbpath string Ext string MD5 string SHA string OrigWidth int OrigHeight int ThumbWidth int ThumbHeight int // contains filtered or unexported fields }
ImageType defines an image and its metadata for processing
func (*ImageType) IsValidPost ¶
IsValidPost will check final struct integrity
func (*ImageType) SaveAvatar ¶
SaveAvatar will save a user provided avatar
Click to show internal directories.
Click to hide internal directories.