mirror of
https://github.com/offen/docker-volume-backup.git
synced 2024-11-10 00:30:29 +01:00
0b205fe6dc
* SSH Client implemented * Private key auth implemented Code refactoring * Refactoring * Passphrase renamed to IdentityPassphrase Default private key location changed to .ssh/id
52 lines
1.0 KiB
Go
52 lines
1.0 KiB
Go
// Copyright 2022 - Offen Authors <hioffen@posteo.de>
|
|
// SPDX-License-Identifier: MPL-2.0
|
|
|
|
package main
|
|
|
|
import (
|
|
"bytes"
|
|
"time"
|
|
)
|
|
|
|
// ContainersStats stats about the docker containers
|
|
type ContainersStats struct {
|
|
All uint
|
|
ToStop uint
|
|
Stopped uint
|
|
StopErrors uint
|
|
}
|
|
|
|
// BackupFileStats stats about the created backup file
|
|
type BackupFileStats struct {
|
|
Name string
|
|
FullPath string
|
|
Size uint64
|
|
}
|
|
|
|
// StorageStats stats about the status of an archival directory
|
|
type StorageStats struct {
|
|
Total uint
|
|
Pruned uint
|
|
PruneErrors uint
|
|
}
|
|
|
|
// StoragesStats stats about each possible archival location (Local, WebDAV, SSH, S3)
|
|
type StoragesStats struct {
|
|
Local StorageStats
|
|
WebDAV StorageStats
|
|
SSH StorageStats
|
|
S3 StorageStats
|
|
}
|
|
|
|
// Stats global stats regarding script execution
|
|
type Stats struct {
|
|
StartTime time.Time
|
|
EndTime time.Time
|
|
TookTime time.Duration
|
|
LockedTime time.Duration
|
|
LogOutput *bytes.Buffer
|
|
Containers ContainersStats
|
|
BackupFile BackupFileStats
|
|
Storages StoragesStats
|
|
}
|