database

package
v0.2.2-0...-86e9763 Latest Latest
Warning

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

Go to latest
Published: Dec 9, 2023 License: GPL-3.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrNoResults = errors.New("no results")

ErrNoResults is returned when there are no results for the given query.

Functions

This section is empty.

Types

type Database

type Database interface {
	// Create persists the entry to the underlying database, returning
	// any errors if present.
	Create(ctx context.Context, e Entry) error
	// Remove removes the named entry.
	Remove(ctx context.Context, slug string) error
	// Lookup looks up the named entry.
	Lookup(ctx context.Context, slug string) (Entry, error)
	// Ping pings the database.
	Ping(ctx context.Context) error
	// Close closes the database.
	Close(ctx context.Context) error
}

A Database stores and manages data.

type Entry

type Entry struct {
	Slug      string
	Name      string
	Sum       string
	Size      int64
	Lifetime  *time.Time
	Timestamp time.Time
}

An Entry stores relevant metadata for files.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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