{"id":39737722,"url":"https://github.com/ralscha/govers","last_synced_at":"2026-01-18T11:09:19.411Z","repository":{"id":327924983,"uuid":"1105145059","full_name":"ralscha/govers","owner":"ralscha","description":null,"archived":false,"fork":false,"pushed_at":"2025-12-10T09:02:54.000Z","size":98,"stargazers_count":0,"open_issues_count":4,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-12-10T12:06:23.703Z","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":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ralscha.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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-11-27T07:45:10.000Z","updated_at":"2025-12-10T09:00:59.000Z","dependencies_parsed_at":"2025-12-10T12:08:06.833Z","dependency_job_id":null,"html_url":"https://github.com/ralscha/govers","commit_stats":null,"previous_names":["ralscha/govers"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/ralscha/govers","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ralscha%2Fgovers","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ralscha%2Fgovers/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ralscha%2Fgovers/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ralscha%2Fgovers/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ralscha","download_url":"https://codeload.github.com/ralscha/govers/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ralscha%2Fgovers/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28535156,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-18T10:13:46.436Z","status":"ssl_error","status_checked_at":"2026-01-18T10:13:11.045Z","response_time":98,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: 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":[],"created_at":"2026-01-18T11:09:17.547Z","updated_at":"2026-01-18T11:09:19.405Z","avatar_url":"https://github.com/ralscha.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# govers\n\nA Go library for object auditing and versioning, inspired by [JaVers](https://javers.org/).\n\n## Features\n\n- Track changes to domain objects over time\n- Create snapshots (INITIAL, UPDATE, TERMINAL) for each object state\n- Query historical data and changes\n- Pluggable repository backends (in-memory, PostgreSQL, MongoDB included)\n\n## Installation\n\n```bash\ngo get github.com/ralscha/govers/core\n```\n\nFor specific repository backends:\n\n```bash\n# In-memory\ngo get github.com/ralscha/govers/inmemory\n\n# PostgreSQL\ngo get github.com/ralscha/govers/postgres\n\n# MongoDB\ngo get github.com/ralscha/govers/mongodb\n```\n\n## Usage\n\n```go\npackage main\n\nimport (\n    \"context\"\n    \"fmt\"\n    \"github.com/ralscha/govers/core\"\n    \"github.com/ralscha/govers/inmemory\"\n)\n\ntype User struct {\n    ID   string `govers:\"id\"`\n    Name string\n}\n\nfunc main() {\n    ctx := context.Background()\n    repo := inmemory.New()\n    g := core.New(core.WithRepository(repo))\n\n    // Commit initial state\n    user := User{ID: \"1\", Name: \"Alice\"}\n    g.Commit(ctx, \"admin\", \u0026user)\n\n    // Commit an update\n    user.Name = \"Alice Smith\"\n    g.Commit(ctx, \"admin\", \u0026user)\n\n    // Query snapshots for this user\n    query := core.ByInstanceIDQuery(\"User\", \"1\").Build()\n    snapshots, _ := g.FindSnapshots(ctx, query)\n    for _, s := range snapshots {\n        fmt.Printf(\"v%d [%s]: %s (changed: %v)\\n\", s.Version, s.Type, s.State.String(), s.ChangedProperties)\n    }\n\n    // Get latest snapshot directly\n    latest, _ := g.GetLatestSnapshot(ctx, \"User\", \"1\")\n    fmt.Printf(\"Latest: %s\\n\", latest.State.String())\n}\n\n// Output:\n// v2 [UPDATE]: User{ID:1, Name:Alice Smith} (changed: [Name])\n// v1 [INITIAL]: User{ID:1, Name:Alice} (changed: [])\n// Latest: User{ID:1, Name:Alice Smith}\n```\n\n## License\n\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fralscha%2Fgovers","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fralscha%2Fgovers","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fralscha%2Fgovers/lists"}