diff --git a/go.mod b/go.mod index a88e8b2d..802ea6c0 100644 --- a/go.mod +++ b/go.mod @@ -5,7 +5,7 @@ go 1.17 require ( github.com/hashicorp/hcl/v2 v2.11.1 github.com/hashicorp/packer-plugin-sdk v0.2.11 - github.com/vultr/govultr/v2 v2.12.0 + github.com/vultr/govultr/v2 v2.14.0 github.com/zclconf/go-cty v1.10.0 golang.org/x/crypto v0.0.0-20210817164053-32db794688a5 golang.org/x/oauth2 v0.0.0-20210819190943-2bc19b11175f diff --git a/go.sum b/go.sum index 1437db57..6e39f809 100644 --- a/go.sum +++ b/go.sum @@ -545,8 +545,8 @@ github.com/urfave/cli v0.0.0-20171014202726-7bc6a0acffa5/go.mod h1:70zkFmudgCuE/ github.com/vmihailenco/msgpack v3.3.3+incompatible/go.mod h1:fy3FlTQTDXWkZ7Bh6AcGMlsjHatGryHQYUTf1ShIgkk= github.com/vmihailenco/msgpack/v4 v4.3.12/go.mod h1:gborTTJjAo/GWTqqRjrLCn9pgNN+NXzzngzBKDPIqw4= github.com/vmihailenco/tagparser v0.1.1/go.mod h1:OeAg3pn3UbLjkWt+rN9oFYB6u/cQgqMEUPoW2WPyhdI= -github.com/vultr/govultr/v2 v2.12.0 h1:sTVEsTN+nvS0SINdbtlmBAQALRcJgLzfYfshj14IaCw= -github.com/vultr/govultr/v2 v2.12.0/go.mod h1:JjUljQdSZx+MELCAJvZ/JH32bJotmflnsyS0NOjb8Jg= +github.com/vultr/govultr/v2 v2.14.0 h1:A1iThmqkZwn4PRwBbnDmrgDzGdEyiQmbVtR9u3zA3ZU= +github.com/vultr/govultr/v2 v2.14.0/go.mod h1:JjUljQdSZx+MELCAJvZ/JH32bJotmflnsyS0NOjb8Jg= github.com/yuin/goldmark v1.1.25/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.1.32/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= diff --git a/vendor/github.com/vultr/govultr/v2/.goreleaser.yml b/vendor/github.com/vultr/govultr/v2/.goreleaser.yml new file mode 100644 index 00000000..e683e43e --- /dev/null +++ b/vendor/github.com/vultr/govultr/v2/.goreleaser.yml @@ -0,0 +1,25 @@ +before: + hooks: + - go mod download + - go generate ./... +builds: + - skip: true + +checksum: + name_template: "{{ .ProjectName }}_v{{ .Version }}_checksums.txt" + algorithm: sha256 + +snapshot: + name_template: "{{ .ProjectName }}_v{{ .Version }}" + +changelog: + sort: asc + filters: + exclude: + - '^docs:' + - '^test:' + +release: + github: + owner: Vultr + name: govultr \ No newline at end of file diff --git a/vendor/github.com/vultr/govultr/v2/CHANGELOG.md b/vendor/github.com/vultr/govultr/v2/CHANGELOG.md index 08435271..7922511a 100644 --- a/vendor/github.com/vultr/govultr/v2/CHANGELOG.md +++ b/vendor/github.com/vultr/govultr/v2/CHANGELOG.md @@ -2,6 +2,16 @@ ## GoVultr v1 changelog is located [here](https://github.com/vultr/govultr/blob/v1/CHANGELOG.md) +## [v2.14.0](https://github.com/vultr/govultr/compare/v2.13.0..v2.14.0) (2022-01-21) +### Enhancement +* ListOptions : [Added query param Region](https://www.vultr.com/api/#operation/list-instances) that can be used with `Instance.List` [200](https://github.com/vultr/govultr/pull/200) +* ListOptions : [Added query param Description](https://www.vultr.com/api/#operation/list-snapshots) that can be used with `Snapshot.List` [202](https://github.com/vultr/govultr/pull/202) +* Snapshot : `CreateFromURL` has new optional field called `description` which lets you set a custom description [202](https://github.com/vultr/govultr/pull/202) + +## [v2.13.0](https://github.com/vultr/govultr/compare/v2.12.0..v2.13.0) (2022-01-05) +### Enhancement +* ListOptions : [Added query params](https://www.vultr.com/api/#operation/list-instances) that can be used with `Instance.List` [197](https://github.com/vultr/govultr/pull/197) + ## [v2.12.0](https://github.com/vultr/govultr/compare/v2.11.1..v2.12.0) (2021-12-01) ### Breaking Changes * Plans : Changed `MonthlyCost` from `int` to `float32` [192](https://github.com/vultr/govultr/pull/192) diff --git a/vendor/github.com/vultr/govultr/v2/README.md b/vendor/github.com/vultr/govultr/v2/README.md index eaf5cff2..d73fdcf0 100644 --- a/vendor/github.com/vultr/govultr/v2/README.md +++ b/vendor/github.com/vultr/govultr/v2/README.md @@ -1,8 +1,8 @@ # GoVultr -[![Build Status](https://travis-ci.org/vultr/govultr.svg?branch=master)](https://travis-ci.org/vultr/govultr) +[![Automatic Releaser](https://github.com/vultr/govultr/actions/workflows/releaser.yml/badge.svg)](https://github.com/vultr/govultr/actions/workflows/releaser.yml) [![PkgGoDev](https://pkg.go.dev/badge/github.com/vultr/govultr/v2)](https://pkg.go.dev/github.com/vultr/govultr/v2) -[![codecov](https://codecov.io/gh/vultr/govultr/branch/master/graph/badge.svg?token=PDJXBc7Rci)](https://codecov.io/gh/vultr/govultr) +[![Unit/Coverage Tests](https://github.com/vultr/govultr/actions/workflows/coverage.yml/badge.svg)](https://github.com/vultr/govultr/actions/workflows/coverage.yml) [![Go Report Card](https://goreportcard.com/badge/github.com/vultr/govultr)](https://goreportcard.com/report/github.com/vultr/govultr) The official Vultr Go client - GoVultr allows you to interact with the Vultr V2 API. diff --git a/vendor/github.com/vultr/govultr/v2/govultr.go b/vendor/github.com/vultr/govultr/v2/govultr.go index 21b043fa..e4a1de4b 100644 --- a/vendor/github.com/vultr/govultr/v2/govultr.go +++ b/vendor/github.com/vultr/govultr/v2/govultr.go @@ -16,7 +16,7 @@ import ( ) const ( - version = "2.12.0" + version = "2.14.0" defaultBase = "https://api.vultr.com" userAgent = "govultr/" + version rateLimit = 500 * time.Millisecond diff --git a/vendor/github.com/vultr/govultr/v2/listOptions.go b/vendor/github.com/vultr/govultr/v2/listOptions.go index f30f2a06..0b70ec5d 100644 --- a/vendor/github.com/vultr/govultr/v2/listOptions.go +++ b/vendor/github.com/vultr/govultr/v2/listOptions.go @@ -1,7 +1,20 @@ package govultr -// ListOptions are the available fields that can be used with pagination +// ListOptions are the available query params type ListOptions struct { + // These query params are used for all list calls that support pagination PerPage int `url:"per_page,omitempty"` Cursor string `url:"cursor,omitempty"` + + // These three query params are currently used for the list instance call + // These may be extended to other list calls + // https://www.vultr.com/api/#operation/list-instances + MainIP string `url:"main_ip,omitempty"` + Label string `url:"label,omitempty"` + Tag string `url:"tag,omitempty"` + Region string `url:"region,omitempty"` + + // Query params that can be used on the list snapshots call + // https://www.vultr.com/api/#operation/list-snapshots + Description string `url:"description,omitempty"` } diff --git a/vendor/github.com/vultr/govultr/v2/snapshot.go b/vendor/github.com/vultr/govultr/v2/snapshot.go index 86d60f18..5b6e8379 100644 --- a/vendor/github.com/vultr/govultr/v2/snapshot.go +++ b/vendor/github.com/vultr/govultr/v2/snapshot.go @@ -43,7 +43,8 @@ type SnapshotReq struct { // SnapshotURLReq struct is used to create snapshots from a URL. type SnapshotURLReq struct { - URL string `json:"url"` + URL string `json:"url"` + Description string `json:"description,omitempty"` } type snapshotsBase struct { diff --git a/vendor/modules.txt b/vendor/modules.txt index 089808c7..bfe4e2f6 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -319,7 +319,7 @@ github.com/ulikunitz/xz github.com/ulikunitz/xz/internal/hash github.com/ulikunitz/xz/internal/xlog github.com/ulikunitz/xz/lzma -# github.com/vultr/govultr/v2 v2.12.0 +# github.com/vultr/govultr/v2 v2.14.0 ## explicit; go 1.16 github.com/vultr/govultr/v2 # github.com/zclconf/go-cty v1.10.0