mailkit

package
v0.19.0 Latest Latest
Warning

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

Go to latest
Published: Aug 11, 2026 License: MIT Imports: 15 Imported by: 0

Documentation

Rendered for darwin/amd64

Overview

Package mailkit provides a fluent Go API over the macOS MailKit framework.

Construction

New… functions create objects; each With… method sets one property and returns its receiver, so configuration calls chain. A <Type>FromID constructor adopts an Objective-C object obtained elsewhere.

Lifecycle

A wrapper releases its Objective-C object automatically once the garbage collector finds it unreachable. Call Release to relinquish the reference deterministically (for objects holding scarce resources); Release is idempotent, and afterwards the wrapper's methods are no-ops returning zero values.

Errors

Failing calls return errors carrying the Objective-C error domain and code. Match them against this package's Err… sentinel values with errors.Is, or inspect domain, code, and Apple's prose via errors.As with *errkit.Error.

Main-thread requirements

Methods, setters, and constructors of classes Apple isolates to the main thread run there automatically; callers never need to arrange main-thread dispatch for the generated API.

Index

Constants

This section is empty.

Variables

View Source
var ErrCodeInvalidBody = errkit.New("MEComposeSessionErrorDomain", 2)

ErrCodeInvalidBody matches the MailKit error MEComposeSessionErrorCodeInvalidBody.

View Source
var ErrCodeInvalidHeaders = errkit.New("MEComposeSessionErrorDomain", 1)

ErrCodeInvalidHeaders matches the MailKit error MEComposeSessionErrorCodeInvalidHeaders.

View Source
var ErrCodeInvalidRecipients = errkit.New("MEComposeSessionErrorDomain", 0)

ErrCodeInvalidRecipients matches the MailKit error MEComposeSessionErrorCodeInvalidRecipients.

View Source
var ErrMEMessageSecurityDecodingError = errkit.New("MEMessageSecurityErrorDomain", 1)

ErrMEMessageSecurityDecodingError matches the MailKit error MEMessageSecurityDecodingError.

View Source
var ErrMEMessageSecurityEncodingError = errkit.New("MEMessageSecurityErrorDomain", 0)

ErrMEMessageSecurityEncodingError matches the MailKit error MEMessageSecurityEncodingError.

Functions

func MEComposeSessionErrorDomain

func MEComposeSessionErrorDomain() uintptr

MEComposeSessionErrorDomain returns the address of the symbol MEComposeSessionErrorDomain.

func MEMessageSecurityErrorDomain

func MEMessageSecurityErrorDomain() uintptr

MEMessageSecurityErrorDomain returns the address of the symbol MEMessageSecurityErrorDomain.

func ReloadContentBlockerWithIdentifier added in v0.17.0

func ReloadContentBlockerWithIdentifier(ctx context.Context, identifier string) error

ReloadContentBlockerWithIdentifier this will call on Mail to reload the content rule list associated with the given identifier. Mail May throttle reloading the content blocker to once every few minutes.

ReloadContentBlockerWithIdentifier blocks until the operation completes or ctx is cancelled.

func ReloadVisibleMessages added in v0.17.0

func ReloadVisibleMessages(ctx context.Context) error

ReloadVisibleMessages this will call on Mail to reload the currently visible messages. Mail may throttle reloading visible messages.

ReloadVisibleMessages blocks until the operation completes or ctx is cancelled.

Types

type AddressAnnotation added in v0.17.0

type AddressAnnotation struct {
	objref.Handle
}

AddressAnnotation is an idiomatic wrapper over the Objective-C class MEAddressAnnotation.

An object that indicates the validity of an email address.

func AddressAnnotationFromID added in v0.17.0

func AddressAnnotationFromID(id objc.ID) *AddressAnnotation

AddressAnnotationFromID adopts an existing Objective-C object as a AddressAnnotation (nil for 0), retaining it and registering a release finalizer.

func ErrorWithLocalizedDescription added in v0.17.0

func ErrorWithLocalizedDescription(localizedDescription string) *AddressAnnotation

ErrorWithLocalizedDescription indicates an address is invalid and may result in failure to deliver a message.

func NewAddressAnnotation added in v0.17.0

func NewAddressAnnotation() *AddressAnnotation

NewAddressAnnotation creates a new AddressAnnotation.

func SuccessWithLocalizedDescription added in v0.17.0

func SuccessWithLocalizedDescription(localizedDescription string) *AddressAnnotation

SuccessWithLocalizedDescription indicates an address is valid and correct.

func WarningWithLocalizedDescription added in v0.17.0

func WarningWithLocalizedDescription(localizedDescription string) *AddressAnnotation

WarningWithLocalizedDescription indicates an address may be invalid or needs attention.

func (*AddressAnnotation) Description added in v0.17.0

func (aa *AddressAnnotation) Description() string

Description returns the object's -description text.

func (*AddressAnnotation) IsEqual added in v0.17.0

func (aa *AddressAnnotation) IsEqual(other obj.Object) bool

IsEqual reports Objective-C equality (isEqual:) with another object.

func (*AddressAnnotation) IsKind added in v0.17.0

func (aa *AddressAnnotation) IsKind(className string) bool

IsKind reports whether the object is an instance of the named class or a subclass.

func (*AddressAnnotation) String added in v0.17.0

func (aa *AddressAnnotation) String() string

String returns the object's -description text, so a wrapper prints usefully under fmt.

type CGLCPContextPriorityRequest

type CGLCPContextPriorityRequest int32
const (
	KCGLCPContextPriorityRequestHigh   CGLCPContextPriorityRequest = 0
	KCGLCPContextPriorityRequestNormal CGLCPContextPriorityRequest = 1
	KCGLCPContextPriorityRequestLow    CGLCPContextPriorityRequest = 2
)

func (CGLCPContextPriorityRequest) String

String returns the CGLCPContextPriorityRequest constant's name, or its numeric form when the value is not a known constant.

type Clockid added in v0.17.0

type Clockid int32
const (
	ClockidRealtime           Clockid = 0
	ClockidMonotonic          Clockid = 6
	ClockidMonotonicRaw       Clockid = 4
	ClockidMonotonicRawApprox Clockid = 5
	ClockidUptimeRaw          Clockid = 8
	ClockidUptimeRawApprox    Clockid = 9
	ClockidProcessCputimeID   Clockid = 12
	ClockidThreadCputimeID    Clockid = 16
)

func (Clockid) String added in v0.17.0

func (e Clockid) String() string

String returns the Clockid constant's name, or its numeric form when the value is not a known constant.

type ComposeContext added in v0.17.0

type ComposeContext struct {
	objref.Handle
}

ComposeContext is an idiomatic wrapper over the Objective-C class MEComposeContext.

func ComposeContextFromID added in v0.17.0

func ComposeContextFromID(id objc.ID) *ComposeContext

ComposeContextFromID adopts an existing Objective-C object as a ComposeContext (nil for 0), retaining it and registering a release finalizer.

func NewComposeContext added in v0.17.0

func NewComposeContext() *ComposeContext

NewComposeContext creates a new ComposeContext.

func (*ComposeContext) Action added in v0.17.0

func (cc *ComposeContext) Action() ComposeUserAction

Action indicates the action performed by the user that created this compose context.

func (*ComposeContext) Description added in v0.17.0

func (cc *ComposeContext) Description() string

Description returns the object's -description text.

func (*ComposeContext) IsEncrypted added in v0.17.0

func (cc *ComposeContext) IsEncrypted() bool

IsEncrypted reports whether boolean that indicates the message is encrypted by a Message Security extension.

func (*ComposeContext) IsEqual added in v0.17.0

func (cc *ComposeContext) IsEqual(other obj.Object) bool

IsEqual reports Objective-C equality (isEqual:) with another object.

func (*ComposeContext) IsKind added in v0.17.0

func (cc *ComposeContext) IsKind(className string) bool

IsKind reports whether the object is an instance of the named class or a subclass.

func (*ComposeContext) IsSigned added in v0.17.0

func (cc *ComposeContext) IsSigned() bool

IsSigned reports whether boolean that indicates the message is signed by a Message Security extension.

func (*ComposeContext) OriginalMessage added in v0.17.0

func (cc *ComposeContext) OriginalMessage() *Message

OriginalMessage returns the original email message on which user performed an action It is

func (*ComposeContext) ShouldEncrypt added in v0.17.0

func (cc *ComposeContext) ShouldEncrypt() bool

ShouldEncrypt reports whether boolean that indicates if the user wants to encrypt the message.

func (*ComposeContext) ShouldSign added in v0.17.0

func (cc *ComposeContext) ShouldSign() bool

ShouldSign reports whether a Boolean that indicates if the user wants to sign the message.

func (*ComposeContext) String added in v0.17.0

func (cc *ComposeContext) String() string

String returns the object's -description text, so a wrapper prints usefully under fmt.

type ComposeSession added in v0.17.0

