filter

package
v0.5.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 10, 2022 License: MIT Imports: 4 Imported by: 0

Documentation

Overview

Content managed by Project Forge, see [projectforge.md] for details.

Content managed by Project Forge, see [projectforge.md] for details.

Content managed by Project Forge, see [projectforge.md] for details.

Index

Constants

View Source
const MaxRowsDefault = 100

Variables

View Source
var AllowedColumns = map[string][]string{}

Functions

This section is empty.

Types

type Ordering

type Ordering struct {
	Column string `json:"column"`
	Asc    bool   `json:"asc"`
}

func (Ordering) String

func (o Ordering) String() string

type Orderings

type Orderings []*Ordering

type ParamSet

type ParamSet map[string]*Params

func (ParamSet) Get

func (s ParamSet) Get(key string, allowed []string, logger util.Logger) *Params

func (ParamSet) String

func (s ParamSet) String() string

type Params

type Params struct {
	Key       string    `json:"key"`
	Orderings Orderings `json:"orderings,omitempty"`
	Limit     int       `json:"limit,omitempty"`
	Offset    int       `json:"offset,omitempty"`
}

func ParamsWithDefaultOrdering

func ParamsWithDefaultOrdering(key string, params *Params, orderings ...*Ordering) *Params

func (*Params) CloneLimit

func (p *Params) CloneLimit(limit int) *Params

func (*Params) CloneOrdering

func (p *Params) CloneOrdering(orderings ...*Ordering) *Params

func (*Params) Filtered

func (p *Params) Filtered(available []string, logger util.Logger) *Params

func (*Params) GetOrdering

func (p *Params) GetOrdering(col string) *Ordering

func (*Params) HasNextPage

func (p *Params) HasNextPage(count int) bool

func (*Params) HasPreviousPage

func (p *Params) HasPreviousPage() bool

func (*Params) NextPage

func (p *Params) NextPage() *Params

func (*Params) OrderByString

func (p *Params) OrderByString() string

func (*Params) PreviousPage

func (p *Params) PreviousPage() *Params

func (*Params) Sanitize

func (p *Params) Sanitize(key string, defaultOrderings ...*Ordering) *Params

func (*Params) String

func (p *Params) String() string

func (*Params) ToQueryString

func (p *Params) ToQueryString(u *fasthttp.URI) string

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL