bin

package
v0.2.3 Latest Latest
Warning

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

Go to latest
Published: Sep 25, 2026 License: MIT Imports: 1 Imported by: 0

Documentation

Overview

Package bin registers the built-in `bin` collection: the marker of an object moved to the bin.

Move to bin = attach the collection, restore = detach it, both through POST/DELETE …/properties/:objectId/collections/bin — no wire surface of its own. The server stamps `movedAt` (an instant) and `movedBy` (the account identity, the encoding `author` / `modifiedBy` use) on attach and clears both on detach, in the same change as the membership op (internal/server/handlers_properties.go). Hidden. Clients filter members out of ordinary lists (`{"any.collections": {"$nin": ["bin"]}}`); a permanent delete stays DELETE …/objects/:id.

The stamps are ordinary synced properties: the server writes them, but nothing stops a peer from writing them directly, so a reader treats an absent stamp as unknown, never as "not moved".

Index

Constants

View Source
const (
	// Id is reserved — content-addressable user ids never produce it,
	// and the xKey guard refuses user definitions claiming it.
	Id          = "bin"
	Name        = "Bin"
	Description = "Moved to the bin: attach to move, detach to restore"

	// PropMovedAt is when the object was moved (server clock, an
	// instant); PropMovedBy the account that moved it.
	PropMovedAt = "movedAt"
	PropMovedBy = "movedBy"
)

Variables

This section is empty.

Functions

func NewCollection

func NewCollection() handler.Collection

NewCollection returns the handler.Collection to add to config.Config.Collections (see internal/server/sdk.go).

Types

This section is empty.

Jump to

Keyboard shortcuts

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