webmail

package module
v0.0.7 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 4, 2021 License: MIT Imports: 8 Imported by: 0

README

Kerio Connect API

Go Reference

Overview

Client for Webmail Kerio API Connect (JSON-RPC 2.0)

Implemented all Client API for Kerio Connect methods

Installation

go get github.com/igiant/webmail

Example

package main

import (
	"fmt"
	"log"

	"github.com/igiant/webmail"
)

func main() {
	config := webmail.NewConfig("server_addr")
	conn, err := config.NewConnection()
	if err != nil {
		log.Fatal(err)
	}
	app := &webmail.ApiApplication{
		Name:    "MyApp",
		Vendor:  "Me",
		Version: "v0.0.1",
	}
	err = conn.Login("user_name", "user_password", app)
	if err != nil {
		log.Fatal(err)
	}
	defer func() {
		err = conn.Logout()
		if err != nil {
			log.Println(err)
		}
	}()
	info, err := conn.ContactsGetPersonal()
	if err != nil {
		log.Fatal(err)
	}
	fmt.Printf(
		"Name: %s\nComment: %s\n",
		info.CommonName,
		info.Comment,
	)
}

Documentation

RoadMap

  • Add tests and search errors

Documentation

Index

Constants

View Source
const (
	ErrorCodeParseError     = -32700 // Parse error. Request wasn't valid JSON. (HTTP Status 500)
	ErrorCodeInternalError  = -32603 // Internal error. (HTTP Status 500
	ErrorCodeInvalidParams  = -32602 // Invalid params. (HTTP Status 500)
	ErrorCodeMethodNotFound = -32601 // Method not found.The requested method doesn't exist. (HTTP Status 404)
	ErrorCodeInvalidRequest = -32600 // Invalid request. (Too many files uploaded.etc.) (HTTP Status 500)

	// -32099 to -32000 (Reserved for Kerio-defined server errors.)
	ErrorCodeMultiServerBackendMaintenance = -32003 ///< Error generated on client side only
	ErrorCodeTimedout                      = -32002 ///< Error generated on client side only
	ErrorCodeSessionExpired                = -32001 ///< Session expired. (HTTP Status 500)

	ErrorCodeCommunicationFailure = -1 ///< Error generated on client side only

	// 1 to 999 (Reserved)
	ErrorCodeRequestEntityTooLarge = 413 ///< The client tried to upload a file bigger than limit. (Generally any HTTP POST request, including JSON-RPC Request.)

	// 1000 to 1999 (Reserved for Kerio-common errors)
	ErrorCodeOperationFailed = 1000 ///< The command was accepted, the operation was run and returned an error.
	ErrorCodeAlreadyExists   = 1001 ///< Can't create the item, as it already exists.
	ErrorCodeNoSuchEntity    = 1002 ///< Message / folder / etc. doesn't exist.
	ErrorCodeNotPermitted    = 1003 ///< Server refused to proceed. E.g. Can't delete default folder.
	ErrorCodeAccessDenied    = 1004 ///< Insufficient privileges for the required operation.
	// 4000 to 4999 (Reserved for Connect)
	ErrorCodeDangerousOperation = 4000 ///< Operation is dangerous. Used for reporting in validation functions.
	ErrorCodePartialSuccess     = 4001 ///< Operation ended partial successful.
	ErrorCodeChangePswFailed    = 4002 ///< Failed to change your password. The new password was not accepted.

	// 4100 to 4199 (Reserved for Connect/Webmail specific)
	ErrorCodeFolderReindexing       = 4100 ///< Folder is already being reindexed. Try later.
	ErrorCodeOperationInProgress    = 4101 ///< Long lasting operation blocks perform the request. Try later.
	ErrorCodeQuotaReached           = 4102 ///< Items quota or disk size quota was reached.
	ErrorCodeSendingFailed          = 4103 ///< Failed to send email.
	ErrorCodeNoSuchFolder           = 4104 ///< Folder of given GUID doesn't exist.
	ErrorCodeOperatorSessionExpired = 4105 ///< Session to Operator expired.
)

Variables

This section is empty.

Functions

This section is empty.

Types

type ABExtension

type ABExtension struct {
	GroupId string `json:"groupId"`
	Label   string `json:"label"`
}

ABExtension - Extension of Apple Address Book

type AccountSyncKey

type AccountSyncKey struct {
	Guid      string    `json:"guid"`
	Watermark Watermark `json:"watermark"`
}

type AccountSyncKeyList

type AccountSyncKeyList []AccountSyncKey

type AddResult

type AddResult struct {
	Id           KId                `json:"id"`           // purposely not id - loginName is shown
	Success      bool               `json:"success"`      // was operation successful? if yes so id is new id for this item else errorMessage tells why it failed
	ErrorMessage LocalizableMessage `json:"errorMessage"` // contains number of recovered user messages or error message
}

AddResult - Result of the add operation

type AddResultList

type AddResultList []AddResult

AddResultList - list of add operation results

type Alarm

type Alarm struct {
	Type         ItemType    `json:"type"`         // [READ-ONLY] only 'Calendar' and 'Task' are valid
	ItemId       KId         `json:"itemId"`       // [READ-ONLY] global identification of occurrence
	BaseId       KId         `json:"baseId"`       // [READ-ONLY] global identification of event or task
	Summary      string      `json:"summary"`      // [READ-ONLY]
	Location     string      `json:"location"`     // [READ-ONLY]
	Start        UtcDateTime `json:"start"`        // [READ-ONLY] can be empty in case of item 'Task'
	End          UtcDateTime `json:"end"`          // [READ-ONLY] can be empty in case of item 'Task'. In case of an all day event is there begin of next day.
	Due          UtcDateTime `json:"due"`          // [READ-ONLY] can be empty and is valid only for item 'Task'.
	IsAllDay     bool        `json:"isAllDay"`     // [READ-ONLY]
	ReminderTime UtcDateTime `json:"reminderTime"` // time when remainder should appear
}

type AlarmList

type AlarmList []Alarm

type ApiApplication

type ApiApplication struct {
	Name    string `json:"name"`    // E.g. "Simple server monitor"
	Vendor  string `json:"vendor"`  // E.g. "MyScript Ltd."
	Version string `json:"version"` // E.g. "1.0.0 beta 1"
}

ApiApplication - Describes client (third-party) application or script which uses the Administration API.

func NewApplication

func NewApplication(name, vendor, version string) *ApiApplication

NewApplication returns a pointer to structure with application data

type Attachment

type Attachment struct {
	Id          string `json:"id"`          // origin ID of attachment or ID from upload response
	Url         string `json:"url"`         // [READ-ONLY] Relative URL from root of web. Eg.: /webmail/api/download/attachment/ba5767a9-7a70-4c90-a6bf-dc8dd62e259c/14/0-1-0-1/picture.jpg
	Name        string `json:"name"`        // [WRITE-ONCE] Filename. Can be empty if attachment is inline.
	ContentType string `json:"contentType"` // [WRITE-ONCE]
	ContentId   string `json:"contentId"`   // [WRITE-ONCE] Inline attachment parameter. URI is used in format cid:contentId in HTML parts.
	Size        int    `json:"size"`        // [READ-ONLY]
}

type AttachmentList

type AttachmentList []Attachment

AttachmentList - array of mail attachment

type Attendee

type Attendee struct {
	DisplayName  string       `json:"displayName"`
	EmailAddress string       `json:"emailAddress"` // [REQUIRED]
	Role         AttendeeRole `json:"role"`         // [REQUIRED]
	IsNotified   bool         `json:"isNotified"`   // [READ-ONLY] is Attendee notified by email on event update? also known as RSVP
	PartStatus   PartStatus   `json:"partStatus"`   // [READ-ONLY] A participation status for the event*/
}

type AttendeeList

type AttendeeList []Attendee

type AttendeeRole

type AttendeeRole string

AttendeeRole - Purposly merged role and type to avoid useless combinations like optional room

const (
	RoleOrganizer        AttendeeRole = "RoleOrganizer"
	RoleRequiredAttendee AttendeeRole = "RoleRequiredAttendee"
	RoleOptionalAttendee AttendeeRole = "RoleOptionalAttendee"
	RoleRoom             AttendeeRole = "RoleRoom"
	RoleEquipment        AttendeeRole = "RoleEquipment"
)

type ByteUnits

type ByteUnits string

ByteUnits - See also userinfo.idl: enum UserValueUnits.

const (
	Bytes     ByteUnits = "Bytes"
	KiloBytes ByteUnits = "KiloBytes"
	MegaBytes ByteUnits = "MegaBytes"
	GigaBytes ByteUnits = "GigaBytes"
	TeraBytes ByteUnits = "TeraBytes"
	PetaBytes ByteUnits = "PetaBytes"
)

type ByteValueWithUnits

type ByteValueWithUnits struct {
	Value int       `json:"value"`
	Units ByteUnits `json:"units"`
}

ByteValueWithUnits - Note: all fields must be assigned if used in set methods

type CertStoreStatus

type CertStoreStatus string
const (
	Uninitialized CertStoreStatus = "Uninitialized" // The user has not personal certificate store initialized yet.
	Opened        CertStoreStatus = "Opened"        // The personal certificate store is not opened. The mails are automatically decrypted. Signing and encrypting is possible.
	Closed        CertStoreStatus = "Closed"        // The personal certificate store is closed.
	FailedToOpen  CertStoreStatus = "FailedToOpen"  // Failed to open it during login in. Valid only if the user uses the login password for the personal certificate store.
)

type Certificate

type Certificate struct {
	Id        KId         `json:"id"`
	Subject   NameEntry   `json:"subject"`
	Issuer    NameEntry   `json:"issuer"`
	ValidFrom UtcDateTime `json:"validFrom"`
	ValidTo   UtcDateTime `json:"validTo"`
	Serial    string      `json:"serial"`
	Validity  Validity    `json:"validity"`
}

type CertificateList

type CertificateList []Certificate

type Change

type Change struct {
	IsFolder      bool       `json:"isFolder"`
	Type          ChangeType `json:"type"`
	ItemType      ItemType   `json:"itemType"`
	ItemId        KId        `json:"itemId"`
	ParentId      KId        `json:"parentId"`
	OrigId        KId        `json:"origId"`
	OrigParentId  KId        `json:"origParentId"`
	Watermark     Watermark  `json:"watermark"`
	MessageUnread int        `json:"messageUnread"` // when type is chtModifiedContent, it contains number of unreaded messages; when type is chtReadFlagChanged, it contains 1 if a message is unreaded
}

type ChangeList

type ChangeList []Change

type ChangeType

type ChangeType string

type ClientConnection

type ClientConnection struct {
	Config *Config
	Token  *string
	// contains filtered or unexported fields
}

func (*ClientConnection) AlarmsDismiss

func (c *ClientConnection) AlarmsDismiss(itemIds KIdList) (ErrorList, error)

AlarmsDismiss - the method then a reminder will be removed as well as this value.

itemIds - list of event or occurrence IDs

Return

errors - list of errors

func (*ClientConnection) AlarmsGet

func (c *ClientConnection) AlarmsGet(since UtcTime, until UtcTime) (AlarmList, error)

AlarmsGet - Get alarms. Alarms are searched in range from now to value 'until'.

since - lower bound of time range
until - upper bound of time range

Return

list - list of alarms

func (*ClientConnection) AlarmsSet

func (c *ClientConnection) AlarmsSet(nextTime UtcTime, itemIds KIdList) (ErrorList, error)

AlarmsSet - Value is placed in X-NEXT-ALARM property.

nextTime - time
itemIds - list of event or occurrence IDs

Return

errors - list of errors

func (*ClientConnection) CallManagerDial

func (c *ClientConnection) CallManagerDial(extensionId KId, phoneNumber string) (*KId, error)

CallManagerDial - Dials requested phone number

extensionId - is phone number from which will be call initiated
phoneNumber - is phone number to call

Return

callId - returns id of phone call

func (*ClientConnection) CallManagerGetCallStatus

func (c *ClientConnection) CallManagerGetCallStatus(lastStatus OperatorCallStatus, callId KId) (*OperatorCallStatus, error)

CallManagerGetCallStatus - Dials requested phone number

func (*ClientConnection) CallManagerGetExtensions

func (c *ClientConnection) CallManagerGetExtensions() (OperatorExtensionList, error)

CallManagerGetExtensions - empty extensions = no extension available Return

extensions

func (*ClientConnection) CallManagerHangup

func (c *ClientConnection) CallManagerHangup(callId KId) error

CallManagerHangup - Dials requested phone number

func (*ClientConnection) CallManagerLogin

func (c *ClientConnection) CallManagerLogin(userName string, password string) error

CallManagerLogin - Dials requested phone number

userName - user login name
password - user password

func (*ClientConnection) CallRaw

func (c *ClientConnection) CallRaw(method string, params interface{}) ([]byte, error)

func (*ClientConnection) CertificatesChangePassword

func (c *ClientConnection) CertificatesChangePassword(oldPassword string, newPassword string, isLoginPassword bool) error

CertificatesChangePassword - Preferred flag is removed from other certificates issued for the same email address.

func (*ClientConnection) CertificatesClose

func (c *ClientConnection) CertificatesClose() error

CertificatesClose - Close the personal certificate store

func (*ClientConnection) CertificatesCloseEdit

func (c *ClientConnection) CertificatesCloseEdit() error

CertificatesCloseEdit - Lock edit functions

func (*ClientConnection) CertificatesExportPKCS12

func (c *ClientConnection) CertificatesExportPKCS12(newPassword string, id KId) (*Download, error)

CertificatesExportPKCS12 - Note: "export" is a keyword in C++, so the name of the method must be changed: exportPrivateKey

id - ID of the certificate

Return

fileDownload - description of the output file

func (*ClientConnection) CertificatesGet

func (c *ClientConnection) CertificatesGet() (CertificateList, error)

CertificatesGet - Obtain a list of certificates Return

certificates - current list of certificates

func (*ClientConnection) CertificatesGetById

func (c *ClientConnection) CertificatesGetById(id KId) (*Certificate, error)

CertificatesGetById - Obtain particular certificate Return

certificate - a certificate
certificate - global identifier

func (*ClientConnection) CertificatesGetStatus

