ews

package module
v1.1.5 Latest Latest
Warning

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

Go to latest
Published: Sep 8, 2023 License: MIT Imports: 14 Imported by: 0

README

EWS Exchange Web Service

Exchange Web Service client for golang

usage:

package main

import (
	"fmt"
	"github.com/iubiltekin/ews"
	"github.com/iubiltekin/ews/ewsutil"
	"log"
)

func main() {
	c := ews.NewClient(
		"https://outlook.office365.com/EWS/Exchange.asmx",
		"email",
		"email-password",
		&ews.Config{Dump: true, NTLM: true, SkipTLS: true},
	)

	err := ewsutil.SendEmail(c,
		[]string{"iubiltekin@gmail.com", "someone@else.com"},
		"An email subject",
		"The email body, as plain text", false, nil,
	)

	if err != nil {
		log.Fatal("err>: ", err.Error())
	}

	fmt.Println("--- success ---")
}


Note: if you are using an on-premises Exchange server (or even if you manage your servers at the cloud), you need to pass the username as AD_DOMAINNAME\username instead, for examle MYCOMANY\mhewedy.

Supported Feature matrix:

Category Operation Supported*
eDiscovery operations
Exchange mailbox data operations
CreateItem operation ✔️ (Email & Calendar)
GetUserPhoto ✔️
FindItem ✔️(Email)
GetItem ✔️ (Email)
GetAttachment ✔️
DeleteItem ✔️ (Email)
Availability operations
GetUserAvailability ✔️
GetRoomLists ✔️
Bulk transfer operations
Delegate management operations
Inbox rules operations
Mail app management operations
Mail tips operation
Message tracking operations
Notification operations
Persona operations
FindPeople ✔️
GetPersona ✔️
Retention policy operation
Service configuration operation
Sharing operations
Synchronization operations
Time zone operation
Unified Messaging operations
Unified Contact Store operations
User configuration operations
  • Not always 100% of fields are mapped.

Extras

Besides the operations supported above, few new operations under the namespace ewsutil has been introduced:

  • ewsutil.SendEmail -update
  • ewsutil.CreateEvent
  • ewsutil.ListUsersEvents
  • ewsutil.FindPeople
  • ewsutil.GetUserPhoto
  • ewsutil.GetUserPhotoBase64
  • ewsutil.GetUserPhotoURL
  • ewsutil.GetPersona
  • ewsutil.FindEmail -new
  • ewsutil.GetMail -new
  • ewsutil.DeleteMail -new
  • ewsutil.GetAttachment -new

NTLM is supported as well as Basic authentication

Reference:

https://docs.microsoft.com/en-us/exchange/client-developer/web-service-reference/ews-operations-in-exchange

Documentation

Overview

Package wrapping Exchange Web Service (EWS)

https://docs.microsoft.com/en-us/exchange/client-developer/web-service-reference/ews-operations-in-exchange

Index

Constants

View Source
const (
	DeleteTypeHardDelete         string = "HardDelete"
	DeleteTypeMoveToDeletedItems string = "MoveToDeletedItems"
	DeleteTypeSoftDelete         string = "SoftDelete"
)
View Source
const (
	RequestedViewNone           = "None"
	RequestedViewMergedOnly     = "MergedOnly"
	RequestedViewFreeBusy       = "FreeBusy"
	RequestedViewFreeBusyMerged = "FreeBusyMerged"
	RequestedViewDetailed       = "Detailed"
	RequestedViewDetailedMerged = "DetailedMerged"
)
View Source
const (
	BusyTypeFree      = "Free"
	BusyTypeTentative = "Tentative"
	BusyTypeBusy      = "Busy"
	BusyTypeOOF       = "OOF"
	BusyTypeNoData    = "NoData"
)

Variables

This section is empty.

Functions

func NewError

func NewError(resp *http.Response) error

Types

type AdditionalProperties

type AdditionalProperties struct {
	FieldURI []FieldURI `xml:"t:FieldURI,omitempty"`
}

