{"id":43526182,"url":"https://github.com/apuigsech/rest-layer-sql","last_synced_at":"2026-02-03T15:12:04.960Z","repository":{"id":48626659,"uuid":"160857819","full_name":"apuigsech/rest-layer-sql","owner":"apuigsech","description":"Provide SQL Database using database/sql storage backend for rest-layer.","archived":false,"fork":false,"pushed_at":"2022-08-17T23:45:32.000Z","size":24,"stargazers_count":12,"open_issues_count":3,"forks_count":9,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-06-19T00:26:03.479Z","etag":null,"topics":["golang","rest-api","sql"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/apuigsech.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-12-07T17:54:23.000Z","updated_at":"2023-10-24T13:33:19.000Z","dependencies_parsed_at":"2022-09-16T00:40:30.180Z","dependency_job_id":null,"html_url":"https://github.com/apuigsech/rest-layer-sql","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/apuigsech/rest-layer-sql","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/apuigsech%2Frest-layer-sql","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/apuigsech%2Frest-layer-sql/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/apuigsech%2Frest-layer-sql/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/apuigsech%2Frest-layer-sql/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/apuigsech","download_url":"https://codeload.github.com/apuigsech/rest-layer-sql/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/apuigsech%2Frest-layer-sql/sbom","scorecard":{"id":204488,"data":{"date":"2025-08-11","repo":{"name":"github.com/apuigsech/rest-layer-sql","commit":"d9fca83040a824f2cc50cb5f2bc48507290cf22b"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3.2,"checks":[{"name":"Code-Review","score":1,"reason":"Found 3/18 approved changesets -- score normalized to 1","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Dangerous-Workflow","score":-1,"reason":"no workflows found","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Token-Permissions","score":-1,"reason":"No tokens found","details":null,"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Pinned-Dependencies","score":-1,"reason":"no dependencies found","details":null,"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: MIT License: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 15 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}}]},"last_synced_at":"2025-08-16T23:24:40.730Z","repository_id":48626659,"created_at":"2025-08-16T23:24:40.730Z","updated_at":"2025-08-16T23:24:40.730Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29047826,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-03T14:55:20.264Z","status":"ssl_error","status_checked_at":"2026-02-03T14:55:19.725Z","response_time":96,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["golang","rest-api","sql"],"created_at":"2026-02-03T15:12:04.281Z","updated_at":"2026-02-03T15:12:04.943Z","avatar_url":"https://github.com/apuigsech.png","language":"Go","readme":"# Golang REST Layer SQL Storage Handler\n\nThis [REST Layer](https://github.com/rs/rest-layer) resource storage backend stores data in a SQL Database using [database/sql](https://golang.org/pkg/database/sql/).\n\n## Usage\n\n```go\nimport \"github.com/apuigsech/rest-layer-sql\"\n```\n\nCreate a resource storage handler with a given SQL driver, source and table:\n\n```go\nh := sqlStorage.NewHandler(DB_DRIVER, DB_SOURCE, DB_TABLE)\n```\n\nBind this resource storage handled to a resource:\n\n```go\nindex.Bind(\"resourceName\", resourceSchema, h, resource.DefaultConf)\n```\n\n## Supported SQL Drivers\n\nAll supported SQL Drivers are listed [here](https://github.com/golang/go/wiki/SQLDrivers)\n\n\n## Examples\n\nRun the example:\n\n```bash\n$ go run example/example.go\n2018/12/07 18:29:53 Serving API on http://localhost:8080\n```\n\nYou can perform requests using [HTTPie](https://httpie.org/).\n\n```bash\n$ http GET :8080/units\nHTTP/1.1 200 OK\nContent-Length: 2\nContent-Type: application/json\nDate: Fri, 07 Dec 2018 17:31:23 GMT\nEtag: W/\"d41d8cd98f00b204e9800998ecf8427e\"\nX-Total: 0\n\n[]\n\n$ http POST :8080/units str=\"foo\" int:=0\nHTTP/1.1 201 Created\nContent-Length: 139\nContent-Location: /units/bg5at5bmvban389193a0\nContent-Type: application/json\nDate: Fri, 07 Dec 2018 17:32:05 GMT\nEtag: W/\"80b0d96e674f761e87950ccb19bdc279\"\nLast-Modified: Fri, 07 Dec 2018 17:32:05 GMT\n\n{\n    \"created\": \"2018-12-07T18:32:05.290925+01:00\",\n    \"id\": \"bg5at5bmvban389193a0\",\n    \"int\": 0,\n    \"str\": \"foo\",\n    \"updated\": \"2018-12-07T18:32:05.290925+01:00\"\n}\n\n$ http POST :8080/units str=\"bar\" int:=1\nHTTP/1.1 201 Created\nContent-Length: 137\nContent-Location: /units/bg5at73mvban389193ag\nContent-Type: application/json\nDate: Fri, 07 Dec 2018 17:32:12 GMT\nEtag: W/\"8bb72222f5979bc9f9259c0262807667\"\nLast-Modified: Fri, 07 Dec 2018 17:32:12 GMT\n\n{\n    \"created\": \"2018-12-07T18:32:12.08373+01:00\",\n    \"id\": \"bg5at73mvban389193ag\",\n    \"int\": 1,\n    \"str\": \"bar\",\n    \"updated\": \"2018-12-07T18:32:12.08373+01:00\"\n}\n\n$ http GET :8080/units\nHTTP/1.1 200 OK\nContent-Length: 365\nContent-Type: application/json\nDate: Fri, 07 Dec 2018 17:32:44 GMT\nEtag: W/\"0a320d03fee8e1fb268d3cc48fac391d\"\nX-Total: 0\n\n[\n    {\n        \"_etag\": \"80b0d96e674f761e87950ccb19bdc279\",\n        \"created\": \"2018-12-07T18:32:05.290925+01:00\",\n        \"id\": \"bg5at5bmvban389193a0\",\n        \"int\": 0,\n        \"str\": \"foo\",\n        \"updated\": \"2018-12-07T18:32:05.290925+01:00\"\n    },\n    {\n        \"_etag\": \"8bb72222f5979bc9f9259c0262807667\",\n        \"created\": \"2018-12-07T18:32:12.08373+01:00\",\n        \"id\": \"bg5at73mvban389193ag\",\n        \"int\": 1,\n        \"str\": \"bar\",\n        \"updated\": \"2018-12-07T18:32:12.08373+01:00\"\n    }\n]\n```\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fapuigsech%2Frest-layer-sql","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fapuigsech%2Frest-layer-sql","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fapuigsech%2Frest-layer-sql/lists"}