{"id":18787240,"url":"https://github.com/pantani/redis","last_synced_at":"2026-05-09T15:20:36.101Z","repository":{"id":57543921,"uuid":"250834100","full_name":"Pantani/redis","owner":"Pantani","description":"Simple abstraction for Go-Redis.","archived":false,"fork":false,"pushed_at":"2021-02-26T01:32:00.000Z","size":21,"stargazers_count":2,"open_issues_count":0,"forks_count":1,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-12-29T13:23:13.927Z","etag":null,"topics":["cache","database","go","go-redis","golang","redis"],"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/Pantani.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-03-28T15:48:35.000Z","updated_at":"2021-02-26T05:13:20.000Z","dependencies_parsed_at":"2022-09-18T00:00:25.258Z","dependency_job_id":null,"html_url":"https://github.com/Pantani/redis","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Pantani%2Fredis","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Pantani%2Fredis/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Pantani%2Fredis/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Pantani%2Fredis/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Pantani","download_url":"https://codeload.github.com/Pantani/redis/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239707317,"owners_count":19684044,"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":["cache","database","go","go-redis","golang","redis"],"created_at":"2024-11-07T20:53:56.478Z","updated_at":"2025-12-23T15:30:25.634Z","avatar_url":"https://github.com/Pantani.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![Go Reference](https://pkg.go.dev/badge/github.com/Pantani/redis.svg)](https://pkg.go.dev/github.com/Pantani/redis)\n[![codecov](https://codecov.io/gh/Pantani/redis/branch/master/graph/badge.svg?token=8IHUB3K2Q7)](https://codecov.io/gh/Pantani/redis)\n\n# Simple abstraction for [Go-Redis](github.com/go-redis/redis).\n\nSimple abstraction using generic interfaces for [Go-Redis](github.com/go-redis/redis).\n\nInitialize the database:\n```go\nimport \"github.com/Pantani/redis\"\n\ncache := redis.New(\"localhost:6379\", \"password\", 0)\nif err != nil {\n    panic(\"Cannot initialize the redis storage\")\n}\nif !storage.IsReady() {\n    panic(\"redis storage is not ready\")\n}\n```\n\n ## Fetching Objects:\n\n- Get value:\n```go\nvar result CustomObject\nerr := s.GetObject(\"key\", \u0026result)\n```\n\n- Add value\n```go\ndata := CustomObject{Name: \"name\", Id: \"id\"}\nerr := s.AddObject(\"key\", data, 0)\n\n// with expiration time\nerr := s.AddObject(\"key\", data, 10 * time.Second)\n```\n\n- Delete value:\n```go\nerr := s.DeleteObject(\"table\", \"key\")\n```\n\n\n### Hash Map\n\nRedis hash map abstraction\n\n- Get all values from a hash map table:\n```go\nresult, err := s.GetAllHMObjects(\"table\")\n```\n\n- Get value from a hash map table:\n```go\nvar result CustomObject\nerr := s.GetHMObject(\"table\", \"key\", \u0026result)\n```\n\n- Add value to a hash map table:\n```go\ndata := CustomObject{Name: \"name\", Id: \"id\"}\nerr := s.AddHMObject(\"table\", \"key\", data)\n```\n\n- Delete value from a hash map table:\n```go\nerr := s.DeleteHMObject(\"table\", \"key\")\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpantani%2Fredis","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpantani%2Fredis","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpantani%2Fredis/lists"}