func (c *ClientConnection) CertificatesGetStatus() (*CertStoreStatus, error)

CertificatesGetStatus - Obtain a list of certificates

func (*ClientConnection) CertificatesImportPKCS12

func (c *ClientConnection) CertificatesImportPKCS12(fileId KId, password string) error

CertificatesImportPKCS12 - Preferred flag is removed from other certificates issued for the same email address.

func (*ClientConnection) CertificatesInit

func (c *ClientConnection) CertificatesInit(password string, isLoginPassword bool) error

CertificatesInit - Initialize the personal certificate store

password - password of certificate store
isLoginPassword - given password is the same which user uses to log in

func (*ClientConnection) CertificatesOpen

func (c *ClientConnection) CertificatesOpen(password string) error

CertificatesOpen - Open the personal certificate store

password - password of certificate store

func (*ClientConnection) CertificatesOpenEdit

func (c *ClientConnection) CertificatesOpenEdit(password string) error

CertificatesOpenEdit - Unlock edit functions

password - password of certificate store

func (*ClientConnection) CertificatesOpenEditWithOldLoginPassword

func (c *ClientConnection) CertificatesOpenEditWithOldLoginPassword(oldPassword string) error

CertificatesOpenEditWithOldLoginPassword - Calling is valid only if login password is used as well for certificate store.

func (*ClientConnection) CertificatesOpenWithOldLoginPassword

func (c *ClientConnection) CertificatesOpenWithOldLoginPassword(oldPassword string) error

CertificatesOpenWithOldLoginPassword - Calling is valid only if login password is used as well for certificate store.

oldPassword - password to certificate store (old login password)

func (*ClientConnection) CertificatesRemove

func (c *ClientConnection) CertificatesRemove(id KId) error

CertificatesRemove - Note: "export" is a keyword in C++, so the name of the method must be changed: exportPrivateKey

func (*ClientConnection) CertificatesReset

func (c *ClientConnection) CertificatesReset(loginPassword string) error

CertificatesReset - Reset personal certificate store to uninitialized state. All current store will be removed!

loginPassword - current login password to verify user)

func (*ClientConnection) CertificatesSetPreferred

func (c *ClientConnection) CertificatesSetPreferred(id KId) error

CertificatesSetPreferred - Preferred flag is removed from other certificates issued for the same email address.

id - ID of the certificate

func (*ClientConnection) CertificatesToSource

func (c *ClientConnection) CertificatesToSource(id KId) (string, error)

CertificatesToSource - Obtain source (plain-text representation) of the certificate

id - global identifier

Return

source - certificate in plain text

func (*ClientConnection) ChangesGet

func (c *ClientConnection) ChangesGet(lastSyncKey SyncKey, timeout int) (ChangeList, *SyncKey, error)

ChangesGet - Is permitted only one long-poll request with the same 'lastSyncKey'.

lastSyncKey - last watermark
timeout - max time to wait for new changes. If value is zero response is returned imediately.

Return

list - all found changes
syncKey - new watermark

func (*ClientConnection) ChangesGetAccount

func (c *ClientConnection) ChangesGetAccount(lastAsyncKey AccountSyncKey, folderIds KIdList) (ChangeList, *AccountSyncKey, error)

ChangesGetAccount - Get changes for all accessible folders of particular user or resource.

lastAsyncKey - last watermark
folderIds - IDs of subcribed folders

Return

list - all found changes
asyncKey - new watermark

func (*ClientConnection) ChangesGetAccountSyncKey

func (c *ClientConnection) ChangesGetAccountSyncKey(mailboxId KId) (*AccountSyncKey, error)

ChangesGetAccountSyncKey - Get actual watermark.

func (*ClientConnection) ChangesGetFolder

func (c *ClientConnection) ChangesGetFolder(folderId KId, lastSyncKey Watermark) (ChangeList, *Watermark, error)

ChangesGetFolder - Get changes in a folder.

folderId - folder from which we want get item changes
lastSyncKey - last synckey (watermark)

Return

list - all found changes
syncKey - new last synckey (watermark)

func (*ClientConnection) ChangesGetFolderSyncKey

func (c *ClientConnection) ChangesGetFolderSyncKey(folderId KId) (*Watermark, error)

ChangesGetFolderSyncKey - Get actual sync key for a folder.

folderId - wanted folder

Return

syncKey - actual synckey (watermark) for folder

func (*ClientConnection) ChangesGetSyncKey

func (c *ClientConnection) ChangesGetSyncKey() (*SyncKey, error)

ChangesGetSyncKey - Get actual watermark.

func (*ClientConnection) ChangesKillRequest

func (c *ClientConnection) ChangesKillRequest(lastSyncKey SyncKey) error

ChangesKillRequest - Kill current running Changes.get's request. It supposed that timeout was specified > 0.

lastSyncKey - last watermark

func (*ClientConnection) ContactsCopy

func (c *ClientConnection) ContactsCopy(ids KIdList, folder KId) (ErrorList, CreateResultList, error)

ContactsCopy - Copy existing contacts to folder

ids - list of global identifiers of contacts to be copied
folder - target folder

Return

errors - error message list

func (*ClientConnection) ContactsCreate

func (c *ClientConnection) ContactsCreate(contacts ContactList) (ErrorList, CreateResultList, error)

ContactsCreate - Create contact in particular folder

contacts - new contacts; Field 'folderId' must be set.

Return

errors - error message list
result - list of ID of crated contacts

func (*ClientConnection) ContactsGet

func (c *ClientConnection) ContactsGet(folderIds KIdList, query SearchQuery) (ContactList, int, error)

ContactsGet - Get a list of contacts.

folderIds - list of global identifiers of folders to be listed.
query - query attributes and limits

Return

	list - all found contacts
 totalItems - number of contacts found if there is no limit

func (*ClientConnection) ContactsGetById

func (c *ClientConnection) ContactsGetById(ids KIdList) (ErrorList, ContactList, error)

ContactsGetById - Get particular contacts. All members of struct Contact are filed in response.

ids - global identifiers of contact.

Return

errors - list of errors which happened
result - contacts of given IDs. All members of struct are returned.

func (*ClientConnection) ContactsGetByIdFromCache

func (c *ClientConnection) ContactsGetByIdFromCache(ids KIdList) (ErrorList, ContactList, error)

ContactsGetByIdFromCache - id, folderId, watermark, type, commonName, titleAfter, titleBefore, firstName, middleName, surName, nickName, emailAddresses, phoneNumbers, photo

ids - global identifiers of contact.

Return

errors - list of errors which happened
result - contacts of given IDs.

func (*ClientConnection) ContactsGetCertificate

func (c *ClientConnection) ContactsGetCertificate(email string, id KId) (*Certificate, error)

ContactsGetCertificate - Get a certificate for given email address.

email - email address of requested certificate
id - global identifier of contacts to be searched

Return

cert - found certificate

func (*ClientConnection) ContactsGetFromAttachment

func (c *ClientConnection) ContactsGetFromAttachment(id KId) (*Contact, error)

ContactsGetFromAttachment - Get contact from attachment.

id - global identifiers of mail attachment.

Return

result - contact of given IDs. All members of struct are returned.

func (*ClientConnection) ContactsGetFromCache

func (c *ClientConnection) ContactsGetFromCache(folderIds KIdList, query SearchQuery) (ContactList, int, error)

ContactsGetFromCache - id, folderId, watermark, type, commonName, titleAfter, titleBefore, firstName, middleName, surName, nickName, emailAddresses, phoneNumbers, photo

folderIds - list of global identifiers of folders to be listed.
query - query attributes and limits

Return

	list - all found contacts
 totalItems - number of contacts found if there is no limit

func (*ClientConnection) ContactsGetPersonal

func (c *ClientConnection) ContactsGetPersonal() (*PersonalContact, error)

ContactsGetPersonal - Get personal user contact

func (*ClientConnection) ContactsGetResources

func (c *ClientConnection) ContactsGetResources(query SearchQuery) (ResourceList, int, error)

ContactsGetResources - Get a list of resources that an user can schedule.

query - query attributes and limits (empty query obtain all resources)

Return

	list - all found resources
 totalItems - number of resources found if there is no limit

func (*ClientConnection) ContactsMove

func (c *ClientConnection) ContactsMove(ids KIdList, folder KId) (ErrorList, CreateResultList, error)

ContactsMove - Move existing contacts to folder

ids - list of global identifiers of contacts to be moved
folder - target folder

Return

errors - error message list

func (*ClientConnection) ContactsRemove

func (c *ClientConnection) ContactsRemove(ids KIdList) (ErrorList, error)

ContactsRemove - Remove a list of contacts.

ids - list of global identifiers of contacts to be removed

Return

errors - list of contacts that failed to remove

func (*ClientConnection) ContactsSet

func (c *ClientConnection) ContactsSet(contacts ContactList) (ErrorList, SetResultList, error)

ContactsSet - Set existing contacts.

contacts - modifications of contacts. Field 'folderId' must be set.

Return

errors - error message list

func (*ClientConnection) ContactsSetPersonal

func (c *ClientConnection) ContactsSetPersonal(contact PersonalContact) error

ContactsSetPersonal - Set personal user contact

func (*ClientConnection) DelegationGet

func (c *ClientConnection) DelegationGet() (OutboundDelagationList, error)

DelegationGet - Get list of accounts which the user set for delegation. Return

list - delegates

func (*ClientConnection) DelegationGetInbound

func (c *ClientConnection) DelegationGetInbound() (InboundDelegationList, error)

DelegationGetInbound - Get list of accounts whom is the user delegate. Return

list - delegates

func (*ClientConnection) DelegationSet

func (c *ClientConnection) DelegationSet(list OutboundDelagationList) error

DelegationSet - Set list of accounts for delegation.

list - delegates; Only type 'User' is valid.

func (*ClientConnection) DelegationSetInbound

func (c *ClientConnection) DelegationSetInbound(list InboundDelegationList) error

DelegationSetInbound - Set list of accounts whom is the user delegate.

list - delegates

func (*ClientConnection) EventsCopy

func (c *ClientConnection) EventsCopy(ids KIdList, folder KId) (ErrorList, CreateResultList, error)

EventsCopy - Copy existing events to folder

ids - list of global identifiers of events to be copied
folder - target folder

Return

errors - error message list

func (*ClientConnection) EventsCreate

func (c *ClientConnection) EventsCreate(events EventList) (ErrorList, CreateResultList, error)

EventsCreate - Create events.

events - list of events to be created

Return

errors - list of events that failed on creation
result - particular results for all items

func (*ClientConnection) EventsCreateFromAttachment

func (c *ClientConnection) EventsCreateFromAttachment(attachmentId KId) (*CreateResult, error)

EventsCreateFromAttachment - Get an occurrence.

attachmentId - global identifier of attachment

Return

result - result

func (*ClientConnection) EventsGet

func (c *ClientConnection) EventsGet(ids KIdList, query SearchQuery) (EventList, int, error)

EventsGet - Get a list of events.

query - query attributes and limits

Return

	list - all found events
 totalItems - number of events found if there is no limit

func (*ClientConnection) EventsGetById

func (c *ClientConnection) EventsGetById(id KId) (*Event, error)

EventsGetById - Get an event.

id - global identifier of requested event

Return

result - found event

func (*ClientConnection) EventsGetEventUpdateList

func (c *ClientConnection) EventsGetEventUpdateList() (EventUpdateList, error)

EventsGetEventUpdateList - Get all updates or invitations from Calendar INBOX. Return

eventUpdates - list of updates or invitattions

func (*ClientConnection) EventsGetEventUpdates

func (c *ClientConnection) EventsGetEventUpdates(ids KIdList) (ErrorList, EventUpdateList, error)

EventsGetEventUpdates - Get updates or invitations from Calendar INBOX by global identifiers.

ids - list of global identifiers of EventUpdates

Return

errors - list of updates that failed to optain
eventUpdates - list of updates or invitattions

func (*ClientConnection) EventsGetSharedEventUpdateList

func (c *ClientConnection) EventsGetSharedEventUpdateList(mailboxIds KIdList) (ErrorList, EventUpdateList, error)

EventsGetSharedEventUpdateList - Get all updates or invitations from Calendar INBOX.

mailboxIds - list of global identifiers of mailboxes

Return

errors - list of mailboxes that failed to search
eventUpdates - list of updates or invitattions

func (*ClientConnection) EventsMove

func (c *ClientConnection) EventsMove(ids KIdList, folder KId) (ErrorList, CreateResultList, error)

EventsMove - Move existing events to folder

ids - list of global identifiers of events to be moved
folder - target folder

Return

errors - error message list

func (*ClientConnection) EventsRemove

func (c *ClientConnection) EventsRemove(ids KIdList) (ErrorList, error)

EventsRemove - Remove a list of events.

ids - list of global identifiers of events to be removed

Return

errors - list of events that failed to remove

func (*ClientConnection) EventsRemoveEventUpdates

func (c *ClientConnection) EventsRemoveEventUpdates(ids KIdList) (ErrorList, error)

EventsRemoveEventUpdates - Remove a list of EventUpdates.

ids - list of global identifiers of EventUpdates to be removed

Return

errors - list of updates that failed to remove

func (*ClientConnection) EventsSet

func (c *ClientConnection) EventsSet(events EventList) (ErrorList, SetResultList, error)

EventsSet - Set events.

events - modifications of events.

Return

errors - error message list

func (*ClientConnection) FiltersGenerateRule

func (c *ClientConnection) FiltersGenerateRule(pattern FilterRule) (*FilterRawRule, error)

FiltersGenerateRule - Obtain rule in a script form generated from pattern.

pattern - structured rule

Return

rule - the script

func (*ClientConnection) FiltersGet

func (c *ClientConnection) FiltersGet() (uint64, FilterRuleList, error)

FiltersGet - by user Return

dataStamp - server as concurrent modification protection
filters - list of all messages filtering rules defined

func (*ClientConnection) FiltersGetById

func (c *ClientConnection) FiltersGetById(currentDataStamp uint64, id KId) (*FilterRawRule, error)

FiltersGetById - Obtain particular rule in a script form.

currentDataStamp - the stamp obtained via function get
id - ID of rule

Return

rule - the script

