Giter VIP home page Giter VIP logo

unionj-cloud / go-doudou Goto Github PK

View Code? Open in Web Editor NEW
1.4K 96.0 247.0 33.23 MB

go-doudou(doudou pronounce /dəudəu/)is OpenAPI 3.0 (for REST) spec and Protobuf v3 (for grpc) based lightweight microservice framework. It supports monolith service application as well.

Home Page: https://go-doudou.github.io

License: MIT License

Go 98.63% Makefile 0.01% Shell 0.02% ANTLR 1.35%
golang microservice apollo cloud-native framework go nacos openapi orm rest

go-doudou's Introduction

Vite logo


Mentioned in Awesome Go GoDoc Go codecov Go Report Card Release License: MIT License: MIT


go-doudou

Lightweight Golang Microservice Framework

  • 💡 Starts from golang interface, no need to learn new IDL(interface definition language).
  • 🔩 Powerful code generator cli built-in. After defining your interface methods, your only job is implementing your awesome idea.
  • ⚡ Born from the cloud-native era. Built-in CLI can speed up your product iteration.
  • 🔑 Built-in service governance support including remote configuration management, client-side load balancer, rate limiter, circuit breaker, bulkhead, timeout, retry and more.
  • 📦️ Supporting both monolith and microservice architectures gives you flexibility to design your system.

Go-doudou(doudou pronounce /dəudəu/)is OpenAPI 3.0 (for REST) spec and Protobuf v3 (for grpc) based lightweight microservice framework. It supports monolith service application as well.

Read the Docs https://go-doudou.unionj.cloud to Learn More.

Benchmark

benchmark

Machine: MacBook Pro (16-inch, 2019)
CPU: 2.3 GHz 8 cores Intel Core i9
Memory: 16 GB 2667 MHz DDR4
ProcessingTime: 0ms, 10ms, 100ms, 500ms
Concurrency: 1000
Duration: 30s
go-doudou Version: v1.3.7

Checkout the test code

Credits

Give credits to following repositories and all their contributors:

Community

Welcome to contribute to go-doudou by forking it and submitting pr or issues. If you like go-doudou, please give it a star!

Welcome to contact me from

🔋 JetBrains Open Source License

Go-doudou has been being developed with GoLand under the free JetBrains Open Source license(s) granted by JetBrains s.r.o., hence I would like to express my gratitude here.

JetBrains Logo (Main) logo.

License

MIT

go-doudou's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

go-doudou's Issues

internationalization

Hi guys, I would like to know what is the flow to follow to help with the translation of the documentation into another language?

项目引用了github.com/buger/jsonparser等549个开源组件,存在9个漏洞,建议升级

大佬,看你这个项目调用了github.com/buger/jsonparser等549个开源组件,存在9个安全漏洞,建议你升级下。

漏洞标题:Buger Jsonparser 安全漏洞
漏洞编号:CVE-2020-35381
漏洞描述:
Buger Jsonparser是Buger个人开发者的一个基于Go语言的用于与json格式数据进行交互的代码库。
jsonparser 1.0.0 存在安全漏洞,该漏洞允许攻击者可利用该漏洞通过GET调用导致拒绝服务。
影响范围:(∞, 1.1.1)
最小修复版本:1.1.1
引入路径:
github.com/unionj-cloud/go-doudou@->github.com/containerd/[email protected]>github.com/containernetworking/[email protected]>github.com/buger/[email protected]

另外8个漏洞 ,信息有点多我就不贴了,你自己看下完整报告:https://www.mfsec.cn/jr?p=a3adc8
你对这个issues有任何疑问可以回复我,我能看见哈。

Who use go-doudou?

Please leave a comment to tell us if you are using go-doudou. Please attach company logo if possible. Thanks for support!

中文繁简互转说明

中文繁简互转说明

安装说明

先安装 opencc 套件

$ apt-get install opencc libopencc1.1

$ opencc --version

$ Open Chinese Convert (OpenCC) Command Line Tool
# Version: 1.1.1

$ opencc --help

查找所支持的标准

先列出所有的标准,并查找细节