type ArrayOfAttendeeConflictData

type ArrayOfAttendeeConflictData struct {
	UnknownAttendeeConflictData     string                    `xml:"UnknownAttendeeConflictData"`
	IndividualAttendeeConflictData  string                    `xml:"IndividualAttendeeConflictData"`
	TooBigGroupAttendeeConflictData string                    `xml:"TooBigGroupAttendeeConflictData"`
	GroupAttendeeConflictData       GroupAttendeeConflictData `xml:"GroupAttendeeConflictData"`
}

type AttachmentId

type AttachmentId struct {
	Id string `xml:"Id,attr"`
}

type AttachmentItemMessage

type AttachmentItemMessage struct {
	AttachmentId AttachmentId `xml:"t:AttachmentId"`
}

type Attachments

type Attachments struct {
	FileAttachment []FileAttachment `xml:"FileAttachment"`
}

type Attendee

type Attendee struct {
	Mailbox Mailbox `xml:"t:Mailbox"`
}

type AttendeeType

type AttendeeType string
const (
	AttendeeTypeOrganizer AttendeeType = "Organizer"
	AttendeeTypeRequired  AttendeeType = "Required"
	AttendeeTypeOptional  AttendeeType = "Optional"
	AttendeeTypeRoom      AttendeeType = "Room"
	AttendeeTypeResource  AttendeeType = "Resource"
)

type Attendees

type Attendees struct {
	Attendee []Attendee `xml:"t:Attendee"`
}

type BaseFiltering

type BaseFiltering struct {
	AdditionalProperties `xml:"t:FieldURI"`
}

type BasePoint

type BasePoint string
const (
	BasePointBeginning BasePoint = "Beginning"
	BasePointEnd       BasePoint = "End"
)

type BaseShape

type BaseShape string
const (
	BaseShapeIdOnly        BaseShape = "IdOnly"
	BaseShapeDefault       BaseShape = "Default"
	BaseShapeAllProperties BaseShape = "AllProperties"
)

type Body

type Body struct {
	BodyType string `xml:"BodyType,attr"`
	Body     []byte `xml:",chardata"`
}

type BooleanType

type BooleanType bool

type BusinessPhoneNumbers

type BusinessPhoneNumbers struct {
	PhoneNumberAttributedValue PhoneNumberAttributedValue `xml:"PhoneNumberAttributedValue"`
}

type BusyType

type BusyType string

type CalendarEvent

type CalendarEvent struct {
	StartTime            Time                 `xml:"StartTime"`
	EndTime              Time                 `xml:"EndTime"`
	BusyType             BusyType             `xml:"BusyType"`
	CalendarEventDetails CalendarEventDetails `xml:"CalendarEventDetails"`
}

type CalendarEventArray

type CalendarEventArray struct {
	CalendarEvent []CalendarEvent `xml:"CalendarEvent"`
}

type CalendarEventDetails

type CalendarEventDetails struct {
	ID            string `xml:"ID"`
	Subject       string `xml:"Subject"`
	Location      string `xml:"Location"`
	IsMeeting     bool   `xml:"IsMeeting"`
	IsRecurring   bool   `xml:"IsRecurring"`
	IsException   bool   `xml:"IsException"`
	IsReminderSet bool   `xml:"IsReminderSet"`
	IsPrivate     bool   `xml:"IsPrivate"`
}

type CalendarItem

type CalendarItem struct {
	Subject                    string      `xml:"t:Subject"`
	Body                       Body        `xml:"t:Body"`
	ReminderIsSet              bool        `xml:"t:ReminderIsSet"`
	ReminderMinutesBeforeStart int         `xml:"t:ReminderMinutesBeforeStart"`
	Start                      time.Time   `xml:"t:Start"`
	End                        time.Time   `xml:"t:End"`
	IsAllDayEvent              bool        `xml:"t:IsAllDayEvent"`
	LegacyFreeBusyStatus       string      `xml:"t:LegacyFreeBusyStatus"`
	Location                   string      `xml:"t:Location"`
	RequiredAttendees          []Attendees `xml:"t:RequiredAttendees"`
	OptionalAttendees          []Attendees `xml:"t:OptionalAttendees"`
	Resources                  []Attendees `xml:"t:Resources"`
}

