classkit

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: 16 Imported by: 0

Documentation

Rendered for darwin/amd64

Overview

Package classkit provides a fluent Go API over the macOS ClassKit 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.

Types

Each base type below lists the concrete types you construct and pass where the base is accepted:

Index

Constants

This section is empty.

Variables

View Source
var ErrCodeAuthorizationDenied = errkit.New("CLSErrorDomain", 4)

ErrCodeAuthorizationDenied matches the ClassKit error CLSErrorCodeAuthorizationDenied.

View Source
var ErrCodeClassKitUnavailable = errkit.New("CLSErrorDomain", 1)

ErrCodeClassKitUnavailable matches the ClassKit error CLSErrorCodeClassKitUnavailable.

View Source
var ErrCodeDatabaseInaccessible = errkit.New("CLSErrorDomain", 5)

ErrCodeDatabaseInaccessible matches the ClassKit error CLSErrorCodeDatabaseInaccessible.

View Source
var ErrCodeInvalidAccountCredentials = errkit.New("CLSErrorDomain", 10)

ErrCodeInvalidAccountCredentials matches the ClassKit error CLSErrorCodeInvalidAccountCredentials.

View Source
var ErrCodeInvalidArgument = errkit.New("CLSErrorDomain", 2)

ErrCodeInvalidArgument matches the ClassKit error CLSErrorCodeInvalidArgument.

View Source
var ErrCodeInvalidCreate = errkit.New("CLSErrorDomain", 7)

ErrCodeInvalidCreate matches the ClassKit error CLSErrorCodeInvalidCreate.

View Source
var ErrCodeInvalidModification = errkit.New("CLSErrorDomain", 3)

ErrCodeInvalidModification matches the ClassKit error CLSErrorCodeInvalidModification.

View Source
var ErrCodeInvalidUpdate = errkit.New("CLSErrorDomain", 8)

ErrCodeInvalidUpdate matches the ClassKit error CLSErrorCodeInvalidUpdate.

View Source
var ErrCodeLimits = errkit.New("CLSErrorDomain", 6)

ErrCodeLimits matches the ClassKit error CLSErrorCodeLimits.

View Source
var ErrCodeNone = errkit.New("CLSErrorDomain", 0)

ErrCodeNone matches the ClassKit error CLSErrorCodeNone.

View Source
var ErrCodePartialFailure = errkit.New("CLSErrorDomain", 9)

ErrCodePartialFailure matches the ClassKit error CLSErrorCodePartialFailure.

Functions

func CLSContextTopicArtsAndMusic

func CLSContextTopicArtsAndMusic() obj.Object

CLSContextTopicArtsAndMusic returns the string constant CLSContextTopicArtsAndMusic, for use as a dictionary key or argument.

func CLSContextTopicComputerScienceAndEngineering

func CLSContextTopicComputerScienceAndEngineering() obj.Object

CLSContextTopicComputerScienceAndEngineering returns the string constant CLSContextTopicComputerScienceAndEngineering, for use as a dictionary key or argument.

func CLSContextTopicHealthAndFitness

func CLSContextTopicHealthAndFitness() obj.Object

CLSContextTopicHealthAndFitness returns the string constant CLSContextTopicHealthAndFitness, for use as a dictionary key or argument.

func CLSContextTopicLiteracyAndWriting

func CLSContextTopicLiteracyAndWriting() obj.Object

CLSContextTopicLiteracyAndWriting returns the string constant CLSContextTopicLiteracyAndWriting, for use as a dictionary key or argument.

func CLSContextTopicMath

func CLSContextTopicMath() obj.Object

CLSContextTopicMath returns the string constant CLSContextTopicMath, for use as a dictionary key or argument.

func CLSContextTopicScience

func CLSContextTopicScience() obj.Object

CLSContextTopicScience returns the string constant CLSContextTopicScience, for use as a dictionary key or argument.

func CLSContextTopicSocialScience

func CLSContextTopicSocialScience() obj.Object

CLSContextTopicSocialScience returns the string constant CLSContextTopicSocialScience, for use as a dictionary key or argument.

func CLSContextTopicWorldLanguage

func CLSContextTopicWorldLanguage() obj.Object

CLSContextTopicWorldLanguage returns the string constant CLSContextTopicWorldLanguage, for use as a dictionary key or argument.

func CLSErrorCodeDomain

func CLSErrorCodeDomain() obj.Object

