storage

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Jul 13, 2026 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DataDir added in v1.0.1

func DataDir() (string, error)

Types

type Database

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

func Open

func Open() (*Database, error)

func (*Database) Close

func (d *Database) Close() error

func (*Database) DeleteJob

func (d *Database) DeleteJob(id string) error

func (*Database) DeleteTemplate

func (d *Database) DeleteTemplate(name string) error

func (*Database) Job

func (d *Database) Job(id string) (Job, error)

func (*Database) Jobs

func (d *Database) Jobs() ([]Job, error)

func (*Database) RecentRuns

func (d *Database) RecentRuns(jobID string, limit int) ([]Run, error)

func (*Database) SaveJob

func (d *Database) SaveJob(id, name, schedule, command string) error

func (*Database) SaveRun

func (d *Database) SaveRun(jobID string, start time.Time, dur time.Duration, exitCode int, stdout, stderr string) error

func (*Database) SaveTemplate

func (d *Database) SaveTemplate(name, schedule string) error

func (*Database) SetEnabled

func (d *Database) SetEnabled(id string, enabled bool) error

func (*Database) Templates

func (d *Database) Templates() ([]Template, error)

type Job

type Job struct {
	ID       string
	Name     string
	Schedule string
	Command  string
	Enabled  bool
}

type Run

type Run struct {
	StartedAt  time.Time
	DurationMs int64
	ExitCode   int
	Stdout     string
	Stderr     string
}

type Template

type Template struct {
	Name     string
	Schedule string
}

Jump to

Keyboard shortcuts

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