type Client

type Client interface {
	SendAndReceive(body []byte) ([]byte, error)
	GetEWSAddr() string
	GetUsername() string
}

func NewClient

func NewClient(ewsAddr, username, password string, config *Config) Client

func NewClientWithLoginStrategy added in v1.1.4

func NewClientWithLoginStrategy(ewsAddr, email string, loginStrategy LoginStrategy, config *Config) Client

type Config

type Config struct {
	Dump    bool
	NTLM    bool
	SkipTLS bool
	RTMutex *sync.Mutex
}

type Constant

type Constant struct {
	Value string `xml:"Value,attr,omitempty"`
}

type Contains

type Contains struct {
	BaseFiltering
	Constant              []Constant `xml:"t:Constant,omitempty"`
	ContainmentMode       string     `xml:"ContainmentMode,attr"`
	ContainmentComparison string     `xml:"ContainmentComparison,attr"`
}

type CreateAttachments

type CreateAttachments struct {
	CreateFileAttachment []CreateFileAttachment `xml:"t:FileAttachment"`
}

type CreateFileAttachment

type CreateFileAttachment struct {
	Name           string `xml:"t:Name"`
	IsInline       bool   `xml:"t:IsInline"`
	IsContactPhoto bool   `xml:"t:IsContactPhoto"`
	Content        string `xml:"t:Content"`
}

type CreateItem

type CreateItem struct {
	XMLName                struct{}          `xml:"m:CreateItem"`
	MessageDisposition     string            `xml:"MessageDisposition,attr"`
	SendMeetingInvitations string            `xml:"SendMeetingInvitations,attr"`
	SavedItemFolderId      SavedItemFolderId `xml:"m:SavedItemFolderId"`
	Items                  Items             `xml:"m:Items"`
}

type CreateItemResponse

type CreateItemResponse struct {
	ResponseMessages ResponseMessages `xml:"ResponseMessages"`
}

type DeleteItemMessage

type DeleteItemMessage struct {
	ItemId ItemId `xml:"t:ItemId"`
}

type DeleteItemRequest

type DeleteItemRequest struct {
	XMLName    struct{}            `xml:"m:DeleteItem"`
	DeleteType string              `xml:"DeleteType,attr"`
	Items      []DeleteItemMessage `xml:"m:ItemIds"`
}

type DeleteItemResponseMessage

type DeleteItemResponseMessage struct {
	Response
}

type DeleteItemResponseMessages

type DeleteItemResponseMessages struct {
	DeleteItemResponseMessage DeleteItemResponseMessage `xml:"DeleteItemResponseMessage"`
}

type Departments

type Departments struct {
	StringAttributedValue StringAttributedValue `xml:"StringAttributedValue"`
}

type DistinguishedFolderId

type DistinguishedFolderId struct {
	// List of values:
	// https://docs.microsoft.com/en-us/exchange/client-developer/web-service-reference/distinguishedfolderid
	Id string `xml:"Id,attr"`
}

type Email

type Email struct {
	Name        string `xml:"t:Name"`
	Address     string `xml:"t:Address"`
	RoutingType string `xml:"t:RoutingType"`
}

type EmailAddress

type EmailAddress struct {
	Name         string `xml:"Name"`
	EmailAddress string `xml:"EmailAddress"`
	RoutingType  string `xml:"RoutingType"`
	MailboxType  string `xml:"MailboxType"`
	ItemId       ItemId `xml:"ItemId"`
}

type EmailBody

type EmailBody struct {
	BodyType    string `xml:"BodyType,attr"`
	IsTruncated string `xml:"IsTruncated,attr"`
	InnerXML    string `xml:",innerxml"`
}

type Fault

type Fault struct {
	Faultcode   string `xml:"faultcode"`
	Faultstring string `xml:"faultstring"`
	Detail      detail `xml:"detail"`
}