CLSErrorCodeDomain returns the string constant CLSErrorCodeDomain, for use as a dictionary key or argument.

func CLSErrorObjectKey

func CLSErrorObjectKey() obj.Object

CLSErrorObjectKey returns the string constant CLSErrorObjectKey, for use as a dictionary key or argument.

func CLSErrorSuccessfulObjectsKey

func CLSErrorSuccessfulObjectsKey() obj.Object

CLSErrorSuccessfulObjectsKey returns the string constant CLSErrorSuccessfulObjectsKey, for use as a dictionary key or argument.

func CLSErrorUnderlyingErrorsKey

func CLSErrorUnderlyingErrorsKey() obj.Object

CLSErrorUnderlyingErrorsKey returns the string constant CLSErrorUnderlyingErrorsKey, for use as a dictionary key or argument.

func CLSPredicateKeyPathDateCreated

func CLSPredicateKeyPathDateCreated() obj.Object

CLSPredicateKeyPathDateCreated returns the string constant CLSPredicateKeyPathDateCreated, for use as a dictionary key or argument.

func CLSPredicateKeyPathIdentifier

func CLSPredicateKeyPathIdentifier() obj.Object

CLSPredicateKeyPathIdentifier returns the string constant CLSPredicateKeyPathIdentifier, for use as a dictionary key or argument.

func CLSPredicateKeyPathParent

func CLSPredicateKeyPathParent() obj.Object

CLSPredicateKeyPathParent returns the string constant CLSPredicateKeyPathParent, for use as a dictionary key or argument.

func CLSPredicateKeyPathTitle

func CLSPredicateKeyPathTitle() obj.Object

CLSPredicateKeyPathTitle returns the string constant CLSPredicateKeyPathTitle, for use as a dictionary key or argument.

func CLSPredicateKeyPathTopic

func CLSPredicateKeyPathTopic() obj.Object

CLSPredicateKeyPathTopic returns the string constant CLSPredicateKeyPathTopic, for use as a dictionary key or argument.

func CLSPredicateKeyPathUniversalLinkURL

func CLSPredicateKeyPathUniversalLinkURL() obj.Object

CLSPredicateKeyPathUniversalLinkURL returns the string constant CLSPredicateKeyPathUniversalLinkURL, for use as a dictionary key or argument.

Types

type Activity added in v0.17.0

type Activity struct {
	Object
}

Activity is an idiomatic wrapper over the Objective-C class CLSActivity.

It embeds Object, promoting that type's methods.

A representation of user interaction with a context.

func ActivityFromID added in v0.17.0

func ActivityFromID(id objc.ID) *Activity

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

func NewActivity added in v0.17.0

func NewActivity() *Activity

NewActivity creates a new Activity.

func (*Activity) AddAdditionalActivityItem added in v0.17.0

func (a *Activity) AddAdditionalActivityItem(activityItem *ActivityItem)

AddAdditionalActivityItem adds an activity item to an activity.

func (*Activity) AddProgressRangeFromStartToEnd added in v0.17.0

func (a *Activity) AddProgressRangeFromStartToEnd(start float64, end float64)

AddProgressRangeFromStartToEnd adds a progress range to a given activity.

func (*Activity) AdditionalActivityItems added in v0.17.0

func (a *Activity) AdditionalActivityItems() []*ActivityItem

AdditionalActivityItems returns array of all additional activity items on this CLSActivity.

AdditionalActivityItems returns the collection as a Go slice.

func (*Activity) Duration added in v0.17.0

func (a *Activity) Duration() float64

Duration returns the total time tracked in this activity (excluding any previous activities). The time between calling

func (*Activity) IsStarted added in v0.17.0

func (a *Activity) IsStarted() bool

IsStarted reports whether this Activity has been started or not.

func (*Activity) PrimaryActivityItem added in v0.17.0

func (a *Activity) PrimaryActivityItem() *ActivityItem

PrimaryActivityItem returns the primary activityItem to be reported on. This can be nil indicating

func (*Activity) Progress added in v0.17.0

func (a *Activity) Progress() float64

Progress returns current progress as a decimal representation of a percentage. Should be [0.0, 1.0].

func (*Activity) RemoveAllActivityItems added in v0.17.0

func (a *Activity) RemoveAllActivityItems()

RemoveAllActivityItems deletes all activity items associated with the current activity.

func (*Activity) Start added in v0.17.0

func (a *Activity) Start()

Start tells an activity to start recording duration and progress for a task.

func (*Activity) Stop added in v0.17.0

