configuration

package
v0.6.11 Latest Latest
Warning

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

Go to latest
Published: Jun 4, 2021 License: MIT Imports: 24 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateProp

func CreateProp(configFilePath string)

func GetConfigValue

func GetConfigValue(m map[interface{}]interface{}, prefix []string, index int) interface{}

递归读取用户配置文件

func GetSysConfigValue

func GetSysConfigValue(key string, defaultValue string) string

func GetYamlValue

func GetYamlValue(prefixs []string, index int, defaultValue interface{}) interface{}

func InitLog

func InitLog(serviceName string)

初始化log配置,配置logrus日志文件滚动生成和

func LoadConfigFile

func LoadConfigFile(filepath string) []byte

读取配置文件

func SetLineNumLogrusHook

func SetLineNumLogrusHook()

Types

type DBConfig

type DBConfig struct {
}

func NewDBConfig

func NewDBConfig() *DBConfig

func (*DBConfig) GormDB

func (this *DBConfig) GormDB() *gorm.DB

type Prop

type Prop struct {
	ConfigFilePath string
}
var Properties *Prop

func (*Prop) GetConfigFilePath

func (this *Prop) GetConfigFilePath() string

func (*Prop) SetConfigFilePath

func (this *Prop) SetConfigFilePath(filePath string)

type ServiceConfig

type ServiceConfig struct {
}

func NewServiceConfig

func NewServiceConfig() *ServiceConfig

func (*ServiceConfig) DeviceWarmDao

func (this *ServiceConfig) DeviceWarmDao() *daos.DeviceWarmDao

func (*ServiceConfig) DeviceWarmService

func (this *ServiceConfig) DeviceWarmService() *services.DeviceWarmService

func (*ServiceConfig) RongCloudDao

func (this *ServiceConfig) RongCloudDao() *daos.RongCloudDao

func (*ServiceConfig) RongCloudService

func (this *ServiceConfig) RongCloudService() *services.RongCloudService

func (*ServiceConfig) ServiceCenterDao

func (this *ServiceConfig) ServiceCenterDao() *daos.ServiceCenterDao

func (*ServiceConfig) ServiceCenterService

func (this *ServiceConfig) ServiceCenterService() *services.ServiceCenterService

Jump to

Keyboard shortcuts

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