Coder Social home page Coder Social logo

go-easy-admin's Introduction

Go Easy Admin


基于Gin+Gorm实现非常简单的脚手架


项目介绍

go-easy-admin是一个非常简单的gin+gorm脚手架,非常适合学习完golang基础的同学来进行练习使用。其中角色、权限都已经设计好,我们只需要关注业务接口即可。

目录结构

go-easy-admin
├─app  ------------------------项目初始化操作
├─common  ------------------全局公用
├─config  ---------------------配置文件
├─controllers  ----------------控制层
├─dao  ------------------------数据库的CRUD
├─deployment  ---------------部署相关文件
├─middles  --------------------中间件
├─models  ---------------------数据库表以及请求参数定义
├─routers  ---------------------路由
├─service  ---------------------业务逻辑
=======

中间件casbin

go get github.com/casbin/gorm-adapter/v3
go get github.com/casbin/casbin/v2

功能概述

image-20231207164738020

其他功能前端还没有完成,暂时使用该图占位使用。

快速开始

拉取代码

git clone  https://github.com/kubesre/go-easy-admin.git`
``

### 修改配置文件

```bash
cd  go-easy-admin/config
mv  application-example.yaml   application.yaml
cat  application.yaml
server:
  port: 8899
  address: 0.0.0.0
  name: go-easy-admin
  # # 生产环境建议使用release,debug:可以使用debug模式
  model: debug

mysql:
  DbHost: 127.0.0.1
  DbPort: 3306
  # 数据库名称 需要提前创建好
  DbName: go-easy-admin
  DbUser: root
  DbPwd: 123456
  MaxIdleConns: 10
  MaxOpenConns: 100
  # 是否开启debug,1 开启 0 关闭
  ActiveDebug: 1

jwt:
  realm: go-easy-admin
  # jwt加密因子
  key: anruo
  #  jwt token过期时间 单位为小时
  timeout: 1
  # jwt token刷新时间 单位为小时
  maxRefresh: 1

启动服务

go run main.go

go-easy-admin's People

Contributors

cf1998 avatar linorwang avatar zxl00 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.