Documentation
¶
Index ¶
Constants ¶
View Source
const ( Pagination_Offset string = "offset" Pagination_Limit string = "limit" DefaultLimit uint64 = 10 )
Variables ¶
This section is empty.
Functions ¶
Types ¶
type PaginatedItemsResponse ¶
type PaginatedItemsResponse struct { Items json.RawMessage `json:"items"` Pagination Pagination `json:"pagination"` }
type Pagination ¶
type Pagination struct { Offset uint64 `json:"offset"` Limit uint64 `json:"limit"` Total int64 `json:"total"` }
TODO(slax0rr): Move to a more appropriate location, having it in infra is not appropriate with the onion architecture but is being kept here for the purposes of quicker delivery.
func ParsePagination ¶
func ParsePagination(c *gin.Context) (*Pagination, error)
func (*Pagination) ToLimit ¶
func (p *Pagination) ToLimit() query.Limit
type QueryFilter ¶
func ParseQueryFilter ¶
func ParseQueryFilter(c *gin.Context) (QueryFilter, error)
type QueryOrderBy ¶
func ParseQueryOrderBy ¶
func ParseQueryOrderBy(c *gin.Context) (QueryOrderBy, error)
type ResponseInterceptor ¶
type ResponseInterceptor struct { gin.ResponseWriter Rewrite bool // contains filtered or unexported fields }
func (*ResponseInterceptor) GetBody ¶
func (w *ResponseInterceptor) GetBody() []byte
func (*ResponseInterceptor) Intercept ¶
func (w *ResponseInterceptor) Intercept(ctx *gin.Context)
func (*ResponseInterceptor) Stop ¶
func (w *ResponseInterceptor) Stop(ctx *gin.Context)
Source Files
¶
Click to show internal directories.
Click to hide internal directories.