mirror of
https://github.com/cupcakearmy/autorestic.git
synced 2025-02-28 16:19:24 +00:00
cleanup types
This commit is contained in:
parent
504ad639ab
commit
1c6a061dd1
26
src/types.ts
26
src/types.ts
@ -1,3 +1,7 @@
|
||||
export type StringOrArray = string | string[]
|
||||
|
||||
// BACKENDS
|
||||
|
||||
type BackendLocal = {
|
||||
type: 'local'
|
||||
key: string
|
||||
@ -62,30 +66,26 @@ export type Backend =
|
||||
|
||||
export type Backends = { [name: string]: Backend }
|
||||
|
||||
export type ForgetPolicy = {
|
||||
last?: number,
|
||||
hourly?: number,
|
||||
daily?: number,
|
||||
weekly?: number,
|
||||
monthly?: number,
|
||||
yearly?: number,
|
||||
within?: string,
|
||||
tags?: string[],
|
||||
}
|
||||
// LOCATIONS
|
||||
|
||||
export type Location = {
|
||||
from: string
|
||||
to: string | string[]
|
||||
keep?: ForgetPolicy
|
||||
to: StringOrArray
|
||||
hooks?: {
|
||||
before?: StringOrArray
|
||||
after?: StringOrArray
|
||||
}
|
||||
options?: {
|
||||
[key: string]: {
|
||||
[key: string]: string | string[]
|
||||
[key: string]: StringOrArray
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
export type Locations = { [name: string]: Location }
|
||||
|
||||
// OTHER
|
||||
|
||||
export type Config = {
|
||||
locations: Locations
|
||||
backends: Backends
|
||||
|
Loading…
x
Reference in New Issue
Block a user