type ComposeSession struct {
	objref.Handle
}

ComposeSession is an idiomatic wrapper over the Objective-C class MEComposeSession.

An object that represents a single mail compose window.

func ComposeSessionFromID added in v0.17.0

func ComposeSessionFromID(id objc.ID) *ComposeSession

ComposeSessionFromID adopts an existing Objective-C object as a ComposeSession (nil for 0), retaining it and registering a release finalizer.

func NewComposeSession added in v0.17.0

func NewComposeSession() *ComposeSession

NewComposeSession creates a new ComposeSession.

func (*ComposeSession) ComposeContext added in v0.17.0

func (cs *ComposeSession) ComposeContext() *ComposeContext

ComposeContext returns an instance of

func (*ComposeSession) Description added in v0.17.0

func (cs *ComposeSession) Description() string

Description returns the object's -description text.

func (*ComposeSession) IsEqual added in v0.17.0

func (cs *ComposeSession) IsEqual(other obj.Object) bool

IsEqual reports Objective-C equality (isEqual:) with another object.

func (*ComposeSession) IsKind added in v0.17.0

func (cs *ComposeSession) IsKind(className string) bool

IsKind reports whether the object is an instance of the named class or a subclass.

func (*ComposeSession) MailMessage added in v0.17.0

func (cs *ComposeSession) MailMessage() *Message

MailMessage returns an instance of

func (*ComposeSession) ReloadSession added in v0.17.0

func (cs *ComposeSession) ReloadSession()

ReloadSession refreshes the compose session with the extension’s new information.

func (*ComposeSession) SessionID added in v0.17.0

func (cs *ComposeSession) SessionID() *foundation.UUID

SessionID returns a unique identifier for the session.

func (*ComposeSession) String added in v0.17.0

func (cs *ComposeSession) String() string

String returns the object's -description text, so a wrapper prints usefully under fmt.

type ComposeSessionErrorCode added in v0.17.0

type ComposeSessionErrorCode int64
const (
	ComposeSessionErrorCodeInvalidRecipients ComposeSessionErrorCode = 0
	ComposeSessionErrorCodeInvalidHeaders    ComposeSessionErrorCode = 1
	ComposeSessionErrorCodeInvalidBody       ComposeSessionErrorCode = 2
)

func (ComposeSessionErrorCode) String added in v0.17.0

func (e ComposeSessionErrorCode) String() string

String returns the ComposeSessionErrorCode constant's name, or its numeric form when the value is not a known constant.

type ComposeSessionHandler added in v0.17.0

type ComposeSessionHandler interface {
	MailComposeSessionDidBegin(session *ComposeSession)
	MailComposeSessionDidEnd(session *ComposeSession)
	ViewControllerForSession(session *ComposeSession) *ExtensionViewController
}

ComposeSessionHandler is the Go form of the Objective-C protocol MEComposeSessionHandler.

type ComposeUserAction added in v0.17.0

type ComposeUserAction int64
const (
	// Compose a new message.
	ComposeUserActionNewMessage ComposeUserAction = 1
	// Reply to the sender of an original email.
	ComposeUserActionReply ComposeUserAction = 2
	// Reply to the sender and all the recipeients of original email.
	ComposeUserActionReplyAll ComposeUserAction = 3
	// Forward an original message.
	ComposeUserActionForward ComposeUserAction = 4
)

func (ComposeUserAction) String added in v0.17.0

func (e ComposeUserAction) String() string

String returns the ComposeUserAction constant's name, or its numeric form when the value is not a known constant.

type ContentBlocker added in v0.17.0

type ContentBlocker interface {
	ContentRulesJSON() []byte
}

ContentBlocker is the Go form of the Objective-C protocol MEContentBlocker.

type DecodedMessage added in v0.17.0

type DecodedMessage struct {
	objref.Handle
}

DecodedMessage is an idiomatic wrapper over the Objective-C class MEDecodedMessage.

An object that contains the RFC 2822 data for a message, without encryption or digital signatures.

func DecodedMessageFromID added in v0.17.0

func DecodedMessageFromID(id objc.ID) *DecodedMessage

DecodedMessageFromID adopts an existing Objective-C object as a DecodedMessage (nil for 0), retaining it and registering a release finalizer.

func NewDecodedMessageWithDataSecurityInformationContext added in v0.17.0

func NewDecodedMessageWithDataSecurityInformationContext(rawData []byte, securityInformation *MessageSecurityInformation, context_ []byte) *DecodedMessage

NewDecodedMessageWithDataSecurityInformationContext creates a new DecodedMessage.

func NewDecodedMessageWithDataSecurityInformationContextBanner added in v0.17.0

func NewDecodedMessageWithDataSecurityInformationContextBanner(rawData []byte, securityInformation *MessageSecurityInformation, context_ []byte, banner *DecodedMessageBanner) *DecodedMessage

NewDecodedMessageWithDataSecurityInformationContextBanner creates a new DecodedMessage.

func (*DecodedMessage) Banner added in v0.17.0

func (dm *DecodedMessage) Banner() *DecodedMessageBanner

Banner returns suggestion information used to populate a suggestion banner at the top of the message view. Clicking on the action associated with the suggestion banner will present the extension's view controller for the provided message context.

func (*DecodedMessage) Context added in v0.17.0

func (dm *DecodedMessage) Context() []byte

Context returns the context for the decoded message. This will be passed back to the extension when Mail loads the extension's custom view controller for the message.

func (*DecodedMessage) Description added in v0.17.0

func (dm *DecodedMessage) Description() string

Description returns the object's -description text.

func (*DecodedMessage) IsEqual added in v0.17.0

func (dm *DecodedMessage) IsEqual(other obj.Object) bool

IsEqual reports Objective-C equality (isEqual:) with another object.

func (*DecodedMessage) IsKind added in v0.17.0

func (dm *DecodedMessage) IsKind(className string) bool

IsKind reports whether the object is an instance of the named class or a subclass.

func (*DecodedMessage) RawData added in v0.17.0

func (dm *DecodedMessage) RawData() []byte

RawData returns the decoded MIME data for the message The decoded data should not be encrypted or contain any signatures that were decoded. The

func (*DecodedMessage) SecurityInformation added in v0.17.0

func (dm *DecodedMessage) SecurityInformation() *MessageSecurityInformation

SecurityInformation returns the security information for whether or not the message was signed, encrypted, or had an errors in decoding.

func (*DecodedMessage) String added in v0.17.0

func (dm *DecodedMessage) String() string

String returns the object's -description text, so a wrapper prints usefully under fmt.

type DecodedMessageBanner added in v0.17.0

type DecodedMessageBanner struct {
	objref.Handle
}

DecodedMessageBanner is an idiomatic wrapper over the Objective-C class MEDecodedMessageBanner.

func DecodedMessageBannerFromID added in v0.17.0

func DecodedMessageBannerFromID(id objc.ID) *DecodedMessageBanner

DecodedMessageBannerFromID adopts an existing Objective-C object as a DecodedMessageBanner (nil for 0), retaining it and registering a release finalizer.

func NewDecodedMessageBannerWithTitlePrimaryActionTitleDismissable added in v0.17.0

func NewDecodedMessageBannerWithTitlePrimaryActionTitleDismissable(title string, primaryActionTitle string, dismissable bool) *DecodedMessageBanner

NewDecodedMessageBannerWithTitlePrimaryActionTitleDismissable creates a new DecodedMessageBanner.

func (*DecodedMessageBanner) Description added in v0.17.0

func (dmb *DecodedMessageBanner) Description() string

Description returns the object's -description text.

func (*DecodedMessageBanner) IsDismissable added in v0.17.0

func (dmb *DecodedMessageBanner) IsDismissable() bool

IsDismissable reports whether the object is dismissable.

func (*DecodedMessageBanner) IsEqual added in v0.17.0

func (dmb *DecodedMessageBanner) IsEqual(other obj.Object) bool

IsEqual reports Objective-C equality (isEqual:) with another object.

func (*DecodedMessageBanner) IsKind added in v0.17.0

func (dmb *DecodedMessageBanner) IsKind(className string) bool

IsKind reports whether the object is an instance of the named class or a subclass.

func (*DecodedMessageBanner) PrimaryActionTitle added in v0.17.0

func (dmb *DecodedMessageBanner) PrimaryActionTitle() string

PrimaryActionTitle returns the primary action title.

func (*DecodedMessageBanner) String added in v0.17.0

func (dmb *DecodedMessageBanner) String() string

String returns the object's -description text, so a wrapper prints usefully under fmt.

func (*DecodedMessageBanner) Title added in v0.17.0

func (dmb *DecodedMessageBanner) Title() string

Title returns the title.

type DispatchAutoreleaseFrequency added in v0.17.0

