Documentation
¶
Index ¶
- func CheckFileExtension(theFile io.ReadSeeker, fieldName string, allowedExtension []string) (string, error)
- func ModifyAllowedFileExt(extensions []string)
- func ModifyDefaultPathFile(path string)
- func SaveFileToStorage(c FiberInterface, fieldName string, required bool) (string, error)
- func SaveFileToStorageWithExt(c FiberInterface, fieldName string, required bool, allowedExt []string) (string, error)
- type CustomError
- type FiberInterface
- type Parser
- type RuleSet
- type RulesFunc
- func BodyParser() RulesFunc
- func File(key string, required bool) RulesFunc
- func FileWithExt(key string, required bool, ext []string) RulesFunc
- func Form(key string, required bool) RulesFunc
- func Params(key string, required bool) RulesFunc
- func Query(key string, required bool) RulesFunc
- func QueryParser() RulesFunc
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CheckFileExtension ¶
func ModifyAllowedFileExt ¶
func ModifyAllowedFileExt(extensions []string)
func ModifyDefaultPathFile ¶
func ModifyDefaultPathFile(path string)
func SaveFileToStorage ¶
func SaveFileToStorage(c FiberInterface, fieldName string, required bool) (string, error)
Types ¶
type CustomError ¶
type CustomError struct {
// contains filtered or unexported fields
}
func NewCommonError ¶
func NewCommonError(field, message string) CustomError
func (CustomError) Error ¶
func (customError CustomError) Error() string
func (CustomError) Parse ¶
func (customError CustomError) Parse() map[string]string
type FiberInterface ¶
type FiberInterface interface {
BodyParser(out interface{}) error
QueryParser(out interface{}) error
FormValue(key string, defaultValue ...string) string
Params(key string, defaultValue ...string) string
Query(key string, defaultValue ...string) string
FormFile(key string) (*multipart.FileHeader, error)
}
type Parser ¶
type Parser[T any] struct { // contains filtered or unexported fields }
func New ¶
func New[T any](c FiberInterface) *Parser[T]
type RulesFunc ¶
type RulesFunc func() RuleSet
func BodyParser ¶
func BodyParser() RulesFunc
func QueryParser ¶
func QueryParser() RulesFunc
Click to show internal directories.
Click to hide internal directories.