single

package
v0.0.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 13, 2024 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ContextSingle

type ContextSingle struct {
	Cfg    *ini.File     // 配置文件信息
	DB     *gorm.DB      // 数据库操作对象
	Engine *gin.Engine   // gin对象
	Port   string        // 服务的启动端口
	Redis  *redis.Client // redis的连接句柄
}

ContextSingle 定义单例的结构体

func GetContextHandle

func GetContextHandle() *ContextSingle

GetContextHandle 获取实例化数据

type MapSingle

type MapSingle struct {
	// contains filtered or unexported fields
}

MapSingle map类型数据存储的单例对象

func GetMapHandle

func GetMapHandle() *MapSingle

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL