ctx

package
v0.0.7 Latest Latest
Warning

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

Go to latest
Published: Apr 9, 2025 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

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

	// 工作目录相关状态
	WorkDir   string
	WorkUsage string

	// HTTP服务相关状态
	HTTPEnabled bool
	HTTPAddr    string

	// 当前选中的微信实例
	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 New

func New(conf *conf.Service) *Context

func (*Context) Refresh

func (c *Context) Refresh()

func (*Context) SetDataDir

func (c *Context) SetDataDir(dir string)

func (*Context) SetHTTPAddr

func (c *Context) SetHTTPAddr(addr string)

func (*Context) SetHTTPEnabled

func (c *Context) SetHTTPEnabled(enabled bool)

func (*Context) SetWorkDir

func (c *Context) SetWorkDir(dir string)

func (*Context) SwitchCurrent

func (c *Context) SwitchCurrent(info *wechat.Account)

func (*Context) SwitchHistory

func (c *Context) SwitchHistory(account string)

func (*Context) UpdateConfig

func (c *Context) UpdateConfig()

更新配置

Jump to

Keyboard shortcuts

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