ory / ladon

A SDK for access control policies: authorization for the microservice and IoT age. Inspired by AWS IAM policies. Written for Go.

Home Page:https://www.ory.sh/?utm_source=github&utm_medium=banner&utm_campaign=ladon

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

sqlx requirement for sql manager

zikes opened this issue · comments

commented

In the documentation (https://github.com/ory/ladon#persistence) the SQL example shows a database connection created using stdlib's sql.Open, however the ladon/manager/sql NewSQLManager function lists the first argument as db *sqlx.DB. As a result, when a standard *sql.DB is passed in, this error is given:

cannot use ladonDb (type *"database/sql".DB) as type *sqlx.DB in argument to "github.com/ory/ladon/manager/sql".NewSQLManager
commented

I realize this is closed, but I ran into the same thing, so I wrote my own SQLManager https://github.com/wirepair/ladonsqlmanager that removes the migration/sqlx dependencies. It requires you to manage the tables externally (which is what i want to do anyways).

Nice, if you want, you can add it to the readme at the bottom under a new section "3rd Party Libraries" :)

commented

Done :>