GithubHelp home page GithubHelp logo

short_url's Introduction

GO版本短网址服务

相关依赖

  1. 基础框架:GIN(https://github.com/gin-gonic/gin)
  2. 数据库:GORM(https://gorm.io/zh_CN/docs/)
  3. Redis:https://github.com/go-redis/redis
  4. 配置管理:https://github.com/spf13/viper
  5. 日期处理:Carbon

部署方法

  1. Clone 本项目
  2. 修改配置cp config.json.tmp config.json,完善配置
  3. 数据迁移go run main/migrate
  4. 启动服务go run main/service

使用方法

  1. 联系管理员获取Key+Secret,注意每个Key的数据相互隔离,数据存在auth数据表中
  2. 通过自定义Header传入验证参数(服务端调用,简单验证)
    1. X-Auth-Key = Key
    2. X-Auth-Secret = Secret
    3. 调用接口:POST 127.0.0.1:8090/api/url ,生成短链,访问短链即可跳转

提供的接口

详见:test目录下 short_url.http

short_url's People

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.