type DispatchAutoreleaseFrequency uint64
const (
	DispatchAutoreleaseFrequencyInherit  DispatchAutoreleaseFrequency = 0
	DispatchAutoreleaseFrequencyWorkItem DispatchAutoreleaseFrequency = 1
	DispatchAutoreleaseFrequencyNever    DispatchAutoreleaseFrequency = 2
)

func (DispatchAutoreleaseFrequency) String added in v0.17.0

String returns the DispatchAutoreleaseFrequency constant's name, or its numeric form when the value is not a known constant.

type DispatchBlockFlags added in v0.17.0

type DispatchBlockFlags uint64

Bitmask — values may be combined with |.

const (
	DispatchBlockFlagsBarrier         DispatchBlockFlags = 1
	DispatchBlockFlagsDetached        DispatchBlockFlags = 2
	DispatchBlockFlagsAssignCurrent   DispatchBlockFlags = 4
	DispatchBlockFlagsNoQosClass      DispatchBlockFlags = 8
	DispatchBlockFlagsInheritQosClass DispatchBlockFlags = 16
	DispatchBlockFlagsEnforceQosClass DispatchBlockFlags = 32
)

func (DispatchBlockFlags) String added in v0.17.0

func (e DispatchBlockFlags) String() string

String returns the DispatchBlockFlags constant's name, or its numeric form when the value is not a known constant.

type EmailAddress added in v0.17.0

type EmailAddress struct {
	objref.Handle
}

EmailAddress is an idiomatic wrapper over the Objective-C class MEEmailAddress.

Contain information about an email address. This can include both valid and invalid email addresses.

func EmailAddressFromID added in v0.17.0

func EmailAddressFromID(id objc.ID) *EmailAddress

EmailAddressFromID adopts an existing Objective-C object as a EmailAddress (nil for 0), retaining it and registering a release finalizer.

func NewEmailAddressWithRawString added in v0.17.0

func NewEmailAddressWithRawString(rawString string) *EmailAddress

NewEmailAddressWithRawString creates a new EmailAddress.

func (*EmailAddress) AddressString added in v0.17.0

func (ea *EmailAddress) AddressString() string

AddressString returns the simple address string portion of the raw string if it is valid. For example, the

func (*EmailAddress) Description added in v0.17.0

func (ea *EmailAddress) Description() string

Description returns the object's -description text.

func (*EmailAddress) IsEqual added in v0.17.0

func (ea *EmailAddress) IsEqual(other obj.Object) bool

IsEqual reports Objective-C equality (isEqual:) with another object.

func (*EmailAddress) IsKind added in v0.17.0

func (ea *EmailAddress) IsKind(className string) bool

IsKind reports whether the object is an instance of the named class or a subclass.

func (*EmailAddress) RawString added in v0.17.0

func (ea *EmailAddress) RawString() string

RawString returns the raw string for the email address.

func (*EmailAddress) String added in v0.17.0

func (ea *EmailAddress) String() string

String returns the object's -description text, so a wrapper prints usefully under fmt.

type EncodedOutgoingMessage added in v0.17.0

type EncodedOutgoingMessage struct {
	objref.Handle
}

EncodedOutgoingMessage is an idiomatic wrapper over the Objective-C class MEEncodedOutgoingMessage.

An object that contains the signed or encrypted representation of a message’s RFC 2822 data.

func EncodedOutgoingMessageFromID added in v0.17.0

func EncodedOutgoingMessageFromID(id objc.ID) *EncodedOutgoingMessage

EncodedOutgoingMessageFromID adopts an existing Objective-C object as a EncodedOutgoingMessage (nil for 0), retaining it and registering a release finalizer.

func NewEncodedOutgoingMessageWithRawDataIsSignedIsEncrypted added in v0.17.0

func NewEncodedOutgoingMessageWithRawDataIsSignedIsEncrypted(rawData []byte, isSigned bool, isEncrypted bool) *EncodedOutgoingMessage

NewEncodedOutgoingMessageWithRawDataIsSignedIsEncrypted creates an object that contains the outgoing message’s encoded data, and indicates if the encoder encrypted or signed the message.

func (*EncodedOutgoingMessage) Description added in v0.17.0

func (eom *EncodedOutgoingMessage) Description() string

Description returns the object's -description text.

func (*EncodedOutgoingMessage) IsEncrypted added in v0.17.0

func (eom *EncodedOutgoingMessage) IsEncrypted() bool

IsEncrypted reports whether the encoded message is encrypted

func (*EncodedOutgoingMessage) IsEqual added in v0.17.0

func (eom *EncodedOutgoingMessage) IsEqual(other obj.Object) bool

IsEqual reports Objective-C equality (isEqual:) with another object.

func (*EncodedOutgoingMessage) IsKind added in v0.17.0

func (eom *EncodedOutgoingMessage) IsKind(className string) bool

IsKind reports whether the object is an instance of the named class or a subclass.

func (*EncodedOutgoingMessage) IsSigned added in v0.17.0

func (eom *EncodedOutgoingMessage) IsSigned() bool

IsSigned reports whether the encoded message is signed

func (*EncodedOutgoingMessage) RawData added in v0.17.0

func (eom *EncodedOutgoingMessage) RawData() []byte

RawData returns the full encoded RFC822 message including headers and body.

func (*EncodedOutgoingMessage) String added in v0.17.0

func (eom *EncodedOutgoingMessage) String() string

String returns the object's -description text, so a wrapper prints usefully under fmt.

type EntryID added in v0.17.0

type EntryID int32
const (
	EntryIDFirstEntry EntryID = 0
	EntryIDNextEntry  EntryID = -1
	EntryIDLastEntry  EntryID = -2
)

func (EntryID) String added in v0.17.0

func (e EntryID) String() string

String returns the EntryID constant's name, or its numeric form when the value is not a known constant.

type EvCmd

type EvCmd int32
const (
	EVNOP   EvCmd = 0
	EVHIDE  EvCmd = 1
	EVSHOW  EvCmd = 2
	EVMOVE  EvCmd = 3
	EVLEVEL EvCmd = 4
)

func (EvCmd) String

func (e EvCmd) String() string

String returns the EvCmd constant's name, or its numeric form when the value is not a known constant.

type Extension added in v0.17.0

type Extension interface {
}

Extension is the Go form of the Objective-C protocol MEExtension.

type ExtensionManager added in v0.17.0

type ExtensionManager struct {
	objref.Handle
}

ExtensionManager is an idiomatic wrapper over the Objective-C class MEExtensionManager.

func ExtensionManagerFromID added in v0.17.0

func ExtensionManagerFromID(id objc.ID) *ExtensionManager

ExtensionManagerFromID adopts an existing Objective-C object as a ExtensionManager (nil for 0), retaining it and registering a release finalizer.

func NewExtensionManager added in v0.17.0

func NewExtensionManager() *ExtensionManager

NewExtensionManager creates a new ExtensionManager.

func (*ExtensionManager) Description added in v0.17.0

func (em *ExtensionManager) Description() string

Description returns the object's -description text.

func (*ExtensionManager) IsEqual added in v0.17.0

func (em *ExtensionManager) IsEqual(other obj.Object) bool

IsEqual reports Objective-C equality (isEqual:) with another object.

func (*ExtensionManager) IsKind added in v0.17.0

func (em *ExtensionManager) IsKind(className string) bool

IsKind reports whether the object is an instance of the named class or a subclass.

func (*ExtensionManager) String added in v0.17.0

func (em *ExtensionManager) String() string

String returns the object's -description text, so a wrapper prints usefully under fmt.

type ExtensionViewController added in v0.17.0

type ExtensionViewController struct {
	objref.Handle
}

ExtensionViewController is an idiomatic wrapper over the Objective-C class MEExtensionViewController.

An object that manages a view for compose session and message security handlers.

func ExtensionViewControllerFromID added in v0.17.0

func ExtensionViewControllerFromID(id objc.ID) *ExtensionViewController

ExtensionViewControllerFromID adopts an existing Objective-C object as a ExtensionViewController (nil for 0), retaining it and registering a release finalizer.

func NewExtensionViewController added in v0.17.0

func NewExtensionViewController() *ExtensionViewController

NewExtensionViewController creates a new ExtensionViewController.

func (*ExtensionViewController) Description added in v0.17.0

func (evc *ExtensionViewController) Description() string

Description returns the object's -description text.

func (*ExtensionViewController) IsEqual added in v0.17.0

func (evc *ExtensionViewController) IsEqual(other obj.Object) bool

IsEqual reports Objective-C equality (isEqual:) with another object.

func (*ExtensionViewController) IsKind added in v0.17.0

func (evc *ExtensionViewController) IsKind(className string) bool

IsKind reports whether the object is an instance of the named class or a subclass.

func (*ExtensionViewController) String added in v0.17.0

func (evc *ExtensionViewController) String() string

String returns the object's -description text, so a wrapper prints usefully under fmt.

type FilesecProperty added in v0.17.0

