bloby

package module
v0.0.0-...-4304129 Latest Latest
Warning

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

Go to latest
Published: Aug 11, 2024 License: AGPL-3.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type FileNode

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

func (*FileNode) GetFlagWriter

func (node *FileNode) GetFlagWriter(flag int) (io.Writer, error)

func (*FileNode) GetMetadata

func (node *FileNode) GetMetadata() interface{}

func (*FileNode) GetName

func (node *FileNode) GetName() string

func (*FileNode) GetPath

func (node *FileNode) GetPath() string

func (*FileNode) GetReader

func (node *FileNode) GetReader() (io.Reader, error)

func (*FileNode) GetReference

func (node *FileNode) GetReference() string

func (*FileNode) GetWriter

func (node *FileNode) GetWriter() (io.Writer, error)

func (*FileNode) SetMetadata

func (node *FileNode) SetMetadata(metadata interface{}) error

func (*FileNode) SetName

func (node *FileNode) SetName(name string) error

type FileStorage

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

func NewFileStorage

func NewFileStorage(path string) *FileStorage

func (*FileStorage) Close

func (storage *FileStorage) Close() error

func (*FileStorage) Create

func (storage *FileStorage) Create(name string, metadata interface{}) (Node, error)

func (*FileStorage) Delete

func (storage *FileStorage) Delete(reference string) error

func (*FileStorage) DeleteBy

func (storage *FileStorage) DeleteBy(namePrefix string, namePostfix string) error

func (*FileStorage) ExistsByName

func (storage *FileStorage) ExistsByName(name string) (bool, error)

func (*FileStorage) ExistsByReference

func (storage *FileStorage) ExistsByReference(reference string) (bool, error)

func (*FileStorage) GetByName

func (storage *FileStorage) GetByName(name string) (Node, error)

func (*FileStorage) GetByReference

func (storage *FileStorage) GetByReference(reference string) (Node, error)

func (*FileStorage) ListBy

func (storage *FileStorage) ListBy(namePrefix string, namePostfix string) ([]Node, error)

func (*FileStorage) ListReferences

func (storage *FileStorage) ListReferences(namePrefix string, namePostfix string) ([]string, error)

func (*FileStorage) Open

func (storage *FileStorage) Open() error

Open FileStorage in goroutine-safe mode

WARNING:

This implementation supports only multigoroutine access, but not the multiprocess access. opening database in multiprocess mode will cause database corruption.

type FlagWritable

type FlagWritable interface {
	GetFlagWriter(flag int) (io.Writer, error)
}

type Mutable

type Mutable interface {
	SetMetadata(metadata interface{}) error
	SetName(name string) error
}

type Node

type Node interface {
	GetReference() string
	GetName() string
	GetMetadata() interface{}
}

type Pathable

type Pathable interface {
	GetPath() string
}

type Readable

type Readable interface {
	GetReader() (io.Reader, error)
}

type Storage

type Storage interface {
	GetByReference(reference string) (Node, error)
	GetByName(name string) (Node, error)
	Create(name string, metadata interface{}) (Node, error)
	Delete(reference string) error
	DeleteBy(namePrefix string, namePostfix string) error
	ExistsByName(name string) (bool, error)
	ExistsByReference(reference string) (bool, error)
	ListBy(namePrefix string, namePostfix string) ([]Node, error)
	ListReferences(namePrefix string, namePostfix string) ([]string, error)
	Open() error
	Close() error
}

type Writable

type Writable interface {
	GetWriter() (io.Writer, error)
}

Jump to

Keyboard shortcuts

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