config

package
v0.0.0-...-f9e7125 Latest Latest
Warning

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

Go to latest
Published: Jun 14, 2023 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DB *gorm.DB // 业务库
View Source
var DBConfig map[string]map[string]string // 数据库配置
View Source
var Hr *sql.DB // 人事库
View Source
var IniConf *ini.File // ini路径
View Source
var KafkaAsyncClient sarama.AsyncProducer // kafka地址
View Source
var KafkaConsumerClient sarama.Consumer // kafka地址
View Source
var KafkaSyncClient sarama.SyncProducer // kafka地址
View Source
var RDS *redis.Pool // redis初始化

var ROOT_PATH string

Functions

func GetDB

func GetDB(name string) *gorm.DB

获取db连接

func Init

func Init()

func SetAsyncKafka

func SetAsyncKafka()

func SetConsumer

func SetConsumer()

func SetDB

func SetDB() *gorm.DB

// 获取默认db

func SetHrDB

func SetHrDB() *gorm.DB

获取user db

func SetRedisDb

func SetRedisDb()

func SetSyncKafka

func SetSyncKafka()

Types

This section is empty.

Jump to

Keyboard shortcuts

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