GithubHelp home page GithubHelp logo

shirosoralumie648 / eoefans-api Goto Github PK

View Code? Open in Web Editor NEW

This project forked from a-soulfan/asasfans-api

0.0 0.0 0.0 128 KB

fork from asasfans

License: Apache License 2.0

Go 98.12% Dockerfile 1.88%

eoefans-api's Introduction

asasfans-goapi

asasfans api支持

项目主页

环境

  • golang 1.17+
  • mysql 8.0+

目录结构

├─builder # 构建目录
│  ├─asasapi
│  └─asasspider
├─cmd # 可执行文件
│  └─asasapi
├─config   # 配置文件
└─internal # 内部使用
   ├─app   # 具体应用
   │  └─asasapi 
   │      ├─apperrors
   │      ├─handler # http handler
   │      ├─help    # 助手函数
   │      ├─idl     # 资源定义
   │      ├─middlewares # 中间件
   │      ├─repository
   │      ├─router  # http router
   │      ├─service 
   │      ├─spider 
   │      └─util 工具库
   ├─launcher  # 基础启动器
   └─pkg   # 第三方依赖封装
      ├─bilibili
        ├─cache
        ├─config
        ├─database
        ├─httpclient
        ├─httpserver
        ├─log
        └─smsclient

开始

本地运行

# clone repository
git clone [email protected]:A-SoulFan/asasfans-api.git

# download go mod 
cd asasfans-api && go mod download

Docker builder

builder api server

# clone repository
git clone [email protected]:A-SoulFan/asasfans-api.git

cd asasfans-api

# docker builder
# 如果在 CN 进行 build 请自行将 Dockerfile 中注释的镜像源相关行开启
docker build --rm -t asasfans-api:latest -f builder/asasapi/Dockerfile .

# spider builder 可选的
docker build --rm -t asasfans-spider:latest -f builder/asasspider/Dockerfile .

# copy config file 并自行修改相关配置
cp config/config.template.yml config/asasapi.yml

# docker run
docker run \
  --detach \
  --name asasfans-api \
  --volume $PWD/config:/config \
  asasfans-api:latest

开发者规范

命名规范

  • 文件命名
    • 全小写
    • 尽可能短
    • 尽量避免使用 _,如果一定要分割,使用 _
  • 变量命名
    • 驼峰
  • 常量命名
    • 驼峰

开发流程

Fork & Pull Request 流程

  • fork repository
  • checkout develop -> feature
  • coding
  • pull request
  • review
  • merge

相关工具

  • apifox
    • 注册后联系管理者加组

eoefans-api's People

Contributors

runstp avatar oldking139 avatar zocp 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.