-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathstructure.go
39 lines (36 loc) · 1.25 KB
/
structure.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
package main
import (
"github.com/sirupsen/logrus"
)
type Device struct {
Name string `json:"-"`
Address string `json:"address"`
PortSSH uint16 `json:"portssh"`
Username string `json:"username"`
Password string `json:"password"`
Key string `json:"key"`
Timeout int `json:"timeout"`
Every int `json:"every"`
Rotate int `json:"rotate"`
Command string `json:"command"`
Parent string `json:"parent"`
Prefix string `json:"prefix"`
TimeFormat string `json:"timeformat"`
FileNameFormat string `json:"filenameformat"`
Clearstring string `json:"clearstring"`
DeviceHooks DeviceHook `json:"hook"`
Dirbackup string `json:"-"`
Lastbackup string `json:"-"`
Authkey bool `json:"-" default:"false"`
BackupFileName string `json:"-"`
StatusJob string `json:"-"`
Logdevice *logrus.Logger `json:"-"`
}
type DeviceList struct {
Devices []Device
}
type DeviceHook struct {
Backup string `json:"backup"`
Skip string `json:"skip"`
Error string `json:"error"`
}