Skip to content

go-advanced-admin/orm-gorm

Go Advanced Admin - GORM Integration

GORM integration for the Go Advanced Admin Panel.

Go Report Card Go License: Apache-2.0 Go.Dev reference

This package provides GORM integration for the Go Advanced Admin Panel, allowing you to use GORM as your ORM backend.

Installation

Add the module to your project by running:

go get github.com/go-advanced-admin/gorm-integration

Documentation

For detailed documentation on how to use the GORM integration, please visit the official documentation website.

Quick Start

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.

Contributing

Contributions are always welcome! Please refer to the Contributing Guidelines in the main repository.

License

This project is licensed under the Apache 2.0 License - see the LICENSE file for details.