type FilesecProperty int32
const (
	FilesecPropertyOwner        FilesecProperty = 1
	FilesecPropertyGroup        FilesecProperty = 2
	FilesecPropertyUUID         FilesecProperty = 3
	FilesecPropertyMode         FilesecProperty = 4
	FilesecPropertyACL          FilesecProperty = 5
	FilesecPropertyGrpuuid      FilesecProperty = 6
	FilesecPropertyACLRaw       FilesecProperty = 100
	FilesecPropertyACLAllocsize FilesecProperty = 101
)

func (FilesecProperty) String added in v0.17.0

func (e FilesecProperty) String() string

String returns the FilesecProperty constant's name, or its numeric form when the value is not a known constant.

type Flag added in v0.17.0

type Flag int32
const (
	FlagFlagDeferInherit      Flag = 1
	FlagFlagNoInherit         Flag = 131072
	FlagEntryInherited        Flag = 16
	FlagEntryFileInherit      Flag = 32
	FlagEntryDirectoryInherit Flag = 64
	FlagEntryLimitInherit     Flag = 128
	FlagEntryOnlyInherit      Flag = 256
)

func (Flag) String added in v0.17.0

func (e Flag) String() string

String returns the Flag constant's name, or its numeric form when the value is not a known constant.

type Idtype added in v0.17.0

type Idtype int32
const (
	IdtypeAll  Idtype = 0
	IdtypePid  Idtype = 1
	IdtypePgid Idtype = 2
)

func (Idtype) String added in v0.17.0

func (e Idtype) String() string

String returns the Idtype constant's name, or its numeric form when the value is not a known constant.

type IpcInfoObjectType added in v0.17.0

type IpcInfoObjectType uint32
const (
	IpcInfoObjectTypeNone               IpcInfoObjectType = 0
	IpcInfoObjectTypeThreadControl      IpcInfoObjectType = 1
	IpcInfoObjectTypeTaskControl        IpcInfoObjectType = 2
	IpcInfoObjectTypeHost               IpcInfoObjectType = 3
	IpcInfoObjectTypeHostPriv           IpcInfoObjectType = 4
	IpcInfoObjectTypeProcessor          IpcInfoObjectType = 5
	IpcInfoObjectTypeProcessorSet       IpcInfoObjectType = 6
	IpcInfoObjectTypeProcessorSetName   IpcInfoObjectType = 7
	IpcInfoObjectTypeTimer              IpcInfoObjectType = 8
	IpcInfoObjectTypePortSubstOnce      IpcInfoObjectType = 9
	IpcInfoObjectTypeMig                IpcInfoObjectType = 10
	IpcInfoObjectTypeMemoryObject       IpcInfoObjectType = 11
	IpcInfoObjectTypeXmmPager           IpcInfoObjectType = 12
	IpcInfoObjectTypeXmmKernel          IpcInfoObjectType = 13
	IpcInfoObjectTypeXmmReply           IpcInfoObjectType = 14
	IpcInfoObjectTypeUndReply           IpcInfoObjectType = 15
	IpcInfoObjectTypeHostNotify         IpcInfoObjectType = 16
	IpcInfoObjectTypeHostSecurity       IpcInfoObjectType = 17
	IpcInfoObjectTypeLedger             IpcInfoObjectType = 18
	IpcInfoObjectTypeMainDevice         IpcInfoObjectType = 19
	IpcInfoObjectTypeTaskName           IpcInfoObjectType = 20
	IpcInfoObjectTypeSubsystem          IpcInfoObjectType = 21
	IpcInfoObjectTypeIODoneQueue        IpcInfoObjectType = 22
	IpcInfoObjectTypeSemaphore          IpcInfoObjectType = 23
	IpcInfoObjectTypeLockSet            IpcInfoObjectType = 24
	IpcInfoObjectTypeClock              IpcInfoObjectType = 25
	IpcInfoObjectTypeClockCtrl          IpcInfoObjectType = 26
	IpcInfoObjectTypeIokitIdent         IpcInfoObjectType = 27
	IpcInfoObjectTypeNamedEntry         IpcInfoObjectType = 28
	IpcInfoObjectTypeIokitConnect       IpcInfoObjectType = 29
	IpcInfoObjectTypeIokitObject        IpcInfoObjectType = 30
	IpcInfoObjectTypeUpl                IpcInfoObjectType = 31
	IpcInfoObjectTypeMemObjControl      IpcInfoObjectType = 32
	IpcInfoObjectTypeAuSessionport      IpcInfoObjectType = 33
	IpcInfoObjectTypeFileport           IpcInfoObjectType = 34
	IpcInfoObjectTypeLabelh             IpcInfoObjectType = 35
	IpcInfoObjectTypeTaskResume         IpcInfoObjectType = 36
	IpcInfoObjectTypeVoucher            IpcInfoObjectType = 37
	IpcInfoObjectTypeVoucherAttrControl IpcInfoObjectType = 38
	IpcInfoObjectTypeWorkInterval       IpcInfoObjectType = 39
	IpcInfoObjectTypeUxHandler          IpcInfoObjectType = 40
	IpcInfoObjectTypeUextObject         IpcInfoObjectType = 41
	IpcInfoObjectTypeArcadeReg          IpcInfoObjectType = 42
	IpcInfoObjectTypeEventlink          IpcInfoObjectType = 43
	IpcInfoObjectTypeTaskInspect        IpcInfoObjectType = 44
	IpcInfoObjectTypeTaskRead           IpcInfoObjectType = 45
	IpcInfoObjectTypeThreadInspect      IpcInfoObjectType = 46
	IpcInfoObjectTypeThreadRead         IpcInfoObjectType = 47
	IpcInfoObjectTypeSuidCred           IpcInfoObjectType = 48
	IpcInfoObjectTypeHypervisor         IpcInfoObjectType = 49
	IpcInfoObjectTypeTaskIDToken        IpcInfoObjectType = 50
	IpcInfoObjectTypeTaskFatal          IpcInfoObjectType = 51
	IpcInfoObjectTypeKcdata             IpcInfoObjectType = 52
	IpcInfoObjectTypeExclavesResource   IpcInfoObjectType = 53
	IpcInfoObjectTypeThreadResume       IpcInfoObjectType = 54
	IpcInfoObjectTypeUnknown            IpcInfoObjectType = 4294967295
)

func (IpcInfoObjectType) String added in v0.17.0

func (e IpcInfoObjectType) String() string

String returns the IpcInfoObjectType constant's name, or its numeric form when the value is not a known constant.

type LaunchDataType added in v0.17.0

type LaunchDataType int32
const (
	LaunchDataTypeDictionary LaunchDataType = 1
	LaunchDataTypeArray      LaunchDataType = 2
	LaunchDataTypeFd         LaunchDataType = 3
	LaunchDataTypeInteger    LaunchDataType = 4
	LaunchDataTypeReal       LaunchDataType = 5
	LaunchDataTypeBool       LaunchDataType = 6
	LaunchDataTypeString     LaunchDataType = 7
	LaunchDataTypeOpaque     LaunchDataType = 8
	LaunchDataTypeErrno      LaunchDataType = 9
	LaunchDataTypeMachport   LaunchDataType = 10
)

func (LaunchDataType) String added in v0.17.0

func (e LaunchDataType) String() string

String returns the LaunchDataType constant's name, or its numeric form when the value is not a known constant.

type MDLabelDomain

type MDLabelDomain int32

These constants are used to specify a domain to MDLabelCreate().

const (
	KMDLabelUserDomain  MDLabelDomain = 0
	KMDLabelLocalDomain MDLabelDomain = 1
)

func (MDLabelDomain) String

func (e MDLabelDomain) String() string

String returns the MDLabelDomain constant's name, or its numeric form when the value is not a known constant.

type MDQueryOptionFlags

type MDQueryOptionFlags int32
const (
	KMDQuerySynchronous        MDQueryOptionFlags = 1
	KMDQueryWantsUpdates       MDQueryOptionFlags = 4
	KMDQueryAllowFSTranslation MDQueryOptionFlags = 8
)

func (MDQueryOptionFlags) String

func (e MDQueryOptionFlags) String() string

String returns the MDQueryOptionFlags constant's name, or its numeric form when the value is not a known constant.

type MDQuerySortOptionFlags

type MDQuerySortOptionFlags int32
const (
	KMDQueryReverseSortOrderFlag MDQuerySortOptionFlags = 1
)

func (MDQuerySortOptionFlags) String

func (e MDQuerySortOptionFlags) String() string

String returns the MDQuerySortOptionFlags constant's name, or its numeric form when the value is not a known constant.

type MachVMRangeFlags added in v0.17.0

type MachVMRangeFlags uint64

Bitmask — values may be combined with |.

const (
	MachVMRangeFlagsNone MachVMRangeFlags = 0
)

func (MachVMRangeFlags) String added in v0.17.0

func (e MachVMRangeFlags) String() string

