gocq

package
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: Oct 9, 2023 License: AGPL-3.0 Imports: 43 Imported by: 3

Documentation

Overview

Package gocq 程序的主体部分

Index

Constants

This section is empty.

Variables

View Source
var ErrSMSRequestError = errors.New("sms request error")

ErrSMSRequestError SMS请求出错

Functions

func InitBase

func InitBase()

InitBase 解析参数并检测

如果在 windows 下双击打开了程序,程序将在此函数释出脚本后终止;
如果传入 -h 参数,程序将打印帮助后终止;
如果传入 -d 参数,程序将在启动 daemon 后终止。

func LoginInteract

func LoginInteract()

LoginInteract 登录交互, 可能需要键盘输入, 必须在 InitBase, PrepareData 之后执行

func PasswordHashDecrypt

func PasswordHashDecrypt(encryptedPasswordHash string, key []byte) ([]byte, error)

PasswordHashDecrypt 使用key解密给定passwordHash

func PasswordHashEncrypt

func PasswordHashEncrypt(passwordHash []byte, key []byte) string

PasswordHashEncrypt 使用key加密给定passwordHash

func PrepareData

func PrepareData()

PrepareData 准备 log, 缓存, 数据库, 必须在 InitBase 之后执行

func WaitSignal

func WaitSignal()

WaitSignal 在新线程检查更新和网络并等待信号, 必须在 InitBase, PrepareData, LoginInteract 之后执行

  • 直接返回: os.Interrupt, syscall.SIGTERM
  • dump stack: syscall.SIGQUIT, syscall.SIGUSR1

Types

This section is empty.

Jump to

Keyboard shortcuts

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