shareinbox

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Nov 28, 2026 License: Apache-2.0 Imports: 10 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package shareinbox stages iOS share-extension items in an App Group until the containing app next activates. Committed batches are atomic directories; unfinished imports are never visible to the reader.

Index

Constants

View Source
const Directory = "NSGoShares"
View Source
const MaxBytes int64 = 512 << 20

MaxBytes bounds one incoming batch without loading its files into memory.

View Source
const MaxTextBytes = maxManifest / 2

Variables

This section is empty.

Functions

This section is empty.

Types

type Batch

type Batch struct {
	// contains filtered or unexported fields
}

func Begin

func Begin(group string) (*Batch, error)

func (*Batch) Abort

func (b *Batch) Abort()

func (*Batch) Commit

func (b *Batch) Commit() error

func (*Batch) File

func (b *Batch) File(path, name, mime string) error

func (*Batch) Text

func (b *Batch) Text(text, mime string) error

type Reader

type Reader struct {
	// contains filtered or unexported fields
}

Reader tracks batches handed to this engine, retaining their durable copies until an app callback acknowledges them. A new process reads unacknowledged batches again; waking an existing reader never duplicates a pending batch.

func NewReader

func NewReader(group, cache string) *Reader

func (*Reader) Drain

func (r *Reader) Drain(deliver func([]driver.SharedItem, func() error)) error

Drain copies committed batches into private cache storage. Acknowledge may run concurrently, and removes only its batch after the app callback returns.

Jump to

Keyboard shortcuts

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