Categorygo.opscenter.dev/james-go-client
repositorypackage
0.0.0-20241229081737-ad80d631996b
Repository: https://github.com/ops-center/james-go-client.git
Documentation: pkg.go.dev

# Packages

No description provided by the author
No description provided by the author

# README

Go API client for openapi

No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)

Overview

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: 3.8.0
  • Package version: 1.0.0
  • Build package: org.openapitools.codegen.languages.GoClientCodegen

Installation

Install the following dependencies:

go get github.com/stretchr/testify/assert
go get golang.org/x/net/context

Put the package under your project folder and add the following in import:

import openapi "go.opscenter.dev/james-go-client"

To use a proxy, set the environment variable HTTP_PROXY:

os.Setenv("HTTP_PROXY", "http://proxy_name:proxy_port")

Configuration of Server URL

Default configuration comes with Servers field that contains server objects as defined in the OpenAPI specification.

Select Server Configuration

For using other server than the one defined on index 0 set context value openapi.ContextServerIndex of type int.

ctx := context.WithValue(context.Background(), openapi.ContextServerIndex, 1)

Templated Server URL

Templated server URL is formatted using default variables from configuration or from context value openapi.ContextServerVariables of type map[string]string.

ctx := context.WithValue(context.Background(), openapi.ContextServerVariables, map[string]string{
	"basePath": "v2",
})

Note, enum values are always validated and all unused variables are silently ignored.

URLs Configuration per Operation

Each operation can use different server URL defined using OperationServers map in the Configuration. An operation is uniquely identified by "{classname}Service.{nickname}" string. Similar rules for overriding default operation server index and variables applies by using openapi.ContextOperationServerIndices and openapi.ContextOperationServerVariables context maps.

ctx := context.WithValue(context.Background(), openapi.ContextOperationServerIndices, map[string]int{
	"{classname}Service.{nickname}": 2,
})
ctx = context.WithValue(context.Background(), openapi.ContextOperationServerVariables, map[string]map[string]string{
	"{classname}Service.{nickname}": {
		"port": "8443",
	},
})

Documentation for API Endpoints

All URIs are relative to http://localhost

