Documentation
¶
Index ¶
- type SQLiteStore
- 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 (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 (s *SQLiteStore) CountEmptyETags(ctx context.Context) (int, error)
- func (s *SQLiteStore) CountEmptyOwners(ctx context.Context) (int, error)
- func (s *SQLiteStore) Create(ctx context.Context, md *metadata.Metadata) error
- func (s *SQLiteStore) CreateErasureInfo(ctx context.Context, filePath string, info *metadata.ErasureFileInfo) error
- func (s *SQLiteStore) CreateSingleUseLink(ctx context.Context, link *metadata.SingleUseLink) error
- func (s *SQLiteStore) Delete(ctx context.Context, path string) error
- func (s *SQLiteStore) DeleteErasureInfo(ctx context.Context, filePath string) error
- func (s *SQLiteStore) Get(ctx context.Context, path string) (*metadata.Metadata, error)
- func (s *SQLiteStore) GetErasureInfo(ctx context.Context, filePath string) (*metadata.ErasureFileInfo, error)
- func (s *SQLiteStore) GetSingleUseLink(ctx context.Context, token string) (*metadata.SingleUseLink, error)
- func (s *SQLiteStore) GetSingleUseLinkByID(ctx context.Context, id int64) (*metadata.SingleUseLink, error)
- func (s *SQLiteStore) HasChildren(ctx context.Context, parentPath string) (bool, error)
- func (s *SQLiteStore) ListByPrefix(ctx context.Context, prefix, startAfter string, limit int) ([]*metadata.Metadata, error)
- func (s *SQLiteStore) ListChildren(ctx context.Context, parentPath string) ([]*metadata.Metadata, error)
- func (s *SQLiteStore) ListDescendants(ctx context.Context, dirPath string, maxDepth, limit int) ([]*metadata.Metadata, error)
- 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 (s *SQLiteStore) OwnerStats(ctx context.Context, cursor string, limit int) ([]metadata.OwnerStat, string, error)
- func (s *SQLiteStore) Rename(ctx context.Context, oldPath, newPath string) error
- func (s *SQLiteStore) RevokeSingleUseLink(ctx context.Context, id int64) error
- func (s *SQLiteStore) SearchMetadata(ctx context.Context, q metadata.SearchQuery) (metadata.SearchResult, error)
- func (s *SQLiteStore) Update(ctx context.Context, md *metadata.Metadata) error
- func (s *SQLiteStore) UpdateIfMatch(ctx context.Context, md *metadata.Metadata, expectedETag string) error
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 (*SQLiteStore) CleanupExpiredLinks ¶
func (*SQLiteStore) CleanupUsedLinks ¶
func (*SQLiteStore) Close ¶
func (s *SQLiteStore) Close() error
func (*SQLiteStore) ConsumeSingleUseLink ¶
func (*SQLiteStore) CountActiveSingleUseLinks ¶
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) CreateErasureInfo ¶
func (s *SQLiteStore) CreateErasureInfo(ctx context.Context, filePath string, info *metadata.ErasureFileInfo) error
CreateErasureInfo stores erasure coding metadata for a file.
func (*SQLiteStore) CreateSingleUseLink ¶
func (s *SQLiteStore) CreateSingleUseLink(ctx context.Context, link *metadata.SingleUseLink) error
func (*SQLiteStore) DeleteErasureInfo ¶
func (s *SQLiteStore) DeleteErasureInfo(ctx context.Context, filePath string) error
DeleteErasureInfo removes erasure coding metadata for a file.
func (*SQLiteStore) GetErasureInfo ¶
func (s *SQLiteStore) GetErasureInfo(ctx context.Context, filePath string) (*metadata.ErasureFileInfo, error)
GetErasureInfo retrieves erasure coding metadata for a file.
func (*SQLiteStore) GetSingleUseLink ¶
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 (*SQLiteStore) ListByPrefix ¶
func (*SQLiteStore) ListChildren ¶
func (*SQLiteStore) ListDescendants ¶
func (*SQLiteStore) ListErasureInfos ¶
func (s *SQLiteStore) ListErasureInfos(ctx context.Context, prefix, cursor string, limit int) ([]*metadata.ErasureFileInfo, string, error)
func (*SQLiteStore) ListSingleUseLinks ¶
func (s *SQLiteStore) ListSingleUseLinks(ctx context.Context, filter metadata.LinkFilter) ([]metadata.SingleUseLink, string, error)
func (*SQLiteStore) OwnerStats ¶
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 (*SQLiteStore) RevokeSingleUseLink ¶
func (s *SQLiteStore) RevokeSingleUseLink(ctx context.Context, id int64) error
func (*SQLiteStore) SearchMetadata ¶
func (s *SQLiteStore) SearchMetadata(ctx context.Context, q metadata.SearchQuery) (metadata.SearchResult, error)