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 ¶ added in v0.9.0
type PaginatedItemsResponse struct { Items json.RawMessage `json:"items"` Pagination Pagination `json:"pagination"` }
type Pagination ¶ added in v0.9.0
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 ¶ added in v0.9.0
func ParsePagination(c *gin.Context) (*Pagination, error)
func (*Pagination) ToLimit ¶ added in v0.9.0
func (p *Pagination) ToLimit() query.Limit
type QueryFilter ¶
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 ParseQueryFilter ¶
func ParseQueryFilter(c *gin.Context) (QueryFilter, error)
type ResponseInterceptor ¶ added in v0.9.0
type ResponseInterceptor struct { gin.ResponseWriter Rewrite bool // contains filtered or unexported fields }
func (*ResponseInterceptor) GetBody ¶ added in v0.9.0
func (w *ResponseInterceptor) GetBody() []byte
func (*ResponseInterceptor) Intercept ¶ added in v0.9.0
func (w *ResponseInterceptor) Intercept(ctx *gin.Context)
func (*ResponseInterceptor) Stop ¶ added in v0.9.0
func (w *ResponseInterceptor) Stop(ctx *gin.Context)
Source Files
¶
Click to show internal directories.
Click to hide internal directories.