{"id":28854288,"url":"https://github.com/moapis/pqdsn","last_synced_at":"2026-07-13T18:32:02.639Z","repository":{"id":57555148,"uuid":"310384633","full_name":"moapis/pqdsn","owner":"moapis","description":"Go package pqdsn offers a type safe way of build Data Source Names for lib/pq.","archived":false,"fork":false,"pushed_at":"2020-11-08T16:27:23.000Z","size":26,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-10-19T07:30:56.574Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/moapis.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":"2020-11-05T18:27:54.000Z","updated_at":"2021-10-02T19:09:07.000Z","dependencies_parsed_at":"2022-09-26T18:51:32.654Z","dependency_job_id":null,"html_url":"https://github.com/moapis/pqdsn","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/moapis/pqdsn","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/moapis%2Fpqdsn","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/moapis%2Fpqdsn/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/moapis%2Fpqdsn/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/moapis%2Fpqdsn/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/moapis","download_url":"https://codeload.github.com/moapis/pqdsn/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/moapis%2Fpqdsn/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":35432816,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-07-13T02:00:06.543Z","response_time":119,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":[],"created_at":"2025-06-19T22:10:37.732Z","updated_at":"2026-07-13T18:32:02.621Z","avatar_url":"https://github.com/moapis.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![Build Status](https://travis-ci.org/moapis/pqdsn.svg?branch=main)](https://travis-ci.org/moapis/pqdsn)\n[![codecov](https://codecov.io/gh/moapis/pqdsn/branch/main/graph/badge.svg?token=F5LXD10VK9)](https://codecov.io/gh/moapis/pqdsn)\n[![PkgGoDev](https://pkg.go.dev/badge/github.com/moapis/pqdsn)](https://pkg.go.dev/github.com/moapis/pqdsn)\n[![Go Report Card](https://goreportcard.com/badge/github.com/moapis/pqdsn)](https://goreportcard.com/report/github.com/moapis/pqdsn)\n\n# PQDSN\n\nPackage pqdsn offers a type safe way of build Data Source Names for [lib/pq](https://github.com/lib/pq).\n`Parameters` struct type holds all accepted *lib/pq* parameters.\nThe `String()` method returns a Data Source Name in the format of:\n\n````\n\"user=pqgotest dbname=pqgotest sslmode=verify-full\"\n````\n\n## Example\n\n````\np := Parameters{\n    DBname:   \"pqgotest\",\n    User:     \"pqgotest\",\n    Password: \"secret\",\n    Host:     \"db.example.com\",\n    Port:     1234,\n    SSLmode:  SSLVerifyFull,\n    // Use single quotes in values with space!\n    FallbackApplicationName: \"'pqdsn test'\",\n}\n\ndsn := p.String()\nfmt.Println(dsn)\n````\n\nOutput:\n\n````\ndbname=pqgotest user=pqgotest password=secret host=db.example.com port=1234 sslmode=verify-full fallback_application_name='pqdsn test'\n````\n\n## Benchmarks\n\n````\ngoos: linux\ngoarch: amd64\npkg: github.com/moapis/pqdsn\nBenchmarkBuilder_addString-8                     2407327               461 ns/op             273 B/op          1 allocs/op\nBenchmarkParameters_String-8                     2853232               423 ns/op             356 B/op          4 allocs/op\nBenchmarkParameters_EscapedString_esc-8          1000000              1099 ns/op             644 B/op          5 allocs/op\nPASS\nok      github.com/moapis/pqdsn 4.398s\n````\n\n## License\n\nCopyright (c) 2020, Mohlmann Solutions SRL. All rights reserved.\nUse of this source code is governed by a License that can be found in the LICENSE file.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmoapis%2Fpqdsn","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmoapis%2Fpqdsn","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmoapis%2Fpqdsn/lists"}