base

package
v1.0.0-beta8-fix1 Latest Latest
Warning

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

Go to latest
Published: Nov 15, 2021 License: AGPL-3.0 Imports: 14 Imported by: 0

Documentation

Overview

Package base provides base config for go-cqhttp

Index

Constants

View Source
const (
	AcceptOneBot12HTTPEndPoint = false
	AcceptOneBot12Message      = false
)

onebot 12 feature

Variables

View Source
var (
	EncodeSilk   = encodeSilk   // 编码 SilkV3 音频
	ResampleSilk = resampleSilk // 将silk重新编码为 24000 bit rate
)

silk encode features

View Source
var (
	IsLawfulImage = nocheck // 检查图片MIME
	IsLawfulAudio = nocheck // 检查音频MIME
)

Mime scan feature

View Source
var (
	LittleC  string // config file
	LittleD  bool   // daemon
	LittleH  bool   // Help
	LittleWD string // working directory
)

command flags

View Source
var (
	Debug               bool // 是否开启 debug 模式
	RemoveReplyAt       bool // 是否删除reply后的at
	ExtraReplyData      bool // 是否上报额外reply信息
	IgnoreInvalidCQCode bool // 是否忽略无效CQ码
	SplitURL            bool // 是否分割URL
	ForceFragmented     bool // 是否启用强制分片
	SkipMimeScan        bool // 是否跳过Mime扫描
	ReportSelfMessage   bool // 是否上报自身消息
	UseSSOAddress       bool // 是否使用服务器下发的新地址进行重连
	LogForceNew         bool // 是否在每次启动时强制创建全新的文件储存日志
	LogColorful         bool // 是否启用日志颜色
	FastStart           bool // 是否为快速启动

	PostFormat        string                 // 上报格式 string or array
	Proxy             string                 // 存储 proxy_rewrite,用于设置代理
	PasswordHash      [16]byte               // 存储QQ密码哈希供登录使用
	AccountToken      []byte                 // 存储 AccountToken 供登录使用
	Account           *config.Account        // 账户配置
	Reconnect         *config.Reconnect      // 重连配置
	LogLevel          string                 // 日志等级
	LogAging          = time.Hour * 24 * 365 // 日志时效
	HeartbeatInterval = time.Second * 5      // 心跳间隔

	Servers  []map[string]yaml.Node // 连接服务列表
	Database map[string]yaml.Node   // 数据库列表
)

config file flags

View Source
var Version = "unknown"

Version go-cqhttp的版本信息,在编译时使用ldflags进行覆盖

Functions

func Help

func Help()

Help cli命令行-h的帮助提示

func Init

func Init()

Init read config from yml file

func Parse

func Parse()

Parse parse flags

func ResetWorkingDir

func ResetWorkingDir()

ResetWorkingDir 重设工作路径

Types

This section is empty.

Jump to

Keyboard shortcuts

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