Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
added list instance query params (#197)
- Loading branch information
Showing
1 changed file
with
9 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,15 @@ | ||
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"` | ||
} |