You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

42 lines
1.0 KiB

7 years ago
7 years ago
7 years ago
7 years ago
  1. package embedded
  2. import (
  3. "github.com/syndtr/goleveldb/leveldb"
  4. "github.com/chrislusf/seaweedfs/weed/filer2"
  5. )
  6. type EmbeddedStore struct {
  7. db *leveldb.DB
  8. }
  9. func NewEmbeddedStore(dir string) (filer *EmbeddedStore, err error) {
  10. filer = &EmbeddedStore{}
  11. if filer.db, err = leveldb.OpenFile(dir, nil); err != nil {
  12. return
  13. }
  14. return
  15. }
  16. func (filer *EmbeddedStore) InsertEntry(entry *filer2.Entry) (err error) {
  17. return nil
  18. }
  19. func (filer *EmbeddedStore) AddDirectoryLink(directory *filer2.Entry, delta int32) (err error) {
  20. return nil
  21. }
  22. func (filer *EmbeddedStore) UpdateEntry(entry *filer2.Entry) (err error) {
  23. return nil
  24. }
  25. func (filer *EmbeddedStore) FindEntry(fullpath filer2.FullPath) (found bool, entry *filer2.Entry, err error) {
  26. return false, nil, nil
  27. }
  28. func (filer *EmbeddedStore) DeleteEntry(fullpath filer2.FullPath) (entry *filer2.Entry, err error) {
  29. return nil, nil
  30. }
  31. func (filer *EmbeddedStore) ListDirectoryEntries(fullpath filer2.FullPath, startFileName string, inclusive bool, limit int) (entries []*filer2.Entry, err error) {
  32. return nil, nil
  33. }