type FieldURI

type FieldURI struct {
	// List of possible values:
	// https://docs.microsoft.com/en-us/exchange/client-developer/web-service-reference/fielduri
	FieldURI string `xml:"FieldURI,attr,omitempty"`
}

type FieldURIOrConstant

type FieldURIOrConstant struct {
	Constant []Constant `xml:"t:Constant,omitempty"`
}

type FileAttachment

type FileAttachment struct {
	AttachmentId     AttachmentId `xml:"AttachmentId"`
	Name             string       `xml:"Name"`
	ContentType      string       `xml:"ContentType"`
	Size             uint64       `xml:"Size"`
	LastModifiedTime Time         `xml:"LastModifiedTime"`
	IsInline         bool         `xml:"IsInline"`
	IsContactPhoto   bool         `xml:"IsContactPhoto"`
}

type FindItemMessage

type FindItemMessage struct {
	ItemId  ItemId `xml:"ItemId"`
	Subject string `xml:"Subject"`
}

type FindItemRequest

type FindItemRequest struct {
	XMLName             struct{}            `xml:"m:FindItem"`
	Traversal           string              `xml:"Traversal,attr"`
	ItemShape           ItemShape           `xml:"m:ItemShape"`
	IndexedPageItemView IndexedPageItemView `xml:"m:IndexedPageItemView"`
	ParentFolderIds     ParentFolderIds     `xml:"m:ParentFolderIds"`
	Restriction         Restriction         `xml:"m:Restriction"`
}

type FindItemResponse

type FindItemResponse struct {
	FindItemResponseMessages FindItemResponseMessages `xml:"ResponseMessages"`
}

type FindItemResponseMessage

type FindItemResponseMessage struct {
	Response
	RootFolder *RootFolder `xml:"RootFolder"`
}

type FindItemResponseMessages

type FindItemResponseMessages struct {
	FindItemResponseMessage FindItemResponseMessage `xml:"FindItemResponseMessage"`
}

type FindItems

type FindItems struct {
	Message []FindItemMessage `xml:"Message"`
}

type FindPeopleRequest

type FindPeopleRequest struct {
	XMLName             struct{}            `xml:"m:FindPeople"`
	PersonaShape        *PersonaShape       `xml:"m:PersonaShape,omitempty"`
	IndexedPageItemView IndexedPageItemView `xml:"m:IndexedPageItemView"`
	ParentFolderId      ParentFolderId      `xml:"m:ParentFolderId"`
	QueryString         string              `xml:"m:QueryString,omitempty"`
}

type FindPeopleResponse

type FindPeopleResponse struct {
	Response
	People                    People `xml:"People"`
	TotalNumberOfPeopleInView int    `xml:"TotalNumberOfPeopleInView"`
	FirstMatchingRowIndex     int    `xml:"FirstMatchingRowIndex"`
	FirstLoadedRowIndex       int    `xml:"FirstLoadedRowIndex"`
}

type FreeBusyResponse

type FreeBusyResponse struct {
	ResponseMessage ResponseMessage `xml:"ResponseMessage"`
	FreeBusyView    FreeBusyView    `xml:"FreeBusyView"`
}

type FreeBusyResponseArray

type FreeBusyResponseArray struct {
	FreeBusyResponse []FreeBusyResponse `xml:"FreeBusyResponse"`
}

type FreeBusyView

type FreeBusyView struct {
	FreeBusyViewType   string             `xml:"FreeBusyViewType"`
	MergedFreeBusy     string             `xml:"MergedFreeBusy"`
	CalendarEventArray CalendarEventArray `xml:"CalendarEventArray"`
	WorkingHours       WorkingHours       `xml:"WorkingHours"`
}

type FreeBusyViewOptions

type FreeBusyViewOptions struct {
	TimeWindow                      TimeWindow `xml:"t:TimeWindow"`
	MergedFreeBusyIntervalInMinutes int        `xml:"t:MergedFreeBusyIntervalInMinutes,omitempty"`
	RequestedView                   string     `xml:"t:RequestedView"`
}

