Git Product home page Git Product logo

golang-gin-restfulapi-example-app's Introduction

golang-gin-restfulAPI-example-app

一个用go语言基于Gin写的restful风格api服务程序的例子.

项目特性

项目目录

.
├── server.go                       // 入口文件
├── docs                            // swagger生成的api文档
├── web                             // vue写的前端单页页面
├── common
│   ├── db                          // mongoDB相关
│   ├── utils                       // 公用工具函数
│   ├── pkg                         // 公用包
|   |   └── e
|   |       ├── code.go             // http状态码常量
│   |       └── message.go          // 状态码对应的message常量
│   ├── validator
|   |   ├── custom_validate.go      // 自定义验证器
│   |   └── v8_to_v9.go             // 将gin的默认验证器从v8升级到v9
│   └── middlewares     
|       ├── authz.go                // 角色认证
│       └── session.go              // 使用session
├── conf                            // 应用配置相关文件
|   ├── authz                       
|   |   ├── model.conf              // 权限管理方案配置
│   |   └── policy.csv              // 权限分配表
|   ├── app.ini                     // 应用配置文件
│   └── conf.go                     // 初始化配置文件
└── routers
    ├── routers.go                  // 路由初始化
    └── api                         // api文件
        └── v1                      // api版本v1
            ├── v1.go               // v1版本api入口
            ├── mining-machine      // 矿机模块
            |   ├── models.go       // 模型和数据库操作
            |   ├── controlers.go   // 当前模块的控制器
            |   ├── routers.go      // 当前模块的路由
            |   ├── middlewares.go  // 当前模块的中间件
            |   └── validators.go   // 当前模块的验证器
            └── user                // 用户模块
                ├── models.go       // 模型和数据库操作
                ├── controlers.go   // 当前模块的控制器
                ├── routers.go      // 当前模块的路由
                ├── middlewares.go  // 当前模块的中间件
                └── validators.go   // 当前模块的验证器
    

联系作者

微信:wuhe52

golang-gin-restfulapi-example-app's People

Watchers

James Cloos 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.