All URIs are relative to http://localhost
Method | HTTP request | Description |
---|---|---|
AddDomainMapping | Put /domainMappings | Add a domain mapping |
ListDestinationDomains | Get /domainMappings/{fromDomain} | List all destination domains for a source domain |
ListDomainMappings | Get /domainMappings | List all domain mappings |
RemoveDomainMapping | Delete /domainMappings | Remove a domain mapping |
AddDomainMapping(ctx).Body(body).Execute()
Add a domain mapping
package main
import (
"context"
"fmt"
"os"
openapiclient "go.opscenter.dev/james-go-client"
)
func main() {
body := "body_example" // string |
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
r, err := apiClient.DomainMappingAPI.AddDomainMapping(context.Background()).Body(body).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `DomainMappingAPI.AddDomainMapping``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
}
Other parameters are passed through a pointer to a apiAddDomainMappingRequest struct via the builder pattern
Name | Type | Description | Notes |
---|---|---|---|
body | string |
(empty response body)
No authorization required
- Content-Type: text/plain
- Accept: Not defined
[Back to top] [Back to API list] [Back to Model list] [Back to README]
[]string ListDestinationDomains(ctx, fromDomain).Execute()
List all destination domains for a source domain
package main
import (
"context"
"fmt"
"os"
openapiclient "go.opscenter.dev/james-go-client"
)
func main() {
fromDomain := "sourceDomain.tld" // string | Source domain name
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.DomainMappingAPI.ListDestinationDomains(context.Background(), fromDomain).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `DomainMappingAPI.ListDestinationDomains``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `ListDestinationDomains`: []string
fmt.Fprintf(os.Stdout, "Response from `DomainMappingAPI.ListDestinationDomains`: %v\n", resp)
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
fromDomain | string | Source domain name |
Other parameters are passed through a pointer to a apiListDestinationDomainsRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
[]string
No authorization required
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
map[string][]string ListDomainMappings(ctx).Execute()
List all domain mappings
package main
import (
"context"
"fmt"
"os"
openapiclient "go.opscenter.dev/james-go-client"
)
func main() {
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.DomainMappingAPI.ListDomainMappings(context.Background()).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `DomainMappingAPI.ListDomainMappings``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `ListDomainMappings`: map[string][]string
fmt.Fprintf(os.Stdout, "Response from `DomainMappingAPI.ListDomainMappings`: %v\n", resp)
}
This endpoint does not need any parameter.
Other parameters are passed through a pointer to a apiListDomainMappingsRequest struct via the builder pattern
No authorization required
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
RemoveDomainMapping(ctx).Body(body).Execute()
Remove a domain mapping
package main
import (
"context"
"fmt"
"os"
openapiclient "go.opscenter.dev/james-go-client"
)
func main() {
body := "body_example" // string |
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
r, err := apiClient.DomainMappingAPI.RemoveDomainMapping(context.Background()).Body(body).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `DomainMappingAPI.RemoveDomainMapping``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
}
Other parameters are passed through a pointer to a apiRemoveDomainMappingRequest struct via the builder pattern
Name | Type | Description | Notes |
---|---|---|---|
body | string |
(empty response body)
No authorization required
- Content-Type: text/plain
- Accept: Not defined
[Back to top] [Back to API list] [Back to Model list] [Back to README]