All URIs are relative to http://localhost
Method | HTTP request | Description |
---|---|---|
CreateFunction | Post /api/{org_id}/functions | CreateFunction |
CreateUpdateEnrichmentTable | Post /api/{org_id}/enrichment_tables/{table_name} | CreateEnrichmentTable |
DeleteFunction | Delete /api/{org_id}/functions/{name} | DeleteFunction |
FunctionPipelineDependency | Get /api/{org_id}/functions/{name} | FunctionPipelineDependency |
ListFunctions | Get /api/{org_id}/functions | ListFunctions |
TestFunction | Post /api/{org_id}/functions/test | Test a Function |
UpdateFunction | Put /api/{org_id}/functions/{name} | UpdateFunction |
HttpResponse CreateFunction(ctx, orgId).Transform(transform).Execute()
CreateFunction
package main
import (
"context"
"fmt"
"os"
openobserve "github.com/rachzy/sdk-go-openobserve"
)
func main() {
orgId := "orgId_example" // string | Organization name
transform := *openobserve.NewTransform("Function_example") // Transform | Function data
configuration := openobserve.NewConfiguration()
apiClient := openobserve.NewAPIClient(configuration)
resp, r, err := apiClient.FunctionsAPI.CreateFunction(context.Background(), orgId).Transform(transform).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `FunctionsAPI.CreateFunction``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `CreateFunction`: HttpResponse
fmt.Fprintf(os.Stdout, "Response from `FunctionsAPI.CreateFunction`: %v\n", resp)
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
orgId | string | Organization name |
Other parameters are passed through a pointer to a apiCreateFunctionRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
transform | Transform | Function data |
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
HttpResponse CreateUpdateEnrichmentTable(ctx, orgId, tableName).Execute()
CreateEnrichmentTable
package main
import (
"context"
"fmt"
"os"
openobserve "github.com/rachzy/sdk-go-openobserve"
)
func main() {
orgId := "orgId_example" // string | Organization name
tableName := "tableName_example" // string | Table name
configuration := openobserve.NewConfiguration()
apiClient := openobserve.NewAPIClient(configuration)
resp, r, err := apiClient.FunctionsAPI.CreateUpdateEnrichmentTable(context.Background(), orgId, tableName).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `FunctionsAPI.CreateUpdateEnrichmentTable``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `CreateUpdateEnrichmentTable`: HttpResponse
fmt.Fprintf(os.Stdout, "Response from `FunctionsAPI.CreateUpdateEnrichmentTable`: %v\n", resp)
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
orgId | string | Organization name | |
tableName | string | Table name |
Other parameters are passed through a pointer to a apiCreateUpdateEnrichmentTableRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
HttpResponse DeleteFunction(ctx, orgId, name).Force(force).Execute()
DeleteFunction
package main
import (
"context"
"fmt"
"os"
openobserve "github.com/rachzy/sdk-go-openobserve"
)
func main() {
orgId := "orgId_example" // string | Organization name
name := "name_example" // string | Function name
force := true // bool | Force delete function regardless pipeline dependencies
configuration := openobserve.NewConfiguration()
apiClient := openobserve.NewAPIClient(configuration)
resp, r, err := apiClient.FunctionsAPI.DeleteFunction(context.Background(), orgId, name).Force(force).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `FunctionsAPI.DeleteFunction``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `DeleteFunction`: HttpResponse
fmt.Fprintf(os.Stdout, "Response from `FunctionsAPI.DeleteFunction`: %v\n", resp)
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
orgId | string | Organization name | |
name | string | Function name |
Other parameters are passed through a pointer to a apiDeleteFunctionRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
force | bool | Force delete function regardless pipeline dependencies |
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
FunctionList FunctionPipelineDependency(ctx, orgId, name).Execute()
FunctionPipelineDependency
package main
import (
"context"
"fmt"
"os"
openobserve "github.com/rachzy/sdk-go-openobserve"
)
func main() {
orgId := "orgId_example" // string | Organization name
name := "name_example" // string | Function name
configuration := openobserve.NewConfiguration()
apiClient := openobserve.NewAPIClient(configuration)
resp, r, err := apiClient.FunctionsAPI.FunctionPipelineDependency(context.Background(), orgId, name).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `FunctionsAPI.FunctionPipelineDependency``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `FunctionPipelineDependency`: FunctionList
fmt.Fprintf(os.Stdout, "Response from `FunctionsAPI.FunctionPipelineDependency`: %v\n", resp)
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
orgId | string | Organization name | |
name | string | Function name |
Other parameters are passed through a pointer to a apiFunctionPipelineDependencyRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
FunctionList ListFunctions(ctx, orgId).Execute()
ListFunctions
package main
import (
"context"
"fmt"
"os"
openobserve "github.com/rachzy/sdk-go-openobserve"
)
func main() {
orgId := "orgId_example" // string | Organization name
configuration := openobserve.NewConfiguration()
apiClient := openobserve.NewAPIClient(configuration)
resp, r, err := apiClient.FunctionsAPI.ListFunctions(context.Background(), orgId).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `FunctionsAPI.ListFunctions``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `ListFunctions`: FunctionList
fmt.Fprintf(os.Stdout, "Response from `FunctionsAPI.ListFunctions`: %v\n", resp)
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
orgId | string | Organization name |
Other parameters are passed through a pointer to a apiListFunctionsRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
HttpResponse TestFunction(ctx, orgId).TestVRLRequest(testVRLRequest).Execute()
Test a Function
package main
import (
"context"
"fmt"
"os"
openobserve "github.com/rachzy/sdk-go-openobserve"
)
func main() {
orgId := "orgId_example" // string | Organization name
testVRLRequest := *openobserve.NewTestVRLRequest([]interface{}{nil}, "Function_example") // TestVRLRequest | Test run function
configuration := openobserve.NewConfiguration()
apiClient := openobserve.NewAPIClient(configuration)
resp, r, err := apiClient.FunctionsAPI.TestFunction(context.Background(), orgId).TestVRLRequest(testVRLRequest).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `FunctionsAPI.TestFunction``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `TestFunction`: HttpResponse
fmt.Fprintf(os.Stdout, "Response from `FunctionsAPI.TestFunction`: %v\n", resp)
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
orgId | string | Organization name |
Other parameters are passed through a pointer to a apiTestFunctionRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
testVRLRequest | TestVRLRequest | Test run function |
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
HttpResponse UpdateFunction(ctx, orgId, name).Transform(transform).Execute()
UpdateFunction
package main
import (
"context"
"fmt"
"os"
openobserve "github.com/rachzy/sdk-go-openobserve"
)
func main() {
orgId := "orgId_example" // string | Organization name
name := "name_example" // string | Function name
transform := *openobserve.NewTransform("Function_example") // Transform | Function data
configuration := openobserve.NewConfiguration()
apiClient := openobserve.NewAPIClient(configuration)
resp, r, err := apiClient.FunctionsAPI.UpdateFunction(context.Background(), orgId, name).Transform(transform).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `FunctionsAPI.UpdateFunction``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `UpdateFunction`: HttpResponse
fmt.Fprintf(os.Stdout, "Response from `FunctionsAPI.UpdateFunction`: %v\n", resp)
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
orgId | string | Organization name | |
name | string | Function name |
Other parameters are passed through a pointer to a apiUpdateFunctionRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
transform | Transform | Function data |
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]