{"id":26179083,"url":"https://github.com/plumber-cd/go-credentials","last_synced_at":"2025-12-31T14:13:07.189Z","repository":{"id":39907050,"uuid":"494962686","full_name":"plumber-cd/go-credentials","owner":"plumber-cd","description":"Cross Platform Go Credentials Provider","archived":false,"fork":false,"pushed_at":"2024-01-19T21:22:22.000Z","size":54,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-11T21:48:47.896Z","etag":null,"topics":["credentials","go","golang","keychain","keyring"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/plumber-cd.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-05-22T04:56:37.000Z","updated_at":"2024-03-08T10:05:49.000Z","dependencies_parsed_at":"2024-01-19T22:36:40.681Z","dependency_job_id":"d8cfd31a-1329-428b-a346-d08e97d2f600","html_url":"https://github.com/plumber-cd/go-credentials","commit_stats":{"total_commits":25,"total_committers":5,"mean_commits":5.0,"dds":"0.43999999999999995","last_synced_commit":"aa7b2212dc0e1c3e6646884745d8ecd63ad29317"},"previous_names":[],"tags_count":9,"template":false,"template_full_name":null,"purl":"pkg:github/plumber-cd/go-credentials","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/plumber-cd%2Fgo-credentials","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/plumber-cd%2Fgo-credentials/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/plumber-cd%2Fgo-credentials/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/plumber-cd%2Fgo-credentials/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/plumber-cd","download_url":"https://codeload.github.com/plumber-cd/go-credentials/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/plumber-cd%2Fgo-credentials/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":265871351,"owners_count":23842022,"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":["credentials","go","golang","keychain","keyring"],"created_at":"2025-03-11T21:48:51.420Z","updated_at":"2025-12-31T14:13:07.163Z","avatar_url":"https://github.com/plumber-cd.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# go-credentials\nCross Platform Go Credentials Provider\n\nThis simple library provides common interface for working with credentials.\n\nBy default it uses the following interfaces:\n\n- MacOS: https://github.com/keybase/go-keychain\n- Linux: https://github.com/keybase/dbus\n- Windows: https://github.com/danieljoos/wincred\n\nYou can substitute it with your own interface per platform.\n\n# Example\n\n```go\npackage main\n\nimport (\n    \"fmt\"\n\n    \"github.com/plumber-cd/go-credentials\"\n)\n\nfunc main() {\n    domain := \u0026credentials.Domain{\n        Service:     \"My App Name\",\n        AccessGroup: \"github.com/plumber-cd/go-credentials\", // Define some unique for your app instance value\n    }\n\n    if err := credentials.SetDomain(domain); err != nil {\n        panic(err)\n    }\n\n    if err := err = credentials.Create(\"http://example.com\", \"\u003cname/username/title/display name\u003e\", \"password\"); err != nil {\n        panic(err)\n    }\n    \n    name, secret, err := credentials.Retrieve(\"http://example.com\")\n    if err != nil {\n        panic(err)\n    }\n    fmt.Printf(\"Name: %s\\n\", name)\n    fmt.Printf(\"Secret: %s\\n\", secret)\n\n    if err := credentials.Update(\"http://example.com\", \"new title\", \"new password\"); err != nil {\n        panic(err)\n    }\n\n    if err := credentials.Delete(\"http://example.com\"); err {\n        panic(err)\n    }\n}\n```\n\n# Custom provider\n\nYou need to create new `struct` than implements `credentials.Provider` interface. Somewhere in your app, you then will need to:\n\n```go\npackage main\n\nimport \"github.com/plumber-cd/go-credentials\"\n\nfunc init() {\n    credentials.Current = \u0026MyCustomProvider{}\n}\n```\n\nThat's it. All other code that is using this same library - will now use your custom provider instead of default.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fplumber-cd%2Fgo-credentials","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fplumber-cd%2Fgo-credentials","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fplumber-cd%2Fgo-credentials/lists"}