All URIs are relative to http://localhost
Method | HTTP request | Description |
---|---|---|
CreateDomain | Post /api/v1/add/domain | Create domain |
DeleteDomain | Post /api/v1/delete/domain | Delete domain |
DeleteDomainTags | Post /api/v1/delete/domain/tag/{domain} | Delete domain tags |
GetDomains | Get /api/v1/get/domain/{id} | Get domains |
UpdateDomain | Post /api/v1/edit/domain | Update domain |
[]CreateAlias200Response CreateDomain(ctx).CreateDomainRequest(createDomainRequest).Execute()
Create domain
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/shoopea/mailcow-go"
)
func main() {
createDomainRequest := *openapiclient.NewCreateDomainRequest() // CreateDomainRequest | (optional)
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.DomainsApi.CreateDomain(context.Background()).CreateDomainRequest(createDomainRequest).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)
}
// response from `CreateDomain`: []CreateAlias200Response
fmt.Fprintf(os.Stdout, "Response from `DomainsApi.CreateDomain`: %v\n", resp)
}
Other parameters are passed through a pointer to a apiCreateDomainRequest struct via the builder pattern
Name | Type | Description | Notes |
---|---|---|---|
createDomainRequest | CreateDomainRequest |
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
[]CreateAlias200Response DeleteDomain(ctx).DeleteDomainRequest(deleteDomainRequest).Execute()
Delete domain
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/shoopea/mailcow-go"
)
func main() {
deleteDomainRequest := *openapiclient.NewDeleteDomainRequest() // DeleteDomainRequest | (optional)
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.DomainsApi.DeleteDomain(context.Background()).DeleteDomainRequest(deleteDomainRequest).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)
}
// response from `DeleteDomain`: []CreateAlias200Response
fmt.Fprintf(os.Stdout, "Response from `DomainsApi.DeleteDomain`: %v\n", resp)
}
Other parameters are passed through a pointer to a apiDeleteDomainRequest struct via the builder pattern
Name | Type | Description | Notes |
---|---|---|---|
deleteDomainRequest | DeleteDomainRequest |
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
CreateAlias200Response DeleteDomainTags(ctx, domain).DeleteDomainTagsRequest(deleteDomainTagsRequest).Execute()
Delete domain tags
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/shoopea/mailcow-go"
)
func main() {
domain := "domain.tld" // string | name of domain
deleteDomainTagsRequest := *openapiclient.NewDeleteDomainTagsRequest() // DeleteDomainTagsRequest | (optional)
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.DomainsApi.DeleteDomainTags(context.Background(), domain).DeleteDomainTagsRequest(deleteDomainTagsRequest).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `DomainsApi.DeleteDomainTags``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `DeleteDomainTags`: CreateAlias200Response
fmt.Fprintf(os.Stdout, "Response from `DomainsApi.DeleteDomainTags`: %v\n", resp)
}
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 apiDeleteDomainTagsRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
deleteDomainTagsRequest | DeleteDomainTagsRequest | |
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
GetDomains(ctx, id).Tags(tags).XAPIKey(xAPIKey).Execute()
Get domains
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/shoopea/mailcow-go"
)
func main() {
id := "all" // string | id of entry you want to get
tags := "tag1,tag2" // string | comma seperated list of tags to filter by (optional)
xAPIKey := "api-key-string" // string | e.g. api-key-string (optional)
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
r, err := apiClient.DomainsApi.GetDomains(context.Background(), id).Tags(tags).XAPIKey(xAPIKey).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `DomainsApi.GetDomains``: %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. | |
id | string | id of entry you want to get |
Other parameters are passed through a pointer to a apiGetDomainsRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
tags | string | comma seperated list of tags to filter by | 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]
[]CreateAlias200Response UpdateDomain(ctx).UpdateDomainRequest(updateDomainRequest).Execute()
Update domain
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/shoopea/mailcow-go"
)
func main() {
updateDomainRequest := *openapiclient.NewUpdateDomainRequest() // UpdateDomainRequest | (optional)
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.DomainsApi.UpdateDomain(context.Background()).UpdateDomainRequest(updateDomainRequest).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `DomainsApi.UpdateDomain``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `UpdateDomain`: []CreateAlias200Response
fmt.Fprintf(os.Stdout, "Response from `DomainsApi.UpdateDomain`: %v\n", resp)
}
Other parameters are passed through a pointer to a apiUpdateDomainRequest struct via the builder pattern
Name | Type | Description | Notes |
---|---|---|---|
updateDomainRequest | UpdateDomainRequest |
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]