Documentation ¶
Index ¶
- type DataTablesQuery
- func (q DataTablesQuery) GetOffset() int
- func (q DataTablesQuery) GetOffset64() int64
- func (q DataTablesQuery) GetOrderBackend(columns map[string]string) (a, b string)
- func (q DataTablesQuery) GetOrderElastic(columns map[string]string) (sorters []elastic.Sorter)
- func (q DataTablesQuery) GetOrderMongo(columns map[string]string) (cols bson.D)
- func (q DataTablesQuery) GetOrderSQL(columns map[string]string) (order string)
- func (q DataTablesQuery) GetPage(perPage int) int
- func (q DataTablesQuery) GetSearchSlice(k string) (search []string)
- func (q DataTablesQuery) GetSearchSliceInterface(k string) (search []interface{})
- func (q DataTablesQuery) GetSearchString(k string) (search string)
- func (q DataTablesQuery) SetOrderOffsetGorm(db *gorm.DB, columns map[string]string) *gorm.DB
- type DataTablesResponse
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DataTablesQuery ¶
type DataTablesQuery struct { Draw string `json:"draw"` Order map[string]map[string]interface{} `json:"order"` Start string `json:"start"` Search map[string]interface{} `json:"search"` // contains filtered or unexported fields }
func NewDataTableQuery ¶
func NewDataTableQuery(r *http.Request, limit bool) (query DataTablesQuery)
DataTablesQuery
func (DataTablesQuery) GetOffset ¶
func (q DataTablesQuery) GetOffset() int
func (DataTablesQuery) GetOffset64 ¶
func (q DataTablesQuery) GetOffset64() int64
func (DataTablesQuery) GetOrderBackend ¶
func (q DataTablesQuery) GetOrderBackend(columns map[string]string) (a, b string)
func (DataTablesQuery) GetOrderElastic ¶
func (q DataTablesQuery) GetOrderElastic(columns map[string]string) (sorters []elastic.Sorter)
func (DataTablesQuery) GetOrderMongo ¶
func (q DataTablesQuery) GetOrderMongo(columns map[string]string) (cols bson.D)
func (DataTablesQuery) GetOrderSQL ¶
func (q DataTablesQuery) GetOrderSQL(columns map[string]string) (order string)
func (DataTablesQuery) GetPage ¶
func (q DataTablesQuery) GetPage(perPage int) int
func (DataTablesQuery) GetSearchSlice ¶
func (q DataTablesQuery) GetSearchSlice(k string) (search []string)
func (DataTablesQuery) GetSearchSliceInterface ¶
func (q DataTablesQuery) GetSearchSliceInterface(k string) (search []interface{})
func (DataTablesQuery) GetSearchString ¶
func (q DataTablesQuery) GetSearchString(k string) (search string)
func (DataTablesQuery) SetOrderOffsetGorm ¶
type DataTablesResponse ¶
type DataTablesResponse struct { Draw string `json:"draw"` RecordsTotal int64 `json:"recordsTotal,string"` RecordsFiltered int64 `json:"recordsFiltered,string"` LevelLimited int `json:"limited"` // 0 - Not limited, 1 - logged in, 2 - guest Data [][]interface{} `json:"data"` Aggregations map[string]map[string]int64 `json:"aggregations"` }
DataTablesResponse
func NewDataTablesResponse ¶
func NewDataTablesResponse(r *http.Request, query DataTablesQuery, count int64, countFiltered int64, aggregations map[string]map[string]int64) (ret *DataTablesResponse)
func (*DataTablesResponse) AddRow ¶
func (t *DataTablesResponse) AddRow(row []interface{})
Click to show internal directories.
Click to hide internal directories.