func (*ClientConnection) FiltersSet

func (c *ClientConnection) FiltersSet(currentDataStamp uint64, filters FilterRuleList) (uint64, error)

FiltersSet - by user

currentDataStamp - the stamp which was assigned to you by
filters - list of all messages filtering rules defined

Return

newDataStamp - a new stamp that replaces your current

func (*ClientConnection) FiltersSetById

func (c *ClientConnection) FiltersSetById(currentDataStamp uint64, rule FilterRawRule) (uint64, error)

FiltersSetById - Set particular rule.

currentDataStamp - the stamp obtained via function get
rule - the new script

Return

newDataStamp - a new stamp

func (*ClientConnection) FoldersClearToItemId

func (c *ClientConnection) FoldersClearToItemId(itemId KId) error

FoldersClearToItemId - Remove all items in folder older then given item ID including. If folder is type of 'FMail' the items are moved to Delete Items or throw away if folder is Delete Items.

itemId - the last item ID

func (*ClientConnection) FoldersCopyAllMessages

func (c *ClientConnection) FoldersCopyAllMessages(sourceId KId, destId KId, doMove bool) error

FoldersCopyAllMessages - Copies (or moves) all messages from the source folder to the destination

sourceId - ID of the source folder
destId - ID of the destionation folder
doMove - if true move the messages instead of copy the

func (*ClientConnection) FoldersCreate

func (c *ClientConnection) FoldersCreate(folders FolderList) (ErrorList, CreateResultList, error)

FoldersCreate - Create new folders

folders - list of folders to create

Return

errors - error message list
result - list of ID of crated folders.

func (*ClientConnection) FoldersGet

func (c *ClientConnection) FoldersGet() (FolderList, error)

FoldersGet - Obtain list of folders of currently logged user Return

list - list of folders

func (*ClientConnection) FoldersGetAutoCompleteContactsFolderId

func (c *ClientConnection) FoldersGetAutoCompleteContactsFolderId() (*KId, error)

FoldersGetAutoCompleteContactsFolderId - Obtain ID of special folder for auto-complete contacts Return

folderId - ID of special folder

func (*ClientConnection) FoldersGetPermissions

func (c *ClientConnection) FoldersGetPermissions(folderId KId) (FolderPermissionList, error)

FoldersGetPermissions - Get sharing permissions

folderId - ID of folder

Return

permissions - sharing settings

func (*ClientConnection) FoldersGetPublic

func (c *ClientConnection) FoldersGetPublic() (FolderList, error)

FoldersGetPublic - Obtain list of public folders which currently logged user can access Return

list - list of public folders

func (*ClientConnection) FoldersGetShared

func (c *ClientConnection) FoldersGetShared(mailboxId KId) (FolderList, error)

FoldersGetShared - Obtain list of folders which currently logged user can access Return

list - list of folders

func (*ClientConnection) FoldersGetSharedMailboxList

func (c *ClientConnection) FoldersGetSharedMailboxList() (SharedMailboxList, error)

FoldersGetSharedMailboxList - Obtain list of mailboxes with their folders which currently logged user can access Return

mailboxes - list of mailboxes with their folders

func (*ClientConnection) FoldersGetSubscribed

func (c *ClientConnection) FoldersGetSubscribed() (SharedMailboxList, error)

FoldersGetSubscribed - Obtain list of folders acording SubscriptionList. Return

list - list of folders

func (*ClientConnection) FoldersGetSubscriptionList

func (c *ClientConnection) FoldersGetSubscriptionList() (KIdList, error)

FoldersGetSubscriptionList - Get list of subscribed folders

func (*ClientConnection) FoldersMoveByType

func (c *ClientConnection) FoldersMoveByType(targetId KId, ids KIdList) (ErrorList, error)

FoldersMoveByType - Take a note that mail folders are moved recursively (the whole subtree)! Folders of other types (e.g. calendars) are not moved recursively.

targetId - target folder ID
ids - folder IDs

Return

errors - error message list

func (*ClientConnection) FoldersRemove

func (c *ClientConnection) FoldersRemove(ids KIdList, recursive bool) (ErrorList, error)

FoldersRemove - Remove folder. Sub-folders are removed if recursive is true.

ids - folder IDs
recursive - remove sub-folders

Return

errors - error message list

func (*ClientConnection) FoldersRemoveByType

func (c *ClientConnection) FoldersRemoveByType(ids KIdList) (ErrorList, error)

FoldersRemoveByType - Take a note that mail folders are removed recursively! Folders of other types (e.g. calendars) are not removed recursively.

ids - folder IDs

Return

errors - error message list

func (*ClientConnection) FoldersSet

func (c *ClientConnection) FoldersSet(folders FolderList) (ErrorList, error)

FoldersSet - Set folder properties

folders - properties to save

Return

errors - error message list

func (*ClientConnection) FoldersSetPermissions

func (c *ClientConnection) FoldersSetPermissions(permissions FolderPermissionList, folderId KId, recursive bool) error

FoldersSetPermissions - Set sharing permissions

permissions - sharing settings
folderId - ID of folder

func (*ClientConnection) FoldersSetSubscriptionList

func (c *ClientConnection) FoldersSetSubscriptionList(folderIds KIdList) error

FoldersSetSubscriptionList - Set list of subscribed folders

func (*ClientConnection) FreeBusyGet

func (c *ClientConnection) FreeBusyGet(userAddresses StringList, start UtcDateTime, end UtcDateTime) (FreeBusyList, error)

FreeBusyGet - Free status is not being inserted into the result lists. Empty FreeBusySequence means the user is free for whole the interval.

func (*ClientConnection) IntegrationGetASyncFolderList

func (c *ClientConnection) IntegrationGetASyncFolderList() (SyncFolderList, error)

IntegrationGetASyncFolderList - Obtain list of folders of currently logged user Return

list - list of folders

func (*ClientConnection) IntegrationGetIPhoneSyncFolderList

func (c *ClientConnection) IntegrationGetIPhoneSyncFolderList() (SyncFolderList, error)

IntegrationGetIPhoneSyncFolderList - Obtain list of folders of currently logged user (task and calendars only) Return

list - list of folders

func (*ClientConnection) IntegrationSetASyncFolderList

func (c *ClientConnection) IntegrationSetASyncFolderList(folders SyncFolderList) (ErrorList, error)

IntegrationSetASyncFolderList - Set folder properties

folders - properties to save

Return

errors - error message list

func (*ClientConnection) IntegrationSetIPhoneSyncFolderList

func (c *ClientConnection) IntegrationSetIPhoneSyncFolderList(folders SyncFolderList) (ErrorList, error)

IntegrationSetIPhoneSyncFolderList - Set folder properties (task and calendars only)

folders - properties to save

Return

errors - error message list

func (*ClientConnection) Login

func (c *ClientConnection) Login(userName string, password string, app *ApiApplication) error

Login - create connection to api server and get security token.

userName
password
application - application descriminator, note that with session to admin you cannot log in webmail

func (*ClientConnection) Logout

func (c *ClientConnection) Logout() error

Logout - [KLogoutMethod]

func (*ClientConnection) MailsCopy

func (c *ClientConnection) MailsCopy(ids KIdList, folder KId) (ErrorList, CreateResultList, error)

MailsCopy - Copy existing e-mails to folder

ids - list of global identifiers of mails to be copied
folder - target folder

Return

errors - error message list

func (*ClientConnection) MailsCreate

func (c *ClientConnection) MailsCreate(mails MailList) (ErrorList, CreateResultList, error)

MailsCreate - ErrorCodeSendingFailed - Failed to send email and failed to create mail.

mails - new mails.

Return

errors - error message list
result - list of ID of crated mails.

func (*ClientConnection) MailsExportAttachments

func (c *ClientConnection) MailsExportAttachments(attachmentIds KIdList) (*Download, error)

MailsExportAttachments - Export attachments from mail and pack them into zip.

attachmentIds - list of global identifiers of attachments. All attachments must be from the same e-mail.

Return

fileDownload - description of output file

func (*ClientConnection) MailsGet

func (c *ClientConnection) MailsGet(folderIds KIdList, query SearchQuery) (MailList, int, error)

MailsGet - Get a list of e-mails.

folderIds - list of global identifiers of folders to be listed.
query - query attributes and limits

Return

	list - all found e-mails
 totalItems - number of mails found if there is no limit

func (*ClientConnection) MailsGetById

func (c *ClientConnection) MailsGetById(ids KIdList) (ErrorList, MailList, error)

MailsGetById - Get one particular email. All members of struct Mail are filed in response.

ids - global identifiers of requested emails

Return

errors - list of email that failed to obtain
result - found emails

func (*ClientConnection) MailsGetPageWithId

func (c *ClientConnection) MailsGetPageWithId(folderIds KIdList, query SearchQuery, id KId) (MailList, int, int, error)

MailsGetPageWithId - Get a list of e-mails.

folderIds - list of global identifiers of folders to be listed
query - query attributes and limits. Mind that offset is not used
id - global identifier of requested email

Return

	list - all found e-mails
 totalItems - number of mails found if there is no limit

func (*ClientConnection) MailsMove

func (c *ClientConnection) MailsMove(ids KIdList, folder KId) (ErrorList, CreateResultList, error)

MailsMove - Move existing e-mails to folder

ids - list of global identifiers of e-mails to be moved
folder - target folder

Return

errors - error message list

func (*ClientConnection) MailsRemove

func (c *ClientConnection) MailsRemove(ids KIdList) (ErrorList, error)

MailsRemove - Remove a list of mails.

ids - list of global identifiers of mails to be removed

Return

errors - list of mails that failed to remove

func (*ClientConnection) MailsSet

func (c *ClientConnection) MailsSet(mails MailList) (ErrorList, SetResultList, error)

MailsSet - ErrorCodeSendingFailed - Failed to send email and failed to update mail.

mails - modifications of mails.

Return

errors - error message list

func (*ClientConnection) MailsSetAllSeen

func (c *ClientConnection) MailsSetAllSeen(folderId KId) error

MailsSetAllSeen - Set all e-mail in folder as seen.

folderId - target folder

func (*ClientConnection) MultiServerAppendRemoteItem

func (c *ClientConnection) MultiServerAppendRemoteItem(items RemoteItem, folderId KId) (*CreateResult, error)

MultiServerAppendRemoteItem -

func (*ClientConnection) MultiServerAppendRemoteItems

func (c *ClientConnection) MultiServerAppendRemoteItems(items RemoteItemList, folderId KId) (ErrorList, CreateResultList, error)

MultiServerAppendRemoteItems -

func (*ClientConnection) MultiServerGetCertificates

func (c *ClientConnection) MultiServerGetCertificates(emails EMailList) (ErrorList, EmailCertificateList, error)

MultiServerGetCertificates -

func (*ClientConnection) NotesCopy

func (c *ClientConnection) NotesCopy(ids KIdList, folder KId) (ErrorList, CreateResultList, error)

NotesCopy - Copy existing notes to folder

ids - list of global identifiers of notes to be copied
folder - target folder

Return

errors - error message list

func (*ClientConnection) NotesCreate

func (c *ClientConnection) NotesCreate(notes NoteList) (ErrorList, CreateResultList, error)

NotesCreate - Create notes.

notes - list of notes to be created

Return

errors - list of notes that failed on creation
result - particular results for all items

func (*ClientConnection) NotesGet

func (c *ClientConnection) NotesGet(folderIds KIdList, query SearchQuery) (NoteList, int, error)

NotesGet - Get a list of notes.

folderIds - list of global identifiers of folders to be listed.
query - query attributes and limits

Return

	list - all found notes
 totalItems - number of notes found if there is no limit

func (*ClientConnection) NotesGetById

func (c *ClientConnection) NotesGetById(ids KIdList) (ErrorList, NoteList, error)

NotesGetById - Get an note.

ids - global identifiers of requested notes

Return

errors - list of errors
result - found notes

func (*ClientConnection) NotesMove

func (c *ClientConnection) NotesMove(ids KIdList, folder KId) (ErrorList, CreateResultList, error)

NotesMove - Move existing notes to folder

ids - list of global identifiers of notes to be moved
folder - target folder

Return

errors - error message list

func (*ClientConnection) NotesRemove

func (c *ClientConnection) NotesRemove(ids KIdList) (ErrorList, error)

NotesRemove - Remove a list of notes.

ids - list of global identifiers of notes to be removed

Return

errors - list of notes that failed to remove

func (*ClientConnection) NotesSet

func (c *ClientConnection) NotesSet(notes NoteList) (ErrorList, SetResultList, error)

NotesSet - Set notes. Return

errors - error message list

func (*ClientConnection) OccurrencesGet

func (c *ClientConnection) OccurrencesGet(folderIds KIdList, query SearchQuery) (OccurrenceList, int, error)

OccurrencesGet - Items rule and reminder in the occurrence aren't filled. If necessary use getOccurrence method.

folderIds - list of global identifiers of folders to be listed
query - query attributes and limits

Return

	list - all found events
 totalItems - number of events found if there is no limit

func (*ClientConnection) OccurrencesGetById

func (c *ClientConnection) OccurrencesGetById(ids KIdList) (ErrorList, OccurrenceList, error)

OccurrencesGetById - Get an occurrence. Return

result - found occurrence

func (*ClientConnection) OccurrencesGetFromAttachment

func (c *ClientConnection) OccurrencesGetFromAttachment(attachmentId KId) (*Occurrence, error)

OccurrencesGetFromAttachment - Get an occurrence.

attachmentId - global identifier of attachment

Return

result - found occurrence

func (*ClientConnection) OccurrencesRemove

func (c *ClientConnection) OccurrencesRemove(occurrences OccurrenceList) (ErrorList, error)

OccurrencesRemove - Remove a list of occurrences.

occurrences - occurrences to be removed. Only fields 'id' and 'modification' are required.

Return

errors - list of occurrences that failed to remove

func (*ClientConnection) OccurrencesSet

func (c *ClientConnection) OccurrencesSet(occurrences OccurrenceList) (ErrorList, SetResultList, error)

OccurrencesSet - Set occurrences.

occurrences - modifications of occurrences.

Return

errors - error message list

func (*ClientConnection) OccurrencesSetPartStatus

