badger

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Nov 7, 2023 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddRootDir

func AddRootDir(path string) error

func CloseDB

func CloseDB()

func Delete

func Delete(key string) error

func DeleteRootDir

func DeleteRootDir(path string)

func GetAllSyncMetadataAmongRoot

func GetAllSyncMetadataAmongRoot() ([]*types.SyncMetadata, error)

Get All SyncMetadata in all rootpath e.g. GetAllSyncMetadataAmongRoot()

func GetAllSyncMetadataInRoot

func GetAllSyncMetadataInRoot(rootpath string) ([]*types.SyncMetadata, error)

Get All SyncMetadata in certain rootpath e.g. GetAllSyncMetadataInRoot("/home/username/rootdir")

func GetBeforePathWithAfterPath

func GetBeforePathWithAfterPath(afterPath string) string

func GetRootDir

func GetRootDir(path string) types.RootDir

func GetRootDirList

func GetRootDirList() []types.RootDir

key : value == string : []RootDir

func GetSyncMetadata

func GetSyncMetadata(path string) types.SyncMetadata

TODO NIL 반환 , 즉 아래 두개 함수를 합쳐야함

func GetUUID

func GetUUID() string

func IsSyncMetadataExisted

func IsSyncMetadataExisted(path string) bool

func OpenDB

func OpenDB()

Define a function to open the DB.

func SplitBeforeAfterRoot

func SplitBeforeAfterRoot(path string) (string, string)

func Update

func Update(key string, value []byte) error

func UpdateRootdirToRegistered

func UpdateRootdirToRegistered(path string) error

func View

func View(key string) ([]byte, error)

Types

type CRUD

type CRUD interface {
	Update(key string, value []byte) error
	View(key string) ([]byte, error)
	Delete(key string) error
}

Jump to

Keyboard shortcuts

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