All URIs are relative to http://localhost
Method | HTTP request | Description |
---|---|---|
CreateDomain | Put /domains/{domainToBeCreated} | Create a domain |
CreateDomainAlias | Put /domains/{domainName}/aliases | Create an alias for a domain |
DeleteDomain | Delete /domains/{domainToBeDeleted} | Delete a domain |
DeleteDomainAlias | Delete /domains/{domainName}/aliases | Delete an alias for a domain |
DeleteUserDataOfDomain | Post /domains/{domainToBeUsed} | Delete all users data of a domain |
ExistsDomain | Get /domains/{domainName} | Test if a domain exists |
ListDomainAliases | Get /domains/{domainName}/aliases | Get the list of aliases for a domain |
ListDomains | Get /domains | Get the list of domains |
CreateDomain(ctx, domainToBeCreated).Execute()
Create a domain
package main
import (
"context"
"fmt"
"os"
openapiclient "go.opscenter.dev/james-go-client"
)
func main() {
domainToBeCreated := "domainToBeCreated_example" // string | Name of the domain to be created
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
r, err := apiClient.DomainsAPI.CreateDomain(context.Background(), domainToBeCreated).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `DomainsAPI.CreateDomain``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
domainToBeCreated | string | Name of the domain to be created |
Other parameters are passed through a pointer to a apiCreateDomainRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
(empty response body)
No authorization required
- Content-Type: Not defined
- Accept: Not defined
[Back to top] [Back to API list] [Back to Model list] [Back to README]
CreateDomainAlias(ctx, domainName).SourceDomainName(sourceDomainName).Execute()
Create an alias for a domain
package main
import (
"context"
"fmt"
"os"
openapiclient "go.opscenter.dev/james-go-client"
)
func main() {
domainName := "domainName_example" // string | Name of the destination domain for the alias
sourceDomainName := "sourceDomainName_example" // string | Name of the source domain for the alias
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
r, err := apiClient.DomainsAPI.CreateDomainAlias(context.Background(), domainName).SourceDomainName(sourceDomainName).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `DomainsAPI.CreateDomainAlias``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
domainName | string | Name of the destination domain for the alias |
Other parameters are passed through a pointer to a apiCreateDomainAliasRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
sourceDomainName | string | Name of the source domain for the alias |
(empty response body)
No authorization required
- Content-Type: Not defined
- Accept: Not defined
[Back to top] [Back to API list] [Back to Model list] [Back to README]
DeleteDomain(ctx, domainToBeDeleted).Execute()
Delete a domain
package main
import (
"context"
"fmt"
"os"
openapiclient "go.opscenter.dev/james-go-client"
)
func main() {
domainToBeDeleted := "domainToBeDeleted_example" // string | Name of the domain to be deleted
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
r, err := apiClient.DomainsAPI.DeleteDomain(context.Background(), domainToBeDeleted).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `DomainsAPI.DeleteDomain``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
domainToBeDeleted | string | Name of the domain to be deleted |
Other parameters are passed through a pointer to a apiDeleteDomainRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
(empty response body)
No authorization required
- Content-Type: Not defined
- Accept: Not defined
[Back to top] [Back to API list] [Back to Model list] [Back to README]
DeleteDomainAlias(ctx, domainName).SourceDomainName(sourceDomainName).Execute()
Delete an alias for a domain
package main
import (
"context"
"fmt"
"os"
openapiclient "go.opscenter.dev/james-go-client"
)
func main() {
domainName := "domainName_example" // string | Name of the destination domain for the alias
sourceDomainName := "sourceDomainName_example" // string | Name of the source domain for the alias
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
r, err := apiClient.DomainsAPI.DeleteDomainAlias(context.Background(), domainName).SourceDomainName(sourceDomainName).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `DomainsAPI.DeleteDomainAlias``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
domainName | string | Name of the destination domain for the alias |
Other parameters are passed through a pointer to a apiDeleteDomainAliasRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
sourceDomainName | string | Name of the source domain for the alias |
(empty response body)
No authorization required
- Content-Type: Not defined
- Accept: Not defined
[Back to top] [Back to API list] [Back to Model list] [Back to README]
DeleteUserDataOfDomain(ctx, domainToBeUsed).Action(action).Execute()
Delete all users data of a domain
package main
import (
"context"
"fmt"
"os"
openapiclient "go.opscenter.dev/james-go-client"
)
func main() {
domainToBeUsed := "domainToBeUsed_example" // string | Name of the domain to delete user data from
action := "action_example" // string |
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
r, err := apiClient.DomainsAPI.DeleteUserDataOfDomain(context.Background(), domainToBeUsed).Action(action).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `DomainsAPI.DeleteUserDataOfDomain``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
domainToBeUsed | string | Name of the domain to delete user data from |
Other parameters are passed through a pointer to a apiDeleteUserDataOfDomainRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
action | string | |
(empty response body)
No authorization required
- Content-Type: application/x-www-form-urlencoded
- Accept: Not defined
[Back to top] [Back to API list] [Back to Model list] [Back to README]
ExistsDomain(ctx, domainName).Execute()
Test if a domain exists
package main
import (
"context"
"fmt"
"os"
openapiclient "go.opscenter.dev/james-go-client"
)
func main() {
domainName := "domainName_example" // string | Name of the domain to be tested
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
r, err := apiClient.DomainsAPI.ExistsDomain(context.Background(), domainName).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `DomainsAPI.ExistsDomain``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
domainName | string | Name of the domain to be tested |
Other parameters are passed through a pointer to a apiExistsDomainRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
(empty response body)
No authorization required
- Content-Type: Not defined
- Accept: Not defined
[Back to top] [Back to API list] [Back to Model list] [Back to README]
[]DomainAlias ListDomainAliases(ctx, domainName).Execute()
Get the list of aliases for a domain
package main
import (
"context"
"fmt"
"os"
openapiclient "go.opscenter.dev/james-go-client"
)
func main() {
domainName := "domainName_example" // string | Name of the domain to retrieve aliases for
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.DomainsAPI.ListDomainAliases(context.Background(), domainName).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `DomainsAPI.ListDomainAliases``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `ListDomainAliases`: []DomainAlias
fmt.Fprintf(os.Stdout, "Response from `DomainsAPI.ListDomainAliases`: %v\n", resp)
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
domainName | string | Name of the domain to retrieve aliases for |
Other parameters are passed through a pointer to a apiListDomainAliasesRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
No authorization required
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
[]string ListDomains(ctx).Execute()
Get the list of domains
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.DomainsAPI.ListDomains(context.Background()).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `DomainsAPI.ListDomains``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `ListDomains`: []string
fmt.Fprintf(os.Stdout, "Response from `DomainsAPI.ListDomains`: %v\n", resp)
}
This endpoint does not need any parameter.
Other parameters are passed through a pointer to a apiListDomainsRequest struct via the builder pattern
[]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]