go-sqlcipher | Golang SQLCipher driver conforming to the built-in | Database library
kandi X-RAY | go-sqlcipher Summary
kandi X-RAY | go-sqlcipher Summary
Golang SQLCipher driver conforming to the built-in database/sql interface and using the latest sqlite3 code.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of go-sqlcipher
go-sqlcipher Key Features
go-sqlcipher Examples and Code Snippets
Community Discussions
Trending Discussions on go-sqlcipher
QUESTION
I have a requirement for using an ORM for my Go application which can connect to a postgreSQL db or SQLite db.
The docs of gorm don't mention anything about connecting to an encrypted sqlite db.
Is it possible to use it or any way of providing a custom driver for sqlite which will work with and encrypted SQlite DB?
UPDATE
As per Ezequiel Muns comment, I updated the gorm SQLite driver code to use github.com/mutecomm/go-sqlcipher.
This new GORM driver can be found here.
Cheers !!
...ANSWER
Answered 2021-Mar-27 at 16:06Gorm uses a system of drivers that adapt the individual database clients for its use.
You'd have to create a new module that copies the source of go-gorm/driver/sqlite
but updating https://github.com/go-gorm/sqlite/blob/master/sqlite.go#L8 to import the alternate library of your choice. Since these are forks and they comply with the database/sql interface, it should just work. You'll then be able to use this new driver as per normal in gorm:
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install go-sqlcipher
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page