func (c *ClientConnection) OccurrencesSetPartStatus(id KId, response PartStatusResponse) error

OccurrencesSetPartStatus - Set part status to occurrence or event and send response to organizer.

id - identifiers of events or occurrence
response - response and status

func (*ClientConnection) PrincipalsGet

func (c *ClientConnection) PrincipalsGet(users bool, groups bool, domains bool) (PrincipalList, error)

PrincipalsGet - Get list of principals from server. Return

list - principals

func (*ClientConnection) PrincipalsGetByEmail

func (c *ClientConnection) PrincipalsGetByEmail(email string) (*Principal, error)

PrincipalsGetByEmail - Find principal according his primary email (login name) on server.

email - email/login name

Return

principal - principal

func (*ClientConnection) SessionAddSignatureImage

func (c *ClientConnection) SessionAddSignatureImage(ids KIdList) (ErrorList, ImageList, error)

SessionAddSignatureImage - Add image into user's store

ids - Upload IDs of images to add into user's store

Return

errors - list of errors
result - succesfuly added images

func (*ClientConnection) SessionCanUserChangePassword

func (c *ClientConnection) SessionCanUserChangePassword() (bool, error)

SessionCanUserChangePassword - to change his/her password. Return

isEligible - is set to true as long as user is eligible

func (*ClientConnection) SessionCancelWipeMobileDevice

func (c *ClientConnection) SessionCancelWipeMobileDevice(deviceId string) error

SessionCancelWipeMobileDevice - Cancel wiping of user's mobile device.

deviceId - ID of user's mobile device to cancel wipe

func (*ClientConnection) SessionGetAvailableLanguages

func (c *ClientConnection) SessionGetAvailableLanguages() (LangDescriptionList, error)

SessionGetAvailableLanguages - Get list of all languages supported by server.

func (*ClientConnection) SessionGetAvailableTimeZones

func (c *ClientConnection) SessionGetAvailableTimeZones() (StringList, error)

SessionGetAvailableTimeZones - Get list of all available time zones. Return

zones - list of time zones

func (*ClientConnection) SessionGetMobileDeviceList

func (c *ClientConnection) SessionGetMobileDeviceList(query SearchQuery) (MobileDeviceList, int, error)

SessionGetMobileDeviceList - Obtain a list of mobile devices of given user.

query - query attributes and limits

Return

	list - mobile devices of given user
 totalItems - number of mobile devices found for given user

func (*ClientConnection) SessionGetOutOfOffice

func (c *ClientConnection) SessionGetOutOfOffice() (*OutOfOfficeSettings, error)

SessionGetOutOfOffice - Obtain the Auto Reply settings Return

settings - details

func (*ClientConnection) SessionGetQuotaInformation

func (c *ClientConnection) SessionGetQuotaInformation() (*QuotaInfo, error)

SessionGetQuotaInformation - Obtain iformations about quota of current user.

func (*ClientConnection) SessionGetSettings

func (c *ClientConnection) SessionGetSettings(query SettingQuery) (*jsonstring, error)

SessionGetSettings - Obtain currently logged user's settings. Return

settings - WAM settings

func (*ClientConnection) SessionGetSignatureImageList

func (c *ClientConnection) SessionGetSignatureImageList() (ImageList, error)

SessionGetSignatureImageList - Obtain list of images stored in user account

func (*ClientConnection) SessionGetSpamSettings

func (c *ClientConnection) SessionGetSpamSettings() (*SpamSettings, error)

SessionGetSpamSettings - Obtain the spam settings Return

settings - details

func (*ClientConnection) SessionGetUserVoiceUrl

func (c *ClientConnection) SessionGetUserVoiceUrl() (string, error)

SessionGetUserVoiceUrl - Obtain URL for users' access to UserVoice Return

accessUrl - URL for access to UserVoice

func (*ClientConnection) SessionRemoveMobileDevice

func (c *ClientConnection) SessionRemoveMobileDevice(deviceId string) error

SessionRemoveMobileDevice - Remove mobile device from the list of user's mobile devices.

deviceId - ID of user's mobile device to be removed

func (*ClientConnection) SessionRemoveSignatureImage

func (c *ClientConnection) SessionRemoveSignatureImage(ids KIdList) (ErrorList, error)

SessionRemoveSignatureImage - Remove image from user's store

ids - Image IDs to remove

func (*ClientConnection) SessionSetOutOfOffice

func (c *ClientConnection) SessionSetOutOfOffice(settings OutOfOfficeSettings) error

SessionSetOutOfOffice - Set the Auto Reply settings

settings - details

func (*ClientConnection) SessionSetPassword

func (c *ClientConnection) SessionSetPassword(currentPassword string, newPassword string) error

SessionSetPassword - Change password of current user.

currentPassword - current users' password
newPassword - new users' password

func (*ClientConnection) SessionSetSettings

func (c *ClientConnection) SessionSetSettings(settings jsonstring) error

SessionSetSettings - Set settings of the currently logged user.

settings - WAM settings

func (*ClientConnection) SessionSetSpamSettings

func (c *ClientConnection) SessionSetSpamSettings(settings SpamSettings) error

SessionSetSpamSettings - Set the spam settings

settings - details

func (*ClientConnection) SessionSetUserInfo

func (c *ClientConnection) SessionSetUserInfo(userDetails UserInfo) error

SessionSetUserInfo - Set user details.

userDetails - details about the currently logged user

func (*ClientConnection) SessionWhoAmI

func (c *ClientConnection) SessionWhoAmI() (*UserInfo, error)

SessionWhoAmI - Determines the currently logged user (caller). Return

userDetails - details about the currently logged user

func (*ClientConnection) SessionWipeMobileDevice

func (c *ClientConnection) SessionWipeMobileDevice(deviceId string, password string) error

SessionWipeMobileDevice - Wipe user's mobile device.

deviceId - ID of user's mobile device to be wiped
password - password of current user

func (*ClientConnection) TasksCopy

func (c *ClientConnection) TasksCopy(ids KIdList, folder KId) (ErrorList, CreateResultList, error)

TasksCopy - Copy existing tasks to folder

ids - list of global identifiers of tasks to be copied
folder - target folder

Return

errors - error message list

func (*ClientConnection) TasksCreate

func (c *ClientConnection) TasksCreate(tasks TaskList) (ErrorList, CreateResultList, error)

TasksCreate - Create tasks. Return

errors - list of tasks that failed on creation
result - particular results for all items

func (*ClientConnection) TasksGet

func (c *ClientConnection) TasksGet(folderIds KIdList, query SearchQuery) (TaskList, int, error)

TasksGet - Get a list of tasks.

folderIds - list of global identifiers of folders to be listed.
query - query attributes and limits

Return

	list - all found tasks
 totalItems - number of tasks found if there is no limit

func (*ClientConnection) TasksGetById

func (c *ClientConnection) TasksGetById(ids KIdList) (ErrorList, TaskList, error)

TasksGetById - Get an tasks.

ids - global identifiers of requested tasks

Return

errors - list of tasks that failed to obtain
result - found tasks

func (*ClientConnection) TasksMove

func (c *ClientConnection) TasksMove(ids KIdList, folder KId) (ErrorList, CreateResultList, error)

TasksMove - Move existing tasks to folder

ids - list of global identifiers of tasks to be moved
folder - target folder

Return

errors - error message list

func (*ClientConnection) TasksRemove

func (c *ClientConnection) TasksRemove(ids KIdList) (ErrorList, error)

TasksRemove - Remove a list of tasks.

ids - list of global identifiers of tasks to be removed

Return

errors - list of tasks that failed to remove

func (*ClientConnection) TasksSet

func (c *ClientConnection) TasksSet(tasks TaskList) (ErrorList, SetResultList, error)

TasksSet - Set tasks. Return

errors - error message list

type CompareOperator

type CompareOperator string

CompareOperator - Simple Query Operator

const (
	Eq          CompareOperator = "Eq"          // '=' - equal
	NotEq       CompareOperator = "NotEq"       // '<>' - not equal
	LessThan    CompareOperator = "LessThan"    // '<' - lower that
	GreaterThan CompareOperator = "GreaterThan" // '>' - greater that
	LessEq      CompareOperator = "LessEq"      // '<=' - lower or equal
	GreaterEq   CompareOperator = "GreaterEq"   // '>=' - greater or equal
	Like        CompareOperator = "Like"        // contains substring, % is wild character
)

type Config

type Config struct {
	// contains filtered or unexported fields
}

func NewConfig

func NewConfig(server string) *Config

NewConfig returns a pointer to structure with the configuration for connecting to the API server

server - address without schema and port

func (*Config) NewConnection

func (c *Config) NewConnection() (*ClientConnection, error)

type Contact

type Contact struct {
	Id              KId               `json:"id"`
	FolderId        KId               `json:"folderId"`
	Watermark       Watermark         `json:"watermark"`
	Type            ContactType       `json:"type"`
	CommonName      string            `json:"commonName"`
	FirstName       string            `json:"firstName"`
	MiddleName      string            `json:"middleName"`
	SurName         string            `json:"surName"`
	TitleBefore     string            `json:"titleBefore"`
	TitleAfter      string            `json:"titleAfter"`
	NickName        string            `json:"nickName"`
	PhoneNumbers    PhoneNumberList   `json:"phoneNumbers"`
	EmailAddresses  EmailAddressList  `json:"emailAddresses"`
	PostalAddresses PostalAddressList `json:"postalAddresses"`
	Urls            UrlList           `json:"urls"`
	BirthDay        UtcDateTime       `json:"birthDay"`
	Anniversary     UtcDateTime       `json:"anniversary"`
	CompanyName     string            `json:"companyName"`
	DepartmentName  string            `json:"departmentName"`
	Profession      string            `json:"profession"`
	ManagerName     string            `json:"managerName"`
	AssistantName   string            `json:"assistantName"`
	Comment         string            `json:"comment"`
	IMAddress       string            `json:"IMAddress"`
	Photo           PhotoAttachment   `json:"photo"`
	Categories      StringList        `json:"categories"`
	CertSourceId    KId               `json:"certSourceId"` // [WRITE-ONLY]
	IsGalContact    bool              `json:"isGalContact"` // [READ-ONLY]
}

Contact - Contact detail.

type ContactId

type ContactId string

type ContactIdList

type ContactIdList []ContactId

type ContactList

type ContactList []Contact

type ContactType

type ContactType string

type Conversation

type Conversation struct {
	ConversationId      ConversationId    `json:"conversationId"`
	LastActivity        UtcDateTime       `json:"lastActivity"`        // used to find RECENT conversations
	SentLastDeliveredId MessageId         `json:"sentLastDeliveredId"` // all higher ids are undelivered (user-specific - messages from me)
	SentLastReadId      MessageId         `json:"sentLastReadId"`      // // all higher ids are undelivered (user-specific - messages from me)
	ReceivedLastReadId  MessageId         `json:"receivedLastReadId"`  // all higher ids are undelivered (user-specific - message to me)
	ReceivedUnreadCount int               `json:"receivedUnreadCount"` // user-specific - message to me
	Contacts            ContactIdList     `json:"contacts"`            // one for 1:1, more for groupchats
	Event               ConversationEvent `json:"event"`               // to notify other users/sessions about conversation activity
	Muted               bool              `json:"muted"`
}

type ConversationEvent

type ConversationEvent string
const (
	Created   ConversationEvent = "Created"   // when conversation id is created
	Updated   ConversationEvent = "Updated"   // when message flows into conversation
	Delivered ConversationEvent = "Delivered" // when messages within this conversation were delivered
	Read      ConversationEvent = "Read"      // when messages within this conversation has been read
)

type ConversationId

type ConversationId int

type ConversationList

type ConversationList []Conversation

type CreateResult

type CreateResult struct {
	InputIndex int       `json:"inputIndex"` // 0-based index to input array, e.g. 3 means that the relates to the 4th element of the input parameter array
	Id         KId       `json:"id"`         // ID of created item.
	Watermark  Watermark `json:"watermark"`  // item version from journal
}

CreateResult - Details about a particular item created.

type CreateResultList

type CreateResultList []CreateResult

type Credentials

type Credentials struct {
	UserName string `json:"userName"` // UserName
	Password string `json:"password"` // Password
}

Credentials - Credentials contains userName and password

type Date

type Date struct {
	Year  int `json:"year"`
	Month int `json:"month"` // 0-11
	Day   int `json:"day"`   // 1-31 max day is limited by month
}

Date - Note: all fields must be assigned if used in set methods

type DateTimeStamp

type DateTimeStamp int

DateTimeStamp - Type for date/time representation

type DateTimeStampList

type DateTimeStampList []DateTimeStamp

DateTimeStampList - Type for lists of date/times

type DecryptResult

type DecryptResult string
const (
	DecryptSuccesful DecryptResult = "DecryptSuccesful"
	DecryptNoKey     DecryptResult = "DecryptNoKey"
	DecryptError     DecryptResult = "DecryptError"
)

type DeviceStatus

type DeviceStatus string

DeviceStatus - Mobile device status.

const (
	OK                   DeviceStatus = "OK"                   // no wipe
	DeviceNotProvisioned DeviceStatus = "DeviceNotProvisioned" // not (fully) provisioned (yet)
	DeviceWipeInitiated  DeviceStatus = "DeviceWipeInitiated"  // wipe process submitted
	DeviceWipeInProgress DeviceStatus = "DeviceWipeInProgress" // wipe process in progress
	DeviceWipeFinished   DeviceStatus = "DeviceWipeFinished"   // wipe process finished
	DeviceConnected      DeviceStatus = "DeviceConnected"
	DeviceDisconnected   DeviceStatus = "DeviceDisconnected"
)

type DisplayableContentType

type DisplayableContentType string

type DisplayableMimePart

type DisplayableMimePart struct {
	Id          KId                    `json:"id"` // [READ-ONLY] local identification, 0 = root mime part, 0-0 = sub-mime part, 0.1 = sub-mime part second item...
	ContentType DisplayableContentType `json:"contentType"`
	Content     string                 `json:"content"` // UTF-8 encoded
}

type DisplayableMimePartList

type DisplayableMimePartList []DisplayableMimePart

type Download

