GithubHelp home page GithubHelp logo

piglin's Introduction

piglin-猪灵图床

猪灵图床 一款图床API 一键部署 可以嵌入你的网页、APP、等。

所用框架

web框架:Gin

go get -u github.com/gin-gonic/gin

数据库:GORM

go get -u gorm.io/gorm

缓存:Go Redis

go get github.com/redis/go-redis/v9

MVC

Controller 层

主要做鉴权、基本数据校验 和 构造业务层需要的数据 比如校验用户昵称长度等

Service 层

具体的业务实现 比如 新增用户这样一个业务的实现逻辑

DAO 层

使用MySQL持久化数据 最基本的增删改查 比如向数据库的用户表插入一条用户数据

API介绍

使用Rest风格 和 基于OAuth2.0的权限校验

响应基类

{
  "code": 0,
  "err": "err msg",
  "result": {
    "key1": "value1",
    "key2": "value2",
  }
}

用户API

注册

登录

更新token

piglin's People

Contributors

tc7326 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.