String returns the MachVMRangeFlags constant's name, or its numeric form when the value is not a known constant.

type MachVMRangeFlavor added in v0.17.0

type MachVMRangeFlavor uint32
const (
	MachVMRangeFlavorInvalid MachVMRangeFlavor = 0
	MachVMRangeFlavorV1      MachVMRangeFlavor = 1
)

func (MachVMRangeFlavor) String added in v0.17.0

func (e MachVMRangeFlavor) String() string

String returns the MachVMRangeFlavor constant's name, or its numeric form when the value is not a known constant.

type MachVMRangeTag added in v0.17.0

type MachVMRangeTag uint16
const (
	MachVMRangeTagDefault MachVMRangeTag = 0
	MachVMRangeTagData    MachVMRangeTag = 1
	MachVMRangeTagFixed   MachVMRangeTag = 2
)

func (MachVMRangeTag) String added in v0.17.0

func (e MachVMRangeTag) String() string

String returns the MachVMRangeTag constant's name, or its numeric form when the value is not a known constant.

type Message added in v0.17.0

type Message struct {
	objref.Handle
}

Message is an idiomatic wrapper over the Objective-C class MEMessage.

An object that contains information about a mail message, such as the subject, addressees, date sent, and the message contents.

func MessageFromID added in v0.17.0

func MessageFromID(id objc.ID) *Message

MessageFromID adopts an existing Objective-C object as a Message (nil for 0), retaining it and registering a release finalizer.

func NewMessage added in v0.17.0

func NewMessage() *Message

NewMessage creates a new Message.

func (*Message) AllRecipientAddresses added in v0.17.0

func (m *Message) AllRecipientAddresses() []*EmailAddress

AllRecipientAddresses returns an array containing all recipients of the message.

AllRecipientAddresses returns the collection as a Go slice.

func (*Message) BccAddresses added in v0.17.0

func (m *Message) BccAddresses() []*EmailAddress

BccAddresses returns recipient email addresses in the "Bcc" address field of the message.

BccAddresses returns the collection as a Go slice.

func (*Message) CcAddresses added in v0.17.0

func (m *Message) CcAddresses() []*EmailAddress

CcAddresses returns recipient email addresses in the "Cc" address field of the message.

CcAddresses returns the collection as a Go slice.

func (*Message) DateReceived added in v0.17.0

func (m *Message) DateReceived() time.Time

DateReceived returns the date the mail message was received. Only present if the message has been received.

func (*Message) DateSent added in v0.17.0

func (m *Message) DateSent() time.Time

DateSent returns the date the mail message was sent. Optionally set by the by the sender.

func (*Message) Description added in v0.17.0

func (m *Message) Description() string

Description returns the object's -description text.

func (*Message) EncryptionState added in v0.17.0

func (m *Message) EncryptionState() MessageEncryptionState

EncryptionState returns the encryption state of the mail message.

func (*Message) FromAddress added in v0.17.0

func (m *Message) FromAddress() *EmailAddress

FromAddress returns message sender's email address.

func (*Message) Headers added in v0.17.0

func (m *Message) Headers() map[string]obj.Object

Headers returns the headers for the message. Might only be a subset if the full body has not been downloaded.

func (*Message) IsEqual added in v0.17.0

func (m *Message) IsEqual(other obj.Object) bool

IsEqual reports Objective-C equality (isEqual:) with another object.

func (*Message) IsKind added in v0.17.0

func (m *Message) IsKind(className string) bool

IsKind reports whether the object is an instance of the named class or a subclass.

func (*Message) RawData added in v0.17.0

func (m *Message) RawData() []byte

RawData returns the full raw RFC822 message data if it has been downloaded and the extension has permissions to access.

func (*Message) ReplyToAddresses added in v0.17.0

func (m *Message) ReplyToAddresses() []*EmailAddress

ReplyToAddresses returns recipient email addresses in the "Reply-To" field of the message.

ReplyToAddresses returns the collection as a Go slice.

func (*Message) State added in v0.17.0

func (m *Message) State() MessageState

State returns the state of the mail message.

func (*Message) String added in v0.17.0

func (m *Message) String() string

String returns the object's -description text, so a wrapper prints usefully under fmt.

func (*Message) Subject added in v0.17.0

func (m *Message) Subject() string

Subject returns the subject of the mail message.

func (*Message) ToAddresses added in v0.17.0

func (m *Message) ToAddresses() []*EmailAddress

ToAddresses returns recipient email addresses in the "To" address field of the message.

ToAddresses returns the collection as a Go slice.

type MessageAction added in v0.17.0

type MessageAction struct {
	objref.Handle
}

MessageAction is an idiomatic wrapper over the Objective-C class MEMessageAction.

An action the system performs on a message, such as setting a color or archiving it.

func FlagActionWithFlag added in v0.17.0

func FlagActionWithFlag(flag MessageActionFlag) *MessageAction

FlagActionWithFlag marks the message as flagged with the provided color.

func MarkAsReadAction added in v0.17.0

func MarkAsReadAction() *MessageAction

MarkAsReadAction returns marks the mail message as read.

func MarkAsUnreadAction added in v0.17.0

func MarkAsUnreadAction() *MessageAction

MarkAsUnreadAction returns marks the mail message as unread.

func MessageActionFromID added in v0.17.0

func MessageActionFromID(id objc.ID) *MessageAction

MessageActionFromID adopts an existing Objective-C object as a MessageAction (nil for 0), retaining it and registering a release finalizer.

func MoveToArchiveAction added in v0.17.0

func MoveToArchiveAction() *MessageAction

MoveToArchiveAction returns moves the mail message to the user's archive mailbox for the account.

func MoveToJunkAction added in v0.17.0

func MoveToJunkAction() *MessageAction

MoveToJunkAction returns moves the mail message to the user's junk mailbox for the account.

func MoveToTrashAction added in v0.17.0

func MoveToTrashAction() *MessageAction

MoveToTrashAction returns moves the mail message to the user's trash mailbox for the account.

func NewMessageAction added in v0.17.0

func NewMessageAction() *MessageAction

NewMessageAction creates a new MessageAction.

func SetBackgroundColorActionWithColor added in v0.17.0

func SetBackgroundColorActionWithColor(color MessageActionMessageColor) *MessageAction

SetBackgroundColorActionWithColor adds a color to the message when shown in the message list.

func (*MessageAction) Description added in v0.17.0

func (ma *MessageAction) Description() string

Description returns the object's -description text.

func (*MessageAction) IsEqual added in v0.17.0

func (ma *MessageAction) IsEqual(other obj.Object) bool

IsEqual reports Objective-C equality (isEqual:) with another object.

func (*MessageAction) IsKind added in v0.17.0

func (ma *MessageAction) IsKind(className string) bool

IsKind reports whether the object is an instance of the named class or a subclass.

func (*MessageAction) String added in v0.17.0

func (ma *MessageAction) String() string

String returns the object's -description text, so a wrapper prints usefully under fmt.

type MessageActionDecision added in v0.17.0

type MessageActionDecision struct {
	objref.Handle
}

MessageActionDecision is an idiomatic wrapper over the Objective-C class MEMessageActionDecision.

The action that the system performs on a message, or a request to ask the action handler again later when the message content is available.

func DecisionApplyingAction added in v0.17.0

func DecisionApplyingAction(action *MessageAction) *MessageActionDecision

DecisionApplyingAction wraps the corresponding Objective-C method.

func DecisionApplyingActions added in v0.17.0

func DecisionApplyingActions(actions []*MessageAction) *MessageActionDecision

DecisionApplyingActions creates an

func InvokeAgainWithBody added in v0.17.0

func InvokeAgainWithBody() *MessageActionDecision

InvokeAgainWithBody returns the invoke again with body.

func MessageActionDecisionFromID added in v0.17.0

func MessageActionDecisionFromID(id objc.ID) *MessageActionDecision

MessageActionDecisionFromID adopts an existing Objective-C object as a MessageActionDecision (nil for 0), retaining it and registering a release finalizer.

func NewMessageActionDecision added in v0.17.0

func NewMessageActionDecision() *MessageActionDecision

NewMessageActionDecision creates a new MessageActionDecision.

func (*MessageActionDecision) Description added in v0.17.0

func (mad *MessageActionDecision) Description() string

Description returns the object's -description text.

func (*MessageActionDecision) IsEqual added in v0.17.0

func (mad *MessageActionDecision) IsEqual(other obj.Object) bool

IsEqual reports Objective-C equality (isEqual:) with another object.

func (*MessageActionDecision) IsKind added in v0.17.0

func (mad *MessageActionDecision) IsKind(className string) bool

IsKind reports whether the object is an instance of the named class or a subclass.

func (*MessageActionDecision) String added in v0.17.0

func (mad *MessageActionDecision) String() string

String returns the object's -description text, so a wrapper prints usefully under fmt.

type MessageActionFlag added in v0.17.0