func (a *Activity) Stop()

Stop tells an activity to stop or pause recording duration and progress for a task.

func (*Activity) WithPrimaryActivityItem added in v0.17.0

func (a *Activity) WithPrimaryActivityItem(primaryActivityItem ActivityItemProvider) *Activity

WithPrimaryActivityItem sets adds an activity item to an activity and sets it as the primary activity item.

func (*Activity) WithProgress added in v0.17.0

func (a *Activity) WithProgress(progress float64) *Activity

WithProgress sets a measure of progress through the task, given as a fraction in the range [0, 1].

type ActivityItem added in v0.17.0

type ActivityItem struct {
	Object
}

ActivityItem is an idiomatic wrapper over the Objective-C class CLSActivityItem.

ActivityItem is an abstract base — you do not construct it directly. Construct one of BinaryItem, QuantityItem, ScoreItem and pass it where a ActivityItem is accepted.

An abstract base class for gathering information about an activity.

func ActivityItemFromID added in v0.17.0

func ActivityItemFromID(id objc.ID) *ActivityItem

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

func (*ActivityItem) Identifier added in v0.17.0

func (ai *ActivityItem) Identifier() string

Identifier returns an identifier that is unique within its owning activity The identifier can be used to look up existing activityItems in a given activity.

func (*ActivityItem) Title added in v0.17.0

func (ai *ActivityItem) Title() string

Title returns title of what this ActivityItem represents. This will be the title associated with the activity item in the generated progress report.

func (*ActivityItem) WithTitle added in v0.17.0

func (ai *ActivityItem) WithTitle(title string) *ActivityItem

WithTitle sets a human readable name for the activity item.

type ActivityItemProvider added in v0.17.0

type ActivityItemProvider interface {
	objref.Object
	// contains filtered or unexported methods
}

ActivityItemProvider is accepted wherever a CLSActivityItem (or one of its subclasses) is expected.

type BinaryItem added in v0.17.0

type BinaryItem struct {
	ActivityItem
}

BinaryItem is an idiomatic wrapper over the Objective-C class CLSBinaryItem.

It embeds ActivityItem, promoting that type's methods.

Activity information that is true or false, pass or fail, yes or no.

func BinaryItemFromID added in v0.17.0

func BinaryItemFromID(id objc.ID) *BinaryItem

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

func NewBinaryItemWithIdentifierTitleType added in v0.17.0

func NewBinaryItemWithIdentifierTitleType(identifier string, title string, valueType BinaryValueType) *BinaryItem

NewBinaryItemWithIdentifierTitleType initializes a new binary activity item of the given type.

func (*BinaryItem) Value added in v0.17.0

func (bi *BinaryItem) Value() bool

Value reports whether true or false value.

func (*BinaryItem) ValueType added in v0.17.0

func (bi *BinaryItem) ValueType() BinaryValueType

ValueType returns value type of this CLSBinaryItem. The type that best describes this CLSBinaryItem value.

func (*BinaryItem) WithTitle added in v0.17.0

func (bi *BinaryItem) WithTitle(title string) *BinaryItem

WithTitle sets a human readable name for the activity item.

func (*BinaryItem) WithValue added in v0.17.0

func (bi *BinaryItem) WithValue(value bool) *BinaryItem

WithValue sets the value that the binary activity item takes.

type BinaryValueType added in v0.17.0

type BinaryValueType int64

The kinds of outcomes that a binary activity item can represent.

const (
	// True or false.
	BinaryValueTypeTrueFalse BinaryValueType = 0
	// Pass or fail.
	BinaryValueTypePassFail BinaryValueType = 1
	// Yes or no.
	BinaryValueTypeYesNo BinaryValueType = 2
	// Correct or incorrect.
	BinaryValueTypeCorrectIncorrect BinaryValueType = 3
)

func (BinaryValueType) String added in v0.17.0

func (e BinaryValueType) String() string

String returns the BinaryValueType 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 Context added in v0.17.0

type Context struct {
	Object
}

Context is an idiomatic wrapper over the Objective-C class CLSContext.

It embeds Object, promoting that type's methods.

An area of your app that represents an assignable task, like a quiz or a chapter.

func ContextFromID added in v0.17.0

func ContextFromID(id objc.ID) *Context

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

func NewContextWithTypeIdentifierTitle added in v0.17.0

func NewContextWithTypeIdentifierTitle(type_ ContextType, identifier string, title string) *Context

