Dragon 🐲 🐲 🐲 is a lightweight high performance web framework with Go for the feature and comfortable develop.

Overview

Dragon

project new link

CI Status

Dragon 🐲 🐲 🐲 is a lightweight high performance web framework with Go for the feature and comfortable develop.

components

  1. httprouter. HttpRouter is a lightweight high performance HTTP request router.
  2. GORM. The fantastic ORM library for Golang, aims to be developer friendly.
  3. util. for golang common util.
  4. validator. google validator to validate the data.
  5. erro. erro pkg aims to wrap the error stack.

start dragon

dragon is DDD go framework. So you can hack with handler domain(entity,repository,service).

  1. config your yml, first config dev.yml config:

dir core/dragon/conf/config/xxx.yml, dev.yml/prod.yml/test.yml/..*** or you can set env DRAGON in docker

  1. build && run your app
cd dragon
go build main.go && mv main ./release/ && ./release/main

move your main(exec file) to release dir

  1. IDE config if you use goland ide, can set
Output directory: 
   
    /release
Working directory: 
    
     /release

    
   

Because default dragon exec (elf) file output in release dir, so the dirs are resolved according to release dir.

After that, feel free to run your app and start hacking :)

  1. deployment you can deploy your app in different environments, only change environment DRAGON, for example. that supports docker.
export DRAGON=dev
export DRAGON={env}

ab performance

cpu: 4 core, ram: 8 G
Server Software:        nginx/1.12.2
Server Hostname:        test.com
Server Port:            80

Document Path:          /
Document Length:        13 bytes

