memo

package
v0.92.1 Latest Latest
Warning

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

Go to latest
Published: Jun 6, 2026 License: GPL-3.0 Imports: 5 Imported by: 0

Documentation

Overview

Package memo implements the memo capability for short-form note-taking systems.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Descriptor

func Descriptor(backend, app string, svc Service) hub.Descriptor

Descriptor returns the hub capability descriptor for the memo capability.

func RegisterService

func RegisterService(backend, app string, svc Service) error

RegisterService registers the memo capability with the hub and ability registry. It returns nil and logs a warning when svc is nil (provider not configured).

Types

type ListQuery

type ListQuery struct {
	Page ability.PageRequest
}

ListQuery wraps pagination for listing memos.

type Service

type Service interface {
	// List returns a paginated list of memos.
	List(ctx context.Context, q *ListQuery) (*ability.ListResult[ability.Memo], error)
	// Get returns a single memo by its resource name (e.g., "memos/123").
	Get(ctx context.Context, name string) (*ability.Memo, error)
	// Create creates a new memo with the given content and visibility.
	Create(ctx context.Context, content, visibility string) (*ability.Memo, error)
	// Update updates a memo's fields identified by the update mask.
	Update(ctx context.Context, name string, data map[string]any) (*ability.Memo, error)
	// Delete removes a memo by its resource name.
	Delete(ctx context.Context, name string) error
	// HealthCheck reports whether the memo backend is reachable.
	HealthCheck(ctx context.Context) (bool, error)
	// ListRawEvents lists memos as raw events for polling support.
	ListRawEvents(ctx context.Context, cursor string) ([]any, string, error)
}

Service defines the memo capability contract. Provider adapters implement this interface to bridge providers and invokers.

Directories

Path Synopsis
Package memos implements the Memos adapter for the memo capability.
Package memos implements the Memos adapter for the memo capability.

Jump to

Keyboard shortcuts

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