assets

package
v1.11.13 Latest Latest
Warning

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

Go to latest
Published: Mar 31, 2024 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Overview

Package assets handles the web resources of the site such as the file downloads, thumbnails and backups.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateUUIDMap

func CreateUUIDMap(db *sql.DB) (int, database.IDs, error)

CreateUUIDMap builds a map of all the unique UUID values stored in the Defacto2 database. Returns the total number of UUID and a collection of UUIDs.

func Targets added in v1.6.0

func Targets(cfg conf.Config, t Target, d *directories.Dir) ([]string, error)

Types

type Clean

type Clean struct {
	Name   string // Named section to clean.
	Remove bool   // Remove any orphaned files from the directories.
	Human  bool   // Use humanized, binary size values.
	Config conf.Config
}

func (Clean) Walk added in v1.11.0

func (c Clean) Walk(db *sql.DB, w io.Writer) error

Walk through and scans directories containing UUID files and erases any orphans that cannot be matched to the database.

func (Clean) Walker added in v1.11.0

func (c Clean) Walker(db *sql.DB, w io.Writer, t Target, d *directories.Dir) error

type Target

type Target int

Target filters the file assets.

const (
	All       Target = iota // All files.
	Download                // Download are files for download.
	Emulation               // Emulation are files for the DOSee emulation.
	Image                   // Image and thumbnail files.
)

Directories

Path Synopsis
internal
file
Package file writes the results of an asset scan or walk.
Package file writes the results of an asset scan or walk.
scan
Package scan handles individual directories housing specific assets.
Package scan handles individual directories housing specific assets.

Jump to

Keyboard shortcuts

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