Skip to content

Commit

Permalink
chore: remove stutters
Browse files Browse the repository at this point in the history
- Updates `HcxCloudAuthorizationBody` to `CloudAuthorizationBody`.
- Updates `HcxCloudAuthenticate` to `CloudAuthenticate`.

Ref: #42

Signed-off-by: Ryan Johnson <[email protected]>
  • Loading branch information
tenthirtyam committed Jan 24, 2025
1 parent 9826607 commit 569e717
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions hcx/vmc.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ type VmcAccessToken struct {
RefreshToken string `json:"refreshToken"`
}

type HcxCloudAuthorizationBody struct {
type CloudAuthorizationBody struct {
Token string `json:"token"`
}

Expand Down Expand Up @@ -87,14 +87,14 @@ func VmcAuthenticate(token string) (string, error) {

}

func HcxCloudAuthenticate(client *Client, token string) error {
func CloudAuthenticate(client *Client, token string) error {

c := Client{
HTTPClient: &http.Client{Timeout: 60 * time.Second},
HostURL: "https://connect.hcx.vmware.com/provider/csp",
}

body := HcxCloudAuthorizationBody{
body := CloudAuthorizationBody{
Token: token,
}

Expand Down
6 changes: 3 additions & 3 deletions resource_vmc.go
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ func resourceVmcCreate(ctx context.Context, d *schema.ResourceData, m interface{
return diag.FromErr(err)
}

err = hcx.HcxCloudAuthenticate(client, access_token)
err = hcx.CloudAuthenticate(client, access_token)
if err != nil {
return diag.FromErr(err)
}
Expand Down Expand Up @@ -149,7 +149,7 @@ func resourceVmcRead(ctx context.Context, d *schema.ResourceData, m interface{})
return diag.FromErr(err)
}

err = hcx.HcxCloudAuthenticate(client, access_token)
err = hcx.CloudAuthenticate(client, access_token)
if err != nil {
return diag.FromErr(err)
}
Expand Down Expand Up @@ -196,7 +196,7 @@ func resourceVmcDelete(ctx context.Context, d *schema.ResourceData, m interface{
return diag.FromErr(err)
}

err = hcx.HcxCloudAuthenticate(client, access_token)
err = hcx.CloudAuthenticate(client, access_token)
if err != nil {
return diag.FromErr(err)
}
Expand Down

0 comments on commit 569e717

Please sign in to comment.