-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtypes.go
65 lines (51 loc) · 1.15 KB
/
types.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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
package main
import (
"bytes"
"os"
"github.com/minio/minio-go/v7"
ignore "github.com/sabhiram/go-gitignore"
"golang.org/x/crypto/openpgp"
)
type BufferType = bytes.Buffer
type IndexedBuffer struct {
buffer *BufferType
i int
}
type NamedBuffer struct {
filepath string
info os.FileInfo
buffer *BufferType
}
type Config struct {
S3 struct {
Access string `yaml:"access"`
Secret string `yaml:"secret"`
Region string `yaml:"region"`
Endpoint string `yaml:"endpoint"`
Bucket string `yaml:"bucket"`
Parallel int `yaml:"parallel"`
} `yaml:"s3"`
Age struct {
Private string `yaml:"private"`
Public string `yaml:"public"`
} `yaml:"age"`
Ram struct {
Max string `yaml:"max"`
ChunkSize string `yaml:"chunkSize"`
} `yaml:"ram"`
IncludeDirs []string `yaml:"includeDirs"`
ExcludePatterns []string `yaml:"excludePatterns"`
DryRun bool `yaml:"dryrun"`
}
type BackupConfig struct {
MinioClient *minio.Client
Ignorer ignore.IgnoreParser
Entities openpgp.EntityList
maxRam uint64
chunkSize uint64
Config Config
}
type ReaderWithLength interface {
Read(p []byte) (n int, err error)
Len() int
}