Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Controller ¶ added in v0.2.4
Controller emulate the beego controller
type Data ¶
type Data struct { Db string //name of column Dt interface{} //id of column in client (int or string) Cs bool //case sensitive - optional default false Formatter func(data interface{}, row map[string]interface{}) (interface{}, error) // - optional }
Data is a line in map that link the database field with datatable field
type MessageDataTable ¶
type MessageDataTable struct { Draw int `json:"draw"` RecordsTotal int `json:"recordsTotal"` RecordsFiltered int `json:"recordsFiltered"` Data []interface{} `json:"data,nilasempty"` }
MessageDataTable is theresponse object
func Complex ¶
func Complex(c Controller, conn *gorm.DB, table string, columns map[int]Data, whereResult []string, whereAll []string) (responseJSON MessageDataTable, err error)
Complex is a main method, externally called
func Simple ¶
func Simple(c Controller, conn *gorm.DB, table string, columns map[int]Data) (responseJSON MessageDataTable, err error)
Simple is a main method, externally called
Click to show internal directories.
Click to hide internal directories.