Help us shape the future of Go! Take the 2026 Go Developer Survey

facetime

package
v0.2.11 Latest Latest
Warning

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

Go to latest
Published: Oct 19, 2026 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Overview

Package facetime provides local-only, user-confirmed macOS FaceTime handoff.

Index

Constants

View Source
const Version = 1

Variables

This section is empty.

Functions

func Bridge

func Bridge(ctx context.Context, c Client, in io.Reader, out io.Writer) error

Bridge keeps all contact data on stdin/stdout, outside daemon logs and command history. Calling still ALWAYS requires the helper's native confirmation dialog.

func Display

func Display(s string) string

Display prevents contact text from injecting terminal control sequences.

func NewPicker

func NewPicker(ctx context.Context, c Client) tea.Model

func Validate

func Validate(r Request) error

Types

type Address

type Address struct {
	ID    string `json:"id"`
	Label string `json:"label"`
	Kind  string `json:"kind"`
	Value string `json:"value"`
}

type AudioDevice

type AudioDevice struct {
	UID            string `json:"uid"`
	Name           string `json:"name"`
	InputChannels  int    `json:"inputChannels"`
	OutputChannels int    `json:"outputChannels"`
	Virtual        bool   `json:"virtual"`
}

type AudioProbe

type AudioProbe struct {
	Seconds                  int     `json:"seconds"`
	ReceivedSamples          int     `json:"receivedSamples"`
	RMS                      float64 `json:"rms"`
	Peak                     float64 `json:"peak"`
	QueuedToneFrames         int     `json:"queuedToneFrames"`
	RemoteAudibilityVerified bool    `json:"remoteAudibilityVerified"`
}

type BotDoctor

type BotDoctor struct {
	OS                       string        `json:"os"`
	Microphone               string        `json:"microphone"`
	AccessibilityTrusted     bool          `json:"accessibilityTrusted"`
	Devices                  []AudioDevice `json:"devices"`
	IncomingCallsImplemented bool          `json:"incomingCallsImplemented"`
}

type Client

type Client interface {
	Do(context.Context, Request) (Reply, error)
}

type Contact

type Contact struct {
	ID        string    `json:"id"`
	Name      string    `json:"name"`
	Addresses []Address `json:"addresses"`
}

type NativeClient

type NativeClient struct{}

func (NativeClient) Do

type Reply

type Reply struct {
	Bot        *BotDoctor  `json:"bot,omitempty"`
	Probe      *AudioProbe `json:"probe,omitempty"`
	Handler    string      `json:"handler,omitempty"`
	Version    int         `json:"version"`
	Permission string      `json:"permission,omitempty"`
	Available  bool        `json:"available"`
	Contacts   []Contact   `json:"contacts,omitempty"`
	NextOffset *int        `json:"nextOffset,omitempty"`
	Contact    *Contact    `json:"contact,omitempty"`
	Opened     bool        `json:"opened"`
	Error      string      `json:"error,omitempty"`
	Code       string      `json:"code,omitempty"`
}

type Request

type Request struct {
	Version       int    `json:"version"`
	Operation     string `json:"operation"`
	Search        string `json:"search,omitempty"`
	Offset        int    `json:"offset,omitempty"`
	Limit         int    `json:"limit,omitempty"`
	ContactID     string `json:"contactID,omitempty"`
	AddressID     string `json:"addressID,omitempty"`
	ExpectedValue string `json:"expectedValue,omitempty"`
	ReceiveUID    string `json:"receiveUID,omitempty"`
	TransmitUID   string `json:"transmitUID,omitempty"`
	Seconds       int    `json:"seconds,omitempty"`
}

Jump to

Keyboard shortcuts

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