{"id":21961511,"url":"https://github.com/saulortega/datatables","last_synced_at":"2025-03-22T20:26:42.074Z","repository":{"id":57506738,"uuid":"122635364","full_name":"saulortega/datatables","owner":"saulortega","description":"Parser for DataTables (jQuery plugin)","archived":false,"fork":false,"pushed_at":"2018-03-01T19:57:52.000Z","size":35,"stargazers_count":2,"open_issues_count":0,"forks_count":1,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-01-28T00:27:02.135Z","etag":null,"topics":["datatables","go","golang","golang-library","golang-package","jquery","parse","server-side"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/saulortega.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-02-23T15:01:30.000Z","updated_at":"2022-12-22T01:37:06.000Z","dependencies_parsed_at":"2022-08-29T20:01:09.361Z","dependency_job_id":null,"html_url":"https://github.com/saulortega/datatables","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/saulortega%2Fdatatables","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/saulortega%2Fdatatables/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/saulortega%2Fdatatables/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/saulortega%2Fdatatables/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/saulortega","download_url":"https://codeload.github.com/saulortega/datatables/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245016717,"owners_count":20547658,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["datatables","go","golang","golang-library","golang-package","jquery","parse","server-side"],"created_at":"2024-11-29T10:16:07.778Z","updated_at":"2025-03-22T20:26:42.054Z","avatar_url":"https://github.com/saulortega.png","language":"Go","readme":"# datatables\nSimple parser for [DataTables](https://datatables.net/) server-side processing.\n\n# Install\n\n```\ngo get -u github.com/saulortega/datatables\n```\n\n# Usage\n\n```go\nimport \"github.com/saulortega/datatables\"\n\n//Parse receive *http.Request and returns a Filter struct\nfilter, err = datatables.Parse(r)\nif err != nil {\n\t//Handle error\n}\n\n//Get data from DB\n\nresponse := filter.PrepareResponse()\nresponse.RecordsTotal = 629635\nresponse.RecordsFiltered = 50\nresponse.Data = rows\n\n//WriteResponse receive http.ResponseWriter. It send the response even if there are any error.\n//Use WriteResponseOnSuccess(w) if you do not want to send the response when there is an error.\nerr := response.WriteResponse(w)\nif err != nil {\n\t//Handle error\n}\n\n```\n\n# Structs\n\n```go\ntype Filter struct {\n\tDraw        int\n\tStart       int\n\tLength      int\n\tOrder       []Order\n\tColumns     []Column\n\tSearchValue string\n\tSearchRegex bool\n}\n\ntype Column struct {\n\tData        string\n\tName        string\n\tIndex       int\n\tOrderable   bool\n\tSearchable  bool\n\tSearchValue string\n\tSearchRegex bool\n}\n\ntype Order struct {\n\tColumn Column\n\tDir    string\n}\n```\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsaulortega%2Fdatatables","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsaulortega%2Fdatatables","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsaulortega%2Fdatatables/lists"}