Skip to content

Commit

Permalink
feat: remove resource groups endpoint
Browse files Browse the repository at this point in the history
  • Loading branch information
CristhianF7 committed Dec 4, 2024
1 parent 68cd138 commit 522749c
Show file tree
Hide file tree
Showing 4 changed files with 0 additions and 95 deletions.
24 changes: 0 additions & 24 deletions internal/azure/azure.go
Original file line number Diff line number Diff line change
Expand Up @@ -266,27 +266,3 @@ func (c *Client) GetDNSDomains(ctx context.Context, resourceGroup string) ([]str

return domains, nil
}

func (c *Client) GetResourceGroups(ctx context.Context) ([]string, error) {
client, err := c.newResourceClientFactory()
if err != nil {
return nil, err
}

pager := client.NewResourceGroupsClient().NewListPager(nil)

var resourceGroups []string

for pager.More() {
page, err := pager.NextPage(ctx)
if err != nil {
return nil, fmt.Errorf("failed to list resource groups: %w", err)
}

for _, rg := range page.Value {
resourceGroups = append(resourceGroups, *rg.Name)
}
}

return resourceGroups, nil
}
57 changes: 0 additions & 57 deletions internal/router/api/v1/resourceGroups.go

This file was deleted.

1 change: 0 additions & 1 deletion internal/router/router.go
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,6 @@ func SetupRouter() *gin.Engine {

// Zones *** Only supports google ***
v1.POST("/zones", middleware.ValidateAPIKey(), router.ListZonesForRegion)
v1.POST("/resource-groups", middleware.ValidateAPIKey(), router.ListResourceGroups)

// Instance Sizes
v1.POST("/instance-sizes/:cloud_provider", middleware.ValidateAPIKey(), router.ListInstanceSizesForRegion)
Expand Down
13 changes: 0 additions & 13 deletions internal/types/resourceGroups.go

This file was deleted.

0 comments on commit 522749c

Please sign in to comment.