Documentation ¶
Index ¶
- func ConnectionURLBuilder(n string) (string, error)
- func GenerateFileName(userID string) (string, error)
- func GetFileSize(pathToFile string) (int64, error)
- func GetLocalFileInfo(pathToFile, fileType string) (*models.LocalFileInfo, error)
- func NewValidator() *validator.Validate
- func StartServer(a *fiber.App)
- func StartServerWithGracefulShutdown(a *fiber.App)
- func ValidatorErrors(err error) map[string]string
- type TokenMetaData
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ConnectionURLBuilder ¶
ConnectionURLBuilder func for building URL connection.
func GenerateFileName ¶
GenerateFileName func for generate name for uploaded file.
func GetFileSize ¶
GetFileSize func for getting the file size.
func GetLocalFileInfo ¶
func GetLocalFileInfo(pathToFile, fileType string) (*models.LocalFileInfo, error)
GetLocalFileInfo func for get local file's info (Content-Type, extension, size, etc).
func NewValidator ¶
func NewValidator() *validator.Validate
NewValidator func for create a new validator for model fields.
func StartServerWithGracefulShutdown ¶
func StartServerWithGracefulShutdown(a *fiber.App)
StartServerWithGracefulShutdown function for starting server with a graceful shutdown.
func ValidatorErrors ¶
ValidatorErrors func for show validation errors for each invalid fields.
Types ¶
type TokenMetaData ¶
TokenMetadata struct to describe metadata in JWT.
func ExtractTokenMetaData ¶
func ExtractTokenMetaData(c *fiber.Ctx) (*TokenMetaData, error)
ExtractTokenMetaData func to extract metadata from JWT.
func TokenValidateExpireTime ¶
func TokenValidateExpireTime(ctx *fiber.Ctx) (*TokenMetaData, error)
TokenValidateExpireTime func for validating given JWT token with expire time.