type From

type From struct {
	Mailbox []GetItemEmailAddress `xml:"Mailbox"`
}

type GetAttachmentRequest

type GetAttachmentRequest struct {
	XMLName struct{}                `xml:"m:GetAttachment"`
	Items   []AttachmentItemMessage `xml:"m:AttachmentIds"`
}

type GetAttachmentResponseMessage

type GetAttachmentResponseMessage struct {
	Response
	Attachments GetAttachments `xml:"Attachments"`
}

type GetAttachmentResponseMessages

type GetAttachmentResponseMessages struct {
	GetAttachmentResponseMessage GetAttachmentResponseMessage `xml:"GetAttachmentResponseMessage"`
}

type GetAttachments added in v1.1.2

type GetAttachments struct {
	FileAttachment []GetFileAttachment `xml:"FileAttachment"`
}

type GetFileAttachment added in v1.1.2

type GetFileAttachment struct {
	AttachmentId   AttachmentId `xml:"AttachmentId"`
	Name           string       `xml:"Name"`
	ContentType    string       `xml:"ContentType"`
	Content        string       `xml:"Content"`
	IsInline       bool         `xml:"IsInline"`
	IsContactPhoto bool         `xml:"IsContactPhoto"`
}

type GetItemEmailAddress

type GetItemEmailAddress struct {
	Name         string `xml:"Name"`
	EmailAddress string `xml:"EmailAddress"`
	RoutingType  string `xml:"RoutingType"`
	MailboxType  string `xml:"MailboxType"`
}

type GetItemMessage

type GetItemMessage struct {
	ItemId ItemId `xml:"t:ItemId"`
}

type GetItemRequest

type GetItemRequest struct {
	XMLName   struct{}         `xml:"m:GetItem"`
	ItemShape GetItemShape     `xml:"m:ItemShape"`
	Items     []GetItemMessage `xml:"m:ItemIds"`
}

type GetItemResponseMessage

type GetItemResponseMessage struct {
	Response
	Items GetItems `xml:"Items"`
}

type GetItemResponseMessages

type GetItemResponseMessages struct {
	GetItemResponseMessage GetItemResponseMessage `xml:"GetItemResponseMessage"`
}

type GetItemShape

type GetItemShape struct {
	BaseShape          BaseShape   `xml:"t:BaseShape"`
	IncludeMimeContent BooleanType `xml:"t:IncludeMimeContent"`
}

type GetItems

type GetItems struct {
	Message []ItemMessage `xml:"Message"`
}

type GetPersonaRequest

type GetPersonaRequest struct {
	XMLName   struct{}  `xml:"m:GetPersona"`
	PersonaId PersonaId `xml:"m:PersonaId"`
}

type GetRoomListsRequest

type GetRoomListsRequest struct {
	XMLName struct{} `xml:"m:GetRoomLists"`
}

type GetRoomListsResponse

type GetRoomListsResponse struct {
	Response
	RoomLists RoomLists `xml:"RoomLists"`
}

func GetRoomLists

func GetRoomLists(c Client) (*GetRoomListsResponse, error)

type GetUserAvailabilityRequest

type GetUserAvailabilityRequest struct {
	XMLName             struct{}            `xml:"m:GetUserAvailabilityRequest"`
	TimeZone            TimeZone            `xml:"t:TimeZone"`
	MailboxDataArray    MailboxDataArray    `xml:"m:MailboxDataArray"`
	FreeBusyViewOptions FreeBusyViewOptions `xml:"t:FreeBusyViewOptions"`
}

type GetUserAvailabilityResponse

type GetUserAvailabilityResponse struct {
	FreeBusyResponseArray FreeBusyResponseArray `xml:"FreeBusyResponseArray"`
	SuggestionsResponse   SuggestionsResponse   `xml:"SuggestionsResponse"`
}

type GetUserPhotoRequest

