Documentation
¶
Overview ¶
Package memos implements the Memos adapter for the memo capability.
Index ¶
- func New() memosvc.Service
- func NewWithClient(c client) memosvc.Service
- type Adapter
- func (a *Adapter) Create(ctx context.Context, content, visibility string) (*ability.Memo, error)
- func (a *Adapter) Delete(ctx context.Context, name string) error
- func (a *Adapter) Get(ctx context.Context, name string) (*ability.Memo, error)
- func (a *Adapter) HealthCheck(ctx context.Context) (bool, error)
- func (a *Adapter) List(ctx context.Context, q *memosvc.ListQuery) (*ability.ListResult[ability.Memo], error)
- func (a *Adapter) ListRawEvents(ctx context.Context, cursor string) ([]any, string, error)
- func (a *Adapter) Update(ctx context.Context, name string, data map[string]any) (*ability.Memo, error)
- type Webhook
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func New ¶
New creates an Adapter using the default provider client (reads config from YAML). Returns nil when the provider is not configured.
func NewWithClient ¶
NewWithClient creates an Adapter with a specific client, useful for testing.
Types ¶
type Adapter ¶
type Adapter struct {
// contains filtered or unexported fields
}
Adapter implements memosvc.Service using the Memos provider client.
func (*Adapter) HealthCheck ¶
HealthCheck reports whether the memo backend is reachable by querying the current user endpoint.
func (*Adapter) List ¶
func (a *Adapter) List(ctx context.Context, q *memosvc.ListQuery) (*ability.ListResult[ability.Memo], error)
List returns a paginated list of memos.
func (*Adapter) ListRawEvents ¶
ListRawEvents lists memos as raw events for polling support.
type Webhook ¶
type Webhook struct{}
Webhook implements ability.WebhookConverter for Memos. The Memos webhook sends JSON payloads without authentication headers, so VerifySignature is a no-op by default.
func (*Webhook) VerifySignature ¶
VerifySignature validates the incoming webhook request. Memos does not send authentication headers, so this is a no-op that always succeeds. Users who need authentication should place a reverse proxy between Memos and the webhook receiver.
func (*Webhook) WebhookPath ¶
WebhookPath returns the URL path segment for Memos webhooks. The full URL is /webhook/provider/memos/events.