database

package
v0.0.0-...-7115b38 Latest Latest
Warning

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

Go to latest
Published: May 23, 2024 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BadgerDB

type BadgerDB struct {
	DB *badger.DB
}

func (*BadgerDB) Delete

func (kv *BadgerDB) Delete(key []byte) error

func (*BadgerDB) Get

func (kv *BadgerDB) Get(key []byte) ([]byte, error)

func (*BadgerDB) Has

func (kv *BadgerDB) Has(key []byte) (bool, error)

func (*BadgerDB) Set

func (kv *BadgerDB) Set(key, value []byte) error

type Database

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

func NewDatabase

func NewDatabase(db IDatabase) *Database

func (*Database) Branches

func (kv *Database) Branches(repo string) ([]string, error)

func (*Database) DeleteBranches

func (kv *Database) DeleteBranches(repo string) error

func (*Database) DeleteLastCommitOfBranch

func (kv *Database) DeleteLastCommitOfBranch(repo, branch string) error

func (*Database) DeleteRepo

func (kv *Database) DeleteRepo(repo string) error

func (*Database) DeleteTags

func (kv *Database) DeleteTags(repo string) error

func (*Database) LastCommitOfBranch

func (kv *Database) LastCommitOfBranch(repo, branch string) (string, error)

func (*Database) SetBranches

func (kv *Database) SetBranches(repo string, branches []string) error

func (*Database) SetLastCommitOfBranch

func (kv *Database) SetLastCommitOfBranch(repo, branch, commit string) error

func (*Database) SetTags

func (kv *Database) SetTags(repo string, tags []string) error

func (*Database) Tags

func (kv *Database) Tags(repo string) ([]string, error)

type IDatabase

type IDatabase interface {
	Get(key []byte) ([]byte, error)
	Set(key []byte, value []byte) error
	Has(key []byte) (bool, error)
	Delete(key []byte) error
}

Jump to

Keyboard shortcuts

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