Giter Club home page Giter Club logo

invoicing's Introduction

特色

本项目已经整合了许多开发API所必要的组件:

  1. Gin: 轻量级Web框架,自称路由速度是golang最快的
  2. GORM: ORM工具。本项目需要配合Mysql使用
  3. Gin-Session: Gin框架提供的Session操作工具
  4. Go-Redis: Golang Redis客户端
  5. godotenv: 开发环境下的环境变量工具,方便使用环境变量
  6. Gin-Cors: Gin框架提供的跨域中间件
  7. 自行实现了国际化i18n的一些基本功能
  8. 本项目是使用基于cookie实现的session来保存登录状态的,如果需要可以自行修改为token验证

Go Mod

本项目使用Go Mod管理依赖。

go mod init go-crud
export GOPROXY=http://mirrors.aliyun.com/goproxy/
go run main.go // 自动安装
  1. api文件夹就是MVC框架的controller,负责协调各部件完成任务
  2. model文件夹负责存储数据库模型和数据库操作相关的代码
  3. service负责处理比较复杂的业务,把业务代码模型化可以有效提高业务代码的质量(比如用户注册,充值,下单等)
  4. serializer储存通用的json模型,把model得到的数据库模型转换成api需要的json对象
  5. cache负责redis缓存相关的代码
  6. auth权限控制文件夹
  7. util一些通用的小工具
  8. conf放一些静态存放的配置文件,其中locales内放置翻译相关的配置文件

invoicing's People

Contributors

jackinheart avatar

Stargazers

popy32 avatar  avatar

Watchers

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