Nelze vybrat více než 25 témat Téma musí začínat písmenem nebo číslem, může obsahovat pomlčky („-“) a může být dlouhé až 35 znaků.
Saúl Ortega c83453f363
Update and rename datatables.go to filter.go
před 6 roky
.gitignore Initial commit před 6 roky
LICENSE Initial commit před 6 roky
README.md Update README.md před 6 roky
filter.go Update and rename datatables.go to filter.go před 6 roky

README.md

datatables

Simple parser for DataTables server-side processing.

Install

go get -u github.com/saulortega/datatables

Usage

import "github.com/saulortega/datatables"

//Parse receive *http.Request and returns a Filter struct
filter, err = datatables.Parse(r)
if err != nil {
	//Handle error
}

Struct

type Filter struct {
	Draw        int
	Start       int
	Length      int
	Order       []Order
	Columns     []Column
	SearchValue string
	SearchRegex bool
}

type Column struct {
	Data        string
	Name        string
	Index       int
	Orderable   bool
	Searchable  bool
	SearchValue string
	SearchRegex bool
}

type Order struct {
	Column Column
	Dir    string
}