Documentation ¶
Index ¶
- Variables
- func Delete[Req any, Resp any](r gin.IRouter, path string, handlerFunc HandlerFunc[Req, Resp])
- func Get[Req any, Resp any](r gin.IRouter, path string, handlerFunc HandlerFunc[Req, Resp])
- func Group(r gin.IRouter, groupName string, fn func(gin.IRouter))
- func Handle[Req any, Resp any](r gin.IRouter, handlerFunc HandlerFunc[Req, Resp])
- func Head[Req any, Resp any](r gin.IRouter, path string, handlerFunc HandlerFunc[Req, Resp])
- func Options[Req any, Resp any](r gin.IRouter, path string, handlerFunc HandlerFunc[Req, Resp])
- func Patch[Req any, Resp any](r gin.IRouter, path string, handlerFunc HandlerFunc[Req, Resp])
- func Post[Req any, Resp any](r gin.IRouter, path string, handlerFunc HandlerFunc[Req, Resp])
- func Put[Req any, Resp any](r gin.IRouter, path string, handlerFunc HandlerFunc[Req, Resp])
- type BindingType
- type BindingTypes
- type DefaultResponseWrapper
- type Error
- type HandlerFunc
- type IPagination
- type IResponseWrapper
- type Meta
- type NilResponse
- type PaginationMeta
- type PaginationRequest
- type PaginationWrapper
Constants ¶
This section is empty.
Variables ¶
View Source
var NewNilResponse = &NilResponse{}
Functions ¶
Types ¶
type BindingType ¶
type BindingType uint16
const ( BindingTypeUnknown BindingType = iota BindingTypeDefault BindingTypePath BindingTypeQuery BindingTypeJson BindingTypeHeader )
func ParseBindingType ¶
func ParseBindingType(s string) BindingType
type BindingTypes ¶
type BindingTypes []BindingType
func (BindingTypes) Len ¶
func (b BindingTypes) Len() int
func (BindingTypes) Less ¶
func (b BindingTypes) Less(i, j int) bool
func (BindingTypes) Swap ¶
func (b BindingTypes) Swap(i, j int)
type DefaultResponseWrapper ¶
type DefaultResponseWrapper struct{}
type Error ¶
type Error struct {
// contains filtered or unexported fields
}
type HandlerFunc ¶
type IPagination ¶
type IResponseWrapper ¶
var ResponseWrapper IResponseWrapper = &DefaultResponseWrapper{}
type NilResponse ¶
type NilResponse struct{}
type PaginationMeta ¶
type PaginationRequest ¶
type PaginationRequest struct { Page int `form:"page" default:"1"` PageSize int `form:"page_size" default:"20"` }
func (*PaginationRequest) ToMeta ¶
func (r *PaginationRequest) ToMeta(total int) *PaginationMeta
func (*PaginationRequest) ToSqlPagination ¶
func (r *PaginationRequest) ToSqlPagination() (offset, limit int)
type PaginationWrapper ¶
type PaginationWrapper[T any] struct { List []T `json:"list"` Meta *PaginationMeta `json:"meta"` }
Click to show internal directories.
Click to hide internal directories.