Documentation ¶
Index ¶
- Constants
- func GetCSCFGFile() string
- func GetCSCHomeDir() string
- func IsInitialized() bool
- type ChatServerConfig
- func (bc *ChatServerConfig) GetFriendsDbPath() string
- func (bc *ChatServerConfig) GetGroupMsgDbPath() string
- func (bc *ChatServerConfig) GetGroupsDbPath() string
- func (bc *ChatServerConfig) GetGrpKeysDbPath() string
- func (bc *ChatServerConfig) GetGrpMbrsDbPath() string
- func (bc *ChatServerConfig) GetKeyPath() string
- func (bc *ChatServerConfig) GetP2PMsgDbPath() string
- func (bc *ChatServerConfig) GetUsersDbPath() string
- func (bc *ChatServerConfig) InitCfg() *ChatServerConfig
- func (bc *ChatServerConfig) Load() *ChatServerConfig
- func (bc *ChatServerConfig) Save()
Constants ¶
View Source
const ( CS_HomeDir = ".chatserver" CS_CFG_FileName = "chatserver.json" )
Variables ¶
This section is empty.
Functions ¶
func GetCSCFGFile ¶
func GetCSCFGFile() string
func GetCSCHomeDir ¶
func GetCSCHomeDir() string
func IsInitialized ¶
func IsInitialized() bool
Types ¶
type ChatServerConfig ¶
type ChatServerConfig struct { MgtHttpPort int `json:"mgthttpport"` CmdListenPort string `json:"cmdlistenport"` DBPath string `json:"dbpath"` UsersDBFile string `json:"usersdbfile"` FriendsDBFile string `json:"friendsdbfile"` GroupsDBFile string `json:"groupsdbfile"` GrpMemberDBFile string `json:"grpmemberdbfile"` GroupKeysDbFile string `json:"groupkeysdbfile"` GroupMsgDbPath string `json:"groupmsgdbpath"` P2PMsgDbPath string `json:"p2pmsgdbpath"` ChatListenPort int `json:"chatport"` //ChatMgmtPort int `json:"chatmgmtport"` KeyFile string `json:"keyfile"` PrivKey ed25519.PrivateKey `json:"-"` PubKey ed25519.PublicKey `json:"-"` }
func GetCSC ¶
func GetCSC() *ChatServerConfig
func LoadFromCfgFile ¶
func LoadFromCfgFile(file string) *ChatServerConfig
func LoadFromCmd ¶
func LoadFromCmd(initfromcmd func(cmdbc *ChatServerConfig) *ChatServerConfig) *ChatServerConfig
func PreLoad ¶
func PreLoad() *ChatServerConfig
func (*ChatServerConfig) GetFriendsDbPath ¶
func (bc *ChatServerConfig) GetFriendsDbPath() string
func (*ChatServerConfig) GetGroupMsgDbPath ¶
func (bc *ChatServerConfig) GetGroupMsgDbPath() string
func (*ChatServerConfig) GetGroupsDbPath ¶
func (bc *ChatServerConfig) GetGroupsDbPath() string
func (*ChatServerConfig) GetGrpKeysDbPath ¶
func (bc *ChatServerConfig) GetGrpKeysDbPath() string
func (*ChatServerConfig) GetGrpMbrsDbPath ¶
func (bc *ChatServerConfig) GetGrpMbrsDbPath() string
func (*ChatServerConfig) GetKeyPath ¶
func (bc *ChatServerConfig) GetKeyPath() string
func (*ChatServerConfig) GetP2PMsgDbPath ¶
func (bc *ChatServerConfig) GetP2PMsgDbPath() string
func (*ChatServerConfig) GetUsersDbPath ¶
func (bc *ChatServerConfig) GetUsersDbPath() string
func (*ChatServerConfig) InitCfg ¶
func (bc *ChatServerConfig) InitCfg() *ChatServerConfig
func (*ChatServerConfig) Load ¶
func (bc *ChatServerConfig) Load() *ChatServerConfig
func (*ChatServerConfig) Save ¶
func (bc *ChatServerConfig) Save()
Click to show internal directories.
Click to hide internal directories.