{"id":21511977,"url":"https://github.com/strvcom/strv-backend-go-time","last_synced_at":"2026-02-10T16:32:08.156Z","repository":{"id":56854912,"uuid":"508699212","full_name":"strvcom/strv-backend-go-time","owner":"strvcom","description":"Custom Go time \u0026 duration implementation.","archived":false,"fork":false,"pushed_at":"2025-08-22T05:18:51.000Z","size":42,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":18,"default_branch":"master","last_synced_at":"2025-08-22T07:16:41.260Z","etag":null,"topics":["duration","go","golang","time"],"latest_commit_sha":null,"homepage":"https://go.strv.io","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/strvcom.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":"CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-06-29T13:17:48.000Z","updated_at":"2025-08-22T05:16:17.000Z","dependencies_parsed_at":"2024-11-17T07:07:16.311Z","dependency_job_id":null,"html_url":"https://github.com/strvcom/strv-backend-go-time","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"purl":"pkg:github/strvcom/strv-backend-go-time","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/strvcom%2Fstrv-backend-go-time","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/strvcom%2Fstrv-backend-go-time/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/strvcom%2Fstrv-backend-go-time/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/strvcom%2Fstrv-backend-go-time/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/strvcom","download_url":"https://codeload.github.com/strvcom/strv-backend-go-time/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/strvcom%2Fstrv-backend-go-time/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29307905,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-10T16:09:25.305Z","status":"ssl_error","status_checked_at":"2026-02-10T16:08:52.170Z","response_time":65,"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":["duration","go","golang","time"],"created_at":"2024-11-23T22:24:38.197Z","updated_at":"2026-02-10T16:32:08.113Z","avatar_url":"https://github.com/strvcom.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# STRV time\n\n![Latest release][release]\n[![codecov][codecov-img]][codecov]\n![GitHub][license]\n\nCustom Go time \u0026 duration implementation.\n\n## Duration\nDuration is a wrapper around [time](https://pkg.go.dev/time) that simplifies `serialization`/`deserialization` of time.\n\n## Examples\n```go\npackage main\n\nimport (\n\ttimex \"go.strv.io/time\"\n)\n\ntype config struct {\n\tAccessTokenExpiration  timex.Duration `json:\"access_token_expiration\"`\n\tRefreshTokenExpiration timex.Duration `json:\"refresh_token_expiration\"`\n}\n\nfunc main() {\n\tcfg := config{}\n\tdata, _ := os.ReadFile(\"config.json\")\n\t_ = json.Unmarshal(data, \u0026cfg)\n}\n```\n```json\n// Content of config.json\n{\n  \"access_token_expiration\": \"1h\",\n  \"refresh_token_expiration\": \"30d\"\n}\n```\nAs can be seen, there is an option to use days directly, so there is no need to use `720h` in case of `refresh_token_expiration` in the example. \n\n[release]: https://img.shields.io/github/v/release/strvcom/strv-backend-go-time\n[codecov]: https://codecov.io/gh/strvcom/strv-backend-go-time\n[codecov-img]: https://codecov.io/gh/strvcom/strv-backend-go-time/branch/ci/github-actions/graph/badge.svg?token=FM3Y66NLKX\n[license]: https://img.shields.io/github/license/strvcom/strv-backend-go-time\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstrvcom%2Fstrv-backend-go-time","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fstrvcom%2Fstrv-backend-go-time","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstrvcom%2Fstrv-backend-go-time/lists"}