Concurrency Level:      100
Time taken for tests:   9.341 seconds
Complete requests:      100000
Failed requests:        0
Write errors:           0
Total transferred:      17700000 bytes
HTML transferred:       1300000 bytes
Requests per second:    73749.75 [#/sec] (mean)
Time per request:       9.341 [ms] (mean)
Time per request:       0.093 [ms] (mean, across all concurrent requests)
Transfer rate:          1850.51 [Kbytes/sec] received

Connection Times (ms)
              min  mean[+/-sd] median   max
Connect:        0    1   1.2      1       9
Processing:     0    8   2.7      8      30
Waiting:        0    7   2.5      6      29
Total:          0    9   2.9      9      31

Percentage of the requests served within a certain time (ms)
  50%      9
  66%     10
  75%     11
  80%     11
  90%     13
  95%     14
  98%     16
  99%     18
 100%     31 (longest request)

app will read DRAGON env first to check prod,dev or test mode

build:

Just compile your src file and move bin file to directory dragon/release/

you might develop with fswatch for hot rebuilding. just create .fsw.json config:

{
 "desc": "Auto generated by fswatch [dragon]",
 "triggers": [
   {
     "name": "",
     "pattens": [
       "**/*.go"
     ],
     "env": {
       "DEBUG": "1"
     },
     "cmd": "go fmt dragon... && go build -o ./release/dragon && ./release/dragon",
     "shell": true,
     "delay": "100ms",
     "stop_timeout": "500ms",
     "signal": "KILL",
     "kill_signal": ""
   }
 ],
 "watch_paths": [
   "."
 ],
 "watch_depth": 10
}

just run cmd

$ fswatch
Issues
  • Bump go.mongodb.org/mongo-driver from 1.3.0 to 1.5.1

    Bump go.mongodb.org/mongo-driver from 1.3.0 to 1.5.1

    Bumps go.mongodb.org/mongo-driver from 1.3.0 to 1.5.1.

    Release notes

    Sourced from go.mongodb.org/mongo-driver's releases.

    MongoDB Go Driver 1.5.1

    The MongoDB Go driver team is pleased to release 1.5.1 of the official Go driver.

    This release contains several bug fixes. Due to the issue below, we recommend all users upgrade to this version of the driver.

    Documentation can be found on pkg.go.dev and the MongoDB documentation site. BSON library documentation is also available on pkg.go.dev. Questions and inquiries can be asked on the MongoDB Developer Community. Bugs can be reported in the Go Driver Jira where a list of current issues can be found.

    This CVE describes a security issue with the driver's BSON marshalling system. BSON marshalling functions would incorrectly handle null bytes embedded in BSON key names and the pattern/options fields of a BSON regex value. BSON marshalling functions now correctly validate and error if there is an embedded null byte in BSON key names or the pattern/options fields of a BSON regex value. We recommend all users of the driver upgrade to this version.

    CVE ID: CVE-2021-20329 Title: Specific cstrings input may not be properly validated in the MongoDB Go Driver Description: Specific cstrings input may not be properly validated in the MongoDB Go Driver when marshalling Go objects into BSON. A malicious user could use a Go object with specific string to potentially inject additional fields into marshalled documents. This issue affects all MongoDB GO Drivers up to (and including) 1.5.0. CVSS score: 6.8 CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:N Affected products and versions, MongoDB Go Driver versions <= 1.5.0 Underlying operating systems affected: All

    For a full list of tickets included in this release, please see the links below:

    Bugs

    Tasks

    MongoDB Go Driver 1.5.0

    The MongoDB Go driver team is pleased to release 1.5.0 of the official Go driver.

    This release contains several new features and usability improvements for the driver.

    Documentation can be found on pkg.go.dev and the MongoDB documentation site. BSON library documentation is also available on pkg.go.dev. Questions and inquiries can be asked on the MongoDB Developer Community. Bugs can be reported in the Go Driver Jira where a list of current issues can be found.

    This release contains a new errors API for the primary mongo package. Users can now detect duplicate key errors, timeouts, and network errors via the mongo.IsDuplicateKeyError, mongo.IsTimeout, and mongo.IsNetworkError functions, respectively. Additionally, a new UpdateByID function has been added to the mongo.Collection type to update a single document with a given _id value.

    The Go Driver now supports using GCP and Azure key management services with the client-side field level encryption feature. In addition, AWS key management support has been enhanced to allow authenticating with temporary AWS credentials. See the MongoDB docs for more information about these improvements. Use of client-side field level encryption requires users to install the latest released version of libmongocrypt. Note: This means that existing applications that use this feature will need to upgrade the libmongocrypt dependency when upgrading to this driver version; otherwise, the application will fail to compile. Users can upgrade to the latest development release of libmongocrypt via the OS-specific instructions for macos, Windows, and Linux.

    Monitoring has now been added for various server events. A ServerMonitor set on a mongo.Client monitors changes on the MongoDB deployment it is connected to and reports the changes in the client's representation of the deployment.

    The driver will now error if a map with more than one key is used as a hint option, sort option, or for index creation. This is to prevent unexpected behavior, for example, an index being created with the keys in the wrong order.

    ... (truncated)

    Commits
    • 40c0e70 Update version to v1.5.1
    • 3a89e6c GODRIVER-1923 Error if BSON cstrings contain null bytes (#622)
    • 1a2534c GODRIVER-1935 Update scram/stringprep dependencies (#624)
    • 6ea353a GODRIVER-1918 Check for zero length in readstring (#613)
    • d5e11aa GODRIVER-1919 Support decoding ObjectIDs from hex strings in BSON (#610)
    • e0ed6d6 Update version to v1.5.1+prerelease
    • 6760875 Update version to v1.5.0
    • 19a368c GODRIVER-1911 Fix Windows/macos test failures for CSFLE (#603)
    • 2a5f9a4 GODRIVER-1879 Apply connectTimeoutMS to TLS handshake (#594)
    • 2c5b75b GODRIVER-1855 Support AWS authentication with temporary credentials in CSFLE ...
    • Additional commits viewable in compare view

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    • @dependabot use these labels will set the current labels as the default for future PRs for this repo and language
    • @dependabot use these reviewers will set the current reviewers as the default for future PRs for this repo and language
    • @dependabot use these assignees will set the current assignees as the default for future PRs for this repo and language
    • @dependabot use this milestone will set the current milestone as the default for future PRs for this repo and language

    You can disable automated security fix PRs for this repo from the Security Alerts page.

    dependencies 
    opened by dependabot[bot] 0
Owner
azerothyang
azerothyang
henrylee2cn 1.6k May 17, 2022
burn is a web framework written in golang to develop backend / restapi

burn burn rest api framework About: burn is a web framework written in golang to

null 2 Dec 27, 2021
Golanger Web Framework is a lightweight framework for writing web applications in Go.

/* Copyright 2013 Golanger.com. All rights reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except

golanger 299 Mar 3, 2022
hiboot is a high performance web and cli application framework with dependency injection support

Hiboot - web/cli application framework About Hiboot is a cloud native web and cli application framework written in Go. Hiboot is not trying to reinven

hidevops.io 169 May 10, 2022
beego is an open-source, high-performance web framework for the Go programming language.

Beego Beego is used for rapid development of enterprise application in Go, including RESTful APIs, web apps and backend services. It is inspired by To

astaxie 465 May 20, 2022
High performance, minimalist Go web framework

Supported Go versions As of version 4.0.0, Echo is available as a Go module. Therefore a Go version capable of understanding /vN suffixed imports is r

LabStack LLC 22.4k May 12, 2022
Gearbox :gear: is a web framework written in Go with a focus on high performance

gearbox ⚙️ is a web framework for building micro services written in Go with a focus on high performance. It's built on fasthttp which is up to 10x fa

Gearbox 634 May 13, 2022
Gearbox :gear: is a web framework written in Go with a focus on high performance

gearbox ⚙️ is a web framework for building micro services written in Go with a focus on high performance. It's built on fasthttp which is up to 10x fa

Gearbox 635 May 18, 2022
High performance, simple Go web framework

Elton Elton的实现参考了koa以及echo,中间件的调整均为洋葱模型:请求由外至内,响应由内至外。主要特性如下: 处理函数(中间件)均以返回error的形式响应出错,方便使用统一的出错处理中间件将出错统一转换为对应的输出(JSON),并根据出错的类型等生成各类统计分析 成功响应数据直接赋值

Tree Xie 59 May 15, 2022
beego is an open-source, high-performance web framework for the Go programming language.

Beego Beego is used for rapid development of enterprise application in Go, including RESTful APIs, web apps and backend services. It is inspired by To

beego Framework 28.2k May 16, 2022
letgo is an open-source, high-performance web framework for the Go programming language.

high-performance Lightweight web framework for the Go programming language. golang web framework,高可用golang web框架,go语言 web框架 ,go web

wjp 354 May 12, 2022
GoFrame is a modular, powerful, high-performance and enterprise-class application development framework of Golang.

GoFrame English | 简体中文 GoFrame is a modular, powerful, high-performance and enterprise-class application development framework of Golang. If you're a

GoFrame 7.4k May 20, 2022
Flamingo Framework and Core Library. Flamingo is a go based framework for pluggable web projects. It is used to build scalable and maintainable (web)applications.

Flamingo Framework Flamingo is a web framework based on Go. It is designed to build pluggable and maintainable web projects. It is production ready, f

Flamingo 297 May 21, 2022
The jin is a simplified version of the gin web framework that can help you quickly understand the core principles of a web framework.

jin About The jin is a simplified version of the gin web framework that can help you quickly understand the core principles of a web framework. If thi

null 8 Dec 27, 2021
Simple and lightweight Go web framework inspired by koa

VOX A golang web framework for humans, inspired by Koa heavily. Getting started Installation Using the go get power: $ go get -u github.com/aisk/vox B

An Long 76 Mar 23, 2022
skr: The lightweight and powerful web framework using the new way for Go.Another go the way.

skr Overview Introduction Documents Features Install Quickstart Releases Todo Pull Request Issues Thanks Introduction The lightweight and powerful web

go-the-way 1 Jan 11, 2022
Package macaron is a high productive and modular web framework in Go.

Macaron Package macaron is a high productive and modular web framework in Go. Getting Started The minimum requirement of Go is 1.6. To install Macaron

Macaron 3.3k May 15, 2022
Tigo is an HTTP web framework written in Go (Golang).It features a Tornado-like API with better performance. Tigo是一款用Go语言开发的web应用框架,API特性类似于Tornado并且拥有比Tornado更好的性能。

Tigo(For English Documentation Click Here) 一个使用Go语言开发的web框架。 相关工具及插件 tiger tiger是一个专门为Tigo框架量身定做的脚手架工具,可以使用tiger新建Tigo项目或者执行其他操作。

Karl 1.3k May 20, 2022