1
0
mirror of https://github.com/Mrs4s/go-cqhttp.git synced 2025-05-04 19:17:37 +08:00
go-cqhttp/db/leveldb/const.go
wdvxdr1123 9054d4cee8
db/leveldb: impl index read/write drop encoding/gob (#1370)
Two benefit below:
 * shrink go-cqhttp binary size about 200KiB
 * shrink database file from 2.8M to 1.56M compared with v2 database

Also provide a tool to migrate v2 database:
https://github.com/RomiChan/gocq-leveldb-migrate
2022-02-15 22:24:27 +08:00

26 lines
332 B
Go

package leveldb
const dataVersion = 1
const (
group = 0x0
private = 0x1
guildChannel = 0x2
)
type coder byte
const (
coderNil coder = iota
coderInt
coderUint
coderInt32
coderUint32
coderInt64
coderUint64
coderString
coderMSG // global.MSG
coderArrayMSG // []global.MSG
coderStruct // struct{}
)