Documentation
¶
Index ¶
- Constants
- Variables
- type Controller
- type ControllerRoute
- type Route
- type URL
- func (l *URL) ArgsVals(sortcolname string, sortdirUP bool) (argVals []web.Argument)
- func (u URL) Limit() int
- func (l *URL) Link() *web.Link
- func (l *URL) LinkFor(listRoute Route, args ...web.Argument) *web.Link
- func (l *URL) MergeArgs(targets ...web.Argument) []web.Argument
- func (l URL) New() *URL
- func (u URL) Offset() int
- func (u *URL) Pager(table pgsql.TABLE) (pg pgsql.Pager)
- func (l URL) Redirect(ctx web.Contexter, listRoute Route, args ...web.Argument) error
- func (u *URL) SetLimit(l int)
- func (l *URL) SetOrderBy(colname string, dirUP bool)
- func (u URL) SortByColumn(sortby string) *URL
- func (l *URL) SplitOrderBy() (orderByField string, dirUp bool)
- func (u URL) URL() string
- func (l *URL) URLFor(listRoute Route, args ...web.Argument) string
- func (l *URL) WithArgs(targets ...web.Arg) []web.Arg
Constants ¶
View Source
const ASC = "asc"
View Source
const DESC = "desc"
Variables ¶
View Source
var ( FormArgSearchField = web.NewFormArgOpt[string](QueryArgSearchField.Name()) FormArgSearchComparison = web.NewFormArgOpt[string](QueryArgSearchComparison.Name()) FormArgSearchValue = web.NewFormArgOpt[string](QueryArgSearchValue.Name()) FormArgSetFilter = web.NewFormArgOpt[bool]("set-filter") FormArgLimit = web.NewFormArgOpt[int](QueryArgLimit.Name()) FormArgSetLimit = web.NewFormArgOpt[bool]("set-limit") )
View Source
var ( QueryArgLimit = web.NewQueryArgOpt[int]("limit") QueryArgPage = web.NewQueryArgOpt[int]("page") QueryArgOrderBy = web.NewQueryArgOpt[string]("orderby") QueryArgSearchField = web.NewQueryArgOpt[string]("searchfield") QueryArgSearchComparison = web.NewQueryArgOpt[string]("searchcomparison") QueryArgSearchValue = web.NewQueryArgOpt[string]("searchvalue") )
Functions ¶
This section is empty.
Types ¶
type Controller ¶ added in v0.13.23
type Controller[T web.Contexter] struct { SearchField web.FormArg[string] SearchComparison web.FormArg[string] SearchValue web.FormArg[string] SetFilter web.FormArg[bool] Limit web.FormArg[int] SetLimit web.FormArg[bool] // contains filtered or unexported fields }
func NewController ¶ added in v0.13.23
func NewController[T web.Contexter](route ControllerRoute) *Controller[T]
func (*Controller[T]) HandlePost ¶ added in v0.13.23
func (l *Controller[T]) HandlePost(ct T, otherArgs ...web.Argument)
type ControllerRoute ¶ added in v0.13.23
type URL ¶ added in v0.13.7
type URL struct { /* */ BaseURL string DefaultSortUp bool DefaultSortBy string DefaultLimit int Page web.QueryArg[int] OrderBy web.QueryArg[string] SearchField web.QueryArg[string] SearchComparison web.QueryArg[string] SearchValue web.QueryArg[string] // contains filtered or unexported fields }
func (*URL) SetOrderBy ¶ added in v0.13.7
func (URL) SortByColumn ¶ added in v0.13.8
func (*URL) SplitOrderBy ¶ added in v0.13.7
Click to show internal directories.
Click to hide internal directories.