Documentation ¶
Index ¶
- Constants
- func DecodeBody(c *gin.Context, v interface{})
- func GetLocaleValueFromRequest(c *gin.Context, parameterName, errorMessageKey string) (string, bool)
- func GetOffsetAndLimitFromRequest(c *gin.Context, defaultOffset, defaultLimit, maxLimit int) (bool, int, int)
- func GetUploadedFile(c *gin.Context, fieldName string, maxSize int64, checkIsImage bool, ...) *multipart.FileHeader
- func SaveUploadedFile(c *gin.Context, file *multipart.FileHeader, ...) bool
- func Unescape(s string) string
Constants ¶
View Source
const ( // OffsetRequestParameterName name of the offset parameter in a request. OffsetRequestParameterName = "offset" // LimitRequestParameterName name of the limit parameter in a request. LimitRequestParameterName = "limit" )
Variables ¶
This section is empty.
Functions ¶
func DecodeBody ¶
DecodeBody : decodes the JSON-formatted body of a request to a struct.
func GetLocaleValueFromRequest ¶
func GetLocaleValueFromRequest(c *gin.Context, parameterName, errorMessageKey string) (string, bool)
GetLocaleValueFromRequest : extracts the locale from the URL.
func GetOffsetAndLimitFromRequest ¶
func GetOffsetAndLimitFromRequest(c *gin.Context, defaultOffset, defaultLimit, maxLimit int) (bool, int, int)
GetOffsetAndLimitFromRequest : extracts the offset and limit from the GET parameters.
func GetUploadedFile ¶
func GetUploadedFile(c *gin.Context, fieldName string, maxSize int64, checkIsImage bool, logContext, errorMessageKey string) *multipart.FileHeader
GetUploadedFile : returns the uploaded file.
func SaveUploadedFile ¶
func SaveUploadedFile(c *gin.Context, file *multipart.FileHeader, destination, logContext, errorMessageKey string) bool
SaveUploadedFile : saves the uploaded file to the destination.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.