{"id":19298218,"url":"https://github.com/casbin/ent-adapter","last_synced_at":"2025-04-10T21:44:20.760Z","repository":{"id":41184173,"uuid":"364941452","full_name":"casbin/ent-adapter","owner":"casbin","description":"Ent adapter for Casbin","archived":false,"fork":false,"pushed_at":"2025-02-25T11:50:33.000Z","size":90,"stargazers_count":54,"open_issues_count":0,"forks_count":18,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-04-10T21:44:06.869Z","etag":null,"topics":["abac","access-control","acl","adapter","auth","authorization","authz","casbin","ent","orm","rbac","storage-driver"],"latest_commit_sha":null,"homepage":"https://github.com/casbin/casbin","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/casbin.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},"funding":{"github":"casbin"}},"created_at":"2021-05-06T14:38:56.000Z","updated_at":"2025-02-25T11:50:27.000Z","dependencies_parsed_at":"2024-11-09T16:36:49.423Z","dependency_job_id":null,"html_url":"https://github.com/casbin/ent-adapter","commit_stats":{"total_commits":11,"total_committers":7,"mean_commits":"1.5714285714285714","dds":0.6363636363636364,"last_synced_commit":"4657ed976cefc6964344ffa21315ba948e10bc64"},"previous_names":[],"tags_count":10,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/casbin%2Fent-adapter","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/casbin%2Fent-adapter/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/casbin%2Fent-adapter/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/casbin%2Fent-adapter/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/casbin","download_url":"https://codeload.github.com/casbin/ent-adapter/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248305885,"owners_count":21081562,"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":["abac","access-control","acl","adapter","auth","authorization","authz","casbin","ent","orm","rbac","storage-driver"],"created_at":"2024-11-09T23:07:16.718Z","updated_at":"2025-04-10T21:44:20.752Z","avatar_url":"https://github.com/casbin.png","language":"Go","funding_links":["https://github.com/sponsors/casbin"],"categories":[],"sub_categories":[],"readme":"Ent Adapter\n===\n[![Go Report Card](https://goreportcard.com/badge/github.com/casbin/gorm-adapter)](https://goreportcard.com/report/github.com/casbin/ent-adapter)\n[![Go](https://github.com/casbin/ent-adapter/actions/workflows/ci.yml/badge.svg)](https://github.com/casbin/ent-adapter/actions/workflows/ci.yml)\n[![Coverage Status](https://coveralls.io/repos/github/casbin/ent-adapter/badge.svg?branch=master)](https://coveralls.io/github/casbin/ent-adapter?branch=master)\n\nEnt Adapter is the [ent](https://github.com/ent/ent) adapter for [Casbin](https://github.com/casbin/casbin). With this library, Casbin can load policy from PostgresSQL/Mysql or save policy to it.\n\n## Installation\n\n    go get github.com/casbin/ent-adapter\n\n\n## Usage\n\n```go\n    a, err := NewAdapter(\"mysql\", \"root:@tcp(127.0.0.1:3306)/casbin\")\n    //a, err := NewAdapter(\"postgres\", \"user=postgres password=postgres host=127.0.0.1 port=5432 dbname=casbin\")\n    if err != nil {\n        panic(err)\t\n    }\n    e, err := casbin.NewEnforcer(\"/path/to/model\",a)\n```\n\n## Notification\n\nThe database used in the adapter should be created manually before NewAdapter calling.\n\n## Getting Help\n\n- [Casbin](https://github.com/casbin/casbin)\n\n## License\n\nThis project is under Apache 2.0 License. See the [LICENSE](LICENSE) file for the full license text.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcasbin%2Fent-adapter","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcasbin%2Fent-adapter","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcasbin%2Fent-adapter/lists"}