Skip to content

ops-center/james-go-client

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

57 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

Class Method HTTP request Description
AddressAliasAPI CreateAlias Put /address/aliases/{userAddress} Add a new alias to a user
AddressAliasAPI DeleteAlias Delete /address/aliases/{userAddress} Remove an alias from a user
AddressAliasAPI GetAlias Get /address/aliases/{userAddress} List alias sources of a user
AddressAliasAPI ListAliases Get /address/aliases List users with aliases
AddressForwardAPI AddDestination Put /address/forwards/{userAddress} Add a new destination to a forward
AddressForwardAPI DeleteDestination Delete /address/forwards/{userAddress} Remove a destination from a forward
AddressForwardAPI ListDestinations Get /address/forwards/{userAddress} List destinations in a forward
AddressForwardAPI ListForwards Get /address/forwards List address forwards
AddressGroupAPI AddMember Put /address/groups/{groupAddress} Add a group member
AddressGroupAPI ListGroups Get /address/groups List address groups
AddressGroupAPI ListMembers Get /address/groups/{groupAddress} List members of a group
AddressGroupAPI RemoveMember Delete /address/groups/{groupAddress} Remove a group member
AddressMappingAPI AddAddressMapping Post /mappings Add an address mapping
AddressMappingAPI ListAddressMappings Get /mappings List all address mappings
AddressMappingAPI RemoveAddressMapping Delete /mappings/address/{mappingSource}/targets/{destinationAddress} Remove an address mapping
CassandraExtraAPI PerformActionOnCassandraMappings Post /cassandra/mappings Perform an action on mappings_sources table
CassandraSchemaUpgradeAPI GetLatestAvailableSchemaVersion Get /cassandra/version/latest Retrieve latest available Cassandra schema version
CassandraSchemaUpgradeAPI GetSchemaVersion Get /cassandra/version Retrieve current Cassandra schema version
CassandraSchemaUpgradeAPI UpgradeSchemaVersion Post /cassandra/version/upgrade Upgrade to a specific Cassandra schema version
CassandraSchemaUpgradeAPI UpgradeToLatestSchemaVersion Post /cassandra/version/upgrade/latest Upgrade to the latest Cassandra schema version
DeletedMessageVaultAPI ExportDeletedMessages Post /deletedMessages/users/{user}/actions/export Export deleted messages for a specific user
DeletedMessageVaultAPI PurgeMessage Delete /deletedMessages/users/{user}/messages/{messageId} Permanently remove a deleted message
DeletedMessageVaultAPI PurgeMessages Delete /deletedMessages Purge all expired deleted messages
DeletedMessageVaultAPI RestoreDeletedMessages Post /deletedMessages/users/{user}/actions/restore Restore deleted messages for a specific user
DlpAPI FetchDLPConfiguration Get /dlp/rules/{senderDomain}/rules/{ruleId} Fetch a DLP configuration item by sender domain and rule id
DlpAPI ListDLPConfiguration Get /dlp/rules/{senderDomain} List DLP configuration by sender domain
DlpAPI RemoveDLPConfiguration Delete /dlp/rules/{senderDomain} Remove DLP configuration by sender domain
DlpAPI StoreDLPConfiguration Put /dlp/rules/{senderDomain} Store DLP configuration by sender domain
DomainMappingAPI AddDomainMapping Put /domainMappings Add a domain mapping
DomainMappingAPI ListDestinationDomains Get /domainMappings/{fromDomain} List all destination domains for a source domain
DomainMappingAPI ListDomainMappings Get /domainMappings List all domain mappings
DomainMappingAPI RemoveDomainMapping Delete /domainMappings Remove a domain mapping
DomainQuotaAPI DeleteDomainQuotaCount Delete /quota/domains/{domainToBeUsed}/count Delete the quota count for a domain
DomainQuotaAPI DeleteDomainQuotaSize Delete /quota/domains/{domainToBeUsed}/size Delete the quota size for a domain
DomainQuotaAPI GetDomainQuota Get /quota/domains/{domainToBeUsed} Get the quota for a domain
DomainQuotaAPI GetDomainQuotaCount Get /quota/domains/{domainToBeUsed}/count Get the quota count for a domain
DomainQuotaAPI GetDomainQuotaSize Get /quota/domains/{domainToBeUsed}/size Get the quota size for a domain
DomainQuotaAPI UpdateDomainQuota Put /quota/domains/{domainToBeUsed} Update the quota for a domain
DomainQuotaAPI UpdateDomainQuotaCount Put /quota/domains/{domainToBeUsed}/count Update the quota count for a domain
DomainQuotaAPI UpdateDomainQuotaSize Put /quota/domains/{domainToBeUsed}/size Update the quota size for a domain
DomainsAPI CreateDomain Put /domains/{domainToBeCreated} Create a domain
DomainsAPI CreateDomainAlias Put /domains/{domainName}/aliases Create an alias for a domain
DomainsAPI DeleteDomain Delete /domains/{domainToBeDeleted} Delete a domain
DomainsAPI DeleteDomainAlias Delete /domains/{domainName}/aliases Delete an alias for a domain
DomainsAPI DeleteUserDataOfDomain Post /domains/{domainToBeUsed} Delete all users data of a domain
DomainsAPI ExistsDomain Get /domains/{domainName} Test if a domain exists
DomainsAPI ListDomainAliases Get /domains/{domainName}/aliases Get the list of aliases for a domain
DomainsAPI ListDomains Get /domains Get the list of domains
EventDeadLetterAPI DeleteAllEvents Delete /events/deadLetter/groups/{groupName} Delete all events of a group
EventDeadLetterAPI DeleteEvent Delete /events/deadLetter/groups/{groupName}/{insertionId} Delete an event
EventDeadLetterAPI GetEvent Get /events/deadLetter/groups/{groupName}/{insertionId} Get event details
EventDeadLetterAPI ListFailedEvents Get /events/deadLetter/groups/{groupName} List failed events for a given group
EventDeadLetterAPI ListMailboxListenerGroups Get /events/deadLetter/groups List Mailbox Listener Groups
EventDeadLetterAPI RedeliverAllEvents Post /events/deadLetter/groups Redeliver all events
EventDeadLetterAPI RedeliverEvent Post /events/deadLetter/groups/{groupName}/{insertionId}/reDeliver Redeliver a single event
EventDeadLetterAPI RedeliverGroupEvents Post /events/deadLetter/groups/{groupName}/reDeliver Redeliver group events
GarbageCollectionAPI RunBlobGarbageCollector Delete /blobs Run blob garbage collection
GhostMailboxAPI CorrectGhostMailbox Post /cassandra/mailbox/merging Correct ghost mailbox by merging
GlobalQuotaAPI DeleteGlobalQuotaCount Delete /quota/count Delete the global quota count
GlobalQuotaAPI DeleteGlobalQuotaSize Delete /quota/size Delete the global quota size
GlobalQuotaAPI GetGlobalQuota Get /quota Get the global quota
GlobalQuotaAPI GetGlobalQuotaCount Get /quota/count Get the global quota count
GlobalQuotaAPI GetGlobalQuotaSize Get /quota/size Get the global quota size
GlobalQuotaAPI UpdateGlobalQuota Put /quota Update the global quota
GlobalQuotaAPI UpdateGlobalQuotaCount Put /quota/count Update the global quota count
GlobalQuotaAPI UpdateGlobalQuotaSize Put /quota/size Update the global quota size
HealthcheckAPI CheckAllComponents Get /healthcheck Check all components
HealthcheckAPI CheckComponent Get /healthcheck/checks/{componentName} Check single component
HealthcheckAPI ListAllHealthChecks Get /healthcheck/checks List all health checks
JmapUploadsAPI CleanUploadRepository Delete /jmap/uploads Clean upload repository
MailQueueAPI DeleteMailsOfMailQueue Delete /mailQueues/{mailQueueName}/mails Delete mails from a mail queue
MailQueueAPI FlushMailsOfMailQueue Patch /mailQueues/{mailQueueName} Flush mails from a mail queue
MailQueueAPI ListMailQueues Get /mailQueues List mail queues
MailQueueAPI ListMailsOfMailQueue Get /mailQueues/{mailQueueName}/mails List mails of a mail queue
MailQueueAPI RepublishMailQueue Post /mailQueues RabbitMQ republishing a mail queue from Cassandra
MailRepositoryAPI CreateMailRepository Put /mailRepositories/{encodedPathOfTheRepository} Create a mail repository
MailRepositoryAPI GetMailRepository Get /mailRepositories/{encodedPathOfTheRepository} Getting additional information for a mail repository
MailRepositoryAPI ListMailRepositories Get /mailRepositories Listing mail repositories
MailRepositoryAPI ListMailsInMailRepository Get /mailRepositories/{encodedPathOfTheRepository}/mails Listing mails contained in a mail repository
MailboxAPI PerformActionsOnMailboxes Post /mailboxes Perform actions on mailboxes
MailboxAPI ReindexMailbox Post /mailboxes/{mailboxId} Reindex a mailbox
MessagesAPI ReindexEmail Post /messages/{messageId} Reindex a single mail by messageId
MessagesAPI ScheduleTask Post /messages Schedule a task for fixing message inconsistencies
RegexMappingAPI AddRegexMapping Post /mappings/regex/{mappingSource}/targets/{regex} Add a regex mapping
RegexMappingAPI RemoveRegexMapping Delete /mappings/regex/{mappingSource}/targets/{regex} Remove a regex mapping
SendMailAPI SendEmail Post /mail-transfer-service Send email
SieveQuotaAPI GetUserSieveQuota Get /sieve/quota/users/{userEmail} Retrieve user sieve quota
SieveQuotaAPI RemoveUserSieveQuota Delete /sieve/quota/users/{userEmail} Remove user sieve quota
SieveQuotaAPI SieveQuotaDefaultDelete Delete /sieve/quota/default Remove global sieve quota
SieveQuotaAPI SieveQuotaDefaultGet Get /sieve/quota/default Retrieve global sieve quota
SieveQuotaAPI UpdateGlobalSieveQuota Put /sieve/quota/default Update global sieve quota
SieveQuotaAPI UpdateUserSieveQuota Put /sieve/quota/users/{userEmail} Update user sieve quota
TaskAPI AwaitTaskCompletion Get /tasks/{taskId}/await Await the completion of a task
TaskAPI CancelTask Delete /tasks/{taskId} Cancel a task
TaskAPI GetTask Get /tasks/{taskId} Get a task's details
TaskAPI ListTasks Get /tasks List tasks
UserMailboxAPI ClearMailbox Delete /users/{username}/mailboxes/{mailboxName}/messages Clear mailbox content
UserMailboxAPI CountEmails Get /users/{username}/mailboxes/{mailboxName}/messageCount Count emails in a mailbox
UserMailboxAPI CountUnseenEmails Get /users/{username}/mailboxes/{mailboxName}/unseenMessageCount Count unseen emails in a mailbox
UserMailboxAPI CreateMailbox Put /users/{username}/mailboxes/{mailboxNameToBeCreated} Create a mailbox
UserMailboxAPI DeleteMailbox Delete /users/{username}/mailboxes/INBOX.work Delete a mailbox and its children
UserMailboxAPI DeleteMailboxes Delete /users/{username}/mailboxes Delete user mailboxes
UserMailboxAPI ExistsMailbox Get /users/{username}/mailboxes/{mailboxNameToBeTested} Test existence of a mailbox
UserMailboxAPI ExportMailboxes Post /users/{username}/mailboxes?action=export Export user mailboxes
UserMailboxAPI ListMailboxes Get /users/{username}/mailboxes List user mailboxes
UserMailboxAPI RecomputeCassandraFilteringProjection Post /mailboxes?task=populateFilteringProjection Recompute Cassandra filtering projection
UserMailboxAPI RecomputeMessageViewProjection Post /users/{username}/mailboxes?task=recomputeFastViewProjectionItems Recompute User JMAP fast message view projection
UserMailboxAPI ReindexEmails Post /users/{username}/mailboxes?task=reIndex Reindex a user's mails
UserMailboxAPI SubscribeAllMailboxes Post /users/{username}/mailboxes?task=subscribeAll Subscribe a user to all of their mailboxes
UserMappingAPI ListUserMappings Get /mappings/user/{userAddress} Listing User Mappings
UserQuotaAPI DeleteQuotaCount Delete /quota/users/{username}/count Delete the quota count for a user
UserQuotaAPI DeleteQuotaSize Delete /quota/users/{username}/size Delete the quota size for a user
UserQuotaAPI GetQuota Get /quota/users/{username} Get the quota for a user
UserQuotaAPI GetQuotaCount Get /quota/users/{username}/count Get the quota count for a user
UserQuotaAPI GetQuotaSize Get /quota/users/{username}/size Get the quota size for a user
UserQuotaAPI RecomputeCurrentQuotas Post /quota/users Recompute current quotas for users
UserQuotaAPI SearchByQuota Get /quota/users Search users by quota ratio
UserQuotaAPI UpdateQuota Put /quota/users/{username} Update the quota for a user
UserQuotaAPI UpdateQuotaCount Put /quota/users/{username}/count Update the quota count for a user
UserQuotaAPI UpdateQuotaSize Put /quota/users/{username}/size Update the quota size for a user
UsersAPI AddDelegatedUser Put /users/{baseUser}/authorizedUsers/delegatedUser Add a delegated user to a base user
UsersAPI ChangeUsername Post /users/{oldUser}/rename/{newUser} Change a username
UsersAPI CreateUserIdentity Post /users/{username}/identities Create a JMAP user identity
UsersAPI DeleteUser Delete /users/{username} Delete a user
UsersAPI ExistsUser Head /users/{username} Test user existence
UsersAPI ListAllowedFromHeaders Get /users/{givenUser}/allowedFromHeaders Retrieve the list of allowed From headers for a given user
UsersAPI ListDelegatedUsers Get /users/{baseUser}/authorizedUsers Retrieve the list of delegated users of a base user
UsersAPI ListUserIdentities Get /users/{username}/identities Retrieve the user identities
UsersAPI ListUsers Get /users Retrieve the user list
UsersAPI RemoveAllDelegatedUsers Delete /users/{baseUser}/authorizedUsers Remove all delegated users of a base user
UsersAPI RemoveDelegatedUser Delete /users/{baseUser}/authorizedUsers/delegatedUser Remove a delegated user from a base user
UsersAPI UpdateUserIdentity Put /users/{username}/identities/{identityId} Update a JMAP user identity
UsersAPI UpsertUser Put /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

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published