{"id":20180412,"url":"https://github.com/ppcamp/go-user-crud","last_synced_at":"2025-05-07T03:30:31.441Z","repository":{"id":37846190,"uuid":"506306944","full_name":"ppcamp/go-user-crud","owner":"ppcamp","description":"This project will be part of a microservice post that I'll make. This pkg will be responsible to handle with user's info (user's CRUD) using a \"Shared Nothing\" + \"Saga\" pattern","archived":true,"fork":false,"pushed_at":"2022-06-22T15:44:07.000Z","size":28,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-03T05:43:45.816Z","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":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ppcamp.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}},"created_at":"2022-06-22T15:35:57.000Z","updated_at":"2024-05-19T17:47:30.000Z","dependencies_parsed_at":"2022-08-19T07:41:04.903Z","dependency_job_id":null,"html_url":"https://github.com/ppcamp/go-user-crud","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ppcamp%2Fgo-user-crud","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ppcamp%2Fgo-user-crud/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ppcamp%2Fgo-user-crud/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ppcamp%2Fgo-user-crud/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ppcamp","download_url":"https://codeload.github.com/ppcamp/go-user-crud/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252806321,"owners_count":21807188,"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":[],"created_at":"2024-11-14T02:30:42.429Z","updated_at":"2025-05-07T03:30:31.124Z","avatar_url":"https://github.com/ppcamp.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# microservice: authentication\r\n\r\nResponsible to:\r\n\r\n- Login (Generate JWT token)\r\n- Refresh (Update token basing with an old one)\r\n- Validate sessions\r\n- Invalidate sessions\r\n\r\nIt uses JWT under the hood. It alsos uses Go subpackages.\r\nBasing this approach on https://curity.io/resources/learn/jwt-best-practices/\r\n\r\n\r\n## How it works?\r\n\r\n\r\n## Database\r\n\r\nNote that users don't belong to current database and it's response depends on\r\nthe user's crud to remove them.\r\n\r\n```mermaid\r\nerDiagram\r\n  users {\r\n    uuid id\r\n    varchar_50 first_name\r\n    varchar_130 middle_name\r\n    varchar_20 last_name\r\n    varchar_20 nick\r\n    varchar_100 email\r\n    bool active\r\n    date birthdate\r\n    timestamp created_at\r\n    timestamp updated_at\r\n  }\r\n```\r\n\r\n## How to generate some key?\r\n\r\nThis project is currently using ECSDA P512 algorithm to auth the JWT token.\r\nTo generate a new key, type:\r\n\r\n```bash\r\n# Generates a new key, which should be in some var\r\nssh-keygen -t ecdsa -b 521\r\n```\r\n\r\n\r\nInstall\r\n\r\n```bash\r\ncurl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(go env GOPATH)/bin v1.45.2\r\n```\r\n\r\n## TODO\r\n\r\n- [ ] Allow repositories the possibility to use NonTransaction connection\r\n\r\n\r\n## See\r\n\r\n- https://github.com/golang-migrate/migrate/tree/master/cmd/migrate\r\n\r\n\r\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fppcamp%2Fgo-user-crud","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fppcamp%2Fgo-user-crud","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fppcamp%2Fgo-user-crud/lists"}