All Projects → layasugar → laya-template

layasugar / laya-template

Licence: Apache-2.0 license
服务基本框架,template

Programming Languages

go
31211 projects - #10 most used programming language
Dockerfile
14818 projects

Projects that are alternatives of or similar to laya-template

Ultimate Go
This repo contains my notes on working with Go and computer systems.
Stars: ✭ 1,530 (+11669.23%)
Mutual labels:  gin, gorm
pink-lady
a template project of gin app.
Stars: ✭ 44 (+238.46%)
Mutual labels:  gin, gorm
Golang Gin Realworld Example App
Exemplary real world application built with Golang + Gin
Stars: ✭ 1,780 (+13592.31%)
Mutual labels:  gin, gorm
Ginbro
Converting a MySQL database'schema to a RESTful golang APIs app in the fastest way
Stars: ✭ 97 (+646.15%)
Mutual labels:  gin, gorm
Goilerplate
Clean Boilerplate of Go, Domain-Driven Design, Clean Architecture, Gin and GORM.
Stars: ✭ 173 (+1230.77%)
Mutual labels:  gin, gorm
Ugin
UGin is an API boilerplate written in Go (Golang) with Gin Framework.
Stars: ✭ 110 (+746.15%)
Mutual labels:  gin, gorm
go api boilerplate
🐶Go (Golang)🚀REST / GraphQL API + Postgres boilerplate
Stars: ✭ 127 (+876.92%)
Mutual labels:  gin, gorm
Go Gin Api
基于 Gin 进行模块化设计的 API 框架,封装了常用功能,使用简单,致力于进行快速的业务研发。比如,支持 cors 跨域、jwt 签名验证、zap 日志收集、panic 异常捕获、trace 链路追踪、prometheus 监控指标、swagger 文档生成、viper 配置文件解析、gorm 数据库组件、gormgen 代码生成工具、graphql 查询语言、errno 统一定义错误码、gRPC 的使用 等等。
Stars: ✭ 730 (+5515.38%)
Mutual labels:  gin, gorm
Cmall Go
golang写的电子商城的API接口
Stars: ✭ 167 (+1184.62%)
Mutual labels:  gin, gorm
Gosql
golang orm and sql builder
Stars: ✭ 141 (+984.62%)
Mutual labels:  gin, gorm
Duckygo
一个同时支持Session以及JWT的高性能高可用 Golang Restful API 脚手架 !
Stars: ✭ 57 (+338.46%)
Mutual labels:  gin, gorm
Goweibo
Go Weibo App
Stars: ✭ 243 (+1769.23%)
Mutual labels:  gin, gorm
Goforum
Let's go a forum
Stars: ✭ 23 (+76.92%)
Mutual labels:  gin, gorm
Logrus
Hooks for logrus logging
Stars: ✭ 110 (+746.15%)
Mutual labels:  gin, gorm
Wblog
基于gin+gorm开发的个人博客项目
Stars: ✭ 763 (+5769.23%)
Mutual labels:  gin, gorm
Zendea
A free, open-source, self-hosted forum software written in Go 官方QQ群:656868
Stars: ✭ 116 (+792.31%)
Mutual labels:  gin, gorm
Go Gin Example
An example of gin
Stars: ✭ 4,992 (+38300%)
Mutual labels:  gin, gorm
Snake
🐍 一款小巧的基于Go构建的开发框架,可以快速构建API服务或者Web网站进行业务开发,遵循SOLID设计原则
Stars: ✭ 615 (+4630.77%)
Mutual labels:  gin, gorm
Gin bbs
Gin BBS App
Stars: ✭ 123 (+846.15%)
Mutual labels:  gin, gorm
Go init
一个用go组织项目结构,主要包括 gin, goredis, gorm, websocket, rabbitmq等。👉
Stars: ✭ 183 (+1307.69%)
Mutual labels:  gin, gorm

laya-template

  • http框架模板, grpc框架模板, 默认服务模板
  • 使用 laya 搭建 旨在快速搭建中小型应用服务, restfulApi, grpc服务 ==

Please note that this repository is out-of-the-box template

约定

  • func返回单独结构体时, 返回该数据得指针
  • laya.WebContext与laya.GrpcContext需要全局传递(ctx里面内置了记录日志与链路追踪)
  • models/page 业务逻辑
  • models/data 实现数据查询组装, 查询在此处完成, 尽量不要使用join(减轻数据库压力), 数据取出后, 可在该层完成组装
  • models/dao 基本的请求层, 模型放置层

安装模板, 愉快编码

安装

go install github.com/layasugar/laya/laya@latest

初始化模板

laya template init -name=laya-template

laya template init-http -name=laya-template

laya template init-grpc -name=laya-template

运行

cd xxx;
go get -u github.com/layasugar/laya
go mod tidy
go run .

laya-template 体验

License

laya-template is under the Apache 2.0 license. See the LICENSE file for details.

🔑 JetBrains OS licenses

laya-template had been being developed with GoLand IDE under the free JetBrains Open Source license(s) granted by JetBrains s.r.o., hence I would like to express my thanks here.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].