From 1a5f688215cfc51cc8dfdab3b60530e08f52945e Mon Sep 17 00:00:00 2001 From: Luces Huayhuaca <21225410+uturunku1@users.noreply.github.com> Date: Wed, 6 Apr 2022 15:38:00 -0700 Subject: [PATCH] update doc links comments (#372) --- agent_pool.go | 3 +++ helper_test.go | 2 +- policy_check.go | 5 ++++- policy_set.go | 3 ++- tfe.go | 2 +- 5 files changed, 11 insertions(+), 4 deletions(-) diff --git a/agent_pool.go b/agent_pool.go index 1d4653878..f2913efb7 100644 --- a/agent_pool.go +++ b/agent_pool.go @@ -55,6 +55,7 @@ type AgentPool struct { } // A list of relations to include +// https://www.terraform.io/cloud-docs/api-docs/agents#available-related-resources type AgentPoolIncludeOpt string const AgentPoolWorkspaces AgentPoolIncludeOpt = "workspaces" @@ -66,6 +67,8 @@ type AgentPoolReadOptions struct { // AgentPoolListOptions represents the options for listing agent pools. type AgentPoolListOptions struct { ListOptions + // Optional: A list of relations to include. See available resources + // https://www.terraform.io/cloud-docs/api-docs/agents#available-related-resources Include []AgentPoolIncludeOpt `url:"include,omitempty"` } diff --git a/helper_test.go b/helper_test.go index cfb96f2c2..9d2741e8f 100644 --- a/helper_test.go +++ b/helper_test.go @@ -13,7 +13,7 @@ import ( "testing" "time" - "github.com/hashicorp/go-uuid" + uuid "github.com/hashicorp/go-uuid" ) const badIdentifier = "! / nope" //nolint diff --git a/policy_check.go b/policy_check.go index 00198aecd..0a1dea114 100644 --- a/policy_check.go +++ b/policy_check.go @@ -111,6 +111,7 @@ type PolicyStatusTimestamps struct { } // A list of relations to include +// https://www.terraform.io/cloud-docs/api-docs/policy-checks#available-related-resources type PolicyCheckIncludeOpt string const ( @@ -122,7 +123,9 @@ const ( type PolicyCheckListOptions struct { ListOptions - Include []PolicyCheckIncludeOpt `url:"include,omitempty"` // optional + // Optional: A list of relations to include. See available resources + // https://www.terraform.io/cloud-docs/api-docs/policy-checks#available-related-resources + Include []PolicyCheckIncludeOpt `url:"include,omitempty"` } // List all policy checks of the given run. diff --git a/policy_set.go b/policy_set.go index 26157fbc8..ff0e021a3 100644 --- a/policy_set.go +++ b/policy_set.go @@ -88,6 +88,7 @@ type PolicySet struct { } // PolicySetIncludeOpt represents the available options for include query params. +// https://www.terraform.io/cloud-docs/api-docs/policy-sets#available-related-resources type PolicySetIncludeOpt string const ( @@ -110,7 +111,7 @@ type PolicySetListOptions struct { // https://www.terraform.io/docs/cloud/api/policy-sets.html#relationships type PolicySetReadOptions struct { // Optional: A list of relations to include. See available resources - // https://www.terraform.io/cloud-docs/api-docs/policy-sets#relationships + // https://www.terraform.io/cloud-docs/api-docs/policy-sets#available-related-resources Include []PolicySetIncludeOpt `url:"include,omitempty"` } diff --git a/tfe.go b/tfe.go index cbc88459f..0f7569cb8 100644 --- a/tfe.go +++ b/tfe.go @@ -21,7 +21,7 @@ import ( "time" "github.com/google/go-querystring/query" - "github.com/hashicorp/go-cleanhttp" + cleanhttp "github.com/hashicorp/go-cleanhttp" retryablehttp "github.com/hashicorp/go-retryablehttp" "github.com/hashicorp/jsonapi" "golang.org/x/time/rate"