Documentation
¶
Index ¶
- Constants
- type Context
- func (c *Context) GetDataDir() string
- func (c *Context) GetDataKey() string
- func (c *Context) GetHTTPAddr() string
- func (c *Context) GetPlatform() string
- func (c *Context) GetVersion() int
- func (c *Context) GetWebhook() *conf.Webhook
- func (c *Context) GetWorkDir() string
- func (c *Context) Refresh()
- func (c *Context) SetAutoDecrypt(enabled bool)
- func (c *Context) SetDataDir(dir string)
- func (c *Context) SetHTTPAddr(addr string)
- func (c *Context) SetHTTPEnabled(enabled bool)
- func (c *Context) SetImgKey(key string)
- func (c *Context) SetWorkDir(dir string)
- func (c *Context) SwitchCurrent(info *wechat.Account)
- func (c *Context) SwitchHistory(account string)
- func (c *Context) UpdateConfig()
Constants ¶
View Source
const (
DefalutHTTPAddr = "127.0.0.1:5030"
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Context ¶
type Context struct {
History map[string]conf.ProcessConfig
// 微信账号相关状态
Account string
Platform string
Version int
FullVersion string
DataDir string
DataKey string
DataUsage string
ImgKey string
// 工作目录相关状态
WorkDir string
WorkUsage string
// HTTP服务相关状态
HTTPEnabled bool
HTTPAddr string
// 自动解密
AutoDecrypt bool
LastSession time.Time
// 当前选中的微信实例
Current *wechat.Account
PID int
ExePath string
Status string
// 所有可用的微信实例
WeChatInstances []*wechat.Account
// contains filtered or unexported fields
}
Context is a context for a chatlog. It is used to store information about the chatlog.
func (*Context) GetDataDir ¶ added in v0.0.20
func (*Context) GetDataKey ¶ added in v0.0.20
func (*Context) GetHTTPAddr ¶ added in v0.0.20
func (*Context) GetPlatform ¶ added in v0.0.20
func (*Context) GetVersion ¶ added in v0.0.20
func (*Context) GetWebhook ¶ added in v0.0.25
func (*Context) GetWorkDir ¶ added in v0.0.20
func (*Context) SetAutoDecrypt ¶ added in v0.0.11
func (*Context) SetDataDir ¶
func (*Context) SetHTTPAddr ¶
func (*Context) SetHTTPEnabled ¶
func (*Context) SetWorkDir ¶
func (*Context) SwitchCurrent ¶
func (*Context) SwitchHistory ¶
Click to show internal directories.
Click to hide internal directories.