fsstore

package
v0.0.0-...-36bb858 Latest Latest
Warning

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

Go to latest
Published: Sep 10, 2023 License: MPL-2.0 Imports: 13 Imported by: 5

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type FSStore

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

func New

func New(x posixfs.FS, hashFunc cadata.HashFunc, maxSize int) FSStore

func (FSStore) Delete

func (s FSStore) Delete(ctx context.Context, id cadata.ID) error

func (FSStore) Exists

func (s FSStore) Exists(ctx context.Context, id cadata.ID) (bool, error)

func (FSStore) Get

func (s FSStore) Get(ctx context.Context, id cadata.ID, buf []byte) (int, error)

func (FSStore) Hash

func (s FSStore) Hash(x []byte) cadata.ID

func (FSStore) List

func (s FSStore) List(ctx context.Context, span cadata.Span, ids []cadata.ID) (int, error)

func (FSStore) MaxSize

func (s FSStore) MaxSize() int

func (FSStore) Post

func (s FSStore) Post(ctx context.Context, data []byte) (cadata.ID, error)

Jump to

Keyboard shortcuts

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