NewContextWithTypeIdentifierTitle initializes a new context.

func (*Context) AddChildContext added in v0.17.0

func (c *Context) AddChildContext(child *Context)

AddChildContext adds the specifed context as a child of the context receiving the method call.

func (*Context) AddNavigationChildContext added in v0.17.0

func (c *Context) AddNavigationChildContext(child *Context)

AddNavigationChildContext adds a child context that users can navigate to from this context.

func (*Context) AddProgressReportingCapabilities added in v0.17.0

func (c *Context) AddProgressReportingCapabilities(capabilities []*ProgressReportingCapability)

AddProgressReportingCapabilities adds a progress reporting capability to the set of capabilities for the context.

func (*Context) BecomeActive added in v0.17.0

func (c *Context) BecomeActive()

BecomeActive tells a context to become the active context.

func (*Context) CreateNewActivity added in v0.17.0

func (c *Context) CreateNewActivity() *Activity

CreateNewActivity creates and returns a new activity instance for the context.

func (*Context) CurrentActivity added in v0.17.0

func (c *Context) CurrentActivity() *Activity

CurrentActivity returns the current activity. Activity associated with a context. If no activity was ever created this is nil. See:

func (*Context) CustomTypeName added in v0.17.0

func (c *Context) CustomTypeName() string

CustomTypeName returns an optional user-visible name for the context if its type is CLSContextTypeCustom. This property is relevant only if the type is CLSContextTypeCustom. This string should be localized. If this property is not set for a context of type CLSContextTypeCustom, Schoolwork app will use a default localized string ‘Custom’ as the name of the activity representing this context.

func (*Context) DescendantMatchingIdentifierPathCompletion added in v0.17.0

func (c *Context) DescendantMatchingIdentifierPathCompletion(ctx context.Context, identifierPath []string) (result *Context, err error)

DescendantMatchingIdentifierPathCompletion finds the context with the given identifier path relative to this context.

DescendantMatchingIdentifierPathCompletion blocks until the operation completes or ctx is cancelled.

func (*Context) DisplayOrder added in v0.17.0

func (c *Context) DisplayOrder() int

DisplayOrder returns the displayOrder is by default sorted ascending. Set the displayOrder if you want your contexts to be displayed in a particular order. The sort key is used as a way to sort sibling contexts in a particular order.

func (*Context) Identifier added in v0.17.0

func (c *Context) Identifier() string

Identifier returns app-assigned identifier. This identifier should work across users and devices and be unique with regards to its siblings within its parent. The identifier could be used to embed information later used for deep linking. For example:

func (*Context) IdentifierPath added in v0.17.0

func (c *Context) IdentifierPath() []string

IdentifierPath returns context identifier path of this context. The identifier path starts with the main app context object and finishes with the identifier of this context. This is the identifier path that one would use in

IdentifierPath returns the collection as a Go slice.

func (*Context) IsActive added in v0.17.0

func (c *Context) IsActive() bool

IsActive reports whether self is the active context.

func (*Context) IsAssignable added in v0.17.0

func (c *Context) IsAssignable() bool

IsAssignable reports whether this property is true if the context can be assigned as an activity. The default value of this property is true. This should be set to false for a context that is used as a container for other contexts, but by itself, is not an assignable activity.

func (*Context) NavigationChildContexts added in v0.17.0

func (c *Context) NavigationChildContexts() []*Context

NavigationChildContexts returns child contexts that can be navigated to from this context. Returns all the child contexts added via

NavigationChildContexts returns the collection as a Go slice.

func (*Context) Parent added in v0.17.0

func (c *Context) Parent() *Context

Parent returns the parent of this context.

func (*Context) ProgressReportingCapabilities added in v0.17.0

func (c *Context) ProgressReportingCapabilities() []*ProgressReportingCapability

ProgressReportingCapabilities specifies progress reporting capablities of the app for this context. This information is intended to help teachers as they choose activities for their students. By default a CLSContext will have one CLSProgressReportingCapability instance of kind CLSProgressReportingCapabilityKindDuration. More progress reporting capabilities can be specified via '-addProgressReportingCapabilities:' to customize this set. The order of the returned elements is unspecified.

func (*Context) RemoveFromParent added in v0.17.0

func (c *Context) RemoveFromParent()

RemoveFromParent removes the context from its parent.

func (*Context) RemoveNavigationChildContext added in v0.17.0

func (c *Context) RemoveNavigationChildContext(child *Context)

