A transformation represents JavaScript code that will be executed on a connection's requests. Transformations are applied to connections using Rules.
- Get - Get transformations
Get transformations
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
}
}
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. |