$ locate opencc | grep share | grep json
# /usr/share/opencc/hk2s.json
# /usr/share/opencc/hk2t.json
# /usr/share/opencc/jp2t.json
# /usr/share/opencc/s2hk.json
# /usr/share/opencc/s2t.json
# /usr/share/opencc/s2tw.json
# /usr/share/opencc/s2twp.json
# /usr/share/opencc/t2hk.json
# /usr/share/opencc/t2jp.json
# /usr/share/opencc/t2s.json
# /usr/share/opencc/t2tw.json
# /usr/share/opencc/tw2s.json
# /usr/share/opencc/tw2sp.json
# /usr/share/opencc/tw2t.json

$ head /usr/share/opencc/s2t.json
# {
#   "name": "Simplified Chinese to Traditional Chinese",
#   "segmentation": {
#     "type": "mmseg",
#     "dict": {
#       "type": "ocd2",
#       "file": "STPhrases.ocd2"
#     }
#   },
#   "conversion_chain": [{

$ head /usr/share/opencc/s2twp.json
# {
#   "name": "Simplified Chinese to Traditional Chinese (Taiwan standard, with phrases)",
#   "segmentation": {
#     "type": "mmseg",
#     "dict": {
#       "type": "ocd2",
#       "file": "STPhrases.ocd2"
#     }
#   },
#   "conversion_chain": [{

中文简转繁

使用以下指令去尝试语言互换

$ echo '数据库' | opencc -c s2t
# 數據庫

$ echo '数据库' | opencc -c s2twp
# 資料庫

$ echo '数据库' > foo.cn.txt

$ opencc -i ./foo.cn.txt -c s2twp -o ./foo.tw.txt 

$ cat ./foo.tw.txt
# 資料庫

中文繁转简

使用以下指令去尝试语言互换

$ echo '資料庫' | opencc -c t2s
# 资料库

$ echo '資料庫' | opencc -c tw2sp
# 数据库

$ echo '資料庫' > foo.tw.txt

$ opencc -i ./foo.tw.txt -c tw2sp -o ./foo.cn.txt 

$ cat ./foo.cn.txt 
# 数据库

Bug for go-doudou name CLI

Rerun //go:generate go-doudou name --file $GOFILE --form command multiple times will overwrite json tag and generate multiple form tag

: ambiguous import: found package github.com/antlr/antlr4/runtime/Go/antlr in multiple modules:

(base) [root@localhost go-doudou]# go get -v -u github.com/unionj-cloud/go-doudou/[email protected]
github.com/unionj-cloud/go-doudou/timeutils imports
github.com/hyperjumptech/jiffy imports
github.com/antlr/antlr4/runtime/Go/antlr: ambiguous import: found package github.com/antlr/antlr4/runtime/Go/antlr in multiple modules:
github.com/antlr/antlr4 v0.0.0-20200124162019-2d7f727a00b7 (/root/go/pkg/mod/github.com/antlr/[email protected]/runtime/Go/antlr)
github.com/antlr/antlr4/runtime/Go/antlr v0.0.0-20210930093333-01de314d7883 (/root/go/pkg/mod/github.com/antlr/antlr4/runtime/!go/[email protected])

Support custom http status code handler like spring boot

@RestControllerAdvice
public class GlobalControllerExceptionHandler {

    @ExceptionHandler(ConversionFailedException.class)
    @ResponseStatus(HttpStatus.BAD_REQUEST)
    public ResponseEntity<String> handleConnversion(RuntimeException ex) {
        return new ResponseEntity<>(ex.getMessage(), HttpStatus.BAD_REQUEST);
    }
    
    @ExceptionHandler(BookNotFoundException.class)
    @ResponseStatus(HttpStatus.NOT_FOUND)
    public ResponseEntity<String> handleBookNotFound(RuntimeException ex) {
        return new ResponseEntity<>(ex.getMessage(), HttpStatus.NOT_FOUND);
    }
}

Change vo folder name to dto

go-doudou svc CLI is generating vo folder for putting dto structs, that's a mistake. The folder should be named dto. We will support both dto and vo folder for loading structs.

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.