fix(files): add boltdb store and refactor files handlers

This commit is contained in:
hexxa 2022-03-05 00:16:04 +08:00 committed by Hexxa
parent 044cdea1d4
commit 17b4544487
19 changed files with 751 additions and 402 deletions

View file

@ -0,0 +1,7 @@
package boltdbpvd
import "github.com/boltdb/bolt"
type BoltProvider interface {
Bolt() *bolt.DB
}

View file

@ -433,6 +433,6 @@ func (bp *BoltPvd) ListStringsByPrefixIn(prefix, ns string) (map[string]string,
return results, err
}
func (bp *BoltPvd) StartUpdateTxBolt(op func(*bolt.Tx) error) error {
return bp.db.Update(op)
func (bp *BoltPvd) Bolt() *bolt.DB {
return bp.db
}