sqlite

package
v2.0.0 Latest Latest
Warning

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

Go to latest
Published: Oct 24, 2026 License: MIT Imports: 15 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type SQLiteStore

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

func NewSQLiteStore

func NewSQLiteStore(dbPath string, logger *zap.Logger) (*SQLiteStore, error)

func (*SQLiteStore) ApplyBatch

func (s *SQLiteStore) ApplyBatch(ctx context.Context, ops []metadata.Op) error
func (s *SQLiteStore) CleanupExpiredLinks(ctx context.Context, before time.Time) (int, error)
func (s *SQLiteStore) CleanupUsedLinks(ctx context.Context, olderThan time.Time) (int, error)

func (*SQLiteStore) Close

func (s *SQLiteStore) Close() error
func (s *SQLiteStore) ConsumeSingleUseLink(ctx context.Context, token string, usedByIP string, now time.Time) (*metadata.SingleUseLink, bool, error)
func (s *SQLiteStore) CountActiveSingleUseLinks(ctx context.Context, owner string, now time.Time) (int, error)

func (*SQLiteStore) CountEmptyETags

func (s *SQLiteStore) CountEmptyETags(ctx context.Context) (int, error)

func (*SQLiteStore) CountEmptyOwners

func (s *SQLiteStore) CountEmptyOwners(ctx context.Context) (int, error)

func (*SQLiteStore) Create

func (s *SQLiteStore) Create(ctx context.Context, md *metadata.Metadata) error

func (*SQLiteStore) CreateErasureInfo

func (s *SQLiteStore) CreateErasureInfo(ctx context.Context, filePath string, info *metadata.ErasureFileInfo) error

CreateErasureInfo stores erasure coding metadata for a file.

func (s *SQLiteStore) CreateSingleUseLink(ctx context.Context, link *metadata.SingleUseLink) error

func (*SQLiteStore) Delete

func (s *SQLiteStore) Delete(ctx context.Context, path string) error

func (*SQLiteStore) DeleteErasureInfo

func (s *SQLiteStore) DeleteErasureInfo(ctx context.Context, filePath string) error

DeleteErasureInfo removes erasure coding metadata for a file.

func (*SQLiteStore) Get

func (s *SQLiteStore) Get(ctx context.Context, path string) (*metadata.Metadata, error)

func (*SQLiteStore) GetErasureInfo

func (s *SQLiteStore) GetErasureInfo(ctx context.Context, filePath string) (*metadata.ErasureFileInfo, error)

GetErasureInfo retrieves erasure coding metadata for a file.

func (s *SQLiteStore) GetSingleUseLink(ctx context.Context, token string) (*metadata.SingleUseLink, error)

func (*SQLiteStore) GetSingleUseLinkByID

func (s *SQLiteStore) GetSingleUseLinkByID(ctx context.Context, id int64) (*metadata.SingleUseLink, error)

func (*SQLiteStore) HasChildren

func (s *SQLiteStore) HasChildren(ctx context.Context, parentPath string) (bool, error)

func (*SQLiteStore) ListByPrefix

func (s *SQLiteStore) ListByPrefix(ctx context.Context, prefix, startAfter string, limit int) ([]*metadata.Metadata, error)

func (*SQLiteStore) ListChildren

func (s *SQLiteStore) ListChildren(ctx context.Context, parentPath string) ([]*metadata.Metadata, error)

func (*SQLiteStore) ListDescendants

func (s *SQLiteStore) ListDescendants(ctx context.Context, dirPath string, maxDepth, limit int) ([]*metadata.Metadata, error)

func (*SQLiteStore) ListErasureInfos

func (s *SQLiteStore) ListErasureInfos(ctx context.Context, prefix, cursor string, limit int) ([]*metadata.ErasureFileInfo, string, error)
func (s *SQLiteStore) ListSingleUseLinks(ctx context.Context, filter metadata.LinkFilter) ([]metadata.SingleUseLink, string, error)

func (*SQLiteStore) OwnerStats

func (s *SQLiteStore) OwnerStats(ctx context.Context, cursor string, limit int) ([]metadata.OwnerStat, string, error)

func (*SQLiteStore) Rename

func (s *SQLiteStore) Rename(ctx context.Context, oldPath, newPath string) error

Rename re-keys an inode (and, for a directory, its whole subtree) from oldPath to newPath in a single transaction. Only name and path change.

func (s *SQLiteStore) RevokeSingleUseLink(ctx context.Context, id int64) error

func (*SQLiteStore) SearchMetadata

func (*SQLiteStore) Update

func (s *SQLiteStore) Update(ctx context.Context, md *metadata.Metadata) error

func (*SQLiteStore) UpdateIfMatch

func (s *SQLiteStore) UpdateIfMatch(ctx context.Context, md *metadata.Metadata, expectedETag string) error

Jump to

Keyboard shortcuts

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