RemoveNavigationChildContext removes the specified context as a presentable child of this context.

func (*Context) ResetProgressReportingCapabilities added in v0.17.0

func (c *Context) ResetProgressReportingCapabilities()

ResetProgressReportingCapabilities resets the set of capabilities for the context.

func (*Context) ResignActive added in v0.17.0

func (c *Context) ResignActive()

ResignActive tells a context to stop being the active context.

func (*Context) SuggestedAge added in v0.17.0

func (c *Context) SuggestedAge() foundation.NSRange

SuggestedAge returns suggested age range of students, expressed in years, for whom this context is suitable. This information is intended to help teachers to choose age-appropriate activities for their students. The default value is [0, NSIntegerMax - 1]. This is

func (*Context) SuggestedCompletionTime added in v0.17.0

func (c *Context) SuggestedCompletionTime() foundation.NSRange

SuggestedCompletionTime returns suggested time range, expressed in minutes, to complete the activity. This information will help teachers as they choose activities for their students. The default value is [0, NSIntegerMax - 1]. This is

func (*Context) Summary added in v0.17.0

func (c *Context) Summary() string

Summary returns an optional user-visible summary describing the context limited to 4000 characters in length. This may be used to provide information about the types of activities available under a given context or the context itself. This string should be localized.

func (*Context) Thumbnail added in v0.17.0

func (c *Context) Thumbnail() coregraphics.CGImageRef

Thumbnail returns an optional thumbnail image associated with the context. The size of this image should be equal to or larger than 80x80 pixels and equal to or smaller than 330x330 pixels. Images larger than 330x330 pixels will be scaled down. Images with both dimensions smaller than 80x80 pixels will not be accepted.

func (*Context) Title added in v0.17.0

func (c *Context) Title() string

Title returns title of this context. For example:

func (*Context) Topic added in v0.17.0

func (c *Context) Topic() *foundation.String

Topic returns topic associated with this context. See above for valid, predefined topics.

func (*Context) Type added in v0.17.0

func (c *Context) Type() ContextType

Type returns type of this context The type that best describes this context.

func (*Context) UniversalLinkURL added in v0.17.0

func (c *Context) UniversalLinkURL() string

UniversalLinkURL returns alternative deep link URL using universal links. If your app supports universal links, you can supply them here to link the content this context represents.

func (*Context) WithAssignable added in v0.17.0

func (c *Context) WithAssignable(assignable bool) *Context

WithAssignable sets a Boolean that indicates whether teachers can assign the context as a task.

func (*Context) WithCustomTypeName added in v0.17.0

func (c *Context) WithCustomTypeName(customTypeName string) *Context

WithCustomTypeName sets an optional name that the system presents to the user if you choose the custom context type.

func (*Context) WithDisplayOrder added in v0.17.0

func (c *Context) WithDisplayOrder(displayOrder int) *Context

WithDisplayOrder sets the position of a context relative to its siblings.

func (*Context) WithSuggestedAge added in v0.17.0

func (c *Context) WithSuggestedAge(suggestedAge foundation.NSRange) *Context

WithSuggestedAge sets the range of ages, measured in years, for which you deem a context’s content suitable.

func (*Context) WithSuggestedCompletionTime added in v0.17.0

func (c *Context) WithSuggestedCompletionTime(suggestedCompletionTime foundation.NSRange) *Context

WithSuggestedCompletionTime sets a suggested time range to complete a task, measured in minutes.

func (*Context) WithSummary added in v0.17.0

func (c *Context) WithSummary(summary string) *Context

WithSummary sets an optional, user-visible description of the context.

func (*Context) WithThumbnail added in v0.17.0

func (c *Context) WithThumbnail(thumbnail coregraphics.CGImageRef) *Context

WithThumbnail sets an optional thumbnail image associated with the context.

func (*Context) WithTitle added in v0.17.0

func (c *Context) WithTitle(title string) *Context

WithTitle sets the name of the context as it appears to users.

func (*Context) WithTopic added in v0.17.0

func (c *Context) WithTopic(topic obj.Object) *Context

WithTopic sets the area of study to which a context relates.

func (*Context) WithType added in v0.17.0

func (c *Context) WithType(type_ ContextType) *Context

WithType sets the kind of content a context represents.

func (*Context) WithUniversalLinkURL added in v0.17.0

func (c *Context) WithUniversalLinkURL(universalLinkURL string) *Context

WithUniversalLinkURL sets a URL that leads to the content in your app associated with the current context.