ClassMethodHTTP requestDescription
AddressAliasAPICreateAliasPut /address/aliases/{userAddress}Add a new alias to a user
AddressAliasAPIDeleteAliasDelete /address/aliases/{userAddress}Remove an alias from a user
AddressAliasAPIGetAliasGet /address/aliases/{userAddress}List alias sources of a user
AddressAliasAPIListAliasesGet /address/aliasesList users with aliases
AddressForwardAPIAddDestinationPut /address/forwards/{userAddress}Add a new destination to a forward
AddressForwardAPIDeleteDestinationDelete /address/forwards/{userAddress}Remove a destination from a forward
AddressForwardAPIListDestinationsGet /address/forwards/{userAddress}List destinations in a forward
AddressForwardAPIListForwardsGet /address/forwardsList address forwards
AddressGroupAPIAddMemberPut /address/groups/{groupAddress}Add a group member
AddressGroupAPIListGroupsGet /address/groupsList address groups
AddressGroupAPIListMembersGet /address/groups/{groupAddress}List members of a group
AddressGroupAPIRemoveMemberDelete /address/groups/{groupAddress}Remove a group member
AddressMappingAPIAddAddressMappingPost /mappingsAdd an address mapping
AddressMappingAPIListAddressMappingsGet /mappingsList all address mappings
AddressMappingAPIRemoveAddressMappingDelete /mappings/address/{mappingSource}/targets/{destinationAddress}Remove an address mapping
CassandraExtraAPIPerformActionOnCassandraMappingsPost /cassandra/mappingsPerform an action on mappings_sources table
CassandraSchemaUpgradeAPIGetLatestAvailableSchemaVersionGet /cassandra/version/latestRetrieve latest available Cassandra schema version
CassandraSchemaUpgradeAPIGetSchemaVersionGet /cassandra/versionRetrieve current Cassandra schema version
CassandraSchemaUpgradeAPIUpgradeSchemaVersionPost /cassandra/version/upgradeUpgrade to a specific Cassandra schema version
CassandraSchemaUpgradeAPIUpgradeToLatestSchemaVersionPost /cassandra/version/upgrade/latestUpgrade to the latest Cassandra schema version
DeletedMessageVaultAPIExportDeletedMessagesPost /deletedMessages/users/{user}/actions/exportExport deleted messages for a specific user
DeletedMessageVaultAPIPurgeMessageDelete /deletedMessages/users/{user}/messages/{messageId}Permanently remove a deleted message
DeletedMessageVaultAPIPurgeMessagesDelete /deletedMessagesPurge all expired deleted messages
DeletedMessageVaultAPIRestoreDeletedMessagesPost /deletedMessages/users/{user}/actions/restoreRestore deleted messages for a specific user
DlpAPIFetchDLPConfigurationGet /dlp/rules/{senderDomain}/rules/{ruleId}Fetch a DLP configuration item by sender domain and rule id
DlpAPIListDLPConfigurationGet /dlp/rules/{senderDomain}List DLP configuration by sender domain
DlpAPIRemoveDLPConfigurationDelete /dlp/rules/{senderDomain}Remove DLP configuration by sender domain
DlpAPIStoreDLPConfigurationPut /dlp/rules/{senderDomain}Store DLP configuration by sender domain
DomainMappingAPIAddDomainMappingPut /domainMappingsAdd a domain mapping
DomainMappingAPIListDestinationDomainsGet /domainMappings/{fromDomain}List all destination domains for a source domain
DomainMappingAPIListDomainMappingsGet /domainMappingsList all domain mappings
DomainMappingAPIRemoveDomainMappingDelete /domainMappingsRemove a domain mapping
DomainQuotaAPIDeleteDomainQuotaCountDelete /quota/domains/{domainToBeUsed}/countDelete the quota count for a domain
DomainQuotaAPIDeleteDomainQuotaSizeDelete /quota/domains/{domainToBeUsed}/sizeDelete the quota size for a domain
DomainQuotaAPIGetDomainQuotaGet /quota/domains/{domainToBeUsed}Get the quota for a domain
DomainQuotaAPIGetDomainQuotaCountGet /quota/domains/{domainToBeUsed}/countGet the quota count for a domain
DomainQuotaAPIGetDomainQuotaSizeGet /quota/domains/{domainToBeUsed}/sizeGet the quota size for a domain
DomainQuotaAPIUpdateDomainQuotaPut /quota/domains/{domainToBeUsed}Update the quota for a domain
DomainQuotaAPIUpdateDomainQuotaCountPut /quota/domains/{domainToBeUsed}/countUpdate the quota count for a domain
DomainQuotaAPIUpdateDomainQuotaSizePut /quota/domains/{domainToBeUsed}/sizeUpdate the quota size for a domain
DomainsAPICreateDomainPut /domains/{domainToBeCreated}Create a domain
DomainsAPICreateDomainAliasPut /domains/{domainName}/aliasesCreate an alias for a domain
DomainsAPIDeleteDomainDelete /domains/{domainToBeDeleted}Delete a domain
DomainsAPIDeleteDomainAliasDelete /domains/{domainName}/aliasesDelete an alias for a domain
DomainsAPIDeleteUserDataOfDomainPost /domains/{domainToBeUsed}Delete all users data of a domain
DomainsAPIExistsDomainGet /domains/{domainName}Test if a domain exists
DomainsAPIListDomainAliasesGet /domains/{domainName}/aliasesGet the list of aliases for a domain
DomainsAPIListDomainsGet /domainsGet the list of domains
EventDeadLetterAPIDeleteAllEventsDelete /events/deadLetter/groups/{groupName}Delete all events of a group
EventDeadLetterAPIDeleteEventDelete /events/deadLetter/groups/{groupName}/{insertionId}Delete an event
EventDeadLetterAPIGetEventGet /events/deadLetter/groups/{groupName}/{insertionId}Get event details
EventDeadLetterAPIListFailedEventsGet /events/deadLetter/groups/{groupName}List failed events for a given group
EventDeadLetterAPIListMailboxListenerGroupsGet /events/deadLetter/groupsList Mailbox Listener Groups
EventDeadLetterAPIRedeliverAllEventsPost /events/deadLetter/groupsRedeliver all events
EventDeadLetterAPIRedeliverEventPost /events/deadLetter/groups/{groupName}/{insertionId}/reDeliverRedeliver a single event
EventDeadLetterAPIRedeliverGroupEventsPost /events/deadLetter/groups/{groupName}/reDeliverRedeliver group events
GarbageCollectionAPIRunBlobGarbageCollectorDelete /blobsRun blob garbage collection
GhostMailboxAPICorrectGhostMailboxPost /cassandra/mailbox/mergingCorrect ghost mailbox by merging
GlobalQuotaAPIDeleteGlobalQuotaCountDelete /quota/countDelete the global quota count
GlobalQuotaAPIDeleteGlobalQuotaSizeDelete /quota/sizeDelete the global quota size
GlobalQuotaAPIGetGlobalQuotaGet /quotaGet the global quota
GlobalQuotaAPIGetGlobalQuotaCountGet /quota/countGet the global quota count
GlobalQuotaAPIGetGlobalQuotaSizeGet /quota/sizeGet the global quota size
GlobalQuotaAPIUpdateGlobalQuotaPut /quotaUpdate the global quota
GlobalQuotaAPIUpdateGlobalQuotaCountPut /quota/countUpdate the global quota count
GlobalQuotaAPIUpdateGlobalQuotaSizePut /quota/sizeUpdate the global quota size
HealthcheckAPICheckAllComponentsGet /healthcheckCheck all components
HealthcheckAPICheckComponentGet /healthcheck/checks/{componentName}Check single component
HealthcheckAPIListAllHealthChecksGet /healthcheck/checksList all health checks
JmapUploadsAPICleanUploadRepositoryDelete /jmap/uploadsClean upload repository
MailQueueAPIDeleteMailsOfMailQueueDelete /mailQueues/{mailQueueName}/mailsDelete mails from a mail queue
MailQueueAPIFlushMailsOfMailQueuePatch /mailQueues/{mailQueueName}Flush mails from a mail queue
MailQueueAPIListMailQueuesGet /mailQueuesList mail queues
MailQueueAPIListMailsOfMailQueueGet /mailQueues/{mailQueueName}/mailsList mails of a mail queue
MailQueueAPIRepublishMailQueuePost /mailQueuesRabbitMQ republishing a mail queue from Cassandra
MailRepositoryAPICreateMailRepositoryPut /mailRepositories/{encodedPathOfTheRepository}Create a mail repository
MailRepositoryAPIGetMailRepositoryGet /mailRepositories/{encodedPathOfTheRepository}Getting additional information for a mail repository
MailRepositoryAPIListMailRepositoriesGet /mailRepositoriesListing mail repositories
MailRepositoryAPIListMailsInMailRepositoryGet /mailRepositories/{encodedPathOfTheRepository}/mailsListing mails contained in a mail repository
MailboxAPIPerformActionsOnMailboxesPost /mailboxesPerform actions on mailboxes
MailboxAPIReindexMailboxPost /mailboxes/{mailboxId}Reindex a mailbox
MessagesAPIReindexEmailPost /messages/{messageId}Reindex a single mail by messageId
MessagesAPIScheduleTaskPost /messagesSchedule a task for fixing message inconsistencies
RegexMappingAPIAddRegexMappingPost /mappings/regex/{mappingSource}/targets/{regex}Add a regex mapping
RegexMappingAPIRemoveRegexMappingDelete /mappings/regex/{mappingSource}/targets/{regex}Remove a regex mapping
SendMailAPISendEmailPost /mail-transfer-serviceSend email
SieveQuotaAPIGetUserSieveQuotaGet /sieve/quota/users/{userEmail}Retrieve user sieve quota
SieveQuotaAPIRemoveUserSieveQuotaDelete /sieve/quota/users/{userEmail}Remove user sieve quota
SieveQuotaAPISieveQuotaDefaultDeleteDelete /sieve/quota/defaultRemove global sieve quota
SieveQuotaAPISieveQuotaDefaultGetGet /sieve/quota/defaultRetrieve global sieve quota
SieveQuotaAPIUpdateGlobalSieveQuotaPut /sieve/quota/defaultUpdate global sieve quota
SieveQuotaAPIUpdateUserSieveQuotaPut /sieve/quota/users/{userEmail}Update user sieve quota
TaskAPIAwaitTaskCompletionGet /tasks/{taskId}/awaitAwait the completion of a task
TaskAPICancelTaskDelete /tasks/{taskId}Cancel a task
TaskAPIGetTaskGet /tasks/{taskId}Get a task's details
TaskAPIListTasksGet /tasksList tasks
UserMailboxAPIClearMailboxDelete /users/{username}/mailboxes/{mailboxName}/messagesClear mailbox content
UserMailboxAPICountEmailsGet /users/{username}/mailboxes/{mailboxName}/messageCountCount emails in a mailbox
UserMailboxAPICountUnseenEmailsGet /users/{username}/mailboxes/{mailboxName}/unseenMessageCountCount unseen emails in a mailbox
UserMailboxAPICreateMailboxPut /users/{username}/mailboxes/{mailboxNameToBeCreated}Create a mailbox
UserMailboxAPIDeleteMailboxDelete /users/{username}/mailboxes/INBOX.workDelete a mailbox and its children
UserMailboxAPIDeleteMailboxesDelete /users/{username}/mailboxesDelete user mailboxes
UserMailboxAPIExistsMailboxGet /users/{username}/mailboxes/{mailboxNameToBeTested}Test existence of a mailbox
UserMailboxAPIExportMailboxesPost /users/{username}/mailboxes?action=exportExport user mailboxes
UserMailboxAPIListMailboxesGet /users/{username}/mailboxesList user mailboxes
UserMailboxAPIRecomputeCassandraFilteringProjectionPost /mailboxes?task=populateFilteringProjectionRecompute Cassandra filtering projection
UserMailboxAPIRecomputeMessageViewProjectionPost /users/{username}/mailboxes?task=recomputeFastViewProjectionItemsRecompute User JMAP fast message view projection
UserMailboxAPIReindexEmailsPost /users/{username}/mailboxes?task=reIndexReindex a user's mails
UserMailboxAPISubscribeAllMailboxesPost /users/{username}/mailboxes?task=subscribeAllSubscribe a user to all of their mailboxes
UserMappingAPIListUserMappingsGet /mappings/user/{userAddress}Listing User Mappings
UserQuotaAPIDeleteQuotaCountDelete /quota/users/{username}/countDelete the quota count for a user
UserQuotaAPIDeleteQuotaSizeDelete /quota/users/{username}/sizeDelete the quota size for a user
UserQuotaAPIGetQuotaGet /quota/users/{username}Get the quota for a user
UserQuotaAPIGetQuotaCountGet /quota/users/{username}/countGet the quota count for a user
UserQuotaAPIGetQuotaSizeGet /quota/users/{username}/sizeGet the quota size for a user
UserQuotaAPIRecomputeCurrentQuotasPost /quota/usersRecompute current quotas for users
UserQuotaAPISearchByQuotaGet /quota/usersSearch users by quota ratio
UserQuotaAPIUpdateQuotaPut /quota/users/{username}Update the quota for a user
UserQuotaAPIUpdateQuotaCountPut /quota/users/{username}/countUpdate the quota count for a user
UserQuotaAPIUpdateQuotaSizePut /quota/users/{username}/sizeUpdate the quota size for a user
UsersAPIAddDelegatedUserPut /users/{baseUser}/authorizedUsers/delegatedUserAdd a delegated user to a base user
UsersAPIChangeUsernamePost /users/{oldUser}/rename/{newUser}Change a username
UsersAPICreateUserIdentityPost /users/{username}/identitiesCreate a JMAP user identity
UsersAPIDeleteUserDelete /users/{username}Delete a user
UsersAPIExistsUserHead /users/{username}Test user existence
UsersAPIListAllowedFromHeadersGet /users/{givenUser}/allowedFromHeadersRetrieve the list of allowed From headers for a given user
UsersAPIListDelegatedUsersGet /users/{baseUser}/authorizedUsersRetrieve the list of delegated users of a base user
UsersAPIListUserIdentitiesGet /users/{username}/identitiesRetrieve the user identities
UsersAPIListUsersGet /usersRetrieve the user list
UsersAPIRemoveAllDelegatedUsersDelete /users/{baseUser}/authorizedUsersRemove all delegated users of a base user
UsersAPIRemoveDelegatedUserDelete /users/{baseUser}/authorizedUsers/delegatedUserRemove a delegated user from a base user
UsersAPIUpdateUserIdentityPut /users/{username}/identities/{identityId}Update a JMAP user identity
UsersAPIUpsertUserPut /users/{username}Create or Update User

Documentation For Models

Documentation For Authorization

Endpoints do not require authorization.

Documentation for Utility Methods

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

Author