database

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Nov 14, 2025 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CachedImage

type CachedImage struct {
	Thumbnail image.Image
	Preview   image.Image
}

type DB

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

func New

func New(datasetPath string) (*DB, error)

func (*DB) AddImageToBin

func (db *DB) AddImageToBin(path string, destID int) error

CopyImageToBin adds an image to a new bin without removing it from existing ones.

func (*DB) AddImagesToBin

func (db *DB) AddImagesToBin(paths []string, destID int) error

func (*DB) Close

func (db *DB) Close()

func (*DB) GetImagePaths

func (db *DB) GetImagePaths(binID int) ([]string, error)

func (*DB) GetLowestImageCount added in v0.4.0

func (db *DB) GetLowestImageCount() (int, error)

Returns the number of images in the smallest bin, excluding the "To Sort" (0) and "excluded" (-1) bins.

func (*DB) GetPreview

func (db *DB) GetPreview(path string) (image.Image, bool)

func (*DB) GetThumbnail

func (db *DB) GetThumbnail(path string) (image.Image, bool)

func (*DB) RemoveImages added in v0.4.0

func (db *DB) RemoveImages(paths []string) error

RemoveImages deletes images from the database.

func (*DB) SetImage

func (db *DB) SetImage(path string, imgData CachedImage) error

func (*DB) SetImages

func (db *DB) SetImages(images map[string]CachedImage) error

func (*DB) UpdateImages

func (db *DB) UpdateImages(paths []string, sourceID, destID int) error

Jump to

Keyboard shortcuts

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