Giter VIP home page Giter VIP logo

micro_web_service's Introduction

micro_web_service

Build a micro web service for go users.

本框架的初衷是分享并理解常用的Go语言工具,其次才是做一个易用的框架。方便使用者有任何定制修改时,可以快速fork并自己实现。

目录介绍

  • idlprotobuf定义的IDL文件,用于生成Go以及其它语言的数据结构
  • gen 从idl生成的文件,不允许手动修改
  • internal 项目内部的重要实现

手工安装

  1. go语言版本 >=1.15
  2. buf工具 >=0.54.1
  3. grpc-gateway相关二进制文件的安装
go install \
    github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-grpc-gateway \
    github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-openapiv2 \
    google.golang.org/protobuf/cmd/protoc-gen-go \
    google.golang.org/grpc/cmd/protoc-gen-go-grpc
  1. PGV插件 参考https://github.com/envoyproxy/protoc-gen-validate#installation
# fetches this repo into $GOPATH
go get -d github.com/envoyproxy/protoc-gen-validate

# installs PGV into $GOPATH/bin
make build

按官方文档方式安装不了,建议直接用go get -u github.com/envoyproxy/protoc-gen-validate

保证上述安装的结果都放在了PATH目录下,可执行 以上四个二进制程序的版本需要关注,尤其是带v2的 PS: 有同学会遇到一些很奇怪的问题,往往是因为存在多个二进制程序及版本

Docker镜像

docker pull mysql:5.7
sudo docker run -p 3306:3306 --name mysql -e MYSQL_ROOT_PASSWORD=123456 -d mysql:5.7

micro_web_service's People

Contributors

junedayday avatar

Watchers

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