Documentation ¶
Index ¶
- func Contains[T any](arr []T, x T) bool
- func ContainsFunc[T any](arr []T, predicate func(T) bool) bool
- type FilterModel
- type ListQuery
- func (q *ListQuery) GetLimit() int
- func (q *ListQuery) GetOffset() int
- func (q *ListQuery) GetOrderBy() string
- func (q *ListQuery) GetPage() int
- func (q *ListQuery) GetQueryString() string
- func (q *ListQuery) GetSize() int
- func (q *ListQuery) SetOrderBy(orderByQuery string)
- func (q *ListQuery) SetPage(pageQuery string) error
- func (q *ListQuery) SetSize(sizeQuery string) error
- type ListResult
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ContainsFunc ¶
Types ¶
type FilterModel ¶
type ListQuery ¶
type ListQuery struct { Size int `query:"size" json:"size,omitempty"` Page int `query:"page" json:"page,omitempty"` OrderBy string `query:"orderBy" json:"orderBy,omitempty"` Filters []*FilterModel `query:"filters" json:"filters,omitempty"` }
func GetListQueryFromCtx ¶
func NewListQuery ¶
func (*ListQuery) GetQueryString ¶
GetQueryString get query string
func (*ListQuery) SetOrderBy ¶
SetOrderBy Set order by
type ListResult ¶
type ListResult[T any] struct { Size int `json:"size,omitempty" bson:"size"` Page int `json:"page,omitempty" bson:"page"` TotalItems int64 `json:"totalItems,omitempty" bson:"totalItems"` TotalPage int `json:"totalPage,omitempty" bson:"totalPage"` Items []T `json:"items,omitempty" bson:"items"` }
func ListResultToListResultDto ¶
func ListResultToListResultDto[TDto any, TModel any]( listResult *ListResult[TModel], ) (*ListResult[TDto], error)
func NewListResult ¶
func NewListResult[T any](items []T, size int, page int, totalItems int64) *ListResult[T]
func (*ListResult[T]) String ¶
func (p *ListResult[T]) String() string
Click to show internal directories.
Click to hide internal directories.