GORM integration for the Go Advanced Admin Panel.
This package provides GORM integration for the Go Advanced Admin Panel, allowing you to use GORM as your ORM backend.
Add the module to your project by running:
go get github.com/go-advanced-admin/gorm-integration
For detailed documentation on how to use the GORM integration, please visit the official documentation website.
import (
"github.com/go-advanced-admin/admin"
"github.com/go-advanced-admin/gorm-integration"
"gorm.io/driver/sqlite"
"gorm.io/gorm"
)
func main() {
// Initialize GORM
db, err := gorm.Open(sqlite.Open("test.db"), &gorm.Config{})
if err != nil {
panic("failed to connect database")
}
// Initialize the ORM integrator
ormIntegrator := admingorm.NewIntegrator(db)
// Use ormIntegrator when initializing the admin panel
}
For more detailed examples and configuration options, please refer to the GORM Integration Guide.
Contributions are always welcome! Please refer to the Contributing Guidelines in the main repository.
This project is licensed under the Apache 2.0 License - see the LICENSE file for details.