v3.4.1 de8f68e

backup.go RawHistoryFolder

1package in
2
3import (
4	"context"
5	"time"
6
7	"github.com/bnema/gordon/internal/domain"
8)
9
10// DatabaseBackupService defines declarative app database backup use
11// cases. App names are the backup identity: a domain is never accepted.
12type DatabaseBackupService interface {
13	// ListBackups lists stored backups of one app, or of every app when
14	// app is empty.
15	ListBackups(ctx context.Context, app string) ([]domain.BackupJob, error)
16	// RunBackup runs one declared database backup. service and database
17	// are explicit selectors; an omitted selector succeeds only when
18	// exactly one compatible target exists.
19	RunBackup(ctx context.Context, app, service, database string) (*domain.BackupResult, error)
20	Restore(ctx context.Context, app, backupID string) error
21	RestorePITR(ctx context.Context, app string, targetTime time.Time) error
22	// Status reports stored backups plus declared targets without a
23	// completed backup.
24	Status(ctx context.Context) ([]domain.BackupJob, error)
25}
26
27// BackupService is the database backup service.
28type BackupService = DatabaseBackupService
29
30// VolumeBackupService defines declarative app volume archive backup use
31// cases.
32type VolumeBackupService interface {
33	ListVolumeBackups(ctx context.Context, app string) ([]domain.VolumeBackupJob, error)
34	// RunVolumeBackups runs the declared volume backups of one app.
35	// service and volume are explicit selectors; an omitted selector
36	// succeeds only when exactly one compatible target exists.
37	RunVolumeBackups(ctx context.Context, app, service, volume string) ([]domain.VolumeBackupJob, error)
38	VolumeBackupStatus(ctx context.Context) ([]domain.VolumeBackupJob, error)
39}

Keyboard shortcuts

Single-key shortcuts are on. ctrl k and esc work whatever this says.

ctrl k :
go to a section, branch, tag, file or repository
?
this list
j k
move the row cursor down / up
enter
open the row under the cursor; on Files, a directory opens or closes in place
↑ ↓ ← → home end
in the file tree (focus on a row): previous / next row, close / open a directory or go to its parent / first entry, first / last row. They never open a file
l h
on Files: open a directory or a file / close a directory or go up to its parent, then to the parent page. Elsewhere: into the side panel (on a merge request, its files) / back to the content; there j k move between its controls
g g G
first / last row
/
filter the list; on Files, find a file anywhere in the repository (esc clears, enter opens the best match)
b
switch branch or tag
g s g f g c g b g m g i g r g a
tabs: summary, files, commits, branches & tags, merge requests, issues, releases, actions (when available)
g h
home
w
wide mode: use the whole width of the screen, or not (remembered)
y
copy a permalink pinned to the commit
d u x
diff: split / unified / collapse or expand all
e E
diff: the whole file in view / every file, with the lines the hunks hide
n
merge request: next note in the diff
esc
close a dialog, leave a field

Branches 7

Tags 106

↑↓ moveenter openesc close