Skip to content

Latest commit

 

History

History
280 lines (175 loc) · 7.1 KB

DKIMApi.md

File metadata and controls

280 lines (175 loc) · 7.1 KB

\DKIMApi

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

DeleteDKIMKey

CreateAlias200Response DeleteDKIMKey(ctx).RequestBody(requestBody).Execute()

Delete DKIM Key

Example

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)
}

Path Parameters

Other Parameters

Other parameters are passed through a pointer to a apiDeleteDKIMKeyRequest struct via the builder pattern

Name Type Description Notes
requestBody []string

Return type

CreateAlias200Response

Authorization

ApiKeyAuth

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

DuplicateDKIMKey

CreateAlias200Response DuplicateDKIMKey(ctx).DuplicateDKIMKeyRequest(duplicateDKIMKeyRequest).Execute()

Duplicate DKIM Key

Example

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)
}

Path Parameters

Other Parameters

Other parameters are passed through a pointer to a apiDuplicateDKIMKeyRequest struct via the builder pattern

Name Type Description Notes
duplicateDKIMKeyRequest DuplicateDKIMKeyRequest

Return type

CreateAlias200Response

Authorization

ApiKeyAuth

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

GenerateDKIMKey

CreateAlias200Response GenerateDKIMKey(ctx).GenerateDKIMKeyRequest(generateDKIMKeyRequest).Execute()

Generate DKIM Key

Example

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)
}

Path Parameters

Other Parameters

Other parameters are passed through a pointer to a apiGenerateDKIMKeyRequest struct via the builder pattern

Name Type Description Notes
generateDKIMKeyRequest GenerateDKIMKeyRequest

Return type

CreateAlias200Response

Authorization

ApiKeyAuth

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

GetDKIMKey

GetDKIMKey(ctx, domain).XAPIKey(xAPIKey).Execute()

Get DKIM Key

Example

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)
    }
}

Path Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
domain string name of domain

Other Parameters

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 |

Return type

(empty response body)

Authorization

ApiKeyAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]