type MessageActionFlag int64
const (
	MessageActionFlagNone         MessageActionFlag = 0
	MessageActionFlagDefaultColor MessageActionFlag = 1
	MessageActionFlagRed          MessageActionFlag = 2
	MessageActionFlagOrange       MessageActionFlag = 3
	MessageActionFlagYellow       MessageActionFlag = 4
	MessageActionFlagGreen        MessageActionFlag = 5
	MessageActionFlagBlue         MessageActionFlag = 6
	MessageActionFlagPurple       MessageActionFlag = 7
	MessageActionFlagGray         MessageActionFlag = 8
)

func (MessageActionFlag) String added in v0.17.0

func (e MessageActionFlag) String() string

String returns the MessageActionFlag constant's name, or its numeric form when the value is not a known constant.

type MessageActionHandler added in v0.17.0

type MessageActionHandler interface {
	DecideActionForMessageCompletionHandler(message *Message, completionHandler func(obj.Object))
	RequiredHeaders() []string
}

MessageActionHandler is the Go form of the Objective-C protocol MEMessageActionHandler.

type MessageActionMessageColor added in v0.17.0

type MessageActionMessageColor int64

A color that the system uses to display a message in the message list.

const (
	MessageActionMessageColorNone   MessageActionMessageColor = 0
	MessageActionMessageColorGreen  MessageActionMessageColor = 1
	MessageActionMessageColorYellow MessageActionMessageColor = 2
	MessageActionMessageColorOrange MessageActionMessageColor = 3
	MessageActionMessageColorRed    MessageActionMessageColor = 4
	MessageActionMessageColorPurple MessageActionMessageColor = 5
	MessageActionMessageColorBlue   MessageActionMessageColor = 6
	MessageActionMessageColorGray   MessageActionMessageColor = 7
)

func (MessageActionMessageColor) String added in v0.17.0

func (e MessageActionMessageColor) String() string

String returns the MessageActionMessageColor constant's name, or its numeric form when the value is not a known constant.

type MessageDecoder added in v0.17.0

type MessageDecoder interface {
	DecodedMessageForMessageData(data []byte) *DecodedMessage
}

MessageDecoder is the Go form of the Objective-C protocol MEMessageDecoder.

type MessageEncoder added in v0.17.0

type MessageEncoder interface {
	GetEncodingStatusForMessageComposeContextCompletionHandler(message *Message, composeContext *ComposeContext, completionHandler func(obj.Object))
	EncodeMessageComposeContextCompletionHandler(message *Message, composeContext *ComposeContext, completionHandler func(obj.Object))
}

MessageEncoder is the Go form of the Objective-C protocol MEMessageEncoder.

type MessageEncodingResult added in v0.17.0

type MessageEncodingResult struct {
	objref.Handle
}

MessageEncodingResult is an idiomatic wrapper over the Objective-C class MEMessageEncodingResult.

An object that contains a signed or encrypted message, or errors that indicate failure to encode the message.

func MessageEncodingResultFromID added in v0.17.0

func MessageEncodingResultFromID(id objc.ID) *MessageEncodingResult

MessageEncodingResultFromID adopts an existing Objective-C object as a MessageEncodingResult (nil for 0), retaining it and registering a release finalizer.

func NewMessageEncodingResultWithEncodedMessageSigningErrorEncryptionError added in v0.17.0

func NewMessageEncodingResultWithEncodedMessageSigningErrorEncryptionError(encodedMessage *EncodedOutgoingMessage, signingError unsafe.Pointer, encryptionError unsafe.Pointer) *MessageEncodingResult

NewMessageEncodingResultWithEncodedMessageSigningErrorEncryptionError creates an encoding result object with a signed or encrypted message, or errors if the message encoder fails to encode the message.

func (*MessageEncodingResult) Description added in v0.17.0

func (mer *MessageEncodingResult) Description() string

Description returns the object's -description text.

func (*MessageEncodingResult) EncodedMessage added in v0.17.0

func (mer *MessageEncodingResult) EncodedMessage() *EncodedOutgoingMessage

EncodedMessage returns the encoded message. Nil if no need to encode or an error occured while encoding

func (*MessageEncodingResult) EncryptionError added in v0.18.0

func (mer *MessageEncodingResult) EncryptionError() unsafe.Pointer

EncryptionError returns any error that occured while attempting to encrypt the outgoing message.

func (*MessageEncodingResult) IsEqual added in v0.17.0

func (mer *MessageEncodingResult) IsEqual(other obj.Object) bool

IsEqual reports Objective-C equality (isEqual:) with another object.

func (*MessageEncodingResult) IsKind added in v0.17.0

func (mer *MessageEncodingResult) IsKind(className string) bool

IsKind reports whether the object is an instance of the named class or a subclass.

func (*MessageEncodingResult) SigningError added in v0.18.0

func (mer *MessageEncodingResult) SigningError() unsafe.Pointer

SigningError returns any error that occured while attempting to sign the outgoing message.

func (*MessageEncodingResult) String added in v0.17.0

func (mer *MessageEncodingResult) String() string

String returns the object's -description text, so a wrapper prints usefully under fmt.

type MessageEncryptionState added in v0.17.0

type MessageEncryptionState int64
const (
	MessageEncryptionStateUnknown      MessageEncryptionState = 0
	MessageEncryptionStateNotEncrypted MessageEncryptionState = 1
	MessageEncryptionStateEncrypted    MessageEncryptionState = 2
)

func (MessageEncryptionState) String added in v0.17.0

func (e MessageEncryptionState) String() string

String returns the MessageEncryptionState constant's name, or its numeric form when the value is not a known constant.

type MessageSecurityErrorCode added in v0.17.0

type MessageSecurityErrorCode int64
const (
	MessageSecurityEncodingError MessageSecurityErrorCode = 0
	MessageSecurityDecodingError MessageSecurityErrorCode = 1
)

func (MessageSecurityErrorCode) String added in v0.17.0

func (e MessageSecurityErrorCode) String() string

String returns the MessageSecurityErrorCode constant's name, or its numeric form when the value is not a known constant.

type MessageSecurityHandler added in v0.17.0

type MessageSecurityHandler interface {
	ExtensionViewControllerForMessageSigners(messageSigners []*MessageSigner) *ExtensionViewController
	ExtensionViewControllerForMessageContext(context_ []byte) *ExtensionViewController
	PrimaryActionClickedForMessageContextCompletionHandler(context_ []byte, completionHandler func(obj.Object))
}

MessageSecurityHandler is the Go form of the Objective-C protocol MEMessageSecurityHandler.

type MessageSecurityInformation added in v0.17.0

type MessageSecurityInformation struct {
	objref.Handle
}

MessageSecurityInformation is an idiomatic wrapper over the Objective-C class MEMessageSecurityInformation.

An object that contains details about a message’s content, such as if it’s encrypted and who digitally signed it.

func MessageSecurityInformationFromID added in v0.17.0

func MessageSecurityInformationFromID(id objc.ID) *MessageSecurityInformation

MessageSecurityInformationFromID adopts an existing Objective-C object as a MessageSecurityInformation (nil for 0), retaining it and registering a release finalizer.

func NewMessageSecurityInformationWithSignersIsEncryptedSigningErrorEncryptionError added in v0.17.0

func NewMessageSecurityInformationWithSignersIsEncryptedSigningErrorEncryptionError(signers []*MessageSigner, isEncrypted bool, signingError unsafe.Pointer, encryptionError unsafe.Pointer) *MessageSecurityInformation

NewMessageSecurityInformationWithSignersIsEncryptedSigningErrorEncryptionError creates a message security information object that indicates if a message is encrypted, who signed it, or if an error occurred when decoding the message.

func NewMessageSecurityInformationWithSignersIsEncryptedSigningErrorEncryptionErrorShouldBlockRemoteContentLocalizedRemoteContentBlockingReason added in v0.17.0

func NewMessageSecurityInformationWithSignersIsEncryptedSigningErrorEncryptionErrorShouldBlockRemoteContentLocalizedRemoteContentBlockingReason(signers []*MessageSigner, isEncrypted bool, signingError unsafe.Pointer, encryptionError unsafe.Pointer, shouldBlockRemoteContent bool, localizedRemoteContentBlockingReason string) *MessageSecurityInformation

NewMessageSecurityInformationWithSignersIsEncryptedSigningErrorEncryptionErrorShouldBlockRemoteContentLocalizedRemoteContentBlockingReason creates a new MessageSecurityInformation.

func (*MessageSecurityInformation) Description added in v0.17.0

func (msi *MessageSecurityInformation) Description() string

Description returns the object's -description text.

func (*MessageSecurityInformation) EncryptionError added in v0.18.0

func (msi *MessageSecurityInformation) EncryptionError() unsafe.Pointer

EncryptionError returns any encryption error that occured when decoding the message.

func (*MessageSecurityInformation) IsEncrypted added in v0.17.0

