This repository has been archived by the owner on May 10, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: #164 initial models for collections
- Loading branch information
1 parent
4a558a9
commit 02ffceb
Showing
5 changed files
with
65 additions
and
29 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
package collection | ||
|
||
import ( | ||
"github.com/riotkit-org/backup-repository/config" | ||
"github.com/riotkit-org/backup-repository/security" | ||
) | ||
|
||
type StrategySpec struct { | ||
KeepLastOlderNotMoreThan string `json:"keepLastOlderNotMoreThan"` | ||
MaxOlderCopies int `json:"maxOlderCopies"` | ||
} | ||
|
||
type BackupWindow struct { | ||
From string `json:"from"` | ||
Duration string `json:"duration"` | ||
} | ||
|
||
type BackupWindows []BackupWindow | ||
|
||
type Spec struct { | ||
Description string `json:"description"` | ||
FilenameTemplate string `json:"filenameTemplate"` | ||
MaxBackupsCount int `json:"maxBackupsCount"` | ||
MaxOneVersionSize string `json:"maxOneVersionSize"` | ||
MaxCollectionSize string `json:"maxCollectionSize"` | ||
Windows BackupWindows `json:"windows"` | ||
StrategyName string `json:"strategyName"` | ||
StrategySpec StrategySpec `json:"strategySpec"` | ||
AccessControl security.AccessControlList `json:"accessControl"` | ||
} | ||
|
||
type Collection struct { | ||
Metadata config.ObjectMetadata `json:"metadata"` | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,7 @@ | ||
--- | ||
apiVersion: backups.riotkit.org/v1alpha1 | ||
kind: GrantedAccess | ||
metadata: | ||
# hash of the JWT | ||
name: 39671096ba800ca9b238c7c01b053fa0d5d09ca3151e050d148ddfffaefa9466ceba75d47c2098a0f72110aea4deeb24f6cd1b31f27e27aa6fe7b82dad956049 | ||
spec: | ||
user: admin | ||
expiresAt: "2022-01-01 08:00" | ||
active: true | ||
description: "Temporary token for single file upload" | ||
requesterIP: "1.2.3.4" | ||
# hash of the JWT | ||
id: 39671096ba800ca9b238c7c01b053fa0d5d09ca3151e050d148ddfffaefa9466ceba75d47c2098a0f72110aea4deeb24f6cd1b31f27e27aa6fe7b82dad956049 | ||
user: admin | ||
expiresAt: "2022-01-01 08:00" | ||
active: true | ||
description: "Temporary token for single file upload" | ||
requesterIP: "1.2.3.4" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,6 @@ | ||
--- | ||
apiVersion: backups.riotkit.org/v1alpha1 | ||
kind: BackupVersion | ||
metadata: | ||
name: iwa-ait-1 | ||
labels: | ||
backups.riotkit.org/collection: iwa-ait | ||
spec: | ||
selector: | ||
name: iwa-ait | ||
version: 1 | ||
filename: iwa-ait-v1.tar.gz | ||
uploadDate: "2022-01-01 06:30" | ||
uploadedBy: admin | ||
name: 7a9ecd01-8dec-4be2-8ece-e2a6047e4ffd | ||
collectionId: iwa-ait | ||
version: 1 | ||
filename: iwa-ait-v1.tar.gz | ||
uploadDate: "2022-01-01 06:30" | ||
uploadedBy: admin |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters