Router2SystemConfig

package
v5.1.34 Latest Latest
Warning

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

Go to latest
Published: Apr 27, 2024 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

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 GetServerHostName

func GetServerHostName() (string, error)

GetServerHostName 获取服务器名称

func Init

func Init() error

Init 初始化

func LoadPostgres

func LoadPostgres() (err error)

Types

type GLobConfigOtherAPI

type GLobConfigOtherAPI struct {
	//是否启动同步天气预报
	OpenSyncWeather bool
	//是否启动同步假期
	OpenSyncHolidaySeason bool
}

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

type GlobConfigUserType struct {
	//LoginViewPhone 登录用户是否可以看到手机号
	LoginViewPhone bool
	//LoginViewEmail 登录用户是否可以看到email
	LoginViewEmail bool
	//SyncUserPhoneUsername 修改绑定手机号后同步修改用户登陆名
	SyncUserPhoneUsername bool
	//前端是否可以消费用户积分
	ClientCostIntegral bool
	//允许公开用户数据
	GlobShowUser bool
}

Jump to

Keyboard shortcuts

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