type GetUserPhotoRequest struct {
	XMLName       struct{} `xml:"m:GetUserPhoto"`
	Email         string   `xml:"m:Email"`
	SizeRequested string   `xml:"m:SizeRequested"`
}

type GetUserPhotoResponse

type GetUserPhotoResponse struct {
	Response
	HasChanged  bool   `xml:"HasChanged"`
	PictureData string `xml:"PictureData"`
}

type GroupAttendeeConflictData

type GroupAttendeeConflictData struct {
	NumberOfMembers             int `xml:"NumberOfMembers"`
	NumberOfMembersAvailable    int `xml:"NumberOfMembersAvailable"`
	NumberOfMembersWithConflict int `xml:"NumberOfMembersWithConflict"`
	NumberOfMembersWithNoData   int `xml:"NumberOfMembersWithNoData"`
}

type HTTPError

type HTTPError struct {
	Status     string
	StatusCode int
}

func (HTTPError) Error

func (s HTTPError) Error() string

type IndexedPageItemView

type IndexedPageItemView struct {
	MaxEntriesReturned int       `xml:"MaxEntriesReturned,attr,omitempty"`
	Offset             int       `xml:"Offset,attr"`
	BasePoint          BasePoint `xml:"BasePoint,attr"`
}

type IsEqualTo

type IsEqualTo struct {
	BaseFiltering
	FieldURIOrConstant FieldURIOrConstant `xml:"t:FieldURIOrConstant"`
}

type ItemId

type ItemId struct {
	Id        string `xml:"Id,attr"`
	ChangeKey string `xml:"ChangeKey,attr"`
}

type ItemMessage

type ItemMessage struct {
	ItemId                     ItemId      `xml:"ItemId"`
	Subject                    string      `xml:"Subject"`
	MimeContent                MimeContent `xml:"MimeContent"`
	Sensitivity                string      `xml:"Sensitivity"`
	Body                       EmailBody   `xml:"Body"`
	Attachments                Attachments `xml:"Attachments"`
	Size                       uint64      `xml:"Size"`
	DateTimeSent               Time        `xml:"DateTimeSent"`
	DateTimeCreated            Time        `xml:"DateTimeCreated"`
	HasAttachments             BooleanType `xml:"HasAttachments"`
	IsAssociated               BooleanType `xml:"IsAssociated"`
	ToRecipients               From        `xml:"ToRecipients"`
	IsReadReceiptRequested     BooleanType `xml:"IsReadReceiptRequested"`
	IsDeliveryReceiptRequested BooleanType `xml:"IsDeliveryReceiptRequested"`
	From                       From        `xml:"From"`
	IsRead                     BooleanType `xml:"IsRead"`
}

type ItemShape

type ItemShape struct {
	BaseShape            BaseShape            `xml:"t:BaseShape"`
	AdditionalProperties AdditionalProperties `xml:"t:AdditionalProperties"`
}

type Items

type Items struct {
	Message      []Message      `xml:"t:Message"`
	CalendarItem []CalendarItem `xml:"t:CalendarItem"`
}

type LoginStrategy added in v1.1.4

type LoginStrategy interface {
	SetLoginHeaders(req *http.Request)
}

type Mailbox

type Mailbox struct {
	EmailAddress string `xml:"t:EmailAddress"`
}

type MailboxData

type MailboxData struct {
	Email            Email        `xml:"t:Email"`
	AttendeeType     AttendeeType `xml:"t:AttendeeType"`
	ExcludeConflicts bool         `xml:"t:ExcludeConflicts"`
}

type MailboxDataArray

type MailboxDataArray struct {
	MailboxData []MailboxData `xml:"t:MailboxData"`
}

type Message

type Message struct {
	ItemClass    string             `xml:"t:ItemClass"`
	Subject      string             `xml:"t:Subject"`
	Body         Body               `xml:"t:Body"`
	Sender       OneMailbox         `xml:"t:Sender"`
	ToRecipients XMailbox           `xml:"t:ToRecipients"`
	Attachments  *CreateAttachments `xml:"t:Attachments"`
}

