https://github.com/vultr/metadata
go client for vultr metadata api
https://github.com/vultr/metadata
go metadata vultr vultr-metadata
Last synced: 5 months ago
JSON representation
go client for vultr metadata api
- Host: GitHub
- URL: https://github.com/vultr/metadata
- Owner: vultr
- License: mit
- Created: 2020-04-28T01:25:22.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2023-01-09T16:07:05.000Z (almost 3 years ago)
- Last Synced: 2025-05-07T17:15:16.078Z (5 months ago)
- Topics: go, metadata, vultr, vultr-metadata
- Language: Go
- Size: 17.6 KB
- Stars: 3
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# metadata
A Go client that interacts with the [Vultr Metadata](https://www.vultr.com/metadata/).
## Installation
`go get -u github.com/vultr/metadata`
## Usage
Currently, there is only one available call `Metadata()` which will retrieve your entire metadata from your instance. If you want to retrieve a specific of your metadata you can do so by calling the corresponding exported field on the `metadata` struct.
```go
c := metadata.NewClient()meta, err := c.Metadata()
if err != nil {
fmt.Println(err)
}fmt.Println(meta)
fmt.Println(meta.InstanceID) // will print your instance-id
```