diskfilemap

package
v0.0.0-...-debf9f8 Latest Latest
Warning

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

Go to latest
Published: Sep 1, 2024 License: LGPL-2.1 Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrInvalidLengthDiskFileMapTypes        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowDiskFileMapTypes          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupDiskFileMapTypes = fmt.Errorf("proto: unexpected end of group")
)
View Source
var (
	ErrBucketNotFound = errors.New("ErrBucketNotFound")
)

Functions

This section is empty.

Types

type BucketData

type BucketData struct {
	Items []*ownmap.KVPair `protobuf:"bytes,1,rep,name=items,proto3" json:"items,omitempty"`
}

func (*BucketData) Descriptor

func (*BucketData) Descriptor() ([]byte, []int)

func (*BucketData) Equal

func (this *BucketData) Equal(that interface{}) bool

func (*BucketData) GetItems

func (m *BucketData) GetItems() []*ownmap.KVPair

func (*BucketData) GoString

func (this *BucketData) GoString() string

func (*BucketData) Marshal

func (m *BucketData) Marshal() (dAtA []byte, err error)

func (*BucketData) MarshalTo

func (m *BucketData) MarshalTo(dAtA []byte) (int, error)

func (*BucketData) MarshalToSizedBuffer

func (m *BucketData) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*BucketData) ProtoMessage

func (*BucketData) ProtoMessage()

func (*BucketData) Reset

func (m *BucketData) Reset()

func (*BucketData) Size

func (m *BucketData) Size() (n int)

func (*BucketData) String

func (this *BucketData) String() string

func (*BucketData) Unmarshal

func (m *BucketData) Unmarshal(dAtA []byte) error

func (*BucketData) XXX_DiscardUnknown

func (m *BucketData) XXX_DiscardUnknown()

func (*BucketData) XXX_Marshal

func (m *BucketData) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*BucketData) XXX_Merge

func (m *BucketData) XXX_Merge(src proto.Message)

func (*BucketData) XXX_Size

func (m *BucketData) XXX_Size() int

func (*BucketData) XXX_Unmarshal

func (m *BucketData) XXX_Unmarshal(b []byte) error

type BucketName

type BucketName []byte

type BucketPolicyFunc

type BucketPolicyFunc func(key []byte) (BucketName, errorsx.Error)

type DiskCollection

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

func NewDiskCollection

func NewDiskCollection(fs gofs.Fs, basePath string, bucketFunc BucketPolicyFunc, bucketSortIsKey1Larger IsKey1LargerThanKey2Func) (*DiskCollection, errorsx.Error)

func (*DiskCollection) Get

func (dc *DiskCollection) Get(key []byte) ([]byte, error)

func (*DiskCollection) Iterator

func (dc *DiskCollection) Iterator() (Iterator, errorsx.Error)

func (*DiskCollection) Set

func (dc *DiskCollection) Set(key, value []byte) errorsx.Error

type DiskCollectionIterator

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

func (*DiskCollectionIterator) GetAllFromCurrentBucketAscending

func (dci *DiskCollectionIterator) GetAllFromCurrentBucketAscending() ([]*ownmap.KVPair, errorsx.Error)

func (*DiskCollectionIterator) NextBucket

func (dci *DiskCollectionIterator) NextBucket() bool

type IsKey1LargerThanKey2Func

type IsKey1LargerThanKey2Func func(key1, key2 []byte) (bool, errorsx.Error)

type Iterator

type Iterator interface {
	NextBucket() bool
	GetAllFromCurrentBucketAscending() ([]*ownmap.KVPair, errorsx.Error)
}

type MockOnDiskCollection

type MockOnDiskCollection struct {
	GetFunc      func(key []byte) ([]byte, error)
	SetFunc      func(key []byte, value []byte) errorsx.Error
	IteratorFunc func() (Iterator, errorsx.Error)
}

func (*MockOnDiskCollection) Get

func (o *MockOnDiskCollection) Get(key []byte) ([]byte, error)

func (*MockOnDiskCollection) Iterator

func (o *MockOnDiskCollection) Iterator() (Iterator, errorsx.Error)

func (*MockOnDiskCollection) Set

func (o *MockOnDiskCollection) Set(key []byte, value []byte) errorsx.Error

type OnDiskCollection

type OnDiskCollection interface {
	Get(key []byte) (value []byte, err error) // errorsx.ObjectNotFound if not found
	Set(key, value []byte) errorsx.Error
	Iterator() (Iterator, errorsx.Error)
}

Jump to

Keyboard shortcuts

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