A connection lets you route webhooks from a source to a destination, using a ruleset.
- Get - Get connections
Get connections
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"
"github.com/speakeasy-sdks/hookdeck-go/pkg/types"
)
func main() {
s := hookdeck.New(
hookdeck.WithSecurity(shared.Security{
BasicAuth: &shared.SchemeBasicAuth{
Password: "",
Username: "",
},
}),
)
ctx := context.Background()
res, err := s.Connections.Get(ctx, operations.GetConnectionsRequest{
Archived: hookdeck.Bool(false),
ArchivedAt: &operations.GetConnectionsArchivedAt{},
DestinationID: &operations.GetConnectionsDestinationID{},
Dir: &operations.GetConnectionsDir{},
FullName: hookdeck.String("deserunt"),
ID: &operations.GetConnectionsID{},
Name: &operations.GetConnectionsName{},
OrderBy: &operations.GetConnectionsOrderBy{},
PausedAt: &operations.GetConnectionsPausedAt{},
SourceID: &operations.GetConnectionsSourceID{},
})
if err != nil {
log.Fatal(err)
}
if res.ConnectionPaginatedResult != nil {
// handle response
}
}
Parameter | Type | Required | Description |
---|---|---|---|
ctx |
context.Context | ✔️ | The context to use for the request. |
request |
operations.GetConnectionsRequest | ✔️ | The request object to use for the request. |