Version: v0.0.0-...-8817f42 Latest Latest

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

Go to latest
Published: May 4, 2020 License: GPL-3.0 Imports: 5 Imported by: 0




This section is empty.


View Source
var (
	HashPrefix = []byte("hash/")
View Source
var (
	RefPrefix = []byte("r/")
View Source
var (
	TreePrefix = []byte("t")


This section is empty.


type DB

type DB struct {
	// contains filtered or unexported fields

func NewDB

func NewDB(path string) (*DB, error)

func (*DB) BGet

func (self *DB) BGet(e types.Byter) error

func (*DB) BPut

func (self *DB) BPut(e types.Byter) error

func (*DB) Close

func (self *DB) Close()

func (*DB) Delete

func (self *DB) Delete(k []byte) (err error)

func (*DB) EndSession

func (self *DB) EndSession()

func (*DB) ForEach

func (self *DB) ForEach(prefix []byte, cb func(k, v []byte) error) error

func (*DB) ForEachOne

func (self *DB) ForEachOne(prefix []byte, cb func(k, v []byte) error) error

func (*DB) Get

func (self *DB) Get(k []byte, cb func(v []byte) error) (err error)

func (*DB) GetRange

func (self *DB) GetRange(prefix []byte, n func() types.Byter) (es []types.Byter, err error)

func (*DB) GetRawRef

func (self *DB) GetRawRef(h []byte, cb func([]byte) error) error

func (*DB) GetRawTree

func (self *DB) GetRawTree(h []byte, cb func([]byte) error) error

func (*DB) GetTree

func (self *DB) GetTree(owner, project string) ([]string, error)

func (*DB) Group

func (tdb *DB) Group(idx, pos int) (map[string][]string, error)

func (*DB) HasRawRef

func (self *DB) HasRawRef(h []byte) bool

func (*DB) NewHashGeter

func (db *DB) NewHashGeter(sub string) types.SessionedGeter

func (*DB) NewHashSession

func (db *DB) NewHashSession(sub string) *HashSession

func (*DB) NewSession

func (self *DB) NewSession()

func (*DB) Put

func (self *DB) Put(k, v []byte) (err error)

func (*DB) PutRawRef

func (self *DB) PutRawRef(h, b []byte) error

func (*DB) PutRawTree

func (self *DB) PutRawTree(h, b []byte) error

func (*DB) PutSync

func (self *DB) PutSync(k, v []byte) (err error)

func (*DB) PutTree

func (self *DB) PutTree(owner, project string, trees []string) error

func (*DB) RawRefs

func (self *DB) RawRefs(cb func(k, v []byte) error) error

func (*DB) RawTrees

func (self *DB) RawTrees(cb func(k, v []byte) error) error

type HashSession

type HashSession struct {
	// contains filtered or unexported fields

func (*HashSession) End

func (s *HashSession) End()

func (*HashSession) Next

func (s *HashSession) Next(prefixlen int, cb func(k, v []byte) error) error

func (*HashSession) NextGroup

func (s *HashSession) NextGroup(prefixlen int, newitem func() types.Byter) (items []types.Byter, err error)

Jump to

Keyboard shortcuts

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