type MessageXml

type MessageXml struct {
	ExceptionType       string `xml:"ExceptionType"`
	ExceptionCode       string `xml:"ExceptionCode"`
	ExceptionServerName string `xml:"ExceptionServerName"`
	ExceptionMessage    string `xml:"ExceptionMessage"`
}

type MimeContent

type MimeContent struct {
	CharacterSet string `xml:"CharacterSet,attr"`
	InnerXML     string `xml:",innerxml"`
}

type MobilePhones

type MobilePhones struct {
	PhoneNumberAttributedValue PhoneNumberAttributedValue `xml:"PhoneNumberAttributedValue"`
}

type OfficeLocations

type OfficeLocations struct {
	StringAttributedValue StringAttributedValue `xml:"StringAttributedValue"`
}

type OneMailbox

type OneMailbox struct {
	Mailbox Mailbox `xml:"t:Mailbox"`
}

type ParentFolderId

type ParentFolderId struct {
	DistinguishedFolderId DistinguishedFolderId `xml:"t:DistinguishedFolderId"`
}

type ParentFolderIds

type ParentFolderIds struct {
	DistinguishedFolderId DistinguishedFolderId `xml:"t:DistinguishedFolderId"`
}

type People

type People struct {
	Persona []Persona `xml:"Persona"`
}

type Persona

type Persona struct {
	PersonaId            PersonaId            `xml:"PersonaId"`
	DisplayName          string               `xml:"DisplayName"`
	Title                string               `xml:"Title"`
	Department           string               `xml:"Department"`
	Departments          Departments          `xml:"Departments"`
	EmailAddress         EmailAddress         `xml:"EmailAddress"`
	RelevanceScore       int                  `xml:"RelevanceScore"`
	BusinessPhoneNumbers BusinessPhoneNumbers `xml:"BusinessPhoneNumbers"`
	MobilePhones         MobilePhones         `xml:"MobilePhones"`
	OfficeLocations      OfficeLocations      `xml:"OfficeLocations"`
}

type PersonaId

type PersonaId struct {
	Id string `xml:"Id,attr"`
}

type PersonaShape

type PersonaShape struct {
	BaseShape            BaseShape            `xml:"t:BaseShape,omitempty"`
	AdditionalProperties AdditionalProperties `xml:"t:AdditionalProperties,omitempty"`
}

type PhoneNumberAttributedValue

type PhoneNumberAttributedValue struct {
	Value Value `json:"Value"`
}

type PlainLogin added in v1.1.4

type PlainLogin struct {
	Username string
	Password string
}

func (PlainLogin) SetLoginHeaders added in v1.1.4

func (p PlainLogin) SetLoginHeaders(req *http.Request)

type Response

type Response struct {
	ResponseClass ResponseClass `xml:"ResponseClass,attr"`
	MessageText   string        `xml:"MessageText"`
	ResponseCode  string        `xml:"ResponseCode"`
	MessageXml    MessageXml    `xml:"MessageXml"`
}

type ResponseClass

type ResponseClass string
const (
	ResponseClassSuccess ResponseClass = "Success"
	ResponseClassWarning ResponseClass = "Warning"
	ResponseClassError   ResponseClass = "Error"
)

type ResponseMessage

type ResponseMessage struct {
	Response
	DescriptiveLinkKey int `xml:"DescriptiveLinkKey"`
}

type ResponseMessages

type ResponseMessages struct {
	CreateItemResponseMessage Response `xml:"CreateItemResponseMessage"`
}

type Restriction

type Restriction struct {
	IsEqualTo *IsEqualTo `xml:"t:IsEqualTo"`
	Contains  *Contains  `xml:"t:Contains"`
}

type RoomLists

type RoomLists struct {
	Address []EmailAddress `xml:"Address"`
}

type RootFolder

type RootFolder struct {
	Items                   FindItems `xml:"Items"`
	IndexedPagingOffset     int       `xml:"IndexedPagingOffset,attr"`
	TotalItemsInView        int       `xml:"TotalItemsInView,attr"`
	IncludesLastItemInRange bool      `xml:"IncludesLastItemInRange,attr"`
}