type ContextProvider added in v0.17.0

type ContextProvider interface {
	UpdateDescendantsOfContextCompletion(context_ *Context, completion func(unsafe.Pointer))
}

ContextProvider is the Go form of the Objective-C protocol CLSContextProvider.

type ContextType added in v0.17.0

type ContextType int64

The kinds of assignable content a context can contain.

const (
	// No type is assigned.
	ContextTypeNone ContextType = 0
	// An app context.
	ContextTypeApp ContextType = 1
	// A chapter context.
	ContextTypeChapter ContextType = 2
	// A section context.
	ContextTypeSection ContextType = 3
	// A level context.
	ContextTypeLevel ContextType = 4
	// A page context.
	ContextTypePage ContextType = 5
	// A task context.
	ContextTypeTask ContextType = 6
	// A challenge context.
	ContextTypeChallenge ContextType = 7
	// A quiz context.
	ContextTypeQuiz ContextType = 8
	// An exercise context.
	ContextTypeExercise ContextType = 9
	// A lesson context.
	ContextTypeLesson ContextType = 10
	// A book context.
	ContextTypeBook ContextType = 11
	// A game context.
	ContextTypeGame ContextType = 12
	// A document context.
	ContextTypeDocument ContextType = 13
	// An audio context.
	ContextTypeAudio ContextType = 14
	// A video context.
	ContextTypeVideo ContextType = 15
	// A context that represents an entire course.
	ContextTypeCourse ContextType = 16
	// A context for assignable content that isn’t represented by one of the built-in context types.
	ContextTypeCustom ContextType = 17
)

func (ContextType) String added in v0.17.0

func (e ContextType) String() string

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

type DataStore added in v0.17.0

type DataStore struct {
	objref.Handle
}

DataStore is an idiomatic wrapper over the Objective-C class CLSDataStore.

A container for all the ClassKit data in your app.

func DataStoreFromID added in v0.17.0

func DataStoreFromID(id objc.ID) *DataStore

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

func NewDataStore added in v0.17.0

func NewDataStore() *DataStore

NewDataStore creates a new DataStore.

func Shared added in v0.17.0

func Shared() *DataStore

Shared returns the data store provides read/write access to your app's ClassKit data. Data written to the data store is automatically synced via iCloud across the user's devices.

func (*DataStore) ActiveContext added in v0.17.0

func (ds *DataStore) ActiveContext() *Context

ActiveContext returns the context that is currently active. If no context is active, this will return nil.

func (*DataStore) CheckIsAssignedDocumentCompletion added in v0.18.0

func (ds *DataStore) CheckIsAssignedDocumentCompletion(documentURL string, completion func(bool, unsafe.Pointer))

CheckIsAssignedDocumentCompletion determines whether a URL to the document was assigned to the student. This method checks if the document at the specified URL is assigned to the current student signed into the device. This is particularly useful for implementing student-specific workflows, such as: - Showing submission UI only for assigned documents - Displaying assignment-specific metadata or instructions - Enabling special features or restrictions for assigned work The completion handler's `isAssignedDocument` parameter will be `YES` when: - The document URL corresponds to an active assigned document - The current user is authenticated as a student and assigned to this specific document The completion handler's `isAssignedDocument` parameter will be `NO` when: - The document is not part of any assigned document - The current user is not a student (e.g., teacher) - The document has been unassigned or deleted - The student does not have permission to access this assignment

func (*DataStore) CompleteAllAssignedActivitiesMatching added in v0.17.0

func (ds *DataStore) CompleteAllAssignedActivitiesMatching(contextPath []string)

CompleteAllAssignedActivitiesMatching marks all of the assigned and active activities for the given context path as complete.

func (*DataStore) ContextsMatchingIdentifierPathCompletion added in v0.17.0

func (ds *DataStore) ContextsMatchingIdentifierPathCompletion(ctx context.Context, identifierPath []string) (result obj.Object, err error)

ContextsMatchingIdentifierPathCompletion fetches all the contexts along a given identifier path.

ContextsMatchingIdentifierPathCompletion blocks until the operation completes or ctx is cancelled.

func (*DataStore) ContextsMatchingPredicateCompletion added in v0.17.0

func (ds *DataStore) ContextsMatchingPredicateCompletion(ctx context.Context, predicate obj.Object) (result obj.Object, err error)

ContextsMatchingPredicateCompletion fetches all the contexts matching a predicate.

