schemav1

package
v0.0.0-...-927d137 Latest Latest
Warning

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

Go to latest
Published: Jul 8, 2023 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type File

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

func FileFromMeta

func FileFromMeta(meta *dynamo.FileMetaV1V2, table, ownerID string, db *dynamodb.DynamoDB, changeLogWriter *json.Encoder) (*File, error)

func (*File) CheckReservedLock

func (f *File) CheckReservedLock() (retB bool, retErr error)

func (*File) CleanupSectors

func (f *File) CleanupSectors(meta *dynamo.FileMetaV1V2) error

func (*File) Close

func (f *File) Close() error

func (*File) DeviceCharacteristics

func (f *File) DeviceCharacteristics() sqlite3vfs.DeviceCharacteristic

func (*File) FileSize

func (f *File) FileSize() (retSize int64, retErr error)

func (*File) Lock

func (f *File) Lock(elock sqlite3vfs.LockType) (retErr error)

func (*File) ReadAt

func (f *File) ReadAt(p []byte, off int64) (retN int, retErr error)

func (*File) SanityCheckSectors

func (f *File) SanityCheckSectors() error

func (*File) SectorSize

func (f *File) SectorSize() int64

func (*File) Sync

func (f *File) Sync(flag sqlite3vfs.SyncType) error

func (*File) Truncate

func (f *File) Truncate(size int64) (retErr error)

func (*File) Unlock

func (f *File) Unlock(elock sqlite3vfs.LockType) (retErr error)

func (*File) WriteAt

func (f *File) WriteAt(b []byte, off int64) (n int, err error)

type Sector

type Sector struct {
	Offset int64
	Data   []byte
}

type SectorWriter

type SectorWriter struct {
	F *File
	// contains filtered or unexported fields
}

SectorWriter is a buffered writer for sectors. You must call flush() and check its error to ensure all sectors are actually written

func (*SectorWriter) DeleteSector

func (w *SectorWriter) DeleteSector(s int64) error

func (*SectorWriter) Flush

func (w *SectorWriter) Flush() error

func (*SectorWriter) WriteSector

func (w *SectorWriter) WriteSector(s *Sector) error

Jump to

Keyboard shortcuts

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