Add a custom domain to the workspace
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: "",
},
}),
)
addCustomHostname := shared.AddCustomHostname{
Hostname: "sandy-spruce.biz",
}
teamID := "modi"
ctx := context.Background()
res, err := s.CustomDomain.Add(ctx, addCustomHostname, teamID)
if err != nil {
log.Fatal(err)
}
if res.AddCustomHostname != nil {
// handle response
}
}
Parameter | Type | Required | Description |
---|---|---|---|
ctx |
context.Context | ✔️ | The context to use for the request. |
addCustomHostname |
shared.AddCustomHostname | ✔️ | N/A |
teamID |
string | ✔️ | N/A |
*operations.AddCustomDomainResponse, error
Removes a custom domain from the workspace
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: "",
},
}),
)
domainID := "qui"
teamID := "aliquid"
ctx := context.Background()
res, err := s.CustomDomain.Delete(ctx, domainID, teamID)
if err != nil {
log.Fatal(err)
}
if res.DeleteCustomDomainSchema != nil {
// handle response
}
}
Parameter | Type | Required | Description |
---|---|---|---|
ctx |
context.Context | ✔️ | The context to use for the request. |
domainID |
string | ✔️ | N/A |
teamID |
string | ✔️ | N/A |