Skip to content

Latest commit

 

History

History
executable file
·
69 lines (51 loc) · 2.92 KB

README.md

File metadata and controls

executable file
·
69 lines (51 loc) · 2.92 KB

Transformations

Overview

A transformation represents JavaScript code that will be executed on a connection's requests. Transformations are applied to connections using Rules.

Available Operations

  • Get - Get transformations

Get

Get transformations

Example Usage

package main

import(
	"context"
	"log"
	"github.com/speakeasy-sdks/hookdeck-go"
	"github.com/speakeasy-sdks/hookdeck-go/pkg/models/shared"
	"github.com/speakeasy-sdks/hookdeck-go/pkg/models/operations"
)

func main() {
    s := hookdeck.New(
        hookdeck.WithSecurity(shared.Security{
            BasicAuth: &shared.SchemeBasicAuth{
                Password: "",
                Username: "",
            },
        }),
    )

    ctx := context.Background()
    res, err := s.Transformations.Get(ctx, operations.GetTransformationsRequest{
        Dir: &operations.GetTransformationsDir{},
        ID: &operations.GetTransformationsID{},
        Limit: hookdeck.Int64(512393),
        Name: &operations.GetTransformationsName{},
        Next: hookdeck.String("odio"),
        OrderBy: &operations.GetTransformationsOrderBy{},
        Prev: hookdeck.String("occaecati"),
    })
    if err != nil {
        log.Fatal(err)
    }

    if res.TransformationPaginatedResult != nil {
        // handle response
    }
}

Parameters

Parameter Type Required Description
ctx context.Context ✔️ The context to use for the request.
request operations.GetTransformationsRequest ✔️ The request object to use for the request.

Response

*operations.GetTransformationsResponse, error