Documentation
¶
Index ¶
- type FileNode
- func (node *FileNode) GetFlagWriter(flag int) (io.Writer, error)
- func (node *FileNode) GetMetadata() interface{}
- func (node *FileNode) GetName() string
- func (node *FileNode) GetPath() string
- func (node *FileNode) GetReader() (io.Reader, error)
- func (node *FileNode) GetReference() string
- func (node *FileNode) GetWriter() (io.Writer, error)
- func (node *FileNode) SetMetadata(metadata interface{}) error
- func (node *FileNode) SetName(name string) error
- type FileStorage
- func (storage *FileStorage) Close() error
- func (storage *FileStorage) Create(name string, metadata interface{}) (Node, error)
- func (storage *FileStorage) Delete(reference string) error
- func (storage *FileStorage) DeleteBy(namePrefix string, namePostfix string) error
- func (storage *FileStorage) ExistsByName(name string) (bool, error)
- func (storage *FileStorage) ExistsByReference(reference string) (bool, error)
- func (storage *FileStorage) GetByName(name string) (Node, error)
- func (storage *FileStorage) GetByReference(reference string) (Node, error)
- func (storage *FileStorage) ListBy(namePrefix string, namePostfix string) ([]Node, error)
- func (storage *FileStorage) ListReferences(namePrefix string, namePostfix string) ([]string, error)
- func (storage *FileStorage) Open() error
- type FlagWritable
- type Mutable
- type Node
- type Pathable
- type Readable
- type Storage
- type Writable
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) GetMetadata ¶
func (node *FileNode) GetMetadata() interface{}
func (*FileNode) GetReference ¶
func (*FileNode) SetMetadata ¶
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) 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 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
}
Click to show internal directories.
Click to hide internal directories.