ContextsMatchingPredicateCompletion blocks until the operation completes or ctx is cancelled.

func (*DataStore) Description added in v0.17.0

func (ds *DataStore) Description() string

Description returns the object's -description text.

func (*DataStore) FetchActivityForURLCompletion added in v0.17.0

func (ds *DataStore) FetchActivityForURLCompletion(ctx context.Context, url string) (result *Activity, err error)

FetchActivityForURLCompletion fetches an activity for a given document so you can record progress on the associated task.

FetchActivityForURLCompletion blocks until the operation completes or ctx is cancelled.

func (*DataStore) IsEqual added in v0.17.0

func (ds *DataStore) IsEqual(other obj.Object) bool

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

func (*DataStore) IsKind added in v0.17.0

func (ds *DataStore) IsKind(className string) bool

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

func (*DataStore) MainAppContext added in v0.17.0

func (ds *DataStore) MainAppContext() *Context

MainAppContext returns fetch the top level context for the current app. The main context is automatically created. Add child contexts to this context to persist them in the data store.

func (*DataStore) RemoveContext added in v0.17.0

func (ds *DataStore) RemoveContext(context_ *Context)

RemoveContext marks a context for removal.

func (*DataStore) RunningActivity added in v0.17.0

func (ds *DataStore) RunningActivity() *Activity

RunningActivity returns the most recently started activity that is running.

func (*DataStore) SaveWithCompletion added in v0.17.0

func (ds *DataStore) SaveWithCompletion(ctx context.Context) error

SaveWithCompletion saves any changes you’ve made in the data store.

SaveWithCompletion blocks until the operation completes or ctx is cancelled.

func (*DataStore) String added in v0.17.0

func (ds *DataStore) String() string

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

type DataStoreDelegate added in v0.17.0

type DataStoreDelegate interface {
	CreateContextForIdentifierParentContextParentIdentifierPath(identifier string, parentContext *Context, parentIdentifierPath []string) *Context
}

DataStoreDelegate is the Go form of the Objective-C protocol CLSDataStoreDelegate.

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 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 ErrorCode added in v0.17.0

type ErrorCode int64

Error codes that ClassKit issues.

const (
	ErrorCodeNone                      ErrorCode = 0
	ErrorCodeClassKitUnavailable       ErrorCode = 1
	ErrorCodeInvalidArgument           ErrorCode = 2
	ErrorCodeInvalidModification       ErrorCode = 3
	ErrorCodeAuthorizationDenied       ErrorCode = 4
	ErrorCodeDatabaseInaccessible      ErrorCode = 5
	ErrorCodeLimits                    ErrorCode = 6
	ErrorCodeInvalidCreate             ErrorCode = 7
	ErrorCodeInvalidUpdate             ErrorCode = 8
	ErrorCodePartialFailure            ErrorCode = 9
	ErrorCodeInvalidAccountCredentials ErrorCode = 10
)

func (ErrorCode) String added in v0.17.0

func (e ErrorCode) String() string

String returns the ErrorCode 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 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 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 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 Object added in v0.17.0

type Object struct {
	objref.Handle
}

Object is an idiomatic wrapper over the Objective-C class CLSObject.

Object is an abstract base — you do not construct it directly. Construct one of ActivityItem, Activity, Context, ProgressReportingCapability and pass it where a Object is accepted.

The abstract base class for objects managed by ClassKit.

func ObjectFromID added in v0.17.0

func ObjectFromID(id objc.ID) *Object

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

func (*Object) DateCreated added in v0.17.0

func (o *Object) DateCreated() time.Time

DateCreated returns the date this object was created.

func (*Object) DateLastModified added in v0.17.0

func (o *Object) DateLastModified() time.Time

DateLastModified returns the date this object was last modified.

func (*Object) Description added in v0.17.0

func (o *Object) Description() string

Description returns the object's -description text.

func (*Object) IsEqual added in v0.17.0

func (o *Object) IsEqual(other obj.Object) bool

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

func (*Object) IsKind added in v0.17.0

func (o *Object) IsKind(className string) bool

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

func (*Object) String added in v0.17.0

func (o *Object) String() string

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

type ObjectProvider added in v0.17.0

type ObjectProvider interface {
	objref.Object
	// contains filtered or unexported methods
}

ObjectProvider is accepted wherever a CLSObject (or one of its subclasses) is expected.

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 ProgressReportingCapability added in v0.17.0

type ProgressReportingCapability struct {
	Object
}