func (msi *MessageSecurityInformation) IsEncrypted() bool

IsEncrypted reports whether the message was encrypted.

func (*MessageSecurityInformation) IsEqual added in v0.17.0

func (msi *MessageSecurityInformation) IsEqual(other obj.Object) bool

IsEqual reports Objective-C equality (isEqual:) with another object.

func (*MessageSecurityInformation) IsKind added in v0.17.0

func (msi *MessageSecurityInformation) IsKind(className string) bool

IsKind reports whether the object is an instance of the named class or a subclass.

func (*MessageSecurityInformation) LocalizedRemoteContentBlockingReason added in v0.17.0

func (msi *MessageSecurityInformation) LocalizedRemoteContentBlockingReason() string

LocalizedRemoteContentBlockingReason returns a localized string containing the reason for blocking remote content.

func (*MessageSecurityInformation) ShouldBlockRemoteContent added in v0.17.0

func (msi *MessageSecurityInformation) ShouldBlockRemoteContent() bool

ShouldBlockRemoteContent reports whether mail should block loading remote content for the message by default. The user will have the option to load remote content manually.

func (*MessageSecurityInformation) Signers added in v0.17.0

func (msi *MessageSecurityInformation) Signers() []*MessageSigner

Signers returns the signers of the message

Signers returns the collection as a Go slice.

func (*MessageSecurityInformation) SigningError added in v0.18.0

func (msi *MessageSecurityInformation) SigningError() unsafe.Pointer

SigningError returns any signing error that occured when decoding the message.

func (*MessageSecurityInformation) String added in v0.17.0

func (msi *MessageSecurityInformation) String() string

String returns the object's -description text, so a wrapper prints usefully under fmt.

type MessageSigner added in v0.17.0

type MessageSigner struct {
	objref.Handle
}

MessageSigner is an idiomatic wrapper over the Objective-C class MEMessageSigner.

An object that contains details about the person who signed a message.

func MessageSignerFromID added in v0.17.0

func MessageSignerFromID(id objc.ID) *MessageSigner

MessageSignerFromID adopts an existing Objective-C object as a MessageSigner (nil for 0), retaining it and registering a release finalizer.

func NewMessageSignerWithEmailAddressesSignatureLabelContext added in v0.17.0

func NewMessageSignerWithEmailAddressesSignatureLabelContext(emailAddresses []*EmailAddress, label string, context_ []byte) *MessageSigner

NewMessageSignerWithEmailAddressesSignatureLabelContext creates a new message signer object that contains the email addresses of the signers, a label, and context data.

func (*MessageSigner) Context added in v0.17.0

func (ms *MessageSigner) Context() []byte

Context returns the context for the message signature. This might include the signing certificate. This will be passed back to the extension for either verifying the signature or if the user wishes to view signature information.

func (*MessageSigner) Description added in v0.17.0

func (ms *MessageSigner) Description() string

Description returns the object's -description text.

func (*MessageSigner) EmailAddresses added in v0.17.0

func (ms *MessageSigner) EmailAddresses() []*EmailAddress

EmailAddresses returns email addresses associated with the signature.

EmailAddresses returns the collection as a Go slice.

func (*MessageSigner) IsEqual added in v0.17.0

func (ms *MessageSigner) IsEqual(other obj.Object) bool

IsEqual reports Objective-C equality (isEqual:) with another object.

func (*MessageSigner) IsKind added in v0.17.0

func (ms *MessageSigner) IsKind(className string) bool

IsKind reports whether the object is an instance of the named class or a subclass.

func (*MessageSigner) Label added in v0.17.0

func (ms *MessageSigner) Label() string

Label returns the message signers label. Shown in the message header view. For instance, "John Smith".

func (*MessageSigner) String added in v0.17.0

func (ms *MessageSigner) String() string

String returns the object's -description text, so a wrapper prints usefully under fmt.

type MessageState added in v0.17.0

type MessageState int64

The state of a message: sent, unsent, or received.

const (
	// A state that indicates the system has received and stored the message.
	MessageStateReceived MessageState = 0
	// A state that indicates the user is composing the message, and hasn’t sent it yet.
	MessageStateDraft MessageState = 1
	// A state that indicates the system is in the process of sending the message.
	MessageStateSending MessageState = 2
)

func (MessageState) String added in v0.17.0

func (e MessageState) String() string

String returns the MessageState constant's name, or its numeric form when the value is not a known constant.

type MpoFlags added in v0.17.0

type MpoFlags uint32

Bitmask — values may be combined with |.

const (
	MpoFlagsPort                        MpoFlags = 0
	MpoFlagsServicePort                 MpoFlags = 1024
	MpoFlagsConnectionPort              MpoFlags = 2048
	MpoFlagsReplyPort                   MpoFlags = 4096
	MpoFlagsWeakReplyPort               MpoFlags = 16384
	MpoFlagsNotificationPort            MpoFlags = 17408
	MpoFlagsExceptionPort               MpoFlags = 32768
	MpoFlagsConnectionPortWithPortArray MpoFlags = 65536
)

func (MpoFlags) String added in v0.17.0

func (e MpoFlags) String() string

String returns the MpoFlags constant's name, or its numeric form when the value is not a known constant.

type NXMouseButton

type NXMouseButton int32
const (
	NX_OneButton   NXMouseButton = 0
	NX_LeftButton  NXMouseButton = 1
	NX_RightButton NXMouseButton = 2
)

func (NXMouseButton) String

func (e NXMouseButton) String() string

String returns the NXMouseButton constant's name, or its numeric form when the value is not a known constant.

type OSClockid added in v0.17.0

type OSClockid uint32
const (
	OSClockidTime OSClockid = 32
)

func (OSClockid) String added in v0.17.0

func (e OSClockid) String() string

String returns the OSClockid constant's name, or its numeric form when the value is not a known constant.

type OSUnfairLockFlags added in v0.17.0

type OSUnfairLockFlags uint32

Bitmask — values may be combined with |.

const (
	OSUnfairLockFlagsNone         OSUnfairLockFlags = 0
	OSUnfairLockFlagsAdaptiveSpin OSUnfairLockFlags = 262144
)

func (OSUnfairLockFlags) String added in v0.17.0

func (e OSUnfairLockFlags) String() string

String returns the OSUnfairLockFlags constant's name, or its numeric form when the value is not a known constant.

type OutgoingMessageEncodingStatus added in v0.17.0

type OutgoingMessageEncodingStatus struct {
	objref.Handle
}

OutgoingMessageEncodingStatus is an idiomatic wrapper over the Objective-C class MEOutgoingMessageEncodingStatus.

An object that contains information about security measures the user can apply when composing a message.

func NewOutgoingMessageEncodingStatusWithCanSignCanEncryptSecurityErrorAddressesFailingEncryption added in v0.17.0

func NewOutgoingMessageEncodingStatusWithCanSignCanEncryptSecurityErrorAddressesFailingEncryption(canSign bool, canEncrypt bool, securityError unsafe.Pointer, addressesFailingEncryption []*EmailAddress) *OutgoingMessageEncodingStatus

NewOutgoingMessageEncodingStatusWithCanSignCanEncryptSecurityErrorAddressesFailingEncryption creates an object that describes whether the message security handler can encrypt or sign an outgoing message.

func OutgoingMessageEncodingStatusFromID added in v0.17.0

func OutgoingMessageEncodingStatusFromID(id objc.ID) *OutgoingMessageEncodingStatus

OutgoingMessageEncodingStatusFromID adopts an existing Objective-C object as a OutgoingMessageEncodingStatus (nil for 0), retaining it and registering a release finalizer.

func (*OutgoingMessageEncodingStatus) AddressesFailingEncryption added in v0.17.0

func (omes *OutgoingMessageEncodingStatus) AddressesFailingEncryption() []*EmailAddress

AddressesFailingEncryption returns a list of any recipients for which the message should be encrypted but an error occurred. This could include missing the public key for the recipient.

AddressesFailingEncryption returns the collection as a Go slice.

func (*OutgoingMessageEncodingStatus) CanEncrypt added in v0.17.0

func (omes *OutgoingMessageEncodingStatus) CanEncrypt() bool

CanEncrypt reports whether the message can be encrypted.

func (*OutgoingMessageEncodingStatus) CanSign added in v0.17.0

func (omes *OutgoingMessageEncodingStatus) CanSign() bool

CanSign reports whether the message can be signed.

func (*OutgoingMessageEncodingStatus) Description added in v0.17.0

func (omes *OutgoingMessageEncodingStatus) Description() string

Description returns the object's -description text.

func (*OutgoingMessageEncodingStatus) IsEqual added in v0.17.0

func (omes *OutgoingMessageEncodingStatus) IsEqual(other obj.Object) bool

IsEqual reports Objective-C equality (isEqual:) with another object.

func (*OutgoingMessageEncodingStatus) IsKind added in v0.17.0

