/
api_plans.go
35 lines (30 loc) · 1.03 KB
/
api_plans.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
/*
* Metal API
*
* This is the API for Equinix Metal. The API allows you to programmatically interact with all of your Equinix Metal resources, including devices, networks, addresses, organizations, projects, and your user account. The official API docs are hosted at <https://metal.equinix.com/developers/api>.
*
* API version: 1.0.0
* Contact: support@equinixmetal.com
* Generated by: OpenAPI Generator (https://openapi-generator.tech)
*/
package startapi
import (
"context"
"fmt"
"net/http"
"os"
"github.com/gin-gonic/gin"
)
// FindPlans - Retrieve all plans
func FindPlans(c *gin.Context) {
resp, r, err := apiClient.PlansApi.FindPlans(context.Background()).Include(include).Exclude(exclude).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `PlansApi.FindPlans``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
c.JSON(http.StatusOK, resp)
}
// FindPlansByProject - Retrieve all plans visible by the project
func FindPlansByProject(c *gin.Context) {
c.JSON(http.StatusOK, gin.H{})
}