type SavedItemFolderId

type SavedItemFolderId struct {
	DistinguishedFolderId DistinguishedFolderId `xml:"t:DistinguishedFolderId"`
}

type SoapError

type SoapError struct {
	Fault *Fault
}

func (SoapError) Error

func (s SoapError) Error() string

type StringAttributedValue

type StringAttributedValue struct {
	Value string `json:"Value"`
}

type Suggestion

type Suggestion struct {
	MeetingTime                 time.Time                   `xml:"MeetingTime"`
	IsWorkTime                  bool                        `xml:"IsWorkTime"`
	SuggestionQuality           string                      `xml:"SuggestionQuality"`
	ArrayOfAttendeeConflictData ArrayOfAttendeeConflictData `xml:"ArrayOfAttendeeConflictData"`
}

type SuggestionArray

type SuggestionArray struct {
	Suggestion []Suggestion `xml:"Suggestion"`
}

type SuggestionDayResult

type SuggestionDayResult struct {
	Date            time.Time       `xml:"Date"`
	DayQuality      string          `xml:"DayQuality"`
	SuggestionArray SuggestionArray `xml:"SuggestionArray"`
}

type SuggestionDayResultArray

type SuggestionDayResultArray struct {
	SuggestionDayResult []SuggestionDayResult `xml:"SuggestionDayResult"`
}

type SuggestionsResponse

type SuggestionsResponse struct {
	ResponseMessage          ResponseMessage          `xml:"ResponseMessage"`
	SuggestionDayResultArray SuggestionDayResultArray `xml:"SuggestionDayResultArray"`
}

type Time

type Time string

func (Time) ToTime

func (t Time) ToTime() (time.Time, error)

type TimeWindow

type TimeWindow struct {
	StartTime time.Time `xml:"t:StartTime"`
	EndTime   time.Time `xml:"t:EndTime"`
}

type TimeZone

type TimeZone struct {
	Bias         int          `xml:"t:Bias"`
	StandardTime TimeZoneTime `xml:"t:StandardTime"`
	DaylightTime TimeZoneTime `xml:"t:DaylightTime"`
}

type TimeZoneTime

type TimeZoneTime struct {
	Bias      int    `xml:"t:Bias"`
	Time      string `xml:"t:Time"`
	DayOrder  int16  `xml:"t:DayOrder"`
	Month     int16  `xml:"t:Month"`
	DayOfWeek string `xml:"t:DayOfWeek"`
	Year      string `xml:"Year,omitempty"`
}

type Value

type Value struct {
	Number string `json:"Number"`
	Type   string `json:"Type"`
}

type WorkingHours

type WorkingHours struct {
	TimeZone           TimeZone           `xml:"TimeZone"`
	WorkingPeriodArray WorkingPeriodArray `xml:"WorkingPeriodArray"`
}

type WorkingPeriod

type WorkingPeriod struct {
	DayOfWeek          string `xml:"DayOfWeek"`
	StartTimeInMinutes int    `xml:"StartTimeInMinutes"`
	EndTimeInMinutes   int    `xml:"EndTimeInMinutes"`
}

type WorkingPeriodArray

type WorkingPeriodArray struct {
	WorkingPeriod []WorkingPeriod `xml:"WorkingPeriod"`
}

type XMailbox

type XMailbox struct {
	Mailbox []Mailbox `xml:"t:Mailbox"`
}

type XOAuthLogin added in v1.1.4

type XOAuthLogin struct{ Token string }

func (XOAuthLogin) SetLoginHeaders added in v1.1.4

func (p XOAuthLogin) SetLoginHeaders(req *http.Request)

Directories

Path Synopsis
Utility package to contain functions like sendMail, create Calendar appointment and get user availability
Utility package to contain functions like sendMail, create Calendar appointment and get user availability

Jump to

Keyboard shortcuts

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