ctx

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Mar 19, 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
	Version      string
	MajorVersion int
	DataKey      string
	DataUsage    string
	DataDir      string

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

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

	// 当前选中的微信实例
	Current *wechat.Info
	PID     int
	ExePath string
	Status  string

	// 所有可用的微信实例
	WeChatInstances []*wechat.Info
	// 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.Info)

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