memory

package
v1.8.2 Latest Latest
Warning

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

Go to latest
Published: Nov 5, 2026 License: MIT Imports: 10 Imported by: 0

Documentation

Overview

Package memory provides an in-memory implementation of store.Store for testing.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Store

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

Store is an in-memory implementation of store.Store.

func New

func New() *Store

New creates a new in-memory store.

func (*Store) Close

func (s *Store) Close() error

func (*Store) CreateBucket

func (s *Store) CreateBucket(_ context.Context, b *model.Bucket) error

func (*Store) CreateObject

func (s *Store) CreateObject(_ context.Context, o *model.Object) error

func (*Store) CreateUploadSession

func (s *Store) CreateUploadSession(_ context.Context, u *model.UploadSession) error

func (*Store) DB

func (s *Store) DB() *grove.DB

func (*Store) DecrementCASRef

func (s *Store) DecrementCASRef(_ context.Context, hash string) error

func (*Store) DeleteBucket

func (s *Store) DeleteBucket(_ context.Context, id string) error

func (*Store) DeleteCASEntry

func (s *Store) DeleteCASEntry(_ context.Context, hash string) error

func (*Store) DeleteQuota

func (s *Store) DeleteQuota(_ context.Context, tenantKey string) error

func (*Store) GetBucket

func (s *Store) GetBucket(_ context.Context, id string) (*model.Bucket, error)

func (*Store) GetBucketByName

func (s *Store) GetBucketByName(_ context.Context, name string) (*model.Bucket, error)

func (*Store) GetCASEntry

func (s *Store) GetCASEntry(_ context.Context, hash string) (*model.CASEntry, error)

func (*Store) GetObject

func (s *Store) GetObject(_ context.Context, id string) (*model.Object, error)

func (*Store) GetObjectByKey

func (s *Store) GetObjectByKey(_ context.Context, bucketID, key string) (*model.Object, error)

func (*Store) GetQuota

func (s *Store) GetQuota(_ context.Context, tenantKey string) (*model.Quota, error)

func (*Store) GetUploadSession

func (s *Store) GetUploadSession(_ context.Context, id string) (*model.UploadSession, error)

func (*Store) IncrementCASRef

func (s *Store) IncrementCASRef(_ context.Context, hash string) error

func (*Store) ListAllObjects

func (s *Store) ListAllObjects(_ context.Context, limit int) ([]*model.Object, error)

func (*Store) ListBuckets

func (s *Store) ListBuckets(_ context.Context, tenantKey string) ([]*model.Bucket, error)

func (*Store) ListCASEntries

func (s *Store) ListCASEntries(_ context.Context) ([]*model.CASEntry, error)

func (*Store) ListExpiredUploads

func (s *Store) ListExpiredUploads(_ context.Context) ([]*model.UploadSession, error)

func (*Store) ListObjects

func (s *Store) ListObjects(_ context.Context, bucketID string, opts ...store.ListOption) ([]*model.Object, error)

func (*Store) ListQuotas

func (s *Store) ListQuotas(_ context.Context) ([]*model.Quota, error)

func (*Store) ListUnpinnedCAS

func (s *Store) ListUnpinnedCAS(_ context.Context) ([]*model.CASEntry, error)

func (*Store) ListUploads

func (s *Store) ListUploads(_ context.Context) ([]*model.UploadSession, error)

func (*Store) Migrate

func (s *Store) Migrate(_ context.Context, _ ...*migrate.Group) error

func (*Store) Ping

func (s *Store) Ping(_ context.Context) error

func (*Store) PutCASEntry

func (s *Store) PutCASEntry(_ context.Context, entry *model.CASEntry) error

func (*Store) SetCASPinned

func (s *Store) SetCASPinned(_ context.Context, hash string, pinned bool) error

func (*Store) SetQuota

func (s *Store) SetQuota(_ context.Context, q *model.Quota) error

func (*Store) SoftDeleteObject

func (s *Store) SoftDeleteObject(_ context.Context, id string) error

func (*Store) UpdateBucket

func (s *Store) UpdateBucket(_ context.Context, b *model.Bucket) error

func (*Store) UpdateObject

func (s *Store) UpdateObject(_ context.Context, o *model.Object) error

func (*Store) UpdateQuotaUsage

func (s *Store) UpdateQuotaUsage(_ context.Context, tenantKey string, deltaBytes, deltaObjects int64) error

func (*Store) UpdateUploadSession

func (s *Store) UpdateUploadSession(_ context.Context, u *model.UploadSession) error

Jump to

Keyboard shortcuts

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