micro/util/structfs/metadata_ec2.go
Evstigneev Denis 38c5fe8b5a
All checks were successful
test / test (push) Successful in 42s
fixed struct alignment && refactor linter (#369)
## Pull Request template
Please, go through these steps before clicking submit on this PR.

1. Give a descriptive title to your PR.
2. Provide a description of your changes.
3. Make sure you have some relevant tests.
4. Put `closes #XXXX` in your comment to auto-close the issue that your PR fixes (if applicable).

**PLEASE REMOVE THIS TEMPLATE BEFORE SUBMITTING**

Reviewed-on: #369
Co-authored-by: Evstigneev Denis <danteevstigneev@yandex.ru>
Co-committed-by: Evstigneev Denis <danteevstigneev@yandex.ru>
2024-12-09 16:23:25 +03:00

31 lines
1.2 KiB
Go

package structfs
type EC2Metadata struct {
Latest struct {
Userdata string `json:"user-data"`
Metadata struct {
AMIManifestPath string `json:"ami-manifest-path"`
InstanceType string `json:"instance-type"`
LocalHostname string `json:"local-hostname"`
LocalIPv4 string `json:"local-ipv4"`
Placement string `json:"placement"`
AvailabilityZone string `json:"availability-zone"`
ProductCodes string `json:"product-codes"`
PublicHostname string `json:"public-hostname"`
PublicIPv4 string `json:"public-ipv4"`
PublicKeys []struct {
Key []string `json:"-"`
} `json:"public-keys"`
AncestorAMIIDs []int `json:"ancestor-ami-ids"`
BlockDeviceMapping []string `json:"block-device-mapping"`
SecurityGroups []string `json:"security-groups"`
RamdiskID int `json:"ramdisk-id"`
ReservationID int `json:"reservation-id"`
AMIID int `json:"ami-id"`
AMILaunchIndex int `json:"ami-launch-index"`
KernelID int `json:"kernel-id"`
InstanceID int `json:"instance-id"`
} `json:"meta-data"`
} `json:"latest"`
}