space

package
v2.0.0-...-ef57614 Latest Latest
Warning

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

Go to latest
Published: May 17, 2024 License: AGPL-3.0-or-later Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Checker

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

func NewChecker

func NewChecker(dbPath string, dbReader checkers.DatabaseMetadataReader) Checker

func NewCheckerFromCheckers

func NewCheckerFromCheckers(fsChecker FileSystemChecker, dbChecker DatabaseChecker) Checker

func (Checker) Check

func (c Checker) Check() (Usage, error)

type DatabaseChecker

type DatabaseChecker interface {
	TotalSize() (uint64, error)
}

type FileSystemChecker

type FileSystemChecker interface {
	MeasureUsage() (checkers.PicoShareUsage, error)
}

type Usage

type Usage struct {
	// TotalServingBytes represents the sum total of the bytes of file data that
	// PicoShare has of file uploads in the database. This is just file bytes
	// and does not include PicoShare-specific metadata about the files.
	TotalServingBytes uint64
	// DatabaseFileSize represents the total number of bytes on the filesystem
	// dedicated to storing PicoShare's SQLite database files.
	DatabaseFileSize uint64
	// FileSystemUsedBytes represents total bytes in use on the filesystem where
	// PicoShare's database files are located. This represents the total of all
	// used bytes on the filesystem, not just PicoShare.
	FileSystemUsedBytes uint64
	// FileSystemTotalBytes represents the total bytes available on the
	// filesystem where PicoShare's database files are located.
	FileSystemTotalBytes uint64
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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