mirror of
https://github.com/cupcakearmy/autorestic.git
synced 2025-03-01 00:29:23 +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 BackendLocal = {
|
||||||
type: 'local'
|
type: 'local'
|
||||||
key: string
|
key: string
|
||||||
@ -62,30 +66,26 @@ export type Backend =
|
|||||||
|
|
||||||
export type Backends = { [name: string]: Backend }
|
export type Backends = { [name: string]: Backend }
|
||||||
|
|
||||||
export type ForgetPolicy = {
|
// LOCATIONS
|
||||||
last?: number,
|
|
||||||
hourly?: number,
|
|
||||||
daily?: number,
|
|
||||||
weekly?: number,
|
|
||||||
monthly?: number,
|
|
||||||
yearly?: number,
|
|
||||||
within?: string,
|
|
||||||
tags?: string[],
|
|
||||||
}
|
|
||||||
|
|
||||||
export type Location = {
|
export type Location = {
|
||||||
from: string
|
from: string
|
||||||
to: string | string[]
|
to: StringOrArray
|
||||||
keep?: ForgetPolicy
|
hooks?: {
|
||||||
|
before?: StringOrArray
|
||||||
|
after?: StringOrArray
|
||||||
|
}
|
||||||
options?: {
|
options?: {
|
||||||
[key: string]: {
|
[key: string]: {
|
||||||
[key: string]: string | string[]
|
[key: string]: StringOrArray
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
export type Locations = { [name: string]: Location }
|
export type Locations = { [name: string]: Location }
|
||||||
|
|
||||||
|
// OTHER
|
||||||
|
|
||||||
export type Config = {
|
export type Config = {
|
||||||
locations: Locations
|
locations: Locations
|
||||||
backends: Backends
|
backends: Backends
|
||||||
|
Loading…
x
Reference in New Issue
Block a user