Documentation
¶
Index ¶
- Variables
- func GetServerHostName() (string, error)
- func Init() error
- func LoadPostgres() (err error)
- type GLobConfigOtherAPI
- type GlobConfigERP
- type GlobConfigERPWarehouse
- type GlobConfigFinanceType
- type GlobConfigMap
- type GlobConfigOrg
- type GlobConfigRouterType
- type GlobConfigSafeType
- type GlobConfigService
- type GlobConfigType
- type GlobConfigUserType
Constants ¶
This section is empty.
Variables ¶
View Source
var ( //ServerName 服务器信息 ServerName string ServerIP string ServerPort string //ServicePIDName 进程名称 ServicePIDName string //Debug debug Debug = false //RunInstall 是否启动安装包 RunInstall = false //HeaderOrigin 头部 HeaderOrigin = "*" //RouterHost 广播端口和地址 // 这里建议为 127.0.0.1:8000,通过nginx映射端口 RouterHost = ":9000" //PostgresURL postgres PostgresURL = "" //RootDir 根目录 RootDir = CoreFile.BaseDir() //Cfg 配置项目 Cfg *ini.File //GlobConfig 配置结构体 GlobConfig GlobConfigType //MainDB 全局核心数据库 MainDB CorePostgres.Client //MainCache 全局默认缓冲模块 MainCache CoreCache.CacheData //MainSQL sql操作句柄 MainSQL CoreSQL2.SQLClient //BombSec 定时炸弹 // 用于解决交付客户不付款的问题,该设计将自动拖慢系统运行速度,但不会彻底中断服务 // 默认设置为0不启动,启动后将在该时间基础上,按照所设定的月份x该倍数,随着时间递增每月将递增倍数 // 只针对关键的模块做该处理,其他所有模块不做处理,例如用户领取会话等关键性内容 BombSec int64 = 0 // BombStartMonth 启动炸弹的最初时间 BombStartMonth = carbon.Carbon{} )
Functions ¶
func LoadPostgres ¶
func LoadPostgres() (err error)
Types ¶
type GLobConfigOtherAPI ¶
type GlobConfigERP ¶
type GlobConfigERP struct {
//仓储
Warehouse GlobConfigERPWarehouse
}
type GlobConfigERPWarehouse ¶
type GlobConfigERPWarehouse struct {
//库存是否可以为负数
StoreLess0 bool
}
type GlobConfigFinanceType ¶
type GlobConfigFinanceType struct {
//NeedNoCheck 是否不校验
NeedNoCheck bool
}
type GlobConfigMap ¶
type GlobConfigMap struct {
//是否打开地图
MapOpen bool
}
type GlobConfigOrg ¶
type GlobConfigOrg struct {
//默认开通的功能
DefaultOpenFunc []string
}
type GlobConfigRouterType ¶
type GlobConfigRouterType struct {
//是否需要会话日志
NeedTokenLog bool
}
type GlobConfigSafeType ¶
type GlobConfigSafeType struct {
// SafeRouterTimeBlocker 是否启动中间人攻击拦击拦截机制
SafeRouterTimeBlocker bool
}
type GlobConfigService ¶
type GlobConfigService struct {
//信息交互订单完成后自动下架交互内容
InfoExchangeOrderFinishAutoDown bool
}
type GlobConfigType ¶
type GlobConfigType struct {
//路由
Router GlobConfigRouterType
//第三方平台
OtherAPI GLobConfigOtherAPI
//用户
User GlobConfigUserType
//财务
Finance GlobConfigFinanceType
//安全
Safe GlobConfigSafeType
//组织
Org GlobConfigOrg
//ERP
ERP GlobConfigERP
//地图
Map GlobConfigMap
//服务
Service GlobConfigService
}
GlobConfigType 配置数据结构
type GlobConfigUserType ¶
Click to show internal directories.
Click to hide internal directories.