type Download struct {
	Url    string `json:"url"`    // download url
	Name   string `json:"name"`   // filename
	Length int    `json:"length"` // file size in bytes
}

Download - important information about download

type EMail

type EMail struct {
	Name      string `json:"name"`
	Address   string `json:"address"`
	ContactId string `json:"contactId"` // [WRITE-ONCE]
}

type EMailList

type EMailList []EMail

type EmailAddress

type EmailAddress struct {
	Address            string           `json:"address"`
	Name               string           `json:"name"`
	Preferred          bool             `json:"preferred"`
	IsValidCertificate bool             `json:"isValidCertificate"`
	Type               EmailAddressType `json:"type"`
	RefId              KId              `json:"refId"` // Global identification of reference. Valid for types 'RefContact' and 'RefDistributionList'.
	Extension          ABExtension      `json:"extension"`
}

EmailAddress - Structure describing an email address in contact.

type EmailAddressList

type EmailAddressList []EmailAddress

EmailAddressList - Sequence of email addresses.

type EmailAddressType

type EmailAddressType string

EmailAddressType - Email address type.

const (
	EmailWork   EmailAddressType = "EmailWork"
	EmailHome   EmailAddressType = "EmailHome"
	EmailOther  EmailAddressType = "EmailOther"
	EmailCustom EmailAddressType = "EmailCustom" // no type defined
	// valid for distribution lists only
	RefContact          EmailAddressType = "RefContact"          // Reference to existing conatact
	RefDistributionList EmailAddressType = "RefDistributionList" // Reference to existing distribution list
)

type EmailCertificate

type EmailCertificate struct {
	Email       EMail  `json:"email"`
	Certificate string `json:"certificate"`
}

type EmailCertificateList

type EmailCertificateList []EmailCertificate

type EncryptInfo

type EncryptInfo struct {
	IsEncrypted bool               `json:"isEncrypted"`
	Result      DecryptResult      `json:"result"`
	Error       LocalizableMessage `json:"error"`
}

type EndBy

type EndBy struct {
	Type EndByType   `json:"type"`
	Date UtcDateTime `json:"date"` // also known as until, used for ByRecurrenceDate
}

type EndByType

type EndByType string
const (
	ByRecurrenceNever EndByType = "ByRecurrenceNever"
	ByRecurrenceDate  EndByType = "ByRecurrenceDate"
)

type Error

type Error struct {
	InputIndex        int                          `json:"inputIndex"`        // 0-based index to input array, e.g. 3 means that the relates to the 4th element of the input parameter array
	Code              int                          `json:"code"`              // -32767..-1 (JSON-RPC) or 1..32767 (application)
	Message           string                       `json:"message"`           // text with placeholders %1, %2, etc., e.g. "User %1 cannot be deleted."
	MessageParameters LocalizableMessageParameters `json:"messageParameters"` // strings to replace placeholders in message, and message plurality.
}

Error - Error details regarding a particular item, e.g. one of users that could not be updated or removed.

type ErrorList

type ErrorList []Error

type ErrorReport

type ErrorReport struct {
	Code    int    `json:"code"`
	Message string `json:"message"`
	Data    struct {
		MessageParameters struct {
			PositionalParameters []string `json:"positionalParameters"`
			Plurality            int      `json:"plurality"`
		} `json:"messageParameters"`
	} `json:"data"`
}

type EvaluationModeType

type EvaluationModeType string

EvaluationModeType - Types of filter's conditions evaluation.

const (
	EmAnyOf EvaluationModeType = "EmAnyOf"
	EmAllOf EvaluationModeType = "EmAllOf"
)

type Event

type Event struct {
	Id            KId            `json:"id"`       // [READ-ONLY] global identification
	FolderId      KId            `json:"folderId"` // [REQUIRED FOR CREATE] [WRITE-ONCE] global identification of folder in which is the event defined
	Watermark     Watermark      `json:"watermark"`
	Access        EventAccess    `json:"access"` // [READ-ONLY] scope of access of user to this event
	Summary       string         `json:"summary"`
	Location      string         `json:"location"`
	Description   string         `json:"description"`
	Label         EventLabel     `json:"label"`
	Categories    StringList     `json:"categories"`
	Start         UtcDateTime    `json:"start"`
	End           UtcDateTime    `json:"end"`
	TravelMinutes int            `json:"travelMinutes"` // // X-APPLE-TRAVEL-DURATION;VALUE=DURATION:PT15M
	FreeBusy      FreeBusyStatus `json:"freeBusy"`      // also known as TimeTransparency
	IsPrivate     bool           `json:"isPrivate"`     // also known as Class
	IsAllDay      bool           `json:"isAllDay"`
	Priority      PriorityType   `json:"priority"`
	Rule          RecurrenceRule `json:"rule"`
	Attendees     AttendeeList   `json:"attendees"`
	Reminder      Reminder       `json:"reminder"`
	IsCancelled   bool           `json:"isCancelled"` // [READ-ONLY] is cancelled by organiser
}

type EventAccess

type EventAccess string

EventAccess - Purposly merged role and type to avoid useless combinations like optional room

const (
	EAccessCreator  EventAccess = "EAccessCreator"
	EAccessInvitee  EventAccess = "EAccessInvitee"
	EAccessReadOnly EventAccess = "EAccessReadOnly"
)

type EventActionType

type EventActionType string
const (
	EActionCreate             EventActionType = "EActionCreate"             // new invitation
	EActionChangedTime        EventActionType = "EActionChangedTime"        // time of meating was changed
	EActionChangedSummary     EventActionType = "EActionChangedSummary"     // summary of meating was changed
	EActionChangedLocation    EventActionType = "EActionChangedLocation"    // location of meating was changed
	EActionChangedDescription EventActionType = "EActionChangedDescription" // description of meating was changed
)

type EventActionTypeList

type EventActionTypeList []EventActionType

type EventLabel

type EventLabel string

EventLabel - Any event can be marked by a label

const (
	None             EventLabel = "None"
	Important        EventLabel = "Important"
	Business         EventLabel = "Business"
	Personal         EventLabel = "Personal"
	Vacation         EventLabel = "Vacation"
	MustAttend       EventLabel = "MustAttend"
	TravelRequired   EventLabel = "TravelRequired"
	NeedsPreparation EventLabel = "NeedsPreparation"
	BirthDay         EventLabel = "BirthDay"
	Anniversary      EventLabel = "Anniversary"
	PhoneCall        EventLabel = "PhoneCall"
)

type EventList

type EventList []Event

type EventUpdate

type EventUpdate struct {
	Id            KId                 `json:"id"`            // [READ-ONLY] global identification (e-mail where an update or an invitation is placed)
	EventId       KId                 `json:"eventId"`       // [READ-ONLY] global identification of caused event
	EventFolderId KId                 `json:"eventFolderId"` // [READ-ONLY] global identification of caused event
	OccurrenceId  KId                 `json:"occurrenceId"`  // [READ-ONLY] global identification of caused event (if whole recurrent event is updated , there is first occurrence)
	IsException   bool                `json:"isException"`
	SeqNumber     int                 `json:"seqNumber"`
	IsObsolete    bool                `json:"isObsolete"`
	DeliveryTime  UtcDateTime         `json:"deliveryTime"`
	Type          EventUpdateType     `json:"type"`
	Summary       string              `json:"summary"`
	Location      string              `json:"location"`
	Start         UtcDateTime         `json:"start"`
	End           UtcDateTime         `json:"end"`
	TotalEnd      UtcDateTime         `json:"totalEnd"`
	Description   string              `json:"description"`
	Attendee      Attendee            `json:"attendee"`
	Actions       EventActionTypeList `json:"actions"`
}

type EventUpdateList

type EventUpdateList []EventUpdate

type EventUpdateType

type EventUpdateType string
const (
	EUpdateRequest EventUpdateType = "EUpdateRequest"
	EUpdateReply   EventUpdateType = "EUpdateReply"
	EUpdateCancel  EventUpdateType = "EUpdateCancel"
)

type FilterAction

type FilterAction struct {
	Type       FilterActionType `json:"type"`
	Parameters StringList       `json:"parameters"` // list of parameters (see FilterActionType for more info)
}

FilterAction - meet.

type FilterActionList

type FilterActionList []FilterAction

type FilterActionType

type FilterActionType string

FilterActionType - to filter action that this type of action requires.

const (
	FaAddHeader     FilterActionType = "FaAddHeader"     // two mandatory parameters: 1. header name, 2. header value (Headers 'Content-*' are forbidden)
	FaSetHeader     FilterActionType = "FaSetHeader"     // two mandatory parameters: 1. header name, 2. header value (Headers 'Content-*' are forbidden)
	FaRemoveHeader  FilterActionType = "FaRemoveHeader"  // one mandatory parameter: 1. header name (Headers 'Content-*' and 'Receive' are forbidden)
	FaAddRecipient  FilterActionType = "FaAddRecipient"  // one mandatory parameter: 1. address
	FaCopyToAddress FilterActionType = "FaCopyToAddress" // one mandatory parameter: 1. address
	FaReject        FilterActionType = "FaReject"        // one mandatory parameter: 1. reason (for mail rejection)
	FaFileInto      FilterActionType = "FaFileInto"      // one mandatory parameter: 1. path to directory where to store mail
	FaRedirect      FilterActionType = "FaRedirect"      // one mandatory parameter: 1. address where to redirect mail
	FaDiscard       FilterActionType = "FaDiscard"       // no parameters required
	FaKeep          FilterActionType = "FaKeep"          // no parameters required
	FaNotify        FilterActionType = "FaNotify"        // three mandatory parameters: 1. address; 2. subject; 3. text of notification
	FaSetReadFlag   FilterActionType = "FaSetReadFlag"   // no parameters required
	FaAutoReply     FilterActionType = "FaAutoReply"     // one mandatory parameter: 1. text of message
	FaStop          FilterActionType = "FaStop"          // no parameters required
)

type FilterComparatorType

type FilterComparatorType string

FilterComparatorType - which can be used to test filter's initial conditions.

const (
	CcEqual        FilterComparatorType = "CcEqual"        // tests whether target (ex. sender) is EQUAL to some string
	CcContain      FilterComparatorType = "CcContain"      // tests whether target (ex. sender) CONTAINS to some string
	CcNotContain   FilterComparatorType = "CcNotContain"   // tests whether target (ex. sender) NOT CONTAINS to some string
	CcNotEqual     FilterComparatorType = "CcNotEqual"     // tests whether target (ex. sender) IS NOT to some string
	CcUnder        FilterComparatorType = "CcUnder"        // tests whether size of mail is UNDER some number of Bytes
	CcOver         FilterComparatorType = "CcOver"         // tests whether size of mail is OVER some number of Bytes
	CcNoComparator FilterComparatorType = "CcNoComparator" // marks conditions that do not need any comparator (ex. has attachment, for all messages and is spam)
)

type FilterCondition

type FilterCondition struct {
	TestedTarget FilterConditionType  `json:"testedTarget"` // some aspect of message that will be tested using selected comparator and against parameters
	Comparator   FilterComparatorType `json:"comparator"`   // type of target comparator (has to be set correctly, even for CtAttachment and CtAll - CcNoComparator)
	Parameters   StringList           `json:"parameters"`   // zero, one or more values that will be used to compare to target using selected comparator
}

FilterCondition - filter should be applied or not.

type FilterConditionList

type FilterConditionList []FilterCondition

type FilterConditionType

type FilterConditionType string

FilterConditionType - tested as filter's initial condition.

const (
	CtEnvelopeRecipient FilterConditionType = "CtEnvelopeRecipient" // Recipient from SMTP envelope 'RCPT TO:'
	CtEnvelopeSender    FilterConditionType = "CtEnvelopeSender"    // Sender from SMTP envelope 'MAIL FROM:'
	CtRecipient         FilterConditionType = "CtRecipient"         // content of message headers 'To' and 'Cc'
	CtSender            FilterConditionType = "CtSender"            // content of message header 'Sender'
	CtFrom              FilterConditionType = "CtFrom"              // content of message header 'From'
	CtCc                FilterConditionType = "CtCc"                // content of message header 'Cc'
	CtTo                FilterConditionType = "CtTo"                // content of message header 'To'
	CtSubject           FilterConditionType = "CtSubject"           // messages with certain subject
	CtAttachment        FilterConditionType = "CtAttachment"        // messages that have attachment
	CtSize              FilterConditionType = "CtSize"              // messages with certain size (in Bytes)
	CtSpam              FilterConditionType = "CtSpam"              // messages marked as spam
	CtAll               FilterConditionType = "CtAll"               // all messages
)

type FilterRawRule

type FilterRawRule struct {
	Id          KId    `json:"id"`          // [READ-ONLY] global identification
	IsEnabled   bool   `json:"isEnabled"`   // says whether rule is enabled
	Description string `json:"description"` // contains rules description
	Script      string `json:"script"`
}

type FilterRule

type FilterRule struct {
	Id             KId                 `json:"id"`             // [READ-ONLY] global identification
	IsEnabled      bool                `json:"isEnabled"`      // says whether rule is enabled
	Description    string              `json:"description"`    // contains rules description
	IsIncomplete   bool                `json:"isIncomplete"`   // if rule is not completed (it does not contain any definition of conditions and actions)
	Conditions     FilterConditionList `json:"conditions"`     // list of rule's initial conditions
	Actions        FilterActionList    `json:"actions"`        // list of rule's actions (performed if initial conditions are meet)
	EvaluationMode EvaluationModeType  `json:"evaluationMode"` // determines evaluation mod of initial conditions
}

FilterRule - filter's initial conditions are meet.

type FilterRuleList

type FilterRuleList []FilterRule

type Folder

