-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtypes_config.go
30 lines (25 loc) · 1.1 KB
/
types_config.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
package main
// type used for the config
type ProviderMirrorConfiguration struct {
Reference string `json:"reference" yaml:"reference"`
VersionRange string `json:"version_range" yaml:"version_range"`
OSArchs []HCTFProviderPlatform `json:"os_archs" yaml:"os_archs"`
}
type configRaw struct {
Providers []ProviderMirrorConfiguration `json:"providers" yaml:"providers"`
StorageType string `json:"storage_type" yaml:"storage_type"`
FSConfig fsConfig `json:"fs_config,omitempty" yaml:"fs_config,omitempty"`
S3Config s3Config `json:"s3_config,omitempty" yaml:"s3_config,omitempty"`
}
type fsConfig struct {
DownloadRoot string `json:"download_root" yaml:"download_root"`
}
type s3Config struct {
Bucket string `json:"bucket" yaml:"bucket"`
Endpoint string `json:"endpoint,omitempty" yaml:"endpoint,omitempty"`
Prefix string `json:"prefix,omitempty" yaml:"prefix,omitempty"`
}
type Configuration struct {
Providers []ProviderMirrorConfiguration
DownloadDestination DownloadDestination
}