All URIs are relative to http://localhost:8081
Method | HTTP request | Description |
---|---|---|
CreateEndpoint | Post /endpoint | Create endpoint |
DeleteEndpoint | Delete /endpoint/{id} | Delete endpoint |
GetEndpoint | Get /endpoint/{id} | Get endpoint |
ListEndpoints | Get /endpoint | List endpoints |
Endpoint CreateEndpoint(ctx).CreateEndpoint(createEndpoint).Execute()
Create endpoint
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/onpremless/go-client"
)
func main() {
createEndpoint := *openapiclient.NewCreateEndpoint("Name_example", "Path_example", "Lambda_example") // CreateEndpoint | Create endpoint body
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.EndpointAPI.CreateEndpoint(context.Background()).CreateEndpoint(createEndpoint).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `EndpointAPI.CreateEndpoint``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `CreateEndpoint`: Endpoint
fmt.Fprintf(os.Stdout, "Response from `EndpointAPI.CreateEndpoint`: %v\n", resp)
}
Other parameters are passed through a pointer to a apiCreateEndpointRequest struct via the builder pattern
Name | Type | Description | Notes |
---|---|---|---|
createEndpoint | CreateEndpoint | Create endpoint body |
No authorization required
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
DeleteEndpoint(ctx, id).Execute()
Delete endpoint
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/onpremless/go-client"
)
func main() {
id := "id_example" // string | endpoint id
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
r, err := apiClient.EndpointAPI.DeleteEndpoint(context.Background(), id).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `EndpointAPI.DeleteEndpoint``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
id | string | endpoint id |
Other parameters are passed through a pointer to a apiDeleteEndpointRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
(empty response body)
No authorization required
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
Endpoint GetEndpoint(ctx, id).Execute()
Get endpoint
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/onpremless/go-client"
)
func main() {
id := "id_example" // string | endpoint id
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.EndpointAPI.GetEndpoint(context.Background(), id).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `EndpointAPI.GetEndpoint``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `GetEndpoint`: Endpoint
fmt.Fprintf(os.Stdout, "Response from `EndpointAPI.GetEndpoint`: %v\n", resp)
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
id | string | endpoint id |
Other parameters are passed through a pointer to a apiGetEndpointRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
No authorization required
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
[]Endpoint ListEndpoints(ctx).Execute()
List endpoints
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/onpremless/go-client"
)
func main() {
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.EndpointAPI.ListEndpoints(context.Background()).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `EndpointAPI.ListEndpoints``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `ListEndpoints`: []Endpoint
fmt.Fprintf(os.Stdout, "Response from `EndpointAPI.ListEndpoints`: %v\n", resp)
}
This endpoint does not need any parameter.
Other parameters are passed through a pointer to a apiListEndpointsRequest struct via the builder pattern
No authorization required
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]