func (omes *OutgoingMessageEncodingStatus) IsKind(className string) bool

IsKind reports whether the object is an instance of the named class or a subclass.

func (*OutgoingMessageEncodingStatus) SecurityError added in v0.18.0

func (omes *OutgoingMessageEncodingStatus) SecurityError() unsafe.Pointer

SecurityError returns any error that occurred while verifying the security status for the outgoing mail message.

func (*OutgoingMessageEncodingStatus) String added in v0.17.0

func (omes *OutgoingMessageEncodingStatus) String() string

String returns the object's -description text, so a wrapper prints usefully under fmt.

type PMPageToPaperMappingType

type PMPageToPaperMappingType int32
const (
	KPMPageToPaperMappingNone       PMPageToPaperMappingType = 1
	KPMPageToPaperMappingScaleToFit PMPageToPaperMappingType = 2
)

func (PMPageToPaperMappingType) String

func (e PMPageToPaperMappingType) String() string

String returns the PMPageToPaperMappingType constant's name, or its numeric form when the value is not a known constant.

type Perm added in v0.17.0

type Perm int32
const (
	PermReadData           Perm = 2
	PermListDirectory      Perm = 2
	PermWriteData          Perm = 4
	PermAddFile            Perm = 4
	PermExecute            Perm = 8
	PermSearch             Perm = 8
	PermDelete             Perm = 16
	PermAppendData         Perm = 32
	PermAddSubdirectory    Perm = 32
	PermDeleteChild        Perm = 64
	PermReadAttributes     Perm = 128
	PermWriteAttributes    Perm = 256
	PermReadExtattributes  Perm = 512
	PermWriteExtattributes Perm = 1024
	PermReadSecurity       Perm = 2048
	PermWriteSecurity      Perm = 4096
	PermChangeOwner        Perm = 8192
	PermSynchronize        Perm = 1048576
)

func (Perm) String added in v0.17.0

func (e Perm) String() string

String returns the Perm constant's name, or its numeric form when the value is not a known constant.

type PtrauthKey added in v0.17.0

type PtrauthKey int32
const (
	Ptrauth_key_none                     PtrauthKey = -1
	Ptrauth_key_asia                     PtrauthKey = 0
	Ptrauth_key_asib                     PtrauthKey = 1
	Ptrauth_key_asda                     PtrauthKey = 2
	Ptrauth_key_asdb                     PtrauthKey = 3
	Ptrauth_key_process_independent_code PtrauthKey = 0
	Ptrauth_key_process_dependent_code   PtrauthKey = 1
	Ptrauth_key_process_independent_data PtrauthKey = 2
	Ptrauth_key_process_dependent_data   PtrauthKey = 3
	Ptrauth_key_return_address           PtrauthKey = 1
	Ptrauth_key_frame_pointer            PtrauthKey = 3
	Ptrauth_key_function_pointer         PtrauthKey = 0
	Ptrauth_key_block_function           PtrauthKey = 0
	Ptrauth_key_cxx_vtable_pointer       PtrauthKey = 2
	Ptrauth_key_method_list_pointer      PtrauthKey = 2
	Ptrauth_key_objc_isa_pointer         PtrauthKey = 2
	Ptrauth_key_objc_super_pointer       PtrauthKey = 2
	Ptrauth_key_objc_sel_pointer         PtrauthKey = 3
	Ptrauth_key_objc_class_ro_pointer    PtrauthKey = 2
	Ptrauth_key_block_descriptor_pointer PtrauthKey = 2
	Ptrauth_key_init_fini_pointer        PtrauthKey = 0
)

func (PtrauthKey) String added in v0.17.0

func (e PtrauthKey) String() string

String returns the PtrauthKey constant's name, or its numeric form when the value is not a known constant.

type QosClass added in v0.17.0

type QosClass uint32
const (
	QosClassUserInteractive QosClass = 33
	QosClassUserInitiated   QosClass = 25
	QosClassDefault         QosClass = 21
	QosClassUtility         QosClass = 17
	QosClassBackground      QosClass = 9
	QosClassUnspecified     QosClass = 0
)

func (QosClass) String added in v0.17.0

func (e QosClass) String() string

String returns the QosClass constant's name, or its numeric form when the value is not a known constant.

type Tag added in v0.17.0

type Tag int32
const (
	TagUndefinedTag  Tag = 0
	TagExtendedAllow Tag = 1
	TagExtendedDeny  Tag = 2
)

func (Tag) String added in v0.17.0

func (e Tag) String() string

String returns the Tag constant's name, or its numeric form when the value is not a known constant.

type Type added in v0.17.0

type Type int32
const (
	TypeExtended Type = 256
	TypeAccess   Type = 0
	TypeDefault  Type = 1
	TypeAfs      Type = 2
	TypeCoda     Type = 3
	TypeNtfs     Type = 4
	TypeNwfs     Type = 5
)

func (Type) String added in v0.17.0

func (e Type) String() string

String returns the Type constant's name, or its numeric form when the value is not a known constant.

type VirtualMemoryGuardExceptionCode added in v0.17.0

type VirtualMemoryGuardExceptionCode uint32
const (
	KGUARD_EXC_DEALLOC_GAP                   VirtualMemoryGuardExceptionCode = 1
	KGUARD_EXC_RECLAIM_COPYIO_FAILURE        VirtualMemoryGuardExceptionCode = 2
	KGUARD_EXC_RECLAIM_INDEX_FAILURE         VirtualMemoryGuardExceptionCode = 4
	KGUARD_EXC_RECLAIM_DEALLOCATE_FAILURE    VirtualMemoryGuardExceptionCode = 8
	KGUARD_EXC_RECLAIM_ACCOUNTING_FAILURE    VirtualMemoryGuardExceptionCode = 9
	KGUARD_EXC_SEC_IOPL_ON_EXEC_PAGE         VirtualMemoryGuardExceptionCode = 10
	KGUARD_EXC_SEC_EXEC_ON_IOPL_PAGE         VirtualMemoryGuardExceptionCode = 11
	KGUARD_EXC_SEC_UPL_WRITE_ON_EXEC_REGION  VirtualMemoryGuardExceptionCode = 12
	KGUARD_EXC_LARGE_ALLOCATION_TELEMETRY    VirtualMemoryGuardExceptionCode = 13
	KGUARD_EXC_SEC_ACCESS_FAULT              VirtualMemoryGuardExceptionCode = 98
	KGUARD_EXC_SEC_ASYNC_ACCESS_FAULT        VirtualMemoryGuardExceptionCode = 99
	KGUARD_EXC_SEC_COPY_DENIED               VirtualMemoryGuardExceptionCode = 100
	KGUARD_EXC_SEC_SHARING_DENIED            VirtualMemoryGuardExceptionCode = 101
	KGUARD_EXC_MTE_SYNC_FAULT                VirtualMemoryGuardExceptionCode = 200
	KGUARD_EXC_MTE_ASYNC_USER_FAULT          VirtualMemoryGuardExceptionCode = 201
	KGUARD_EXC_MTE_ASYNC_KERN_FAULT          VirtualMemoryGuardExceptionCode = 202
	KGUARD_EXC_GUARD_OBJECT_ASYNC_USER_FAULT VirtualMemoryGuardExceptionCode = 203
	KGUARD_EXC_GUARD_OBJECT_ASYNC_KERN_FAULT VirtualMemoryGuardExceptionCode = 204
)

func (VirtualMemoryGuardExceptionCode) String added in v0.17.0

String returns the VirtualMemoryGuardExceptionCode constant's name, or its numeric form when the value is not a known constant.

type XpcListenerCreateFlags added in v0.17.0

type XpcListenerCreateFlags uint64

Bitmask — values may be combined with |.

const (
	XpcListenerCreateFlagsNone            XpcListenerCreateFlags = 0
	XpcListenerCreateFlagsInactive        XpcListenerCreateFlags = 1
	XpcListenerCreateFlagsForceMach       XpcListenerCreateFlags = 2
	XpcListenerCreateFlagsForceXpcservice XpcListenerCreateFlags = 4
)

func (XpcListenerCreateFlags) String added in v0.17.0

func (e XpcListenerCreateFlags) String() string

String returns the XpcListenerCreateFlags constant's name, or its numeric form when the value is not a known constant.

type XpcSessionCreateFlags added in v0.17.0

type XpcSessionCreateFlags uint64

Bitmask — values may be combined with |.

const (
	XpcSessionCreateFlagsNone           XpcSessionCreateFlags = 0
	XpcSessionCreateFlagsInactive       XpcSessionCreateFlags = 1
	XpcSessionCreateFlagsMachPrivileged XpcSessionCreateFlags = 2
)

func (XpcSessionCreateFlags) String added in v0.17.0

func (e XpcSessionCreateFlags) String() string

String returns the XpcSessionCreateFlags constant's name, or its numeric form when the value is not a known constant.

Jump to

Keyboard shortcuts

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