ProgressReportingCapability is an idiomatic wrapper over the Objective-C class CLSProgressReportingCapability.

It embeds Object, promoting that type's methods.

A progress reporting capability supported by a context.

func NewProgressReportingCapabilityWithKindDetails added in v0.17.0

func NewProgressReportingCapabilityWithKindDetails(kind ProgressReportingCapabilityKind, details string) *ProgressReportingCapability

NewProgressReportingCapabilityWithKindDetails creates a new progress reporting capability of the given type with a descriptive string.

func ProgressReportingCapabilityFromID added in v0.17.0

func ProgressReportingCapabilityFromID(id objc.ID) *ProgressReportingCapability

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

func (*ProgressReportingCapability) Details added in v0.17.0

func (prc *ProgressReportingCapability) Details() string

Details returns progress reporting details

func (*ProgressReportingCapability) Kind added in v0.17.0

Kind returns the kind of progress reporting capability

type ProgressReportingCapabilityKind added in v0.17.0

type ProgressReportingCapabilityKind int64

The available kinds of progress reporting that a context can perform.

const (
	ProgressReportingCapabilityKindDuration ProgressReportingCapabilityKind = 0
	ProgressReportingCapabilityKindPercent  ProgressReportingCapabilityKind = 1
	ProgressReportingCapabilityKindBinary   ProgressReportingCapabilityKind = 2
	ProgressReportingCapabilityKindQuantity ProgressReportingCapabilityKind = 3
	ProgressReportingCapabilityKindScore    ProgressReportingCapabilityKind = 4
)

func (ProgressReportingCapabilityKind) String added in v0.17.0

String returns the ProgressReportingCapabilityKind 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 QuantityItem added in v0.17.0

type QuantityItem struct {
	ActivityItem
}

QuantityItem is an idiomatic wrapper over the Objective-C class CLSQuantityItem.

It embeds ActivityItem, promoting that type's methods.

Activity information that signifies a quantity.

func NewQuantityItemWithIdentifierTitle added in v0.17.0

func NewQuantityItemWithIdentifierTitle(identifier string, title string) *QuantityItem

NewQuantityItemWithIdentifierTitle initializes an activity item that records a discrete quantity.

func QuantityItemFromID added in v0.17.0

func QuantityItemFromID(id objc.ID) *QuantityItem

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

func (*QuantityItem) Quantity added in v0.17.0

func (qi *QuantityItem) Quantity() float64

Quantity returns quantity awarded.

func (*QuantityItem) WithQuantity added in v0.17.0

func (qi *QuantityItem) WithQuantity(quantity float64) *QuantityItem

WithQuantity sets a quantity associated with the task.

func (*QuantityItem) WithTitle added in v0.17.0

func (qi *QuantityItem) WithTitle(title string) *QuantityItem

WithTitle sets a human readable name for the activity item.

type ScoreItem added in v0.17.0

type ScoreItem struct {
	ActivityItem
}

ScoreItem is an idiomatic wrapper over the Objective-C class CLSScoreItem.

It embeds ActivityItem, promoting that type's methods.

Activity information that signifies a score out of a possible maximum.

func NewScoreItemWithIdentifierTitleScoreMaxScore added in v0.17.0

func NewScoreItemWithIdentifierTitleScoreMaxScore(identifier string, title string, score float64, maxScore float64) *ScoreItem

NewScoreItemWithIdentifierTitleScoreMaxScore initializes an activity item that holds a score value.

func ScoreItemFromID added in v0.17.0

func ScoreItemFromID(id objc.ID) *ScoreItem

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

func (*ScoreItem) MaxScore added in v0.17.0

func (si *ScoreItem) MaxScore() float64

MaxScore returns total score possible. Must be greater than zero.

func (*ScoreItem) Score added in v0.17.0

func (si *ScoreItem) Score() float64

Score returns score out of Should be between zero and

func (*ScoreItem) WithMaxScore added in v0.17.0

func (si *ScoreItem) WithMaxScore(maxScore float64) *ScoreItem

WithMaxScore sets the maximum possible score that the user can earn on a given task.

func (*ScoreItem) WithScore added in v0.17.0

func (si *ScoreItem) WithScore(score float64) *ScoreItem

WithScore sets the score earned by a user in completing the task.

func (*ScoreItem) WithTitle added in v0.17.0

func (si *ScoreItem) WithTitle(title string) *ScoreItem

WithTitle sets a human readable name for the activity item.

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