-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmodels.go
More file actions
53 lines (46 loc) · 1.11 KB
/
models.go
File metadata and controls
53 lines (46 loc) · 1.11 KB
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
package main
type Configuration struct {
General struct {
Scraper ScraperConfig `yaml:"scraper"`
AWS AWSConfig `yaml:"aws"`
} `yaml:"general"`
}
type ScraperConfig struct {
TableSelector string `yaml:"tableSelector"`
URL string `yaml:"url"`
TableTitle string `yaml:"tableTitle"`
FilePath string `yaml:"filePath"`
}
type AWSConfig struct {
Accounts []AWSAccount `yaml:"accounts"`
}
type AWSAccount struct {
ID string `yaml:"id"`
Token string `yaml:"token"`
Key string `yaml:"key"`
ARN string `yaml:"arn"`
Session string `yaml:"session"`
MFA string `yaml:"mfa"`
}
type TableEOL struct {
Name string
Identifier string
OperatingSystem string
DeprecationDate string
BlockFunctionCreate string
BlockFunctionUpdate string
}
type LambdaProperties struct {
FunctionName string
FunctionARN string
Runtime string
Version string
LastModified string
}
func convertRuntimeToArray(tableEOL []TableEOL) []string {
runtime := []string{}
for _, v := range tableEOL {
runtime = append(runtime, v.Identifier)
}
return runtime
}