go-mod: update go-tfe
This commit is contained in:
parent
407fcc0385
commit
77844852e6
2
go.mod
2
go.mod
|
@ -66,7 +66,7 @@ require (
|
|||
github.com/hashicorp/go-rootcerts v0.0.0-20160503143440-6bb64b370b90
|
||||
github.com/hashicorp/go-safetemp v0.0.0-20180326211150-b1a1dbde6fdc // indirect
|
||||
github.com/hashicorp/go-sockaddr v0.0.0-20180320115054-6d291a969b86 // indirect
|
||||
github.com/hashicorp/go-tfe v0.3.0
|
||||
github.com/hashicorp/go-tfe v0.3.1
|
||||
github.com/hashicorp/go-uuid v1.0.0
|
||||
github.com/hashicorp/go-version v0.0.0-20180322230233-23480c066577
|
||||
github.com/hashicorp/golang-lru v0.5.0 // indirect
|
||||
|
|
4
go.sum
4
go.sum
|
@ -147,8 +147,8 @@ github.com/hashicorp/go-slug v0.1.0 h1:MJGEiOwRGrQCBmMMZABHqIESySFJ4ajrsjgDI4/aF
|
|||
github.com/hashicorp/go-slug v0.1.0/go.mod h1:+zDycQOzGqOqMW7Kn2fp9vz/NtqpMLQlgb9JUF+0km4=
|
||||
github.com/hashicorp/go-sockaddr v0.0.0-20180320115054-6d291a969b86 h1:7YOlAIO2YWnJZkQp7B5eFykaIY7C9JndqAFQyVV5BhM=
|
||||
github.com/hashicorp/go-sockaddr v0.0.0-20180320115054-6d291a969b86/go.mod h1:7Xibr9yA9JjQq1JpNB2Vw7kxv8xerXegt+ozgdvDeDU=
|
||||
github.com/hashicorp/go-tfe v0.3.0 h1:X0oM8RNKgMlmaMOEzLkx8/RTIC3d2K30R8+G4cSXJPc=
|
||||
github.com/hashicorp/go-tfe v0.3.0/go.mod h1:SRMjgjY06SfEKstIPRUVMtQfhSYR2H3GHVop0lfedkY=
|
||||
github.com/hashicorp/go-tfe v0.3.1 h1:178hBlqjBsXohfcJ2/t2RM8c29IviQrEkj+mqdbkQzM=
|
||||
github.com/hashicorp/go-tfe v0.3.1/go.mod h1:SRMjgjY06SfEKstIPRUVMtQfhSYR2H3GHVop0lfedkY=
|
||||
github.com/hashicorp/go-uuid v1.0.0 h1:RS8zrF7PhGwyNPOtxSClXXj9HA8feRnJzgnI1RJCSnM=
|
||||
github.com/hashicorp/go-uuid v1.0.0/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro=
|
||||
github.com/hashicorp/go-version v0.0.0-20180322230233-23480c066577 h1:at4+18LrM8myamuV7/vT6x2s1JNXp2k4PsSbt4I02X4=
|
||||
|
|
|
@ -289,25 +289,6 @@ func (c *Client) configureLimiter() error {
|
|||
return nil
|
||||
}
|
||||
|
||||
// ListOptions is used to specify pagination options when making API requests.
|
||||
// Pagination allows breaking up large result sets into chunks, or "pages".
|
||||
type ListOptions struct {
|
||||
// The page number to request. The results vary based on the PageSize.
|
||||
PageNumber int `url:"page[number],omitempty"`
|
||||
|
||||
// The number of elements returned in a single page.
|
||||
PageSize int `url:"page[size],omitempty"`
|
||||
}
|
||||
|
||||
// Pagination is used to return the pagination details of an API request.
|
||||
type Pagination struct {
|
||||
CurrentPage int `json:"current-page"`
|
||||
PreviousPage int `json:"prev-page"`
|
||||
NextPage int `json:"next-page"`
|
||||
TotalPages int `json:"total-pages"`
|
||||
TotalCount int `json:"total-count"`
|
||||
}
|
||||
|
||||
// newRequest creates an API request. A relative URL path can be provided in
|
||||
// path, in which case it is resolved relative to the apiVersionPath of the
|
||||
// Client. Relative URL paths should always be specified without a preceding
|
||||
|
@ -479,6 +460,25 @@ func (c *Client) do(ctx context.Context, req *retryablehttp.Request, v interface
|
|||
return nil
|
||||
}
|
||||
|
||||
// ListOptions is used to specify pagination options when making API requests.
|
||||
// Pagination allows breaking up large result sets into chunks, or "pages".
|
||||
type ListOptions struct {
|
||||
// The page number to request. The results vary based on the PageSize.
|
||||
PageNumber int `url:"page[number],omitempty"`
|
||||
|
||||
// The number of elements returned in a single page.
|
||||
PageSize int `url:"page[size],omitempty"`
|
||||
}
|
||||
|
||||
// Pagination is used to return the pagination details of an API request.
|
||||
type Pagination struct {
|
||||
CurrentPage int `json:"current-page"`
|
||||
PreviousPage int `json:"prev-page"`
|
||||
NextPage int `json:"next-page"`
|
||||
TotalPages int `json:"total-pages"`
|
||||
TotalCount int `json:"total-count"`
|
||||
}
|
||||
|
||||
func parsePagination(body io.Reader) (*Pagination, error) {
|
||||
var raw struct {
|
||||
Meta struct {
|
||||
|
|
|
@ -66,6 +66,7 @@ type Workspace struct {
|
|||
Locked bool `jsonapi:"attr,locked"`
|
||||
MigrationEnvironment string `jsonapi:"attr,migration-environment"`
|
||||
Name string `jsonapi:"attr,name"`
|
||||
Operations bool `jsonapi:"attr,operations"`
|
||||
Permissions *WorkspacePermissions `jsonapi:"attr,permissions"`
|
||||
TerraformVersion string `jsonapi:"attr,terraform-version"`
|
||||
VCSRepo *VCSRepo `jsonapi:"attr,vcs-repo"`
|
||||
|
|
|
@ -315,7 +315,7 @@ github.com/hashicorp/go-rootcerts
|
|||
github.com/hashicorp/go-safetemp
|
||||
# github.com/hashicorp/go-slug v0.1.0
|
||||
github.com/hashicorp/go-slug
|
||||
# github.com/hashicorp/go-tfe v0.3.0
|
||||
# github.com/hashicorp/go-tfe v0.3.1
|
||||
github.com/hashicorp/go-tfe
|
||||
# github.com/hashicorp/go-uuid v1.0.0
|
||||
github.com/hashicorp/go-uuid
|
||||
|
|
Loading…
Reference in New Issue