{"id":22568482,"url":"https://github.com/ducconit/gocore","last_synced_at":"2025-03-28T13:44:11.616Z","repository":{"id":265860087,"uuid":"884380165","full_name":"ducconit/gocore","owner":"ducconit","description":"A lightweight and flexible core library for Go applications","archived":false,"fork":false,"pushed_at":"2024-12-15T15:40:18.000Z","size":60,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-02T14:14:25.928Z","etag":null,"topics":["codebase","dnt","ducconit","gocore","utilities"],"latest_commit_sha":null,"homepage":"https://github.com/ducconit/gocore","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ducconit.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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":"2024-11-06T16:39:26.000Z","updated_at":"2024-12-15T15:40:22.000Z","dependencies_parsed_at":"2024-12-08T10:22:25.871Z","dependency_job_id":null,"html_url":"https://github.com/ducconit/gocore","commit_stats":null,"previous_names":["ducconit/gocore"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ducconit%2Fgocore","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ducconit%2Fgocore/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ducconit%2Fgocore/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ducconit%2Fgocore/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ducconit","download_url":"https://codeload.github.com/ducconit/gocore/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246041444,"owners_count":20714138,"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":["codebase","dnt","ducconit","gocore","utilities"],"created_at":"2024-12-08T00:13:25.858Z","updated_at":"2025-03-28T13:44:11.581Z","avatar_url":"https://github.com/ducconit.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# GoCore\n\nA lightweight and flexible core library for Go applications by DNT.\n\n## Features\n\n### Configuration Management\n- Multiple configuration sources (YAML, JSON, ENV)\n- Type-safe configuration access\n- Dynamic configuration updates\n- Configuration validation\n- Environment variable support\n\n### Caching System\n- Multiple cache backends (Memory, Redis)\n- TTL support\n- Cache tags\n- Bulk operations\n- Automatic key expiration\n\n### Message Queue\n- Multiple queue backends\n- Message patterns (Pub/Sub, Work Queue, RPC)\n- Dead letter queue\n- Message retry\n- Priority queue\n\n### Logging System\n- Multiple log levels\n- Structured logging\n- Output formatting\n- Log rotation\n- Context-aware logging\n\n### Error Handling\n- Error wrapping\n- Stack traces\n- Error types\n- HTTP error integration\n- Error context\n- Localization support\n\n## Installation\n\n```bash\ngo get github.com/ducconit/gocore\n```\n\n## Quick Start\n\n### Configuration\n\n```go\nimport \"github.com/ducconit/gocore/config\"\n\nfunc main() {\n    // Create configuration\n    cfg := config.New(\n        config.WithFile(\"config.yaml\"),\n        config.WithEnv(),\n    )\n\n    // Access configuration\n    port := cfg.GetInt(\"server.port\", 8080)\n    host := cfg.GetString(\"server.host\", \"localhost\")\n}\n```\n\n### Caching\n\n```go\nimport \"github.com/ducconit/gocore/cache\"\n\nfunc main() {\n    // Create cache\n    c := cache.NewRedisCache(\n        cache.WithRedisAddr(\"localhost:6379\"),\n    )\n\n    // Use cache\n    c.Set(\"key\", \"value\", 5*time.Minute)\n    val, err := c.Get(\"key\")\n}\n```\n\n### Logging\n\n```go\nimport \"github.com/ducconit/gocore/logger\"\n\nfunc main() {\n    // Create logger\n    log := logger.New(\n        logger.WithLevel(logger.InfoLevel),\n        logger.WithOutput(\"path/to/file.log\"),\n    )\n\n    // Log messages\n    log.Info(\"Server starting\", zap.String(\"port\", \"3000\"))\n}\n```\n\n### Error Handling\n\n```go\nimport \"github.com/ducconit/gocore/errors\"\n\nfunc main() {\n    // Create error\n    err := errors.NewWithCode(404, \"user not found\").\n        WithContext(\"user_id\", 123)\n\n    // Handle error\n    if e, ok := err.(errors.Error); ok {\n        fmt.Printf(\"Code: %d, Message: %s\\n\", e.Code(), e.Message())\n    }\n}\n```\n\n## Documentation\n\nDetailed documentation for each package can be found in their respective directories:\n\n- [Configuration Package](config/README.md)\n- [Cache Package](cache/README.md)\n- [Queue Package](queue/README.md)\n- [Logger Package](logger/README.md)\n- [Errors Package](errors/README.md)\n\n## Contributing\n\n1. Fork the repository\n2. Create your feature branch (`git checkout -b feature/amazing-feature`)\n3. Commit your changes (`git commit -m 'Add amazing feature'`)\n4. Push to the branch (`git push origin feature/amazing-feature`)\n5. Open a Pull Request\n\n## License\n\nMIT License\n\n## Support\n\nFor support, please open an issue in the GitHub repository.\n\n## Contributors\n\n\u003c!-- readme: contributors -start --\u003e\n\u003ctable\u003e\n\t\u003ctbody\u003e\n\t\t\u003ctr\u003e\n            \u003ctd align=\"center\"\u003e\n                \u003ca href=\"https://github.com/ducconit\"\u003e\n                    \u003cimg src=\"https://avatars.githubusercontent.com/u/72369814?v=4\" width=\"100;\" alt=\"ducconit\"/\u003e\n                    \u003cbr /\u003e\n                    \u003csub\u003e\u003cb\u003eDuke\u003c/b\u003e\u003c/sub\u003e\n                \u003c/a\u003e\n            \u003c/td\u003e\n\t\t\u003c/tr\u003e\n\t\u003ctbody\u003e\n\u003c/table\u003e\n\u003c!-- readme: contributors -end --\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fducconit%2Fgocore","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fducconit%2Fgocore","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fducconit%2Fgocore/lists"}