{"repo":"apache/casbin-gorm-adapter-ex","free":true,"listed":false,"github":"https://github.com/apache/casbin-gorm-adapter-ex","clone":"git clone https://github.com/apache/casbin-gorm-adapter-ex.git","description":"Extended version of GORM Adapter, see original version of GORM Adapter at: https://github.com/casbin/gorm-adapter","language":"Go","stars":14,"topics":["abac","access-control","acl","adapter","auth","casbin","database","go","golang","gorm"],"license":"Apache-2.0","category":"databases-storage","readme_excerpt":"Gorm Adapter Ex ==== This gorm-adapter-ex is an extended version of Gorm-Adapter. It introduces great and implements proposal of customizability by reflection. The database structure can be arbitrary as long as it has {\"ID\", \"Ptype\", \"V0\"} three fields. Background for why we create a new fork: casbin/gorm-adapter#179 (comment) casbin/gorm-adapter#168 (comment) About Gorm Adapter Gorm Adapter is the Gorm adapter for Casbin. With this library, Casbin can load policy from Gorm supported database or save policy to it. Based on Officially Supported Databases, The current supported databases are: - MySQL - PostgreSQL - SQL Server - Sqlite3 gorm-adapter use github.com/glebarez/sqlite instead of gorm official sqlite driver gorm.io/driver/sqlite because the latter needs cgo support. But there is almost no difference between the two driver. If there is a difference in use, please submit an issue. - other 3rd-party supported DBs in Gorm website or other places. Installation go get github.com/casbin/gorm-adapter/v3 Simple Example Turn off AutoMigrate New an adapter will use AutoMigrate by default for create table, if you want to turn it off, please use API TurnOffAutoMigrate(db gorm.DB) gorm.DB . See example: Find out more details at gorm-adapter#162 Customize table columns example You can change the gorm struct tags, but the table structure must stay the same. Getting Help - Casbin License This project is under Apache 2.0 License. See the LICENSE file for the full license text.","default_branch":null,"files":null,"tree":[],"storefront":"/r/apache","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/apache/casbin-gorm-adapter-ex/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}