{"id":16003545,"url":"https://github.com/nhatthm/moneyloverkeychain","last_synced_at":"2026-01-29T08:35:09.756Z","repository":{"id":57581259,"uuid":"362866810","full_name":"nhatthm/moneyloverkeychain","owner":"nhatthm","description":"Keychain Storage for MoneyLover API Client","archived":false,"fork":false,"pushed_at":"2024-11-25T15:42:18.000Z","size":143,"stargazers_count":0,"open_issues_count":2,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-02-17T10:53:41.736Z","etag":null,"topics":["go","golang","keychain","keyring","moneylover","moneyloverapi"],"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/nhatthm.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-04-29T15:40:29.000Z","updated_at":"2024-06-10T09:46:50.000Z","dependencies_parsed_at":"2023-11-29T10:30:58.210Z","dependency_job_id":"51aca270-f875-4c73-8f9b-ee053fe20697","html_url":"https://github.com/nhatthm/moneyloverkeychain","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nhatthm%2Fmoneyloverkeychain","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nhatthm%2Fmoneyloverkeychain/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nhatthm%2Fmoneyloverkeychain/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nhatthm%2Fmoneyloverkeychain/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nhatthm","download_url":"https://codeload.github.com/nhatthm/moneyloverkeychain/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247276096,"owners_count":20912287,"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":["go","golang","keychain","keyring","moneylover","moneyloverapi"],"created_at":"2024-10-08T10:21:13.023Z","updated_at":"2026-01-29T08:35:04.736Z","avatar_url":"https://github.com/nhatthm.png","language":"Go","funding_links":["https://www.paypal.com/donate/?hosted_button_id=PJZSGJN57TDJY"],"categories":[],"sub_categories":[],"readme":"# Keychain Storage for MoneyLover API Client\n\n[![GitHub Releases](https://img.shields.io/github/v/release/nhatthm/moneyloverkeychain)](https://github.com/nhatthm/moneyloverkeychain/releases/latest)\n[![Build Status](https://github.com/nhatthm/moneyloverkeychain/actions/workflows/test.yaml/badge.svg)](https://github.com/nhatthm/moneyloverkeychain/actions/workflows/test.yaml)\n[![codecov](https://codecov.io/gh/nhatthm/moneyloverkeychain/branch/master/graph/badge.svg?token=eTdAgDE2vR)](https://codecov.io/gh/nhatthm/moneyloverkeychain)\n[![Go Report Card](https://goreportcard.com/badge/github.com/nhatthm/httpmock)](https://goreportcard.com/report/github.com/nhatthm/httpmock)\n[![GoDevDoc](https://img.shields.io/badge/dev-doc-00ADD8?logo=go)](https://pkg.go.dev/github.com/nhatthm/moneyloverkeychain)\n[![Donate](https://img.shields.io/badge/Donate-PayPal-green.svg)](https://www.paypal.com/donate/?hosted_button_id=PJZSGJN57TDJY)\n\n`moneyloverkeychain` uses [system keyring](https://github.com/zalando/go-keyring#go-keyring-library) as a storage for\npersisting/getting credentials and token. It supports OS X, Linux\n(dbus) and Windows.\n\n## Prerequisites\n\n- `Go \u003e= 1.16`\n\n## Install\n\n```bash\ngo get github.com/nhatthm/moneyloverkeychain\n```\n\n## Usage\n\n### `moneyloverapi.CredentialsProvider`\n\n**Examples**\n\nBuild `moneyloverapi.Client`:\n\n```go\npackage mypackage\n\nimport (\n\t\"github.com/nhatthm/moneyloverapi\"\n\t\"github.com/nhatthm/moneyloverkeychain/credentials\"\n)\n\nfunc buildClient(username string) (*moneyloverapi.Client, error) {\n\tc := moneyloverapi.NewClient(\n\t\tcredentials.WithCredentialsProvider(username),\n\t)\n\n\treturn c, nil\n}\n```\n\nPersist credentials in system keyring:\n\n```go\npackage mypackage\n\nimport (\n\t\"github.com/nhatthm/moneyloverkeychain/credentials\"\n)\n\nfunc persist(username, password string) error {\n\tc := credentials.New(username)\n\n\treturn c.Update(password)\n}\n```\n\n### `auth.TokenStorage`\n\n```go\npackage mypackage\n\nimport (\n\t\"github.com/nhatthm/moneyloverapi\"\n\t\"github.com/nhatthm/moneyloverkeychain/token\"\n)\n\nfunc buildClient() *moneyloverapi.Client {\n\treturn moneyloverapi.NewClient(\n\t\ttoken.WithTokenStorage(),\n\t)\n}\n```\n\n## Donation\n\nIf this project help you reduce time to develop, you can give me a cup of coffee :)\n\n### Paypal donation\n\n[![paypal](https://www.paypalobjects.com/en_US/i/btn/btn_donateCC_LG.gif)](https://www.paypal.com/donate/?hosted_button_id=PJZSGJN57TDJY)\n\n\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;or scan this\n\n\u003cimg src=\"https://user-images.githubusercontent.com/1154587/113494222-ad8cb200-94e6-11eb-9ef3-eb883ada222a.png\" width=\"147px\" /\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnhatthm%2Fmoneyloverkeychain","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnhatthm%2Fmoneyloverkeychain","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnhatthm%2Fmoneyloverkeychain/lists"}