JCS-pub/common/globals/globals.go

26 lines
536 B
Go
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

package stgglb
import (
jcstypes "gitlink.org.cn/cloudream/jcs-pub/common/types"
)
type LocalMachineInfo struct {
Location jcstypes.Location `json:"location"`
}
var Local *LocalMachineInfo
// 是否是独立运行模式。只针对Client
var StandaloneMode bool
// 当前Client服务登录的用户的ID如果是Standalone模式则为0。TODO 临时解决办法
var UserID jcstypes.UserID
// InitLocal
//
// @Description: 初始化本地机器信息
// @param info
func InitLocal(info LocalMachineInfo) {
Local = &info
}