database

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Oct 5, 2026 License: AGPL-3.0 Imports: 10 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package database provides persistence for the Job Queue.

Index

Constants

This section is empty.

Variables

View Source
var (
	// ErrNotFound indicates an inexistant key.
	ErrNotFound = errors.New("ID was not found in database")
	// ErrExistentialCrisis indicates something went *deeply* wrong.
	ErrExistentialCrisis = errors.New("i am in an existential crisis right now")
)

Functions

This section is empty.

Types

type Database

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

Database deals with persistent data.

func Open

func Open(path string) (*Database, error)

Open opens a Database at the given filename <path>. The file does not need to exist prior to opening.

func (*Database) JobAdd

func (db *Database) JobAdd(j *model.Job) error

JobAdd saves a Job to the database.

func (*Database) JobDelete

func (db *Database) JobDelete(j *model.Job) error

JobDelete removes a Job from the Datbase.

func (*Database) JobGet

func (db *Database) JobGet(id int64) (*model.Job, error)

JobGet retrieves a single Job by its ID.

func (*Database) JobGetAll

func (db *Database) JobGetAll() ([]*model.Job, error)

JobGetAll loads all Jobs from the Database.

Jump to

Keyboard shortcuts

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