-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcloud.go
40 lines (35 loc) · 1.13 KB
/
cloud.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
package main
type User struct {
Name string `yaml:"name,omitempty"`
Passwd string `yaml:"passwd,omitempty"`
SSHKey []string `yaml:"ssh-authorized-keys,omitempty"`
}
type Bootstrap struct {
Name string `yaml:"name"`
Arch string `yaml:"arch"`
Fetch []string `yaml:"fetch"`
Version string `yaml:"version"`
Resize bool `yaml:"resize,omitempty"`
Timeout string `yaml:"timeout,omitempty"`
Software []struct {
Name string `yaml:"name,omitempty"`
Version string `yaml:"version,omitempty"`
} `yaml:"software,omitempty"`
}
type CloudConfig struct {
AllowRootLogin bool `yaml:"disable_root,omitempty"`
AllowRootSSH bool `yaml:"ssh_pwauth,omitempty"`
AllowResize bool `yaml:"resize_rootfs,omitempty"`
Users []User `yaml:"users,omitempty"`
Bootstrap Bootstrap `yaml:"bootstrap,omitempty"`
}
type Ec2 struct {
Timeout int `yaml:"timeout,omitempty"`
MaxWait int `yaml:"max_wait,omitempty"`
MetadataUrls []string `yaml:"metadata_urls,omitempty"`
}
type DataSource struct {
Datasource struct {
Ec2 Ec2 `yaml:"Ec2,omitempty"`
} `yaml:"datasource"`
}