gorestapi:Golang REST API模板

时间:2021-05-03 06:00:28
【文件属性】:
文件名称:gorestapi:Golang REST API模板
文件大小:73KB
文件格式:ZIP
更新时间:2021-05-03 06:00:28
Go 基本API范例 此API示例是REST API的基本框架 编译中 它被设计为可识别go模块的程序,因此需要go 1.11或更高版本。您可以将其克隆到任何地方,只需在克隆目录中运行make即可构建 要求 这确实需要设置postgres数据库并可以访问该数据库。 启动后,它将尝试创建和迁移数据库。 配置 该配置旨在使用带下划线而不是句点的所有大写形式的环境变量来指定。 Example: LOGGER_LEVEL=debug 选项: 环境 描述 默认 logger.level 默认日志记录级别 “信息” logger.encoding 日志记录格式(控制台,json或堆栈驱动程序) “安慰” logger.color 在控制台模式下启用颜色 真的 logger.disable_caller 隐藏呼叫者源文件和行号 错误的 logger.disable_stacktrace 隐
【文件预览】:
gorestapi-master
----conf()
--------logger.go(1KB)
--------defaults.go(4KB)
--------signal.go(1KB)
--------version.go(593B)
----go.mod(1KB)
----main.go(94B)
----.gitattributes(9B)
----store()
--------postgres()
--------store.go(1KB)
----go.sum(102KB)
----LICENSE.md(1KB)
----README.md(7KB)
----Makefile(2KB)
----embed()
--------embed.go(475B)
--------public_html()
--------postgres_migrations()
----.gitignore(69B)
----server()
--------render.go(2KB)
--------logger.go(4KB)
--------server.go(3KB)
----cmd()
--------root.go(2KB)
--------version.go(355B)
--------api.go(2KB)
----gorestapi()
--------swagger.go(2KB)
--------thing_test.go(435B)
--------thing.go(615B)
--------mainrpc()
--------widget.go(1014B)
--------widget_test.go(462B)
--------gorestapi.go(663B)

网友评论