db

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

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Compact

func Compact(dir string) error

Types

type BatchDB

type BatchDB struct {
	// contains filtered or unexported fields
}

func NewBatchDB

func NewBatchDB(db *DB) *BatchDB

func (*BatchDB) BPut

func (self *BatchDB) BPut(e types.Byter)

func (*BatchDB) Close

func (self *BatchDB) Close()

func (*BatchDB) EndSession

func (self *BatchDB) EndSession() error

func (*BatchDB) NewSession

func (self *BatchDB) NewSession() error

func (*BatchDB) Put

func (self *BatchDB) Put(k, v []byte)

type DB

type DB struct {
	// contains filtered or unexported fields
}

func NewDB

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

func (*DB) GetDB

func (db *DB) GetDB() *leveldb.DB

type ObjDB

type ObjDB struct {
	Force bool
	// contains filtered or unexported fields
}

func NewObjectDB

func NewObjectDB(db *DB) *ObjDB

func (*ObjDB) Close

func (self *ObjDB) Close()

func (*ObjDB) GetBlobByHex

func (self *ObjDB) GetBlobByHex(h string) ([]byte, error)

func (*ObjDB) HasBlob

func (self *ObjDB) HasBlob(hash plumbing.Hash) (bool, error)

func (*ObjDB) Msg

func (self *ObjDB) Msg() chan string

func (*ObjDB) PutBlob

func (self *ObjDB) PutBlob(hash plumbing.Hash, v []byte) (err error)

func (*ObjDB) PutObj

func (self *ObjDB) PutObj(b *object.Blob) error

func (*ObjDB) PutObjects

func (self *ObjDB) PutObjects(iter *object.BlobIter) error

func (*ObjDB) Wait

func (self *ObjDB) Wait(v bool, show int)

type RefDB

type RefDB struct {
	Path string

	Retry int
	// contains filtered or unexported fields
}

func NewRefDB

func NewRefDB(path string) *RefDB

func (*RefDB) CashePrefech

func (self *RefDB) CashePrefech(r []string)

func (*RefDB) Close

func (self *RefDB) Close()

func (*RefDB) DelRef

func (self *RefDB) DelRef(owner, project string) error

func (*RefDB) GetRef

func (self *RefDB) GetRef(owner, project string) []gitext.Ref

func (*RefDB) HasRef

func (self *RefDB) HasRef(owner, project string) (bool, error)

func (*RefDB) Init

func (self *RefDB) Init(r []string)

func (*RefDB) IsBuild

func (self *RefDB) IsBuild(owner, project string) bool

func (*RefDB) NoDB

func (self *RefDB) NoDB()

func (*RefDB) OK

func (self *RefDB) OK(owner, project string) bool

func (*RefDB) Open

func (self *RefDB) Open() *leveldb.DB

func (*RefDB) PutRef

func (self *RefDB) PutRef(owner, project string, r []gitext.Ref) (err error)

func (*RefDB) PutRefSync

func (self *RefDB) PutRefSync(owner, project string, r []gitext.Ref) (err error)

func (*RefDB) RemoteOK

func (self *RefDB) RemoteOK(owner, project string) bool

func (*RefDB) SetBuild

func (self *RefDB) SetBuild(owner, project string, ir []gitext.Ref) (r []gitext.Ref, err error)

func (*RefDB) Stop

func (self *RefDB) Stop()

func (*RefDB) UnCashe

func (self *RefDB) UnCashe(r []string)

Jump to

Keyboard shortcuts

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