type Folder struct {
	Id            KId             `json:"id"`            // [READ-ONLY] global identification
	ParentId      KId             `json:"parentId"`      // global identification
	Name          string          `json:"name"`          // folder name displayed in folder tree
	OwnerName     string          `json:"ownerName"`     // [READ-ONLY] name of owner of folder (available only for 'FPlacePeople', 'FPlaceResources' and 'FPlaceLocations')
	EmailAddress  string          `json:"emailAddress"`  // [READ-ONLY] email of owner of folder (available only for 'FPlacePeople', 'FPlaceResources' and 'FPlaceLocations')
	Type          FolderType      `json:"type"`          // type of the folder
	SubType       FolderSubType   `json:"subType"`       // [READ-ONLY] type of the folder
	PlaceType     FolderPlaceType `json:"placeType"`     // [READ-ONLY] type of place where is folder placed
	Access        FolderAccess    `json:"access"`        // [READ-ONLY] type of access of currently loged user
	IsShared      bool            `json:"isShared"`      // [READ-ONLY] true if a folder is shared to another user (permissions are not empty)
	IsDelegated   bool            `json:"isDelegated"`   // [READ-ONLY] true if a folder access is R/W and user is a delegate
	NestingLevel  int             `json:"nestingLevel"`  // [READ-ONLY] number 0 = root folder, 1 = subfolders of root folder, 2 = subfolder of subfolder, ...
	MessageCount  int             `json:"messageCount"`  // [READ-ONLY] count of items in the folder (not set for root folder)
	MessageUnread int             `json:"messageUnread"` // [READ-ONLY] count of unread items (mails or deleted items) in folder, not set for non-mail folder types
	MessageSize   int64           `json:"messageSize"`   // [READ-ONLY] size of all messages in the folder (without subdirectories)
	Checked       bool            `json:"checked"`       // true if a folder is chosen to view
	Color         string          `json:"color"`         // a color of folder, if string is empty no color is set
	Published     bool            `json:"published"`     // [READ-ONLY] true, if folder was published to server
}

type FolderAccess

type FolderAccess string

FolderAccess - Access to folder

const (
	FAccessListingOnly FolderAccess = "FAccessListingOnly"
	FAccessReadOnly    FolderAccess = "FAccessReadOnly"
	FAccessReadWrite   FolderAccess = "FAccessReadWrite"
	FAccessAdmin       FolderAccess = "FAccessAdmin" // full access; E.g user can add folder
)

type FolderIcon

type FolderIcon string

FolderIcon - Folder icon enumeration.

const (
	FIMail     FolderIcon = "FIMail"
	FIContact  FolderIcon = "FIContact"
	FICalendar FolderIcon = "FICalendar"
	FITodo     FolderIcon = "FITodo"
	FIJournal  FolderIcon = "FIJournal"
	FINote     FolderIcon = "FINote"
	FIInbox    FolderIcon = "FIInbox"
	FIDeleted  FolderIcon = "FIDeleted"
)

type FolderList

type FolderList []Folder

type FolderPermission

type FolderPermission struct {
	Access      FolderAccess `json:"access"`
	Principal   Principal    `json:"principal"`
	Inherited   bool         `json:"inherited"`   // [READ-ONLY] permission are placed in a public root folder and there are read-only here
	IsDelegatee bool         `json:"isDelegatee"` // [READ-ONLY] principal is delegatee (this flag is filled only for default calendar and INBOX otherwise is false)
}

type FolderPermissionList

type FolderPermissionList []FolderPermission

type FolderPlaceType

type FolderPlaceType string

FolderPlaceType - Type of place where is folder placed

const (
	FPlaceMailbox   FolderPlaceType = "FPlaceMailbox"   // the mailbox of currently loged user
	FPlaceResources FolderPlaceType = "FPlaceResources" // the resource type of Equipment
	FPlaceLocations FolderPlaceType = "FPlaceLocations" // the resource type of Room
	FPlacePeople    FolderPlaceType = "FPlacePeople"    // the shared folder of another user
	FPlacePublic    FolderPlaceType = "FPlacePublic"    // the public folder
	FPlaceArchive   FolderPlaceType = "FPlaceArchive"   // the archive folder
)

type FolderSubType

type FolderSubType string

FolderSubType - Folder sub-type enumeration.

const (
	FSubNone         FolderSubType = "FSubNone"         // Ordinary folder.
	FSubInbox        FolderSubType = "FSubInbox"        // Special sub-type of FMail. This folder cannot be removed.
	FSubDrafts       FolderSubType = "FSubDrafts"       // Special sub-type of FMail. This folder cannot be removed.
	FSubSentItems    FolderSubType = "FSubSentItems"    // Special sub-type of FMail. This folder cannot be removed.
	FSubDeletedItems FolderSubType = "FSubDeletedItems" // Special sub-type of FMail. This folder cannot be removed.
	FSubJunkEmail    FolderSubType = "FSubJunkEmail"    // Special sub-type of FMail. This folder cannot be removed.
	FSubDefault      FolderSubType = "FSubDefault"      // These folders cannot be removed.
	FSubGalResources FolderSubType = "FSubGalResources" // This folder is created via GAL for storage contacts of resources.
	FSubGalContacts  FolderSubType = "FSubGalContacts"  // This folder is created via GAL for storage contacts of people.
)

type FolderType

type FolderType string

FolderType - Folder type enumeration

const (
	FRoot     FolderType = "FRoot"
	FMail     FolderType = "FMail"
	FContact  FolderType = "FContact"
	FCalendar FolderType = "FCalendar"
	FTask     FolderType = "FTask"
	FNote     FolderType = "FNote"
)

type FreeBusyInterval

type FreeBusyInterval struct {
	Status FreeBusyStatus `json:"status"`
	Start  UtcDateTime    `json:"start"`
	End    UtcDateTime    `json:"end"`
}

FreeBusyInterval - FreeBusy status for particular interval.

type FreeBusyList

type FreeBusyList []FreeBusySequence

FreeBusyList - List of free busy sequences.

type FreeBusySequence

type FreeBusySequence []FreeBusyInterval

FreeBusySequence - FreeBusy sequence for particular interval.

type FreeBusyStatus

type FreeBusyStatus string
const (
	Busy         FreeBusyStatus = "Busy" // opaque
	Tentative    FreeBusyStatus = "Tentative"
	Free         FreeBusyStatus = "Free" // transparent
	OutOfOffice  FreeBusyStatus = "OutOfOffice"
	NotAvailable FreeBusyStatus = "NotAvailable"
)

type FrequencyType

type FrequencyType string
const (
	Daily   FrequencyType = "Daily"
	Weekly  FrequencyType = "Weekly"
	Monthly FrequencyType = "Monthly"
	Yearly  FrequencyType = "Yearly"
)

type IdEntity

type IdEntity struct {
	Id   KId    `json:"id"`   // global identifier of entity
	Name string `json:"name"` // [READ-ONLY] name or description of entity
}

type Image

type Image struct {
	Url string `json:"url"` // [READ ONLY] URL to obtain image via HTTP GET request.
	Id  string `json:"id"`  // [READ ONLY] Id of uploaded image.
}

type ImageList

type ImageList []Image

type InboundDelegation

type InboundDelegation struct {
	Principal Principal `json:"principal"` // [READ-ONLY]
	MailboxId KId       `json:"mailboxId"` // [READ-ONLY] root folder ID
	Accepted  bool      `json:"accepted"`
}

type InboundDelegationList

type InboundDelegationList []InboundDelegation

type IntegerList

type IntegerList []int

IntegerList - Type for lists of integers.

type IpAddress

type IpAddress string

type IpAddressList

type IpAddressList []IpAddress

type ItemName

type ItemName string

ItemName - Item of the Entity; used in restrictions

const (
	Name        ItemName = "Name"        // Entity Name
	Description ItemName = "Description" // Entity Description
	Email       ItemName = "Email"       // Entity Email Address
	FullName    ItemName = "FullName"    // Entity Full Name
	TimeItem    ItemName = "TimeItem"    // Entity Time - it cannot be simply Time because of C++ conflict - see bug 34684 comment #3
	DateItem    ItemName = "DateItem"    // Entity Date - I expect same problem with Date as with Time
	DomainName  ItemName = "DomainName"  // differs from name (eg. cannot contains underscore)
)

type ItemType

type ItemType string

type KId

type KId string

KId - global object identification

type KIdList

type KIdList []KId

KIdList - list of global object identifiers

type LangDescription

type LangDescription struct {
	Name      string `json:"name"`      // name of language (national form)
	Code      string `json:"code"`      // code of language; E.g.: "en-gb"
	ShortCode string `json:"shortCode"` // short code of language which is used to identify language file; e.g. "en"
}

type LangDescriptionList

type LangDescriptionList []LangDescription

type LocalizableMessage

type LocalizableMessage struct {
	Message              string     `json:"message"`              // text with placeholders %1, %2, etc., e.g. "User %1 cannot be deleted."
	PositionalParameters StringList `json:"positionalParameters"` // additional strings to replace the placeholders in message (first string replaces %1 etc.)
	Plurality            int        `json:"plurality"`            // count of items, used to distinguish among singular/paucal/plural; 1 for messages with no counted items
}

LocalizableMessage - Message can contain replacement marks: { "User %1 cannot be deleted.", ["jsmith"], 1 }

type LocalizableMessageList

type LocalizableMessageList []LocalizableMessage

type LocalizableMessageParameters

type LocalizableMessageParameters struct {
	PositionalParameters StringList `json:"positionalParameters"` // additional strings to replace the placeholders in message (first string replaces %1 etc.)
	Plurality            int        `json:"plurality"`            // count of items, used to distinguish among singular/paucal/plural; 1 for messages with no counted items
}

LocalizableMessageParameters - This is the parameters structure.

type LogicalOperator

type LogicalOperator string

LogicalOperator - Compound Operator

const (
	Or  LogicalOperator = "Or"
	And LogicalOperator = "And"
)

type LongList

type LongList []int

type LongNumber

type LongNumber uint64

type Mail

type Mail struct {
	Id             KId          `json:"id"`       // [READ-ONLY] global identification
	FolderId       KId          `json:"folderId"` // global identification
	Watermark      Watermark    `json:"watermark"`
	From           EMail        `json:"from"`        // contents of the From header
	Sender         EMail        `json:"sender"`      // contents of the Sender header. Use it for delegation. It shoudn't be the same as From header.
	To             EMailList    `json:"to"`          // contents of To header
	Cc             EMailList    `json:"cc"`          // contents of Cc header
	Bcc            EMailList    `json:"bcc"`         // contents of BCc header
	SendDate       UtcDateTime  `json:"sendDate"`    // contents of Date header (to be displayed in Sent Items). Not set for drafts.
	ReceiveDate    UtcDateTime  `json:"receiveDate"` // mail delivery time. Not set for drafts.
	ModifiedDate   UtcDateTime  `json:"modifiedDate"`
	ReplyTo        EMailList    `json:"replyTo"`        // contents of Reply-To header
	NotificationTo EMail        `json:"notificationTo"` // contents of Disposition-Notification-To header
	Subject        string       `json:"subject"`        // contents of Subject header
	Priority       PriorityType `json:"priority"`       // mail priority (contents of X-Priority header). Defaults to normal priority.
	Size           int          `json:"size"`           // mail size in bytes
	// flags ---------------------------------
	IsSeen        bool `json:"isSeen"`
	IsAnswered    bool `json:"isAnswered"`
	IsFlagged     bool `json:"isFlagged"`
	IsForwarded   bool `json:"isForwarded"`
	IsJunk        bool `json:"isJunk"`
	IsMDNSent     bool `json:"isMDNSent"`     // rfc3503; When saving an unfinished message to any folder client MUST set $MDNSent keyword to prevent another client from sending MDN for the message.
	ShowExternal  bool `json:"showExternal"`  // It means the user confirm to show external sources (eg. images). It's false by default.
	RequestDSN    bool `json:"requestDSN"`    // It is true if should be requested DSN even for successful delivered message. DSN for failure is default.
	HasAttachment bool `json:"hasAttachment"` // [read-only]
	IsDraft       bool `json:"isDraft"`       // [read-only]
	IsReadOnly    bool `json:"isReadOnly"`    // [read-only]
	// ---------------------------------------
	// SMIME ---------------------------------
	SignInfo    SignInfo    `json:"signInfo"`    // [read-only]
	EncryptInfo EncryptInfo `json:"encryptInfo"` // [read-only]
	// ---------------------------------------
	DisplayableParts DisplayableMimePartList `json:"displayableParts"`
	Attachments      AttachmentList          `json:"attachments"`
	Headers          MimeHeaderList          `json:"headers"`
	Send             bool                    `json:"send"`    // [WRITE-ONLY] Send mail, beware it invalidate ID of this mail
	Sign             bool                    `json:"sign"`    // [WRITE-ONLY] Appends a signature as attachment
	Encrypt          bool                    `json:"encrypt"` // [WRITE-ONLY] Encypts the email. Certificates of each recipient must be known.
}

Mail - Constants for composing kerio::web::SearchQuery

type MailList

type MailList []Mail

type ManipulationError

type ManipulationError struct {
	Id           KId                `json:"id"` // entity KId, can be user, group, alias, ML...
	ErrorMessage LocalizableMessage `json:"errorMessage"`
}

ManipulationError - error structure to be used when manipulating with globally addressable list items

type ManipulationErrorList

type ManipulationErrorList []ManipulationError

type Message

type Message struct {
	MessageId MessageId      `json:"messageId"`
	Text      string         `json:"text"`
	Event     MessageEvent   `json:"event"`
	To        ConversationId `json:"to"` // conversation ID
	From      ContactId      `json:"from"`
	Time      UtcDateTime    `json:"time"` // filled by server
}

type MessageEvent

type MessageEvent string

type MessageId

type MessageId int

type MessageList

type MessageList []Message

type MimeHeader

type MimeHeader struct {
	Type  MimeHeaderType `json:"type"`
	Value string         `json:"value"`
}

type MimeHeaderList

type MimeHeaderList []MimeHeader

type MimeHeaderType

type MimeHeaderType string

type MobileDevice

