Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ParamToBool ¶ added in v0.1.1
func ParamToBool(c Controller, paramName string) (requestRegex bool)
ParamToBool get a param and parse it to bool
Types ¶
type Controller ¶
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 int64 `json:"recordsTotal"` RecordsFiltered int64 `json:"recordsFiltered"` Data []interface{} `json:"data,nilasempty"` }
MessageDataTable is theresponse object
func Complex ¶
func Complex(c Controller, conn *gorm.DB, table string, columns []Data, whereResult []string, whereAll []string, whereJoin map[string]string) (responseJSON MessageDataTable, err error)
Complex is a main method, externally called
func Simple ¶
func Simple(c Controller, conn *gorm.DB, table string, columns []Data) (responseJSON MessageDataTable, err error)
Simple is a main method, externally called
Click to show internal directories.
Click to hide internal directories.