This repo contains a generated API client to talk with mailcow's API from Go.
The following API endpoints require an array as response body:
- /delete/domain
- /delete/mailbox
Therfore the template client.mustache include a special handling, e.g:
if strings.HasSuffix(path, "/api/v1/delete/domain") {
var deleteDomainRequest *DeleteDomainRequest = postBody.(*DeleteDomainRequest)
postBody = *&deleteDomainRequest.Items
}
This API client was generated by the OpenAPI Generator project. By using the OpenAPI-spec from a remote server, you can easily generate an API client.
- API version: 1.0.0
- Package version: 1.0.0
Install the following dependencies:
go install github.com/l.with/mailcow-go
All URIs are relative to http://localhost
Class | Method | HTTP request | Description |
---|---|---|---|
AddressRewritingApi | CreateBCCMap | Post /api/v1/add/bcc | Create BCC Map |
AddressRewritingApi | CreateRecipientMap | Post /api/v1/add/recipient_map | Create Recipient Map |
AddressRewritingApi | DeleteBCCMap | Post /api/v1/delete/bcc | Delete BCC Map |
AddressRewritingApi | DeleteRecipientMap | Post /api/v1/delete/recipient_map | Delete Recipient Map |
AddressRewritingApi | GetBCCMap | Get /api/v1/get/bcc/{id} | Get BCC Map |
AddressRewritingApi | GetRecipientMap | Get /api/v1/get/recipient_map/{id} | Get Recipient Map |
AliasesApi | CreateAlias | Post /api/v1/add/alias | Create alias |
AliasesApi | CreateTimeLimitedAlias | Post /api/v1/add/time_limited_alias | Create time limited alias |
AliasesApi | DeleteAlias | Post /api/v1/delete/alias | Delete alias |
AliasesApi | GetAliases | Get /api/v1/get/alias/{id} | Get aliases |
AliasesApi | GetTimeLimitedAliases | Get /api/v1/get/time_limited_aliases/{mailbox} | Get time limited aliases |
AliasesApi | UpdateAlias | Post /api/v1/edit/alias | Update alias |
AppPasswordsApi | CreateAppPassword | Post /api/v1/add/app-passwd | Create App Password |
AppPasswordsApi | DeleteAppPassword | Post /api/v1/delete/app-passwd | Delete App Password |
AppPasswordsApi | GetAppPassword | Get /api/v1/get/app-passwd/all/{mailbox} | Get App Password |
DKIMApi | DeleteDKIMKey | Post /api/v1/delete/dkim | Delete DKIM Key |
DKIMApi | DuplicateDKIMKey | Post /api/v1/add/dkim_duplicate | Duplicate DKIM Key |
DKIMApi | GenerateDKIMKey | Post /api/v1/add/dkim | Generate DKIM Key |
DKIMApi | GetDKIMKey | Get /api/v1/get/dkim/{domain} | Get DKIM Key |
DomainAdminApi | CreateDomainAdminUser | Post /api/v1/add/domain-admin | Create Domain Admin user |
DomainAdminApi | DeleteDomainAdmin | Post /api/v1/delete/domain-admin | Delete Domain Admin |
DomainAdminApi | EditDomainAdminACL | Post /api/v1/edit/da-acl | Edit Domain Admin ACL |
DomainAdminApi | EditDomainAdminUser | Post /api/v1/edit/domain-admin | Edit Domain Admin user |
DomainAdminApi | GetDomainAdmins | Get /api/v1/get/domain-admin/all | Get Domain Admins |
DomainAntispamPoliciesApi | CreateDomainPolicy | Post /api/v1/add/domain-policy | Create domain policy |
DomainAntispamPoliciesApi | DeleteDomainPolicy | Post /api/v1/delete/domain-policy | Delete domain policy |
DomainAntispamPoliciesApi | ListBlacklistDomainPolicy | Get /api/v1/get/policy_bl_domain/{domain} | List blacklist domain policy |
DomainAntispamPoliciesApi | ListWhitelistDomainPolicy | Get /api/v1/get/policy_wl_domain/{domain} | List whitelist domain policy |
DomainsApi | CreateDomain | Post /api/v1/add/domain | Create domain |
DomainsApi | DeleteDomain | Post /api/v1/delete/domain | Delete domain |
DomainsApi | DeleteDomainTags | Post /api/v1/delete/domain/tag/{domain} | Delete domain tags |
DomainsApi | GetDomains | Get /api/v1/get/domain/{id} | Get domains |
DomainsApi | UpdateDomain | Post /api/v1/edit/domain | Update domain |
Fail2BanApi | EditFail2Ban | Post /api/v1/edit/fail2ban | Edit Fail2Ban |
Fail2BanApi | GetFail2BanConfig | Get /api/v1/get/fail2ban | Get Fail2Ban Config |
FordwardingHostsApi | AddForwardHost | Post /api/v1/add/fwdhost | Add Forward Host |
FordwardingHostsApi | DeleteForwardHost | Post /api/v1/delete/fwdhost | Delete Forward Host |
FordwardingHostsApi | GetForwardingHosts | Get /api/v1/get/fwdhost/all | Get Forwarding Hosts |
LogsApi | GetACMELogs | Get /api/v1/get/logs/acme/{count} | Get ACME logs |
LogsApi | GetApiLogs | Get /api/v1/get/logs/api/{count} | Get Api logs |
LogsApi | GetAutodiscoverLogs | Get /api/v1/get/logs/autodiscover/{count} | Get Autodiscover logs |
LogsApi | GetDovecotLogs | Get /api/v1/get/logs/dovecot/{count} | Get Dovecot logs |
LogsApi | GetNetfilterLogs | Get /api/v1/get/logs/netfilter/{count} | Get Netfilter logs |
LogsApi | GetPostfixLogs | Get /api/v1/get/logs/postfix/{count} | Get Postfix logs |
LogsApi | GetRatelimitLogs | Get /api/v1/get/logs/ratelimited/{count} | Get Ratelimit logs |
LogsApi | GetRspamdLogs | Get /api/v1/get/logs/rspamd-history/{count} | Get Rspamd logs |
LogsApi | GetSOGoLogs | Get /api/v1/get/logs/sogo/{count} | Get SOGo logs |
LogsApi | GetWatchdogLogs | Get /api/v1/get/logs/watchdog/{count} | Get Watchdog logs |
MailboxesApi | CreateMailbox | Post /api/v1/add/mailbox | Create mailbox |
MailboxesApi | DeleteMailbox | Post /api/v1/delete/mailbox | Delete mailbox |
MailboxesApi | DeleteMailboxTags | Post /api/v1/delete/mailbox/tag/{mailbox} | Delete mailbox tags |
MailboxesApi | EditMailboxSpamFilterScore | Post /api/v1/edit/spam-score/ | Edit mailbox spam filter score |
MailboxesApi | GetMailboxes | Get /api/v1/get/mailbox/{id} | Get mailboxes |
MailboxesApi | QuarantineNotifications | Post /api/v1/edit/quarantine_notification | Quarantine Notifications |
MailboxesApi | UpdateMailbox | Post /api/v1/edit/mailbox | Update mailbox |
MailboxesApi | UpdateMailboxACL | Post /api/v1/edit/user-acl | Update mailbox ACL |
MailboxesApi | UpdatePushoverSettings | Post /api/v1/edit/pushover | Update Pushover settings |
OAuthClientsApi | CreateOAuthClient | Post /api/v1/add/oauth2-client | Create oAuth Client |
OAuthClientsApi | DeleteOAuthClient | Post /api/v1/delete/oauth2-client | Delete oAuth Client |
OAuthClientsApi | GetOAuthClients | Get /api/v1/get/oauth2-client/{id} | Get oAuth Clients |
OutgoingTLSPolicyMapOverridesApi | CreateTLSPolicyMap | Post /api/v1/add/tls-policy-map | Create TLS Policy Map |
OutgoingTLSPolicyMapOverridesApi | DeleteTLSPolicyMap | Post /api/v1/delete/tls-policy-map | Delete TLS Policy Map |
OutgoingTLSPolicyMapOverridesApi | GetTLSPolicyMap | Get /api/v1/get/tls-policy-map/{id} | Get TLS Policy Map |
QuarantineApi | DeleteMailsInQuarantine | Post /api/v1/delete/qitem | Delete mails in Quarantine |
QuarantineApi | GetMailsInQuarantine | Get /api/v1/get/quarantine/all | Get mails in Quarantine |
QueueManagerApi | DeleteQueue | Post /api/v1/delete/mailq | Delete Queue |
QueueManagerApi | FlushQueue | Post /api/v1/edit/mailq | Flush Queue |
QueueManagerApi | GetQueue | Get /api/v1/get/mailq/all | Get Queue |
RatelimitsApi | EditDomainRatelimits | Post /api/v1/edit/rl-domain/ | Edit domain ratelimits |
RatelimitsApi | EditMailboxRatelimits | Post /api/v1/edit/rl-mbox/ | Edit mailbox ratelimits |
RatelimitsApi | GetDomainRatelimits | Get /api/v1/get/rl-domain/{domain} | Get domain ratelimits |
RatelimitsApi | GetMailboxRatelimits | Get /api/v1/get/rl-mbox/{mailbox} | Get mailbox ratelimits |
ResourcesApi | CreateResources | Post /api/v1/add/resource | Create Resources |
ResourcesApi | DeleteResources | Post /api/v1/delete/resource | Delete Resources |
ResourcesApi | GetResources | Get /api/v1/get/resource/all | Get Resources |
RoutingApi | CreateSenderDependentTransports | Post /api/v1/add/relayhost | Create Sender-Dependent Transports |
RoutingApi | CreateTransportMaps | Post /api/v1/add/transport | Create Transport Maps |
RoutingApi | DeleteSenderDependentTransports | Post /api/v1/delete/relayhost | Delete Sender-Dependent Transports |
RoutingApi | DeleteTransportMaps | Post /api/v1/delete/transport | Delete Transport Maps |
RoutingApi | GetSenderDependentTransports | Get /api/v1/get/relayhost/{id} | Get Sender-Dependent Transports |
RoutingApi | GetTransportMaps | Get /api/v1/get/transport/{id} | Get Transport Maps |
StatusApi | GetContainerStatus | Get /api/v1/get/status/containers | Get container status |
StatusApi | GetSolrStatus | Get /api/v1/get/status/solr | Get solr status |
StatusApi | GetVersionStatus | Get /api/v1/get/status/version | Get version status |
StatusApi | GetVmailStatus | Get /api/v1/get/status/vmail | Get vmail status |
SyncJobsApi | CreateSyncJob | Post /api/v1/add/syncjob | Create sync job |
SyncJobsApi | DeleteSyncJob | Post /api/v1/delete/syncjob | Delete sync job |
SyncJobsApi | GetSyncJobs | Get /api/v1/get/syncjobs/{id} | Get sync jobs |
SyncJobsApi | UpdateSyncJob | Post /api/v1/edit/syncjob | Update sync job |
- AddForwardHostRequest
- CreateAlias401Response
- CreateAliasRequest
- CreateAppPasswordRequest
- CreateBCCMapRequest
- CreateDomainAdminUserRequest
- CreateDomainPolicyRequest
- CreateDomainRequest
- CreateMailboxRequest
- CreateOAuthClientRequest
- CreateRecipientMapRequest
- CreateResourcesRequest
- CreateSenderDependentTransportsRequest
- CreateSyncJobRequest
- CreateTLSPolicyMapRequest
- CreateTimeLimitedAlias200Response
- CreateTimeLimitedAliasRequest
- CreateTransportMapsRequest
- DeleteAliasRequest
- DeleteAppPasswordRequest
- DeleteBCCMapRequest
- DeleteDKIMKeyRequest
- DeleteDomainAdminRequest
- DeleteDomainPolicyRequest
- DeleteDomainRequest
- DeleteDomainTagsRequest
- DeleteForwardHostRequest
- DeleteMailboxRequest
- DeleteMailboxTagsRequest
- DeleteMailsInQuarantineRequest
- DeleteOAuthClientRequest
- DeleteQueueRequest
- DeleteRecipientMapRequest
- DeleteResourcesRequest
- DeleteSenderDependentTransportsRequest
- DeleteSyncJobRequest
- DeleteTLSPolicyMapRequest
- DeleteTransportMapsRequest
- DuplicateDKIMKeyRequest
- EditDomainAdminACLRequest
- EditDomainAdminACLRequestAttr
- EditDomainAdminUser200Response
- EditDomainAdminUserRequest
- EditDomainAdminUserRequestAttr
- EditDomainRatelimitsRequest
- EditFail2BanRequest
- EditFail2BanRequestAttr
- EditMailboxRatelimitsRequest
- EditMailboxRatelimitsRequestAttr
- FlushQueueRequest
- GenerateDKIMKeyRequest
- QuarantineNotificationsRequest
- QuarantineNotificationsRequestAttr
- UpdateAliasRequest
- UpdateAliasRequestAttr
- UpdateDomainRequest
- UpdateDomainRequestAttr
- UpdateMailboxACLRequest
- UpdateMailboxACLRequestAttr
- UpdateMailboxRequest
- UpdateMailboxRequestAttr
- UpdatePushoverSettingsRequest
- UpdatePushoverSettingsRequestAttr
- UpdateSyncJobRequest
- UpdateSyncJobRequestAttr
- Type: API key
- API key parameter name: X-API-Key
- Location: HTTP header
Note, each API key must be added to a map of map[string]APIKey
where the key is: X-API-Key and passed in as the auth context for each request.
Due to the fact that model structure members are all pointers, this package contains a number of utility functions to easily obtain pointers to values of basic types. Each of these functions takes a value of the given basic type and returns a pointer to it:
PtrBool
PtrInt
PtrInt32
PtrInt64
PtrFloat
PtrFloat32
PtrFloat64
PtrString
PtrTime