Code Monkey home page Code Monkey logo

gozeroscaffold's Introduction

项目说明

  • model:
    • model使用的的是gorm的gen自动生成的代码,所以model的结构是固定的,如果需要修改,请参考gorm的gen文档修改生成代码的参数
    • 修改数据库表结构先再数据库修改,然后执行命令make model生成model代码
  • http response status 说明
    • 200: 正常
      • body code:
        • -1: 普通错误
        • 500: 服务器错误(需要查日志定位)
        • 400: 参数错误,会将错误信息直接返回给前端
      • 错误码制定:
        • -1 默认错误码不需要做任何处理,直接再logic中 return nil, err 即可
        • 非-1的错误码,需要在logic中特殊设置下,如 return nil, errors.New(http.StatusInternalServerError, "系统内部错误")
    • 401: 未登录
      • body为空

gozeroscaffold's People

Contributors

silver-brother 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.