GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - guothion/xuanyuan: the service of xuanyuan create by gin

BranchesTags
Open more actions menu

Latest commit

 

History

13 Commits
13 Commits

Folders and files

NameName
Last commit message
Last commit date
.github/workflows
.github/workflows
 
 
build
build
 
 
cfg
cfg
 
 
doc
doc
 
 
pkg
pkg
 
 
sql
sql
 
 
test
test
 
 
.gitignore
.gitignore
 
 
Jenkinsfile
Jenkinsfile
 
 
Makefile
Makefile
 
 
README.md
README.md
 
 
env.sh
env.sh
 
 

Repository files navigation

xuanyuan

the service of xuanyuan create by gin

框架搭建

配置解决方案

插件

  • github.com/spf13/viper

为什么使用 viper?

  • 支持 JSON/TOML/YAML/HCL/envfile/Java properties 等多种格式的配置文件;
  • 可以设置监听配置文件的修改,修改时自动加载新的配置;
  • 从环境变量、命令行选项和io.Reader中读取配置;
  • 从远程配置系统中读取和监听修改,如 etcd/Consul;
  • 代码逻辑中显示设置键值。

日志解决方案

插件

  • gopkg.in/natefinch/lumberjack.v2
  • github.com/sirupsen/logrus

数据库解决方案

这里我们使用 gorm,这个算是Gin框架官方推荐的 ORM 库了。

mysql 实现方案

这里我们使用的是 mysql 的库 gorm.io/driver/mysql,官方支持。 命令:

go get gorm.io/driver/mysql
go get gorm.io/gorm

mongo 实现方案

About

the service of xuanyuan create by gin

Resources

Readme
Activity

Stars

0 stars

Watchers

0 watching

Forks

0 forks
Report repository

Releases

Packages

Contributors

Languages

You are visitor 01402792 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.