Documentation
¶
Overview ¶
Package collaboration provides a fluent Go API over the macOS Collaboration 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.
Types ¶
Each base type below lists the concrete types you construct and pass where the base is accepted:
- Identity: GroupIdentity, UserIdentity
Index ¶
- type CGLCPContextPriorityRequest
- type Clockid
- type DispatchAutoreleaseFrequency
- type DispatchBlockFlags
- type EntryID
- type EvCmd
- type FilesecProperty
- type Flag
- type GroupIdentity
- type Identity
- func IdentityFromID(id objc.ID) *Identity
- func IdentityWithCSIdentity(csIdentity obj.Object) *Identity
- func IdentityWithNameAuthority(name string, authority *IdentityAuthority) *Identity
- func IdentityWithPersistentReference(data []byte) *Identity
- func IdentityWithUUIDStringAuthority(uuid string, authority *IdentityAuthority) *Identity
- func IdentityWithUniqueIdentifierAuthority(uuid obj.Object, authority *IdentityAuthority) *Identity
- func (i *Identity) Aliases() []string
- func (i *Identity) Authority() *IdentityAuthority
- func (i *Identity) CSIdentity() obj.Object
- func (i *Identity) Description() string
- func (i *Identity) EmailAddress() string
- func (i *Identity) FullName() string
- func (i *Identity) Image() obj.Object
- func (i *Identity) IsEqual(other obj.Object) bool
- func (i *Identity) IsHidden() bool
- func (i *Identity) IsKind(className string) bool
- func (i *Identity) IsMemberOfGroup(group *GroupIdentity) bool
- func (i *Identity) PersistentReference() []byte
- func (i *Identity) PosixName() string
- func (i *Identity) String() string
- func (i *Identity) UUIDString() string
- func (i *Identity) UniqueIdentifier() *foundation.UUID
- type IdentityAuthority
- func DefaultIdentityAuthority() *IdentityAuthority
- func IdentityAuthorityFromID(id objc.ID) *IdentityAuthority
- func IdentityAuthorityWithCSIdentityAuthority(csIdentityAuthority obj.Object) *IdentityAuthority
- func LocalIdentityAuthority() *IdentityAuthority
- func ManagedIdentityAuthority() *IdentityAuthority
- func NewIdentityAuthority() *IdentityAuthority
- func (ia *IdentityAuthority) CSIdentityAuthority() obj.Object
- func (ia *IdentityAuthority) Description() string
- func (ia *IdentityAuthority) IsEqual(other obj.Object) bool
- func (ia *IdentityAuthority) IsKind(className string) bool
- func (ia *IdentityAuthority) LocalizedName() string
- func (ia *IdentityAuthority) String() string
- type IdentityPicker
- func (ip *IdentityPicker) AllowsMultipleSelection() bool
- func (ip *IdentityPicker) Description() string
- func (ip *IdentityPicker) Identities() []*Identity
- func (ip *IdentityPicker) IsEqual(other obj.Object) bool
- func (ip *IdentityPicker) IsKind(className string) bool
- func (ip *IdentityPicker) RunModal() int
- func (ip *IdentityPicker) RunModalForWindowCompletionHandler(window obj.Object, completionHandler func(int))
- func (ip *IdentityPicker) String() string
- func (ip *IdentityPicker) Title() string
- func (ip *IdentityPicker) WithAllowsMultipleSelection(allowsMultipleSelection bool) *IdentityPicker
- func (ip *IdentityPicker) WithTitle(title string) *IdentityPicker
- type IdentityProvider
- type Idtype
- type IpcInfoObjectType
- type LaunchDataType
- type MDLabelDomain
- type MDQueryOptionFlags
- type MDQuerySortOptionFlags
- type MachVMRangeFlags
- type MachVMRangeFlavor
- type MachVMRangeTag
- type MpoFlags
- type NXMouseButton
- type OSClockid
- type OSUnfairLockFlags
- type PMPageToPaperMappingType
- type Perm
- type PtrauthKey
- type QosClass
- type Tag
- type Type
- type UserIdentity
- type VirtualMemoryGuardExceptionCode
- type XpcListenerCreateFlags
- type XpcSessionCreateFlags
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CGLCPContextPriorityRequest ¶
type CGLCPContextPriorityRequest int32
const ( KCGLCPContextPriorityRequestHigh CGLCPContextPriorityRequest = 0 KCGLCPContextPriorityRequestNormal CGLCPContextPriorityRequest = 1 KCGLCPContextPriorityRequestLow CGLCPContextPriorityRequest = 2 )
func (CGLCPContextPriorityRequest) String ¶
func (e CGLCPContextPriorityRequest) String() string
String returns the CGLCPContextPriorityRequest constant's name, or its numeric form when the value is not a known constant.
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
func (e DispatchAutoreleaseFrequency) String() string
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 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 GroupIdentity ¶ added in v0.17.0
type GroupIdentity struct {
Identity
}
GroupIdentity is an idiomatic wrapper over the Objective-C class CBGroupIdentity.
It embeds Identity, promoting that type's methods.
An object of the CBGroupIdentity class represents a group identity and is used for viewing the attributes of group identities from an identity authority. The principal attributes of a CBGroupIdentity object are a POSIX group identifier (GID) and a list of members.
func GroupIdentityFromID ¶ added in v0.17.0
func GroupIdentityFromID(id objc.ID) *GroupIdentity
GroupIdentityFromID adopts an existing Objective-C object as a GroupIdentity (nil for 0), retaining it and registering a release finalizer.
func GroupIdentityWithPosixGIDAuthority ¶ added in v0.17.0
func GroupIdentityWithPosixGIDAuthority(gid int, authority *IdentityAuthority) *GroupIdentity
GroupIdentityWithPosixGIDAuthority returns the group identity with the given POSIX GID in the specified identity authority.
func NewGroupIdentity ¶ added in v0.17.0
func NewGroupIdentity() *GroupIdentity
NewGroupIdentity creates a new GroupIdentity.
func (*GroupIdentity) MemberIdentities ¶ added in v0.17.0
func (gi *GroupIdentity) MemberIdentities() []*Identity
MemberIdentities returns the member identities.
MemberIdentities returns the collection as a Go slice.
func (*GroupIdentity) Members ¶ added in v0.17.0
func (gi *GroupIdentity) Members() obj.Object
Members returns the members of the group. This method only returns direct members of a group, it does not return members of members. Both user and group identities can be members of a group, but a group cannot be a member of itself. You also cannot have “circular” membership, i.e. a group be a member of another group that is a member of the first group. - Returns: An array of `CBIdentity` objects each representing a member of the group identity.
func (*GroupIdentity) PosixGID ¶ added in v0.17.0
func (gi *GroupIdentity) PosixGID() int
PosixGID returns the POSIX GID of the identity. The POSIX GID is an integer that can identify a group within an identity authority. GIDs are not guaranteed to be unique within an identity authority. - Returns: The POSIX GID of the group identity.
type Identity ¶ added in v0.17.0
Identity is an idiomatic wrapper over the Objective-C class CBIdentity.
Identity is an abstract base — you do not construct it directly. Construct one of GroupIdentity, UserIdentity and pass it where a Identity is accepted.
A CBIdentity object is used for accessing the attributes of an identity stored in an identity authority. You can use an identity object for finding identities, and storing them in an access control list (ACL). If you need to edit these attributes, take advantage of the CSIdentity class in Core Services.
func IdentityFromID ¶ added in v0.17.0
IdentityFromID adopts an existing Objective-C object as a Identity (nil for 0), retaining it and registering a release finalizer.
func IdentityWithCSIdentity ¶ added in v0.17.0
IdentityWithCSIdentity returns an identity object created from the specified Core Services Identity opaque object.
func IdentityWithNameAuthority ¶ added in v0.17.0
func IdentityWithNameAuthority(name string, authority *IdentityAuthority) *Identity
IdentityWithNameAuthority returns the identity object with the given name from the specified identity authority.
func IdentityWithPersistentReference ¶ added in v0.17.0
IdentityWithPersistentReference returns the identity object matching the persistent reference data.
func IdentityWithUUIDStringAuthority ¶ added in v0.17.0
func IdentityWithUUIDStringAuthority(uuid string, authority *IdentityAuthority) *Identity
IdentityWithUUIDStringAuthority returns the identity object with the given UUID from the specified identity authority.
func IdentityWithUniqueIdentifierAuthority ¶ added in v0.17.0
func IdentityWithUniqueIdentifierAuthority(uuid obj.Object, authority *IdentityAuthority) *Identity
IdentityWithUniqueIdentifierAuthority wraps the corresponding Objective-C method.
func (*Identity) Aliases ¶ added in v0.17.0
Aliases returns an array of aliases (alternate names) for the identity. An identity can have zero or more aliases. Like the full and short names, two identities cannot share an alias. - Returns: An array of `NSString` objects containing the alternate names for the identity.
Aliases returns the collection as a Go slice.
func (*Identity) Authority ¶ added in v0.17.0
func (i *Identity) Authority() *IdentityAuthority
Authority returns the identity authority where the identity is stored. - Returns: The identity authority where the identity is stored.
func (*Identity) CSIdentity ¶ added in v0.17.0
CSIdentity returns an opaque object for use with the Core Services Identity API. This method, along with “CBIdentity/identityWithCSIdentity:“, is used for interoperability with the Core Services Identity API. - Returns: The opaque object for use with the Core Services Identity API.
func (*Identity) Description ¶ added in v0.17.0
Description returns the object's -description text.
func (*Identity) EmailAddress ¶ added in v0.17.0
EmailAddress returns the email address of an identity. - Returns: The email address of an identity or `nil` if none exists.
func (*Identity) FullName ¶ added in v0.17.0
FullName returns the full name of the identity. - Returns: The full name for the identity.
func (*Identity) Image ¶ added in v0.17.0
Image returns the image associated with an identity. - Returns: The image associated with an identity, or `nil` if none exists.
func (*Identity) IsEqual ¶ added in v0.17.0
IsEqual reports Objective-C equality (isEqual:) with another object.
func (*Identity) IsHidden ¶ added in v0.17.0
IsHidden reports whether returns a Boolean value indicating the state of the identity’s hidden property. A hidden identity does not show up in the Identity Picker. A hidden identity refers to system identities such as `root`, `www`, and `wheel`. - Returns: <doc://com.apple.documentation/documentation/objectivec/yes> if the identity is hidden; <doc://com.apple.documentation/documentation/objectivec/no> if it is not.
func (*Identity) IsKind ¶ added in v0.17.0
IsKind reports whether the object is an instance of the named class or a subclass.
func (*Identity) IsMemberOfGroup ¶ added in v0.17.0
func (i *Identity) IsMemberOfGroup(group *GroupIdentity) bool
IsMemberOfGroup returns a Boolean value indicating whether the identity is a member of the specified group.
func (*Identity) PersistentReference ¶ added in v0.17.0
PersistentReference returns a persistent reference to store a reference to an identity. A persistent reference data object is an object generated from an identity. Persistent data objects can be written to and read from a file, making them extremely useful for storing identities in an ACL. - Returns: A data object that uniquely references an identity.
func (*Identity) PosixName ¶ added in v0.17.0
PosixName returns the POSIX name of the identity. The POSIX name is also referred to as the “short name” for an identity. It can only contain the characters A-Z, a-z, 0-9, -, _, ., and
func (*Identity) String ¶ added in v0.17.0
String returns the object's -description text, so a wrapper prints usefully under fmt.
func (*Identity) UUIDString ¶ added in v0.17.0
UUIDString returns the UUID of the identity as a string. The UUID string is generated so it is unique across all identity authorities. When storing ACLs, one method is to store the UUID of each identity. However, it is recommended that you use a persistent data object instead (see “CBIdentity/persistentReference“). - Returns: The UUID string of the identity.
func (*Identity) UniqueIdentifier ¶ added in v0.17.0
func (i *Identity) UniqueIdentifier() *foundation.UUID
UniqueIdentifier returns the unique identifier.
type IdentityAuthority ¶ added in v0.17.0
IdentityAuthority is an idiomatic wrapper over the Objective-C class CBIdentityAuthority.
An identity authority is a database that stores information about identities. The CBIdentityAuthority class defines one or more identity authorities. You can search this database for identities in conjunction with the CBIdentity class factory methods.
func DefaultIdentityAuthority ¶ added in v0.17.0
func DefaultIdentityAuthority() *IdentityAuthority
DefaultIdentityAuthority returns an identity authority that contains the identities in both the local and the network-bound authorities.
func IdentityAuthorityFromID ¶ added in v0.17.0
func IdentityAuthorityFromID(id objc.ID) *IdentityAuthority
IdentityAuthorityFromID adopts an existing Objective-C object as a IdentityAuthority (nil for 0), retaining it and registering a release finalizer.
func IdentityAuthorityWithCSIdentityAuthority ¶ added in v0.17.0
func IdentityAuthorityWithCSIdentityAuthority(csIdentityAuthority obj.Object) *IdentityAuthority
IdentityAuthorityWithCSIdentityAuthority returns an identity authority specified by a given Core Services Identity authority object.
func LocalIdentityAuthority ¶ added in v0.17.0
func LocalIdentityAuthority() *IdentityAuthority
LocalIdentityAuthority returns the identity authority on the local system.
func ManagedIdentityAuthority ¶ added in v0.17.0
func ManagedIdentityAuthority() *IdentityAuthority
ManagedIdentityAuthority returns the identity authority that contains all the identities in bound network directory servers.
func NewIdentityAuthority ¶ added in v0.17.0
func NewIdentityAuthority() *IdentityAuthority
NewIdentityAuthority creates a new IdentityAuthority.
func (*IdentityAuthority) CSIdentityAuthority ¶ added in v0.17.0
func (ia *IdentityAuthority) CSIdentityAuthority() obj.Object
CSIdentityAuthority returns an identity authority for use with the Core Services Identity API. This method, along with “CBIdentityAuthority/identityAuthorityWithCSIdentityAuthority:“, is used for interoperability with the Core Services Identity API. - Returns: The opaque authority object for use with the Core Services Identity API.
func (*IdentityAuthority) Description ¶ added in v0.17.0
func (ia *IdentityAuthority) Description() string
Description returns the object's -description text.
func (*IdentityAuthority) IsEqual ¶ added in v0.17.0
func (ia *IdentityAuthority) IsEqual(other obj.Object) bool
IsEqual reports Objective-C equality (isEqual:) with another object.
func (*IdentityAuthority) IsKind ¶ added in v0.17.0
func (ia *IdentityAuthority) IsKind(className string) bool
IsKind reports whether the object is an instance of the named class or a subclass.
func (*IdentityAuthority) LocalizedName ¶ added in v0.17.0
func (ia *IdentityAuthority) LocalizedName() string
LocalizedName returns the localized name of the identity authority. - Returns: The computer’s name if the authority is local, or Managed Network Directory if the authority is managed.
func (*IdentityAuthority) String ¶ added in v0.17.0
func (ia *IdentityAuthority) String() string
String returns the object's -description text, so a wrapper prints usefully under fmt.
type IdentityPicker ¶ added in v0.17.0
IdentityPicker is an idiomatic wrapper over the Objective-C class CBIdentityPicker.
A CBIdentityPicker object allows a user to select identities—for example, user or group objects—that it wants one or more services or shared resources to have access to. An identity picker can be displayed either as an application-modal dialog or as a sheet attached to a document window. An identity picker returns the selected records to be added to access control lists using Collaboration. If a selected record is not a user or group identity, then an identity picker prompts the user for additional information—such as a password—to promote that record to a sharing account.
func IdentityPickerFromID ¶ added in v0.17.0
func IdentityPickerFromID(id objc.ID) *IdentityPicker
IdentityPickerFromID adopts an existing Objective-C object as a IdentityPicker (nil for 0), retaining it and registering a release finalizer.
func NewIdentityPicker ¶ added in v0.17.0
func NewIdentityPicker() *IdentityPicker
NewIdentityPicker creates a new IdentityPicker.
func (*IdentityPicker) AllowsMultipleSelection ¶ added in v0.17.0
func (ip *IdentityPicker) AllowsMultipleSelection() bool
AllowsMultipleSelection reports whether the user is allowed to select multiple identities. The value of this property is <doc://com.apple.documentation/documentation/objectivec/yes> if the user can select multiple records; otherwise, <doc://com.apple.documentation/documentation/objectivec/no>. The default value is <doc://com.apple.documentation/documentation/objectivec/no>.
func (*IdentityPicker) Description ¶ added in v0.17.0
func (ip *IdentityPicker) Description() string
Description returns the object's -description text.
func (*IdentityPicker) Identities ¶ added in v0.17.0
func (ip *IdentityPicker) Identities() []*Identity
Identities returns the array of identities (represented by `CBIdentity` objects) selected using the identity picker.
Identities returns the collection as a Go slice.
func (*IdentityPicker) IsEqual ¶ added in v0.17.0
func (ip *IdentityPicker) IsEqual(other obj.Object) bool
IsEqual reports Objective-C equality (isEqual:) with another object.
func (*IdentityPicker) IsKind ¶ added in v0.17.0
func (ip *IdentityPicker) IsKind(className string) bool
IsKind reports whether the object is an instance of the named class or a subclass.
func (*IdentityPicker) RunModal ¶ added in v0.17.0
func (ip *IdentityPicker) RunModal() int
RunModal returns runs the receiver as an application-modal dialog.
func (*IdentityPicker) RunModalForWindowCompletionHandler ¶ added in v0.17.0
func (ip *IdentityPicker) RunModalForWindowCompletionHandler(window obj.Object, completionHandler func(int))
RunModalForWindowCompletionHandler runs the identity picker modally as a sheet attached to a specified window.
func (*IdentityPicker) String ¶ added in v0.17.0
func (ip *IdentityPicker) String() string
String returns the object's -description text, so a wrapper prints usefully under fmt.
func (*IdentityPicker) Title ¶ added in v0.17.0
func (ip *IdentityPicker) Title() string
Title returns the title of the identity picker. The value of this property is the title text that appears at the top of the panel. By default, the title is "Select a person to share with:".
func (*IdentityPicker) WithAllowsMultipleSelection ¶ added in v0.17.0
func (ip *IdentityPicker) WithAllowsMultipleSelection(allowsMultipleSelection bool) *IdentityPicker
WithAllowsMultipleSelection sets a Boolean value indicating whether the user is allowed to select multiple identities.
func (*IdentityPicker) WithTitle ¶ added in v0.17.0
func (ip *IdentityPicker) WithTitle(title string) *IdentityPicker
WithTitle sets the title of the identity picker.
type IdentityProvider ¶ added in v0.17.0
IdentityProvider is accepted wherever a CBIdentity (or one of its subclasses) is expected.
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 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 )
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 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 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 )
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 UserIdentity ¶ added in v0.17.0
type UserIdentity struct {
Identity
}
UserIdentity is an idiomatic wrapper over the Objective-C class CBUserIdentity.
It embeds Identity, promoting that type's methods.
An object of the CBUserIdentity class represents a user identity and is used for accessing the attributes of a user identity from an identity authority. The principal attributes of CBUserIdentity are a POSIX user identifier (UID), password, and certificate.
func NewUserIdentity ¶ added in v0.17.0
func NewUserIdentity() *UserIdentity
NewUserIdentity creates a new UserIdentity.
func UserIdentityFromID ¶ added in v0.17.0
func UserIdentityFromID(id objc.ID) *UserIdentity
UserIdentityFromID adopts an existing Objective-C object as a UserIdentity (nil for 0), retaining it and registering a release finalizer.
func UserIdentityWithPosixUIDAuthority ¶ added in v0.17.0
func UserIdentityWithPosixUIDAuthority(uid int, authority *IdentityAuthority) *UserIdentity
UserIdentityWithPosixUIDAuthority returns the user identity with the given POSIX UID in the specified identity authority.
func (*UserIdentity) AuthenticateWithPassword ¶ added in v0.17.0
func (ui *UserIdentity) AuthenticateWithPassword(password string) bool
AuthenticateWithPassword returns a Boolean value indicating whether the given password is correct for the identity.
func (*UserIdentity) Certificate ¶ added in v0.17.0
func (ui *UserIdentity) Certificate() obj.Object
Certificate returns the public authentication certificate associated with a user identity. The Collaboration framework supports certificate-based authentication in addition to passwords. If a certificate is stored for a user identity, it will be the default method of authentication. When a .Mac account is associated with a user identity, the authentication certificate is automatically downloaded from the .Mac servers. - Returns: The public authentication certificate, or `nil` if none exists.
func (*UserIdentity) IsEnabled ¶ added in v0.17.0
func (ui *UserIdentity) IsEnabled() bool
IsEnabled reports whether returns a Boolean value indicating whether the identity is allowed to authenticate. If the identity does not have authentication credentials (a password or certificate), it is not able to log in. However, an identity with authentication credentials does not ensure that it is enabled. Any identity can be disabled. - Returns: `TRUE` if the identity can authenticate; otherwise, `FALSE`.
func (*UserIdentity) PosixUID ¶ added in v0.17.0
func (ui *UserIdentity) PosixUID() int
PosixUID returns the POSIX UID of the identity. The POSIX UID is a integer that can identify a user within an identity authority. UIDs are not guaranteed to be unique within an identity authority. - Returns: The POSIX UID of the identity.
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
func (e VirtualMemoryGuardExceptionCode) String() string
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.