type MobileDevice struct {
	ProtocolType        ProtocolType         `json:"protocolType"`
	DeviceId            string               `json:"deviceId"`
	ProtocolVersion     string               `json:"protocolVersion"`     // used ActiveSync protocol version
	RegistrationDate    DateTimeStamp        `json:"registrationDate"`    // date of registration
	RegistrationDateIso UtcDateTime          `json:"registrationDateIso"` // date of registration
	LastSyncDate        DateTimeStamp        `json:"lastSyncDate"`        // date of last synchronization
	LastSyncDateIso     UtcDateTime          `json:"lastSyncDateIso"`     // date of last synchronization
	FolderList          MobileSyncFolderList `json:"folderList"`          // list of synchronized folders
	Status              DeviceStatus         `json:"status"`              // wipe status
	Method              SyncMethod           `json:"method"`              // synchronization method
	RemoteHost          string               `json:"remoteHost"`          // typically IP address of device
	Os                  string               `json:"os"`                  // operating system - eg. Windows Mobile(R) 2003
	Platform            string               `json:"platform"`            // PocketPC
	DeviceIcon          string               `json:"deviceIcon"`          // Device icon Eg. 'pocketpc' or 'unknown'
}

MobileDevice - Mobile device properties.

type MobileDeviceList

type MobileDeviceList []MobileDevice

MobileDeviceList - List of mobile devices.

type MobileSyncFolder

type MobileSyncFolder struct {
	FolderName      string        `json:"folderName"`      // folder name
	FolderTypeIcon  FolderIcon    `json:"folderTypeIcon"`  // mail,contact...
	LastSyncDate    DateTimeStamp `json:"lastSyncDate"`    // date of last synchronization
	LastSyncDateIso UtcDateTime   `json:"lastSyncDateIso"` // date of last synchronization
}

MobileSyncFolder - Synchronized folder.

type MobileSyncFolderList

type MobileSyncFolderList []MobileSyncFolder

type ModificationType

type ModificationType string

type NameEntry

type NameEntry struct {
	CommonName             string     `json:"commonName"`             // CN
	OrganizationName       string     `json:"organizationName"`       // O
	OrganizationalUnitName string     `json:"organizationalUnitName"` // OU
	LocalityName           string     `json:"localityName"`           // L
	CountryName            string     `json:"countryName"`            // C
	StateOrProvinceName    string     `json:"stateOrProvinceName"`    // ST
	EmailAddresses         StringList `json:"emailAddresses"`         // 'emailAddress' or 'subjectAltName'(X509v3 Subject Alternative Name)
}

type NamedMultiValue

type NamedMultiValue struct {
	Name  string     `json:"name"` // Name-multivalue pair
	Value StringList `json:"value"`
}

NamedMultiValue - Note: all fields must be assigned if used in set methods

type NamedMultiValueList

type NamedMultiValueList []NamedMultiValue

NamedMultiValueList - List of name-multivalue pairs

type NamedValue

type NamedValue struct {
	Name  string `json:"name"` // Name-value pair
	Value string `json:"value"`
}

NamedValue - Note: all fields must be assigned if used in set methods

type NamedValueList

type NamedValueList []NamedValue

NamedValueList - List of name-value pairs

type Note

type Note struct {
	Id         KId          `json:"id"`       // [READ-ONLY] global identification
	FolderId   KId          `json:"folderId"` // [REQUIRED FOR CREATE] [WRITE-ONCE] global identification of folder in which is the note defined
	Watermark  Watermark    `json:"watermark"`
	Color      NoteColor    `json:"color"`      // COLOR:BLUE
	Text       string       `json:"text"`       // TEXT:****
	Position   NotePosition `json:"position"`   // POSITION:354 206 623 326
	CreateDate UtcDateTime  `json:"createDate"` // [READ-ONLY]
	ModifyDate UtcDateTime  `json:"modifyDate"` // [READ-ONLY]
}

Note - Note details

type NoteColor

type NoteColor string

NoteColor - Color of note

const (
	White  NoteColor = "White"
	Yellow NoteColor = "Yellow"
	Pink   NoteColor = "Pink"
	Green  NoteColor = "Green"
	Blue   NoteColor = "Blue"
)

type NoteList

type NoteList []Note

NoteList - List of notes

type NotePosition

type NotePosition struct {
	XOffset uint `json:"xOffset"`
	YOffset uint `json:"yOffset"`
	XSize   uint `json:"xSize"`
	YSize   uint `json:"ySize"`
}

NotePosition - Position of note

type Occurrence

type Occurrence struct {
	Id            KId              `json:"id"`       // [READ-ONLY] global identification
	EventId       KId              `json:"eventId"`  // [READ-ONLY] global identification of appropriate event
	FolderId      KId              `json:"folderId"` // [REQUIRED FOR CREATE] [WRITE-ONCE] global identification of folder in which is the event defined
	Watermark     Watermark        `json:"watermark"`
	Access        EventAccess      `json:"access"` // [READ-ONLY] scope of access of user to this occurrence
	Summary       string           `json:"summary"`
	Location      string           `json:"location"`
	Description   string           `json:"description"`
	Label         EventLabel       `json:"label"`
	Categories    StringList       `json:"categories"`
	Start         UtcDateTime      `json:"start"`
	End           UtcDateTime      `json:"end"`
	TravelMinutes int              `json:"travelMinutes"` // // X-APPLE-TRAVEL-DURATION;VALUE=DURATION:PT15M
	FreeBusy      FreeBusyStatus   `json:"freeBusy"`      // also known as TimeTransparency
	IsPrivate     bool             `json:"isPrivate"`     // also known as Class
	IsAllDay      bool             `json:"isAllDay"`
	Priority      PriorityType     `json:"priority"`
	Rule          RecurrenceRule   `json:"rule"` // not filled in listing method
	Attendees     AttendeeList     `json:"attendees"`
	Reminder      Reminder         `json:"reminder"`     // not filled in listing method
	IsException   bool             `json:"isException"`  // [READ-ONLY] it does not make sense to write it
	HasReminder   bool             `json:"hasReminder"`  // [READ-ONLY]
	IsRecurrent   bool             `json:"isRecurrent"`  // [READ-ONLY]
	IsCancelled   bool             `json:"isCancelled"`  // [READ-ONLY] is cancelled by organiser
	SeqNumber     int              `json:"seqNumber"`    // [READ-ONLY]
	Modification  ModificationType `json:"modification"` // [WRITE-ONLY]
}

type OccurrenceList

type OccurrenceList []Occurrence

type OperatorCallStatus

type OperatorCallStatus string
const (
	OcsUnknown   OperatorCallStatus = "OcsUnknown" // Disconnected, invalid callId, or other error
	OcsPickUp    OperatorCallStatus = "OcsPickUp"
	OcsRinging   OperatorCallStatus = "OcsRinging"
	OcsConnected OperatorCallStatus = "OcsConnected"
)

type OperatorExtension

type OperatorExtension struct {
	ExtensionId  KId    `json:"extensionId"`
	TelNum       string `json:"telNum"`
	Description  string `json:"description"`
	IsRegistered bool   `json:"isRegistered"`
}

type OperatorExtensionList

type OperatorExtensionList []OperatorExtension

type OptionalEntity

type OptionalEntity struct {
	Enabled bool   `json:"enabled"`
	Id      KId    `json:"id"` // global identifier
	Name    string `json:"name"`
}

OptionalEntity - Note: all fields must be assigned if used in set methods

type OptionalLong

type OptionalLong struct {
	Enabled bool `json:"enabled"`
	Value   int  `json:"value"`
}

OptionalLong - Note: all fields must be assigned if used in set methods

type OptionalString

type OptionalString struct {
	Enabled bool   `json:"enabled"`
	Value   string `json:"value"`
}

OptionalString - Note: all fields must be assigned if used in set methods

type OutOfOfficeSettings

type OutOfOfficeSettings struct {
	IsEnabled          bool        `json:"isEnabled"`
	Text               string      `json:"text"`
	IsTimeRangeEnabled bool        `json:"isTimeRangeEnabled"`
	TimeRangeStart     UtcDateTime `json:"timeRangeStart"`
	TimeRangeEnd       UtcDateTime `json:"timeRangeEnd"`
}

type OutboundDelagation

type OutboundDelagation struct {
	Principal Principal `json:"principal"`
	IsInboxRW bool      `json:"isInboxRW"`
}

type OutboundDelagationList

type OutboundDelagationList []OutboundDelagation

type PartStatus

type PartStatus string

PartStatus - specified by the property. If not specified, the default value is PartNotResponded.

const (
	PartNotResponded PartStatus = "PartNotResponded" // Event needs action
	PartAccepted     PartStatus = "PartAccepted"     // Event accepted
	PartDeclined     PartStatus = "PartDeclined"     // Event declined
	PartDelegated    PartStatus = "PartDelegated"    // Event delegated
	PartTentative    PartStatus = "PartTentative"    // Event tentatively accepted
)

type PartStatusResponse

type PartStatusResponse struct {
	Status  PartStatus `json:"status"`
	Message string     `json:"message"`
}

PartStatusResponse - Response to particular occurrence or event.

type PasswordPolicy

type PasswordPolicy struct {
	IsEnabled bool `json:"isEnabled"`
	MinLength int  `json:"minLength"`
}

PasswordPolicy - If this policy is enabled, passwords must meet the following minimum requirements when they are changed or created: - Passwords must not contain the user's entire and checks are not case sensitive - Passwords must contain characters from three of the following five categories: - Uppercase characters of European languages (A through Z, with diacritic marks, Greek and Cyrillic characters) - Lowercase characters of European languages (a through z, sharp-s, with diacritic marks, Greek and Cyrillic characters) - Base 10 digits (0 through 9) - Nonalphanumeric characters: ~!@#$%^&*_-+=`|\(){}[]:;"'<>,.?/ - Any Unicode character that is categorized as an alphabetic character but is not uppercase or lowercase. This includes Unicode characters from Asian languages.

type PersonalContact

type PersonalContact struct {
	CommonName           string           `json:"commonName"`
	FirstName            string           `json:"firstName"`
	MiddleName           string           `json:"middleName"`
	SurName              string           `json:"surName"`
	TitleBefore          string           `json:"titleBefore"`
	TitleAfter           string           `json:"titleAfter"`
	NickName             string           `json:"nickName"`
	PhoneNumberWorkVoice string           `json:"phoneNumberWorkVoice"`
	PhoneNumberMobile    string           `json:"phoneNumberMobile"`
	PostalAddressWork    PostalAddress    `json:"postalAddressWork"`
	UrlWork              string           `json:"urlWork"`
	BirthDay             UtcDateTime      `json:"birthDay"`
	Anniversary          UtcDateTime      `json:"anniversary"`
	CompanyName          string           `json:"companyName"`
	DepartmentName       string           `json:"departmentName"`
	Profession           string           `json:"profession"`
	ManagerName          string           `json:"managerName"`
	AssistantName        string           `json:"assistantName"`
	Comment              string           `json:"comment"`
	IMAddress            string           `json:"IMAddress"`
	Photo                PhotoAttachment  `json:"photo"`
	IsReadOnly           bool             `json:"isReadOnly"`
	EmailAddresses       EmailAddressList `json:"emailAddresses"`
}

PersonalContact - Personal Contact detail.

type PersonalContactList

type PersonalContactList []PersonalContact

type PhoneNumber

type PhoneNumber struct {
	Type      PhoneNumberType `json:"type"`
	Number    string          `json:"number"` // A number - based on the X.500 Telephone Number attribute
	Extension ABExtension     `json:"extension"`
}

PhoneNumber - Structure desribing a contact phone number

type PhoneNumberList

type PhoneNumberList []PhoneNumber

type PhoneNumberType

type PhoneNumberType string

PhoneNumberType - Type of a contact phone number

const (
	TypeAssistant  PhoneNumberType = "TypeAssistant"
	TypeWorkVoice  PhoneNumberType = "TypeWorkVoice"
	TypeWorkFax    PhoneNumberType = "TypeWorkFax"
	TypeCallback   PhoneNumberType = "TypeCallback"
	TypeCar        PhoneNumberType = "TypeCar"
	TypeCompany    PhoneNumberType = "TypeCompany"
	TypeHomeVoice  PhoneNumberType = "TypeHomeVoice"
	TypeHomeFax    PhoneNumberType = "TypeHomeFax"
	TypeIsdn       PhoneNumberType = "TypeIsdn"
	TypeMobile     PhoneNumberType = "TypeMobile"
	TypeOtherVoice PhoneNumberType = "TypeOtherVoice"
	TypeOtherFax   PhoneNumberType = "TypeOtherFax"
	TypePager      PhoneNumberType = "TypePager"
	TypePrimary    PhoneNumberType = "TypePrimary"
	TypeRadio      PhoneNumberType = "TypeRadio"
	TypeTelex      PhoneNumberType = "TypeTelex"
	TypeTtyTdd     PhoneNumberType = "TypeTtyTdd"
	TypeCustom     PhoneNumberType = "TypeCustom" // no type defined
)

type PhotoAttachment

type PhotoAttachment struct {
	Id  string `json:"id"`  // origin ID of attachment or ID from upload response
	Url string `json:"url"` // [READ-ONLY] Relative URL from root of web. Eg.: /webmail/api/download/attachment/ba5767a9-7a70-4c90-a6bf-dc8dd62e259c/14/0-1-0-1/picture.jpg
}

PhotoAttachment - A contact photo. Only JPEG format is supported. Maximum size is 256 kB.

type PostalAddress

type PostalAddress struct {
	Preferred       bool              `json:"preferred"`
	Pobox           string            `json:"pobox"`           // the post office box
	ExtendedAddress string            `json:"extendedAddress"` // e.g., apartment or suite number
	Street          string            `json:"street"`          // the street address
	Locality        string            `json:"locality"`        // the locality (e.g., city)
	State           string            `json:"state"`           // the region (e.g., state or province);
	Zip             string            `json:"zip"`             // the postal code
	Country         string            `json:"country"`         // the country name (full name)
	Label           string            `json:"label"`
	Type            PostalAddressType `json:"type"`
	Extension       ABExtension       `json:"extension"`
}

PostalAddress - Structure describing a postal address in contact.

type PostalAddressList

type PostalAddressList []PostalAddress

PostalAddressList - A sequence of postal addresses.

type PostalAddressType

type PostalAddressType string

PostalAddressType - Type of a postal address

const (
	AddressHome   PostalAddressType = "AddressHome"
	AddressWork   PostalAddressType = "AddressWork"
	AddressOther  PostalAddressType = "AddressOther"
	AddressCustom PostalAddressType = "AddressCustom" // no type defined
)

type PreciseBy

