# Welcome To Fly
<p>
<a href="https://www.oscs1024.com/project/shixiaofeia/fly?ref=badge_small">
<img src="https://www.oscs1024.com/platform/badge/shixiaofeia/fly.svg?size=small" alt="">
</a>
<a href="https://github.com/shixiaofeia/fly">
<img src="https://badgen.net/badge/Github/fly?icon=github" alt="">
</a>
<a href="https://github.com/shixiaofeia/fly/LICENSE">
<img alt="GitHub" src="https://img.shields.io/github/license/shixiaofeia/fly?style=flat-square">
</a>
<img src="https://img.shields.io/github/go-mod/go-version/shixiaofeia/fly.svg?style=flat-square" alt="">
<img alt="GitHub last commit" src="https://img.shields.io/github/last-commit/shixiaofeia/fly?style=flat-square">
<img alt="GitHub Repo stars" src="https://img.shields.io/github/stars/shixiaofeia/fly?style=social">
</p>
## 简介
一个简单而优雅的后端项目, 封装常用数据库组件及应用示例, 助力后端人员快速开发
[个人博客](https://blog.csdn.net/ywdhzxf/)
## 项目结构
参考 [Go程序布局](https://github.com/golang-standards/project-layout/blob/master/README_zh.md)
```
├── build // 打包/集成
| ├── app // 应用程序名
| | ├── Dockerfile // 集成的配置/脚本
├── cmd // 可执行目录
| ├── app // 应用程序名
| | ├── main.go // 入口文件
├── configs // 配置文件
| ├── config.json
├── doc // 项目文档
├── example // 示例目录
├── internal // 私有程序
| ├── api // 接口
| ├── config // 配置文件解析
| ├── constvar // 常量
| ├── domain // 表结构
| ├── httpcode // 请求处理组件
| ├── kit // 公用逻辑函数
| └── monitor // 监控定时服务相关
| └── rpc // rpc
├── logs // 日志存放
├── pkg // 安全导入的包(可以被任何项目直接导入使用)
| ├── clickhouse // ck组件
| ├── email // 邮件组件
| ├── es // es组件
| ├── kafka // kafka组件
| ├── jwt // jwt组件
| ├── libs // 封装的公用方法
| ├── logging // 日志组件
| ├── mongo // mongo组件
| └── mq // mq组件
| └── mysql // mysql组件
| └── redis // redis组件
| └── safego // 安全运行组件
| └── ws // socket组件
├── .dockerignore // docker忽略文件
├── .gitignore // git忽略文件
├── go.mod // 包管理
├── README.md
```
## 优雅的代码
[请先参阅一遍官方的代码规范指南](https://github.com/golang/go/wiki/CodeReviewComments)
[gofmt](https://golang.org/cmd/gofmt/)
[goimports](https://pkg.go.dev/golang.org/x/tools/cmd/goimports)
## 技术选型
### web框架
[gin](https://github.com/gin-gonic/gin)
### rpc
[grpc](https://pkg.go.dev/google.golang.org/grpc)
### socket
[gorilla](https://github.com/gorilla/websocket)
### mysql
[gorm](https://gorm.io/)
### clickhouse
[dbr](https://github.com/mailru/dbr)
### es
[elastic](https://github.com/olivere/elastic/v6)
### kafka
[kafka-go](https://github.com/segmentio/kafka-go)
### mongo
[mongo](https://github.com/go-mgo/mgo/tree/v2)
### redis
[redis](https://github.com/go-redis/redis)
### mq
[amqp](https://github.com/streadway/amqp)
### log
[zap](https://pkg.go.dev/go.uber.org/zap)
### config
[viper](https://github.com/spf13/viper)
## 启动方式
> 请先复制 configs 目录下的配置文件, 并修改为自己的配置
### 命令行启动
```
go run cmd/app/main.go -config ./configs/config.yml
```
### Docker启动
```
docker build -f build/app/Dockerfile -t fly:v1.0.0 .
docker run --rm -it -p 8888:8888 -p 9999:9999 --name fly fly:v1.0.0
```
没有合适的资源?快使用搜索试试~ 我知道了~
一个简单而优雅的后端项目, 封装常用数据库组件及应用示例.zip
共143个文件
go:110个
md:18个
example:3个
1.该资源内容由用户上传,如若侵权请联系客服进行举报
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
版权申诉
0 下载量 61 浏览量
2024-02-09
13:07:57
上传
评论
收藏 269KB ZIP 举报
温馨提示
快应用开发
资源推荐
资源详情
资源评论
收起资源包目录
一个简单而优雅的后端项目, 封装常用数据库组件及应用示例.zip (143个子文件)
Dockerfile 671B
.dockerignore 76B
config.json.example 754B
config.yml.example 529B
config.toml.example 392B
.gitignore 292B
snowflask.go 9KB
main.go 8KB
hello.pb.go 8KB
demo_search.go 7KB
main.go 7KB
demo_search.go 5KB
export.go 5KB
call.go 4KB
index.go 4KB
index.go 4KB
rabbitmq.go 3KB
index.go 3KB
index_test.go 3KB
index.go 3KB
aes.go 3KB
main.go 3KB
index.go 3KB
demo.go 2KB
json.go 2KB
index.go 2KB
index_test.go 2KB
console.go 2KB
conn.go 2KB
index_test.go 2KB
invite_code.go 2KB
index_test.go 2KB
call_test.go 2KB
main.go 2KB
demo.go 2KB
index_test.go 2KB
singleflight_test.go 2KB
main.go 2KB
limiter.go 1KB
demo.go 1KB
config.go 1KB
index.go 1KB
index.go 1KB
demo.go 1KB
index.go 1KB
gridfs.go 1KB
main.go 1KB
index_test.go 1KB
main.go 1KB
assign_test.go 1KB
socket.go 1KB
group.go 1KB
gridfs_test.go 1KB
model.go 1KB
index.go 1015B
index_test.go 972B
index_test.go 943B
hash.go 904B
token.go 886B
assign.go 869B
hash_test.go 848B
model.go 837B
aes_test.go 829B
map.go 829B
index.go 824B
index_test.go 819B
index.go 808B
service.go 764B
router.go 762B
regex_test.go 740B
rand.go 716B
server.go 713B
middleware.go 702B
user.go 699B
regex.go 685B
client.go 678B
hello.go 631B
token.go 613B
index_test.go 611B
code.go 600B
ticker.go 594B
main.go 584B
cron.go 580B
main.go 566B
map_test.go 556B
index.go 537B
server_test.go 502B
index.go 434B
token_test.go 430B
router.go 419B
index_test.go 407B
hello.go 398B
rand_test.go 339B
snowflask_test.go 332B
model.go 331B
index.go 325B
constvar.go 324B
index_test.go 322B
index.go 305B
invite_code_test.go 304B
共 143 条
- 1
- 2
资源评论
博士僧小星
- 粉丝: 1935
- 资源: 5894
下载权益
C知道特权
VIP文章
课程特权
开通VIP
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功