Documentation ¶
Index ¶
- Constants
- func DBList()
- func Gorm() *gorm.DB
- func GormMysql() *gorm.DB
- func GormMysqlByConfig(m properties.Mysql) *gorm.DB
- func GormOracle() *gorm.DB
- func GormOracleByConfig(m properties.Oracle) *gorm.DB
- func GormPgSql() *gorm.DB
- func GormPgSqlByConfig(p properties.Pgsql) *gorm.DB
- func InstallPlugin(Router *gin.Engine)
- func OtherInit()
- func PluginInit(group *gin.RouterGroup, Plugin ...plugin.Plugin)
- func Prepare()
- func Redis()
- func RegisterTables(db *gorm.DB)
- func Routers() *gin.Engine
- func RunWindowsServer()
- func Timer()
- func Viper(path ...string) *viper.Viper
- func Zap() (logger *glog.Glogger)
Constants ¶
View Source
const ( ConfigEnv = "GVA_CONFIG" ConfigDefaultFile = "config.yaml" ConfigTestFile = "config.test.yaml" ConfigDebugFile = "config.debug.yaml" ConfigReleaseFile = "config.release.yaml" )
Variables ¶
This section is empty.
Functions ¶
func GormMysql ¶
GormMysql 初始化Mysql数据库 Author [piexlmax](https://github.com/piexlmax) Author [SliverHorn](https://github.com/SliverHorn)
func GormMysqlByConfig ¶
func GormMysqlByConfig(m properties.Mysql) *gorm.DB
GormMysqlByConfig 初始化Mysql数据库用过传入配置
func GormOracle ¶
GormOracle 初始化oracle数据库 如果需要Oracle库 放开import里的注释 把下方 mysql.Config 改为 oracle.Config ; mysql.New 改为 oracle.New
func GormOracleByConfig ¶
func GormOracleByConfig(m properties.Oracle) *gorm.DB
GormOracleByConfig 初始化Oracle数据库用过传入配置
func GormPgSql ¶
GormPgSql 初始化 Postgresql 数据库 Author [piexlmax](https://github.com/piexlmax) Author [SliverHorn](https://github.com/SliverHorn)
func GormPgSqlByConfig ¶
func GormPgSqlByConfig(p properties.Pgsql) *gorm.DB
GormPgSqlByConfig 初始化 Postgresql 数据库 通过参数
func InstallPlugin ¶
func PluginInit ¶
func PluginInit(group *gin.RouterGroup, Plugin ...plugin.Plugin)
func RunWindowsServer ¶
func RunWindowsServer()
func Viper ¶
Viper // 优先级: 命令行 > 环境变量 > 默认值 Author [SliverHorn](https://github.com/SliverHorn)
func Zap ¶
Zap 获取 zap.Logger Author [SliverHorn](https://github.com/SliverHorn)
Types ¶
This section is empty.
Source Files ¶
Click to show internal directories.
Click to hide internal directories.