type PreciseBy struct {
	ByDay      LongList `json:"byDay"`
	ByMonthDay LongList `json:"byMonthDay"`
	ByMonth    LongList `json:"byMonth"`
	ByPosition LongList `json:"byPosition"` // 2 = 2nd day, 3 = 3rd day
	ByInterval int      `json:"byInterval"` // 2 = every 2nd day, 3 = every 3rd day
}

type Presence

type Presence struct {
	ContactId ContactId   `json:"contactId"`
	Status    Status      `json:"status"`
	Text      string      `json:"text"`
	Date      UtcDateTime `json:"date"`
}

type PresenceList

type PresenceList []Presence

type Principal

type Principal struct {
	Id          KId           `json:"id"` // global identification
	Type        PrincipalType `json:"type"`
	DisplayName string        `json:"displayName"`
	MailAddress string        `json:"mailAddress"`
}

type PrincipalList

type PrincipalList []Principal

type PrincipalType

type PrincipalType string

type PriorityType

type PriorityType string
const (
	Normal PriorityType = "Normal" // default value
	Low    PriorityType = "Low"
	High   PriorityType = "High"
)

type ProtocolType

type ProtocolType string

type QuotaInfo

type QuotaInfo struct {
	MessagesLimit          int    `json:"messagesLimit"`          // Maximum number of messages that current user is allowed to have, value 0 means user has no limit
	MessagesUsed           int    `json:"messagesUsed"`           // Number of messages that curent user has
	SpaceLimit             uint64 `json:"spaceLimit"`             // Maximum amount of space [Bytes] reserved for current user, value 0 means user has no limit
	SpaceUsed              uint64 `json:"spaceUsed"`              // Amount of space [Bytes] consumed by current user
	PercentLimitForWarning int    `json:"percentLimitForWarning"` // Value in percent that user has to exceed to be warned
}

QuotaInfo - Stores user's quota info

type RecurrenceRule

type RecurrenceRule struct {
	IsSet     bool          `json:"isSet"`
	Frequency FrequencyType `json:"frequency"` // period in which event occurs
	EndBy     EndBy         `json:"endBy"`     // end limitation
	PreciseBy PreciseBy     `json:"preciseBy"` // further specification
}

type Reminder

type Reminder struct {
	IsSet              bool         `json:"isSet"`
	Type               ReminderType `json:"type"` // if it is not send the default value is 'ReminderRelative'
	MinutesBeforeStart int          `json:"minutesBeforeStart"`
	Date               UtcDateTime  `json:"date"`
}

type ReminderType

type ReminderType string
const (
	ReminderRelative ReminderType = "ReminderRelative"
	ReminderAbsolute ReminderType = "ReminderAbsolute"
)

type RemoteItem

type RemoteItem struct {
	Url         string      `json:"url"`
	Flags       uint64      `json:"flags"`
	ReceiveDate UtcDateTime `json:"receiveDate"`
	IsMove      bool        `json:"isMove"`
}

type RemoteItemList

type RemoteItemList []RemoteItem

type Resource

type Resource struct {
	Name        string       `json:"name"`        // resource name
	Address     string       `json:"address"`     // email of resource
	Description string       `json:"description"` // resource description
	Type        ResourceType `json:"type"`        // type of the resource
}

Resource - Resource details [READ-ONLY]

type ResourceList

type ResourceList []Resource

ResourceList - List of resources

type ResourceType

type ResourceType string

ResourceType - Export format type

const (
	ResourceRoom      ResourceType = "ResourceRoom"      // resource is a room
	ResourceEquipment ResourceType = "ResourceEquipment" // resource is something else, eg: a car
)

type RestrictionKind

type RestrictionKind string

RestrictionKind - A kind of restriction

const (
	Regex                  RestrictionKind = "Regex"                  // regular expression
	ByteLength             RestrictionKind = "ByteLength"             // maximal length in Bytes
	ForbiddenNameList      RestrictionKind = "ForbiddenNameList"      // list of denied exact names due to filesystem or KMS store
	ForbiddenPrefixList    RestrictionKind = "ForbiddenPrefixList"    // list of denied preffixes due to filesystem or KMS store
	ForbiddenSuffixList    RestrictionKind = "ForbiddenSuffixList"    // list of denied suffixes due to filesystem or KMS store
	ForbiddenCharacterList RestrictionKind = "ForbiddenCharacterList" // list of denied characters
)

type SearchQuery

type SearchQuery struct {
	Fields     StringList       `json:"fields"`     // empty = give me all fields, applicable constants: ADD_USERS, LIST_USERS
	Conditions SubConditionList `json:"conditions"` // empty = without condition
	Combining  LogicalOperator  `json:"combining"`  // the list of conditions can be either combined by 'ORs' or 'ANDs'
	Start      int              `json:"start"`      // how many items to skip before filling a result list (0 means skip none)
	Limit      int              `json:"limit"`      // how many items to put to a result list (if there are enough items); applicable constant: Unlimited
	OrderBy    SortOrderList    `json:"orderBy"`
}

SearchQuery - General Query for Searching Query substitution (quicksearch): SearchQuery doesn't support complex queries, only queries with all AND operators (or all OR operators) are supported. Combination of AND and OR is not allowed. This limitation is for special cases solved by using substitution of complicated query-part by simple condition. Only the quicksearch is currently implemented and only in "Users::get()" method. Behavior of quicksearch in Users::get(): QUICKSEACH = "x" is equal to: (loginName = "x") OR (fullName = "x") QUICKSEACH LIKE "x*" is equal to: (loginName LIKE "x*") OR (fullName LIKE "x*") SearchQuery - QUICKSEACH <> "x" is equal to: (loginName <> "x") AND (fullName <> "x")

type SetResult

type SetResult struct {
	InputIndex int       `json:"inputIndex"` // 0-based index to input array, e.g. 3 means that the relates to the 4th element of the input parameter array
	Id         KId       `json:"id"`         // if not empty the item was moved and its ID was changed to this value
	Watermark  Watermark `json:"watermark"`  // item version from journal
}

SetResult - Details about a particular item updated.

type SetResultList

type SetResultList []SetResult

type SettingPath

type SettingPath []string

type SettingQuery

type SettingQuery []SettingPath

type SharedMailbox

type SharedMailbox struct {
	Principal           Principal  `json:"principal"` // types [ptUser, ptResource]
	MailboxId           KId        `json:"mailboxId"` // root folder ID
	IsLoaded            bool       `json:"isLoaded"`  // folders are loaded (are present on the same home server)
	Folders             FolderList `json:"folders"`   // folders with at least listing-only righs
	SubscribedFolderIds KIdList    `json:"subscribedFolderIds"`
}

type SharedMailboxList

type SharedMailboxList []SharedMailbox

type SignInfo

type SignInfo struct {
	IsSigned bool               `json:"isSigned"`
	IsValid  bool               `json:"isValid"`
	Error    LocalizableMessage `json:"error"`
	Cert     Certificate        `json:"cert"`
}

type SizeLimit

type SizeLimit struct {
	IsActive bool               `json:"isActive"`
	Limit    ByteValueWithUnits `json:"limit"`
}

SizeLimit - Note: all fields must be assigned if used in set methods

type SortDirection

type SortDirection string

SortDirection - Sorting Direction

const (
	Asc  SortDirection = "Asc"  // ascending order
	Desc SortDirection = "Desc" // descending order
)

type SortOrder

type SortOrder struct {
	ColumnName    string        `json:"columnName"`
	Direction     SortDirection `json:"direction"`
	CaseSensitive bool          `json:"caseSensitive"`
}

SortOrder - Sorting Order

type SortOrderList

type SortOrderList []SortOrder

SortOrderList - List of Sorting Orders

type SpamSettings

type SpamSettings struct {
	IsEnabled           bool       `json:"isEnabled"`           // If enabled then spam is moved to the Junk E-mail folder
	WhiteListContacts   bool       `json:"whiteListContacts"`   // Also trust senders from Contacts folder
	AutoupdateWhiteList bool       `json:"autoupdateWhiteList"` // If enable e-mail address of original sender will be added into white list while sending reply
	WhiteList           StringList `json:"whiteList"`           // Trust to these senders
}

type Status

type Status string

type StoreStatus

type StoreStatus string

StoreStatus - Status of entry in persistent manager

const (
	StoreStatusClean    StoreStatus = "StoreStatusClean"    // already present in configuration store
	StoreStatusModified StoreStatus = "StoreStatusModified" // update waiting for apply()
	StoreStatusNew      StoreStatus = "StoreStatusNew"      // added to manager but not synced to configuration store
)

type StringList

type StringList []string

StringList - Type for lists of strings.

type SubCondition

type SubCondition struct {
	FieldName  string          `json:"fieldName"`  // left side of condition
	Comparator CompareOperator `json:"comparator"` // middle of condition
	Value      string          `json:"value"`      // right side of condition
}

SubCondition - A Part of a Condition

type SubConditionList

type SubConditionList []SubCondition

SubConditionList - A Complete Condition

type SyncFolder

type SyncFolder struct {
	Id           KId             `json:"id"`           // [READ-ONLY] global identification
	ParentId     KId             `json:"parentId"`     // [READ-ONLY] global identification
	Name         string          `json:"name"`         // [READ-ONLY] folder name displayed in folder tree
	Type         FolderType      `json:"type"`         // [READ-ONLY] type of the folder
	SubType      FolderSubType   `json:"subType"`      // [READ-ONLY] type of the folder
	PlaceType    FolderPlaceType `json:"placeType"`    // [READ-ONLY] type of place where is folder placed
	NestingLevel int             `json:"nestingLevel"` // [READ-ONLY] number 0 = root folder, 1 = subfolders of root folder, 2 = subfolder of subfolder, ...
	OwnerName    string          `json:"ownerName"`    // [READ-ONLY] name of owner of folder (available only for 'FPlacePeople', 'FPlaceResources' and 'FPlaceLocations')
	EmailAddress string          `json:"emailAddress"` // [READ-ONLY] email of owner of folder (available only for 'FPlacePeople', 'FPlaceResources' and 'FPlaceLocations')
	IsSelectable bool            `json:"isSelectable"` // [READ-ONLY] false if a setting of this folder cannot be modified
	Synchronize  bool            `json:"synchronize"`  // true if should be this folder synchronize
}

SyncFolder - Class with methods for integration

type SyncFolderList

type SyncFolderList []SyncFolder

type SyncKey

type SyncKey struct {
	Id             int                `json:"id"`
	Version        int                `json:"version"`
	Watermark      Watermark          `json:"watermark"`
	PublicFolder   Watermark          `json:"publicFolder"`
	AccountSyncKey AccountSyncKeyList `json:"accountSyncKey"`
}

type SyncMethod

type SyncMethod string

SyncMethod - Used synchronization method.

const (
	ServerWins SyncMethod = "ServerWins"
	ClientWins SyncMethod = "ClientWins"
)

type Task

type Task struct {
	Id          KId            `json:"id"`       // [READ-ONLY] global identification
	FolderId    KId            `json:"folderId"` // [REQUIRED FOR CREATE] [WRITE-ONCE] global identification of folder in which is the event defined
	Watermark   Watermark      `json:"watermark"`
	Access      EventAccess    `json:"access"` // [READ-ONLY] scope of access of user to this event
	Summary     string         `json:"summary"`
	Location    string         `json:"location"`
	Description string         `json:"description"`
	Status      TaskStatus     `json:"status"`
	Start       UtcDateTime    `json:"start"`
	Due         UtcDateTime    `json:"due"`  // Deadline
	End         UtcDateTime    `json:"end"`  // [READ-ONLY] Date when task was completed. Valid only if the status is 'tsCompleted'.
	Done        int            `json:"done"` // Percent completed. If the status is set to 'tsCompleted' this value is always set to 100%.
	Priority    PriorityType   `json:"priority"`
	Rule        RecurrenceRule `json:"rule"`
	Attendees   AttendeeList   `json:"attendees"`
	Reminder    Reminder       `json:"reminder"`
	SortOrder   int            `json:"sortOrder"` // [0-7FFFFFFF] Zero means a newest tasks.
	IsPrivate   bool           `json:"isPrivate"`
	IsCancelled bool           `json:"isCancelled"` // [READ-ONLY] is canceled by organizer
}

Task - Task details

type TaskList

type TaskList []Task

TaskList - List of resources

type TaskStatus

type TaskStatus string

type Time

type Time struct {
	Hour int `json:"hour"` // 0-23
	Min  int `json:"min"`  // 0-59
}

Time When using start and limit to only get a part of all results (e.g. only 20 users, skipping the first 40 users), use this special limit value for unlimited count (of course the service still respects the value of start). Note that each service is allowed to use its safety limit (such as 50,000) to prevent useless overload. The limits are documented per-service or per-method. Implementation note: Some source code transformations may lead to signed long, i.e. 4294967295. But the correct value is -1. Date and Time - should be used instead of time_t, where time zones can affect time interpretation Time - Note: all fields must be assigned if used in set methods

type Url

type Url struct {
	Type      UrlType     `json:"type"`
	Url       string      `json:"url"`
	Extension ABExtension `json:"extension"`
}

Url - Structure desribing URL

type UrlList

type UrlList []Url

type UrlType

type UrlType string

UrlType - Type of URL

const (
	UrlHome   UrlType = "UrlHome"
	UrlWork   UrlType = "UrlWork"
	UrlOther  UrlType = "UrlOther"
	UrlCustom UrlType = "UrlCustom" // no type defined
)

type UserInfo

type UserInfo struct {
	Id               KId        `json:"id"`               // [READ-ONLY] global id of user
	LoginName        string     `json:"loginName"`        // [READ-ONLY] loginName name, also primary email address
	FullName         string     `json:"fullName"`         // [READ-ONLY] full name
	Emails           StringList `json:"emails"`           // [READ-ONLY]
	PreferredAddress string     `json:"preferredAddress"` // preferred address
	ReplyToAddress   string     `json:"replyToAddress"`   // address for reply
}

UserInfo - Details of the logged user into the webmail.

type UtcDateTime

type UtcDateTime string

type UtcTime

type UtcTime string

type Validity

type Validity struct {
	IsValid bool               `json:"isValid"`
	Error   LocalizableMessage `json:"error"`
}

type Watermark

type Watermark int64

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL