Documentation ¶
Index ¶
- Variables
- func WrapFileError(err error, name string) error
- func WrapImageError(err error, name string) error
- type Bool
- type DateTime
- type File
- type FileOptions
- type Image
- type ImageOptions
- type Int64
- type ItemStatus
- type KeyInt32
- type ListPager
- type ListPagerOptions
- type ListSorter
- type ListSorterOptions
- type Parser
- type String
- type UUID
- type Validator
Constants ¶
This section is empty.
Variables ¶
View Source
var ( FactoryErrHttpRequestFileSizeMin = NewFactory( "errHttpRequestFileSizeMin", ErrorKindUser, "invalid file size, min size = {{ .value }}b") FactoryErrHttpRequestFileSizeMax = NewFactory( "errHttpRequestFileSizeMax", ErrorKindUser, "invalid file size, max size = {{ .value }}b") FactoryErrHttpRequestFileExtension = NewFactory( "errHttpRequestFileExtension", ErrorKindUser, "invalid file extension: {{ .value }}") FactoryErrHttpRequestFileTotalSizeMax = NewFactory( "errHttpRequestFileTotalSizeMax", ErrorKindUser, "invalid file total size, max total size = {{ .value }}b") FactoryErrHttpRequestFileContentType = NewFactory( "errHttpRequestFileContentType", ErrorKindUser, "the content type '{{ .value }}' does not match the detected type") FactoryErrHttpRequestFileUnsupportedType = NewFactory( "errHttpRequestFileUnsupportedType", ErrorKindUser, "unsupported file type '{{ .value }}'") FactoryErrHttpRequestImageWidthMax = NewFactory( "errHttpRequestImageWidthMax", ErrorKindUser, "invalid image width, max size = {{ .value }}px") FactoryErrHttpRequestImageHeightMax = NewFactory( "errHttpRequestImageHeightMax", ErrorKindUser, "invalid image height, max size = {{ .value }}px") )
Functions ¶
func WrapFileError ¶ added in v0.12.0
func WrapImageError ¶ added in v0.12.0
Types ¶
type DateTime ¶ added in v0.12.0
type DateTime struct { }
func NewDateTime ¶ added in v0.12.0
func NewDateTime() *DateTime
type File ¶ added in v0.12.0
type File struct {
// contains filtered or unexported fields
}
func NewFile ¶ added in v0.12.0
func NewFile(opts FileOptions) *File
func (*File) FormFile ¶ added in v0.12.0
FormFile - WARNING you don't forget to call result.Body.Close()
func (*File) FormFileContent ¶ added in v0.12.0
FormFileContent - only for short files
type FileOptions ¶ added in v0.12.0
type Image ¶ added in v0.12.0
type Image struct {
// contains filtered or unexported fields
}
func NewImage ¶ added in v0.12.0
func NewImage(opts ImageOptions) *Image
func (*Image) FormImage ¶ added in v0.12.0
FormImage - WARNING you don't forget to call result.Body.Close()
func (*Image) FormImageContent ¶ added in v0.12.0
FormImageContent - only for short files
func (*Image) FormImages ¶ added in v0.14.0
type ImageOptions ¶ added in v0.12.0
type ImageOptions struct { File FileOptions MaxWidth int32 MaxHeight int32 CheckBody bool }
type Int64 ¶ added in v0.12.0
type Int64 struct {
// contains filtered or unexported fields
}
func NewInt64 ¶ added in v0.12.0
func NewInt64(pathFunc mrserver.RequestParserParamFunc) *Int64
func (*Int64) FilterInt64 ¶ added in v0.12.0
func (*Int64) FilterInt64List ¶ added in v0.12.0
func (*Int64) FilterRangeInt64 ¶ added in v0.12.0
type ItemStatus ¶
type ItemStatus struct { }
func NewItemStatus ¶
func NewItemStatus() *ItemStatus
func (*ItemStatus) FilterStatusList ¶
func (p *ItemStatus) FilterStatusList(r *http.Request, key string) []mrenum.ItemStatus
type KeyInt32 ¶
type KeyInt32 struct {
// contains filtered or unexported fields
}
func NewKeyInt32 ¶
func NewKeyInt32(pathFunc mrserver.RequestParserParamFunc) *KeyInt32
func (*KeyInt32) FilterKeyInt32 ¶
func (*KeyInt32) FilterKeyInt32List ¶
type ListPager ¶ added in v0.14.0
type ListPager struct {
// contains filtered or unexported fields
}
func NewListPager ¶ added in v0.14.0
func NewListPager(opts ListPagerOptions) *ListPager
func (*ListPager) PageParams ¶ added in v0.14.0
func (p *ListPager) PageParams(r *http.Request) mrtype.PageParams
type ListPagerOptions ¶ added in v0.14.0
type ListSorter ¶ added in v0.14.0
type ListSorter struct {
// contains filtered or unexported fields
}
func NewListSorter ¶ added in v0.14.0
func NewListSorter(opts ListSorterOptions) *ListSorter
func (*ListSorter) SortParams ¶ added in v0.14.0
func (p *ListSorter) SortParams(r *http.Request, sorter mrview.ListSorter) mrtype.SortParams
type ListSorterOptions ¶ added in v0.14.0
type Parser ¶ added in v0.14.0
type String ¶ added in v0.12.0
type String struct {
// contains filtered or unexported fields
}
func NewString ¶ added in v0.12.0
func NewString(pathFunc mrserver.RequestParserParamFunc) *String
func (*String) FilterString ¶ added in v0.12.0
func (*String) PathParamString ¶ added in v0.12.0
type UUID ¶
type UUID struct {
// contains filtered or unexported fields
}
func NewUUID ¶
func NewUUID(pathFunc mrserver.RequestParserParamFunc) *UUID
type Validator ¶
type Validator struct {
// contains filtered or unexported fields
}
func NewValidator ¶
func NewValidator( decoder mrserver.RequestDecoder, validator mrview.Validator, ) *Validator
Click to show internal directories.
Click to hide internal directories.