All URIs are relative to http://localhost
Method | HTTP request | Description |
---|---|---|
EditDomainRatelimits | Post /api/v1/edit/rl-domain/ | Edit domain ratelimits |
EditMailboxRatelimits | Post /api/v1/edit/rl-mbox/ | Edit mailbox ratelimits |
GetDomainRatelimits | Get /api/v1/get/rl-domain/{domain} | Get domain ratelimits |
GetMailboxRatelimits | Get /api/v1/get/rl-mbox/{mailbox} | Get mailbox ratelimits |
CreateAlias200Response EditDomainRatelimits(ctx).EditDomainRatelimitsRequest(editDomainRatelimitsRequest).Execute()
Edit domain ratelimits
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/shoopea/mailcow-go"
)
func main() {
editDomainRatelimitsRequest := *openapiclient.NewEditDomainRatelimitsRequest() // EditDomainRatelimitsRequest | (optional)
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.RatelimitsApi.EditDomainRatelimits(context.Background()).EditDomainRatelimitsRequest(editDomainRatelimitsRequest).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `RatelimitsApi.EditDomainRatelimits``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `EditDomainRatelimits`: CreateAlias200Response
fmt.Fprintf(os.Stdout, "Response from `RatelimitsApi.EditDomainRatelimits`: %v\n", resp)
}
Other parameters are passed through a pointer to a apiEditDomainRatelimitsRequest struct via the builder pattern
Name | Type | Description | Notes |
---|---|---|---|
editDomainRatelimitsRequest | EditDomainRatelimitsRequest |
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
CreateAlias200Response EditMailboxRatelimits(ctx).EditMailboxRatelimitsRequest(editMailboxRatelimitsRequest).Execute()
Edit mailbox ratelimits
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/shoopea/mailcow-go"
)
func main() {
editMailboxRatelimitsRequest := *openapiclient.NewEditMailboxRatelimitsRequest() // EditMailboxRatelimitsRequest | (optional)
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.RatelimitsApi.EditMailboxRatelimits(context.Background()).EditMailboxRatelimitsRequest(editMailboxRatelimitsRequest).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `RatelimitsApi.EditMailboxRatelimits``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `EditMailboxRatelimits`: CreateAlias200Response
fmt.Fprintf(os.Stdout, "Response from `RatelimitsApi.EditMailboxRatelimits`: %v\n", resp)
}
Other parameters are passed through a pointer to a apiEditMailboxRatelimitsRequest struct via the builder pattern
Name | Type | Description | Notes |
---|---|---|---|
editMailboxRatelimitsRequest | EditMailboxRatelimitsRequest |
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
GetDomainRatelimits(ctx, domain).XAPIKey(xAPIKey).Execute()
Get domain ratelimits
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/shoopea/mailcow-go"
)
func main() {
domain := "domain_example" // string | name of domain or all
xAPIKey := "api-key-string" // string | e.g. api-key-string (optional)
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
r, err := apiClient.RatelimitsApi.GetDomainRatelimits(context.Background(), domain).XAPIKey(xAPIKey).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `RatelimitsApi.GetDomainRatelimits``: %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 or all |
Other parameters are passed through a pointer to a apiGetDomainRatelimitsRequest 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]
GetMailboxRatelimits(ctx, mailbox).XAPIKey(xAPIKey).Execute()
Get mailbox ratelimits
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/shoopea/mailcow-go"
)
func main() {
mailbox := "mailbox_example" // string | name of mailbox or all
xAPIKey := "api-key-string" // string | e.g. api-key-string (optional)
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
r, err := apiClient.RatelimitsApi.GetMailboxRatelimits(context.Background(), mailbox).XAPIKey(xAPIKey).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `RatelimitsApi.GetMailboxRatelimits``: %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. | |
mailbox | string | name of mailbox or all |
Other parameters are passed through a pointer to a apiGetMailboxRatelimitsRequest 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]