All URIs are relative to https://api.segmentapis.com
Method | HTTP request | Description |
---|---|---|
CreateEdgeFunctions | Post /sources/{sourceId}/edge-functions | Create Edge Functions |
DisableEdgeFunctions | Patch /sources/{sourceId}/edge-functions/disable | Disable Edge Functions |
GenerateUploadURLForEdgeFunctions | Post /sources/{sourceId}/edge-functions/upload-url | Generate Upload URL for Edge Functions |
GetLatestFromEdgeFunctions | Get /sources/{sourceId}/edge-functions/latest | Get Latest from Edge Functions |
CreateEdgeFunctions200Response CreateEdgeFunctions(ctx, sourceId).CreateEdgeFunctionsAlphaInput(createEdgeFunctionsAlphaInput).Execute()
Create Edge Functions
package main
import (
"context"
"fmt"
"os"
api "github.com/segmentio/public-api-sdk-go"
)
func main() {
sourceId := "qQEHquLrjRDN9j1ByrChyn" // string |
createEdgeFunctionsAlphaInput := *api.NewCreateEdgeFunctionsAlphaInput("UploadURL_example") // CreateEdgeFunctionsAlphaInput |
configuration := api.NewConfiguration()
apiClient := api.NewAPIClient(configuration)
token := "<BEARER_TOKEN>"
ctx := context.WithValue(context.Background(), api.ContextAccessToken, token)
resp, r, err := apiClient.EdgeFunctionsAPI.CreateEdgeFunctions(ctx, sourceId).CreateEdgeFunctionsAlphaInput(createEdgeFunctionsAlphaInput).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `EdgeFunctionsAPI.CreateEdgeFunctions``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
responseErrors := api.UnwrapFullErrors(err)
if responseErrors != nil {
for _, responseError := range responseErrors.Errors {
fmt.Fprintf(os.Stderr, "Full error message: %v\n", *responseError.Message)
}
}
}
// response from `CreateEdgeFunctions`: CreateEdgeFunctions200Response
fmt.Fprintf(os.Stdout, "Response from `EdgeFunctionsAPI.CreateEdgeFunctions`: %v\n", resp.GetData())
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
sourceId | string |
Other parameters are passed through a pointer to a apiCreateEdgeFunctionsRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
createEdgeFunctionsAlphaInput | CreateEdgeFunctionsAlphaInput | |
CreateEdgeFunctions200Response
- Content-Type: application/vnd.segment.v1alpha+json
- Accept: application/vnd.segment.v1alpha+json, application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
DisableEdgeFunctions200Response DisableEdgeFunctions(ctx, sourceId).Execute()
Disable Edge Functions
package main
import (
"context"
"fmt"
"os"
api "github.com/segmentio/public-api-sdk-go"
)
func main() {
sourceId := "qQEHquLrjRDN9j1ByrChyn" // string |
configuration := api.NewConfiguration()
apiClient := api.NewAPIClient(configuration)
token := "<BEARER_TOKEN>"
ctx := context.WithValue(context.Background(), api.ContextAccessToken, token)
resp, r, err := apiClient.EdgeFunctionsAPI.DisableEdgeFunctions(ctx, sourceId).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `EdgeFunctionsAPI.DisableEdgeFunctions``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
responseErrors := api.UnwrapFullErrors(err)
if responseErrors != nil {
for _, responseError := range responseErrors.Errors {
fmt.Fprintf(os.Stderr, "Full error message: %v\n", *responseError.Message)
}
}
}
// response from `DisableEdgeFunctions`: DisableEdgeFunctions200Response
fmt.Fprintf(os.Stdout, "Response from `EdgeFunctionsAPI.DisableEdgeFunctions`: %v\n", resp.GetData())
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
sourceId | string |
Other parameters are passed through a pointer to a apiDisableEdgeFunctionsRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
DisableEdgeFunctions200Response
- Content-Type: Not defined
- Accept: application/vnd.segment.v1alpha+json, application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
GenerateUploadURLForEdgeFunctions200Response GenerateUploadURLForEdgeFunctions(ctx, sourceId).Execute()
Generate Upload URL for Edge Functions
package main
import (
"context"
"fmt"
"os"
api "github.com/segmentio/public-api-sdk-go"
)
func main() {
sourceId := "qQEHquLrjRDN9j1ByrChyn" // string |
configuration := api.NewConfiguration()
apiClient := api.NewAPIClient(configuration)
token := "<BEARER_TOKEN>"
ctx := context.WithValue(context.Background(), api.ContextAccessToken, token)
resp, r, err := apiClient.EdgeFunctionsAPI.GenerateUploadURLForEdgeFunctions(ctx, sourceId).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `EdgeFunctionsAPI.GenerateUploadURLForEdgeFunctions``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
responseErrors := api.UnwrapFullErrors(err)
if responseErrors != nil {
for _, responseError := range responseErrors.Errors {
fmt.Fprintf(os.Stderr, "Full error message: %v\n", *responseError.Message)
}
}
}
// response from `GenerateUploadURLForEdgeFunctions`: GenerateUploadURLForEdgeFunctions200Response
fmt.Fprintf(os.Stdout, "Response from `EdgeFunctionsAPI.GenerateUploadURLForEdgeFunctions`: %v\n", resp.GetData())
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
sourceId | string |
Other parameters are passed through a pointer to a apiGenerateUploadURLForEdgeFunctionsRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
GenerateUploadURLForEdgeFunctions200Response
- Content-Type: Not defined
- Accept: application/vnd.segment.v1alpha+json, application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
GetLatestFromEdgeFunctions200Response GetLatestFromEdgeFunctions(ctx, sourceId).Execute()
Get Latest from Edge Functions
package main
import (
"context"
"fmt"
"os"
api "github.com/segmentio/public-api-sdk-go"
)
func main() {
sourceId := "qQEHquLrjRDN9j1ByrChyn" // string |
configuration := api.NewConfiguration()
apiClient := api.NewAPIClient(configuration)
token := "<BEARER_TOKEN>"
ctx := context.WithValue(context.Background(), api.ContextAccessToken, token)
resp, r, err := apiClient.EdgeFunctionsAPI.GetLatestFromEdgeFunctions(ctx, sourceId).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `EdgeFunctionsAPI.GetLatestFromEdgeFunctions``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
responseErrors := api.UnwrapFullErrors(err)
if responseErrors != nil {
for _, responseError := range responseErrors.Errors {
fmt.Fprintf(os.Stderr, "Full error message: %v\n", *responseError.Message)
}
}
}
// response from `GetLatestFromEdgeFunctions`: GetLatestFromEdgeFunctions200Response
fmt.Fprintf(os.Stdout, "Response from `EdgeFunctionsAPI.GetLatestFromEdgeFunctions`: %v\n", resp.GetData())
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
sourceId | string |
Other parameters are passed through a pointer to a apiGetLatestFromEdgeFunctionsRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
GetLatestFromEdgeFunctions200Response
- Content-Type: Not defined
- Accept: application/vnd.segment.v1alpha+json, application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]