All URIs are relative to http://localhost
Method | HTTP request | Description |
---|---|---|
DeleteDKIMKey | Post /api/v1/delete/dkim | Delete DKIM Key |
DuplicateDKIMKey | Post /api/v1/add/dkim_duplicate | Duplicate DKIM Key |
GenerateDKIMKey | Post /api/v1/add/dkim | Generate DKIM Key |
GetDKIMKey | Get /api/v1/get/dkim/{domain} | Get DKIM Key |
CreateAlias200Response DeleteDKIMKey(ctx).RequestBody(requestBody).Execute()
Delete DKIM Key
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/shoopea/mailcow-go"
)
func main() {
requestBody := []string{"["mailcow.tld"]"} // []string | (optional)
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.DKIMApi.DeleteDKIMKey(context.Background()).RequestBody(requestBody).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `DKIMApi.DeleteDKIMKey``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `DeleteDKIMKey`: CreateAlias200Response
fmt.Fprintf(os.Stdout, "Response from `DKIMApi.DeleteDKIMKey`: %v\n", resp)
}
Other parameters are passed through a pointer to a apiDeleteDKIMKeyRequest struct via the builder pattern
Name | Type | Description | Notes |
---|---|---|---|
requestBody | []string |
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
CreateAlias200Response DuplicateDKIMKey(ctx).DuplicateDKIMKeyRequest(duplicateDKIMKeyRequest).Execute()
Duplicate DKIM Key
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/shoopea/mailcow-go"
)
func main() {
duplicateDKIMKeyRequest := *openapiclient.NewDuplicateDKIMKeyRequest() // DuplicateDKIMKeyRequest | (optional)
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.DKIMApi.DuplicateDKIMKey(context.Background()).DuplicateDKIMKeyRequest(duplicateDKIMKeyRequest).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `DKIMApi.DuplicateDKIMKey``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `DuplicateDKIMKey`: CreateAlias200Response
fmt.Fprintf(os.Stdout, "Response from `DKIMApi.DuplicateDKIMKey`: %v\n", resp)
}
Other parameters are passed through a pointer to a apiDuplicateDKIMKeyRequest struct via the builder pattern
Name | Type | Description | Notes |
---|---|---|---|
duplicateDKIMKeyRequest | DuplicateDKIMKeyRequest |
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
CreateAlias200Response GenerateDKIMKey(ctx).GenerateDKIMKeyRequest(generateDKIMKeyRequest).Execute()
Generate DKIM Key
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/shoopea/mailcow-go"
)
func main() {
generateDKIMKeyRequest := *openapiclient.NewGenerateDKIMKeyRequest() // GenerateDKIMKeyRequest | (optional)
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.DKIMApi.GenerateDKIMKey(context.Background()).GenerateDKIMKeyRequest(generateDKIMKeyRequest).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `DKIMApi.GenerateDKIMKey``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `GenerateDKIMKey`: CreateAlias200Response
fmt.Fprintf(os.Stdout, "Response from `DKIMApi.GenerateDKIMKey`: %v\n", resp)
}
Other parameters are passed through a pointer to a apiGenerateDKIMKeyRequest struct via the builder pattern
Name | Type | Description | Notes |
---|---|---|---|
generateDKIMKeyRequest | GenerateDKIMKeyRequest |
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
GetDKIMKey(ctx, domain).XAPIKey(xAPIKey).Execute()
Get DKIM Key
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/shoopea/mailcow-go"
)
func main() {
domain := "domain_example" // string | name of domain
xAPIKey := "api-key-string" // string | e.g. api-key-string (optional)
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
r, err := apiClient.DKIMApi.GetDKIMKey(context.Background(), domain).XAPIKey(xAPIKey).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `DKIMApi.GetDKIMKey``: %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. | |
domain | string | name of domain |
Other parameters are passed through a pointer to a apiGetDKIMKeyRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
xAPIKey | string | e.g. api-key-string |
(empty response body)
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]