Documentation
¶
Overview ¶
Package appleevents sends typed Apple Events without compiling or executing scripts.
Index ¶
- Variables
- func Available() bool
- func Send(ctx context.Context, event Event) (Value, Stats, error)
- type Error
- type Event
- type Sender
- type Stats
- type Value
- func All(class string, container Value) Value
- func Bool(b bool) Value
- func ByID(class string, id Value, container Value) Value
- func ByName(class, name string, container Value) Value
- func ByTest(class string, test, container Value) Value
- func Comparison(operator string, left, right Value) Value
- func CurrentContainer() Value
- func Date(t time.Time) Value
- func Enum(code string) Value
- func Examined() Value
- func File(path string) Value
- func Index(class string, index int, container Value) Value
- func Insertion(object Value, position string) Value
- func Int(n int64) Value
- func List(items ...Value) Value
- func Logical(operator string, terms ...Value) Value
- func Null() Value
- func Object(class, form string, key, container Value) Value
- func Ordinal(code string) Value
- func Property(code string, container Value) Value
- func Range(class string, start, end int, container Value) Value
- func Record(fields map[string]Value) Value
- func RoundTrip(value Value) (Value, error)
- func String(s string) Value
- func TypeCode(code string) Value
Constants ¶
This section is empty.
Variables ¶
Functions ¶
Types ¶
type Error ¶
type Value ¶
type Value struct {
Kind string `json:"kind"`
Code string `json:"code,omitempty"`
Text string `json:"text,omitempty"`
Number int64 `json:"number,omitempty"`
Real float64 `json:"real,omitempty"`
Boolean bool `json:"boolean,omitempty"`
Items []Value `json:"items,omitempty"`
Fields map[string]Value `json:"fields,omitempty"`
Data string `json:"data,omitempty"`
}
Value is a portable description of an Apple Event descriptor. Opaque replies retain a flattened descriptor so returned object references can be reused.
func Comparison ¶
Comparison describes a public Apple Event comparison record (cmpd).
func CurrentContainer ¶
func CurrentContainer() Value
CurrentContainer refers to the collection currently resolving a relative selector.
func Examined ¶
func Examined() Value
Examined refers to the object currently being evaluated by a test selector.
func Range ¶
Range selects a contiguous inclusive range of one-based collection indexes. Its endpoints resolve against the current range container, as Mail requires.