Documentation ¶
Index ¶
- Constants
- Variables
- type FSTree
- func (t *FSTree) Delete(addr *objectSDK.Address) error
- func (t *FSTree) Exists(addr *objectSDK.Address) (string, error)
- func (t *FSTree) Get(addr *objectSDK.Address) ([]byte, error)
- func (t *FSTree) Iterate(prm *IterationPrm) error
- func (t *FSTree) NumberOfObjects() (uint64, error)
- func (t *FSTree) Put(addr *objectSDK.Address, data []byte) error
- type Info
- type IterationPrm
Constants ¶
View Source
const ( // DirNameLen is how many bytes is used to group keys into directories. DirNameLen = 1 // in bytes // MaxDepth is maximum depth of nested directories. MaxDepth = (sha256.Size - 1) / DirNameLen )
Variables ¶
View Source
var ErrFileNotFound = errors.New("file not found")
ErrFileNotFound is returned when file is missing.
Functions ¶
This section is empty.
Types ¶
type FSTree ¶
FSTree represents object storage as filesystem tree.
func (*FSTree) Exists ¶
Exists returns path to file with object contents if it exists in storage and an error otherwise.
func (*FSTree) Iterate ¶
func (t *FSTree) Iterate(prm *IterationPrm) error
Iterate iterates over all stored objects.
func (*FSTree) NumberOfObjects ¶ added in v0.26.1
NumberOfObjects walks the file tree rooted at FSTree's root and returns number of stored objects.
type Info ¶
type Info struct { // Permission bits of the root directory. Permissions fs.FileMode // Full path to the root directory. RootPath string }
Info groups the information about file storage.
type IterationPrm ¶ added in v0.27.5
type IterationPrm struct {
// contains filtered or unexported fields
}
IterationPrm contains iteraction parameters.
func (*IterationPrm) WithHandler ¶ added in v0.27.5
func (p *IterationPrm) WithHandler(f func(addr *objectSDK.Address, data []byte) error) *IterationPrm
WithHandler sets a function to call on each object.
func (*IterationPrm) WithIgnoreErrors ¶ added in v0.27.5
func (p *IterationPrm) WithIgnoreErrors(ignore bool) *IterationPrm
WithIgnoreErrors sets a flag indicating whether errors should be ignored.
Click to show internal directories.
Click to hide internal directories.