Documentation
¶
Index ¶
Constants ¶
View Source
const ( ConfigName = "chatlog" ConfigType = "json" EnvConfigDir = "CHATLOG_DIR" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct {
ConfigDir string `mapstructure:"-"`
LastAccount string `mapstructure:"last_account" json:"last_account"`
History []ProcessConfig `mapstructure:"history" json:"history"`
}
func (*Config) ParseHistory ¶
func (c *Config) ParseHistory() map[string]ProcessConfig
func (*Config) UpdateHistory ¶
func (c *Config) UpdateHistory(account string, conf ProcessConfig) error
type ProcessConfig ¶
type ProcessConfig struct {
Type string `mapstructure:"type" json:"type"`
Account string `mapstructure:"account" json:"account"`
Platform string `mapstructure:"platform" json:"platform"`
Version int `mapstructure:"version" json:"version"`
FullVersion string `mapstructure:"full_version" json:"full_version"`
DataDir string `mapstructure:"data_dir" json:"data_dir"`
DataKey string `mapstructure:"data_key" json:"data_key"`
WorkDir string `mapstructure:"work_dir" json:"work_dir"`
HTTPEnabled bool `mapstructure:"http_enabled" json:"http_enabled"`
HTTPAddr string `mapstructure:"http_addr" json:"http_addr"`
LastTime int64 `mapstructure:"last_time" json:"last_time"`
Files []File `mapstructure:"files" json:"files"`
}
Click to show internal directories.
Click to hide internal directories.